# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276256535 -10800 # Node ID 91031d3aab7dc99cd877967ad19c8b9c98cd3838 # Parent 92a765b5b3e7865dc1d398c9e531bb190796e003 Revision: 201021 Kit: 2010123 diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/cxmllibrary/dictionary/dict_creator.c --- a/browserutilities/cxmllibrary/dictionary/dict_creator.c Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/cxmllibrary/dictionary/dict_creator.c Fri Jun 11 14:42:15 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" +* under the terms of the License "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h Fri Jun 11 14:42:15 2010 +0300 @@ -158,7 +158,7 @@ * @param ?arg1 ?description * @return ?description */ - EXPORT_C TInt ActiveDownloads() const; + IMPORT_C TInt ActiveDownloads() const; /** * Calculates the total size of all on-going downloads in the diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/schemehandler/SchemeApp/data/SchemeApp_reg.rss --- a/browserutilities/schemehandler/SchemeApp/data/SchemeApp_reg.rss Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/schemehandler/SchemeApp/data/SchemeApp_reg.rss Fri Jun 11 14:42:15 2010 +0300 @@ -17,7 +17,7 @@ #include -#include +#include #include diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp --- a/browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -23,7 +23,7 @@ #include #include "SchemeAppUi.h" #include "Scheme.hrh" -#include +#include #include #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp --- a/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp Fri Jun 11 14:42:15 2010 +0300 @@ -63,7 +63,7 @@ LIBRARY apmime.lib LIBRARY apparc.lib LIBRARY efsrv.lib -LIBRARY BROWSERTELSERVICE.LIB +LIBRARY BrowserTelService.lib LIBRARY INETPROTUTIL.LIB LIBRARY estor.lib LIBRARY ws32.lib diff -r 92a765b5b3e7 -r 91031d3aab7d browserutilities/xmlparser/group/XMLInterface.mmp --- a/browserutilities/xmlparser/group/XMLInterface.mmp Mon May 03 13:32:15 2010 +0300 +++ b/browserutilities/xmlparser/group/XMLInterface.mmp Fri Jun 11 14:42:15 2010 +0300 @@ -59,7 +59,7 @@ LIBRARY euser.lib LIBRARY bafl.lib LIBRARY charconv.lib -LIBRARY cxmlparser.lib +LIBRARY cXmlParser.lib #ifdef __S60_32__ LANG sc diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/aiw_browser_provider_api/inc/AiwBrowserCommands.hrh --- a/web_plat/aiw_browser_provider_api/inc/AiwBrowserCommands.hrh Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/aiw_browser_provider_api/inc/AiwBrowserCommands.hrh Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef AIWBROWSERPROVIDER_HRH #define AIWBROWSERPROVIDER_HRH +#warning The AIW Browser API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // DATA TYPES enum TAiwTestMenuSaveCommands { diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h --- a/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef BROWSERDIALOGSPROVIDER_H #define BROWSERDIALOGSPROVIDER_H +#warning The Browser Dialogs Provider API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES // System Includes #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProviderObserver.h --- a/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProviderObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProviderObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef BROWSERDIALOGSPROVIDEROBSERVER_H #define BROWSERDIALOGSPROVIDEROBSERVER_H +#warning The Browser Dialogs Provider API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/browser_platform_api/inc/Browser_platform_variant.hrh --- a/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Fri Jun 11 14:42:15 2010 +0300 @@ -26,6 +26,8 @@ #ifndef BROWSER_PLATFORM_VARIANT_HRH #define BROWSER_PLATFORM_VARIANT_HRH +#warning The Browser Platfrom API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + /* * Establish which platform we are building on. * If required, un-comment correct platform macro as @@ -113,7 +115,7 @@ Disable WML support using BRDO_WML_DISABLED_FF Default is WML support enabled */ -#undef BRDO_WML_DISABLED_FF +#define BRDO_WML_DISABLED_FF // Defines if SecurityManager component is present #define BRDO_WRT_SECURITY_MGR_FF diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/cod_handler_api/inc/CodDownload.h --- a/web_plat/cod_handler_api/inc/CodDownload.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/cod_handler_api/inc/CodDownload.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef COD_DOWNLOAD_H #define COD_DOWNLOAD_H +#warning The COD Handler API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/connection_manager_api/inc/ApChangeObserver.h --- a/web_plat/connection_manager_api/inc/ApChangeObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/connection_manager_api/inc/ApChangeObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -22,6 +22,8 @@ #ifndef AP_CHANGE_OBSERVER_H #define AP_CHANGE_OBSERVER_H +#warning The Connection Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + //This class specifies a protocol for observing the AP changes class MApChangeObserver { diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/connection_manager_api/inc/ConnectionObservers.h --- a/web_plat/connection_manager_api/inc/ConnectionObservers.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/connection_manager_api/inc/ConnectionObservers.h Fri Jun 11 14:42:15 2010 +0300 @@ -22,6 +22,9 @@ #ifndef Connection_Observers_H #define Connection_Observers_H +#warning The Connection Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + //System includes #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/connection_manager_api/inc/IdPair.h --- a/web_plat/connection_manager_api/inc/IdPair.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/connection_manager_api/inc/IdPair.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,7 @@ #ifndef ID_PAIR_H #define ID_PAIR_H +#warning The Connection Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information //A class for defining a pair of ids NONSHARABLE_CLASS( TIdPair ) diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/connection_manager_api/inc/InternetConnectionManager.h --- a/web_plat/connection_manager_api/inc/InternetConnectionManager.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/connection_manager_api/inc/InternetConnectionManager.h Fri Jun 11 14:42:15 2010 +0300 @@ -21,6 +21,8 @@ #ifndef INTERNET_CONNECTION_MANAGER_H #define INTERNET_CONNECTION_MANAGER_H +#warning The Connection Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + //FORWARD DECLARATIONS class CIntConnectionInitiator; class CApUtils; diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/connection_manager_api/inc/MConnection.h --- a/web_plat/connection_manager_api/inc/MConnection.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/connection_manager_api/inc/MConnection.h Fri Jun 11 14:42:15 2010 +0300 @@ -22,6 +22,8 @@ #ifndef M_Connection_H #define M_Connection_H +#warning The Connection Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include // TEMP @@ -206,4 +208,4 @@ virtual void ShowConnectionChangedDlg() = 0; }; -#endif \ No newline at end of file +#endif diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/cxml_library_api/inc/cxml_str.h --- a/web_plat/cxml_library_api/inc/cxml_str.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/cxml_library_api/inc/cxml_str.h Fri Jun 11 14:42:15 2010 +0300 @@ -24,6 +24,8 @@ #ifndef CXML_STR_H #define CXML_STR_H +#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #ifdef __cplusplus extern "C" { #endif diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/cxml_library_api/inc/cxml_type_def.h --- a/web_plat/cxml_library_api/inc/cxml_type_def.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/cxml_library_api/inc/cxml_type_def.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef CXML_TYPE_DEF_H #define CXML_TYPE_DEF_H +#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + /* * ANSI/ISO C header files needed to define basic data types * (ie. NULL, etc) diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/cxml_library_api/inc/nw_encoder_stringtable.h --- a/web_plat/cxml_library_api/inc/nw_encoder_stringtable.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/cxml_library_api/inc/nw_encoder_stringtable.h Fri Jun 11 14:42:15 2010 +0300 @@ -166,6 +166,7 @@ The string table or NULL if not success. ** ----------------------------------------------------------------------- **/ +IMPORT_C NW_Encoder_StringTable_t* NW_Encoder_StringTable_new(void); diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/cxml_library_api/inc/nw_wbxml_reader.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_reader.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_reader.h Fri Jun 11 14:42:15 2010 +0300 @@ -15,6 +15,7 @@ * */ +#warning The CXML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information /** ----------------------------------------------------------------------- ** @package: NW_WBXML diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h --- a/web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,7 @@ #ifndef __RHTTPDOWNLOADMGRAPIEXT_H__ #define __RHTTPDOWNLOADMGRAPIEXT_H__ +#warning The Download Manager API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information #include "DownloadMgrClient.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/ConnectionObserver.h --- a/web_plat/feeds_engine_api/inc/ConnectionObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/ConnectionObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef CONNECTION_OBSERVER_H #define CONNECTION_OBSERVER_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedAttributes.h --- a/web_plat/feeds_engine_api/inc/FeedAttributes.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedAttributes.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,7 @@ #ifndef FEED_ATTRIBUTES_H #define FEED_ATTRIBUTES_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information // INCLUDES diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsEntity.h --- a/web_plat/feeds_engine_api/inc/FeedsEntity.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsEntity.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef __FEEDSENTITY_H #define __FEEDSENTITY_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -246,3 +248,4 @@ #endif //__FEEDSENTITY_H__ + diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsInterface.h --- a/web_plat/feeds_engine_api/inc/FeedsInterface.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsInterface.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FEED_INTERFACE_H #define FEED_INTERFACE_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -469,4 +471,4 @@ }; #endif // FEED_INTERFACE_H -// End of File \ No newline at end of file +// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsMap.h --- a/web_plat/feeds_engine_api/inc/FeedsMap.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsMap.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef __FEEDS_MAP_H #define __FEEDS_MAP_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerClient.h --- a/web_plat/feeds_engine_api/inc/FeedsServerClient.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerClient.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef FEEDS_SERVER_CLIENT_H #define FEEDS_SERVER_CLIENT_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include @@ -264,4 +267,4 @@ #endif // FEEDS_SERVER_CLIENT_H -// End of File \ No newline at end of file +// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerFeed.h --- a/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FEEDS_SERVER_FEED_H #define FEEDS_SERVER_FEED_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -650,4 +652,4 @@ }; #endif // FEEDS_SERVER_FEED_H -// End of File \ No newline at end of file +// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h --- a/web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FEEDS_SERVER_FOLDER_ITEM_H #define FEEDS_SERVER_FOLDER_ITEM_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerMsg.h --- a/web_plat/feeds_engine_api/inc/FeedsServerMsg.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerMsg.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef FEEDS_SERVER_MSG_H #define FEEDS_SERVER_MSG_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h --- a/web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef REQUEST_HANDLER_H #define REQUEST_HANDLER_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FeedsServerSettings.h --- a/web_plat/feeds_engine_api/inc/FeedsServerSettings.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerSettings.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FEEDS_SERVER_SETTINGS_H #define FEEDS_SERVER_SETTINGS_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES // CONSTANTS diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/FolderAttributes.h --- a/web_plat/feeds_engine_api/inc/FolderAttributes.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FolderAttributes.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,7 @@ #ifndef FOLDER_ATTRIBUTES_H #define FOLDER_ATTRIBUTES_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information // INCLUDES diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/LeakTracker.h --- a/web_plat/feeds_engine_api/inc/LeakTracker.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/LeakTracker.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,7 @@ #ifndef LEAK_TRACKER_H #define LEAK_TRACKER_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information // Helper macros #if defined(__WINSCW__) diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/Transaction.h --- a/web_plat/feeds_engine_api/inc/Transaction.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/Transaction.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef TRANSACTION_H #define TRANSACTION_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -505,4 +507,4 @@ #endif // TRANSACTION_H -// End of File \ No newline at end of file +// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/feeds_engine_api/inc/XmlEncoding.h --- a/web_plat/feeds_engine_api/inc/XmlEncoding.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/XmlEncoding.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,7 @@ #ifndef XML_ENCODING_H #define XML_ENCODING_H +#warning The Feeds Engine API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/launcher_api/inc/BrowserLauncher.h --- a/web_plat/launcher_api/inc/BrowserLauncher.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/launcher_api/inc/BrowserLauncher.h Fri Jun 11 14:42:15 2010 +0300 @@ -21,6 +21,8 @@ #ifndef BROWSERLAUNCHER_H #define BROWSERLAUNCHER_H +#warning The Browser Launcher API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -244,4 +246,4 @@ TBool& aIsOverriddenSettings ); }; -#endif // BROWSERLAUNCHER_H \ No newline at end of file +#endif // BROWSERLAUNCHER_H diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/launcher_api/inc/BrowserOverriddenSettings.h --- a/web_plat/launcher_api/inc/BrowserOverriddenSettings.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/launcher_api/inc/BrowserOverriddenSettings.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BROWSER_OVERRIDDEN_SETTINGS_H #define BROWSER_OVERRIDDEN_SETTINGS_H +#warning The Browser Launcher API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -109,4 +111,4 @@ #include -#endif //BROWSER_OVERRIDDEN_SETTINGS_H \ No newline at end of file +#endif //BROWSER_OVERRIDDEN_SETTINGS_H diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/launcher_api/inc/DownloadedContentHandler.h --- a/web_plat/launcher_api/inc/DownloadedContentHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/launcher_api/inc/DownloadedContentHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -22,6 +22,8 @@ #include #include +#warning The Browser Launcher API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // FORWARD DECLARATIONS class RFile; diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/multipart_parser_api/inc/BodyPart.h --- a/web_plat/multipart_parser_api/inc/BodyPart.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/multipart_parser_api/inc/BodyPart.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef BODYPART_H #define BODYPART_H +#warning The Multipart Parser API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/multipart_parser_api/inc/MultipartParser.h --- a/web_plat/multipart_parser_api/inc/MultipartParser.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/multipart_parser_api/inc/MultipartParser.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef MULTIPARTPARSER_H #define MULTIPARTPARSER_H +#warning The Multipart Parser API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include "BodyPart.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/recent_url_store_api/inc/RecentUrlStore.h --- a/web_plat/recent_url_store_api/inc/RecentUrlStore.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/recent_url_store_api/inc/RecentUrlStore.h Fri Jun 11 14:42:15 2010 +0300 @@ -24,6 +24,8 @@ #ifndef RECENTURLSTORE_H #define RECENTURLSTORE_H +#warning The Recent URL Store API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/rt_gesturehelper_api/inc/rt_gesturehelper.h --- a/web_plat/rt_gesturehelper_api/inc/rt_gesturehelper.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/rt_gesturehelper_api/inc/rt_gesturehelper.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef _RT_GESTUREHELPER_H_ #define _RT_GESTUREHELPER_H_ +#warning The RT Gesture API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/rt_gesturehelper_api/inc/rt_gestureobserver.h --- a/web_plat/rt_gesturehelper_api/inc/rt_gestureobserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/rt_gesturehelper_api/inc/rt_gestureobserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef _RT_GESTUREOBSERVER_H_ #define _RT_GESTUREOBSERVER_H_ +#warning The RT Gesture API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #include namespace RT_GestureHelper diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/scheme_handler_plugin_api/inc/SchemeHandler.h --- a/web_plat/scheme_handler_plugin_api/inc/SchemeHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/scheme_handler_plugin_api/inc/SchemeHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -21,6 +21,8 @@ #ifndef SCHEME_HANDLER_H #define SCHEME_HANDLER_H +#warning The Scheme Handler API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/scriptable_plugin_api/inc/npscript.h --- a/web_plat/scriptable_plugin_api/inc/npscript.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/scriptable_plugin_api/inc/npscript.h Fri Jun 11 14:42:15 2010 +0300 @@ -68,6 +68,8 @@ #ifndef _NP_SCRIPT_H_ #define _NP_SCRIPT_H_ +#warning This version of the Netscape Plugin API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #ifdef __cplusplus extern "C" { #endif diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/webutils_api/inc/CUserAgent.h --- a/web_plat/webutils_api/inc/CUserAgent.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/webutils_api/inc/CUserAgent.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef __CUSERAGENT_H #define __CUSERAGENT_H +#warning The Web Utils API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h --- a/web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef WEBUTILSINTERNALCRKEYS_H #define WEBUTILSINTERNALCRKEYS_H +#warning The Web Utils API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #include // AppName fragment of useragent string diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h --- a/web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef WEBUTILSSDKCRKEYS_H #define WEBUTILSSDKCRKEYS_H +#warning The Web Utils API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + const TUid KCRUidWebUtils = {0x101F8731}; -#endif // WEBUTILSSDKCRKEYS_H \ No newline at end of file +#endif // WEBUTILSSDKCRKEYS_H diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/xml_parser_api/inc/MWBXMLContentHandler.h --- a/web_plat/xml_parser_api/inc/MWBXMLContentHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/xml_parser_api/inc/MWBXMLContentHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -32,6 +32,8 @@ #ifndef __MWBXMLCONTENTHANDLER_H #define __MWBXMLCONTENTHANDLER_H +#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/xml_parser_api/inc/MXMLAttributes.h --- a/web_plat/xml_parser_api/inc/MXMLAttributes.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/xml_parser_api/inc/MXMLAttributes.h Fri Jun 11 14:42:15 2010 +0300 @@ -35,6 +35,9 @@ #ifndef __MXMLATTRIBUTES_H #define __MXMLATTRIBUTES_H +#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/xml_parser_api/inc/MXMLContentHandler.h --- a/web_plat/xml_parser_api/inc/MXMLContentHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/xml_parser_api/inc/MXMLContentHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -38,6 +38,9 @@ #ifndef __MXMLCONTENTHANDLER_H #define __MXMLCONTENTHANDLER_H +#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/xml_parser_api/inc/RXMLReader.h --- a/web_plat/xml_parser_api/inc/RXMLReader.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/xml_parser_api/inc/RXMLReader.h Fri Jun 11 14:42:15 2010 +0300 @@ -41,6 +41,9 @@ #ifndef __RXMLREADER_H #define __RXMLREADER_H +#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_plat/xml_parser_api/inc/XMLUtils.h --- a/web_plat/xml_parser_api/inc/XMLUtils.h Mon May 03 13:32:15 2010 +0300 +++ b/web_plat/xml_parser_api/inc/XMLUtils.h Fri Jun 11 14:42:15 2010 +0300 @@ -43,6 +43,8 @@ #ifndef __XMLUTILS_H #define __XMLUTILS_H +#warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // Error Codes const TInt KErrDictionaryInitFailed=(-90); diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlDefs.h --- a/web_pub/browser_control_api/inc/BrCtlDefs.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef BRCTLDEFS_H #define BRCTLDEFS_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES // DATA TYPES diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlDialogsProvider.h --- a/web_pub/browser_control_api/inc/BrCtlDialogsProvider.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlDialogsProvider.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLDIALOGSPROVIDER_H #define BRCTLDIALOGSPROVIDER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlDownloadObserver.h --- a/web_pub/browser_control_api/inc/BrCtlDownloadObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlDownloadObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLDOWNLOADOBSERVER_H #define BRCTLDOWNLOADOBSERVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlInterface.h --- a/web_pub/browser_control_api/inc/BrCtlInterface.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlInterface.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLINTERFACE_H #define BRCTLINTERFACE_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include <../bidi.h> #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlLayoutObserver.h --- a/web_pub/browser_control_api/inc/BrCtlLayoutObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlLayoutObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLLAYOUTOBSERVER_H #define BRCTLLAYOUTOBSERVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlLinkResolver.h --- a/web_pub/browser_control_api/inc/BrCtlLinkResolver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlLinkResolver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLLINKRESOLVER_H #define BRCTLLINKRESOLVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h --- a/web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLSOFTKEYSOBSERVER_H #define BRCTLSOFTKEYSOBSERVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h --- a/web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLSPECIALLOADOBSERVER_H #define BRCTLSPECIALLOADOBSERVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_control_api/inc/BrCtlWindowObserver.h --- a/web_pub/browser_control_api/inc/BrCtlWindowObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlWindowObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BRCTLWINDOWOBSERVER_H #define BRCTLWINDOWOBSERVER_H +#warning The Browser Control API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/BrowserPluginInterface.h --- a/web_pub/browser_plugin_api/inc/BrowserPluginInterface.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/BrowserPluginInterface.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef BROWSERPLUGININTERFACE_H #define BROWSERPLUGININTERFACE_H +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + const TUid KBrowserPluginInterfaceUid = { 0x101F8810 }; #endif // BROWSERPLUGININTERFACE_H diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h --- a/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef CECOMBROWSERPLUGININTERFACE_H #define CECOMBROWSERPLUGININTERFACE_H +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // System includes #include #include @@ -87,3 +89,4 @@ + diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/PluginAdapterInterface.h --- a/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef MPLUGINADAPTER_H #define MPLUGINADAPTER_H +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include "coecntrl.h" #include "coecobs.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/np_defines.h --- a/web_pub/browser_plugin_api/inc/np_defines.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/np_defines.h Fri Jun 11 14:42:15 2010 +0300 @@ -18,6 +18,8 @@ #ifndef NP_DEFINES_H #define NP_DEFINES_H +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + struct TKeyEvent; struct TPointerEvent; @@ -52,3 +54,4 @@ // End of File + diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/npapi.h --- a/web_pub/browser_plugin_api/inc/npapi.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/npapi.h Fri Jun 11 14:42:15 2010 +0300 @@ -48,6 +48,8 @@ #ifndef _NPAPI_H_ #define _NPAPI_H_ +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #define GENERIC_CONTEXTS #ifdef INCLUDE_JAVA diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/npupp.h --- a/web_pub/browser_plugin_api/inc/npupp.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/npupp.h Fri Jun 11 14:42:15 2010 +0300 @@ -64,6 +64,8 @@ #include "npapi.h" #endif +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #include "jri.h" /****************************************************************************************** diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/prcpucfg.h --- a/web_pub/browser_plugin_api/inc/prcpucfg.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/prcpucfg.h Fri Jun 11 14:42:15 2010 +0300 @@ -39,6 +39,7 @@ * porting the file to the Symbian platform on May 1st, 2004. */ +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information #ifndef nspr_cpucfg___ #define nspr_cpucfg___ diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/browser_plugin_api/inc/prtypes.h --- a/web_pub/browser_plugin_api/inc/prtypes.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/prtypes.h Fri Jun 11 14:42:15 2010 +0300 @@ -57,6 +57,8 @@ #ifndef prtypes_h___ #define prtypes_h___ +#warning This NP API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #ifdef MDCPUCFG #include MDCPUCFG #else @@ -549,3 +551,4 @@ #endif /* prtypes_h___ */ + diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_client_api/inc/DownloadMgrClient.h --- a/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef __DOWNLOADMGR_CLIENT_H__ #define __DOWNLOADMGR_CLIENT_H__ +#warning This Download Manager Client API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -1114,3 +1116,4 @@ #endif /* __DOWNLOADMGR_CLIENT_H__ */ + diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_client_api/inc/HttpDownloadMgrCommon.h --- a/web_pub/download_mgr_client_api/inc/HttpDownloadMgrCommon.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_client_api/inc/HttpDownloadMgrCommon.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef HTTPDOWNLOADMGRCOMMON_H #define HTTPDOWNLOADMGRCOMMON_H +#warning This Download Manager Client API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/CDownloadMgrUiBase.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiBase.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiBase.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef CDOWNLOADMGRUIBASE_H #define CDOWNLOADMGRUIBASE_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadMenu.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadMenu.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadMenu.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef CDOWNLOADMGRUIDOWNLOADMENU_H #define CDOWNLOADMGRUIDOWNLOADMENU_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef CDOWNLOADMGRUIDOWNLOADSLIST_H #define CDOWNLOADMGRUIDOWNLOADSLIST_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/CDownloadMgrUiLibRegistry.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiLibRegistry.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiLibRegistry.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef CDOWNLOADMGRUILIBREGISTRY_H #define CDOWNLOADMGRUILIBREGISTRY_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef CDOWNLOADMGRUIUSERINTERACTIONS_H #define CDOWNLOADMGRUIUSERINTERACTIONS_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h --- a/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -20,6 +20,8 @@ #ifndef DOWNLOADSLISTDLGOBSERVER_H #define DOWNLOADSLISTDLGOBSERVER_H +#warning This Download Manager UI API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include @@ -69,3 +71,4 @@ #endif /* DOWNLOADSLISTDLGOBSERVER_H */ + diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h --- a/web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef ACTIVE_FAVOURITES_DB_NOTIFIER_H #define ACTIVE_FAVOURITES_DB_NOTIFIER_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesDb.h --- a/web_pub/favourites_engine_api/inc/FavouritesDb.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesDb.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_DB_H #define FAVOURITES_DB_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h --- a/web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef FAVOURITES_DB_INCREMENTAL_H #define FAVOURITES_DB_INCREMENTAL_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h --- a/web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef FAVOURITES_DB_NOTIFIER_H #define FAVOURITES_DB_NOTIFIER_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesDbObserver.h --- a/web_pub/favourites_engine_api/inc/FavouritesDbObserver.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesDbObserver.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_DB_OBSERVER_H #define FAVOURITES_DB_OBSERVER_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesFile.h --- a/web_pub/favourites_engine_api/inc/FavouritesFile.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesFile.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_FILE_H #define FAVOURITES_FILE_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesFile.inl --- a/web_pub/favourites_engine_api/inc/FavouritesFile.inl Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesFile.inl Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef FAVOURITES_FILE_INL #define FAVOURITES_FILE_INL +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + /** * Implementation of RFavouritesFile::RFavouritesFile * @since 0.9 diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesHandle.h --- a/web_pub/favourites_engine_api/inc/FavouritesHandle.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesHandle.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_HANDLE_H #define FAVOURITES_HANDLE_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesHandle.inl --- a/web_pub/favourites_engine_api/inc/FavouritesHandle.inl Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesHandle.inl Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,9 @@ #ifndef FAVOURITES_HANDLE_INL #define FAVOURITES_HANDLE_INL +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + + /** * Implementation of RFavouritesHandle::RFavouritesHandle() * @since 0.9 diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesItem.h --- a/web_pub/favourites_engine_api/inc/FavouritesItem.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesItem.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_ITEM_H #define FAVOURITES_ITEM_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesItemData.h --- a/web_pub/favourites_engine_api/inc/FavouritesItemData.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesItemData.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_ITEM_DATA_H #define FAVOURITES_ITEM_DATA_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesItemList.h --- a/web_pub/favourites_engine_api/inc/FavouritesItemList.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesItemList.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_ITEM_LIST_H #define FAVOURITES_ITEM_LIST_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDE FILES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesLimits.h --- a/web_pub/favourites_engine_api/inc/FavouritesLimits.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesLimits.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_LIMITS_H #define FAVOURITES_LIMITS_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // CONSTANTS //========== Favourites attribute limits ==========// diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesSession.h --- a/web_pub/favourites_engine_api/inc/FavouritesSession.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesSession.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_SESSION_H #define FAVOURITES_SESSION_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesSession.inl --- a/web_pub/favourites_engine_api/inc/FavouritesSession.inl Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesSession.inl Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_SESSION_INL #define FAVOURITES_SESSION_INL +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // --------------------------------------------------------- // RFavouritesSession::SendReceive // --------------------------------------------------------- diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/inc/FavouritesWapAp.h --- a/web_pub/favourites_engine_api/inc/FavouritesWapAp.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/inc/FavouritesWapAp.h Fri Jun 11 14:42:15 2010 +0300 @@ -19,6 +19,8 @@ #ifndef FAVOURITES_WAP_AP_H #define FAVOURITES_WAP_AP_H +#warning The Favorites API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + // INCLUDES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h --- a/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,25 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : FavouritesEngineTest.h +* Part of : ?Subsystem_name / FavouritesEngineTest +* +* Description : FavouritesEngineTest test module. +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2002 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: FavouritesEngineTest test module. -* +* ============================================================================ */ - #ifndef FAVOURITESENGINETEST_H #define FAVOURITESENGINETEST_H diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,25 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : FavouritesEngineTest.cpp +* Part of : ?Subsystem_name / FavouritesEngineTest +* +* Description : FavouritesBCTest class member functions +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2006 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: FavouritesBCTest class member functions -* +* ============================================================================ */ - // INCLUDE FILES #include #include "FavouritesEngineTest.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,23 +1,26 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name: FavouritesItemTestCases.cpp +* Part of: FavouritesEngineTest class member functions +* +* Description: +* +* Version: 1.0 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: -* -* +* ============================================================================ */ - // INCLUDE FILES #include #include "FavouritesEngineTest.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,23 +1,26 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name: FavouritesWapApTestCases.cpp +* Part of: FavouritesEngineTest class member functions +* +* Description: +* +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2002 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: -* -* +* ============================================================================ */ - // INCLUDE FILES #include #include "FavouritesEngineTest.h" diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/settings_api/inc/BrowserUiInternalCRKeys.h --- a/web_pub/settings_api/inc/BrowserUiInternalCRKeys.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/settings_api/inc/BrowserUiInternalCRKeys.h Fri Jun 11 14:42:15 2010 +0300 @@ -17,6 +17,8 @@ #ifndef BROWSERUIINTERNALCRKEYS_H #define BROWSERUIINTERNALCRKEYS_H +#warning The Browser UI SDK keys will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + #include #pragma message ("Please include BrowserUiSDKCRKeys.h in place of BrowserUiInternalCRKeys.h") diff -r 92a765b5b3e7 -r 91031d3aab7d web_pub/settings_api/inc/BrowserUiSDKCRKeys.h --- a/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h Mon May 03 13:32:15 2010 +0300 +++ b/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h Fri Jun 11 14:42:15 2010 +0300 @@ -17,6 +17,8 @@ #ifndef BROWSERUISDKCRKEYS_H #define BROWSERUISDKCRKEYS_H +#warning The Browser UI SDK keys will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information + const TUid KCRUidBrowserUiLV = {0x101F861B}; const TUid KCRUidBrowser = {0x10008D39}; @@ -410,4 +412,4 @@ // Controls whether enter key can activate a link, ot just has a default behavior. const TUint32 KBrowserEnterKeyMode = 0x00000083; -#endif // BROWSERUISDKCRKEYS_H \ No newline at end of file +#endif // BROWSERUISDKCRKEYS_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/group/bld.inf --- a/webengine/group/bld.inf Mon May 03 13:32:15 2010 +0300 +++ b/webengine/group/bld.inf Fri Jun 11 14:42:15 2010 +0300 @@ -32,7 +32,6 @@ #include "../widgetinstaller/group/bld.inf" #include "../widgetregistry/group/BLD.INF" #include "../osswebengine/WebKit/s60/group/bld.inf" -#include "../wmlengine/group/BLD.INF" #include "../device/group/bld.inf" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/JavaScriptCore/chartables.c --- a/webengine/osswebengine/DerivedSources/JavaScriptCore/chartables.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/JavaScriptCore/chartables.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/ColorData.c --- a/webengine/osswebengine/DerivedSources/WebCore/ColorData.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/ColorData.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* ANSI-C code produced by gperf version 2.7.2 */ /* Command-line: gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 /cygdrive/x/tot/WebCore/platform/ColorData.gperf */ struct NamedColor { const char *name; int RGBValue; }; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/DocTypeStrings.cpp --- a/webengine/osswebengine/DerivedSources/WebCore/DocTypeStrings.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/DocTypeStrings.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* ANSI-C code produced by gperf version 2.7.2 */ /* Command-line: gperf -CEot -L ANSI-C -k '*' -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards /cygdrive/x/tot/WebCore/html/DocTypeStrings.gperf */ struct PubIDInfo { diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/SVGElementFactory.cpp --- a/webengine/osswebengine/DerivedSources/WebCore/SVGElementFactory.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/SVGElementFactory.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/SVGNames.cpp --- a/webengine/osswebengine/DerivedSources/WebCore/SVGNames.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/SVGNames.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheets.h --- a/webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheets.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheets.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - namespace WebCore { extern const char html4UserAgentStyleSheet[8527]; extern const char quirksUserAgentStyleSheet[331]; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheetsData.cpp --- a/webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheetsData.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheetsData.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - namespace WebCore { extern const char html4UserAgentStyleSheet[8527] = { 64, 110, 97, 109, 101, 115, 112, 97, 99, 101, 32, 34, 104, 116, 116, 112, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/XLinkNames.cpp --- a/webengine/osswebengine/DerivedSources/WebCore/XLinkNames.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/XLinkNames.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/ksvgcssproperties.h --- a/webengine/osswebengine/DerivedSources/WebCore/ksvgcssproperties.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/ksvgcssproperties.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/DerivedSources/WebCore/ksvgcssvalues.h --- a/webengine/osswebengine/DerivedSources/WebCore/ksvgcssvalues.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/DerivedSources/WebCore/ksvgcssvalues.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSLock.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSLock.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSLock.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h --- a/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp --- a/webengine/osswebengine/JavaScriptCore/JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ // This file includes a derived source file from the build output tree. // Since the location of the derived sources depends on which configuration // we are building, we need to use the include path ( which can be diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp --- a/webengine/osswebengine/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ // This file exists to work around a bug in Visual Studio 2005 // Occasionally on launch VS05 will fail to correctly find and // identify generated files, thereby excluding them from the build diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/JavaScriptCorePrefix.h --- a/webengine/osswebengine/JavaScriptCore/JavaScriptCorePrefix.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/JavaScriptCorePrefix.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ #ifdef __cplusplus #define new ("if you use new/delete make sure to include config.h at the top of the file"()) #define delete ("if you use new/delete make sure to include config.h at the top of the file"()) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/bindings/npruntime_impl.h --- a/webengine/osswebengine/JavaScriptCore/bindings/npruntime_impl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/bindings/npruntime_impl.h Fri Jun 11 14:42:15 2010 +0300 @@ -34,17 +34,17 @@ extern "C" { #endif -extern void _NPN_ReleaseVariantValue(NPVariant *variant); -extern NPIdentifier _NPN_GetStringIdentifier(const NPUTF8 *name); +extern IMPORT void _NPN_ReleaseVariantValue(NPVariant *variant); +extern IMPORT NPIdentifier _NPN_GetStringIdentifier(const NPUTF8 *name); extern void _NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers); -extern NPIdentifier _NPN_GetIntIdentifier(int32_t intid); +extern IMPORT NPIdentifier _NPN_GetIntIdentifier(int32_t intid); extern bool _NPN_IdentifierIsString(NPIdentifier identifier); extern NPUTF8 *_NPN_UTF8FromIdentifier(NPIdentifier identifier); extern int32_t _NPN_IntFromIdentifier(NPIdentifier identifier); -extern NPObject *_NPN_CreateObject(NPP npp, NPClass *aClass); -extern NPObject *_NPN_RetainObject(NPObject *obj); -extern void _NPN_ReleaseObject(NPObject *obj); -extern void _NPN_DeallocateObject(NPObject *obj); +extern IMPORT NPObject *_NPN_CreateObject(NPP npp, NPClass *aClass); +extern IMPORT NPObject *_NPN_RetainObject(NPObject *obj); +extern IMPORT void _NPN_ReleaseObject(NPObject *obj); +extern IMPORT void _NPN_DeallocateObject(NPObject *obj); extern bool _NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); extern bool _NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); extern bool _NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result); diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/icu/unicode/utf_old.h --- a/webengine/osswebengine/JavaScriptCore/icu/unicode/utf_old.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/icu/unicode/utf_old.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,17 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/collector.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/collector.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/collector.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -839,7 +839,7 @@ ASSERT(heap.operationInProgress == NoOperation); if (heap.operationInProgress != NoOperation) - abort(); + ; // abort(); heap.operationInProgress = Collection; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/function.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/function.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/function.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -101,7 +101,7 @@ bool cont = dbg->callEvent(&newExec,sid,lineno,this,args); if (!cont) { - dbg->imp()->abort(); + // dbg->imp()->abort(); return jsUndefined(); } } @@ -135,7 +135,7 @@ int cont = dbg->returnEvent(&newExec,sid,lineno,this); if (!cont) { - dbg->imp()->abort(); + // dbg->imp()->abort(); return jsUndefined(); } } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/function_object.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/function_object.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/function_object.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -205,7 +205,7 @@ // send empty sourceURL to indicate constructed code bool cont = dbg->sourceParsed(exec, sid, UString(), body, lineNumber, errLine, errMsg); if (!cont) { - dbg->imp()->abort(); + // dbg->imp()->abort(); return new JSObject(); } } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/internal.h --- a/webengine/osswebengine/JavaScriptCore/kjs/internal.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/internal.h Fri Jun 11 14:42:15 2010 +0300 @@ -66,7 +66,7 @@ class NumberImp : public JSCell { friend class ConstantValues; - friend JSValue *jsNumberCell(double); +IMPORT friend JSValue *jsNumberCell(double); public: double value() const { return val; } @@ -135,7 +135,7 @@ isAborted = false; } - void abort() { isAborted = true; } +IMPORT void abort() { isAborted = true; } bool aborted() const { return isAborted; } AttachedInterpreter *interps; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/interpreter.h --- a/webengine/osswebengine/JavaScriptCore/kjs/interpreter.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/interpreter.h Fri Jun 11 14:42:15 2010 +0300 @@ -105,7 +105,7 @@ * Resets the global object's default properties and adds the default object * prototype to its prototype chain. */ - void initGlobalObject(); + IMPORT void initGlobalObject(); /** * Returns the object that is used as the global object during all script @@ -352,7 +352,7 @@ int refCount() const { return m_refCount; } protected: - virtual ~Interpreter(); // only deref should delete us + IMPORT virtual ~Interpreter(); // only deref should delete us virtual bool shouldInterruptScript() const { return true; } unsigned m_timeoutTime; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/nodes.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/nodes.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/nodes.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -321,7 +321,7 @@ if (dbg && !dbg->hasHandledException(exec, exceptionValue)) { bool cont = dbg->exception(exec, currentSourceId(exec), m_line, exceptionValue); if (!cont) - dbg->imp()->abort(); + ; // dbg->imp()->abort(); } } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/kjs/testkjs.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/testkjs.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/kjs/testkjs.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -172,7 +172,7 @@ case Quit: exit(0); default: - abort(); + ; // abort(); } return 0; } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/pcre/pcre_exec.c --- a/webengine/osswebengine/JavaScriptCore/pcre/pcre_exec.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/pcre/pcre_exec.c Fri Jun 11 14:42:15 2010 +0300 @@ -3402,7 +3402,7 @@ RRETURN_37: #endif -abort(); +//abort(); return 0; #endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/pcre/ucp.h --- a/webengine/osswebengine/JavaScriptCore/pcre/ucp.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/pcre/ucp.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /************************************************* * libucp - Unicode Property Table handler * *************************************************/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/pcre/ucpinternal.h --- a/webengine/osswebengine/JavaScriptCore/pcre/ucpinternal.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/pcre/ucpinternal.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /************************************************* * libucp - Unicode Property Table handler * *************************************************/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.cpp --- a/webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -433,7 +433,7 @@ } if (next_class >= kNumClasses) { MESSAGE("used up too many size classes: %d\n", next_class); - abort(); +// abort(); } // Initialize the number of pages we should allocate to split into @@ -454,25 +454,25 @@ const size_t sc = SizeClass(size); if (sc == 0) { MESSAGE("Bad size class %d for %" PRIuS "\n", sc, size); - abort(); +// abort(); } if (sc > 1 && size <= class_to_size[sc-1]) { MESSAGE("Allocating unnecessarily large class %d for %" PRIuS "\n", sc, size); - abort(); +// abort(); } if (sc >= kNumClasses) { MESSAGE("Bad size class %d for %" PRIuS "\n", sc, size); - abort(); +// abort(); } const size_t s = class_to_size[sc]; if (size > s) { MESSAGE("Bad size %" PRIuS " for %" PRIuS " (sc = %d)\n", s, size, sc); - abort(); +// abort(); } if (s == 0) { MESSAGE("Bad size %" PRIuS " for %" PRIuS " (sc = %d)\n", s, size, sc); - abort(); +// abort(); } } } @@ -531,7 +531,7 @@ if (free_avail_ < kAlignedSize) { // Need more room free_area_ = reinterpret_cast(MetaDataAlloc(kAllocIncrement)); - if (free_area_ == NULL) abort(); + if (free_area_ == NULL) ;//abort(); free_avail_ = kAllocIncrement; } result = free_area_; @@ -2352,7 +2352,7 @@ void* p = do_malloc(size); if (p == NULL) { MESSAGE("Unable to allocate %" PRIuS " bytes: new failed\n", size); - abort(); +// abort(); } MallocHook::InvokeNewHook(p, size); return p; @@ -2367,7 +2367,7 @@ void* p = do_malloc(size); if (p == NULL) { MESSAGE("Unable to allocate %" PRIuS " bytes: new failed\n", size); - abort(); +// abort(); } MallocHook::InvokeNewHook(p, size); return p; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/wtf/TCSpinLock.h --- a/webengine/osswebengine/JavaScriptCore/wtf/TCSpinLock.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/wtf/TCSpinLock.h Fri Jun 11 14:42:15 2010 +0300 @@ -160,16 +160,16 @@ pthread_mutex_t private_lock_; inline void Init() { - if (pthread_mutex_init(&private_lock_, NULL) != 0) abort(); + if (pthread_mutex_init(&private_lock_, NULL) != 0) ; //abort(); } inline void Finalize() { - if (pthread_mutex_destroy(&private_lock_) != 0) abort(); + if (pthread_mutex_destroy(&private_lock_) != 0); // abort(); } inline void Lock() { - if (pthread_mutex_lock(&private_lock_) != 0) abort(); + if (pthread_mutex_lock(&private_lock_) != 0);// abort(); } inline void Unlock() { - if (pthread_mutex_unlock(&private_lock_) != 0) abort(); + if (pthread_mutex_unlock(&private_lock_) != 0); // abort(); } }; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptCore/wtf/Vector.h --- a/webengine/osswebengine/JavaScriptCore/wtf/Vector.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptCore/wtf/Vector.h Fri Jun 11 14:42:15 2010 +0300 @@ -274,7 +274,8 @@ ASSERT(newCapacity >= m_capacity); m_capacity = newCapacity; if (newCapacity > std::numeric_limits::max() / sizeof(T)) - abort(); + // abort() + ; m_buffer = static_cast(fastMalloc(newCapacity * sizeof(T))); } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/AlwaysInline.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/AlwaysInline.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/AlwaysInline.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Assertions.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Assertions.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Assertions.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/FastMalloc.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/FastMalloc.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/FastMalloc.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Forward.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Forward.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Forward.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashCountedSet.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashCountedSet.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashCountedSet.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashSet.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashSet.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashSet.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Noncopyable.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Noncopyable.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Noncopyable.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtr.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnPtr.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Platform.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Platform.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Platform.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Vector.h --- a/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Vector.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Vector.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/JavaScriptGlue/config.h --- a/webengine/osswebengine/JavaScriptGlue/config.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/JavaScriptGlue/config.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #ifndef DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER #endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/MemoryManager/Group/MemManTest.mmp --- a/webengine/osswebengine/MemoryManager/Group/MemManTest.mmp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/MemoryManager/Group/MemManTest.mmp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,43 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : MemManTest.mmp +* Part of : MemMan tool +* Description : Project specification file +* Version : * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* * -* Description: Project specification file -* +* ============================================================================== */ - #ifndef __BROWSER_SDK #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/NP_jsobject.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/NP_jsobject.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/NP_jsobject.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime_impl.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime_impl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime_impl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_object.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_object.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_object.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_root.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_root.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_root.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/JSLock.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/JSLock.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/JSLock.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/SavedBuiltins.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/SavedBuiltins.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/SavedBuiltins.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/collector.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/collector.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/collector.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/dtoa.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/dtoa.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/dtoa.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/function.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/function.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/function.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/identifier.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/identifier.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/identifier.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/internal.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/internal.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/internal.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/interpreter.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/interpreter.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/interpreter.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/lookup.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/lookup.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/lookup.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/object.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/object.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/object.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/operations.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/operations.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/operations.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/property_map.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/property_map.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/property_map.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/protect.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/protect.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/protect.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/string_object.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/string_object.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/string_object.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/ustring.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/ustring.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/ustring.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/kjs/value.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/value.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/kjs/value.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/pcre/pcre.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/pcre/pcre.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/pcre/pcre.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/AlwaysInline.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/AlwaysInline.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/AlwaysInline.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Assertions.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Assertions.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Assertions.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/FastMalloc.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/FastMalloc.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/FastMalloc.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Forward.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Forward.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Forward.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/GetPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/GetPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/GetPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashCountedSet.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashCountedSet.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashCountedSet.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashMap.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashMap.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashMap.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashSet.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashSet.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashSet.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTable.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTable.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTable.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTraits.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTraits.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTraits.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/ListHashSet.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/ListHashSet.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/ListHashSet.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/MathExtras.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/MathExtras.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/MathExtras.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Noncopyable.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Noncopyable.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Noncopyable.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnArrayPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnArrayPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnArrayPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/PassRefPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/PassRefPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/PassRefPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Platform.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Platform.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Platform.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RefPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RefPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RefPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RetainPtr.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RetainPtr.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RetainPtr.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/StringExtras.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/StringExtras.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/StringExtras.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Vector.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Vector.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Vector.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/Unicode.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/Unicode.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/Unicode.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h --- a/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQuery.cpp --- a/webengine/osswebengine/WebCore/css/MediaQuery.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQuery.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2005, 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query + * + * Copyright (C) 2005, 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include "MediaQuery.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQuery.h --- a/webengine/osswebengine/WebCore/css/MediaQuery.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQuery.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query + * + * Copyright (C) 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef MediaQuery_h #define MediaQuery_h diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQueryEvaluator.cpp --- a/webengine/osswebengine/WebCore/css/MediaQueryEvaluator.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQueryEvaluator.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query Evaluator + * + * Copyright (C) 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include "MediaQueryEvaluator.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQueryEvaluator.h --- a/webengine/osswebengine/WebCore/css/MediaQueryEvaluator.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQueryEvaluator.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query Evaluator + * + * Copyright (C) 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef MediaQueryEvaluator_h #define MediaQueryEvaluator_h diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQueryExp.cpp --- a/webengine/osswebengine/WebCore/css/MediaQueryExp.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQueryExp.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query + * + * Copyright (C) 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include "MediaQueryExp.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/css/MediaQueryExp.h --- a/webengine/osswebengine/WebCore/css/MediaQueryExp.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/css/MediaQueryExp.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,29 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * CSS Media Query + * + * Copyright (C) 2006 Kimmo Kinnunen . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef MediaQueryExp_h #define MediaQueryExp_h diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/icu/unicode/utf_old.h --- a/webengine/osswebengine/WebCore/icu/unicode/utf_old.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/icu/unicode/utf_old.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,17 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/graphics/cairo/AffineTransformCairo.cpp --- a/webengine/osswebengine/WebCore/platform/graphics/cairo/AffineTransformCairo.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/graphics/cairo/AffineTransformCairo.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* * * Redistribution and use in source and binary forms, with or without diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/graphics/svg/SVGResourceListener.h --- a/webengine/osswebengine/WebCore/platform/graphics/svg/SVGResourceListener.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/graphics/svg/SVGResourceListener.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,17 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/image-decoders/zlib/trees.h --- a/webengine/osswebengine/WebCore/platform/image-decoders/zlib/trees.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/image-decoders/zlib/trees.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* header created automatically with -DGEN_TREES_H */ local const ct_data static_ltree[L_CODES+2] = { diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -43,7 +43,7 @@ FormFillController::FormFillController() : m_popup(0), m_callback(0), m_inputElement(0), m_formDB(0), m_passwdDB(0) { - m_searchTimer = new Timer(this, FormFillController::fireSearch); + m_searchTimer = new Timer(this, &FormFillController::fireSearch); } FormFillController::~FormFillController() diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_modules.h --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_modules.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_modules.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ // All new configuration directives are in: #include "XmlEngconfig.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlmemory.c --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlmemory.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlmemory.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* * xmlmemory.c: libxml memory allocator wrapper. * diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlwriter.c --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlwriter.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_xmlwriter.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* * xmlwriter.c: XML text writer implementation diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parser.h --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parser.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parser.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include "Libxml2/Libxml2_parser.h" #include "Libxml2/Libxml2_SAX2.h" #define xmlFree free diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parserinternals.h --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parserinternals.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/parserinternals.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include "Libxml2/Libxml2_parserInternals.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/tree.h --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/tree.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/tree.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include "Libxml2/Libxml2_tree.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/xmlstring.h --- a/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/xmlstring.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/Libxml2/libxml/xmlstring.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include "Libxml2/Libxml2_xmlstring.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/OOMHandler.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,30 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (C) 2007 Nokia, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include "OOMHandler.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h --- a/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,45 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : OOMHandler.h +* Part of : Webcore / Platform +* Interface : +* Description : +* Version : %Version% +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* +* ============================================================================== */ - #ifndef __OOMHANDLER_H__ #define __OOMHANDLER_H__ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/OOMStopper.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,30 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (C) 2007 Nokia, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include "OOMStopper.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h --- a/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,45 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : OOMHandler.h +* Part of : Webcore / Platform +* Interface : +* Description : +* Version : %Version% +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* +* ============================================================================== */ - #ifndef __OOMSTOPPER_H__ #define __OOMSTOPPER_H__ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,30 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (C) 2006 Nokia, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "config.h" #include <../bidi.h> // work around for multiple bidi.h files diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h --- a/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,30 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (C) 2006 Nokia, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef __STATICOBJECTCONTAINER_H__ #define __STATICOBJECTCONTAINER_H__ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is a proxy for CAnimationDecoderWrapped * diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - #ifndef ANIMATIONDECODER_H #define ANIMATIONDECODER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is wrapped by a proxy CAnimationDecoder * diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is wrapped by a proxy CAnimationDecoder * diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebCore/xml/xmlhttprequest.h --- a/webengine/osswebengine/WebCore/xml/xmlhttprequest.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebCore/xml/xmlhttprequest.h Fri Jun 11 14:42:15 2010 +0300 @@ -82,7 +82,7 @@ void open(const String& method, const KURL&, bool async, const String& user, ExceptionCode&); void open(const String& method, const KURL&, bool async, const String& user, const String& password, ExceptionCode&); void send(const String& body, ExceptionCode&); - void abort(); +IMPORT void abort(); void setRequestHeader(const String& name, const String& value, ExceptionCode&); void overrideMIMEType(const String& override); String getAllResponseHeaders() const; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/Unicode.h --- a/webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/Unicode.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/Unicode.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h --- a/webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,1 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp --- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -85,7 +85,6 @@ #include "PluginSkin.h" #include "HttpUiCallbacks.h" #include "PluginWin.h" -#include #include #ifndef BRDO_WML_DISABLED_FF @@ -1503,10 +1502,10 @@ return versionInfo; } - case TBrCtlDefs::EVersionInfoBuild: + /*case TBrCtlDefs::EVersionInfoBuild: { return MobileBrowserBuild.AllocLC(); - } + }*/ case TBrCtlDefs::EBrowserVersion: { diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,46 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlBrCtlSoftkeysObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle softkeys updates +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle softkeys updates -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef CRCTLSOFTKEYSOBSERVERIMPL_H #define CRCTLSOFTKEYSOBSERVERIMPL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,46 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlSpecialLoadObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle special load events such as network connection, deal with non-http or non-html requests +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle special load events such as network connection, deal with non-http or non-html requests -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTLSPECIALLOADOBSERVERIMPL_H #define BRCTLSPECIALLOADOBSERVERIMPL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,46 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlWinowObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle special load events such as network connection, deal with non-http or non-html requests +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle special load events such as network connection, deal with non-http or non-html requests -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTLWINDOWOBSERVERIMPL_H #define BRCTLWINDOWOBSERVERIMPL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,46 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Implementation of the Browser Control +* Version : 3.1 +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: Implementation of the Browser Control +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTL_H #define BRCTL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,45 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : WebKitView.h +* Part of : WEBKIT / Browser View +* Interface : Implemetation of CWebKitView +* Description : +* Version : 3.1 +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef WEBKITVIEW_H #define WEBKITVIEW_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,46 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Implementation of the Browser Control +* Version : 3.1 +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: Implementation of the Browser Control +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTL_H #define BRCTL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,43 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtl.cpp +* Part of : WebKit \ BrowserControl +* Description : Implementation of the Browser Control +* Version : 3.1 +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: Implementation of the Browser Control +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUHC +* DAMAGE. * +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - // INCLUDE FILES #include #include <../bidi.h> diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKit/win/WebKit.vcproj/resource.h --- a/webengine/osswebengine/WebKit/win/WebKit.vcproj/resource.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKit/win/WebKit.vcproj/resource.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by WebKit.rc diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/Drosera/win/resource.h --- a/webengine/osswebengine/WebKitTools/Drosera/win/resource.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/Drosera/win/resource.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Drosera.rc diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.c --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - TARGET = DumpRenderTree include(../../../WebKit.pri) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h --- a/webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by TestNetscapePlugin.rc diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/cache/cache_check.pl --- a/webengine/osswebengine/cache/cache_check.pl Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/cache/cache_check.pl Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,3 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# #!/usr/bin/perl #use Encode; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/cache/filter_emulator_output.bat --- a/webengine/osswebengine/cache/filter_emulator_output.bat Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/cache/filter_emulator_output.bat Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,2 @@ -@rem -@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -@rem All rights reserved. -@rem This component and the accompanying materials are made available -@rem under the terms of "Eclipse Public License v1.0" -@rem which accompanies this distribution, and is available -@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -@rem -@rem Initial Contributors: -@rem Nokia Corporation - initial contribution. -@rem -@rem Contributors: -@rem -@rem Description: -@rem - filter_log.pl %tmp%\epocwind.out log.txt" log.txt diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/osswebengine/cache/filter_log.pl --- a/webengine/osswebengine/cache/filter_log.pl Mon May 03 13:32:15 2010 +0300 +++ b/webengine/osswebengine/cache/filter_log.pl Fri Jun 11 14:42:15 2010 +0300 @@ -1,18 +1,3 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# #!/usr/bin/perl open INH,"<",$ARGV[0]; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/pagescaler/src/minimap.cpp --- a/webengine/pagescaler/src/minimap.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/pagescaler/src/minimap.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -118,10 +118,10 @@ void CMinimap::ConstructL() { iGenerator = CMinimapGenerator::NewL(*this); - iUpdateCbTimer = CMinimapTimer::NewL(*this, &UpdateCbTimerCbL, CActive::EPriorityStandard - 1 ); - iUpdateTimer = CMinimapTimer::NewL(*this, &UpdateTimerCbL); - iVisibilityTimer = CMinimapTimer::NewL(*this, &VisibilityTimerCbL); - iFadeTimer = CMinimapTimer::NewL(*this, &UpdateTransparency); + iUpdateCbTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateCbTimerCbL, CActive::EPriorityStandard - 1 ); + iUpdateTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateTimerCbL); + iVisibilityTimer = CMinimapTimer::NewL(*this, &CMinimap::VisibilityTimerCbL); + iFadeTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateTransparency); SetRelativePosition(KDefaultOffsetX,KDefaultOffsetY,KDefaultPosition); } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/SqliteSymbian/WebKitUtilsSqlite.h --- a/webengine/webkitutils/SqliteSymbian/WebKitUtilsSqlite.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/SqliteSymbian/WebKitUtilsSqlite.h Fri Jun 11 14:42:15 2010 +0300 @@ -24,8 +24,8 @@ class RFs; TInt sqlite3SymbianLastOsError(void); -TInt sqlite3SymbianLibInit(void); -void sqlite3SymbianLibFinalize(void); +IMPORT TInt sqlite3SymbianLibInit(void); +IMPORT void sqlite3SymbianLibFinalize(void); RFs& sqlite3SymbianFs(void); diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/SqliteSymbian/keywordhash.h --- a/webengine/webkitutils/SqliteSymbian/keywordhash.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/SqliteSymbian/keywordhash.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* Hash score: 159 */ static int keywordCode(const char *z, int n){ static const char zText[537] = diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/SqliteSymbian/parse.h --- a/webengine/webkitutils/SqliteSymbian/parse.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/SqliteSymbian/parse.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - #define TK_SEMI 1 #define TK_EXPLAIN 2 #define TK_QUERY 3 diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/SqliteSymbian/printf.c --- a/webengine/webkitutils/SqliteSymbian/printf.c Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/SqliteSymbian/printf.c Fri Jun 11 14:42:15 2010 +0300 @@ -1,19 +1,3 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ /* ** The "printf" code that follows dates from the 1980's. It is in ** the public domain. The original comments are included here for diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -137,12 +137,12 @@ CGestureHelperImpl* self = new ( ELeave ) CGestureHelperImpl( aObserver ); CleanupStack::PushL( self ); self->iEventSender = CGestureEventSender::NewL( aObserver ); - self->iDoubleTapTimer = CCallbackTimer::NewL( *self, EmitFirstTapEvent, + self->iDoubleTapTimer = CCallbackTimer::NewL( *self, &CGestureHelperImpl::EmitFirstTapEvent, KMaxTapDuration, EFalse ); // double tap is disabled by default - self->iHoldingTimer = CCallbackTimer::NewL( *self, StartHoldingL, + self->iHoldingTimer = CCallbackTimer::NewL( *self, &CGestureHelperImpl::StartHoldingL, KHoldDuration, EFalse ); // holding is enabled by default - self->iLongTouchTimer = CCallbackTimer::NewL( *self, HandleLongTouch, + self->iLongTouchTimer = CCallbackTimer::NewL( *self, &CGestureHelperImpl::HandleLongTouch, KLongTapDuration, ETrue ); // holding is enabled by default self->iGesture = new ( ELeave ) CGesture(); diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -182,7 +182,7 @@ /** @return last direction of dragging */ inline TGestureCode LastDirection( const TPointArray& aPoints ) { - TInt latestPointIndex = LatestCertainPointIndex( aPoints, TPointArray::operator[] ); + TInt latestPointIndex = LatestCertainPointIndex( aPoints, &TPointArray::operator[] ); if ( KErrNotFound != latestPointIndex ) { return Direction( aPoints[latestPointIndex], LastPoint( aPoints ) ); @@ -196,7 +196,7 @@ */ inline TBool IsTap( const TPointArray& aPoints ) { - return KErrNotFound == LatestCertainPointIndex( aPoints, TPointArray::Raw ); + return KErrNotFound == LatestCertainPointIndex( aPoints, &TPointArray::Raw ); } // ---------------------------------------------------------------------------- diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h --- a/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,23 +1,25 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains the header file of the CWidgetBackupRegistryXml class. +* ============================================================================== +* Name : WidgetRegistryXml.h +* Part of : Widget Registry +* Interface : Widget Registry API +* Description : This file contains the header file of the CWidgetBackupRegistryXml class. * * This class processes persistent registry data in XML. +* Version : %version: 11 % * +* Copyright © 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================== */ - #ifndef WIDGETBACKUPREGISTRYXML_H #define WIDGETBACKUPREGISTRYXML_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp --- a/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,24 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Processes registry persistent data in XML. -* -*/ +// +// ============================================================================== +// Name : WidgetBackupRegistryXml.cpp +// Part of : WidgetRegistry +// Interface : +// Description : Processes registry persistent data in XML. +// Version : 5.0 +// +// Copyright © 2008 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +// ============================================================================== +/// +// INCLUDE FILES #include #include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/BLD.INF --- a/webengine/wmlengine/group/BLD.INF Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -#ifndef BRDO_WML_DISABLED_FF - -#include "adt/bld.inf" -#include "css/bld.inf" -#include "evt/bld.inf" -#include "fbox/bld.inf" -#include "gdi/bld.inf" -#include "hed/bld.inf" -#include "htmlp/bld.inf" -#include "image/bld.inf" -#include "imagech/bld.inf" -#include "lmgr/bld.inf" -#include "object/bld.inf" -#include "markup/bld.inf" -#include "Msg/bld.inf" -#include "system/bld.inf" -#include "text/bld.inf" -#include "Unicode/bld.inf" -#include "wml1x/bld.inf" -#include "wmlscriptch/bld.inf" -#include "xhtml/bld.inf" -#include "script/bld.inf" -#include "wml/bld.inf" -#include "fileloader/bld.inf" -#include "urlloader/bld.inf" -#include "browser/bld.inf" -#include "wmlengine/bld.inf" - -#endif - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/BWINSCW/WmlEngineU.def --- a/webengine/wmlengine/group/BWINSCW/WmlEngineU.def Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewWmlEngineL@@YAPAVMWmlEngineInterface@@XZ @ 1 NONAME ; class MWmlEngineInterface * NewWmlEngineL(void) - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/EABI/WmlEngineU.def --- a/webengine/wmlengine/group/EABI/WmlEngineU.def Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _Z13NewWmlEngineLv @ 1 NONAME - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/Msg/Msg.mmp --- a/webengine/wmlengine/group/Msg/Msg.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET Msg.lib -TARGETTYPE lib -SOURCEPATH ../../src/Msg/src/ - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCE Message.cpp -SOURCE MessageDispatcher.cpp - -USERINCLUDE . -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/hed/include - -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/Msg/bld.inf --- a/webengine/wmlengine/group/Msg/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -Msg.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/Plugin.mmp --- a/webengine/wmlengine/group/Plugin.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET Plugin.lib -TARGETTYPE lib - -VENDORID VID_DEFAULT - -SOURCEPATH ../Plugin/src -SOURCE PluginHandler.cpp -SOURCE PluginWin.cpp -SOURCE PluginLoader.cpp -SOURCE PluginSkin.cpp -SOURCE NpnImplementation.cpp - -USERINCLUDE ../Plugin/Inc -USERINCLUDE ../BrowserView/Inc -USERINCLUDE ../BrowserControl/Inc -USERINCLUDE ../BrowserCore/Misc/Inc -USERINCLUDE ../BrowserCore/Renderers/Inc -USERINCLUDE ../ResourceLoader/Inc -USERINCLUDE ../PageScaler/Inc -USERINCLUDE ../../WEBCORE/bridge - -SYSTEMINCLUDE ../../MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/Unicode/Unicode.mmp --- a/webengine/wmlengine/group/Unicode/Unicode.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET unicode.lib -TARGETTYPE lib -SOURCEPATH ../../src/Unicode/src/ - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCE NW_Unicode_Category.c -SOURCE NW_Unicode_LetterLowercase.c -SOURCE NW_Unicode_LetterModifier.c -SOURCE NW_Unicode_LetterOther.c -SOURCE NW_Unicode_LetterChina.c -SOURCE NW_Unicode_LetterThai.c -SOURCE NW_Unicode_LetterJapan.c -SOURCE NW_Unicode_LetterTitlecase.c -SOURCE NW_Unicode_LetterUppercase.c -SOURCE NW_Unicode_MarkEnclosing.c -SOURCE NW_Unicode_MarkNonSpacing.c -SOURCE NW_Unicode_MarkSpacingCombining.c -SOURCE NW_Unicode_NumberDecimalDigit.c -SOURCE NW_Unicode_NumberLetter.c -SOURCE NW_Unicode_NumberOther.c -SOURCE NW_Unicode_OtherControl.c -SOURCE NW_Unicode_OtherFormat.c -SOURCE NW_Unicode_OtherNotAssigned.c -SOURCE NW_Unicode_OtherPrivateUse.c -SOURCE NW_Unicode_OtherSurrogate.c -SOURCE NW_Unicode_PunctuationClose.c -SOURCE NW_Unicode_PunctuationConnector.c -SOURCE NW_Unicode_PunctuationDash.c -SOURCE NW_Unicode_PunctuationFinal.c -SOURCE NW_Unicode_PunctuationInitial.c -SOURCE NW_Unicode_PunctuationOpen.c -SOURCE NW_Unicode_PunctuationOther.c -SOURCE NW_Unicode_SeparatorLine.c -SOURCE NW_Unicode_SeparatorParagraph.c -SOURCE NW_Unicode_SeparatorSpace.c -SOURCE NW_Unicode_SymbolCurrency.c -SOURCE NW_Unicode_SymbolMath.c -SOURCE NW_Unicode_SymbolModifier.c -SOURCE NW_Unicode_SymbolOther.c - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/Unicode/bld.inf --- a/webengine/wmlengine/group/Unicode/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -Unicode.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/adt/adt.mmp --- a/webengine/wmlengine/group/adt/adt.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET adt.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/adt/src/ - -SOURCE Broadcaster.c -SOURCE DynamicVector.c -SOURCE FixedMap.c -SOURCE FixedVector.c -SOURCE Iterator.c -SOURCE Map.c -SOURCE MapIterator.c -SOURCE ResizableMap.c -SOURCE ResizableObjectVector.c -SOURCE ResizableVector.c -SOURCE SegmentedMap.c -SOURCE SegmentedVector.c -SOURCE SingleIterator.c -SOURCE TextMap.c -SOURCE ValueList.c -SOURCE Vector.c -SOURCE VectorIterator.c - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/utils/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/adt/bld.inf --- a/webengine/wmlengine/group/adt/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -adt.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/browser/bld.inf --- a/webengine/wmlengine/group/browser/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -browser.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/browser/browser.mmp --- a/webengine/wmlengine/group/browser/browser.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET RbBrowser.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/browser/src/ - - -//SOURCE Epoc32BrowserMimeTable.c -SOURCE xhtml_1_0_dict.c -SOURCE wml_1_3_dict.c - - - - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/css/bld.inf --- a/webengine/wmlengine/group/css/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -css.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/css/css.mmp --- a/webengine/wmlengine/group/css/css.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET css.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/css/src - - -#ifdef _DEBUG - #define _BROWSER_ENG_DEBUG -#endif - -SOURCE CSSBufferList.cpp -SOURCE CSSDeclListHandle.cpp -SOURCE CSSDefaultStyleSheet.cpp -SOURCE CSSPatternMatcher.cpp -SOURCE CSSProcessor.cpp -SOURCE CSSPropertyTable.cpp -SOURCE CSSPropVal.cpp -SOURCE CSSReader.cpp -SOURCE CSSRuleList.cpp -SOURCE CSSParser.cpp -SOURCE CSSTokenToInt.cpp -SOURCE CSSImageList.cpp -SOURCE CSSHandler.cpp -SOURCE CSSVariableStyleSheet.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/wmlcontrol/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/evt/bld.inf --- a/webengine/wmlengine/group/evt/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -evt.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/evt/evt.mmp --- a/webengine/wmlengine/group/evt/evt.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 1997-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET evt.lib -TARGETTYPE lib -SOURCEPATH ../../src/Evt/src/ - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NW_EVT_IMPORT -#define NW_EVT_IMPORT extern - -SOURCE AccessKeyEvent.c -SOURCE ActivateEvent.c -SOURCE ClearFieldEvent.c -SOURCE ControlKeyEvent.c -SOURCE Event.c -SOURCE FocusEvent.c -SOURCE FontSizeChangeEvent.c -SOURCE KeyEvent.c -SOURCE PointerEvent.c -SOURCE ScrollEvent.c -SOURCE TabEvent.c -SOURCE TimerEvent.c -SOURCE UnicodeKeyEvent.c -SOURCE OpenViewerEvent.c - -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/utils/include - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/fbox/bld.inf --- a/webengine/wmlengine/group/fbox/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -fbox.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/fbox/fbox.mmp --- a/webengine/wmlengine/group/fbox/fbox.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 1997-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET fbox.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/fbox/src/ - -#ifdef __S60_32__ -LANG sc -#else -LANGUAGE_IDS -#endif - -#include "../webkitcommon.mmpi" - -SOURCE FBOXButtonBox.cpp -SOURCE FBOXButtonBoxSkin.cpp -SOURCE FBOXCheckBox.cpp -SOURCE FBOXCheckBoxSkin.cpp -SOURCE FBOXFileSelectionBox.cpp -SOURCE FBOXFileSelectionBoxSkin.cpp -SOURCE FBOXFormBox.cpp -SOURCE FBOXFormBoxUtils.cpp -SOURCE FBOXFormLiaison.cpp -SOURCE FBOXImageButtonBox.cpp -SOURCE FBOXImageButtonBoxSkin.cpp -SOURCE FBOXInputBox.cpp -SOURCE FBOXInputInteractor.cpp -SOURCE FBOXInputSkin.cpp -SOURCE FBOXInteractor.cpp -SOURCE KeyBoardEvent.c -SOURCE FBOXOptGrpBox.cpp -SOURCE FBOXOptGrpSkin.cpp -SOURCE FBOXOptionBox.cpp -SOURCE FBOXOptionBoxSkin.cpp -SOURCE FBOXPasswordBox.cpp -SOURCE FBOXRadioBox.cpp -SOURCE FBOXHiddenBox.cpp -SOURCE FBOXSelectBox.cpp -SOURCE FBOXSelectSkin.cpp -SOURCE FBOXSkin.cpp -SOURCE FBOXValidator.cpp - -SOURCE Epoc32ButtonBoxSkin.cpp -SOURCE Epoc32ImageButtonBoxSkin.cpp -SOURCE Epoc32InlineFormImages.cpp -SOURCE Epoc32InputInteractor.cpp -SOURCE Epoc32FormImages.cpp -SOURCE Epoc32InputSkin.cpp -SOURCE Epoc32TextAreaBox.cpp -SOURCE FBOXWmlFormattedEditor.cpp -SOURCE FBOXWmlFormatHandler.cpp -SOURCE FBOXEpoc32OptGrpSkin.cpp -SOURCE FBOXEpoc32OptionSkin.cpp -SOURCE Epoc32SelectSkin.cpp -SOURCE FBOXCEpoc32InputBox.cpp -SOURCE FBOXEpoc32InlineCheckBoxSkin.cpp - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/FileLoader/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/wmlcontrol/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/browser/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/fileloader/bld.inf --- a/webengine/wmlengine/group/fileloader/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -fileloader.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/fileloader/fileloader.mmp --- a/webengine/wmlengine/group/fileloader/fileloader.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - -#include -#include - -TARGET fileloader.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../../src/FileLoader/src -SOURCE fileloader_cfileloader.cpp -SOURCE fileloader_cfilehandler.cpp -SOURCE fileloader_csaveddeckhandler.cpp - -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/FileLoader/include -USERINCLUDE ../../src/utils/include - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/gdi/bld.inf --- a/webengine/wmlengine/group/gdi/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -gdi.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/gdi/gdi.mmp --- a/webengine/wmlengine/group/gdi/gdi.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET RbGdi.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 -#include "../webkitcommon.mmpi" - -SOURCEPATH ../../src/gdi/src - -SOURCE GDIDeviceContext.cpp -SOURCE GDIFont.cpp -SOURCE Utils.c - -USERINCLUDE . -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../../osswebengine/MemoryManager/Inc -USERINCLUDE ../../../pagescaler/inc -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include - - - - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/hed/bld.inf --- a/webengine/wmlengine/group/hed/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -hed.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/hed/hed.mmp --- a/webengine/wmlengine/group/hed/hed.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -TARGET hed.lib -TARGETTYPE lib -SOURCEPATH ../../src/hed/src/ - - -SOURCE ChildIterator.c -SOURCE HEDCompositeContentHandler.cpp -SOURCE HEDCompositeNode.cpp -SOURCE HEDContentHandler.cpp -SOURCE Context.c -SOURCE ContextVisitor.c -SOURCE HEDDocumentNode.cpp -SOURCE HEDDocumentRoot.cpp -SOURCE DomHelper.c -SOURCE DomTree.c -SOURCE DOMVisitor.c -SOURCE EntitySet.c -SOURCE HEDEventHandler.cpp -SOURCE HistoryEntry.c -SOURCE HistoryStack.cpp -SOURCE HistoryVisitor.cpp -SOURCE HEDICompositeNode.cpp -SOURCE ILoaderListener.c -SOURCE ILoadRecipient.c -SOURCE INumberCollector.c -SOURCE IImageViewer.c -SOURCE Loader.c -SOURCE MimeTable.cpp -SOURCE HEDTreeVisitor.cpp -SOURCE UrlRequest.c -SOURCE UrlResponse.c - - -SOURCE contentLoader.cpp -SOURCE TextReverse.cpp -SOURCE urlloader_urlresponse.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wmlcontrol/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc - - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/htmlp/bld.inf --- a/webengine/wmlengine/group/htmlp/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -htmlp.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/htmlp/htmlp.mmp --- a/webengine/wmlengine/group/htmlp/htmlp.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET htmlp.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/htmlp/src - -SOURCE htmlp_dict.cpp -SOURCE htmlp_wml_dict.cpp -SOURCE htmlp_lexer.c -SOURCE CHtmlpParser.cpp -SOURCE htmlp_to_wbxml.cpp - -USERINCLUDE ../../src/htmlp/include - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/image/bld.inf --- a/webengine/wmlengine/group/image/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -image.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/image/image.mmp --- a/webengine/wmlengine/group/image/image.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 1997-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include -#include - -TARGET image.lib -TARGETTYPE lib -SOURCEPATH ../../src/image/src/ - -VENDORID VID_DEFAULT -CAPABILITY CAP_GENERAL_DLL - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -START BITMAP browserbitmaps.mbm -HEADER -SOURCEPATH /epoc32/s60/bitmaps - -TARGETPATH APP_BITMAP_DIR - -SOURCE C8 qgn_prop_wml_square.bmp -SOURCE c8 qgn_prop_wml_disc.bmp -SOURCE c8 qgn_prop_wml_circle.bmp -SOURCE c8 qgn_prop_wml_image_not_shown.bmp -SOURCE c8 qgn_prop_wml_selectarrow.bmp -SOURCE c8 qgn_prop_wml_object.bmp -SOURCE c8 qgn_prop_wml_radiobutt_off.bmp -SOURCE c8 qgn_prop_wml_radiobutt_on.bmp -SOURCE c8 qgn_prop_wml_radiobutt_on_sel.bmp -SOURCE c8 qgn_prop_wml_radiobutt_off_sel.bmp -SOURCE c8 qgn_prop_wml_checkbox_off.bmp -SOURCE c8 qgn_prop_wml_checkbox_on.bmp -SOURCE c8 qgn_prop_wml_checkbox_on_sel.bmp -SOURCE c8 qgn_prop_wml_checkbox_off_sel.bmp -SOURCE c8 qgn_prop_wml_selectfile.bmp -SOURCE c8 qgn_prop_wml_image_map.bmp - -// Masks -SOURCE 1 qgn_prop_wml_square_mask.bmp -SOURCE 1 qgn_prop_wml_disc_mask.bmp -SOURCE 1 qgn_prop_wml_circle_mask.bmp -SOURCE 1 qgn_prop_wml_image_not_shown_mask.bmp -SOURCE 1 qgn_prop_wml_selectarrow_mask.bmp -SOURCE 1 qgn_prop_wml_object_mask.bmp -SOURCE 1 qgn_prop_wml_radiobutt_off_mask.bmp -SOURCE 1 qgn_prop_wml_radiobutt_on_mask.bmp -SOURCE 1 qgn_prop_wml_radiobutt_on_sel_mask.bmp -SOURCE 1 qgn_prop_wml_radiobutt_off_sel_mask.bmp -SOURCE 1 qgn_prop_wml_checkbox_off_mask.bmp -SOURCE 1 qgn_prop_wml_checkbox_on_mask.bmp -SOURCE 1 qgn_prop_wml_checkbox_on_sel_mask.bmp -SOURCE 1 qgn_prop_wml_checkbox_off_sel_mask.bmp -SOURCE 1 qgn_prop_wml_selectfile_mask.bmp -SOURCE 1 qgn_prop_wml_image_map_mask.bmp -END - -SOURCE IMAGEAbstractImage.cpp -SOURCE Epoc32CannedImage.cpp -SOURCE Epoc32CannedImages.cpp -SOURCE IMAGEFactory.cpp -SOURCE Epoc32SimpleImage.cpp -SOURCE IMAGEVirtualImage.cpp -SOURCE Epoc32ImageDecoder.cpp - -SOURCE nw_image_iimageobserver.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/wmlcontrol/include - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/browser/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/imagech/bld.inf --- a/webengine/wmlengine/group/imagech/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -imagech.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/imagech/imagech.mmp --- a/webengine/wmlengine/group/imagech/imagech.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET imagech.lib -TARGETTYPE lib -SOURCEPATH ../../src/ImageCH/src/ - -CAPABILITY CAP_GENERAL_DLL - -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCE Epoc32ImageContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/lmgr/bld.inf --- a/webengine/wmlengine/group/lmgr/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -lmgr.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/lmgr/lmgr.mmp --- a/webengine/wmlengine/group/lmgr/lmgr.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET lmgr.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL - -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/lmgr/src/ - - -SOURCE LMgrAbstractTextBox.cpp -SOURCE LMgrAccessKey.cpp -SOURCE Action.c -SOURCE LMgrActiveBox.cpp -SOURCE LMgrActiveContainerBox.cpp -SOURCE LMgrAnimatedImageAggregate.cpp -SOURCE LMgrAnimatedImageBox.cpp -SOURCE AreaBox.cpp -SOURCE LMgrBoxVisitor.cpp -SOURCE LMgrBreakBox.cpp -SOURCE LMgrContainerBox.cpp -SOURCE LMgrEmptyBox.cpp -SOURCE LMgrEventHandler.cpp -SOURCE LMgrFlowBox.cpp -SOURCE LMgrFormatBox.cpp -SOURCE LMgrFormatContext.cpp -SOURCE LMgrImageBox.cpp -SOURCE ImageMapBox.cpp -SOURCE ImgContainerBox.cpp -SOURCE LMgrLineBox.cpp -SOURCE ListBullets.c -SOURCE LMgrBidiFlowBox.cpp -SOURCE LMgrMarqueeBox.cpp -SOURCE LMgrMediaBox.cpp -SOURCE LMgrNobrBox.cpp -SOURCE IEventListener.c -SOURCE LMgrObjectBox.cpp -SOURCE LMgrObjectBoxOOC.cpp -SOURCE PropertyList.c -SOURCE LMgrRootBox.cpp -SOURCE LMgrRuleBox.cpp -SOURCE SimplePropertyList.cpp -SOURCE LMgrSlavePropertyList.cpp -SOURCE LMgrSplitTextBox.cpp -SOURCE LMgrStaticTableContext.cpp -SOURCE LMgrStaticTableBox.cpp -SOURCE LMgrStaticTableCellBox.cpp -SOURCE LMgrStaticTableRowBox.cpp -SOURCE LMgrVerticalTableBox.cpp -SOURCE LMgrVerticalTableCellBox.cpp -SOURCE LMgrVerticalTableRowBox.cpp -SOURCE LMgrTextBox.cpp -SOURCE TransientPropertyList.c -SOURCE BoxRender.cpp -SOURCE BoxFormat.cpp -SOURCE BoxFormatHandler.cpp -SOURCE Marquee_BoxFormat.cpp -SOURCE TableCell_BoxFormat.cpp -SOURCE Epoc32AccessKey.c -SOURCE LMgrMarkerText.cpp -SOURCE LMgrMarkerImage.cpp -SOURCE LMgrAnonBlock.cpp -SOURCE LMgrAnonTableBox.cpp -SOURCE LMgrPosFlowBox.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/markup/bld.inf --- a/webengine/wmlengine/group/markup/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -markup.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/markup/markup.mmp --- a/webengine/wmlengine/group/markup/markup.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET markup.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/markup/src/ - -SOURCE MARKUPElementHandler.cpp -SOURCE MARKUPModule.cpp -SOURCE MARKUPWBXMLModule.cpp -SOURCE MARKUPWmlValidator.cpp -SOURCE MARKUPXMLModule.cpp -SOURCE MARKUPNumberCollector.cpp -SOURCE MARKUPImageViewer.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/Scrolling/inc -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include - - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/object/bld.inf --- a/webengine/wmlengine/group/object/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -object.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/object/object.mmp --- a/webengine/wmlengine/group/object/object.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET object.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../../src/object/src/ - -SOURCE Aggregate.c -SOURCE Base.c -SOURCE Core.c -SOURCE Dynamic.c -SOURCE Factory.c -SOURCE Interface.c -SOURCE Object.c -SOURCE Secondary.c -SOURCE Shared.c - -USERINCLUDE . -USERINCLUDE ../../src/object/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/script/bld.inf --- a/webengine/wmlengine/group/script/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -script.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/script/script.mmp --- a/webengine/wmlengine/group/script/script.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET script.lib -TARGETTYPE lib -SOURCEPATH ../../src/script/src - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT -// Main Script Engine source code -SOURCE nwx_script_handler.c -SOURCE scr_api.c -SOURCE scr_browser.c -SOURCE scr_constpool.c -SOURCE scr_context.c -SOURCE scr_conv.c -SOURCE scr_core.c -SOURCE scr_debug.c -SOURCE scr_dialog.c -SOURCE scr_estack.c -SOURCE scr_fcns.c -SOURCE scr_float.c -SOURCE scr_frstack.c -SOURCE scr_handle.c -SOURCE scr_inter.c -SOURCE scr_lang.c -SOURCE scr_opcodes.c -SOURCE scr_msgs.c -SOURCE scr_params.c -SOURCE scr_ptrstack.c -SOURCE scr_reader.c -SOURCE scr_str.c -SOURCE scr_strlib.c -SOURCE scr_url.c -SOURCE scr_val.c -SOURCE scr_valexpr.c -SOURCE scr_wta.c -SOURCE scr_crypto.c - -USERINCLUDE ../../src/script/src -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/script/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/system/bld.inf --- a/webengine/wmlengine/group/system/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -system.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/system/system.mmp --- a/webengine/wmlengine/group/system/system.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET System.lib -TARGETTYPE lib -SOURCEPATH ../../src/System/src/ - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCE Timer.c -SOURCE Epoc32Timer.cpp -SOURCE CEpoc32Timer.cpp -SOURCE Epoc32OptionList.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/wmlcontrol/include - - - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/text/bld.inf --- a/webengine/wmlengine/group/text/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -text.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/text/text.mmp --- a/webengine/wmlengine/group/text/text.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET text.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/text/src/ - -SOURCE ASCII.c -SOURCE Latin1.c -SOURCE NW_Text_Abstract.c -SOURCE NW_Text_FixedWidth.c -SOURCE NW_Text_VariableWidth.c -SOURCE UCS2.c -SOURCE UTF8.c -SOURCE FixedWidthIterator.c -SOURCE Text_Iterator.c -SOURCE VariableWidthIterator.c - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/unknownch.mmp --- a/webengine/wmlengine/group/unknownch.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET unknownch.lib -TARGETTYPE lib -SOURCEPATH ../src/UnknownCH/src/ - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCE UnknownContentHandler.cpp -SOURCE UCHFileMover.cpp - -USERINCLUDE ../src/unknownch/include -USERINCLUDE ../src/adt/include -USERINCLUDE ../src/hed/include -USERINCLUDE ../src/gdi/include -USERINCLUDE ../src/text/include -USERINCLUDE ../src/lmgr/include -USERINCLUDE ../src/evt/include -USERINCLUDE ../src/object/include -USERINCLUDE ../src/markup/include - -SYSTEMINCLUDE ../src/urlloader/include -SYSTEMINCLUDE ../src/utils/include -SYSTEMINCLUDE ../src/wml/include -SYSTEMINCLUDE ../src/wml/src -MW_LAYER_SYSTEMINCLUDE - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/urlloader/bld.inf --- a/webengine/wmlengine/group/urlloader/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -urlloader.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/urlloader/urlloader.mmp --- a/webengine/wmlengine/group/urlloader/urlloader.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -#include -#include - -TARGET urlloader.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER - - -SOURCEPATH ../../src/urlloader/src -SOURCE urlloader_urlloaderint.cpp -SOURCE urlloader_curlloader.cpp -SOURCE urlloader_loaderutils.cpp -SOURCE urlloader_urlresponse.cpp -SOURCE nwx_http_content_type_strings.c - -#include "../webkitcommon.mmpi" - -//USERINCLUDE ../../src/httploader/include -//USERINCLUDE ../../src/httploader/src -USERINCLUDE ../../src/FileLoader/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wmlcontrol/include - - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_HTTP_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/webkitcommon.mmpi --- a/webengine/wmlengine/group/webkitcommon.mmpi Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -//USERINCLUDE ../../BrowserView/inc -//USERINCLUDE ../../BrowserControl/inc -//USERINCLUDE ../../BrowserCore/Misc/inc -// -//USERINCLUDE ../../../WEBCORE/bridge/symbian -//USERINCLUDE ../../ResourceLoader/inc -//USERINCLUDE ../../HistoryProvider/inc -//USERINCLUDE ../../BrowserCore/ScrollBars/inc - -//SYSTEMINCLUDE ../../MemoryManager/Inc - - -USERINCLUDE ../../pagescaler/inc -USERINCLUDE ../../webkitutils/HistoryProvider - -USERINCLUDE ../../osswebengine/WebKit/s60/webview -USERINCLUDE ../../osswebengine/WebCore/bridge/symbian -USERINCLUDE ../../osswebengine/WebCore/platform -USERINCLUDE ../../osswebengine/WebCore/platform/network/symbian -USERINCLUDE ../../osswebengine/WebCore/ForwardingHeaders -USERINCLUDE ../../osswebengine/WebCore/ForwardingHeaders/wtf -USERINCLUDE ../../osswebengine/WebCore/loader - -USERINCLUDE ../../osswebengine/JavaScriptCore diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wml/bld.inf --- a/webengine/wmlengine/group/wml/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -wml.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wml/wml.mmp --- a/webengine/wmlengine/group/wml/wml.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET wml.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/wml/src - - -SOURCE nw_evlog_api.c -SOURCE wml_bind.c -SOURCE wml_core.c -SOURCE wml_deck.c -SOURCE wml_deck_iter.c -SOURCE wml_decoder.c -SOURCE wml_event.c -SOURCE wml_head.c -SOURCE WMLhistory.cpp -SOURCE wml_input_validation.c -SOURCE wml_intrinsic_event.c -SOURCE wml_list.c -SOURCE wml_msgs.c -SOURCE wml_option_event.c -SOURCE wml_query_service.c -SOURCE wml_ref_model.c -SOURCE wml_script_message.c -SOURCE wml_scrproxy.c -SOURCE wml_select_ui_state.c -SOURCE wml_select_validation.c -SOURCE wml_timer.c -SOURCE wml_ui.c -SOURCE WMLUrlNavigation.cpp -SOURCE wml_url_utils.c -SOURCE wml_var.c -SOURCE WMLWae.cpp -SOURCE wml_wae_reader.c - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include - -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wmlcontrol/include - - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wml1x/bld.inf --- a/webengine/wmlengine/group/wml1x/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -wml1x.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wml1x/wml1x.mmp --- a/webengine/wmlengine/group/wml1x/wml1x.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET wml1x.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -#ifdef __S60_32__ -LANG sc -#else -LANGUAGE_IDS -#endif - -SOURCEPATH ../../src/wml1x/src/ - -SOURCE WML1XApi.cpp -SOURCE WML1XContentHandler.cpp -SOURCE Wml1xEntitySet.c -SOURCE WML1XEventHandler.cpp -SOURCE WML1XFormLiaison.cpp -SOURCE Epoc32Wml1xActiveEvent.cpp -SOURCE WML1XEpoc32DefaultStyleSheet.cpp -SOURCE WML1XEpoc32ContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlengine/bld.inf --- a/webengine/wmlengine/group/wmlengine/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../../src/wmlcontrol/include/WmlEngineDefs.h MW_LAYER_PLATFORM_EXPORT_PATH(WmlEngineDefs.h) -../../src/wmlcontrol/include/WmlEngineInterface.h MW_LAYER_PLATFORM_EXPORT_PATH(WmlEngineInterface.h) -../../src/utils/include/BrowserVersion.h MW_LAYER_PLATFORM_EXPORT_PATH(BrowserVersion.h) -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -wmlengine.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlengine/mvc.mmpi --- a/webengine/wmlengine/group/wmlengine/mvc.mmpi Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "../webkitcommon.mmpi" - - -SOURCEPATH ../../src/MVC/src - -SOURCE ILoadListener.c -SOURCE MVCShell.cpp -SOURCE MVCView.cpp -SOURCE MVCScroll.cpp -SOURCE MVCViewAsyncInit.cpp -SOURCE CEmbeddedDocExitObserver.cpp - -//#ifdef __SERIES60_WIM -//SOURCE epoc32/WimUi.cpp -//#endif __SERIES60_WIM - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/urlloader/include -//USERINCLUDE /S60/mw/web/WebEngine/WmlEngine/src/wml/include -USERINCLUDE ../../src/FileLoader/include -//USERINCLUDE ../../MemoryManager/Inc - -//SYSTEMINCLUDE ../WmlEngine/urlloader/include -//SYSTEMINCLUDE ../WmlEngine/wml/include - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlengine/utils.mmp --- a/webengine/wmlengine/group/wmlengine/utils.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -#ifndef INCLUDE_UTILS_MMP - -TARGET utils.lib -TARGETTYPE lib - -#endif // Not INCLUDE_UTILS_MMP - -SOURCEPATH ../../src/utils/src - -SOURCE TEncodingMapping.cpp -SOURCE ImageUtils.cpp -SOURCE nw_loadreq.cpp -SOURCE nw_nvpair.c -SOURCE nwx_buffer.c -SOURCE nwx_datastruct.c -SOURCE nwx_float.c -SOURCE nwx_format.c -SOURCE nwx_generic_dlg.c -SOURCE nwx_math.c -SOURCE nwx_psq.c -SOURCE nwx_sprintf.c -SOURCE nwx_ctx_epoc32.cpp -SOURCE nwx_logger_epoc32.cpp -SOURCE nwx_cleanup_epoc32.cpp -SOURCE nwx_mem_epoc32.c -SOURCE nwx_memseg_epoc32.c -SOURCE nwx_msg_epoc32.c -SOURCE nwx_msg_config_epoc32.c -SOURCE nwx_msg_dsp_epoc32.cpp -SOURCE nwx_multipart_generator.cpp -SOURCE nwx_osu_file_epoc32.cpp -SOURCE nwx_osu_epoc32.cpp -SOURCE nwx_statuscodeconvert.c -SOURCE nwx_assert.c - -SOURCE nwx_string.c -SOURCE nwx_time_utils.c -SOURCE nwx_url_utils.c -SOURCE nwx_time_epoc32.c -SOURCE StringUtils.cpp -SOURCE util_cdispatchereng.cpp -SOURCE ucs2_transformation_epoc32.c -SOURCE CReferrerHelper.cpp -SOURCE FileNameUtils.cpp - -USERINCLUDE ../../src/wml/include - -#ifndef INCLUDE_UTILS_MMP -USERINCLUDE . -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -// The following are required ONLY because of epoc32/nwx_cleanup_epoc32.cpp -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -// end of cleanup includes -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlengine/wmlengine.mmp --- a/webengine/wmlengine/group/wmlengine/wmlengine.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: WMLENGINE -* -*/ - -#include -#include - -TARGET wmlEngine.dll -TARGETTYPE dll - -//Modify for Dynamic DLL -//UID 0x1000008D 0x1028190F -UID 0x10000079 0x1028190F - -VENDORID VID_DEFAULT -CAPABILITY CAP_GENERAL_DLL -EPOCALLOWDLLDATA - - - -#if defined(WINSCW) -deffile ../BWINSCW/WmlEngine.def -#elif defined(ARMCC) -deffile ../EABI/WmlEngine.def -#endif - -#ifdef __S60_32__ -LANG sc -#else -LANGUAGE_IDS -#endif - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER - -#include "mvc.mmpi" -// Include to solve circular references with script.lib -MACRO INCLUDE_UTILS_MMP -#define INCLUDE_UTILS_MMP -#include "utils.mmp" - - -SOURCEPATH ../../src/wmlcontrol/src - -SOURCE WmlControl.cpp -SOURCE WmlContentInterface.cpp - -SOURCEPATH ../../src/htmlp/src -SOURCE htmlp_to_wbxml.cpp - -SOURCEPATH ../../src/browser/src -SOURCE BROWSEREpoc32MimeTable.cpp - -SOURCEPATH ../../src/utils/src -SOURCE nwx_settings_epoc32.cpp -SOURCE CBrowserSettings.cpp - -// This file moved from lmgr.mmp to fix __fixunssfsi warnings -SOURCEPATH ../../src/lmgr/src -SOURCE LMgrBox.cpp -//-- - -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/Scrolling/inc -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/script/src -USERINCLUDE ../../src/htmlp/include - -MW_LAYER_HTTP_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_OSKERNEL_SYSTEMINCLUDE - - - -STATICLIBRARY RbBrowser.lib -// Rainbow tempest libraries -STATICLIBRARY xhtml.lib -STATICLIBRARY script.lib -STATICLIBRARY imagech.lib - -// Rainbow Core libraries -STATICLIBRARY wml.lib -// Rainbow libraries -STATICLIBRARY wml1x.lib -STATICLIBRARY css.lib -STATICLIBRARY hed.lib -STATICLIBRARY text.lib -STATICLIBRARY markup.lib -STATICLIBRARY fbox.lib -STATICLIBRARY RbGdi.lib -STATICLIBRARY wmlscriptch.lib -STATICLIBRARY lmgr.lib -STATICLIBRARY evt.lib -STATICLIBRARY object.lib -STATICLIBRARY msg.lib -STATICLIBRARY system.lib -STATICLIBRARY adt.lib -STATICLIBRARY image.lib -STATICLIBRARY unicode.lib -STATICLIBRARY htmlp.lib -STATICLIBRARY urlloader.lib -STATICLIBRARY fileloader.lib - -LIBRARY aknskins.lib -LIBRARY WebKitUtils.lib -LIBRARY BrowserEngine.lib -LIBRARY BitmapTransforms.lib - -LIBRARY ESTLIB.lib -LIBRARY http.lib -LIBRARY EFSRV.lib -LIBRARY bafl.lib -LIBRARY InetProtUtil.lib -LIBRARY HttpFilterCommon.lib -LIBRARY ecom.lib -LIBRARY CommonEngine.lib -DEBUGLIBRARY flogger.lib -LIBRARY cone.lib -LIBRARY browserdialogsprovider.lib -LIBRARY avkon.lib -LIBRARY caf.lib -LIBRARY cafutils.lib - -LIBRARY cxmlparser.lib -LIBRARY aknpictograph.lib -LIBRARY DIRECTORYLOCALIZER.lib - -LIBRARY ConnectionManager.lib -LIBRARY CommonUI.LIB - -LIBRARY fbscli.lib -LIBRARY bitgdi.lib -LIBRARY charconv.lib -LIBRARY gdi.lib -LIBRARY apparc.lib -LIBRARY eikcore.lib -LIBRARY eikcoctl.lib -LIBRARY egul.lib -LIBRARY fntstr.lib -LIBRARY ws32.lib -LIBRARY insock.lib -LIBRARY esock.lib -LIBRARY euser.lib -LIBRARY ImageConversion.lib -LIBRARY edbms.lib -LIBRARY estor.lib -LIBRARY CookieManager.lib -LIBRARY WebUtils.lib -LIBRARY MultipartParser.lib -LIBRARY DownloadMgr.lib -LIBRARY DownloadMgrUiLib.lib -LIBRARY imut.lib - - -LIBRARY eikctl.lib -LIBRARY form.lib -LIBRARY etext.lib -LIBRARY fepbase.lib -LIBRARY sysutil.lib -LIBRARY apgrfx.lib -LIBRARY apmime.lib - -LIBRARY pagescaler.lib -LIBRARY SysLangUtil.lib -LIBRARY centralrepository.lib -LIBRARY CenRepNotifHandler.lib -LIBRARY featmgr.lib -#ifdef __USE_CCC_AUTO_FORM_FILL_POPUP -LIBRARY broaffpopup.lib -#endif -LIBRARY aknicon.lib - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlscriptch/bld.inf --- a/webengine/wmlengine/group/wmlscriptch/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -wmlscriptch.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/wmlscriptch/wmlscriptch.mmp --- a/webengine/wmlengine/group/wmlscriptch/wmlscriptch.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET wmlscriptch.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/wmlscriptch/src/ - - -SOURCE IWmlBrowserLib.c -SOURCE IWmlScriptListener.c -SOURCE WMLSCRIPTCHScrProxyApi.cpp -SOURCE WMLSCRIPTCHContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/utils/include - -USERINCLUDE ../../../osswebengine/MemoryManager/Inc - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/xhtml/bld.inf --- a/webengine/wmlengine/group/xhtml/bld.inf Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 1999-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// Sub-components Required for S60 webengine -xhtml.mmp - -PRJ_TESTMMPFILES diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/group/xhtml/xhtml.mmp --- a/webengine/wmlengine/group/xhtml/xhtml.mmp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 1997-2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -TARGET xhtml.lib -TARGETTYPE lib - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -MACRO NOKIA_MOBILE_BROWSER -#define NOKIA_MOBILE_BROWSER 1 - -SOURCEPATH ../../src/xhtml/src/ - -#include "../webkitcommon.mmpi" - -SOURCE Structure/XHTMLHeadElementHandler.cpp -SOURCE Structure/XHTMLStructureModule.cpp -SOURCE Structure/XHTMLTitleElementHandler.cpp -//SOURCE structure/scriptElementHandler.cpp -SOURCE Structure/noscriptElementHandler.cpp -SOURCE Text/XHTMLBrElementHandler.cpp -SOURCE Text/XHTMLCoreTextElementHandler.cpp -SOURCE Text/XHTMLHrElementHandler.cpp -SOURCE Text/XHTMLQElementHandler.cpp -SOURCE Text/XHTMLTextModule1.cpp -SOURCE Text/XHTMLTextModule2.cpp -SOURCE Hypertext/XHTMLAElementHandler.cpp -SOURCE Hypertext/XHTMLHypertextModule.cpp -SOURCE BasicForms/XHTMLBasicFormsModule.cpp -SOURCE BasicForms/XHTMLFormElementHandler.cpp -SOURCE BasicForms/XHTMLInputElementHandler.cpp -SOURCE BasicForms/XHTMLLabelElementHandler.cpp -SOURCE BasicForms/XHTMLOptionElementHandler.cpp -SOURCE BasicForms/XHTMLSelectElementHandler.cpp -SOURCE BasicForms/XHTMLTextareaElementHandler.cpp -SOURCE BasicForms/XHTMLControlSet.cpp -SOURCE BasicForms/XHTMLFormLiaison.cpp -SOURCE BasicTables/XHTMLBasicTablesModule.cpp -SOURCE BasicTables/XHTMLCaptionElementHandler.cpp -SOURCE BasicTables/XHTMLCellElementHandler.cpp -SOURCE BasicTables/XHTMLRowgroupElementHandler.cpp -SOURCE BasicTables/XHTMLTableElementHandler.cpp -SOURCE BasicTables/XHTMLTableElementHandlerOOC.cpp -SOURCE BasicTables/XHTMLTrElementHandler.cpp -SOURCE Image/areaElementHandler.cpp -SOURCE Image/XHTMLImageModule.cpp -SOURCE Image/imgElementHandler.cpp -SOURCE Image/mapElementHandler.cpp -SOURCE Image/MapElementList.cpp -SOURCE Image/ImageMapPopup.cpp -SOURCE MetaInformation/XHTMLMetaElementHandler.cpp -SOURCE MetaInformation/XHTMLMetaInformationModule.cpp -SOURCE Link/XHTMLLinkElementHandler.cpp -SOURCE Link/XHTMLLinkModule.cpp -SOURCE Base/XHTMLBaseElementHandler.cpp -SOURCE Base/XHTMLBaseModule.cpp -SOURCE Style/XHTMLStyleElementHandler.cpp -SOURCE Style/XHTMLStyleModule.cpp -SOURCE XHTMLAttributePropertyTable.cpp -SOURCE XHTMLPiElementHandler.cpp -SOURCE SaveToPhoneBkEvent.c -SOURCE XHTMLTelephonyServices.cpp -SOURCE XHTMLTextElementHandler.cpp -SOURCE Variables.c -SOURCE XHTMLElementHandler.cpp -SOURCE XHTMLContentHandler.cpp -SOURCE XHTMLEpoc32ContentHandler.cpp -SOURCE XHTMLEntitySet.c -SOURCE Frame/XHTMLFramesetElementHandler.cpp -SOURCE Frame/XHTMLFrameModule.cpp -SOURCE Frame/XHTMLFrameElementHandler.cpp -SOURCE Ignore/XHTMLIgnoreElementHandler.cpp -SOURCE XHTMLMessageListener.cpp - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/Scrolling/inc -USERINCLUDE ../../src/System/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/NW_Evt_EXPORT.h --- a/webengine/wmlengine/src/Evt/include/NW_Evt_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Evt_EXPORT_h_ -#define _NW_Evt_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_EVT_EXPORT -#ifdef NW_IMPORT -#define NW_EVT_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_EVT_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_EVT_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Evt_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_accesskeyevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_accesskeyevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_ACCESSKEYEVENT_H -#define NW_EVT_ACCESSKEYEVENT_H - -#include "nw_evt_keyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_AccessKeyEvent_Class_s NW_Evt_AccessKeyEvent_Class_t; -typedef struct NW_Evt_AccessKeyEvent_s NW_Evt_AccessKeyEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_AccessKeyEvent_ClassPart_s { - void** unused; -} NW_Evt_AccessKeyEvent_ClassPart_t; - -struct NW_Evt_AccessKeyEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_KeyEvent_ClassPart_t NW_Evt_KeyEvent; - NW_Evt_AccessKeyEvent_ClassPart_t NW_Evt_AccessKeyEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_AccessKeyEvent_s { - NW_Evt_KeyEvent_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_AccessKeyEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_AccessKeyEvent)) - -#define NW_Evt_AccessKeyEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_AccessKeyEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_AccessKeyEvent_Class_t NW_Evt_AccessKeyEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_AccessKeyEvent_Initialize (NW_Evt_AccessKeyEvent_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_UNICODEKEYEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_accesskeyeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_accesskeyeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_ACCESSKEYEVENTI_H -#define NW_EVT_ACCESSKEYEVENTI_H - -#include "nw_evt_keyeventi.h" -#include "nw_evt_accesskeyevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_UNICODEKEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_activateevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_activateevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_ACTIVATEEVENT_H -#define NW_EVT_ACTIVATEEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ActivateEvent_Class_s NW_Evt_ActivateEvent_Class_t; -typedef struct NW_Evt_ActivateEvent_s NW_Evt_ActivateEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ActivateEvent_ClassPart_s { - void** unused; -} NW_Evt_ActivateEvent_ClassPart_t; - -struct NW_Evt_ActivateEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_ActivateEvent_ClassPart_t NW_Evt_ActivateEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_ActivateEvent_s { - NW_Evt_Event_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_ActivateEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_ActivateEvent)) - -#define NW_Evt_ActivateEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_ActivateEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_ActivateEvent_Class_t NW_Evt_ActivateEvent_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_ActivateEvent_t* -NW_Evt_ActivateEvent_New (void); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_ActivateEvent_Initialize (NW_Evt_ActivateEvent_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_ACTIVATEEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_activateeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_activateeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_ACTIVATEEVENTI_H -#define NW_EVT_ACTIVATEEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_activateevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_ACTIVATEEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_clearfieldevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_clearfieldevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines OOC class structures and public method prototypes. -* -*/ - - -#ifndef NW_EVT_CLEARFIELDEVENT_H -#define NW_EVT_CLEARFIELDEVENT_H - -// INCLUDES -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -typedef struct NW_Evt_ClearFieldEvent_Class_s NW_Evt_ClearFieldEvent_Class_t; -typedef struct NW_Evt_ClearFieldEvent_s NW_Evt_ClearFieldEvent_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - OOC class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ClearFieldEvent_ClassPart_s { - void** unused; -} NW_Evt_ClearFieldEvent_ClassPart_t; - -struct NW_Evt_ClearFieldEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_ClearFieldEvent_ClassPart_t NW_Evt_ClearFieldEvent; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Evt_ClearFieldEvent_s { - NW_Evt_Event_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_ClearFieldEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_ClearFieldEvent)) - -#define NW_Evt_ClearFieldEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_ClearFieldEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_ClearFieldEvent_Class_t NW_Evt_ClearFieldEvent_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/** -* OOC method for creating a new instance of this class. -* @since 2.5 -* @return Pointer to new instance of this class. -*/ -NW_Evt_ClearFieldEvent_t* -NW_Evt_ClearFieldEvent_New (void); - - -/** -* OOC method for initializing this instance of this class. -* @since 2.5 -* @param event Ptr to OOC class structure for this class. -* @return Browser status code. -*/ -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_ClearFieldEvent_Initialize( NW_Evt_ClearFieldEvent_t* event ); - -#ifdef __cplusplus -} // extern "C" { -#endif // __cplusplus - -#endif // NW_EVT_CLEARFIELDEVENT_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_clearfieldeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_clearfieldeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines virtual method implementation prototypes. -* -*/ - - -#ifndef NW_EVT_CLEARFIELDEVENTI_H -#define NW_EVT_CLEARFIELDEVENTI_H - -// INCLUDES -#include "nw_evt_eventi.h" -#include "nw_evt_clearfieldevent.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - - -#ifdef __cplusplus -} // extern "C" { -#endif // __cplusplus - -#endif // NW_EVT_CLEARFIELDEVENTI_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_controlkeyevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_controlkeyevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_CONTROLKEYEVENT_H -#define NW_EVT_CONTROLKEYEVENT_H - -#include "nw_evt_keyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ControlKeyEvent_Class_s NW_Evt_ControlKeyEvent_Class_t; -typedef struct NW_Evt_ControlKeyEvent_s NW_Evt_ControlKeyEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_ControlKeyType_e { - NW_Evt_ControlKeyType_None, - NW_Evt_ControlKeyType_Send, - NW_Evt_ControlKeyType_Home, - NW_Evt_ControlKeyType_End, - NW_Evt_ControlKeyType_Left, - NW_Evt_ControlKeyType_Right, - NW_Evt_ControlKeyType_Up, - NW_Evt_ControlKeyType_Down, - NW_Evt_ControlKeyType_Shift, - NW_Evt_ControlKeyType_CapsLock, - NW_Evt_ControlKeyType_NumLock, - NW_Evt_ControlKeyType_SoftA, - NW_Evt_ControlKeyType_SoftB, - NW_Evt_ControlKeyType_SoftC, - NW_Evt_ControlKeyType_Clear -} NW_Evt_ControlKeyType_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ControlKeyEvent_ClassPart_s { - void** unused; -} NW_Evt_ControlKeyEvent_ClassPart_t; - -struct NW_Evt_ControlKeyEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_KeyEvent_ClassPart_t NW_Evt_KeyEvent; - NW_Evt_ControlKeyEvent_ClassPart_t NW_Evt_ControlKeyEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_ControlKeyEvent_s { - NW_Evt_KeyEvent_t super; - - /* member variables */ - NW_Evt_ControlKeyType_t keyVal; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_ControlKeyEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_ControlKeyEvent)) - -#define NW_Evt_ControlKeyEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_ControlKeyEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_ControlKeyEvent_Class_t NW_Evt_ControlKeyEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_ControlKeyEvent_GetKeyVal(_object) \ - (NW_OBJECT_CONSTCAST(NW_Evt_ControlKeyType_t) NW_Evt_ControlKeyEventOf (_object)->keyVal) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_ControlKeyEvent_t* -NW_Evt_ControlKeyEvent_New (NW_Evt_ControlKeyType_t keyType); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_ControlKeyEvent_Initialize (NW_Evt_ControlKeyEvent_t* event, - NW_Evt_ControlKeyType_t keyType); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_CONTROLKEYEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_controlkeyeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_controlkeyeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_CONTROLKEYEVENTI_H -#define NW_EVT_CONTROLKEYEVENTI_H - -#include "nw_evt_keyeventi.h" -#include "nw_evt_controlkeyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_ControlKeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_CONTROLKEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_ecmaevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_ecmaevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ECMA_EVNTTYPE_H -#define NW_ECMA_EVNTTYPE_H - - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -typedef enum NW_ECMA_Evt_Type_e { - NW_Ecma_Evt_None, - NW_Ecma_Evt_OnFocus, - NW_Ecma_Evt_OnChange, - NW_Ecma_Evt_OnClick, - NW_Ecma_Evt_OnLoad, - NW_Ecma_Evt_OnSubmit, - NW_Ecma_Evt_OnReset, - NW_Ecma_Evt_OnBlur, - NW_Ecma_Evt_OnUnload, - NW_Ecma_Evt_Timer, - NW_Ecma_Evt_JavaScriptFunction, -} NW_ECMA_Evt_Type_t; - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ECMA_EVNTTYPE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_event.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_event.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_EVENT_H -#define NW_EVT_EVENT_H - -#include "nw_object_dynamic.h" -#include "NW_Evt_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_Event_Class_s NW_Evt_Event_Class_t; -typedef struct NW_Evt_Event_s NW_Evt_Event_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_Event_ClassPart_s { - void** unused; -} NW_Evt_Event_ClassPart_t; - -struct NW_Evt_Event_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_Event_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_Event_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_Event)) - -#define NW_Evt_EventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_Event)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_Event_Class_t NW_Evt_Event_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_EVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_eventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_eventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_EVENTI_H -#define NW_EVT_EVENTI_H - -#include "nw_object_dynamici.h" -#include "nw_evt_event.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_EVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_focusevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_focusevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_FOCUSEVENT_H -#define NW_EVT_FOCUSEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_FocusEvent_Class_s NW_Evt_FocusEvent_Class_t; -typedef struct NW_Evt_FocusEvent_s NW_Evt_FocusEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_FocusEvent_ClassPart_s { - void** unused; -} NW_Evt_FocusEvent_ClassPart_t; - -struct NW_Evt_FocusEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_FocusEvent_ClassPart_t NW_Evt_FocusEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_FocusEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Bool hasFocus; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_FocusEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_FocusEvent)) - -#define NW_Evt_FocusEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_FocusEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_FocusEvent_Class_t NW_Evt_FocusEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_FocusEvent_GetHasFocus(_object) \ - (NW_Evt_FocusEventOf (_object)->hasFocus) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_FocusEvent_Initialize (NW_Evt_FocusEvent_t* event, - NW_Bool hasFocus); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_FOCUSEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_focuseventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_focuseventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_FOCUSEVENTI_H -#define NW_EVT_FOCUSEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_focusevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_FocusEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_FOCUSEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_fontsizechangeevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_fontsizechangeevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_FONTSIZECHANGEEVENT_H -#define NW_EVT_FONTSIZECHANGEEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_FontSizeChangeEvent_Class_s NW_Evt_FontSizeChangeEvent_Class_t; -typedef struct NW_Evt_FontSizeChangeEvent_s NW_Evt_FontSizeChangeEvent_t; - -typedef enum NW_Evt_FontSizeChangeEvent_FontLevel_e -{ - NW_Evt_FontSizeChangeEvent_FontLevel_AllSmall, - NW_Evt_FontSizeChangeEvent_FontLevel_Smaller, - NW_Evt_FontSizeChangeEvent_FontLevel_Normal, - NW_Evt_FontSizeChangeEvent_FontLevel_Larger, - NW_Evt_FontSizeChangeEvent_FontLevel_AllLarge -}NW_Evt_FontSizeChangeEvent_FontLevel_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_FontSizeChangeEvent_ClassPart_s { - void** unused; -} NW_Evt_FontSizeChangeEvent_ClassPart_t; - -struct NW_Evt_FontSizeChangeEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_FontSizeChangeEvent_ClassPart_t NW_Evt_FontSizeChangeEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_FontSizeChangeEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_FontSizeChangeEvent_FontLevel_t fontLevel; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_FontSizeChangeEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_FontSizeChangeEvent)) - -#define NW_Evt_FontSizeChangeEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_FontSizeChangeEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_FontSizeChangeEvent_Class_t NW_Evt_FontSizeChangeEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_FontSizeChangeEvent_GetLevel(_object) \ - ((const NW_Evt_FontSizeChangeEvent_FontLevel_t) NW_Evt_FontSizeChangeEventOf (_object)->fontLevel) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* takes one of TGDIDeviceContextFontSizeLevel as input parameter */ -NW_Evt_FontSizeChangeEvent_t* -NW_Evt_FontSizeChangeEvent_New (NW_Evt_FontSizeChangeEvent_FontLevel_t fontLevel); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_FontSizeChangeEvent_Initialize (NW_Evt_FontSizeChangeEvent_t* event, - NW_Evt_FontSizeChangeEvent_FontLevel_t fontLevel); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_FONTSIZECHANGEEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_fontsizechangeeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_fontsizechangeeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_FONTSIZECHANGEEVENTI_H -#define NW_EVT_FONTSIZECHANGEEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_fontsizechangeevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_FontSizeChangeEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_FONTSIZECHANGEEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_keyevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_keyevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_KEYEVENT_H -#define NW_EVT_KEYEVENT_H - -#include "nw_evt_event.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_KeyEvent_Class_s NW_Evt_KeyEvent_Class_t; -typedef struct NW_Evt_KeyEvent_s NW_Evt_KeyEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -/*typedef enum NW_Evt_KeyType_e { - NW_Evt_KeyType_0, - NW_Evt_KeyType_1, - NW_Evt_KeyType_2, - NW_Evt_KeyType_3, - NW_Evt_KeyType_4, - NW_Evt_KeyType_5, - NW_Evt_KeyType_6, - NW_Evt_KeyType_7, - NW_Evt_KeyType_8, - NW_Evt_KeyType_9, - NW_Evt_KeyType_Star, - NW_Evt_KeyType_Hash, - NW_Evt_KeyType_Send, - NW_Evt_KeyType_End, - NW_Evt_KeyType_Left, - NW_Evt_KeyType_Right, - NW_Evt_KeyType_Up, - NW_Evt_KeyType_Down, - NW_Evt_KeyType_Shift, - NW_Evt_KeyType_CapsLock, - NW_Evt_KeyType_NumLock, - NW_Evt_KeyType_SoftA, - NW_Evt_KeyType_SoftB, - NW_Evt_KeyType_SoftC -} NW_Evt_KeyType_t;*/ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_KeyEvent_ClassPart_s { - void** unused; -} NW_Evt_KeyEvent_ClassPart_t; - -struct NW_Evt_KeyEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_KeyEvent_ClassPart_t NW_Evt_KeyEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_KeyEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Bool longPress; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_KeyEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_KeyEvent)) - -#define NW_Evt_KeyEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_KeyEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_KeyEvent_Class_t NW_Evt_KeyEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_KeyEvent_IsLongPress(_object) \ - (NW_Evt_KeyEventOf (_object)->longPress) - -#define NW_Evt_KeyEvent_SetLongPress(_object) \ - (NW_Evt_KeyEventOf (_object)->longPress = NW_TRUE) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_KEYEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_keyeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_keyeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_KEYEVENTI_H -#define NW_EVT_KEYEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_keyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_KeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_KEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_navevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_navevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_NAVEVENT_H -#define NW_EVT_NAVEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_NavEvent_Class_s NW_Evt_NavEvent_Class_t; -typedef struct NW_Evt_NavEvent_s NW_Evt_NavEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_NavEvent_Direction_e { - NW_Evt_NavEvent_Direction_Backward, - NW_Evt_NavEvent_Direction_Forward, - NW_Evt_NavEvent_Direction_Left, - NW_Evt_NavEvent_Direction_Right -} NW_Evt_NavEvent_Direction_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_NavEvent_ClassPart_s { - void** unused; -} NW_Evt_NavEvent_ClassPart_t; - -struct NW_Evt_NavEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_NavEvent_ClassPart_t NW_Evt_NavEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_NavEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_NavEvent_Direction_t direction; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_NavEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_NavEvent)) - -#define NW_Evt_NavEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_NavEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_NavEvent_Class_t NW_Evt_NavEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_NavEvent_GetDirection(_object) \ - ((const NW_Evt_NavEvent_Direction_t) NW_Evt_NavEventOf (_object)->direction) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_NavEvent_t* -NW_Evt_NavEvent_New (NW_Evt_NavEvent_Direction_t direction); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_NavEvent_Initialize (NW_Evt_NavEvent_t* event, - NW_Evt_NavEvent_Direction_t direction); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_NAVEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_naveventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_naveventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_NAVEVENTI_H -#define NW_EVT_NAVEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_navevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_NavEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_NAVEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_openviewerevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_openviewerevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_OPENVIEWEREVENT_H -#define NW_EVT_OPENVIEWEREVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_OpenViewerEvent_Class_s NW_Evt_OpenViewerEvent_Class_t; -typedef struct NW_Evt_OpenViewerEvent_s NW_Evt_OpenViewerEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_OpenViewerEvent_ClassPart_s { - void** unused; -} NW_Evt_OpenViewerEvent_ClassPart_t; - -struct NW_Evt_OpenViewerEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_OpenViewerEvent_ClassPart_t NW_Evt_OpenViewerEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_OpenViewerEvent_s { - NW_Evt_Event_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_OpenViewerEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_OpenViewerEvent)) - -#define NW_Evt_OpenViewerEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_OpenViewerEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_OpenViewerEvent_Class_t NW_Evt_OpenViewerEvent_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_OpenViewerEvent_t* -NW_Evt_OpenViewerEvent_New (void); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_OpenViewerEvent_Initialize (NW_Evt_OpenViewerEvent_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_OPENVIEWEREVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_openviewereventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_openviewereventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_OPENVIEWEREVENTI_H -#define NW_EVT_OPENVIEWEREVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_openviewerevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_OPENVIEWEREVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_pointerevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_pointerevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_POINTEREVENT_H -#define NW_EVT_POINTEREVENT_H - -#include "nw_evt_event.h" -#include "nw_gdi_types.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_PointerEvent_Class_s NW_Evt_PointerEvent_Class_t; -typedef struct NW_Evt_PointerEvent_s NW_Evt_PointerEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_PointerEvent_Type_e { - NW_Evt_PointerEvent_Type_Up, - NW_Evt_PointerEvent_Type_Down, - NW_Evt_PointerEvent_Type_Move -} NW_Evt_PointerEvent_Type_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_PointerEvent_ClassPart_s { - void** unused; -} NW_Evt_PointerEvent_ClassPart_t; - -struct NW_Evt_PointerEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_PointerEvent_ClassPart_t NW_Evt_PointerEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_PointerEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_PointerEvent_Type_t type; - NW_GDI_Point2D_t location; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_PointerEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_PointerEvent)) - -#define NW_Evt_PointerEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_PointerEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_PointerEvent_Class_t NW_Evt_PointerEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_PointerEvent_GetType(_object) \ - (NW_OBJECT_CONSTCAST(NW_Evt_PointerEvent_Type_t) NW_Evt_PointerEventOf (_object)->type) - -#define NW_Evt_PointerEvent_GetLoc(_object) \ - (NW_OBJECT_CONSTCAST(NW_GDI_Point2D_t*) &NW_Evt_PointerEventOf (_object)->location) - -#define NW_Evt_PointerEvent_GetXLoc(_object) \ - (NW_OBJECT_CONSTCAST(NW_GDI_Metric_t) NW_Evt_PointerEventOf (_object)->location.x) - -#define NW_Evt_PointerEvent_GetYLoc(_object) \ - (NW_OBJECT_CONSTCAST(NW_GDI_Metric_t) NW_Evt_PointerEventOf (_object)->location.y) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -NW_Evt_PointerEvent_t* -NW_Evt_PointerEvent_New (NW_Evt_PointerEvent_Type_t type, - NW_GDI_Metric_t x, - NW_GDI_Metric_t y); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_PointerEvent_Initialize (NW_Evt_PointerEvent_t* event, - NW_Evt_PointerEvent_Type_t type, - NW_GDI_Metric_t x, - NW_GDI_Metric_t y); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_POINTEREVENT_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_pointereventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_pointereventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_POINTEREVENTI_H -#define NW_EVT_POINTEREVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_pointerevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_PointerEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_POINTEREVENTI_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_scrollevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_scrollevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_SCROLLEVENT_H -#define NW_EVT_SCROLLEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ScrollEvent_Class_s NW_Evt_ScrollEvent_Class_t; -typedef struct NW_Evt_ScrollEvent_s NW_Evt_ScrollEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_ScrollEvent_Direction_e { - NW_Evt_ScrollEvent_Direction_Left, - NW_Evt_ScrollEvent_Direction_Right, - NW_Evt_ScrollEvent_Direction_Up, - NW_Evt_ScrollEvent_Direction_Down, - NW_Evt_ScrollEvent_Direction_Invalid -} NW_Evt_ScrollEvent_Direction_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_ScrollEvent_ClassPart_s { - void** unused; -} NW_Evt_ScrollEvent_ClassPart_t; - -struct NW_Evt_ScrollEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_ScrollEvent_ClassPart_t NW_Evt_ScrollEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_ScrollEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_ScrollEvent_Direction_t direction; - NW_Uint16 amount; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_ScrollEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_ScrollEvent)) - -#define NW_Evt_ScrollEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_ScrollEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_ScrollEvent_Class_t NW_Evt_ScrollEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_ScrollEvent_GetDirection(_object) \ - (NW_OBJECT_CONSTCAST(NW_Evt_ScrollEvent_Direction_t) NW_Evt_ScrollEventOf (_object)->direction) - -#define NW_Evt_ScrollEvent_GetAmount(_object) \ - (NW_OBJECT_CONSTCAST(NW_Uint16) NW_Evt_ScrollEventOf (_object)->amount) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -NW_Evt_ScrollEvent_t* -NW_Evt_ScrollEvent_New (NW_Evt_ScrollEvent_Direction_t direction, NW_Uint16 amount); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_ScrollEvent_Initialize (NW_Evt_ScrollEvent_t* event, - NW_Evt_ScrollEvent_Direction_t direction, NW_Uint16 amount); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_SCROLLEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_scrolleventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_scrolleventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_SCROLLEVENTI_H -#define NW_EVT_SCROLLEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_scrollevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_ScrollEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_SCROLLEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_tabevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_tabevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_TABEVENT_H -#define NW_EVT_TABEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_TabEvent_Class_s NW_Evt_TabEvent_Class_t; -typedef struct NW_Evt_TabEvent_s NW_Evt_TabEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_TabEvent_Direction_e { - NW_Evt_TabEvent_Direction_Left, - NW_Evt_TabEvent_Direction_Right, - NW_Evt_TabEvent_Direction_Up, - NW_Evt_TabEvent_Direction_Down -} NW_Evt_TabEvent_Direction_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_TabEvent_ClassPart_s { - void** unused; -} NW_Evt_TabEvent_ClassPart_t; - -struct NW_Evt_TabEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_TabEvent_ClassPart_t NW_Evt_TabEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_TabEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_TabEvent_Direction_t direction; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_TabEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_TabEvent)) - -#define NW_Evt_TabEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_TabEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_TabEvent_Class_t NW_Evt_TabEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_TabEvent_GetDirection(_object) \ - (NW_OBJECT_CONSTCAST(NW_Evt_TabEvent_Direction_t) NW_Evt_TabEventOf (_object)->direction) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_TabEvent_t* -NW_Evt_TabEvent_New (NW_Evt_TabEvent_Direction_t direction); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_TabEvent_Initialize (NW_Evt_TabEvent_t* event, - NW_Evt_TabEvent_Direction_t direction); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_TABEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_tabeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_tabeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_TABEVENTI_H -#define NW_EVT_TABEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_tabevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_TabEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_TABEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_timerevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_timerevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_TIMEREVENT_H -#define NW_EVT_TIMEREVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_TimerEvent_Class_s NW_Evt_TimerEvent_Class_t; -typedef struct NW_Evt_TimerEvent_s NW_Evt_TimerEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_Evt_TimerType_e { - NW_Evt_TimerType_Expired -} NW_Evt_TimerType_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_TimerEvent_ClassPart_s { - void** unused; -} NW_Evt_TimerEvent_ClassPart_t; - -struct NW_Evt_TimerEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_TimerEvent_ClassPart_t NW_Evt_TimerEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_TimerEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Evt_TimerType_t TimerType; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_TimerEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_TimerEvent)) - -#define NW_Evt_TimerEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_TimerEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_TimerEvent_Class_t NW_Evt_TimerEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_TimerEvent_GetTimerType(_object) \ - ((const NW_Evt_TimerType_t) NW_Evt_TimerEventOf (_object)->TimerType) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_TimerEvent_Initialize (NW_Evt_TimerEvent_t* event, - NW_Evt_TimerType_t TimerType); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_TIMEREVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_timereventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_timereventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_TIMEREVENTI_H -#define NW_EVT_TIMEREVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_evt_timerevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_TimerEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_TIMEREVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_unicodekeyevent.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_unicodekeyevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_UNICODEKEYEVENT_H -#define NW_EVT_UNICODEKEYEVENT_H - -#include "nw_evt_keyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_UnicodeKeyEvent_Class_s NW_Evt_UnicodeKeyEvent_Class_t; -typedef struct NW_Evt_UnicodeKeyEvent_s NW_Evt_UnicodeKeyEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Evt_UnicodeKeyEvent_ClassPart_s { - void** unused; -} NW_Evt_UnicodeKeyEvent_ClassPart_t; - -struct NW_Evt_UnicodeKeyEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_Evt_KeyEvent_ClassPart_t NW_Evt_KeyEvent; - NW_Evt_UnicodeKeyEvent_ClassPart_t NW_Evt_UnicodeKeyEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Evt_UnicodeKeyEvent_s { - NW_Evt_KeyEvent_t super; - - /* member variables */ - NW_Ucs2 keyVal; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Evt_UnicodeKeyEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Evt_UnicodeKeyEvent)) - -#define NW_Evt_UnicodeKeyEventOf(_object) \ - (NW_Object_Cast (_object, NW_Evt_UnicodeKeyEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT const NW_Evt_UnicodeKeyEvent_Class_t NW_Evt_UnicodeKeyEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Evt_UnicodeKeyEvent_GetKeyVal(_object) \ - (NW_OBJECT_CONSTCAST(NW_Ucs2) NW_Evt_UnicodeKeyEventOf (_object)->keyVal) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Evt_UnicodeKeyEvent_t* -NW_Evt_UnicodeKeyEvent_New (NW_Ucs2 keyVal); - -NW_EVT_EXPORT -TBrowserStatusCode -NW_Evt_UnicodeKeyEvent_Initialize (NW_Evt_UnicodeKeyEvent_t* event, - NW_Ucs2 keyVal); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_UNICODEKEYEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/include/nw_evt_unicodekeyeventi.h --- a/webengine/wmlengine/src/Evt/include/nw_evt_unicodekeyeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EVT_UNICODEKEYEVENTI_H -#define NW_EVT_UNICODEKEYEVENTI_H - -#include "nw_evt_keyeventi.h" -#include "nw_evt_unicodekeyevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_EVT_EXPORT -TBrowserStatusCode -_NW_Evt_UnicodeKeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EVT_UNICODEKEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/AccessKeyEvent.c --- a/webengine/wmlengine/src/Evt/src/AccessKeyEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_accesskeyeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_AccessKeyEvent_Class_t NW_Evt_AccessKeyEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_KeyEvent_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_AccessKeyEvent_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_KeyEvent */ - /* unused */ 0 - }, - { /* NW_Evt_AccessKeyEvent */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_AccessKeyEvent_Initialize (NW_Evt_AccessKeyEvent_t* event) -{ - return NW_Object_Initialize (&NW_Evt_AccessKeyEvent_Class, event); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/ActivateEvent.c --- a/webengine/wmlengine/src/Evt/src/ActivateEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_activateeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_ActivateEvent_Class_t NW_Evt_ActivateEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_ActivateEvent_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_ActivateEvent */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_ActivateEvent_t* -NW_Evt_ActivateEvent_New (void) -{ - return (NW_Evt_ActivateEvent_t*) NW_Object_New (&NW_Evt_ActivateEvent_Class); -} - -TBrowserStatusCode -NW_Evt_ActivateEvent_Initialize (NW_Evt_ActivateEvent_t* activateEvent) -{ - return NW_Object_Initialize (&NW_Evt_ActivateEvent_Class, activateEvent); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/ClearFieldEvent.c --- a/webengine/wmlengine/src/Evt/src/ClearFieldEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ClearFieldEvent OOC class implementation -- an event for -* clearing a field on a form. -* -*/ - - -// INCLUDE FILES -#include "nw_evt_clearfieldeventi.h" -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES -const -NW_Evt_ClearFieldEvent_Class_t NW_Evt_ClearFieldEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_ClearFieldEvent_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_ClearFieldEvent*/ - /* unused */ 0 - } -}; - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// NW_FBox_ClearFieldEvent::New -// OOC method for creating a new instance of this class. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_Evt_ClearFieldEvent_t* -NW_Evt_ClearFieldEvent_New( void ) -{ - return (NW_Evt_ClearFieldEvent_t*)NW_Object_New( &NW_Evt_ClearFieldEvent_Class ); -} - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::Initialize -// OOC method for initializing this instance of the class. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_Evt_ClearFieldEvent_Initialize( NW_Evt_ClearFieldEvent_t* event ) -{ - return NW_Object_Initialize( &NW_Evt_ClearFieldEvent_Class, event ); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/ControlKeyEvent.c --- a/webengine/wmlengine/src/Evt/src/ControlKeyEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_controlkeyeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_ControlKeyEvent_Class_t NW_Evt_ControlKeyEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_KeyEvent_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_ControlKeyEvent_t), - /* construct */ _NW_Evt_ControlKeyEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_KeyEvent */ - /* unused */ 0 - }, - { /* NW_Evt_ControlKeyEvent */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_ControlKeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) { - NW_Evt_ControlKeyEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_ControlKeyEventOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_Evt_KeyEvent_Construct (dynamicObject, argp); - _NW_THROW_ON_ERROR(status); - - /* initialize our members */ - thisObj->keyVal = va_arg (*argp, NW_Evt_ControlKeyType_t); - - /* successful completion */ - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_ControlKeyEvent_t* -NW_Evt_ControlKeyEvent_New (NW_Evt_ControlKeyType_t keyType) -{ - return (NW_Evt_ControlKeyEvent_t*) NW_Object_New (&NW_Evt_ControlKeyEvent_Class, - keyType); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_ControlKeyEvent_Initialize (NW_Evt_ControlKeyEvent_t* event, - NW_Evt_ControlKeyType_t keyType) -{ - return NW_Object_Initialize (&NW_Evt_ControlKeyEvent_Class, event, keyType); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/Event.c --- a/webengine/wmlengine/src/Evt/src/Event.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_eventi.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_Event_Class_t NW_Evt_Event_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_Event_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/FocusEvent.c --- a/webengine/wmlengine/src/Evt/src/FocusEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_focuseventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_FocusEvent_Class_t NW_Evt_FocusEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_FocusEvent_t), - /* construct */ _NW_Evt_FocusEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_FocusEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_FocusEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_FocusEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_FocusEventOf (dynamicObject); - - /* initialize our members */ - thisObj->hasFocus = (NW_Bool) va_arg (*argp, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_FocusEvent_Initialize (NW_Evt_FocusEvent_t* event, - NW_Bool hasFocus) -{ - return NW_Object_Initialize (&NW_Evt_FocusEvent_Class, event, (NW_Uint32)hasFocus); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/FontSizeChangeEvent.c --- a/webengine/wmlengine/src/Evt/src/FontSizeChangeEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_fontsizechangeeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_FontSizeChangeEvent_Class_t NW_Evt_FontSizeChangeEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_FontSizeChangeEvent_t), - /* construct */ _NW_Evt_FontSizeChangeEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_FontSizeChangeEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_FontSizeChangeEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_FontSizeChangeEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_FontSizeChangeEventOf (dynamicObject); - - if(thisObj == NULL) { - return KBrsrFailure; - } - - /* initialize our members */ - thisObj->fontLevel = va_arg (*argp, NW_Evt_FontSizeChangeEvent_FontLevel_t); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_FontSizeChangeEvent_t* -NW_Evt_FontSizeChangeEvent_New (NW_Evt_FontSizeChangeEvent_FontLevel_t fontLevel) -{ - return (NW_Evt_FontSizeChangeEvent_t*) NW_Object_New (&NW_Evt_FontSizeChangeEvent_Class, - fontLevel); -} - -TBrowserStatusCode -NW_Evt_FontSizeChangeEvent_Initialize (NW_Evt_FontSizeChangeEvent_t* event, - NW_Evt_FontSizeChangeEvent_FontLevel_t fontLevel) -{ - return NW_Object_Initialize (&NW_Evt_FontSizeChangeEvent_Class, event, fontLevel); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/KeyEvent.c --- a/webengine/wmlengine/src/Evt/src/KeyEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_keyeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_KeyEvent_Class_t NW_Evt_KeyEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_KeyEvent_t), - /* construct */ _NW_Evt_KeyEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_KeyEvent */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_Evt_KeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_KeyEvent_t* keyEvent; - - NW_ASSERT(dynamicObject != NULL); - - /* for convenience */ - keyEvent = NW_Evt_KeyEventOf (dynamicObject); - NW_REQUIRED_PARAM(argp); - - /* initialize the member variables */ - keyEvent->longPress = NW_FALSE; - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/OpenViewerEvent.c --- a/webengine/wmlengine/src/Evt/src/OpenViewerEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_openviewereventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_OpenViewerEvent_Class_t NW_Evt_OpenViewerEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_OpenViewerEvent_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_Evt_OpenViewerEvent*/ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_OpenViewerEvent_t* -NW_Evt_OpenViewerEvent_New (void) -{ - return (NW_Evt_OpenViewerEvent_t*) NW_Object_New (&NW_Evt_OpenViewerEvent_Class); -} - -TBrowserStatusCode -NW_Evt_OpenViewerEvent_Initialize (NW_Evt_OpenViewerEvent_t* openViewerEvent) -{ - return NW_Object_Initialize (&NW_Evt_OpenViewerEvent_Class, openViewerEvent); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/PointerEvent.c --- a/webengine/wmlengine/src/Evt/src/PointerEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_pointereventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_PointerEvent_Class_t NW_Evt_PointerEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_PointerEvent_t), - /* construct */ _NW_Evt_PointerEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_PointerEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_PointerEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_PointerEvent_t* thisObj = NULL; - - /* for convenience */ - thisObj = NW_Evt_PointerEventOf (dynamicObject); - - if(thisObj == NULL) { - return KBrsrFailure; - } - - /* initialize our members */ - thisObj->type = va_arg (*argp, NW_Evt_PointerEvent_Type_t); - thisObj->location.x = va_arg (*argp, NW_GDI_Metric_t); - thisObj->location.y = va_arg (*argp, NW_GDI_Metric_t); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_PointerEvent_t* -NW_Evt_PointerEvent_New (NW_Evt_PointerEvent_Type_t type, - NW_GDI_Metric_t x, NW_GDI_Metric_t y) -{ - return (NW_Evt_PointerEvent_t*) NW_Object_New (&NW_Evt_PointerEvent_Class, - type, x, y); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_PointerEvent_Initialize (NW_Evt_PointerEvent_t* event, - NW_Evt_PointerEvent_Type_t type, - NW_GDI_Metric_t x, NW_GDI_Metric_t y) -{ - return NW_Object_Initialize (&NW_Evt_PointerEvent_Class, event, type, x, y); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/ScrollEvent.c --- a/webengine/wmlengine/src/Evt/src/ScrollEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_scrolleventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_ScrollEvent_Class_t NW_Evt_ScrollEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_ScrollEvent_t), - /* construct */ _NW_Evt_ScrollEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_ScrollEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_ScrollEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_ScrollEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_ScrollEventOf (dynamicObject); - - if(thisObj == NULL) { - return KBrsrFailure; - } - - /* initialize our members */ - thisObj->direction = va_arg (*argp, NW_Evt_ScrollEvent_Direction_t); - thisObj->amount = (NW_Uint16)va_arg(*argp, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_ScrollEvent_t* -NW_Evt_ScrollEvent_New (NW_Evt_ScrollEvent_Direction_t direction, NW_Uint16 amount) -{ - return (NW_Evt_ScrollEvent_t*) NW_Object_New (&NW_Evt_ScrollEvent_Class, - direction, (NW_Uint32) amount); -} - -TBrowserStatusCode -NW_Evt_ScrollEvent_Initialize (NW_Evt_ScrollEvent_t* event, - NW_Evt_ScrollEvent_Direction_t direction, NW_Uint16 amount) -{ - return NW_Object_Initialize (&NW_Evt_ScrollEvent_Class, event, direction, (NW_Uint32)amount); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/TabEvent.c --- a/webengine/wmlengine/src/Evt/src/TabEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_tabeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_TabEvent_Class_t NW_Evt_TabEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_TabEvent_t), - /* construct */ _NW_Evt_TabEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_TabEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_TabEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_TabEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_TabEventOf (dynamicObject); - - if(thisObj == NULL) { - return KBrsrFailure; - } - - /* initialize our members */ - thisObj->direction = va_arg (*argp, NW_Evt_TabEvent_Direction_t); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_TabEvent_t* -NW_Evt_TabEvent_New (NW_Evt_TabEvent_Direction_t direction) -{ - return (NW_Evt_TabEvent_t*) NW_Object_New (&NW_Evt_TabEvent_Class, - direction); -} - -TBrowserStatusCode -NW_Evt_TabEvent_Initialize (NW_Evt_TabEvent_t* event, - NW_Evt_TabEvent_Direction_t direction) -{ - return NW_Object_Initialize (&NW_Evt_TabEvent_Class, event, direction); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/TimerEvent.c --- a/webengine/wmlengine/src/Evt/src/TimerEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_timereventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_TimerEvent_Class_t NW_Evt_TimerEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_TimerEvent_t), - /* construct */ _NW_Evt_TimerEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_TimerEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_TimerEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Evt_TimerEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_TimerEventOf (dynamicObject); - - /* initialize our members */ - thisObj->TimerType = va_arg (*argp, NW_Evt_TimerType_t); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_TimerEvent_Initialize (NW_Evt_TimerEvent_t* event, - NW_Evt_TimerType_t TimerType) -{ - return NW_Object_Initialize (&NW_Evt_TimerEvent_Class, event, TimerType); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Evt/src/UnicodeKeyEvent.c --- a/webengine/wmlengine/src/Evt/src/UnicodeKeyEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_evt_unicodekeyeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Evt_UnicodeKeyEvent_Class_t NW_Evt_UnicodeKeyEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_KeyEvent_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Evt_UnicodeKeyEvent_t), - /* construct */ _NW_Evt_UnicodeKeyEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_KeyEvent */ - /* unused */ NW_Object_Unused - }, - { /* NW_Evt_UnicodeKeyEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Evt_UnicodeKeyEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) { - NW_Evt_UnicodeKeyEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_Evt_UnicodeKeyEventOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_Evt_KeyEvent_Construct (dynamicObject, argp); - _NW_THROW_ON_ERROR(status); - - /* initialize our members */ - thisObj->keyVal = (NW_Ucs2) va_arg (*argp, NW_Uint32); - - /* successful completion */ - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Evt_UnicodeKeyEvent_t* -NW_Evt_UnicodeKeyEvent_New (NW_Ucs2 keyVal) -{ - return (NW_Evt_UnicodeKeyEvent_t*) NW_Object_New (&NW_Evt_UnicodeKeyEvent_Class, - (NW_Uint32)keyVal); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Evt_UnicodeKeyEvent_Initialize (NW_Evt_UnicodeKeyEvent_t* event, - NW_Ucs2 keyVal) -{ - return NW_Object_Initialize (&NW_Evt_UnicodeKeyEvent_Class, event, (NW_Uint32)keyVal); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/include/fileloader_cfilehandler.h --- a/webengine/wmlengine/src/FileLoader/include/fileloader_cfilehandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -#ifndef CFILEHANDLER_H -#define CFILEHANDLER_H - -// INCLUDES -#include "urlloader_urlloaderint.h" -#include "urlloader_murlschemehandler.h" -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class CKFileLoader; -/** -* Handling the load of a specific file. A CFileHandler object is instantiated -* to handle each file load request. -* -* @lib fileloader.lib -* @since 2.0 -*/ -class CFileHandler : public CActive -{ -public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aUrl The request URL. - * @param aTransId The request's transaction id. - * @param aLoadContext The load context that should be returned with the response. - * @param aLoadType The type of the load. - * @param aLoadCallback The callback to call when the response is ready. - * @param aFileLoader The context of the file loader, used to send back the response. - * @return CFileHandler - */ - static CFileHandler* NewL(const TUint16 *aUrl, - TUint8 aMethod, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader); - - /** - * Destructor. - */ - virtual ~CFileHandler(); - -public: // New functions - - /** - * Create a CFileHandler object and initiate the load. - * @since 2.0 - * @param aUrl The request URL. - * @param aTransId The request's transaction id. - * @param aLoadType The type of the load. - * @param aLoadContext The load context that should be returned with the response. - * @param aLoadCallback The callback to call when the response is ready. - * @param aFileLoader The context of the file loader, used to send back the response. - * @return void - */ - static void LoadFileL(const TUint16 *aUrl, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader); - - /** - * Create a CFileHandler object and initiate a head request. - * @since 2.6 - * @param aUrl The request URL. - * @param aTransId The request's transaction id. - * @param aLoadType The type of the load. - * @param aLoadContext The load context that should be returned with the response. - * @param aLoadCallback The callback to call when the response is ready. - * @param aFileLoader The context of the file loader, used to send back the response. - * @return void - */ - static void GetFileInfoL(const TUint16 *aUrl, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader); - -public: // Functions from base classes - - /** - * From CActive Return the response after file loading from the File system is complete. - * @since 2.0 - * @param - * @return void - */ - void RunL(); - - /** - * From CActive Noop. File loading cannot be cancelled. - * @since 2.0 - * @param - * @return void - */ - void DoCancel(); - -private: - - /** - * C++ default constructor. - */ - CFileHandler(const TUint16 *aUrl, - TUint8 aMethod, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Determine the content type of the file. - */ - void ContentTypeL(TUint8** aContentTypeString); - - /** - * Determine the content encoding of the file. - */ - TUint16 ContentEncoding(TUint8* aContentTypeString); - - /** - * Translate the file name from a URL to a valid file name in the system. - */ - TBool GetFileNameL(); - - /** - * Determine if the file is a saved deck or not. If it is saved deck, parse the file. - */ - TBool ParseSavedDeck(); - -private: // Data - - // The URL of the file to load - const TUint16* iUrl; - - // The method - TUint8 iMethod; - - // The loadType - TUint8 iLoadType; - - // The URL of the loaded file. Could be different than the original URL in case of saved deck. - TUint16* iRedirectedUrl; - - // The context to return in the response callback. - void *iLoadContext; - - // The callback to call for the response. - NW_Url_RespCallback_t *iLoadCallback; - - // The CFileLOader object used to return the response. - CKFileLoader* iFileLoader; - - // The transaction's id. - TUint16 iTransId; - - // A session to the file system. - RFs iRfs; - - // A handle to the file being loaded. - RFile iFile; - - // The file's content. - TPtr8 iData; - - // The loaded file's name. This is different from the URL. It does not contain the scheme. - TPtr iFileName; - - // A flag if opening RFs was successful and it needs to be closed. - TBool iRfsOpen; - - // A flag if opening the file was successful and it needs to be closed. - TBool iFileOpen; - - // The number of bytes in the file. - TInt iSize; - - // The content-type of the file. - TUint8* iContentType; - -}; - -#endif // CFILEHANDLER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/include/fileloader_cfileloader.h --- a/webengine/wmlengine/src/FileLoader/include/fileloader_cfileloader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -#ifndef CFileLoader_H -#define CFileLoader_H - -// INCLUDES -#include "urlloader_urlloaderint.h" -#include "urlloader_murlschemehandler.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* File loader implementation class. -* -* @lib fileloader.lib -* @since 2.0 -*/ - -class CKFileLoader : public MUrlSchemeHandler -{ -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CKFileLoader* NewL(); - - /** - * Destructor. - */ - virtual ~CKFileLoader(); - -public: // Functions from base classes - - /** - * From MUrlSchemeHandler Handles requests for file scheme loading. - * @since 2.0 - * @param aUrl The request URL. - * @param aHeader The request headers or NULL if no request specific headers. It is - * @param aData The body and body length of the request. - * @param aMethod The method to use for the request could be NW_URL_METHOD_GET or NW_URL_METHOD_POST . - * @param aTransId The request's transaction id. - * @param aLoadContext The load context that should be returned with the response. - * @param aLoadCallback The callback to call when the response is ready. - * @param aPartialLoadCallback The callback to call when a chunk is ready. - * @param aCacheMode The cache mode. It is relevant only in case of http or https scheme. - * @param aDefaultHeadersMask A flag indicating what default headers should be used. - * @param aLoadType Used by accept headers - * @param aIsTopLevel Markup page is top, images, css, etc are not top level - * @param aIsScript Is it a WmlScript load event? - * @return ETrue if processed the load request, EFalse otherwise - */ - virtual TBool HandleLoadRequestL(const TUint16* aUrl, - void* aHeader, - TPtr8& aData, - TUint8 aMethod, - TUint16 aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, - TUint aDefaultHeadersMask, - TUint8 aLoadType, - TBool aIsTopLevel, - TBool aIsScript, - NW_Uint8 aReason, - void* aLoadData); -private: - - /** - * C++ default constructor. - */ - CKFileLoader(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -}; - -#endif // CKFileLoader_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/include/fileloader_csaveddeckhandler.h --- a/webengine/wmlengine/src/FileLoader/include/fileloader_csaveddeckhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -#ifndef CSavedDeckHandler_H -#define CSavedDeckHandler_H - -// INCLUDES -#include "urlloader_urlloaderint.h" -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES -// This data type does not have a destructor -// and does not take ownership of the strings -class CSavedDeckPart -{ -public: - CSavedDeckPart():iUrl(NULL,0),iData(NULL,0),iContentTypeString(NULL,0){} - void Reset(); - TPtrC8 iUrl; - TPtrC8 iData; - TPtrC8 iContentTypeString; - TUint32 iCharset; - TUint32 iOriCharset; -}; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Handling the loading and parsing of a saved deck. -* -* -* @lib fileloader.lib -* @since 2.0 -*/ -class CSavedDeckHandler : public CBase -{ -public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aData The buffer loaded from the file system. - */ - static CSavedDeckHandler* NewLC(TPtrC8& aData); - - /** - * Destructor. - */ - virtual ~CSavedDeckHandler(); - -public: // New functions - - /** - * Parse the saved deck buffer into the parts and store each part in cache. - * @since 2.0 - * @param aData The file content loaded from the file system. - * @param aRequestUrl The original request URL. - * @param aResponseData The body of the first data part. - * It will be sent back as the response. - * @param aResponseUrl The Original URL of the first part of the response. - * @param aContentTypeString The string representation of the content type - * of the first data part. It is used only if a - * WAP token cannot be identified. - * @param aCharset The character set of the first data part. - * @param aSavedDeck A flag indicating if this is a saved deck or not. - * @return KErrCorrupt or KErrNone - */ - static TInt ParseSavedDeck(TPtrC8& aData, - TPtrC& aRequestUrl, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset, - TBool& aSavedDeck); - - - /** - * Parse the saved deck buffer into the parts and store each part in cache. - * @since 2.0 - * @param aData The file content loaded from the file system. - * @param aRequestUrl The original request URL. - * @param aResponseData The body of the first data part. - * It will be sent back as the response. - * @param aResponseUrl The Original URL of the first part of the response. - * @param aContentType The WAP token content type of the first data part. - * @param aContentTypeString The string representation of the content type - * of the first data part. It is used only if a - * WAP token cannot be identified. - * @param aCharset The character set of the first data part. - * @param aSavedDeck A flag indicating if this is a saved deck or not. - * @return void - */ - static void ParseSavedDeckL(TPtrC8& aData, - TPtrC& aRequestUrl, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset, - TBool& aSavedDeck); - -private: - - /** - * C++ default constructor. - */ - CSavedDeckHandler(TPtrC8& aData); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Check if the loaded file is a saved deck, based on the path and extension. - */ - static TBool IsSavedDeck(TPtrC& aRequestUrl); - - /** - * Extract the next data part from the buffer. - */ - void GetNextPartL(CSavedDeckPart& aSavedDeckPart); - - /** - * Copy the data and URL of the first part, to be returned as the response. - */ - void PrepareResponseLC(CSavedDeckPart& aSavedDeckPart, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset); - - /** - * Send a response part to cache. - */ - void LoadPartToCacheL(CSavedDeckPart& aSavedDeckPart); - - /** - * Convert charset to string - */ - TPtrC8 ConvertCharsetToStr(TUint32 aCharSet); - - /** - * Extract a TUint from a buffer and advance the pointer. - */ - TUint GetUintFromBuffer(TPtrC8& aPtr) - { - TUint i; - TUint8* c = (TUint8*)(&i); - Mem::Copy(c, aPtr.Ptr(), sizeof(TUint)); - aPtr.Set(aPtr.Mid(sizeof(TUint))); - return i; - } - -private: // Data - - // The file content loaded from the file system. - TPtrC8 iData; - - // A descriptior pointing to the current position to process in the loaded file. - TPtrC8 iDataReader; -}; - -#endif // CSavedDeckHandler_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/include/urlloader_murlschemehandler.inl --- a/webengine/wmlengine/src/FileLoader/include/urlloader_murlschemehandler.inl Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -// INCLUDE FILES -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// MUrlSchemeHandler::PartialResponse -// Call the partial response callback with a chunk. -// ----------------------------------------------------------------------------- -// -inline TBrowserStatusCode MUrlSchemeHandler::PartialResponse(const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - NW_Bool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - NW_Uint8 *aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialCallback ) - { - TUint convertedHttpStatus = aHttpStatus; - - __ASSERT_DEBUG(aUri != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aPartialCallback != NULL, LoaderUtils::PanicLoader()); - - LoaderUtils::LogLoaderEvents(ELogTypeResponse, aTransId, aUri); - - TUint8* body = (TUint8*)aBody.Ptr(); - - if (aBody.Length() && aHttpStatus > Success && aHttpStatus < MultipleChoices) - { - /* Http status of 2xx is success, we map to OK (200) if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= MultipleChoices && aHttpStatus < BadRequest) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= ServerError && aHttpStatus < 600) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - // when dealing with http status 300 and 500 check to see if body is present - // if so we want to treat this as a standard content load and force the - // http status to be 200 (success) - - if ((body) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = ETrue; - } - - if ((iIsBodyPresent && (aChunkIndex == -1)) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = EFalse; - } - - TBrowserStatusCode status = (aErr == KErrNone && convertedHttpStatus != Success) ? - KBrsrHttpStatus : LoaderUtils::MapErrors(aErr); - - NW_Url_Resp_t* urlResp = UrlLoader_UrlResponseNew(aUri, (TUint8*)aBody.Ptr(), - aBody.Length(), aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - aMethod, - aTransId, - aContentLength); - if (aCertInfo != NULL) - { - urlResp->certInfo = aCertInfo; - } - - CleanupStack::PushL(aContentTypeString); - CleanupStack::PushL(aContentLocationString); - CleanupStack::PushL(aBoundaryString); - CleanupStack::PushL(aLastModified); - CleanupStack::PushL(body); - if (urlResp == NULL) - { - status = (aPartialCallback)(KBrsrOutOfMemory, aTransId, aChunkIndex, aLoadContext, NULL); - CleanupStack::PopAndDestroy(5); // body, aContentTypeString, aContentLocationString - // aBoundaryString, aLastModified - } - else - { - status = (aPartialCallback)(status, aTransId, aChunkIndex, aLoadContext, urlResp); - CleanupStack::Pop(5); // body, aContentTypeString, aContentLocationString, aBoundaryString, aLastModified - } - return status; - } - -// ----------------------------------------------------------------------------- -// MUrlSchemeHandler::Response -// Call the response callback with an error code. -// ----------------------------------------------------------------------------- -// -inline TBrowserStatusCode MUrlSchemeHandler::PartialResponse(TUint16 aTransId, - TInt aErr, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialCallback) -{ - __ASSERT_DEBUG(aPartialCallback != NULL, LoaderUtils::PanicLoader()); - - LoaderUtils::LogLoaderEvents(ELogTypeFailedResponse, aTransId, - LoaderUtils::MapErrors(aErr)); - return (aPartialCallback)(LoaderUtils::MapErrors(aErr), aTransId, -1, aLoadContext, NULL); -} - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/src/fileloader_cfilehandler.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_cfilehandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,751 +0,0 @@ -/* -* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include - -#include "fileloader_cfilehandler.h" -#include "fileloader_cfileloader.h" -//#include "urlloader_loaderutils.h" -#include "nwx_http_defs.h" -#include "fileloader_csaveddeckhandler.h" -#include "TEncodingMapping.h" - -//#include "PluginHandler.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CFileHandler::CFileHandler -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CFileHandler::CFileHandler(const TUint16 *aUrl, - TUint8 aMethod, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader) : - CActive(CActive::EPriorityUserInput), iData(NULL, 0), iFileName(NULL, 0), - iSize(0) -{ - iUrl = aUrl; - iRedirectedUrl = NULL; - iTransId = aTransId; - iLoadContext = aLoadContext; - iLoadCallback = aLoadCallback; - iFileLoader = aFileLoader; - iRfsOpen = EFalse; - iFileOpen = EFalse; - iMethod = aMethod; - iLoadType = aLoadType; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CFileHandler::ConstructL() -{ - TInt ret = KErrNone; - - if (!GetFileNameL()) - { - User::Leave(KErrBadName); - } - - // connect to file server - User::LeaveIfError(iRfs.Connect(1)); - iRfsOpen = ETrue; - // Open the file - ret = iFile.Open(iRfs, iFileName, EFileRead | EFileShareAny); - if (ret == KErrNotFound) - { - // Try again with the Uri-decoded name. - HBufC16* decodedFileName = EscapeUtils::EscapeDecodeL(iFileName); - TPtrC decodedFileNamePtr(*decodedFileName); - - ret = iFile.Open(iRfs, decodedFileNamePtr, EFileRead | EFileShareAny); - if (ret == KErrNotFound) - { - // Convert the error KErrNotFound to a file specific error - ret = KErrPathNotFound; - } - else - { - // Use the decoded filename - iFileName.Copy(decodedFileNamePtr); - iFileName.ZeroTerminate(); - } - delete decodedFileName; - } - - User::LeaveIfError(ret); - iFileOpen = ETrue; - - // Get file size - User::LeaveIfError(iFile.Size(iSize)); - - CActiveScheduler::Add(this); -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CFileHandler* CFileHandler::NewL(const TUint16 *aUrl, - TUint8 aMethod, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader) -{ - CFileHandler* self = new( ELeave ) CFileHandler(aUrl, aMethod, aTransId, - aLoadType, - aLoadContext, aLoadCallback, - aFileLoader); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::~CFileHandler -// Destructor. -// ----------------------------------------------------------------------------- -// -CFileHandler::~CFileHandler() -{ - if ((iFileName.Length() > 0) && (iFileName.Ptr() != NULL)) - { - delete (TUint16*) iFileName.Ptr(); - } - if (iFileOpen) - { - iFile.Close(); - } - if (iRfsOpen) - { - iRfs.Close(); - } - if(iContentType) - { - delete iContentType; - } - delete (TUint8*)iData.Ptr(); - delete iRedirectedUrl; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::RunL -// Return the response after file loading from the File system is complete. -// ----------------------------------------------------------------------------- -// -void CFileHandler::RunL() -{ - switch (iStatus.Int()) - { - case KErrNone: - { - const TText8* wmltStr = (TText8*)"0"; - TPtrC8 wmltPtr(wmltStr); - const TText8* wmltcStr = (TText8*)"1"; - TPtrC8 wmltcPtr(wmltcStr); - const TText8* wmlaStr = (TText8*)"2"; - TPtrC8 wmlaPtr(wmlaStr); - const TText8* wmlacStr = (TText8*)"3"; - TPtrC8 wmlacPtr(wmlacStr); - - _LIT(KContentTypeT,"text/vnd.wap.wml"); - _LIT(KContentTypeTC,"text/vnd.wap.wmlc"); - _LIT(KContentWMLSType,"application/vnd.wap.wmlscriptc"); - _LIT(KContentWMLACType,"application/vnd.wap.wmlc"); - - TInt len = KContentWMLSType().Length(); - TUint8* contentTypeString = new(ELeave) TUint8 [len + 1]; - TPtrC8 script = iData.Right(1); - if( script.operator==(wmltPtr) ) - { - TPtr8 contentTypeStringPtr(contentTypeString, KContentTypeT().Length() + 1); - contentTypeStringPtr.Copy(KContentTypeT); - contentTypeStringPtr.ZeroTerminate(); - } - else if(script.operator==(wmltcPtr)) - { - TPtr8 contentTypeStringPtr(contentTypeString, KContentTypeTC().Length() + 1); - contentTypeStringPtr.Copy(KContentTypeTC); - contentTypeStringPtr.ZeroTerminate(); - } - else if(script.operator==(wmlaPtr)) - { - TPtr8 contentTypeStringPtr(contentTypeString, KContentWMLSType().Length() + 1); - contentTypeStringPtr.Copy(KContentWMLSType); - contentTypeStringPtr.ZeroTerminate(); - } - else if(script.operator==(wmlacPtr)) - { - TPtr8 contentTypeStringPtr(contentTypeString, KContentWMLACType().Length() + 1); - contentTypeStringPtr.Copy(KContentWMLACType); - contentTypeStringPtr.ZeroTerminate(); - } - - // Get the file's content encoding. - //If there is charset in the file, use it. Otherwise, get it basing on the content type string - TUint16 charset = HTTP_iso_8859_1; //default to latin-1 - TBool bHasCharset = ETrue; - TInt position = iData.LocateReverse('*'); - TInt posDollar = iData.LocateReverse('$'); - - if((posDollar == KErrNotFound) || (posDollar < position)) //no charset was set - { - bHasCharset = EFalse; - charset = ContentEncoding(contentTypeString); - } - else - { - TPtrC8 charsetfromfile = iData.Mid( posDollar + 1, (iData.Length() - (posDollar + 2))); - for (int i = 0; supportedCharset[i].uid != 0; i++) - { - TPtrC8 charsetTemp(supportedCharset[i].charset); - if (charsetTemp == charsetfromfile) - { - charset = supportedCharset[i].ianaEncoding; - break; - } - } - } - - // Check if it is a saved deck. - // Put the "application saved page" string const and the - // "ContentType" string in TPtrC8 to find if this is a saved page - TPtrC8 httpSavedString(HTTP_application_saved_string); - TPtrC8 contentString(contentTypeString); - - TUint index = contentString.FindF(httpSavedString); - - if ( !((0 == index) && ParseSavedDeck()) ) - { - // Not a saved deck, send a response - //TPtr8 data( iData ); declared up - // - TUint contentLength = 0; - - const TUint16* responseUrl = (iRedirectedUrl == NULL) ? iUrl : iRedirectedUrl; - - - if (iMethod == NW_URL_METHOD_GET) - { - TInt urlLen = 0; - if(bHasCharset) - { - urlLen = posDollar - position; - } - else - { - urlLen = iData.Length() - position -1; - } - - //R->fake the url - HBufC* newUrl = HBufC::NewL( urlLen ); - newUrl->Des().Copy(iData.Mid( position + 1, urlLen-1 )); - newUrl->Des().ZeroTerminate(); - - // Transfer ownership before calling Response - TUint8* data = new TUint8[position]; - TPtr8 dataDes(data, position); - dataDes.Copy(iData.Ptr(), position); - iData.Set(NULL,0, 0); - delete (TUint8*)iData.Ptr(); - - responseUrl = (TUint16*)newUrl->Ptr(); - - // Send the response - iFileLoader->PartialResponse( (TUint16*)newUrl->Ptr(), dataDes, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing. - NULL, NULL, charset, NULL, Success, NW_URL_METHOD_GET, iTransId, 0 /*first chunk*/, NULL, dataDes.Length(), - KErrNone, iLoadContext, iLoadCallback); - delete newUrl; - } - - // Send the close response - iContentType = NULL; - TPtr8 emptyData(NULL,0,0); - contentTypeString = iContentType; - - iFileLoader->PartialResponse( responseUrl, emptyData, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing - NULL, NULL, charset, NULL, Success, iMethod, iTransId, -1 /*last chunk*/, NULL, contentLength, - KErrNone, iLoadContext, iLoadCallback); - } - else - { - // No response sent with this content type string, - // (so no subsequent delete) delete it here. - delete contentTypeString; - } - } - - break; - - default: - { - // Send an error response back - iFileLoader->PartialResponse(iTransId, iStatus.Int(), iLoadContext, iLoadCallback); - } - break; - } // end of switch - - delete this; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::DoCancel -// Noop. File loading cannot be cancelled. -// ----------------------------------------------------------------------------- -// -void CFileHandler::DoCancel() -{ -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::LoadFileL -// Create a CFileHandler object and initiate the load. -// ----------------------------------------------------------------------------- -// -void CFileHandler::LoadFileL(const TUint16 *aUrl, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader) -{ - __ASSERT_DEBUG(aUrl != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aLoadCallback != NULL, LoaderUtils::PanicLoader()); - - // Create a file handler object - CFileHandler* handler = CFileHandler::NewL(aUrl, NW_URL_METHOD_GET, - aTransId, aLoadType, aLoadContext, aLoadCallback, aFileLoader); - - // Start reading the file - if (handler->iSize > 0) - { - TUint8* data = NULL; - data = new TUint8 [handler->iSize]; - User::LeaveIfNull(data); - handler->iData.Set(data, 0, handler->iSize); - handler->iFile.Read(handler->iData, handler->iStatus); - } - - handler->SetActive(); -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::LoadFileL -// Create a CFileHandler object and initiate the load. -// ----------------------------------------------------------------------------- -// -void CFileHandler::GetFileInfoL(const TUint16 *aUrl, - TUint16 aTransId, - TUint8 aLoadType, - void *aLoadContext, - NW_Url_RespCallback_t *aLoadCallback, - CKFileLoader* aFileLoader) -{ - __ASSERT_DEBUG(aUrl != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aLoadCallback != NULL, LoaderUtils::PanicLoader()); - - // Create a file handler object - CFileHandler* handler = CFileHandler::NewL(aUrl, NW_URL_METHOD_HEAD, - aTransId, aLoadType, aLoadContext, aLoadCallback, aFileLoader); - - // Start reading the file - if (handler->iSize > 0) - { - TUint8* data = NULL; - data = new TUint8 [handler->iSize]; - User::LeaveIfNull(data); - handler->iData.Set(data, 0, handler->iSize); - handler->iFile.Read(handler->iData, handler->iStatus); - } - - handler->SetActive(); -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::ContentTypeL -// Determine the content type of the file. -// ----------------------------------------------------------------------------- -void CFileHandler::ContentTypeL(TUint8** aContentTypeString) - { - // part of string defined in "Exported mimetypes" section in BrowserRec.h - __ASSERT_DEBUG(aContentTypeString != NULL, LoaderUtils::PanicLoader()); - - TDataRecognitionResult dataType; - RApaLsSession apaSession; - TInt ret; - - *aContentTypeString = NULL; - User::LeaveIfError(apaSession.Connect()); - // Ask the application architecture to find the file type - ret = apaSession.RecognizeData(iFileName, iData, dataType); - apaSession.Close(); - - if (ret == KErrNone && - (dataType.iConfidence == CApaDataRecognizerType::ECertain) || - (dataType.iConfidence == CApaDataRecognizerType::EProbable)) - { - // If the file type was found, try to match it to a known file type - TPtrC8 mimeTypePtr = dataType.iDataType.Des8(); - TInt len = mimeTypePtr.Length() + 1; - *aContentTypeString = new(ELeave) TUint8 [len]; - - TPtr8 contentTypeStringPtr(*aContentTypeString, len); - contentTypeStringPtr.Copy(mimeTypePtr); - contentTypeStringPtr.ZeroTerminate(); - return; - } - - // Check if it is css - _LIT(KCssExt, ".css"); - TPtrC extPtr (iFileName.Right(iFileName.Length() - iFileName.LocateReverse('.'))); - if (!extPtr.CompareF(KCssExt())) - { - TPtrC8 mimeTypePtr(HTTP_text_css_string); - TInt len = mimeTypePtr.Length() + 1; - *aContentTypeString = new(ELeave) TUint8 [len]; - - TPtr8 contentTypeStringPtr(*aContentTypeString, len); - contentTypeStringPtr.Copy(mimeTypePtr); - contentTypeStringPtr.ZeroTerminate(); - return; - } - - // Check if it is wbmp - _LIT(KWbmpExt, ".wbmp"); - extPtr.Set(iFileName.Right(iFileName.Length() - iFileName.LocateReverse('.'))); - if (!extPtr.CompareF(KWbmpExt())) - { - TPtrC8 mimeTypePtr(HTTP_image_vnd_wap_wbmp_string); - TInt len = mimeTypePtr.Length() + 1; - *aContentTypeString = new(ELeave) TUint8 [len]; - - TPtr8 contentTypeStringPtr(*aContentTypeString, len); - contentTypeStringPtr.Copy(mimeTypePtr); - contentTypeStringPtr.ZeroTerminate(); - return; - } - //R->ecma - // Check if it is ecma - /* - _LIT(KEcmaScriptExt, ".es"); - _LIT(KJavaScriptExt, ".js"); - extPtr.Set(iFileName.Right(iFileName.Length() - iFileName.LocateReverse('.'))); - if (!extPtr.CompareF(KEcmaScriptExt()) || !extPtr.CompareF(KJavaScriptExt())) - { - TPtrC8 mimeTypePtr(HTTP_text_ecmascript_string); - TInt len = mimeTypePtr.Length() + 1; - *aContentTypeString = new(ELeave) TUint8 [len]; - - TPtr8 contentTypeStringPtr(*aContentTypeString, len); - contentTypeStringPtr.Copy(mimeTypePtr); - contentTypeStringPtr.ZeroTerminate(); - return; - } - */ - // Check if it is a supported plugin - //R->embed - //CPluginHandler* pluginHandler = CPluginHandler::GetSingleton(); - //NW_ASSERT (pluginHandler != NULL); // we should always have a plugin handler - /* //R - TUint16* mimeType16 = pluginHandler->GetPluginMimeTypeL(iFileName); - if (mimeType16 != NULL) - { - // This file's extension is supported - CleanupStack::PushL(mimeType16); - TPtrC16 mimeTypePtr16(mimeType16); - TUint8* mimeType8 = new(ELeave) TUint8 [mimeTypePtr16.Length() + 1]; - TPtr8 mimeTypePtr8(mimeType8, 0, mimeTypePtr16.Length() + 1); - mimeTypePtr8.Copy(mimeTypePtr16); - mimeTypePtr8.ZeroTerminate(); - CleanupStack::PopAndDestroy(); // mimeType16 - *aContentTypeString = mimeType8; - return; - } - */ - User::Leave(KBrsrWmlbrowserBadContentType); - } - - -// ----------------------------------------------------------------------------- -// CFileHandler::ContentEncoding -// Determine the content encoding of the file. -// ----------------------------------------------------------------------------- -// -TUint16 CFileHandler::ContentEncoding(TUint8* aContentTypeString) -{ - // Assume Latin-1 for xhtml and wml. ucs2 for any other - TUint16 charset = HTTP_iso_8859_1; - - TPtrC8 httpAppString(HTTP_application_vnd_wap_wmlc_string); - TPtrC8 contentString(aContentTypeString); - - // Is the contentType a HTTP_application_vnd_wap_wmlc_string - TUint index = contentString.FindF(httpAppString); - if (index == 0) - { - // This is a HTTP_application_vnd_wap_wmlc_string - charset = HTTP_iso_10646_ucs_2; - } - - return charset; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::GetFileNameL -// Translate the file name from a URL to a valid file name in the system. -// ----------------------------------------------------------------------------- -// -TBool CFileHandler::GetFileNameL() -{ - // This function accepts URLs in the following format: - // file://filename.xxx - // file:///filename.xxx - // file://c:/filename.xxx - // file:///c:/filename.xxx - // - _LIT(KFileScheme, "file://"); - _LIT(KDefaultDrivePath, "C:\\"); - _LIT(KDefaultDriveInUrl, "C:/"); - _LIT(KPathChar, "\\"); - - TUint16* name = NULL; - TInt count; - TInt index = 0; - TBool drvLetter = EFalse; - TUint16 c; - - // Verify the file scheme - TPtrC urlPtr(iUrl); - if (urlPtr.FindF(KFileScheme) != 0) - { - return EFalse; - } - urlPtr.Set(urlPtr.Mid(KFileScheme().Length())); - - // make sure there are enough characters in the filename before - // trying to check them - count = urlPtr.Length(); - if(count == 0) - { - return EFalse; // no filename, so can't look at urlPtr[0] - } - - // Skip the first '/' if there is one - if (urlPtr[0] == '/') - { - urlPtr.Set(urlPtr.Mid(1)); - } - count = urlPtr.Length(); - - // Is there a drive letter? - if(count > 1) - { - // can check for drive letter - if (urlPtr[1 + index] == ':') - { - drvLetter = ETrue; - } - } - if(drvLetter == EFalse) - { - // 3 additional characters for the string "c:\" - count = urlPtr.Length() + 3; - } - name = new(ELeave) TUint16 [count]; - CleanupStack::PushL(name); - iFileName.Set(name, 0, count); - if (!drvLetter) - { - // If there is no drive letter, add "C:\" - iRedirectedUrl = new(ELeave) TUint16[count + 1 + KFileScheme().Length()]; - TPtr redirectedUrlPtr(iRedirectedUrl, count + 1 + KFileScheme().Length()); - redirectedUrlPtr.Copy(KFileScheme()); - redirectedUrlPtr.Append(KDefaultDriveInUrl); - redirectedUrlPtr.Append(urlPtr); - redirectedUrlPtr.ZeroTerminate(); - iFileName.Append(KDefaultDrivePath); - } - - TBool fragment(EFalse); - // Convert relative path containing /./ and /../ to absolute path - for (; index < urlPtr.Length() && !fragment; index ++) - { - switch(urlPtr[index]) - { - case '#': //Check if there is a fragment '#' - { - fragment = ETrue; - continue; // Just stop there - } - - case '/': - { - iFileName.Append(KPathChar); - break; - } - case '.': - { - if (index > 1 && urlPtr[index - 1] == '/') - { - if (index < count - 1 && urlPtr[index + 1] == '/') - { - index ++; // skip ./ - break; - } - if (index > 2 && index < count - 3 && - urlPtr[index + 1] == '.' && urlPtr[index + 2] == '/') - { - TInt i = index - 2; - - for (; i > 0 && urlPtr[i] != '/'; i--) {} // skip /../ - - iFileName.SetLength(iFileName.Length() - (index - i)); - index += 2; - break; - } - } - } - // no break - //lint -fallthrough - - default: - { - c = urlPtr[index]; - iFileName.Append(&c, 1); - break; - } - } // end of switch - } - CleanupStack::Pop(); // name - return ETrue; -} - - -// ----------------------------------------------------------------------------- -// CFileHandler::ParseSavedDeck -// Determine if the file is a saved deck or not. If it is saved deck, parse the file. -// ----------------------------------------------------------------------------- -// -TBool CFileHandler::ParseSavedDeck() -{ - TPtr8 responseData(NULL,0,0); - TPtr responseUrl(NULL, 0, 0); - TPtr8 contentTypeString(NULL, 0, 0); - TUint charset; - TBool isSavedDeck; - TPtrC8 dataPtr(iData.Ptr(), iData.Length()); - TPtrC16 urlPtr(iUrl, User::StringLength(iUrl)); - - // Create a CSavedDeckHandler object to parse the file - TInt ret = CSavedDeckHandler::ParseSavedDeck(dataPtr, urlPtr, responseData, - responseUrl, contentTypeString, charset, isSavedDeck); - - if (isSavedDeck) - { - // It is a saved deck - if (ret == KErrNone) - { - TUint8* data = (TUint8*)iData.Ptr(); - delete data; - // Transfer ownership before calling Response - iData.Set(NULL, 0, 0); - // copy contentTypeString for the second (closing) response - TUint8* tempContentTypeString = NULL; - tempContentTypeString = (TUint8*)NW_Mem_Malloc( contentTypeString.Length() + 1 ); - if( tempContentTypeString ) - { - NW_Mem_memcpy( tempContentTypeString, contentTypeString.Ptr(), contentTypeString.Length() ); - tempContentTypeString[ contentTypeString.Length() ] = 0; - // Send the first part of the file as the response - iFileLoader->PartialResponse((TUint16*)responseUrl.Ptr(), responseData, NULL, - (TUint8*)contentTypeString.Ptr(), NULL, NW_FALSE, // multipart information is missing. - NULL, NULL, (TUint16)charset, NULL, Success, 0, iTransId, 0 /*first chunk*/, NULL, responseData.Length(), - KErrNone, iLoadContext, iLoadCallback); - - // Send closing response. pass tempContentTypeString ownership - TPtr8 emptyResponseData(NULL,0,0); - iFileLoader->PartialResponse((TUint16*)responseUrl.Ptr(), emptyResponseData, NULL, - tempContentTypeString, NULL, NW_FALSE, // multipart information is missing. - NULL, NULL, (TUint16)charset, NULL, Success, 0, iTransId, -1/*last chunk*/, NULL, 0, - KErrNone, iLoadContext, iLoadCallback); - } - delete (TUint16*)responseUrl.Ptr(); - } - else - { - // Send an error response - iFileLoader->PartialResponse(iTransId, ret, iLoadContext, iLoadCallback); - } - } - return isSavedDeck; - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/src/fileloader_cfileloader.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_cfileloader.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include "nwx_http_defs.h" -#include "fileloader_cfileloader.h" -#include "urlloader_loaderutils.h" -#include "fileloader_cfilehandler.h" - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CKFileLoader::CKFileLoader -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CKFileLoader::CKFileLoader() -{ -} - - -// ----------------------------------------------------------------------------- -// CKFileLoader::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CKFileLoader* CKFileLoader::NewL() -{ - CKFileLoader* self = new( ELeave ) CKFileLoader(); - - return self; -} - - -// Destructor -CKFileLoader::~CKFileLoader() -{ -} - - -// ----------------------------------------------------------------------------- -// CKFileLoader::HandleLoadRequestL -// Handles requests for file scheme loading. -// ----------------------------------------------------------------------------- -// -TBool CKFileLoader::HandleLoadRequestL(const TUint16 *aUrl, - void *aHeader, - TPtr8& aData, - TUint8 aMethod, - TUint16 aTransId, - void *aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t, - TUint, - TUint8 aLoadType, - TBool, - TBool, - NW_Uint8 , - void* ) -{ - __ASSERT_DEBUG(aUrl != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aPartialLoadCallback != NULL, LoaderUtils::PanicLoader()); - // Check if the URL scheme is file:// - _LIT(KFileScheme, "file://"); - TPtrC urlPtr(aUrl); - if (urlPtr.FindF(KFileScheme) != 0) - { - return EFalse; - } - - // Handle the GET method - if (aMethod == NW_URL_METHOD_GET) - { - __ASSERT_DEBUG(aData.Length() == 0 && aData.Ptr() == NULL, - LoaderUtils::PanicLoader()); - - //lint -e{774} always eval to false - if (aUrl == NULL || aPartialLoadCallback == NULL || aHeader != NULL || - aData.Length() != 0 || aData.Ptr() != NULL) - { - User::Leave(KErrArgument); - } - - // The browser expects the response to return asynchronously. - // So we have to use the asynchronous API of RFile - CFileHandler::LoadFileL(aUrl, aTransId, aLoadType, aLoadContext, aPartialLoadCallback, this); - } - else if (aMethod == NW_URL_METHOD_HEAD) - { - CFileHandler::GetFileInfoL(aUrl, aTransId, aLoadType, aLoadContext, aPartialLoadCallback, this); - } - else - { - // We only handle GET or HEAD - User::Leave(KErrArgument); - } - return ETrue; -} - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/FileLoader/src/fileloader_csaveddeckhandler.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_csaveddeckhandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,416 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for loading file scheme. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include - -#include "fileloader_csaveddeckhandler.h" -#include "fileloader_cfileloader.h" -#include "urlloader_loaderutils.h" -#include "nwx_http_defs.h" -#include "nwx_settings.h" - - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT8(KUtf8, "utf-8"); -_LIT8(KUsAscii, "us-ascii"); -_LIT8(KIso10646Ucs2, "iso-10646-ucs-2"); -_LIT8(KIso88591, "iso-8859-1"); -_LIT8(KBig5, "big5"); -_LIT8(KGb2312, "gb2312"); -_LIT8(KIso88592, "iso-8859-2"); -_LIT8(KIso88593, "iso-8859-3"); -_LIT8(KIso88594, "iso-8859-4"); -_LIT8(KIso88595, "iso-8859-5"); -_LIT8(KIso88596, "iso-8859-6"); -_LIT8(KIso88597, "iso-8859-7"); -_LIT8(KIso88598, "iso-8859-8"); -_LIT8(KIso88599, "iso-8859-9"); -_LIT8(KShiftJIS, "shift_JIS"); -_LIT8(KWindows1250, "windows-1250"); -_LIT8(KWindows1251, "windows-1251"); -_LIT8(KWindows1253, "windows-1253"); -_LIT8(KWindows1254, "windows-1254"); -_LIT8(KWindows1255, "windows-1255"); -_LIT8(KWindows1256, "windows-1256"); -_LIT8(KWindows1257, "windows-1257"); -_LIT8(KTis620, "Tis-620"); -_LIT8(KJisX0201_1997, "jis_x0201-1997"); -_LIT8(KJisX0208_1997, "jis_x0208-1997"); -_LIT8(KIso2022Jp, "iso-2022-jp"); -_LIT8(KEucJp, "euc-jp"); -_LIT8(KWindows874, "windows-874"); -_LIT8(KOI8R, "koi8-r"); -_LIT8(KOI8U, "koi8-u"); - - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CSavedDeckPart::Reset -// Zero out all members of the structure CSavedDeckPart. -// ----------------------------------------------------------------------------- -// -void CSavedDeckPart::Reset() -{ - iUrl.Set(NULL, 0); - iData.Set(NULL, 0); - iContentTypeString.Set(NULL, 0); - iCharset = 0; - iOriCharset = 0; -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::CSavedDeckHandler -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CSavedDeckHandler::CSavedDeckHandler(TPtrC8& aData) : iData(aData), iDataReader(aData) -{ -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CSavedDeckHandler* CSavedDeckHandler::NewLC(TPtrC8& aData) -{ - CSavedDeckHandler* self = new( ELeave ) CSavedDeckHandler(aData); - - CleanupStack::PushL( self ); - - return self; -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::~CSavedDeckHandler -// Destructor. -// ----------------------------------------------------------------------------- -// -CSavedDeckHandler::~CSavedDeckHandler() -{ -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::ParseSavedDeck -// Parse the saved deck buffer into the parts and store each part in cache. -// ----------------------------------------------------------------------------- -// -TInt CSavedDeckHandler::ParseSavedDeck(TPtrC8& aData, TPtrC& aRequestUrl, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset, TBool& aSavedDeck) -{ - TRAPD(ret, ParseSavedDeckL(aData, aRequestUrl, aResponseData, aResponseUrl, - aContentTypeString, aCharset, aSavedDeck)); - LoaderUtils::LogLoaderEvents(ELogTypeSavedDeck, ret); - return ret; -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::ParseSavedDeckL -// Parse the saved deck buffer into the parts and store each part in cache. -// ----------------------------------------------------------------------------- -// -void CSavedDeckHandler::ParseSavedDeckL(TPtrC8& aData, TPtrC& aRequestUrl, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset, TBool& aSavedDeck) -{ - // Is this a SavedDeck? - aSavedDeck = IsSavedDeck(aRequestUrl); - if (!(aSavedDeck)) - { - return; - } - - CSavedDeckHandler* self = CSavedDeckHandler::NewLC(aData); - TUint i; - CSavedDeckPart savedDeckPart; - - // Get the number of parts - TUint count = self->GetUintFromBuffer(self->iDataReader); - - for (i = 0; i < count; i++) - { - self->GetNextPartL(savedDeckPart); - if (i == 0) - { - NW_Settings_SetOriginalEncoding(savedDeckPart.iOriCharset); - // First time through loop prepare and then push aResponseData, - // aResponseUrl, aContentTypeString onto CleanupStack - self->PrepareResponseLC(savedDeckPart, aResponseData, aResponseUrl, - aContentTypeString, aCharset); - } - else - { - self->LoadPartToCacheL( savedDeckPart); - } - } - - CleanupStack::Pop(3); // aResponseData, aResponseUrl, aContentTypeString - CleanupStack::PopAndDestroy(); // self -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::IsSavedDeck -// Check if the loaded file is a saved deck, based on the path and extension. -// ----------------------------------------------------------------------------- -// -TBool CSavedDeckHandler::IsSavedDeck(TPtrC& aRequestUrl) -{ - _LIT(KFileExtension, ".saveddeck"); - _LIT(KFilePath, "saveddecks"); - return (aRequestUrl.FindF(KFileExtension()) != KErrNotFound && - aRequestUrl.FindF(KFilePath()) != KErrNotFound); -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::GetNextPartL -// Extract the next data part from the buffer. -// ----------------------------------------------------------------------------- -// -void CSavedDeckHandler::GetNextPartL(CSavedDeckPart& aSavedDeckPart) -{ - TInt i; - - aSavedDeckPart.Reset(); - // Get the version - const TUint8* version = (const TUint8*)SAVED_DECK_VERSION; - TUint versionLen = User::StringLength(version); - - // Is it the correct version? - if (iDataReader.Find(version, versionLen) != 0) - { - User::Leave(KErrCorrupt); - } - // The version is contained, so the buffer must be big enough - iDataReader.Set(iDataReader.Mid(versionLen)); - - // Get the URL - if (iDataReader.Length() < (TInt)sizeof(TUint)) - { - User::Leave(KErrCorrupt); - } - i = GetUintFromBuffer(iDataReader) + 1; // 1 for NULL terminator - if (iDataReader.Length() < i) - { - User::Leave(KErrCorrupt); - } - aSavedDeckPart.iUrl.Set(iDataReader.Ptr(), i); - // Find that NULL terminator is still there - if (aSavedDeckPart.iUrl[i - 1] != '\0') - { - User::Leave(KErrCorrupt); - } - iDataReader.Set(iDataReader.Mid(i)); - - // Get the content type string - if (iDataReader.Length() < (TInt)sizeof(TInt)) // length constant type string - { - User::Leave(KErrCorrupt); - } - i = GetUintFromBuffer(iDataReader) + 1; // 1 for NULL terminator - if (iDataReader.Length() < i) - { - User::Leave(KErrCorrupt); - } - aSavedDeckPart.iContentTypeString.Set(iDataReader.Ptr(), i); - // Find that NULL terminator is still there - if (aSavedDeckPart.iContentTypeString[i - 1] != '\0') - { - User::Leave(KErrCorrupt); - } - iDataReader.Set(iDataReader.Mid(i)); - - // Get Charset - aSavedDeckPart.iCharset = GetUintFromBuffer(iDataReader); - - // Get original Charset setting - aSavedDeckPart.iOriCharset = GetUintFromBuffer(iDataReader); - - // Get the body - if (iDataReader.Length() < (TInt)sizeof(TInt)) - { - User::Leave(KErrCorrupt); - } - i = GetUintFromBuffer(iDataReader); - if (iDataReader.Length() < i + 1) // 1 for NULL terminator - { - User::Leave(KErrCorrupt); - } - aSavedDeckPart.iData.Set(iDataReader.Ptr(), i); - // Find that NULL terminator is still there - if (iDataReader[i] != '\0') - { - User::Leave(KErrCorrupt); - } - iDataReader.Set(iDataReader.Mid(i+ 1)); -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::PrepareResponseLC -// Copy the data and URL of the first part, to be returned as the response. -// ----------------------------------------------------------------------------- -// -void CSavedDeckHandler::PrepareResponseLC(CSavedDeckPart& aSavedDeckPart, - TPtr8& aResponseData, - TPtr& aResponseUrl, - TPtr8& aContentTypeString, - TUint& aCharset) -{ - // Copy data - TUint8* data = new(ELeave) TUint8 [aSavedDeckPart.iData.Length()]; - CleanupStack::PushL(data); - aResponseData.Set(data, 0, aSavedDeckPart.iData.Length()); - aResponseData.Copy(aSavedDeckPart.iData); - - // Copy URL - TUint16* url = new(ELeave) TUint16 [aSavedDeckPart.iUrl.Length()]; - CleanupStack::PushL(url); - aResponseUrl.Set(url, 0, aSavedDeckPart.iUrl.Length()); - aResponseUrl.Copy(aSavedDeckPart.iUrl); - - // Copy content type string - // note: string deleted in 'destructor' of reponse class - TUint8* cts = new(ELeave) TUint8 [aSavedDeckPart.iContentTypeString.Length()]; - CleanupStack::PushL(cts); - aContentTypeString.Set(cts, 0, aSavedDeckPart.iContentTypeString.Length()); - aContentTypeString.Copy(aSavedDeckPart.iContentTypeString); - - // Charset - aCharset = aSavedDeckPart.iCharset; -} - - -// ----------------------------------------------------------------------------- -// CSavedDeckHandler::LoadPartToCacheL -// Send a response part to cache. -// ----------------------------------------------------------------------------- -// -void CSavedDeckHandler::LoadPartToCacheL(CSavedDeckPart& aSavedDeckPart) -{ - TPtrC8 charsetStr = ConvertCharsetToStr(aSavedDeckPart.iCharset); - aSavedDeckPart.iUrl.Set(aSavedDeckPart.iUrl.Ptr(), aSavedDeckPart.iUrl.Length() - 1); - aSavedDeckPart.iContentTypeString.Set(aSavedDeckPart.iContentTypeString.Ptr(), aSavedDeckPart.iContentTypeString.Length() - 1); -} - - -TPtrC8 CSavedDeckHandler::ConvertCharsetToStr(TUint32 aCharset) -{ - if (aCharset == HTTP_utf_8) - return KUtf8().Ptr(); - if (aCharset == HTTP_us_ascii) - return KUsAscii().Ptr(); - if (aCharset ==HTTP_iso_10646_ucs_2) - return KIso10646Ucs2().Ptr(); - if (aCharset == HTTP_iso_8859_1) - return KIso88591().Ptr(); - if (aCharset == HTTP_gb2312) - return KGb2312().Ptr(); - if (aCharset == HTTP_big5) - return KBig5().Ptr(); - if (aCharset == HTTP_iso_8859_2) - return KIso88592().Ptr(); - if (aCharset == HTTP_iso_8859_3) - return KIso88593().Ptr(); - if (aCharset == HTTP_iso_8859_4) - return KIso88594().Ptr(); - if (aCharset == HTTP_iso_8859_5) - return KIso88595().Ptr(); - if (aCharset == HTTP_iso_8859_6) - return KIso88596().Ptr(); - if (aCharset == HTTP_iso_8859_7) - return KIso88597().Ptr(); - if (aCharset == HTTP_iso_8859_8) - return KIso88598().Ptr(); - if (aCharset == HTTP_iso_8859_9) - return KIso88599().Ptr(); - if (aCharset == HTTP_shift_JIS ) - return KShiftJIS().Ptr(); - if (aCharset == HTTP_windows_1250) - return KWindows1250().Ptr(); - if (aCharset == HTTP_windows_1251) - return KWindows1251().Ptr(); - if (aCharset == HTTP_windows_1253) - return KWindows1253().Ptr(); - if (aCharset == HTTP_windows_1254) - return KWindows1254().Ptr(); - if (aCharset == HTTP_windows_1255) - return KWindows1255().Ptr(); - if (aCharset == HTTP_windows_1256) - return KWindows1256().Ptr(); - if (aCharset == HTTP_windows_1257) - return KWindows1257().Ptr(); - if (aCharset == HTTP_tis_620) - return KTis620().Ptr(); - if (aCharset == HTTP_jis_x0201_1997) - return KJisX0201_1997().Ptr(); - if (aCharset == HTTP_jis_x0208_1997) - return KJisX0208_1997().Ptr(); - if (aCharset == HTTP_iso_2022_jp) - return KIso2022Jp().Ptr(); - if (aCharset == HTTP_euc_jp) - return KEucJp().Ptr(); - if (aCharset == HTTP_windows_874) - return KWindows874().Ptr(); - if (aCharset == HTTP_Koi8_r) - return KOI8R().Ptr(); - if (aCharset == HTTP_Koi8_u) - return KOI8U().Ptr(); - return KUtf8().Ptr(); -} - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/include/nw_imagech_epoc32contenthandler.h --- a/webengine/wmlengine/src/ImageCH/include/nw_imagech_epoc32contenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGECH_EPOC32CONTENTHANDLER_H -#define NW_IMAGECH_EPOC32CONTENTHANDLER_H - -#include "nw_hed_contenthandler.h" -#include "nw_image_abstractimage.h" -#include "nw_image_iimageobserver.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ImageCH_Epoc32ContentHandler_Class_s NW_ImageCH_Epoc32ContentHandler_Class_t; -typedef struct NW_ImageCH_Epoc32ContentHandler_s NW_ImageCH_Epoc32ContentHandler_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ImageCH_Epoc32ContentHandler_ClassPart_s { - void** unused; -} NW_ImageCH_Epoc32ContentHandler_ClassPart_t; - -struct NW_ImageCH_Epoc32ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_ImageCH_Epoc32ContentHandler_ClassPart_t NW_ImageCH_Epoc32ContentHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ImageCH_Epoc32ContentHandler_s { - NW_HED_ContentHandler_t super; - - /* member variables */ - NW_Image_AbstractImage_t* image; - NW_Text_t* title; - NW_HED_UrlRequest_LoadMode_t loadMode; - NW_Ucs2* requestUrl; - NW_Ucs2* altText; - - void* context; - NW_Image_IImageObserver_t NW_Image_IImageObserver; - NW_Uint8 noStore; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ImageCH_Epoc32ContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_ImageCH_Epoc32ContentHandler)) - -#define NW_ImageCH_Epoc32ContentHandlerOf(_object) \ - (NW_Object_Cast ((_object), NW_ImageCH_Epoc32ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_ImageCH_Epoc32ContentHandler_Class_t NW_ImageCH_Epoc32ContentHandler_Class; - -extern -NW_HED_UrlRequest_LoadMode_t -NW_ImageCH_Epoc32ContentHandler_GetLoadMode( NW_ImageCH_Epoc32ContentHandler_t* thisObj ); - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_HED_ContentHandler_t* -NW_ImageCH_Epoc32ContentHandler_NewBrokenImage( NW_HED_DocumentNode_t* parent, - NW_HED_UrlRequest_t* urlRequest, - TBrowserStatusCode error ); - -extern -TBrowserStatusCode -NW_ImageCH_Epoc32ContentHandler_GetVirtualHandler( NW_HED_DocumentNode_t* parent, - NW_HED_UrlRequest_t* urlRequest, - NW_ImageCH_Epoc32ContentHandler_t* imageCH, - NW_ImageCH_Epoc32ContentHandler_t** newVirtualImageCH ); - -extern -void -NW_ImageCH_Epoc32ContentHandler_ForceImageOpen( NW_ImageCH_Epoc32ContentHandler_t* imageCH ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGECH_EPOC32CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/include/nw_imagech_epoc32contenthandleri.h --- a/webengine/wmlengine/src/ImageCH/include/nw_imagech_epoc32contenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGECH_EPOC32CONTENTHANDLERI_H -#define NW_IMAGECH_EPOC32CONTENTHANDLERI_H - -#include "nw_hed_contenthandleri.h" -#include "nw_image_abstractimage.h" -#include "nw_image_iimageobserveri.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_Object_Class_t* const _NW_ImageCH_Epoc32ContentHandler_InterfaceList[]; -NW_LMGR_EXPORT const NW_Image_IImageObserver_Class_t _NW_ImageCH_Epoc32_ImageObserver_Class; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_Construct( NW_Object_Dynamic_t* dynamicObject, - va_list* argp ); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_Destruct( NW_Object_Dynamic_t* dynamicObject ); - -extern -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ); - -extern -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_GetBoxTree( NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree ); - -extern -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_PartialNextChunk( NW_HED_ContentHandler_t* contentHandler, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context); -extern -const NW_Text_t* -_NW_ImageCH_Epoc32ContentHandler_GetTitle( NW_HED_ContentHandler_t* contentHandler ); - -extern -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_CreateBoxTree( NW_HED_ContentHandler_t* contentHandler, - NW_LMgr_Box_t** boxTree); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed); - -extern -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -extern -NW_Bool -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_IsVisible( NW_Image_IImageObserver_t* aImageObserver); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGECH_EPOC32CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/include/nw_imagech_ordereddither.h --- a/webengine/wmlengine/src/ImageCH/include/nw_imagech_ordereddither.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef NW_ORDEREDDITHER_H -#define NW_ORDEREDDITHER_H - - -#include "nw_imagech_gifdecoder.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define MAX_COLORS 255 - -extern -TBrowserStatusCode ConvertIntensity(Gif_data_t* Gif_data , NW_Uint32 histogram[]); - -extern -TBrowserStatusCode ConvertToGreyScale(Gif_data_t* Gif_data); - -extern -void DitherPixel(Gif_data_t* Gif_data, NW_Uint16* temp_code, NW_Uint32 pixel); - -extern -TBrowserStatusCode NW_ImageCH_GIF_histogram_singlebit_image(NW_Byte ** buf,Gif_data_t* Gif_data,NW_Uint16* offset); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_GIFDECODER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/include/nw_imagech_wbmpimage.h --- a/webengine/wmlengine/src/ImageCH/include/nw_imagech_wbmpimage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGECH_WBMPIMAGE_H -#define NW_IMAGECH_WBMPIMAGE_H - -#include "nw_image_abstractimage.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ImageCH_WBMP_Class_s NW_ImageCH_WBMP_Class_t; -typedef struct NW_ImageCH_WBMP_s NW_ImageCH_WBMP_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ImageCH_WBMP_ClassPart_s { - void** unused; -} NW_ImageCH_WBMP_ClassPart_t; - -struct NW_ImageCH_WBMP_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_AbstractImage_ClassPart_t NW_Image_AbstractImage; - NW_ImageCH_WBMP_ClassPart_t NW_ImageCH_WBMP; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ImageCH_WBMP_s { - NW_Image_AbstractImage_t super; - - /* member variables */ - void* data; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ImageCH_WBMP_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_ImageCH_WBMP)) - -#define NW_ImageCH_WBMPOf(_object) \ - (NW_Object_Cast ((_object), NW_ImageCH_WBMP)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_ImageCH_WBMP_Class_t NW_ImageCH_WBMP_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_ImageCH_WBMP_t* -NW_ImageCH_WBMP_New (NW_Buffer_t* buffer); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGECH_WBMPIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/include/nw_imagech_wbmpimagei.h --- a/webengine/wmlengine/src/ImageCH/include/nw_imagech_wbmpimagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGECH_WBMPIMAGEI_H -#define NW_IMAGECH_WBMPIMAGEI_H - -#include "nw_image_abstractimagei.h" -#include "nw_imagech_wbmpimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_ImageCH_WBMP_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp); - -extern -void -_NW_ImageCH_WBMP_Destruct (NW_Object_Dynamic_t* dynamicObject); - -extern -TBrowserStatusCode -_NW_ImageCH_WBMP_GetSize (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size); - -extern -TBrowserStatusCode -_NW_ImageCH_WBMP_Draw ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGECH_WBMPIMAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/ImageCH/src/Epoc32ImageContentHandler.cpp --- a/webengine/wmlengine/src/ImageCH/src/Epoc32ImageContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1128 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include // First to avoid NULL redefine warning (no #ifndef NULL). -#include - -#include "nw_lmgr_slavepropertylist.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_wml1x_wml1xdefaultstylesheet.h" -#include "GDIDevicecontext.h" -#include "nw_imagech_epoc32contenthandleri.h" -#include "nwx_http_defs.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_image_virtualimage.h" -#include "nw_system_optionlist.h" -#include "HEDDocumentListener.h" -#include "nw_lmgr_rootbox.h" -#include "nw_image_epoc32simpleimage.h" -#include "Epoc32ImageDecoder.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nwx_logger.h" -#include "nwx_settings.h" -#include "MemoryManager.h" - - -/*required for animations*/ - -/* ------------------------------------------------------------------------- */ - -/* find context box to be deleted */ -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_LMgr_ImageCH_Epoc32ContentHandler_FindContextBox( NW_HED_DocumentNode_t* documentNode, - void* context ) - { - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* contextBox = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - - box = NW_HED_ContentHandlerOf( documentNode )->boxTree; - if(NW_LMgr_BoxVisitor_Initialize( &boxVisitor, box ) != KBrsrSuccess ) - { - return NULL; - } - while( ( box = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, 0 ) ) != NULL ) - { - if( ( NW_Object_IsInstanceOf( box, &NW_LMgr_ContainerBox_Class ) && - !NW_Object_IsInstanceOf( box->propList, &NW_LMgr_SlavePropertyList_Class ) ) - || NW_Object_IsClass( box, &NW_FBox_ImageButtonBox_Class ) - || NW_Object_IsDerivedFrom( box, &NW_LMgr_ImgContainerBox_Class ) ) - { - NW_LMgr_PropertyValueType_t type = NW_CSS_ValueType_Object; - NW_LMgr_PropertyValue_t value; - - // "wml image" (wbmp) element Id is integer type while "html image" Id is object type - if( NW_Object_IsInstanceOf( documentNode, &NW_Wml1x_ContentHandler_Class) ) - { - type = NW_CSS_ValueType_Integer; - } - if( NW_LMgr_Box_GetPropertyValue( box, NW_CSS_Prop_elementId, type, &value ) == KBrsrSuccess ) - { - if( type == NW_CSS_ValueType_Object && value.object == context || - type == NW_CSS_ValueType_Integer && value.integer == NW_INT32_CAST(context) ) - { - // We found a box that has element Id same as context - contextBox = box; - break; - } - } - } - } - return contextBox; - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_ImageCH_Epoc32ContentHandler_HandleValidImageBox( NW_ImageCH_Epoc32ContentHandler_t* thisObj ) - { - NW_ASSERT( thisObj ); - - NW_TRY( status ) - { - NW_HED_DocumentNode_t* documentNode = NW_HED_DocumentNodeOf( thisObj )->parent; - NW_LMgr_Box_t* cannedImageBox; - - // The box tree hasn't been created yet; there is no need to replace the - // missing image icon. - if( NW_HED_ContentHandlerOf( documentNode )->boxTree == NULL ) - { - NW_THROW_STATUS( status, KBrsrFailure ); - } - - // find the context box (placeholder with the canned image) - cannedImageBox = NW_LMgr_ImageCH_Epoc32ContentHandler_FindContextBox( documentNode, thisObj->context ); - - // The "cannedImageBox" is a placeholder for the real image. If it doesn't - // exist, then the image was loaded before we had time to create it so - // there is nothing to replace - if( cannedImageBox != NULL ) - { - // When the cannedImageBox is imagebuttonbox we know we are dealing - // input type=image tag - if( NW_Object_IsClass( cannedImageBox, &NW_FBox_ImageButtonBox_Class ) ) - { - NW_FBox_ImageButtonBox_t* imageButtonBox = NW_FBox_ImageButtonBoxOf( cannedImageBox ); - imageButtonBox->image = thisObj->image; - // set boxtree - NW_HED_ContentHandler_t* contentHandler = NW_HED_ContentHandlerOf( thisObj ); - contentHandler->boxTree = NW_LMgr_BoxOf( imageButtonBox ); - } - else - { - // set boxtree - NW_HED_ContentHandler_t* contentHandler = NW_HED_ContentHandlerOf( thisObj ); - contentHandler->boxTree = NW_LMgr_BoxOf( cannedImageBox ); - } - if( NW_Object_IsInstanceOf( documentNode, &NW_Wml1x_ContentHandler_Class) ) - { - // here comes some WML specific calls - NW_LMgr_Property_t prop; - NW_LMgr_PropertyValue_t id; - id.integer = NW_INT32_CAST( thisObj->context ); - - AddImageProperties( NW_Wml1x_ContentHandlerOf( documentNode ), cannedImageBox, id ); - NW_Wml1x_ImageWithinAnchorDefaultStyle( &prop, cannedImageBox ); - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ImageCH_Epoc32ContentHandler_Class_t NW_ImageCH_Epoc32ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_ImageCH_Epoc32ContentHandler_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ImageCH_Epoc32ContentHandler_t), - /* construct */ _NW_ImageCH_Epoc32ContentHandler_Construct, - /* destruct */ _NW_ImageCH_Epoc32ContentHandler_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_HED_DocumentNode_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_ImageCH_Epoc32ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_ImageCH_Epoc32ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_HED_ContentHandler_Suspend, - /* resume */ _NW_HED_DocumentNode_Resume, - /* allLoadsCompleted */ _NW_HED_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_HED_ContentHandler_LoseFocus, - /* gainFocus */ _NW_HED_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_ImageCH_Epoc32ContentHandler_PartialNextChunk, - /* getTitle */ _NW_ImageCH_Epoc32ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ _NW_ImageCH_Epoc32ContentHandler_CreateBoxTree, - /* handleRequest */ _NW_HED_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_ImageCH_Epoc32ContentHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_ImageCH_Epoc32ContentHandler_InterfaceList[] = { - &_NW_ImageCH_Epoc32_ImageObserver_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Image_IImageObserver_Class_t _NW_ImageCH_Epoc32_ImageObserver_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_IImageObserver_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof( NW_ImageCH_Epoc32ContentHandler_t, NW_Image_IImageObserver ) - }, - { /* NW_Image_IImageObserver */ - /* imageOpened */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpened, - /* sizeChanged */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_SizeChanged, - /* imageOpeningStarted */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpeningStarted, - /* imageDecoded */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDecoded, - /* imageDestroyed */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDestroyed, - /* isVisible */ _NW_ImageCH_Epoc32ContentHandler_IImageObserver_IsVisible - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_Construct( NW_Object_Dynamic_t* dynamicObject, - va_list* argList ) -{ - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - NW_HED_UrlRequest_t* urlRequest; - TBrowserStatusCode status = KBrsrSuccess; - - /* for convenience */ - thisObj = NW_ImageCH_Epoc32ContentHandlerOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_HED_ContentHandler_Construct (dynamicObject, argList); - if (status != KBrsrSuccess) - { - return status; - } - - NW_HED_ContentHandler_SetIsEmbeddable (thisObj, NW_TRUE); - - /* get the loadMode */ - urlRequest = va_arg (*argList, NW_HED_UrlRequest_t*); - NW_ASSERT (urlRequest); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - thisObj->noStore = (NW_Bool)va_arg (*argList, NW_Uint32); - - thisObj->loadMode = urlRequest->loadMode; - - /* copy the request url */ - const NW_Ucs2* rawUrl = NW_HED_UrlRequest_GetRawUrl(urlRequest); - if (rawUrl != NULL) - { - thisObj->requestUrl = NW_Str_Newcpy(rawUrl); - if (thisObj->requestUrl == NULL) - { - status = KBrsrOutOfMemory; - } - } - - thisObj->altText = NULL; - - /* - ** TODO this is the error passed in NW_HED_Image_ContentHandler_NewBrokenImage - ** in the future this may be useful information. It isn't right now... - - thisObj->brokenImageError = va_arg (*argList, TBrowserStatusCode); - */ - - return status; -} - - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_Destruct( NW_Object_Dynamic_t* dynamicObject ) - { - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf (dynamicObject, - &NW_ImageCH_Epoc32ContentHandler_Class)); - - /* for convenience */ - NW_ImageCH_Epoc32ContentHandler_t* thisObj = NW_ImageCH_Epoc32ContentHandlerOf( dynamicObject ); - - // removed observer - if( thisObj->image ) - { - (void) NW_Image_AbstractImage_RemoveImageObserver( thisObj->image, - &thisObj->NW_Image_IImageObserver ); - } - - /* deallocate the buffer */ - NW_Object_Delete( thisObj->image ); - thisObj->image = NULL; - - /* free the title */ - NW_Object_Delete( thisObj->title ); - - /* deallocate the request url */ - NW_Mem_Free( thisObj->requestUrl ); - - /* deallocate the alt text */ - NW_Mem_Free( thisObj->altText ); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - NW_REQUIRED_PARAM( aInitStatus ); - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_ImageCH_Epoc32ContentHandler_Class)); - - // for convenience - thisObj = NW_ImageCH_Epoc32ContentHandlerOf (documentNode); - - // let the image decoder know that no more data comes in. - // no need to inform virtual images as they share the same - // decoder - if( thisObj->image && NW_Object_IsClass( thisObj->image, &NW_Image_Epoc32Simple_Class ) == NW_TRUE ) - { - NW_Image_Epoc32Simple_t* simpleImage = NW_Image_Epoc32SimpleOf( thisObj->image ); - - status = NW_Image_Epoc32Simple_Initialize( simpleImage ); - } - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_GetBoxTree( NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree ) - { - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_ImageCH_Epoc32ContentHandler_Class)); - - NW_HED_ContentHandler_t* contentHandler = NW_HED_ContentHandlerOf( documentNode ); - if( contentHandler->boxTree ) - { - *boxTree = contentHandler->boxTree; - return KBrsrSuccess; - } - return _NW_HED_ContentHandler_GetBoxTree( documentNode, boxTree ); - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_PartialNextChunk(NW_HED_ContentHandler_t* contentHandler, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context) - { - NW_TRY(status) - { - NW_ASSERT(contentHandler != NULL); - NW_ASSERT(response != NULL); - - NW_Image_Epoc32Simple_t* simpleImage; - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - // for convenience - thisObj = NW_ImageCH_Epoc32ContentHandlerOf(contentHandler); - // make sure we have a valid response - NW_THROW_ON_NULL(response, status, KBrsrUnexpectedError); - - // first chunk - if (chunkIndex == 0) - { - // invoke superclass - status = NW_HED_ContentHandler_Class.NW_HED_ContentHandler.partialNextChunk( - contentHandler, chunkIndex, response, context); - // response has been released by the base class call. - response = NULL; - _NW_THROW_ON_ERROR(status); - - // Do we have an image content-type that Symbian won't recognize, - // but the browser supports. - TImageType imageType = GetRecognizedImageType((const char*) - contentHandler->response->contentTypeString); - - NW_GDI_Dimension3D_t size = {0, 0, 0}; - // create bitmap - simpleImage = NW_Image_Epoc32Simple_New(size, NULL, NULL, NW_FALSE, NW_FALSE, - imageType, - contentHandler->response->body->data, - contentHandler->response->body->length, - NW_HED_DocumentNodeOf(thisObj)); - NW_THROW_OOM_ON_NULL(simpleImage, status); - - // The image now has ownership of the raw data. - contentHandler->response->body->length = 0; - contentHandler->response->body->allocatedLength = 0; - delete contentHandler->response->body; - contentHandler->response->body = NULL; - - thisObj->image = NW_Image_AbstractImageOf(simpleImage); - // set observer - status = NW_Image_AbstractImage_SetImageObserver(thisObj->image, - &thisObj->NW_Image_IImageObserver); - NW_THROW_ON(KBrsrOutOfMemory, status); - // ignore observer errors -except OOM - status = KBrsrSuccess; - } - // do not take last chunk as it has no data - else if (chunkIndex != -1) - { - // make sure that the image has been created when the first - // chunk came in - NW_THROW_ON_NULL(thisObj->image, status, KBrsrUnexpectedError); - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj->image, - &NW_Image_Epoc32Simple_Class)); - simpleImage = NW_Image_Epoc32SimpleOf(thisObj->image); - // pass chunk to the decoded - status = NW_Image_Epoc32Simple_PartialNextChunk(NW_Image_AbstractImageOf(simpleImage), - response->body); - // NW_Image_Epoc32Simple_PartialNextChunk takes body ownership - response->body = NULL; - - _NW_THROW_ON_ERROR(status); - } - else - { - // this function musn't be called with the last partial response that has no body. - // Initialize must be called instead - NW_ASSERT(NW_TRUE); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - // free response - UrlLoader_UrlResponseDelete(response); - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -_NW_ImageCH_Epoc32ContentHandler_GetTitle( NW_HED_ContentHandler_t* contentHandler ) -{ - static const NW_Ucs2 storage[] = { 'I', 'm', 'a', 'g', 'e', '\0' }; - - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_ImageCH_Epoc32ContentHandlerOf( contentHandler ); - - /* we create the title just-in-time */ - if( thisObj->title == NULL ) - { - thisObj->title = (NW_Text_t*) NW_Text_UCS2_New ((NW_Ucs2*) storage, 0, 0); - } - return thisObj->title; - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ImageCH_Epoc32ContentHandler_CreateBoxTree( NW_HED_ContentHandler_t* contentHandler, - NW_LMgr_Box_t** boxTree ) -{ - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - NW_Image_AbstractImage_t* image = NULL; - NW_LMgr_Box_t* box = NULL; - NW_Bool brokenImage = NW_FALSE; - - /* parameter assertion block */ - NW_ASSERT( NW_Object_IsInstanceOf (contentHandler, - &NW_HED_ContentHandler_Class ) ); - - /* for convenience */ - thisObj = NW_ImageCH_Epoc32ContentHandlerOf( contentHandler ); - - /* create the image alias from our image data*/ - if( thisObj->image != NULL ) - { - /* This case arises when this Image Content Handler contains the Virtual - Image */ - if( NW_Object_IsInstanceOf( thisObj->image, &NW_Image_Virtual_Class ) ) - { - NW_Image_Virtual_t* virtualImage = NW_Image_VirtualOf( thisObj->image ); - image = (NW_Image_AbstractImage_t*) NW_Image_Virtual_New( virtualImage->image ); - } - else - { - image = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( thisObj->image ); - } - } - /* for some reason the above failed so create a broken image instead */ - if( image == NULL ) - { - NW_HED_DocumentRoot_t *documentRoot; - NW_LMgr_RootBox_t *rootBox; - NW_Image_CannedImages_t* cannedImages; - - /* get the RootBox from through IDocumentListener interface */ - documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (contentHandler); - NW_ASSERT(documentRoot != NULL); - - /* extract the image from our canned images */ - rootBox = NW_HED_DocumentRoot_GetRootBox(documentRoot); - NW_ASSERT(rootBox); - - cannedImages = rootBox->cannedImages; - NW_ASSERT(cannedImages!=NULL); - - image = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage( cannedImages, - NW_Image_Broken ); - brokenImage = NW_TRUE; - } - /* create the image box */ - if( image != NULL ) - { - box = (NW_LMgr_Box_t*) NW_LMgr_AnimatedImageBox_New(0, image, NULL, brokenImage ); - } - - if( box == NULL ) - { - NW_Object_Delete( image ); - } - - /* return the box (which may be NULL )*/ - *boxTree = box; - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlRequest_LoadMode_t -NW_ImageCH_Epoc32ContentHandler_GetLoadMode( NW_ImageCH_Epoc32ContentHandler_t* thisObj ) - { - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - return thisObj->loadMode; - } - - -/* ------------------------------------------------------------------------- * - NW_ImageCH_Epoc32_ImageObserver implementation - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - NW_Bool forceReformat = NW_FALSE; - NW_Bool relayoutNeeded = NW_FALSE; - NW_Bool smallScreenOn; - - //lint -e{550} Symbol not accessed - NW_TRY( status ) - { - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - NW_LOG0(NW_LOG_LEVEL5, "_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpened START"); - // obtain the implementer - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - // get rootbox - docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( rootBox ); - - if( failed == NW_FALSE ) - { - relayoutNeeded = NW_TRUE; - - if( thisObj->context ) - { - status = NW_LMgr_ImageCH_Epoc32ContentHandler_HandleValidImageBox( thisObj ); - // When status is KBrsrFailure, box tree has not been completely created; - // calling MVCView::ReformatBox in the later code will have problems - // and program will revisit here because decoder is SetActive again; - // so no need to execute code following. - // Only set context to NULL when the status is KBrsrSuccess - if (status == KBrsrSuccess) - { - thisObj->context = NULL; - } - else - { - NW_THROW( KBrsrSuccess ); - } - } - - /* - ** See the comment about "iSuppressDupReformats" in NW_MVC_View_ReformatBox. - ** - ** This helps speed up the special case when an image is duplicated many times - ** within the same document. - */ - if( smallScreenOn ) - { - // Start suppressing reformats. - if (suppressDupReformats != NW_Image_AbstractImage_SuppressDupReformats_Stop) - { - rootBox->boxTreeListener->EnableSuppressDupReformats (suppressDupReformats); - } - - // Stop suppressing reformats. - else - { - // This is the last observer. If any of the image observers needed a - // reformat then force the reformat (below) even if this box doesn't require one - forceReformat = rootBox->boxTreeListener->IsForcedReformatNeeded (); - - rootBox->boxTreeListener->EnableSuppressDupReformats (suppressDupReformats); - } - } - - // get the image box - NW_LMgr_Box_t* imageBox = NW_HED_ContentHandlerOf( thisObj )->boxTree; - - if( imageBox ) - { - // first get the visible part of the imagebox and then we can check if the visible - // part is in the view - NW_GDI_Rectangle_t imageRect; - - if( NW_LMgr_Box_GetVisibleBounds( imageBox, &imageRect ) == NW_TRUE ) - { - // we need the rootbox to get the device context which then gives us the - // current view coordinates - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext( rootBox ); - NW_THROW_ON_NULL( deviceContext, status, KBrsrFailure ); - - NW_GDI_Rectangle_t viewRect = deviceContext->ClipRect(); - - // check if the image box is in the view - if( NW_GDI_Rectangle_Cross( &imageRect, &viewRect, NULL ) ) - { - // force decode - status = NW_Image_AbstractImage_ForceImageDecode( abstractImage ); - NW_THROW_ON_ERROR( status ); - } - } - - NW_LMgr_Property_t hProp; - NW_LMgr_Property_t wProp; - // check if the replaced image needs relayout. - // call relayout, unless both height and width attributes are set. - if( ( NW_LMgr_Box_GetProperty( imageBox, NW_CSS_Prop_height, &hProp ) == KBrsrSuccess ) && - ( NW_LMgr_Box_GetProperty( imageBox, NW_CSS_Prop_width, &wProp ) == KBrsrSuccess ) ) - { - NW_GDI_Rectangle_t bounds; - // inner rectangle's width, height corresponds to css properties - (void) NW_LMgr_Box_GetInnerRectangle(imageBox, &bounds); - - if( (hProp.value.integer != bounds.dimension.height) || - (wProp.value.integer != bounds.dimension.width) ) - { - relayoutNeeded = NW_TRUE; - } - else - { - relayoutNeeded = NW_FALSE; - } - } - // when image is ready to be displayed we need to - // 1. create a virtual image in order that we could replace the canned -broken- image - // in the image container box - // 2. replace the canned image - NW_Image_AbstractImage_t* image = NULL; - - if( NW_Object_IsInstanceOf( abstractImage, &NW_Image_Virtual_Class ) ) - { - NW_Image_Virtual_t* virtualImage = NW_Image_VirtualOf( abstractImage ); - image = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( virtualImage->image ); - } - else - { - image = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( abstractImage ); - } - NW_THROW_OOM_ON_NULL( image, status ); - - // replace image - if( NW_Object_IsInstanceOf( imageBox, &NW_LMgr_ImgContainerBox_Class ) == NW_TRUE ) - { - NW_LMgr_ImgContainerBox_ReplaceBrokenImage( imageBox, image ); - } - else if( NW_Object_IsInstanceOf( imageBox, &NW_FBox_ImageButtonBox_Class ) == NW_TRUE ) - { - NW_LMgr_ImageButtonBox_ReplaceBrokenImage( imageBox, image ); - } - else - { - NW_THROW_UNEXPECTED( status ); - } - - // handle relayout needs - if( ( relayoutNeeded == NW_TRUE ) || ( forceReformat == NW_TRUE ) ) - { - if( smallScreenOn ) - { - // in vertical layout mode we just want to format the flow - // containing the image - (void) rootBox->boxTreeListener->ReformatBox(imageBox); - - if ((suppressDupReformats == NW_Image_AbstractImage_SuppressDupReformats_Start) || - (suppressDupReformats == NW_Image_AbstractImage_SuppressDupReformats_Continue)) - { - rootBox->boxTreeListener->ForcedReformatNeeded (); - } - } - else - { - NW_Image_IImageObserver_SizeChanged( imageObserver, abstractImage ); - } - } - } - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - // open ends. remove it from the queue - NW_LMgr_RootBox_ImageOpened( rootBox ); - - // Now that the image is opened and its box has the updated size info - // recalculate the RootBox's extents, this also causes the scrollbar values - // to be updated. - if( ( relayoutNeeded == NW_TRUE ) || ( forceReformat == NW_TRUE ) ) - { - NW_LMgr_RootBox_ExtendsCalculationNeeded ( rootBox ); - } - - NW_LOG0(NW_LOG_LEVEL5, "_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpened ENDS"); - return; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_REQUIRED_PARAM( abstractImage ); - - NW_TRY( status ) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( imageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - // obtain the implementer - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - // relayout on the entire tree - // first get rootBox and then we can initialize the - // relayout event on that. - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - // update image container size - NW_LMgr_Box_t* box; - - status = NW_HED_DocumentNode_GetBoxTree( NW_HED_DocumentNodeOf( thisObj ), &box ); - NW_THROW_ON_ERROR( status ); - - // table performance: to prevent additional relayouts on the entire page (max pass of the automatic - // table algorithm), images update parent table size by setting a flag on the table. the actual resize - // happens when a relayout event is generated. - while( box->parent != NULL ) - { - // find the parent table. - if( NW_Object_IsInstanceOf( box->parent, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - NW_LMgr_StaticTableBox_TableSizeChanged( NW_LMgr_StaticTableBoxOf( box->parent ) ); - break; - } - box = NW_LMgr_BoxOf( box->parent ); - } - // and send layout event - NW_LMgr_RootBox_SetNeedsRelayout( rootBox ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - NW_HED_DocumentRoot_t* documentRoot; - NW_LMgr_RootBox_t* rootBox; - - NW_REQUIRED_PARAM( abstractImage ); - - /* parameter assertion block */ - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( imageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - { - /* obtain the implementer */ - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - // get the RootBox through IDocumentListener interface - documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_ASSERT( documentRoot != NULL ); - - rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - NW_ASSERT( rootBox != NULL ); - - NW_LMgr_RootBox_ImageOpeningStarted( rootBox ); - } - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed) - { - NW_REQUIRED_PARAM( abstractImage ); - - //lint -e{550} Symbol not accessed - NW_TRY( status ) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( imageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - NW_LOG0(NW_LOG_LEVEL5, "_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDecoded START"); - // obtain the implementer - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - NW_LMgr_Box_t* box = NW_HED_ContentHandlerOf( thisObj )->boxTree; - NW_THROW_ON_NULL( box, status, KBrsrFailure ); - - // if the decode failed, we want to replace the unencoded image with the broken image - if (failed) - { - NW_Image_AbstractImage_t* cannedImage = NULL; - NW_Image_AbstractImage_t* image = NULL; - - NW_ASSERT( rootBox->cannedImages != NULL ); - - cannedImage = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage( rootBox->cannedImages, NW_Image_Missing ); - NW_THROW_OOM_ON_NULL( cannedImage, status ); - - image = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( cannedImage ); - NW_THROW_OOM_ON_NULL( image, status ); - - // replace image - if( NW_Object_IsInstanceOf( box, &NW_LMgr_ImgContainerBox_Class ) == NW_TRUE ) - { - NW_LMgr_ImgContainerBox_ReplaceBrokenImage( box, image ); - NW_LMgr_ImgContainerBox_t* imageBox = NW_LMgr_ImgContainerBoxOf(box); - imageBox->isBroken = NW_TRUE; - } - else if( NW_Object_IsInstanceOf( box, &NW_FBox_ImageButtonBox_Class ) == NW_TRUE ) - { - NW_LMgr_ImageButtonBox_ReplaceBrokenImage( box, image); - } - else - { - NW_THROW_UNEXPECTED( status ); - } - } - if( NW_Object_IsInstanceOf( box, &NW_LMgr_AnimatedImageBox_Class ) == NW_TRUE || - NW_Object_IsInstanceOf( box, &NW_FBox_ImageButtonBox_Class ) == NW_TRUE ) - { - NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t*) - NW_Object_QuerySecondary (box, &NW_LMgr_AnimatedImageAggregate_Class); - status = NW_LMgr_AnimatedImageAggregate_StartTimer (AnimatedImageAggregate); - } - else - { - NW_THROW_UNEXPECTED( status ); - } - // refresh the image box - NW_LMgr_Box_Refresh( box ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_LOG0(NW_LOG_LEVEL5, "_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDecoded END"); - return; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - /* parameter assertion block */ - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( imageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - /* obtain the implementer */ - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - thisObj->image = NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_ImageCH_Epoc32ContentHandler_IImageObserver_IsVisible( NW_Image_IImageObserver_t* aImageObserver) - { - NW_ImageCH_Epoc32ContentHandler_t* thisObj; - - NW_ASSERT( aImageObserver != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( aImageObserver, - &_NW_ImageCH_Epoc32_ImageObserver_Class )); - - thisObj = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( aImageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_ImageCH_Epoc32ContentHandler_Class ) ); - - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode(NW_HED_DocumentNodeOf(thisObj)); - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(docRoot); - - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - const NW_GDI_Point2D_t* origin = deviceContext->Origin(); - const NW_GDI_Dimension2D_t* displaySize = &(deviceContext->DisplayBounds()->dimension); - - NW_HED_ContentHandler_t* contentHandler = NW_HED_ContentHandlerOf(thisObj); - NW_GDI_Rectangle_t bounds = NW_LMgr_Box_GetDisplayBounds( contentHandler->boxTree ); - - NW_Bool isVisible = NW_TRUE; - - // checking out of view only along the y direction - if ( ((origin->y + displaySize->height) < bounds.point.y) || - (origin->y > (bounds.point.y + bounds.dimension.height)) ) - { - isVisible = NW_FALSE; - } - return isVisible; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/************************************************************************ - - Function: NW_ImageCH_Epoc32ContentHandler_GetVirtualHandler - - Description: This method creates a new ImageContentHandler which is basically - a clone of the origins (imageCH) ImageContentHandler. So it makes - a virtual copy of the actual Image and sets it on the new ImageCH - - Parameters: parent - The parent ContentHandler (XHTML/WML) of the new ImageCH, - urlRequest - imageCH - the Image Content Handler to be cloned - - Return Value: The Content Handler containing the virtual image - -**************************************************************************/ - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_ImageCH_Epoc32ContentHandler_GetVirtualHandler( NW_HED_DocumentNode_t* parent, - NW_HED_UrlRequest_t* urlRequest, - NW_ImageCH_Epoc32ContentHandler_t* imageCH, - NW_ImageCH_Epoc32ContentHandler_t** newVirtualImageCH ) - { - NW_ImageCH_Epoc32ContentHandler_t* virtualImageCH = NULL; - - NW_TRY( status ) - { - NW_ASSERT( NW_HED_ContentHandlerOf( imageCH )->response != NULL ); - - virtualImageCH = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_New( - &NW_ImageCH_Epoc32ContentHandler_Class, parent, urlRequest, NW_FALSE, imageCH ); - // OOM check - NW_THROW_OOM_ON_NULL( virtualImageCH, status ); - - // if the bitmap exists then take it as a virtual image - if( imageCH->image ) - { - virtualImageCH->image = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( imageCH->image ); - // OOM check - NW_THROW_OOM_ON_NULL( virtualImageCH->image, status ); - - // add it to the top level content handler - status = NW_Image_Epoc32Simple_AddDocNode(NW_Image_Epoc32SimpleOf(imageCH->image), - NW_HED_DocumentNodeOf(virtualImageCH)); - _NW_THROW_ON_ERROR( status ); - - // observ the virtual image - status = NW_Image_AbstractImage_SetImageObserver( NW_Image_AbstractImageOf( virtualImageCH->image ), - &NW_ImageCH_Epoc32ContentHandlerOf( virtualImageCH )->NW_Image_IImageObserver ); - NW_THROW_ON( KBrsrOutOfMemory, status ); - // ignore observer errors -except OOM - status = KBrsrSuccess; - } - } - NW_CATCH( status ) - { - // destroy the newly created virtual image handler - NW_Object_Delete( virtualImageCH ); - virtualImageCH = NULL; - } - NW_FINALLY - { - *newVirtualImageCH = virtualImageCH; - return status; - } - NW_END_TRY - } - -/* -------------------------------------------------------------------------*/ -void -NW_ImageCH_Epoc32ContentHandler_ForceImageOpen( NW_ImageCH_Epoc32ContentHandler_t* imageCH ) - { - /* parameter assertion block */ - NW_ASSERT( imageCH != NULL ); - NW_ASSERT( imageCH->image != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf( imageCH->image, - &NW_Image_Epoc32Simple_Class )); - - NW_Image_Epoc32Simple_t* simpleImage = NW_Image_Epoc32SimpleOf( imageCH->image ); - CEpoc32ImageDecoder* decoder = STATIC_CAST( CEpoc32ImageDecoder*, simpleImage->decoder ); - - TInt error = KErrNone; - TRAP(error, decoder->Open()) - } - -/* -------------------------------------------------------------------------*/ -NW_HED_ContentHandler_t* -NW_ImageCH_Epoc32ContentHandler_NewBrokenImage (NW_HED_DocumentNode_t* parent, - NW_HED_UrlRequest_t* urlRequest, - TBrowserStatusCode error) -{ - return (NW_HED_ContentHandler_t*) NW_Object_New (&NW_ImageCH_Epoc32ContentHandler_Class, - parent, urlRequest, error); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/EmbeddedDocExitObserver.h --- a/webengine/wmlengine/src/MVC/include/EmbeddedDocExitObserver.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Observer for exit notification from Document Handler -* -*/ - -#ifndef EMBEDDED_DOC_EXIT_OBSERVER_H -#define EMBEDDED_DOC_EXIT_OBSERVER_H - -#include - -class RFs; - -NONSHARABLE_CLASS(CEmbeddedDocExitObserver): public MApaEmbeddedDocObserver - { - public: - static CEmbeddedDocExitObserver* NewL(RFs& aRfs); - - void NotifyExit(TExitMode aMode); - - void SetTempFile(TFileName aFileName); - - private: - CEmbeddedDocExitObserver(RFs& aRfs); - CEmbeddedDocExitObserver() {}; - TFileName iFileName; - RFs iRfs; - }; - - -#endif /* EMBEDDED_DOC_EXIT_OBSERVER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/Epoc32DialogProvider.h --- a/webengine/wmlengine/src/MVC/include/Epoc32DialogProvider.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef __EPOC32DIALOGPROVIDER_H -#define __EPOC32DIALOGPROVIDER_H - -struct TSelectOptionData - { - TText* iText; - TBool iIsSelected; - TBool iIsOptGroup; - TBool iHasOnPick; - }; - -typedef enum -{ - ENullButton, - EBackButton, - ESelectButton, - EOkButton, - ECancelButton, - ESignButton, - EEnterButton, - EOptionsButton -} TGenDlgButtonType; - -class MEpoc32DialogProvider -{ -public: - /* - Callback - we should display an error message - */ - virtual void NotifyErrorL(const TInt aErrCode)=0; - - /* - Callback - we should display an HTTP error message for specified URI - */ - virtual void NotifyHttpErrorL(const TInt aErrCode, const TDesC& aUri)=0; - - /* - Callback - display a alert dialog to the user - */ - virtual void WmlScriptDlgAlertL(const TDesC& aMessage)=0; - - /* - Callback - display a confirm dialog to the user - */ - virtual TBool WmlScriptDlgConfirmL(const TDesC& aMessage, const TDesC& aYesMessage, const TDesC& aNoMessage)=0; - - /* - Callback - display a prompt dialog to the user - */ - virtual void WmlScriptDlgPromptL( const TDesC& aMessage, const TDesC& aDefaultInput, HBufC*& aReturnedInput)=0; - - virtual TBool DialogSelectOptionL( const TDesC& aTitle, - const TBool aMultiple, - CArrayFix& aOptions )=0; - - virtual TInt GetUserAuthenticationDataL( const TDesC& aUrl, - const TDesC& aRealm, - const TDesC& aDefaultUserName, - HBufC*& aReturnedUserName, - HBufC*& aReturnedPasswd, - TBool& aCancelled, - TBool aBasicAuthentication = EFalse) = 0; - - virtual TBool GetUserRedirectionDataL(const TDesC& aOriginalUrl, const TDesC& aRedirectedUrl) = 0; - - // KM Generic dialog API - virtual TGenDlgButtonType GenDialogPromptL(const TDesC& aTitle, const TDesC& aPrompt, const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button)=0; - - virtual TGenDlgButtonType GenDialogInputPromptL(const TDesC& aTitle, const TDesC& aPrompt, const TBool aHideText, const TBool aNumbersOnly, - const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button, const TInt aMaxInputLength, - TDes* aDefaultInputText) = 0; - - virtual TGenDlgButtonType GenDialogListSelectL(const TDesC& aTitle, const TDesC& aPrompt, const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button, CArrayFix& aItemsArray, TInt& aSelectedItem)=0; - - virtual TBool ShowObjectDialogL() = 0; -}; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/MVCScroll.h --- a/webengine/wmlengine/src/MVC/include/MVCScroll.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Object for containing scrolling specific methods. -* -*/ - - -#ifndef __MVCSCROLL_H -#define __MVCSCROLL_H - -// INCLUDES -#include -#include "MVCView.h" -#include "nw_evt_controlkeyevent.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -NONSHARABLE_CLASS(CMVCScroll) : public CBase -{ -public: - /** - * Two-phased constructor. - * @param view A pointer to the view object associated with this scroll object - * @return CMVCScroll* - */ - static CMVCScroll* NewL(CView* view); - - /** - * Destructor. - */ - ~CMVCScroll(); - - /** - * Navigates downward through the page - * @since 2.X - * @param isNewPage A flag passed to SetCurrentBox - * @param noBoxVisible A flag used for deciding whether or not to call ForceCurrentBox - * @return TBool - */ - TBool TabForward(TBool isNewPage, - TBool* noBoxVisible); - - /** - * Navigates upward through the page - * @since 2.X - * @param noBoxVisible A flag used for deciding whether or not to call ForceCurrentBox - * @return TBool - */ - TBool TabBackward(TBool* noBoxVisible); - - /** - * Navigates left horizontally through the page - * @since 2.X - * @param noBoxVisible A flag used for deciding whether or not to call ForceCurrentBox - * @return TBool - */ - TBool TabLeft(TBool* noBoxVisible); - - /** - * Navigates right horizontally through the page - * @since 2.X - * @param noBoxVisible A flag used for deciding whether or not to call ForceCurrentBox - * @return TBool - */ - TBool TabRight(TBool* noBoxVisible); - - /** - * Returns a NW_LMgr_Box_t pointer to the the previous box in the index - * @since 2.X - * @param oldBox A pointer to the (current)box used to calculate the previous box - * @return NW_LMgr_Box_t* - */ - NW_LMgr_Box_t* GetPreviousTabIndex(const NW_LMgr_Box_t* oldBox, - NW_Int32* currentTabIndex); - - /** - * Returns a NW_LMgr_Box_t pointer to the the next box in the index - * @since 2.X - * @param oldBox A pointer to the (current)box used to calculate the previous box - * @return NW_LMgr_Box_t* - */ - NW_LMgr_Box_t* GetNextTabIndex(const NW_LMgr_Box_t* oldBox, - NW_Int32* currentTabIndex); - - /** - * Processes the control key for normal layout - * @since 2.X - * @param key The control key that was pressed, up, down, left, right - * @return TBool - */ - TBool ProcessControlKey(NW_Evt_ControlKeyType_t key); - - /** - * Processes the control key for vertical layout - * @since 2.X - * @param key The control key that was pressed, up, down, left, right - * @return TBool - */ - TBool ProcessControlKeyVL(NW_Evt_ControlKeyType_t key); - - /** - * Method used to calculate the amount to scroll the page up or down - * @since 2.X - * @param void - * @return NW_Uint16 - */ - NW_Uint16 GetScrollAmount(void); - - /** - * Method used in vertical layout to page up or down by one full - * page size minus 2 lines - */ - TBool ScrollPage(NW_Evt_ControlKeyType_t key); - - /** - * Method returns the first sibling box whose width and height are not zero - */ - NW_LMgr_Box_t* CMVCScroll::GetFirstSiblingBox (NW_LMgr_Box_t* box); - -private: // Private methods and member variables - /** - * C++ default constructor. - */ - CMVCScroll(CView* view); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Method used in vertical layout to tab to the appropriate link - */ - TBool ScrollLink(NW_Evt_ControlKeyType_t key, - TBool* noBoxVisible); - - /** - * Method used to calculate the next box to tab to - */ - void GetBoxRange(NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2); - - /** - * Method to set focus to the current box - */ - TBrowserStatusCode SetCurrentBox(NW_LMgr_Box_t* box, - NW_Evt_TabEvent_t* tabEvent, - TBool isNewPage, - TBool* noBoxVisible); - /** - * Method returns true if the box is visible in both rectangles - */ - TBool IsBoxVisibleInEither(const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds1, - NW_GDI_Rectangle_t* bounds2); - /** - * Method used to get range of the box, not considering sibling or master box's range - */ - void GetBoxRangeRestrict (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ); - /** - * Method used to get master range of the box - */ - void GetMasterBoxRange (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ); - - /** - * Method used to get the first sibling box range - */ - void GetFirstSiblingBoxRange (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ); - /** - * Method used to get the size of the visible box - */ - NW_Bool HowBigIsBoxVisible ( const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds, - NW_GDI_Rectangle_t* overlap ); - /** - * Method used to get the scroll down bounds - */ - NW_Bool GetScrollDownBounds ( CView* view, - NW_GDI_Rectangle_t* scrolledBounds ); - /** - * Method used to get the scroll up bounds - */ - NW_Bool GetScrollUpBounds ( CView* view, - NW_GDI_Rectangle_t* scrolledBounds ); - /** - * Method used to get the tab index - */ - NW_LMgr_Box_t* GetTabIndex( const NW_LMgr_Box_t* oldBox, - NW_Bool nextIndex, - NW_Int32* currentTabIndex ); - /** - * Method used to get the next event listener - */ - NW_LMgr_Box_t* GetNextEventListener (NW_LMgr_BoxVisitor_t* boxVisitor); - - /** - * Method used to find the first visible box on a page - */ - void GetFirstVisible(NW_LMgr_Box_t* box, - NW_LMgr_Box_t** firstVisible); - /** - * Method used to calculate the amount to page up or down - */ - NW_Uint16 GetPagingAmount(void); - - // Pointer to the scroll objects associated view object - CView* iView; -}; - -#endif //__MVCSCROLL_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/MVCShell.h --- a/webengine/wmlengine/src/MVC/include/MVCShell.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,554 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef __MVCSHELL_H -#define __MVCSHELL_H - - -#include -#include "BrsrStatusCodes.h" -#include "BrsrTypes.h" -#include -#include -#include -#include -#include -#include -#include - -#include "BrCtlDialogsProvider.h" - -#include "HEDDocumentListener.h" -#include "httploader_mlinkresolvercallbacks.h" -#include "MSGMessageListener.h" -#include "MVCViewListener.h" -#include "nw_hed_appservices.h" -#include "nw_errnotify.h" -#include "nw_scrproxy.h" -#include "nw_wae.h" -#include "nwx_defs.h" -#include "nwx_status.h" -#include "urlloader_urlresponse.h" -#include "EmbeddedDocExitObserver.h" -//R -#include "HistoryStack.h" -//#include "webkitview.h" -#include "WmlControl.h" - - -#ifdef __SERIES60_WIM -#include "WimUi.h" -#endif __SERIES60_WIM - - -enum TUrlLoadState - { - // We are now loading the URL - EUrlLoadingProgressing, - - // The loading progress has finished because of successful - // finish, user cancel or some other reason. - EUrlLoadingStopped, - - // Reset iDoNotRestoreContentFlag in the BrowserUI - EResetDoNotRestoreContentFlag - }; - -class CDataLoadInfo; - -const TInt KPanicKmShellPanicBase = -10000; -const TInt KPanicKmShellSingletonAlreadyCreated = KPanicKmShellPanicBase - 1; -const TInt KPanicKmShellViewPtrIsNotSet = KPanicKmShellPanicBase - 2; - -class CView; -class CCnvCharacterSetConverter; -class CContentLoader; -class CBrCtl; - -NONSHARABLE_CLASS(CShell): public CBase, public MHttpLoader_LinkResolverCallbacks, - public MViewListener, public MHEDDocumentListener, public MMessageListener -{ - public: // Epoc constructor and destructor - - static CShell* NewL (CView* aEpoc32View, CBrCtl* aBrCtl, MWmlInterface* aWKWmlInterface, CWmlControl* aWmlControl); - - ~CShell(); - - - public: // Public exported methods - - /** - * - * Starts loading of content from given URL. - * - * @param URL to be loaded - * @return KErrNone if successfull, KErrGeneral on error - */ - TInt Load(const TDesC& aUrl, TInt aApId, NW_Cache_Mode_t cacheMode=NW_CACHE_NORMAL); - - TInt CancelAll(); - - TInt FreeConnection(); - TInt HistoryLoad(THistoryStackDirection aDirection); - - /** - * - * Process the Back event - * Now that we have multiple views (normal view and image map view), the processing - * of the back event may be different depending on which view we are in. If we - * are in the image map view, we will want to switch back to the normal view if the - * back button is selected. If we are in normal view, we will want to call HistoryLoad - * and load the previous page. - * - * @param None - * @return KErrNone if successfull, KErrUnknown on error - */ - TInt ProcessBack(); - - /** - * - * Switch to image map view - * Now that we have multiple views (normal view and image map view).If we select - * an image map we want to switch to image map view - * - * @param None - * @return KErrNone if successfull, KErrUnknown on error - */ - TInt SwitchToImgMapView(); - - /** - * - * Switch from image map view - * Now that we have multiple views (normal view and image map view).If we - * are in the image map view, we will want to switch back to the normal view. - * - * @param None - * @return KErrNone if successfull, KErrUnknown on error - */ - TInt SwitchFromImgMapViewIfNeeded(); - - void SetView(CView* aEpocView); // Does not take the ownership! - - TInt HandleDo( TUint32 aElemId ); - - /** - * - * Get a history list - * - * @param aUrls Descriptor array to append - * @return Error code - */ - TInt GetHistoryList (CArrayFix& aHistoryList); - - /** - * - * Gives current position in the history stack - * - * @return THistoryStackPosition enumeration - */ - TWmlEngineDefs::THistoryStackPosition HistoryStackPosition(); - - /** - * Loads page from history by given index - * - * @param history list - * @return KErrNone if found, otherwise KErrNotFound - */ - TInt LoadHistoryEntry( CArrayFix& aHistoryList ); - - /** - * - * Gets the current URL as HBufC*, Leaves on error - * Returns at least zero-length HBufC on success - * - * @return HBufC* Current URL - */ - - HBufC* GetCurrentUrlInHBufCL() const; - - /** - * - * Gets the current title of the content as HBufC*, leaves on error - * Returns at least zero-length HBufC on success - * - * @return HBufC* Current WML deck / XHTML Page element contents - */ - HBufC* GetCurrentTitleInHBufCL(TBool& aStripUrl) const; - - TUint16 SaveToFileL(TDesC& aFileName) const; - - /** - * - * Gets the WML of the domtree - * Returns pointer to HBufC - * - * @return HBufC* extracted WML MarkUp - */ - - HBufC8* GetPageAsWMLMarkUp(); - - - /** - * - * Gets the text of the domtree - * Returns pointer to HBufC - * - * @return HBufC* extracted text - */ - HBufC* GetPageAsTextL(); - - - /** - * - * Gets the charset from the domtree - * Returns pointer to the charset - * - * @return charset - */ - const NW_Uint8* GetCharsetFromResponse(); - - /** - * - * - */ - void ShowImagesL() const; - - /** - *it must be called when the browser view loses focus - */ - void LoseFocus(); - - /** - *it must be called when the browser view gains focus - */ - void GainFocus(); - - /** - *provide for browser to reset the history list, when close softkey is selected. - */ - void ClearHistoryList(); - - // Called when selected character set changes - void CharacterSetChangedL(TUint aSelectedCharacterSet); - - void* GetCertInfo(); - - public: // public not exported methods - - - /** - * From MHttpLoader_LinkResolverCallbacks Called to obtain the current URL. - * @since 2.8 - * @param - * @return The current URL - */ - HBufC* CurrentUrlLC(); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to obtain a pointer to the Link Resolver - * @since 2.8 - * @return The Browser Control's Link Resolver - */ - MBrCtlLinkResolver* LinkResolver(); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to check if the Host Application should be called to resolve the URL - * @since 2.8 - * @return ETrue if the Host Application will resolve the URL, EFalse otherwise - */ - TBool ShouldResolveUrl(TBool aIsTopLevel, NW_Uint8 aReason); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to call LoadUrlL - * @since 3.0 - * @return void - */ - void LoadLinkUrl(const TDesC& aUrl, void* aHeaders ); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to call PostUrlL - * @since 3.0 - * @return void - */ - void PostLinkUrl(TDesC& aUrl, TDesC8& aPostData, TDesC& aContentType); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to load Embeded content - * @since 3.1 - * @return void - */ - CWmlResourceLoadListener* LoadEmbededUrl( const TDesC& aUrl, void *aLoadContext, - void* aPartialLoadCallback, TUint16 aTransId ); - - /** - * From MHttpLoader_LinkResolverCallbacks Called to set the OEB event - * @since 3.1 - * @return void - */ - void SetOnEnterBackwordReason(); - - /** - * From MHttpLoader_LinkResolverCallbacks Convert a charset from string to IANA encoding - * @since 2.8 - * @return IANA encoding of the charset - */ - TUint16 ConvertCharset(const TDesC8& aCharset); - - TUint ConvertFromForeignCharSetL(void* response); - TUint ConvertFromForeignChunkL( NW_Uint32 foreignEncoding, void* inBuf, TInt * numUnconvertible, TInt* indexFirstUnconvertible, void** outBuf); - static TBrowserStatusCode ConvertToForeignCharSet(void* ucsText); - TUint ConvertToForeignCharSetL(void* text); - NW_Text_t* ConvertToValidUrl (NW_Text_t* url, TBrowserStatusCode* status); - /** - * From MHttpLoader_ToUiCallbacks Called when the user need to be notified with an error - * @since 2.0 - * @return void - */ - void CoverageEvent (TInt aError); - CBrCtl* BrCtl() {return iBrCtl;} - /** - * From MHttpLoader_ToUiCallbacks Called after disconnect is complete. - * @since 2.0 - * @param - * @return void - */ - void Disconnect_Resp() {}; - - TBrowserStatusCode DocumentChanged (NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ); - - TBrowserStatusCode DocumentChangedPartial (NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ); - - NW_Uint32 GetCharsetUid(NW_Uint32 internalEncoding); - NW_Uint32 GetCharsetUid2(NW_Uint32 ianaEncoding); - NW_Uint32 GetUidFromCharset( NW_Uint8* charset, NW_Uint32 charsetLength ); - NW_Text_t* GetCurrentUrl (); - NW_Text_t* GetCurrentUrlL (); - const NW_Text_t* GetCurrentTitle (); - inline NW_HED_DocumentRoot_t* GetDocumentRoot() { return iDocumentRoot; }; - NW_LMgr_RootBox_t* GetRootBox (); - TBrowserStatusCode GetUseNumberBuf (NW_ADT_DynamicVector_t* dynamicVector, void** ptr ); - TBrowserStatusCode GetUseNumberContent (NW_ADT_DynamicVector_t *dynamicVector); - inline CView* GetView() { return iView; }; - TBool HandleDownloadL(RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray); - void HandleError (TBrowserStatusCode status); - void FormattingComplete (); - void HandleMessage (NW_Msg_Message_t* message); - TBrowserStatusCode IsActive (NW_HED_DocumentRoot_t* documentRoot, NW_Bool state); - NW_Bool LoadEnd (NW_HED_DocumentRoot_t* documentRoot, NW_Int16 errorClass, NW_WaeError_t error); - TBrowserStatusCode LoadProgressOn (NW_Uint16 transactionId); - TBrowserStatusCode LoadProgressOff (NW_Uint16 transactionId); - void NewDocument (NW_HED_DocumentRoot_t* documentRoot, NW_HED_UrlRequest_t* urlRequest, NW_Bool aDestroyBoxTree); - void DestroyPreviousDocument(); - void RestoreDocument (); - void NotifyProgress (TBrCtlDefs::TBrCtlLoadEvent aEvent, TUint32 aSize, TUint16 aTransactionId); - MBrCtlSpecialLoadObserver* GetLoadObserver (); - static TBrowserStatusCode NW_Http_ConnNeeded (TInt* aConnectionPtr, TInt* aSockSvrHandle, TBool* aNewConn, TApBearerType* aBearerType); -// static TBrowserStatusCode NW_UI_AboutToLoadPageL( NW_Uint32 aNoteType ); - static TBrowserStatusCode NW_UI_ConvertFromForeignCharSet (void* ctx, NW_Url_Resp_t* response); - static TBrowserStatusCode NW_UI_ConvertToForeignCharSet (void* ctx, NW_String_t* text); - static TBrowserStatusCode NW_UI_ConvertFromForeignChunk ( void* ctx, NW_Uint32 foreignEncoding, void* inBuf, TInt * numUnconvertible, TInt* indexFirstUnconvertible, void** outBuf); - static void NW_UI_DialogListSelect (NW_Dlg_ListSelect_t* data, void* callbackCtx, NW_Dlg_ListSelectCB_t *callback ); - static void NW_UI_DialogPrompt (NW_Dlg_Prompt_t* data, void* callbackCtx, NW_Dlg_PromptCB_t *callback); - static void NW_UI_DialogInputPrompt (NW_Dlg_InputPrompt_t *data, void* callbackCtx, NW_Dlg_InputPromptCB_t *callback ); - static void NW_UI_DialogSelectOption (NW_Dlg_SelectData_t *data, void* callbackCtx, NW_Dlg_SelectCB_t* callback ); - /* Return localized string for 'back', 'reset', 'select', 'submit' */ - static NW_Ucs2* NW_UI_GetLocalizedString (NW_Uint32 type); - void NW_UI_GetUserAuthenticationDataL(const NW_Ucs2* aUri, const NW_Ucs2* aUsername, const NW_Ucs2* aRealm, - NW_Ucs2** aRetUsername, NW_Ucs2** aRetPassword, - TBool aBasicAuthentication = EFalse); - static void NW_UI_GetUserRedirectionData (void* wae, const NW_Ucs2* originalUrl, const NW_Ucs2* redirectedUrl, - void *callbackCtx, NW_Wae_UserRedirectionCB_t *callback); - static TBrowserStatusCode NW_UI_HttpError (void *userAgent, const NW_WaeHttpStatus_t httpError, - const NW_Ucs2 *uri, void *callback_ctx, NW_ErrorCB_t *callback); - /** - * - * Query if we are in image map view - * We have multiple views (image map view or normal view) - * - * @param None - * @return KErrNone if successfull, KErrUnknown on error - */ - static TBool NW_UI_IsImageMapView(); - static void NW_UI_NotifyCoverageEvent (TInt aError); - static TBrowserStatusCode NW_UI_NotifyError (void *userAgent, const TBrowserStatusCode status, void *callback_ctx, NW_ErrorCB_t *callback); - // Display the object info dialog box - static NW_Bool NW_UI_ShowObjectDialog(); - static void NW_UI_SoftKey_UpdateSoftKeys (NW_SoftKeyText_t softKeyText); - static TBrowserStatusCode NW_UI_StartContentLoad (void *userAgent, const NW_Ucs2* urlName); - static TBrowserStatusCode NW_UI_StopContentLoad (void *userAgent, const NW_Ucs2* urlName); - static TInt NW_UI_SwitchFromImgMapViewIfNeeded(); - static TInt NW_UI_SwitchToImgMapView(); - static TBrowserStatusCode NW_UI_UrlLoadProgressOn (void *wae, NW_Uint16 transactionId); - static void NW_UI_ViewImage (void* rawData, NW_Int32 length, NW_Bool isWbmp); - /* display a alert dialog to the user */ - static void NW_UI_WmlScriptDlgAlert (void* wae, const NW_Ucs2* message, void* callback_ctx, NW_ScrProxy_DlgAlertCB_t* callback ); - /* display a confirm dialog to the user */ - static void NW_UI_WmlScriptDlgConfirm (void *wae, const NW_Ucs2 *message, const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, void *callback_ctx, NW_Dlg_ConfirmCB_t *callback ); - /* display a prompt dialog to the user */ - static void NW_UI_WmlScriptDlgPrompt (void *wae, const NW_Ucs2 *message, const NW_Ucs2 *defaultInput, - void *callback_ctx, NW_ScrProxy_DlgPromptCB_t *callback ); - void OptionListInit(); // just forwards call to CEpoc32View - void OptionListAddItem( const TText* aText, const TUint32 aElemID, const TInt aElType ); // just forwards call to CEpoc32View - NW_Bool ReportError (NW_HED_DocumentRoot_t* documentRoot, NW_Int16 errorClass, NW_WaeError_t error, - ReportErrorCallback* callback); - TBrowserStatusCode SendRedrawMsg (NW_Bool drawNow); - TBrowserStatusCode SendRelayoutMsg (NW_Bool createTabList); - TUint SelectedCharacterSet() const {return iSelectedCharacterSet;} - TBrowserStatusCode SetAnchorName (NW_Text_t* anchorName); - void SetFileOpenedByDocHandler( TBool aFileOpenedByDocHandler ); - TBrowserStatusCode ShowNamedBox (NW_LMgr_Box_t* boxTree, const NW_Text_t* targetName); - /** - * From MHttpLoader_ToUiCallbacks Called after shutdown is complete. - * @since 2.0 - * @param - * @return void - */ - void Shutdown_Resp() {}; - TBrowserStatusCode SwitchLayout (NW_Bool aVerticalLayout, NW_Bool aReformatBoxTree); - void UpdateSoftKeys(); - void UpdateTitle(); - void UrlLoadStateChanged (TBrCtlDefs::TBrCtlLoadEvent aEvent); - - // Following functions are for ECMAScript support - static void WindowAlert (void* browserApp_Ctx, NW_Ucs2* msg); - static NW_Bool WindowConfirm (void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* yesMsg, NW_Ucs2* noMsg); - static NW_Ucs2* WindowPrompt (void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* defaultVal); - - static NW_Ucs2* WindowPromptL (void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* defaultVal); - static void WindowOpen(void* browserApp_Ctx, NW_Ucs2* url, NW_Ucs2* target, NW_Uint32 reason); - - /** - * Request the host applicaion to open the URL in a new window - * @since 3.0 - * @param aUrl The Url of the request to be done in the new window - * @param aTargetName The name of the new window - * @param aReason The reason for opening the new window - * @param aMethod The method to be used for fetching the supplied url - * @param aContentType If the method is POST, this is the content type of the data to be posted - * @param aPostData If the method is POST, this is the data to be posted - * @param aBoundary The boundary used if the content is multipart/form-data - * @param aReserved For future use - * @return Return Value is for future reference and is currently ignored - */ - void WindowOpenAndPostL(TUint16* url, TUint16* target, TUint32 reason, - TUint16 method, TDesC8* contentType, TDesC8* postData, - TDesC8* aBoundary, void* reserved); - - /** - * - * @since 3.0 - * @param url - * @param target - * @param reason - */ - void WindowOpenL(TUint16* url, TUint16* target, TUint32 reason); - - TBool Exiting() {return iExiting;}; - - // Support for AboutToLoadPage and the UI - TBool SecureItemsInNonSecurePage() { return iSecureItemsInNonSecurePage; } - TBool NonSecureItemsInSecurePage() { return iNonSecureItemsInSecurePage; } - - TInt GetCharsetAndCharsetStringFromUid(TUint aUid, TUint16* aCharset, - const TUint8** aCharsetString); - TBrowserStatusCode StartDataLoad (TDesC& aUrl, CDataLoadInfo* aDataLoadInfo, - NW_MVC_ILoadListener_t* loadListener, TUint16* aTransId, - void* aOwner, void* aClientData, void* aLoadRecipient, TUint8 aLoadType); - - TBrowserStatusCode PostUrl(const TDesC& aUrl, - const TDesC8& aContentType, const TDesC8& aPostData, - const TDesC8* aBoundary, void* aReserved); - - static TInt RunBGTask(TAny* aShell); - void StartIdle() {if (!iIdle->IsActive()) iIdle->Start(TCallBack(RunBGTask, this));} - - /** - * Create observer to delete temp files when the embedded application exists - * @param TFilename Name and path for the temporary file - * @return NULL if creation failed; - */ - MApaEmbeddedDocObserver* CreateEmbeddedDocObserver( TFileName aFilename, RFs& aRfs); - - void WmlShellLoadUrlL( const TDesC& aUrl, TInt aAppId ); - public: // Public member variables - TBool iEmbedded; - TInt iApId; - CContentLoader* iContentLoader; - RFs iRfs; - - private: // Private methods - - CShell( CView* aEpoc32View, CBrCtl* aBrCtl ); - void ConstructL (TBool aUseWsp, MWmlInterface* aWmlInterface, CWmlControl* aWmlControl ); - TBrowserStatusCode DisplayDocument (); - void DisplayError (NW_Int16 errorClass, NW_WaeError_t error); - TBrowserStatusCode InitComponents (); - TBrowserStatusCode InitializeClass (const NW_Osu_Hwnd_t hWnd); - // check whether the charset is supported and whether its char converter is in the ROM - NW_Bool IsConversionSupported(NW_Uint32 uid, NW_Bool * ConverterAvailable); - static void NW_UI_DoDialogSelectOptionL( NW_Dlg_SelectData_t *data, void* callbackCtx, - NW_Dlg_SelectCB_t* callback ); - /* display a confirm dialog to the user */ - static void NW_UI_WmlScriptDlgConfirmL (void *wae, const NW_Ucs2 *message, const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, void *callback_ctx, NW_Dlg_ConfirmCB_t *callback ); - static void NW_UI_WmlScriptDlgPromptL( void* wae, const NW_Ucs2 *message, const NW_Ucs2 *defaultInput, - HBufC*& aReturnedInput ); - TInt SetBoxTree( NW_LMgr_Box_t* aBoxTree ); // just forwards call to CEpoc32View - TBrowserStatusCode StartLoad (const NW_Text_t* url, NW_MVC_ILoadListener_t* loadListener, NW_Cache_Mode_t cacheMode); - - private: // Private member variables - - CView* iView; - CBrCtl* iBrCtl; - TBool iIsEpoc32ShellDestroyed;// The instance is set to true in the - // destructor, and is used not to delegate - CCnvCharacterSetConverter* iCharacterSetConverter; - TUint iSelectedCharacterSet; - TUint iCurrentConverter; - CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* iArrayOfCharacterSetsAvailable; - - NW_MVC_ILoadListener_t* iLoadListener; - NW_Osu_Hwnd_t iHWnd; - NW_HED_DocumentRoot_t* iDocumentRoot; - NW_HED_DocumentNode_t* iPrevDocument; - NW_Uint16 iNumUpdates; - NW_Int16 iNumUpdatesPartial; - NW_Uint16 iNumRelayouts; - NW_Uint16 iNumRedraws; - NW_Bool iDisplayDocumentInvoked ; - TBool iSecureItemsInNonSecurePage; - TBool iNonSecureItemsInSecurePage; - - NW_LMgr_Box_t* iBoxTree; - - /* Do background tasks */ - CIdle* iIdle; - - CEmbeddedDocExitObserver* iDocExitObserver; - TBool iExiting; - - // flag to indicate the file processed by document handler - // e.g. unknowCH invoke docHanlder to open a .txt file - TBool iFileOpenedByDocHandler; - CWmlControl* iWmlControl; -}; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/MVCView.h --- a/webengine/wmlengine/src/MVC/include/MVCView.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,515 +0,0 @@ -/* -* Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The CView class is responsible for displaying the box tree, -* handling user input events such as scrolling and navigating links. -* -*/ - - -#ifndef __MVCVIEW_H -#define __MVCVIEW_H - -// INCLUDES -#include <eikbctrl.h> -#include <eikscrlb.h> - -#include <cenrepnotifyhandler.h> - -#include <e32std.h> -#include <e32def.h> -#include <f32file.h> -#include <AknPictographInterface.h> -#include <AknPictographDrawerInterface.h> - -#include <BrCtlDefs.h> -#include <BrCtlDialogsProvider.h> -#include "BrsrStatusCodes.h" -#include "ImageUtils.h" -#include "LMgrBoxTreeListener.h" -#include "BrsrTypes.h" -#include "nw_gdi_types.h" -#include "nw_evt_scrollevent.h" -#include "CBrowserSettings.h" - -#include "BrCtl.h" -#include "MemoryManager.h" -#include "pagescaler.h" - - -#include "WmlControl.h" -template <class T> class CArrayPtrFlat; - -// CONSTANTS -const TInt KPanicKmViewPanicBase = -9000; -const TInt KPanicKmViewTlsNotInitialized = KPanicKmViewPanicBase - 1; -const TInt KPanicKmViewSingletonAlreadyCreated = KPanicKmViewPanicBase - 2; -const TInt KPanicKmViewTlsViewPointerIsNull = KPanicKmViewPanicBase - 3; - - -// MACROS - -// DATA TYPES - -typedef enum -{ - EKmEvAddToPhoneBook, - EKmEvMakeCall, - EKmEvRemoveFileName, - EKmEvOpenToExternalApp, - EKmEvDownloadObject -} TKimonoEventType; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CEikScrollBarFrame; -class CAknNavigationDecorator; -class CPtrC8Array; -class CViewAsyncInit; -class MViewListener; -class CShell; -//class CBrCtl; -class TBrCtlImageCarrier; -class MViewFocusObserver; - -// CLASS DECLARATIONS -class MBrCtlStateChangeObserver; - - -/** -* CView -* The CView class is responsible for displaying the box tree, and -* handling user input events such as scrolling and navigating links. -* -* @lib browserengine.dll -* @since 2.x -*/ - - -NONSHARABLE_CLASS(CView) : public CEikBorderedControl, public MCenRepNotifyHandlerCallback, - public MAknPictographAnimatorCallBack, public MBoxTreeListener, private MPageScalerCallback -{ -public: - static CView* NewL(CCoeControl* aParent, CBrCtl* aBrCtl, TRect& aRect, CWmlControl* aWmlControl ); - - ~CView(); - - TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); - - TBrCtlDefs::TBrCtlElementType GetFocusedElementType(); - - NW_Bool InputElementEditComplete(TBool aInputConfirmed); - - void HandleActivationEvent(); - - void GenerateAndProcessEvent(const TKimonoEventType& aEvent); - - /** - * SetBrowserSettingL - * Set the setting's value. - * @since 2.x - * @param TUint setting - the number of the setting you wish to set. - * This corresponds to a value in the TBrowserSettings enum - * @param TUint value - the value you wish to set for the setting - * If the value is true/false use 1/0 otherwise the value must correspond - * to a value in either one of the following enumerated types: - * TBrowserFontSizeLevel or TBrowserFullScreenValue - * @return void - */ - void SetBrowserSettingL(TUint aSetting, TUint aValue); - - /** - * GetBrowserSettingL - * Get the setting's value. - * @since 2.x - * @param TUint setting - the setting whose value you wish to retrieve - * @return TUint - value of the setting (as an integer). For true/false - * 1/0 will be returned. For other settings, the return value will correspond - * with one of the following enumerated types: TBrowserFontSizeLevel or - * TBrowserFullScreenValue - */ - TUint GetBrowserSettingL(TUint aSetting) const; - - CArrayFixFlat<TBrCtlImageCarrier>* GetPageImagesL(); - - void SwitchVerticalLayout (); - - - void DrawPictographsInText(CBitmapContext& aGc, const CFont& aFont, const TDesC& aText, const TPoint& aPosition); - - /** - * Check to see if we are in image map view - * - * @param None - * @return TBool ETrue if we are in image map view, EFalse otherwise - */ - inline TBool IsImageMapView() { return iIsImageMapView; }; - - /** - * This method is called if we are in image map view to create an image list - * that just contains the one image shown in the image map view. - * - * @param None - * @return TBool ETrue if we are in image map view, EFalse otherwise - */ - void GetViewImageList(void* aDynamicVector); - - // Return the number of active elements in the page - TUint GetActiveElements(); - - /** - * - * @param box - * @return NW_Bool NW_TRUE, if vox is just placeholder (0,0;0x0) - * NW_FALSE otherwise; - */ - NW_Bool - IsZeroBox (const NW_LMgr_Box_t* box) const; - // Redraw the positioned box on top every time that something was redrawn - TBrowserStatusCode DrawPositionedBoxes(); - - // Any slow browser initialization can happen here - void AsyncInit(); - - TBrowserStatusCode Draw (const NW_Bool); - -public: // from MBrowserSettingsObserver - void BrowserSettingChanged( enum TBrowserSetting aBrowserSetting ); - -protected: // From CCoeControl - void HandlePointerEventL(const TPointerEvent& aPointerEvent); - - void FocusChanged(TDrawNow aDrawNow); - - void SizeChanged(); - - void Draw(const TRect& aRect) const; - - TInt CountComponentControls() const; - - CCoeControl* ComponentControl(TInt aIndex) const; - -protected: - void HandleResourceChange(TInt aType); - -private: // from MSharedDataNotifyHandler - - void HandleNotifyString(TUint32 aKeyId, const TDesC16& aValue); - -private: // from MAknPictographDrawerCallBack - void DrawPictographArea(); - -protected: - TKeyResponse DoHandleControlKeysL(const TKeyEvent& aKeyEvent); - -private: // from MPageScalerCallback - - void DrawDocumentPart( CFbsBitGc& aGc, CFbsBitmap* /*aBitmap*/, const TRect& aDocumentAreaToDraw ); - - TRect DocumentViewport() ; - - void ScaledPageChanged( const TRect& aRect, TBool aFullScreen, TBool aScroll ); - - TSize DocumentSize(); - - TBool TouchScrolling() { return EFalse; } - - CCoeControl& PageControlView() { return *(iBrCtl->CCoeControlParent());} - - -private: - CView(CBrCtl* aBrCtl); - - void ConstructL(CCoeControl* aParent, TRect& aRect, CWmlControl* aWmlControl ); - - TBrowserStatusCode Cancel (); - - void CreateOffscreenBitmapL( const TRect& aRect ); - - // Any slow browser initialization can happen here - void AsyncInitL(); - - // Delete entries in a given directory - void DeleteDirectoryEntriesL(RFs& aRfs, TPtrC16& aFilePath); - - NW_Bool DispatchEvent (const NW_Evt_Event_t* event); - - TBrowserStatusCode FormatPartial (); - - NW_LMgr_Box_t* GetNextSiblingBox (const NW_LMgr_Box_t* box); - - TBrowserStatusCode InitializeTree (NW_LMgr_RootBox_t *rootBox, TBool isFormatingBoxTree); - - // - void InitializePageScalerL(); - -public: // but not exported. For Kimono internal use ("C" side) - - void SetFormattingPriority( CActive::TPriority aPriority ); - - TInt AppendFocusObserver(MViewFocusObserver* aViewFocusObserver); - - TInt AddStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver); - - void BoxTreeDestroyed (); - - TBool ValidateAddedIndex(NW_LMgr_Box_t* aBox, NW_LMgr_Box_t* aMasterBox); - - TBrowserStatusCode BoxTreeListenerAppendTabItem (NW_LMgr_Box_t* box); - - TBrowserStatusCode BoxTreeListenerRelayout (NW_Bool createTabList); - - TBrowserStatusCode Collapse (NW_LMgr_FlowBox_t* containingFlow, NW_Bool collapseAnonymous); - - TBrowserStatusCode CreateTabIndexList (); - - void DoScrollL(const TInt16 aScrollDirection, const TUint32 aScrollDelta); - - void EnableSuppressDupReformats (NW_Int16 state); - - void EpocDrawNow (NW_Bool drawNow); - - NW_Bool EpocProcessEvent (const NW_Evt_Event_t* event); - - void ExternalLayoutSwitch (); - - TBrowserStatusCode ForceCurrentBox (NW_LMgr_Box_t* newbox, NW_Bool isNewPage, NW_Bool isRefreshNeeded); - - TBrowserStatusCode FormatBoxTree (NW_Bool createTabList); - - void FormattingComplete (); - - NW_ADT_Vector_Metric_t GetActiveBoxId (); - - NW_LMgr_Box_t* GetInFocusBox () const; - - NW_LMgr_Box_t* GetLastVisibleBox () const; - - NW_LMgr_Box_t* GetNextEventListener (NW_LMgr_BoxVisitor_t* boxVisitor); - - const NW_GDI_Point2D_t* GetOrigin (); - - void* GetScroll () const; - - TBrowserStatusCode GetScrollRange (NW_GDI_Point2D_t* scrollRange); - - NW_LMgr_Box_t* GetVisibleBox () const; - - NW_LMgr_Box_t* GetVisibleBoxReverse () const; - - NW_Bool GetXScrollAmt (const NW_LMgr_Box_t* box, NW_Int32* scrollDelta, NW_Evt_ScrollEvent_Direction_t* scrollDir, NW_Bool scrollMaxAmt) const; - - NW_Bool GetYScrollAmt (const NW_LMgr_Box_t* box, NW_Int32* scrollDelta, NW_Evt_ScrollEvent_Direction_t* scrollDir, NW_Bool scrollMaxAmt) const; - - TBrowserStatusCode GotoActiveBox (NW_ADT_Vector_Metric_t activeBoxId); - - TBrowserStatusCode GotoBox (NW_LMgr_Box_t* box); - - void HandleError (TBrowserStatusCode status); - - NW_Bool HandleGNavigation (NW_Uint32 tabIndex); - - static TBrowserStatusCode InputInvalid(void* aCEpoc32View, TInt aMin); - - static TBrowserStatusCode InputInvalidL(void* aCEpoc32View, TInt aMin); - - NW_Bool IsBoxVisible (const NW_LMgr_Box_t* box, NW_GDI_Rectangle_t *bounds) const; - - TBrowserStatusCode JumpToLink (const NW_LMgr_Box_t* box, NW_Bool scrollMaxAmt); - - NW_Bool ProcessAccessKey (const NW_Evt_KeyEvent_t* event); - - NW_Bool ProcessEvent (const NW_Evt_Event_t* event); - - TBrowserStatusCode RedrawDisplay (NW_Bool drawNow); - - TBrowserStatusCode ReformatBox (NW_LMgr_Box_t* box); - - TBrowserStatusCode Refresh (NW_LMgr_Box_t* box); - - TBrowserStatusCode Relayout (NW_Bool createTabList); - - void RemoveFocusObserver(MViewFocusObserver* aViewFocusObserver); - - void RemoveStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver); - - NW_Bool ScrollAfterCurrentBox (const NW_LMgr_Box_t* box, NW_Bool scrollMaxAmt); - - void SetAppServices(void *appServices); // appservices are of type NW_HED_AppServices - - TInt SetBoxTree(const NW_LMgr_Box_t* boxTree); // return value is TBrowserStatusCode - - TBrowserStatusCode SetCurrentMasterBox (); - - TBrowserStatusCode SetDeviceContext (CGDIDeviceContext* deviceContext); - - TBrowserStatusCode SetDisplayExtents (NW_GDI_Rectangle_t* displayExtents); - - void SetShell(CShell* shell); - - TBrowserStatusCode SetListener (MViewListener* viewListener); - - TBrowserStatusCode SetOrigin (NW_GDI_Point2D_t* origin); - - void StartCSSApply (); - - void DisableAnimation(); - - void EnableAnimation(); - - TBrowserStatusCode SwitchFromImageMapView (); - - TBrowserStatusCode SwitchToImageMapView (); - - TBrowserStatusCode SwitchVerticalLayout (NW_Bool aFormatBoxTree, NW_Bool aSwitchBox); - - void UpdateCBAs () const; - - void UpdateScrollBarsL(CEikScrollBar::TOrientation aOrientation,const TInt aThumbPos ,const TInt aScrollSpan); - - TBrowserStatusCode UpdateHScrollBar () const; - - TBrowserStatusCode UpdateVScrollBar () const; - - inline NW_LMgr_Box_t* GetCurrentBox () { return iCurrentBox; }; - - inline CGDIDeviceContext* GetDeviceContext () { return iDeviceContext; }; - - inline void* GetParentWindow () { return this; }; - - inline NW_GDI_Dimension2D_t GetScrollAmt () {return iScrollAmt;}; - - inline NW_ADT_DynamicVector_t* GetTabList () {return iTabList;}; - - inline NW_LMgr_RootBox_t* GetRootBox () { return iRootBox; }; - - inline NW_GDI_Dimension2D_t GetVisibleAmt () {return iVisibleAmt;} ; - - inline NW_Bool IsForcedReformatNeeded () { return iForceReformatNeeded; }; - - inline void ForcedReformatNeeded () { iForceReformatNeeded = NW_TRUE; }; - - inline void SetCurrentBox (NW_LMgr_Box_t* aCurrentBox) { iCurrentBox = aCurrentBox; }; - - inline void SetInitialActiveBoxId (NW_ADT_Vector_Metric_t aInitialActiveBoxId) {iInitialActiveBoxId = aInitialActiveBoxId; }; - - inline void SetInitialDocPosition (NW_GDI_Metric_t aX, NW_GDI_Metric_t aY) { iInitialDocPosition.x = aX; iInitialDocPosition.y = aY; }; - - inline CPageScaler* PageScaler() { return iPageScaler; } - - TBrowserStatusCode SetAnchorName (NW_Text_t *anchorName); - - void ContentSize(TSize& aContentSize) ; - NW_Bool FormatPositionedBoxes (); - void ScrollTo(TPoint aPoint); - -public: - CBrCtl* BrCtl() {return iBrCtl;} - void DrawHistory( CFbsBitGc& aGc, const TRect& aDocumentAreaToDraw ) const; - -private: - TBrowserStatusCode AppendTabItem (NW_LMgr_Box_t* box); - - void DeleteOptionItems (); - - NW_GDI_Rectangle_t GetBoxDisplayBounds (NW_LMgr_Box_t* aBox); - - TBrowserStatusCode GetBoxTabIndex (NW_LMgr_Box_t* box, NW_ADT_Vector_Metric_t* index); - - TBrowserStatusCode HandleFormattingComplete (); - - NW_Bool ProcessFontSizeChangeEvent (); - - NW_Bool ProcessScrollEvent (const NW_Evt_ScrollEvent_t* scrollEvent); - - NW_Bool ProcessTabEvent (const NW_Evt_TabEvent_t* tabEvent); - - void SetBoxFormatBounds (NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aBoxBounds); - - TBrowserStatusCode SetupTableFormat (NW_Bool /*relayoutEvent*/); - - TBrowserStatusCode UpdateScrollBars () const; - - void GetParentBox(NW_LMgr_Box_t* parentBox, NW_LMgr_Box_t** pReturnedParentBox); -private: - CBitmapContext* iBitmapContext; - CBitmapDevice* iBitmapDevice; - TInt iLastRepeats; // To signify long keypresses - RPointerArray<MViewListener> iListeners; - CFbsBitmap* iOffscreenBitmap; - CShell* iShell; - CBrCtl* iBrCtl; - CAknPictographInterface* iPictographInterface; - - CPageScaler* iPageScaler; - - - - CRepository* iRepository; - CCenRepNotifyHandler* iNotifyHandler; - - RPointerArray <MViewFocusObserver> iViewFocusObserver; - RPointerArray <MBrCtlStateChangeObserver> iStateChangeObserver; - CViewAsyncInit* iViewAsyncInit; - TInt iVScrollPosition; - - /* The layout manager context */ - CArrayPtrFlat<NW_LMgr_RootBox_t>* iRootBoxArray; - - void* iBoxFormatHandler; - NW_Bool iCreateTabList; - NW_LMgr_Box_t* iCurrentBox; - CGDIDeviceContext* iDeviceContext; - NW_Bool iExternalLayoutSwitch; - NW_Bool iIsImageMapView; - NW_ADT_DynamicVector_t* iOptionItemList; /* for clean up purpose */ - NW_ADT_DynamicVector_t* iTabList; - NW_LMgr_RootBox_t* iRootBox; - - /* Scroll data */ - void* iScroll; - NW_GDI_Dimension2D_t iMaxScrollAmt; - NW_GDI_Dimension2D_t iScrollAmt; - NW_GDI_Dimension2D_t iVisibleAmt; - TPoint iLastPosition; - - NW_Bool iDrawNow; - - TBool iDocumentFinished; - - - /*the initial box id and initial docposition , is used after - the formatting is complete */ - NW_ADT_Vector_Metric_t iInitialActiveBoxId; - NW_GDI_Point2D_t iInitialDocPosition; - - /* - ** Used to suppress duplicate reformats when a single image is repeated - ** several times within the same page. - */ - NW_Int16 iSuppressDupReformats; - NW_LMgr_Box_t* iPendingReformatBox; - NW_Bool iForceReformatNeeded; - NW_Text_t *iAnchorName; - CActive::TPriority iFormatPriority; - CWmlControl* iWmlControl; - TBool iShouldActivate; - TBool iDrag; -}; - -#endif // EPOC32VIEW_H - -// End of File - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/MVCViewAsyncInit.h --- a/webengine/wmlengine/src/MVC/include/MVCViewAsyncInit.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Asynchronous initialization of the browser engine -* -*/ - - - -#ifndef VIEWASYNCINIT_H -#define VIEWASYNCINIT_H - -// INCLUDES -#include <e32std.h> -#include <e32def.h> -#include <e32base.h> -#include "MVCView.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CEpoc32View; - -// CLASS DECLARATION - -/** -* Asynchronous initialization of the browser engine -* -* @lib browserengine.dll -* @since 2.6 -*/ -NONSHARABLE_CLASS(CViewAsyncInit) : public CActive - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CViewAsyncInit* NewL(); - - /** - * Destructor. - */ - virtual ~CViewAsyncInit(); - - public: // New functions - - public: // Functions from base classes - /** - * From CActive - * @since 2.6 - * @param - * @return void - */ - void DoCancel(); - - /** - * From CActive Asynchronous initialization - * @since 2.6 - * @param - * @return void - */ - void RunL(); - - /** - * From CActive Handle Leave from RunL. - * @since 2.6 - * @param aError The Leave error code. - * @return void - */ - TInt RunError(TInt aError); - - private: - - /** - * C++ default constructor. - */ - CViewAsyncInit(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - // ?classname( const ?classname& ); - // Prohibit assigment operator if not deriving from CBase. - // ?classname& operator=( const ?classname& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // A pointer to the view, for the init callback - CView* iView; - - // Reserved pointer for future extension - //TAny* iReserved; - - }; - -#endif // VIEWASYNCINIT_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/MVCViewListener.h --- a/webengine/wmlengine/src/MVC/include/MVCViewListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef MVCVIEWLISTENER_H -#define MVCVIEWLISTENER_H - -// INCLUDES -#include "BrsrTypes.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Base class for. -* -* @lib browserengine.lib -* @since 2.6 -*/ -class MViewListener -{ - - public: - /** - * - * @since 2.6 - * @param - * @return - */ - virtual void HandleError (TBrowserStatusCode status) = 0; - virtual void FormattingComplete () = 0; -}; - -#endif // MVCVIEWLISTENER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/NW_MVC_EXPORT.h --- a/webengine/wmlengine/src/MVC/include/NW_MVC_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_MVC_EXPORT_h_ -#define _NW_MVC_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_MVC_EXPORT -#ifdef NW_IMPORT -#define NW_MVC_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_MVC_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_MVC_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_MVC_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/WimUi.h --- a/webengine/wmlengine/src/MVC/include/WimUi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains functions for Digital Signing (WIM_ENABLED env. only) -* -*/ - - -#ifndef __WIMUI_H -#define __WIMUI_H - -/* #include <wimsecdlgs.h> */ -#include <nwx_generic_dlg.h> - -typedef TInt TDSignDialogType; - -const TInt KDSignDialogTypeSignText = 0; -const TInt KDSignDialogTypeSelectCert = 1; -const TInt KDSignDialogTypePinCodeQuery = 2; -const TInt KSignTextRequested= 3; - -const TInt KMaxPINInputLength = 8; -const TInt KMinPINInputLength = 1; // currently in use - - -class CWimUi : public CActive -{ - public: - - /** - * EPOC two phased constructor - */ - static CWimUi* NewL(); - - /** - * destructor - */ - ~CWimUi(); - - /** - * Shows Sign Text Dialog - * - * @param void* data - * void* callbackctx - * void* callback - * @return void - */ - void DoShowSignTextDialogL(void* data, void* callbackctx, void* callback); - - /** - * Shows Select Certificate Dialog - * - * @param void* data - * void* callbackctx - * void* callback - * @return void - */ - void DoShowSelectCertificateDlgL(void* data, void* callbackctx, void* callback); - - /** - * Shows Select Pin Code Query Dialog - * - * @param void* data - * void* callbackctx - * void* callback - * @return void - */ - void DoShowPinCodeQueryDialogL(void* data, void* callbackctx, void* callback); - - private: // Private methods - - /** - * By default EPOC constructor is private. - */ - void ConstructL(); - - /** - * C++ default constructor. - */ - CWimUi(); - - /** - * Required function for CActive object. - */ - void RunL(); - - /** - * Required function for CActive object. - */ - void DoCancel(); - - private: // Private member variables - - void* iData; - void* iCallbackCtx; - void* iCallback; - TBool iBooleanValue; - TInt iSelectedCertIndex; - - TWIMPINParams iParams; - const TDialogType iPinPukDialogType; - TPINValue iPinValue; - - MWimSecurityDialogs* iSecDlgs; - TDSignDialogType iDialogType; - -}; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/httploader_mlinkresolvercallbacks.h --- a/webengine/wmlengine/src/MVC/include/httploader_mlinkresolvercallbacks.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Callback classes from Link resolver to the UI and back -* -*/ - - - -#ifndef MLINKRESOLVERCALLBACKS_H -#define MLINKRESOLVERCALLBACKS_H - - -#include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" -#include "urlloader_urlresponse.h" - - - - -// INCLUDES - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class MBrCtlLinkResolver; -class CWmlResourceLoadListener; - -/** -* Callback class for requests to the UI from Link Resolver. -* -* @lib httploader.lib -* @since 2.0 -*/ -class MHttpLoader_LinkResolverCallbacks - { - -public: // New functions - - /** - * Called to obtain the current URL. - * @since 2.8 - * @param - * @return The current URL - */ - virtual HBufC* CurrentUrlLC() = 0; - - /** - * Called to obtain a pointer to the Link Resolver - * @since 2.8 - * @return The Browser Control's Link Resolver - */ - virtual MBrCtlLinkResolver* LinkResolver() = 0; - - - /** - * Called to check if the Host Application should be called to resolve the URL - * @since 2.8 - * @return ETrue if the Host Application will resolve the URL, EFalse otherwise - */ - virtual TBool ShouldResolveUrl(TBool aIsTopLevel, NW_Uint8 aReason) = 0; - - /** - * Called to Load Url to resolve the URL - * @since 3.1 - * @return - */ - virtual void LoadLinkUrl(const TDesC& aUrl, void* aHeaders ) = 0; - - /** - * Called to Load Url to resolve the URL - * @since 3.1 - * @return - */ - virtual void PostLinkUrl(TDesC& aUrl, TDesC8& aPostData, TDesC& aContentType) = 0; - - /** - * Called to Load Ebbeded content - * @since 3.1 - * @return - */ - virtual CWmlResourceLoadListener* LoadEmbededUrl( const TDesC& aUrl, void *aLoadContext, - void* aPartialLoadCallback, TUint16 aTransId ) = 0; - - /** - * Called to set the ONENTERBACKWORD event - * @since 3.1 - * @return void - */ - virtual void SetOnEnterBackwordReason() = 0; - - /** - * Convert a charset from string to IANA encoding - * @since 2.8 - * @return IANA encoding of the charset - */ - virtual TUint16 ConvertCharset(const TDesC8& aCharset) = 0; - - }; - -#endif // MLINKRESOLVERCALLBACKS_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/nw_mvc_iloadlistener.h --- a/webengine/wmlengine/src/MVC/include/nw_mvc_iloadlistener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_MVC_ILoadListener_h_ -#define _NW_MVC_ILoadListener_h_ - -#include "NW_MVC_EXPORT.h" -#include "nw_object_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_MVC_ILoadListener_Class_s NW_MVC_ILoadListener_Class_t; -typedef struct NW_MVC_ILoadListener_s NW_MVC_ILoadListener_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -void -(*NW_MVC_ILoadListener_LoadComplete_t) (NW_MVC_ILoadListener_t* loadListener, - NW_Bool success); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_MVC_ILoadListener_ClassPart_s { - NW_MVC_ILoadListener_LoadComplete_t loadComplete; -} NW_MVC_ILoadListener_ClassPart_t; - -struct NW_MVC_ILoadListener_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_MVC_ILoadListener_ClassPart_t NW_MVC_ILoadListener; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_MVC_ILoadListener_s { - NW_Object_Secondary_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_MVC_ILoadListener_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_MVC_ILoadListener)) - -#define NW_MVC_ILoadListenerOf(_object) \ - (NW_Object_Cast (_object, NW_MVC_ILoadListener)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MVC_EXPORT const NW_MVC_ILoadListener_Class_t NW_MVC_ILoadListener_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_MVC_ILoadListener_LoadComplete(_object, _success) \ - (NW_Object_Invoke (_object, NW_MVC_ILoadListener, loadComplete) ( \ - NW_MVC_ILoadListenerOf (_object), (_success))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_MVC_ILoadListener_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/include/nw_mvc_iloadlisteneri.h --- a/webengine/wmlengine/src/MVC/include/nw_mvc_iloadlisteneri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_MVC_ILoadListenerI_h_ -#define _NW_MVC_ILoadListenerI_h_ - -#include "nw_object_interfacei.h" -#include "nw_mvc_iloadlistener.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_MVC_ILoadListenerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/CEmbeddedDocExitObserver.cpp --- a/webengine/wmlengine/src/MVC/src/CEmbeddedDocExitObserver.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Observer for exit notification from Document Handler -* -*/ - - -#include "EmbeddedDocExitObserver.h" - - -CEmbeddedDocExitObserver::CEmbeddedDocExitObserver(RFs& aRfs) - { - iRfs = aRfs; - } - -CEmbeddedDocExitObserver* CEmbeddedDocExitObserver::NewL(RFs& aRfs) - { - return new (ELeave) CEmbeddedDocExitObserver(aRfs); - } - -// We want hardcopy of the filename bacause the caller might have -// already been deleted. -void CEmbeddedDocExitObserver::SetTempFile(TFileName aFileName) - { - iFileName = aFileName; - } - -void CEmbeddedDocExitObserver::NotifyExit(TExitMode /*aMode*/) - { - RDebug::Print(_L("###### Back to browser")); - RThread().SetPriority(EPriorityNormal); - - iRfs.Delete(iFileName); - }; - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/ILoadListener.c --- a/webengine/wmlengine/src/MVC/src/ILoadListener.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_mvc_iloadlisteneri.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_MVC_ILoadListener_Class_t NW_MVC_ILoadListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/MVCScroll.cpp --- a/webengine/wmlengine/src/MVC/src/MVCScroll.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2320 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles scrolling operations of the view -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) -#include <nwx_settings.h> - -#include "MVCScroll.h" - -#include "MVCView.h" -#include "nw_evt_tabevent.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_gdi_utils.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_logger.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_areabox.h" -#include "nw_evt_scrollevent.h" - -// CONSTANTS -#define SMALL_SCROLL 16 -#define NORMAL_SCROLL 18 -#define LARGE_SCROLL 21 - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CMVCScroll::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMVCScroll* -CMVCScroll::NewL(CView* view) -{ - CMVCScroll* scroll = new (ELeave) CMVCScroll(view); - - CleanupStack::PushL(scroll); - CleanupStack::Pop(); // scroll - - return scroll; -} - -// ----------------------------------------------------------------------------- -// CMVCScroll::CMVCScroll -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -CMVCScroll::CMVCScroll(CView* view) : iView(view) -{ -} - -// ----------------------------------------------------------------------------- -// CMVCScroll::~CMVCScroll -// Destructor. -// ----------------------------------------------------------------------------- -// -CMVCScroll::~CMVCScroll() -{ -} - -// ----------------------------------------------------------------------------- -// IsBoxVisibleInEither -// Description: Helper function to test if box is visible in either rectangles -// Returns: TBool : NW_TRUE if the box is visible within the two bounds -// NW_FALSE if the box is NOT visible within the bounds -// ----------------------------------------------------------------------------- -// -TBool -CMVCScroll::IsBoxVisibleInEither (const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds1, - NW_GDI_Rectangle_t* bounds2) -{ - NW_ASSERT(iView != NULL); - NW_ASSERT(box != NULL); - NW_ASSERT(bounds1 != NULL); - NW_ASSERT(bounds2 != NULL); - - if ( iView->IsBoxVisible(box, bounds1) || - iView->IsBoxVisible(box, bounds2) ) - { - return NW_TRUE; - } - else - { - return NW_FALSE; - } -} - -// ----------------------------------------------------------------------------- -// This only get range of the box, not considering sibling or master box's range -// -void -CMVCScroll::GetBoxRangeRestrict (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ) -{ - NW_ASSERT(box != NULL); - - if (NW_Object_IsClass(box, &NW_LMgr_AreaBox_Class)) - { - NW_GDI_Rectangle_t areaBoxBounds = NW_LMgr_AreaBox_GetBounds(box); - - *referenceY = areaBoxBounds.point.y; - *refY2 = (NW_GDI_Metric_t)(areaBoxBounds.point.y + areaBoxBounds.dimension.height); - *referenceX = areaBoxBounds.point.x; - *refX2 = (NW_GDI_Metric_t)(areaBoxBounds.point.x + areaBoxBounds.dimension.width); - } - else - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - - *referenceY = boxBounds.point.y; - *refY2 = (NW_GDI_Metric_t)(boxBounds.point.y + boxBounds.dimension.height); - *referenceX = boxBounds.point.x; - *refX2 = (NW_GDI_Metric_t)(boxBounds.point.x + boxBounds.dimension.width); - } - - return; -} - -// ----------------------------------------------------------------------------- -// In case of non-split, simply box's range will be returned -// -void -CMVCScroll::GetMasterBoxRange (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ) -{ - NW_LMgr_Box_t *masterBox = NULL; - NW_LMgr_PropertyList_t* propList; - - NW_ASSERT(box != NULL); - - propList = NW_LMgr_Box_PropListGet(box); - if (NW_Object_IsInstanceOf(propList, &NW_LMgr_SlavePropertyList_Class)) - { - masterBox = - NW_LMgr_SlavePropertyList_GetMasterBox(NW_LMgr_SlavePropertyListOf(propList)); - } - else - { - masterBox = box; - } - - NW_ASSERT(masterBox != NULL); - - GetBoxRangeRestrict( masterBox, referenceY, refY2, referenceX, refX2 ); - - return; -} - -// ----------------------------------------------------------------------------- -// This method doesn't return the first sibling box with width and height as 0; -// instead, the sibling whose width and height are not 0 and is right next to the -// first sibling box or the master box if no other sibling exists will be returned. -// In case of non-split, simply the box will be returned. -// Does not return NULL. -// -NW_LMgr_Box_t* -CMVCScroll::GetFirstSiblingBox (NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t *tempBox = NULL; - NW_LMgr_Box_t *firstBox = NULL; - NW_LMgr_PropertyList_t* propList; - NW_LMgr_Property_t prop; - - NW_ASSERT(box != NULL); - - propList = NW_LMgr_Box_PropListGet(box); - /* ensure box is a master box */ - if (NW_Object_IsInstanceOf(propList, &NW_LMgr_SlavePropertyList_Class)) - { - box = - NW_LMgr_SlavePropertyList_GetMasterBox(NW_LMgr_SlavePropertyListOf(propList)); - propList = NW_LMgr_Box_PropListGet(box); - } - - /* Get first box */ - do - { - prop.value.object = NULL; - if( propList ) - { - (void)NW_LMgr_PropertyList_Get(propList, NW_CSS_Prop_sibling, &prop); - /* If we come back in a loop to the master box, then stop */ - if (prop.value.object == box) - { - /* This occurs when only one slave box exist and its width and height is 0 */ - if (firstBox == NULL) - { - firstBox = box; - } - break; - } - - if(prop.value.object != NULL) - { - tempBox = NW_LMgr_BoxOf(prop.value.object); - propList = NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(tempBox)); - NW_ASSERT (NW_Object_IsInstanceOf (propList, &NW_LMgr_PropertyList_Class)); - /* ignore the sibling box with width and height as 0 */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( tempBox ); - - if( boxBounds.dimension.height != 0 && boxBounds.dimension.width != 0 ) - { - firstBox = tempBox; - } - } else - /* If it's null, it means non-split case */ - { - firstBox = box; // break out because prop.value.object == NULL - } - } - }while(prop.value.object != NULL); - - if(firstBox == NULL) - { - firstBox = box; - } - - return firstBox; -} - - -// ----------------------------------------------------------------------------- -// In case of non-split, simply box's range will be returned; -// -void -CMVCScroll::GetFirstSiblingBoxRange (NW_LMgr_Box_t* box, - NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ) -{ - NW_LMgr_Box_t *firstBox = NULL; - - NW_ASSERT(box != NULL); - - firstBox = GetFirstSiblingBox(box); - GetBoxRangeRestrict( firstBox, referenceY, refY2, referenceX, refX2 ); - - return; -} - -// ----------------------------------------------------------------------------- -NW_Bool -CMVCScroll::HowBigIsBoxVisible ( const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds, - NW_GDI_Rectangle_t* overlap ) -{ - NW_GDI_Rectangle_t boxBounds; - - /* parameter assertion block */ - NW_ASSERT (iView != NULL); - NW_ASSERT (box != NULL); - - if (NW_Object_IsClass(box, &NW_LMgr_AreaBox_Class)) - { - boxBounds = NW_LMgr_AreaBox_GetBounds( NW_LMgr_BoxOf( box ) ); - } - else - { - boxBounds = NW_LMgr_Box_GetDisplayBounds( NW_LMgr_BoxOf( box ) ); - } - - /* below check handles the case where the box is at least has sHVisibleAmt and sVVisibleAmt - * inside the display bounds - */ - if (NW_GDI_Rectangle_Cross(&boxBounds, bounds, overlap)) - { - if ((overlap->dimension.width >= iView->GetVisibleAmt().width) && - (overlap->dimension.height >= iView->GetVisibleAmt().height)) - { - return NW_TRUE; - } - // If the box is smaller than visibleAmt, then we should go to that link - else if ((overlap->dimension.width == boxBounds.dimension.width) && - (overlap->dimension.height == boxBounds.dimension.height)) - { - return NW_TRUE; - } - } - - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -NW_Bool -CMVCScroll::GetScrollDownBounds ( CView* view, - NW_GDI_Rectangle_t* scrolledBounds ) -{ - const NW_GDI_Dimension2D_t* displaySize; - NW_GDI_Dimension2D_t canvasSize; - NW_Bool scroll; - - // get the display and cavas size - displaySize = - &(view->GetDeviceContext()->DisplayBounds()->dimension); - TBrowserStatusCode status = NW_LMgr_RootBox_GetExtents (view->GetRootBox(), &canvasSize); - NW_ASSERT (status == KBrsrSuccess); - - // can scroll - if (scrolledBounds->point.y + view->GetScrollAmt().height + displaySize->height - <= canvasSize.height) - { - scrolledBounds->point.y = - (NW_GDI_Metric_t)(scrolledBounds->point.y + view->GetScrollAmt().height); - scroll = NW_TRUE; - } - else if (scrolledBounds->point.y + displaySize->height < canvasSize.height) - { - scrolledBounds->point.y = - (NW_GDI_Metric_t)(canvasSize.height - displaySize->height); - scroll = NW_TRUE; - } - else - { - scroll = NW_FALSE; - } - - return scroll; -} - -// ------------------------------------------------------------------------- -NW_Bool -CMVCScroll::GetScrollUpBounds ( CView* view, - NW_GDI_Rectangle_t* scrolledBounds ) -{ - NW_Bool scroll; - - // can scroll - if (scrolledBounds->point.y - view->GetScrollAmt().height >= 0) - { - scrolledBounds->point.y = - (NW_GDI_Metric_t)(scrolledBounds->point.y - view->GetScrollAmt().height); - scroll = NW_TRUE; - } - else if (scrolledBounds->point.y > 0) - { - scrolledBounds->point.y = 0; - scroll = NW_TRUE; - } - else - { - scroll = NW_FALSE; - } - - return scroll; -} - -// ------------------------------------------------------------------------- -NW_LMgr_Box_t* -CMVCScroll::GetTabIndex( const NW_LMgr_Box_t* oldBox, - NW_Bool nextIndex, - NW_Int32* currentTabIndex ) -{ - NW_Bool found = NW_FALSE; - NW_LMgr_Box_t* box = NULL; - NW_ADT_Vector_t* tabListVector = NW_ADT_VectorOf( iView->GetTabList() ); - NW_Uint16 size = NW_ADT_Vector_GetSize( tabListVector ); - NW_ADT_Vector_Metric_t i; - - // if oldBox is NULL then return the first item in the list. - if( oldBox == NULL ) - { - i = 0; - found = NW_TRUE; - } - else - { - // if the currentTabIndex is provided then get the next item in the list - if( *currentTabIndex != -1 ) - { - i = (NW_ADT_Vector_Metric_t)*currentTabIndex; - // skip to the previous/next box - i = (NW_ADT_Vector_Metric_t) (( nextIndex == NW_TRUE ) ? ( i + 1 ) : ( i - 1 )); - found = NW_TRUE; - } - else - { - for( i = 0; i < size; i++ ) - { - box = (NW_LMgr_Box_t*)*NW_ADT_Vector_ElementAt( tabListVector, i ); - - if( oldBox == box ) - { - // skip to the previous/next box - i = (NW_ADT_Vector_Metric_t) (( nextIndex == NW_TRUE ) ? ( i + 1 ) : ( i - 1 )); - found = NW_TRUE; - break; - } - } - } - } - // if the box was found and index is valid - if( found == NW_TRUE && i < size ) - { - box = (NW_LMgr_Box_t*)* - NW_ADT_Vector_ElementAt( tabListVector, i ); - *currentTabIndex = i; - } - else - { - box = NULL; - *currentTabIndex = -1; - } - return box; -} - -// ------------------------------------------------------------------------- -NW_LMgr_Box_t* -CMVCScroll::GetNextEventListener (NW_LMgr_BoxVisitor_t* boxVisitor) -{ - NW_LMgr_Box_t* box = NULL; - NW_GDI_Rectangle_t boxBounds; - - while ((box = NW_LMgr_BoxVisitor_NextBox (boxVisitor, NULL)) != NULL) { - NW_LMgr_IEventListener_t* eventListener; - - /* we are only looking for boxes implementing the NW_LMgr_IEventListener - interface */ - eventListener = (NW_LMgr_IEventListener_t*)NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class); - if (eventListener == NULL) { - continue; - } - - /* If activeContainerBox has zero length or zero width, we skip this - activeContainerBox. This happens when activeContaninerBox only has - one breakBox child */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ActiveContainerBox_Class)) { - boxBounds = NW_LMgr_Box_GetDisplayBounds(box); - if (boxBounds.dimension.width == 0 || boxBounds.dimension.height == 0) { - continue; - } - } - return (box); - } - return (NULL); -} - -// ------------------------------------------------------------------------- -void -CMVCScroll::GetFirstVisible(NW_LMgr_Box_t* box, - NW_LMgr_Box_t** firstVisible ) -{ - NW_LMgr_PropertyList_t* propList; - NW_LMgr_PropertyList_t* masterPropList; - NW_LMgr_Box_t* masterBox = NULL; - NW_LMgr_Box_t* tempBox = NULL; - NW_LMgr_Property_t prop; - NW_Bool found = NW_FALSE; - NW_GDI_Rectangle_t viewBounds; - - NW_ASSERT( box != NULL ); - NW_ASSERT( iView != NULL ); - - viewBounds = *(iView->GetDeviceContext()->DisplayBounds()); - viewBounds.point = *(iView->GetDeviceContext()->Origin()); - - // let's check first if the box is visible - if( iView->IsBoxVisible( box, &viewBounds ) ) - { - // we've got the box - tempBox = box; - found = NW_TRUE; - } - else - { - propList = NW_LMgr_Box_PropListGet( box ); - if( propList != NULL ) - { - // first check if we are on a master or a slave box - if( NW_Object_IsInstanceOf( propList, &NW_LMgr_SlavePropertyList_Class ) ) - { - // this is a slave - // get the master's property list - masterBox = NW_LMgr_SlavePropertyList_GetMasterBox( propList ); - } - else - { - masterBox = box; - } - // we need the master property list to check if we've got a chain here - masterPropList = NW_LMgr_Box_PropListGet( masterBox ); - propList = NULL; - if( NW_LMgr_PropertyList_Get( masterPropList, NW_CSS_Prop_sibling, &prop ) == KBrsrSuccess ) - { - // get the next to the master box - if( prop.value.object != NULL ) - { - tempBox = NW_LMgr_BoxOf( prop.value.object ); - if( tempBox != NULL ) - { - // this must be a slave property list - propList = NW_LMgr_Box_PropListGet( NW_LMgr_BoxOf( tempBox ) ); - } - } - } - else - { - // this is not a chain - } - // let's go through the chain - if( propList ) - { - // at this point tempbox holds the box next to the master - do - { - // check if this box is visible - if( iView->IsBoxVisible( tempBox, &viewBounds ) ) - { - // we've got the box - found = NW_TRUE; - break; - } - // get the next box - tempBox = NW_LMgr_SlavePropertyList_GetSiblingBox( propList ); - propList = NW_LMgr_Box_PropListGet( tempBox ); - } - // NW_LMgr_SimplePropertyList_Class means that we are on the master box again. - while( !NW_Object_IsClass ( propList, &NW_LMgr_SimplePropertyList_Class ) ); - } - // since the "while" leaves out the masterbox, check it out here - if( found == NW_FALSE && tempBox ) - { - // check if this box is visible - if( iView->IsBoxVisible( tempBox, &viewBounds ) ) - { - // we've got the box - found = NW_TRUE; - } - } - } - } - *firstVisible = ( found == NW_TRUE ? tempBox : NULL ); -} - -// ----------------------------------------------------------------------------- -void -CMVCScroll::GetBoxRange(NW_LMgr_Box_t* box, NW_GDI_Metric_t* referenceY, NW_GDI_Metric_t* refY2, - NW_GDI_Metric_t* referenceX, NW_GDI_Metric_t* refX2 ) -{ - NW_LMgr_Box_t *masterBox = NULL, *firstBox = NULL; - NW_LMgr_PropertyList_t* propList; - NW_LMgr_Property_t prop; - - NW_ASSERT(box != NULL); - - propList = NW_LMgr_Box_PropListGet(box); - // We are inserting only the master boxes in the tree, so the box - // has to be master box - masterBox = box; - - // Get first box - do - { - prop.value.object = NULL; - if( propList ) - { - (void)NW_LMgr_PropertyList_Get(propList, NW_CSS_Prop_sibling, &prop); - // If we come back in a loop to the master box, then stop - if (prop.value.object == box) - { - break; - } - - if(prop.value.object != NULL) - { - firstBox = NW_LMgr_BoxOf(prop.value.object); - propList = NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(firstBox)); - NW_ASSERT (NW_Object_IsInstanceOf (propList, &NW_LMgr_PropertyList_Class)); - } - } - } while(prop.value.object != NULL); - - if(firstBox == NULL) - { - firstBox = box; - } - - /* ignore the sibling box with width and height as 0 */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( firstBox ); - - if( boxBounds.dimension.height==0 && boxBounds.dimension.width==0 ) - { - firstBox = masterBox; - } - - if (NW_Object_IsClass(firstBox, &NW_LMgr_AreaBox_Class) != NW_FALSE) - { - NW_GDI_Rectangle_t areaBoxBounds = NW_LMgr_AreaBox_GetBounds(firstBox); - - *referenceY = areaBoxBounds.point.y; - *referenceX = areaBoxBounds.point.x; - } - else - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds(firstBox); - *referenceY = boxBounds.point.y; - *referenceX = boxBounds.point.x; - } - - if (NW_Object_IsClass(masterBox, &NW_LMgr_AreaBox_Class) != NW_FALSE) - { - NW_GDI_Rectangle_t areaBoxBounds = NW_LMgr_AreaBox_GetBounds( masterBox ); - - *refY2 = (NW_GDI_Metric_t)(areaBoxBounds.point.y + areaBoxBounds.dimension.height); - *refX2 = (NW_GDI_Metric_t)(areaBoxBounds.point.x + areaBoxBounds.dimension.width); - } - else - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds(masterBox); - *refY2 = (NW_GDI_Metric_t)(boxBounds.point.y + boxBounds.dimension.height); - *refX2 = (NW_GDI_Metric_t)(boxBounds.point.x + boxBounds.dimension.width); - } - - return; -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::TabForward(TBool isNewPage, - TBool* noBoxVisible) -{ - NW_Evt_TabEvent_t tabEvent; - TBrowserStatusCode status; - NW_LMgr_Box_t* selectionCandidateBox = NULL; - NW_LMgr_Box_t* tempBox = NULL; - NW_GDI_Metric_t projectionX1 = 0; - NW_GDI_Metric_t projectionX2 = 0; - NW_GDI_Metric_t projectionS = 0; - NW_GDI_Metric_t projectionT = 0; - NW_GDI_Metric_t currentTopY = 0, currentBottomY = 0; - NW_GDI_Metric_t currentLeftX = 0, currentRightX = 0; - NW_GDI_Metric_t selectionCandidateTopY = 0, selectionCandidateBottomY = 0; - NW_GDI_Metric_t selectionCandidateLeftX = 0, selectionCandidateRightX = 0; - NW_GDI_Metric_t tempTopY = 0, tempBottomY = 0; - NW_GDI_Metric_t tempLeftX = 0, tempRightX = 0; - NW_LMgr_EventHandler_t *eventHandler = NULL; - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t scrolledBounds; - NW_GDI_Rectangle_t overlapS, overlapT; - NW_Bool update = NW_FALSE; - NW_Bool scrollCanHappen = NW_FALSE; - NW_Bool isPageRTL = NW_FALSE; - NW_Bool smallScreenOn; - NW_Int32 currentIndex = -1; - NW_GDI_Rectangle_t overlap; - NW_GDI_Rectangle_t boxBounds; - - // parameter assertion block - NW_ASSERT (iView != NULL); - - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Down); - - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( iView->GetRootBox() ); - isPageRTL = NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBoxOf(iView->GetRootBox())); - - if (isPageRTL) - { - projectionX1 = projectionX2 = RIGHT_ORIGIN + iView->GetRootBox()->extents.dimension.width; - currentLeftX = currentRightX = RIGHT_ORIGIN + iView->GetRootBox()->extents.dimension.width; - } - - viewBounds = *(iView->GetDeviceContext()->DisplayBounds()); - viewBounds.point = *(iView->GetDeviceContext()->Origin()); - - // master box is the lowest box in case of split; we need it in case of tab down - if (iView->GetCurrentBox() != NULL) - { - GetMasterBoxRange(iView->GetCurrentBox(), ¤tTopY, ¤tBottomY, - ¤tLeftX, ¤tRightX ); - } - - // Special handling for anchors - selectionCandidateBox = iView->GetCurrentBox(); - - if ((selectionCandidateBox != NULL) && - NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_ActiveContainerBox_Class)) - { - eventHandler = NW_LMgr_ActiveContainerBoxOf(selectionCandidateBox)->eventHandler; - } - - do - { - selectionCandidateBox = GetNextTabIndex(selectionCandidateBox, ¤tIndex); - if (eventHandler != NULL) - { - // for active container box, it has to be visible to be selection candidate - if ((selectionCandidateBox == NULL) || - !NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_ActiveContainerBox_Class) || - NW_LMgr_ActiveContainerBoxOf(selectionCandidateBox)->eventHandler != eventHandler) - { - eventHandler = NULL; - } - } - } while (eventHandler != NULL); - - // for SSL, always go to the next tab box - // for non-SSL, we should start from the selection box on the next line - if (selectionCandidateBox != NULL && !smallScreenOn ) - { - while(selectionCandidateBox != NULL) - { - GetFirstSiblingBoxRange(selectionCandidateBox, - &selectionCandidateTopY, &selectionCandidateBottomY, - &selectionCandidateLeftX, &selectionCandidateRightX); - - NW_LMgr_Box_t* tempSiblingBox = GetFirstSiblingBox (selectionCandidateBox); - boxBounds = NW_LMgr_Box_GetDisplayBounds( tempSiblingBox ); - - - // area boxes can over lap, so if the selection top Y is bigger than the current top Y, - // this will be our candidate selection box - if (NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_AreaBox_Class)) - { - if ((selectionCandidateTopY > currentTopY) && - (NW_GDI_Rectangle_Cross(&boxBounds, &viewBounds, &overlap))) - { - break; - } - } - else - { - // get the first box that has a lower "upper corner" than the current "lower corner" is - // or there's some overlap on the Y axis - // but left edge of the box is overlapping or to the left of the left edge of the current box - if( ( NW_GDI_Rectangle_Cross(&boxBounds, &viewBounds, &overlap) ) && - ( selectionCandidateTopY >= currentBottomY || - (!isPageRTL && selectionCandidateTopY < currentBottomY && selectionCandidateLeftX <= currentLeftX) || - (isPageRTL && selectionCandidateTopY < currentBottomY && selectionCandidateRightX >= currentRightX)) ) - - { - break; - } - } - selectionCandidateBox = GetNextTabIndex(selectionCandidateBox, ¤tIndex); - } - } - - // for non-SSL, we should find the selection box having visible projection with - // the current box - if (selectionCandidateBox != NULL && !smallScreenOn ) - { - NW_LMgr_Box_t* siblingBox = GetFirstSiblingBox( selectionCandidateBox ); - if( HowBigIsBoxVisible( siblingBox, - &viewBounds, &overlapS) ) - { - projectionX1 = overlapS.point.x > currentLeftX ? overlapS.point.x : currentLeftX; // max - projectionX2 = overlapS.point.x + overlapS.dimension.width < currentRightX ? - overlapS.point.x + overlapS.dimension.width : currentRightX; // min - projectionS = projectionX2 - projectionX1; - } - - NW_LMgr_Box_t* masterBox = selectionCandidateBox; - - // check if we've got more of them in the line immediate below and if so pick the left most - // one with projection - tempBox = selectionCandidateBox; - while( tempBox ) - { - tempBox = GetNextTabIndex(masterBox, ¤tIndex); - if( tempBox ) - { - NW_LMgr_Box_t* siblingBox = GetFirstSiblingBox( tempBox ); - if( siblingBox != tempBox ) - { - // - masterBox = tempBox; - tempBox = siblingBox; - } - else - { - masterBox = tempBox; - } - // - GetFirstSiblingBoxRange( tempBox, &tempTopY, &tempBottomY, - &tempLeftX, &tempRightX ); - /* check if this box is in the same line as the selected one or - */ - if( tempTopY >= selectionCandidateBottomY || - tempBottomY <= selectionCandidateTopY ) - { - break; // out of the line. - } - else - { - /* get left most box which has projection to the current box */ - /* - selectBox_Visible tempBox_Visible projectionT>0 projectionS>0 update - -------------------------------------------------------------------------- - No Yes N/A N/A TRUE - -------------------------------------------------------------------------- - No No N/A N/A FALSE - -------------------------------------------------------------------------- - Yes No N/A N/A FALSE - -------------------------------------------------------------------------- - Yes Yes Yes Yes FALSE - Yes No TRUE - No Yes FALSE - No No FALSE - */ - NW_LMgr_Box_t* selectionCandidateSiblingBox = GetFirstSiblingBox( selectionCandidateBox ); - if( !HowBigIsBoxVisible( selectionCandidateSiblingBox, - &viewBounds, &overlapS ) ) - { - if( HowBigIsBoxVisible( masterBox, &viewBounds, &overlapT ) ) - { - HowBigIsBoxVisible( masterBox, &viewBounds, &overlapT ); - projectionX1 = overlapT.point.x > currentLeftX ? overlapT.point.x : currentLeftX; // max - projectionX2 = overlapT.point.x + overlapT.dimension.width < currentRightX ? - overlapT.point.x + overlapT.dimension.width : currentRightX; // min - projectionT = projectionX2 - projectionX1; - update = NW_TRUE; - } - } - else - { - if( HowBigIsBoxVisible( tempBox, &viewBounds, &overlapT ) ) - { - projectionX1 = overlapT.point.x > currentLeftX ? overlapT.point.x : currentLeftX; // max - projectionX2 = overlapT.point.x + overlapT.dimension.width < currentRightX ? - overlapT.point.x + overlapT.dimension.width : currentRightX; // min - projectionT = projectionX2 - projectionX1; - - // area boxes can over lap, so if the temp projection is bigger, set update to true - if (NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_AreaBox_Class) && - NW_Object_IsClass(tempBox, &NW_LMgr_AreaBox_Class)) - { - if ( projectionT > projectionS ) - { - update = NW_TRUE; - } - } - else - { - if ( projectionT > 0 && projectionT > projectionS ) - { - update = NW_TRUE; - } - } - } - } - - if (update == NW_TRUE) - { - selectionCandidateBox = masterBox; - selectionCandidateTopY = tempTopY; - selectionCandidateBottomY = tempBottomY; - projectionS = projectionT; - - update = NW_FALSE; - } - } - } - } // end of while() - } - - if( projectionS == 0 ) - { - // scroll instead - selectionCandidateBox = NULL; - } - - // never pass invisible selection candidate to setcurrentbox(); - // let scroll happen only when scrollCanHappen or neither selection nor current box visible; - // scroll mean return NW_TRUE; others return NW_FALSE - /* - selBox != NULL & - selBoxVis selBoxVis curBoxVis scrlCanHappen action - InView InScrl InScrl - ----------------------------------------------------------------------------------------- - Yes N/A N/A no scroll; invoke SetCurrentBox() - ----------------------------------------------------------------------------------------- - No Yes&& - !isNewPage N/A scroll; currentBox = selectionBox - Yes&& - isNewPage N/A no scroll; do nothing - ----------------------------------------------------------------------------------------- - No No N/A No||isNewPage invoke GetVisibleBox(),SetCurrentBox() - ----------------------------------------------------------------------------------------- - Null or No Yes scroll; noBoxVisible = true - ----------------------------------------------------------------------------------------- - Yes Yes scroll - - - selBox == NULL & - curBoxVis scroCanHappen action - InScrl - ----------------------------------------------------------------------------------------- - N/A No||isNewPage invoke GetVisibleBox(),SetCurrentBox() - ----------------------------------------------------------------------------------------- - Null or No Yes scroll; noBoxVisible = true - ----------------------------------------------------------------------------------------- - Yes Yes scroll - */ - scrolledBounds = viewBounds; - scrollCanHappen = GetScrollDownBounds( iView, &scrolledBounds ); - if( selectionCandidateBox ) - { - /* selection candidate will be forced to be new current box in SetCurrentBox() */ - if(iView->IsBoxVisible(selectionCandidateBox, &viewBounds)) - { - if(KBrsrSuccess == SetCurrentBox(selectionCandidateBox, &tabEvent, - isNewPage, noBoxVisible)) - { - return NW_TRUE; - } - } - else if (iView->IsBoxVisible(selectionCandidateBox, &scrolledBounds)) - { - if( !isNewPage ) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (selectionCandidateBox != NULL) - { - NW_LMgr_Box_SetHasFocus (selectionCandidateBox, NW_TRUE); - } - - iView->SetCurrentBox (selectionCandidateBox); - - return NW_FALSE; - } - else - { - return NW_TRUE; - } - } - else - { - if (!scrollCanHappen || isNewPage) - { - if (isNewPage) - { - selectionCandidateBox = iView->GetVisibleBox(); - SetCurrentBox( selectionCandidateBox, &tabEvent, - isNewPage, noBoxVisible ); - } - else - { - selectionCandidateBox = iView->GetLastVisibleBox(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( selectionCandidateBox ); - - if( selectionCandidateBox != NULL && - boxBounds.point.y >= currentBottomY ) - { - SetCurrentBox( selectionCandidateBox, &tabEvent, isNewPage, noBoxVisible ); - } // else, keep current box as focused one - } - return NW_TRUE; - } - else - { - if (iView->GetCurrentBox() == NULL || - !iView->IsBoxVisible( iView->GetCurrentBox(), &scrolledBounds)) - { - *noBoxVisible = NW_TRUE; - } - return NW_FALSE; - } - } - } - else if (!scrollCanHappen || isNewPage) // end of if( selectionCandidateBox ) - { - if (isNewPage) - { - selectionCandidateBox = iView->GetVisibleBox(); - - if (!selectionCandidateBox) - { - currentIndex = -1; - selectionCandidateBox = GetNextTabIndex(selectionCandidateBox, ¤tIndex); - } - - SetCurrentBox( selectionCandidateBox, &tabEvent, - isNewPage, noBoxVisible ); - } - else - { - selectionCandidateBox = iView->GetLastVisibleBox(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( selectionCandidateBox ); - if( selectionCandidateBox != NULL && - boxBounds.point.y >= currentBottomY ) - { - SetCurrentBox( selectionCandidateBox, &tabEvent, - isNewPage, noBoxVisible ); - } // else, keep current box as focused one - } - return NW_TRUE; - } - else - { - if (iView->GetCurrentBox() == NULL || - !iView->IsBoxVisible( iView->GetCurrentBox(), &scrolledBounds)) - { - *noBoxVisible = NW_TRUE; - } - return NW_FALSE; - } - - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::TabBackward(TBool* noBoxVisible) -{ - NW_Evt_TabEvent_t tabEvent; - TBrowserStatusCode status; - NW_LMgr_Box_t* selectionCandidateBox = NULL; - NW_LMgr_Box_t* tempBox = NULL; - NW_GDI_Metric_t projectionX1 = 0; - NW_GDI_Metric_t projectionX2 = 0; - NW_GDI_Metric_t projectionS = 0; - NW_GDI_Metric_t projectionT = 0; - NW_GDI_Metric_t currentTopY = 0, currentBottomY = 0; - NW_GDI_Metric_t currentLeftX = 0, currentRightX = 0; - NW_GDI_Metric_t selectionCandidateTopY = 0, selectionCandidateBottomY = 0; - NW_GDI_Metric_t selectionCandidateLeftX = 0, selectionCandidateRightX = 0; - NW_GDI_Metric_t tempTopY = 0, tempBottomY = 0; - NW_GDI_Metric_t tempLeftX = 0, tempRightX = 0; - NW_LMgr_EventHandler_t *eventHandler = NULL; - NW_LMgr_RootBox_t* rootBox; - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t scrolledBounds; - NW_GDI_Rectangle_t overlapS, overlapT; - NW_Bool update = NW_FALSE; - NW_Bool smallScreenOn; - NW_Bool scrollCanHappen = NW_FALSE; - NW_Int32 currentIndex = -1; - NW_GDI_Rectangle_t overlap; - NW_GDI_Rectangle_t boxBounds; - - - // parameter assertion block - NW_ASSERT (iView != NULL); - - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Up); - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - rootBox = NW_LMgr_RootBoxOf(iView->GetRootBox()); - smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( rootBox ); - - viewBounds = *(iView->GetDeviceContext()->DisplayBounds()); - viewBounds.point = *(iView->GetDeviceContext()->Origin()); - - /* first sibling box is the highest box in case of split; we need it in case of tab up */ - - if (iView->GetCurrentBox() != NULL) - { - GetFirstSiblingBoxRange(iView->GetCurrentBox(), ¤tTopY, ¤tBottomY, - ¤tLeftX, ¤tRightX ); - } - - /* Find the first selection box that's not sibling of the current box; - Special handling for anchors */ - selectionCandidateBox = iView->GetCurrentBox(); - if ((selectionCandidateBox != NULL) && - NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_ActiveContainerBox_Class)) - { - eventHandler = NW_LMgr_ActiveContainerBoxOf(selectionCandidateBox)->eventHandler; - } - do - { - selectionCandidateBox = GetPreviousTabIndex( selectionCandidateBox, - ¤tIndex); - if (eventHandler != NULL) - { - /* for active container box, it has to be visible to be selection candidate */ - if (selectionCandidateBox == NULL || - !NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_ActiveContainerBox_Class) || - NW_LMgr_ActiveContainerBoxOf(selectionCandidateBox)->eventHandler != eventHandler) - { - eventHandler = NULL; - } - } - } - while (eventHandler != NULL); - - /* for SSL, always go to the next tab box */ - /* for non-SSL, we should start from the selection box on the previous line */ - if (selectionCandidateBox != NULL && !smallScreenOn ) - { - while(selectionCandidateBox != NULL) - { - GetFirstSiblingBoxRange( selectionCandidateBox, - &selectionCandidateTopY, &selectionCandidateBottomY, - &selectionCandidateLeftX, &selectionCandidateRightX ); - - NW_LMgr_Box_t* tempSiblingBox = GetFirstSiblingBox (selectionCandidateBox); - boxBounds = NW_LMgr_Box_GetDisplayBounds( tempSiblingBox ); - - // area boxes can overlap so if the selection bottom Y is less than the current bottom Y, - // set this is the box we want as our candidate selection box - if (NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_AreaBox_Class)) - { - if (selectionCandidateBottomY < currentBottomY) - { - break; - } - } - else - { - /* get the fist box that has a lower "upper corner" then the current "lower corner" is */ - if( ( NW_GDI_Rectangle_Cross(&boxBounds, &viewBounds, &overlap) ) && - ( selectionCandidateBottomY <= currentTopY || - ((selectionCandidateBottomY > currentTopY) && - ((selectionCandidateBottomY - currentTopY) < (currentBottomY - currentTopY)/2) && - ((selectionCandidateBottomY - currentTopY) < (selectionCandidateBottomY - selectionCandidateTopY)/2)))) - { - break; - } - } - selectionCandidateBox = GetPreviousTabIndex( selectionCandidateBox, - ¤tIndex ); - } - } - - /* for non-SSL, we should find the selection box having projection to the current box*/ - if (selectionCandidateBox != NULL && !smallScreenOn ) - { - NW_LMgr_Box_t* siblingBox = GetFirstSiblingBox( selectionCandidateBox ); - if( HowBigIsBoxVisible( siblingBox, - &viewBounds, &overlapS) ) - { - projectionX1 = overlapS.point.x > currentLeftX ? overlapS.point.x : currentLeftX; // max - projectionX2 = overlapS.point.x + overlapS.dimension.width < currentRightX ? - overlapS.point.x + overlapS.dimension.width : currentRightX; // min - projectionS = projectionX2 - projectionX1; - } - - /* check if we've got more of them in the line immediate below and if so pick the left most - one with projection - */ - NW_LMgr_Box_t* masterBox = selectionCandidateBox; - tempBox = selectionCandidateBox; - while( tempBox ) - { - tempBox = GetPreviousTabIndex(masterBox, ¤tIndex); - // get the first sibling - if( tempBox ) - { - NW_LMgr_Box_t* siblingBox = GetFirstSiblingBox( tempBox ); - if( siblingBox != tempBox ) - { - // - masterBox = tempBox; - tempBox = siblingBox; - } - else - { - masterBox = tempBox; - } - // - GetFirstSiblingBoxRange( tempBox, &tempTopY, &tempBottomY, - &tempLeftX, &tempRightX ); - /* check if this box is in the same line as the selected one or - */ - if( tempTopY >= selectionCandidateBottomY || - tempBottomY <= selectionCandidateTopY ) - { - break; // out of the line. - } - else - { - /* get left most(ltr)/right most(rtl) box which has projection to the current box */ - /* - selectBox_Visible tempBox_Visible projectionT>0 projectionS>0 update - -------------------------------------------------------------------------- - No Yes N/A N/A TRUE - -------------------------------------------------------------------------- - No No N/A N/A TRUE - -------------------------------------------------------------------------- - Yes No N/A N/A FALSE - -------------------------------------------------------------------------- - Yes Yes Yes N/A TRUE - No Yes FALSE - No No TRUE - */ - if( !HowBigIsBoxVisible(selectionCandidateBox, - &viewBounds, &overlapS) ) - { - if( HowBigIsBoxVisible( masterBox, &viewBounds, &overlapT ) ) - { - HowBigIsBoxVisible( masterBox, &viewBounds, &overlapT ); - projectionX1 = overlapT.point.x > currentLeftX ? overlapT.point.x : currentLeftX; // max - projectionX2 = overlapT.point.x + overlapT.dimension.width < currentRightX ? - overlapT.point.x + overlapT.dimension.width : currentRightX; // min - projectionT = projectionX2 - projectionX1; - update = NW_TRUE; - } - } - else - { - if( HowBigIsBoxVisible( masterBox, &viewBounds, &overlapT ) ) - { - projectionX1 = overlapT.point.x > currentLeftX ? overlapT.point.x : currentLeftX; // max - projectionX2 = overlapT.point.x + overlapT.dimension.width < currentRightX ? - overlapT.point.x + overlapT.dimension.width : currentRightX; // min - projectionT = projectionX2 - projectionX1; - - // area boxes can over lap, so if the temp projection is bigger, set update to true - if (NW_Object_IsClass(selectionCandidateBox, &NW_LMgr_AreaBox_Class) && - NW_Object_IsClass(tempBox, &NW_LMgr_AreaBox_Class)) - { - if ( projectionT > projectionS ) - { - update = NW_TRUE; - } - } - else - { - // if ( projectionT > 0 || (projectionS <= 0 && projectionT <= 0) ) - if ( projectionT > 0 && projectionT > projectionS ) - { - update = NW_TRUE; - } - } - } - } - - if (update == NW_TRUE) - { - selectionCandidateBox = masterBox; - selectionCandidateTopY = tempTopY; - selectionCandidateBottomY = tempBottomY; - projectionS = projectionT; - - update = NW_FALSE; - } - } - } - } - } - - /* never pass invisible selection candidate to setcurrentbox(); - let scroll happen only when scrollCanHappen or neither selection nor current box visible; - scroll mean return NW_TRUE; others return NW_FALSE - */ - /* - selBox != NULL & - selBoxVis selBoxVis curBoxVis scrlCanHappen action - InView InScrl InScrl - ----------------------------------------------------------------------------------------- - Yes N/A N/A no scroll; invoke SetCurrentBox() - ----------------------------------------------------------------------------------------- - No Yes N/A scroll; currentBox = selectionBox - ----------------------------------------------------------------------------------------- - No No Null or No Yes scroll; noBoxVisible = true - ----------------------------------------------------------------------------------------- - Yes Yes scroll - ----------------------------------------------------------------------------------------- - N/A No invoke GetVisibleBox(),SetCurrentBox() - - - selBox == NULL & - curBoxVisInScrl scroCanHappen action - ----------------------------------------------------------------------------------------- - Null or No Yes scroll; noBoxVisible = true - ----------------------------------------------------------------------------------------- - Yes Yes scroll - ----------------------------------------------------------------------------------------- - N/A No invoke GetVisibleBox(),SetCurrentBox() - */ - - if( projectionS == 0 ) - { - // scroll instead - selectionCandidateBox = NULL; - } - - scrolledBounds = viewBounds; - scrollCanHappen = GetScrollUpBounds( iView, &scrolledBounds ); - if (selectionCandidateBox) - { - /* selection candidate will be forced to be new current box in SetCurrentBox() */ - if(iView->IsBoxVisible( selectionCandidateBox, &viewBounds)) - { - if(KBrsrSuccess == SetCurrentBox(selectionCandidateBox, &tabEvent, - NW_FALSE, noBoxVisible)) - { - return NW_TRUE; - } - } - else if (iView->IsBoxVisible( selectionCandidateBox, &scrolledBounds)) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (selectionCandidateBox != NULL) - { - NW_LMgr_Box_SetHasFocus (selectionCandidateBox, NW_TRUE); - } - iView->SetCurrentBox (selectionCandidateBox); - } - else - { - if (scrollCanHappen) - { - if (iView->GetCurrentBox() == NULL || - !iView->IsBoxVisible( iView->GetCurrentBox(), &scrolledBounds)) - { - *noBoxVisible = NW_TRUE; - } - return NW_FALSE; - } - else - { - selectionCandidateBox = iView->GetVisibleBox(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( selectionCandidateBox ); - - if( selectionCandidateBox != NULL && - boxBounds.point.y + boxBounds.dimension.height <= currentTopY ) - { - SetCurrentBox( selectionCandidateBox, &tabEvent, - NW_FALSE, noBoxVisible ); - } - return NW_TRUE; - } - } - } - else if (scrollCanHappen) // end of if( selectionCandidateBox ) - { - if (iView->GetCurrentBox() == NULL || - !iView->IsBoxVisible( iView->GetCurrentBox(), &scrolledBounds)) - { - *noBoxVisible = NW_TRUE; - } - return NW_FALSE; - } - else - { - selectionCandidateBox = iView->GetVisibleBox(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( selectionCandidateBox ); - - if( selectionCandidateBox != NULL && - boxBounds.point.y + boxBounds.dimension.height <= currentTopY ) - { - SetCurrentBox( selectionCandidateBox, &tabEvent, - NW_FALSE, noBoxVisible); - } - return NW_TRUE; - } - - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -// SetCurrentBox -// Description: The algorithm for below method assumes that we ignore any new -// active box that is above, below, to the right or left that is not inside the -// display bounds. On certain platforms it may be necessary to change the below -// algorithm so that the new active box can be anywhere in the page and on -// calling the below function it is going to return true -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CMVCScroll::SetCurrentBox (NW_LMgr_Box_t* newBox, - NW_Evt_TabEvent_t* tabEvent, - TBool isNewPage, - TBool* noBoxVisible) -{ - //lint --e{774}, newBox is always non-null after the null check... - - NW_GDI_Rectangle_t viewBounds, scrolledBounds; - NW_GDI_Rectangle_t boxBounds; - NW_GDI_Rectangle_t newBoxBounds; - TBrowserStatusCode status = KBrsrFailure; - NW_Bool scrollingToLinkOnSameLine = NW_FALSE; - NW_Bool smallScreenOn; - - // parameter assertion block - NW_ASSERT (iView != NULL); - - if (newBox == NULL) - { - return status; - } - - if (isNewPage) - { - iView->SetCurrentBox (NULL); - } - - smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( iView->GetRootBox() ); - // initialize the viewBounds - viewBounds = *(iView->GetDeviceContext()->DisplayBounds()); - viewBounds.point = *(iView->GetDeviceContext()->Origin()); - // - boxBounds = NW_LMgr_Box_GetDisplayBounds(iView->GetCurrentBox()); - if (iView->GetCurrentBox() != NULL) - { - if (NW_Object_IsClass(iView->GetCurrentBox(), &NW_LMgr_AreaBox_Class) != NW_FALSE) - { - boxBounds = NW_LMgr_AreaBox_GetBounds(iView->GetCurrentBox()); - } - else - { - boxBounds = NW_LMgr_Box_GetDisplayBounds(iView->GetCurrentBox()); - } - } - // - newBoxBounds = NW_LMgr_Box_GetDisplayBounds(newBox); - if (newBox != NULL) - { - if (NW_Object_IsClass(newBox, &NW_LMgr_AreaBox_Class) != NW_FALSE) - { - newBoxBounds = NW_LMgr_AreaBox_GetBounds(newBox); - } - else - { - newBoxBounds = NW_LMgr_Box_GetDisplayBounds(newBox); - } - } - - // if the currentBox is invisible and scrolling make it more visible - // keep it as the currentBox - if (iView->GetCurrentBox() != NULL && - !iView->IsBoxVisible( iView->GetCurrentBox(), &viewBounds)) - { - switch (NW_Evt_TabEvent_GetDirection (tabEvent)) - { - case NW_Evt_TabEvent_Direction_Down: - { - if( smallScreenOn ) - { - if (viewBounds.point.y + viewBounds.dimension.height <= boxBounds.point.y + iView->GetVisibleAmt().height) - { - return status; - } - } - break; - } - case NW_Evt_TabEvent_Direction_Right: - { - if (viewBounds.point.x + viewBounds.dimension.width <= boxBounds.point.x + iView->GetVisibleAmt().width) - { - return status; - } - break; - } - case NW_Evt_TabEvent_Direction_Up: - { - if( smallScreenOn ) - { - if (boxBounds.point.y + boxBounds.dimension.height <= viewBounds.point.y + iView->GetVisibleAmt().height) - { - return status; - } - } - break; - } - case NW_Evt_TabEvent_Direction_Left: - { - if (boxBounds.point.x + boxBounds.dimension.width <= viewBounds.point.x + iView->GetVisibleAmt().width) - { - return status; - } - break; - } - default: - { - break; - } - } - } - - // ignore all boxes lying above, to the left or to the right of the current - // view window - // if this is a new page loaded, we should not consider ScrollAmt, since it won't - // do scrollAfterCurrentBox - if ((isNewPage) && (!iView->IsBoxVisible( newBox, &viewBounds))) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (newBox != NULL) - { - NW_LMgr_Box_SetHasFocus (newBox, NW_TRUE); - iView->SetCurrentBox (newBox); - } - *noBoxVisible = NW_TRUE; - return status; - } - - // otherwise we need test if it's visible after the futher scrolling, in addition to - // simple isBoxVislble - switch (NW_Evt_TabEvent_GetDirection (tabEvent)) - { - case NW_Evt_TabEvent_Direction_Down: - { - if( smallScreenOn ) - { - scrolledBounds = viewBounds; - scrolledBounds.point.y = - (NW_GDI_Metric_t)(scrolledBounds.point.y + iView->GetScrollAmt().height); - - if (iView->IsBoxVisible( newBox, &viewBounds)) - { - status = KBrsrSuccess; - } - else if (iView->IsBoxVisible( newBox, &scrolledBounds)) - { - // if the box is visible in the scroll bounds, set focus, force the box, then - // return a failure status so that the scrolling happens - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (newBox != NULL) - { - NW_LMgr_Box_SetHasFocus (newBox, NW_TRUE); - } - - // do not refresh here. The caller will refresh the entire page as we scrolled. - (void) iView->ForceCurrentBox ( newBox, (NW_Bool)isNewPage, NW_FALSE ); - return status; - } - } - else - { - status = KBrsrSuccess; - } - break; - } - - case NW_Evt_TabEvent_Direction_Up: - { - if( smallScreenOn ) - { - scrolledBounds = viewBounds; - scrolledBounds.point.y = - (NW_GDI_Metric_t)(scrolledBounds.point.y - iView->GetScrollAmt().height); - - if (iView->IsBoxVisible( newBox, &viewBounds)) - { - status = KBrsrSuccess; - } - else if (iView->IsBoxVisible( newBox, &scrolledBounds)) - { - // if the box is visible in the scroll bounds, set focus, force the box, then - // return a failure status so that the scrolling happens - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (newBox != NULL) - { - NW_LMgr_Box_SetHasFocus (newBox, NW_TRUE); - } - - // do not refresh here. The caller will refresh the entire page as we scrolled. - (void) iView->ForceCurrentBox ( newBox, (NW_Bool)isNewPage, NW_FALSE); - return status; - } - } - else - { - status = KBrsrSuccess; - } - break; - } - case NW_Evt_TabEvent_Direction_Right: - { - scrolledBounds = viewBounds; - scrolledBounds.point.x = - (NW_GDI_Metric_t)(scrolledBounds.point.x + iView->GetScrollAmt().width); - - if (IsBoxVisibleInEither(newBox, &scrolledBounds, &viewBounds)) - { - status = KBrsrSuccess; - } - else if (boxBounds.point.y == newBoxBounds.point.y && - boxBounds.point.x < newBoxBounds.point.x) - { - scrollingToLinkOnSameLine = NW_TRUE; - } - break; - } - case NW_Evt_TabEvent_Direction_Left: - { - scrolledBounds = viewBounds; - scrolledBounds.point.x = - (NW_GDI_Metric_t)(scrolledBounds.point.x - iView->GetScrollAmt().width); - - if (IsBoxVisibleInEither(newBox, &scrolledBounds, &viewBounds)) - { - status = KBrsrSuccess; - } - else if (boxBounds.point.y == newBoxBounds.point.y && - boxBounds.point.x > newBoxBounds.point.x) - { - scrollingToLinkOnSameLine = NW_TRUE; - } - break; - } - }// end of switch on direction - - - if (status == KBrsrSuccess) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (newBox != NULL) - { - NW_LMgr_Box_SetHasFocus (newBox, NW_TRUE); - } - status = iView->ForceCurrentBox ( newBox, (NW_Bool)isNewPage, NW_TRUE); - } - else - { - if (iView->GetCurrentBox() != NULL && - !iView->IsBoxVisible( iView->GetCurrentBox(), &viewBounds)) - { - if (scrollingToLinkOnSameLine == NW_TRUE) - { - *noBoxVisible = NW_FALSE; - } - else - { - *noBoxVisible = NW_TRUE; - } - } - } - - return status; -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::TabLeft(TBool* noBoxVisible) -{ - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* firstVisible = NULL; - NW_Evt_TabEvent_t tabEvent; - TBrowserStatusCode status = KBrsrFailure; - NW_GDI_Metric_t reference = 0, refY2 = 0; - NW_GDI_Metric_t referenceX = 0, refX2 = 0; - NW_GDI_Metric_t boxReference = 0, boxY2 = 0; - NW_GDI_Metric_t boxReferenceX = 0, boxX2 = 0; - NW_LMgr_RootBox_t* rootBox = iView->GetRootBox(); - NW_Bool isPageRTL = NW_FALSE; - NW_Int32 currentIndex = -1; - - isPageRTL = NW_LMgr_RootBox_IsPageRTL(rootBox); - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Left); - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - if (iView->GetCurrentBox() != NULL) - { - GetBoxRange(iView->GetCurrentBox(), &reference, &refY2, &referenceX, &refX2 ); - } - - if (isPageRTL) - { - box = GetNextTabIndex(iView->GetCurrentBox(), ¤tIndex); - } - else - { - box = GetPreviousTabIndex(iView->GetCurrentBox(), ¤tIndex); - } - - if (!box) - { - return NW_FALSE; - } - - GetBoxRange(box, &boxReference, &boxY2, &boxReferenceX, &boxX2 ); - // If upper edge of next box is lower than the lower edge of current box - // or lower edge of next box is higher than the upper edge of current box - // we can not move right - if ((boxReference >= refY2) || (boxY2 <= reference)) - { - return NW_FALSE; - } - - // check if the selection candidate box is visible - GetFirstVisible(box, &firstVisible ); - if( firstVisible == NULL ) - { - // try with the original one - firstVisible = box; - } - if(KBrsrSuccess == SetCurrentBox(firstVisible, &tabEvent, NW_FALSE, noBoxVisible)) - { - return NW_TRUE; - } - - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::TabRight(TBool* noBoxVisible) - { - NW_LMgr_Box_t* firstVisible = NULL; - NW_LMgr_Box_t* box = NULL; - NW_Evt_TabEvent_t tabEvent; - TBrowserStatusCode status = KBrsrFailure; - NW_GDI_Metric_t reference = 0, refY2 = 0; - NW_GDI_Metric_t referenceX = 0, refX2 = 0; - NW_GDI_Metric_t boxReference = 0, boxY2 = 0; - NW_GDI_Metric_t boxReferenceX = 0, boxX2 = 0; - NW_LMgr_RootBox_t* rootBox = iView->GetRootBox(); - NW_Bool isPageRTL = NW_FALSE; - NW_Int32 currentIndex = -1; - - isPageRTL = NW_LMgr_RootBox_IsPageRTL(rootBox); - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Right); - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - if (iView->GetCurrentBox() != NULL) - { - GetBoxRange(iView->GetCurrentBox(), &reference, &refY2, &referenceX, &refX2 ); - } - - box = iView->GetCurrentBox(); - - if (isPageRTL) - { - box = GetPreviousTabIndex(box, ¤tIndex); - } - else - { - box = GetNextTabIndex(box, ¤tIndex); - } - - if (!box) - { - return NW_FALSE; - } - - GetBoxRange(box, &boxReference, &boxY2, &boxReferenceX, &boxX2 ); - // If upper edge of next box is lower than the lower edge of current box - // or lower edge of next box is higher than the upper edge of current box - // we can not move right - if ((boxReference >= refY2) || (boxY2 <= reference)) - { - return NW_FALSE; - } - - // check if the selection candidate box is visible - GetFirstVisible(box, &firstVisible); - if( firstVisible == NULL ) - { - // try with the original one - firstVisible = box; - } - if(KBrsrSuccess == SetCurrentBox(firstVisible , &tabEvent, NW_FALSE, noBoxVisible)) - { - return NW_TRUE; - } - - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -CMVCScroll::GetNextTabIndex(const NW_LMgr_Box_t* oldBox, - NW_Int32* currentTabIndex) - { - return GetTabIndex( oldBox, NW_TRUE, currentTabIndex ); -} - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -CMVCScroll::GetPreviousTabIndex (const NW_LMgr_Box_t* oldBox, - NW_Int32* currentTabIndex) -{ - return GetTabIndex( oldBox, NW_FALSE, currentTabIndex ); - } - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::ScrollLink(NW_Evt_ControlKeyType_t key, - TBool* noBoxVisible) -{ - NW_LMgr_Box_t* currentBox = NULL; - NW_LMgr_Box_t* selectionCandidateBox = NULL; - NW_Evt_TabEvent_t tabEvent; - TBrowserStatusCode status; - NW_LMgr_Box_t* firstVisible = NULL; - NW_Int32 currentIndex = -1; - - // parameter assertion block - NW_ASSERT (iView != NULL); - - if (key == NW_Evt_ControlKeyType_Down) - { - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Down); - } - else - { - status = NW_Evt_TabEvent_Initialize (&tabEvent, NW_Evt_TabEvent_Direction_Up); - } - - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - // Special handling for anchors - currentBox = iView->GetCurrentBox(); - if (currentBox && currentBox->propList) - { - if (NW_Object_IsInstanceOf(currentBox->propList, &NW_LMgr_SlavePropertyList_Class)) - { - // this is a slave, get the master box - // if master box does not have size problem - // we should use the master box as selectionCandidateBox - NW_LMgr_Box_t* tempBox = - NW_LMgr_SlavePropertyList_GetMasterBox(NW_LMgr_SlavePropertyListOf(currentBox->propList)); - NW_ASSERT(tempBox); - NW_GDI_Rectangle_t boxBounds; - NW_Bool isVisible = NW_LMgr_Box_GetVisibleBounds (tempBox, &boxBounds); - if (isVisible && boxBounds.dimension.width != 0 && boxBounds.dimension.height != 0) - { - currentBox = tempBox; - } - // else: master box has size problem - // we should use the slave box as selectionCandidateBox - } - } - - if (key == NW_Evt_ControlKeyType_Down) - { - selectionCandidateBox = GetNextTabIndex(currentBox, ¤tIndex); - } - else - { - selectionCandidateBox = GetPreviousTabIndex(currentBox, ¤tIndex); - } - - // check if the selection candidate box is visible - if (selectionCandidateBox) - { - GetFirstVisible(selectionCandidateBox, &firstVisible ); - } - - if( firstVisible ) - { - if(KBrsrSuccess == SetCurrentBox(selectionCandidateBox, &tabEvent, - NW_FALSE, noBoxVisible)) - { - return NW_TRUE; - } - } - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -NW_Uint16 -CMVCScroll::GetScrollAmount() -{ - TGDIDeviceContextFontSizeLevel fontSizeLevel = - (TGDIDeviceContextFontSizeLevel)NW_Settings_GetFontSizeLevel(); - - // return calculated for 2 lines - switch(fontSizeLevel) - { - case EGDIDeviceContextFontSizeLevelAllSmall: - case EGDIDeviceContextFontSizeLevelSmaller: - return (SMALL_SCROLL * 2); - - case EGDIDeviceContextFontSizeLevelNormal: - return (NORMAL_SCROLL * 2); - - case EGDIDeviceContextFontSizeLevelLarger: - case EGDIDeviceContextFontSizeLevelAllLarge: - return (LARGE_SCROLL * 2); - - default: - return (NORMAL_SCROLL * 2); - } -} - -// ----------------------------------------------------------------------------- -NW_Uint16 -CMVCScroll::GetPagingAmount() -{ - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - NW_GDI_Metric_t height = 0; - - deviceContext = NW_LMgr_RootBox_GetDeviceContext (iView->GetRootBox()); - - rectangle = deviceContext->DisplayBounds(); - - height = (NW_GDI_Metric_t)(rectangle->dimension.height); - - TGDIDeviceContextFontSizeLevel fontSizeLevel = - (TGDIDeviceContextFontSizeLevel)NW_Settings_GetFontSizeLevel(); - - switch(fontSizeLevel) - { - case EGDIDeviceContextFontSizeLevelAllSmall: - case EGDIDeviceContextFontSizeLevelSmaller: - return (NW_Uint16)(height - (SMALL_SCROLL * 2)); - - case EGDIDeviceContextFontSizeLevelNormal: - return (NW_Uint16)(height - (NORMAL_SCROLL * 2)); - - case EGDIDeviceContextFontSizeLevelLarger: - case EGDIDeviceContextFontSizeLevelAllLarge: - return (NW_Uint16)(height - (LARGE_SCROLL * 2)); - - default: - return (NW_Uint16)(height - (NORMAL_SCROLL * 2)); - } -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::ProcessControlKey(NW_Evt_ControlKeyType_t key) -{ - TBool noBoxVisible = EFalse; - NW_Evt_ScrollEvent_t scrollEvent; - TBool absorbed = EFalse; - NW_Uint16 scrollAmount = 18; - - // first we try to issue a tab event - - switch(key) - { - case NW_Evt_ControlKeyType_Left: - - absorbed = TabLeft(&noBoxVisible); - break; - - case NW_Evt_ControlKeyType_Right: - - absorbed = TabRight(&noBoxVisible); - break; - - case NW_Evt_ControlKeyType_Up: - - absorbed = TabBackward(&noBoxVisible); - break; - - case NW_Evt_ControlKeyType_Down: - - absorbed = TabForward(NW_FALSE, &noBoxVisible); - break; - - default: - break; - } - - if (absorbed) - { - return NW_TRUE; - } - - // we were unable to tab - next we try to scroll - TBrowserStatusCode status = KBrsrSuccess; - if (status) {} // fix warning - switch (key) - { - case NW_Evt_ControlKeyType_Left: - scrollAmount = (NW_Uint16)iView->GetScrollAmt().width; - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Left, - scrollAmount); - - break; - case NW_Evt_ControlKeyType_Right: - scrollAmount = (NW_Uint16)iView->GetScrollAmt().width; - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Right, - scrollAmount); - - break; - case NW_Evt_ControlKeyType_Up: - scrollAmount = (NW_Uint16)iView->GetScrollAmt().height; - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Up, - scrollAmount); - - break; - case NW_Evt_ControlKeyType_Down: - scrollAmount = (NW_Uint16)iView->GetScrollAmt().height; - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Down, - scrollAmount); - - break; - default: - break; - } - - NW_ASSERT (status == KBrsrSuccess); - - //lint -e{645} Symbol may not have been initialized - absorbed = iView->EpocProcessEvent ((const NW_Evt_Event_t*) &scrollEvent); - - if(absorbed && noBoxVisible) - { - NW_LMgr_Box_t* box = NULL; - // Scroll event was absorbed and there is no active box visible so, - // try to see if scrolling changes the situation. - box = iView->GetVisibleBox(); - - if(box != NULL) - { - // Scroll event was absorbed and there is no active box visible so, - // try to see if scrolling changes the situation. - // scrolling up should focus on the lowest box; - // scrolling down should focus on the highest box - switch (key) - { - case NW_Evt_ControlKeyType_Left: - case NW_Evt_ControlKeyType_Right: - iView->ForceCurrentBox ( box, NW_FALSE, NW_TRUE); - - break; - - case NW_Evt_ControlKeyType_Down: - if (box != iView->GetCurrentBox()) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (box != NULL) - { - NW_LMgr_Box_SetHasFocus (box, NW_TRUE); - } - - // do not refresh here. The caller will refresh the entire page as we scrolled. - (void) iView->ForceCurrentBox ( box, NW_FALSE, NW_FALSE ); - } - - break; - - case NW_Evt_ControlKeyType_Up: - box = iView->GetLastVisibleBox(); - if(box != NULL) - { - iView->SetCurrentBox (box); - } - break; - - default: - break; - } // end of switch - } // end of if(absorbed && noBoxVisible) - } - return (NW_Bool)absorbed; -} - -// ----------------------------------------------------------------------------- -// CMVCScroll::ProcessControlKeyVL -// Description: This method handles the processing of control keys when in -// Vertical Layout mode (hince the VL at the end of the method name) -// Returns: TBool : NW_TRUE if the event was absorbed, NW_FALSE otherwise -// ----------------------------------------------------------------------------- -// -TBool -CMVCScroll::ProcessControlKeyVL(NW_Evt_ControlKeyType_t key) -{ - TBool noBoxVisible = EFalse; - TBrowserStatusCode status = KBrsrSuccess; - NW_Evt_ScrollEvent_t scrollEvent; - TBool absorbed = EFalse; - NW_Uint16 scrollAmount = 18; - - switch(key) - { - case NW_Evt_ControlKeyType_Left: - case NW_Evt_ControlKeyType_Right: - { - absorbed = ScrollPage(key); - break; - } - case NW_Evt_ControlKeyType_Up: - case NW_Evt_ControlKeyType_Down: - { - absorbed = ScrollLink(key, &noBoxVisible); - break; - } - default: - { - absorbed = EFalse; - break; - } - } - - if( !absorbed ) - { - // we were unable to tab - next we try to scroll - scrollAmount = GetScrollAmount(); - - // we were unable to tab - next we try to scroll - switch (key) - { - case NW_Evt_ControlKeyType_Up: - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Up, - scrollAmount); - break; - } - case NW_Evt_ControlKeyType_Down: - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Down, - scrollAmount); - break; - } - default: - { - status = KBrsrFailure; - break; - } - } //end switch - - if( status == KBrsrSuccess ) - { - absorbed = iView->EpocProcessEvent ((const NW_Evt_Event_t*) &scrollEvent); - - if(absorbed && noBoxVisible) - { - NW_LMgr_Box_t* box = NULL; - // Scroll event was absorbed and there is no active box visible so, - // try to see if scrolling changes the situation. - box = iView->GetVisibleBox(); - if(box != NULL) - { - (void) iView->ForceCurrentBox ( box, NW_FALSE, NW_TRUE); - } - } - } - } - return (NW_Bool)absorbed; -} - -// ----------------------------------------------------------------------------- -TBool -CMVCScroll::ScrollPage(NW_Evt_ControlKeyType_t key) -{ - NW_GDI_Point2D_t origin; - NW_Uint16 scrollAmount = 18; - NW_Evt_ScrollEvent_t scrollEvent; - TBool absorbed = EFalse; - - scrollAmount = GetPagingAmount(); - origin = *(iView->GetDeviceContext()->Origin()); - - TBrowserStatusCode status = KBrsrSuccess; - if (status) {} // fix warning - - switch (key) - { - case NW_Evt_ControlKeyType_Home: - case NW_Evt_ControlKeyType_End: - { - // scroll up to the first page or - // scroll to the last page - NW_Int32 endAmount; - NW_GDI_Dimension2D_t canvasSize; - NW_GDI_Rectangle_t deviceBounds; - - // change keys in case of right to left page - if( NW_LMgr_RootBox_IsPageRTL( NW_LMgr_RootBoxOf( iView->GetRootBox() ) ) == NW_TRUE ) - { - key = ( key == NW_Evt_ControlKeyType_Home ? - NW_Evt_ControlKeyType_End : NW_Evt_ControlKeyType_Home ); - } - - // initialize key events - if( key == NW_Evt_ControlKeyType_Home ) - { - scrollAmount = (NW_Uint16)origin.y; - status = - NW_Evt_ScrollEvent_Initialize( &scrollEvent, - NW_Evt_ScrollEvent_Direction_Up, - scrollAmount ); - } - else - // NW_Evt_ControlKeyType_End - { - (void)NW_LMgr_RootBox_GetExtents( iView->GetRootBox(), &canvasSize ); - deviceBounds = *(iView->GetDeviceContext()->DisplayBounds()); - // calculate amount of srcoll - endAmount = canvasSize.height - deviceBounds.dimension.height - origin.y; - // adjust it - scrollAmount = (NW_Uint16)( endAmount > 0 ? endAmount : 0 ); - - status = - NW_Evt_ScrollEvent_Initialize( &scrollEvent, - NW_Evt_ScrollEvent_Direction_Down, - scrollAmount ); - } - break; - } - case NW_Evt_ControlKeyType_Left: - if (NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBoxOf(iView->GetRootBox()))) - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Down, - scrollAmount); - } - else - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Up, - scrollAmount); - } - break; - case NW_Evt_ControlKeyType_Right: - if (NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBoxOf(iView->GetRootBox()))) - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Up, - scrollAmount); - } - else - { - status = - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - NW_Evt_ScrollEvent_Direction_Down, - scrollAmount); - } - break; - - default: - break; - } - - NW_ASSERT (status == KBrsrSuccess); - - // in page up/page down case, - // change the current box only if the origin has been changed. - // which means that we really did do a page up/page down. - // this is meant to filter cases when the user hits page up on - // the first page or page down on the last one. - - //lint -e{645} Symbol may not have been initialized - absorbed = iView->EpocProcessEvent ((const NW_Evt_Event_t*) &scrollEvent); - - if(absorbed) - { - // check if the origin has been changed - NW_GDI_Point2D_t newOrigin; - newOrigin = *(iView->GetDeviceContext()->Origin()); - if( newOrigin.y != origin.y ) - { - NW_LMgr_Box_t* box = NULL; - - box = iView->GetVisibleBox (); - if( box != NULL ) - { - if( box != iView->GetCurrentBox() ) - { - if (iView->GetCurrentBox() != NULL) - { - NW_LMgr_Box_SetHasFocus (iView->GetCurrentBox(), NW_FALSE); - } - if (box != NULL) - { - NW_LMgr_Box_SetHasFocus (box, NW_TRUE); - } - - // do not refresh here. The caller will refresh the entire page as we scrolled. - (void) iView->ForceCurrentBox ( box, NW_FALSE, NW_FALSE ); - - (void) iView->ScrollAfterCurrentBox( iView->GetCurrentBox(), NW_TRUE ); - } - } - } - } - return absorbed; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/MVCShell.cpp --- a/webengine/wmlengine/src/MVC/src/MVCShell.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4576 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // resolve NULL redefinition warning. -#include <e32base.h> -#include <e32std.h> -#include <bldvariant.hrh> -#include <charconv.h> -#include <eikenv.h> -#include <f32file.h> -#include <stddef.h> -#include <stdlib.h> -#include <StringLoader.h> -#include <CUserAgent.h> -#include <webkit.rsg> -#include <uri16.h> -#include <apmstd.h> -#include <caf/caf.h> -#include <caf/caftypes.h> -#include <caf/supplieroutputfile.h> -#include "Oma2Agent.h" - -#include "BrCtl.h" -#include "BrCtlDefs.h" - -#include "BrsrStatusCodes.h" -#include "MVCShell.h" -#include "contentLoader.h" -#include "GDIDevicecontext.h" -#include "KimonoLocalizationStrings.h" -#include "MVCView.h" -#include "nw_adt_resizablevector.h" -#include "nw_browser_browsermimetable.h" -#include "nw_evlog_api.h" -#include "nw_hed_appservices.h" -#include "nw_hed_appservicesimpl.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_historyvisitor.h" -#include "nw_hed_historyentry.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_msg_dsp_api.h" -#include "nw_msg_messagedispatcher.h" -#include "nw_mvc_iloadlistener.h" -#include "nw_text_ucs2.h" -//#include "nw_unknown_contenthandler.h" -#include "nw_wae.h" -#include "nw_wbxml_dictionary.h" -#include "nw_wml_core.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "nw_wml1x_wml1xformliaison.h" -#include "nw_wml1x_epoc32contenthandler.h" -#include "nw_xhtml_epoc32contenthandler.h" -#include <nwx_assert.h> -#include "nwx_ctx.h" -#include "nwx_datastruct.h" -#include "nwx_defs_symbian.h" -#include "nwx_http_defs.h" -#include "nwx_http_header.h" -#include "nwx_memseg.h" -#include "nwx_msg_api.h" -#include "nwx_msg_map_epoc32.h" -#include "nwx_logger.h" -#include "nwx_msg_api.h" -#include "nwx_settings.h" -#include "nwx_statuscodeconvert.h" -#include "nwx_string.h" -#include "nwx_time.h" -#include "nwx_ui_callbacks_register.h" -#include "StringUtils.h" -#include "urlloader_loaderutils.h" -#include "urlloader_urlloaderint.h" -#include "urlloader_urlloaderI.h" -#include "urlloader_urlresponse.h" -#include "CSSVariableStyleSheet.h" -#include "TEncodingMapping.h" -#include "BrCtlDialogsProvider.h" -#include "WmlInterface.h" - - -// EXTERNAL DATA STRUCTURES -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _NW_WaeUsrAgent_t NW_WaeUsrAgent_t; - -// EXTERNAL FUNCTION PROTOTYPES - - NW_WaeUsrAgent_t *NW_WaeUsrAgent_New(); - -// LOCAL CONSTANTS AND MACROS -_LIT(KHttpString, "http://"); -_LIT(KFileString, "file://"); -_LIT(KEmptyTitle, ""); - -#define SHELL_MSG_UPDATEDISPLAY 1 -#define SHELL_MSG_RELAYOUT 2 -#define SHELL_MSG_REDRAW 3 -#define SHELL_MSG_REDRAW_NOW 4 -#define SHELL_MSG_UPDATEDISPLAYPARTIAL 5 -#define SHELL_MSG_RELAYOUT_CREATETAB 6 - -/* ------------------------------------------------------------------------- * - known WBXML dictionaries - * ------------------------------------------------------------------------- */ - extern NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary; - extern NW_WBXML_Dictionary_t NW_Wml_1_0_WBXMLDictionary; - extern NW_WBXML_Dictionary_t NW_Wml_1_1_WBXMLDictionary; - extern NW_WBXML_Dictionary_t NW_Wml_1_2_WBXMLDictionary; - extern NW_WBXML_Dictionary_t NW_Wml_1_3_WBXMLDictionary; - -/* ------------------------------------------------------------------------- */ -const NW_WBXML_Dictionary_t* const ShellWBXMLDictionaries[] = { - &NW_XHTML_WBXMLDictionary, - &NW_Wml_1_0_WBXMLDictionary, - &NW_Wml_1_1_WBXMLDictionary, - &NW_Wml_1_2_WBXMLDictionary, - &NW_Wml_1_3_WBXMLDictionary, - NULL -}; - -// MODULE DATA STRUCTURES - -// ---------------------------------------------------------------------------- -// Application services -// ---------------------------------------------------------------------------- -const NW_HED_AppServices_t appServices = -{ - /* NW_Scr_DialogApi_t */ - { - CShell::NW_UI_WmlScriptDlgAlert, - CShell::NW_UI_WmlScriptDlgConfirm, - CShell::NW_UI_WmlScriptDlgPrompt - }, - - /* NW_ErrorApi_t */ - { - CShell::NW_UI_NotifyError, - CShell::NW_UI_HttpError - }, - - /* NW_WtaiApi_t */ - { - NULL /*NW_HED_wp_makeCall*/, - NULL /*NW_HED_wp_sendDTMF*/, - NULL /*NW_HED_wp_addPBEntry*/, - NULL /*NW_HED_nokia_locationInfo*/ - }, - - /* NW_GenDlgApi_t */ - { - CShell::NW_UI_DialogListSelect, - CShell::NW_UI_DialogPrompt, - CShell::NW_UI_DialogInputPrompt, - CShell::NW_UI_DialogSelectOption, - NULL - }, - - /* NW_AppServices_Picture_API_t */ - { - NULL, - NULL - }, - - /* NW_UrlLoadProgressApi_t */ - { - CShell::NW_UI_StartContentLoad, - CShell::NW_UI_StopContentLoad, - CShell::NW_UI_UrlLoadProgressOn - }, - - /* NW_EvLogApi_t event log API*/ - { - NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL - }, - /* NW_AppServices_SoftKeyAPI_t */ - { - CShell::NW_UI_SoftKey_UpdateSoftKeys, - CShell::NW_UI_SoftKey_UpdateSoftKeys - }, - /* NW_UserRedirectionApi_t */ - { - CShell::NW_UI_GetUserRedirectionData - }, - - /* NW_AppServices_SelectListAPI_t */ - { - NULL - }, - - /* NW_Scr_SuspResQueryApi_t */ - { - NULL - }, - - /* NW_AppServices_BrowserAppAPI_t */ - { - NULL, - CShell::NW_UI_SwitchToImgMapView, - CShell::NW_UI_SwitchFromImgMapViewIfNeeded, - CShell::NW_UI_IsImageMapView - }, - - /* NW_AppServices_ImageViewAPI_t */ - { - CShell::NW_UI_ViewImage - }, - - /* NW_AppServices_GetLocalizedStringAPI_t */ - { - CShell::NW_UI_GetLocalizedString - }, - - /* NW_AppServices_CharacterConversionAPI_t Character Conversion Library */ - { - CShell::NW_UI_ConvertFromForeignCharSet, - CShell::NW_UI_ConvertToForeignCharSet, - CShell::NW_UI_ConvertFromForeignChunk - }, - - /* NW_AppServices_EcmaScriptPI_t */ - { - CShell::WindowAlert, - CShell::WindowConfirm, - CShell::WindowPrompt, - CShell::WindowOpen - }, - - /* NW_AppServices_FormBox_t */ - { - CView::InputInvalid - }, - - /* NW_AppServices_SecurityNotes_t */ - { - NULL - //CShell::NW_UI_AboutToLoadPageL - }, - - /* NW_AppServices_ObjectDialog_t */ - { - CShell::NW_UI_ShowObjectDialog - }, -}; - - -#ifdef __cplusplus -} // extern "C" -#endif - -// LOCAL FUNCTION PROTOTYPES -// ---------------------------------------------------------------------------- -// Panic -// ---------------------------------------------------------------------------- -//lint --e{512} Symbol previously used as static -GLDEF_C void Panic(const TInt aPanicCode) -{ - _LIT(KCShell, "KM-CShell-CPP"); - User::Panic(KCShell, aPanicCode); -} - -LOCAL_C inline TPtrC -PtrCFromTText (const TText* aText) - { - return (aText!=NULL ? TPtrC(aText) : TPtrC()); - } - -LOCAL_C inline CShell* -Shell() - { - CShell* shellInstance = REINTERPRET_CAST(CShell*, (NW_Ctx_Get(NW_CTX_BROWSER_APP, 0))); - __ASSERT_ALWAYS(shellInstance, Panic(KErrCorrupt)); - return shellInstance; - } - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -TInt CShell::RunBGTask(TAny* /* aShell*/) - { - User::Heap().Compress(); - return KErrNone; - } - -// -------------------------------------------------------------------------------- -// CShell::CShell -// ----------------------------------------------------------------------------- -CShell::CShell(CView* aEpoc32View, CBrCtl* aBrCtl) : - iView(aEpoc32View), iBrCtl(aBrCtl) - { - iIsEpoc32ShellDestroyed = EFalse; - iContentLoader = NULL; - iCharacterSetConverter = NULL; - iArrayOfCharacterSetsAvailable = NULL; - iCurrentConverter = 0; - iSelectedCharacterSet = 0; - //iRefCount = 0; - iDocExitObserver = NULL; - iSecureItemsInNonSecurePage = EFalse; - iNonSecureItemsInSecurePage = EFalse; - SetView(aEpoc32View); - } - -// ---------------------------------------------------------------------------- -// CShell::ConstructL -// Symbian 2nd phase constructor can leave. -// ---------------------------------------------------------------------------- -void CShell::ConstructL (TBool /*aUseWsp*/ , MWmlInterface* aWKWmlInterface, CWmlControl* aWmlControl ) - { - // Start logging service - NW_LOG_NEWLOGGER ("browser_core.log", NW_LOG_LEVEL4); - - // If this is the first instance of the class that we are constructing, we - // must first initialize the class - /*lint -e{64} Type mismatch*/ - TBrowserStatusCode status = InitializeClass (iHWnd); - User::LeaveIfError( status ); - iWmlControl = aWmlControl; - // Get the constructor parameters - NW_HED_MimeTable_t* mimeTable = NW_HED_MimeTableOf (&NW_Browser_MimeTable); - void* browserAppCtx = (void*) this; - - // Set the browserAppCtx into global context array - status = NW_Ctx_Set (NW_CTX_BROWSER_APP, 0, browserAppCtx); - User::LeaveIfError( status ); - - // Set UserAgent string - void* userAgent = CUserAgent::NewL(); - status = NW_Ctx_Set (NW_CTX_USER_AGENT, 0, userAgent); - User::LeaveIfError( status ); - - // Set Content Manager as it is required - // for decoding the DRM images in global array context. - using namespace ContentAccess; - ContentAccess::CManager* manager = CManager::NewLC(); - User::LeaveIfNull(manager); - status = NW_Ctx_Set (NW_CTX_CONT_ACCESS_MGR, 0, (void*) manager); - User::LeaveIfError( status ); - CleanupStack::Pop(); //Manager - - // Create the DocumentRoot */ - iDocumentRoot = NW_HED_DocumentRoot_New (mimeTable, - const_cast<NW_HED_AppServices_t*>(&appServices), - browserAppCtx); - - iDisplayDocumentInvoked= NW_FALSE; - // Leaves with KErrNoMemory if shell could not be instantiated - User::LeaveIfNull( iDocumentRoot ); - - // Install ourselves as the listener on the DocumentRoot */ - status = NW_HED_DocumentRoot_SetDocumentListener (iDocumentRoot, this); - NW_ASSERT (status == KBrsrSuccess); - -#ifdef NEEDS_SYMBIAN_IMPLEMENTATION - NW_Msg_MessageDispatcher_SetBrowserState(&NW_Msg_MessageDispatcher, NW_TRUE); -#endif - - status = InitComponents(); - - User::LeaveIfError( iRfs.Connect() ); - iContentLoader = new (ELeave) CContentLoader( CEikonEnv::Static()->Process() ); - - if( !iArrayOfCharacterSetsAvailable ) - { - iArrayOfCharacterSetsAvailable = - CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL( iRfs ); - User::LeaveIfNull( iArrayOfCharacterSetsAvailable ); - } - - TUint uid( 0 ); - // Get the current encoding value - NW_Uint16 encoding = NW_Settings_GetEncoding(); - uid = GetCharsetUid(encoding); - - // If CharacterSetChangedL leaves then we use EISO8859_1 by default - CharacterSetChangedL( uid ); - - - // Inititalize the UrlLoader (HttpLoader, FileLoader) - UrlLoader_InitializeL(iBrCtl->brCtlSpecialLoadObserver(), this, aWKWmlInterface ); - iIdle = CIdle::NewL(CActive::EPriorityIdle); - } - -// -------------------------------------------------------------------------------- -// CShell::NewL -// Two-phased constructor. -// -------------------------------------------------------------------------------- -CShell* -CShell::NewL (CView* aEpoc32View, CBrCtl* aBrCtl, MWmlInterface* aWKWmlInterface, CWmlControl* aWmlControl) - { - CShell* self = new (ELeave) CShell(aEpoc32View, aBrCtl); - CleanupStack::PushL(self); - self->ConstructL(EFalse, aWKWmlInterface, aWmlControl ); - CleanupStack::Pop(); //self - return self; - } - -// -------------------------------------------------------------------------------- -// Destructor -// -------------------------------------------------------------------------------- -CShell::~CShell() - { - iExiting = ETrue; - - iIsEpoc32ShellDestroyed = ETrue; // Set to true , any calls on this instance from - - DestroyPreviousDocument(); - NW_Object_Delete(iDocumentRoot); - CCSSVariableStyleSheet::DeleteSingleton(); - NW_WBXML_Dictionary_destroy(); - -#ifdef NEEDS_SYMBIAN_IMPLEMENTATION - NW_Msg_MessageDispatcher_SetBrowserState(&NW_Msg_MessageDispatcher, NW_FALSE); -#endif - - delete iDocExitObserver; - delete iCharacterSetConverter; - delete iArrayOfCharacterSetsAvailable; - delete iContentLoader; - iRfs.Close(); - - UrlLoader_Shutdown(); - if(iIdle) - { - iIdle->Cancel(); - } - delete iIdle; - // remove UserAgent - CUserAgent* userAgent = (CUserAgent*) NW_Ctx_Get(NW_CTX_USER_AGENT, 0); - NW_ASSERT( userAgent != NULL ); - delete userAgent; - NW_Ctx_Set(NW_CTX_USER_AGENT, 0, NULL); - - /* MSR: Added typecast to _NW_WaeUsrAgent_t*) */ - NW_WaeUsrAgent_t *wae = (_NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT( wae != NULL ); - /* free useAgent */ - NW_WaeUsrAgent_Free(wae); - NW_Ctx_Set(NW_CTX_WML_CORE, 0, NULL); - - NW_Ctx_Set (NW_CTX_BROWSER_APP, 0, NULL); - /*Free Content Manager */ - - using namespace ContentAccess; - ContentAccess::CManager* manager = (ContentAccess::CManager*) NW_Ctx_Get(NW_CTX_CONT_ACCESS_MGR,0); - delete manager; - NW_Ctx_Set(NW_CTX_CONT_ACCESS_MGR, 0, NULL); - } - -// -------------------------------------------------------------------------------- -// CShell::InitComponents -// -------------------------------------------------------------------------------- -TBrowserStatusCode -CShell::InitComponents () - { - NW_WaeUsrAgent_t *wae = NULL; - TBrowserStatusCode status = KBrsrFailure; - - wae = (NW_WaeUsrAgent_t *)NW_Ctx_Get(NW_CTX_WML_CORE, 0); - if (wae == NULL) - { - wae = NW_WaeUsrAgent_New(); - if (wae != NULL) - { - // Stick the context in the context manager - status = NW_Ctx_Set(NW_CTX_WML_CORE, 0, wae); - } - else - { - return KBrsrOutOfMemory; - } - } - - // Added typecast to _NW_WaeUsrAgent_t*) - wae = (_NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - - // Register error handlers - status = NW_WaeUsrAgent_RegisterError(wae, &(iDocumentRoot->appServices->errorApi)); - if (status != KBrsrSuccess) - { - return status; - } - - // Register load progress handlers - status = NW_WaeUsrAgent_RegisterLoadProgress(wae, &(iDocumentRoot->appServices->loadProgress_api)); - if (status != KBrsrSuccess) - { - return status; - } - - status = NW_WaeUsrAgent_RegisterGenDlg(wae, &(iDocumentRoot->appServices->genDlgApi)); - if (status != KBrsrSuccess) - { - return status; - } - - // Register event log API - status = NW_WaeUsrAgent_RegisterEvLog(wae, &(iDocumentRoot->appServices->evLogApi)); - if (status != KBrsrSuccess) - { - return status; - } - - status = NW_WaeUsrAgent_RegisterUserRedirection(wae, &(iDocumentRoot->appServices->userRedirection)); - if (status != KBrsrSuccess) - { - return status; - } - - // Plugin support - if (iBrCtl->capabilities() & TBrCtlDefs::ECapabilityDisableInputAndPlugins) - { - // Disable the plugin support - //R->embed - //TRAP(status, CPluginHandler::CreateSingletonL(EFalse)); - } - else - { - // Plugins are supported - //R->embed - //TRAP(status, CPluginHandler::CreateSingletonL(ETrue)); - } - - if (status != KBrsrSuccess) - { - return status; - } - - return KBrsrSuccess; - } - -// ---------------------------------------------------------------------------- -// CShell::InitComponents -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::InitializeClass (const NW_Osu_Hwnd_t hWnd) -{ - NW_TRY (status) - { - NW_Uint32 numDictionaries; - - NW_REQUIRED_PARAM (hWnd); - - // Count how many WBXML dictionaries there are and install them */ - for (numDictionaries = 0; - ShellWBXMLDictionaries[numDictionaries] != NULL; - numDictionaries += 1) - { - } - - // Initialize the cXML dictionaries */ - status = StatusCodeConvert(NW_WBXML_Dictionary_initialize(numDictionaries, - (NW_WBXML_Dictionary_t**) ShellWBXMLDictionaries)); - NW_THROW_ON_ERROR (status); - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -// -------------------------------------------------------------------------------- -// CShell::LoseFocus -// -------------------------------------------------------------------------------- -void CShell::LoseFocus () -{ - NW_HED_DocumentNode_LoseFocus (iDocumentRoot); -} - -// -------------------------------------------------------------------------------- -// CShell::GainFocus -// -------------------------------------------------------------------------------- -void CShell::GainFocus () -{ - NW_HED_DocumentNode_GainFocus (iDocumentRoot); - - /* Tell the document root explicity; there is a case when - * loading a saved page with animated images the timing was - * such that it would not be set, and the animation wouldn't - * happen. - */ - if (iView != NULL && iView->GetRootBox() != NULL) - NW_LMgr_RootBox_GainFocus(iView->GetRootBox()); -} - -// -------------------------------------------------------------------------------- -// CShell::RestoreDocument -// -------------------------------------------------------------------------------- -void -CShell::RestoreDocument () -{ - TBrowserStatusCode status; - NW_HED_HistoryEntry_t* entry; - - /* reset partial rendering counter */ - iNumUpdatesPartial = -1; - - /* can't restore something that doesn't exist ... */ - if (iPrevDocument != NULL) - { - /* don't resume the existing document tree */ - if( iDocumentRoot->childNode == iPrevDocument ) - { - return; - } - /* delete the existing childNode, if any */ - NW_Object_Delete( iDocumentRoot->childNode ); - iDocumentRoot->childNode = NULL; - - /* set the childNode */ - iDocumentRoot->childNode = iPrevDocument; - - /* scynchronize the history */ //R->history - /* - ** if the entry is found in the stack set it as the current entry. If not, - ** then insert the entry at the beginning of the stack. Insertion sets it - ** as the new current entry. - */ - entry = NW_HED_ContentHandler_GetAssociatedHistoryEntry( iDocumentRoot->childNode ); - status = NW_HED_HistoryStack_SetCurrentEntry( iDocumentRoot->historyStack, entry ); - if( status != KBrsrSuccess) - { - status = NW_HED_HistoryStack_InsertEntry( iDocumentRoot->historyStack, entry, - NW_HED_HistoryStack_Loacation_AtBeginning ); - } - - /* resume the document root to cause it to reactivate */ - NW_HED_DocumentNode_Resume( iDocumentRoot ); - - iPrevDocument = NULL; - } -} - -/* ------------------------------------------------------------------------- - * partialRender will be true for all partial render request; and false for - * non-partial rendering request; markupComplete is only useful for partial - * rendering page. - */ -// this functions come from old Epoc32Shell.cpp -TBrowserStatusCode -CShell::DisplayDocument () - { - NW_LMgr_Box_t* boxTree = NULL; - NW_Ucs2* storage = NULL; - NW_HED_HistoryEntry_t* entry; - NW_HED_HistoryVisitor_t visitor; - NW_HED_HistoryStack_t* history; - const NW_Text_t* title; - static const NW_Ucs2 empty[] = { '\0' }; - NW_GDI_Point2D_t docPosition; - NW_LMgr_RootBox_t* rootBox; - - NW_TRY (status) - { - history = NW_HED_DocumentRoot_GetHistoryStack (iDocumentRoot); - if (history != NULL) - { - SetUrlRequestReason(history, NW_HED_UrlRequest_Reason_DocLoad); - SetPossibleWmlOEB(history, NW_FALSE); - } - - rootBox = iView->GetRootBox(); - NW_THROW_OOM_ON_NULL( rootBox, status ); - - if(!iDisplayDocumentInvoked ) - { - iDisplayDocumentInvoked = NW_TRUE; - status = - NW_HED_DocumentNode_GetBoxTree (iDocumentRoot, &boxTree); - iDisplayDocumentInvoked = NW_FALSE; - NW_THROW_OOM_ON_NULL (boxTree, status); - - /* query the document root for the box tree */ - - /* update the view with the new box tree */ - status = SetBoxTree (boxTree); - NW_THROW_ON_ERROR (status); - boxTree = NULL; - - /* do following steps only if non-partial rendering or - * the first chunk of parital rendering page - */ - if( !rootBox->partialRender || ( rootBox->partialRender && - rootBox->renderingState == NW_LMgr_RootBox_RenderFirstChunk ) ) - { - /* get the title from the documentRoot */ - title = NW_HED_DocumentRoot_GetTitle (iDocumentRoot); - if (title == NULL) - { - storage = (NW_Ucs2*) empty; - } - else - { - NW_Uint8 freeNeeded; - NW_Text_Length_t length; - - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (title, 0, &length, &freeNeeded); - if (!freeNeeded) - { - storage = NW_Str_Newcpy (storage); - } - } - if(storage == NULL) - { - storage = (NW_Ucs2*) empty; - } - - NW_HED_HistoryVisitor_Initialize(&visitor, iDocumentRoot->historyStack, - NW_HED_HistoryVisitor_Loacation_Current ) ; - - /* get the entry */ //R->history - entry = (NW_HED_HistoryEntry_t*) NW_HED_HistoryVisitor_Current (&visitor); - - if (entry != NULL) - { - /* Store the title */ - status = NW_HED_HistoryEntry_SetPageTitle(entry, storage); - NW_THROW_ON_ERROR (status); - - if (storage != empty) - { - NW_Mem_Free (storage); - storage=NULL; - } - - /* if there is no title defined, set the storage pointer to NULL */ - if (title == NULL) - { - storage = NULL; - } - - /* update the title */ - UpdateTitle (); - - NW_HED_HistoryEntry_GetDocPosition(entry, &docPosition); - - iView->SetInitialActiveBoxId (NW_HED_HistoryEntry_GetActiveBoxId(entry)); - if (NW_LMgr_RootBox_IsPageRTL(rootBox)) - { - iView->SetInitialDocPosition (RIGHT_ORIGIN, 0); - } - else - { - iView->SetInitialDocPosition (0, 0); - } - - // We read the docPosition from the history entry only if it has a - // different value than the initialization value - if ((docPosition.x != 0 && docPosition.x != RIGHT_ORIGIN) || (docPosition.y !=0)) - { - iView->SetInitialDocPosition (docPosition.x, docPosition.y); - } - } // end of if (entry != NULL) - } // end of if ( !partialRender || (partialRender && NW_LMgr_RootBox_RenderFirstChunk ) ) - - /* Notify the document that it has been displayed. This is necessary to - support features like XHTML META refresh. */ - if ( rootBox->renderingState == NW_LMgr_RootBox_RenderComplete ) - { - status = NW_HED_DocumentRoot_DocumentDisplayed (iDocumentRoot); - NW_THROW_ON_ERROR (status); - } - } - - } - NW_CATCH (status) - { - NW_Object_Delete (boxTree); - RestoreDocument (); - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -CShell::ConvertToValidUrl (NW_Text_t* url, - TBrowserStatusCode* status) -{ - NW_Text_t* textUrl = NULL; - NW_Ucs2* tempUrl = NULL; - NW_Ucs2* trimmedEscapedUrl = NULL; - NW_Ucs2* storage = NULL; - NW_Url_Schema_t scheme; - NW_Uint32 len = 0; - - *status = KBrsrOutOfMemory; - - if(url == NULL) { - return url; - } - - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (url, 0, NULL, NULL); - - if(storage == NULL) { - return NULL; - } - - trimmedEscapedUrl = NW_Str_Trim(storage, NW_Str_Both); - if(trimmedEscapedUrl == NULL) { - return NULL; - } - - len = (NW_Uint32)NW_Url_EscapeUnwiseLen(trimmedEscapedUrl); - - tempUrl = NW_Str_New(len); - if(tempUrl == NULL) { - NW_Str_Delete(trimmedEscapedUrl); - tempUrl = NULL; - return NULL; - } - NW_Url_EscapeUnwise(trimmedEscapedUrl, tempUrl); - - NW_Str_Delete(trimmedEscapedUrl); - trimmedEscapedUrl = tempUrl; - - tempUrl = NULL; - - /* check if we have a valid scheme */ - *status = NW_Url_GetScheme(trimmedEscapedUrl, &scheme); - if ((*status == KBrsrOutOfMemory) || (*status == KBrsrMalformedUrl)) - { - NW_Str_Delete (trimmedEscapedUrl); - return NULL; - } - - if (*status != KBrsrSuccess) { - /* try to build a new url with HTTP as the default scheme */ - *status = NW_Url_BuildUrl(trimmedEscapedUrl, NW_SCHEMA_HTTP, &tempUrl); - } - - if(*status == KBrsrSuccess) { - textUrl = (NW_Text_t*) - NW_Text_UCS2_New(((tempUrl != NULL) ? tempUrl : trimmedEscapedUrl), 0, NW_Text_Flags_TakeOwnership); - if(textUrl == NULL) { - return textUrl; - } - if (tempUrl != NULL){ - NW_Str_Delete (trimmedEscapedUrl); - } - } else { - NW_Str_Delete (trimmedEscapedUrl); - } - - return NW_TextOf (textUrl); -} - - -// aOwner and aLoadRecipient exist exclusively -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode CShell::StartDataLoad (TDesC& aUrl, CDataLoadInfo* aDataLoadInfo, - NW_MVC_ILoadListener_t* loadListener, - TUint16* aTransId, - void* aOwner, - void* aClientData, - void* aLoadRecipient, - TUint8 aLoadType - ) - { - NW_HED_UrlRequest_t* urlRequest = NULL; - NW_Text_t* textUrl = NULL; - TBrowserStatusCode status = KBrsrSuccess; - textUrl = NW_Text_New (HTTP_iso_10646_ucs_2, (void*) aUrl.Ptr(), - (NW_Text_Length_t)aUrl.Length(), NW_FALSE); - - if (textUrl == NULL) - return KErrNoMemory; - - (void) SwitchFromImgMapViewIfNeeded(); - NW_ASSERT (loadListener == NULL || NW_Object_IsInstanceOf (loadListener, - &NW_MVC_ILoadListener_Class)); - /* if there is already a NW_MVC_ILoadListener installed, we must notify it - that its outstanding request is being cancelled */ - if (iLoadListener != NULL) - { - NW_MVC_ILoadListener_LoadComplete (iLoadListener, NW_FALSE); - } - iLoadListener = loadListener; - - // if multipart page sends a request with DocRoot as owner, it's a top level request - // or multipart page css send request - if( (aOwner && !NW_Object_IsInstanceOf( aOwner, &NW_HED_DocumentRoot_Class )) || - aLoadRecipient ) - { - urlRequest = NW_HED_UrlRequest_New (textUrl, NW_URL_METHOD_DATA, NULL, - NULL, NW_HED_UrlRequest_Reason_DocLoadChild, NW_HED_UrlRequest_LoadNormal, - aLoadType ); - } - else - { - urlRequest = NW_HED_UrlRequest_New (textUrl, NW_URL_METHOD_DATA, NULL, - NULL, NW_HED_UrlRequest_Reason_ShellLoad, NW_HED_UrlRequest_LoadNormal, - NW_UrlRequest_Type_Any ); - } - - if (urlRequest == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - NW_HED_UrlRequest_SetCacheMode (urlRequest, NW_CACHE_NORMAL); - - /* issue the load request */ - if( aOwner ) - { - NW_ASSERT (NW_Object_IsInstanceOf (aOwner, &NW_HED_DocumentNode_Class)); - - status = NW_HED_DocumentRoot_StartRequest_tId (iDocumentRoot, - (NW_HED_DocumentNode_t*)aOwner, urlRequest, - aClientData, aTransId, (void*) aDataLoadInfo ); - } - else if( aLoadRecipient ) - { - status = NW_HED_DocumentRoot_StartRequest_tId2 (iDocumentRoot, - urlRequest, aLoadRecipient, - aClientData, aTransId, (void*) aDataLoadInfo ); - } - else - { - status = NW_HED_DocumentRoot_StartRequest_tId (iDocumentRoot, - NW_HED_DocumentNodeOf (iDocumentRoot), urlRequest, - NULL, aTransId, (void*) aDataLoadInfo ); - } - } - - if (status != KErrNone) - { - NW_Object_Delete (urlRequest); - DisplayError (BRSR_STAT_CLASS_GENERAL, status); - } - NW_Object_Delete(textUrl); - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode CShell::PostUrl(const TDesC& aUrl, - const TDesC8& aContentType, const TDesC8& aPostData, - const TDesC8* aBoundary, void* /*aReserved*/) - { - HBufC8* typeBuf = NULL; - HBufC8* boundaryBuf = NULL; - typeBuf = HBufC8::New(aContentType.Length() + 1); - if ((aBoundary != NULL) && (aBoundary->Length() > 0)) - { - boundaryBuf = HBufC8::New(aBoundary->Length() + 1); - } - // Users do not type POST urls, there is no need to validate the scheme - NW_HED_UrlRequest_t* urlRequest = NULL; - NW_Text_t* textUrl = NULL; - TBrowserStatusCode status = KBrsrSuccess; - textUrl = NW_Text_New (HTTP_iso_10646_ucs_2, (void*) aUrl.Ptr(), - (NW_Text_Length_t)aUrl.Length(), NW_FALSE); - - if (textUrl == NULL || typeBuf == NULL || (aBoundary != NULL && aBoundary->Length() > 0 && boundaryBuf == NULL)) - { - delete typeBuf; - delete boundaryBuf; - NW_Object_Delete(textUrl); - return KErrNoMemory; - } - typeBuf->Des().Copy(aContentType); - typeBuf->Des().ZeroTerminate(); - if (boundaryBuf) - { - boundaryBuf->Des().Copy(*aBoundary); - boundaryBuf->Des().ZeroTerminate(); - } - - (void) SwitchFromImgMapViewIfNeeded(); - /* if there is already a NW_MVC_ILoadListener installed, we must notify it - that its outstanding request is being cancelled */ - if (iLoadListener != NULL) - { - NW_MVC_ILoadListener_LoadComplete (iLoadListener, NW_FALSE); - } - iLoadListener = NULL; - - void* headers = UrlLoader_HeadersNew(NULL, typeBuf->Ptr(), NULL, boundaryBuf == NULL ? NULL : boundaryBuf->Ptr(), aPostData.Length(), NULL); - if (headers == NULL) - { - status = KErrNoMemory; - } - if (status == KBrsrSuccess) - { - NW_Buffer_t body; - body.data = (NW_Uint8*)aPostData.Ptr(); - body.length = aPostData.Length(); - body.allocatedLength = aPostData.Length(); - - urlRequest = NW_HED_UrlRequest_New (textUrl, NW_URL_METHOD_POST, headers, - &body, NW_HED_UrlRequest_Reason_ShellLoad, NW_HED_UrlRequest_LoadNormal, - NW_UrlRequest_Type_Any ); - if (urlRequest == NULL) - { - status = KErrNoMemory; - } - else - { - NW_HED_UrlRequest_SetCacheMode (urlRequest, NW_CACHE_NOCACHE); - NW_Uint16 transId; - - status = NW_HED_DocumentRoot_StartRequest_tId (iDocumentRoot, - NW_HED_DocumentNodeOf (iDocumentRoot), urlRequest, - NULL, &transId, NULL); - } - } - - if (status != KErrNone) - { - NW_Object_Delete (urlRequest); - DisplayError (BRSR_STAT_CLASS_GENERAL, status); - } - delete typeBuf; - delete boundaryBuf; - NW_Object_Delete(textUrl); - return status; - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::StartLoad (const NW_Text_t* url, - NW_MVC_ILoadListener_t* loadListener, - NW_Cache_Mode_t cacheMode) -{ - TBrowserStatusCode statusCode; - NW_Text_t* textUrl = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (url, &NW_Text_Abstract_Class)); - NW_ASSERT (loadListener == NULL || - NW_Object_IsInstanceOf (loadListener, - &NW_MVC_ILoadListener_Class)); - - NW_TRY (status) { - /* if there is already a NW_MVC_ILoadListener installed, we must notify it - that its outstanding request is being cancelled */ - if (iLoadListener != NULL) { - NW_MVC_ILoadListener_LoadComplete (iLoadListener, NW_FALSE); - } - iLoadListener = loadListener; - - /* normalize the URL */ - textUrl = ConvertToValidUrl(const_cast<NW_Text_t*>(url), &statusCode); - if(textUrl == NULL) { -// status = KBrsrOutOfMemory; - return statusCode; - } - - /* ask for the new stuff! */ - status = - NW_HED_DocumentRoot_StartLoad (iDocumentRoot, - NW_HED_DocumentNodeOf (iDocumentRoot), - textUrl, - NW_HED_UrlRequest_Reason_ShellLoad, NULL, - NW_UrlRequest_Type_Any, cacheMode); - _NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { - DisplayError (BRSR_STAT_CLASS_GENERAL, status); - } - - NW_FINALLY { - if(textUrl != url) { - NW_Object_Delete (textUrl); - } - - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::GetUseNumberContent (NW_ADT_DynamicVector_t *dynamicVector) -{ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicVector, &NW_ADT_DynamicVector_Class)); - - if(dynamicVector == NULL) - { - return KBrsrFailure; - } - - return NW_HED_DocumentRoot_CollectNumbers(iDocumentRoot, dynamicVector); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -CShell::GetCurrentUrl () - { - NW_Text_t* text = NULL; - int ret = KErrNone; - TRAP(ret, text = GetCurrentUrlL()); - return text; - } - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -CShell::GetCurrentUrlL () -{ - TUriParser16 uriParser; - const TText* linkUrl = NULL; - NW_Text_t* textUrl = NULL; - - NW_Text_t* url = (NW_Text_t*) NW_HED_DocumentRoot_GetURL (iDocumentRoot); - - if (url) - { - linkUrl = NW_Text_GetUCS2Buffer(url, NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - NULL, NULL); - - TPtrC urlDes (linkUrl, User::StringLength(linkUrl)); - - User::LeaveIfError(uriParser.Parse(urlDes)); - - if ( uriParser.IsPresent( EUriUserinfo ) ) - { - // Remove the username and password from the URI - CUri16* newUri = CUri16::NewLC( uriParser ); - - newUri->RemoveComponentL( EUriUserinfo ); - - const TText* newUrl = newUri->Uri().UriDes().Ptr(); - - textUrl = NW_Text_New(HTTP_iso_10646_ucs_2, (void*)newUrl, newUri->Uri().UriDes().Length(), - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy); - - CleanupStack::PopAndDestroy( newUri ); // newUri - } - else - { - textUrl = NW_Text_Copy(url, NW_TRUE); - } - } - return textUrl; -} - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -CShell::GetCurrentTitle () -{ - return (NW_Text_t*) NW_HED_DocumentRoot_GetTitle (iDocumentRoot); -} - -/* ------------------------------------------------------------------------- */ -void -CShell::DisplayError (NW_Int16 errorClass, - NW_WaeError_t error) -{ - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventLoadError, 0, 0)); - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventContentFinished, 0, 0)); - - switch (errorClass) { - case BRSR_STAT_CLASS_HTTP: { - NW_HED_HistoryStack_t* history; //R->history - const NW_Ucs2* url = NULL; - - history = NW_HED_DocumentRoot_GetHistoryStack (iDocumentRoot); - if (history != NULL) { - NW_HED_HistoryEntry_t* entry; - - entry = NW_HED_HistoryStack_GetEntry (history, NW_HED_HistoryStack_Direction_Current); - if (entry != NULL) { - const NW_HED_UrlRequest_t* urlRequest; - - urlRequest = NW_HED_HistoryEntry_GetUrlRequest (entry); - if (urlRequest != NULL) { - url = NW_HED_UrlRequest_GetRawUrl (urlRequest); - } - } - } - - (void) iDocumentRoot->appServices->errorApi. - httpError (iDocumentRoot, (NW_WaeHttpStatus_t) error, url, NULL, NULL); - break; - } - - case BRSR_STAT_CLASS_GENERAL: - if (error != KBrsrCancelled && - error != KBrsrHedContentDispatched) { - (void) iDocumentRoot->appServices->errorApi. - notifyError (iDocumentRoot, (TBrowserStatusCode) error, NULL, NULL); - } - break; - - default: - NW_ASSERT (0); - } -} - -// ---------------------------------------------------------------------------- -// MHEDDocumentListener method implementations -// ---------------------------------------------------------------------------- -void -CShell::NewDocument (NW_HED_DocumentRoot_t* documentRoot, - NW_HED_UrlRequest_t* urlRequest, - NW_Bool aDeleteBoxTree) -{ - NW_HED_HistoryStack_t* history; - - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentRoot; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentRoot, - &NW_HED_DocumentRoot_Class)); - - /* reset partial rendering counter */ - iNumUpdatesPartial = 0; - - // reset the flag - iFileOpenedByDocHandler = EFalse; - - // Delete the existing previous document (content handler), unless it is the - // same as the current child node (content handler). This happens when - // multipart/mixed is dispatched (see NW_HED_DocumentRoot_CreateContentHandler). - // We need the previous document (content handler) to go back and forth from - // the multipart calling page and the dispatched content. - if ((iPrevDocument != NULL) && - (iPrevDocument != iDocumentRoot->childNode)) - { - DestroyPreviousDocument(); - } - //R->history - history = NW_HED_DocumentRoot_GetHistoryStack (iDocumentRoot); - if (history != NULL) - { - NW_HED_HistoryEntry_t* entry; - - entry = NW_HED_HistoryStack_GetEntry (history, NW_HED_HistoryStack_Direction_Current); - if (entry != NULL) - { - NW_GDI_Point2D_t docPosition; - NW_ADT_Vector_Metric_t activeBoxId; - NW_Uint8 reason; - - /*lint -e{666} Expression with side effects passed to repeated parameter in macro*/ - docPosition = *(iView->GetOrigin()); - activeBoxId = iView->GetActiveBoxId(); - reason = NW_HED_UrlRequest_GetReason(urlRequest); - - if ((reason == NW_HED_UrlRequest_Reason_DocLoad) || - (reason == NW_HED_UrlRequest_Reason_ShellLoad) || - (reason == NW_HED_UrlRequest_Reason_ShellReload)) - { - NW_HED_HistoryEntry_SetDocPosition(entry, &docPosition); - NW_HED_HistoryEntry_SetActiveBoxId(entry, activeBoxId); - } - } - } - // save current top level content handler unless it is an - // unknown content handler. Unknown content handler does not - // carry any useful information so it isn't worth saving. - if( iDocumentRoot->childNode ) - { - iPrevDocument = iDocumentRoot->childNode; - } - - // and suspend it. - NW_HED_DocumentNode_Suspend(iDocumentRoot, aDeleteBoxTree); -} - -/* ------------------------------------------------------------------------- */ -void CShell::DestroyPreviousDocument() - { - // - if( iPrevDocument ) - { - // If the previous document was a result of data load, remove it from History. - // We no-longer have the data and cannot go back to that page - NW_HED_HistoryEntry_t* entry; //R->history - entry = NW_HED_ContentHandler_GetAssociatedHistoryEntry( iPrevDocument ); - if (entry != NULL && !NW_HED_HistoryStack_ValidateEntry(entry)) - { - NW_Int16 i = NW_HED_HistoryStack_GetIndexByEntry (iDocumentRoot->historyStack, entry); - // NW_HED_HistoryStack_GetIndex returns -1 if it does not find the entry - if (i != -1) - { - NW_HED_HistoryStack_DeleteEntry(iDocumentRoot->historyStack, (NW_Uint8)i); - } - } - NW_Object_Delete (iPrevDocument); - iPrevDocument = NULL; - } - } - -/* ------------------------------------------------------------------------- */ -NW_Bool -CShell::LoadEnd (NW_HED_DocumentRoot_t* documentRoot, - NW_Int16 errorClass, - NW_WaeError_t error) -{ - NW_LMgr_RootBox_t* rootBox; - NW_Bool loadSuccessful; - - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentRoot; - - NW_ASSERT (NW_Object_IsInstanceOf (documentRoot, - &NW_HED_DocumentRoot_Class)); - - /* was the load successful */ - loadSuccessful = (NW_Bool) - ((errorClass == BRSR_STAT_CLASS_GENERAL && (error == KBrsrSuccess || error == KBrsrHedContentDispatched)) ? - NW_TRUE : NW_FALSE); - - /* if we have been supplied with a NW_MVC_ILoadListener, we must notify that - of the load end */ - if (iLoadListener != NULL) - { - NW_MVC_ILoadListener_LoadComplete (iLoadListener, loadSuccessful); - iLoadListener = NULL; - } - - if ((errorClass == BRSR_STAT_CLASS_GENERAL) && - ((error == KBrsrCancelled) || /* The top level request was cancelled */ - // (error == KBrsrHedContentDispatched) || /* content was dispatched */ - // (error == KBrsrWmlbrowserBadContentType) || /* contenthandler was NULL */ - (error == KBrsrConnCancelled) || /* User pressed NO to ConnNeeded */ - (error == KBrsrConnFailed))) /* Connection failed */ - - { - if (!iDocumentRoot->childNode ) - { - return NW_FALSE; - } - } - - /* if the load was unsuccessful or if the contents were dispatched to - through content dispatch server we must restore the old document */ - /*lint -e{774} Boolean within 'right side of || within if' always evaluates to False */ - if( !(errorClass == BRSR_STAT_CLASS_GENERAL && error == KBrsrSuccess) || - errorClass == BRSR_STAT_CLASS_HTTP ) - { - // if we failed on the first chunk than restore the previous - // document, otherwise let the user check what we have - rootBox = iView->GetRootBox(); - NW_ASSERT( rootBox != NULL ); - // NW_LMgr_RootBox_RenderUninitialized means no chunk has been displayed. - // or in case of non-partial rendering. the pages has not been fully loaded - if( rootBox->renderingState == NW_LMgr_RootBox_RenderUninitialized ) - { - RestoreDocument (); - } - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- - * will be called by non-partial rendering page; - * for partial rendering page, this will be called when the markup completes - * and any content after that - */ -TBrowserStatusCode -CShell::DocumentChanged( NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ) -{ - NW_Msg_Message_t* message = NULL; - - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentRoot; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentRoot, &NW_HED_DocumentRoot_Class)); - - NW_LOG0( NW_LOG_LEVEL2, "CShell::DocumentChanged START" ); - - NW_TRY (status) { - /* not partial rendering (e.g. wml): invalidate the current box tree (if any) */ - if (iNumUpdatesPartial == 0 || - iNumUpdatesPartial == -1 ) - { - status = SetBoxTree (NULL); - NW_THROW_ON_ERROR (status); - } - - /* create the update display message */ - message = NW_Msg_Message_New (SHELL_MSG_UPDATEDISPLAY, NULL, NW_FALSE); - NW_THROW_OOM_ON_NULL (message, status); - message->data = this; - NW_Msg_Message_SetPriority( message, aMessagePriority ); - - /* dispatch it */ - status = NW_Msg_MessageDispatcher_DispatchMessage (&NW_Msg_MessageDispatcher, message, this); - NW_THROW_ON_ERROR (status); - - message = NULL; - - /* message successfully sent, increment the counter */ - iNumUpdates += 1; - } - - NW_CATCH (status) { - NW_Object_Delete (message); - } - - NW_FINALLY { - /* successful completion */ - NW_LOG0( NW_LOG_LEVEL2, "CShell::DocumentChanged END" ); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * will be called only by partial rendering page before the last chunk of - * markup content - */ -TBrowserStatusCode -CShell::DocumentChangedPartial( NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ) -{ - NW_Msg_Message_t* message = NULL; - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (documentRoot); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentRoot, &NW_HED_DocumentRoot_Class)); - - NW_TRY (status) { - if (iNumUpdatesPartial == 0) - /* the first chunk of partial rendering, invalidate the current box tree (if any); - */ - { - status = SetBoxTree (NULL); - // box tree can be invalidated by NW_LMgr_RootBox_InvalidateCache function - //NW_LMgr_RootBox_InvalidateCache(iView->GetRootBox()); - NW_THROW_ON_ERROR (status); - } - - /* create the update display partial message */ - message = NW_Msg_Message_New (SHELL_MSG_UPDATEDISPLAYPARTIAL, NULL, NW_FALSE); - NW_THROW_OOM_ON_NULL (message, status); - message->data = this; - NW_Msg_Message_SetPriority( message, aMessagePriority ); - - /* dispatch it */ - status = NW_Msg_MessageDispatcher_DispatchMessage (&NW_Msg_MessageDispatcher, message, this); - NW_THROW_ON_ERROR (status); - - message = NULL; - - /* message successfully sent, increment the counter */ - iNumUpdatesPartial += 1; - } - - NW_CATCH (status) { - NW_Object_Delete (message); - } - - NW_FINALLY { - /* successful completion */ - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -/* the function switches the layout and reformats the boxtree if aReformatBoxTree is NW_TRUE -aVerticalLayout - is NW_TRUE to switch to vertical layout -aVerticalLayout - is NW_FALSE to switch to normal layout -*/ -TBrowserStatusCode -CShell::SwitchLayout (NW_Bool aVerticalLayout, NW_Bool aReformatBoxTree) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_REQUIRED_PARAM( aVerticalLayout ); - - // SwitchVerticalLayout , switches the boxes and formats the box tree - status = iView->SwitchVerticalLayout(aReformatBoxTree, NW_TRUE); - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::IsActive (NW_HED_DocumentRoot_t* documentRoot, - NW_Bool state) -{ - NW_Text_t* url = NULL; - const NW_Ucs2* urlName = NULL; - NW_Text_Length_t length; - void *browserApp = NULL; - - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentRoot; - - /* get the current url */ - url = GetCurrentUrl (); - if(url != NULL) - { - urlName = NW_Text_GetUCS2Buffer (url, 0, &length, NULL); - } - - /* start/stop the load animation */ - browserApp = NW_Ctx_Get(NW_CTX_BROWSER_APP, 0); - if (state) - { - (void) CShell::NW_UI_StartContentLoad(browserApp, urlName); - } - else - { - (void) CShell::NW_UI_StopContentLoad(browserApp, urlName); - } - - // delete the url (memory allocated in GetCurrentUrl) - NW_Object_Delete(url); - - /* successfull completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::LoadProgressOn (NW_Uint16 transactionId) - { - void *browserApp = NULL; - - browserApp = NW_Ctx_Get(NW_CTX_BROWSER_APP, 0); - - (void) CShell::NW_UI_UrlLoadProgressOn(browserApp, transactionId); - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::LoadProgressOff(NW_Uint16 transactionId) - { - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventUrlLoadingFinished, - 0, (TUint16)(transactionId))); - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -NW_Bool -CShell::ReportError (NW_HED_DocumentRoot_t* documentRoot, - NW_Int16 errorClass, - NW_WaeError_t error, - ReportErrorCallback* callback) -{ - /* display the error */ - DisplayError (errorClass, error); - - /* - ** call the callback to complete the process. - ** - ** Note: this default implementation uses the synchronous "Error API" to display - ** the error. One could override this method for a particular platform - ** to use an asynchronous error reporting mechanism (calling the callback after - ** the user acknowledges it). - */ - if (callback != NULL) { - return (callback) (documentRoot, errorClass, error); - /* Be careful adding code after this line, since we may already exitted the browser */ - } - - return NW_FALSE; /* we are not exitting browser */ -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_RootBox_t* -CShell::GetRootBox () - { - NW_LMgr_RootBox_t* rootBox=NULL; - - if (iView) - { - rootBox = iView->GetRootBox(); - } - - return rootBox; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CShell::ShowNamedBox (NW_LMgr_Box_t* boxTree, - const NW_Text_t* name) -{ - TBrowserStatusCode status; - NW_LMgr_Box_t* targetBox = NULL; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Property_t prop; - - /* find the named box */ - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, boxTree); - (void) NW_LMgr_BoxVisitor_SetCurrentBox (&boxVisitor, boxTree); - - while((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_boxName, &prop); - - if ((status == KBrsrSuccess) && (prop.type == NW_CSS_ValueType_Text)) { - if (!NW_Text_Compare (name, prop.value.object)) { - targetBox = box; - break; - } - } - } - - /* show the targetBox */ - if (targetBox != NULL) { - return SetAnchorName (const_cast<NW_Text_t*>(name)); - } - else { - return KBrsrNotFound; - } -} - -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::SetAnchorName (NW_Text_t *anchorName) -{ - NW_TRY(status) - { - status = iView->SetAnchorName(anchorName); - _NW_THROW_ON_ERROR(status); - status = iView->Draw (NW_TRUE); - _NW_THROW_ON_ERROR(status); - } - NW_CATCH (status){ - } - NW_FINALLY{ - return status; - } - NW_END_TRY -} - -// ---------------------------------------------------------------------------- -void -CShell::SetFileOpenedByDocHandler( TBool aFileOpenedByDocHandler ) - { - iFileOpenedByDocHandler = aFileOpenedByDocHandler; - } - -/* ------------------------------------------------------------------------- */ -/* CShell::SendRedrawMsg - * - * Sends a redraw request message to itself. - * - * Parameters: - * image: this object - */ -TBrowserStatusCode -CShell::SendRedrawMsg (NW_Bool drawNow) -{ - NW_Msg_Message_t* message = NULL; - - NW_TRY (status) { - /* create the redraw message */ - - if(drawNow) - message = NW_Msg_Message_New (SHELL_MSG_REDRAW_NOW, NULL, NW_FALSE); - else - message = NW_Msg_Message_New (SHELL_MSG_REDRAW, NULL, NW_FALSE); - NW_THROW_OOM_ON_NULL (message, status); - message->data = this; - - /* dispatch it */ - status = NW_Msg_MessageDispatcher_DispatchMessage (&NW_Msg_MessageDispatcher, message, this); - NW_THROW_ON_ERROR (status); - - message = NULL; - - /* message successfully sent, increment the counter */ - iNumRedraws += 1; - } - - NW_CATCH (status) { - NW_Object_Delete (message); - } - - NW_FINALLY { - /* successful completion */ - return KBrsrSuccess; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -/* CShell::SendRelayoutMsg - * - * Sends a relayout request message to itself. - * - * Parameters: - * image: this object - */ -TBrowserStatusCode -CShell::SendRelayoutMsg (NW_Bool createTabList) -{ - NW_Msg_Message_t* message = NULL; - - NW_TRY (status) { - /* create the redraw message */ - if (createTabList) - { - message = NW_Msg_Message_New (SHELL_MSG_RELAYOUT_CREATETAB, NULL, NW_FALSE); - } - else - { - message = NW_Msg_Message_New (SHELL_MSG_RELAYOUT, NULL, NW_FALSE); - } - NW_THROW_OOM_ON_NULL (message, status); - message->data = this; - - /* dispatch it */ - status = NW_Msg_MessageDispatcher_DispatchMessage (&NW_Msg_MessageDispatcher, message, this); - NW_THROW_ON_ERROR (status); - - message = NULL; - - /* message successfully sent, increment the counter */ - iNumRelayouts += 1; - } - - NW_CATCH (status) { - NW_Object_Delete (message); - } - - NW_FINALLY { - /* successful completion */ - return KBrsrSuccess; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - MSGMessageListener method implementations - * ------------------------------------------------------------------------- */ -void -CShell::HandleMessage (NW_Msg_Message_t* message) -{ - NW_LMgr_RootBox_t* rootBox; - NW_Bool createTab = NW_FALSE; - - NW_ASSERT (message != NULL); - -NW_LOG0(NW_LOG_LEVEL3, "CShell::HandleMessage"); - - rootBox = iView->GetRootBox(); - NW_ASSERT( rootBox != NULL ); - - switch (NW_Msg_Message_GetMessageId (message)) - { - case SHELL_MSG_UPDATEDISPLAY: - { - // The "UPDATEDISPLAY" messages are queued in the message queue. - // If there is more than one, then we ignore all but the last. - NW_LOG0(NW_LOG_LEVEL3, "CShell::HandleMessage SHELL_MSG_UPDATEDISPLAY"); - if (--iNumUpdates == 0) - { - // if SHELL_MSG_UPDATEDISPLAY is called while numUpdatesPartial equals to 0 - // means that the top level content handler does not support partial rendering - if( iNumUpdatesPartial == 0 ) - { - // reset rendering flags - rootBox->partialRender = NW_FALSE; - rootBox->renderingState = NW_LMgr_RootBox_RenderComplete; - } - // iNumUpdatesPartial == -1 means that the previous document has been restored - // no need to cary out any partial rendering - else if( iNumUpdatesPartial == -1 ) - { - rootBox->partialRender = NW_FALSE; - rootBox->renderingState = NW_LMgr_RootBox_RenderComplete; - iNumUpdatesPartial = 0; - } - // partial rendering just finished, adjust flag related to partial rendering - else //if( iNumUpdatesPartial != 0 ) - { - rootBox->partialRender = NW_TRUE; - rootBox->renderingState = NW_LMgr_RootBox_RenderComplete; - iNumUpdatesPartial = 0; - } - - // set priority - if( iView ) - { - // - iView->SetFormattingPriority( NW_Msg_Message_GetPriority( message ) ); - } - (void) DisplayDocument (); - } - break; - } - case SHELL_MSG_UPDATEDISPLAYPARTIAL: - { - // The "UPDATEDISPLAYPARTIAL" messages are queued in the message queue. - NW_LOG0(NW_LOG_LEVEL3, "CShell::HandleMessage SHELL_MSG_UPDATEDISPLAY"); - - if( iNumUpdatesPartial == 1 ) - // the first chunk of partial rendering, adjust partial rendering related flags - { - rootBox->partialRender = NW_TRUE; - rootBox->renderingState = NW_LMgr_RootBox_RenderFirstChunk; - } - else if( rootBox->renderingState == NW_LMgr_RootBox_RenderFirstChunk ) - // the middle chunks of partial rendering, adjust partial rendering related flags */ - { - rootBox->renderingState = NW_LMgr_RootBox_RenderFurtherChunks; - } - // set priority - if( iView ) - { - // - iView->SetFormattingPriority( NW_Msg_Message_GetPriority( message ) ); - } - (void) DisplayDocument (); - break; - } - case SHELL_MSG_RELAYOUT_CREATETAB: - createTab = NW_TRUE; - //lint -fallthrough - case SHELL_MSG_RELAYOUT: - // The "RELAYOUT" messages are queued in the message queue. - // If there is more than one, then we ignore all but the last. - // Also, no relayout is done if there is a pending "UPDATEDISPLAY". - if (--iNumRelayouts == 0 && iNumUpdates == 0) - { - TBrowserStatusCode status; - - if (iView != NULL) - { - status = iView->Relayout(createTab); - if (status == KBrsrSuccess){ - SendRedrawMsg(NW_FALSE); - } - } - } - break; - case SHELL_MSG_REDRAW_NOW: - // The "DRAW" messages are queued in the message queue. - // If there is more than one, then we ignore all but the last. - // Also, no relayout is done if there is a pending "UPDATEDISPLAY" - // or "RELAYOUT". - if (--iNumRedraws == 0 && iNumUpdates == 0 && iNumRelayouts == 0) - { - if (iView != NULL) - { - if (iView->GetRootBox() != NULL) - { - NW_LMgr_RootBox_InvalidateCache(iView->GetRootBox()); - } - (void) iView->Draw(NW_TRUE); - } - } - break; - - case SHELL_MSG_REDRAW: - // The "REDRAW" messages are queued in the message queue. - // If there is more than one, then we ignore all but the last. - // Also, no relayout is done if there is a pending "UPDATEDISPLAY" - // or "RELAYOUT". - if (--iNumRedraws == 0 && iNumUpdates == 0 && iNumRelayouts == 0) - { - if (iView != NULL) - { - if (iView->GetRootBox() != NULL) - { - NW_LMgr_RootBox_InvalidateCache(iView->GetRootBox()); - } - (void) iView->Draw(NW_FALSE); - } - } - break; - - default: - break; - } - - // delete the message - NW_Object_Delete (message); -} - -/* ------------------------------------------------------------------------- * - NW_MVC_IViewListener methods - * ------------------------------------------------------------------------- */ -void -CShell::HandleError (TBrowserStatusCode status) -{ - // display the error and reset the previous document if necessary - DisplayError (BRSR_STAT_CLASS_GENERAL, status); - RestoreDocument (); -} - -/* ------------------------------------------------------------------------- */ -void -CShell::FormattingComplete() - { - TBrowserStatusCode status = KBrsrSuccess; //R->ecma NW_Ecma_FormattingComplete(iDocumentRoot); - if(status != KBrsrSuccess) - { - HandleError (status ); - } - if (!iDocumentRoot->isLoading) - { - UrlLoadStateChanged (TBrCtlDefs::EEventContentFinished); - } - } - -// following functions come from old Epoc32Shell.cpp -/* ------------------------------------------------------------------------- */ -TInt CShell::HandleDo( TUint32 aElemId ) - { - TInt retVal=KErrNone; - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_DocumentNode_t* rootNode; - - /* get the document root node (not the DocumentRoot) */ - rootNode = NW_HED_DocumentRoot_GetChildNode (iDocumentRoot); - if (NW_Object_IsInstanceOf (rootNode, &NW_Wml1x_ContentHandler_Class)) { - NW_Wml1x_ContentHandler_t* wml1xCH; - NW_Wml_t* wml; - - wml1xCH = NW_Wml1x_ContentHandlerOf (rootNode); - wml = &wml1xCH->wmlInterpreter; - status = NW_Wml_GUIEvent (wml, (NW_Uint16)aElemId, NULL); - if (status != KBrsrSuccess) { - NW_Wml_HandleError(wml, BRSR_STAT_CLASS_GENERAL, (NW_Int16) status); - } - } - - if ( status!=KBrsrSuccess && status!= KBrsrWmlbrowserBadContent ) - { - retVal=KErrUnknown; - } - - return retVal; -} - -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::GetUseNumberBuf (NW_ADT_DynamicVector_t* dynamicVector, - void** ptr ) - { - NW_Ucs2 *pBuffer = NULL; - NW_Uint32 charCount; - NW_Ucs2 *pToWrite; - NW_ADT_Vector_Metric_t j; - NW_ADT_Vector_Metric_t size; - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicVector, - &NW_ADT_DynamicVector_Class)); - - NW_TRY (status) - { - size = NW_ADT_Vector_GetSize(dynamicVector); - - for (charCount = j = 0; j < size; j++) - { - NW_Text_t *text; - text = *((NW_Text_t**) NW_ADT_Vector_ElementAt(dynamicVector, j)); - if (text) - { - charCount += NW_Text_GetCharCount(text); - } - } - /* size to allocate */ - charCount = (charCount+size+1)*sizeof(NW_Ucs2); - - *ptr = pBuffer = pToWrite =(NW_Ucs2*) NW_Mem_Malloc(charCount); - - if (pBuffer) - { - NW_Mem_memset(pBuffer, 0, charCount); - } - - for ( j = 0; j < size; j++) - { - NW_Text_t *text; - NW_Ucs2 *ucs2Str; - - text = *((NW_Text_t **) NW_ADT_Vector_ElementAt(dynamicVector, j)); - if (text) - { - ucs2Str = NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Copy, NULL, NULL); - - if (ucs2Str && pBuffer) - { - (void)NW_Str_Strcpy (pToWrite, ucs2Str); - pToWrite += (NW_Text_GetCharCount(text) ); - /* Add LF after each element */ - *pToWrite = NW_TEXT_UCS2_LF; /* 0x0A; */ - pToWrite++; - } - - NW_Str_Delete(ucs2Str); - NW_Object_Delete(text); - } - } - - NW_THROW_OOM_ON_NULL (pBuffer, status); - - /* We had pBuffer allocated but could not allocate temporary memory - for each of the collected strings. - */ - if (size > 0 && *pBuffer == 0) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - NW_CATCH (status) - {} - NW_FINALLY - { - NW_Object_Delete(dynamicVector); - return status; - } - NW_END_TRY - } - -// ---------------------------------------------------------------------------- -void -CShell::ClearHistoryList() - {//R->history - NW_HED_HistoryStack_t *history; - - history = NW_HED_DocumentRoot_GetHistoryStack (iDocumentRoot); - if (history == NULL) { - return; - } - - /* delete all of the remaining entries */ - NW_HED_HistoryStack_DeleteAll (history); -} - -// following functions come from old CEpoc32Shell.cpp -// ---------------------------------------------------------------------------- -NW_Bool -CShell::IsConversionSupported(NW_Uint32 uid, NW_Bool * ConverterAvailable) -{ - NW_Uint32 i = 0; -//lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - TInt index, count; - - NW_ASSERT(iArrayOfCharacterSetsAvailable); - - *ConverterAvailable = NW_FALSE; - - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == uid) - { - - - // now go through the iArrayOfCharacterSetsAvailable, check whether the - // charset is in the list, if not, i.e. converter is not available during - // the runtime, set ConverterAvailable false to avoid future panic in - // PrepareToConvertToOrFromL functions. - count = iArrayOfCharacterSetsAvailable->Count(); - - for (index = 0; index < count; index++) - { - if (uid == ((CCnvCharacterSetConverter::SCharacterSet)(iArrayOfCharacterSetsAvailable->At(index))).Identifier()) - { - *ConverterAvailable = NW_TRUE; - break; - } - } - return supportedCharset[i].needsConvert; - } - } - return NW_FALSE; -} - -// ---------------------------------------------------------------------------- -NW_Uint32 -CShell::GetCharsetUid(NW_Uint32 internalEncoding) -{ - NW_Uint32 i = 0; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].internalEncoding == internalEncoding) - { - return supportedCharset[i].uid; - } - } - return 0; -} - -// ---------------------------------------------------------------------------- -NW_Uint32 -CShell::GetCharsetUid2(NW_Uint32 ianaEncoding) -{ - NW_Uint32 i = 0; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].ianaEncoding == ianaEncoding) - { - return supportedCharset[i].uid; - } - } - return KCharacterSetIdentifierIso88591; -} - -NW_Uint32 -CShell::GetUidFromCharset(NW_Uint8* charset, NW_Uint32 charsetLength) -{ - NW_Uint32 i = 0; - NW_Ucs2* supportedCharStr = NULL; - - for (; supportedCharset[i].charset != NULL; i++) - { - supportedCharStr = NW_Asc_toUcs2((char*)supportedCharset[i].charset); - - if (charsetLength == NW_Str_Strlen(supportedCharStr)*sizeof(NW_Ucs2) && - NW_Byte_Strnicmp((const NW_Byte*)supportedCharStr, (const NW_Byte*)charset, charsetLength) == 0) - { - NW_Str_Delete(supportedCharStr); - return supportedCharset[i].uid; - } - - NW_Str_Delete(supportedCharStr); - } - - return KCharacterSetIdentifierIso88591; -} - -// ---------------------------------------------------------------------------- -TInt CShell::GetCharsetAndCharsetStringFromUid(TUint aUid, TUint16* aCharset, - const TUint8** aCharsetString) - { - NW_Uint32 i = 0; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == aUid) - { - *aCharset = supportedCharset[i].ianaEncoding; - return NW_HED_CompositeContentHandler_GetCharsetString(*aCharset, aCharsetString); - } - } - return KErrArgument; - } - -// ---------------------------------------------------------------------------- -// CShell::CancelAll -// ---------------------------------------------------------------------------- -TInt -CShell::CancelAll() - { - /* invoke the cancel method on the document root */ - (void) NW_HED_DocumentNode_Cancel (iDocumentRoot, NW_HED_CancelType_User); - // UrlLoadStateChanged(EUrlLoadingStopped); - return KErrNone; - } - -// ---------------------------------------------------------------------------- -TInt -CShell::FreeConnection() - { - //UrlLoader_Disconnect(); - return KErrNone; - } - -// ---------------------------------------------------------------------------- -// CShell::HistoryLoad -// ---------------------------------------------------------------------------- -TInt -CShell::HistoryLoad(THistoryStackDirection aDirection) - {//R->history - TInt retVal=KErrNone; - NW_HED_HistoryStack_Direction_e kmDirection; - - switch ( aDirection ) - { - case EHistoryStackDirectionPrevious: - kmDirection=NW_HED_HistoryStack_Direction_Previous; - break; - - case EHistoryStackDirectionNext: - kmDirection=NW_HED_HistoryStack_Direction_Next; - break; - - /*case ERestorePrevious: - kmDirection=NW_HED_HistoryStack_Direction_RestorePrevious; - break; - - case ERestoreNext: - kmDirection=NW_HED_HistoryStack_Direction_RestoreNext; - break;*/ - - case EHistoryStackDirectionCurrent: - default: - kmDirection=NW_HED_HistoryStack_Direction_Current; - break; - } - - TBrowserStatusCode status = NW_HED_DocumentRoot_HistoryLoad (iDocumentRoot, kmDirection); - - if ( status==KBrsrHedNoCurrentHistEntry || - status==KBrsrHedNoPreviousHistEntry|| - status==KBrsrHedNoNextHistEntry) - { - retVal=KErrNotFound; - } - else if ( status != KBrsrSuccess && status != KBrsrCancelled ) - { - retVal=KErrUnknown; - } - - return retVal; - } - -// ---------------------------------------------------------------------------- -// CShell::ProcessBack -// ---------------------------------------------------------------------------- -TInt CShell::ProcessBack() - { - TInt err = KErrNone; - - if (iView->IsImageMapView()) - { - TBrowserStatusCode status = iView->SwitchFromImageMapView(); - - if (status == KBrsrSuccess) - { - err = KErrNone; - } - else - { - err = KErrUnknown; - } - } - else - { - err = HistoryLoad( EHistoryStackDirectionPrevious ); - } - - return err; - } - -// ---------------------------------------------------------------------------- -// CShell::SwitchToImgMapView -// ---------------------------------------------------------------------------- -TInt -CShell::SwitchToImgMapView() - { - TInt err = KErrNone; - - if (!iView->IsImageMapView()) - { - TBrowserStatusCode status = iView->SwitchToImageMapView(); - - if (status == KBrsrSuccess) - { - err = KErrNone; - } - else - { - err = KErrUnknown; - } - } - return err; - } - -// ---------------------------------------------------------------------------- -// CShell::SwitchFromImgMapViewIfNeeded -// ---------------------------------------------------------------------------- -TInt -CShell::SwitchFromImgMapViewIfNeeded() - { - TInt err = KErrNone; - - if (iView->IsImageMapView()) - { - TBrowserStatusCode status = iView->SwitchFromImageMapView(); - - if (status == KBrsrSuccess) - { - err = KErrNone; - } - else - { - err = KErrUnknown; - } - } - return err; - } - -// ---------------------------------------------------------------------------- -// CShell::Load -// ---------------------------------------------------------------------------- -TInt -CShell::Load (const TDesC& aUrl, TInt aApId, NW_Cache_Mode_t cacheMode) - { - // UriParser assumes the scheme is any characters prior to the first - // colon (:) This is an issue if we've been passed a url that has - // a port number or is an IPv6 address, and there is not a scheme - // in the url. If this is the case, default to using http:// scheme. - _LIT16(KPortSepStr,":"); - _LIT16(KSchemeEndStr,"://"); - _LIT16(KHTTPSchemeStr,"http://"); - TInt tempBufLength = aUrl.Length() + 8; - HBufC* tempUrl = HBufC::New(tempBufLength); - if(tempUrl == NULL) - { - return KErrNoMemory; - } - TPtr tempUrlPtr(tempUrl->Des()); - tempUrlPtr.FillZ(); - - if ((aUrl.Find(KPortSepStr) != KErrNotFound) && (aUrl.Find(KSchemeEndStr) == KErrNotFound)) - { - tempUrlPtr.Append(KHTTPSchemeStr); - } - tempUrlPtr.Append(aUrl); - tempUrlPtr.ZeroTerminate(); - - iApId = aApId; - NW_Text_t* textUrl = NW_Text_New (HTTP_iso_10646_ucs_2, - (void*) tempUrl->Des().Ptr(), - (NW_Text_Length_t)tempUrl->Des().Length(), - NW_FALSE); - - if (textUrl == NULL) - { - return KErrNoMemory; - } - - (void) SwitchFromImgMapViewIfNeeded(); - - NW_HED_DocumentRoot_SetHistoryControl(iDocumentRoot, iWmlControl ); - - TBrowserStatusCode status = StartLoad (textUrl, NULL, cacheMode); - - NW_Object_Delete(textUrl); - delete tempUrl; - - if(status == KBrsrSuccess) - { - /* - storage = (NW_Ucs2*)NW_Text_GetStorage (textUrl, 0, NULL, NULL); - NW_Str_Strcpy(g_Location, storage); - */ - return KErrNone; - } - if(status == KBrsrOutOfMemory) - { - return KErrNoMemory; - } - - if(status == KBrsrMalformedUrl) - return KErrNotFound; - - return KErrGeneral; - } - -// ---------------------------------------------------------------------------- -void -CShell::SetView (CView* aEpocView) -{ - NW_ASSERT(aEpocView!=NULL); - iView = aEpocView; // Does not take the ownership! - iView->SetShell(this); - iView->SetListener(this); - iView->SetAppServices((void *)(&appServices)); -} - -// ---------------------------------------------------------------------------- -// CShell::GetHistoryList -// ---------------------------------------------------------------------------- -TInt -CShell::GetHistoryList (CArrayFix<TBrCtlSelectOptionData>& aHistoryList) - {//R->history - NW_HED_HistoryStack_t* history = NULL; - NW_HED_HistoryVisitor_t* visitor; - const NW_HED_HistoryEntry_t* entry; - const NW_HED_HistoryEntry_t* currentEntry; - - history = NW_HED_DocumentRoot_GetHistoryStack(iDocumentRoot); - if ( history == NULL ) - { - return KErrNoMemory; - } - - // get current history position - visitor = NW_HED_HistoryVisitor_New( history, - NW_HED_HistoryVisitor_Loacation_Current ); - if ( visitor == NULL ) - { - return KErrNoMemory; - } - currentEntry = NW_HED_HistoryVisitor_Current( visitor ); - - // set inital entry at the end of docRoot's history list - if ( NW_HED_HistoryVisitor_Initialize( - visitor, history, - NW_HED_HistoryVisitor_Loacation_AtEnd ) != KBrsrSuccess ) - { - return KErrNoMemory; - } - - entry = NW_HED_HistoryVisitor_Current( visitor ); - while ( entry != NULL ) - { - TPtrC ptr; - - // use page title - if(entry->pageTitle) - { - ptr.Set(entry->pageTitle); - } - // if there's no title - use URL - if(!ptr.Length() && entry->urlResponse->rawUrl) - { - ptr.Set(entry->urlResponse->rawUrl); - } - if(!ptr.Length() && entry->urlRequest->rawUrl) - { - ptr.Set(entry->urlRequest->rawUrl); - } - - // Copy the result into a TDes. - TInt len = ptr.Length(); - if ( (ptr.Left( KHttpString().Length() ).Compare( KHttpString ) == 0 ) || - (ptr.Left( KFileString().Length() ).Compare( KFileString ) == 0 ) ) - { - len -= KHttpString().Length(); - } - ptr.Set (ptr.Right( len )); - - // set iIsSelected to true to inform host apps which one is the current history entry - TBool isSelected = (currentEntry == entry) ? ETrue : EFalse; - TBrCtlSelectOptionData historyListEntry(ptr, isSelected, EFalse, ETrue); - - // add history list entry - TInt err; - TRAP(err, aHistoryList.AppendL (historyListEntry)); - if (err != KErrNone) - { - return err; - } - - /* advance to the next entry */ - entry = NW_HED_HistoryVisitor_Prev( visitor ); - } - - NW_Object_Delete( visitor ); - - return KErrNone; - } - -// ---------------------------------------------------------------------------- -// CShell::HistoryStackPosition() -// ---------------------------------------------------------------------------- -TWmlEngineDefs::THistoryStackPosition -CShell::HistoryStackPosition() - {//R->history - TWmlEngineDefs::THistoryStackPosition pos = TWmlEngineDefs::EHistoryInTheMiddle; - NW_HED_HistoryStack_t* history; - NW_HED_HistoryVisitor_t* visitor; - - if ( ( history = NW_HED_DocumentRoot_GetHistoryStack ( iDocumentRoot ) ) != NULL ) - { - if ( ( visitor = NW_HED_HistoryVisitor_New( history, - NW_HED_HistoryVisitor_Loacation_Current ) ) != NULL ) - { - /* if we can not go forward we are at the end of the stack */ - if ( NW_HED_HistoryVisitor_Next( visitor ) == NULL ) - { - pos = TWmlEngineDefs::EHistoryAtTheEnd; - } - else - { - /* we made one step forward, so step back to current entry */ - NW_HED_HistoryVisitor_Prev( visitor ); - } - - /* if we can not go back we are at the beginning of the stack */ - if ( NW_HED_HistoryVisitor_Prev( visitor ) == NULL ) - { - pos = TWmlEngineDefs::EHistoryAtTheBeginning; - } - - NW_Object_Delete( visitor ); - } - } - - return pos; - } - -// ------------------------------------------------------------------------- -// CShell::LoadHistoryEntry(CArrayFix<TBrCtlSelectOptionData>& aHistoryList) -// ------------------------------------------------------------------------- -TInt -CShell::LoadHistoryEntry (CArrayFix<TBrCtlSelectOptionData>& aHistoryList) - {//R->history - TInt size = aHistoryList.Count(); -//lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - TInt index; - for (index = 0 ; index < size ; index++) - { - TBrCtlSelectOptionData& entry = aHistoryList[index]; - if (entry.IsSelected()) - { - break; - } - } - - /* get docRoot's history stack */ - NW_HED_HistoryStack_t* docHistory = NW_HED_DocumentRoot_GetHistoryStack( iDocumentRoot ); - if ( docHistory == NULL ) - { - return KErrNoMemory; - } - - // docRoot's history stack has a reversed order of entries compared to CArrayFix<TBrCtlSelectOptionData> - // this is because in GetHistoryList(): - // entry taken from docRoot's history stack at NW_HED_HistoryVisitor_Loacation_AtEnd - // and then appended to CArrayFix<TBrCtlSelectOptionData> - index = size - index - 1; - NW_HED_HistoryEntry_t* entry = NW_HED_HistoryStack_GetEntryByIndex (docHistory, - (NW_HED_HistoryStack_Metric_t)index); - - if ( NW_HED_HistoryStack_SetCurrentEntry( docHistory, entry ) != KBrsrSuccess ) - { - return KErrNotFound; - } - - (void) SwitchFromImgMapViewIfNeeded(); - - if (NW_HED_DocumentRoot_HistoryLoad (iDocumentRoot, NW_HED_HistoryStack_Direction_Current) != KBrsrSuccess) - { - return KErrGeneral; - } - - return KErrNone; - } - - -// ---------------------------------------------------------------------------- -// CShell::SetBoxTree(NW_LMgr_Box_t* aBoxTree) -// ---------------------------------------------------------------------------- -TInt -CShell::SetBoxTree( NW_LMgr_Box_t* aBoxTree ) - { - __ASSERT_DEBUG(iView, Panic(KPanicKmShellViewPtrIsNotSet)); - - TInt status; - - NW_LMgr_RootBox_t* rootBox = iView->GetRootBox (); - - status = iView->SetBoxTree (aBoxTree); - - // update CBA depends on if browser or external apps opened the file - if( !iFileOpenedByDocHandler ) - { - iView->UpdateCBAs (); - } - // else, e.g. NotePad.exe opened the file, we can't update CBAs - - (void) iView->Draw (NW_TRUE /*DrawNow*/); - - if ( status== KBrsrSuccess && aBoxTree) - { - if (!rootBox->partialRender || - rootBox->partialRender && - rootBox->renderingState == NW_LMgr_RootBox_RenderFirstChunk) - { - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventNewContentDisplayed, 0, 0)); - } - else if (rootBox->partialRender && - rootBox->renderingState == NW_LMgr_RootBox_RenderFurtherChunks) - { - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventMoreContentDisplayed, 0, 0)); - } - } - - return KBrsrSuccess; - } - -// ---------------------------------------------------------------------------- -void -CShell::OptionListInit() - { - iWmlControl->WKWmlInterface()->resetWmlServiceOptions(); - } - -// ---------------------------------------------------------------------------- -void -CShell::OptionListAddItem( const TText* aText, TUint32 aElemID, TInt aElType ) - { - TInt err; - TRAP(err, iWmlControl->WKWmlInterface()->setWmlServiceOptionsAddItemL(aText, aElemID, aElType)); - } - -// ---------------------------------------------------------------------------- -void -CShell::UrlLoadStateChanged(TBrCtlDefs::TBrCtlLoadEvent /*aEvent*/) - { - } - -// ---------------------------------------------------------------------------- -void -CShell::UpdateTitle() -{ - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL (TBrCtlDefs::EEventTitleAvailable, 0, 0)); -} - -// ---------------------------------------------------------------------------- -// CShell::DialogApi -// ---------------------------------------------------------------------------- - -HBufC* -CShell::GetCurrentUrlInHBufCL() const -{ - NW_Text_t* currentUrl = (const_cast<CShell*>(this))->GetCurrentUrl (); - - HBufC* ret = NULL; - if (currentUrl && NW_Text_GetCharCount(currentUrl) > 0) - { - NW_Ucs2* currentUrlUcs2 = NW_Text_GetUCS2Buffer(currentUrl, NW_Text_Flags_NullTerminated, NULL, NULL); - ret = TPtrC(currentUrlUcs2).AllocL(); - } - else - { - _LIT(KEmptyString, " "); - ret = KEmptyString().AllocL(); - } - - NW_Object_Delete(currentUrl); - - return ret; -} - -// ---------------------------------------------------------------------------- -HBufC* -CShell::GetCurrentTitleInHBufCL( TBool& aStripUrl) const -{ - NW_REQUIRED_PARAM( aStripUrl ); - - const NW_Text_t* currentTitleTxt = (const_cast<CShell*>(this))->GetCurrentTitle (); - - HBufC* ret = NULL; - - if (currentTitleTxt && NW_Text_GetCharCount(currentTitleTxt) > 0) - { - NW_Ucs2* currentTitleUcs2 = NW_Text_GetUCS2Buffer(currentTitleTxt, NW_Text_Flags_NullTerminated, NULL, NULL); - ret = TPtrC(currentTitleUcs2).AllocL(); - } - else - { - ret = GetCurrentUrlInHBufCL(); - aStripUrl = ETrue; - } - - return ret; -} - -// ---------------------------------------------------------------------------- -TUint16 -CShell::SaveToFileL(TDesC& aFileName) const -{ - HBufC* hbuf = HBufC::New(aFileName.Length()+1); - TUint16 err = 1; /* default to sucess */ - CleanupStack::PushL(hbuf); - hbuf->Des().Append(aFileName); - - /* get the document root node (not the DocumentRoot) */ - NW_ASSERT (iDocumentRoot != NULL); - NW_HED_DocumentNode_t* rootNode = NW_HED_DocumentRoot_GetChildNode (iDocumentRoot); - - TBrowserStatusCode status; - if (NW_Object_IsClass(rootNode, &NW_Wml1x_Epoc32ContentHandler_Class)) - { - status = NW_Wml1x_Epoc32ContentHandler_SaveToFile(NW_Wml1x_Epoc32ContentHandlerOf(rootNode), CONST_CAST(TUint16*, hbuf->Des().PtrZ())); - } - else if (NW_Object_IsClass(rootNode, &NW_XHTML_Epoc32ContentHandler_Class)) - { - status = NW_XHTML_Epoc32ContentHandler_SaveToFile(NW_XHTML_Epoc32ContentHandlerOf(rootNode), CONST_CAST(TUint16*, hbuf->Des().PtrZ())); - } - else - { - status = KBrsrFailure; - } - - if( status != KBrsrSuccess ) - { - Shell()->iBrCtl->brCtlDialogsProvider()->DialogNotifyErrorL(status); - err = 0; /* failure */ - } - CleanupStack::PopAndDestroy(); - - /* in this particular case, the UI is expecting 0 on failure and 1 on success */ - return err; -} -// ------------------------------------------------------------------------------- -// CShell::GetPageAsTextL() -// ------------------------------------------------------------------------------- -// -HBufC* -CShell::GetPageAsTextL() - { - NW_ADT_DynamicVector_t* dynamicVector; - - - TText* ptr = NULL; - dynamicVector = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New ( sizeof (NW_Text_t*), 5, 5 ); - - TBrowserStatusCode status1 = KBrsrFailure; - TBrowserStatusCode status = KBrsrFailure; - - if( dynamicVector ) - { - status1 = GetUseNumberContent (dynamicVector); - status = GetUseNumberBuf( dynamicVector, (void**) &ptr ); - } - if( status == KBrsrSuccess ) - { - status = status1; - } - if( status != KBrsrSuccess ) - { - return HBufC::NewL(0); - } - else - { - HBufC* pageText = NULL; - TPtrC bufPointer( ptr ); - pageText = bufPointer.AllocL(); - - NW_Mem_Free( ptr ); - return pageText; - } - -} - -// ------------------------------------------------------------------------------- -// CShell::GetPageAsWMLMarkUp() -// Get the page as WML markup And contents as in the DOM. -// ------------------------------------------------------------------------------- -// -HBufC8* -CShell::GetPageAsWMLMarkUp() -{ - NW_HED_ContentHandler_t* contentHandler; - NW_Wml1x_Epoc32ContentHandler_t *wmlContentHandler; - NW_Wml1x_ContentHandler_t *wml1xch; - HBufC8* pageWML = NULL; - - /* get the document root node (not the DocumentRoot) */ - NW_ASSERT (iDocumentRoot != NULL); - NW_HED_DocumentNode_t* rootNode = NW_HED_DocumentRoot_GetChildNode (iDocumentRoot); - - - - if (NW_Object_IsClass(rootNode, &NW_Wml1x_Epoc32ContentHandler_Class)) - { - wmlContentHandler = NW_Wml1x_Epoc32ContentHandlerOf(rootNode); - wml1xch = NW_Wml1x_ContentHandlerOf(wmlContentHandler); - contentHandler = NW_HED_ContentHandlerOf( wml1xch ); - - pageWML = HBufC8::NewL(contentHandler->response->body->length); - pageWML->Des().Copy(contentHandler->response->body->data,contentHandler->response->body->length); - - } - return pageWML; -}//end CShell::GetPageAsWMLMarkUp() - - -// ------------------------------------------------------------------------------- -// CShell::GetCharsetFromResponse() -// Get the charset from the header. -// ------------------------------------------------------------------------------- -// - - -const NW_Uint8* CShell::GetCharsetFromResponse() -{ - - NW_HED_ContentHandler_t* contentHandler; - NW_Wml1x_Epoc32ContentHandler_t *wmlContentHandler; - NW_Wml1x_ContentHandler_t *wml1xch; - - /* get the document root node (not the DocumentRoot) */ - NW_ASSERT (iDocumentRoot != NULL); - NW_HED_DocumentNode_t* rootNode = NW_HED_DocumentRoot_GetChildNode (iDocumentRoot); - - if (NW_Object_IsClass(rootNode, &NW_Wml1x_Epoc32ContentHandler_Class)) - { - wmlContentHandler = NW_Wml1x_Epoc32ContentHandlerOf(rootNode); - wml1xch = NW_Wml1x_ContentHandlerOf(wmlContentHandler); - contentHandler = NW_HED_ContentHandlerOf( wml1xch ); - - NW_Uint32 charsetUid = GetCharsetUid2(contentHandler->response->charset); - - for (NW_Uint32 i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == charsetUid) - { - return supportedCharset[i].charset; - } - } - - } - - return NULL; - -}//end CShell::GetCharsetFromResponse() - - -// ---------------------------------------------------------------------------- -// CShell::ShowImagesL() -// ---------------------------------------------------------------------------- -// -void -CShell::ShowImagesL() const - { - TBrowserStatusCode status = NW_HED_DocumentRoot_ShowImages(iDocumentRoot); - if( status != KBrsrSuccess ) - { - if(status == KBrsrOutOfMemory) - User::LeaveNoMemory(); - else - User::Leave(status); - } - } - -// ---------------------------------------------------------------------------- -void -CShell::CharacterSetChangedL( TUint aSelectedCharacterSet ) - { - NW_Bool available = NW_TRUE; - // if called here, char converter should always be available - // therefore, no need to check the return value of available - if (IsConversionSupported(aSelectedCharacterSet, &available)) - { - // Create the character Converter object if not created already - if( !iCharacterSetConverter ) - { - iCharacterSetConverter = CCnvCharacterSetConverter::NewL(); - } - if( !iArrayOfCharacterSetsAvailable ) - { - iArrayOfCharacterSetsAvailable = - CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL( iRfs ); - User::LeaveIfNull( iArrayOfCharacterSetsAvailable ); - } - // Specifies the character set to convert to/from using a search array. - iCharacterSetConverter->PrepareToConvertToOrFromL( aSelectedCharacterSet, - *iArrayOfCharacterSetsAvailable, iRfs); - iCharacterSetConverter->SetDefaultEndiannessOfForeignCharacters( CCnvCharacterSetConverter::ELittleEndian ); - // set the charset flags - iSelectedCharacterSet = aSelectedCharacterSet; - iCurrentConverter = aSelectedCharacterSet; - } - else - { - iSelectedCharacterSet = aSelectedCharacterSet; - } - } - -/* Convert a foreign charset encoding into a UCS2 encoding stream, - * such as GB2312 or Big5 using Symbian Character set converter. - * return values: - * KErrNone (0) : if no conversion is necessary or conversion succeeded - * EErrorIllFormedInput: if there is some parsing error in conversion. - * same value as KErrCorrupt=(-20); - */ -TUint -CShell::ConvertFromForeignCharSetL(void* resp) -{ - NW_Uint32 uid; - NW_Url_Resp_t* response = (NW_Url_Resp_t*)resp; - NW_Bool available = NW_FALSE; - NW_ASSERT(resp != NULL); - uid = GetCharsetUid2(response->charset); - /* response->charset must be the same as the current settings, or the current setting must be automatic */ - - NW_ASSERT((uid == iSelectedCharacterSet) || iSelectedCharacterSet == 0); - if (IsConversionSupported(uid, &available)) - { - if (!available) - { - NW_LOG1(NW_LOG_LEVEL2, "ConvertFromForeignCharSetL returns KBrsrMvcConverterNotFound for encoding: %x.", response->charset); - User::Leave(KBrsrMvcConverterNotFound); - } - if (!(uid == iCurrentConverter)) - { - // Create the character Converter object if not created already - if( !iCharacterSetConverter ) - { - iCharacterSetConverter = CCnvCharacterSetConverter::NewL(); - } - if( !iArrayOfCharacterSetsAvailable ) - { - iArrayOfCharacterSetsAvailable = - CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL( iRfs ); - User::LeaveIfNull( iArrayOfCharacterSetsAvailable ); - } - // Specifies the character set to convert to/from using a search array. - iCharacterSetConverter->PrepareToConvertToOrFromL( uid, - *iArrayOfCharacterSetsAvailable, iRfs); - iCharacterSetConverter->SetDefaultEndiannessOfForeignCharacters( CCnvCharacterSetConverter::ELittleEndian ); - // set the charset flags - iCurrentConverter = uid; - } - TPtrC8 originalForeign(response->body->data,response->body->length); - TBuf16<20> outputBuffer; - HBufC16* generatedUnicode = HBufC16::NewL(20); - CleanupStack::PushL(generatedUnicode); /*when use realloc later, the pointer is destroyed and realloc. cannot use NewLC here*/ - TInt state = CCnvCharacterSetConverter::KStateDefault; - TInt returnValue = KErrNone; - FOREVER - { - returnValue = iCharacterSetConverter->ConvertToUnicode(outputBuffer, originalForeign, state); - generatedUnicode->Des().Append(outputBuffer); - CleanupStack::Pop(); - generatedUnicode = generatedUnicode->ReAllocL(generatedUnicode->Des().Length()+20); - CleanupStack::PushL(generatedUnicode); - if (returnValue <= 0) - { - break; - } - originalForeign.Set(originalForeign.Right(returnValue)); - } - if (returnValue >= 0) /*no error at all when converting*/ - { - NW_Byte* generateData = (NW_Byte*)NW_Mem_Malloc(generatedUnicode->Des().Length()*2); /*16 bit to 8 bit*/ - if (generateData == NULL) - { - User::Leave(KErrNoMemory); - } - NW_Mem_Free(response->body->data); /*free the orginial data*/ - TPtr16 TempBodyData((unsigned short*)generateData,generatedUnicode->Des().Length()); /*this casting ok, this is home we can use the Des16 to copy the data to the buffer*/ - TempBodyData.Copy(generatedUnicode->Des()); - response->body->data = generateData; - response->body->length = generatedUnicode->Des().Length()*2; - response->body->allocatedLength = response->body->length; - response->charset = HTTP_iso_10646_ucs_2; - } - else - { - CleanupStack::PopAndDestroy();//generatedUnicode - User::Leave(returnValue); - } - - // change the byte order to big endian becasue tempest expects big endian coming from network. - // code copy from NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder function. - NW_Uint16 c_ucs2; - NW_Uint32 i = 0; - for (i = 0; i < response->body->length; i += 2) - { - /* this is a clever trick: pick up bytes in big endian order, - force the result to memory via taking address of result which - will put the 16-bits into native byte order, then copy the - result over the original bytes */ - c_ucs2 = (NW_Uint16)((response->body->data[i] << 8) | response->body->data[i+1]); - (void)NW_Mem_memcpy(response->body->data + i, &c_ucs2, sizeof(NW_Uint16)); - } - - CleanupStack::Pop(); /*generatedUnicode*/ - delete generatedUnicode; - //CleanupStack::PopAndDestroy(2); - } - return KErrNone; -} - - -/* Convert a foreign charset encoding into a UCS2 encoding stream, - * such as GB2312 or Big5 using Symbian Character set converter. - * return values: - * KErrNone (0) : if no conversion is necessary or conversion succeeded - * EErrorIllFormedInput: if there is some parsing error in conversion. - * same value as KErrCorrupt=(-20); - */ -TUint -CShell::ConvertFromForeignChunkL( NW_Uint32 foreignEncoding, void* inBuf, TInt * numUnconvertible, TInt* indexFirstUnconvertible, void** outBuf) -{ - NW_Uint32 uid; - TInt unconvertible = -1; - TInt firstUnconvertible = -1; - NW_Buffer_t * buf = NULL; - NW_Bool available; - - NW_ASSERT(inBuf != NULL); - NW_ASSERT(outBuf != NULL); - - uid = GetCharsetUid2(foreignEncoding); - // response->charset must be the same as the current settings, or the current setting must be automatic - - NW_ASSERT((uid == iSelectedCharacterSet) || iSelectedCharacterSet == 0); - if (IsConversionSupported(uid, &available)) - { - if (!available) - { - NW_LOG1(NW_LOG_LEVEL2, "ConvertFromForeignChunkL returns KBrsrMvcConverterNotFound for encoding: %x.", foreignEncoding); - User::Leave(KBrsrMvcConverterNotFound); - } - - if (uid != iCurrentConverter) - { - // Create the character Converter object if not created already - if( !iCharacterSetConverter ) - { - iCharacterSetConverter = CCnvCharacterSetConverter::NewL(); - } - if( !iArrayOfCharacterSetsAvailable ) - { - iArrayOfCharacterSetsAvailable = - CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL( iRfs ); - User::LeaveIfNull( iArrayOfCharacterSetsAvailable ); - } - // Specifies the character set to convert to/from using a search array. - iCharacterSetConverter->PrepareToConvertToOrFromL( uid, - *iArrayOfCharacterSetsAvailable, iRfs); - - iCharacterSetConverter->SetDefaultEndiannessOfForeignCharacters( CCnvCharacterSetConverter::ELittleEndian ); - // set the charset flags - iCurrentConverter = uid; - } - TPtrC8 originalForeign(((NW_Buffer_t*)inBuf)->data,((NW_Buffer_t*)inBuf)->length); - TBuf16<20> outputBuffer; - HBufC16* generatedUnicode = HBufC16::NewL(20); - CleanupStack::PushL(generatedUnicode); //when use realloc later, the pointer is destroyed and realloc. cannot use NewLC here - TInt state = CCnvCharacterSetConverter::KStateDefault; - TInt returnValue = KErrNone; - FOREVER - { - returnValue = iCharacterSetConverter->ConvertToUnicode(outputBuffer, originalForeign, state, unconvertible, firstUnconvertible); - *numUnconvertible = unconvertible; - if (firstUnconvertible != -1) - { - *indexFirstUnconvertible = firstUnconvertible; - } - // keep track on how many successful converted chars already - else if (returnValue > 0) - { - *indexFirstUnconvertible = ((NW_Buffer_t*)inBuf)->length - returnValue; - } - generatedUnicode->Des().Append(outputBuffer); - CleanupStack::Pop(); - generatedUnicode = generatedUnicode->ReAllocL(generatedUnicode->Des().Length()+20); - CleanupStack::PushL(generatedUnicode); - if (returnValue == 0 && *numUnconvertible > 2) - { - returnValue = KErrCorrupt; - } - if (returnValue <= 0) - { - break; - } - originalForeign.Set(originalForeign.Right(returnValue)); - } - // some error tolerance due to incomplete character - if (returnValue < 0 && *indexFirstUnconvertible != -1) - { *numUnconvertible = ((NW_Buffer_t*)inBuf)->length - *indexFirstUnconvertible; - if (*numUnconvertible <= 2) - returnValue = KErrNone; - } - if (returnValue >= 0 ) - { - buf = (NW_Buffer_t*)NW_Buffer_New(0); - User::LeaveIfNull(buf); - *outBuf = buf; - NW_Byte* generateData = (NW_Byte*)NW_Mem_Malloc(generatedUnicode->Des().Length()*2); //16 bit to 8 bit - User::LeaveIfNull(generateData); - buf->data = generateData; - TPtr16 TempBodyData((unsigned short*)generateData,generatedUnicode->Des().Length()); /// this casting ok, this is home we can use the Des16 to copy the data to the buffer - TempBodyData.Copy(generatedUnicode->Des()); - buf->length = generatedUnicode->Des().Length()*2; - } - else - { - CleanupStack::PopAndDestroy();//generatedUnicode - User::Leave(returnValue); - } - - // change the byte order to big endian becasue tempest expects big endian coming from network. - // code copy from NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder function. - NW_Uint16 c_ucs2; - NW_Uint32 i = 0; - for (i = 0; i < buf->length; i += 2) - { - // this is a clever trick: pick up bytes in big endian order, - //force the result to memory via taking address of result which - //will put the 16-bits into native byte order, then copy the - // result over the original bytes - c_ucs2 = (NW_Uint16)((buf->data[i] << 8) | buf->data[i+1]); - (void)NW_Mem_memcpy(buf->data + i, &c_ucs2, sizeof(NW_Uint16)); - } - - CleanupStack::Pop(); //generatedUnicode - delete generatedUnicode; - //CleanupStack::PopAndDestroy(2); - } - - return KErrNone; -} - -/* Convert UCS2 encoding stream into a foreign charset encoding, - * such as GB2312 or Big5 using Symbian Character set converter. - * return values: - * KErrNone (0) : if no conversion is necessary or conversion succeeded - * EErrorIllFormedInput: if there is some parsing error in conversion. - * same value as KErrCorrupt=(-20); - */ -TUint -CShell::ConvertToForeignCharSetL(void* ucsText) -{ - if (!ucsText) - return KErrNone; - TUint settingEncoding = NW_Settings_GetOriginalEncoding(); - TUint uid = GetCharsetUid2(settingEncoding); - NW_Bool available =NW_FALSE; - if (!IsConversionSupported(uid, &available)) - User::Leave(KBrsrMvcConverterNotFound); - else if (!available) - { - NW_LOG1(NW_LOG_LEVEL2, "ConvertToForeignCharSetL returns KBrsrMvcConverterNotFound for encoding: %x.", settingEncoding); - User::Leave(KBrsrMvcConverterNotFound); - } - - NW_String_t* text = (NW_String_t*)ucsText; - if (NW_String_getStorage(text) == 0) - return KErrNone; - - if (!(uid == iCurrentConverter)) - { - // Create the character Converter object if not created already - if( !iCharacterSetConverter ) - { - iCharacterSetConverter = CCnvCharacterSetConverter::NewL(); - } - if( !iArrayOfCharacterSetsAvailable ) - { - iArrayOfCharacterSetsAvailable = - CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL( iRfs ); - User::LeaveIfNull( iArrayOfCharacterSetsAvailable ); - } - // Specifies the character set to convert to/from using a search array. - iCharacterSetConverter->PrepareToConvertToOrFromL( uid, - *iArrayOfCharacterSetsAvailable, iRfs); - iCharacterSetConverter->SetDefaultEndiannessOfForeignCharacters( CCnvCharacterSetConverter::ELittleEndian ); - // set the charset flags - iCurrentConverter = uid; - } - - - TPtrC16 originalUcs((const unsigned short *)NW_String_getStorage(text), NW_String_getByteCount (text)/2); - TBuf8<20> outputBuffer; - HBufC8* generatedBuffer= HBufC8::NewL(20); - CleanupStack::PushL(generatedBuffer); - TInt returnValue = KErrGeneral; - FOREVER - { - returnValue = iCharacterSetConverter->ConvertFromUnicode(outputBuffer, originalUcs); - generatedBuffer->Des().Append(outputBuffer); - CleanupStack::Pop(); - generatedBuffer = generatedBuffer->ReAllocL(generatedBuffer->Des().Length()+20); - CleanupStack::PushL(generatedBuffer); - if (returnValue <= 0) - break; - originalUcs.Set(originalUcs.Right(returnValue)); - } - if (returnValue >= 0) { - NW_Byte* generateData = (NW_Byte*)NW_Mem_Malloc(generatedBuffer->Des().Length() + 2); - if (generateData == NULL) - User::Leave(KErrNoMemory); - NW_String_deleteStorage(text); - TPtr8 TempBodyData((unsigned char*)generateData, generatedBuffer->Des().Length()); - TempBodyData.Copy(generatedBuffer->Des()); - /* make sure there are enough null bytes at the end of string, for future Ucs2 manipulation*/ - *(generateData + generatedBuffer->Des().Length()) = 0; - *(generateData + generatedBuffer->Des().Length() + 1) = 0; - text->storage = generateData; - text->length = generatedBuffer->Des().Length() + 2; - } - - CleanupStack::Pop(); /*generatedBuffer*/ - delete generatedBuffer; - //CleanupStack::PopAndDestroy(2); - return returnValue; - -} - -// ---------------------------------------------------------------------------- -// CShell::GetCertInfo() -// ---------------------------------------------------------------------------- -// -void* -CShell::GetCertInfo() -{ - return NW_HED_DocumentRoot_GetCertInfo (iDocumentRoot); -} - -//-------------------------------------------------------------------------- -// CShell::NotifyProgress() -//-------------------------------------------------------------------------- -void -CShell::NotifyProgress(TBrCtlDefs::TBrCtlLoadEvent aEvent, - TUint32 aSize, - TUint16 aTransactionId) - { - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(aEvent, aSize, aTransactionId)); - } - -//-------------------------------------------------------------------------- -// CShell::NotifyProgress() -//-------------------------------------------------------------------------- -MBrCtlSpecialLoadObserver* -CShell::GetLoadObserver() - { - return iBrCtl->brCtlSpecialLoadObserver(); - } - -//-------------------------------------------------------------------------- -// CShell::HandleDownloadL() -//-------------------------------------------------------------------------- -// -TBool -CShell::HandleDownloadL(RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray) - { - return iBrCtl->brCtlSpecialLoadObserver()->HandleDownloadL(aTypeArray, aDesArray); - } - -// functions from old Epoc32ShellCallbacks.cpp -// ---------------------------------------------------------------------------- -// CShell::GetLocalizedString -// ---------------------------------------------------------------------------- -TUint16* -CShell::NW_UI_GetLocalizedString( NW_Uint32 type ) -{ - TInt resourceId = 0; - TUint16* pLocal = NULL; - switch ((TKmLocStringId)type) - { - case EKmLocSubmitButton: - resourceId = R_KIMONO_FORM_BUTTON_SUBMIT; - break; - case EKmLocResetButton: - resourceId = R_KIMONO_FORM_BUTTON_RESET; - break; - case EKmLocSelectLabel: - resourceId = R_KIMONO_FORM_OPTION_SELECT; - break; - case EKmLocBackSoftkeyLabel: - resourceId = R_KIMONO_SOFTKEY_BACK; - break; - } - - HBufC* returnedString = NULL; - TInt err; - TRAP(err, returnedString = StringLoader::LoadLC(resourceId);CleanupStack::Pop()); - if (err == KErrNone) - { - err = StringUtils::ConvertPtrUcs2ToUcs2(*returnedString, &pLocal); - delete returnedString; - } - return (TUint16*)pLocal; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_StartContentLoad -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_StartContentLoad(void *userAgent, const NW_Ucs2* urlName) -{ - CShell* shell = (CShell*)userAgent; - NW_REQUIRED_PARAM(urlName); - // reset the iDoNotRestoreContentFlag - shell->UrlLoadStateChanged (TBrCtlDefs::EEventNewContentStart); - - return KBrsrSuccess; -} - - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_StopContentLoad -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_StopContentLoad(void *userAgent, const NW_Ucs2* urlName) -{ - CShell* shell = (CShell*)userAgent; - NW_REQUIRED_PARAM(urlName); - - // Stop the progressbar - shell->UrlLoadStateChanged (TBrCtlDefs::EEventLoadFinished); - // if iNumUpdates == 0 here, probably formatting completed before load finshied - // EEventContentFinished was not sent ( see CShell::FormattingComplete() ) - // send EEventContentFinished here - if (shell->iNumRelayouts == 0) - { - shell->UrlLoadStateChanged(TBrCtlDefs::EEventContentFinished); - } - shell->StartIdle(); - - return KBrsrSuccess; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_UrlLoadProgressOn -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_UrlLoadProgressOn(void* wae, NW_Uint16 transactionId) -{ - CShell* shell = (CShell*)wae; - TInt err; - TRAP(err, shell->iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventUrlLoadingStart, - 0, (TUint16)(transactionId))); - return KBrsrSuccess; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_HttpError -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_HttpError (void *userAgent, - const NW_WaeHttpStatus_t httpError, - const NW_Ucs2 *uri, - void *callback_ctx, - NW_ErrorCB_t *callback) - { - NW_REQUIRED_PARAM(userAgent); - NW_REQUIRED_PARAM(callback_ctx); - NW_REQUIRED_PARAM(callback); - - TInt err; - TRAP(err, Shell()->iBrCtl->brCtlDialogsProvider()->DialogNotifyHttpErrorL(httpError, PtrCFromTText(uri))); - __ASSERT_DEBUG(err == KErrNone, Panic(err)); - - TInt err1; - TRAP(err1, Shell()->iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventLoadError, 0, 0)); - - if (callback) - { - (void) (callback)(callback_ctx, (err == KErrNone ? KBrsrSuccess : KBrsrFailure)); - } - - return (err == KErrNone ? KBrsrSuccess : KBrsrFailure); - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_NotifyError -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_NotifyError (void *userAgent, - const TBrowserStatusCode status, - void *callback_ctx, - NW_ErrorCB_t *callback) - { - NW_REQUIRED_PARAM(userAgent); - NW_REQUIRED_PARAM(callback_ctx); - NW_REQUIRED_PARAM(callback); - - TInt err; - TRAP(err, Shell()->iBrCtl->brCtlDialogsProvider()->DialogNotifyErrorL(status)); - - TInt err1; - TRAP(err1, Shell()->iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventLoadError, 0, 0)); - - if (callback) - { - (void) (callback)(callback_ctx, (err == KErrNone ? KBrsrSuccess : KBrsrFailure)); - } - if (err == KErrNoMemory) - return KBrsrOutOfMemory; - - return (err == KErrNone ? KBrsrSuccess : KBrsrFailure); - } - -// ---------------------------------------------------------------------------- -// NW_UI_GetUserAuthenticationData -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_GetUserAuthenticationDataL(const NW_Ucs2* aUri, - const NW_Ucs2* aUsername, - const NW_Ucs2* aRealm, - NW_Ucs2** aRetUsername, - NW_Ucs2** aRetPassword, - TBool aBasicAuthentication) - { - __ASSERT_DEBUG(aUri != NULL && aUsername != NULL && aRealm != NULL, Panic(KErrArgument)); - __ASSERT_DEBUG(aRetUsername != NULL && aRetPassword != NULL, Panic(KErrArgument)); - - TBool bRet = EFalse; - HBufC* returnedUserName = NULL; - HBufC* returnedPasswd = NULL; - - // Initialize our return values - *aRetUsername = NULL; - *aRetPassword = NULL; - TInt needPop = 0; - - MBrCtlDialogsProvider* dialogsProvider = iBrCtl->brCtlDialogsProvider(); - - // Display the User Authentication Dialog - bRet = dialogsProvider->DialogUserAuthenticationLC(PtrCFromTText(aUri), - PtrCFromTText(aRealm), - PtrCFromTText(aUsername), - returnedUserName, - returnedPasswd, - aBasicAuthentication); - - // Display the Basic Authentication dialog, if needed. - if (bRet && aBasicAuthentication && NW_Settings_GetHttpSecurityWarnings()) - { - // Our memory pointers for the basic authentication dialog - HBufC* message = NULL; - HBufC* okMsg = NULL; - HBufC* cancelMsg = NULL; - - // Set up the message text - message = StringLoader::LoadLC(R_BROWSER_QUERY_BASIC_AUTHENTICATION); - - // Set up the OK button text - okMsg = StringLoader::LoadLC(R_WML_OK_BUTTON); - - // Set up the CANCEL button text - cancelMsg = StringLoader::LoadLC(R_WML_CANCEL_BUTTON); - - // Display the basic authentication dialog - if (message && okMsg && cancelMsg) - { - bRet = dialogsProvider->DialogConfirmL(KEmptyTitle, *message, *okMsg, *cancelMsg); - } - - // Clean up the basic authentication dialog memory - CleanupStack::PopAndDestroy(3); // message, okMsg, cancelMsg - - } // end of if (bRet && basic authentication && display security warnings) - - // The user selected "yes" or "continue", from the dialog(s). - // Return the username and password. - if (bRet) - { - - // Set up the returned user name - if (returnedUserName == NULL) - { - *aRetUsername = NULL; - } - else - { - //lint -e{119} Error -- Too many arguments (2) for prototype 'operator new[]' - *aRetUsername = new(ELeave) TUint16[returnedUserName->Length() + 1]; - CleanupStack::PushL(*aRetUsername); - needPop ++; - - TPtr usernamePtr(*aRetUsername, returnedUserName->Length() + 1); - usernamePtr.Copy(*returnedUserName); - usernamePtr.ZeroTerminate(); - } - - // Set up the returned password - if (returnedPasswd == NULL) - { - *aRetPassword = NULL; - } - else - { - //lint -e{119} Error -- Too many arguments (2) for prototype 'operator new[]' - *aRetPassword = new(ELeave) TUint16[returnedPasswd->Length() + 1]; - TPtr passwordPtr(*aRetPassword, returnedPasswd->Length() + 1); - passwordPtr.Copy(*returnedPasswd); - passwordPtr.ZeroTerminate(); - } - } - else - { - TInt err; - TRAP(err, iBrCtl->HandleBrowserLoadEventL(TBrCtlDefs::EEventAuthenticationFailed, 0, 0)); - } - - CleanupStack::Pop(needPop); // *aRetUsername - - // Clean up the memory from User Authentication dialog - if (returnedUserName) - { - CleanupStack::PopAndDestroy(); // returnedUserName - } - if (returnedPasswd) - { - CleanupStack::PopAndDestroy(); // returnedPasswd - } - if (!bRet) - { - User::Leave(KErrCancel); - } - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_GetUserRedirectionData -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_GetUserRedirectionData(void*, // wae - const NW_Ucs2* /*originalUrl*/, - const NW_Ucs2* /*redirectedUrl*/, - void *callbackCtx, - NW_Wae_UserRedirectionCB_t *callback) -{ - TBool redirect = ETrue; - TInt err = KErrNone; - - if (callback) - { - (void) (callback)(callbackCtx, - (err == KErrNone) ? KBrsrSuccess : KBrsrOutOfMemory, - redirect ? DIALOG_CONFIRM_YES : DIALOG_CONFIRM_NO); - } -} - - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_DialogListSelect -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_DialogListSelect (NW_Dlg_ListSelect_t* data, - void* callbackCtx, - NW_Dlg_ListSelectCB_t *callback ) - { -#ifndef __SERIES60WIM - NW_REQUIRED_PARAM(data); - NW_REQUIRED_PARAM(callbackCtx); - NW_REQUIRED_PARAM(callback); -#endif - - // See NW_Dlg_ListSelectInit - -#ifdef __SERIES60_WIM - if (data->uiOptions == UI_OPTION_CERT_LIST_SIGN_TEXT) - { - TInt err; - TRAP(err, Shell()->WimUi()->DoShowSelectCertificateDlgL((void*)data, callbackCtx,(void*)callback)); - } -#endif - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_DialogPrompt -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_DialogPrompt (NW_Dlg_Prompt_t* data, - void* callbackCtx, - NW_Dlg_PromptCB_t *callback ) - { - // See NW_Dlg_PromptInit definition to find out the NW_Dlg_Prompt_t definition - - // data->context might be of several types & classes!!!! - -#ifdef __SERIES60_WIM - if (data->uiOptions == UI_OPTION_TEXT_TO_SIGN) - { - TInt err; - TRAP(err, Shell()->WimUi()->DoShowSignTextDialogL((void*)data, callbackCtx, (void*)callback)); - } - else - { -#endif - - TInt err; - TRAP(err, Shell()->iBrCtl->brCtlDialogsProvider()->DialogNotifyErrorL(KBrsrWimiNoCard)); - - if ( callback ) - { - (void) (callback)( data, callbackCtx ); - } - -#ifdef __SERIES60_WIM - } -#endif - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_DialogInputPrompt -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_DialogInputPrompt (NW_Dlg_InputPrompt_t* data, - void* callbackCtx, - NW_Dlg_InputPromptCB_t *callback ) -{ -#ifndef __SERIES60WIM - NW_REQUIRED_PARAM(data); - NW_REQUIRED_PARAM(callbackCtx); - NW_REQUIRED_PARAM(callback); -#endif - - // See implementation of NW_Dlg_InputPromptInit to find out the NW_Dlg_InputPrompt_t declaration - -#ifdef __SERIES60_WIM - if (data->uiOptions == UI_OPTION_ENTER_PIN_SIGN_TEXT) - { - TInt err; - TRAP(err, Shell()->WimUi()->DoShowPinCodeQueryDialogL((void*)data, callbackCtx, (void*)callback)); - } -#endif -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_WmlScriptDlgAlert -// ---------------------------------------------------------------------------- -/* display a alert dialog to the user */ -void -CShell::NW_UI_WmlScriptDlgAlert (void* wae, - const NW_Ucs2* message, - void* callback_ctx, - NW_ScrProxy_DlgAlertCB_t* callback ) - { - TInt status = KErrNone; - - if ( wae ) - { - NW_WmlScript_ContentHandler_t* thisCH = (NW_WmlScript_ContentHandler_t*)wae; - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisCH); - - CShell* shell = (CShell*) docRoot->browserApp_Ctx; - NW_ASSERT(shell != NULL); - - TRAP(status, shell->iBrCtl->brCtlDialogsProvider()->DialogNoteL(PtrCFromTText(message))); - __ASSERT_DEBUG(status == KErrNone, Panic(status)); - } - - if ( callback ) - { - -//#pragma message(__FILE__" TODO: handle NW_Dlg_Confirm_Result_t arg to NW_ScrProxy_DlgAlertCB_t") - (void) (callback)( callback_ctx, (status == KErrNone) ? KBrsrSuccess : KBrsrFailure, - DIALOG_CONFIRM_YES /*NW_Dlg_Confirm_Result_t*/); - } - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_WmlScriptDlgConfirm -// ---------------------------------------------------------------------------- -/* display a confirm dialog to the user */ -void -CShell::NW_UI_WmlScriptDlgConfirm (void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callback_ctx, - NW_Dlg_ConfirmCB_t *callback ) - { - TInt status; - TRAP( status, CShell::NW_UI_WmlScriptDlgConfirmL( wae, message, yesMessage, noMessage, - callback_ctx, callback) ); - __ASSERT_DEBUG(status == KErrNone, Panic(status)); - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_WmlScriptDlgConfirmL -// ---------------------------------------------------------------------------- -/* display a confirm dialog to the user */ -void -CShell::NW_UI_WmlScriptDlgConfirmL( void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callback_ctx, - NW_Dlg_ConfirmCB_t *callback ) - { - TInt status=KErrNone; - TBool isConfirmed=EFalse; - - if ( wae ) - { - HBufC* title = StringLoader::LoadLC( R_QTN_BROWSER_QUERY_SCRIPT_CONFIRM ); - TRAP(status, isConfirmed = - Shell()->iBrCtl->brCtlDialogsProvider()->DialogConfirmL(*title, - PtrCFromTText(message), - PtrCFromTText(yesMessage), - PtrCFromTText(noMessage))); - CleanupStack::PopAndDestroy(); // title - __ASSERT_DEBUG(status == KErrNone, Panic(status)); - } - -//#pragma message(__FILE__" TODO: Handle DIALOG_CONFIRM_END (see rb_wae/src/utils/include/nwx_generic_dlg.h)") - if ( callback ) - { - (void) (callback)(callback_ctx, (status == KErrNone) ? KBrsrSuccess : KBrsrFailure, - isConfirmed ? DIALOG_CONFIRM_YES : DIALOG_CONFIRM_NO ); - } - } - -/* display a confirm dialog to the user */ -// ------------------------------------------------------------------------------- -// CShell::NW_UI_DialogSelectOption -// ------------------------------------------------------------------------------- -void -CShell::NW_UI_DialogSelectOption (NW_Dlg_SelectData_t* data, - void* callbackCtx, - NW_Dlg_SelectCB_t* callback) -{ - TInt err; - TRAP(err, NW_UI_DoDialogSelectOptionL(data, callbackCtx, callback)); -} - -// ------------------------------------------------------------------------------- -void -CShell::NW_UI_DoDialogSelectOptionL (NW_Dlg_SelectData_t *data, - void* callbackCtx, - NW_Dlg_SelectCB_t* callback ) - { - /* convert data to EPOC format */ - CArrayFixFlat<TBrCtlSelectOptionData>* options = new (ELeave) CArrayFixFlat<TBrCtlSelectOptionData>(10); - CleanupStack::PushL(options); - TBool selectionChanged= EFalse; - - TInt count = NW_ADT_Vector_GetSize(data->options); - - for ( TInt ii = 0; ii < count; ++ii ) - { - NW_Dlg_SelectItemData_t* selectItemData; - - selectItemData = - (NW_Dlg_SelectItemData_t*)NW_ADT_Vector_ElementAt( data->options, - (NW_ADT_Vector_Metric_t)ii ); - - TPtrC selectItemDataText = TPtrC(selectItemData->text); - TBrCtlSelectOptionData selectOptionData = TBrCtlSelectOptionData(selectItemDataText, - selectItemData->isSelected, - selectItemData->isOptGroup, - selectItemData->hasOnPick); - - options->AppendL( selectOptionData ); - } - - data->isCanceled = NW_FALSE; - TBrCtlSelectOptionType optionType = data->multiple ? ESelectTypeMultiple : ESelectTypeSingle; - - /* call dialog */ - if (Shell()->iBrCtl->brCtlDialogsProvider()->DialogSelectOptionL(PtrCFromTText(data->title), - optionType, - *options ) ) - { - /* set new selection to KM format */ - for ( TInt ii = 0; ii < count; ++ii ) - { - NW_Dlg_SelectItemData_t* selectItemData; - - selectItemData = - (NW_Dlg_SelectItemData_t*)NW_ADT_Vector_ElementAt( data->options, - (NW_ADT_Vector_Metric_t)ii ); - if (selectItemData->isSelected != (NW_Bool)options->At(ii).IsSelected()) - { - selectionChanged = ETrue; - } - selectItemData->isSelected = (NW_Bool)options->At(ii).IsSelected(); - } - } - else - { /* the dialog was cancelled */ - data->isCanceled = NW_TRUE; - } - - /* we have to call callback even if user cancelled the dialog */ - if ( callback ) - { - (void) (callback)( data, callbackCtx , (NW_Bool)selectionChanged); - } - - CleanupStack::PopAndDestroy(); // options - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_WmlScriptDlgPrompt -// ---------------------------------------------------------------------------- -/* display a prompt dialog to the user */ -void -CShell::NW_UI_WmlScriptDlgPrompt( void* wae, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - void *callback_ctx, - NW_ScrProxy_DlgPromptCB_t *callback ) -{ - HBufC* returnedInput = NULL; - - TInt err; - TRAP( err, CShell::NW_UI_WmlScriptDlgPromptL( wae, message, defaultInput, returnedInput ) ); - - __ASSERT_DEBUG( err == KErrNone, Panic(err) ); - - // zero-terminate returned value - HBufC* input = HBufC::New( returnedInput->Length() + 1 ); // +1 is for zero-termination - - const TUint16* pReturnedInput = NULL; - - if (input) - { - TPtr pInput(input->Des()); - pInput.Copy( *returnedInput ); - pReturnedInput = pInput.PtrZ(); - } - delete returnedInput; - - if (callback) - { - //#pragma message(__FILE__" TODO: handle endPressed arg to NW_ScrProxy_DlgPromptCB_t") - (void) (callback)( callback_ctx, (err == KErrNone) ? KBrsrSuccess : KBrsrFailure, - pReturnedInput, NW_FALSE ); - } - - delete input; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_WmlScriptDlgPromptL -// ---------------------------------------------------------------------------- -/* display a prompt dialog to the user */ -void -CShell::NW_UI_WmlScriptDlgPromptL( void* wae, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - HBufC*& aReturnedInput ) -{ - if (!wae) - return; - - NW_WmlScript_ContentHandler_t* thisCH = (NW_WmlScript_ContentHandler_t*)wae; - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisCH); - - CShell* shell = (CShell*)docRoot->browserApp_Ctx; - NW_ASSERT(shell != NULL); - - shell->iBrCtl->brCtlDialogsProvider()->DialogPromptLC( KEmptyTitle(), - PtrCFromTText(message), - PtrCFromTText(defaultInput), - aReturnedInput ); - CleanupStack::Pop(); //returnedInput - - if (!aReturnedInput) - { - aReturnedInput = KNullDesC().Alloc(); - } - - __ASSERT_DEBUG(aReturnedInput, Panic(KErrNoMemory)); -} - -// ---------------------------------------------------------------------------- -// CShell::NW_Http_ConnNeeded -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_Http_ConnNeeded (TInt* aConnectionPtr, - TInt* aSockSvrHandle, - TBool* aNewConn, - TApBearerType* aBearerType) - { - TInt err; - TRAP(err, - Shell()->iBrCtl->brCtlSpecialLoadObserver()->NetworkConnectionNeededL(aConnectionPtr, - aSockSvrHandle, - aNewConn, - aBearerType)); - - switch(err) - { - case KErrNone: - return KBrsrSuccess; - case KErrCancel: - return KBrsrConnCancelled; - default: - return KBrsrConnFailed; - } - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_NotifyCoverageEvent -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_NotifyCoverageEvent(TInt aError) -{ - - Shell()->CancelAll(); - TInt err; - TRAP(err, Shell()->iBrCtl->brCtlDialogsProvider()->DialogNotifyErrorL(aError)); -} - -// ------------------------------------------------------------------------- -// CShell::CurrentUrlLC -// ------------------------------------------------------------------------- -HBufC* CShell::CurrentUrlLC() - { - HBufC* url = NULL; - url = GetCurrentUrlInHBufCL(); - CleanupStack::PushL(url); - return url; - } - -// ------------------------------------------------------------------------- -// CShell::LinkResolver -// ------------------------------------------------------------------------- -MBrCtlLinkResolver* CShell::LinkResolver() - { - return iBrCtl->brCtlLinkResolver(); - } - -// ------------------------------------------------------------------------- -// CShell::LoadEmbededUrl -// ------------------------------------------------------------------------- -CWmlResourceLoadListener* CShell::LoadEmbededUrl( const TDesC& aUrl, void *aLoadContext, - void* /*NW_Url_RespCallback_t*/ aPartialLoadCallback, TUint16 aTransId) - { - CWmlResourceLoadListener* handle = iWmlControl->LoadResourceL(aUrl, aLoadContext, aPartialLoadCallback, aTransId); - return handle; - } - -// ------------------------------------------------------------------------- -// CShell::LoadLinkUrl -// ------------------------------------------------------------------------- -void CShell::LoadLinkUrl( const TDesC& aUrl, void* aHeaders ) - { - iWmlControl->SetWmlLink(ETrue); - HttpRequestHeaders* reqestHeaders = (HttpRequestHeaders*) aHeaders ; - if( reqestHeaders && reqestHeaders->referer && - ( User::StringLength(reqestHeaders->referer) > 0) ) - { - - NW_Ucs2* buf16 = NULL; - buf16 = StringUtils::CopyAsciiToUsc2(reqestHeaders->referer); - if( buf16 ) - { - CleanupStack::PushL( buf16 ); - TPtrC16 referer16( buf16 ) ; - iWmlControl->WKWmlInterface()->wmlLoadUrlL(aUrl, referer16, iWmlControl->AppId(), TBrCtlDefs::ECacheModeNormal); - CleanupStack::PopAndDestroy( buf16 ); - } - } - else - { - iBrCtl->LoadUrlL(aUrl, iWmlControl->AppId(), TBrCtlDefs::ECacheModeNormal); - - } - iWmlControl->SetWmlLink(EFalse); - - int status = NW_HED_Loader_CancelAllLoads(GetDocumentRoot()->loader); - // remove the entry from the load queue - NW_ADT_DynamicVector_t* loadQueue = GetNW_HED_Loader_LoadQueue(); - if(loadQueue) - { - int queueSize = NW_ADT_Vector_GetSize (loadQueue); - for(int i = 0; i < queueSize; i++) - { - status = NW_ADT_DynamicVector_RemoveAt(loadQueue, i); - } - - //remove the transaction id entry from the loader - int numRequests = NW_HED_Loader_GetRequestListSize( GetDocumentRoot()->loader ); - for(int i = 0; i < numRequests; i++) - { - status = NW_ADT_DynamicVector_RemoveAt( GetDocumentRoot()->loader->requestList, i ); - } - } - - } - -// ------------------------------------------------------------------------- -// CShell::PostLinkUrl -// ------------------------------------------------------------------------- -void CShell::PostLinkUrl(TDesC& aUrl, TDesC8& aPostData, TDesC& aContentType) - { - iWmlControl->WKWmlInterface()->setPostUrlL(aUrl, aPostData, aContentType ); - } - -// ------------------------------------------------------------------------- -// CShell::SetOnEnterBackwordReason -// ------------------------------------------------------------------------- -void CShell::SetOnEnterBackwordReason() - { - NW_HED_HistoryStack_t* history = NW_HED_DocumentRoot_GetHistoryStack (iDocumentRoot); - if (history != NULL) - { - SetUrlRequestReason(history, NW_HED_UrlRequest_Reason_DocPrev); - } - } - -// ------------------------------------------------------------------------- -// CShell::ShouldResolveUrl -// ------------------------------------------------------------------------- -TBool CShell::ShouldResolveUrl(TBool aIsTopLevel, NW_Uint8 aReason) - { - TInt capabilities = iBrCtl->capabilities(); - // Check the reason, because we do not want the Host Application to resolve a URL for - // a data buffer that it just passed to us. - if (aIsTopLevel && aReason != NW_HED_UrlRequest_Reason_ShellLoad) - { - if (capabilities & TBrCtlDefs::ECapabilityClientNotifyURL) - return ETrue; - } - else - { - if (capabilities & TBrCtlDefs::ECapabilityClientResolveEmbeddedURL) - return ETrue; - } - return EFalse; - } - - -// ------------------------------------------------------------------------- -// CShell::ConvertCharset -// ------------------------------------------------------------------------- -TUint16 CShell::ConvertCharset(const TDesC8& aCharset) - { - __ASSERT_DEBUG(aCharset.Ptr() != NULL, Panic(KErrArgument)); - - TInt16 charset = NW_HED_CompositeContentHandler_Encoding((TUint8*)aCharset.Ptr(), aCharset.Length()); - return charset; - -} - -// ------------------------------------------------------------------------- -// CShell::NW_UI_SoftKey_UpdateSoftKeys -// ---------------------------------------------------------------------------- -void -CShell::NW_UI_SoftKey_UpdateSoftKeys(NW_SoftKeyText_t /*softKeyText*/) - { - Shell()->iWmlControl->WKWmlInterface()->setUpdateSoftkeys(); - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_ViewImage -// ---------------------------------------------------------------------------- -/* view an image in image viewer application */ -void -CShell::NW_UI_ViewImage(void* rawData, NW_Int32 length, NW_Bool isWbmp) -{ - NW_REQUIRED_PARAM(rawData); - NW_REQUIRED_PARAM(length); - NW_REQUIRED_PARAM(isWbmp); -} - - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_ConvertFromForeignCharSet -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_ConvertFromForeignCharSet(void* ctx, NW_Url_Resp_t* response) -{ - CShell* shell = (CShell*)(ctx); - TInt err; - TRAP(err, shell->ConvertFromForeignCharSetL(response)); - if(err == KErrNoMemory) - return KBrsrOutOfMemory; - if(err == KErrNone) - return KBrsrSuccess; - else - return KBrsrFailure; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_ConvertFromForeignChunk -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_ConvertFromForeignChunk(void* ctx, - NW_Uint32 foreignEncoding, - void* inBuf, - TInt * numUnconvertible, - TInt* indexFirstUnconvertible, - void** outBuf) -{ - NW_Uint8 aTryCount = 0; - CShell* shell = (CShell*)(ctx); - TInt err; - TRAP(err, shell->ConvertFromForeignChunkL(foreignEncoding, inBuf, numUnconvertible, indexFirstUnconvertible, outBuf)); - if(err == KErrNoMemory) - return KBrsrOutOfMemory; - if(err == KErrNone) - return KBrsrSuccess; - if (err == KBrsrMvcConverterNotFound) - return KBrsrMvcConverterNotFound; - else - { - // for failed conversion, we try conversion 2 more times - while (aTryCount++ < 2 && err) - { - if (*outBuf && *outBuf != inBuf) - { - NW_Buffer_Free((NW_Buffer_t*)(*outBuf)); - } - TRAP(err, shell->ConvertFromForeignChunkL(foreignEncoding, inBuf, numUnconvertible, indexFirstUnconvertible, outBuf)); - } - return err; - } -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_ConvertFromForeignCharSet -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::NW_UI_ConvertToForeignCharSet(void* ctx, NW_String_t* text) -{ - CShell* shell = (CShell*)(ctx); - TInt err; - TRAP(err, shell->ConvertToForeignCharSetL(text)); - if(err == KErrNoMemory) - return KBrsrOutOfMemory; - if(err == KErrNone) - return KBrsrSuccess; - else - return KBrsrFailure; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_AboutToLoadPageL -// ---------------------------------------------------------------------------- -/* -TBrowserStatusCode -CShell::NW_UI_AboutToLoadPageL(NW_Uint32 aNoteType) - { - TBool result = EFalse; - TEnterStatus enterStatus = (TEnterStatus)aNoteType; - - // resId = 0 means accept, don't display a dialog, return KBrsrSuccess - TInt resId = 0; - - // event = 0 means, don't send an event. NOTE: TBrCtlDefs::EEventNone = 0 - TBrCtlDefs::TBrCtlLoadEvent event = TBrCtlDefs::EEventNone; - - // Map TEnterStatus to a corresponding dialog string resource IDs and - // browser load event - switch (enterStatus) - { - case EExitingSecurePage: - resId = R_HTTPSEC_LEAVE_SECURE_SITE; - event = TBrCtlDefs::EEventExitingSecurePage; - break; - - case EEnteringSecurePage: - resId = R_HTTPSEC_ENTER_SECURE_SITE; - event = TBrCtlDefs::EEventEnteringSecurePage; - - // for now, we do not wish to display the confirmation dialog - // that goes with this event so just call BrowserLoadEvent and return - Shell()->iBrCtl->HandleBrowserLoadEventL(event, 0, 0); - return KBrsrSuccess; - - case ESomeItemsNotSecure: - resId = R_HTTPSEC_SOME_ITEMS_NOT_SECURE; - event = TBrCtlDefs::EEventSomeItemsNotSecure; - break; - - case ESubmittingToNonSecurePage: - resId = R_HTTPSEC_SUBMITTING_TO_NON_SECURE_PAGE; - event = TBrCtlDefs::EEventSubmittingToNonSecurePage; - break; - - case ERedirectConfirmation: - resId = R_HTTP_REDIRECT_POST_CONFIRMATION; - event = TBrCtlDefs::EEventRedirectConfirmation; - break; - - case ERepostConfirmation: - resId = R_HTTP_REPOST_CONFIRMATION; - event = TBrCtlDefs::EEventRepostConfirmation; - break; - - case ESecureItemInNonSecurePage: - resId = 0; - event = TBrCtlDefs::EEventSecureItemInNonSecurePage; - break; - - default: - resId = 0; - event = TBrCtlDefs::EEventNone; - break; - } // end of switch - - // Send the BrowserLoadEvent to the registered listeners - if (event != TBrCtlDefs::EEventNone) - { - Shell()->iBrCtl->HandleBrowserLoadEventL(event, 0, 0); - } - - // Show dialogs only if warning dialogs are enabled in the preferences, and - // if we what to show a dialog (resId != 0). - // If dialogs are disabled, accept by default - if (NW_Settings_GetHttpSecurityWarnings() && resId) - { - HBufC* message = StringLoader::LoadLC(resId); - - HBufC* leftMessage = NULL; - HBufC* rightMessage = NULL; - if( resId == R_HTTP_REDIRECT_POST_CONFIRMATION) - { - leftMessage = StringLoader::LoadLC(R_TEXT_SOFTKEY_CONTINUE); - rightMessage = StringLoader::LoadLC(R_WML_CANCEL_BUTTON); - } - else - { - leftMessage = StringLoader::LoadLC(R_TEXT_SOFTKEY_YES); - rightMessage = StringLoader::LoadLC(R_TEXT_SOFTKEY_NO); - } - - MBrCtlDialogsProvider* dialogsProvider = Shell()->iBrCtl->BrCtlDialogsProvider(); - TInt err; - TRAP(err, result = dialogsProvider->DialogConfirmL(KEmptyTitle, - *message, - *leftMessage, - *rightMessage)); - // Clean up the memory we allocated, before returning - CleanupStack::PopAndDestroy(3); // message, leftMessage, rightMessage - - // Check to see if DialogConfirmL leaves - if (err != KErrNone) - { - return KBrsrOutOfMemory; - } - - // If the user selected "No" or "Cancel", we are cancelling the load - if (result == EFalse) - { - return KBrsrCancelled; - } - - } // end of if (NW_Settings_GetHttpSecurityWarnings() ) - - // The user selected "Yes" or "Continue" or we aren't displaying a dialog - return KBrsrSuccess; - } -*/ -// ---------------------------------------------------------------------------- -// CShell::NW_UI_SwitchToImgMapView -// ---------------------------------------------------------------------------- -TInt -CShell::NW_UI_SwitchToImgMapView() -{ - TInt err = KErrNone; - - err = Shell()->SwitchToImgMapView(); - return err; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_SwitchFromImgMapViewIfNeeded -// ---------------------------------------------------------------------------- -TInt -CShell::NW_UI_SwitchFromImgMapViewIfNeeded() -{ - TInt err = KErrNone; - - err = Shell()->SwitchFromImgMapViewIfNeeded(); - return err; -} - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_IsImageMapView -// ---------------------------------------------------------------------------- -TBool -CShell::NW_UI_IsImageMapView() - { - return Shell()->iView->IsImageMapView(); - } - -// ---------------------------------------------------------------------------- -// CShell::NW_UI_ShowObjectDialog -// ---------------------------------------------------------------------------- -NW_Bool -CShell::NW_UI_ShowObjectDialog() -{ - TBool ret = EFalse; - - // Create a CBrCtlObjectInfo object and populate it with the current node - // information. Used by the embed (plugin) code. - CBrCtlObjectInfo* objectInfo = Shell()->iWmlControl->WKWmlInterface()->objectInfoCreateL(); - - - - TInt err; - TRAP(err, ret = Shell()->iBrCtl->brCtlDialogsProvider()->DialogDownloadObjectL(objectInfo)); - - __ASSERT_DEBUG(err == KErrNone, Panic(err)); - delete objectInfo; - return (NW_Bool)ret; -} - - -// Following functions are for ECMAScript support -// ---------------------------------------------------------------------------- -// CShell::WindowAlert -// ---------------------------------------------------------------------------- -void -CShell::WindowAlert(void* browserApp_Ctx, NW_Ucs2* /*msg*/) - { - CShell* shell = (CShell*)browserApp_Ctx; - - if (!shell->iExiting) - { - /*HBufC* returnedString = NULL; - returnedString = StringLoader::LoadLC(R_QTN_BROWSER_QUERY_SCRIPT_ALERT); - - TInt status; - TRAP(status, shell->iBrCtl->BrCtlDialogsProvider()->DialogAlertL(*returnedString, - PtrCFromTText(msg))); - __ASSERT_DEBUG(status == KErrNone, Panic(status)); - - CleanupStack::PopAndDestroy();*/ - } - } - -// ---------------------------------------------------------------------------- -// CShell::WindowConfirm -// ---------------------------------------------------------------------------- -NW_Bool -CShell::WindowConfirm(void* browserApp_Ctx, NW_Ucs2* /*msg*/, NW_Ucs2* /*yesMsg*/, NW_Ucs2* /*noMsg*/) - { - TBool isConfirmed=EFalse; - CShell* shell = (CShell*)browserApp_Ctx; - if (!shell->iExiting) - { - /*HBufC* returnedString = NULL; - returnedString = StringLoader::LoadLC(R_QTN_BROWSER_QUERY_SCRIPT_CONFIRM); - TInt status; - TRAP(status, isConfirmed = shell->iBrCtl->BrCtlDialogsProvider()->DialogConfirmL(*returnedString, - PtrCFromTText(msg), - PtrCFromTText(yesMsg), - PtrCFromTText(noMsg))); - __ASSERT_DEBUG(status == KErrNone, Panic(status)); - CleanupStack::PopAndDestroy();*/ - - } - - return (NW_Bool)isConfirmed; - } - -// ---------------------------------------------------------------------------- -// CShell::WindowPrompt -// ---------------------------------------------------------------------------- -NW_Ucs2* -CShell::WindowPrompt(void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* defaultVal) - { - NW_Ucs2* returnVal = NULL; - - TInt err; - TRAP(err, returnVal = WindowPromptL(browserApp_Ctx, msg, defaultVal)); - - return returnVal; - } - -// ---------------------------------------------------------------------------- -// CShell::WindowPromptL -// ---------------------------------------------------------------------------- -NW_Ucs2* -CShell::WindowPromptL(void* browserApp_Ctx, NW_Ucs2* /*msg*/, NW_Ucs2* /*defaultVal*/) - { - HBufC* returnedInput = NULL; - CShell* shell = (CShell*)browserApp_Ctx; - NW_ASSERT(shell != NULL); - if (!shell->iExiting) - { - /*HBufC* returnedString = NULL; - returnedString = StringLoader::LoadLC(R_QTN_BROWSER_QUERY_SCRIPT_PROMPT); - shell->iBrCtl->BrCtlDialogsProvider()->DialogPromptLC(*returnedString, - PtrCFromTText(msg), - PtrCFromTText(defaultVal), - returnedInput); - CleanupStack::Pop(); //returnedInput - CleanupStack::PopAndDestroy(); //returnedString*/ - } - - - if (!returnedInput) - { - returnedInput = KNullDesC().Alloc(); - } - - __ASSERT_DEBUG(returnedInput, Panic(KErrNoMemory)); - - // zero-terminate returned value - - TText* input = new TText [returnedInput->Length()*sizeof(TText) + 2]; - const TUint16* pReturnedInput = NULL; - - if (input) - { - TPtr pInput(input, returnedInput->Length()*sizeof(TText) + 2); - pInput.Copy( *returnedInput ); - pReturnedInput = pInput.PtrZ(); - } - - delete returnedInput; - return (NW_Ucs2*)pReturnedInput; - } - -// ---------------------------------------------------------------------------- -// CShell::WindowOpen -// ---------------------------------------------------------------------------- -void CShell::WindowOpen(void* browserApp_Ctx, NW_Ucs2* url, NW_Ucs2* target, NW_Uint32 reason) - { - CShell* shell = (CShell*)browserApp_Ctx; - NW_ASSERT(shell != NULL); - TInt ret; - TRAP(ret, shell->WindowOpenL(url, target, reason)); - } - - -// ---------------------------------------------------------------------------- -// CShell::WindowOpenAndPostL -// ---------------------------------------------------------------------------- -void CShell::WindowOpenAndPostL(TUint16* url, TUint16* target, TUint32 reason, - NW_Uint16 method, TDesC8* contentType, TDesC8* postData, - TDesC8* boundary, void* reserved) - { - TPtrC urlPtr(url); - TPtrC targetPtr(NULL); - if (target) - { - targetPtr.Set(target); - } - - NW_REQUIRED_PARAM(urlPtr.Length()); - NW_REQUIRED_PARAM(targetPtr.Length()); - NW_REQUIRED_PARAM(reason); - NW_REQUIRED_PARAM(method); - NW_REQUIRED_PARAM(contentType); - NW_REQUIRED_PARAM(postData); - NW_REQUIRED_PARAM(boundary); - NW_REQUIRED_PARAM(reserved); - - } - -// ---------------------------------------------------------------------------- -// CShell::WindowOpenL -// ---------------------------------------------------------------------------- -void CShell::WindowOpenL(TUint16* url, TUint16* target, TUint32 reason) - { - WindowOpenAndPostL(url, target, reason, TBrCtlDefs::EMethodGet, NULL, NULL, NULL, NULL); - } - - -// ---------------------------------------------------------------------------- -// CShell::ConvertToForeignCharSet -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CShell::ConvertToForeignCharSet(void* aUcsText) - { - TInt err; - TRAP( err, Shell()->ConvertToForeignCharSetL( aUcsText ) ); - if ( err != KErrNone ) - { - return ( err == KErrNoMemory ) ? KBrsrOutOfMemory : KBrsrFailure; - } - return KBrsrSuccess; - } - - -// -------------------------------------------------------------------------------- -// CShell::CoverageEvent -// -------------------------------------------------------------------------------- -void -CShell::CoverageEvent(TInt aError) -{ - CShell::NW_UI_NotifyCoverageEvent(aError); -} - - -// ----------------------------------------------------------------------------- -// CShell::CreateEmbeddedDocObserver -// ----------------------------------------------------------------------------- -MApaEmbeddedDocObserver* -CShell::CreateEmbeddedDocObserver( TFileName aFileName, RFs& aRfs) - { - if (!iDocExitObserver) - { - TInt err; - TRAP( err, iDocExitObserver = CEmbeddedDocExitObserver::NewL(aRfs)); - if (err != KErrNone) - { - return NULL; - } - } - iDocExitObserver->SetTempFile(aFileName); - return (MApaEmbeddedDocObserver*) iDocExitObserver; - } - - -void CShell::WmlShellLoadUrlL( const TDesC& aUrl, TInt aAppId ) -{ - if (aUrl.Ptr() == NULL || aUrl.Length() == 0) - { - User::Leave(KErrArgument); - } - - TUint16* url = NULL; - User::LeaveIfError(StringUtils::ConvertPtrUcs2ToUcs2(aUrl, &url)); - CleanupStack::PushL(url); - TPtrC urlPtr(url); - - // cancell all loads - int status = NW_HED_Loader_CancelAllLoads(GetDocumentRoot()->loader); - // remove the entry from the load queue - NW_ADT_DynamicVector_t* loadQueue = GetNW_HED_Loader_LoadQueue(); - if(loadQueue) - { - int queueSize = NW_ADT_Vector_GetSize (loadQueue); - for(int i = 0; i < queueSize; i++) - { - status = NW_ADT_DynamicVector_RemoveAt(loadQueue, i); - } - - //remove the transaction id entry from the loader - int numRequests = NW_HED_Loader_GetRequestListSize( GetDocumentRoot()->loader ); - for(int i = 0; i < numRequests; i++) - { - status = NW_ADT_DynamicVector_RemoveAt( GetDocumentRoot()->loader->requestList, i ); - } - } - - User::LeaveIfError( Load(urlPtr, aAppId , NW_CACHE_NORMAL)); - CleanupStack::PopAndDestroy(); // url - return; -}//end WmlShellLoadUrlL() - -/*lint -restore*/ - -// -------------------------------------------------------------------------------- -// Loaders_InitializeL -// -------------------------------------------------------------------------------- -static void Loaders_InitializeL () -{ - if (NW_Msg_Initialize( "PSQ1" ) != KBrsrSuccess) - { - User::Leave(KErrNoMemory); - } - - // Start up wae - NW_WaeUsrAgent_t *wae = NULL; - if ((wae = NW_WaeUsrAgent_New()) == NULL) - { - User::Leave(KErrNoMemory); - } - - NW_Ctx_Set(NW_CTX_WML_CORE, 0, wae); -} - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// -------------------------------------------------------------------------------- -// NW_Initialize_Loadercli -// -------------------------------------------------------------------------------- -TBrowserStatusCode NW_Initialize_Loadercli () -{ - TInt ret = KErrNone; - TRAP(ret, Loaders_InitializeL()); - if (ret != KErrNone) - { - Dll::SetTls(NULL); - } - return LoaderUtils::MapErrors(ret); -} -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/MVCView.cpp --- a/webengine/wmlengine/src/MVC/src/MVCView.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5576 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles the display of the box tree -* -*/ - - -// INCLUDE FILES -//lint -save -e578 -e1707 static assumed for operator new, Declaration of symbol hides symbol -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) -#include <aknappui.h> -#include <aknmessagequerydialog.h> -#include <apgcli.h> -#include <badesca.h> -#include <eiksbfrm.h> -#include <eikspane.h> -#include <featmgr.h> -#include <f32file.h> -#include <flogger.h> -#include <nwx_defs_symbian.h> -#include <stddef.h> - -#include <cenrepnotifyhandler.h> -#include <centralrepository.h> -#include <httpcachemanagerinternalcrkeys.h> - -#include <StringLoader.h> -#include <webkit.rsg> - -#include "BoxFormatHandler.h" -#include "BoxRender.h" -#include "BrCtl.h" -#include "BrsrStatusCodes.h" -#include "CBrowserSettings.h" -#include "GDIDevicecontext.h" -#include "LMgrMarkerText.h" -#include "LMgrMarkerImage.h" -#include "LMgrAnonBlock.h" -#include "LMgrObjectBoxOOC.h" -#include "LMgrObjectBox.h" -#include "MVCScroll.h" -#include "MVCShell.h" -#include "MVCView.h" -#include "MVCViewAsyncInit.h" -#include "MVCViewListener.h" -#include "nw_adt_resizablevector.h" -#include "nwx_cleanup_epoc32.h" -#include "nwx_ctx.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_clearfieldevent.h" -#include "nw_evt_controlkeyevent.h" -#include "nw_evt_fontsizechangeevent.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_keyevent.h" -#include "nw_evt_openviewerevent.h" -#include "nw_evt_scrollevent.h" -#include "nw_evt_tabevent.h" -#include "nw_evt_unicodekeyevent.h" -#include "nw_fbox_buttonbox.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_formboxutils.h" -#include "nw_fbox_checkbox.h" -#include "nw_fbox_wmlformattededitor.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_epoc32inputskin.h" -#include "nw_fbox_selectbox.h" -#include "nw_fbox_textareabox.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_fbox_fileselectionbox.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_iimageviewer.h" -#include "nw_image_epoc32simpleimage.h" -#include "nw_image_virtualimage.h" -#include "nw_lmgr_imagebox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_box.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_areabox.h" -#include "nw_lmgr_accesskey.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_imagemapbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_areabox.h" -#include "nw_object_object.h" -#include "nw_system_optionlist.h" -#include "nw_xhtml_savetophonebkevent.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_xhtml_attributepropertytable.h" -#include "nwx_http_defs.h" -#include "nwx_logger.h" -#include "nwx_math.h" -#include "nwx_settings.h" - -#include "TEncodingMapping.h" -#include "urlloader_urlloaderint.h" -#include <brctlinterface.h> -#include "BrCtlDialogsProvider.h" - -#include "HistoryController.h" -#include "WmlInterface.h" -//lint -restore -#include "pagescaler.h" - -#include "nw_lmgr_posflowbox.h" - -#ifdef __WINS__ -#ifdef _DEBUG -//#define _DEBUG_LOG -#ifdef _DEBUG_LOG -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_DumpBoxTree(NW_LMgr_Box_t* box); -#endif /* DEBUG_LOG */ -#endif /* DEBUG */ -#endif /* WINS */ - - -// ============================= PRIVATE FUNCTIONS =============================== -NW_Bool -CView::ProcessFontSizeChangeEvent () -{ - iDeviceContext->SetFontSizeLevel(); - - return NW_TRUE; -} - -NW_GDI_Rectangle_t -CView::GetBoxDisplayBounds(NW_LMgr_Box_t* aBox ) - { - NW_GDI_Rectangle_t boxBounds; - - if (NW_Object_IsClass( aBox, &NW_LMgr_AreaBox_Class)) - { - boxBounds = NW_LMgr_AreaBox_GetBounds( aBox ); - } - else - { - boxBounds = NW_LMgr_Box_GetDisplayBounds( aBox ); - } - return boxBounds; - } - -void -CView::SetBoxFormatBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aBoxBounds ) - { - if (NW_Object_IsClass( aBox, &NW_LMgr_AreaBox_Class)) - { - // set area box is not supported - NW_ASSERT( 0 ); - } - else - { - NW_LMgr_Box_SetFormatBounds( aBox, aBoxBounds ); - } - } - -/* -This is a fix for version 2.8. For 3.0, we have to do more check for the position absolute, otherwise, it will break the -absolute position. -*/ -void CView::GetParentBox(NW_LMgr_Box_t* parentBox, NW_LMgr_Box_t** pReturnedParentBox) -{ - if(parentBox == NULL) { - return; - } - - if (NW_Object_IsInstanceOf(parentBox, &NW_LMgr_FlowBox_Class)) - { - if(*pReturnedParentBox == NULL) { - *pReturnedParentBox = parentBox; - } - } - - if (NW_Object_IsClass(parentBox, &NW_LMgr_StaticTableCellBox_Class) || - NW_Object_IsClass(parentBox, &NW_LMgr_VerticalTableCellBox_Class)) - { - *pReturnedParentBox = parentBox; - return; - } else { - //continue to find parent - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(parentBox); - if(parentBox != NULL) { - GetParentBox(parentBox, pReturnedParentBox); - } - } -} -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::HandleFormattingComplete () - { - TBrowserStatusCode status = KBrsrSuccess; - iRootBox->calculateExtents = NW_TRUE; - iCreateTabList = NW_FALSE; - - NW_LMgr_RootBox_InvalidateCache (iRootBox ); - // if the user has not tabbed to any tab item - if (GetActiveBoxId() == 0) - { - if (((iInitialDocPosition.x != 0) && (iInitialDocPosition.x != RIGHT_ORIGIN)) - || (iInitialDocPosition.y !=0)) - { - SetOrigin (&iInitialDocPosition); - } - - // initialActiveBoxId is either the activeBoxId from history or is the first tab index - status = GotoActiveBox (iInitialActiveBoxId); - if ( iAnchorName != NULL && iInitialActiveBoxId == 0 ) - { - NW_LMgr_Box_t* targetBox = NULL; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Property_t prop; - - /* find the named box */ - - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, (NW_LMgr_Box_t *)iRootBox); - (void) NW_LMgr_BoxVisitor_SetCurrentBox (&boxVisitor, (NW_LMgr_Box_t *)iRootBox); - - - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_boxName, &prop); - - if ((status == KBrsrSuccess) && (prop.type == NW_CSS_ValueType_Text)) - { - if (!NW_Text_Compare (iAnchorName, prop.value.object)) - { - targetBox = box; - break; - } - } - } - - if (targetBox != NULL) - { - (void) JumpToLink (box, NW_FALSE); - } - - (void) Draw(NW_TRUE); - NW_Object_Delete(iAnchorName); - iAnchorName = NULL; - - } - } - else - { - status = Draw (NW_TRUE); - } - for( TInt n=0; n<iListeners.Count(); n++ ) - { - iListeners[n]->FormattingComplete(); - } - return status; - } - -/* ------------------------------------------------------------------------- */ -//lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) -TBrowserStatusCode CView::GetBoxTabIndex (NW_LMgr_Box_t* box, NW_ADT_Vector_Metric_t* index) - { - NW_Int32 i; - NW_ADT_Vector_Metric_t size; - NW_LMgr_Box_t* tempBox; - NW_LMgr_RootBox_t* rootBox = iRootBox; - NW_GDI_Rectangle_t tempBoxBounds; - NW_GDI_Rectangle_t boxBounds; - NW_Bool isPageRTL = NW_LMgr_RootBox_IsPageRTL(rootBox); - NW_Bool smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ); - - NW_ASSERT(box != NULL); - *index = NW_ADT_Vector_AtEnd; - - size = NW_ADT_Vector_GetSize( iTabList ); - - // if a box is about to be added to the tab list the second time -so it's already in the list - // we need to delete it from the list as this time, then box might have different x y which - // requires different index to return with. - i = 0; - while( i < size ) - { - tempBox = (NW_LMgr_Box_t*)*NW_ADT_Vector_ElementAt( iTabList, - (NW_ADT_Vector_Metric_t)i); - // check if the box is duplicated - if( tempBox == box ) - { - NW_ADT_DynamicVector_RemoveAt( iTabList, (NW_ADT_Vector_Metric_t)i ); - break; - } - // check if this is a image map box 'cause it appends the area boxes into the list - // instead of the image map box - only in normal mode - else if( NW_Object_IsClass(box, &NW_LMgr_ImageMapBox_Class) == NW_TRUE && - smallScreenOn == NW_FALSE ) - { - // - NW_ADT_Vector_Metric_t arrayIndex; - NW_ADT_Vector_Metric_t elementSize; - NW_LMgr_Box_t* areaBox = NULL; - NW_ADT_DynamicVector_t* areaBoxArray = - NW_LMgr_ImageMapBox_GetAreaBoxList( NW_LMgr_ImageMapBoxOf( box ) ); - if( areaBoxArray ) - { - // find the index of the node vector - elementSize = NW_ADT_Vector_GetSize(areaBoxArray); - - // loop through all the area boxes in the array and check if the box has already - // been added - for( arrayIndex = 0; arrayIndex < elementSize; arrayIndex++ ) - { - areaBox = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt( areaBoxArray, arrayIndex ); - if( tempBox == areaBox ) - { - NW_ADT_DynamicVector_RemoveAt( iTabList, (NW_ADT_Vector_Metric_t)i ); - // set size variable - size = NW_ADT_Vector_GetSize( iTabList ); - // get the next box with the same index ( the result of the delete ) - i--; - break; - } - } - } - } - i++; - } - - size = NW_ADT_Vector_GetSize( iTabList ); - CMVCScroll* scrollView = static_cast<CMVCScroll*>(GetScroll()); - NW_LMgr_Box_t* siblingBox = scrollView->GetFirstSiblingBox(box); - boxBounds = NW_LMgr_Box_GetDisplayBounds(siblingBox); - - for( i = size - 1; i >= 0; i-- ) - { - tempBox = (NW_LMgr_Box_t*)*NW_ADT_Vector_ElementAt(iTabList, - (NW_ADT_Vector_Metric_t)i); - siblingBox = scrollView->GetFirstSiblingBox( NW_LMgr_BoxOf(tempBox) ); - tempBoxBounds = GetBoxDisplayBounds( siblingBox ); - - // rule of inserting: first check y so that links on the same line go right after each other - // and then check x to keep the order within the line - - // crossing rectangles tells us if those two boxes are in the same line - NW_GDI_Rectangle_t boxRect; - NW_GDI_Rectangle_t tempBoxRect; - - // x does not matter as we are only interested in y. - - // set fake x and width. we must set the same x, width values on those two boxes though. - boxRect.point.x = tempBoxRect.point.x = 0; - boxRect.dimension.width = tempBoxRect.dimension.width = 10; - // set real y, height values - boxRect.point.y = boxBounds.point.y; - boxRect.dimension.height = boxBounds.dimension.height; - tempBoxRect.point.y = tempBoxBounds.point.y; - tempBoxRect.dimension.height = tempBoxBounds.dimension.height; - - if( NW_GDI_Rectangle_Cross( &boxRect, &tempBoxRect, NULL ) ) - { - // same line - - // on right to left pages the x has to be decreasing as you jump - // from link to link within the line. - if( !isPageRTL ) - { - if( boxBounds.point.x > tempBoxBounds.point.x || - (boxBounds.point.x == tempBoxBounds.point.x && - boxBounds.point.y > tempBoxBounds.point.y) ) - { - *index = (NW_ADT_Vector_Metric_t)( i + 1 ); - break; - } - else if( i == 0 ) - { - // the candiate is above even the first box - *index = 0; - break; - } - } - // rtl - else - { - if( boxBounds.point.x < tempBoxBounds.point.x || - (boxBounds.point.x == tempBoxBounds.point.x && - boxBounds.point.y > tempBoxBounds.point.y) ) - { - *index = (NW_ADT_Vector_Metric_t)( i + 1 ); - break; - } - else if( i == 0 ) - { - // the candiate is above even the first box - *index = 0; - break; - } - } - } - else if( boxBounds.point.y > tempBoxBounds.point.y ) - { - // the box is right below the tempbox. - *index = (NW_ADT_Vector_Metric_t)( i + 1 ); - break; - } - else if( i == 0 ) - { - // the candiate is above even the first box - *index = 0; - break; - } - else - { - // not on the same line but above, keep going - } - } - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBool CView::ValidateAddedIndex(NW_LMgr_Box_t* aBox, NW_LMgr_Box_t* aMasterBox) - { - NW_GDI_Rectangle_t boxBounds = GetBoxDisplayBounds(aMasterBox); - // If master box is not visible, do not add to tab index - // Break box now has a width of 1. Don't add to tab index if there are only break boxes - if ( boxBounds.dimension.width == 0 || boxBounds.dimension.height == 0) - { - return EFalse; - } - - // If all the boxes associated with this box are not visible, don't add to tab index - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* visitedBox; - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, aBox); - while((visitedBox = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - boxBounds = GetBoxDisplayBounds(visitedBox); - if (NW_Object_IsInstanceOf(visitedBox, &NW_LMgr_ContainerBox_Class)) - { - continue; - } - - if (( boxBounds.dimension.width != 0 || boxBounds.dimension.height != 0) && - !NW_Object_IsInstanceOf(visitedBox, &NW_LMgr_BreakBox_Class)) - { - // Found a visible box - return ETrue;; - } - } - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, aMasterBox); - while((visitedBox = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - boxBounds = GetBoxDisplayBounds(visitedBox); - if (NW_Object_IsInstanceOf(visitedBox, &NW_LMgr_ContainerBox_Class)) - { - continue; - } - if ((boxBounds.dimension.width != 0 && boxBounds.dimension.height != 0) && - !NW_Object_IsInstanceOf(visitedBox, &NW_LMgr_BreakBox_Class)) - { - // Found a visible box - return ETrue;; - } - } - return EFalse; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::AppendTabItem (NW_LMgr_Box_t* aBox) - { - TBrowserStatusCode status = KBrsrSuccess; - //lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - NW_ADT_Vector_Metric_t index = 0; - NW_LMgr_Property_t prop; - NW_LMgr_Box_t* box = aBox; - - if (box->propList && NW_Object_IsInstanceOf(box->propList, &NW_LMgr_SlavePropertyList_Class)) - { - // this is a slave, get the master box as we MUST NOT add slave box to the tablist - // Slave boxes are destroyed when box tree is collaped. Collapse can happen multiple times while - // the page is being loaded and if we added slave boxes to the tablist, then we would end up having - // invalid pointers in the tablist after each collapse. - NW_LMgr_Box_t* masterBox = NW_LMgr_SlavePropertyList_GetMasterBox( box->propList ); - if( !masterBox ) - { - return KBrsrUnexpectedError; - } - box = masterBox; - } - // Add the new box only if there is something visible for this active box - if (!ValidateAddedIndex(aBox, box)) - { - return KBrsrSuccess; - } - // set available accesskey - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_accesskey, &prop); - - if (status == KBrsrSuccess) - { - (void) NW_LMgr_AccessKey_SetAvailableKey (NW_LMgr_AccessKeyOf (prop.value.object), - iTabList); - } - // ignore duplicated boxes - if( GetBoxTabIndex (box, &index) == KBrsrSuccess ) - { - // if the box is an image map box, and we are in normal layout mode, then we want to - // add the image map's area boxes to the tab list instead of the image map box itself - // if we are in small screen mode, we will add the image map box to the tab list - if ((NW_Object_IsClass(box, &NW_LMgr_ImageMapBox_Class) == NW_TRUE) && - ( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) )) - { - NW_ADT_Vector_Metric_t arrayIndex; - NW_ADT_Vector_Metric_t elementSize; - NW_LMgr_AreaBox_t* areaBox = NULL; - - NW_LMgr_ImageMapBox_t* imageMapBox = (NW_LMgr_ImageMapBox_t*)box; - NW_ADT_DynamicVector_t* areaBoxArray = NW_LMgr_ImageMapBox_GetAreaBoxList(imageMapBox); - - // It is possible to have an ImageMapBox with no AreaBoxArray - // This happens when the usemap id is not present anywhere in the document - if (areaBoxArray) - { - // find the index of the node vector - elementSize = NW_ADT_Vector_GetSize(areaBoxArray); - - // loop through all the area boxes in the array and instert them into the tab list - int offset = 0; - for (arrayIndex = 0; arrayIndex < elementSize; arrayIndex++) - { - areaBox = *(NW_LMgr_AreaBox_t**)NW_ADT_Vector_ElementAt (areaBoxArray, arrayIndex); - - // - if( index != NW_ADT_Vector_AtEnd ) - { - offset = arrayIndex; - } - if (NW_ADT_DynamicVector_InsertAt (iTabList, - &areaBox, (NW_ADT_Vector_Metric_t)(index + offset) ) == NULL) - { - return KBrsrOutOfMemory; - } - } - } - } - else - { - if( NW_ADT_DynamicVector_InsertAt (iTabList, &box, index) == NULL ) - { - return KBrsrOutOfMemory; - } - } - } - return KBrsrSuccess; - } - -TBrowserStatusCode -CView::SetupTableFormat ( NW_Bool /*relayoutEvent*/ ) - { - // no need to visit the box tree and format tables in Small Screen Mode - // since we do not have any tables in this mode - if( NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - return KBrsrNotFound; - } - - NW_Bool foundTable = NW_FALSE; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* child = NULL; - NW_Uint8 skipChildren = NW_FALSE; - - NW_LMgr_BoxVisitor_Initialize(&boxVisitor, NW_LMgr_BoxOf(iRootBox)); - - while( ( child = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, &skipChildren ) ) != NULL ) - { - if( NW_Object_IsInstanceOf( child, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - // set maximum/minimum pass on tables - NW_LMgr_StaticTableBox_SetAutomaticTableWidthPass( NW_LMgr_StaticTableBoxOf( child ), NW_LMgr_StaticTableBox_AutomaticWidth_MaximumPass ); - foundTable = NW_TRUE; - } - } - - // first check if the page has table at all as if it doesn't have, then no layout is needed at all - if( foundTable == NW_TRUE ) - { - ((CLMgr_BoxFormatHandler*)(iBoxFormatHandler))->SetBackgroundFormat(); - } - else - { - return KBrsrNotFound; - } - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::UpdateScrollBars () const - { - NW_GDI_Dimension2D_t canvasSize; - TBrowserStatusCode status = NW_LMgr_RootBox_GetExtents (iRootBox, &canvasSize); - if (status != KBrsrSuccess) - { - return status; - } - iWmlControl->WKWmlInterface()->updateScrollbars(canvasSize.height, Rect().Height(), iDeviceContext->Origin()->y, - canvasSize.width, Rect().Width(), iDeviceContext->Origin()->x); - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -NW_Bool -CView::ProcessTabEvent (const NW_Evt_TabEvent_t* tabEvent) -{ - TBool noBoxVisible; - TBool returnVal = EFalse; - CMVCScroll* scroll; - - /* parameter assertion block */ - NW_ASSERT (tabEvent != NULL); - - scroll = static_cast<CMVCScroll*>(iScroll); - - switch (NW_Evt_TabEvent_GetDirection (tabEvent)) - { - case NW_Evt_TabEvent_Direction_Up: - case NW_Evt_TabEvent_Direction_Left: - returnVal = scroll->TabBackward (&noBoxVisible); - break; - - case NW_Evt_TabEvent_Direction_Down: - case NW_Evt_TabEvent_Direction_Right: - returnVal = scroll->TabForward (NW_FALSE/* not new page */, &noBoxVisible); - break; - } - - /* we didn't absorb the event */ - return (NW_Bool)returnVal; -} - -// ----------------------------------------------------------------------------- -NW_Bool -CView::ProcessScrollEvent (const NW_Evt_ScrollEvent_t* scrollEvent) -{ - NW_GDI_Point2D_t origin; - NW_Uint16 delta; - - /* parameter assertion block */ - NW_ASSERT (scrollEvent != NULL); - - origin = *(iDeviceContext->Origin()); - delta = NW_Evt_ScrollEvent_GetAmount(scrollEvent); - switch (NW_Evt_ScrollEvent_GetDirection (scrollEvent)) - { - case NW_Evt_ScrollEvent_Direction_Left: - origin.x = (NW_GDI_Metric_t) (origin.x - delta); - break; - - case NW_Evt_ScrollEvent_Direction_Right: - origin.x = (NW_GDI_Metric_t) (origin.x + delta); - break; - - case NW_Evt_ScrollEvent_Direction_Up: - origin.y = (NW_GDI_Metric_t) (origin.y - delta); - break; - - case NW_Evt_ScrollEvent_Direction_Down: - origin.y = (NW_GDI_Metric_t) (origin.y + delta); - break; - - default: - /* we didn't absorb the event */ - return NW_FALSE; - } - - /* */ - TBrowserStatusCode status = SetOrigin (&origin); - NW_ASSERT (status == KBrsrSuccess); - - /* we absorbed the event */ - return NW_TRUE; -} - -// ----------------------------------------------------------------------------- -void -CView::DeleteOptionItems () -{ - //lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t size; - - if (iOptionItemList == NULL) - { - return; - } - size = NW_ADT_Vector_GetSize(iOptionItemList); - if (size == 0 ) - { - NW_Object_Delete(iOptionItemList); - iOptionItemList = NULL; - return; - } - - for(index =0;index<size; index++) - { - NW_Ucs2 *str = *(NW_Ucs2 **) - NW_ADT_Vector_ElementAt (iOptionItemList, index); - NW_Mem_Free(str); - } - - NW_Object_Delete(iOptionItemList); - iOptionItemList = NULL; - return; -} - -// ============================= PUBLIC FUNCTIONS =============================== -void -CView::UpdateCBAs () const -{ - NW_AppServices_SoftKeyAPI_t* softKeyAPI; - NW_HED_AppServices_t* appServices; - NW_LMgr_RootBox_t* rootBox = iRootBox; - - appServices = NW_LMgr_RootBox_GetAppServices (rootBox); - softKeyAPI = &(appServices->softKeyApi); - - if (softKeyAPI->setLeft != NULL) - { - softKeyAPI->setLeft(NW_SOFTKEY_OK); // NW_SOFTKEY_OK parameter is here just because of API - } -} - -// ---------------------------------------------------------------------------- -TBrowserStatusCode CView::InputInvalid(void* aCEpoc32View, TInt aMin) - { - TBrowserStatusCode status = KBrsrSuccess; - TRAPD(err, status = InputInvalidL(aCEpoc32View, aMin)); - if (err != KErrNone) - return KBrsrFailure; - return status; - } -// ---------------------------------------------------------------------------- -TBrowserStatusCode CView::InputInvalidL(void* aCEpoc32View, TInt aMin) - { - HBufC* message = NULL; - - if (aMin == 1) - { - // We only require one char - message = StringLoader::LoadLC(R_TEXT_INPUT_REQ); - } - else - { - TBuf<8> aMinStr; - aMinStr.Format(_L("%U"),aMin); - // We require a minimum number of chars - message = StringLoader::LoadLC(R_TEXT_MORE_INPUT_REQ,aMinStr); - } - - TRAPD (err, ((CView*)aCEpoc32View)->iBrCtl->brCtlDialogsProvider()->DialogNoteL(message->Des())); - - // Clean up the memory - CleanupStack::PopAndDestroy(1); // message - - return (( err == KErrNone) ? KBrsrSuccess : KBrsrFailure); - } - -// ---------------------------------------------------------------------------- -TBrowserStatusCode -CView::InitializeTree (NW_LMgr_RootBox_t *rootBox, TBool isFormatingBoxTree) - { - TBrowserStatusCode status = KBrsrSuccess; - - // CView::IBoxTreeListener_FormattingComplete takes care of - // the following clean-ups in case of background formatting - if( !((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->BackgroundFormat() ) - { - /* Clear the rendering cache */ - NW_LMgr_RootBox_InvalidateCache(rootBox); - - /* Clear the float context vectors */ - (void) NW_ADT_DynamicVector_Clear(rootBox->placedFloats); - (void) NW_ADT_DynamicVector_Clear(rootBox->pendingFloats); - (void) NW_ADT_DynamicVector_Clear(rootBox->positionedAbsObjects); - rootBox->iPositionedBoxesPlaced = NW_FALSE; - - /* We'll have to recalculate the extents */ - NW_Mem_memset(&(rootBox->extents), 0, sizeof(NW_GDI_Rectangle_t)); - NW_Mem_memset(&(rootBox->scrollRange), 0, sizeof(NW_GDI_Rectangle_t)); - NW_LMgr_RootBox_ExtendsCalculationNeeded(rootBox); - NW_LMgr_RootBox_SetBody(rootBox, NULL); - - // set formatting bounds - - // Below four lines should go away once container box sets the height of rootbox - // to be equal to its height. Currently the height of rootbox is increased to - // the amount equal to the initial height + the height of inner container box. - // Where as it should be increased to be equal to the height of inner container box. - NW_GDI_Rectangle_t displayBounds; - - displayBounds = *(iDeviceContext->DisplayBounds()); - displayBounds.point.x = 0; - displayBounds.point.y = 0; - displayBounds.dimension.height = 0; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( rootBox ), displayBounds ); - } - - /* Set the font on the rootbox */ - status = NW_LMgr_Box_ApplyFontProps(NW_LMgr_BoxOf(rootBox)); - - /* by default, the blink timer is off */ - rootBox->isBlinking = NW_FALSE; - - // Reset the formatbounds when the browser is in NSM or in SSM and it has grid mode tables. - // The bounds need to be reset in order to correctly layout boxes in static cell boxes. - if( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) || (rootBox->iHasGridModeTables && - isFormatingBoxTree)) - { - NW_LMgr_BoxVisitor_t visitor; - NW_LMgr_Box_t* child = NULL; - - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(rootBox)); - - /* Iterate through all children */ - child = NW_LMgr_BoxVisitor_NextBox(&visitor, NULL); - while ((child = NW_LMgr_BoxVisitor_NextBox(&visitor, NULL)) != NULL) - { - /* Initialize the coordinates */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( child ); - - NW_Mem_memset(&(boxBounds), 0, sizeof(NW_GDI_Rectangle_t)); - NW_LMgr_Box_SetFormatBounds( child, boxBounds ); - - - /* Clean up any flows */ - if (NW_Object_IsInstanceOf(child, &NW_LMgr_BidiFlowBox_Class)) - { - status = ((CLMgr_BoxFormatHandler*)(iBoxFormatHandler))->InitializeBox(NW_LMgr_BidiFlowBoxOf(child)); - } - - if (NW_Object_IsClass(child, &NW_LMgr_ContainerBox_Class) || - NW_Object_IsClass(child, &NW_LMgr_ActiveContainerBox_Class)) - { - status = NW_LMgr_ContainerBox_Initialize(NW_LMgr_ContainerBoxOf(child)); - } - - if (NW_Object_IsClass(child, &NW_LMgr_MarqueeBox_Class)) - { - status = NW_LMgr_MarqueeBox_Initialize(NW_LMgr_MarqueeBoxOf(child)); - } - if (status != KBrsrSuccess) - break; - } - } - - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::SetDisplayExtents (NW_GDI_Rectangle_t* displayExtents) -{ - CGDIDeviceContext* deviceContext = GetDeviceContext (); - - if (!deviceContext) - { - return KBrsrFailure; - } - - deviceContext->SetDisplayBounds( displayExtents); - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::Collapse( NW_LMgr_FlowBox_t* containingFlow, NW_Bool collapseAnonymous ) - { - return ((CLMgr_BoxFormatHandler*)(iBoxFormatHandler))->Collapse( containingFlow, collapseAnonymous ); - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::FormatBoxTree(NW_Bool createTabList) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_LOG0( NW_LOG_LEVEL2, "CView::FormatBoxTree START" ); - - // check to see if we have any children in our box tree, if not, then there is nothing to - // format and we just want to return success. - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(iRootBox), 0); - if( !child ) - { - return KBrsrSuccess; - } - // cancel any format in progress - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - - // clear tablist - if( createTabList ) - { - (void) NW_ADT_DynamicVector_Clear(iTabList); - } - iCreateTabList = createTabList; - - // check if background format is needed - status = SetupTableFormat (NW_TRUE); - - if( status != KBrsrNotFound ) - { - // ignore KBrsrNotFound error as it indicates that there in no table in the page - if (status != KBrsrSuccess) - { - return status; - } - } - status = KBrsrSuccess; - - // Initialize the tree - status = InitializeTree (iRootBox, ETrue); - if (status != KBrsrSuccess) - { - return status; - } - - // start formatting - TRAPD(err, ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->PartialFormatL( iFormatPriority )); - if( err != KErrNone ) - { - return KBrsrFailure; - } - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->PageLoadCompleted(); - -#ifdef _DEBUG_LOG - // dump the box tree - if (iRootBox) - { - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); - } -#endif // DEBUG - - NW_LOG0( NW_LOG_LEVEL2, "CView::FormatBoxTree END" ); - return status; - } - -// ----------------------------------------------------------------------------- -void -CView::DisableAnimation() - { - NW_LMgr_Box_t* child = NULL; - NW_LMgr_BoxVisitor_t visitor; - - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(iRootBox)); - - while( ( child = NW_LMgr_BoxVisitor_NextBox( &visitor, NULL) ) != NULL ) - { - if( NW_Object_IsInstanceOf( child, &NW_LMgr_AnimatedImageBox_Class ) == NW_TRUE ) - { - NW_LMgr_AnimatedImageBox_Suspend (NW_LMgr_AnimatedImageBoxOf(child)); - } - } - } - -// ----------------------------------------------------------------------------- -void -CView::EnableAnimation() - { - NW_LMgr_Box_t* child = NULL; - NW_LMgr_BoxVisitor_t visitor; - - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(iRootBox)); - - while( ( child = NW_LMgr_BoxVisitor_NextBox( &visitor, NULL ) ) != NULL ) - { - if( NW_Object_IsInstanceOf( child, &NW_LMgr_AnimatedImageBox_Class ) == NW_TRUE ) - { - NW_LMgr_AnimatedImageBox_Resume (NW_LMgr_AnimatedImageBoxOf(child)); - } - } - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SwitchToImageMapView () - { - NW_LMgr_RootBox_t* newRootBox = NULL; - NW_LMgr_Box_t* newImageMapBox = NULL; - NW_LMgr_BidiFlowBox_t* newBidiFlowBox = NULL; - LMgrAnonBlock_t* newAnonBlockBox = NULL; - NW_AppServices_SoftKeyAPI_t* softKeyAPI = NULL; - NW_LMgr_Property_t prop; - TBrowserStatusCode status = KBrsrSuccess; - - // set the image map view flag to true - iIsImageMapView = NW_TRUE; - - // disable any animation - DisableAnimation(); - - // set the current box as the "focus" box on the root box - // this helps us save the state for when we switch back to the normal view - NW_LMgr_RootBox_SetFocusBox(iRootBox, iCurrentBox); - - status = NW_LMgr_RootBox_Copy (iRootBox, &newRootBox); - if (status != KBrsrSuccess) - { - return status; - } - - // add the new root box to the root box array - TRAPD( ret, iRootBoxArray->AppendL(newRootBox) ); - if( ret == KErrNoMemory ) - { - return KBrsrOutOfMemory; - } - - // set the "current" root box to be the new root box - iRootBox = newRootBox; - - // change root box associated with the box format handler - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->SetRootBox(NW_LMgr_BoxOf(iRootBox)); - - // set the box tree listener for the new root box (always returns success) - status = NW_LMgr_RootBox_SetBoxTreeListener (iRootBox, this); - - // make sure the rootbox has the focus at the beginning - NW_LMgr_RootBox_GainFocus(iRootBox); - - // create a BidiFlowBox in which to build the box tree - newBidiFlowBox = NW_LMgr_BidiFlowBox_New (1); - if (!newBidiFlowBox) - { - return KBrsrOutOfMemory; - } - - // set the display property on the bidi flow box - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf (newBidiFlowBox), - NW_CSS_Prop_display, &prop); - - prop.value.token = NW_CSS_PropValue_flags_bodyElement; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (newBidiFlowBox), NW_CSS_Prop_flags, &prop); - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 2; - NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf(newBidiFlowBox), NW_CSS_Prop_margin, &prop); - - // create a new anon block that will contain our imagemap box since the image map cannot - // exist outside a block - newAnonBlockBox = LMgrAnonBlock_New(0); - if (!newAnonBlockBox) - { - return KBrsrOutOfMemory; - } - - // get the image map box by copying the current box - status = NW_LMgr_ImageMapBox_Copy(iCurrentBox, &newImageMapBox); - if (status != KBrsrSuccess) - { - return status; - } - - // Add the image map box to the new anon container box - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(newAnonBlockBox), - newImageMapBox); - if (status != KBrsrSuccess) - { - return status; - } - - // Insert the anon block box into the box tree - status = NW_LMgr_ContainerBox_InsertChildAt(NW_LMgr_ContainerBoxOf(newBidiFlowBox), - NW_LMgr_BoxOf(newAnonBlockBox), - 0); - if (status != KBrsrSuccess) - { - return status; - } - - // Set the display property on the anon block box - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(newAnonBlockBox), - NW_CSS_Prop_display, &prop); - if (status != KBrsrSuccess) - { - return status; - } - - // switch to normal screen mode - NW_Settings_SetInternalVerticalLayoutEnabled( NW_FALSE ); - - // set the current box to point to the new image map box - iCurrentBox = newImageMapBox; - - // set the current box as the "focus" box on the root box - NW_LMgr_RootBox_SetFocusBox(iRootBox, iCurrentBox); - - // set the box tree on the view - status = SetBoxTree (NW_LMgr_BoxOf(newBidiFlowBox)); - if (status != KBrsrSuccess) - { - return status; - } - - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->ClearFormattingContext(); - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - - // this will actually perform switch to normal screen mode - status = SwitchVerticalLayout (NW_TRUE, NW_TRUE); - if (status != KBrsrSuccess) - { - return status; - } - - // ping the softkeys api, it doesn't matter which key and - // options we are setting, we just want to trigger CommandSetResourceIdL - // off the BrowserContentView to be called - // this will trigger the code that switches the changing of the right - // key to Back when we are in image map mode - softKeyAPI = &(iRootBox->appServices->softKeyApi); - NW_ASSERT(softKeyAPI != NULL); - - if (softKeyAPI->setLeft != NULL) - { - softKeyAPI->setLeft(NW_SOFTKEY_OK); // this could be anything - } - // Inform all observers that returning from image map view - // This is important because we need to inform Flash plugin to not show itself - TInt count = iStateChangeObserver.Count(); - for (TInt i = 0; i < count; i++) - { - iStateChangeObserver[i]->StateChanged(TBrCtlDefs::EStateImageMapView,ETrue); - } - - return status; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SwitchFromImageMapView () - { - NW_AppServices_SoftKeyAPI_t* softKeyAPI = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - // set the image map view flag to false - iIsImageMapView = NW_FALSE; - - // find the size of the root box array - TInt size = iRootBoxArray->Count(); - NW_ASSERT (size == 2); - - // retrieve the original root box (index position should be 0) - iRootBox = iRootBoxArray->At(0); - NW_ASSERT(iRootBox); - - // change root box associated with the box format handler - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->SetRootBox(NW_LMgr_BoxOf(iRootBox)); - - // set the box tree listener for the original root box // always returns success - status = NW_LMgr_RootBox_SetBoxTreeListener (iRootBox, this); - - // make sure the rootbox has the focus at the beginning - NW_LMgr_RootBox_GainFocus(iRootBox); - - NW_LMgr_Box_t* boxTree = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(iRootBox), 0); - NW_ASSERT(boxTree); - - // set the current box to point to the focused box in the box tree - iCurrentBox = NW_LMgr_RootBox_GetFocusBox(iRootBox); - - // set the focus box to NULL - NW_LMgr_RootBox_SetFocusBox(iRootBox, NULL); - - // Check to see the status of the external layout switch flag because it - // is possible that the user changed the layout mode while in the - // image map view - if (iExternalLayoutSwitch) - { - // if the user changed the layout, call switch vertical layout to reformat the box tree - // and make sure that we switch tables as well - status = SwitchVerticalLayout (NW_TRUE, NW_TRUE); - if (status != KBrsrSuccess) - { - return status; - } - } - else - { - // if the user hasn't changed the layout, switch back to vertical layout mode - NW_Settings_SetInternalVerticalLayoutEnabled( NW_TRUE ); - - // this will actually perform switch to the vertical layout mode, but since we - // are passing in NW_FALSE for the third parameter, we will not switch the tables - status = SwitchVerticalLayout (NW_TRUE, NW_FALSE); - if (status != KBrsrSuccess) - { - return status; - } - } - - // remove and delete the image map box tree - NW_LMgr_RootBox_t* oldRootBox = iRootBoxArray->At( size - 1 ); - if (!oldRootBox) - { - return KBrsrFailure; - } - - NW_LMgr_Box_t* oldBoxTree = NW_LMgr_RootBox_GetFocusBox(oldRootBox); - if (!oldBoxTree) - { - return KBrsrFailure; - } - - // delete image map box tree - NW_Object_Delete (oldBoxTree); - oldBoxTree = NULL; - - // delete the root box - iRootBoxArray->Delete( size - 1 ); - NW_Object_Delete (oldRootBox); - - // ping the softkeys api, it doesn't matter which key and - // options we are setting, we just want to trigger CommandSetResourceIdL - // off the BrowserContentView to be called - // this will trigger the code that switches the changing of the right - // key what ever is appropriate when we are in normal mode - softKeyAPI = &(iRootBox->appServices->softKeyApi); - NW_ASSERT(softKeyAPI != NULL); - - if (softKeyAPI->setLeft != NULL) - { - softKeyAPI->setLeft(NW_SOFTKEY_OK); // this could be anything - } - - iExternalLayoutSwitch = NW_FALSE; - - // enable any animation - EnableAnimation(); - - // Inform all observers that returning from image map view - // This is important because we need to inform Flash plugin to show itself again - TInt count = iStateChangeObserver.Count(); - for (TInt i = 0; i < count; i++) - { - iStateChangeObserver[i]->StateChanged(TBrCtlDefs::EStateImageMapView, EFalse); - } - - return status; - } - -// ----------------------------------------------------------------------------- -void -CView::ExternalLayoutSwitch () - { - if (iIsImageMapView) - { - iExternalLayoutSwitch = NW_TRUE; - } - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SetOrigin (NW_GDI_Point2D_t* origin) -{ - const NW_GDI_Dimension2D_t* displaySize; - NW_GDI_Dimension2D_t canvasSize; - NW_GDI_Dimension2D_t scrollRange; - NW_GDI_Point2D_t oldOrigin; - - // get the display and canvas size - displaySize = - &(iDeviceContext->DisplayBounds()->dimension); - TBrowserStatusCode status = NW_LMgr_RootBox_GetExtents (iRootBox, &canvasSize); - NW_ASSERT (status == KBrsrSuccess); - - /* make sure that the speicified origin does not extend us beyond the - canvas size */ - if (origin->x + displaySize->width > canvasSize.width) - { - origin->x = (NW_GDI_Metric_t) (canvasSize.width - displaySize->width); - } - - - if (origin->x < 0) - { - origin->x = 0; - } - - NW_LMgr_RootBox_GetScrollRange(NW_LMgr_RootBoxOf(iRootBox), &scrollRange); - if (((canvasSize.width - origin->x) > scrollRange.width) && - NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBoxOf(iRootBox))) - { - origin->x = canvasSize.width - scrollRange.width; - } - - if (origin->y + displaySize->height > canvasSize.height) - { - origin->y = (NW_GDI_Metric_t) (canvasSize.height - displaySize->height); - } - - if (origin->y < 0) - { - origin->y = 0; - } - - oldOrigin = *(iDeviceContext->Origin()); - - // set the origin of the DeviceContext - if ((oldOrigin.x != origin->x) || (oldOrigin.y != origin->y)) - { - NW_LMgr_RootBox_InvalidateCache(iRootBox); - iDeviceContext->SetOrigin (origin); - // update the rootBox about the change in orgin) - NW_LMgr_RootBox_OriginChanged(iRootBox, (NW_GDI_Point2D_t*)(&oldOrigin)); - } - return KBrsrSuccess; -} - -// ------------------------------------------------------------------------- -// box is a flow box, go ahead formatting the subtree of the box -// -// take out CView::Draw function call from ReformatBox function; -// using NW_LMgr_IBoxTreeListener_RedrawDisplay instead, reason: -// imageCH calls ReformatBox for each virtual image; -// in turn CView::Draw is called for each virtual image if CView::Draw is called inside ReformatBox; -// shell will control this situation if many View_Draw msg sent -// thus CView::Draw called once for a group of virtual images which shares one simple image -// ------------------------------------------------------------------------- -TBrowserStatusCode -CView::ReformatBox (NW_LMgr_Box_t* box) - { - - NW_LMgr_BoxVisitor_t visitor; - NW_LMgr_Box_t* child = NULL; - NW_LMgr_Box_t* parentBox = NULL; - NW_LMgr_Box_t* flowBox = NULL; - NW_GDI_Rectangle_t childBounds; - NW_GDI_Rectangle_t flowBounds; - NW_GDI_Metric_t oldHeight; - NW_GDI_Metric_t newHeight; - NW_ADT_DynamicVector_t* backupPlacedFloats = NULL; - NW_ADT_DynamicVector_t* backupPendingFloats = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool createTabList; - CLMgr_BoxFormatHandler* tempBoxFormatHandler= NULL; - TInt ret = KErrNone; - - // We try to find out the containing flow box */ - parentBox = box; - - //if the parent is a bidiflowbox, we continue to check if there is still tabel cell box as a parent, if not, - //we still keep this bidiflowbox as parent - NW_LMgr_Box_t* returnedParentBox = NULL; - GetParentBox(parentBox, &returnedParentBox); - if(returnedParentBox != NULL) { - parentBox = returnedParentBox; - } - - /* The parent box should be an instance of the flow box */ - flowBox = parentBox; - NW_ASSERT (NW_Object_IsInstanceOf(flowBox, &NW_LMgr_FlowBox_Class)); - - /* - ** iSuppressDupReformats is true when a virtual image with more than - ** one image observer is notifying its observers that it has been "opened". - ** When iPendingReformatBox matches this box's parent then it can safely - ** skip this reformat because this box will be reformatted when - ** iPendingReformatBox is formatted -- either the box has a different parent- - ** flow-box or the box is associated with the last image observer. - ** - ** This helps speed up the special case when an image is duplicated many times - ** within the same document. - */ - if(iSuppressDupReformats != NW_Image_AbstractImage_SuppressDupReformats_Default) - { - if (iPendingReformatBox != flowBox && iPendingReformatBox != box) - { - // If flowBox is inside iPendingReformatBox, then forget flowBox and format only iPendingFormatBox - NW_LMgr_Box_t* parent =(NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(flowBox); - while (parent != NULL && parent != iPendingReformatBox) - { - parent = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(parent); - } - if (iPendingReformatBox && parent == iPendingReformatBox) - { - iSuppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Stop; - flowBox = iPendingReformatBox; - iPendingReformatBox = NULL; - } - else - { - if (iPendingReformatBox) - { - NW_Int16 state = iSuppressDupReformats; - iSuppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Stop; - ReformatBox (iPendingReformatBox); - iSuppressDupReformats = state; - } - iPendingReformatBox = flowBox; - } - } - - - if (iSuppressDupReformats != NW_Image_AbstractImage_SuppressDupReformats_Stop) - goto finish; - - iSuppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Default; - - } - - flowBounds = NW_LMgr_Box_GetFormatBounds(flowBox); - - // get the current height of the flow box since after formatting the - // height will change - oldHeight = flowBounds.dimension.height; - - // collapse the contents of this flow box, since it will be reformatted - status = Collapse (NW_LMgr_FlowBoxOf(flowBox), NW_FALSE); - NW_LOG0(NW_LOG_LEVEL2, "CView::Collapse passed"); - if (status != KBrsrSuccess) - { - goto finish; - } - - /* Initialize the visitor to flowBox */ - NW_LMgr_BoxVisitor_Initialize(&visitor, flowBox); - - child = NW_LMgr_BoxVisitor_NextBox(&visitor, 0); - - /* Set the font on the rootbox */ - status = NW_LMgr_Box_ApplyFontProps(NW_LMgr_BoxOf(child)); - NW_LOG0(NW_LOG_LEVEL2, "NW_LMgr_Box_ApplyFontProps passed"); - if (status != KBrsrSuccess) - { - goto finish; - } - - // floats needs to be removed from the rootbox while the re-layout is - // formatting the subtree as the formatting code cannot cope with - // the case where only a subtree is being formatted but the - // float lists include boxes from the entire tree. - // This is a quick fix on 2.1 showstopper and it has to be - // reviewed and find a better solution (fixing the format code) - - // save placed and pending floats - backupPlacedFloats = iRootBox->placedFloats; - iRootBox->placedFloats = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 0, 5 ); - if (!iRootBox->placedFloats) - { - status = KBrsrOutOfMemory; - goto finish; - } - - backupPendingFloats = iRootBox->pendingFloats; - iRootBox->pendingFloats = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 0, 5 ); - if (!iRootBox->pendingFloats) - { - status = KBrsrOutOfMemory; - goto finish; - } - - while ((child = NW_LMgr_BoxVisitor_NextBox(&visitor,0)) != NULL) - { - if (box != NULL && NW_Object_IsInstanceOf(child, &NW_LMgr_PosFlowBox_Class)) - { - NW_Bool skip = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox( &visitor, &skip); - if (child == NULL) - { - break; - } - } - /* Initialize the coordinates */ - NW_Mem_memset( &childBounds, 0, sizeof(NW_GDI_Rectangle_t)); - - SetBoxFormatBounds( child, childBounds ); - NW_LMgr_Box_UpdateDisplayBounds( child, childBounds ); - /* Clean up any flows */ - if (NW_Object_IsInstanceOf(child, &NW_LMgr_BidiFlowBox_Class) || - NW_Object_IsClass(child, &NW_LMgr_StaticTableCellBox_Class)) - { - status = ((CLMgr_BoxFormatHandler*)(iBoxFormatHandler))->InitializeBox(NW_LMgr_BidiFlowBoxOf(child)); - if (status != KBrsrSuccess) - { - goto finish; - } - } - - if ( !NW_Object_IsInstanceOf(box, &NW_LMgr_PosFlowBox_Class) && - (NW_Object_IsClass(child, &NW_LMgr_ContainerBox_Class) || - NW_Object_IsClass(child, &NW_LMgr_ActiveContainerBox_Class) ) ) - { - status = NW_LMgr_ContainerBox_Initialize(NW_LMgr_ContainerBoxOf(child)); - if (status != KBrsrSuccess) - { - goto finish; - } - } - } - NW_LOG0(NW_LOG_LEVEL2, "child = NW_LMgr_BoxVisitor_NextBox passed"); - /* because of KBrsrLmgrFormatOverflow, don't check on status; - * is this ok for SSL? - */ - - // create a boxFormatHandler and format the flowBox - TRAP(ret, tempBoxFormatHandler = CLMgr_BoxFormatHandler::NewL(flowBox, ETrue)); - if (!tempBoxFormatHandler) - { - status = KBrsrOutOfMemory; - goto finish; - } - -#ifdef _DEBUG_LOG - //#pragma message(__LINE__" WARNING: The following code crashes on a sar segment test of 10Kb or greater.\n") - /* dump the box tree */ - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: ReformatBox method: before PartialFormatL]"); - NW_LMgr_Box_DumpBoxTree (flowBox); -#endif - - // we do not want the tab list to be appended on selective formatting - createTabList = iCreateTabList ; - iCreateTabList = NW_FALSE; - TRAPD(ret1,tempBoxFormatHandler->PartialFormatL( iFormatPriority )); - // set the flag - iCreateTabList = createTabList; - NW_LOG0(NW_LOG_LEVEL2, "PartialFormatL passed"); - if (ret1 != KErrNone) - { - status = KBrsrFailure; - } - tempBoxFormatHandler->PageLoadCompleted(); - NW_LOG0(NW_LOG_LEVEL2, "PageLoadCompleted passed"); - delete tempBoxFormatHandler; - - if (status != KBrsrSuccess) - { - goto finish; - } - -#ifdef _DEBUG_LOG - /* dump the box tree */ - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: ReformatBox method: after PartialFormatL]"); - NW_LMgr_Box_DumpBoxTree (flowBox); -#endif - - flowBounds = NW_LMgr_Box_GetFormatBounds(flowBox); - newHeight = flowBounds.dimension.height; - - // If we are formatting a positioned box - do not shift the rest of the tree - // If we are formatting an image inside a positioned box, shift only the sub-tree up to the positioned box - // If we are formatting an image that is a sibling of a positioned box - skip the positioned box when shifting the box tree - if (oldHeight != newHeight && (!NW_Object_IsInstanceOf(flowBox, &NW_LMgr_PosFlowBox_Class))) - { - // Now we want to adjust heigtht of all parent boxes affected - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(flowBox); - - while (parentBox != NULL && !NW_Object_IsInstanceOf(parentBox, &NW_LMgr_PosFlowBox_Class)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( parentBox ); - if (oldHeight < newHeight) - { - boxBounds.dimension.height = (NW_GDI_Metric_t) (boxBounds.dimension.height + - (newHeight - oldHeight)); - } - else - { - boxBounds.dimension.height = (NW_GDI_Metric_t)(boxBounds.dimension.height - - (oldHeight - newHeight)); - } - NW_LMgr_Box_SetFormatBounds( parentBox, boxBounds ); - NW_LMgr_Box_UpdateDisplayBounds( parentBox, boxBounds ); - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(NW_LMgr_BoxOf(parentBox)); - } - - // update rootbox - iRootBox->calculateExtents = NW_TRUE; - - if (!NW_Object_IsInstanceOf(parentBox, &NW_LMgr_PosFlowBox_Class)) - { - // Now we want to adjust the y parameter of all the lower boxes - - // Initialize the Box Visitor to current FlowBox - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(iRootBox)); - visitor.currentBox = flowBox; - // Skip children of this Flow Box and go to the next box in the tree - NW_Bool skipChildren = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox(&visitor,&skipChildren); - while (child != NULL) - { - // Do not shift nested absolute positioned boxes - if (NW_Object_IsInstanceOf(child, &NW_LMgr_PosFlowBox_Class)) - { - NW_Bool skip = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox(&visitor, &skip); - continue; - } - childBounds = NW_LMgr_Box_GetFormatBounds(child); - - if (oldHeight < newHeight) - { - childBounds.point.y = (NW_GDI_Metric_t) - (childBounds.point.y + (newHeight - oldHeight)); - } - else - { - childBounds.point.y = (NW_GDI_Metric_t) - (childBounds.point.y - (oldHeight - newHeight)); - } - SetBoxFormatBounds( child, childBounds ); - NW_LMgr_Box_UpdateDisplayBounds( child, childBounds ); - - child = NW_LMgr_BoxVisitor_NextBox(&visitor,0); - } - } - else - { - // If the vertical position was specified from the bottom, the positioned sub-tree - // has to be adjusted, to maintain the correct bottom position - if (NW_LMgr_PosFlowBoxOf(parentBox)->iHasBottom) - { - // Initialize the Box Visitor to current FlowBox - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(flowBox)); - // Skip children of this Flow Box and go to the next box in the tree - NW_Bool skipChildren = NW_FALSE; - child = NW_LMgr_BoxVisitor_NextBox(&visitor,&skipChildren); - while (child != NULL) - { - // Do not shift nested absolute positioned boxes - if (NW_Object_IsInstanceOf(child, &NW_LMgr_PosFlowBox_Class)) - { - NW_Bool skip = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox(&visitor, &skip); - continue; - } - childBounds = NW_LMgr_Box_GetFormatBounds(child); - - childBounds.point.y = (NW_GDI_Metric_t) - (childBounds.point.y - (newHeight - oldHeight)); - SetBoxFormatBounds( child, childBounds ); - NW_LMgr_Box_UpdateDisplayBounds( child, childBounds ); - child = NW_LMgr_BoxVisitor_NextBox(&visitor, &skipChildren); - } - } - } - } - NW_LOG0(NW_LOG_LEVEL2, "height update passed"); - - // DrawNow msg sent - (void)RedrawDisplay( NW_FALSE ); - -#ifdef _DEBUG_LOG - /* dump the box tree */ - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: End ReformatBox method]"); - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); -#endif - -finish: - // restore both placed and pending floats ( see comments above) - if( backupPlacedFloats ) - { - NW_Object_Delete( iRootBox->placedFloats); - iRootBox->placedFloats = backupPlacedFloats; - } - - if( backupPendingFloats ) - { - NW_Object_Delete( iRootBox->pendingFloats); - iRootBox->pendingFloats = backupPendingFloats; - } - - /* successful completion */ - NW_LOG0(NW_LOG_LEVEL2, "CView::ReformatBox passed"); - return status; - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::FormatPartial () - { - - TBrowserStatusCode status =KBrsrSuccess; - NW_LOG0(NW_LOG_LEVEL2, "CView::FormatPartial START"); - - //TODO handle leave - TRAPD(err, ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->PartialFormatL( iFormatPriority )); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( iRootBox ) ); - - iRootBox->extents.dimension.height = boxBounds.dimension.height; - UpdateScrollBars (); - NW_LOG0(NW_LOG_LEVEL2, "PartialFormatL passed"); - if(err != KErrNone) - { - status = KBrsrFailure; - } - NW_LOG0(NW_LOG_LEVEL2, "CView::FormatPartial END"); - return status; - } - -/* ------------------------------------------------------------------------- */ -/* return NULL in non-split case -*/ -NW_LMgr_Box_t* -CView::GetNextSiblingBox (const NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t *siblingBox = NULL; - NW_LMgr_PropertyList_t* propList; - NW_LMgr_Property_t prop; - - NW_ASSERT(box != NULL); - - propList = NW_LMgr_Box_PropListGet(box); - if( propList ) - { - prop.value.object = NULL; - (void)NW_LMgr_PropertyList_Get(propList, NW_CSS_Prop_sibling, &prop); - if(prop.value.object != NULL) - { - siblingBox = NW_LMgr_BoxOf(prop.value.object); - } - else - /* If it's null, it means non-split case */ - { - siblingBox = NULL; - } - } - else - { - siblingBox = NULL; - } - - return siblingBox; -} - -/* ------------------------------------------------------------------------- * - public/protected static methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -CView::GetNextEventListener (NW_LMgr_BoxVisitor_t* boxVisitor) -{ - NW_LMgr_Box_t* box = NULL; - NW_GDI_Rectangle_t boxBounds; - - while ((box = NW_LMgr_BoxVisitor_NextBox (boxVisitor, NULL)) != NULL) - { - NW_LMgr_IEventListener_t* eventListener; - - /* we are only looking for boxes implementing the NW_LMgr_IEventListener - interface */ - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class)); - if (eventListener == NULL) - { - continue; - } - - /* If activeContainerBox has zero length or zero width, we skip this - activeContainerBox. This happens when activeContaninerBox only has - one breakBox child */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ActiveContainerBox_Class)) - { - boxBounds = NW_LMgr_Box_GetDisplayBounds(box); - if (boxBounds.dimension.width == 0 || boxBounds.dimension.height == 0) - { - continue; - } - } - return (box); - } - return (NULL); -} - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ -// ----------------------------------------------------------------------------- -// CView::CView -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -CView::CView (CBrCtl* aBrCtl) : - iVScrollPosition(0), iFormatPriority( ((CActive::TPriority)( CActive::EPriorityLow + 2 )) ) -{ - iBrCtl = aBrCtl; -} - -// ----------------------------------------------------------------------------- -// CView::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -void CView::ConstructL (CCoeControl* aParent, TRect& aRect, CWmlControl* aWmlControl ) -{ - static const NW_GDI_Metric_t sVScrollAmt = 18; - static const NW_GDI_Metric_t sHScrollAmt = 18; - static const NW_GDI_Metric_t sVVisibleAmt = 10; - static const NW_GDI_Metric_t sHVisibleAmt = 10; - CGDIDeviceContext* deviceContext = NULL; - void* graphicsContext = NULL; - NW_GDI_Rectangle_t displayBounds = { {0,0},{0,0} }; - NW_HED_AppServices_t* appServices = NULL; - - CreateWindowL( aParent ); - SetMopParent( aParent ); - - iWmlControl = aWmlControl; - - // create a bitmap to be used offscreen - CreateOffscreenBitmapL( Rect() ); - - // create root box array - iRootBoxArray = new (ELeave) CArrayPtrFlat<NW_LMgr_RootBox_t>(2); - - iSuppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Default; - // create the rootBox - iRootBox = NW_LMgr_RootBox_New (appServices); - User::LeaveIfNull(iRootBox); - - iRootBoxArray->AppendL(iRootBox); - // observer small screen and text wrap settings - //CBrowserSettings::Instance()->SetObserver( this, - // EVerticalLayoutEnabled|EDisableSmallScreenLayout|ETextWrapEnabled ); - - iBoxFormatHandler = (void*)CLMgr_BoxFormatHandler::NewL(NW_LMgr_BoxOf(iRootBox ), EFalse); - - (void) NW_LMgr_RootBox_SetBoxTreeListener (iRootBox, this); - - /* Make sure the rootbox has the focus at the beginning */ - NW_LMgr_RootBox_GainFocus(iRootBox); - - iTabList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof(NW_LMgr_Box_t), 10, 5 ); - iOptionItemList = NULL; - - /* Deleted in destruct */ - iScroll = CMVCScroll::NewL(this); - - iMaxScrollAmt.width = 0; - iMaxScrollAmt.height = 0; - iScrollAmt.width = sHScrollAmt; - iScrollAmt.height = sVScrollAmt; - iVisibleAmt.width = sHVisibleAmt; - iVisibleAmt.height = sVVisibleAmt; - - iCreateTabList = NW_FALSE; - - iIsImageMapView = NW_FALSE; - iExternalLayoutSwitch = NW_FALSE; - - // create the deviceContext - graphicsContext = iBitmapContext; - deviceContext = CGDIDeviceContext::NewL (graphicsContext, this); - // ignore err - NW_ASSERT ( deviceContext!= NULL); - - /* set bounds */ - deviceContext->SetDisplayBounds( &displayBounds); - - /* set the DeviceContext on ourselves */ - TBrowserStatusCode status = CView::SetDeviceContext (deviceContext); - NW_ASSERT (status == KBrsrSuccess); - - // create SharedDataClient and ask for a couple of notifications - iRepository = CRepository::NewL(KCRUidCacheManager); - iNotifyHandler = CCenRepNotifyHandler::NewL(*this, *iRepository, CCenRepNotifyHandler::EIntKey, (TUint32)KCacheManagerHttpCacheEnabled); - iNotifyHandler->StartListeningL(); - - if (FeatureManager::FeatureSupported(KFeatureIdJapanesePicto)) - { - iPictographInterface = CAknPictographInterface::NewL( *this, *this ); - } - else - { - iPictographInterface = NULL; - } - iViewAsyncInit = CViewAsyncInit::NewL(); - - InitializePageScalerL(); - - SetRect(aRect); - - if (AknLayoutUtils::PenEnabled()) - { - DrawableWindow()->SetPointerGrab(ETrue); - EnableDragEvents(); - } - - ActivateL(); - } - -// ----------------------------------------------------------------------------- -// CView::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -CView* CView::NewL (CCoeControl* aParent, - CBrCtl* aBrCtl, TRect& aRect, CWmlControl* aWmlControl ) -{ - CView* epocView = new (ELeave) CView(aBrCtl); - - CleanupStack::PushL(epocView); - epocView->ConstructL(aParent, aRect, aWmlControl ); - CleanupStack::Pop(); // epocView - return epocView; -} - -//----------------------------------------------------------------------------- -// Destructor -CView::~CView() -{ - // remove observer - //CBrowserSettings::Instance()->RemoveObserver(); - - if(iNotifyHandler) - { - iNotifyHandler->StopListening(); - } - delete iNotifyHandler; - delete iRepository; - if (iAnchorName != NULL) - { - NW_Object_Delete(iAnchorName); - iAnchorName = NULL; - - } - if (iScroll != NULL) - { - delete iScroll; - iScroll = NULL; - } - - if (iPageScaler != NULL) - { - delete iPageScaler; - iPageScaler = NULL; - } - - delete (CLMgr_BoxFormatHandler*)iBoxFormatHandler; - - if (iRootBoxArray != NULL) - { - for (TInt i = 0; i < iRootBoxArray->Count(); i++) - { - NW_LMgr_RootBox_t* rootBox = iRootBoxArray->At(i); - NW_ASSERT(rootBox); - - NW_Object_Delete(rootBox); - } - iRootBoxArray->Reset(); - delete iRootBoxArray; - } - - delete iDeviceContext; - NW_Object_Delete (iTabList); - DeleteOptionItems (); - - delete iBitmapContext; - delete iBitmapDevice; - delete iOffscreenBitmap; - delete iPictographInterface; - iViewFocusObserver.Reset(); - iStateChangeObserver.Reset(); - - if (iViewAsyncInit) - { - iViewAsyncInit->Cancel(); - delete iViewAsyncInit; - } - - NW_Cleanup(); - - CloseSTDLIB(); -} - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SetBoxTree (const NW_LMgr_Box_t* boxTree) - { - TBrowserStatusCode status = KBrsrSuccess; - TBool errOccur = ETrue; - NW_GDI_Point2D_t origin; - - NW_LOG0( NW_LOG_LEVEL2, "CView::SetBoxTree START" ); - - /* remove any pre-existing box tree */ - if (boxTree == NULL) - { - iDocumentFinished = EFalse; - iPageScaler->DocumentStarted(); - - NW_LOG0( NW_LOG_LEVEL2, "CView::CreateTabIndexList boxTree == NULL" ); - /* unset the currentBox */ - iCurrentBox = NULL; - // we do this only for WML or the first chunk - if (iOptionItemList != NULL) - { - DeleteOptionItems (); - } - (void) NW_ADT_DynamicVector_Clear (iTabList); - iCreateTabList = NW_TRUE; - - /* reset the DeviceContext origin */ - NW_Mem_memset (&origin, 0, sizeof origin); - iDeviceContext->SetOrigin (&origin); - - /* remove any pre-existing box tree */ - status = - NW_LMgr_ContainerBox_RemoveChildren (NW_LMgr_ContainerBoxOf (iRootBox)); - NW_ASSERT (status == KBrsrSuccess); - NW_LMgr_RootBox_SetBody(iRootBox, NULL); - } - - // get the document box tree and insert it into the RootBox - if(boxTree != NULL && NW_LMgr_Box_GetParent (boxTree) == NULL) - { - status = - NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf (iRootBox), - NW_LMgr_BoxOf(boxTree)); - NW_ASSERT (status == KBrsrSuccess); - } - - NW_LMgr_Box_t* rootBox = NW_LMgr_BoxOf (iRootBox); - NW_ASSERT(rootBox); - if (rootBox) {} // fix warning - - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: Before box tree formatting... in CView::SetBoxTree()]"); -#ifdef _DEBUG_LOG - - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); -#endif - - /* different formatting for partial render */ - if ( boxTree == NULL || !iRootBox->partialRender || - ( iRootBox->partialRender && iRootBox->renderingState == NW_LMgr_RootBox_RenderFirstChunk ) ) - { - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: Start box tree formatting...]"); - // Initialize the tree - status = InitializeTree (iRootBox, EFalse); - NW_LOG0( NW_LOG_LEVEL2, "CView::InitializeTree passed" ); - if (status != KBrsrSuccess) - { - goto finish; - } - - // Do the layout - if( boxTree ) - { - status = SetupTableFormat (NW_FALSE); - NW_LOG0( NW_LOG_LEVEL2, "SetupTableFormat passed" ); - - if( status != KBrsrNotFound ) - { - // ignore KBrsrNotFound error as it indicates that there in no table in the page - if (status != KBrsrSuccess) - { - goto finish; - } - } - - status = KBrsrSuccess; - - if( iOptionItemList ) - { - DeleteOptionItems (); - } - (void) NW_ADT_DynamicVector_Clear( iTabList ); - iCreateTabList = NW_TRUE; - // clear any prev formatting context for the first chunk - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->ClearFormattingContext(); - TRAPD( err ,((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->PartialFormatL( iFormatPriority )); - - NW_LOG0( NW_LOG_LEVEL2, "PartialFormatL passed" ); - - if(err != KErrNone) - { - status = KBrsrFailure; - goto finish; - } - } - NW_ASSERT(status == KBrsrSuccess); -#ifdef _DEBUG_LOG - /* dump the box tree */ - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: End box tree formatting... in CView::SetBoxTree()]"); - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); -#endif - - } - else - { - FormatPartial(); - NW_LOG0( NW_LOG_LEVEL2, "CView::FormatPartial passed" ); - -#ifdef _DEBUG_LOG - /* dump the box tree */ - NW_LOG0(NW_LOG_LEVEL3, "[LMgr: End box tree partial formatting...]"); - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); -#endif - - } // end of if ( boxTree == NULL || - /* when markupComplete, has to call partial Format again */ - if (iRootBox->renderingState == NW_LMgr_RootBox_RenderComplete) - { - NW_LMgr_RootBox_InvalidateCache(iRootBox); - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->PageLoadCompleted(); - NW_LOG0( NW_LOG_LEVEL2, "PageLoadCompleted passed" ); - } - - errOccur = EFalse; - -finish: - if (errOccur) - { - HandleError (status); - if (status != KBrsrOutOfMemory) - { - status = KBrsrUnexpectedError; - } - } - - NW_LOG0( NW_LOG_LEVEL2, "CView::SetBoxTree END" ); - - return status; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::Draw (const NW_Bool drawNow) -{ - NW_GDI_Rectangle_t oldClip; - NW_GDI_Color_t oldBgColor = NW_GDI_Color_White; - NW_GDI_Color_t bgColor = NW_GDI_Color_White; /* White is the default background */ - NW_LMgr_Property_t bodyColor; - NW_LMgr_Box_t *bodyBox = NULL; - NW_GDI_PaintMode_t oldPaintMode; - TBrowserStatusCode status = KBrsrSuccess; - - if(NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(iRootBox)) == 0) - { - UpdateScrollBars (); - return KBrsrSuccess; - } - NW_LOG0( NW_LOG_LEVEL2, "CView::Draw START" ); - - /* Get the body, if there is one */ - bodyBox = NW_LMgr_RootBox_GetBody(iRootBox); - - /* If there is a body element, does it have background-color set? */ - if (bodyBox != NULL) - { - bodyColor.type = NW_CSS_ValueType_Token; - bodyColor.value.token = NW_CSS_PropValue_transparent; - if (NW_LMgr_Box_GetProperty(bodyBox, NW_CSS_Prop_backgroundColor, &bodyColor) == KBrsrSuccess) - { - if (bodyColor.type == NW_CSS_ValueType_Color) - { - bgColor = bodyColor.value.integer; - } - } -} - - oldClip = iDeviceContext->ClipRect(); - oldBgColor = iDeviceContext->BackgroundColor(); - oldPaintMode = iDeviceContext->PaintMode(); - - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t maxBounds; - - /* Set the clip */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - iDeviceContext->SetClipRect(&viewBounds); - - /* This is our initial clip */ - maxBounds.point.x = maxBounds.point.y = 0; - maxBounds.dimension.width = 0x7fff; - maxBounds.dimension.height = 0x7fffffff; - - iDeviceContext->SetBackgroundColor(bgColor); - iDeviceContext->SetPaintMode(NW_GDI_PaintMode_Copy); - /* clear the view */ - iDeviceContext->PreDraw(); - - /* draw the box tree */ - if (iCurrentBox != NULL && - IsBoxVisible (iCurrentBox, &viewBounds)) - { - /* if the current box is visible enough(at least several pixels), - hilight it */ - status = NW_LMgr_Box_Render((NW_LMgr_Box_t*) iRootBox, - iDeviceContext, &maxBounds, - iCurrentBox, 0, NULL, NULL, iRootBox ); - } - else - { - /* otherwise dehilight it */ - status = NW_LMgr_Box_Render((NW_LMgr_Box_t*) iRootBox, - iDeviceContext, &maxBounds, - NULL, 0, NULL, NULL, iRootBox ); - } - if (status == KBrsrOutOfMemory) - { - goto finish; - } - status = DrawPositionedBoxes(); - if (status != KBrsrSuccess) - { - goto finish; - } - /* update the scroll bars */ - status = UpdateScrollBars (); - - /* invalidate the view */ - iDeviceContext->PostDraw (drawNow); - -finish: - iDeviceContext->SetClipRect(&oldClip); - iDeviceContext->SetBackgroundColor(oldBgColor); - iDeviceContext->SetPaintMode(oldPaintMode); - - NW_LOG0( NW_LOG_LEVEL2, "CView::Draw passed" ); - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -NW_Bool -CView::DispatchEvent (const NW_Evt_Event_t* event) -{ - NW_LMgr_Box_t* box = NULL; - NW_GDI_Rectangle_t viewBounds; - - // Parameter assertion block - NW_ASSERT (event != NULL); - - // Initialize the viewBounds - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - // Starting at our current box, we must traverse the box hierarchy looking - // for a box implementing the NW_LMgr_IEventListener interface that is - // willing to absorb the event - for (box = iCurrentBox; box != NULL; box = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(box)) - { - NW_LMgr_IEventListener_t* eventListener; - - // Before we dispatch the activateEvent, do a few checks - if (NW_Object_IsInstanceOf(event, &NW_Evt_ActivateEvent_Class)) - { - // If the current box is not visible, then we do not dispatch - // the activate event and simply return false. This is a good - // behaviour for small devices which do not have Tab and Enter keys. - if (!IsBoxVisible(box, &viewBounds)) - { - return NW_FALSE; - } - - } - - if (NW_Object_IsInstanceOf(event, &NW_Evt_ActivateEvent_Class) || - NW_Object_IsInstanceOf(event, &NW_Evt_UnicodeKeyEvent_Class)) - { - // If the current box is an InputBox and capabilities is set to - // ECapabilityDisableInputAndPlugins, then do not dispatch the - // event and simply return false - if (NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class) && - (iBrCtl->capabilities() & TBrCtlDefs::ECapabilityDisableInputAndPlugins)) - { - return NW_FALSE; - } - } - - - // If the box implements IEventListener, allow it to process the event - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class)); - if (eventListener != NULL) - { - // The activate event is not forwarded to form boxes if a context switch - // is in progress. This prevents the form from launching auxiliary - // dialogs during a context switch. - if (NW_Object_IsInstanceOf (event, &NW_Evt_ActivateEvent_Class) && - NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class)) - { - NW_HED_DocumentRoot_t* docRoot = NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_BoxOf(box)); - NW_ASSERT(docRoot != NULL); - if (NW_HED_DocumentRoot_IsContextSwitchPending(docRoot)) - { - return NW_FALSE; - } - } - if (NW_LMgr_IEventListener_ProcessEvent (eventListener, event)) - { - return NW_TRUE; - } - } - } // end of for (box = iCurrent... - - // The event was not absorbed by the boxTree - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -// this function comes from old View.cpp -NW_Bool -CView::EpocProcessEvent (const NW_Evt_Event_t* event) -{ - NW_LMgr_ContainerBox_t* containerRootBox = NULL; - - // parameter assertion block - NW_ASSERT (event != NULL); - - // * TODO: if the event received causes focus to leave an input box, send - // * a de-activate event to that input box before propagating the original - // * event - // * - containerRootBox = NW_LMgr_ContainerBoxOf(iRootBox); - - if(NW_LMgr_ContainerBox_GetChildCount(containerRootBox) == 0) - { - return NW_FALSE; - } - - // first try to pawn the event off on the boxTree - if (DispatchEvent (event)) - { - return NW_TRUE; - } - - if (NW_Object_Core_GetClass (event) == &NW_Evt_TabEvent_Class) - { - return ProcessTabEvent (NW_Evt_TabEventOf (event)); - } - else if (NW_Object_Core_GetClass (event) == &NW_Evt_ScrollEvent_Class) - { - return ProcessScrollEvent (NW_Evt_ScrollEventOf (event)); - } - - // we didn't absorb the event - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::CreateTabIndexList () -{ - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box; - - // we do this only for WML or the first chunk - if (iOptionItemList != NULL) - { - DeleteOptionItems (); - } - - /* initialize the boxVisitor */ - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf (iRootBox)); - // start the boxVistor at the last formatted box of the previous chunk - - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - NW_LMgr_IEventListener_t* eventListener; - - // we are only looking for boxes implementing the NW_LMgr_IEventListener interface - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (box, - &NW_LMgr_IEventListener_Class)); - - if (!eventListener) - { - continue; - } - AppendTabItem (box); - } - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -NW_Bool -CView::ScrollAfterCurrentBox (const NW_LMgr_Box_t* box, - NW_Bool scrollMaxAmt) - { - NW_Int32 scrollDelta = 0; - NW_Bool scrolled = NW_FALSE; - NW_Evt_ScrollEvent_t scrollEvent; - NW_Evt_ScrollEvent_Direction_t scrollDir; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - - if (GetXScrollAmt (box, &scrollDelta, &scrollDir, scrollMaxAmt)) - { - if (scrollDelta > 0) - { - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - scrollDir, - (NW_Uint16)scrollDelta); - scrolled = ProcessEvent (NW_Evt_EventOf(&scrollEvent)); - } - } - - if (GetYScrollAmt (box, &scrollDelta, &scrollDir, scrollMaxAmt)) - { - if (scrollDelta > 0) - { - NW_Evt_ScrollEvent_Initialize (&scrollEvent, - scrollDir, - (NW_Uint16)scrollDelta); - scrolled = ProcessScrollEvent (NW_Evt_ScrollEventOf (&scrollEvent)); - } - } - - return scrolled; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::JumpToLink (const NW_LMgr_Box_t* box, - NW_Bool scrollMaxAmt) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool aboveVisible = NW_TRUE; - NW_Bool aboveCurrent = NW_TRUE; - NW_GDI_Rectangle_t boxBounds; - NW_GDI_Rectangle_t activeBoxBounds; - NW_LMgr_Box_t* prevBox = NULL; - NW_LMgr_Box_t* activeBox = NULL; - NW_GDI_Rectangle_t viewBounds; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_Int32 scrollDelta = 0; - NW_Evt_ScrollEvent_t scrollEvent; - NW_Evt_ScrollEvent_Direction_t scrollDir; - - // parameter assertion block - NW_ASSERT (box != NULL); - NW_ASSERT (iRootBox != NULL); - - // Handle intra-page hyperlink. - // If the target box is within the view, don't scroll. - // Otherwise, scroll the target box to the top of the view. - if (GetXScrollAmt (box, &scrollDelta, &scrollDir, scrollMaxAmt)) - { - if (scrollDelta > 0) - { - status = NW_Evt_ScrollEvent_Initialize (&scrollEvent, - scrollDir, - (NW_Uint16)scrollDelta); - if (status != KBrsrSuccess) - { - return status; - } - - (void) ProcessEvent ( NW_Evt_EventOf(&scrollEvent) ); - } - } - - if (GetYScrollAmt (box, &scrollDelta, &scrollDir, scrollMaxAmt)) - { - if (scrollDelta > 0) - { - status = NW_Evt_ScrollEvent_Initialize (&scrollEvent, - scrollDir, - (NW_Uint16)scrollDelta); - if (status != KBrsrSuccess) - { - return status; - } - (void) ProcessEvent ( NW_Evt_EventOf(&scrollEvent) ); - } - } - - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, (NW_LMgr_Box_t*) iRootBox); - - // initialize the viewBounds - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - // Find the most appropriate active box in the new view - // so it can become the new currentBox. - - // If the target box is active, it's automatically the best choice. - if (NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class) != NULL) - { - activeBox = (NW_LMgr_Box_t*) box; - } - else - { - // If the target box is further down than the current box, - // the current box is the initial candidate. - if (scrollDir == NW_Evt_ScrollEvent_Direction_Down) - { - // If we jumped here from another page, it's possible that - // currentBox isn't set. If that's the case, start from the target box. - if (iCurrentBox == NULL) - { - boxBounds = GetBoxDisplayBounds(NW_LMgr_BoxOf(box)); - } - else - { - boxBounds = GetBoxDisplayBounds(iCurrentBox); - } - - do - { - activeBox = GetNextEventListener (&boxVisitor); - - if (!activeBox) - { - return KBrsrNotFound; - } - - activeBoxBounds = GetBoxDisplayBounds(activeBox); - - if (activeBoxBounds.point.y >= boxBounds.point.y) - { - aboveCurrent = NW_FALSE; - } - } - while (aboveCurrent || activeBoxBounds.point.x < boxBounds.point.x); - } - // If the target box is further up than the current box, - // the first box on the page is the initial candidate. - else - { - activeBox = GetNextEventListener (&boxVisitor); - if (!activeBox) - { - return KBrsrNotFound; - } - } - - prevBox = activeBox; - - NW_ASSERT (activeBox != NULL); - - boxBounds = GetBoxDisplayBounds(NW_LMgr_BoxOf(box)); - - - // Starting with the initial candidate, - // find the first active box in the new view. - do - { - activeBoxBounds = GetBoxDisplayBounds(activeBox); - - if (activeBoxBounds.point.y > boxBounds.point.y) - { - aboveVisible = NW_FALSE; - } - - // Keep track of the last active box before the visible area. - // The focus will move there in the case where - // there's no active box in the new view itself. - if (aboveVisible || (prevBox == NULL)) - { - prevBox = activeBox; - } - - if (NW_LMgr_Box_GetVisibleBounds(activeBox, NULL) && - IsBoxVisible (activeBox, &viewBounds)) - { - break; - } - - activeBox = GetNextEventListener (&boxVisitor); - } - while (activeBox); - } - - if (!activeBox) - { - activeBox = prevBox; - } - - // If we jumped here from another page, sometimes currentBox isn't set. - // It's possible that the active box isn't highlighted. - // Make sure it gets highlighted. - if (iCurrentBox == NULL) - { - iCurrentBox = activeBox; - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(iCurrentBox), NW_TRUE); - status = NW_LMgr_Box_Refresh(activeBox); - if (status != KBrsrSuccess) - { - return status; - } - } - else - { - if (iCurrentBox != activeBox) - { - prevBox = iCurrentBox; - iCurrentBox = activeBox; - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(iCurrentBox), NW_TRUE); - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(prevBox), NW_FALSE); - status = NW_LMgr_Box_Refresh(prevBox); - if (status != KBrsrSuccess) - { - return status; - } - } - } - - return status; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode CView::SetAnchorName (NW_Text_t *anchorName) - { - - if (anchorName == NULL) - return KBrsrFailure; - - TBool state = ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->GetFormattingComplete(); - - if (!state) - { - if (iAnchorName != NULL) - { - NW_Object_Delete(iAnchorName); - iAnchorName = NULL; - - } - - iAnchorName = NW_Text_New( HTTP_iso_10646_ucs_2, anchorName->storage, - anchorName->characterCount, NW_Text_Flags_Copy ); - - if (!iAnchorName) - { - return KBrsrOutOfMemory; - } - } - - else - { - - TBrowserStatusCode status; - NW_LMgr_Box_t* targetBox = NULL; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Property_t prop; - - - /* find the named box */ - - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, (NW_LMgr_Box_t *)iRootBox); - (void) NW_LMgr_BoxVisitor_SetCurrentBox (&boxVisitor, (NW_LMgr_Box_t *)iRootBox); - - - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_boxName, &prop); - - if ((status == KBrsrSuccess) && (prop.type == NW_CSS_ValueType_Text)) - { - if (!NW_Text_Compare (anchorName, prop.value.object)) - { - targetBox = box; - break; - } - } - } - - if (targetBox != NULL) - { - (void) JumpToLink (box, NW_FALSE); - } - - } - - return KBrsrSuccess; - } - -void CView::ContentSize(TSize& aContentSize) - { - if (iRootBox) - { - aContentSize.iWidth = iRootBox->extents.dimension.width; - aContentSize.iHeight = iRootBox->extents.dimension.height; - } - } - - -NW_Bool -CView::IsBoxVisible (const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds) const - { - NW_GDI_Rectangle_t boxBounds; - NW_GDI_Rectangle_t overlap; - const NW_LMgr_Box_t* siblingBox; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - - siblingBox = box; - /* go through sibling chain to see if any of them visible */ - do - { - CView* view = const_cast<CView*>(this); - boxBounds = view->GetBoxDisplayBounds((NW_LMgr_Box_t*)siblingBox); - - /* below check handles the case where the box is at least has sHVisibleAmt and sVVisibleAmt - * inside the display bounds - */ - if (NW_GDI_Rectangle_Cross(&boxBounds, bounds, &overlap)) - { - if ((overlap.dimension.width >= iVisibleAmt.width) && - (overlap.dimension.height >= iVisibleAmt.height)) - { - return NW_TRUE; - } - // the overlap width and height are less than the visible amount - // in some cases the box might be smaller than the visible amount - // then we want to check that if the overlap dimension and width - // are same as the overlap - else if ((overlap.dimension.width == boxBounds.dimension.width) && - (overlap.dimension.height == boxBounds.dimension.height)) - { - return NW_TRUE; - } - } - - siblingBox = view->GetNextSiblingBox (siblingBox); - - } - while (siblingBox != NULL && siblingBox != box); - - return NW_FALSE; - } - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -CView::GetInFocusBox () const - { - NW_GDI_Rectangle_t viewBounds; - - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - if (iCurrentBox != NULL && - IsBoxVisible (iCurrentBox, &viewBounds)) - { - return iCurrentBox; - } - else - { - return NULL; - } - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::ForceCurrentBox (NW_LMgr_Box_t* newBox, - NW_Bool isNewPage, - NW_Bool isRefreshNeeded ) - { - NW_Evt_FocusEvent_t focusEvent; - NW_LMgr_Box_t *prevBox = NULL; - NW_LMgr_Box_t *tempBox = NULL; - NW_Uint8 absorbed = !NW_LMgr_EventAbsorbed; - NW_LMgr_Property_t prop, propNew; - NW_LMgr_PropertyList_t *propList, *masterPropList; - TBrowserStatusCode status = KBrsrSuccess; - if (iCurrentBox != newBox) - { - if ( isNewPage ) - { - iCurrentBox = newBox; - return status; - } - - if (iCurrentBox != NULL) - { - NW_Evt_FocusEvent_Initialize(&focusEvent, NW_FALSE); - absorbed = ProcessEvent ( NW_Evt_EventOf(&focusEvent) ); - if (absorbed) - { - prevBox = iCurrentBox; - iCurrentBox = newBox; - // do not refresh unless it is needed - if ( isRefreshNeeded ) - { - // the following code deals with split and non-split boxes - propList = NULL; - prop.value.object = NULL; - masterPropList = NW_LMgr_Box_PropListGet( prevBox ); - - // first check if we are on a master or a slave box - if ( NW_Object_IsInstanceOf( masterPropList, &NW_LMgr_SlavePropertyList_Class ) ) - { - // this is a slave, get the master's property list - tempBox = NW_LMgr_SlavePropertyList_GetMasterBox( masterPropList ); - (void)NW_LMgr_Box_GetProperty( tempBox, NW_CSS_Prop_sibling, &prop ); - - // refresh master: dehighlight it - status = NW_LMgr_Box_Refresh(tempBox); - if (status != KBrsrSuccess) - { - return status; - } - } - else - { - (void)NW_LMgr_Box_GetProperty( prevBox, NW_CSS_Prop_sibling, &prop ); - // refresh the non-split box: dehighlight it - status = NW_LMgr_Box_Refresh(prevBox); - if (status != KBrsrSuccess) - { - return status; - } - } - - // get the next to the master box - if ( prop.value.object != NULL ) - { - tempBox = NW_LMgr_BoxOf( prop.value.object ); - if ( tempBox != NULL ) - { - // this must be a slave property list - propList = NW_LMgr_Box_PropListGet( tempBox ); - } - } - // split case - if ( propList ) - { - // at this point tempbox holds the box next to the master, let's go through the chain - do - { - // refresh slave box: dehighlight it - status = NW_LMgr_Box_Refresh(tempBox); - if (status != KBrsrSuccess) - { - return status; - } - // get the next box - tempBox = NW_LMgr_SlavePropertyList_GetSiblingBox( propList ); - propList = NW_LMgr_Box_PropListGet( tempBox ); - // NW_LMgr_SimplePropertyList_Class means that we are on the master box again. - } - while (!NW_Object_IsClass ( propList, &NW_LMgr_SimplePropertyList_Class ) ); - } - } // End of: the following code deals with split and non-split boxes - } - else - { - return KBrsrFailure; - } - } // End of: if(iCurrentBox != NULL) - - if (newBox != NULL) - { - iCurrentBox = newBox; - - NW_Evt_FocusEvent_Initialize(&focusEvent, NW_TRUE); - (void) ProcessEvent ( NW_Evt_EventOf(&focusEvent) ); - - // After changing the focus if iCurrentBox has changed - // set that as the newBox - if(newBox != iCurrentBox) - { - newBox = iCurrentBox; - } - - // do not refresh unless it is needed - if ( isRefreshNeeded ) - { - // the following code deals with split and non-split boxes - propList = NULL; - propNew.value.object = NULL; - masterPropList = NW_LMgr_Box_PropListGet( iCurrentBox ); - // first check if we are on a master or a slave box - if ( NW_Object_IsInstanceOf( masterPropList, &NW_LMgr_SlavePropertyList_Class ) ) - { - // this is a slave, get the master's property list - tempBox = NW_LMgr_SlavePropertyList_GetMasterBox( masterPropList ); - (void)NW_LMgr_Box_GetProperty( tempBox, NW_CSS_Prop_sibling, &propNew ); - // refresh the master: highlight it. Has to set it to be the currentBox. - iCurrentBox = tempBox; - status = NW_LMgr_Box_Refresh(tempBox); - if (status != KBrsrSuccess) - { - return status; - } - } - else - { - (void)NW_LMgr_Box_GetProperty( iCurrentBox, NW_CSS_Prop_sibling, &propNew ); - // refresh the non-split box: highlight it - status = NW_LMgr_Box_Refresh(iCurrentBox); - if (status != KBrsrSuccess) - { - return status; - } - } - - // get the next to the master box - if ( propNew.value.object != NULL ) - { - tempBox = NW_LMgr_BoxOf( propNew.value.object ); - if ( tempBox != NULL ) - { - // this must be a slave property list - propList = NW_LMgr_Box_PropListGet( tempBox ); - } - } - // split case - if ( propList ) - { - // at this point tempbox holds the box next to the master, let's go through the chain - do - { - // refresh slave box: highlight it. Has to set it to be the currentBox. - iCurrentBox = tempBox; - status = NW_LMgr_Box_Refresh(tempBox); - if (status != KBrsrSuccess) - { - return status; - } - // get the next box - tempBox = NW_LMgr_SlavePropertyList_GetSiblingBox( propList ); - propList = NW_LMgr_Box_PropListGet( tempBox ); - // NW_LMgr_SimplePropertyList_Class means that we are on the master box again. - } - while ( propList != NULL && !NW_Object_IsClass ( propList, &NW_LMgr_SimplePropertyList_Class ) ); - } - } - // set currentBox back to be newBox - iCurrentBox = newBox; - } // End of: if (newBox != NULL) - } // End of: if(iCurrentBox != newBox) - - return status; - } - -// ----------------------------------------------------------------------------- -void* -CView::GetScroll () const - { - if (iScroll != NULL) - { - return iScroll; - } - else - { - return NULL; - } - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SetListener (MViewListener* viewListener) - { - /* install the view listener */ - TInt status = iListeners.Append( viewListener ); - return status == KErrNone ? KBrsrSuccess : KBrsrFailure; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::SetDeviceContext (CGDIDeviceContext* deviceContext) - { - NW_GDI_Rectangle_t displayBounds; - NW_LMgr_Box_t* rootBox = NULL; - - /* parameter assertion block */ - NW_ASSERT (deviceContext != NULL) ; - - - iDeviceContext = deviceContext; - displayBounds = *(iDeviceContext->DisplayBounds()); - - rootBox = NW_LMgr_BoxOf (iRootBox); - - (void) NW_Mem_memset (&displayBounds.point, 0, sizeof (displayBounds.dimension)); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( rootBox ), displayBounds); - return KBrsrSuccess; - } - - -// ----------------------------------------------------------------------------- -NW_Bool -CView::GetXScrollAmt (const NW_LMgr_Box_t* box, - NW_Int32* scrollDelta, - NW_Evt_ScrollEvent_Direction_t* scrollDir, - NW_Bool scrollMaxAmt) const - { - NW_GDI_Rectangle_t boxBounds; - NW_GDI_Rectangle_t viewBounds; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - *scrollDelta = 0; - *scrollDir = NW_Evt_ScrollEvent_Direction_Left; - - if (!NW_LMgr_Box_GetVisibleBounds(box, &boxBounds)) - { - return NW_FALSE; - } - - if ((boxBounds.point.x + boxBounds.dimension.width) >= - (viewBounds.point.x + viewBounds.dimension.width)) - { - - *scrollDelta = (boxBounds.point.x + boxBounds.dimension.width) - - (viewBounds.dimension.width + viewBounds.point.x) + 1; - - if (boxBounds.dimension.width >= viewBounds.dimension.width) - *scrollDelta = boxBounds.point.x - viewBounds.point.x + 1; - - *scrollDir = NW_Evt_ScrollEvent_Direction_Right; - } - - if (boxBounds.point.x < viewBounds.point.x) - { - *scrollDelta = viewBounds.point.x - boxBounds.point.x + 1; - *scrollDir = NW_Evt_ScrollEvent_Direction_Left; - } - - if (*scrollDelta > 0) - { - /* Scroll amount may not exceed specified maximum. - * If we are jumping to the target box (hyperlink) there is no limit. - */ - if ((scrollMaxAmt) && (iMaxScrollAmt.width != 0) && - ( *scrollDelta > iMaxScrollAmt.width)) - { - *scrollDelta = iMaxScrollAmt.width; - } - return NW_TRUE; - } - - return NW_FALSE; - } - - -// ----------------------------------------------------------------------------- -NW_Bool -CView::GetYScrollAmt (const NW_LMgr_Box_t* box, - NW_Int32* scrollDelta, - NW_Evt_ScrollEvent_Direction_t* scrollDir, - NW_Bool scrollMaxAmt) const - { - NW_GDI_Rectangle_t boxBounds; - NW_GDI_Rectangle_t viewBounds; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - CView* view = const_cast<CView*>(this); - boxBounds = view->GetBoxDisplayBounds(NW_LMgr_BoxOf(box)); - - *scrollDelta = 0; - *scrollDir = NW_Evt_ScrollEvent_Direction_Down; - - /* Scroll down calculations for scrolling to target box */ - if (scrollMaxAmt) - { - if ((boxBounds.point.y + boxBounds.dimension.height) > - (viewBounds.point.y + viewBounds.dimension.height)) - { - - *scrollDelta = (boxBounds.point.y + boxBounds.dimension.height) - - (viewBounds.point.y + viewBounds.dimension.height) + 1; - if (boxBounds.dimension.height >= viewBounds.dimension.height) - { - *scrollDelta = boxBounds.point.y - viewBounds.point.y + 1; - } - *scrollDir = NW_Evt_ScrollEvent_Direction_Down; - } - } - /* Jump to target box (hyperlink). If target box is not in the current view, - * calculate scroll amount that will bring it to the top of the new view. - */ - else - { - *scrollDelta = boxBounds.point.y - viewBounds.point.y; - } - - /* Scroll up calculations same for scrolling or hyperlink. */ - if (boxBounds.point.y <= viewBounds.point.y) - { - *scrollDelta = viewBounds.point.y - boxBounds.point.y + 1; - *scrollDir = NW_Evt_ScrollEvent_Direction_Up; - } - - if (*scrollDelta > 0) - { - /* Scroll amount may not exceed specified maximum. - * If we are jumping to the target box (hyperlink) there is no limit. - */ - if ((scrollMaxAmt) && (iMaxScrollAmt.height != 0) && - ( *scrollDelta > iMaxScrollAmt.height)) - { - *scrollDelta = iMaxScrollAmt.height; - } - return NW_TRUE; - } - return NW_FALSE; - } - -// ----------------------------------------------------------------------------- -NW_Bool -CView::ProcessAccessKey (const NW_Evt_KeyEvent_t* event) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t numTabItems; - //lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - NW_ADT_Vector_Metric_t index; - NW_Uint32 keyVal; - - // according to the xhtml i-mode UI spec, neither # nor * - // should be accepted as access key in small screen mode - if ( NW_Object_IsInstanceOf(event, &NW_Evt_UnicodeKeyEvent_Class) ) - { - keyVal = (NW_Uint32)NW_Evt_UnicodeKeyEvent_GetKeyVal(event); - } - else - { - keyVal = (NW_Uint32)NW_Evt_ControlKeyEvent_GetKeyVal(event); - } - // so do not absorb the event unless we are in normal mode - if ( NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) && - ( keyVal == '#' || keyVal == '*' ) ) - { - return NW_FALSE; - } - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(iRootBox)) == 0) - { - return NW_FALSE; - } - - numTabItems = NW_ADT_Vector_GetSize(iTabList); - - for (index = 0; index < numTabItems; index++) - { - NW_LMgr_Box_t* box; - NW_LMgr_Property_t prop; - NW_LMgr_AccessKey_t* ak; - NW_Evt_AccessKeyEvent_t accessKeyEvent; - NW_Bool isControlKey; - NW_Bool eventAbsorbed = NW_TRUE; - NW_LMgr_IEventListener_t* eventListener; - - box = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (iTabList, index); - - // We need to process access keys differently for image map boxes, since the - // access keys apply to the area tags within the image map box - if (NW_Object_IsClass(box, &NW_LMgr_ImageMapBox_Class)) - { - NW_ADT_DynamicVector_t* areaBoxArray = NW_LMgr_ImageMapBox_GetAreaBoxList((NW_LMgr_ImageMapBox_t*) box); - - if (areaBoxArray) - { - NW_ADT_Vector_Metric_t elementSize = NW_ADT_Vector_GetSize(areaBoxArray); - - NW_LMgr_AreaBox_t* areaBox = NULL; - - for (NW_ADT_Vector_Metric_t arrayIndex = 0; arrayIndex < elementSize; arrayIndex++) - { - areaBox = *(NW_LMgr_AreaBox_t**)NW_ADT_Vector_ElementAt (areaBoxArray, arrayIndex); - - status = NW_LMgr_Box_GetPropertyFromList((NW_LMgr_Box_t*)areaBox, NW_CSS_Prop_accesskey, &prop); - - if (status == KBrsrSuccess) - { - ak = NW_LMgr_AccessKeyOf(prop.value.object); - - if (NW_Object_IsInstanceOf(event, &NW_Evt_UnicodeKeyEvent_Class)) - { - isControlKey = NW_FALSE; - keyVal = (NW_Uint32)NW_Evt_UnicodeKeyEvent_GetKeyVal(event); - } - else - { - isControlKey = NW_TRUE; - keyVal = (NW_Uint32)NW_Evt_ControlKeyEvent_GetKeyVal(event); - } - - if (NW_LMgr_AccessKey_MatchKey(ak, keyVal, isControlKey)) - { - // Note that we are jumping to the ImageMapBox - (void) JumpToLink (box, NW_TRUE); - NW_Evt_AccessKeyEvent_Initialize(&accessKeyEvent); - - eventAbsorbed = NW_FALSE; - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (areaBox, &NW_LMgr_IEventListener_Class)); - if (eventListener != NULL) - { - eventAbsorbed = - NW_LMgr_IEventListener_ProcessEvent (eventListener, &accessKeyEvent); - } - } - } - } - } - } - else - { - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_accesskey, &prop); - if (status != KBrsrSuccess) - { - continue; - } - - ak = NW_LMgr_AccessKeyOf(prop.value.object); - - if (NW_Object_IsInstanceOf(event, &NW_Evt_UnicodeKeyEvent_Class)) - { - isControlKey = NW_FALSE; - keyVal = (NW_Uint32) - NW_Evt_UnicodeKeyEvent_GetKeyVal(event); - } - else - { - isControlKey = NW_TRUE; - keyVal = (NW_Uint32) - NW_Evt_ControlKeyEvent_GetKeyVal(event); - } - - if (!NW_LMgr_AccessKey_MatchKey(ak, keyVal, isControlKey)) - { - continue; - } - - (void) JumpToLink (box, NW_TRUE); - NW_Evt_AccessKeyEvent_Initialize(&accessKeyEvent); - - eventAbsorbed = NW_FALSE; - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class)); - if (eventListener != NULL) - { - // The AccessKey event is not forwarded to form boxes if a context switch - // is in progress. This prevents the form from launching auxiliary - // dialogs during a context switch. - if (NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class)) - { - NW_HED_DocumentRoot_t* docRoot = NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_BoxOf(box)); - NW_ASSERT(docRoot != NULL); - if (NW_HED_DocumentRoot_IsContextSwitchPending(docRoot)) - { - return NW_FALSE; - } - } - eventAbsorbed = - NW_LMgr_IEventListener_ProcessEvent (eventListener, &accessKeyEvent); - } - } - - if (eventAbsorbed) - { - (void) Draw (NW_TRUE); - } - return eventAbsorbed; - } - - return NW_FALSE; - } -// ----------------------------------------------------------------------------- -NW_Bool -CView::HandleGNavigation (NW_Uint32 tabIndex) - { - NW_LMgr_Box_t* box = NULL; - NW_Evt_AccessKeyEvent_t accessKeyEvent; - NW_Bool eventAbsorbed; - NW_LMgr_IEventListener_t* eventListener; - - if ( (NW_ADT_Vector_Metric_t) tabIndex >= - NW_ADT_Vector_GetSize(iTabList)) - { - return NW_FALSE; - } - - box = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (iTabList, - (NW_ADT_Vector_Metric_t) tabIndex); - if (box == NULL) - { - return NW_FALSE; - } - (void) ForceCurrentBox (box, NW_FALSE /* not new page */, NW_TRUE); - NW_Evt_AccessKeyEvent_Initialize(&accessKeyEvent); - - eventAbsorbed = NW_FALSE; - eventListener = static_cast<NW_LMgr_IEventListener_t*>(NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class)); - if (eventListener != NULL) - { - eventAbsorbed = - NW_LMgr_IEventListener_ProcessEvent (eventListener, &accessKeyEvent); - } - - if (eventAbsorbed) - { - (void) Draw (NW_TRUE); - } - - return eventAbsorbed; - } - -// ----------------------------------------------------------------------------- -void -CView::HandleError (TBrowserStatusCode status) - { - for( TInt n=0; n<iListeners.Count(); n++ ) - { - iListeners[n]->HandleError (status); - } - } - - -/* ------------------------------------------------------------------------- * - IBoxTreeListener implementation - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -void -CView::BoxTreeDestroyed () - { - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->ClearFormattingContext(); - - iCurrentBox = NULL; - NW_LMgr_RootBox_SetBody(iRootBox, NULL); - (void) NW_ADT_DynamicVector_Clear(iTabList); - iCreateTabList = NW_TRUE; - (void) NW_ADT_DynamicVector_Clear(iRootBox->iOutOfViewListeners); - iRootBox->iYScrollChange = 0; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::BoxTreeListenerAppendTabItem (NW_LMgr_Box_t* box) - { - TBrowserStatusCode status = KBrsrSuccess; - - if (iCreateTabList ) - { - status = AppendTabItem (box); - } - - return status; - } - -// ----------------------------------------------------------------------------- -void -CView::FormattingComplete () - { - - TRAP_IGNORE( iPageScaler->DocumentChangedL() ); - iDocumentFinished = ETrue; - iPageScaler->DocumentCompleted(); - - // we need to handle the return status here - if ( !((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->BackgroundFormat() ) - { - (void) HandleFormattingComplete (); - NW_LMgr_RootBox_ExtendsCalculationNeeded( iRootBox ); - (void) NW_LMgr_Box_UpdateContainerBodyBox (iRootBox ); - } - else - { - // end of background format. - // Clear the rendering cache - NW_LMgr_RootBox_InvalidateCache( iRootBox ); - - // Clear the float context vectors - (void) NW_ADT_DynamicVector_Clear(iRootBox->placedFloats); - (void) NW_ADT_DynamicVector_Clear(iRootBox->pendingFloats); - - // We'll have to recalculate the extents - NW_Mem_memset(&(iRootBox->extents), 0, sizeof(NW_GDI_Rectangle_t)); - NW_Mem_memset(&(iRootBox->scrollRange), 0, sizeof(NW_GDI_Rectangle_t)); - NW_LMgr_RootBox_ExtendsCalculationNeeded( iRootBox ); - NW_LMgr_RootBox_SetBody( iRootBox, NULL ); - } - -#ifdef __WINS__ - #ifdef _DEBUG - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); -#endif - #endif - - } - -// ----------------------------------------------------------------------------- -void -CView::StartCSSApply () - { - // cancel outstanding format and clear the tablist - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - - // clear tablist - (void) NW_ADT_DynamicVector_Clear( iTabList ); - iCreateTabList = NW_TRUE; - // css might delete current box - iCurrentBox = NULL; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::Relayout(NW_Bool createTabList) - { - TBrowserStatusCode status = KBrsrSuccess; - - status = Collapse( NULL, NW_FALSE ); - if (status != KBrsrSuccess) - { - return status; - } - - status = FormatBoxTree( createTabList ); - - return status; - } - - -// ----------------------------------------------------------------------------- -NW_ADT_Vector_Metric_t -CView::GetActiveBoxId() - { - //lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - NW_ADT_Vector_Metric_t index = 0; - NW_Uint16 size = 0; - - if (iCurrentBox == NULL) - { - return 0; - } - size = NW_ADT_Vector_GetSize(iTabList); - - for (index = 0; index < size; index++) - { - NW_LMgr_Box_t* box = NULL; - - box = (NW_LMgr_Box_t*) * NW_ADT_Vector_ElementAt(iTabList, index); - if ((box) && (iCurrentBox == box)) - return index; - } - return 0; - } - -NW_LMgr_Box_t* -CView::GetVisibleBox () const - { - NW_ADT_Vector_Metric_t i, size; - NW_LMgr_Box_t* box; - NW_GDI_Rectangle_t viewBounds; - - size = NW_ADT_Vector_GetSize(iTabList); - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - for (i = 0; i < size; i++) - { - box = (NW_LMgr_Box_t*) * NW_ADT_Vector_ElementAt(iTabList, - (NW_ADT_Vector_Metric_t)i); - if ( (IsBoxVisible(box, &viewBounds)) && !(IsZeroBox(box)) ) - return box; - } - return NULL; - } - -NW_LMgr_Box_t* -CView::GetVisibleBoxReverse () const - { - TInt i, size; - NW_LMgr_Box_t* box; - NW_GDI_Rectangle_t viewBounds; - - size = NW_ADT_Vector_GetSize(iTabList); - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - for (i = size - 1; i >= 0 ; i--) - { - box = (NW_LMgr_Box_t*) * NW_ADT_Vector_ElementAt(iTabList, - (NW_ADT_Vector_Metric_t)i); - if ( (IsBoxVisible(box, &viewBounds)) && !(IsZeroBox(box)) ) - return box; - } - return NULL; - } - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -CView::GetLastVisibleBox () const - { - NW_ADT_Vector_Metric_t i, size; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* tmpBox; - NW_GDI_Rectangle_t viewBounds; - - size = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(iTabList)); - /* initialize the viewBounds */ - viewBounds = *(iDeviceContext->DisplayBounds()); - viewBounds.point = *(iDeviceContext->Origin()); - - for (i = 0; i < size; i++) - { - tmpBox = (NW_LMgr_Box_t*) * NW_ADT_Vector_ElementAt(iTabList, - (NW_ADT_Vector_Metric_t)i); - if (IsBoxVisible (tmpBox, &viewBounds)) - { - box = tmpBox; - } - } - return box; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::GotoActiveBox(NW_ADT_Vector_Metric_t activeBoxId) - { - NW_LMgr_Box_t* box = NULL; - TBool noBoxVisible = EFalse; - - void ** element; - CMVCScroll* scroll = static_cast<CMVCScroll*>(iScroll); - - iCurrentBox = NULL; - if ((activeBoxId == 0) || (activeBoxId >= NW_ADT_Vector_GetSize(iTabList))) - { - scroll->TabForward(NW_TRUE /* new page */, &noBoxVisible); - } - else - { - element = NW_ADT_Vector_ElementAt(iTabList, activeBoxId); - if (element != NULL) - { - box = (NW_LMgr_Box_t*) * element; - /* if necessary, scroll the box into the view */ - (void) JumpToLink (box, NW_TRUE); - } - else - { - scroll->TabForward(NW_TRUE /* new page */, &noBoxVisible); - } - } - - if (noBoxVisible) - { - /* first box is not visible. try to get one*/ - box = GetVisibleBox (); - if (box != NULL) - { - (void) ForceCurrentBox (box, NW_TRUE, NW_TRUE ); - } - } - - return Draw (NW_TRUE); - } - - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::GotoBox(NW_LMgr_Box_t* aBox) - { - TBrowserStatusCode status = KBrsrNotFound; - if (aBox != NULL) - { - NW_Bool found = NW_FALSE; - NW_LMgr_Box_t* box = NULL; - //lint --e{578} (Warning -- Declaration of symbol 'index' hides symbol 'index(const char *, int)' (line 75, file Q:\EPOC32\INCLUDE\LIBC\string.h)) - NW_ADT_Vector_Metric_t index ; - NW_ADT_Vector_t* tabListVector = NW_ADT_VectorOf( iTabList ); - NW_Uint16 size = NW_ADT_Vector_GetSize( tabListVector ); - for ( index = 0; index < size; index++ ) - { - box = (NW_LMgr_Box_t*) * NW_ADT_Vector_ElementAt( tabListVector, index ); - - if ( aBox == box ) - { - found = NW_TRUE; - break; - } - } - if (found) - { - status = KBrsrSuccess; - (void) GotoActiveBox (index); - } - } - - return status; - } - -// this function comes from old View.cpp -TBrowserStatusCode -CView::SwitchVerticalLayout (NW_Bool aFormatBoxTree, - NW_Bool aSwitchBox) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box = NULL; - NW_GDI_Point2D_t origin; - - // cancel any existing formatting - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - - origin.x = 0; - origin.y = 0; - iDeviceContext->SetOrigin (&origin); - - // if the box is an image map box, then we want to highlight the first area box when - // we switch layout modes - box = GetCurrentBox (); - if (box) - { - if (NW_Object_IsClass(box, &NW_LMgr_ImageMapBox_Class)) - { - NW_ADT_DynamicVector_t* areaBoxList = NW_LMgr_ImageMapBox_GetAreaBoxList (NW_LMgr_ImageMapBoxOf(box)); - - if (areaBoxList) - { - NW_ADT_Vector_Metric_t elementSize = NW_ADT_Vector_GetSize(areaBoxList); - - if ( elementSize > 0 ) - { - NW_LMgr_AreaBox_t* areaBox = *(NW_LMgr_AreaBox_t**) - NW_ADT_Vector_ElementAt (areaBoxList, 0); - - if (areaBox) - { - // not set focus to true on AreaBox - // setCurrentBox() will take care of it - iCurrentBox = NW_LMgr_BoxOf(areaBox); - - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(box), NW_FALSE); - } - } - } - } - // if the box is an area box, then we want to highlight the parent image map box when - // we switch layout modes - else if (NW_Object_IsClass(box, &NW_LMgr_AreaBox_Class)) - { - NW_LMgr_ImageMapBox_t* imageMapBox = NW_LMgr_AreaBox_GetParentImageMapBox(box); - - if (imageMapBox) - { - iCurrentBox = NW_LMgr_BoxOf(imageMapBox); - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(imageMapBox), NW_TRUE); - - NW_LMgr_Box_SetHasFocus (NW_LMgr_BoxOf(box), NW_FALSE); - } - } - } - - status = Collapse (NULL, NW_FALSE); - if (status != KBrsrSuccess) - { - return status; - } - - /* create the Box Visitor object and use it to traverse the box tree */ - status = NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf(iRootBox)); - if (status != KBrsrSuccess) - { - return status; - } - - /* Iterate through all children */ - if (aSwitchBox) - { - while ((box = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, 0)) != NULL) - { - NW_LMgr_Box_t * newBox = NW_LMgr_VerticalTableBox_SwitchBox(box); - if (newBox) - { - boxVisitor.currentBox = newBox; - if (NW_Object_IsInstanceOf(newBox, &NW_LMgr_StaticTableBox_Class)) - { - NW_XHTML_AttributePropertyTable_ApplyGridModeTableStyle(newBox); - } - } - else - { - // Apply grid mode related styles to static table boxes. - if (NW_Object_IsInstanceOf(box, &NW_LMgr_StaticTableBox_Class)) - { - NW_XHTML_AttributePropertyTable_ApplyGridModeTableStyle(box); - } - } - } - - } - - if (aFormatBoxTree) - { - status = FormatBoxTree (NW_TRUE); - if (status != KBrsrSuccess) - { - return status; - } - status = Draw (NW_TRUE); - if (status != KBrsrSuccess) - { - return status; - } - } - - return status; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::Cancel () - { - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - return KBrsrSuccess; - } - -TBrowserStatusCode -CView::UpdateHScrollBar () const - { - NW_GDI_Dimension2D_t canvasSize; - NW_GDI_Dimension2D_t extents; - NW_GDI_Dimension2D_t size; - NW_GDI_Metric_t originX; - TBrowserStatusCode status = KBrsrSuccess; - - status = NW_LMgr_RootBox_GetExtents (iRootBox, &extents); - if (status != KBrsrSuccess) - { - return status; - } - - originX = (NW_GDI_Metric_t)(iDeviceContext->Origin()->x); - /* Shift coordinates to 0 scrollRange will always be smaller or identical to the extents. */ - if (NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBoxOf(iRootBox))) - { - /* get range */ - status = NW_LMgr_RootBox_GetScrollRange (iRootBox, &canvasSize); - if (status != KBrsrSuccess) - { - return status; - } - - originX = originX + canvasSize.width - extents.width; - if (originX < 0) - { - originX = 0; - } - - size = canvasSize; - } - else - { - size = extents; - } - - // UI should fix it first. - // if( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - CView* view = const_cast<CView*>(this); - TInt err; - TRAP (err, view->UpdateScrollBarsL (CEikScrollBar::EHorizontal, originX, size.width)); - } - - /* successful completion */ - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::UpdateVScrollBar () const - { - NW_GDI_Dimension2D_t canvasSize; - TBrowserStatusCode status = KBrsrSuccess; - - /* get range */ - status = NW_LMgr_RootBox_GetExtents (iRootBox, &canvasSize); - if (status != KBrsrSuccess) - { - return status; - } - - CView* view = const_cast<CView*>(this); - TInt err; - TRAP (err, view->UpdateScrollBarsL (CEikScrollBar::EVertical, iDeviceContext->Origin()->y , canvasSize.height)); - - /* successful completion */ - return KBrsrSuccess; - } - -//----------------------------------------------------------------------------- -void -CView::Draw(const TRect& aRect) const - { - CWindowGc& gc = SystemGc(); - CEikBorderedControl::Draw( aRect ); - - // put offscreen bitmap onto the screen - gc.BitBlt( Rect().iTl, iOffscreenBitmap ); - } - -//----------------------------------------------------------------------------- -void -CView::DrawHistory( CFbsBitGc& aGc, const TRect& aDocumentAreaToDraw ) const - { - // put offscreen bitmap onto the screen - aGc.BitBlt( aDocumentAreaToDraw.iTl, iOffscreenBitmap ); - } - -/* ------------------------------------------------------------------------- */ -void -CView::EpocDrawNow (NW_Bool drawNow) - { - if (drawNow) - DrawNow (); - else - DrawDeferred (); - } - -/* ------------------------------------------------------------------------- * - IBoxTreeListener implementation - * ------------------------------------------------------------------------- */ -void -CView::EnableSuppressDupReformats (NW_Int16 state) - { - iSuppressDupReformats = state; - if (state == NW_Image_AbstractImage_SuppressDupReformats_Start) - iPendingReformatBox = NULL; - iForceReformatNeeded = NW_FALSE; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CView::BoxTreeListenerRelayout (NW_Bool createTabList) - { - /* get the listener and send a relayout request */ - return iShell->SendRelayoutMsg (createTabList); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::Refresh (NW_LMgr_Box_t* box) - { - CGDIDeviceContext* deviceContext; - NW_LMgr_Box_t *currentBox; - NW_GDI_Rectangle_t origClip; - NW_GDI_Color_t origBgColor; - NW_GDI_Color_t bgColor = NW_GDI_Color_White; - NW_LMgr_Property_t bodyColor; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - if (IsImageMapView() && (box != NW_LMgr_RootBox_GetFocusBox (iRootBox))) - { - box = NW_LMgr_RootBox_GetFocusBox (iRootBox); - } - - deviceContext = iDeviceContext; - - /* Save the initial clip and bg color*/ - origClip = deviceContext->ClipRect(); - origBgColor = deviceContext->BackgroundColor(); - - NW_GDI_Rectangle_t clipRect; - NW_GDI_Rectangle_t viewBounds; - NW_Uint8 flags = 0; - - /* initialize the viewBounds */ - viewBounds = *(deviceContext->DisplayBounds()); - viewBounds.point = (*deviceContext->Origin()); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds(box); - - if (NW_GDI_Rectangle_Cross(&viewBounds, &boxBounds, &clipRect)) - { - /* Get the current box */ - currentBox = NW_LMgr_RootBox_GetCurrentBox( iRootBox ); - /* Set the new clip */ - deviceContext->SetClipRect( &clipRect ); - - bodyColor.type = NW_CSS_ValueType_Token; - bodyColor.value.token = NW_CSS_PropValue_transparent; - (void)NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_backgroundColor, &bodyColor); - if (bodyColor.type == NW_CSS_ValueType_Color) - { - bgColor = bodyColor.value.integer; - } - deviceContext->SetBackgroundColor( bgColor ); - - /* Clear the area */ - deviceContext->PreDraw (); - - /* Draw the background */ - status = NW_LMgr_Box_DrawBackground (box, box->parent, deviceContext); - if (status != KBrsrSuccess) - { - goto finish; - } - - if ( NW_Object_IsClass( box, &NW_LMgr_AnimatedImageBox_Class) ) - { - flags = (NW_Uint8)NW_LMgr_Box_Flags_DrawFloats; - } - else if ( NW_Object_IsDerivedFrom( box, &NW_LMgr_ImgContainerBox_Class) ) - { - if ( NW_LMgr_ImgContainerBox_ImageIsBroken( box ) == NW_FALSE ) - { - flags = (NW_Uint8)NW_LMgr_Box_Flags_DrawFloats; - } - } - //R->embed - //else if ( ObjectUtils::IsObjectBox(*box, EFalse) ) - // { - // flags = (NW_Uint8)NW_LMgr_Box_Flags_DrawFloats; - // } - - /* Render the box and its descendants */ - /* Adjust crop if parent has it set */ - NW_LMgr_Box_t* tempBox = NULL; - NW_GDI_Rectangle_t newClip = viewBounds; - - if ( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - tempBox = NW_LMgr_BoxOf( box->parent ); - /* EXPENSIVE OPERATION:Needs to be reevaluated */ - do - { - if ( NW_Object_IsInstanceOf( tempBox, &NW_LMgr_StaticTableCellBox_Class ) ) - { - newClip = NW_LMgr_StaticTableCellBoxOf(tempBox)->cellClip; - break; - } - tempBox = NW_LMgr_BoxOf(tempBox->parent); - } - while ( tempBox != NULL ); - } - // Find out if the box or the parent is in focus - NW_Bool hasFocus; - // check if childbox is the current box - hasFocus = ( currentBox == box ); - if ( !hasFocus ) - { - // if the currentBox is a container, then check its childern to see if 'box' is - // one of them. - if ( currentBox && NW_Object_IsDerivedFrom( currentBox, &NW_LMgr_ContainerBox_Class) ) - { - // - NW_LMgr_BoxVisitor_t boxVisitor; - - NW_LMgr_BoxVisitor_Initialize( &boxVisitor, (NW_LMgr_Box_t*)currentBox ); - while ( ( tempBox = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, NULL ) ) != NULL ) - { - // - if ( box == tempBox ) - { - hasFocus = NW_TRUE; - break; - } - } - } - } - flags = (NW_Uint8)NW_LMgr_Box_Flags_DrawFloats; - status = BoxRender_Render (box, deviceContext, &newClip, currentBox, flags, hasFocus, - iRootBox ); - if (status != KBrsrSuccess) - { - goto finish; - } - - /* Invalidate the box area */ - deviceContext->PostDraw (NW_FALSE); - } - if (!NW_Object_IsInstanceOf(box, &NW_LMgr_PosFlowBox_Class)) - { - DrawPositionedBoxes(); - } - -finish: - /* Reset the clip */ - deviceContext->SetClipRect ( &origClip); - deviceContext->SetBackgroundColor( origBgColor ); - - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -CView::RedrawDisplay (NW_Bool drawNow) - { - /* get the listener and send a redraw request */ - return iShell->SendRedrawMsg (drawNow); - } - -const NW_GDI_Point2D_t* -CView::GetOrigin () - { - return iDeviceContext->Origin(); - } - -//----------------------------------------------------------------------------- -// functions from Epoc32View -//----------------------------------------------------------------------------- -NW_Bool -CView::ProcessEvent (const NW_Evt_Event_t* event) - { - CMVCScroll* scroll; - - // parameter assertion block - NW_ASSERT (event != NULL); - - scroll = (CMVCScroll*)iScroll; - - if ( EpocProcessEvent(event) ) - { - return NW_TRUE; - } - - if (NW_Object_IsClass(event, &NW_Evt_FontSizeChangeEvent_Class)) - { - return ProcessFontSizeChangeEvent (); - } - - if (NW_Object_IsClass(event, &NW_Evt_UnicodeKeyEvent_Class)) - { - NW_Bool absorbed = NW_FALSE; - - // long keypress -> access key handling - absorbed = ProcessAccessKey( NW_Evt_KeyEventOf(event) ); - NW_Evt_ControlKeyType_t controlKey = NW_Evt_ControlKeyType_None; - // short keypress -> home/end functionality - if(!absorbed) - { - - if ( controlKey != NW_Evt_ControlKeyType_None ) - { - absorbed = (NW_Bool)scroll->ScrollPage( controlKey ); - // refresh if absorbed - if ( absorbed ) - { - (void)Draw( NW_TRUE ); - } - } - } - return absorbed; - } - - // our superclass didn't want to take responsibility of the event so we must - // try to do something with it - if (NW_Object_IsInstanceOf (event, &NW_Evt_ControlKeyEvent_Class)) - { - NW_Evt_ControlKeyType_t key; - - // we really only care about a handful of key events - key = NW_Evt_ControlKeyEvent_GetKeyVal (event); - if (key != NW_Evt_ControlKeyType_Left && key != NW_Evt_ControlKeyType_Right && - key != NW_Evt_ControlKeyType_Up && key != NW_Evt_ControlKeyType_Down) - { - return NW_FALSE; - } - if ( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - return (NW_Bool)scroll->ProcessControlKey(key); - } - else - { - // Process keys for vertical layout - return (NW_Bool)scroll->ProcessControlKeyVL(key); - } - } - - return NW_FALSE; - } - -//----------------------------------------------------------------------------- -// functions from CEpoc32View, Epoc32ViewCallbacks -//----------------------------------------------------------------------------- -void -CView::SwitchVerticalLayout() - { - /* If the page is WML or XHTML, don't switch mode */ - if (NW_Settings_GetDisableSmallScreenLayout()) - { - return ; - } - - if (NW_Object_IsInstanceOf (iShell->GetDocumentRoot()->childNode, &NW_XHTML_ContentHandler_Class)) - { - ExternalLayoutSwitch (); - - if (IsImageMapView()) - { - SwitchFromImageMapView(); - } - else - { - SwitchVerticalLayout (NW_TRUE, NW_TRUE); - } - } - - /* In case we change from vertical mode to normal mode, we want to load all the images - that we did not load in vertical mode since they were too small - */ - if ( !NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - if (NW_Object_IsInstanceOf (iShell->GetDocumentRoot()->childNode, &NW_XHTML_ContentHandler_Class)) - { - NW_CSS_Processor_t* processor = NW_XHTML_ContentHandler_GetCSSProcessor( - NW_XHTML_ContentHandlerOf (iShell->GetDocumentRoot()->childNode)); - if (processor != NULL) - { - NW_CSS_Processor_ProcessPendingLoads(processor); - } - } - if (NW_Settings_GetImagesEnabled()) - { - NW_HED_DocumentRoot_ShowImages (iShell->GetDocumentRoot()); - } - } - } - -TKeyResponse -CView::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) - { - if (aType != EEventKey) - return EKeyWasNotConsumed; - - TKeyResponse retVal = EKeyWasNotConsumed; - - retVal = DoHandleControlKeysL(aKeyEvent); - if (retVal == EKeyWasConsumed) - return retVal; - - NW_Bool isLongKeypress = ((aKeyEvent.iRepeats == 1) && (iLastRepeats == 0)); // Long Keypress - iLastRepeats = aKeyEvent.iRepeats; - - NW_Bool absorbed = NW_FALSE; - NW_Evt_UnicodeKeyEvent_t keyEvent; - - switch ((NW_Ucs2)aKeyEvent.iCode) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - break; - } - case '*': // fall through - case '#': - { - // *(home) and #(end) shortcuts work on both small - // and normal mode - // process short *,# key event - break; - } - default: - { - //return EKeyWasNotConsumed; for qwerty functionality - } - } - - TBrowserStatusCode status = NW_Evt_UnicodeKeyEvent_Initialize(&keyEvent, (NW_Ucs2)aKeyEvent.iCode); - if (status == KBrsrSuccess) - { - if (isLongKeypress) - { - NW_Evt_KeyEvent_SetLongPress(&keyEvent); - } - absorbed = ProcessEvent ( NW_Evt_EventOf(&keyEvent) ); - } - - return (absorbed == NW_FALSE) ? EKeyWasNotConsumed : EKeyWasConsumed; - } - -//----------------------------------------------------------------------------- -void CView::HandlePointerEventL(const TPointerEvent& aPointerEvent) - { - switch (aPointerEvent.iType) { - case TPointerEvent::EButton1Down: - iLastPosition = aPointerEvent.iPosition; - break; - case TPointerEvent::EDrag: - TPoint currPosition; - TPoint nextPosition; - nextPosition = iLastPosition - aPointerEvent.iPosition; - iLastPosition = aPointerEvent.iPosition; - - if(nextPosition.iX || nextPosition.iY) - { - currPosition.iX = iDeviceContext->Origin()->x; - currPosition.iY = iDeviceContext->Origin()->y; - ScrollTo(currPosition+nextPosition); - } - iDrag = ETrue; - break; - } - - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t size = NW_ADT_Vector_GetSize( iTabList ); - i = 0; - TBool activeInputBox = iCurrentBox && NW_Object_IsInstanceOf(iCurrentBox, &NW_FBox_InputBox_Class) && - NW_FBox_InputBox_IsActive( iCurrentBox ); - TBool found = EFalse; - TPoint point = aPointerEvent.iPosition + (TPoint(iDeviceContext->Origin()->x, iDeviceContext->Origin()->y)); - for( i = 0; i < size; i++ ) - { - NW_LMgr_Box_t* tempBox = (NW_LMgr_Box_t*)*NW_ADT_Vector_ElementAt( iTabList, (NW_ADT_Vector_Metric_t)i); - NW_GDI_Rectangle_t boxRect = GetBoxDisplayBounds(tempBox); - TRect rect(TPoint(boxRect.point.x, boxRect.point.y), TSize(boxRect.dimension.width, boxRect.dimension.height)); - if (rect.Contains(point)) - { - found = ETrue; - } - else - { - NW_LMgr_Property_t prop; - NW_LMgr_Box_t* box = tempBox; - TBool done = EFalse; - while(!done) - { - prop.value.object = NULL; - if (NW_LMgr_Box_GetProperty( box, NW_CSS_Prop_sibling, &prop ) == KBrsrSuccess) - { - if ( prop.value.object != NULL && prop.value.object != tempBox ) - { - box = NW_LMgr_BoxOf( prop.value.object ); - boxRect = GetBoxDisplayBounds(box); - rect.SetRect(TPoint(boxRect.point.x, boxRect.point.y), TSize(boxRect.dimension.width, boxRect.dimension.height)); - if (rect.Contains(point)) - { - found = ETrue; - break; - } - } - else - { - done = ETrue; - } - } - else - { - done = ETrue; - } - } - } - - if (found) - { - if (tempBox != iCurrentBox) - { - iShouldActivate = EFalse; - } - if (aPointerEvent.iType == TPointerEvent::EButton1Down) - { - iShouldActivate = ETrue; - } - if (tempBox != iCurrentBox) - { - if (activeInputBox) - { - if (!InputElementEditComplete( NW_TRUE )) - { - iShouldActivate = EFalse; - break; - } - } - NW_LMgr_Box_SetHasFocus (iCurrentBox, NW_FALSE); - NW_LMgr_Box_SetHasFocus (tempBox, NW_TRUE); - SetCurrentBox(tempBox); - NW_LMgr_RootBox_SetFocusBox(iRootBox, tempBox); - Draw (NW_TRUE /*DrawNow*/); - } - if (aPointerEvent.iType == TPointerEvent::EButton1Up) - { - if (iShouldActivate) - { - if(!iDrag) - { - NW_Evt_ActivateEvent_t actEvent; - NW_Evt_ActivateEvent_Initialize (&actEvent); - ProcessEvent (NW_Evt_EventOf(&actEvent)); - } - else - { - iDrag = EFalse; - } - } - } - break; - } - } - if (!found) // Clicked or dragged on an empty area - { - iShouldActivate = EFalse; - if (activeInputBox) - { - InputElementEditComplete( NW_TRUE ); - } - } - } - -//----------------------------------------------------------------------------- -void -CView::FocusChanged (TDrawNow aDrawNow) - { - if (IsFocused()) - { - iShell->GainFocus(); - } - else - // control is about losing the focus - { - iShell->LoseFocus(); - } - // Inform all focus observers that the focus changed. - // This is important because we need to inform Flash plugin to stop playing - // when the browser is in the background - TInt count = iViewFocusObserver.Count(); - for (TInt i = 0; i < count; i++) - { - //iViewFocusObserver[i]->ViewFocusChanged(IsFocused()); - } - - CEikBorderedControl::FocusChanged(aDrawNow); - } - -// ------------------------------------------------------------------------- -void CView::SetFormattingPriority( CActive::TPriority aPriority ) - { - iFormatPriority = aPriority; - } - -// ------------------------------------------------------------------------- -TInt CView::AppendFocusObserver(MViewFocusObserver* aViewFocusObserver) - { - NW_ASSERT(aViewFocusObserver != NULL); - return iViewFocusObserver.Append(aViewFocusObserver); - } - -// ------------------------------------------------------------------------- -void CView::RemoveFocusObserver(MViewFocusObserver* aViewFocusObserver) - { - NW_ASSERT(aViewFocusObserver != NULL); - TInt i = iViewFocusObserver.Find(aViewFocusObserver); - if (i != KErrNotFound) - { - iViewFocusObserver.Remove(i); - } - } - -// ------------------------------------------------------------------------- -TInt CView::AddStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) - { - NW_ASSERT(aBrCtlStateChangeObserver != NULL); - return iStateChangeObserver.Append(aBrCtlStateChangeObserver); - } - -// ------------------------------------------------------------------------- -void CView::RemoveStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) - { - NW_ASSERT(aBrCtlStateChangeObserver != NULL); - TInt i = iStateChangeObserver.Find(aBrCtlStateChangeObserver); - if (i != KErrNotFound) - { - iStateChangeObserver.Remove(i); - } - } - -//----------------------------------------------------------------------------- -TKeyResponse -CView::DoHandleControlKeysL(const TKeyEvent& aKeyEvent) - { - TKeyResponse keyConsumed = EKeyWasNotConsumed; - NW_Evt_ControlKeyEvent_t controlKeyEvent; - NW_Evt_ControlKeyType_t controlKeyVal; - - controlKeyVal = NW_Evt_ControlKeyType_None; - - switch (aKeyEvent.iCode) - { - case EKeyLeftArrow: - controlKeyVal = NW_Evt_ControlKeyType_Left; - break; - - case EKeyRightArrow: - controlKeyVal = NW_Evt_ControlKeyType_Right; - break; - - case EKeyUpArrow: - controlKeyVal = NW_Evt_ControlKeyType_Up; - break; - - case EKeyDownArrow: - controlKeyVal = NW_Evt_ControlKeyType_Down; - break; - - case EKeyEnter: - case EKeyDevice3: - { - NW_Evt_ActivateEvent_t actEvent; - NW_Evt_ActivateEvent_Initialize (&actEvent); - - if ( ProcessEvent (NW_Evt_EventOf(&actEvent)) ) - { - keyConsumed = EKeyWasConsumed; - } - break; - } - - default: - return keyConsumed; - } - if (controlKeyVal != NW_Evt_ControlKeyType_None) - { - TBrowserStatusCode status = KBrsrSuccess; - - status = NW_Evt_ControlKeyEvent_Initialize (&controlKeyEvent, controlKeyVal); - if (status != KBrsrSuccess) - { - return keyConsumed; - } - NW_GDI_Rectangle_t viewBoundsOld, viewBoundsNew; - viewBoundsOld = *iDeviceContext->DisplayBounds(); - viewBoundsOld.point = *iDeviceContext->Origin(); - - if ( ProcessEvent (NW_Evt_EventOf(&controlKeyEvent)) ) - { - viewBoundsNew = *iDeviceContext->DisplayBounds(); - viewBoundsNew.point = *iDeviceContext->Origin(); - - /* scroll happened*/ - if (viewBoundsNew.point.y != viewBoundsOld.point.y || viewBoundsNew.point.x != viewBoundsOld.point.x) - { - status = Draw (NW_TRUE /*DrawNow*/); - NW_ASSERT(status == KBrsrSuccess); - } - - return EKeyWasConsumed; - } - } - return keyConsumed; - } - -//----------------------------------------------------------------------------- -void -CView::SizeChanged() - { - const TRect rect(Rect()); - NW_GDI_Rectangle_t rbDisplayBounds; - NW_LMgr_BoxVisitor_t visitor; - NW_LMgr_Box_t* child = NULL; - - rbDisplayBounds.point.x = (NW_GDI_Metric_t)rect.iTl.iX; - rbDisplayBounds.point.y = (NW_GDI_Metric_t)rect.iTl.iY; - rbDisplayBounds.dimension.height = (NW_GDI_Metric_t)rect.Height(); - rbDisplayBounds.dimension.width = (NW_GDI_Metric_t)rect.Width(); - - TRAPD(err, CreateOffscreenBitmapL( Rect() )); - if (err != KErrNone) - { - return ; - } - - // IKZ - it is not good to set GC directly to OOC class - may be we shall implement a setter - iDeviceContext->SetGraphicsContext( (void*)iBitmapContext ); - - const NW_GDI_Rectangle_t* oldDisplayBounds = iDeviceContext->DisplayBounds(); - - if (rbDisplayBounds.point.x != oldDisplayBounds->point.x || - rbDisplayBounds.point.y != oldDisplayBounds->point.y || - rbDisplayBounds.dimension.height != oldDisplayBounds->dimension.height || - rbDisplayBounds.dimension.width != oldDisplayBounds->dimension.width ) - { - // We need to protect against the case where the StatusPane changed due to an embedded app. - // When that happens, we compute all the clipRects based on the wrong size. - NW_LMgr_RootBox_InvalidateCache (iRootBox); - } - - // if the width of the rect has changed, we want to reformat the box tree - if (rbDisplayBounds.dimension.width != oldDisplayBounds->dimension.width ) - { - // cancel any existing formatting - ((CLMgr_BoxFormatHandler*)iBoxFormatHandler)->Cancel(); - - NW_GDI_Point2D_t origin = *(iDeviceContext->Origin()); - origin.x = 0; - origin.y = 0; - iDeviceContext->SetOrigin (&origin); - - iDeviceContext->SetDisplayBounds(&rbDisplayBounds); - // Iterate through all children and initialize the box bounds to 0 - NW_LMgr_BoxVisitor_Initialize(&visitor, NW_LMgr_BoxOf(iRootBox)); - - child = NW_LMgr_BoxVisitor_NextBox(&visitor, NULL); - // Initialize the coordinates - NW_GDI_Rectangle_t boxBounds; // = NW_LMgr_Box_GetFormatBounds( child ); - - NW_Mem_memset(&(boxBounds), 0, sizeof(NW_GDI_Rectangle_t)); - while ((child = NW_LMgr_BoxVisitor_NextBox(&visitor, NULL)) != NULL) - { - NW_LMgr_Box_SetFormatBounds( child, boxBounds ); - NW_LMgr_Box_UpdateDisplayBounds( child, boxBounds ); - } - - (void) Collapse (NULL, NW_FALSE); - - (void) FormatBoxTree (NW_TRUE); - - } - - SetDisplayExtents(&rbDisplayBounds); - - (void) Draw (NW_TRUE /*DrawNow*/); - } - -/* ------------------------------------------------------------------------- */ -void -CView::SetAppServices (void* appServices) - { - iRootBox->appServices = (NW_HED_AppServices_t*) appServices; - iDeviceContext->SetFontSizeLevel( (TGDIDeviceContextFontSizeLevel)NW_Settings_GetFontSizeLevel() ); - } - -//----------------------------------------------------------------------------- -void CView::SetShell(CShell* shell) - { - iShell = shell; - } - -//----------------------------------------------------------------------------- -void CView::DoScrollL(const TInt16 /*aScrollDirection*/, const TUint32 /*aScrollDelta*/ ) - {} - -//----------------------------------------------------------------------------- -TBrCtlDefs::TBrCtlElementType CView::GetFocusedElementType() - { - TBrCtlDefs::TBrCtlElementType retVal = TBrCtlDefs::EElementNone; - NW_LMgr_Box_t* currentBox = iCurrentBox; - NW_GDI_Rectangle_t viewBounds; - - viewBounds = *iDeviceContext->DisplayBounds(); - viewBounds.point = *iDeviceContext->Origin(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( currentBox ); - - if ( currentBox == NULL || !NW_GDI_Rectangle_Cross(&viewBounds, &boxBounds, NULL)) - { - /* if there is no current box or it it not visible */ - retVal = TBrCtlDefs::EElementNone; - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_LMgr_ActiveContainerBox_Class) ) - { - if (NW_LMgr_ActiveContainerBox_GetActionType(currentBox) == NW_LMgr_ActionType_SendMail) - { - retVal = TBrCtlDefs::EElementMailtoAnchor; - } - else if (NW_LMgr_ActiveContainerBox_GetActionType(currentBox) == NW_LMgr_ActionType_DialNumber) - { - retVal = TBrCtlDefs::EElementTelAnchor; - } - else - { - retVal = TBrCtlDefs::EElementAnchor; - } - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_RadioBox_Class) ) - { - NW_Bool state = NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(currentBox)); - if (state == NW_TRUE) - { - retVal = TBrCtlDefs::EElementRadioButtonSelected; - } - else - { - retVal = TBrCtlDefs::EElementRadioButtonUnSelected; - } - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_CheckBox_Class) ) - { - NW_Bool state = NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(currentBox)); - if (state == NW_TRUE) - { - retVal = TBrCtlDefs::EElementCheckBoxChecked; - } - else - { - retVal = TBrCtlDefs::EElementCheckBoxUnChecked; - } - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_ButtonBox_Class) ) - { - retVal = TBrCtlDefs::EElementButton; - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_InputBox_Class) ) - { - if ( NW_FBox_InputBox_IsActive( currentBox ) ) - { - retVal = TBrCtlDefs::EElementActivatedInputBox; - } - else - { - retVal = TBrCtlDefs::EElementInputBox; - } - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_SelectBox_Class) ) - { - retVal = TBrCtlDefs::EElementSelectBox; - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_TextAreaBox_Class) ) - { - retVal = TBrCtlDefs::EElementTextAreaBox; - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_FBox_FileSelectionBox_Class) ) - { - if ( NW_FBox_FileSelectionBox_HasContent( NW_FBox_FileSelectionBoxOf( currentBox ) ) ) - { - retVal = TBrCtlDefs::EElementFileSelectionBoxWithContent; - } - else - { - retVal = TBrCtlDefs::EElementFileSelectionBoxNoContent; - } - } - else if ( NW_Object_IsInstanceOf(currentBox, &NW_LMgr_AreaBox_Class) && - IsImageMapView()) - { - retVal = TBrCtlDefs::EElementAreaBox; - } - - return retVal; - } - -//----------------------------------------------------------------------------- -NW_Bool -CView::InputElementEditComplete( TBool aInputConfirmed ) - { - NW_Evt_ControlKeyEvent_t event; - - if ( aInputConfirmed ) - { - NW_Evt_ControlKeyEvent_Initialize(&event, NW_Evt_ControlKeyType_SoftA ); - } - else - { - NW_Evt_ControlKeyEvent_Initialize(&event, NW_Evt_ControlKeyType_SoftB ); - } - - return ProcessEvent( NW_Evt_EventOf(&event) ); - } - -//----------------------------------------------------------------------------- - -void -CView::HandleNotifyString(TUint32 /*aKeyId*/, const TDesC16& /*aValue*/) - { - } - -//----------------------------------------------------------------------------- -void -CView::DrawPictographsInText(CBitmapContext& aGc, - const CFont& aFont, - const TDesC& aText, - const TPoint& aPosition) - { - if (iPictographInterface) - { - iPictographInterface->Interface()->DrawPictographsInText(aGc, aFont, aText, aPosition); - } - } - -//----------------------------------------------------------------------------- -void -CView::DrawPictographArea() - { - Draw (NW_TRUE); - } - -//----------------------------------------------------------------------------- - -// Any slow browser initialization can happen here -void CView::AsyncInit() - { - TInt ret; - TRAP(ret, AsyncInitL()); - } - -// Delete entries in a given directory -void CView::DeleteDirectoryEntriesL(RFs& aRfs, TPtrC16& aFilePath) - { - TInt ret = aRfs.MkDirAll(aFilePath); - // If temp directory was already created, creating it will fail, so go ahead and empty the entries - if (ret == KErrAlreadyExists) - { - CDir* dir; - ret = aRfs.GetDir(aFilePath, KEntryAttNormal, ESortNone, dir); - if (ret == KErrNone) - { - CleanupStack::PushL(dir); - TInt entryCount = dir->Count(); - TInt i; - TTime theTime; - theTime.HomeTime(); - for (i = entryCount - 1; i >= 0; i--) - { - TEntry entry = (*dir)[i]; - if (theTime.DaysFrom(entry.iModified).Int() >= 1) - { - HBufC* fullFileName = HBufC::NewL(aFilePath.Length() + entry.iName.Length() + 1); - CleanupStack::PushL(fullFileName); - fullFileName->Des().Copy(aFilePath); - fullFileName->Des().Append(entry.iName); - aRfs.Delete(*fullFileName); - CleanupStack::PopAndDestroy(); // fullFileName - } - } - CleanupStack::PopAndDestroy(); // dir - } - } - } - -// Any slow browser initialization can happen here -void CView::AsyncInitL() - { -#ifndef FEATURE_MEMORY_PROFILE - TUint16* filePath = NW_Settings_GetTempFilesPath(); - if (filePath != NULL) - { - TPtrC filePathPtr(filePath); - CleanupStack::PushL(filePath); - RFs rfs; - User::LeaveIfError(rfs.Connect()); - CleanupClosePushL(rfs); - DeleteDirectoryEntriesL(rfs, filePathPtr); - filePath[0] = NW_Settings_GetMMCDrive(); - DeleteDirectoryEntriesL(rfs, filePathPtr); - CleanupStack::PopAndDestroy(2); // rfs, filePath - } -#endif - - } - -//----------------------------------------------------------------------------- - -void -CView::HandleActivationEvent() - { - NW_Evt_ActivateEvent_t activateEvent; - - NW_Evt_ActivateEvent_Initialize(&activateEvent); - - (void) ProcessEvent( NW_Evt_EventOf(&activateEvent) ); - (void) Draw (NW_TRUE /*DrawNow */); - } - -//----------------------------------------------------------------------------- -void -CView::GenerateAndProcessEvent(const TKimonoEventType& aEvent) - { - switch (aEvent) - { - case EKmEvAddToPhoneBook: - { - NW_XHTML_SaveToPhoneBkEvent_t saveToPbEvent; - NW_XHTML_SaveToPhoneBkEvent_Initialize(&saveToPbEvent); - (void) ProcessEvent (NW_Evt_EventOf(&saveToPbEvent)); - break; - } - case EKmEvMakeCall: - { - NW_Evt_ActivateEvent_t actEvent; - NW_Evt_ActivateEvent_Initialize (&actEvent); - (void) ProcessEvent (NW_Evt_EventOf(&actEvent)); - break; - } - case EKmEvOpenToExternalApp: - { - NW_Evt_OpenViewerEvent_t openViewerEvent; - NW_Evt_OpenViewerEvent_Initialize (&openViewerEvent); - (void) ProcessEvent (NW_Evt_EventOf(&openViewerEvent)); - break; - } - case EKmEvDownloadObject: - { - NW_Evt_OpenViewerEvent_t openViewerEvent; - NW_Evt_OpenViewerEvent_Initialize (&openViewerEvent); - (void) ProcessEvent (NW_Evt_EventOf(&openViewerEvent)); - break; - } - case EKmEvRemoveFileName: - { - NW_Evt_ClearFieldEvent_t clearFieldEvent; - NW_Evt_ClearFieldEvent_Initialize (&clearFieldEvent); - (void) ProcessEvent (NW_Evt_EventOf(&clearFieldEvent)); - break; - } - default: - { - break; - } - } - } - -// ----------------------------------------------------------------------------- -// CView::SetBrowserSettingL -// This method takes two parameters, the setting you wish to 'set' and the value -// you wish to change the setting to. This method will call methods off the -// CBrowserSettings class which will change the cached preferences and if we are -// a stand-alone browser instance, it will persist the setting by writing the new -// value to the browser's ini file. If any other action needs to take place as -// a result of the setting change, that code should be placed here. -// ----------------------------------------------------------------------------- -void CView::SetBrowserSettingL(TUint aSetting, TUint value) - { - switch (aSetting) - { - case TBrCtlDefs::ESettingsSmallScreen: - { - NW_Settings_SetVerticalLayoutEnabled((NW_Bool)value); - SwitchVerticalLayout(); - - break; - } - case TBrCtlDefs::ESettingsAutoLoadImages: - { - NW_Settings_SetImagesEnabled((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsFontSize: - { - NW_Settings_SetFontSizeLevel((NW_Uint8)value); - - NW_Evt_FontSizeChangeEvent_t fontSizeChangeEvent; - NW_Evt_FontSizeChangeEvent_Initialize (&fontSizeChangeEvent, (NW_Evt_FontSizeChangeEvent_FontLevel_t)value); - (void) ProcessEvent (NW_Evt_EventOf(&fontSizeChangeEvent)); - - break; - } - case TBrCtlDefs::ESettingsTextWrapEnabled: - { - NW_Settings_SetTextWrapEnabled((NW_Bool)value); - - NW_GDI_Point2D_t origin; - Relayout (NW_FALSE); - origin = *(iDeviceContext->Origin()); - SetOrigin (&origin); - (void) Draw (NW_TRUE /*DrawNow */); - - break; - } - case TBrCtlDefs::ESettingsCookiesEnabled: - { - NW_Settings_SetCookiesEnabled((NW_Bool)value); - - //UrlLoader_ChangeFilterLoadStatusL(ECookieFilter, (NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsEmbedded: - { - NW_Settings_SetIsBrowserEmbedded((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsCSSFetchEnabled: - { - NW_Settings_SetCSSFetchEnabled((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsECMAScriptEnabled: - { - NW_Settings_SetEcmaScriptEnabled((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsIMEINotifyEnabled: - { - NW_Settings_SetIMEINotifyEnabled((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsSendRefererHeader: - { - NW_Settings_SetSendReferrerHeader((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsCharacterset: - { - // value is the UID of the charset converter. We don't save it in the settings - iShell->CharacterSetChangedL(value); - TUint16 internalEncoding = EAutomatic; - TInt i; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == value) - { - internalEncoding = supportedCharset[i].internalEncoding; - break; - } - } - NW_Settings_SetEncoding(internalEncoding); - break; - } - case TBrCtlDefs::ESettingsSecurityWarnings: - { - NW_Settings_SetHttpSecurityWarnings((NW_Bool)value); - - break; - } - case TBrCtlDefs::ESettingsApId: - { - NW_Settings_SetIAPId(value); - //UrlLoader_SetIAPid(value); - - break; - } - default: - { - // OK - some settings not of interest to us here - break; - } - } - } - -// ----------------------------------------------------------------------------- -// CView::GetBrowserSettingL -// This method takes one parameter and that is the setting you wish to retrieve -// the value of. GetBrowserSettingL will then call methods off the CBrowserSettings -// class to return the current value of the setting. -// ----------------------------------------------------------------------------- -TUint CView::GetBrowserSettingL(TUint aSetting) const - { - TUint returnValue = 0; - - switch (aSetting) - { - case TBrCtlDefs::ESettingsSmallScreen: - returnValue = (TUint)NW_Settings_GetVerticalLayoutEnabled(); - break; - - case TBrCtlDefs::ESettingsAutoLoadImages: - returnValue = (TUint)NW_Settings_GetImagesEnabled(); - break; - - case TBrCtlDefs::ESettingsFontSize: - returnValue = (TUint)NW_Settings_GetFontSizeLevel(); - break; - - case TBrCtlDefs::ESettingsTextWrapEnabled: - returnValue = (TUint)NW_Settings_GetTextWrapEnabled(); - break; - - case TBrCtlDefs::ESettingsCookiesEnabled: - returnValue = (TUint)NW_Settings_GetCookiesEnabled(); - break; - - case TBrCtlDefs::ESettingsEmbedded: - returnValue = (TUint)CBrowserSettings::Instance()->GetIsBrowserEmbedded(); - break; - - case TBrCtlDefs::ESettingsCSSFetchEnabled: - returnValue = (TUint)NW_Settings_GetCSSFetchEnabled(); - break; - - case TBrCtlDefs::ESettingsECMAScriptEnabled: - returnValue = (TUint)NW_Settings_GetEcmaScriptEnabled(); - break; - - case TBrCtlDefs::ESettingsIMEINotifyEnabled: - returnValue = (TUint)NW_Settings_GetIMEINotifyEnabled(); - break; - - case TBrCtlDefs::ESettingsSendRefererHeader: - returnValue = (TUint)NW_Settings_GetSendReferrerHeader(); - break; - - case TBrCtlDefs::ESettingsSecurityWarnings: - returnValue = (TUint)NW_Settings_GetHttpSecurityWarnings(); - break; - - case TBrCtlDefs::ESettingsApId: - returnValue = (TUint)NW_Settings_GetIAPId(); - break; - - default: - // if the user has not specified one of the above settings, then we - // need to leave - User::Leave(KErrArgument); - break; - } - - return returnValue; - } - -//----------------------------------------------------------------------------- -void CView::BrowserSettingChanged( enum TBrowserSetting aBrowserSetting ) - { - // let the rootbox know about it - if ( iRootBox ) - { - switch ( aBrowserSetting ) - { - case EVerticalLayoutEnabled: - case EDisableSmallScreenLayout: - { - NW_LMgr_RootBox_SetSmallScreenOn( iRootBox, NW_Settings_GetVerticalLayoutEnabled() ); - break; - } - case ETextWrapEnabled: - { - NW_LMgr_RootBox_SetWrapEnabled( iRootBox, NW_Settings_GetTextWrapEnabled() ); - break; - } - default: - { - // no default implementation - break; - } - } - } - } - -//----------------------------------------------------------------------------- -CArrayFixFlat<TBrCtlImageCarrier>* -CView::GetPageImagesL() - { - NW_ADT_DynamicVector_t* images = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_HED_ViewImageList_Entry_t), 10, 5 ); - - if (images == NULL) - { - User::LeaveNoMemory(); - } - - // NW_HED_ViewImageList_Entry_t - NW_HED_DocumentRoot_t* root = iShell->GetDocumentRoot(); - NW_ASSERT(root != NULL); - - // Since we're not checking status, status shows up as an unused variable - // warning. Removed declaration of status until CCC decides to actually - // use it. - if (IsImageMapView()) - { - GetViewImageList(images); - } - else - { - NW_HED_DocumentRoot_GetViewImageList(root, images); - } - - CArrayFixFlat<TBrCtlImageCarrier>* array = new(ELeave) CArrayFixFlat<TBrCtlImageCarrier>(5); - CleanupStack::PushL(array); - - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t size = NW_ADT_Vector_GetSize(images); - - for (i = 0; i < size; i++) - { - NW_HED_ViewImageList_Entry_t* entry = - (NW_HED_ViewImageList_Entry_t*)NW_ADT_Vector_ElementAt(images, i); - - TPtrC8 rawData( entry->rawData, entry->rawDataLen ); - - TPtrC url( NULL, 0 ); - if (entry->url != NULL) - { - url.Set( entry->url ); - } - - TPtrC altText( NULL, 0 ); - if (entry->altText != NULL) - { - altText.Set( entry->altText ); - } - - TBrCtlImageType type = EImageTypeAny; - - switch (entry->imageType) - { - case ERecognizedImage: - case EUnsupportedImage: - type = EImageTypeAny; - break; - case EWbmpImage: - type = EImageTypeWbmp; - break; - case EOtaImage: - type = EImageTypeOta; - break; - default: - break; - } - - TPtrC contentType( NULL, 0 ); - if(entry->contentType != NULL) - { - contentType.Set(entry->contentType); - } - TBrCtlImageCarrier carrier (rawData, url, altText, type, contentType); - array->AppendL(carrier); - } - - CleanupStack::Pop(); // array - NW_Object_Delete(images); - - return array; - } - -//----------------------------------------------------------------------------- -// UpdateScrollBarsL -// -// If the BrCtl supports scrollBars (ECapabilityDisplayScrollBar) we display -// and handle the scrollBars within the BrowserEngine and inform the -// BrCtlLayoutObserver listener. If the BrCtrl doesn't support scrollBars, we -// only inform the BrCtlLayoutObserver listener that a scroll event occurred. -//----------------------------------------------------------------------------- -void -CView::UpdateScrollBarsL(CEikScrollBar::TOrientation aOrientation, - const TInt aThumbPos, - const TInt aScrollSpan ) - { - TInt document = aScrollSpan; // Span of the web page - TInt display = 0; // Span of the display - TInt displayPos = aThumbPos; // Position of the display within the web page - - // Set layout - NW_LMgr_RootBox_t* rootBox; - rootBox = iRootBox; - - // Get the BrCtl scrolling provider, if we have it. Can be NULL, if - // then the parent app is providing the scrolling, supported through the - // BrCtlLayoutObserver events. -/* ScrollingProvider* brCtlScrolling = iBrCtl->scrollingProvider(); -*/ - // Page direction - if ( NW_LMgr_RootBox_IsPageRTL( rootBox ) ) - { - // Right to left page -/* if (brCtlScrolling) - { -// iWmlControl->WKWmlInterface()->WKScrollingProviderNotifyLayoutChange(EOriginTopRight); - } -*/ iBrCtl->brCtlLayoutObserver()->NotifyLayoutChange( EOriginTopRight ); - } - else - { - // Left to right page -/* if (brCtlScrolling) - { -// iWmlControl->WKWmlInterface()->WKScrollingProviderNotifyLayoutChange(EOriginTopLeft); - } -*/ iBrCtl->brCtlLayoutObserver()->NotifyLayoutChange( EOriginTopLeft ); - } - - // Page orientation - if ( aOrientation == CEikScrollBar::EHorizontal ) - { - // Horizontal scrollbar - display = Rect().Width(); - - // Small (Narrow) Screen Mode - if ( NW_LMgr_RootBox_GetSmallScreenOn( iRootBox ) ) - { - document = display; - } - -/* if (brCtlScrolling) - { -// iWmlControl->WKWmlInterface()->WKSetScrollingProviderUpdateHScrollBarL(document, display, displayPos); - } -*/ iBrCtl->brCtlLayoutObserver()->UpdateBrowserHScrollBarL(document, display, displayPos ); - } - else - { - // Vertical scrollbar - display = Rect().Height(); -/* if (brCtlScrolling) - { -// iWmlControl->WKWmlInterface()->WKSetScrollingProviderUpdateVScrollBarL(document, display, displayPos); - } -*/ iBrCtl->brCtlLayoutObserver()->UpdateBrowserVScrollBarL(document, display, displayPos ); - } - } - -//----------------------------------------------------------------------------- -TInt -CView::CountComponentControls() const - { - TInt componentControls = 0; - - // If there's an active input element on the screen - draw it - // because of T9 underline - NW_LMgr_Box_t* currentBox = iCurrentBox; - - if (NW_Object_IsInstanceOf(currentBox, &NW_FBox_InputBox_Class) && - NW_FBox_InputBox_IsActive( currentBox )) - { - NW_FBox_FormBox_t* formBox = NW_FBox_FormBoxOf(currentBox); - - NW_FBox_Epoc32InputSkin_t* inputSkin = (NW_FBox_Epoc32InputSkin_t*) NW_FBox_FormBox_GetSkin(formBox); - - CCoeControl* inputElement = (CCoeControl*)inputSkin->cppEpoc32InputBox; - if (inputElement) - { - componentControls++; - } - } - - return componentControls; - } - -//----------------------------------------------------------------------------- -CCoeControl* -CView::ComponentControl(TInt /*aIndex*/) const - { - NW_LMgr_Box_t* currentBox = iCurrentBox; - - if (NW_Object_IsInstanceOf(currentBox, &NW_FBox_InputBox_Class) && - NW_FBox_InputBox_IsActive( currentBox )) - { - NW_FBox_FormBox_t* formBox = NW_FBox_FormBoxOf(currentBox); - - NW_FBox_Epoc32InputSkin_t* inputSkin = (NW_FBox_Epoc32InputSkin_t*) NW_FBox_FormBox_GetSkin(formBox); - - CCoeControl* inputElement = (CCoeControl*)inputSkin->cppEpoc32InputBox; - if (inputElement) - { - return inputElement; - } - } - - return NULL; - } - -//----------------------------------------------------------------------------- -void -CView::CreateOffscreenBitmapL( const TRect& aRect ) - { - delete iBitmapContext; - iBitmapContext = NULL; - delete iBitmapDevice; - iBitmapDevice = NULL; - delete iOffscreenBitmap; - iOffscreenBitmap = NULL; - - // create a bitmap to be used offscreen - iOffscreenBitmap = new (ELeave) CFbsBitmap(); - User::LeaveIfError( iOffscreenBitmap->Create( TSize( aRect.Width(), aRect.Height() ), EColor4K ) ); - - // create and offscreen device and context - iBitmapDevice = CFbsBitmapDevice::NewL( iOffscreenBitmap ); - User::LeaveIfError( iBitmapDevice->CreateBitmapContext( iBitmapContext ) ); - } - -//----------------------------------------------------------------------------- -void -CView::HandleResourceChange(TInt aType) - { - if (aType == KEikMessageColorSchemeChange) - { - (void) Draw (NW_TRUE /*DrawNow */); - DrawNow(); - } - } - - -//----------------------------------------------------------------------------- -// Return the number of active elements in the page -// This is used by the UI to decide if to display CANCEL on the right softkey -// when an object is activated -//----------------------------------------------------------------------------- -TUint -CView::GetActiveElements() - { - return iTabList->size; - } - -// ------------------------------------------------------------------------- -// CView::GetViewImageList -// ------------------------------------------------------------------------- -void -CView::GetViewImageList(void* aDynamicVector) - { - NW_LMgr_ImageMapBox_t* imageMapBox = NULL; - NW_Image_Epoc32Simple_t* image = NULL; - NW_Image_Virtual_t* virtualImage = NULL; - NW_HED_ViewImageList_Entry_t* entry = NULL; - NW_ADT_DynamicVector_t* dynamicVector = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - NW_LMgr_Box_t* currentBox = NULL; - - dynamicVector = (NW_ADT_DynamicVector_t*)aDynamicVector; - rootBox = iRootBox; - NW_ASSERT(rootBox); - - currentBox = rootBox->focusBox; - - // in this case the current box should be an area box - if (currentBox && NW_Object_IsClass(currentBox, &NW_LMgr_ImageMapBox_Class)) - { - imageMapBox = NW_LMgr_ImageMapBoxOf(currentBox); - NW_ASSERT(imageMapBox); - - virtualImage = (NW_Image_Virtual_t*)imageMapBox->super.super.virtualImage; - NW_ASSERT(virtualImage); - - image = NW_Image_Epoc32SimpleOf (virtualImage->image); - - /* Save the text object in the dynamicVector */ - entry = (NW_HED_ViewImageList_Entry_t*)NW_ADT_DynamicVector_InsertAt(dynamicVector, NULL, - NW_ADT_Vector_AtEnd); - if (entry) - { - entry->rawData = (NW_Byte*)image->rawData; - entry->rawDataLen = image->rawDataLength; - entry->imageType = image->imageType; - - if (imageMapBox->iUrl) - { - entry->url = (NW_Ucs2*)imageMapBox->iUrl->storage; - } - else - { - entry->url = NULL; - } - - if (imageMapBox->super.super.altText) - { - entry->altText = (NW_Ucs2*)imageMapBox->super.super.altText->storage; - } - else - { - entry->altText = NULL; - } - } - } - } - -NW_Bool - -CView::IsZeroBox (const NW_LMgr_Box_t* box) const - - { - NW_GDI_Rectangle_t boxBounds; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - - CView* view = const_cast<CView*>(this); - boxBounds = view->GetBoxDisplayBounds(NW_LMgr_BoxOf(box)); - - if ((boxBounds.point.y == 0) && - (boxBounds.point.x == 0) && - - (boxBounds.dimension.height == 0) && - (boxBounds.dimension.height == 0)) - { - NW_LOG0(NW_LOG_LEVEL4, "[CView::IsZeroBox Error! (0.0; 0x0) box in the iTabList]"); - - return NW_TRUE; - - } - return NW_FALSE; - } - -//------------------------------------------------------------------------------- -// DrawDocumentPart ( from MPageScalerCallback ) -// -// -//------------------------------------------------------------------------------- -void CView::DrawDocumentPart( - CFbsBitGc& aGc, - CFbsBitmap* /*aBitmap*/, - const TRect& aDocumentAreaToDraw ) - { - TRect drawRect( aDocumentAreaToDraw ) ; - DrawHistory( aGc, drawRect ); - } - -//------------------------------------------------------------------------------- -// DocumentViewport ( from MPageScalerCallback ) -// -// -//------------------------------------------------------------------------------- -TRect CView::DocumentViewport() - { - return Rect(); - } - -//------------------------------------------------------------------------------- -// ScaledPageChanged ( from MPageScalerCallback ) -// -// -//------------------------------------------------------------------------------- -void CView::ScaledPageChanged( - const TRect& /*aRect*/, - TBool aFullScreen, - TBool aScroll ) - { - HistoryControllerInterface* historyController = &( iWmlControl->HistoryController() ); - if ( historyController->historyViewEnabled() && iDocumentFinished && !aScroll && aFullScreen) - { - // update the history with new bitmap - CFbsBitmap* scaledPage = iPageScaler->ScaledPage(); - if(scaledPage) - { - // Get the browser control rect - TRAP_IGNORE( iWmlControl->HistoryController().updateHistoryEntryThumbnailL(scaledPage)); - // ignore err since we will use the default image - } - - } - } - -//------------------------------------------------------------------------------- -// DocumentSize ( from MPageScalerCallback ) -// -// -//------------------------------------------------------------------------------- -TSize CView::DocumentSize() - { - TSize contentSize; - ContentSize( contentSize ); - return contentSize; - } - - -//------------------------------------------------------------------------------- -// InitializePageScalerL -// -//------------------------------------------------------------------------------- -void CView::InitializePageScalerL() - { - TBool lowQuality = !( iBrCtl->capabilities() & TBrCtlDefs::ECapabilityGraphicalHistory ); - iPageScaler = CPageScaler::NewL( *this, EColor64K, lowQuality ); - iPageScaler->SetVisible( EFalse ); - iBrCtl->setWmlPageScaler( *iPageScaler ); - } - - -//------------------------------------------------------------------------------- -// DrawPositionedBoxes -// -//------------------------------------------------------------------------------- -TBrowserStatusCode CView::DrawPositionedBoxes() - { - TBrowserStatusCode status = KBrsrSuccess; - if (!iRootBox->iPositionedBoxesPlaced) - return status; - NW_ADT_DynamicVector_t *positionedObjects = iRootBox->positionedAbsObjects; - TInt count = NW_ADT_Vector_GetSize(positionedObjects); - TUint16 index; - NW_LMgr_Box_t* positionedBox; - for (index = 0; index < count; index++) - { - positionedBox = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (positionedObjects, index); - Refresh(positionedBox); - } - return status; - } - -NW_Bool CView::FormatPositionedBoxes () - { - - NW_LMgr_Box_t *positionedBox; - NW_LMgr_PosFlowBox_t* tempPositionedBox; - NW_ADT_DynamicVector_t *positionedObjects = iRootBox->positionedAbsObjects; - // Place the positioned boxes only once - if (iRootBox->iPositionedBoxesPlaced) - return NW_FALSE; - - //handle positioned boxes - NW_ADT_Vector_Metric_t posCount, index; - posCount = NW_ADT_Vector_GetSize(positionedObjects); - for (index = 0; index < NW_ADT_Vector_GetSize(positionedObjects); index++) - { - positionedBox = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (positionedObjects, index); - if (!NW_Object_IsInstanceOf(positionedBox, &NW_LMgr_PosFlowBox_Class)) - { - NW_ASSERT(0); // should never happen - break; - } - ReformatBox(positionedBox); - tempPositionedBox = (NW_LMgr_PosFlowBox_t*)positionedBox; - if( (tempPositionedBox != NULL) && - (NW_Object_IsInstanceOf(tempPositionedBox, &NW_LMgr_PosFlowBox_Class) ) && - (tempPositionedBox->iContainingBlock != NULL) && - NW_Object_IsInstanceOf(tempPositionedBox->iContainingBlock, &NW_LMgr_Box_Class) ) - { - - NW_LMgr_PosFlowBox_HandlePostFormat((NW_LMgr_PosFlowBox_t*)positionedBox); - } - } - iRootBox->iPositionedBoxesPlaced = NW_TRUE; - return (posCount > 0); - - //return TRUE; - } - -void CView::ScrollTo(TPoint aPoint) - { - NW_GDI_Point2D_t origin; - origin.x = aPoint.iX; - origin.y = aPoint.iY; - if (iCurrentBox && NW_Object_IsInstanceOf(iCurrentBox, &NW_FBox_InputBox_Class) && - NW_FBox_InputBox_IsActive( iCurrentBox )) - { - if (!InputElementEditComplete( NW_TRUE )) - { - return; - } - } - TBool scrollDown = aPoint.iY > iDeviceContext->Origin()->y; - SetOrigin(&origin); - GetDeviceContext()->SetOrigin(&origin); - // Is box still visible? - TRect rect(0, 0, 0, 0); - NW_GDI_Rectangle_t displayBounds; - displayBounds = *(iDeviceContext->DisplayBounds()); - displayBounds.point = *(iDeviceContext->Origin()); - if (!iCurrentBox || !IsBoxVisible(iCurrentBox, &displayBounds)) - { - NW_LMgr_Box_t* box; - if (scrollDown) - { - box = GetVisibleBox(); - } - else - { - box = GetVisibleBoxReverse(); - } - if (box) - { - NW_LMgr_Box_SetHasFocus (iCurrentBox, NW_FALSE); - NW_LMgr_Box_SetHasFocus (box, NW_TRUE); - SetCurrentBox(box); - NW_LMgr_RootBox_SetFocusBox(iRootBox, box); - } - } - Draw(NW_TRUE); - } - - -// ============================ MEMBER FUNCTIONS =============================== diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/MVCViewAsyncInit.cpp --- a/webengine/wmlengine/src/MVC/src/MVCViewAsyncInit.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - - -// INCLUDE FILES -#include "MVCViewAsyncInit.h" - -// EXTERNAL DATA STRUCTURES -//extern ?external_data; - -// EXTERNAL FUNCTION PROTOTYPES -//extern ?external_function( ?arg_type,?arg_type ); - -// CONSTANTS -//const ?type ?constant_var = ?constant; - -// MACROS -//#define ?macro ?macro_def - -// LOCAL CONSTANTS AND MACROS -//const ?type ?constant_var = ?constant; -//#define ?macro_name ?macro_def - -// MODULE DATA STRUCTURES -//enum ?declaration -//typedef ?declaration - -// LOCAL FUNCTION PROTOTYPES -//?type ?function_name( ?arg_type, ?arg_type ); - -// FORWARD DECLARATIONS -//class ?FORWARD_CLASSNAME; - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::CViewAsyncInit -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CViewAsyncInit::CViewAsyncInit() : CActive(CActive::EPriorityUserInput) - { - CActiveScheduler::Add(this); - } - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CViewAsyncInit::ConstructL() - { - TRequestStatus* status = &iStatus; - SetActive(); - User::RequestComplete(status, KErrNone); - } - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CViewAsyncInit* CViewAsyncInit::NewL() - { - CViewAsyncInit* self = new( ELeave ) CViewAsyncInit; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// Destructor -CViewAsyncInit::~CViewAsyncInit() - { - - } - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::RunL -// Asynchronous handling of events. -// ----------------------------------------------------------------------------- -// -void CViewAsyncInit::RunL() -{ - iView->AsyncInit(); -} - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::DoCancel -// Call NPP_UrlNotify. -// ----------------------------------------------------------------------------- -// -void CViewAsyncInit::DoCancel() -{ -} - -// ----------------------------------------------------------------------------- -// CViewAsyncInit::RunError -// Handle Leave from RunL. -// ----------------------------------------------------------------------------- -// -TInt CViewAsyncInit::RunError(TInt /*aError*/) -{ - return KErrNone; -} - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/MVC/src/WimUi.cpp --- a/webengine/wmlengine/src/MVC/src/WimUi.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains functions for Digital Signing (WIM_ENABLED env. only) -* -*/ - - -#include <e32std.h> -#include "WimUi.h" - -// ------------------------------------------------------------------------- -// C++ default constructor can NOT contain any code that might leave -// CWimUi::CWimUi() -// ------------------------------------------------------------------------- -CWimUi::CWimUi(): -CActive(EPriorityStandard) -,iPinPukDialogType(EEnterPinG) -{ -} - -// ------------------------------------------------------------------------- -// EPOC default constructor can leave -// void CWimUi::ConstructL() -// ------------------------------------------------------------------------- -void CWimUi::ConstructL() -{ - iSecDlgs = WimSecurityDialogFactory::CreateL(); - CActiveScheduler::Add(this); -} - -// ------------------------------------------------------------------------- -// Two-phased constructor -// CWimUi* CWimUi::NewL() -// ------------------------------------------------------------------------- -CWimUi* CWimUi::NewL() -{ - CWimUi* ui = new (ELeave) CWimUi; - CleanupStack::PushL(ui); - ui->ConstructL(); - CleanupStack::Pop(); // ui - return ui; -} - -// ------------------------------------------------------------------------- -// Destructor -// CWimUi::~CWimUi() -// ------------------------------------------------------------------------- -CWimUi::~CWimUi() -{ - Cancel(); - delete iSecDlgs; -} - -// ------------------------------------------------------------------------- -// Converter -// LOCAL_C inline TPtrC PtrCFromTText(const TText* aText) -// ------------------------------------------------------------------------- -LOCAL_C inline TPtrC PtrCFromTText(const TText* aText) -{ - return (aText!=NULL ? TPtrC(aText) : TPtrC()); -} - -// ------------------------------------------------------------------------- -// Shows Sign Text Dialog -// void CWimUi::DoShowSignTextDialogL(void* data, void* callbackctx, void* callback) -// ------------------------------------------------------------------------- -void CWimUi::DoShowSignTextDialogL(void* data, void* callbackctx, void* callback) -{ - iData = data; - iCallbackCtx = callbackctx; - iCallback = callback; - - iDialogType = KSignTextRequested ; - - iSecDlgs->ShowNoteL(iStatus, EInfoSignTextRequested, - iBooleanValue, KNullDesC); - - SetActive(); -} - -// ------------------------------------------------------------------------- -// Shows Select Certificate Dialog -// void CWimUi::DoShowSelectCertificateDlgL(void* data, void* callbackctx, void* callback) -// ------------------------------------------------------------------------- -void CWimUi::DoShowSelectCertificateDlgL(void* data, void* callbackctx, void* callback) -{ - iData = data; - iCallbackCtx = callbackctx; - iCallback = callback; - iDialogType = KDSignDialogTypeSelectCert; - - CDesCArrayFlat* itemArray = new (ELeave) CDesCArrayFlat(10); - CleanupStack::PushL(itemArray); - - for (TInt i = 0 ; i < ((NW_Dlg_ListSelect_t*)data)->itemsCount; i++) - { - itemArray->AppendL(PtrCFromTText(((NW_Dlg_ListSelect_t*)data)->items[i])); - } - - // void ShowSelectCertificateDialogL(TRequestStatus& aStatus, - // TInt& aSelectedCertIndex, - // const MDesCArray& aCertificateLabels); - iSecDlgs->ShowSelectCertificateDialogL(iStatus,iBooleanValue, - iSelectedCertIndex, - *itemArray); - CleanupStack::PopAndDestroy(); // itemArray - SetActive(); -} - -// ------------------------------------------------------------------------- -// Shows Select Pin Code Query Dialog -// void CWimUi::DoShowPinCodeQueryDialogL(void* data, void* callbackctx, void* callback) -// ------------------------------------------------------------------------- -void CWimUi::DoShowPinCodeQueryDialogL(void* data, void* callbackctx, void* callback) -{ - iData = data; - iCallbackCtx = callbackctx; - iCallback = callback; - iDialogType = KDSignDialogTypePinCodeQuery; - TPtrC ptrTitle = ((NW_Dlg_InputPrompt_t*)(data))->title; - iParams.iWIMLabel.Format(ptrTitle); - TPtrC ptrPrompt = ((NW_Dlg_InputPrompt_t*)(data))->prompt; - iParams.iPINLabel.Format(ptrPrompt); - iParams.iMaxLength = KMaxPINInputLength; - iParams.iMinLength = KMinPINInputLength; - - - - // void ShowPinCodeQueryDialogL(TRequestStatus& aStatus, - // const TWIMPINParams& aParams, - // const TDialogType aPinPukDialogType, - // TPINValue& aPinValue); - iSecDlgs->ShowPinCodeQueryDialogL(iStatus, iBooleanValue, - iParams, - iPinPukDialogType, - iPinValue); - SetActive(); -} - -// ------------------------------------------------------------------------- -// Required function for CActive object. -// void CWimUi::RunL() -// ------------------------------------------------------------------------- -void CWimUi::RunL() -{ - if(iDialogType == KSignTextRequested) - { - iDialogType = KDSignDialogTypeSignText; - - iSecDlgs->ShowSignTextDialogL(iStatus, - iBooleanValue, - PtrCFromTText(((NW_Dlg_Prompt_t*)iData)->prompt)); - SetActive(); - return ; - } - - if (iDialogType == KDSignDialogTypeSignText) - { - if (iBooleanValue) - { - ((NW_Dlg_Prompt_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_Prompt_t*)iData)->button0; - } - else - { - ((NW_Dlg_Prompt_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_Prompt_t*)iData)->button1; - } - } - else if (iDialogType == KDSignDialogTypeSelectCert) - { - if (iBooleanValue) - { - ((NW_Dlg_ListSelect_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_ListSelect_t*)iData)->button0; - // conversion from NW_Uint8 to TInt - ((NW_Dlg_ListSelect_t*)iData)->selectedItem = (NW_Uint8)iSelectedCertIndex; - } - else - { - ((NW_Dlg_ListSelect_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_ListSelect_t*)iData)->button1; - } - - } - else if (iDialogType == KDSignDialogTypePinCodeQuery) - { - if (iBooleanValue) - { - - ((NW_Dlg_InputPrompt_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_InputPrompt_t*)iData)->button0; - - HBufC* zeroTerm = HBufC::NewLC(KMaxPINInputLength); - zeroTerm->Des().Copy(iPinValue); - - TInt length = zeroTerm->Length()+1; - NW_Mem_memcpy(((NW_Dlg_InputPrompt_t*)iData)->input, zeroTerm->Des().PtrZ(), (length+length)); - - CleanupStack::PopAndDestroy(); //zeroTerm - - } - else - { - ((NW_Dlg_InputPrompt_t*)iData)->selectedButton = (NW_Uint8)((NW_Dlg_InputPrompt_t*)iData)->button1; - - } - } - else - { - User::Leave(KErrNotSupported); - } - - if (iCallback) - { - if (iDialogType == KDSignDialogTypeSignText) - { - NW_Dlg_PromptCB_t* callback = (NW_Dlg_PromptCB_t*)iCallback; - (callback)((NW_Dlg_Prompt_t*)iData, iCallbackCtx); - } - else if (iDialogType == KDSignDialogTypeSelectCert) - { - NW_Dlg_ListSelectCB_t* callback = (NW_Dlg_ListSelectCB_t*)iCallback; - (callback)((NW_Dlg_ListSelect_t*)iData, iCallbackCtx); - } - else if (iDialogType == KDSignDialogTypePinCodeQuery) - { - NW_Dlg_InputPromptCB_t* callback = (NW_Dlg_InputPromptCB_t*)iCallback; - (callback)((NW_Dlg_InputPrompt_t*)iData, iCallbackCtx); - } - else - { - User::Leave(KErrNotSupported); - } - } -} - -// ------------------------------------------------------------------------- -// Required function for CActive object. -// void CWimUi::DoCancel() -// ------------------------------------------------------------------------- -void CWimUi::DoCancel() -{ -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/MakeMsg --- a/webengine/wmlengine/src/Msg/MakeMsg Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeMsg -TARGET = rbTempest_msg_lib.a - -SUBDIRS = src - -SUBMAKES = MakeSrc - -OBJS = src/rbTempest_msg_src_lib.a - -SRCS = - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE_RECURSIVE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/MSGMessageListener.h --- a/webengine/wmlengine/src/Msg/include/MSGMessageListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef MSGMESSAGELISTENER_H -#define MSGMESSAGELISTENER_H - -// INCLUDES - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -struct NW_Msg_Message_s; -typedef struct NW_Msg_Message_s NW_Msg_Message_t; - -// CLASS DECLARATION - -/** -* Base class for. -* -* @lib msg.lib -* @since 2.6 -*/ -class MMessageListener -{ - - public: - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void HandleMessage (NW_Msg_Message_t* message) = 0; - -}; - -#endif // MSGMESSAGELISTENER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/NW_Msg_EXPORT.h --- a/webengine/wmlengine/src/Msg/include/NW_Msg_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Msg_EXPORT_h_ -#define _NW_Msg_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_MSG_EXPORT -#ifdef NW_IMPORT -#define NW_MSG_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_MSG_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_MSG_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Msg_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/nw_msg_message.h --- a/webengine/wmlengine/src/Msg/include/nw_msg_message.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MSG_MESSAGE_H -#define NW_MSG_MESSAGE_H - -#include "nw_object_dynamic.h" -#include "NW_Msg_EXPORT.h" - -#include "MSGMessageListener.h" -#include "nwx_msg_api.h" -#include <e32base.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Msg_Message_Class_s NW_Msg_Message_Class_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Msg_Message_ClassPart_s { - void** unused; -} NW_Msg_Message_ClassPart_t; - -struct NW_Msg_Message_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Msg_Message_ClassPart_t NW_Msg_Message; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Msg_Message_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_Msg_Type_t msgId; - NW_Object_t* data; - NW_Bool ownsData; - CActive::TPriority iPriority; - MMessageListener* messageTarget; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Msg_Message_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Msg_Message)) - -#define NW_Msg_MessageOf(_object) \ - (NW_Object_Cast (_object, NW_Msg_Message)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MSG_EXPORT const NW_Msg_Message_Class_t NW_Msg_Message_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Msg_Message_GetMessageId(_thisObj) \ - ((NW_Msg_Type_t)NW_Msg_MessageOf(_thisObj)->msgId) - -#define NW_Msg_Message_GetData(_thisObj) \ - ((NW_Object_t*)NW_Msg_MessageOf(_thisObj)->data) - -#define NW_Msg_Message_SetListener(_thisObj, _listener) \ - (NW_Msg_MessageOf(_thisObj)->messageTarget = (_listener)) - -#define NW_Msg_Message_GetListener(_thisObj) \ - ((MMessageListener*)NW_Msg_MessageOf(_thisObj)->messageTarget) - -#define NW_Msg_Message_SetPriority( _thisObj, _priority ) \ - (NW_Msg_MessageOf(_thisObj)->iPriority = (_priority)) - -#define NW_Msg_Message_GetPriority( _thisObj ) \ - ((CActive::TPriority)NW_Msg_MessageOf(_thisObj)->iPriority) -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_MSG_EXPORT -NW_Msg_Message_t* -NW_Msg_Message_New (NW_Msg_Type_t messageId, NW_Object_t* data, NW_Bool ownsData); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MSG_MESSAGE_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/nw_msg_messagedispatcher.h --- a/webengine/wmlengine/src/Msg/include/nw_msg_messagedispatcher.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MSG_MESSAGEDISPATCHER_H -#define NW_MSG_MESSAGEDISPATCHER_H - -#include "nw_object_base.h" -#include "NW_Msg_EXPORT.h" - -#include "nw_msg_message.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Msg_MessageDispatcher_Class_s NW_Msg_MessageDispatcher_Class_t; -typedef struct NW_Msg_MessageDispatcher_s NW_Msg_MessageDispatcher_t; - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Msg_MessageDispatcher_ClassPart_s { - void** unused; -} NW_Msg_MessageDispatcher_ClassPart_t; - -struct NW_Msg_MessageDispatcher_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Msg_MessageDispatcher_ClassPart_t NW_Msg_MessageDispatcher; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ - struct NW_Msg_MessageDispatcher_s { - NW_Object_Core_t super; - -#ifdef NEEDS_SYMBIAN_IMPLEMENTATION -/* NW_Bool isBrowserRunning; Kimono can't have non-const static data */ -#endif - -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Msg_MessageDispatcher_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Msg_MessageDispatcher)) - -#define NW_Msg_MessageDispatcherOf(_object) \ - (NW_Object_Cast (_object, NW_Msg_MessageDispatcher)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MSG_EXPORT const NW_Msg_MessageDispatcher_Class_t NW_Msg_MessageDispatcher_Class; -NW_MSG_EXPORT const NW_Msg_MessageDispatcher_t NW_Msg_MessageDispatcher; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef NEEDS_SYMBIAN_IMPLEMENTATION - RBCore uses non-const static data for isBrowserRunning, which does not work with - the SymbianOS. - -#define NW_Msg_MessageDispatcher_SetBrowserState(_thisObj, _state) \ - (NW_Msg_MessageDispatcherOf(_thisObj)->isBrowserRunning = (_state)) - -#define NW_Msg_MessageDispatcher_GetBrowserState(_thisObj) \ - ((NW_Bool)NW_Msg_MessageDispatcherOf(_thisObj)->isBrowserRunning) - -#endif - -NW_MSG_EXPORT -TBrowserStatusCode -NW_Msg_MessageDispatcher_DispatchMessage (const NW_Msg_MessageDispatcher_t* thisObj, - NW_Msg_Message_t* message, - MMessageListener* listener); - -NW_MSG_EXPORT -TBrowserStatusCode -NW_Msg_MessageDispatcher_MessageHandler (NW_Msg_t* msg); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MSG_MESSAGEDISPATCHER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/nw_msg_messagedispatcheri.h --- a/webengine/wmlengine/src/Msg/include/nw_msg_messagedispatcheri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MSG_MESSAGEDISPATCHERI_H -#define NW_MSG_MESSAGEDISPATCHERI_H - -#include "nw_object_basei.h" -#include "nw_msg_messagedispatcher.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MSG_MESSAGEDISPATCHERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/include/nw_msg_messagei.h --- a/webengine/wmlengine/src/Msg/include/nw_msg_messagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MSG_MESSAGEI_H -#define NW_MSG_MESSAGEI_H - -#include "nw_object_dynamici.h" -#include "nw_msg_message.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_MSG_EXPORT -TBrowserStatusCode -_NW_Msg_Message_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_MSG_EXPORT -void -_NW_Msg_Message_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MSG_MESSAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/src/MakeSrc --- a/webengine/wmlengine/src/Msg/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_msg_src_lib.a - -SUBDIRS = - -SUBMAKES = - -SRCS = IMessageListener.c Message.c MessageDispatcher.c - - - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/src/Message.cpp --- a/webengine/wmlengine/src/Msg/src/Message.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_msg_messagei.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Msg_Message_Class_t NW_Msg_Message_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Msg_Message_t), - /* construct */ _NW_Msg_Message_Construct, - /* destruct */ _NW_Msg_Message_Destruct - }, - { /* NW_Msg_Message */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - public/protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Msg_Message_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_Msg_Message_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_Msg_Message_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_Msg_MessageOf (dynamicObject); - - /* initialize the member variables */ - thisObj->msgId = (NW_Msg_Type_t) va_arg (*argList, NW_Uint32); - thisObj->data = (NW_Object_t*) va_arg (*argList, NW_Object_t*); - thisObj->ownsData = (NW_Bool) va_arg (*argList, NW_Uint32); - thisObj->iPriority = ((CActive::TPriority)( CActive::EPriorityLow + 2 )); - return KBrsrSuccess; -} - -void -_NW_Msg_Message_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_Msg_Message_t* thisObj; - - /* cast the 'object' for convenience */ - thisObj = NW_Msg_MessageOf (dynamicObject); - - if (thisObj->ownsData) { - NW_Object_Delete (thisObj->data); - thisObj->data = NULL; - } -} - -/* ------------------------------------------------------------------------- */ -NW_Msg_Message_t* -NW_Msg_Message_New (NW_Msg_Type_t messageId, NW_Object_t* data, NW_Bool ownsData) -{ - return (NW_Msg_Message_t*) NW_Object_New (&NW_Msg_Message_Class, (NW_Uint32)messageId, - data, (NW_Uint32)ownsData); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Msg/src/MessageDispatcher.cpp --- a/webengine/wmlengine/src/Msg/src/MessageDispatcher.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_msg_messagedispatcheri.h" -#include "BrsrStatusCodes.h" - -/* -------------------------------------------------------------------------- * - class definition - * ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- */ -const -NW_Msg_MessageDispatcher_Class_t NW_Msg_MessageDispatcher_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Msg_MessageDispatcher */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -//#pragma message(__FILE__ " TODO: Implement isBrowserRunning without non-const static variable") - -const NW_Msg_MessageDispatcher_t NW_Msg_MessageDispatcher = { - { &NW_Msg_MessageDispatcher_Class }, - -/* { NW_FALSE } */ -}; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Msg_MessageDispatcher_DispatchMessage (const NW_Msg_MessageDispatcher_t* thisObj, - NW_Msg_Message_t* message, - MMessageListener* listener) -{ - NW_Msg_t* msg = NULL; - NW_Msg_Address_t myAddress; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (message != NULL); - NW_ASSERT (listener != NULL); - - (void)thisObj; - - NW_TRY (status) { - /* get our address */ - status = NW_Msg_GetThisReceiver (&myAddress); - NW_ASSERT (status == KBrsrSuccess); - - /* construct the message */ - msg = NW_Msg_New (0, myAddress, myAddress, NW_MSG_MSG_DSP_HANDLE_MESSAGE); - NW_THROW_OOM_ON_NULL (msg, status); - - msg->data = message; - - /* set the message's listener */ - NW_Msg_Message_SetListener (message, listener); - - /* send the message */ - status = NW_Msg_Send (msg); - NW_THROW_ON_ERROR (status); - - msg = NULL; - } - - NW_CATCH (status) { - NW_Msg_Delete (msg); - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Msg_MessageDispatcher_MessageHandler (NW_Msg_t* msg) -{ - NW_Msg_Message_t* message = NULL; - MMessageListener* listener; - - NW_ASSERT (msg != NULL); - -#ifdef NEEDS_SYMBIAN_IMPLEMENTATION - /* get our address */ - if(!NW_Msg_MessageDispatcher_GetBrowserState(&NW_Msg_MessageDispatcher)) { - NW_Msg_Delete (msg); - regturn kBrsrFailure; - } -#endif - - /* get the message */ - message = NW_Msg_MessageOf (msg->data); - - /* dispatch the message to the listener */ - listener = NW_Msg_Message_GetListener (message); - - listener->HandleMessage (message); - - /* clean up */ - NW_Msg_Delete (msg); - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/inc/ScrollBar.h --- a/webengine/wmlengine/src/Scrolling/inc/ScrollBar.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -/* -* Copyright (c) 2002-2204 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Definition of the Browser On-screen scrollbar -* -*/ - -#ifndef SCROLLBAR_H -#define SCROLLBAR_H - -//---------------------------------------------------------------------------- -// INCLUDES -//---------------------------------------------------------------------------- -#include <coecntrl.h> -#include <e32std.h> - -//---------------------------------------------------------------------------- -// CONSTANTS -//---------------------------------------------------------------------------- -const TInt KTrackBkgdThickness = 1; // Thickness of the scrollbar track - -//---------------------------------------------------------------------------- -// FORWARD DECLARATIONS -//---------------------------------------------------------------------------- -class CScrollThumb; - -//---------------------------------------------------------------------------- -// CLASS DEFINITION -//---------------------------------------------------------------------------- - -/** -* Browser On-screen scrollbar -* -* @since Series60_version 2.5 -*/ -class CScrollBar : public CCoeControl - { - public: - - // Used by scrollbars and its components to detemine the orientation of - // a scrollbar - enum TOrientation - { - EVertical, - EHorizontal - }; - - //------------------------------------------------------------------ - // Constructors and Destructors - Public - //------------------------------------------------------------------ - public: - - /** - * Two-phased constructor. - */ - static CScrollBar* NewL(const TOrientation aOrientation, - const CCoeControl& aParent); - /** - * Destructor. - */ - virtual ~CScrollBar(); - - //------------------------------------------------------------------ - // Inherited Member Functions - Public - //------------------------------------------------------------------ - public: - - virtual void Draw(const TRect& aRect) const; - - //------------------------------------------------------------------ - // Member Functions - Public - //------------------------------------------------------------------ - public: - - /** - * Sets the rect for the scroll bar and its background - * @since Series60_version 2.5 - * @param aRect - the rectangle in which the scrollbar is drawn into - * @return none - */ - void SetTrackAndBackground(const TRect& aRect); - - //------------------------------------------------------------------ - // Member Functions - Public - Get/Set - //------------------------------------------------------------------ - public: - - /** - * Calls SetRect() on iThumb - * @since Series60_version 2.5 - * @param aRect - the rectangle for the scrollbar thumb - * @return none - */ - void SetThumb(const TRect& aRect); - - /** - * Sets the orientation of the scrollbar - * @since Series60_version 2.5 - * @param aOrientation - the orientation of the scrollbar - * @return none - */ - inline void SetOrientation(const TOrientation aOrientation) - { iOrientation = aOrientation; } - - //------------------------------------------------------------------ - // Constructors and Destructors - Private - //------------------------------------------------------------------ - private: - - /** - * C++ default constructor. - */ - CScrollBar(const TOrientation aOrientation); - - /** - * Symbian 2nd phase constructor - */ - void ConstructL(const CCoeControl& aParent); - - //------------------------------------------------------------------ - // Inherited Member Functions - Private - //------------------------------------------------------------------ - private: - - /** - * From CCoeControl, CountComponentControls - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl, SizeChanged - */ - virtual void SizeChanged(); - - /** - * From CCoeControl, ComponentControl - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - //------------------------------------------------------------------ - // Member Functions - Private - //------------------------------------------------------------------ - private: - - /** - * Sets the colours of a scrollbar - * @since Series60_version 2.5 - * @param aTrackColour - the colour of the track - * @param aTrackBkgdColour - the colour of the track background - * @return none - */ - void SetTrackColours(const TRgb aTrackColour, const TRgb aTrackBkgdColour); - - //------------------------------------------------------------------ - // Member Data - Public - //------------------------------------------------------------------ - public: - - CScrollThumb* iThumb; // Scrollbar Thumb - owned - - //------------------------------------------------------------------ - // Member Data - Private - //------------------------------------------------------------------ - private: - TOrientation iOrientation; // Scrollbar orientation - - TRgb iTrackColour; // track colour (track aka 'shaft') - TRgb iTrackBkgdColour; // track background colour (track aka 'shaft') - - TRect iTrackCentre; // the rect of the track shown inside the track shadow -}; - -#endif // SCROLLBAR_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/inc/ScrollBarFrame.h --- a/webengine/wmlengine/src/Scrolling/inc/ScrollBarFrame.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,267 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Definition of the Browser On-screen scrollbar frame -* and browser scrollbar corner window -* -*/ - -#ifndef SCROLLBARFRAME_H -#define SCROLLBARFRAME_H - -//---------------------------------------------------------------------- -// INCLUDES -//---------------------------------------------------------------------- -#include "ScrollBar.h" -#include <e32std.h> -#include <coecntrl.h> - -// Browser as a Plugin includes -#include <BrCtlInterface.h> - -//---------------------------------------------------------------------- -// CONSTANTS -//---------------------------------------------------------------------- -const TInt KBrowserVScrollBarWidth = 6; // V Scrollbar Width -const TInt KBrowserHScrollBarHeight = 6; // H Scrollbar Height - -const TInt KBrowserVScrollBarMaxLen = 204; // The maximum height of the vertical scrollbar - -const TInt KBrowserMaxDisplayWidth = 176; // Display Width -const TInt KConvertToNegativeValue = -1; // used to convert numbers to negative - -//---------------------------------------------------------------------- -// FORWARD DECLARATIONS -//---------------------------------------------------------------------- -class CScrollBar; - -//---------------------------------------------------------------------- -// CLASS DEFINITION - only used in CScrollBarFrame -//---------------------------------------------------------------------- -/** -* Browser scrollbar corner window -* -* @since Series60_version 2.5 -*/ -class CScrollBarCornerWindow : public CCoeControl - { - //------------------------------------------------------------------ - // Constructors and Destructors - //------------------------------------------------------------------ - public: - static CScrollBarCornerWindow* NewL(const CCoeControl& aParent); - virtual ~CScrollBarCornerWindow(); - - // Inherited Functions - void Draw(const TRect& aRect) const; - private: - void ConstructL(const CCoeControl& aParent); - - }; - - -//---------------------------------------------------------------------- -// CLASS DEFINITION -//---------------------------------------------------------------------- -/** -* Browser scrollbar frame -* @since Series60_version 2.5 -*/ -class CScrollBarFrame : public CBase - { - //------------------------------------------------------------------ - // Constructors and Destructors - Public - //------------------------------------------------------------------ - public: - - /** - * Two-phased constructor. - */ - static CScrollBarFrame* NewL(const CCoeControl& aParent); - - /** - * Destructor. - */ - virtual ~CScrollBarFrame(); - - //------------------------------------------------------------------ - // Member Functions - Get/Set Funtions - Public - //------------------------------------------------------------------ - public: - - /** - * Sets the layout indicator - * @since Series60_version 2.5 - * @param aLayout - webpage layout - * @return none - */ - inline void SetLayout(const TBrCtlLayout aLayout) { iLayout = aLayout; } - /** - * Returns the layout indicator value - * @since Series60_version 2.5 - * @return MBrCtlLayoutObserver::TBrCtlLayout - layout of the webpage - */ - inline const TBrCtlLayout Layout() { return iLayout; } - - /** - * Returns the vertical scrollbar - * @since Series60_version 2.8 - * @return MBrCtlLayoutObserver::TBrCtlLayout - layout of the webpage - */ - inline const CScrollBar* VScrollBar() {return iVScrollBar;} - - /** - * Returns the horizontal scrollbar - * @since Series60_version 2.8 - * @return MBrCtlLayoutObserver::TBrCtlLayout - layout of the webpage - */ - inline const CScrollBar* HScrollBar() {return iHScrollBar;} - - /** - * Sets the display height - * @since Series60_version 2.5 - * @param aHeight - display height - * @return none - */ - void SetDisplayHeight(const TInt aHeight); - - /** - * Sets the display width - * @since Series60_version 2.5 - * @param aWidth - display width - * @return none - */ - void SetDisplayWidth(const TInt aWidth); - - /** - * Gets the display rect - * @since Series60_version 2.5 - * @return TRect& - the display rectangle - */ - const TRect& Display() const { return iDisplay; } - - //------------------------------------------------------------------ - // Member Functions - Public - //------------------------------------------------------------------ - public: - - /** - * Updates the vertical scrollbar - * @since Series60_version 2.5 - * @return none - */ - void UpdateVScrollBarL(); - - /** - * Updates the Horizontal scrollbar - * @since Series60_version 2.5 - * @return none - */ - void UpdateHScrollBarL(); - - /** - * Sets indicator relating to the webpage layout - * @since Series60_version 2.5 - * @param aLayout - the layout of the webpage - * @return none - */ - void NotifyLayoutChange(TBrCtlLayout aLayout); - - /** - * Determines whether a vertical scroll bar will be required - * and the space required for the scrollbar - * @since Series60_version 2.5 - * @param aDocument - height of the webpage - * @param aDisplay - height of the display - * @param aDisplayPos - vertical position of display in webpage - * @return none - */ - TInt VScrollBarNeeded(TInt aDocument, TInt aDisplay, TInt aDisplayPos); - - /** - * Determines whether a horizontal scroll bar will be required - * and the space required for the scrollbar - * @since Series60_version 2.5 - * @param aDocument - width of the webpage - * @param aDisplay - width of the display - * @param aDisplayPos - horizontal position of display in webpage - * @param aDisplayHeight - vertical position of display in webpage - * @return none - */ - TInt HScrollBarNeeded(TInt aDocument, TInt aDisplay, TInt aDisplayPos, - TInt aDisplayHeight); - - inline TInt VScrollBarWidth() { return KBrowserVScrollBarWidth; } - - //------------------------------------------------------------------ - // Constructors and Destructors - Private - //------------------------------------------------------------------ - private: - - /** - * C++ default constructor. - */ - CScrollBarFrame(); - - /** - * Symbian 2nd phase constructor - */ - void ConstructL( const CCoeControl& aParent ); - - //------------------------------------------------------------------ - // Member Functions - Private - //------------------------------------------------------------------ - private: - - /** - * Calculates dimensions of the scroll bar and forwards to scrollbar - * @since Series60_version 2.5 - * @param aOrientation - scrollbar orientation - * @return none - */ - void SetScrollBar(const CScrollBar::TOrientation aOrientation); - - /** - * Calculates dimensions of the thumb and forwards to scrollbar thumb - * @since Series60_version 2.5 - * @param aOrientation - scrollbar orientation - * @return none - */ - void SetThumb(CScrollBar::TOrientation aOrientation); - - //------------------------------------------------------------------ - // Member Data - Public - //------------------------------------------------------------------ - public: - - // Scrollbars - CScrollBar* iVScrollBar; // owned - CScrollBar* iHScrollBar; // owned - - // Corner Window - only used with a scrollbar pair - CScrollBarCornerWindow* iCornerWindow; // owned - - //------------------------------------------------------------------ - // Member Data - Private - //------------------------------------------------------------------ - private: - - TRect iDocument; // web page - TRect iDisplay; // display - TPoint iDisplayPos; // position of display within web page - - TRect iScrollBarRect; // TRect outside iDisplay where scrollbars are drawn - TBrCtlLayout iLayout; // is scrolling left to right OR right to left -}; - -#endif // SCROLLBARFRAME_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/inc/ScrollThumb.h --- a/webengine/wmlengine/src/Scrolling/inc/ScrollThumb.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Definition of the Browser On-screen scrollbar thumb -* -*/ - -#ifndef _SCROLLTHUMB_H -#define _SCROLLTHUMB_H - -//----------------------------------------------------------------------- -// INCLUDES -//----------------------------------------------------------------------- -#include "ScrollBar.h" - -#include <coecntrl.h> -#include <e32std.h> - -//----------------------------------------------------------------------- -// CONSTANTS -//----------------------------------------------------------------------- -const TInt KShadowThickness = 1; // thickness of the shadow of the thumb - -//----------------------------------------------------------------------- -// CLASS DEFINITION -//----------------------------------------------------------------------- -// -/** -* Browser On-screen scrollbar thumb -* -* @since Series60_version 2.5 -*/ -class CScrollThumb : public CCoeControl - { - //------------------------------------------------------------------ - // Constructors and Destructors - Public - //------------------------------------------------------------------ - public: - - /** - * Two-phased constructor. - */ - static CScrollThumb* NewL(CScrollBar::TOrientation aOrientation); - - /** - * Destructor. - */ - virtual ~CScrollThumb(); - - //------------------------------------------------------------------ - // Member Functions - Public - //------------------------------------------------------------------ - public: - - void Draw(const TRect& aRect) const; - - /** - * Sets the rect of the thumb and its shadow - * @since Series60_version 2.5 - * @param aRect - rectangle of the thumb - * @return none - */ - void SetThumbAndShadow(const TRect& aRect); - - //------------------------------------------------------------------ - // Constructors and Destructors - Private - //------------------------------------------------------------------ - private: - - /** - * C++ default constructor. - */ - CScrollThumb(CScrollBar::TOrientation aOrientation); - - /** - * Symbian 2nd phase constructor - */ - void ConstructL(); - - //------------------------------------------------------------------ - // Inherited Member Functions - Private - //------------------------------------------------------------------ - private: - - /** - * From CCoeControl, SizeChanged - */ - virtual void SizeChanged(); - - //------------------------------------------------------------------ - // Member Functions - Private - //------------------------------------------------------------------ - private: - - /** - * Sets the colours of a thumb - * @since Series60_version 2.5 - * @param aThumbColour - the colour of the thumb - * @param aThumbShadowColour - the colour of the thumb shadow - * @return none - */ - void SetThumbColours(TRgb aThumbColour, TRgb aThumbShadowColour); - - //------------------------------------------------------------------ - // Member Data - Private - //------------------------------------------------------------------ - private: - CScrollBar::TOrientation iOrientation; // Orientation of the thumb - - TRect iThumbShadow; // The outline of the thumb - TRect iThumbCentre; // the rect of the thumb shown inside the thumb shadow - - TRgb iThumbColour; // the colour of the thumb - TRgb iThumbShadowColour; // the colour of the thumb shadow - }; - -#endif // _SCROLLTHUMB_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/src/ScrollBar.cpp --- a/webengine/wmlengine/src/Scrolling/src/ScrollBar.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the CScrollBar class. -* -*/ - -#include "ScrollBar.h" -#include "ScrollThumb.h" - - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------------------- -// CScrollBar* CScrollBar::NewL(const TOrientation aOrientation, const CCoeControl& aParent) -// -// Two-phased constructor -//---------------------------------------------------------------------------------------- -// -CScrollBar* CScrollBar::NewL(const TOrientation aOrientation, const CCoeControl& aParent) - { - CScrollBar* self = new (ELeave) CScrollBar(aOrientation); - CleanupStack::PushL(self); - self->ConstructL(aParent); - CleanupStack::Pop(self); // self - return self; - } - - -//---------------------------------------------------------------------------------------- -// CScrollBar::CScrollBar(const TOrientation aOrientation) -// -// First Phase Construction -//---------------------------------------------------------------------------------------- -// -CScrollBar::CScrollBar(const TOrientation aOrientation) - { - const TRgb KTrackColour = 0xC0C0C0; // light grey - const TRgb KTrackBkgdColour = KRgbWhite; - - SetOrientation(aOrientation); - SetTrackColours(KTrackColour, KTrackBkgdColour); - } - - -//---------------------------------------------------------------------------------------- -// CScrollBar::ConstructL(const CCoeControl& aParent) -// -// EPOC Second Phase Constructor -//---------------------------------------------------------------------------------------- -// -void CScrollBar::ConstructL(const CCoeControl& aParent) - { - SetContainerWindowL(aParent); - - SetRect(TRect(0, 0, 0, 0)); - - iThumb = CScrollThumb::NewL(iOrientation); - - iThumb->SetContainerWindowL(*this); - ActivateL(); - } - - -//-------------------------------------------------- -// CScrollBar::~CScrollBar() -// -// DESTRUCTOR -//-------------------------------------------------- -// -CScrollBar::~CScrollBar() - { - delete iThumb; - } - - -//------------------------------------------------------- -// void CScrollBar::Draw( const TRect& /*aRect*/ ) const -// -// Draws a scroll bar -//------------------------------------------------------- -// -void CScrollBar::Draw(const TRect& /*aRect*/) const - { - CWindowGc& gc = SystemGc(); - - // Draw Track Background - it always redraws the rectangle. - gc.SetPenStyle( CGraphicsContext::ESolidPen ); - gc.SetPenColor( iTrackBkgdColour ); - gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); - gc.SetBrushStyle( CGraphicsContext::ENullBrush ); - gc.SetBrushColor( iTrackBkgdColour ); - gc.DrawRect( Rect() ); - - // Draw Track - iTrackCentre can be 'null' rectangle - // (e.g. until SetTrackAndBackground is not called), - // so in that case the following will not draw anything. - gc.SetPenStyle( CGraphicsContext::ENullPen ); - gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); - gc.SetBrushColor( iTrackColour ); - gc.DrawRect(iTrackCentre); - } - - -// --------------------------------------------------------- -// TInt CScrollBar::CountComponentControls() const -// --------------------------------------------------------- -// -TInt CScrollBar::CountComponentControls() const - { - return 1; - } - - - -// --------------------------------------------------------- -// void CScrollBar::SizeChanged() const -// --------------------------------------------------------- -// -void CScrollBar::SizeChanged() - { - } - - -// -------------------------------------------------------------- -// CCoeControl* CScrollBar::ComponentControl(TInt aIndex) const -// -------------------------------------------------------------- -// -CCoeControl* CScrollBar::ComponentControl(TInt aIndex) const - { - switch (aIndex) - { - case 0: - return iThumb; - - default: - return NULL; - } - //lint -e{1763} Error -- (Info -- Member function 'CBrCtl::ComponentControl(int) const' marked as const indirectly modifies class) - } - -//------------------------------------------------------------------------ -// void CScrollBar::SetTrackColours(const TRgb aTrackColour, -// const TRgb aTrackBkgdColour) -// Sets colours for scroll bar -//------------------------------------------------------------------------ -// -void CScrollBar::SetTrackColours(const TRgb aTrackColour, - const TRgb aTrackBkgdColour) - { - iTrackColour = aTrackColour; - iTrackBkgdColour = aTrackBkgdColour; - } - - -//------------------------------------------------------------------------ -// void CScrollBar::SetThumb(TRect& aRect) -// -// Sets the rect of a scrollbar thumb -//------------------------------------------------------------------------ -// -void CScrollBar::SetThumb(const TRect& aRect) - { - iThumb->SetRect(aRect); - } - - -//------------------------------------------------------------------------ -// void CScrollBar::SetTrackAndBackground(const TRect& aRect) -//------------------------------------------------------------------------ -// -void CScrollBar::SetTrackAndBackground(const TRect& aRect) - { - SetRect(aRect); - - // Fit into background - iTrackCentre = aRect; - iTrackCentre.Shrink(KTrackBkgdThickness, KTrackBkgdThickness); - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/src/ScrollBarFrame.cpp --- a/webengine/wmlengine/src/Scrolling/src/ScrollBarFrame.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,426 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CScrollBarFrame and -* CScrollBarCornerWindow -* -*/ - -#include "ScrollBarFrame.h" -#include "ScrollBar.h" -#include "ScrollThumb.h" - -#include <e32std.h> -#include <e32def.h> -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -//-------------------------------------------------------------------- -// CScrollBarFrame::NewL(const CCoeControl& aParent) -// -// Two-phased construction -//-------------------------------------------------------------------- -// -CScrollBarFrame* CScrollBarFrame::NewL(const CCoeControl& aParent) - { - CScrollBarFrame* self = new (ELeave) CScrollBarFrame(); - CleanupStack::PushL(self); - self->ConstructL(aParent); - CleanupStack::Pop(); // self - return self; - } - -//-------------------------------------------------------------------- -// CScrollBarFrame::CScrollBarFrame() -// -// First Phase Construction -//-------------------------------------------------------------------- -// -CScrollBarFrame::CScrollBarFrame() - { - SetLayout(EOriginTopLeft); - } - -//-------------------------------------------------------------------- -// CScrollBarFrame::ConstructL(const CCoeControl& aParent) -// -// Second Phase Constructor -//-------------------------------------------------------------------- -// -void CScrollBarFrame::ConstructL(const CCoeControl& aParent) - { - // Create Scroll Bars - iVScrollBar = CScrollBar::NewL(CScrollBar::EVertical, aParent); - iHScrollBar = CScrollBar::NewL(CScrollBar::EHorizontal, aParent); - - iCornerWindow = CScrollBarCornerWindow::NewL(aParent); - } - - -//-------------------------------------------------------------------- -// CScrollBarFrame::~CScrollBarFrame() -// -// DESTRUCTOR -//-------------------------------------------------------------------- -// -CScrollBarFrame::~CScrollBarFrame() - { - delete iCornerWindow; - delete iVScrollBar; - delete iHScrollBar; - } - -//-------------------------------------------------------------------- -// void CScrollBarFrame::UpdateVScrollBarL() -//-------------------------------------------------------------------- -// -void CScrollBarFrame::UpdateVScrollBarL() - { - SetScrollBar(CScrollBar::EVertical); - } - -//-------------------------------------------------------------------- -// void CScrollBarFrame::UpdateHScrollBarL() -//-------------------------------------------------------------------- -// -void CScrollBarFrame::UpdateHScrollBarL() - { - SetScrollBar(CScrollBar::EHorizontal); - } - - -//----------------------------------------------------------------------------- -// void CScrollBarFrame::NotifyLayoutChange(TBrCtlLayout aLayout) -//----------------------------------------------------------------------------- -// -void CScrollBarFrame::NotifyLayoutChange(TBrCtlLayout aLayout) - { - iLayout = aLayout; - } - - -//----------------------------------------------------------------------------- -// void CScrollBarFrame::SetScrollBar(const CScrollBar::TOrientation aOrientation) -//----------------------------------------------------------------------------- -// -void CScrollBarFrame::SetScrollBar(const CScrollBar::TOrientation aOrientation) - { - // scrollbar coordinates - TInt tlX(0); - TInt tlY(0); - TInt brX(0); - TInt brY(0); - - TInt height = iDisplay.Height(); - TInt width = iDisplay.Width(); - - // Set Vertical Scroll Bar - // Calculate size and position of Vertical Scroll Bar - if (aOrientation == CScrollBar::EVertical) - { - switch (iLayout) - { - case EOriginTopLeft: - { - tlX = width; - tlY = 0; - brX = width + KBrowserVScrollBarWidth; - brY = height; - break; - } - case EOriginTopRight: - { - tlX = 0; - tlY = 0; - brX = KBrowserVScrollBarWidth; - brY = height; - break; - } - default: - break; - } - iVScrollBar->SetTrackAndBackground(TRect(tlX, tlY, brX, brY)); - } - - // Set Horizontal Scroll Bar - else - { - // If we need a horizontal scrollbar - if (iDocument.Width() > iDisplay.Width()) - { - TRect cornerWindow; - switch (iLayout) - { - case EOriginTopLeft: - { - tlX = 0; - tlY = height; - brX = width; - brY = height + KBrowserHScrollBarHeight; - - cornerWindow.SetRect(width, height, - width + KBrowserVScrollBarWidth, - height + KBrowserHScrollBarHeight); - iCornerWindow->SetRect(cornerWindow); - break; - } - case EOriginTopRight: - { - tlX = KBrowserVScrollBarWidth; - tlY = height; - brX = width + KBrowserVScrollBarWidth; - brY = height + KBrowserHScrollBarHeight; - - cornerWindow.SetRect(0, height, KBrowserVScrollBarWidth, - height + KBrowserHScrollBarHeight); - iCornerWindow->SetRect(cornerWindow); - break; - } - default: - break; - } - } - iHScrollBar->SetTrackAndBackground(TRect(tlX, tlY, brX, brY)); - } - - // Set scrollbar thumb attributes - SetThumb(aOrientation); - - if (aOrientation == CScrollBar::EVertical) - { - iVScrollBar->DrawNow(); - } - else - { - iHScrollBar->DrawNow(); - } - iCornerWindow->DrawNow(); - } - - -//---------------------------------------------------------------------------- -// void CScrollBarFrame::SetThumb(const CScrollBar::TOrientation aOrientation) -//---------------------------------------------------------------------------- -// -void CScrollBarFrame::SetThumb(CScrollBar::TOrientation aOrientation) - { - TInt display; - TInt document; - TInt displayPos; - TRect sbThumb; - - // Set Vertical THUMB - if (aOrientation == CScrollBar::EVertical) - { - TInt height = 0; - TInt posY = 0; - - display = iDisplay.Height(); - document = iDocument.Height(); - displayPos = iDisplayPos.iY; - - if (document) // avoid dividing by zero - { - // Height of the thumb - height = (display * display) / document; - - // Position of thumb - posY = (display * displayPos) / document; - } - - // Set thumb - sbThumb.SetRect(iVScrollBar->Rect().iTl.iX, posY, - iVScrollBar->Rect().iBr.iX, (posY + height)); - iVScrollBar->iThumb->SetThumbAndShadow(sbThumb); - } - // Set Horizontal THUMB - else - { - TInt width = 0; - TInt posX = 0; - - display = iDisplay.Width(); - document = iDocument.Width(); - displayPos = iDisplayPos.iX; - - if (document) // avoid dividing by zero - { - // Width of the thumb - width = (display * display) / document; - // Position of thumb - posX = (display * displayPos) / document; - } - - // shift thumb to the right - if (iLayout == EOriginTopRight) - { - posX += KBrowserVScrollBarWidth; - } - - // Set Thumb - sbThumb.SetRect(posX, iHScrollBar->Rect().iTl.iY, (posX + width), - iHScrollBar->Rect().iBr.iY); - iHScrollBar->iThumb->SetThumbAndShadow(sbThumb); - } - } - - -//---------------------------------------------------------------------------- -// TInt CScrollBarFrame::VScrollBarNeeded(TInt aDocument, TInt aDisplay, -// TInt aDisplayPos) -// -// External Function determining if Vertical Scroll Bar is needed -// returns width of scrollbar -//---------------------------------------------------------------------------- -// -/* -TInt CScrollBarFrame::VScrollBarNeeded(TInt aDocument, TInt aDisplay, - TInt aDisplayPos) - { - TInt ret = 0; - - // Set data members - iDocument.SetHeight(aDocument); - SetDisplayHeight(aDisplay); - iDisplayPos.iY = aDisplayPos; - - // Modify Display rect to accomodate scrollbar - if not already present - if ((iDisplay.Width() == KBrowserMaxDisplayWidth) && iDocument.Width()) - { - ret = KBrowserVScrollBarWidth; - } - return ret; - } - - -//---------------------------------------------------------------------------- -// TInt CScrollBarFrame::HScrollBarNeeded(TInt aDocument, -// TInt aDisplay, -// TInt aDisplayPos, -// TInt aDisplayHeight) -//---------------------------------------------------------------------------- -// -TInt CScrollBarFrame::HScrollBarNeeded(TInt aDocument, - TInt aDisplay, - TInt aDisplayPos, - TInt aDisplayHeight) - { - TInt ret = 0; - iDocument.SetWidth(aDocument); - SetDisplayWidth(aDisplay); - iDisplayPos.iX = aDisplayPos; - - // Modify Display rect to accomodate scrollbar - if not already present - if (iDocument.Height()) - { - // Calculate space needed for H Scrollbar - if (iDocument.Width() > iDisplay.Width()) - { - if (iDisplay.Height() == aDisplayHeight) // H Scrollbar present? - { - ret = KBrowserHScrollBarHeight; - } - } - // H Scrollbar not needed any more if doc not wider than display - // (with or without a V scrollbar being present) - else if (iDocument.Width() <= iDisplay.Width() || - iDisplay.Width() == KBrowserMaxDisplayWidth) - { - if ((aDisplayHeight - iDisplay.Height()) == KBrowserHScrollBarHeight) - { - ret = KBrowserHScrollBarHeight * KConvertToNegativeValue; - } - // We also don't need a corner window - iCornerWindow->SetRect(TRect(0, 0, 0, 0)); - } - } - return ret; - } -*/ -//---------------------------------------------------------------------------- -// void CScrollBarFrame::SetDisplayHeight( const TInt aHeight ) -//---------------------------------------------------------------------------- -// -void CScrollBarFrame::SetDisplayHeight(const TInt aHeight) - { - iDisplay.SetHeight(aHeight); - iScrollBarRect.SetHeight(aHeight + KBrowserHScrollBarHeight); - } - -//---------------------------------------------------------------------------- -// void CScrollBarFrame::SetDisplayWidth(const TInt aWidth) -//---------------------------------------------------------------------------- -// -void CScrollBarFrame::SetDisplayWidth(const TInt aWidth) - { - iDisplay.SetWidth(aWidth); - iScrollBarRect.SetWidth(aWidth + KBrowserVScrollBarWidth); - } - - -//---------------------------------------------------------------------------- -// CScrollBarCornerWindow Class Implementation -//---------------------------------------------------------------------------- - -//-------------------------------------------------------------------- -// CScrollBarCornerWindow::CScrollBarCornerWindow(const CCoeControl& aParent) -// -// Second Phase Construction -//-------------------------------------------------------------------- -// -CScrollBarCornerWindow* CScrollBarCornerWindow::NewL(const CCoeControl& aParent) - { - CScrollBarCornerWindow* self = new (ELeave)CScrollBarCornerWindow; - CleanupStack::PushL(self); - self->ConstructL(aParent); - CleanupStack::Pop(); - return self; - } - -//-------------------------------------------------------------------- -// CScrollBarCornerWindow::ConstructL(const CCoeControl& aParent) -// -// ConstructL -//-------------------------------------------------------------------- -// -void CScrollBarCornerWindow::ConstructL(const CCoeControl& aParent) - { - SetContainerWindowL(aParent); - } - -//-------------------------------------------------------------------- -// CScrollBarCornerWindow::~CScrollBarCornerWindow() -// -// DESTRUCTOR -//-------------------------------------------------------------------- -// -CScrollBarCornerWindow::~CScrollBarCornerWindow() - { - } - -//---------------------------------------------------------------------------- -// void CScrollBarCornerWindow::Draw(const TRect& /*aRect*/) const -//---------------------------------------------------------------------------- -// -void CScrollBarCornerWindow::Draw(const TRect& /*aRect*/) const - { - const TRgb KBrowserCornerWindowColour = KRgbWhite; // Corner Window Colour - CWindowGc& gc = SystemGc(); - - gc.SetPenStyle(CGraphicsContext::ENullPen ); - gc.SetBrushColor(KBrowserCornerWindowColour); - gc.SetBrushStyle(CGraphicsContext::ESolidBrush); - gc.DrawRect(Rect()); - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Scrolling/src/ScrollThumb.cpp --- a/webengine/wmlengine/src/Scrolling/src/ScrollThumb.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the CScrollThumb class. -* -*/ - -#include "ScrollThumb.h" - -/////////////////////////////////////////////////////////////////////////////// -// Construction/Destruction -/////////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// CScrollThumb::NewL(CScrollBar::TOrientation aOrientation) -// -// Two-phased construction -//----------------------------------------------------------------------------- -// -CScrollThumb* CScrollThumb::NewL(CScrollBar::TOrientation aOrientation) - { - CScrollThumb* self = new (ELeave) CScrollThumb(aOrientation); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; - } - - -//----------------------------------------------------------------------------- -// CScrollThumb::CScrollThumb(CScrollBar::TOrientation aOrientation) -// -// First Phase Construction -//----------------------------------------------------------------------------- -// -CScrollThumb::CScrollThumb(CScrollBar::TOrientation aOrientation) - { - const TRgb KThumbColour = 0x808080; // dark grey - const TRgb KThumbShadowColour = KRgbWhite; - - iOrientation = aOrientation; - - SetRect(TRect(0,0,0,0)); - - SetThumbColours(KThumbColour, KThumbShadowColour); - } - - -//----------------------------------------------------------------------------- -// CScrollThumb::ConstructL() -// -// EPOC Second Phase Constructor -//----------------------------------------------------------------------------- -// -void CScrollThumb::ConstructL( ) - { - } - -//----------------------------------------------------------------------------- -// CScrollThumb::~CScrollThumb() -// -// DESTRUCTOR -//----------------------------------------------------------------------------- -// -CScrollThumb::~CScrollThumb() - { - } - - -//----------------------------------------------------------------------------- -// void CScrollThumb::Draw(const TRect& /*aRect*/) const -// -// Draws the thumb with a shadow -//----------------------------------------------------------------------------- -// -void CScrollThumb::Draw(const TRect& /*aRect*/) const - { - CWindowGc& gc = SystemGc(); - - // Thumb Shadow - gc.SetBrushStyle(CGraphicsContext::ENullBrush); - gc.SetPenStyle(CGraphicsContext::ESolidPen); - gc.SetPenColor(iThumbShadowColour); - gc.DrawRect(iThumbShadow); - - // Thumb - gc.SetBrushStyle(CGraphicsContext::ESolidBrush); - gc.SetPenStyle(CGraphicsContext::ENullPen); - gc.SetBrushColor(iThumbColour); - gc.DrawRect(iThumbCentre); - } - - -//----------------------------------------------------------------------------- -// void CScrollThumb::SizeChanged() -//----------------------------------------------------------------------------- -// -void CScrollThumb::SizeChanged() - { - } - - -//----------------------------------------------------------------------------- -// void CScrollThumb::SetThumbColours(TRgb aThumbColour, TRgb aThumbShadowColour) -// -// Sets colours for thumb -//----------------------------------------------------------------------------- -// -void CScrollThumb::SetThumbColours(TRgb aThumbColour, TRgb aThumbShadowColour) - { - iThumbColour = aThumbColour; - iThumbShadowColour = aThumbShadowColour; - } - -//----------------------------------------------------------------------------- -// void CScrollBarThumb::SetThumbAndShadow(const TRect& aRect) -// -// Sets the rect of the thumb and its shadow -//----------------------------------------------------------------------------- -// -void CScrollThumb::SetThumbAndShadow(const TRect& aRect) - { - SetRect(aRect); - - iThumbCentre = iThumbShadow = aRect; - iThumbCentre.Shrink(KTrackBkgdThickness, KTrackBkgdThickness); - - // Shadow shown only at its ends - if (iOrientation == CScrollBar::EVertical) - { - iThumbShadow.Shrink(KTrackBkgdThickness, 0); - } - else - { - iThumbShadow.Shrink(0, KTrackBkgdThickness); - } - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/MakeSystem --- a/webengine/wmlengine/src/System/MakeSystem Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSystem -TARGET = rbTempest_System_lib.a - -SUBDIRS = src - -SUBMAKES = MakeSrc - -OBJS = src/rbTempest_System_src_lib.a - -SRCS = - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE_RECURSIVE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/CEpoc32Timer.h --- a/webengine/wmlengine/src/System/include/CEpoc32Timer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef __EPOC32TIMER_H -#define __EPOC32TIMER_H - -#include <e32base.h> - -class CEpoc32Timer : public CTimer - { - public: - static CEpoc32Timer* New( const TUint32 aPeriodInMicroseconds, - const TBool aRepeatingTimer, - TCallBack& aCallBackFunc ); - ~CEpoc32Timer(); - - TUint32 MicrosecondsLeftUntilNextTick() const; - void Stop(); - void Resume(); - - protected: - CEpoc32Timer( const TUint32 aPeriodInMicroseconds, - const TBool aRepeatingTimer, - TCallBack& aCallBackFunc ); - void ConstructL(); - void RunL(); - void Start(); - - virtual void After( TUint32 aPeriodInMicroseconds ); - - private: - TTime iResumeTime; - TCallBack iCallBackFunc; - TUint32 iTimeOutInMicroseconds; - // How many microseconds was left until next tick when we were stopped - TUint32 iTimeLeftInMicroseconds; - // If the timer period is > MaxTTimeInMicroseconds32, then the extra - // milliseconds are stored here. - TUint32 iPeriodInMicrosecondsExceedingRangeOfTInt; - TBool iIsRepeating; - }; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system.h --- a/webengine/wmlengine/src/System/include/nw_system.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_System_h_ -#define _NW_System_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_SYSTEM_EXPORT -#ifdef NW_IMPORT -#define NW_SYSTEM_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_SYSTEM_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_SYSTEM_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system_epoc32timer.h --- a/webengine/wmlengine/src/System/include/nw_system_epoc32timer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_System_Epoc32Timer_h_ -#define _NW_System_Epoc32Timer_h_ - -#include "nw_system_timer.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_System_Epoc32Timer - - @scope: public - - @description: - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_System_Epoc32Timer_Class_s NW_System_Epoc32Timer_Class_t; -typedef struct NW_System_Epoc32Timer_s NW_System_Epoc32Timer_t; - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_System_Epoc32Timer_ClassPart_s { - void** unused; -} NW_System_Epoc32Timer_ClassPart_t; - -struct NW_System_Epoc32Timer_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_System_Timer_ClassPart_t NW_System_Timer; - NW_System_Epoc32Timer_ClassPart_t NW_System_Epoc32Timer; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_System_Epoc32Timer_s { - NW_System_Timer_t super; - - /* member variables */ - void* epocTimer; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_System_Epoc32Timer_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_System_Epoc32Timer)) - -#define NW_System_Epoc32TimerOf(_object) \ - (NW_Object_Cast (_object, NW_System_Epoc32Timer)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT const NW_System_Epoc32Timer_Class_t NW_System_Epoc32Timer_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_Epoc32Timer_h_ */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system_epoc32timeri.h --- a/webengine/wmlengine/src/System/include/nw_system_epoc32timeri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef _NW_System_Epoc32TimerI_h_ -#define _NW_System_Epoc32TimerI_h_ - -#include "nw_system_timeri.h" -#include "nw_system_epoc32timer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Epoc32Timer_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_SYSTEM_EXPORT -void -_NW_System_Epoc32Timer_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Epoc32Timer_Stop (NW_System_Timer_t* timer); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Epoc32Timer_Resume (NW_System_Timer_t* timer); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Epoc32Timer_IsRunning (NW_System_Timer_t* timer, - NW_Bool* isRunning); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Epoc32Timer_Read (NW_System_Timer_t* timer, - NW_Uint32* remainingTime); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_Epoc32TimerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system_optionlist.h --- a/webengine/wmlengine/src/System/include/nw_system_optionlist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_System_OptionList_h_ -#define _NW_System_OptionList_h_ - -#include "nw_system.h" -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT -void -NW_System_OptionList_Initialize (void); - -NW_SYSTEM_EXPORT -void -NW_System_OptionList_AddItem (NW_Ucs2* string, - NW_Uint32 elementID, - NW_Int16 aElType); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_OptionList_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system_timer.h --- a/webengine/wmlengine/src/System/include/nw_system_timer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_System_Timer_h_ -#define _NW_System_Timer_h_ - -#include "nw_system.h" -#include "nw_object_dynamic.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_System_Timer - - @scope: public - - @description: - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_System_Timer_Class_s NW_System_Timer_Class_t; -typedef struct NW_System_Timer_s NW_System_Timer_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef TBrowserStatusCode (*NW_System_Timer_Callback_t) (void* clientData); - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_System_Timer_Stop_t) (NW_System_Timer_t* timer); - -typedef -TBrowserStatusCode -(*NW_System_Timer_Resume_t) (NW_System_Timer_t* timer); - -typedef -TBrowserStatusCode -(*NW_System_Timer_IsRunning_t) (NW_System_Timer_t* timer, - NW_Bool* isRunning); - -typedef -TBrowserStatusCode -(*NW_System_Timer_Read_t) (NW_System_Timer_t* timer, - NW_Uint32* remainingTime); - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_System_Timer_ClassPart_s { - NW_System_Timer_Stop_t stop; - NW_System_Timer_Resume_t resume; - NW_System_Timer_IsRunning_t isRunning; - NW_System_Timer_Read_t read; -} NW_System_Timer_ClassPart_t; - -struct NW_System_Timer_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_System_Timer_ClassPart_t NW_System_Timer; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_System_Timer_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_System_Timer_Callback_t callback; - void *clientData; - NW_Uint32 period; - NW_Bool repeating; - - NW_Uint32 remainingTime; - NW_Uint32 startTime; - NW_Bool isRunning; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_System_Timer)) - -#define NW_System_TimerOf(_object) \ - (NW_Object_Cast (_object, NW_System_Timer)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT const NW_System_Timer_Class_t NW_System_Timer_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT -NW_System_Timer_t* -_NW_System_Timer_New (NW_System_Timer_Callback_t callback, - void* clientData, - NW_Uint32 period, - NW_Bool repeating); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - Function: NW_System_Timer_StopTimer - Purpose: stops the timer - Paramters: timer - pointer to the app. services timer object - Return Values: - status KBrsrSuccess if successful - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_Stop(_timer) \ - (NW_Object_Invoke (_timer, NW_System_Timer, stop) \ - (NW_System_TimerOf (_timer))) - -/* ------------------------------------------------------------------------- * - Function: NW_System_Timer_ResumeTimer - Purpose: resume the timer - Paramters: timer - pointer to the app. services timer object - Return Values: - status KBrsrSuccess if successful - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_Resume(_timer) \ - (NW_Object_Invoke (_timer, NW_System_Timer, resume) \ - (NW_System_TimerOf (_timer))) - -/* ------------------------------------------------------------------------- * - Function: NW_System_Timer_IsTimerRunning - Purpose: checks if the timer is running - Paramters: timer - pointer to the app. services timer object - Return Values: - isRunning is NW_TRUE if the timer is running - status KBrsrSuccess if successful - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_IsRunning(_timer, _isRunning) \ - (NW_Object_Invoke (_timer, NW_System_Timer, isRunning) \ - (NW_System_TimerOf (_timer), (_isRunning))) - -/* ------------------------------------------------------------------------- * - Function: NW_System_Timer_ReadTimer - Purpose: return the timer period remaining in the timer - Paramters: timer - pointer to the app. services timer object - Return Values: - remainingTime - time remaining before the timer expiration (in milliseconds) - status KBrsrSuccess if successful - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_Read(_timer, _remainingTime) \ - (NW_Object_Invoke (_timer, NW_System_Timer, read) \ - (NW_System_TimerOf (_timer), (_remainingTime))) - -/* ------------------------------------------------------------------------- * - Function: NW_System_Timer_Construct - Purpose: Creates a timer object and starts the timer - Paramters: callBack - this function is called when the timer expires - clientData - data to be passed to the timer callback function - period - period for the timer - repeating - if NW_TRUE, the timer is repeating - Return Values: - Pointer to the app. services timer object, NULL in case of failure - * ------------------------------------------------------------------------- */ -#define NW_System_Timer_New(_callback, _clientData, _period, _repeating) \ - (_NW_System_Timer_New ((_callback), (_clientData), (_period), (_repeating))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_Timer_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/include/nw_system_timeri.h --- a/webengine/wmlengine/src/System/include/nw_system_timeri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_System_TimerI_h_ -#define _NW_System_TimerI_h_ - -#include "nw_object_dynamici.h" -#include "nw_system_timer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Timer_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Timer_IsRunning (NW_System_Timer_t* timer, - NW_Bool* isRunning); - -NW_SYSTEM_EXPORT -TBrowserStatusCode -_NW_System_Timer_Read (NW_System_Timer_t* timer, - NW_Uint32* remainingTime); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_System_TimerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/CEpoc32Timer.cpp --- a/webengine/wmlengine/src/System/src/CEpoc32Timer.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "CEpoc32Timer.h" - -CEpoc32Timer* CEpoc32Timer::New( const TUint32 aPeriodInMicroseconds, - const TBool aRepeatingTimer, - TCallBack& aCallBackFunc ) - { - CEpoc32Timer* timer = new CEpoc32Timer( aPeriodInMicroseconds, - aRepeatingTimer, aCallBackFunc); - if( timer ) - { - TRAPD( err, timer->ConstructL() ); - if( err != KErrNone ) - { - delete timer; - timer = NULL; - } - } - return timer; - } - -CEpoc32Timer::CEpoc32Timer( const TUint32 aPeriodInMicroseconds, - const TBool aRepeatingTimer, - TCallBack& aCallBackFunc ) : - CTimer( EPriorityLow ), - iCallBackFunc( aCallBackFunc ), - iTimeOutInMicroseconds( aPeriodInMicroseconds ), - iTimeLeftInMicroseconds( 0 ), - iPeriodInMicrosecondsExceedingRangeOfTInt( 0 ), - iIsRepeating( aRepeatingTimer ) - { - } - -CEpoc32Timer::~CEpoc32Timer() - { - Cancel(); - } - -void CEpoc32Timer::ConstructL() - { - CTimer::ConstructL(); - CActiveScheduler::Add(this); - // at the very beginning, time-left equals to the timeout - iTimeLeftInMicroseconds = iTimeOutInMicroseconds; - // start the timer; - Start(); - } - -void CEpoc32Timer::RunL() - { - // TIMER WILL BE CANCELLED IF SYSTEM TIME CHANGES!!!!!!!!!!!!!!!!!! - // EPOC undocumented feature: If system time was changed, the system will - // cancel all active objects. Timer active objects must react to this. - const TInt status = iStatus.Int(); - - if( status == KErrNone ) - { - if( iPeriodInMicrosecondsExceedingRangeOfTInt == 0 ) - { - if( iIsRepeating ) - { - // start the timer again - iTimeLeftInMicroseconds = iTimeOutInMicroseconds; - // kick off - Start(); - } - iCallBackFunc.CallBack(); // Callback to Kimono - } - else - { - After( iPeriodInMicrosecondsExceedingRangeOfTInt ); - iPeriodInMicrosecondsExceedingRangeOfTInt = 0; - } - } - else if( status == KErrCancel ) - { - // Possible causes: - // 1. Timer was stopped - // 2. System time was changed - // - // If timer was stopped, we can detect it by checking - // if iTimeLeftOnStop != 0 - // Otherwise the system time was changed. - if( iTimeLeftInMicroseconds == 0 ) - { - // System time changed - Stop(); // Save the state of timers - Resume(); // Start timer over as if it was stopped. - } - } - } - -TUint32 CEpoc32Timer::MicrosecondsLeftUntilNextTick() const - { - TTime timeoutTime; - TTime currentTime; - // get the current time - currentTime.HomeTime(); - // first figure out when the timer is supposed to stop. (end of timer) - timeoutTime = iResumeTime + TTimeIntervalMicroSeconds( TInt64( (TUint)iTimeLeftInMicroseconds ) ); - // then see how far we are from the to happen. ( this is gonna be the time left value ) - TTimeIntervalMicroSeconds timeDifference = currentTime.MicroSecondsFrom( timeoutTime ); - // convert it to uint32 - TTimeIntervalMicroSeconds32 timeDiff32 = I64INT(Abs( timeDifference.Int64() ) ); - // end return - return timeDiff32.Int(); - } - -void CEpoc32Timer::Start() - { - if( !IsActive() ) - { - // timer start-up time. - iResumeTime.HomeTime(); - // kick off the timer. - After( iTimeLeftInMicroseconds ); - } - } - -void CEpoc32Timer::Stop() - { - iTimeLeftInMicroseconds = MicrosecondsLeftUntilNextTick(); - Cancel(); - } - -void CEpoc32Timer::Resume() - { - // resume the timer - Start(); - } - -void CEpoc32Timer::After( TUint32 aPeriodInMicroseconds ) - { - TTimeIntervalMicroSeconds32 interval(0); - - if( aPeriodInMicroseconds > (TUint32)KMaxTInt ) - { - // Set the timer value in 2 phases, because now internal would - // have negative time value, and CTimer::After would panic. - iPeriodInMicrosecondsExceedingRangeOfTInt = - aPeriodInMicroseconds - KMaxTInt; - interval = KMaxTInt; - } - else - { - // OK. CTimer::After will not panic - iPeriodInMicrosecondsExceedingRangeOfTInt = 0; - interval = aPeriodInMicroseconds; - } - CTimer::After( interval ); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/Epoc32OptionList.cpp --- a/webengine/wmlengine/src/System/src/Epoc32OptionList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // avoid NULL redefinition warning -#include "nw_system_optionlist.h" -#include "MVCShell.h" -#include "nwx_ctx.h" - -//lint -save -esym(528, PtrCFromTText) Symbol not referenced - -/* ------------------------------------------------------------------------- */ -void -NW_System_OptionList_Initialize (void) -{ - CShell* browserApp = REINTERPRET_CAST(CShell*, (NW_Ctx_Get(NW_CTX_BROWSER_APP, 0))); - browserApp->OptionListInit(); -} - -/* ------------------------------------------------------------------------- */ -void -NW_System_OptionList_AddItem (NW_Ucs2* string, - NW_Uint32 elementID, - NW_Int16 aElType) -{ - CShell* browserApp = REINTERPRET_CAST(CShell*, (NW_Ctx_Get(NW_CTX_BROWSER_APP, 0))); - browserApp->OptionListAddItem( string, elementID, aElType ); -} - -//lint -restore diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/Epoc32Timer.cpp --- a/webengine/wmlengine/src/System/src/Epoc32Timer.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,225 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <e32def.h> // avoid NULL redefinition warning -#include "nw_system_epoc32timeri.h" -#include "nwx_time.h" - -#include "MVCShell.h" -#include "CEpoc32Timer.h" - -#include "nwx_ctx.h" -#include "nwx_defs_symbian.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_System_Epoc32Timer_Class_t NW_System_Epoc32Timer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_System_Timer_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_System_Epoc32Timer_t), - /* construct */ _NW_System_Epoc32Timer_Construct, - /* destruct */ _NW_System_Epoc32Timer_Destruct - }, - { /* NW_System_Timer */ - /* stop */ _NW_System_Epoc32Timer_Stop, - /* resume */ _NW_System_Epoc32Timer_Resume, - /* isRunning */ _NW_System_Epoc32Timer_IsRunning, - /* read */ _NW_System_Epoc32Timer_Read - }, - { /* NW_System_Epoc32Timer */ - /* unused */ NW_Object_Unused - } -}; - - - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Epoc32Timer_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - TBrowserStatusCode status; - NW_System_Epoc32Timer_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_System_Epoc32Timer_Class)); - NW_ASSERT (argList != NULL); - - /* invoke our superclass constructor */ - status = _NW_System_Timer_Construct (dynamicObject, argList); - if (status != KBrsrSuccess) { - return status; - } - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (dynamicObject); - - - // RB: Period is in milliseconds - TUint32 timerPeriod(1000 * thisObj->super.period); - - TCallBack cb((TThreadFunction)thisObj->super.callback, thisObj->super.clientData); - - /* initialize the member variables */ - thisObj->epocTimer = CEpoc32Timer::New(timerPeriod, thisObj->super.repeating, cb); - if(thisObj->epocTimer == NULL) { - return KBrsrOutOfMemory; - } - - thisObj->super.startTime = NW_Time_GetTimeMSec(); - thisObj->super.remainingTime = thisObj->super.period; - thisObj->super.isRunning = NW_TRUE; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_System_Epoc32Timer_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_System_Epoc32Timer_t* thisObj; - CEpoc32Timer* epocTimer = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_System_Epoc32Timer_Class)); - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (dynamicObject); - epocTimer = (CEpoc32Timer*)thisObj->epocTimer; - - epocTimer->Cancel(); - delete epocTimer; -} - -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- - -TBrowserStatusCode -_NW_System_Epoc32Timer_IsRunning (NW_System_Timer_t* timer, - NW_Bool* isRunning) -{ - NW_System_Epoc32Timer_t* thisObj; - CEpoc32Timer* epocTimer = NULL; - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (timer); - epocTimer = (CEpoc32Timer*)thisObj->epocTimer; - - if (epocTimer) - { - *isRunning = (NW_Bool)epocTimer->IsActive(); - return KBrsrSuccess; - } - - return KBrsrFailure; -} - -TBrowserStatusCode -_NW_System_Epoc32Timer_Read (NW_System_Timer_t* timer, - NW_Uint32* remainingTime) -{ - NW_System_Epoc32Timer_t* thisObj; - CEpoc32Timer* epocTimer = NULL; - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (timer); - epocTimer = (CEpoc32Timer*)thisObj->epocTimer; - - if (epocTimer) - { - *remainingTime = epocTimer->MicrosecondsLeftUntilNextTick()/1000; - return KBrsrSuccess; - } - - return KBrsrFailure; -} - - -/* ------------------------------------------------------------------------- * - NW_System_Timer methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Epoc32Timer_Stop (NW_System_Timer_t* timer) -{ - NW_System_Epoc32Timer_t* thisObj; - CEpoc32Timer* epocTimer = NULL; - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (timer); - epocTimer = (CEpoc32Timer*)thisObj->epocTimer; - - if (epocTimer) - { - epocTimer->Stop(); - return KBrsrSuccess; - } - - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Epoc32Timer_Resume (NW_System_Timer_t* timer) -{ - NW_System_Epoc32Timer_t* thisObj; - CEpoc32Timer* epocTimer = NULL; - - /* for convenience */ - thisObj = NW_System_Epoc32TimerOf (timer); - epocTimer = (CEpoc32Timer*)thisObj->epocTimer; - - if (epocTimer) - { - epocTimer->Resume(); - return KBrsrSuccess; - } - - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -NW_System_Timer_t* -_NW_System_Timer_New (NW_System_Timer_Callback_t callback, - void* clientData, - NW_Uint32 period, - NW_Bool repeating) -{ - return (NW_System_Timer_t*) - NW_Object_New (&NW_System_Epoc32Timer_Class, callback, clientData, period, - (NW_Uint32)repeating); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/MakeSrc --- a/webengine/wmlengine/src/System/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_System_src_lib.a - -SUBDIRS = . ISA - -SUBMAKES = MakeSrc2 MakeISA - -OBJS = rbTempest_System_src_src2_lib.a \ - ISA/rbTempest_System_src_ISA_lib.a - -SRCS = - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE_RECURSIVE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/MakeSrc2 --- a/webengine/wmlengine/src/System/src/MakeSrc2 Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc2 -TARGET = rbTempest_System_src_src2_lib.a - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = Timer.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/System/src/Timer.c --- a/webengine/wmlengine/src/System/src/Timer.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_system_timeri.h" -#include "nwx_time.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_System_Timer_Class_t NW_System_Timer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_System_Timer_t), - /* construct */ _NW_System_Timer_Construct, - /* destruct */ NULL - }, - { /* NW_System_Timer */ - /* stop */ NULL, - /* resume */ NULL, - /* isRunning */ _NW_System_Timer_IsRunning, - /* read */ _NW_System_Timer_Read - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Timer_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_System_Timer_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_System_Timer_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_System_TimerOf (dynamicObject); - - /* initialize the member variables */ - thisObj->callback = va_arg (*argList, NW_System_Timer_Callback_t); - thisObj->clientData = va_arg (*argList, void*); - thisObj->period = va_arg (*argList, NW_Uint32); - thisObj->repeating = (NW_Bool)va_arg (*argList, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - NW_System_Timer methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Timer_IsRunning (NW_System_Timer_t* timer, - NW_Bool* isRunning) -{ - NW_System_Timer_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (timer, &NW_System_Timer_Class)); - - /* for convenience */ - thisObj = NW_System_TimerOf (timer); - - *isRunning = thisObj->isRunning; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_System_Timer_Read (NW_System_Timer_t* timer, - NW_Uint32* remainingTime) -{ - NW_System_Timer_t* thisObj; - NW_Uint32 elapsedTime; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (timer, &NW_System_Timer_Class)); - - /* for convenience */ - thisObj = NW_System_TimerOf (timer); - - if (thisObj->isRunning) { - elapsedTime = NW_Time_GetTimeMSec() - thisObj->startTime; - if(elapsedTime > thisObj->period) { - *remainingTime = 0; - } else { - *remainingTime = thisObj->remainingTime - elapsedTime; - } - return KBrsrSuccess; - } - - *remainingTime = thisObj->remainingTime; - - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_Category.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_Category.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_Category_h_ -#define _NW_Unicode_Category_h_ - -#include "nw_object_core.h" -#include "NW_Unicode_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_Category_Class_s NW_Unicode_Category_Class_t; -typedef struct NW_Unicode_Category_s NW_Unicode_Category_t; - -typedef struct NW_Unicode_Category_TableEntry_s NW_Unicode_Category_TableEntry_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_Category_ClassPart_s { - NW_Uint16 tableSize; - const NW_Unicode_Category_TableEntry_t* table; -} NW_Unicode_Category_ClassPart_t; - -struct NW_Unicode_Category_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_Category_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_Category_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_Category)) - -#define NW_Unicode_CategoryOf(object) \ - (NW_Object_Cast (object, NW_Unicode_Category)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_Class_t NW_Unicode_Category_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT -NW_Bool -_NW_Unicode_Category_IsMemberOf (const NW_Unicode_Category_t* category, - NW_Ucs4 code); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -#define NW_Unicode_Category_IsMemberOf(_object, _code) \ - (_NW_Unicode_Category_IsMemberOf (NW_Unicode_CategoryOf (_object), (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_Category_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_CategoryI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_CategoryI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_CategoryI_h_ -#define _NW_Unicode_CategoryI_h_ - - - - -#include "nw_object_corei.h" -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_Unicode_Category_TableEntry_s { - NW_Ucs4 start; - NW_Ucs4 end; - NW_Uint32 increment; -}; - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Unicode_Category_GetTableSize(_class) \ - ((const NW_Uint16) \ - ((NW_Unicode_Category_Class_t*) (_class))->NW_Unicode_Category.tableSize) - -#define NW_Unicode_Category_GetTable(_class) \ - ((const NW_Unicode_Category_TableEntry_t* const) \ - ((NW_Unicode_Category_Class_t*) (_class))->NW_Unicode_Category.table) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_CategoryI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_EXPORT.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_EXPORT_h_ -#define _NW_Unicode_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_UNICODE_EXPORT -#ifdef NW_IMPORT -#define NW_UNICODE_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_UNICODE_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_UNICODE_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterChina.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterChina.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterChina_h_ -#define _NW_Unicode_LetterChina_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterChina_Class_s NW_Unicode_LetterChina_Class_t; -typedef struct NW_Unicode_LetterChina_s NW_Unicode_LetterChina_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterChina_ClassPart_s { - void** unused; -} NW_Unicode_LetterChina_ClassPart_t; - -struct NW_Unicode_LetterChina_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterChina_ClassPart_t NW_Unicode_LetterChina; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterChina_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterChina_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterChina)) - -#define NW_Unicode_LetterChinaOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterChina)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterChina_Class_t NW_Unicode_LetterChina_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterChina_t NW_Unicode_LetterChina; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterChina(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterChina, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterChina_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterChinaI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterChinaI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterChinaI_h_ -#define _NW_Unicode_LetterChinaI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterChina.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterChina_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterChinaI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterJapan.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterJapan.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterJapan_h_ -#define _NW_Unicode_LetterJapan_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterJapanFullKatakana_Class_s NW_Unicode_LetterJapanFullKatakana_Class_t; -typedef struct NW_Unicode_LetterJapanFullKatakana_s NW_Unicode_LetterJapanFullKatakana_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterJapanFullKatakana_ClassPart_s { - void** unused; -} NW_Unicode_LetterJapanFullKatakana_ClassPart_t; - -struct NW_Unicode_LetterJapanFullKatakana_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterJapanFullKatakana_ClassPart_t NW_Unicode_LetterJapanFullKatakana; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterJapanFullKatakana_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterJapanFullKatakana_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterJapanFullKatakana)) - -#define NW_Unicode_LetterJapanFullKatakanaOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterJapanFullKatakana)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterJapanFullKatakana_Class_t NW_Unicode_LetterJapanFullKatakana_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterJapanFullKatakana_t NW_Unicode_LetterJapanFullKatakana; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterJapanFullKatakana(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterJapanFullKatakana, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterJapan_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterJapanI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterJapanI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterJapanI_h_ -#define _NW_Unicode_LetterJapanI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterJapan.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterJapanFullKatakana_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterJapanI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterLowercase.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterLowercase.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterLowercase_h_ -#define _NW_Unicode_LetterLowercase_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterLowercase_Class_s NW_Unicode_LetterLowercase_Class_t; -typedef struct NW_Unicode_LetterLowercase_s NW_Unicode_LetterLowercase_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterLowercase_ClassPart_s { - void** unused; -} NW_Unicode_LetterLowercase_ClassPart_t; - -struct NW_Unicode_LetterLowercase_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterLowercase_ClassPart_t NW_Unicode_LetterLowercase; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterLowercase_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterLowercase_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterLowercase)) - -#define NW_Unicode_LetterLowercaseOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterLowercase)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterLowercase_Class_t NW_Unicode_LetterLowercase_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterLowercase_t NW_Unicode_LetterLowercase; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterLowercase(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterLowercase, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterLowercase_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterLowercaseI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterLowercaseI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterLowercaseI_h_ -#define _NW_Unicode_LetterLowercaseI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterLowercase.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterLowercase_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterLowercaseI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterModifier.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterModifier.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterModifier_h_ -#define _NW_Unicode_LetterModifier_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterModifier_Class_s NW_Unicode_LetterModifier_Class_t; -typedef struct NW_Unicode_LetterModifier_s NW_Unicode_LetterModifier_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterModifier_ClassPart_s { - void** unused; -} NW_Unicode_LetterModifier_ClassPart_t; - -struct NW_Unicode_LetterModifier_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterModifier_ClassPart_t NW_Unicode_LetterModifier; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterModifier_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterModifier_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterModifier)) - -#define NW_Unicode_LetterModifierOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterModifier)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterModifier_Class_t NW_Unicode_LetterModifier_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterModifier_t NW_Unicode_LetterModifier; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterModifier(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterModifier, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterModifier_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterModifierI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterModifierI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterModifierI_h_ -#define _NW_Unicode_LetterModifierI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterModifier.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterModifier_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterModifierI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterOther.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterOther.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterOther_h_ -#define _NW_Unicode_LetterOther_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterOther_Class_s NW_Unicode_LetterOther_Class_t; -typedef struct NW_Unicode_LetterOther_s NW_Unicode_LetterOther_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterOther_ClassPart_s { - void** unused; -} NW_Unicode_LetterOther_ClassPart_t; - -struct NW_Unicode_LetterOther_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterOther_ClassPart_t NW_Unicode_LetterOther; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterOther_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterOther_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterOther)) - -#define NW_Unicode_LetterOtherOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterOther)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterOther_Class_t NW_Unicode_LetterOther_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterOther_t NW_Unicode_LetterOther; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterOther(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterOther, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterOther_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterOtherI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterOtherI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterOtherI_h_ -#define _NW_Unicode_LetterOtherI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterOther.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterOther_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterOtherI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterThai.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterThai.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterThai_h_ -#define _NW_Unicode_LetterThai_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterThai_Class_s NW_Unicode_LetterThai_Class_t; -typedef struct NW_Unicode_LetterThai_s NW_Unicode_LetterThai_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterThai_ClassPart_s { - void** unused; -} NW_Unicode_LetterThai_ClassPart_t; - -struct NW_Unicode_LetterThai_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterThai_ClassPart_t NW_Unicode_LetterThai; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterThai_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterThai_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterThai)) - -#define NW_Unicode_LetterThaiOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterThai)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterThai_Class_t NW_Unicode_LetterThai_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterThai_t NW_Unicode_LetterThai; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterThai(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterThai, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterThai_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterThaiI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterThaiI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterThaiI_h_ -#define _NW_Unicode_LetterThaiI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterThai.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterThai_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterThaiI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterTitlecase.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterTitlecase.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterTitlecase_h_ -#define _NW_Unicode_LetterTitlecase_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterTitlecase_Class_s NW_Unicode_LetterTitlecase_Class_t; -typedef struct NW_Unicode_LetterTitlecase_s NW_Unicode_LetterTitlecase_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterTitlecase_ClassPart_s { - void** unused; -} NW_Unicode_LetterTitlecase_ClassPart_t; - -struct NW_Unicode_LetterTitlecase_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterTitlecase_ClassPart_t NW_Unicode_LetterTitlecase; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterTitlecase_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterTitlecase_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterTitlecase)) - -#define NW_Unicode_LetterTitlecaseOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterTitlecase)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterTitlecase_Class_t NW_Unicode_LetterTitlecase_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterTitlecase_t NW_Unicode_LetterTitlecase; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterTitlecase(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterTitlecase, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterTitlecase_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterTitlecaseI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterTitlecaseI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterTitlecaseI_h_ -#define _NW_Unicode_LetterTitlecaseI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterTitlecase.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterTitlecase_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterTitlecaseI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterUppercase.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterUppercase.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterUppercase_h_ -#define _NW_Unicode_LetterUppercase_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterUppercase_Class_s NW_Unicode_LetterUppercase_Class_t; -typedef struct NW_Unicode_LetterUppercase_s NW_Unicode_LetterUppercase_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_LetterUppercase_ClassPart_s { - void** unused; -} NW_Unicode_LetterUppercase_ClassPart_t; - -struct NW_Unicode_LetterUppercase_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_LetterUppercase_ClassPart_t NW_Unicode_LetterUppercase; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_LetterUppercase_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_LetterUppercase_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_LetterUppercase)) - -#define NW_Unicode_LetterUppercaseOf(object) \ - (NW_Object_Cast (object, NW_Unicode_LetterUppercase)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_LetterUppercase_Class_t NW_Unicode_LetterUppercase_Class; -NW_UNICODE_EXPORT const NW_Unicode_LetterUppercase_t NW_Unicode_LetterUppercase; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsLetterUppercase(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_LetterUppercase, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterUppercase_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterUppercaseI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_LetterUppercaseI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_LetterUppercaseI_h_ -#define _NW_Unicode_LetterUppercaseI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterUppercase.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterUppercase_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_LetterUppercaseI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkEnclosing.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkEnclosing.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkEnclosing_h_ -#define _NW_Unicode_MarkEnclosing_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkEnclosing_Class_s NW_Unicode_MarkEnclosing_Class_t; -typedef struct NW_Unicode_MarkEnclosing_s NW_Unicode_MarkEnclosing_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkEnclosing_ClassPart_s { - void** unused; -} NW_Unicode_MarkEnclosing_ClassPart_t; - -struct NW_Unicode_MarkEnclosing_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_MarkEnclosing_ClassPart_t NW_Unicode_MarkEnclosing; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_MarkEnclosing_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_MarkEnclosing_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_MarkEnclosing)) - -#define NW_Unicode_MarkEnclosingOf(object) \ - (NW_Object_Cast (object, NW_Unicode_MarkEnclosing)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_MarkEnclosing_Class_t NW_Unicode_MarkEnclosing_Class; -NW_UNICODE_EXPORT const NW_Unicode_MarkEnclosing_t NW_Unicode_MarkEnclosing; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsMarkEnclosing(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_MarkEnclosing, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkEnclosing_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkEnclosingI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkEnclosingI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkEnclosingI_h_ -#define _NW_Unicode_MarkEnclosingI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_MarkEnclosing.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkEnclosing_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkEnclosingI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkNonSpacing.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkNonSpacing.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkNonSpacing_h_ -#define _NW_Unicode_MarkNonSpacing_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkNonSpacing_Class_s NW_Unicode_MarkNonSpacing_Class_t; -typedef struct NW_Unicode_MarkNonSpacing_s NW_Unicode_MarkNonSpacing_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkNonSpacing_ClassPart_s { - void** unused; -} NW_Unicode_MarkNonSpacing_ClassPart_t; - -struct NW_Unicode_MarkNonSpacing_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_MarkNonSpacing_ClassPart_t NW_Unicode_MarkNonSpacing; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_MarkNonSpacing_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_MarkNonSpacing_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_MarkNonSpacing)) - -#define NW_Unicode_MarkNonSpacingOf(object) \ - (NW_Object_Cast (object, NW_Unicode_MarkNonSpacing)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_MarkNonSpacing_Class_t NW_Unicode_MarkNonSpacing_Class; -NW_UNICODE_EXPORT const NW_Unicode_MarkNonSpacing_t NW_Unicode_MarkNonSpacing; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsMarkNonSpacing(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_MarkNonSpacing, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkNonSpacing_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkNonSpacingI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkNonSpacingI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkNonSpacingI_h_ -#define _NW_Unicode_MarkNonSpacingI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_MarkNonSpacing.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkNonSpacing_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkNonSpacingI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkSpacingCombining.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkSpacingCombining.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkSpacingCombining_h_ -#define _NW_Unicode_MarkSpacingCombining_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkSpacingCombining_Class_s NW_Unicode_MarkSpacingCombining_Class_t; -typedef struct NW_Unicode_MarkSpacingCombining_s NW_Unicode_MarkSpacingCombining_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_MarkSpacingCombining_ClassPart_s { - void** unused; -} NW_Unicode_MarkSpacingCombining_ClassPart_t; - -struct NW_Unicode_MarkSpacingCombining_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_MarkSpacingCombining_ClassPart_t NW_Unicode_MarkSpacingCombining; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_MarkSpacingCombining_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_MarkSpacingCombining_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_MarkSpacingCombining)) - -#define NW_Unicode_MarkSpacingCombiningOf(object) \ - (NW_Object_Cast (object, NW_Unicode_MarkSpacingCombining)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_MarkSpacingCombining_Class_t NW_Unicode_MarkSpacingCombining_Class; -NW_UNICODE_EXPORT const NW_Unicode_MarkSpacingCombining_t NW_Unicode_MarkSpacingCombining; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsMarkSpacingCombining(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_MarkSpacingCombining, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkSpacingCombining_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkSpacingCombiningI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_MarkSpacingCombiningI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_MarkSpacingCombiningI_h_ -#define _NW_Unicode_MarkSpacingCombiningI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_MarkSpacingCombining.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkSpacingCombining_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_MarkSpacingCombiningI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberDecimalDigit.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberDecimalDigit.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberDecimalDigit_h_ -#define _NW_Unicode_NumberDecimalDigit_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberDecimalDigit_Class_s NW_Unicode_NumberDecimalDigit_Class_t; -typedef struct NW_Unicode_NumberDecimalDigit_s NW_Unicode_NumberDecimalDigit_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberDecimalDigit_ClassPart_s { - void** unused; -} NW_Unicode_NumberDecimalDigit_ClassPart_t; - -struct NW_Unicode_NumberDecimalDigit_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_NumberDecimalDigit_ClassPart_t NW_Unicode_NumberDecimalDigit; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_NumberDecimalDigit_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_NumberDecimalDigit_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_NumberDecimalDigit)) - -#define NW_Unicode_NumberDecimalDigitOf(object) \ - (NW_Object_Cast (object, NW_Unicode_NumberDecimalDigit)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_NumberDecimalDigit_Class_t NW_Unicode_NumberDecimalDigit_Class; -NW_UNICODE_EXPORT const NW_Unicode_NumberDecimalDigit_t NW_Unicode_NumberDecimalDigit; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsNumberDecimalDigit(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_NumberDecimalDigit, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberDecimalDigit_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberDecimalDigitI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberDecimalDigitI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberDecimalDigitI_h_ -#define _NW_Unicode_NumberDecimalDigitI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_NumberDecimalDigit.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberDecimalDigit_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberDecimalDigitI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberLetter.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberLetter.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberLetter_h_ -#define _NW_Unicode_NumberLetter_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberLetter_Class_s NW_Unicode_NumberLetter_Class_t; -typedef struct NW_Unicode_NumberLetter_s NW_Unicode_NumberLetter_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberLetter_ClassPart_s { - void** unused; -} NW_Unicode_NumberLetter_ClassPart_t; - -struct NW_Unicode_NumberLetter_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_NumberLetter_ClassPart_t NW_Unicode_NumberLetter; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_NumberLetter_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_NumberLetter_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_NumberLetter)) - -#define NW_Unicode_NumberLetterOf(object) \ - (NW_Object_Cast (object, NW_Unicode_NumberLetter)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_NumberLetter_Class_t NW_Unicode_NumberLetter_Class; -NW_UNICODE_EXPORT const NW_Unicode_NumberLetter_t NW_Unicode_NumberLetter; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsNumberLetter(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_NumberLetter, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberLetter_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberLetterI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberLetterI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberLetterI_h_ -#define _NW_Unicode_NumberLetterI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_NumberLetter.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberLetter_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberLetterI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberOther.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberOther.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberOther_h_ -#define _NW_Unicode_NumberOther_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberOther_Class_s NW_Unicode_NumberOther_Class_t; -typedef struct NW_Unicode_NumberOther_s NW_Unicode_NumberOther_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_NumberOther_ClassPart_s { - void** unused; -} NW_Unicode_NumberOther_ClassPart_t; - -struct NW_Unicode_NumberOther_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_NumberOther_ClassPart_t NW_Unicode_NumberOther; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_NumberOther_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_NumberOther_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_NumberOther)) - -#define NW_Unicode_NumberOtherOf(object) \ - (NW_Object_Cast (object, NW_Unicode_NumberOther)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_NumberOther_Class_t NW_Unicode_NumberOther_Class; -NW_UNICODE_EXPORT const NW_Unicode_NumberOther_t NW_Unicode_NumberOther; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsNumberOther(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_NumberOther, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberOther_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberOtherI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_NumberOtherI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_NumberOtherI_h_ -#define _NW_Unicode_NumberOtherI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_NumberOther.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberOther_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_NumberOtherI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherControl.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherControl.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherControl_h_ -#define _NW_Unicode_OtherControl_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherControl_Class_s NW_Unicode_OtherControl_Class_t; -typedef struct NW_Unicode_OtherControl_s NW_Unicode_OtherControl_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherControl_ClassPart_s { - void** unused; -} NW_Unicode_OtherControl_ClassPart_t; - -struct NW_Unicode_OtherControl_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_OtherControl_ClassPart_t NW_Unicode_OtherControl; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_OtherControl_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_OtherControl_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_OtherControl)) - -#define NW_Unicode_OtherControlOf(object) \ - (NW_Object_Cast (object, NW_Unicode_OtherControl)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_OtherControl_Class_t NW_Unicode_OtherControl_Class; -NW_UNICODE_EXPORT const NW_Unicode_OtherControl_t NW_Unicode_OtherControl; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsOtherControl(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_OtherControl, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherControl_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherControlI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherControlI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherControlI_h_ -#define _NW_Unicode_OtherControlI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_OtherControl.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherControl_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherControlI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherFormat.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherFormat.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherFormat_h_ -#define _NW_Unicode_OtherFormat_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherFormat_Class_s NW_Unicode_OtherFormat_Class_t; -typedef struct NW_Unicode_OtherFormat_s NW_Unicode_OtherFormat_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherFormat_ClassPart_s { - void** unused; -} NW_Unicode_OtherFormat_ClassPart_t; - -struct NW_Unicode_OtherFormat_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_OtherFormat_ClassPart_t NW_Unicode_OtherFormat; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_OtherFormat_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_OtherFormat_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_OtherFormat)) - -#define NW_Unicode_OtherFormatOf(object) \ - (NW_Object_Cast (object, NW_Unicode_OtherFormat)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_OtherFormat_Class_t NW_Unicode_OtherFormat_Class; -NW_UNICODE_EXPORT const NW_Unicode_OtherFormat_t NW_Unicode_OtherFormat; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsOtherFormat(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_OtherFormat, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherFormat_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherFormatI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherFormatI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherFormatI_h_ -#define _NW_Unicode_OtherFormatI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_OtherFormat.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherFormat_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherFormatI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherNotAssigned.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherNotAssigned.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherNotAssigned_h_ -#define _NW_Unicode_OtherNotAssigned_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherNotAssigned_Class_s NW_Unicode_OtherNotAssigned_Class_t; -typedef struct NW_Unicode_OtherNotAssigned_s NW_Unicode_OtherNotAssigned_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherNotAssigned_ClassPart_s { - void** unused; -} NW_Unicode_OtherNotAssigned_ClassPart_t; - -struct NW_Unicode_OtherNotAssigned_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_OtherNotAssigned_ClassPart_t NW_Unicode_OtherNotAssigned; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_OtherNotAssigned_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_OtherNotAssigned_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_OtherNotAssigned)) - -#define NW_Unicode_OtherNotAssignedOf(object) \ - (NW_Object_Cast (object, NW_Unicode_OtherNotAssigned)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_OtherNotAssigned_Class_t NW_Unicode_OtherNotAssigned_Class; -NW_UNICODE_EXPORT const NW_Unicode_OtherNotAssigned_t NW_Unicode_OtherNotAssigned; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsOtherNotAssigned(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_OtherNotAssigned, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherNotAssigned_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherNotAssignedI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherNotAssignedI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherNotAssignedI_h_ -#define _NW_Unicode_OtherNotAssignedI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_OtherNotAssigned.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherNotAssigned_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherNotAssignedI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherPrivateUse.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherPrivateUse.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherPrivateUse_h_ -#define _NW_Unicode_OtherPrivateUse_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherPrivateUse_Class_s NW_Unicode_OtherPrivateUse_Class_t; -typedef struct NW_Unicode_OtherPrivateUse_s NW_Unicode_OtherPrivateUse_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherPrivateUse_ClassPart_s { - void** unused; -} NW_Unicode_OtherPrivateUse_ClassPart_t; - -struct NW_Unicode_OtherPrivateUse_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_OtherPrivateUse_ClassPart_t NW_Unicode_OtherPrivateUse; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_OtherPrivateUse_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_OtherPrivateUse_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_OtherPrivateUse)) - -#define NW_Unicode_OtherPrivateUseOf(object) \ - (NW_Object_Cast (object, NW_Unicode_OtherPrivateUse)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_OtherPrivateUse_Class_t NW_Unicode_OtherPrivateUse_Class; -NW_UNICODE_EXPORT const NW_Unicode_OtherPrivateUse_t NW_Unicode_OtherPrivateUse; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsOtherPrivateUse(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_OtherPrivateUse, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherPrivateUse_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherPrivateUseI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherPrivateUseI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherPrivateUseI_h_ -#define _NW_Unicode_OtherPrivateUseI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_OtherPrivateUse.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherPrivateUse_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherPrivateUseI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherSurrogate.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherSurrogate.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherSurrogate_h_ -#define _NW_Unicode_OtherSurrogate_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherSurrogate_Class_s NW_Unicode_OtherSurrogate_Class_t; -typedef struct NW_Unicode_OtherSurrogate_s NW_Unicode_OtherSurrogate_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_OtherSurrogate_ClassPart_s { - void** unused; -} NW_Unicode_OtherSurrogate_ClassPart_t; - -struct NW_Unicode_OtherSurrogate_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_OtherSurrogate_ClassPart_t NW_Unicode_OtherSurrogate; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_OtherSurrogate_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_OtherSurrogate_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_OtherSurrogate)) - -#define NW_Unicode_OtherSurrogateOf(object) \ - (NW_Object_Cast (object, NW_Unicode_OtherSurrogate)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_OtherSurrogate_Class_t NW_Unicode_OtherSurrogate_Class; -NW_UNICODE_EXPORT const NW_Unicode_OtherSurrogate_t NW_Unicode_OtherSurrogate; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsOtherSurrogate(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_OtherSurrogate, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherSurrogate_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherSurrogateI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_OtherSurrogateI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_OtherSurrogateI_h_ -#define _NW_Unicode_OtherSurrogateI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_OtherSurrogate.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherSurrogate_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_OtherSurrogateI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationClose.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationClose.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationClose_h_ -#define _NW_Unicode_PunctuationClose_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationClose_Class_s NW_Unicode_PunctuationClose_Class_t; -typedef struct NW_Unicode_PunctuationClose_s NW_Unicode_PunctuationClose_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationClose_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationClose_ClassPart_t; - -struct NW_Unicode_PunctuationClose_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationClose_ClassPart_t NW_Unicode_PunctuationClose; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationClose_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationClose_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationClose)) - -#define NW_Unicode_PunctuationCloseOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationClose)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationClose_Class_t NW_Unicode_PunctuationClose_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationClose_t NW_Unicode_PunctuationClose; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationClose(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationClose, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationClose_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationCloseI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationCloseI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationCloseI_h_ -#define _NW_Unicode_PunctuationCloseI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationClose.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationClose_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationCloseI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationConnector.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationConnector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationConnector_h_ -#define _NW_Unicode_PunctuationConnector_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationConnector_Class_s NW_Unicode_PunctuationConnector_Class_t; -typedef struct NW_Unicode_PunctuationConnector_s NW_Unicode_PunctuationConnector_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationConnector_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationConnector_ClassPart_t; - -struct NW_Unicode_PunctuationConnector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationConnector_ClassPart_t NW_Unicode_PunctuationConnector; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationConnector_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationConnector_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationConnector)) - -#define NW_Unicode_PunctuationConnectorOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationConnector)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationConnector_Class_t NW_Unicode_PunctuationConnector_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationConnector_t NW_Unicode_PunctuationConnector; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationConnector(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationConnector, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationConnector_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationConnectorI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationConnectorI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationConnectorI_h_ -#define _NW_Unicode_PunctuationConnectorI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationConnector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationConnector_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationConnectorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationDash.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationDash.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationDash_h_ -#define _NW_Unicode_PunctuationDash_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationDash_Class_s NW_Unicode_PunctuationDash_Class_t; -typedef struct NW_Unicode_PunctuationDash_s NW_Unicode_PunctuationDash_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationDash_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationDash_ClassPart_t; - -struct NW_Unicode_PunctuationDash_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationDash_ClassPart_t NW_Unicode_PunctuationDash; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationDash_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationDash_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationDash)) - -#define NW_Unicode_PunctuationDashOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationDash)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationDash_Class_t NW_Unicode_PunctuationDash_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationDash_t NW_Unicode_PunctuationDash; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationDash(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationDash, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationDash_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationDashI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationDashI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationDashI_h_ -#define _NW_Unicode_PunctuationDashI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationDash.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationDash_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationDashI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationFinal.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationFinal.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationFinal_h_ -#define _NW_Unicode_PunctuationFinal_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationFinal_Class_s NW_Unicode_PunctuationFinal_Class_t; -typedef struct NW_Unicode_PunctuationFinal_s NW_Unicode_PunctuationFinal_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationFinal_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationFinal_ClassPart_t; - -struct NW_Unicode_PunctuationFinal_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationFinal_ClassPart_t NW_Unicode_PunctuationFinal; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationFinal_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationFinal_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationFinal)) - -#define NW_Unicode_PunctuationFinalOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationFinal)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationFinal_Class_t NW_Unicode_PunctuationFinal_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationFinal_t NW_Unicode_PunctuationFinal; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationFinal(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationFinal, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationFinal_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationFinalI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationFinalI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationFinalI_h_ -#define _NW_Unicode_PunctuationFinalI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationFinal.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationFinal_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationFinalI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationInitial.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationInitial.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationInitial_h_ -#define _NW_Unicode_PunctuationInitial_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationInitial_Class_s NW_Unicode_PunctuationInitial_Class_t; -typedef struct NW_Unicode_PunctuationInitial_s NW_Unicode_PunctuationInitial_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationInitial_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationInitial_ClassPart_t; - -struct NW_Unicode_PunctuationInitial_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationInitial_ClassPart_t NW_Unicode_PunctuationInitial; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationInitial_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationInitial_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationInitial)) - -#define NW_Unicode_PunctuationInitialOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationInitial)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationInitial_Class_t NW_Unicode_PunctuationInitial_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationInitial_t NW_Unicode_PunctuationInitial; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationInitial(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationInitial, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationInitial_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationInitialI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationInitialI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationInitialI_h_ -#define _NW_Unicode_PunctuationInitialI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationInitial.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationInitial_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationInitialI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOpen.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOpen.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationOpen_h_ -#define _NW_Unicode_PunctuationOpen_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationOpen_Class_s NW_Unicode_PunctuationOpen_Class_t; -typedef struct NW_Unicode_PunctuationOpen_s NW_Unicode_PunctuationOpen_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationOpen_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationOpen_ClassPart_t; - -struct NW_Unicode_PunctuationOpen_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationOpen_ClassPart_t NW_Unicode_PunctuationOpen; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationOpen_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationOpen_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationOpen)) - -#define NW_Unicode_PunctuationOpenOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationOpen)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationOpen_Class_t NW_Unicode_PunctuationOpen_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationOpen_t NW_Unicode_PunctuationOpen; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationOpen(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationOpen, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationOpen_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOpenI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOpenI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationOpenI_h_ -#define _NW_Unicode_PunctuationOpenI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationOpen.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationOpen_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationOpenI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOther.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOther.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationOther_h_ -#define _NW_Unicode_PunctuationOther_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationOther_Class_s NW_Unicode_PunctuationOther_Class_t; -typedef struct NW_Unicode_PunctuationOther_s NW_Unicode_PunctuationOther_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_PunctuationOther_ClassPart_s { - void** unused; -} NW_Unicode_PunctuationOther_ClassPart_t; - -struct NW_Unicode_PunctuationOther_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_PunctuationOther_ClassPart_t NW_Unicode_PunctuationOther; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_PunctuationOther_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_PunctuationOther_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_PunctuationOther)) - -#define NW_Unicode_PunctuationOtherOf(object) \ - (NW_Object_Cast (object, NW_Unicode_PunctuationOther)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_PunctuationOther_Class_t NW_Unicode_PunctuationOther_Class; -NW_UNICODE_EXPORT const NW_Unicode_PunctuationOther_t NW_Unicode_PunctuationOther; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsPunctuationOther(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_PunctuationOther, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationOther_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOtherI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_PunctuationOtherI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_PunctuationOtherI_h_ -#define _NW_Unicode_PunctuationOtherI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_PunctuationOther.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationOther_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_PunctuationOtherI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorLine.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorLine.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorLine_h_ -#define _NW_Unicode_SeparatorLine_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorLine_Class_s NW_Unicode_SeparatorLine_Class_t; -typedef struct NW_Unicode_SeparatorLine_s NW_Unicode_SeparatorLine_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorLine_ClassPart_s { - void** unused; -} NW_Unicode_SeparatorLine_ClassPart_t; - -struct NW_Unicode_SeparatorLine_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SeparatorLine_ClassPart_t NW_Unicode_SeparatorLine; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SeparatorLine_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SeparatorLine_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SeparatorLine)) - -#define NW_Unicode_SeparatorLineOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SeparatorLine)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SeparatorLine_Class_t NW_Unicode_SeparatorLine_Class; -NW_UNICODE_EXPORT const NW_Unicode_SeparatorLine_t NW_Unicode_SeparatorLine; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSeparatorLine(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SeparatorLine, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorLine_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorLineI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorLineI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorLineI_h_ -#define _NW_Unicode_SeparatorLineI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SeparatorLine.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorLine_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorLineI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorParagraph.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorParagraph.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorParagraph_h_ -#define _NW_Unicode_SeparatorParagraph_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorParagraph_Class_s NW_Unicode_SeparatorParagraph_Class_t; -typedef struct NW_Unicode_SeparatorParagraph_s NW_Unicode_SeparatorParagraph_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorParagraph_ClassPart_s { - void** unused; -} NW_Unicode_SeparatorParagraph_ClassPart_t; - -struct NW_Unicode_SeparatorParagraph_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SeparatorParagraph_ClassPart_t NW_Unicode_SeparatorParagraph; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SeparatorParagraph_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SeparatorParagraph_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SeparatorParagraph)) - -#define NW_Unicode_SeparatorParagraphOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SeparatorParagraph)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SeparatorParagraph_Class_t NW_Unicode_SeparatorParagraph_Class; -NW_UNICODE_EXPORT const NW_Unicode_SeparatorParagraph_t NW_Unicode_SeparatorParagraph; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSeparatorParagraph(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SeparatorParagraph, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorParagraph_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorParagraphI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorParagraphI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorParagraphI_h_ -#define _NW_Unicode_SeparatorParagraphI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SeparatorParagraph.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorParagraph_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorParagraphI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorSpace.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorSpace.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorSpace_h_ -#define _NW_Unicode_SeparatorSpace_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorSpace_Class_s NW_Unicode_SeparatorSpace_Class_t; -typedef struct NW_Unicode_SeparatorSpace_s NW_Unicode_SeparatorSpace_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SeparatorSpace_ClassPart_s { - void** unused; -} NW_Unicode_SeparatorSpace_ClassPart_t; - -struct NW_Unicode_SeparatorSpace_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SeparatorSpace_ClassPart_t NW_Unicode_SeparatorSpace; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SeparatorSpace_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SeparatorSpace_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SeparatorSpace)) - -#define NW_Unicode_SeparatorSpaceOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SeparatorSpace)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SeparatorSpace_Class_t NW_Unicode_SeparatorSpace_Class; -NW_UNICODE_EXPORT const NW_Unicode_SeparatorSpace_t NW_Unicode_SeparatorSpace; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSeparatorSpace(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SeparatorSpace, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorSpace_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorSpaceI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SeparatorSpaceI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SeparatorSpaceI_h_ -#define _NW_Unicode_SeparatorSpaceI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SeparatorSpace.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorSpace_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SeparatorSpaceI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolCurrency.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolCurrency.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolCurrency_h_ -#define _NW_Unicode_SymbolCurrency_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolCurrency_Class_s NW_Unicode_SymbolCurrency_Class_t; -typedef struct NW_Unicode_SymbolCurrency_s NW_Unicode_SymbolCurrency_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolCurrency_ClassPart_s { - void** unused; -} NW_Unicode_SymbolCurrency_ClassPart_t; - -struct NW_Unicode_SymbolCurrency_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SymbolCurrency_ClassPart_t NW_Unicode_SymbolCurrency; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SymbolCurrency_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SymbolCurrency_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SymbolCurrency)) - -#define NW_Unicode_SymbolCurrencyOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SymbolCurrency)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SymbolCurrency_Class_t NW_Unicode_SymbolCurrency_Class; -NW_UNICODE_EXPORT const NW_Unicode_SymbolCurrency_t NW_Unicode_SymbolCurrency; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSymbolCurrency(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SymbolCurrency, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolCurrency_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolCurrencyI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolCurrencyI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolCurrencyI_h_ -#define _NW_Unicode_SymbolCurrencyI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SymbolCurrency.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolCurrency_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolCurrencyI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolMath.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolMath.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolMath_h_ -#define _NW_Unicode_SymbolMath_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolMath_Class_s NW_Unicode_SymbolMath_Class_t; -typedef struct NW_Unicode_SymbolMath_s NW_Unicode_SymbolMath_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolMath_ClassPart_s { - void** unused; -} NW_Unicode_SymbolMath_ClassPart_t; - -struct NW_Unicode_SymbolMath_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SymbolMath_ClassPart_t NW_Unicode_SymbolMath; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SymbolMath_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SymbolMath_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SymbolMath)) - -#define NW_Unicode_SymbolMathOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SymbolMath)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SymbolMath_Class_t NW_Unicode_SymbolMath_Class; -NW_UNICODE_EXPORT const NW_Unicode_SymbolMath_t NW_Unicode_SymbolMath; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSymbolMath(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SymbolMath, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolMath_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolMathI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolMathI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolMathI_h_ -#define _NW_Unicode_SymbolMathI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SymbolMath.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolMath_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolMathI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolModifier.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolModifier.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolModifier_h_ -#define _NW_Unicode_SymbolModifier_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolModifier_Class_s NW_Unicode_SymbolModifier_Class_t; -typedef struct NW_Unicode_SymbolModifier_s NW_Unicode_SymbolModifier_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolModifier_ClassPart_s { - void** unused; -} NW_Unicode_SymbolModifier_ClassPart_t; - -struct NW_Unicode_SymbolModifier_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SymbolModifier_ClassPart_t NW_Unicode_SymbolModifier; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SymbolModifier_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SymbolModifier_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SymbolModifier)) - -#define NW_Unicode_SymbolModifierOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SymbolModifier)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SymbolModifier_Class_t NW_Unicode_SymbolModifier_Class; -NW_UNICODE_EXPORT const NW_Unicode_SymbolModifier_t NW_Unicode_SymbolModifier; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSymbolModifier(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SymbolModifier, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolModifier_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolModifierI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolModifierI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolModifierI_h_ -#define _NW_Unicode_SymbolModifierI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SymbolModifier.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolModifier_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolModifierI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolOther.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolOther.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolOther_h_ -#define _NW_Unicode_SymbolOther_h_ - - - - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolOther_Class_s NW_Unicode_SymbolOther_Class_t; -typedef struct NW_Unicode_SymbolOther_s NW_Unicode_SymbolOther_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_SymbolOther_ClassPart_s { - void** unused; -} NW_Unicode_SymbolOther_ClassPart_t; - -struct NW_Unicode_SymbolOther_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_SymbolOther_ClassPart_t NW_Unicode_SymbolOther; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_SymbolOther_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_SymbolOther_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_SymbolOther)) - -#define NW_Unicode_SymbolOtherOf(object) \ - (NW_Object_Cast (object, NW_Unicode_SymbolOther)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_SymbolOther_Class_t NW_Unicode_SymbolOther_Class; -NW_UNICODE_EXPORT const NW_Unicode_SymbolOther_t NW_Unicode_SymbolOther; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_IsSymbolOther(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_SymbolOther, (_code))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolOther_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolOtherI.h --- a/webengine/wmlengine/src/Unicode/include/NW_Unicode_SymbolOtherI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_SymbolOtherI_h_ -#define _NW_Unicode_SymbolOtherI_h_ - - - - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_SymbolOther.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -NW_UNICODE_EXPORT const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolOther_Table[]; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Unicode_SymbolOtherI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_Category.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_Category.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_CategoryI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_Class_t NW_Unicode_Category_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ 0, - /* table */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Unicode_Category_IsMemberOf (const NW_Unicode_Category_t* category, - NW_Ucs4 code) -{ - NW_Int32 index; - NW_Int32 start; - NW_Int32 end; - const NW_Unicode_Category_TableEntry_t* table; - - /* since we require that the table is sorted, we can apply a binary search - algorithm to find the entry for the supplied code */ - index = 0; - start = 0; - end = NW_Unicode_Category_GetClassPart(category).tableSize - 1; - table = NW_Unicode_Category_GetClassPart(category).table; - - while (end >= start) { - index = (end + start) / 2; - if (code >= table[index].start && code <= table[index].end) { - if (table[index].increment == 0 || - (code - table[index].start) % table[index].increment == 0) { - return NW_TRUE; - } - return NW_FALSE; - } else if (code < table[index].start) { - end = index - 1; - } else if (code > table[index].end) { - start = index + 1; - } - } - return NW_FALSE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterChina.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterChina.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4447 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterChinaI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterChina_Table[] = { - { 0x00000024, 0x00000024, 0x00 }, - { 0x0000002d, 0x0000002d, 0x00 }, - { 0x0000007e, 0x0000007e, 0x00 }, - { 0x000000a3, 0x000000a4, 0x01 }, - { 0x000000a7, 0x000000a8, 0x01 }, - { 0x000000b0, 0x000000b1, 0x01 }, - { 0x000000b7, 0x000000b7, 0x00 }, - { 0x000000c0, 0x000000c1, 0x01 }, - { 0x000000c8, 0x000000ca, 0x01 }, - { 0x000000d2, 0x000000d3, 0x01 }, - { 0x000000d7, 0x000000d7, 0x00 }, - { 0x000000e0, 0x000000e1, 0x01 }, - { 0x000000e8, 0x000000ea, 0x01 }, - { 0x000000ec, 0x000000ed, 0x01 }, - { 0x000000f2, 0x000000f3, 0x01 }, - { 0x000000f7, 0x000000f7, 0x00 }, - { 0x000000f9, 0x000000fa, 0x01 }, - { 0x000000fc, 0x000000fc, 0x00 }, - { 0x00000100, 0x00000101, 0x01 }, - { 0x00000112, 0x00000113, 0x01 }, - { 0x0000011a, 0x0000011b, 0x01 }, - { 0x0000012b, 0x0000012b, 0x00 }, - { 0x00000144, 0x00000144, 0x00 }, - { 0x00000148, 0x00000148, 0x00 }, - { 0x0000014b, 0x0000014d, 0x01 }, - { 0x00000153, 0x00000153, 0x00 }, - { 0x0000016b, 0x0000016b, 0x00 }, - { 0x000001cd, 0x000001ce, 0x01 }, - { 0x000001d0, 0x000001d2, 0x01 }, - { 0x000001d4, 0x000001d4, 0x00 }, - { 0x000001d6, 0x000001d6, 0x00 }, - { 0x000001d8, 0x000001d8, 0x00 }, - { 0x000001da, 0x000001da, 0x00 }, - { 0x000001dc, 0x000001dc, 0x00 }, - { 0x00000250, 0x00000251, 0x01 }, - { 0x00000254, 0x00000254, 0x00 }, - { 0x0000025b, 0x0000025b, 0x00 }, - { 0x00000261, 0x00000261, 0x00 }, - { 0x0000026a, 0x0000026a, 0x00 }, - { 0x00000275, 0x00000275, 0x00 }, - { 0x00000283, 0x00000283, 0x00 }, - { 0x0000028a, 0x0000028a, 0x00 }, - { 0x000002c6, 0x000002c7, 0x01 }, - { 0x000002c9, 0x000002cb, 0x01 }, - { 0x000002d9, 0x000002d9, 0x00 }, - { 0x00000391, 0x000003a1, 0x01 }, - { 0x000003a3, 0x000003a9, 0x01 }, - { 0x000003b1, 0x000003c1, 0x01 }, - { 0x000003c3, 0x000003c9, 0x01 }, - { 0x00000401, 0x00000401, 0x00 }, - { 0x00000410, 0x0000044f, 0x01 }, - { 0x00000451, 0x00000451, 0x00 }, - { 0x00001ebe, 0x00001ec1, 0x01 }, - { 0x00002010, 0x00002010, 0x00 }, - { 0x00002013, 0x00002016, 0x01 }, - { 0x00002018, 0x00002019, 0x01 }, - { 0x0000201c, 0x0000201d, 0x01 }, - { 0x00002025, 0x00002026, 0x01 }, - { 0x00002030, 0x00002030, 0x00 }, - { 0x00002032, 0x00002033, 0x01 }, - { 0x00002035, 0x00002035, 0x00 }, - { 0x0000203b, 0x0000203b, 0x00 }, - { 0x00002103, 0x00002103, 0x00 }, - { 0x00002105, 0x00002105, 0x00 }, - { 0x00002109, 0x00002109, 0x00 }, - { 0x00002116, 0x00002116, 0x00 }, - { 0x00002121, 0x00002121, 0x00 }, - { 0x00002160, 0x0000216b, 0x01 }, - { 0x00002170, 0x00002179, 0x01 }, - { 0x00002190, 0x00002193, 0x01 }, - { 0x00002196, 0x00002199, 0x01 }, - { 0x000021b8, 0x000021b9, 0x01 }, - { 0x000021e7, 0x000021e7, 0x00 }, - { 0x00002208, 0x00002208, 0x00 }, - { 0x0000220f, 0x0000220f, 0x00 }, - { 0x00002211, 0x00002211, 0x00 }, - { 0x00002215, 0x00002215, 0x00 }, - { 0x0000221a, 0x0000221a, 0x00 }, - { 0x0000221d, 0x00002220, 0x01 }, - { 0x00002223, 0x00002223, 0x00 }, - { 0x00002225, 0x00002225, 0x00 }, - { 0x00002227, 0x0000222b, 0x01 }, - { 0x0000222e, 0x0000222e, 0x00 }, - { 0x00002234, 0x00002237, 0x01 }, - { 0x0000223d, 0x0000223d, 0x00 }, - { 0x00002248, 0x00002248, 0x00 }, - { 0x0000224c, 0x0000224c, 0x00 }, - { 0x00002252, 0x00002252, 0x00 }, - { 0x00002260, 0x00002261, 0x01 }, - { 0x00002264, 0x00002267, 0x01 }, - { 0x0000226e, 0x0000226f, 0x01 }, - { 0x00002295, 0x00002295, 0x00 }, - { 0x00002299, 0x00002299, 0x00 }, - { 0x000022a5, 0x000022a5, 0x00 }, - { 0x000022bf, 0x000022bf, 0x00 }, - { 0x00002312, 0x00002312, 0x00 }, - { 0x00002460, 0x00002469, 0x01 }, - { 0x00002474, 0x0000249b, 0x01 }, - { 0x00002500, 0x0000254b, 0x01 }, - { 0x00002550, 0x00002573, 0x01 }, - { 0x00002581, 0x0000258f, 0x01 }, - { 0x00002594, 0x00002595, 0x01 }, - { 0x000025a0, 0x000025a1, 0x01 }, - { 0x000025b2, 0x000025b3, 0x01 }, - { 0x000025bc, 0x000025bd, 0x01 }, - { 0x000025c6, 0x000025c7, 0x01 }, - { 0x000025cb, 0x000025cb, 0x00 }, - { 0x000025ce, 0x000025cf, 0x01 }, - { 0x000025e2, 0x000025e5, 0x01 }, - { 0x00002605, 0x00002606, 0x01 }, - { 0x00002609, 0x00002609, 0x00 }, - { 0x00002640, 0x00002640, 0x00 }, - { 0x00002642, 0x00002642, 0x00 }, - { 0x0000273d, 0x0000273d, 0x00 }, - { 0x00002e80, 0x00002e80, 0x00 }, - { 0x00002e84, 0x00002e84, 0x00 }, - { 0x00002e86, 0x00002e88, 0x01 }, - { 0x00002e8a, 0x00002e8a, 0x00 }, - { 0x00002e8c, 0x00002e8d, 0x01 }, - { 0x00002e95, 0x00002e95, 0x00 }, - { 0x00002e9c, 0x00002e9d, 0x01 }, - { 0x00002ea5, 0x00002ea5, 0x00 }, - { 0x00002ea7, 0x00002ea7, 0x00 }, - { 0x00002eaa, 0x00002eaa, 0x00 }, - { 0x00002eac, 0x00002eac, 0x00 }, - { 0x00002eae, 0x00002eae, 0x00 }, - { 0x00002eb6, 0x00002eb6, 0x00 }, - { 0x00002ebc, 0x00002ebc, 0x00 }, - { 0x00002ebe, 0x00002ebe, 0x00 }, - { 0x00002ec6, 0x00002ec6, 0x00 }, - { 0x00002eca, 0x00002eca, 0x00 }, - { 0x00002ecc, 0x00002ecd, 0x01 }, - { 0x00002ecf, 0x00002ecf, 0x00 }, - { 0x00002ed6, 0x00002ed7, 0x01 }, - { 0x00002ede, 0x00002ede, 0x00 }, - { 0x00002ee3, 0x00002ee3, 0x00 }, - { 0x00002f33, 0x00002f33, 0x00 }, - { 0x00003000, 0x00003003, 0x01 }, - { 0x00003005, 0x00003017, 0x01 }, - { 0x0000301d, 0x0000301e, 0x01 }, - { 0x00003021, 0x00003029, 0x01 }, - { 0x00003041, 0x00003093, 0x01 }, - { 0x0000309b, 0x0000309e, 0x01 }, - { 0x000030a1, 0x000030f6, 0x01 }, - { 0x000030fb, 0x000030fe, 0x01 }, - { 0x00003105, 0x00003129, 0x01 }, - { 0x00003220, 0x00003229, 0x01 }, - { 0x00003231, 0x00003231, 0x00 }, - { 0x000032a3, 0x000032a3, 0x00 }, - { 0x0000338e, 0x0000338f, 0x01 }, - { 0x0000339c, 0x0000339e, 0x01 }, - { 0x000033a1, 0x000033a1, 0x00 }, - { 0x000033c4, 0x000033c4, 0x00 }, - { 0x000033ce, 0x000033ce, 0x00 }, - { 0x000033d1, 0x000033d2, 0x01 }, - { 0x000033d5, 0x000033d5, 0x00 }, - { 0x00003435, 0x00003435, 0x00 }, - { 0x00003440, 0x00003440, 0x00 }, - { 0x0000344c, 0x0000344c, 0x00 }, - { 0x00003464, 0x00003464, 0x00 }, - { 0x00003473, 0x00003473, 0x00 }, - { 0x0000347a, 0x0000347a, 0x00 }, - { 0x0000347d, 0x0000347e, 0x01 }, - { 0x00003493, 0x00003493, 0x00 }, - { 0x00003496, 0x00003496, 0x00 }, - { 0x000034a5, 0x000034a5, 0x00 }, - { 0x000034af, 0x000034af, 0x00 }, - { 0x000034bc, 0x000034bc, 0x00 }, - { 0x000034c1, 0x000034c1, 0x00 }, - { 0x000034c8, 0x000034c8, 0x00 }, - { 0x000034df, 0x000034df, 0x00 }, - { 0x000034e4, 0x000034e4, 0x00 }, - { 0x000034fb, 0x000034fb, 0x00 }, - { 0x00003506, 0x00003506, 0x00 }, - { 0x0000353e, 0x0000353e, 0x00 }, - { 0x00003551, 0x00003551, 0x00 }, - { 0x00003553, 0x00003553, 0x00 }, - { 0x00003561, 0x00003561, 0x00 }, - { 0x0000356d, 0x0000356d, 0x00 }, - { 0x00003570, 0x00003570, 0x00 }, - { 0x00003572, 0x00003572, 0x00 }, - { 0x00003577, 0x00003578, 0x01 }, - { 0x00003584, 0x00003584, 0x00 }, - { 0x00003597, 0x00003598, 0x01 }, - { 0x000035a1, 0x000035a1, 0x00 }, - { 0x000035a5, 0x000035a5, 0x00 }, - { 0x000035ad, 0x000035ad, 0x00 }, - { 0x000035bf, 0x000035bf, 0x00 }, - { 0x000035c1, 0x000035c1, 0x00 }, - { 0x000035c5, 0x000035c5, 0x00 }, - { 0x000035c7, 0x000035c7, 0x00 }, - { 0x000035ca, 0x000035ca, 0x00 }, - { 0x000035ce, 0x000035ce, 0x00 }, - { 0x000035d2, 0x000035d2, 0x00 }, - { 0x000035d6, 0x000035d6, 0x00 }, - { 0x000035db, 0x000035db, 0x00 }, - { 0x000035dd, 0x000035dd, 0x00 }, - { 0x000035f1, 0x000035f3, 0x01 }, - { 0x000035fb, 0x000035fb, 0x00 }, - { 0x000035fe, 0x000035fe, 0x00 }, - { 0x00003609, 0x00003609, 0x00 }, - { 0x00003618, 0x00003618, 0x00 }, - { 0x0000361a, 0x0000361a, 0x00 }, - { 0x00003623, 0x00003623, 0x00 }, - { 0x0000362d, 0x0000362d, 0x00 }, - { 0x00003635, 0x00003635, 0x00 }, - { 0x00003639, 0x00003639, 0x00 }, - { 0x0000363e, 0x0000363e, 0x00 }, - { 0x00003647, 0x00003649, 0x01 }, - { 0x0000364e, 0x0000364e, 0x00 }, - { 0x0000365f, 0x0000365f, 0x00 }, - { 0x0000367a, 0x0000367a, 0x00 }, - { 0x00003681, 0x00003681, 0x00 }, - { 0x0000369a, 0x0000369a, 0x00 }, - { 0x000036a5, 0x000036a5, 0x00 }, - { 0x000036aa, 0x000036aa, 0x00 }, - { 0x000036ac, 0x000036ac, 0x00 }, - { 0x000036b0, 0x000036b1, 0x01 }, - { 0x000036b5, 0x000036b5, 0x00 }, - { 0x000036b9, 0x000036b9, 0x00 }, - { 0x000036bc, 0x000036bc, 0x00 }, - { 0x000036c1, 0x000036c1, 0x00 }, - { 0x000036c3, 0x000036c5, 0x01 }, - { 0x000036c7, 0x000036c8, 0x01 }, - { 0x000036d3, 0x000036d4, 0x01 }, - { 0x000036d6, 0x000036d6, 0x00 }, - { 0x000036dd, 0x000036dd, 0x00 }, - { 0x000036e1, 0x000036e2, 0x01 }, - { 0x000036e5, 0x000036e6, 0x01 }, - { 0x000036f5, 0x000036f5, 0x00 }, - { 0x00003701, 0x00003701, 0x00 }, - { 0x00003703, 0x00003703, 0x00 }, - { 0x00003708, 0x00003708, 0x00 }, - { 0x0000370a, 0x0000370a, 0x00 }, - { 0x0000370d, 0x0000370d, 0x00 }, - { 0x0000371c, 0x0000371c, 0x00 }, - { 0x00003722, 0x00003723, 0x01 }, - { 0x00003725, 0x00003725, 0x00 }, - { 0x0000372c, 0x0000372d, 0x01 }, - { 0x00003730, 0x00003730, 0x00 }, - { 0x00003732, 0x00003733, 0x01 }, - { 0x0000373a, 0x0000373a, 0x00 }, - { 0x00003740, 0x00003740, 0x00 }, - { 0x00003743, 0x00003743, 0x00 }, - { 0x00003762, 0x00003762, 0x00 }, - { 0x0000376f, 0x0000376f, 0x00 }, - { 0x00003797, 0x00003797, 0x00 }, - { 0x000037a0, 0x000037a0, 0x00 }, - { 0x000037b9, 0x000037b9, 0x00 }, - { 0x000037be, 0x000037be, 0x00 }, - { 0x000037f2, 0x000037f2, 0x00 }, - { 0x000037f8, 0x000037f8, 0x00 }, - { 0x000037fb, 0x000037fb, 0x00 }, - { 0x0000380f, 0x0000380f, 0x00 }, - { 0x00003819, 0x00003819, 0x00 }, - { 0x00003820, 0x00003820, 0x00 }, - { 0x0000382d, 0x0000382d, 0x00 }, - { 0x00003836, 0x00003836, 0x00 }, - { 0x00003838, 0x00003838, 0x00 }, - { 0x00003863, 0x00003863, 0x00 }, - { 0x000038a0, 0x000038a0, 0x00 }, - { 0x000038c3, 0x000038c3, 0x00 }, - { 0x000038cc, 0x000038cc, 0x00 }, - { 0x000038d1, 0x000038d1, 0x00 }, - { 0x000038fa, 0x000038fa, 0x00 }, - { 0x00003908, 0x00003908, 0x00 }, - { 0x00003914, 0x00003914, 0x00 }, - { 0x00003927, 0x00003927, 0x00 }, - { 0x00003932, 0x00003932, 0x00 }, - { 0x0000393f, 0x0000393f, 0x00 }, - { 0x0000394d, 0x0000394d, 0x00 }, - { 0x00003963, 0x00003963, 0x00 }, - { 0x00003980, 0x00003980, 0x00 }, - { 0x00003989, 0x0000398a, 0x01 }, - { 0x00003992, 0x00003992, 0x00 }, - { 0x00003999, 0x00003999, 0x00 }, - { 0x0000399b, 0x0000399b, 0x00 }, - { 0x000039a1, 0x000039a1, 0x00 }, - { 0x000039a4, 0x000039a4, 0x00 }, - { 0x000039b8, 0x000039b8, 0x00 }, - { 0x000039dc, 0x000039dc, 0x00 }, - { 0x000039e2, 0x000039e2, 0x00 }, - { 0x000039e5, 0x000039e5, 0x00 }, - { 0x000039ec, 0x000039ec, 0x00 }, - { 0x000039f8, 0x000039f8, 0x00 }, - { 0x000039fb, 0x000039fb, 0x00 }, - { 0x000039fe, 0x000039fe, 0x00 }, - { 0x00003a01, 0x00003a01, 0x00 }, - { 0x00003a03, 0x00003a03, 0x00 }, - { 0x00003a06, 0x00003a06, 0x00 }, - { 0x00003a17, 0x00003a18, 0x01 }, - { 0x00003a29, 0x00003a2a, 0x01 }, - { 0x00003a34, 0x00003a34, 0x00 }, - { 0x00003a4b, 0x00003a4b, 0x00 }, - { 0x00003a52, 0x00003a52, 0x00 }, - { 0x00003a57, 0x00003a57, 0x00 }, - { 0x00003a5c, 0x00003a5c, 0x00 }, - { 0x00003a5e, 0x00003a5e, 0x00 }, - { 0x00003a66, 0x00003a67, 0x01 }, - { 0x00003a97, 0x00003a97, 0x00 }, - { 0x00003aab, 0x00003aab, 0x00 }, - { 0x00003abd, 0x00003abd, 0x00 }, - { 0x00003ade, 0x00003ade, 0x00 }, - { 0x00003ae0, 0x00003ae0, 0x00 }, - { 0x00003af0, 0x00003af0, 0x00 }, - { 0x00003af2, 0x00003af2, 0x00 }, - { 0x00003afb, 0x00003afb, 0x00 }, - { 0x00003b0e, 0x00003b0e, 0x00 }, - { 0x00003b19, 0x00003b19, 0x00 }, - { 0x00003b22, 0x00003b22, 0x00 }, - { 0x00003b2b, 0x00003b2b, 0x00 }, - { 0x00003b39, 0x00003b39, 0x00 }, - { 0x00003b42, 0x00003b42, 0x00 }, - { 0x00003b58, 0x00003b58, 0x00 }, - { 0x00003b60, 0x00003b60, 0x00 }, - { 0x00003b71, 0x00003b72, 0x01 }, - { 0x00003b7b, 0x00003b7c, 0x01 }, - { 0x00003b80, 0x00003b80, 0x00 }, - { 0x00003b96, 0x00003b96, 0x00 }, - { 0x00003b99, 0x00003b99, 0x00 }, - { 0x00003ba1, 0x00003ba1, 0x00 }, - { 0x00003bbc, 0x00003bbc, 0x00 }, - { 0x00003bbe, 0x00003bbe, 0x00 }, - { 0x00003bc2, 0x00003bc2, 0x00 }, - { 0x00003bc4, 0x00003bc4, 0x00 }, - { 0x00003bd7, 0x00003bd7, 0x00 }, - { 0x00003bdd, 0x00003bdd, 0x00 }, - { 0x00003bec, 0x00003bec, 0x00 }, - { 0x00003bf2, 0x00003bf4, 0x01 }, - { 0x00003c0d, 0x00003c0d, 0x00 }, - { 0x00003c11, 0x00003c11, 0x00 }, - { 0x00003c15, 0x00003c15, 0x00 }, - { 0x00003c54, 0x00003c54, 0x00 }, - { 0x00003ccb, 0x00003ccb, 0x00 }, - { 0x00003ccd, 0x00003ccd, 0x00 }, - { 0x00003cd1, 0x00003cd1, 0x00 }, - { 0x00003cd6, 0x00003cd6, 0x00 }, - { 0x00003cdc, 0x00003cdc, 0x00 }, - { 0x00003ceb, 0x00003ceb, 0x00 }, - { 0x00003cef, 0x00003cef, 0x00 }, - { 0x00003d13, 0x00003d13, 0x00 }, - { 0x00003d1d, 0x00003d1d, 0x00 }, - { 0x00003d32, 0x00003d32, 0x00 }, - { 0x00003d3b, 0x00003d3b, 0x00 }, - { 0x00003d46, 0x00003d46, 0x00 }, - { 0x00003d4c, 0x00003d4c, 0x00 }, - { 0x00003d4e, 0x00003d4e, 0x00 }, - { 0x00003d51, 0x00003d51, 0x00 }, - { 0x00003d5f, 0x00003d5f, 0x00 }, - { 0x00003d62, 0x00003d62, 0x00 }, - { 0x00003d69, 0x00003d6a, 0x01 }, - { 0x00003d6f, 0x00003d6f, 0x00 }, - { 0x00003d75, 0x00003d75, 0x00 }, - { 0x00003d7d, 0x00003d7d, 0x00 }, - { 0x00003d85, 0x00003d85, 0x00 }, - { 0x00003d8a, 0x00003d8a, 0x00 }, - { 0x00003d8f, 0x00003d8f, 0x00 }, - { 0x00003d91, 0x00003d91, 0x00 }, - { 0x00003da5, 0x00003da5, 0x00 }, - { 0x00003dad, 0x00003dad, 0x00 }, - { 0x00003db4, 0x00003db4, 0x00 }, - { 0x00003dbf, 0x00003dbf, 0x00 }, - { 0x00003dc6, 0x00003dc7, 0x01 }, - { 0x00003dcc, 0x00003dcd, 0x01 }, - { 0x00003dd3, 0x00003dd3, 0x00 }, - { 0x00003ddb, 0x00003ddb, 0x00 }, - { 0x00003de7, 0x00003de8, 0x01 }, - { 0x00003deb, 0x00003deb, 0x00 }, - { 0x00003df3, 0x00003df3, 0x00 }, - { 0x00003df7, 0x00003df7, 0x00 }, - { 0x00003dfc, 0x00003dfd, 0x01 }, - { 0x00003e06, 0x00003e06, 0x00 }, - { 0x00003e40, 0x00003e40, 0x00 }, - { 0x00003e43, 0x00003e43, 0x00 }, - { 0x00003e48, 0x00003e48, 0x00 }, - { 0x00003e55, 0x00003e55, 0x00 }, - { 0x00003e74, 0x00003e74, 0x00 }, - { 0x00003ea8, 0x00003eaa, 0x01 }, - { 0x00003ead, 0x00003ead, 0x00 }, - { 0x00003eb1, 0x00003eb1, 0x00 }, - { 0x00003eb8, 0x00003eb8, 0x00 }, - { 0x00003ebf, 0x00003ebf, 0x00 }, - { 0x00003ec2, 0x00003ec2, 0x00 }, - { 0x00003ec7, 0x00003ec7, 0x00 }, - { 0x00003eca, 0x00003eca, 0x00 }, - { 0x00003ecc, 0x00003ecc, 0x00 }, - { 0x00003ed0, 0x00003ed1, 0x01 }, - { 0x00003ed6, 0x00003ed7, 0x01 }, - { 0x00003eda, 0x00003eda, 0x00 }, - { 0x00003ede, 0x00003ede, 0x00 }, - { 0x00003ee1, 0x00003ee2, 0x01 }, - { 0x00003ee7, 0x00003ee7, 0x00 }, - { 0x00003ee9, 0x00003ee9, 0x00 }, - { 0x00003eeb, 0x00003eeb, 0x00 }, - { 0x00003ef0, 0x00003ef0, 0x00 }, - { 0x00003ef3, 0x00003ef4, 0x01 }, - { 0x00003efa, 0x00003efa, 0x00 }, - { 0x00003efc, 0x00003efc, 0x00 }, - { 0x00003eff, 0x00003f00, 0x01 }, - { 0x00003f04, 0x00003f04, 0x00 }, - { 0x00003f06, 0x00003f06, 0x00 }, - { 0x00003f0e, 0x00003f0e, 0x00 }, - { 0x00003f53, 0x00003f53, 0x00 }, - { 0x00003f58, 0x00003f59, 0x01 }, - { 0x00003f63, 0x00003f63, 0x00 }, - { 0x00003f7c, 0x00003f7c, 0x00 }, - { 0x00003f93, 0x00003f93, 0x00 }, - { 0x00003fc0, 0x00003fc0, 0x00 }, - { 0x00003fd7, 0x00003fd7, 0x00 }, - { 0x00003fdc, 0x00003fdc, 0x00 }, - { 0x00003fe5, 0x00003fe5, 0x00 }, - { 0x00003fed, 0x00003fed, 0x00 }, - { 0x00003ff9, 0x00003ffa, 0x01 }, - { 0x00004004, 0x00004004, 0x00 }, - { 0x0000401d, 0x0000401d, 0x00 }, - { 0x00004039, 0x00004039, 0x00 }, - { 0x00004045, 0x00004045, 0x00 }, - { 0x00004053, 0x00004053, 0x00 }, - { 0x00004057, 0x00004057, 0x00 }, - { 0x00004062, 0x00004062, 0x00 }, - { 0x00004065, 0x00004065, 0x00 }, - { 0x0000406a, 0x0000406a, 0x00 }, - { 0x0000406f, 0x0000406f, 0x00 }, - { 0x000040a8, 0x000040a8, 0x00 }, - { 0x000040bb, 0x000040bb, 0x00 }, - { 0x000040bf, 0x000040bf, 0x00 }, - { 0x000040c8, 0x000040c8, 0x00 }, - { 0x000040d8, 0x000040d8, 0x00 }, - { 0x000040df, 0x000040df, 0x00 }, - { 0x000040fa, 0x000040fa, 0x00 }, - { 0x00004103, 0x00004104, 0x01 }, - { 0x00004109, 0x00004109, 0x00 }, - { 0x0000410e, 0x0000410e, 0x00 }, - { 0x00004132, 0x00004132, 0x00 }, - { 0x00004167, 0x00004167, 0x00 }, - { 0x0000416c, 0x0000416c, 0x00 }, - { 0x0000416e, 0x0000416e, 0x00 }, - { 0x0000417f, 0x0000417f, 0x00 }, - { 0x00004190, 0x00004190, 0x00 }, - { 0x000041b2, 0x000041b2, 0x00 }, - { 0x000041c4, 0x000041c4, 0x00 }, - { 0x000041ca, 0x000041ca, 0x00 }, - { 0x000041cf, 0x000041cf, 0x00 }, - { 0x000041db, 0x000041db, 0x00 }, - { 0x000041ef, 0x000041ef, 0x00 }, - { 0x000041f9, 0x000041f9, 0x00 }, - { 0x00004211, 0x00004211, 0x00 }, - { 0x00004240, 0x00004240, 0x00 }, - { 0x00004260, 0x00004260, 0x00 }, - { 0x0000426a, 0x0000426a, 0x00 }, - { 0x0000427a, 0x0000427a, 0x00 }, - { 0x0000428c, 0x0000428c, 0x00 }, - { 0x00004294, 0x00004294, 0x00 }, - { 0x000042b5, 0x000042b5, 0x00 }, - { 0x000042b9, 0x000042b9, 0x00 }, - { 0x000042bc, 0x000042bc, 0x00 }, - { 0x000042f4, 0x000042f4, 0x00 }, - { 0x000042fb, 0x000042fc, 0x01 }, - { 0x0000432b, 0x0000432b, 0x00 }, - { 0x0000436e, 0x0000436e, 0x00 }, - { 0x00004397, 0x00004397, 0x00 }, - { 0x000043ba, 0x000043ba, 0x00 }, - { 0x000043c1, 0x000043c1, 0x00 }, - { 0x000043d9, 0x000043d9, 0x00 }, - { 0x000043df, 0x000043df, 0x00 }, - { 0x000043ed, 0x000043ed, 0x00 }, - { 0x000043f2, 0x000043f2, 0x00 }, - { 0x00004401, 0x00004402, 0x01 }, - { 0x00004413, 0x00004413, 0x00 }, - { 0x00004425, 0x00004425, 0x00 }, - { 0x0000442d, 0x0000442d, 0x00 }, - { 0x0000447a, 0x0000447a, 0x00 }, - { 0x0000448f, 0x0000448f, 0x00 }, - { 0x0000449f, 0x000044a0, 0x01 }, - { 0x000044a2, 0x000044a2, 0x00 }, - { 0x000044b0, 0x000044b0, 0x00 }, - { 0x000044b7, 0x000044b7, 0x00 }, - { 0x000044c0, 0x000044c0, 0x00 }, - { 0x000044c5, 0x000044c5, 0x00 }, - { 0x000044ce, 0x000044ce, 0x00 }, - { 0x000044dd, 0x000044dd, 0x00 }, - { 0x000044df, 0x000044df, 0x00 }, - { 0x000044e4, 0x000044e4, 0x00 }, - { 0x000044e9, 0x000044ec, 0x01 }, - { 0x000044f4, 0x000044f4, 0x00 }, - { 0x00004503, 0x00004504, 0x01 }, - { 0x00004509, 0x00004509, 0x00 }, - { 0x0000450b, 0x0000450b, 0x00 }, - { 0x00004516, 0x00004516, 0x00 }, - { 0x0000451d, 0x0000451d, 0x00 }, - { 0x00004527, 0x00004527, 0x00 }, - { 0x0000452e, 0x0000452e, 0x00 }, - { 0x00004533, 0x00004533, 0x00 }, - { 0x0000453b, 0x0000453b, 0x00 }, - { 0x0000453d, 0x0000453d, 0x00 }, - { 0x0000453f, 0x0000453f, 0x00 }, - { 0x00004543, 0x00004543, 0x00 }, - { 0x00004551, 0x00004552, 0x01 }, - { 0x00004555, 0x00004555, 0x00 }, - { 0x0000455c, 0x0000455c, 0x00 }, - { 0x00004562, 0x00004562, 0x00 }, - { 0x0000456a, 0x0000456a, 0x00 }, - { 0x00004577, 0x00004577, 0x00 }, - { 0x00004585, 0x00004585, 0x00 }, - { 0x000045e9, 0x000045e9, 0x00 }, - { 0x00004606, 0x00004606, 0x00 }, - { 0x0000460f, 0x0000460f, 0x00 }, - { 0x00004615, 0x00004615, 0x00 }, - { 0x00004617, 0x00004617, 0x00 }, - { 0x0000465b, 0x0000465b, 0x00 }, - { 0x0000467a, 0x0000467a, 0x00 }, - { 0x00004680, 0x00004680, 0x00 }, - { 0x000046cf, 0x000046d0, 0x01 }, - { 0x000046f5, 0x000046f5, 0x00 }, - { 0x00004713, 0x00004713, 0x00 }, - { 0x00004718, 0x00004718, 0x00 }, - { 0x0000474e, 0x0000474e, 0x00 }, - { 0x0000477c, 0x0000477c, 0x00 }, - { 0x00004798, 0x00004798, 0x00 }, - { 0x000047a6, 0x000047a6, 0x00 }, - { 0x000047b6, 0x000047b6, 0x00 }, - { 0x000047d5, 0x000047d5, 0x00 }, - { 0x000047ed, 0x000047ed, 0x00 }, - { 0x000047f4, 0x000047f4, 0x00 }, - { 0x00004800, 0x00004800, 0x00 }, - { 0x0000480b, 0x0000480b, 0x00 }, - { 0x00004837, 0x00004837, 0x00 }, - { 0x0000485d, 0x0000485d, 0x00 }, - { 0x00004871, 0x00004871, 0x00 }, - { 0x0000489b, 0x0000489b, 0x00 }, - { 0x000048ad, 0x000048ae, 0x01 }, - { 0x000048d0, 0x000048d0, 0x00 }, - { 0x000048dd, 0x000048dd, 0x00 }, - { 0x000048ed, 0x000048ed, 0x00 }, - { 0x000048f3, 0x000048f3, 0x00 }, - { 0x000048fa, 0x000048fa, 0x00 }, - { 0x00004906, 0x00004906, 0x00 }, - { 0x00004911, 0x00004911, 0x00 }, - { 0x0000491e, 0x0000491e, 0x00 }, - { 0x00004925, 0x00004925, 0x00 }, - { 0x0000492a, 0x0000492a, 0x00 }, - { 0x0000492d, 0x0000492d, 0x00 }, - { 0x00004935, 0x00004935, 0x00 }, - { 0x0000493c, 0x0000493c, 0x00 }, - { 0x0000493e, 0x0000493e, 0x00 }, - { 0x00004945, 0x00004945, 0x00 }, - { 0x00004951, 0x00004951, 0x00 }, - { 0x00004953, 0x00004953, 0x00 }, - { 0x00004965, 0x00004965, 0x00 }, - { 0x0000496a, 0x0000496a, 0x00 }, - { 0x00004972, 0x00004972, 0x00 }, - { 0x00004989, 0x00004989, 0x00 }, - { 0x000049a1, 0x000049a1, 0x00 }, - { 0x000049a7, 0x000049a7, 0x00 }, - { 0x000049df, 0x000049df, 0x00 }, - { 0x000049e5, 0x000049e5, 0x00 }, - { 0x000049e7, 0x000049e7, 0x00 }, - { 0x00004a0f, 0x00004a0f, 0x00 }, - { 0x00004a1d, 0x00004a1d, 0x00 }, - { 0x00004a24, 0x00004a24, 0x00 }, - { 0x00004a35, 0x00004a35, 0x00 }, - { 0x00004a96, 0x00004a96, 0x00 }, - { 0x00004ab4, 0x00004ab4, 0x00 }, - { 0x00004ab8, 0x00004ab8, 0x00 }, - { 0x00004ad1, 0x00004ad1, 0x00 }, - { 0x00004ae4, 0x00004ae4, 0x00 }, - { 0x00004aff, 0x00004aff, 0x00 }, - { 0x00004b19, 0x00004b19, 0x00 }, - { 0x00004b2c, 0x00004b2c, 0x00 }, - { 0x00004b37, 0x00004b37, 0x00 }, - { 0x00004b6f, 0x00004b70, 0x01 }, - { 0x00004b72, 0x00004b72, 0x00 }, - { 0x00004b7b, 0x00004b7b, 0x00 }, - { 0x00004b7e, 0x00004b7e, 0x00 }, - { 0x00004b8e, 0x00004b8e, 0x00 }, - { 0x00004b90, 0x00004b90, 0x00 }, - { 0x00004b93, 0x00004b93, 0x00 }, - { 0x00004b96, 0x00004b97, 0x01 }, - { 0x00004b9d, 0x00004b9d, 0x00 }, - { 0x00004bbd, 0x00004bbe, 0x01 }, - { 0x00004bc0, 0x00004bc0, 0x00 }, - { 0x00004c04, 0x00004c04, 0x00 }, - { 0x00004c07, 0x00004c07, 0x00 }, - { 0x00004c0e, 0x00004c0e, 0x00 }, - { 0x00004c3b, 0x00004c3b, 0x00 }, - { 0x00004c3e, 0x00004c3e, 0x00 }, - { 0x00004c5b, 0x00004c5b, 0x00 }, - { 0x00004c6d, 0x00004c6d, 0x00 }, - { 0x00004c7d, 0x00004c7d, 0x00 }, - { 0x00004ca4, 0x00004ca4, 0x00 }, - { 0x00004cae, 0x00004cae, 0x00 }, - { 0x00004cb0, 0x00004cb0, 0x00 }, - { 0x00004cb7, 0x00004cb7, 0x00 }, - { 0x00004ccd, 0x00004ccd, 0x00 }, - { 0x00004ce1, 0x00004ce1, 0x00 }, - { 0x00004ced, 0x00004ced, 0x00 }, - { 0x00004d09, 0x00004d09, 0x00 }, - { 0x00004d10, 0x00004d10, 0x00 }, - { 0x00004d34, 0x00004d34, 0x00 }, - { 0x00004d91, 0x00004d91, 0x00 }, - { 0x00004d9c, 0x00004d9c, 0x00 }, - { 0x00004e00, 0x00004e01, 0x01 }, - { 0x00004e03, 0x00004e04, 0x01 }, - { 0x00004e07, 0x00004e11, 0x01 }, - { 0x00004e13, 0x00004e16, 0x01 }, - { 0x00004e18, 0x00004e1f, 0x01 }, - { 0x00004e21, 0x00004e22, 0x01 }, - { 0x00004e24, 0x00004e28, 0x01 }, - { 0x00004e2a, 0x00004e2e, 0x01 }, - { 0x00004e30, 0x00004e34, 0x01 }, - { 0x00004e36, 0x00004e3f, 0x01 }, - { 0x00004e42, 0x00004e43, 0x01 }, - { 0x00004e45, 0x00004e45, 0x00 }, - { 0x00004e47, 0x00004e49, 0x01 }, - { 0x00004e4b, 0x00004e50, 0x01 }, - { 0x00004e52, 0x00004e54, 0x01 }, - { 0x00004e56, 0x00004e56, 0x00 }, - { 0x00004e58, 0x00004e61, 0x01 }, - { 0x00004e66, 0x00004e66, 0x00 }, - { 0x00004e69, 0x00004e6a, 0x01 }, - { 0x00004e70, 0x00004e71, 0x01 }, - { 0x00004e73, 0x00004e73, 0x00 }, - { 0x00004e78, 0x00004e78, 0x00 }, - { 0x00004e7e, 0x00004e89, 0x01 }, - { 0x00004e8b, 0x00004e8f, 0x01 }, - { 0x00004e91, 0x00004e95, 0x01 }, - { 0x00004e98, 0x00004e9b, 0x01 }, - { 0x00004e9e, 0x00004ea2, 0x01 }, - { 0x00004ea4, 0x00004ea9, 0x01 }, - { 0x00004eab, 0x00004eae, 0x01 }, - { 0x00004eb2, 0x00004eb3, 0x01 }, - { 0x00004eb5, 0x00004eb7, 0x01 }, - { 0x00004eb9, 0x00004ebc, 0x01 }, - { 0x00004ebf, 0x00004ecb, 0x01 }, - { 0x00004ecd, 0x00004ece, 0x01 }, - { 0x00004ed1, 0x00004ed1, 0x00 }, - { 0x00004ed3, 0x00004eda, 0x01 }, - { 0x00004edc, 0x00004edf, 0x01 }, - { 0x00004ee1, 0x00004ee1, 0x00 }, - { 0x00004ee3, 0x00004ee5, 0x01 }, - { 0x00004ee8, 0x00004eec, 0x01 }, - { 0x00004eee, 0x00004eee, 0x00 }, - { 0x00004ef0, 0x00004ef8, 0x01 }, - { 0x00004efb, 0x00004efb, 0x00 }, - { 0x00004efd, 0x00004efd, 0x00 }, - { 0x00004eff, 0x00004f05, 0x01 }, - { 0x00004f08, 0x00004f0b, 0x01 }, - { 0x00004f0d, 0x00004f15, 0x01 }, - { 0x00004f17, 0x00004f1b, 0x01 }, - { 0x00004f1d, 0x00004f20, 0x01 }, - { 0x00004f22, 0x00004f22, 0x00 }, - { 0x00004f24, 0x00004f2d, 0x01 }, - { 0x00004f2f, 0x00004f30, 0x01 }, - { 0x00004f32, 0x00004f34, 0x01 }, - { 0x00004f36, 0x00004f3f, 0x01 }, - { 0x00004f41, 0x00004f43, 0x01 }, - { 0x00004f45, 0x00004f49, 0x01 }, - { 0x00004f4b, 0x00004f65, 0x01 }, - { 0x00004f67, 0x00004f67, 0x00 }, - { 0x00004f69, 0x00004f6c, 0x01 }, - { 0x00004f6e, 0x00004f70, 0x01 }, - { 0x00004f72, 0x00004f8b, 0x01 }, - { 0x00004f8d, 0x00004f8d, 0x00 }, - { 0x00004f8f, 0x00004f92, 0x01 }, - { 0x00004f94, 0x00004f98, 0x01 }, - { 0x00004f9a, 0x00004f9e, 0x01 }, - { 0x00004fa0, 0x00004fa0, 0x00 }, - { 0x00004fa2, 0x00004fa3, 0x01 }, - { 0x00004fa5, 0x00004fac, 0x01 }, - { 0x00004fae, 0x00004fb0, 0x01 }, - { 0x00004fb2, 0x00004fb3, 0x01 }, - { 0x00004fb5, 0x00004fb7, 0x01 }, - { 0x00004fb9, 0x00004fbb, 0x01 }, - { 0x00004fbd, 0x00004fbd, 0x00 }, - { 0x00004fbf, 0x00004fc5, 0x01 }, - { 0x00004fc7, 0x00004fd1, 0x01 }, - { 0x00004fd3, 0x00004fd4, 0x01 }, - { 0x00004fd6, 0x00004fe1, 0x01 }, - { 0x00004fe3, 0x00004fe6, 0x01 }, - { 0x00004fe8, 0x00004fea, 0x01 }, - { 0x00004fec, 0x00004fef, 0x01 }, - { 0x00004ff1, 0x00004ffa, 0x01 }, - { 0x00004ffd, 0x00004ffe, 0x01 }, - { 0x00005000, 0x00005000, 0x00 }, - { 0x00005003, 0x00005003, 0x00 }, - { 0x00005005, 0x00005009, 0x01 }, - { 0x0000500b, 0x0000500f, 0x01 }, - { 0x00005011, 0x0000501c, 0x01 }, - { 0x0000501e, 0x00005023, 0x01 }, - { 0x00005025, 0x00005031, 0x01 }, - { 0x00005033, 0x00005035, 0x01 }, - { 0x00005037, 0x00005037, 0x00 }, - { 0x0000503a, 0x0000503a, 0x00 }, - { 0x0000503c, 0x0000503c, 0x00 }, - { 0x0000503e, 0x0000503e, 0x00 }, - { 0x00005040, 0x00005041, 0x01 }, - { 0x00005043, 0x00005043, 0x00 }, - { 0x00005045, 0x0000504f, 0x01 }, - { 0x00005051, 0x00005051, 0x00 }, - { 0x00005053, 0x00005053, 0x00 }, - { 0x00005055, 0x00005058, 0x01 }, - { 0x0000505a, 0x00005066, 0x01 }, - { 0x00005068, 0x00005070, 0x01 }, - { 0x00005072, 0x00005077, 0x01 }, - { 0x0000507a, 0x0000507b, 0x01 }, - { 0x0000507d, 0x00005083, 0x01 }, - { 0x00005085, 0x00005085, 0x00 }, - { 0x00005087, 0x00005088, 0x01 }, - { 0x0000508b, 0x0000508e, 0x01 }, - { 0x00005090, 0x00005092, 0x01 }, - { 0x00005094, 0x00005096, 0x01 }, - { 0x00005098, 0x0000509e, 0x01 }, - { 0x000050a2, 0x000050a3, 0x01 }, - { 0x000050a5, 0x000050a9, 0x01 }, - { 0x000050ac, 0x000050b8, 0x01 }, - { 0x000050ba, 0x000050bb, 0x01 }, - { 0x000050bd, 0x000050bf, 0x01 }, - { 0x000050c1, 0x000050c2, 0x01 }, - { 0x000050c4, 0x000050cb, 0x01 }, - { 0x000050cd, 0x000050d1, 0x01 }, - { 0x000050d3, 0x000050d7, 0x01 }, - { 0x000050d9, 0x000050db, 0x01 }, - { 0x000050dd, 0x000050e1, 0x01 }, - { 0x000050e3, 0x000050ea, 0x01 }, - { 0x000050ec, 0x000050f1, 0x01 }, - { 0x000050f3, 0x000050f6, 0x01 }, - { 0x000050f8, 0x000050f9, 0x01 }, - { 0x000050fb, 0x0000510e, 0x01 }, - { 0x00005110, 0x00005115, 0x01 }, - { 0x00005117, 0x00005118, 0x01 }, - { 0x0000511a, 0x0000511a, 0x00 }, - { 0x0000511c, 0x0000511c, 0x00 }, - { 0x0000511f, 0x00005122, 0x01 }, - { 0x00005124, 0x00005126, 0x01 }, - { 0x00005129, 0x0000512b, 0x01 }, - { 0x0000512d, 0x0000512e, 0x01 }, - { 0x00005130, 0x00005135, 0x01 }, - { 0x00005137, 0x0000513d, 0x01 }, - { 0x0000513f, 0x00005141, 0x01 }, - { 0x00005143, 0x00005149, 0x01 }, - { 0x0000514b, 0x0000514d, 0x01 }, - { 0x00005151, 0x00005152, 0x01 }, - { 0x00005154, 0x00005163, 0x01 }, - { 0x00005165, 0x00005165, 0x00 }, - { 0x00005167, 0x0000516e, 0x01 }, - { 0x00005170, 0x00005171, 0x01 }, - { 0x00005173, 0x00005179, 0x01 }, - { 0x0000517b, 0x0000517d, 0x01 }, - { 0x00005180, 0x00005182, 0x01 }, - { 0x00005185, 0x0000518a, 0x01 }, - { 0x0000518c, 0x0000518d, 0x01 }, - { 0x0000518f, 0x0000518f, 0x00 }, - { 0x00005191, 0x0000519c, 0x01 }, - { 0x0000519e, 0x0000519e, 0x00 }, - { 0x000051a0, 0x000051a0, 0x00 }, - { 0x000051a2, 0x000051a2, 0x00 }, - { 0x000051a4, 0x000051a5, 0x01 }, - { 0x000051a7, 0x000051a8, 0x01 }, - { 0x000051aa, 0x000051ac, 0x01 }, - { 0x000051af, 0x000051b9, 0x01 }, - { 0x000051bb, 0x000051be, 0x01 }, - { 0x000051c0, 0x000051c0, 0x00 }, - { 0x000051c3, 0x000051d4, 0x01 }, - { 0x000051d7, 0x000051d8, 0x01 }, - { 0x000051db, 0x000051e2, 0x01 }, - { 0x000051e4, 0x000051e4, 0x00 }, - { 0x000051eb, 0x000051eb, 0x00 }, - { 0x000051ed, 0x000051ed, 0x00 }, - { 0x000051ef, 0x000051f1, 0x01 }, - { 0x000051f3, 0x000051f6, 0x01 }, - { 0x000051f8, 0x00005203, 0x01 }, - { 0x00005205, 0x0000520e, 0x01 }, - { 0x00005210, 0x00005213, 0x01 }, - { 0x00005216, 0x00005221, 0x01 }, - { 0x00005224, 0x0000522b, 0x01 }, - { 0x0000522d, 0x0000522e, 0x01 }, - { 0x00005230, 0x0000523d, 0x01 }, - { 0x0000523f, 0x00005244, 0x01 }, - { 0x00005246, 0x00005247, 0x01 }, - { 0x00005249, 0x0000524e, 0x01 }, - { 0x00005250, 0x00005252, 0x01 }, - { 0x00005254, 0x00005257, 0x01 }, - { 0x00005259, 0x00005262, 0x01 }, - { 0x00005265, 0x00005265, 0x00 }, - { 0x00005267, 0x0000526f, 0x01 }, - { 0x00005272, 0x00005275, 0x01 }, - { 0x00005277, 0x0000527d, 0x01 }, - { 0x0000527f, 0x00005284, 0x01 }, - { 0x00005287, 0x0000528d, 0x01 }, - { 0x0000528f, 0x00005291, 0x01 }, - { 0x00005293, 0x00005294, 0x01 }, - { 0x00005296, 0x0000529b, 0x01 }, - { 0x0000529d, 0x000052a4, 0x01 }, - { 0x000052a6, 0x000052a6, 0x00 }, - { 0x000052a8, 0x000052ae, 0x01 }, - { 0x000052b1, 0x000052b3, 0x01 }, - { 0x000052b5, 0x000052b5, 0x00 }, - { 0x000052b9, 0x000052b9, 0x00 }, - { 0x000052bb, 0x000052bc, 0x01 }, - { 0x000052be, 0x000052c3, 0x01 }, - { 0x000052c5, 0x000052c5, 0x00 }, - { 0x000052c7, 0x000052c7, 0x00 }, - { 0x000052c9, 0x000052c9, 0x00 }, - { 0x000052cb, 0x000052cd, 0x01 }, - { 0x000052d0, 0x000052d3, 0x01 }, - { 0x000052d5, 0x000052d9, 0x01 }, - { 0x000052db, 0x000052db, 0x00 }, - { 0x000052dd, 0x000052e4, 0x01 }, - { 0x000052e6, 0x000052e6, 0x00 }, - { 0x000052e9, 0x000052e9, 0x00 }, - { 0x000052eb, 0x000052eb, 0x00 }, - { 0x000052ef, 0x000052f1, 0x01 }, - { 0x000052f3, 0x000052f5, 0x01 }, - { 0x000052f7, 0x000052fc, 0x01 }, - { 0x000052fe, 0x00005301, 0x01 }, - { 0x00005305, 0x00005306, 0x01 }, - { 0x00005308, 0x0000530b, 0x01 }, - { 0x0000530d, 0x00005312, 0x01 }, - { 0x00005315, 0x00005317, 0x01 }, - { 0x00005319, 0x0000531a, 0x01 }, - { 0x0000531c, 0x0000531d, 0x01 }, - { 0x0000531f, 0x00005323, 0x01 }, - { 0x00005326, 0x00005327, 0x01 }, - { 0x0000532a, 0x0000532a, 0x00 }, - { 0x0000532c, 0x00005334, 0x01 }, - { 0x00005337, 0x00005345, 0x01 }, - { 0x00005347, 0x0000534a, 0x01 }, - { 0x0000534c, 0x0000534f, 0x01 }, - { 0x00005351, 0x00005357, 0x01 }, - { 0x0000535a, 0x0000535a, 0x00 }, - { 0x0000535c, 0x00005364, 0x01 }, - { 0x00005366, 0x00005367, 0x01 }, - { 0x00005369, 0x00005369, 0x00 }, - { 0x0000536b, 0x00005375, 0x01 }, - { 0x00005377, 0x0000537f, 0x01 }, - { 0x00005382, 0x00005382, 0x00 }, - { 0x00005384, 0x00005386, 0x01 }, - { 0x00005389, 0x0000538f, 0x01 }, - { 0x00005392, 0x0000539a, 0x01 }, - { 0x0000539c, 0x000053a0, 0x01 }, - { 0x000053a2, 0x000053ae, 0x01 }, - { 0x000053b0, 0x000053b0, 0x00 }, - { 0x000053b2, 0x000053b2, 0x00 }, - { 0x000053b4, 0x000053b4, 0x00 }, - { 0x000053b6, 0x000053b6, 0x00 }, - { 0x000053b9, 0x000053b9, 0x00 }, - { 0x000053bb, 0x000053bb, 0x00 }, - { 0x000053bf, 0x000053bf, 0x00 }, - { 0x000053c1, 0x000053c3, 0x01 }, - { 0x000053c5, 0x000053c5, 0x00 }, - { 0x000053c8, 0x000053cd, 0x01 }, - { 0x000053d0, 0x000053d2, 0x01 }, - { 0x000053d4, 0x000053d4, 0x00 }, - { 0x000053d6, 0x000053db, 0x01 }, - { 0x000053df, 0x000053e6, 0x01 }, - { 0x000053e8, 0x000053f3, 0x01 }, - { 0x000053f5, 0x000053f9, 0x01 }, - { 0x000053fb, 0x000053fe, 0x01 }, - { 0x00005401, 0x00005401, 0x00 }, - { 0x00005403, 0x00005404, 0x01 }, - { 0x00005406, 0x00005421, 0x01 }, - { 0x00005423, 0x00005439, 0x01 }, - { 0x0000543b, 0x0000543e, 0x01 }, - { 0x00005440, 0x00005443, 0x01 }, - { 0x00005445, 0x00005448, 0x01 }, - { 0x0000544a, 0x0000544b, 0x01 }, - { 0x0000544d, 0x00005450, 0x01 }, - { 0x00005452, 0x00005459, 0x01 }, - { 0x0000545b, 0x0000545c, 0x01 }, - { 0x00005460, 0x0000546d, 0x01 }, - { 0x0000546f, 0x00005478, 0x01 }, - { 0x0000547a, 0x00005482, 0x01 }, - { 0x00005484, 0x00005488, 0x01 }, - { 0x0000548b, 0x0000549e, 0x01 }, - { 0x000054a0, 0x000054b4, 0x01 }, - { 0x000054b6, 0x000054c9, 0x01 }, - { 0x000054cb, 0x000054d7, 0x01 }, - { 0x000054d9, 0x000054da, 0x01 }, - { 0x000054dc, 0x000054eb, 0x01 }, - { 0x000054ed, 0x000054ef, 0x01 }, - { 0x000054f1, 0x000054f3, 0x01 }, - { 0x000054f7, 0x000054f8, 0x01 }, - { 0x000054fa, 0x000054fd, 0x01 }, - { 0x000054ff, 0x000054ff, 0x00 }, - { 0x00005501, 0x00005514, 0x01 }, - { 0x00005517, 0x00005518, 0x01 }, - { 0x0000551a, 0x0000551b, 0x01 }, - { 0x0000551e, 0x0000551e, 0x00 }, - { 0x00005520, 0x00005520, 0x00 }, - { 0x00005522, 0x00005528, 0x01 }, - { 0x0000552a, 0x00005539, 0x01 }, - { 0x0000553b, 0x0000553c, 0x01 }, - { 0x0000553e, 0x00005541, 0x01 }, - { 0x00005543, 0x0000554b, 0x01 }, - { 0x0000554d, 0x00005553, 0x01 }, - { 0x00005555, 0x00005557, 0x01 }, - { 0x0000555c, 0x0000555f, 0x01 }, - { 0x00005561, 0x00005567, 0x01 }, - { 0x00005569, 0x0000556e, 0x01 }, - { 0x00005571, 0x00005573, 0x01 }, - { 0x00005575, 0x00005579, 0x01 }, - { 0x0000557b, 0x00005584, 0x01 }, - { 0x00005586, 0x00005595, 0x01 }, - { 0x00005598, 0x0000559a, 0x01 }, - { 0x0000559c, 0x0000559d, 0x01 }, - { 0x0000559f, 0x0000559f, 0x00 }, - { 0x000055a1, 0x000055ae, 0x01 }, - { 0x000055b0, 0x000055b5, 0x01 }, - { 0x000055b7, 0x000055b7, 0x00 }, - { 0x000055b9, 0x000055df, 0x01 }, - { 0x000055e1, 0x000055ec, 0x01 }, - { 0x000055ef, 0x000055f3, 0x01 }, - { 0x000055f5, 0x000055f7, 0x01 }, - { 0x000055f9, 0x00005602, 0x01 }, - { 0x00005604, 0x00005606, 0x01 }, - { 0x00005608, 0x00005609, 0x01 }, - { 0x0000560c, 0x00005618, 0x01 }, - { 0x0000561b, 0x00005625, 0x01 }, - { 0x00005627, 0x00005627, 0x00 }, - { 0x00005629, 0x0000562a, 0x01 }, - { 0x0000562c, 0x0000563b, 0x01 }, - { 0x0000563d, 0x00005643, 0x01 }, - { 0x00005645, 0x00005646, 0x01 }, - { 0x00005648, 0x0000564a, 0x01 }, - { 0x0000564c, 0x00005650, 0x01 }, - { 0x00005652, 0x00005654, 0x01 }, - { 0x00005657, 0x0000565a, 0x01 }, - { 0x0000565c, 0x0000565e, 0x01 }, - { 0x00005660, 0x00005666, 0x01 }, - { 0x00005668, 0x00005674, 0x01 }, - { 0x00005676, 0x0000567c, 0x01 }, - { 0x0000567e, 0x00005687, 0x01 }, - { 0x00005689, 0x00005690, 0x01 }, - { 0x00005692, 0x00005693, 0x01 }, - { 0x00005695, 0x00005695, 0x00 }, - { 0x00005697, 0x0000569a, 0x01 }, - { 0x0000569c, 0x0000569f, 0x01 }, - { 0x000056a1, 0x000056a1, 0x00 }, - { 0x000056a3, 0x000056a8, 0x01 }, - { 0x000056aa, 0x000056af, 0x01 }, - { 0x000056b1, 0x000056b7, 0x01 }, - { 0x000056b9, 0x000056b9, 0x00 }, - { 0x000056bc, 0x000056c3, 0x01 }, - { 0x000056c5, 0x000056c6, 0x01 }, - { 0x000056c8, 0x000056cd, 0x01 }, - { 0x000056d1, 0x000056d1, 0x00 }, - { 0x000056d3, 0x000056d4, 0x01 }, - { 0x000056d6, 0x000056d7, 0x01 }, - { 0x000056da, 0x000056db, 0x01 }, - { 0x000056dd, 0x000056e2, 0x01 }, - { 0x000056e4, 0x000056e5, 0x01 }, - { 0x000056e7, 0x000056e7, 0x00 }, - { 0x000056ea, 0x000056eb, 0x01 }, - { 0x000056ed, 0x000056f1, 0x01 }, - { 0x000056f4, 0x000056f5, 0x01 }, - { 0x000056f7, 0x000056f7, 0x00 }, - { 0x000056f9, 0x000056fa, 0x01 }, - { 0x000056fd, 0x00005704, 0x01 }, - { 0x00005706, 0x0000570d, 0x01 }, - { 0x00005712, 0x00005716, 0x01 }, - { 0x00005718, 0x00005718, 0x00 }, - { 0x0000571a, 0x00005720, 0x01 }, - { 0x00005722, 0x00005723, 0x01 }, - { 0x00005728, 0x0000572a, 0x01 }, - { 0x0000572c, 0x00005730, 0x01 }, - { 0x00005732, 0x00005734, 0x01 }, - { 0x00005739, 0x0000573b, 0x01 }, - { 0x0000573e, 0x00005743, 0x01 }, - { 0x00005745, 0x00005747, 0x01 }, - { 0x00005749, 0x00005752, 0x01 }, - { 0x00005754, 0x00005754, 0x00 }, - { 0x00005757, 0x00005757, 0x00 }, - { 0x0000575a, 0x00005762, 0x01 }, - { 0x00005764, 0x00005764, 0x00 }, - { 0x00005766, 0x0000576b, 0x01 }, - { 0x0000576d, 0x0000576d, 0x00 }, - { 0x0000576f, 0x00005777, 0x01 }, - { 0x0000577a, 0x00005780, 0x01 }, - { 0x00005782, 0x00005786, 0x01 }, - { 0x00005788, 0x00005788, 0x00 }, - { 0x0000578a, 0x0000578d, 0x01 }, - { 0x0000578f, 0x00005790, 0x01 }, - { 0x00005792, 0x00005795, 0x01 }, - { 0x00005797, 0x000057a7, 0x01 }, - { 0x000057a9, 0x000057ab, 0x01 }, - { 0x000057ad, 0x000057ae, 0x01 }, - { 0x000057b2, 0x000057b2, 0x00 }, - { 0x000057b4, 0x000057b6, 0x01 }, - { 0x000057b8, 0x000057bf, 0x01 }, - { 0x000057c1, 0x000057c4, 0x01 }, - { 0x000057c6, 0x000057c8, 0x01 }, - { 0x000057cb, 0x000057cc, 0x01 }, - { 0x000057ce, 0x000057d0, 0x01 }, - { 0x000057d2, 0x000057d2, 0x00 }, - { 0x000057d4, 0x000057d5, 0x01 }, - { 0x000057d7, 0x000057da, 0x01 }, - { 0x000057dc, 0x000057e7, 0x01 }, - { 0x000057e9, 0x000057e9, 0x00 }, - { 0x000057ec, 0x000057fe, 0x01 }, - { 0x00005800, 0x0000580e, 0x01 }, - { 0x00005810, 0x00005812, 0x01 }, - { 0x00005814, 0x00005815, 0x01 }, - { 0x00005819, 0x00005819, 0x00 }, - { 0x0000581b, 0x0000581e, 0x01 }, - { 0x00005820, 0x0000582a, 0x01 }, - { 0x0000582c, 0x0000583b, 0x01 }, - { 0x0000583d, 0x0000583d, 0x00 }, - { 0x0000583f, 0x00005840, 0x01 }, - { 0x00005844, 0x00005844, 0x00 }, - { 0x00005847, 0x0000584f, 0x01 }, - { 0x00005851, 0x00005855, 0x01 }, - { 0x00005857, 0x0000585f, 0x01 }, - { 0x00005862, 0x00005865, 0x01 }, - { 0x00005868, 0x00005869, 0x01 }, - { 0x0000586b, 0x0000586d, 0x01 }, - { 0x0000586f, 0x0000586f, 0x00 }, - { 0x00005871, 0x00005876, 0x01 }, - { 0x00005879, 0x00005883, 0x01 }, - { 0x00005885, 0x0000588b, 0x01 }, - { 0x0000588e, 0x00005894, 0x01 }, - { 0x00005898, 0x0000589a, 0x01 }, - { 0x0000589c, 0x000058a1, 0x01 }, - { 0x000058a3, 0x000058a3, 0x00 }, - { 0x000058a5, 0x000058ac, 0x01 }, - { 0x000058ae, 0x000058b1, 0x01 }, - { 0x000058b3, 0x000058b3, 0x00 }, - { 0x000058b5, 0x000058b6, 0x01 }, - { 0x000058ba, 0x000058bf, 0x01 }, - { 0x000058c1, 0x000058c2, 0x01 }, - { 0x000058c5, 0x000058c9, 0x01 }, - { 0x000058cb, 0x000058cb, 0x00 }, - { 0x000058ce, 0x000058cf, 0x01 }, - { 0x000058d1, 0x000058d6, 0x01 }, - { 0x000058d8, 0x000058e0, 0x01 }, - { 0x000058e2, 0x000058e4, 0x01 }, - { 0x000058e7, 0x000058e9, 0x01 }, - { 0x000058eb, 0x000058ec, 0x01 }, - { 0x000058ee, 0x000058f0, 0x01 }, - { 0x000058f2, 0x000058f6, 0x01 }, - { 0x000058f9, 0x000058ff, 0x01 }, - { 0x00005902, 0x00005907, 0x01 }, - { 0x0000590a, 0x0000590a, 0x00 }, - { 0x0000590c, 0x0000590f, 0x01 }, - { 0x00005911, 0x00005912, 0x01 }, - { 0x00005914, 0x00005917, 0x01 }, - { 0x00005919, 0x0000591a, 0x01 }, - { 0x0000591c, 0x0000591c, 0x00 }, - { 0x0000591f, 0x00005920, 0x01 }, - { 0x00005922, 0x00005922, 0x00 }, - { 0x00005924, 0x00005925, 0x01 }, - { 0x00005927, 0x00005927, 0x00 }, - { 0x00005929, 0x0000592f, 0x01 }, - { 0x00005931, 0x00005932, 0x01 }, - { 0x00005934, 0x00005934, 0x00 }, - { 0x00005937, 0x0000593a, 0x01 }, - { 0x0000593c, 0x0000593c, 0x00 }, - { 0x0000593e, 0x0000593e, 0x00 }, - { 0x00005940, 0x00005942, 0x01 }, - { 0x00005944, 0x00005945, 0x01 }, - { 0x00005947, 0x0000594b, 0x01 }, - { 0x0000594e, 0x00005951, 0x01 }, - { 0x00005953, 0x00005958, 0x01 }, - { 0x0000595a, 0x0000595a, 0x00 }, - { 0x0000595c, 0x0000595c, 0x00 }, - { 0x00005960, 0x00005962, 0x01 }, - { 0x00005965, 0x00005965, 0x00 }, - { 0x00005967, 0x00005967, 0x00 }, - { 0x00005969, 0x0000596e, 0x01 }, - { 0x00005970, 0x00005979, 0x01 }, - { 0x0000597b, 0x0000598a, 0x01 }, - { 0x0000598d, 0x00005990, 0x01 }, - { 0x00005992, 0x00005994, 0x01 }, - { 0x00005996, 0x0000599a, 0x01 }, - { 0x0000599d, 0x000059ac, 0x01 }, - { 0x000059ae, 0x000059be, 0x01 }, - { 0x000059c0, 0x000059c1, 0x01 }, - { 0x000059c3, 0x000059d4, 0x01 }, - { 0x000059d6, 0x000059de, 0x01 }, - { 0x000059e0, 0x000059e1, 0x01 }, - { 0x000059e3, 0x000059e6, 0x01 }, - { 0x000059e8, 0x00005a0d, 0x01 }, - { 0x00005a0f, 0x00005a0f, 0x00 }, - { 0x00005a11, 0x00005a13, 0x01 }, - { 0x00005a15, 0x00005a19, 0x01 }, - { 0x00005a1b, 0x00005a1c, 0x01 }, - { 0x00005a1e, 0x00005a21, 0x01 }, - { 0x00005a23, 0x00005a25, 0x01 }, - { 0x00005a27, 0x00005a27, 0x00 }, - { 0x00005a29, 0x00005a2e, 0x01 }, - { 0x00005a31, 0x00005a39, 0x01 }, - { 0x00005a3c, 0x00005a3e, 0x01 }, - { 0x00005a40, 0x00005a4a, 0x01 }, - { 0x00005a4c, 0x00005a4d, 0x01 }, - { 0x00005a50, 0x00005a6e, 0x01 }, - { 0x00005a70, 0x00005a71, 0x01 }, - { 0x00005a74, 0x00005a7f, 0x01 }, - { 0x00005a81, 0x00005a84, 0x01 }, - { 0x00005a86, 0x00005a86, 0x00 }, - { 0x00005a88, 0x00005a88, 0x00 }, - { 0x00005a8a, 0x00005a8c, 0x01 }, - { 0x00005a8e, 0x00005a97, 0x01 }, - { 0x00005a99, 0x00005aa2, 0x01 }, - { 0x00005aa5, 0x00005aa7, 0x01 }, - { 0x00005aa9, 0x00005aac, 0x01 }, - { 0x00005aae, 0x00005ac4, 0x01 }, - { 0x00005ac6, 0x00005acf, 0x01 }, - { 0x00005ad2, 0x00005ae6, 0x01 }, - { 0x00005ae8, 0x00005aee, 0x01 }, - { 0x00005af0, 0x00005afb, 0x01 }, - { 0x00005afd, 0x00005aff, 0x01 }, - { 0x00005b01, 0x00005b03, 0x01 }, - { 0x00005b05, 0x00005b05, 0x00 }, - { 0x00005b07, 0x00005b09, 0x01 }, - { 0x00005b0b, 0x00005b0d, 0x01 }, - { 0x00005b0f, 0x00005b11, 0x01 }, - { 0x00005b13, 0x00005b14, 0x01 }, - { 0x00005b16, 0x00005b17, 0x01 }, - { 0x00005b19, 0x00005b1b, 0x01 }, - { 0x00005b1d, 0x00005b21, 0x01 }, - { 0x00005b23, 0x00005b28, 0x01 }, - { 0x00005b2a, 0x00005b30, 0x01 }, - { 0x00005b32, 0x00005b32, 0x00 }, - { 0x00005b34, 0x00005b34, 0x00 }, - { 0x00005b37, 0x00005b38, 0x01 }, - { 0x00005b3c, 0x00005b41, 0x01 }, - { 0x00005b43, 0x00005b48, 0x01 }, - { 0x00005b4a, 0x00005b51, 0x01 }, - { 0x00005b53, 0x00005b5d, 0x01 }, - { 0x00005b5f, 0x00005b5f, 0x00 }, - { 0x00005b62, 0x00005b66, 0x01 }, - { 0x00005b68, 0x00005b6e, 0x01 }, - { 0x00005b70, 0x00005b78, 0x01 }, - { 0x00005b7a, 0x00005b7d, 0x01 }, - { 0x00005b7f, 0x00005b85, 0x01 }, - { 0x00005b87, 0x00005b89, 0x01 }, - { 0x00005b8b, 0x00005b8c, 0x01 }, - { 0x00005b8e, 0x00005b90, 0x01 }, - { 0x00005b92, 0x00005b93, 0x01 }, - { 0x00005b95, 0x00005b95, 0x00 }, - { 0x00005b97, 0x00005ba8, 0x01 }, - { 0x00005baa, 0x00005bae, 0x01 }, - { 0x00005bb0, 0x00005bb0, 0x00 }, - { 0x00005bb3, 0x00005bb6, 0x01 }, - { 0x00005bb8, 0x00005bb9, 0x01 }, - { 0x00005bbd, 0x00005bc7, 0x01 }, - { 0x00005bca, 0x00005bce, 0x01 }, - { 0x00005bd0, 0x00005bd9, 0x01 }, - { 0x00005bdd, 0x00005bec, 0x01 }, - { 0x00005bee, 0x00005bf3, 0x01 }, - { 0x00005bf5, 0x00005bf6, 0x01 }, - { 0x00005bf8, 0x00005bfc, 0x01 }, - { 0x00005bff, 0x00005bff, 0x00 }, - { 0x00005c01, 0x00005c01, 0x00 }, - { 0x00005c03, 0x00005c16, 0x01 }, - { 0x00005c18, 0x00005c18, 0x00 }, - { 0x00005c1a, 0x00005c1a, 0x00 }, - { 0x00005c1c, 0x00005c20, 0x01 }, - { 0x00005c22, 0x00005c25, 0x01 }, - { 0x00005c27, 0x00005c28, 0x01 }, - { 0x00005c2a, 0x00005c2a, 0x00 }, - { 0x00005c2c, 0x00005c2c, 0x00 }, - { 0x00005c30, 0x00005c31, 0x01 }, - { 0x00005c33, 0x00005c34, 0x01 }, - { 0x00005c37, 0x00005c42, 0x01 }, - { 0x00005c44, 0x00005c51, 0x01 }, - { 0x00005c53, 0x00005c56, 0x01 }, - { 0x00005c58, 0x00005c59, 0x01 }, - { 0x00005c5c, 0x00005c5e, 0x01 }, - { 0x00005c60, 0x00005c6a, 0x01 }, - { 0x00005c6c, 0x00005c6f, 0x01 }, - { 0x00005c71, 0x00005c71, 0x00 }, - { 0x00005c73, 0x00005c74, 0x01 }, - { 0x00005c79, 0x00005c7c, 0x01 }, - { 0x00005c7e, 0x00005c7f, 0x01 }, - { 0x00005c81, 0x00005c82, 0x01 }, - { 0x00005c85, 0x00005c86, 0x01 }, - { 0x00005c88, 0x00005c8d, 0x01 }, - { 0x00005c8f, 0x00005cb1, 0x01 }, - { 0x00005cb3, 0x00005cb3, 0x00 }, - { 0x00005cb5, 0x00005cb8, 0x01 }, - { 0x00005cba, 0x00005cba, 0x00 }, - { 0x00005cbd, 0x00005cbd, 0x00 }, - { 0x00005cbf, 0x00005cbf, 0x00 }, - { 0x00005cc1, 0x00005cc2, 0x01 }, - { 0x00005cc4, 0x00005cc4, 0x00 }, - { 0x00005cc6, 0x00005ccc, 0x01 }, - { 0x00005cce, 0x00005cd4, 0x01 }, - { 0x00005cd6, 0x00005cdb, 0x01 }, - { 0x00005cde, 0x00005cdf, 0x01 }, - { 0x00005ce1, 0x00005ce1, 0x00 }, - { 0x00005ce4, 0x00005ce6, 0x01 }, - { 0x00005ce8, 0x00005cea, 0x01 }, - { 0x00005cec, 0x00005cf1, 0x01 }, - { 0x00005cf4, 0x00005cf4, 0x00 }, - { 0x00005cf6, 0x00005cf9, 0x01 }, - { 0x00005cfb, 0x00005cfb, 0x00 }, - { 0x00005cfd, 0x00005cfd, 0x00 }, - { 0x00005cff, 0x00005d03, 0x01 }, - { 0x00005d06, 0x00005d07, 0x01 }, - { 0x00005d0b, 0x00005d12, 0x01 }, - { 0x00005d14, 0x00005d1b, 0x01 }, - { 0x00005d1d, 0x00005d20, 0x01 }, - { 0x00005d22, 0x00005d29, 0x01 }, - { 0x00005d2c, 0x00005d3a, 0x01 }, - { 0x00005d3c, 0x00005d43, 0x01 }, - { 0x00005d45, 0x00005d4c, 0x01 }, - { 0x00005d4e, 0x00005d4e, 0x00 }, - { 0x00005d50, 0x00005d52, 0x01 }, - { 0x00005d55, 0x00005d59, 0x01 }, - { 0x00005d5b, 0x00005d5b, 0x00 }, - { 0x00005d5d, 0x00005d5e, 0x01 }, - { 0x00005d62, 0x00005d63, 0x01 }, - { 0x00005d65, 0x00005d65, 0x00 }, - { 0x00005d67, 0x00005d69, 0x01 }, - { 0x00005d6b, 0x00005d6c, 0x01 }, - { 0x00005d6f, 0x00005d72, 0x01 }, - { 0x00005d74, 0x00005d74, 0x00 }, - { 0x00005d77, 0x00005d77, 0x00 }, - { 0x00005d79, 0x00005d7a, 0x01 }, - { 0x00005d7c, 0x00005d82, 0x01 }, - { 0x00005d84, 0x00005d8b, 0x01 }, - { 0x00005d8d, 0x00005d8e, 0x01 }, - { 0x00005d92, 0x00005d95, 0x01 }, - { 0x00005d97, 0x00005d97, 0x00 }, - { 0x00005d99, 0x00005d9a, 0x01 }, - { 0x00005d9c, 0x00005da2, 0x01 }, - { 0x00005da4, 0x00005da4, 0x00 }, - { 0x00005da7, 0x00005db2, 0x01 }, - { 0x00005db4, 0x00005dba, 0x01 }, - { 0x00005dbc, 0x00005dbd, 0x01 }, - { 0x00005dc0, 0x00005dc3, 0x01 }, - { 0x00005dc5, 0x00005dc7, 0x01 }, - { 0x00005dc9, 0x00005dc9, 0x00 }, - { 0x00005dcb, 0x00005dcb, 0x00 }, - { 0x00005dcd, 0x00005dcd, 0x00 }, - { 0x00005dcf, 0x00005dcf, 0x00 }, - { 0x00005dd1, 0x00005dd2, 0x01 }, - { 0x00005dd4, 0x00005dd8, 0x01 }, - { 0x00005ddb, 0x00005ddb, 0x00 }, - { 0x00005ddd, 0x00005de2, 0x01 }, - { 0x00005de5, 0x00005de9, 0x01 }, - { 0x00005deb, 0x00005deb, 0x00 }, - { 0x00005dee, 0x00005df5, 0x01 }, - { 0x00005df7, 0x00005df7, 0x00 }, - { 0x00005df9, 0x00005df9, 0x00 }, - { 0x00005dfd, 0x00005dff, 0x01 }, - { 0x00005e01, 0x00005e06, 0x01 }, - { 0x00005e08, 0x00005e0c, 0x01 }, - { 0x00005e0e, 0x00005e12, 0x01 }, - { 0x00005e14, 0x00005e1d, 0x01 }, - { 0x00005e1f, 0x00005e29, 0x01 }, - { 0x00005e2b, 0x00005e2b, 0x00 }, - { 0x00005e2d, 0x00005e2e, 0x01 }, - { 0x00005e31, 0x00005e31, 0x00 }, - { 0x00005e33, 0x00005e34, 0x01 }, - { 0x00005e36, 0x00005e38, 0x01 }, - { 0x00005e3b, 0x00005e3e, 0x01 }, - { 0x00005e40, 0x00005e45, 0x01 }, - { 0x00005e48, 0x00005e48, 0x00 }, - { 0x00005e4a, 0x00005e4f, 0x01 }, - { 0x00005e53, 0x00005e55, 0x01 }, - { 0x00005e57, 0x00005e59, 0x01 }, - { 0x00005e5b, 0x00005e63, 0x01 }, - { 0x00005e66, 0x00005e70, 0x01 }, - { 0x00005e72, 0x00005e76, 0x01 }, - { 0x00005e78, 0x00005e80, 0x01 }, - { 0x00005e82, 0x00005e84, 0x01 }, - { 0x00005e86, 0x00005e8d, 0x01 }, - { 0x00005e8f, 0x00005e91, 0x01 }, - { 0x00005e93, 0x00005e97, 0x01 }, - { 0x00005e99, 0x00005e9c, 0x01 }, - { 0x00005e9e, 0x00005ea0, 0x01 }, - { 0x00005ea2, 0x00005ea8, 0x01 }, - { 0x00005eaa, 0x00005eae, 0x01 }, - { 0x00005eb0, 0x00005eb9, 0x01 }, - { 0x00005ebd, 0x00005ebe, 0x01 }, - { 0x00005ec1, 0x00005ec2, 0x01 }, - { 0x00005ec4, 0x00005ece, 0x01 }, - { 0x00005ed0, 0x00005ee3, 0x01 }, - { 0x00005ee5, 0x00005eea, 0x01 }, - { 0x00005eec, 0x00005eec, 0x00 }, - { 0x00005eee, 0x00005eef, 0x01 }, - { 0x00005ef1, 0x00005ef4, 0x01 }, - { 0x00005ef6, 0x00005efc, 0x01 }, - { 0x00005efe, 0x00005f05, 0x01 }, - { 0x00005f07, 0x00005f08, 0x01 }, - { 0x00005f0a, 0x00005f0f, 0x01 }, - { 0x00005f11, 0x00005f15, 0x01 }, - { 0x00005f17, 0x00005f18, 0x01 }, - { 0x00005f1a, 0x00005f1b, 0x01 }, - { 0x00005f1d, 0x00005f1d, 0x00 }, - { 0x00005f1f, 0x00005f20, 0x01 }, - { 0x00005f22, 0x00005f2a, 0x01 }, - { 0x00005f2d, 0x00005f31, 0x01 }, - { 0x00005f33, 0x00005f33, 0x00 }, - { 0x00005f35, 0x00005f3a, 0x01 }, - { 0x00005f3c, 0x00005f3c, 0x00 }, - { 0x00005f40, 0x00005f40, 0x00 }, - { 0x00005f43, 0x00005f44, 0x01 }, - { 0x00005f46, 0x00005f46, 0x00 }, - { 0x00005f48, 0x00005f59, 0x01 }, - { 0x00005f5c, 0x00005f5e, 0x01 }, - { 0x00005f61, 0x00005f67, 0x01 }, - { 0x00005f69, 0x00005f6d, 0x01 }, - { 0x00005f6f, 0x00005f74, 0x01 }, - { 0x00005f76, 0x00005f79, 0x01 }, - { 0x00005f7b, 0x00005f8c, 0x01 }, - { 0x00005f90, 0x00005f92, 0x01 }, - { 0x00005f95, 0x00005f99, 0x01 }, - { 0x00005f9b, 0x00005f9c, 0x01 }, - { 0x00005f9e, 0x00005fa1, 0x01 }, - { 0x00005fa4, 0x00005faf, 0x01 }, - { 0x00005fb1, 0x00005fb2, 0x01 }, - { 0x00005fb5, 0x00005fb7, 0x01 }, - { 0x00005fb9, 0x00005fc1, 0x01 }, - { 0x00005fc3, 0x00005fc6, 0x01 }, - { 0x00005fc9, 0x00005fc9, 0x00 }, - { 0x00005fcc, 0x00005fcd, 0x01 }, - { 0x00005fcf, 0x00005fd2, 0x01 }, - { 0x00005fd4, 0x00005fd9, 0x01 }, - { 0x00005fdb, 0x00005fdb, 0x00 }, - { 0x00005fdd, 0x00005fe1, 0x01 }, - { 0x00005fe3, 0x00005fe5, 0x01 }, - { 0x00005fe7, 0x00005fe8, 0x01 }, - { 0x00005fea, 0x00005feb, 0x01 }, - { 0x00005fed, 0x00005fef, 0x01 }, - { 0x00005ff1, 0x00005ff1, 0x00 }, - { 0x00005ff3, 0x00005ff5, 0x01 }, - { 0x00005ff7, 0x00005ff8, 0x01 }, - { 0x00005ffa, 0x00005ffb, 0x01 }, - { 0x00005ffd, 0x00006006, 0x01 }, - { 0x00006009, 0x00006017, 0x01 }, - { 0x00006019, 0x0000601e, 0x01 }, - { 0x00006020, 0x0000602f, 0x01 }, - { 0x00006031, 0x00006035, 0x01 }, - { 0x00006037, 0x00006037, 0x00 }, - { 0x00006039, 0x00006039, 0x00 }, - { 0x0000603b, 0x0000603c, 0x01 }, - { 0x0000603f, 0x00006047, 0x01 }, - { 0x00006049, 0x0000604d, 0x01 }, - { 0x00006050, 0x00006050, 0x00 }, - { 0x00006052, 0x00006055, 0x01 }, - { 0x00006058, 0x0000605b, 0x01 }, - { 0x0000605d, 0x0000605f, 0x01 }, - { 0x00006062, 0x00006070, 0x01 }, - { 0x00006072, 0x00006073, 0x01 }, - { 0x00006075, 0x00006081, 0x01 }, - { 0x00006083, 0x0000608a, 0x01 }, - { 0x0000608c, 0x0000608e, 0x01 }, - { 0x00006090, 0x00006090, 0x00 }, - { 0x00006092, 0x00006092, 0x00 }, - { 0x00006094, 0x00006097, 0x01 }, - { 0x0000609a, 0x000060a0, 0x01 }, - { 0x000060a2, 0x000060a4, 0x01 }, - { 0x000060a6, 0x000060a8, 0x01 }, - { 0x000060ab, 0x000060ad, 0x01 }, - { 0x000060af, 0x000060c1, 0x01 }, - { 0x000060c3, 0x000060cf, 0x01 }, - { 0x000060d1, 0x000060d1, 0x00 }, - { 0x000060d3, 0x000060d5, 0x01 }, - { 0x000060d7, 0x000060e4, 0x01 }, - { 0x000060e6, 0x000060e9, 0x01 }, - { 0x000060eb, 0x00006101, 0x01 }, - { 0x00006103, 0x00006110, 0x01 }, - { 0x00006112, 0x00006116, 0x01 }, - { 0x00006118, 0x0000611d, 0x01 }, - { 0x0000611f, 0x00006120, 0x01 }, - { 0x00006123, 0x00006124, 0x01 }, - { 0x00006126, 0x00006129, 0x01 }, - { 0x0000612b, 0x0000612c, 0x01 }, - { 0x0000612e, 0x00006130, 0x01 }, - { 0x00006132, 0x00006132, 0x00 }, - { 0x00006134, 0x00006134, 0x00 }, - { 0x00006136, 0x00006137, 0x01 }, - { 0x0000613b, 0x0000613b, 0x00 }, - { 0x0000613d, 0x00006142, 0x01 }, - { 0x00006144, 0x00006156, 0x01 }, - { 0x00006158, 0x00006168, 0x01 }, - { 0x0000616a, 0x0000616c, 0x01 }, - { 0x0000616e, 0x00006177, 0x01 }, - { 0x00006179, 0x0000617a, 0x01 }, - { 0x0000617c, 0x0000617e, 0x01 }, - { 0x00006180, 0x00006183, 0x01 }, - { 0x00006187, 0x00006187, 0x00 }, - { 0x00006189, 0x0000618e, 0x01 }, - { 0x00006190, 0x00006196, 0x01 }, - { 0x00006198, 0x0000619d, 0x01 }, - { 0x0000619f, 0x0000619f, 0x00 }, - { 0x000061a1, 0x000061a2, 0x01 }, - { 0x000061a4, 0x000061a4, 0x00 }, - { 0x000061a7, 0x000061ba, 0x01 }, - { 0x000061bc, 0x000061bc, 0x00 }, - { 0x000061be, 0x000061c3, 0x01 }, - { 0x000061c5, 0x000061cd, 0x01 }, - { 0x000061cf, 0x000061d4, 0x01 }, - { 0x000061d6, 0x000061d6, 0x00 }, - { 0x000061d8, 0x000061d8, 0x00 }, - { 0x000061da, 0x000061da, 0x00 }, - { 0x000061de, 0x000061e0, 0x01 }, - { 0x000061e2, 0x000061eb, 0x01 }, - { 0x000061ed, 0x000061ee, 0x01 }, - { 0x000061f0, 0x000061f2, 0x01 }, - { 0x000061f5, 0x00006201, 0x01 }, - { 0x00006203, 0x00006204, 0x01 }, - { 0x00006206, 0x00006212, 0x01 }, - { 0x00006214, 0x0000621b, 0x01 }, - { 0x0000621f, 0x00006225, 0x01 }, - { 0x00006227, 0x00006227, 0x00 }, - { 0x00006229, 0x0000622e, 0x01 }, - { 0x00006230, 0x00006230, 0x00 }, - { 0x00006232, 0x00006234, 0x01 }, - { 0x00006236, 0x00006237, 0x01 }, - { 0x00006239, 0x0000623a, 0x01 }, - { 0x0000623d, 0x00006243, 0x01 }, - { 0x00006246, 0x0000624e, 0x01 }, - { 0x00006250, 0x00006254, 0x01 }, - { 0x00006258, 0x0000625c, 0x01 }, - { 0x0000625e, 0x0000625e, 0x00 }, - { 0x00006260, 0x00006274, 0x01 }, - { 0x00006276, 0x00006277, 0x01 }, - { 0x00006279, 0x0000628a, 0x01 }, - { 0x0000628c, 0x0000628c, 0x00 }, - { 0x0000628e, 0x00006298, 0x01 }, - { 0x0000629a, 0x0000629b, 0x01 }, - { 0x0000629d, 0x0000629d, 0x00 }, - { 0x0000629f, 0x000062a2, 0x01 }, - { 0x000062a4, 0x000062a6, 0x01 }, - { 0x000062a8, 0x000062b1, 0x01 }, - { 0x000062b3, 0x000062b6, 0x01 }, - { 0x000062b8, 0x000062b9, 0x01 }, - { 0x000062bb, 0x000062bf, 0x01 }, - { 0x000062c2, 0x000062dc, 0x01 }, - { 0x000062df, 0x000062df, 0x00 }, - { 0x000062e2, 0x000062e3, 0x01 }, - { 0x000062e5, 0x000062e9, 0x01 }, - { 0x000062eb, 0x00006303, 0x01 }, - { 0x00006307, 0x00006309, 0x01 }, - { 0x0000630b, 0x00006311, 0x01 }, - { 0x00006313, 0x00006316, 0x01 }, - { 0x00006318, 0x00006318, 0x00 }, - { 0x0000631a, 0x0000631b, 0x01 }, - { 0x0000631d, 0x00006325, 0x01 }, - { 0x00006328, 0x0000632f, 0x01 }, - { 0x00006331, 0x0000633e, 0x01 }, - { 0x00006340, 0x00006351, 0x01 }, - { 0x00006354, 0x0000635a, 0x01 }, - { 0x0000635e, 0x0000635f, 0x01 }, - { 0x00006361, 0x00006365, 0x01 }, - { 0x00006367, 0x00006369, 0x01 }, - { 0x0000636b, 0x00006372, 0x01 }, - { 0x00006375, 0x0000637d, 0x01 }, - { 0x0000637f, 0x00006385, 0x01 }, - { 0x00006387, 0x00006392, 0x01 }, - { 0x00006394, 0x00006394, 0x00 }, - { 0x00006396, 0x00006399, 0x01 }, - { 0x0000639b, 0x000063a5, 0x01 }, - { 0x000063a7, 0x000063b1, 0x01 }, - { 0x000063b3, 0x000063b4, 0x01 }, - { 0x000063b6, 0x000063ba, 0x01 }, - { 0x000063bc, 0x000063be, 0x01 }, - { 0x000063c0, 0x000063d3, 0x01 }, - { 0x000063d5, 0x000063eb, 0x01 }, - { 0x000063ed, 0x000063f6, 0x01 }, - { 0x000063f8, 0x000063f9, 0x01 }, - { 0x000063fb, 0x00006402, 0x01 }, - { 0x00006405, 0x00006407, 0x01 }, - { 0x00006409, 0x00006410, 0x01 }, - { 0x00006412, 0x00006418, 0x01 }, - { 0x0000641a, 0x0000641c, 0x01 }, - { 0x0000641e, 0x00006428, 0x01 }, - { 0x0000642a, 0x00006430, 0x01 }, - { 0x00006432, 0x0000643b, 0x01 }, - { 0x0000643d, 0x00006441, 0x01 }, - { 0x00006443, 0x00006448, 0x01 }, - { 0x0000644a, 0x0000644b, 0x01 }, - { 0x0000644d, 0x0000644e, 0x01 }, - { 0x00006450, 0x00006454, 0x01 }, - { 0x00006458, 0x00006461, 0x01 }, - { 0x00006465, 0x00006469, 0x01 }, - { 0x0000646b, 0x0000647d, 0x01 }, - { 0x0000647f, 0x0000647f, 0x00 }, - { 0x00006482, 0x00006482, 0x00 }, - { 0x00006484, 0x00006485, 0x01 }, - { 0x00006487, 0x0000648d, 0x01 }, - { 0x0000648f, 0x00006493, 0x01 }, - { 0x00006495, 0x0000649a, 0x01 }, - { 0x0000649c, 0x000064a0, 0x01 }, - { 0x000064a2, 0x000064a6, 0x01 }, - { 0x000064a9, 0x000064a9, 0x00 }, - { 0x000064ab, 0x000064b8, 0x01 }, - { 0x000064ba, 0x000064c5, 0x01 }, - { 0x000064c7, 0x000064c7, 0x00 }, - { 0x000064c9, 0x000064cb, 0x01 }, - { 0x000064cd, 0x000064d0, 0x01 }, - { 0x000064d2, 0x000064d4, 0x01 }, - { 0x000064d6, 0x000064db, 0x01 }, - { 0x000064dd, 0x000064de, 0x01 }, - { 0x000064e0, 0x000064ed, 0x01 }, - { 0x000064ef, 0x000064f4, 0x01 }, - { 0x000064f7, 0x000064f8, 0x01 }, - { 0x000064fa, 0x00006501, 0x01 }, - { 0x00006503, 0x00006504, 0x01 }, - { 0x00006506, 0x00006507, 0x01 }, - { 0x00006509, 0x0000650a, 0x01 }, - { 0x0000650c, 0x00006519, 0x01 }, - { 0x0000651b, 0x00006526, 0x01 }, - { 0x00006529, 0x00006530, 0x01 }, - { 0x00006532, 0x00006539, 0x01 }, - { 0x0000653b, 0x0000653b, 0x00 }, - { 0x0000653d, 0x0000653f, 0x01 }, - { 0x00006541, 0x00006541, 0x00 }, - { 0x00006543, 0x00006543, 0x00 }, - { 0x00006545, 0x00006546, 0x01 }, - { 0x00006548, 0x0000654a, 0x01 }, - { 0x0000654c, 0x0000654d, 0x01 }, - { 0x0000654f, 0x0000654f, 0x00 }, - { 0x00006551, 0x00006551, 0x00 }, - { 0x00006553, 0x00006559, 0x01 }, - { 0x0000655b, 0x0000655f, 0x01 }, - { 0x00006562, 0x00006568, 0x01 }, - { 0x0000656a, 0x0000656d, 0x01 }, - { 0x0000656f, 0x00006570, 0x01 }, - { 0x00006572, 0x0000657c, 0x01 }, - { 0x0000657f, 0x00006589, 0x01 }, - { 0x0000658b, 0x0000658c, 0x01 }, - { 0x00006590, 0x00006597, 0x01 }, - { 0x00006599, 0x00006599, 0x00 }, - { 0x0000659b, 0x000065a2, 0x01 }, - { 0x000065a4, 0x000065a5, 0x01 }, - { 0x000065a7, 0x000065b0, 0x01 }, - { 0x000065b2, 0x000065b3, 0x01 }, - { 0x000065b5, 0x000065b9, 0x01 }, - { 0x000065bb, 0x000065bf, 0x01 }, - { 0x000065c1, 0x000065c6, 0x01 }, - { 0x000065cb, 0x000065d4, 0x01 }, - { 0x000065d6, 0x000065d7, 0x01 }, - { 0x000065da, 0x000065db, 0x01 }, - { 0x000065dd, 0x000065e3, 0x01 }, - { 0x000065e5, 0x000065e9, 0x01 }, - { 0x000065ec, 0x000065f7, 0x01 }, - { 0x000065fa, 0x000065fd, 0x01 }, - { 0x000065ff, 0x00006600, 0x01 }, - { 0x00006602, 0x00006615, 0x01 }, - { 0x00006618, 0x00006619, 0x01 }, - { 0x0000661c, 0x00006628, 0x01 }, - { 0x0000662b, 0x0000662b, 0x00 }, - { 0x0000662d, 0x00006636, 0x01 }, - { 0x00006639, 0x0000663a, 0x01 }, - { 0x0000663c, 0x0000663c, 0x00 }, - { 0x0000663e, 0x0000663e, 0x00 }, - { 0x00006641, 0x00006645, 0x01 }, - { 0x00006647, 0x0000664c, 0x01 }, - { 0x0000664f, 0x0000664f, 0x00 }, - { 0x00006651, 0x00006657, 0x01 }, - { 0x00006659, 0x0000665f, 0x01 }, - { 0x00006661, 0x00006668, 0x01 }, - { 0x0000666a, 0x0000666c, 0x01 }, - { 0x0000666e, 0x00006674, 0x01 }, - { 0x00006676, 0x0000667e, 0x01 }, - { 0x00006680, 0x00006680, 0x00 }, - { 0x00006682, 0x00006682, 0x00 }, - { 0x00006684, 0x0000668e, 0x01 }, - { 0x00006690, 0x00006692, 0x01 }, - { 0x00006694, 0x0000669a, 0x01 }, - { 0x0000669d, 0x0000669d, 0x00 }, - { 0x0000669f, 0x000066a2, 0x01 }, - { 0x000066a4, 0x000066a4, 0x00 }, - { 0x000066a7, 0x000066ab, 0x01 }, - { 0x000066ad, 0x000066bb, 0x01 }, - { 0x000066bd, 0x000066c0, 0x01 }, - { 0x000066c4, 0x000066c4, 0x00 }, - { 0x000066c6, 0x000066cf, 0x01 }, - { 0x000066d2, 0x000066d2, 0x00 }, - { 0x000066d6, 0x000066d6, 0x00 }, - { 0x000066d8, 0x000066de, 0x01 }, - { 0x000066e0, 0x000066e0, 0x00 }, - { 0x000066e3, 0x000066e4, 0x01 }, - { 0x000066e6, 0x000066e6, 0x00 }, - { 0x000066e8, 0x000066e9, 0x01 }, - { 0x000066eb, 0x000066ee, 0x01 }, - { 0x000066f0, 0x000066f4, 0x01 }, - { 0x000066f6, 0x000066f9, 0x01 }, - { 0x000066fc, 0x000066fc, 0x00 }, - { 0x000066fe, 0x00006705, 0x01 }, - { 0x00006708, 0x00006710, 0x01 }, - { 0x00006712, 0x00006718, 0x01 }, - { 0x0000671b, 0x0000671b, 0x00 }, - { 0x0000671d, 0x00006723, 0x01 }, - { 0x00006725, 0x00006728, 0x01 }, - { 0x0000672a, 0x0000672f, 0x01 }, - { 0x00006731, 0x00006731, 0x00 }, - { 0x00006733, 0x00006736, 0x01 }, - { 0x00006738, 0x00006740, 0x01 }, - { 0x00006742, 0x00006749, 0x01 }, - { 0x0000674b, 0x00006751, 0x01 }, - { 0x00006753, 0x00006753, 0x00 }, - { 0x00006755, 0x00006757, 0x01 }, - { 0x00006759, 0x0000675a, 0x01 }, - { 0x0000675c, 0x00006762, 0x01 }, - { 0x00006765, 0x00006765, 0x00 }, - { 0x00006767, 0x0000676a, 0x01 }, - { 0x0000676c, 0x0000676d, 0x01 }, - { 0x0000676f, 0x0000677f, 0x01 }, - { 0x00006781, 0x00006781, 0x00 }, - { 0x00006783, 0x00006787, 0x01 }, - { 0x00006789, 0x00006789, 0x00 }, - { 0x0000678b, 0x00006795, 0x01 }, - { 0x00006797, 0x0000679a, 0x01 }, - { 0x0000679c, 0x000067a0, 0x01 }, - { 0x000067a2, 0x000067a5, 0x01 }, - { 0x000067a7, 0x000067a8, 0x01 }, - { 0x000067aa, 0x000067bb, 0x01 }, - { 0x000067bf, 0x000067c6, 0x01 }, - { 0x000067c8, 0x000067d4, 0x01 }, - { 0x000067d6, 0x000067e0, 0x01 }, - { 0x000067e2, 0x000067e7, 0x01 }, - { 0x000067e9, 0x000067fa, 0x01 }, - { 0x000067fc, 0x00006805, 0x01 }, - { 0x00006807, 0x00006814, 0x01 }, - { 0x00006816, 0x00006818, 0x01 }, - { 0x0000681a, 0x00006822, 0x01 }, - { 0x00006825, 0x00006826, 0x01 }, - { 0x00006828, 0x0000682b, 0x01 }, - { 0x0000682d, 0x0000682f, 0x01 }, - { 0x00006831, 0x0000683e, 0x01 }, - { 0x00006840, 0x00006851, 0x01 }, - { 0x00006853, 0x00006856, 0x01 }, - { 0x0000685d, 0x0000685d, 0x00 }, - { 0x00006860, 0x00006869, 0x01 }, - { 0x0000686b, 0x0000686b, 0x00 }, - { 0x0000686d, 0x0000686f, 0x01 }, - { 0x00006871, 0x00006872, 0x01 }, - { 0x00006874, 0x00006879, 0x01 }, - { 0x0000687b, 0x0000688c, 0x01 }, - { 0x0000688f, 0x00006894, 0x01 }, - { 0x00006896, 0x00006898, 0x01 }, - { 0x0000689b, 0x0000689d, 0x01 }, - { 0x0000689f, 0x000068a4, 0x01 }, - { 0x000068a6, 0x000068b6, 0x01 }, - { 0x000068b9, 0x000068b9, 0x00 }, - { 0x000068bd, 0x000068bd, 0x00 }, - { 0x000068c0, 0x000068c0, 0x00 }, - { 0x000068c2, 0x000068ce, 0x01 }, - { 0x000068d0, 0x000068d8, 0x01 }, - { 0x000068da, 0x000068da, 0x00 }, - { 0x000068dc, 0x000068e1, 0x01 }, - { 0x000068e3, 0x000068e4, 0x01 }, - { 0x000068e6, 0x000068ec, 0x01 }, - { 0x000068ee, 0x000068fd, 0x01 }, - { 0x00006900, 0x00006915, 0x01 }, - { 0x00006917, 0x00006918, 0x01 }, - { 0x0000691a, 0x0000691b, 0x01 }, - { 0x0000691f, 0x00006920, 0x01 }, - { 0x00006924, 0x00006925, 0x01 }, - { 0x0000692a, 0x0000692a, 0x00 }, - { 0x0000692c, 0x0000692d, 0x01 }, - { 0x0000692f, 0x00006930, 0x01 }, - { 0x00006932, 0x00006939, 0x01 }, - { 0x0000693b, 0x00006946, 0x01 }, - { 0x00006948, 0x0000694c, 0x01 }, - { 0x0000694e, 0x0000694f, 0x01 }, - { 0x00006951, 0x0000697c, 0x01 }, - { 0x00006980, 0x00006980, 0x00 }, - { 0x00006982, 0x0000698a, 0x01 }, - { 0x0000698d, 0x0000698e, 0x01 }, - { 0x00006990, 0x00006991, 0x01 }, - { 0x00006993, 0x0000699c, 0x01 }, - { 0x0000699e, 0x000069b7, 0x01 }, - { 0x000069b9, 0x000069b9, 0x00 }, - { 0x000069bb, 0x000069c4, 0x01 }, - { 0x000069c6, 0x000069c6, 0x00 }, - { 0x000069c9, 0x000069d1, 0x01 }, - { 0x000069d3, 0x000069d6, 0x01 }, - { 0x000069d9, 0x000069d9, 0x00 }, - { 0x000069db, 0x000069db, 0x00 }, - { 0x000069df, 0x000069e2, 0x01 }, - { 0x000069e4, 0x000069e9, 0x01 }, - { 0x000069eb, 0x000069ee, 0x01 }, - { 0x000069f1, 0x000069f4, 0x01 }, - { 0x000069f6, 0x00006a0d, 0x01 }, - { 0x00006a0f, 0x00006a0f, 0x00 }, - { 0x00006a11, 0x00006a11, 0x00 }, - { 0x00006a13, 0x00006a21, 0x01 }, - { 0x00006a23, 0x00006a23, 0x00 }, - { 0x00006a25, 0x00006a28, 0x01 }, - { 0x00006a2a, 0x00006a2d, 0x01 }, - { 0x00006a2f, 0x00006a2f, 0x00 }, - { 0x00006a31, 0x00006a35, 0x01 }, - { 0x00006a38, 0x00006a41, 0x01 }, - { 0x00006a44, 0x00006a49, 0x01 }, - { 0x00006a4b, 0x00006a5b, 0x01 }, - { 0x00006a5d, 0x00006a62, 0x01 }, - { 0x00006a64, 0x00006a6b, 0x01 }, - { 0x00006a6d, 0x00006a6d, 0x00 }, - { 0x00006a6f, 0x00006a6f, 0x00 }, - { 0x00006a71, 0x00006a71, 0x00 }, - { 0x00006a74, 0x00006a74, 0x00 }, - { 0x00006a76, 0x00006a76, 0x00 }, - { 0x00006a79, 0x00006a7a, 0x01 }, - { 0x00006a7c, 0x00006a7c, 0x00 }, - { 0x00006a7e, 0x00006a85, 0x01 }, - { 0x00006a87, 0x00006a87, 0x00 }, - { 0x00006a89, 0x00006a8a, 0x01 }, - { 0x00006a8c, 0x00006a97, 0x01 }, - { 0x00006a99, 0x00006aa9, 0x01 }, - { 0x00006aab, 0x00006aaf, 0x01 }, - { 0x00006ab1, 0x00006abb, 0x01 }, - { 0x00006abd, 0x00006abe, 0x01 }, - { 0x00006ac2, 0x00006ac3, 0x01 }, - { 0x00006ac5, 0x00006acd, 0x01 }, - { 0x00006acf, 0x00006ad1, 0x01 }, - { 0x00006ad3, 0x00006ad4, 0x01 }, - { 0x00006ad8, 0x00006ae1, 0x01 }, - { 0x00006ae5, 0x00006ae5, 0x00 }, - { 0x00006ae7, 0x00006ae8, 0x01 }, - { 0x00006aea, 0x00006aec, 0x01 }, - { 0x00006aee, 0x00006af1, 0x01 }, - { 0x00006af3, 0x00006af3, 0x00 }, - { 0x00006af6, 0x00006af6, 0x00 }, - { 0x00006af8, 0x00006afc, 0x01 }, - { 0x00006b00, 0x00006b00, 0x00 }, - { 0x00006b02, 0x00006b05, 0x01 }, - { 0x00006b08, 0x00006b0b, 0x01 }, - { 0x00006b0f, 0x00006b13, 0x01 }, - { 0x00006b16, 0x00006b1a, 0x01 }, - { 0x00006b1d, 0x00006b1e, 0x01 }, - { 0x00006b20, 0x00006b25, 0x01 }, - { 0x00006b27, 0x00006b28, 0x01 }, - { 0x00006b2c, 0x00006b2d, 0x01 }, - { 0x00006b2f, 0x00006b2f, 0x00 }, - { 0x00006b31, 0x00006b3f, 0x01 }, - { 0x00006b41, 0x00006b43, 0x01 }, - { 0x00006b45, 0x00006b4e, 0x01 }, - { 0x00006b50, 0x00006b52, 0x01 }, - { 0x00006b54, 0x00006b57, 0x01 }, - { 0x00006b59, 0x00006b59, 0x00 }, - { 0x00006b5b, 0x00006b5c, 0x01 }, - { 0x00006b5e, 0x00006b67, 0x01 }, - { 0x00006b6a, 0x00006b6a, 0x00 }, - { 0x00006b6d, 0x00006b6d, 0x00 }, - { 0x00006b6f, 0x00006b6f, 0x00 }, - { 0x00006b72, 0x00006b72, 0x00 }, - { 0x00006b74, 0x00006b74, 0x00 }, - { 0x00006b76, 0x00006b7c, 0x01 }, - { 0x00006b7e, 0x00006b84, 0x01 }, - { 0x00006b86, 0x00006b8f, 0x01 }, - { 0x00006b91, 0x00006b9b, 0x01 }, - { 0x00006b9e, 0x00006ba7, 0x01 }, - { 0x00006baa, 0x00006bab, 0x01 }, - { 0x00006bad, 0x00006bb0, 0x01 }, - { 0x00006bb2, 0x00006bb7, 0x01 }, - { 0x00006bba, 0x00006bbd, 0x01 }, - { 0x00006bbf, 0x00006bcd, 0x01 }, - { 0x00006bcf, 0x00006bd0, 0x01 }, - { 0x00006bd2, 0x00006bdc, 0x01 }, - { 0x00006bde, 0x00006bde, 0x00 }, - { 0x00006be0, 0x00006be4, 0x01 }, - { 0x00006be6, 0x00006be8, 0x01 }, - { 0x00006bea, 0x00006bec, 0x01 }, - { 0x00006bef, 0x00006bf0, 0x01 }, - { 0x00006bf2, 0x00006bf3, 0x01 }, - { 0x00006bf5, 0x00006bf5, 0x00 }, - { 0x00006bf7, 0x00006c09, 0x01 }, - { 0x00006c0b, 0x00006c0d, 0x01 }, - { 0x00006c0f, 0x00006c11, 0x01 }, - { 0x00006c13, 0x00006c16, 0x01 }, - { 0x00006c18, 0x00006c1d, 0x01 }, - { 0x00006c1f, 0x00006c2c, 0x01 }, - { 0x00006c2e, 0x00006c3b, 0x01 }, - { 0x00006c3d, 0x00006c43, 0x01 }, - { 0x00006c46, 0x00006c47, 0x01 }, - { 0x00006c49, 0x00006c50, 0x01 }, - { 0x00006c52, 0x00006c52, 0x00 }, - { 0x00006c54, 0x00006c55, 0x01 }, - { 0x00006c57, 0x00006c61, 0x01 }, - { 0x00006c64, 0x00006c6b, 0x01 }, - { 0x00006c6d, 0x00006c76, 0x01 }, - { 0x00006c78, 0x00006c7b, 0x01 }, - { 0x00006c7d, 0x00006c90, 0x01 }, - { 0x00006c92, 0x00006c96, 0x01 }, - { 0x00006c98, 0x00006c9d, 0x01 }, - { 0x00006c9f, 0x00006c9f, 0x00 }, - { 0x00006ca1, 0x00006ca7, 0x01 }, - { 0x00006ca9, 0x00006cb4, 0x01 }, - { 0x00006cb6, 0x00006cc7, 0x01 }, - { 0x00006cc9, 0x00006cd7, 0x01 }, - { 0x00006cd9, 0x00006ce3, 0x01 }, - { 0x00006ce5, 0x00006ce5, 0x00 }, - { 0x00006ce7, 0x00006cf3, 0x01 }, - { 0x00006cf5, 0x00006cfe, 0x01 }, - { 0x00006d00, 0x00006d12, 0x01 }, - { 0x00006d16, 0x00006d1b, 0x01 }, - { 0x00006d1d, 0x00006d20, 0x01 }, - { 0x00006d22, 0x00006d22, 0x00 }, - { 0x00006d24, 0x00006d43, 0x01 }, - { 0x00006d45, 0x00006d48, 0x01 }, - { 0x00006d4a, 0x00006d4b, 0x01 }, - { 0x00006d4d, 0x00006d4f, 0x01 }, - { 0x00006d51, 0x00006d54, 0x01 }, - { 0x00006d57, 0x00006d5c, 0x01 }, - { 0x00006d5e, 0x00006d6a, 0x01 }, - { 0x00006d6c, 0x00006d72, 0x01 }, - { 0x00006d74, 0x00006d98, 0x01 }, - { 0x00006d9b, 0x00006d9b, 0x00 }, - { 0x00006d9d, 0x00006da1, 0x01 }, - { 0x00006da3, 0x00006dac, 0x01 }, - { 0x00006dae, 0x00006daf, 0x01 }, - { 0x00006db1, 0x00006db5, 0x01 }, - { 0x00006db7, 0x00006dc0, 0x01 }, - { 0x00006dc2, 0x00006dc2, 0x00 }, - { 0x00006dc4, 0x00006dcd, 0x01 }, - { 0x00006dcf, 0x00006de6, 0x01 }, - { 0x00006de8, 0x00006df7, 0x01 }, - { 0x00006df9, 0x00006dfd, 0x01 }, - { 0x00006e00, 0x00006e00, 0x00 }, - { 0x00006e02, 0x00006e05, 0x01 }, - { 0x00006e0a, 0x00006e0a, 0x00 }, - { 0x00006e0c, 0x00006e11, 0x01 }, - { 0x00006e14, 0x00006e1d, 0x01 }, - { 0x00006e1f, 0x00006e36, 0x01 }, - { 0x00006e38, 0x00006e41, 0x01 }, - { 0x00006e43, 0x00006e47, 0x01 }, - { 0x00006e49, 0x00006e4b, 0x01 }, - { 0x00006e4d, 0x00006e56, 0x01 }, - { 0x00006e58, 0x00006e69, 0x01 }, - { 0x00006e6b, 0x00006e6b, 0x00 }, - { 0x00006e6e, 0x00006e6f, 0x01 }, - { 0x00006e71, 0x00006e74, 0x01 }, - { 0x00006e76, 0x00006e79, 0x01 }, - { 0x00006e7c, 0x00006e7c, 0x00 }, - { 0x00006e7e, 0x00006e7f, 0x01 }, - { 0x00006e83, 0x00006e83, 0x00 }, - { 0x00006e85, 0x00006e86, 0x01 }, - { 0x00006e88, 0x00006e89, 0x01 }, - { 0x00006e8b, 0x00006e8b, 0x00 }, - { 0x00006e8d, 0x00006e90, 0x01 }, - { 0x00006e92, 0x00006e94, 0x01 }, - { 0x00006e96, 0x00006ea7, 0x01 }, - { 0x00006eaa, 0x00006eab, 0x01 }, - { 0x00006eae, 0x00006ee2, 0x01 }, - { 0x00006ee4, 0x00006ee6, 0x01 }, - { 0x00006ee8, 0x00006ee9, 0x01 }, - { 0x00006eeb, 0x00006eef, 0x01 }, - { 0x00006ef1, 0x00006ef2, 0x01 }, - { 0x00006ef4, 0x00006f0f, 0x01 }, - { 0x00006f12, 0x00006f1a, 0x01 }, - { 0x00006f1c, 0x00006f1c, 0x00 }, - { 0x00006f1e, 0x00006f27, 0x01 }, - { 0x00006f29, 0x00006f41, 0x01 }, - { 0x00006f43, 0x00006f44, 0x01 }, - { 0x00006f46, 0x00006f47, 0x01 }, - { 0x00006f4b, 0x00006f4b, 0x00 }, - { 0x00006f4d, 0x00006f58, 0x01 }, - { 0x00006f5a, 0x00006f64, 0x01 }, - { 0x00006f66, 0x00006f67, 0x01 }, - { 0x00006f69, 0x00006f70, 0x01 }, - { 0x00006f72, 0x00006f74, 0x01 }, - { 0x00006f76, 0x00006f82, 0x01 }, - { 0x00006f84, 0x00006f8e, 0x01 }, - { 0x00006f90, 0x00006f90, 0x00 }, - { 0x00006f92, 0x00006f97, 0x01 }, - { 0x00006f9c, 0x00006fb6, 0x01 }, - { 0x00006fb8, 0x00006fc4, 0x01 }, - { 0x00006fc6, 0x00006fcf, 0x01 }, - { 0x00006fd1, 0x00006fd5, 0x01 }, - { 0x00006fd8, 0x00006fe4, 0x01 }, - { 0x00006fe6, 0x00006fe9, 0x01 }, - { 0x00006feb, 0x00006ff2, 0x01 }, - { 0x00006ff4, 0x00006ff4, 0x00 }, - { 0x00006ff6, 0x00006ff8, 0x01 }, - { 0x00006ffa, 0x00006ffc, 0x01 }, - { 0x00006ffe, 0x00007001, 0x01 }, - { 0x00007003, 0x00007007, 0x01 }, - { 0x00007009, 0x0000700f, 0x01 }, - { 0x00007011, 0x00007011, 0x00 }, - { 0x00007014, 0x00007024, 0x01 }, - { 0x00007026, 0x0000702c, 0x01 }, - { 0x0000702f, 0x00007035, 0x01 }, - { 0x00007037, 0x0000703c, 0x01 }, - { 0x0000703e, 0x00007046, 0x01 }, - { 0x00007048, 0x0000704c, 0x01 }, - { 0x0000704f, 0x00007052, 0x01 }, - { 0x00007054, 0x00007058, 0x01 }, - { 0x0000705a, 0x0000706d, 0x01 }, - { 0x0000706f, 0x00007071, 0x01 }, - { 0x00007074, 0x00007076, 0x01 }, - { 0x00007078, 0x0000707a, 0x01 }, - { 0x0000707c, 0x00007086, 0x01 }, - { 0x00007089, 0x0000708b, 0x01 }, - { 0x0000708e, 0x0000708f, 0x01 }, - { 0x00007091, 0x00007096, 0x01 }, - { 0x00007098, 0x0000709a, 0x01 }, - { 0x0000709c, 0x0000709d, 0x01 }, - { 0x0000709f, 0x000070a1, 0x01 }, - { 0x000070a3, 0x000070a7, 0x01 }, - { 0x000070a9, 0x000070a9, 0x00 }, - { 0x000070ab, 0x000070b1, 0x01 }, - { 0x000070b3, 0x000070b5, 0x01 }, - { 0x000070b7, 0x000070be, 0x01 }, - { 0x000070c0, 0x000070c8, 0x01 }, - { 0x000070ca, 0x000070e2, 0x01 }, - { 0x000070e4, 0x000070e4, 0x00 }, - { 0x000070e6, 0x000070e9, 0x01 }, - { 0x000070eb, 0x000070ed, 0x01 }, - { 0x000070ef, 0x000070f1, 0x01 }, - { 0x000070f3, 0x00007100, 0x01 }, - { 0x00007102, 0x00007102, 0x00 }, - { 0x00007104, 0x00007106, 0x01 }, - { 0x00007109, 0x0000710e, 0x01 }, - { 0x00007110, 0x00007110, 0x00 }, - { 0x00007113, 0x00007113, 0x00 }, - { 0x00007115, 0x00007123, 0x01 }, - { 0x00007125, 0x00007126, 0x01 }, - { 0x00007128, 0x00007129, 0x01 }, - { 0x0000712b, 0x0000712c, 0x01 }, - { 0x0000712e, 0x00007136, 0x01 }, - { 0x0000713a, 0x0000713b, 0x01 }, - { 0x0000713e, 0x0000713e, 0x00 }, - { 0x00007140, 0x00007147, 0x01 }, - { 0x00007149, 0x00007154, 0x01 }, - { 0x00007156, 0x00007156, 0x00 }, - { 0x00007158, 0x0000715a, 0x01 }, - { 0x0000715c, 0x0000716c, 0x01 }, - { 0x0000716e, 0x0000716e, 0x00 }, - { 0x00007170, 0x00007173, 0x01 }, - { 0x00007175, 0x00007178, 0x01 }, - { 0x0000717a, 0x0000717e, 0x01 }, - { 0x00007180, 0x00007182, 0x01 }, - { 0x00007184, 0x0000718a, 0x01 }, - { 0x0000718c, 0x0000718c, 0x00 }, - { 0x0000718e, 0x00007190, 0x01 }, - { 0x00007192, 0x00007192, 0x00 }, - { 0x00007194, 0x00007194, 0x00 }, - { 0x00007196, 0x000071a5, 0x01 }, - { 0x000071a7, 0x000071aa, 0x01 }, - { 0x000071ac, 0x000071ad, 0x01 }, - { 0x000071af, 0x000071b5, 0x01 }, - { 0x000071b7, 0x000071ba, 0x01 }, - { 0x000071bc, 0x000071cb, 0x01 }, - { 0x000071ce, 0x000071d2, 0x01 }, - { 0x000071d4, 0x000071d6, 0x01 }, - { 0x000071d8, 0x000071dd, 0x01 }, - { 0x000071df, 0x000071e2, 0x01 }, - { 0x000071e4, 0x000071e8, 0x01 }, - { 0x000071eb, 0x000071ee, 0x01 }, - { 0x000071f0, 0x000071f2, 0x01 }, - { 0x000071f4, 0x000071f6, 0x01 }, - { 0x000071f8, 0x000071f9, 0x01 }, - { 0x000071fb, 0x000071ff, 0x01 }, - { 0x00007201, 0x00007203, 0x01 }, - { 0x00007205, 0x00007207, 0x01 }, - { 0x00007209, 0x0000720a, 0x01 }, - { 0x0000720c, 0x00007210, 0x01 }, - { 0x00007213, 0x00007217, 0x01 }, - { 0x00007219, 0x0000721b, 0x01 }, - { 0x0000721d, 0x0000721f, 0x01 }, - { 0x00007222, 0x00007224, 0x01 }, - { 0x00007226, 0x0000722e, 0x01 }, - { 0x00007230, 0x00007232, 0x01 }, - { 0x00007235, 0x0000723b, 0x01 }, - { 0x0000723d, 0x00007242, 0x01 }, - { 0x00007244, 0x00007244, 0x00 }, - { 0x00007246, 0x0000724d, 0x01 }, - { 0x0000724f, 0x00007250, 0x01 }, - { 0x00007252, 0x00007253, 0x01 }, - { 0x00007255, 0x00007263, 0x01 }, - { 0x00007266, 0x00007267, 0x01 }, - { 0x00007269, 0x0000726a, 0x01 }, - { 0x0000726c, 0x0000726c, 0x00 }, - { 0x0000726e, 0x00007270, 0x01 }, - { 0x00007272, 0x00007282, 0x01 }, - { 0x00007284, 0x00007298, 0x01 }, - { 0x0000729a, 0x0000729b, 0x01 }, - { 0x0000729d, 0x0000729f, 0x01 }, - { 0x000072a1, 0x000072aa, 0x01 }, - { 0x000072ac, 0x000072b0, 0x01 }, - { 0x000072b2, 0x000072b2, 0x00 }, - { 0x000072b4, 0x000072ba, 0x01 }, - { 0x000072bd, 0x000072bd, 0x00 }, - { 0x000072bf, 0x000072c6, 0x01 }, - { 0x000072c8, 0x000072ce, 0x01 }, - { 0x000072d0, 0x000072d2, 0x01 }, - { 0x000072d4, 0x000072d4, 0x00 }, - { 0x000072d6, 0x000072da, 0x01 }, - { 0x000072dc, 0x000072dc, 0x00 }, - { 0x000072de, 0x000072e4, 0x01 }, - { 0x000072e6, 0x000072e6, 0x00 }, - { 0x000072e8, 0x000072f4, 0x01 }, - { 0x000072f6, 0x00007304, 0x01 }, - { 0x00007307, 0x00007308, 0x01 }, - { 0x0000730a, 0x0000730c, 0x01 }, - { 0x0000730e, 0x00007313, 0x01 }, - { 0x00007315, 0x00007319, 0x01 }, - { 0x0000731b, 0x0000731e, 0x01 }, - { 0x00007321, 0x00007323, 0x01 }, - { 0x00007325, 0x0000732e, 0x01 }, - { 0x00007330, 0x0000733c, 0x01 }, - { 0x0000733e, 0x00007345, 0x01 }, - { 0x00007348, 0x0000734a, 0x01 }, - { 0x0000734c, 0x00007352, 0x01 }, - { 0x00007357, 0x0000735b, 0x01 }, - { 0x0000735d, 0x00007362, 0x01 }, - { 0x00007365, 0x00007378, 0x01 }, - { 0x0000737a, 0x0000738b, 0x01 }, - { 0x0000738e, 0x0000738f, 0x01 }, - { 0x00007391, 0x00007398, 0x01 }, - { 0x0000739b, 0x000073a2, 0x01 }, - { 0x000073a4, 0x000073b0, 0x01 }, - { 0x000073b2, 0x000073bc, 0x01 }, - { 0x000073be, 0x000073c0, 0x01 }, - { 0x000073c2, 0x000073c3, 0x01 }, - { 0x000073c5, 0x000073de, 0x01 }, - { 0x000073e0, 0x000073eb, 0x01 }, - { 0x000073ed, 0x000073ef, 0x01 }, - { 0x000073f2, 0x00007401, 0x01 }, - { 0x00007403, 0x0000740d, 0x01 }, - { 0x0000740f, 0x00007412, 0x01 }, - { 0x00007414, 0x00007417, 0x01 }, - { 0x00007419, 0x00007426, 0x01 }, - { 0x00007428, 0x0000743a, 0x01 }, - { 0x0000743c, 0x0000743c, 0x00 }, - { 0x0000743f, 0x0000744b, 0x01 }, - { 0x0000744d, 0x00007457, 0x01 }, - { 0x00007459, 0x00007460, 0x01 }, - { 0x00007462, 0x00007465, 0x01 }, - { 0x00007467, 0x00007477, 0x01 }, - { 0x00007479, 0x0000747a, 0x01 }, - { 0x0000747c, 0x00007483, 0x01 }, - { 0x00007485, 0x0000748e, 0x01 }, - { 0x00007490, 0x00007490, 0x00 }, - { 0x00007492, 0x00007492, 0x00 }, - { 0x00007494, 0x00007495, 0x01 }, - { 0x00007497, 0x0000749c, 0x01 }, - { 0x0000749e, 0x000074a1, 0x01 }, - { 0x000074a3, 0x000074ab, 0x01 }, - { 0x000074ad, 0x000074ad, 0x00 }, - { 0x000074af, 0x000074b2, 0x01 }, - { 0x000074b4, 0x000074b8, 0x01 }, - { 0x000074ba, 0x000074bb, 0x01 }, - { 0x000074bd, 0x000074c3, 0x01 }, - { 0x000074c5, 0x000074c5, 0x00 }, - { 0x000074c8, 0x000074c8, 0x00 }, - { 0x000074ca, 0x000074cc, 0x01 }, - { 0x000074cf, 0x000074d0, 0x01 }, - { 0x000074d2, 0x000074e9, 0x01 }, - { 0x000074ec, 0x000074ec, 0x00 }, - { 0x000074ee, 0x000074f2, 0x01 }, - { 0x000074f4, 0x000074f8, 0x01 }, - { 0x000074fb, 0x000074fb, 0x00 }, - { 0x000074fd, 0x00007500, 0x01 }, - { 0x00007502, 0x00007505, 0x01 }, - { 0x00007507, 0x00007508, 0x01 }, - { 0x0000750b, 0x0000751a, 0x01 }, - { 0x0000751c, 0x0000751f, 0x01 }, - { 0x00007521, 0x00007523, 0x01 }, - { 0x00007525, 0x00007526, 0x01 }, - { 0x00007528, 0x00007535, 0x01 }, - { 0x00007537, 0x0000753b, 0x01 }, - { 0x0000753d, 0x00007540, 0x01 }, - { 0x00007542, 0x00007542, 0x00 }, - { 0x00007545, 0x00007548, 0x01 }, - { 0x0000754a, 0x0000754f, 0x01 }, - { 0x00007551, 0x00007551, 0x00 }, - { 0x00007553, 0x00007555, 0x01 }, - { 0x00007559, 0x0000755d, 0x01 }, - { 0x0000755f, 0x00007560, 0x01 }, - { 0x00007562, 0x00007567, 0x01 }, - { 0x0000756a, 0x00007570, 0x01 }, - { 0x00007572, 0x00007572, 0x00 }, - { 0x00007574, 0x00007574, 0x00 }, - { 0x00007576, 0x0000757a, 0x01 }, - { 0x0000757d, 0x00007580, 0x01 }, - { 0x00007583, 0x00007584, 0x01 }, - { 0x00007586, 0x00007587, 0x01 }, - { 0x0000758a, 0x00007592, 0x01 }, - { 0x00007594, 0x0000759a, 0x01 }, - { 0x0000759d, 0x000075a5, 0x01 }, - { 0x000075a7, 0x000075a7, 0x00 }, - { 0x000075aa, 0x000075ac, 0x01 }, - { 0x000075ae, 0x000075b6, 0x01 }, - { 0x000075b8, 0x000075c5, 0x01 }, - { 0x000075c7, 0x000075d2, 0x01 }, - { 0x000075d4, 0x000075e4, 0x01 }, - { 0x000075e6, 0x000075e8, 0x01 }, - { 0x000075ea, 0x000075eb, 0x01 }, - { 0x000075ed, 0x000075ed, 0x00 }, - { 0x000075ef, 0x00007603, 0x01 }, - { 0x00007605, 0x00007605, 0x00 }, - { 0x00007607, 0x0000760d, 0x01 }, - { 0x0000760f, 0x00007611, 0x01 }, - { 0x00007613, 0x0000762d, 0x01 }, - { 0x0000762f, 0x00007635, 0x01 }, - { 0x00007638, 0x00007638, 0x00 }, - { 0x0000763a, 0x00007640, 0x01 }, - { 0x00007642, 0x00007643, 0x01 }, - { 0x00007646, 0x00007649, 0x01 }, - { 0x0000764c, 0x00007654, 0x01 }, - { 0x00007656, 0x0000765a, 0x01 }, - { 0x0000765c, 0x0000765c, 0x00 }, - { 0x0000765e, 0x00007667, 0x01 }, - { 0x00007669, 0x00007676, 0x01 }, - { 0x00007678, 0x0000767f, 0x01 }, - { 0x00007681, 0x00007682, 0x01 }, - { 0x00007684, 0x00007684, 0x00 }, - { 0x00007686, 0x0000768b, 0x01 }, - { 0x0000768e, 0x00007693, 0x01 }, - { 0x00007695, 0x00007696, 0x01 }, - { 0x00007699, 0x0000769e, 0x01 }, - { 0x000076a1, 0x000076a1, 0x00 }, - { 0x000076a4, 0x000076a6, 0x01 }, - { 0x000076aa, 0x000076ab, 0x01 }, - { 0x000076ad, 0x000076b2, 0x01 }, - { 0x000076b4, 0x000076b5, 0x01 }, - { 0x000076b7, 0x000076b8, 0x01 }, - { 0x000076ba, 0x000076bb, 0x01 }, - { 0x000076bd, 0x000076bf, 0x01 }, - { 0x000076c2, 0x000076c6, 0x01 }, - { 0x000076c8, 0x000076ca, 0x01 }, - { 0x000076cc, 0x000076d4, 0x01 }, - { 0x000076d6, 0x000076d8, 0x01 }, - { 0x000076da, 0x000076df, 0x01 }, - { 0x000076e1, 0x000076e1, 0x00 }, - { 0x000076e3, 0x000076e7, 0x01 }, - { 0x000076e9, 0x000076ea, 0x01 }, - { 0x000076ec, 0x000076f5, 0x01 }, - { 0x000076f7, 0x000076fc, 0x01 }, - { 0x000076fe, 0x000076fe, 0x00 }, - { 0x00007701, 0x00007701, 0x00 }, - { 0x00007703, 0x00007705, 0x01 }, - { 0x00007707, 0x00007713, 0x01 }, - { 0x00007715, 0x00007715, 0x00 }, - { 0x00007719, 0x0000771b, 0x01 }, - { 0x0000771d, 0x00007720, 0x01 }, - { 0x00007722, 0x00007729, 0x01 }, - { 0x0000772b, 0x0000772b, 0x00 }, - { 0x0000772d, 0x0000772d, 0x00 }, - { 0x0000772f, 0x0000772f, 0x00 }, - { 0x00007731, 0x0000773e, 0x01 }, - { 0x00007740, 0x00007741, 0x01 }, - { 0x00007743, 0x00007747, 0x01 }, - { 0x0000774a, 0x00007752, 0x01 }, - { 0x00007754, 0x00007756, 0x01 }, - { 0x00007758, 0x0000775c, 0x01 }, - { 0x0000775e, 0x00007763, 0x01 }, - { 0x00007765, 0x0000776f, 0x01 }, - { 0x00007772, 0x00007772, 0x00 }, - { 0x00007777, 0x00007785, 0x01 }, - { 0x00007787, 0x00007789, 0x01 }, - { 0x0000778b, 0x0000778f, 0x01 }, - { 0x00007791, 0x00007793, 0x01 }, - { 0x00007795, 0x00007795, 0x00 }, - { 0x00007797, 0x000077a3, 0x01 }, - { 0x000077a5, 0x000077a5, 0x00 }, - { 0x000077a7, 0x000077ad, 0x01 }, - { 0x000077af, 0x000077b7, 0x01 }, - { 0x000077b9, 0x000077bf, 0x01 }, - { 0x000077c2, 0x000077c5, 0x01 }, - { 0x000077c7, 0x000077c7, 0x00 }, - { 0x000077c9, 0x000077d0, 0x01 }, - { 0x000077d3, 0x000077d5, 0x01 }, - { 0x000077d7, 0x000077dc, 0x01 }, - { 0x000077de, 0x000077de, 0x00 }, - { 0x000077e0, 0x000077e0, 0x00 }, - { 0x000077e2, 0x000077e3, 0x01 }, - { 0x000077e5, 0x000077e9, 0x01 }, - { 0x000077eb, 0x000077f4, 0x01 }, - { 0x000077f6, 0x00007803, 0x01 }, - { 0x00007805, 0x00007806, 0x01 }, - { 0x00007808, 0x00007809, 0x01 }, - { 0x0000780c, 0x00007814, 0x01 }, - { 0x00007816, 0x00007818, 0x01 }, - { 0x0000781a, 0x0000781a, 0x00 }, - { 0x0000781c, 0x00007823, 0x01 }, - { 0x00007825, 0x00007835, 0x01 }, - { 0x00007837, 0x0000783e, 0x01 }, - { 0x00007840, 0x00007840, 0x00 }, - { 0x00007842, 0x00007845, 0x01 }, - { 0x00007847, 0x0000784e, 0x01 }, - { 0x00007850, 0x00007857, 0x01 }, - { 0x0000785c, 0x0000785e, 0x01 }, - { 0x00007860, 0x00007860, 0x00 }, - { 0x00007862, 0x00007862, 0x00 }, - { 0x00007864, 0x00007866, 0x01 }, - { 0x00007868, 0x00007871, 0x01 }, - { 0x00007877, 0x00007877, 0x00 }, - { 0x00007879, 0x0000787c, 0x01 }, - { 0x0000787e, 0x00007881, 0x01 }, - { 0x00007883, 0x00007889, 0x01 }, - { 0x0000788c, 0x0000788f, 0x01 }, - { 0x00007891, 0x00007891, 0x00 }, - { 0x00007893, 0x0000789c, 0x01 }, - { 0x0000789e, 0x000078a5, 0x01 }, - { 0x000078a7, 0x000078ad, 0x01 }, - { 0x000078af, 0x000078b4, 0x01 }, - { 0x000078b6, 0x000078b6, 0x00 }, - { 0x000078b8, 0x000078bc, 0x01 }, - { 0x000078be, 0x000078be, 0x00 }, - { 0x000078c1, 0x000078c1, 0x00 }, - { 0x000078c3, 0x000078c5, 0x01 }, - { 0x000078c7, 0x000078d5, 0x01 }, - { 0x000078d7, 0x000078db, 0x01 }, - { 0x000078dd, 0x000078e3, 0x01 }, - { 0x000078e5, 0x000078e5, 0x00 }, - { 0x000078e7, 0x000078ea, 0x01 }, - { 0x000078ec, 0x000078f5, 0x01 }, - { 0x000078f7, 0x000078f7, 0x00 }, - { 0x000078f9, 0x000078ff, 0x01 }, - { 0x00007901, 0x00007902, 0x01 }, - { 0x00007904, 0x00007906, 0x01 }, - { 0x00007909, 0x00007909, 0x00 }, - { 0x0000790c, 0x0000790c, 0x00 }, - { 0x0000790e, 0x0000790e, 0x00 }, - { 0x00007910, 0x00007914, 0x01 }, - { 0x00007917, 0x00007917, 0x00 }, - { 0x00007919, 0x00007919, 0x00 }, - { 0x0000791b, 0x0000791e, 0x01 }, - { 0x00007921, 0x00007921, 0x00 }, - { 0x00007923, 0x0000792f, 0x01 }, - { 0x00007931, 0x00007936, 0x01 }, - { 0x00007938, 0x00007942, 0x01 }, - { 0x00007944, 0x0000794c, 0x01 }, - { 0x0000794f, 0x00007965, 0x01 }, - { 0x00007967, 0x0000796b, 0x01 }, - { 0x0000796d, 0x0000796d, 0x00 }, - { 0x0000796f, 0x00007974, 0x01 }, - { 0x00007977, 0x0000797a, 0x01 }, - { 0x0000797c, 0x00007988, 0x01 }, - { 0x0000798a, 0x0000798b, 0x01 }, - { 0x0000798d, 0x0000799d, 0x01 }, - { 0x0000799f, 0x000079a2, 0x01 }, - { 0x000079a4, 0x000079ae, 0x01 }, - { 0x000079b0, 0x000079b4, 0x01 }, - { 0x000079b6, 0x000079bb, 0x01 }, - { 0x000079bd, 0x000079c1, 0x01 }, - { 0x000079c3, 0x000079c6, 0x01 }, - { 0x000079c8, 0x000079c9, 0x01 }, - { 0x000079cb, 0x000079cf, 0x01 }, - { 0x000079d1, 0x000079d2, 0x01 }, - { 0x000079d4, 0x000079d6, 0x01 }, - { 0x000079d8, 0x000079d8, 0x00 }, - { 0x000079dc, 0x000079e0, 0x01 }, - { 0x000079e2, 0x000079e4, 0x01 }, - { 0x000079e6, 0x000079e7, 0x01 }, - { 0x000079e9, 0x000079f1, 0x01 }, - { 0x000079f4, 0x000079f4, 0x00 }, - { 0x000079f6, 0x000079f8, 0x01 }, - { 0x000079fa, 0x000079fb, 0x01 }, - { 0x000079fd, 0x000079fd, 0x00 }, - { 0x00007a00, 0x00007a00, 0x00 }, - { 0x00007a02, 0x00007a06, 0x01 }, - { 0x00007a08, 0x00007a08, 0x00 }, - { 0x00007a0a, 0x00007a0e, 0x01 }, - { 0x00007a10, 0x00007a15, 0x01 }, - { 0x00007a17, 0x00007a1c, 0x01 }, - { 0x00007a1e, 0x00007a20, 0x01 }, - { 0x00007a22, 0x00007a23, 0x01 }, - { 0x00007a26, 0x00007a26, 0x00 }, - { 0x00007a28, 0x00007a28, 0x00 }, - { 0x00007a2b, 0x00007a2b, 0x00 }, - { 0x00007a2d, 0x00007a31, 0x01 }, - { 0x00007a33, 0x00007a33, 0x00 }, - { 0x00007a37, 0x00007a37, 0x00 }, - { 0x00007a39, 0x00007a40, 0x01 }, - { 0x00007a43, 0x00007a4e, 0x01 }, - { 0x00007a51, 0x00007a51, 0x00 }, - { 0x00007a54, 0x00007a54, 0x00 }, - { 0x00007a56, 0x00007a58, 0x01 }, - { 0x00007a5a, 0x00007a5c, 0x01 }, - { 0x00007a5f, 0x00007a62, 0x01 }, - { 0x00007a65, 0x00007a65, 0x00 }, - { 0x00007a67, 0x00007a69, 0x01 }, - { 0x00007a6b, 0x00007a6e, 0x01 }, - { 0x00007a70, 0x00007a71, 0x01 }, - { 0x00007a74, 0x00007a7b, 0x01 }, - { 0x00007a7d, 0x00007a81, 0x01 }, - { 0x00007a83, 0x00007a8d, 0x01 }, - { 0x00007a8f, 0x00007a92, 0x01 }, - { 0x00007a94, 0x00007a99, 0x01 }, - { 0x00007a9c, 0x00007aa0, 0x01 }, - { 0x00007aa2, 0x00007aa3, 0x01 }, - { 0x00007aa5, 0x00007aa6, 0x01 }, - { 0x00007aa8, 0x00007ab8, 0x01 }, - { 0x00007aba, 0x00007abc, 0x01 }, - { 0x00007abe, 0x00007ac5, 0x01 }, - { 0x00007ac7, 0x00007acb, 0x01 }, - { 0x00007acf, 0x00007acf, 0x00 }, - { 0x00007ad1, 0x00007ad1, 0x00 }, - { 0x00007ad3, 0x00007ad3, 0x00 }, - { 0x00007ad6, 0x00007ad6, 0x00 }, - { 0x00007ad8, 0x00007ae0, 0x01 }, - { 0x00007ae2, 0x00007ae7, 0x01 }, - { 0x00007ae9, 0x00007aeb, 0x01 }, - { 0x00007aed, 0x00007aef, 0x01 }, - { 0x00007af6, 0x00007af7, 0x01 }, - { 0x00007af9, 0x00007afb, 0x01 }, - { 0x00007afd, 0x00007b01, 0x01 }, - { 0x00007b03, 0x00007b06, 0x01 }, - { 0x00007b08, 0x00007b0c, 0x01 }, - { 0x00007b0e, 0x00007b15, 0x01 }, - { 0x00007b18, 0x00007b1b, 0x01 }, - { 0x00007b1d, 0x00007b20, 0x01 }, - { 0x00007b22, 0x00007b35, 0x01 }, - { 0x00007b38, 0x00007b3c, 0x01 }, - { 0x00007b3e, 0x00007b3e, 0x00 }, - { 0x00007b40, 0x00007b40, 0x00 }, - { 0x00007b42, 0x00007b52, 0x01 }, - { 0x00007b54, 0x00007b56, 0x01 }, - { 0x00007b58, 0x00007b58, 0x00 }, - { 0x00007b5a, 0x00007b5b, 0x01 }, - { 0x00007b5d, 0x00007b5d, 0x00 }, - { 0x00007b60, 0x00007b67, 0x01 }, - { 0x00007b69, 0x00007b69, 0x00 }, - { 0x00007b6c, 0x00007b79, 0x01 }, - { 0x00007b7b, 0x00007b7b, 0x00 }, - { 0x00007b7e, 0x00007b7e, 0x00 }, - { 0x00007b80, 0x00007b80, 0x00 }, - { 0x00007b82, 0x00007b82, 0x00 }, - { 0x00007b84, 0x00007b85, 0x01 }, - { 0x00007b87, 0x00007b88, 0x01 }, - { 0x00007b8a, 0x00007b92, 0x01 }, - { 0x00007b94, 0x00007b99, 0x01 }, - { 0x00007b9b, 0x00007b9d, 0x01 }, - { 0x00007ba0, 0x00007ba4, 0x01 }, - { 0x00007ba6, 0x00007bad, 0x01 }, - { 0x00007baf, 0x00007baf, 0x00 }, - { 0x00007bb1, 0x00007bb2, 0x01 }, - { 0x00007bb4, 0x00007bb5, 0x01 }, - { 0x00007bb7, 0x00007bb9, 0x01 }, - { 0x00007bbe, 0x00007bbe, 0x00 }, - { 0x00007bc0, 0x00007bc1, 0x01 }, - { 0x00007bc4, 0x00007bc4, 0x00 }, - { 0x00007bc6, 0x00007bc7, 0x01 }, - { 0x00007bc9, 0x00007bcc, 0x01 }, - { 0x00007bce, 0x00007bd1, 0x01 }, - { 0x00007bd3, 0x00007bd5, 0x01 }, - { 0x00007bd8, 0x00007beb, 0x01 }, - { 0x00007bee, 0x00007bee, 0x00 }, - { 0x00007bf0, 0x00007bf4, 0x01 }, - { 0x00007bf7, 0x00007c03, 0x01 }, - { 0x00007c05, 0x00007c07, 0x01 }, - { 0x00007c09, 0x00007c12, 0x01 }, - { 0x00007c15, 0x00007c16, 0x01 }, - { 0x00007c19, 0x00007c19, 0x00 }, - { 0x00007c1b, 0x00007c23, 0x01 }, - { 0x00007c25, 0x00007c2d, 0x01 }, - { 0x00007c30, 0x00007c30, 0x00 }, - { 0x00007c33, 0x00007c33, 0x00 }, - { 0x00007c35, 0x00007c35, 0x00 }, - { 0x00007c37, 0x00007c39, 0x01 }, - { 0x00007c3b, 0x00007c45, 0x01 }, - { 0x00007c47, 0x00007c4a, 0x01 }, - { 0x00007c4c, 0x00007c4d, 0x01 }, - { 0x00007c50, 0x00007c51, 0x01 }, - { 0x00007c53, 0x00007c54, 0x01 }, - { 0x00007c56, 0x00007c57, 0x01 }, - { 0x00007c59, 0x00007c5d, 0x01 }, - { 0x00007c5f, 0x00007c60, 0x01 }, - { 0x00007c63, 0x00007c67, 0x01 }, - { 0x00007c69, 0x00007c70, 0x01 }, - { 0x00007c72, 0x00007c75, 0x01 }, - { 0x00007c78, 0x00007c81, 0x01 }, - { 0x00007c83, 0x00007c86, 0x01 }, - { 0x00007c88, 0x00007c8a, 0x01 }, - { 0x00007c8c, 0x00007c8e, 0x01 }, - { 0x00007c91, 0x00007c92, 0x01 }, - { 0x00007c94, 0x00007c98, 0x01 }, - { 0x00007c9c, 0x00007c9f, 0x01 }, - { 0x00007ca1, 0x00007ca8, 0x01 }, - { 0x00007caa, 0x00007caa, 0x00 }, - { 0x00007cac, 0x00007cac, 0x00 }, - { 0x00007cae, 0x00007caf, 0x01 }, - { 0x00007cb1, 0x00007cb5, 0x01 }, - { 0x00007cb8, 0x00007cbf, 0x01 }, - { 0x00007cc1, 0x00007cc2, 0x01 }, - { 0x00007cc5, 0x00007cc5, 0x00 }, - { 0x00007cc7, 0x00007cce, 0x01 }, - { 0x00007cd0, 0x00007cd7, 0x01 }, - { 0x00007cd9, 0x00007cda, 0x01 }, - { 0x00007cdc, 0x00007ce0, 0x01 }, - { 0x00007ce2, 0x00007ce2, 0x00 }, - { 0x00007ce6, 0x00007ce8, 0x01 }, - { 0x00007cea, 0x00007cea, 0x00 }, - { 0x00007cec, 0x00007cf9, 0x01 }, - { 0x00007cfb, 0x00007cfe, 0x01 }, - { 0x00007d00, 0x00007d22, 0x01 }, - { 0x00007d25, 0x00007d25, 0x00 }, - { 0x00007d27, 0x00007d29, 0x01 }, - { 0x00007d2b, 0x00007d2c, 0x01 }, - { 0x00007d2e, 0x00007d33, 0x01 }, - { 0x00007d35, 0x00007d36, 0x01 }, - { 0x00007d38, 0x00007d47, 0x01 }, - { 0x00007d4a, 0x00007d4a, 0x00 }, - { 0x00007d4d, 0x00007d56, 0x01 }, - { 0x00007d58, 0x00007d58, 0x00 }, - { 0x00007d5a, 0x00007d5f, 0x01 }, - { 0x00007d61, 0x00007d63, 0x01 }, - { 0x00007d66, 0x00007d6b, 0x01 }, - { 0x00007d6d, 0x00007d73, 0x01 }, - { 0x00007d76, 0x00007d77, 0x01 }, - { 0x00007d79, 0x00007d7d, 0x01 }, - { 0x00007d7f, 0x00007d81, 0x01 }, - { 0x00007d83, 0x00007d86, 0x01 }, - { 0x00007d88, 0x00007d89, 0x01 }, - { 0x00007d8c, 0x00007d8f, 0x01 }, - { 0x00007d91, 0x00007d94, 0x01 }, - { 0x00007d96, 0x00007d97, 0x01 }, - { 0x00007d9c, 0x00007da4, 0x01 }, - { 0x00007da6, 0x00007db5, 0x01 }, - { 0x00007db7, 0x00007dc2, 0x01 }, - { 0x00007dc4, 0x00007dc7, 0x01 }, - { 0x00007dc9, 0x00007dd4, 0x01 }, - { 0x00007dd7, 0x00007de1, 0x01 }, - { 0x00007de3, 0x00007dea, 0x01 }, - { 0x00007dec, 0x00007dec, 0x00 }, - { 0x00007dee, 0x00007df7, 0x01 }, - { 0x00007df9, 0x00007dfb, 0x01 }, - { 0x00007dfd, 0x00007dfe, 0x01 }, - { 0x00007e03, 0x00007e03, 0x00 }, - { 0x00007e07, 0x00007e17, 0x01 }, - { 0x00007e1a, 0x00007e25, 0x01 }, - { 0x00007e27, 0x00007e27, 0x00 }, - { 0x00007e29, 0x00007e2b, 0x01 }, - { 0x00007e2d, 0x00007e49, 0x01 }, - { 0x00007e4c, 0x00007e4c, 0x00 }, - { 0x00007e50, 0x00007e5a, 0x01 }, - { 0x00007e5c, 0x00007e5c, 0x00 }, - { 0x00007e5e, 0x00007e63, 0x01 }, - { 0x00007e65, 0x00007e65, 0x00 }, - { 0x00007e67, 0x00007e6b, 0x01 }, - { 0x00007e6d, 0x00007e70, 0x01 }, - { 0x00007e72, 0x00007e82, 0x01 }, - { 0x00007e85, 0x00007e88, 0x01 }, - { 0x00007e8a, 0x00007e8f, 0x01 }, - { 0x00007e91, 0x00007e9c, 0x01 }, - { 0x00007e9f, 0x00007ead, 0x01 }, - { 0x00007eaf, 0x00007eb3, 0x01 }, - { 0x00007eb5, 0x00007eba, 0x01 }, - { 0x00007ebd, 0x00007ed5, 0x01 }, - { 0x00007ed7, 0x00007ee3, 0x01 }, - { 0x00007ee5, 0x00007eeb, 0x01 }, - { 0x00007eed, 0x00007ef8, 0x01 }, - { 0x00007efa, 0x00007f09, 0x01 }, - { 0x00007f0b, 0x00007f0f, 0x01 }, - { 0x00007f11, 0x00007f1d, 0x01 }, - { 0x00007f1f, 0x00007f3a, 0x01 }, - { 0x00007f3d, 0x00007f45, 0x01 }, - { 0x00007f47, 0x00007f55, 0x01 }, - { 0x00007f57, 0x00007f58, 0x01 }, - { 0x00007f5a, 0x00007f63, 0x01 }, - { 0x00007f65, 0x00007f6e, 0x01 }, - { 0x00007f70, 0x00007f7f, 0x01 }, - { 0x00007f81, 0x00007f81, 0x00 }, - { 0x00007f83, 0x00007f83, 0x00 }, - { 0x00007f85, 0x00007f8f, 0x01 }, - { 0x00007f91, 0x00007f97, 0x01 }, - { 0x00007f9a, 0x00007fa9, 0x01 }, - { 0x00007fac, 0x00007fc3, 0x01 }, - { 0x00007fc5, 0x00007fc5, 0x00 }, - { 0x00007fc7, 0x00007fc7, 0x00 }, - { 0x00007fc9, 0x00007fd2, 0x01 }, - { 0x00007fd4, 0x00007fd5, 0x01 }, - { 0x00007fd7, 0x00007fd8, 0x01 }, - { 0x00007fdb, 0x00007fe3, 0x01 }, - { 0x00007fe5, 0x00007ff5, 0x01 }, - { 0x00007ff7, 0x00008008, 0x01 }, - { 0x0000800b, 0x00008012, 0x01 }, - { 0x00008014, 0x00008019, 0x01 }, - { 0x0000801b, 0x00008022, 0x01 }, - { 0x00008024, 0x0000802a, 0x01 }, - { 0x0000802c, 0x0000802c, 0x00 }, - { 0x0000802e, 0x00008031, 0x01 }, - { 0x00008033, 0x00008039, 0x01 }, - { 0x0000803b, 0x0000803f, 0x01 }, - { 0x00008042, 0x00008043, 0x01 }, - { 0x00008046, 0x00008048, 0x01 }, - { 0x0000804a, 0x0000804d, 0x01 }, - { 0x0000804f, 0x00008052, 0x01 }, - { 0x00008054, 0x00008054, 0x00 }, - { 0x00008056, 0x00008056, 0x00 }, - { 0x00008058, 0x00008058, 0x00 }, - { 0x0000805a, 0x0000805e, 0x01 }, - { 0x00008061, 0x00008064, 0x01 }, - { 0x00008066, 0x00008067, 0x01 }, - { 0x00008069, 0x0000806a, 0x01 }, - { 0x0000806c, 0x0000806c, 0x00 }, - { 0x0000806f, 0x00008073, 0x01 }, - { 0x00008075, 0x00008079, 0x01 }, - { 0x0000807d, 0x00008080, 0x01 }, - { 0x00008082, 0x00008087, 0x01 }, - { 0x00008089, 0x0000808c, 0x01 }, - { 0x0000808f, 0x00008090, 0x01 }, - { 0x00008092, 0x00008093, 0x01 }, - { 0x00008095, 0x00008096, 0x01 }, - { 0x00008098, 0x0000809d, 0x01 }, - { 0x0000809f, 0x000080a5, 0x01 }, - { 0x000080a7, 0x000080a7, 0x00 }, - { 0x000080a9, 0x000080ab, 0x01 }, - { 0x000080ad, 0x000080af, 0x01 }, - { 0x000080b1, 0x000080b2, 0x01 }, - { 0x000080b4, 0x000080b8, 0x01 }, - { 0x000080ba, 0x000080ba, 0x00 }, - { 0x000080bc, 0x000080ca, 0x01 }, - { 0x000080cc, 0x000080d1, 0x01 }, - { 0x000080d4, 0x000080de, 0x01 }, - { 0x000080e0, 0x000080e1, 0x01 }, - { 0x000080e3, 0x000080ed, 0x01 }, - { 0x000080ef, 0x000080f6, 0x01 }, - { 0x000080f8, 0x000080fe, 0x01 }, - { 0x00008100, 0x00008103, 0x01 }, - { 0x00008105, 0x0000810a, 0x01 }, - { 0x0000810c, 0x0000811b, 0x01 }, - { 0x0000811d, 0x0000811f, 0x01 }, - { 0x00008121, 0x00008125, 0x01 }, - { 0x00008127, 0x00008127, 0x00 }, - { 0x00008129, 0x0000812d, 0x01 }, - { 0x0000812f, 0x00008132, 0x01 }, - { 0x00008134, 0x00008134, 0x00 }, - { 0x00008136, 0x0000813a, 0x01 }, - { 0x0000813d, 0x0000813e, 0x01 }, - { 0x00008142, 0x00008144, 0x01 }, - { 0x00008146, 0x00008148, 0x01 }, - { 0x0000814a, 0x00008156, 0x01 }, - { 0x00008159, 0x0000815c, 0x01 }, - { 0x0000815e, 0x0000815e, 0x00 }, - { 0x00008160, 0x00008162, 0x01 }, - { 0x00008164, 0x00008167, 0x01 }, - { 0x00008169, 0x00008169, 0x00 }, - { 0x0000816b, 0x0000816b, 0x00 }, - { 0x0000816d, 0x00008174, 0x01 }, - { 0x00008176, 0x00008180, 0x01 }, - { 0x00008182, 0x00008184, 0x01 }, - { 0x00008186, 0x0000818d, 0x01 }, - { 0x0000818f, 0x0000818f, 0x00 }, - { 0x00008191, 0x00008191, 0x00 }, - { 0x00008193, 0x00008193, 0x00 }, - { 0x00008195, 0x00008195, 0x00 }, - { 0x00008197, 0x000081a0, 0x01 }, - { 0x000081a2, 0x000081a3, 0x01 }, - { 0x000081a5, 0x000081ac, 0x01 }, - { 0x000081ae, 0x000081ae, 0x00 }, - { 0x000081b0, 0x000081b7, 0x01 }, - { 0x000081b9, 0x000081ca, 0x01 }, - { 0x000081cc, 0x000081cd, 0x01 }, - { 0x000081cf, 0x000081d2, 0x01 }, - { 0x000081d5, 0x000081d5, 0x00 }, - { 0x000081d7, 0x000081db, 0x01 }, - { 0x000081dd, 0x000081ea, 0x01 }, - { 0x000081ec, 0x000081ef, 0x01 }, - { 0x000081f2, 0x000081f4, 0x01 }, - { 0x000081f6, 0x000081fc, 0x01 }, - { 0x000081fe, 0x00008202, 0x01 }, - { 0x00008204, 0x0000820d, 0x01 }, - { 0x00008210, 0x00008212, 0x01 }, - { 0x00008214, 0x00008216, 0x01 }, - { 0x00008218, 0x00008218, 0x00 }, - { 0x0000821a, 0x00008223, 0x01 }, - { 0x00008225, 0x00008226, 0x01 }, - { 0x00008228, 0x0000822d, 0x01 }, - { 0x0000822f, 0x00008240, 0x01 }, - { 0x00008242, 0x00008242, 0x00 }, - { 0x00008244, 0x00008245, 0x01 }, - { 0x00008247, 0x00008247, 0x00 }, - { 0x00008249, 0x00008249, 0x00 }, - { 0x0000824b, 0x0000824b, 0x00 }, - { 0x0000824e, 0x0000825c, 0x01 }, - { 0x0000825e, 0x0000825f, 0x01 }, - { 0x00008261, 0x00008266, 0x01 }, - { 0x00008268, 0x00008269, 0x01 }, - { 0x0000826b, 0x00008280, 0x01 }, - { 0x00008282, 0x00008285, 0x01 }, - { 0x00008287, 0x00008288, 0x01 }, - { 0x0000828a, 0x0000828b, 0x01 }, - { 0x0000828d, 0x00008294, 0x01 }, - { 0x00008297, 0x000082b1, 0x01 }, - { 0x000082b3, 0x000082be, 0x01 }, - { 0x000082c0, 0x000082c4, 0x01 }, - { 0x000082c7, 0x000082c8, 0x01 }, - { 0x000082ca, 0x000082d9, 0x01 }, - { 0x000082db, 0x000082dc, 0x01 }, - { 0x000082de, 0x000082e8, 0x01 }, - { 0x000082ea, 0x000082f7, 0x01 }, - { 0x000082f9, 0x00008309, 0x01 }, - { 0x0000830b, 0x0000830f, 0x01 }, - { 0x00008311, 0x00008311, 0x00 }, - { 0x00008314, 0x0000831e, 0x01 }, - { 0x00008320, 0x00008320, 0x00 }, - { 0x00008322, 0x00008322, 0x00 }, - { 0x00008324, 0x0000832d, 0x01 }, - { 0x0000832f, 0x0000832f, 0x00 }, - { 0x00008331, 0x0000833d, 0x01 }, - { 0x0000833f, 0x00008354, 0x01 }, - { 0x00008356, 0x00008357, 0x01 }, - { 0x0000835a, 0x0000835c, 0x01 }, - { 0x0000835e, 0x0000836f, 0x01 }, - { 0x00008373, 0x00008378, 0x01 }, - { 0x0000837a, 0x0000837f, 0x01 }, - { 0x00008381, 0x00008381, 0x00 }, - { 0x00008383, 0x00008383, 0x00 }, - { 0x00008385, 0x0000839e, 0x01 }, - { 0x000083a0, 0x000083a0, 0x00 }, - { 0x000083a2, 0x000083ac, 0x01 }, - { 0x000083ae, 0x000083b4, 0x01 }, - { 0x000083b6, 0x000083ba, 0x01 }, - { 0x000083bc, 0x000083cf, 0x01 }, - { 0x000083d1, 0x000083d1, 0x00 }, - { 0x000083d3, 0x000083d9, 0x01 }, - { 0x000083db, 0x000083e5, 0x01 }, - { 0x000083e7, 0x000083f6, 0x01 }, - { 0x000083f8, 0x000083ff, 0x01 }, - { 0x00008401, 0x00008401, 0x00 }, - { 0x00008403, 0x00008407, 0x01 }, - { 0x00008409, 0x00008414, 0x01 }, - { 0x00008416, 0x00008416, 0x00 }, - { 0x00008418, 0x00008418, 0x00 }, - { 0x0000841b, 0x0000841d, 0x01 }, - { 0x00008420, 0x00008421, 0x01 }, - { 0x00008423, 0x00008429, 0x01 }, - { 0x0000842b, 0x00008440, 0x01 }, - { 0x00008442, 0x0000844e, 0x01 }, - { 0x00008450, 0x00008469, 0x01 }, - { 0x0000846b, 0x0000847a, 0x01 }, - { 0x0000847d, 0x00008480, 0x01 }, - { 0x00008482, 0x00008482, 0x00 }, - { 0x00008486, 0x00008489, 0x01 }, - { 0x0000848b, 0x00008494, 0x01 }, - { 0x00008496, 0x000084a4, 0x01 }, - { 0x000084a7, 0x000084b2, 0x01 }, - { 0x000084b4, 0x000084b4, 0x00 }, - { 0x000084b6, 0x000084b6, 0x00 }, - { 0x000084b8, 0x000084c2, 0x01 }, - { 0x000084c4, 0x000084c7, 0x01 }, - { 0x000084c9, 0x000084d4, 0x01 }, - { 0x000084d6, 0x000084d7, 0x01 }, - { 0x000084da, 0x000084db, 0x01 }, - { 0x000084dd, 0x000084ec, 0x01 }, - { 0x000084ee, 0x000084f4, 0x01 }, - { 0x000084f6, 0x00008500, 0x01 }, - { 0x00008502, 0x00008503, 0x01 }, - { 0x00008505, 0x0000851a, 0x01 }, - { 0x0000851c, 0x00008521, 0x01 }, - { 0x00008523, 0x00008531, 0x01 }, - { 0x00008533, 0x00008534, 0x01 }, - { 0x00008537, 0x0000853e, 0x01 }, - { 0x00008540, 0x0000854e, 0x01 }, - { 0x00008551, 0x0000855b, 0x01 }, - { 0x0000855d, 0x0000855e, 0x01 }, - { 0x00008560, 0x0000857c, 0x01 }, - { 0x0000857e, 0x0000857e, 0x00 }, - { 0x00008580, 0x00008591, 0x01 }, - { 0x00008594, 0x00008596, 0x01 }, - { 0x00008598, 0x000085a4, 0x01 }, - { 0x000085a6, 0x000085aa, 0x01 }, - { 0x000085ae, 0x000085b1, 0x01 }, - { 0x000085b3, 0x000085ba, 0x01 }, - { 0x000085bd, 0x000085c9, 0x01 }, - { 0x000085cb, 0x000085cb, 0x00 }, - { 0x000085cd, 0x000085d3, 0x01 }, - { 0x000085d5, 0x000085d5, 0x00 }, - { 0x000085d7, 0x000085da, 0x01 }, - { 0x000085dc, 0x000085e6, 0x01 }, - { 0x000085e8, 0x000085f2, 0x01 }, - { 0x000085f4, 0x000085f4, 0x00 }, - { 0x000085f6, 0x00008602, 0x01 }, - { 0x00008604, 0x00008607, 0x01 }, - { 0x00008609, 0x0000860d, 0x01 }, - { 0x00008610, 0x00008611, 0x01 }, - { 0x00008614, 0x00008614, 0x00 }, - { 0x00008616, 0x0000861c, 0x01 }, - { 0x0000861e, 0x0000862a, 0x01 }, - { 0x0000862c, 0x0000862f, 0x01 }, - { 0x00008631, 0x00008636, 0x01 }, - { 0x00008638, 0x0000863c, 0x01 }, - { 0x0000863e, 0x00008640, 0x01 }, - { 0x00008642, 0x00008643, 0x01 }, - { 0x00008645, 0x00008648, 0x01 }, - { 0x0000864b, 0x00008656, 0x01 }, - { 0x00008659, 0x0000865c, 0x01 }, - { 0x0000865e, 0x0000865f, 0x01 }, - { 0x00008661, 0x00008665, 0x01 }, - { 0x00008667, 0x00008674, 0x01 }, - { 0x00008677, 0x00008677, 0x00 }, - { 0x00008679, 0x00008682, 0x01 }, - { 0x00008685, 0x00008687, 0x01 }, - { 0x0000868a, 0x0000868e, 0x01 }, - { 0x00008690, 0x0000869a, 0x01 }, - { 0x0000869c, 0x0000869e, 0x01 }, - { 0x000086a0, 0x000086a5, 0x01 }, - { 0x000086a7, 0x000086aa, 0x01 }, - { 0x000086ac, 0x000086ad, 0x01 }, - { 0x000086af, 0x000086cc, 0x01 }, - { 0x000086ce, 0x000086d1, 0x01 }, - { 0x000086d3, 0x000086d4, 0x01 }, - { 0x000086d6, 0x000086df, 0x01 }, - { 0x000086e2, 0x000086e4, 0x01 }, - { 0x000086e6, 0x000086e6, 0x00 }, - { 0x000086e8, 0x000086fb, 0x01 }, - { 0x000086fe, 0x000086fe, 0x00 }, - { 0x00008700, 0x0000870e, 0x01 }, - { 0x00008711, 0x00008713, 0x01 }, - { 0x00008715, 0x00008715, 0x00 }, - { 0x00008717, 0x0000871c, 0x01 }, - { 0x0000871e, 0x0000871e, 0x00 }, - { 0x00008720, 0x0000872a, 0x01 }, - { 0x0000872c, 0x0000872e, 0x01 }, - { 0x00008730, 0x00008735, 0x01 }, - { 0x00008737, 0x00008738, 0x01 }, - { 0x0000873a, 0x0000873c, 0x01 }, - { 0x0000873e, 0x00008743, 0x01 }, - { 0x00008746, 0x00008749, 0x01 }, - { 0x0000874c, 0x00008771, 0x01 }, - { 0x00008773, 0x0000877e, 0x01 }, - { 0x00008781, 0x00008789, 0x01 }, - { 0x0000878b, 0x0000878d, 0x01 }, - { 0x0000878f, 0x00008794, 0x01 }, - { 0x00008796, 0x00008798, 0x01 }, - { 0x0000879a, 0x0000879f, 0x01 }, - { 0x000087a2, 0x000087a5, 0x01 }, - { 0x000087a8, 0x000087c6, 0x01 }, - { 0x000087c8, 0x000087cc, 0x01 }, - { 0x000087ce, 0x000087ce, 0x00 }, - { 0x000087d1, 0x000087d4, 0x01 }, - { 0x000087d6, 0x000087e8, 0x01 }, - { 0x000087ea, 0x000087ef, 0x01 }, - { 0x000087f2, 0x000087f7, 0x01 }, - { 0x000087f9, 0x000087fc, 0x01 }, - { 0x000087fe, 0x00008806, 0x01 }, - { 0x00008808, 0x0000880d, 0x01 }, - { 0x0000880f, 0x00008811, 0x01 }, - { 0x00008813, 0x00008819, 0x01 }, - { 0x0000881b, 0x0000881d, 0x01 }, - { 0x0000881f, 0x00008833, 0x01 }, - { 0x00008835, 0x00008839, 0x01 }, - { 0x0000883b, 0x00008846, 0x01 }, - { 0x00008848, 0x00008848, 0x00 }, - { 0x0000884a, 0x0000884f, 0x01 }, - { 0x00008852, 0x00008857, 0x01 }, - { 0x00008859, 0x0000885b, 0x01 }, - { 0x0000885d, 0x0000885e, 0x01 }, - { 0x00008860, 0x00008865, 0x01 }, - { 0x00008867, 0x00008872, 0x01 }, - { 0x00008874, 0x00008877, 0x01 }, - { 0x00008879, 0x00008879, 0x00 }, - { 0x0000887c, 0x00008885, 0x01 }, - { 0x00008887, 0x00008889, 0x01 }, - { 0x0000888b, 0x0000888e, 0x01 }, - { 0x00008891, 0x00008893, 0x01 }, - { 0x00008895, 0x0000889c, 0x01 }, - { 0x0000889e, 0x000088a2, 0x01 }, - { 0x000088a4, 0x000088a4, 0x00 }, - { 0x000088a7, 0x000088a8, 0x01 }, - { 0x000088aa, 0x000088ae, 0x01 }, - { 0x000088b1, 0x000088b2, 0x01 }, - { 0x000088b4, 0x000088ba, 0x01 }, - { 0x000088bc, 0x000088c2, 0x01 }, - { 0x000088c5, 0x000088c7, 0x01 }, - { 0x000088c9, 0x000088d0, 0x01 }, - { 0x000088d2, 0x000088d2, 0x00 }, - { 0x000088d4, 0x000088df, 0x01 }, - { 0x000088e1, 0x000088e8, 0x01 }, - { 0x000088eb, 0x000088ec, 0x01 }, - { 0x000088ee, 0x00008902, 0x01 }, - { 0x00008905, 0x00008907, 0x01 }, - { 0x00008909, 0x0000890c, 0x01 }, - { 0x0000890e, 0x0000890e, 0x00 }, - { 0x00008910, 0x0000891b, 0x01 }, - { 0x0000891e, 0x0000891f, 0x01 }, - { 0x00008921, 0x00008927, 0x01 }, - { 0x00008929, 0x00008938, 0x01 }, - { 0x0000893b, 0x0000893e, 0x01 }, - { 0x00008941, 0x00008944, 0x01 }, - { 0x00008946, 0x00008947, 0x01 }, - { 0x00008949, 0x00008949, 0x00 }, - { 0x0000894b, 0x0000894d, 0x01 }, - { 0x0000894f, 0x00008954, 0x01 }, - { 0x00008956, 0x00008966, 0x01 }, - { 0x00008969, 0x0000896f, 0x01 }, - { 0x00008971, 0x00008974, 0x01 }, - { 0x00008976, 0x00008977, 0x01 }, - { 0x00008979, 0x0000897c, 0x01 }, - { 0x0000897e, 0x00008983, 0x01 }, - { 0x00008985, 0x0000898b, 0x01 }, - { 0x0000898f, 0x0000898f, 0x00 }, - { 0x00008991, 0x00008991, 0x00 }, - { 0x00008993, 0x00008998, 0x01 }, - { 0x0000899b, 0x0000899f, 0x01 }, - { 0x000089a1, 0x000089a7, 0x01 }, - { 0x000089a9, 0x000089aa, 0x01 }, - { 0x000089ac, 0x000089af, 0x01 }, - { 0x000089b2, 0x000089b2, 0x00 }, - { 0x000089b6, 0x000089b7, 0x01 }, - { 0x000089b9, 0x000089ba, 0x01 }, - { 0x000089bc, 0x000089c2, 0x01 }, - { 0x000089c4, 0x000089cc, 0x01 }, - { 0x000089ce, 0x000089d6, 0x01 }, - { 0x000089d9, 0x000089e9, 0x01 }, - { 0x000089eb, 0x000089ed, 0x01 }, - { 0x000089ef, 0x000089f4, 0x01 }, - { 0x000089f6, 0x000089f8, 0x01 }, - { 0x000089fa, 0x000089fc, 0x01 }, - { 0x000089fe, 0x00008a00, 0x01 }, - { 0x00008a02, 0x00008a04, 0x01 }, - { 0x00008a07, 0x00008a08, 0x01 }, - { 0x00008a0a, 0x00008a0a, 0x00 }, - { 0x00008a0c, 0x00008a0c, 0x00 }, - { 0x00008a0e, 0x00008a13, 0x01 }, - { 0x00008a15, 0x00008a18, 0x01 }, - { 0x00008a1b, 0x00008a1f, 0x01 }, - { 0x00008a22, 0x00008a23, 0x01 }, - { 0x00008a25, 0x00008a25, 0x00 }, - { 0x00008a27, 0x00008a27, 0x00 }, - { 0x00008a29, 0x00008a2d, 0x01 }, - { 0x00008a30, 0x00008a31, 0x01 }, - { 0x00008a34, 0x00008a34, 0x00 }, - { 0x00008a36, 0x00008a36, 0x00 }, - { 0x00008a38, 0x00008a41, 0x01 }, - { 0x00008a44, 0x00008a46, 0x01 }, - { 0x00008a48, 0x00008a4a, 0x01 }, - { 0x00008a4c, 0x00008a52, 0x01 }, - { 0x00008a54, 0x00008a59, 0x01 }, - { 0x00008a5b, 0x00008a5b, 0x00 }, - { 0x00008a5e, 0x00008a5e, 0x00 }, - { 0x00008a60, 0x00008a63, 0x01 }, - { 0x00008a66, 0x00008a69, 0x01 }, - { 0x00008a6b, 0x00008a6e, 0x01 }, - { 0x00008a70, 0x00008a77, 0x01 }, - { 0x00008a79, 0x00008a7c, 0x01 }, - { 0x00008a7e, 0x00008a7f, 0x01 }, - { 0x00008a81, 0x00008a87, 0x01 }, - { 0x00008a89, 0x00008a8d, 0x01 }, - { 0x00008a8f, 0x00008a96, 0x01 }, - { 0x00008a98, 0x00008a9a, 0x01 }, - { 0x00008a9c, 0x00008a9c, 0x00 }, - { 0x00008a9e, 0x00008a9e, 0x00 }, - { 0x00008aa0, 0x00008aa1, 0x01 }, - { 0x00008aa3, 0x00008aac, 0x01 }, - { 0x00008aaf, 0x00008ab0, 0x01 }, - { 0x00008ab2, 0x00008ab2, 0x00 }, - { 0x00008ab4, 0x00008ab4, 0x00 }, - { 0x00008ab6, 0x00008ab6, 0x00 }, - { 0x00008ab8, 0x00008ac0, 0x01 }, - { 0x00008ac2, 0x00008ac9, 0x01 }, - { 0x00008acb, 0x00008acb, 0x00 }, - { 0x00008acd, 0x00008acd, 0x00 }, - { 0x00008acf, 0x00008acf, 0x00 }, - { 0x00008ad1, 0x00008ae2, 0x01 }, - { 0x00008ae4, 0x00008ae4, 0x00 }, - { 0x00008ae6, 0x00008ae8, 0x01 }, - { 0x00008aea, 0x00008aeb, 0x01 }, - { 0x00008aed, 0x00008af8, 0x01 }, - { 0x00008afa, 0x00008afc, 0x01 }, - { 0x00008afe, 0x00008b02, 0x01 }, - { 0x00008b04, 0x00008b08, 0x01 }, - { 0x00008b0a, 0x00008b28, 0x01 }, - { 0x00008b2a, 0x00008b31, 0x01 }, - { 0x00008b33, 0x00008b33, 0x00 }, - { 0x00008b35, 0x00008b37, 0x01 }, - { 0x00008b39, 0x00008b43, 0x01 }, - { 0x00008b45, 0x00008b5a, 0x01 }, - { 0x00008b5c, 0x00008b60, 0x01 }, - { 0x00008b62, 0x00008b63, 0x01 }, - { 0x00008b65, 0x00008b6d, 0x01 }, - { 0x00008b6f, 0x00008b70, 0x01 }, - { 0x00008b74, 0x00008b74, 0x00 }, - { 0x00008b77, 0x00008b7b, 0x01 }, - { 0x00008b7d, 0x00008b82, 0x01 }, - { 0x00008b84, 0x00008b86, 0x01 }, - { 0x00008b88, 0x00008b88, 0x00 }, - { 0x00008b8a, 0x00008b8c, 0x01 }, - { 0x00008b8e, 0x00008b8e, 0x00 }, - { 0x00008b90, 0x00008b90, 0x00 }, - { 0x00008b92, 0x00008b96, 0x01 }, - { 0x00008b98, 0x00008b9c, 0x01 }, - { 0x00008b9e, 0x00008bab, 0x01 }, - { 0x00008bad, 0x00008bb0, 0x01 }, - { 0x00008bb2, 0x00008bba, 0x01 }, - { 0x00008bbc, 0x00008bc6, 0x01 }, - { 0x00008bc8, 0x00008bcf, 0x01 }, - { 0x00008bd1, 0x00008be9, 0x01 }, - { 0x00008beb, 0x00008c08, 0x01 }, - { 0x00008c0a, 0x00008c1d, 0x01 }, - { 0x00008c1f, 0x00008c37, 0x01 }, - { 0x00008c39, 0x00008c39, 0x00 }, - { 0x00008c3b, 0x00008c3f, 0x01 }, - { 0x00008c41, 0x00008c43, 0x01 }, - { 0x00008c45, 0x00008c51, 0x01 }, - { 0x00008c54, 0x00008c57, 0x01 }, - { 0x00008c5a, 0x00008c5a, 0x00 }, - { 0x00008c5c, 0x00008c5d, 0x01 }, - { 0x00008c5f, 0x00008c5f, 0x00 }, - { 0x00008c61, 0x00008c62, 0x01 }, - { 0x00008c64, 0x00008c66, 0x01 }, - { 0x00008c68, 0x00008c6d, 0x01 }, - { 0x00008c6f, 0x00008c73, 0x01 }, - { 0x00008c75, 0x00008c7b, 0x01 }, - { 0x00008c7d, 0x00008c7d, 0x00 }, - { 0x00008c80, 0x00008c82, 0x01 }, - { 0x00008c84, 0x00008c86, 0x01 }, - { 0x00008c89, 0x00008c8a, 0x01 }, - { 0x00008c8c, 0x00008c8d, 0x01 }, - { 0x00008c8f, 0x00008c95, 0x01 }, - { 0x00008c97, 0x00008ca5, 0x01 }, - { 0x00008ca7, 0x00008cad, 0x01 }, - { 0x00008caf, 0x00008cb0, 0x01 }, - { 0x00008cb2, 0x00008cc5, 0x01 }, - { 0x00008cc7, 0x00008cc8, 0x01 }, - { 0x00008cca, 0x00008cca, 0x00 }, - { 0x00008ccc, 0x00008ccd, 0x01 }, - { 0x00008ccf, 0x00008ccf, 0x00 }, - { 0x00008cd1, 0x00008cd7, 0x01 }, - { 0x00008cd9, 0x00008cee, 0x01 }, - { 0x00008cf0, 0x00008cf5, 0x01 }, - { 0x00008cf7, 0x00008cfe, 0x01 }, - { 0x00008d00, 0x00008d00, 0x00 }, - { 0x00008d02, 0x00008d0d, 0x01 }, - { 0x00008d0f, 0x00008d19, 0x01 }, - { 0x00008d1b, 0x00008d1f, 0x01 }, - { 0x00008d21, 0x00008d50, 0x01 }, - { 0x00008d53, 0x00008d56, 0x01 }, - { 0x00008d58, 0x00008d5e, 0x01 }, - { 0x00008d60, 0x00008d64, 0x01 }, - { 0x00008d66, 0x00008d69, 0x01 }, - { 0x00008d6b, 0x00008d70, 0x01 }, - { 0x00008d72, 0x00008d7b, 0x01 }, - { 0x00008d7d, 0x00008d7d, 0x00 }, - { 0x00008d80, 0x00008d82, 0x01 }, - { 0x00008d84, 0x00008d85, 0x01 }, - { 0x00008d89, 0x00008d96, 0x01 }, - { 0x00008d99, 0x00008d99, 0x00 }, - { 0x00008d9b, 0x00008d9c, 0x01 }, - { 0x00008d9f, 0x00008da1, 0x01 }, - { 0x00008da3, 0x00008da3, 0x00 }, - { 0x00008da5, 0x00008daf, 0x01 }, - { 0x00008db1, 0x00008dba, 0x01 }, - { 0x00008dbc, 0x00008dbc, 0x00 }, - { 0x00008dbe, 0x00008dc8, 0x01 }, - { 0x00008dcb, 0x00008dd1, 0x01 }, - { 0x00008dd3, 0x00008de4, 0x01 }, - { 0x00008de6, 0x00008dec, 0x01 }, - { 0x00008dee, 0x00008df5, 0x01 }, - { 0x00008df7, 0x00008e07, 0x01 }, - { 0x00008e09, 0x00008e0a, 0x01 }, - { 0x00008e0c, 0x00008e31, 0x01 }, - { 0x00008e33, 0x00008e36, 0x01 }, - { 0x00008e38, 0x00008e3a, 0x01 }, - { 0x00008e3c, 0x00008e42, 0x01 }, - { 0x00008e44, 0x00008e57, 0x01 }, - { 0x00008e59, 0x00008e6a, 0x01 }, - { 0x00008e6c, 0x00008e6d, 0x01 }, - { 0x00008e6f, 0x00008e78, 0x01 }, - { 0x00008e7a, 0x00008e7c, 0x01 }, - { 0x00008e7e, 0x00008e82, 0x01 }, - { 0x00008e84, 0x00008e98, 0x01 }, - { 0x00008e9a, 0x00008e9a, 0x00 }, - { 0x00008e9c, 0x00008ea1, 0x01 }, - { 0x00008ea3, 0x00008ead, 0x01 }, - { 0x00008eaf, 0x00008eb0, 0x01 }, - { 0x00008eb2, 0x00008eb2, 0x00 }, - { 0x00008eb6, 0x00008eb6, 0x00 }, - { 0x00008eba, 0x00008eba, 0x00 }, - { 0x00008ebc, 0x00008ebd, 0x01 }, - { 0x00008ec0, 0x00008ec0, 0x00 }, - { 0x00008ec2, 0x00008ec3, 0x01 }, - { 0x00008ec9, 0x00008ecf, 0x01 }, - { 0x00008ed1, 0x00008ed4, 0x01 }, - { 0x00008ed7, 0x00008ed8, 0x01 }, - { 0x00008eda, 0x00008ee2, 0x01 }, - { 0x00008ee4, 0x00008ee9, 0x01 }, - { 0x00008eeb, 0x00008eef, 0x01 }, - { 0x00008ef1, 0x00008ef2, 0x01 }, - { 0x00008ef4, 0x00008efc, 0x01 }, - { 0x00008efe, 0x00008f03, 0x01 }, - { 0x00008f05, 0x00008f0b, 0x01 }, - { 0x00008f0d, 0x00008f0e, 0x01 }, - { 0x00008f10, 0x00008f20, 0x01 }, - { 0x00008f23, 0x00008f26, 0x01 }, - { 0x00008f29, 0x00008f2a, 0x01 }, - { 0x00008f2c, 0x00008f30, 0x01 }, - { 0x00008f32, 0x00008f39, 0x01 }, - { 0x00008f3b, 0x00008f3b, 0x00 }, - { 0x00008f3e, 0x00008f4b, 0x01 }, - { 0x00008f4d, 0x00008f64, 0x01 }, - { 0x00008f66, 0x00008f69, 0x01 }, - { 0x00008f6b, 0x00008f7f, 0x01 }, - { 0x00008f81, 0x00008f8b, 0x01 }, - { 0x00008f8d, 0x00008f91, 0x01 }, - { 0x00008f93, 0x00008f9c, 0x01 }, - { 0x00008f9e, 0x00008fa0, 0x01 }, - { 0x00008fa3, 0x00008fa3, 0x00 }, - { 0x00008fa5, 0x00008fa6, 0x01 }, - { 0x00008fa8, 0x00008fa9, 0x01 }, - { 0x00008fab, 0x00008fab, 0x00 }, - { 0x00008fad, 0x00008fbf, 0x01 }, - { 0x00008fc1, 0x00008fc2, 0x01 }, - { 0x00008fc4, 0x00008fce, 0x01 }, - { 0x00008fd0, 0x00008fe6, 0x01 }, - { 0x00008fe8, 0x00008feb, 0x01 }, - { 0x00008fed, 0x00008fee, 0x01 }, - { 0x00008ff0, 0x00008ff0, 0x00 }, - { 0x00008ff3, 0x00009006, 0x01 }, - { 0x00009008, 0x0000900d, 0x01 }, - { 0x0000900f, 0x00009012, 0x01 }, - { 0x00009014, 0x00009017, 0x01 }, - { 0x00009019, 0x00009024, 0x01 }, - { 0x00009026, 0x00009026, 0x00 }, - { 0x0000902d, 0x0000902f, 0x01 }, - { 0x00009031, 0x00009038, 0x01 }, - { 0x0000903b, 0x0000903f, 0x01 }, - { 0x00009041, 0x00009042, 0x01 }, - { 0x00009044, 0x00009044, 0x00 }, - { 0x00009047, 0x00009047, 0x00 }, - { 0x00009049, 0x00009059, 0x01 }, - { 0x0000905b, 0x0000905e, 0x01 }, - { 0x00009060, 0x00009065, 0x01 }, - { 0x00009067, 0x00009069, 0x01 }, - { 0x0000906b, 0x00009070, 0x01 }, - { 0x00009072, 0x00009088, 0x01 }, - { 0x0000908a, 0x0000908b, 0x01 }, - { 0x0000908d, 0x0000908d, 0x00 }, - { 0x0000908f, 0x00009091, 0x01 }, - { 0x00009093, 0x00009095, 0x01 }, - { 0x00009097, 0x00009099, 0x01 }, - { 0x0000909b, 0x0000909b, 0x00 }, - { 0x0000909d, 0x000090a3, 0x01 }, - { 0x000090a5, 0x000090a8, 0x01 }, - { 0x000090aa, 0x000090aa, 0x00 }, - { 0x000090ac, 0x000090ac, 0x00 }, - { 0x000090ae, 0x000090b6, 0x01 }, - { 0x000090b8, 0x000090bb, 0x01 }, - { 0x000090bd, 0x000090bf, 0x01 }, - { 0x000090c1, 0x000090c1, 0x00 }, - { 0x000090c3, 0x000090c5, 0x01 }, - { 0x000090c7, 0x000090c8, 0x01 }, - { 0x000090ca, 0x000090cb, 0x01 }, - { 0x000090ce, 0x000090d1, 0x01 }, - { 0x000090d3, 0x000090dd, 0x01 }, - { 0x000090df, 0x000090ed, 0x01 }, - { 0x000090ef, 0x000090f5, 0x01 }, - { 0x000090f8, 0x00009109, 0x01 }, - { 0x0000910b, 0x0000910b, 0x00 }, - { 0x0000910d, 0x00009112, 0x01 }, - { 0x00009114, 0x00009114, 0x00 }, - { 0x00009116, 0x00009124, 0x01 }, - { 0x00009126, 0x00009136, 0x01 }, - { 0x00009138, 0x0000913b, 0x01 }, - { 0x0000913e, 0x00009141, 0x01 }, - { 0x00009143, 0x00009153, 0x01 }, - { 0x00009155, 0x0000915a, 0x01 }, - { 0x0000915c, 0x00009165, 0x01 }, - { 0x00009167, 0x0000916a, 0x01 }, - { 0x0000916c, 0x0000916c, 0x00 }, - { 0x0000916e, 0x0000917a, 0x01 }, - { 0x0000917c, 0x00009187, 0x01 }, - { 0x00009189, 0x00009193, 0x01 }, - { 0x00009196, 0x00009196, 0x00 }, - { 0x00009199, 0x000091a3, 0x01 }, - { 0x000091a5, 0x000091a5, 0x00 }, - { 0x000091a7, 0x000091b7, 0x01 }, - { 0x000091b9, 0x000091be, 0x01 }, - { 0x000091c0, 0x000091c7, 0x01 }, - { 0x000091c9, 0x000091d1, 0x01 }, - { 0x000091d3, 0x000091da, 0x01 }, - { 0x000091dc, 0x000091dd, 0x01 }, - { 0x000091df, 0x000091df, 0x00 }, - { 0x000091e2, 0x000091ee, 0x01 }, - { 0x000091f1, 0x000091f1, 0x00 }, - { 0x000091f3, 0x000091f5, 0x01 }, - { 0x000091f7, 0x000091fa, 0x01 }, - { 0x000091fd, 0x0000920a, 0x01 }, - { 0x0000920c, 0x00009217, 0x01 }, - { 0x00009219, 0x0000921a, 0x01 }, - { 0x0000921c, 0x0000921c, 0x00 }, - { 0x0000921e, 0x0000921e, 0x00 }, - { 0x00009223, 0x00009228, 0x01 }, - { 0x0000922a, 0x0000922b, 0x01 }, - { 0x0000922d, 0x0000922e, 0x01 }, - { 0x00009230, 0x0000923a, 0x01 }, - { 0x0000923c, 0x00009241, 0x01 }, - { 0x00009244, 0x00009246, 0x01 }, - { 0x00009248, 0x00009258, 0x01 }, - { 0x0000925a, 0x0000925b, 0x01 }, - { 0x0000925d, 0x00009267, 0x01 }, - { 0x0000926b, 0x00009270, 0x01 }, - { 0x00009272, 0x00009272, 0x00 }, - { 0x00009274, 0x00009274, 0x00 }, - { 0x00009276, 0x0000928f, 0x01 }, - { 0x00009291, 0x00009291, 0x00 }, - { 0x00009293, 0x0000929d, 0x01 }, - { 0x000092a0, 0x000092ac, 0x01 }, - { 0x000092ae, 0x000092ae, 0x00 }, - { 0x000092b1, 0x000092b7, 0x01 }, - { 0x000092b9, 0x000092bc, 0x01 }, - { 0x000092be, 0x000092d5, 0x01 }, - { 0x000092d7, 0x000092d9, 0x01 }, - { 0x000092db, 0x000092db, 0x00 }, - { 0x000092dd, 0x000092e1, 0x01 }, - { 0x000092e3, 0x000092f4, 0x01 }, - { 0x000092f6, 0x00009304, 0x01 }, - { 0x00009306, 0x00009309, 0x01 }, - { 0x0000930b, 0x00009310, 0x01 }, - { 0x00009312, 0x00009316, 0x01 }, - { 0x00009318, 0x0000931b, 0x01 }, - { 0x0000931d, 0x00009336, 0x01 }, - { 0x00009338, 0x00009339, 0x01 }, - { 0x0000933c, 0x0000933c, 0x00 }, - { 0x0000933e, 0x0000933e, 0x00 }, - { 0x00009340, 0x00009352, 0x01 }, - { 0x00009354, 0x0000935c, 0x01 }, - { 0x0000935e, 0x0000936e, 0x01 }, - { 0x00009370, 0x00009371, 0x01 }, - { 0x00009373, 0x0000937e, 0x01 }, - { 0x00009380, 0x0000938a, 0x01 }, - { 0x0000938c, 0x00009392, 0x01 }, - { 0x00009394, 0x000093aa, 0x01 }, - { 0x000093ac, 0x000093b5, 0x01 }, - { 0x000093b7, 0x000093b8, 0x01 }, - { 0x000093bb, 0x000093bb, 0x00 }, - { 0x000093bd, 0x000093bd, 0x00 }, - { 0x000093bf, 0x000093c0, 0x01 }, - { 0x000093c2, 0x000093c4, 0x01 }, - { 0x000093c6, 0x000093c8, 0x01 }, - { 0x000093ca, 0x000093e4, 0x01 }, - { 0x000093e6, 0x000093e8, 0x01 }, - { 0x000093ec, 0x000093ec, 0x00 }, - { 0x000093ee, 0x000093ee, 0x00 }, - { 0x000093f0, 0x000093f1, 0x01 }, - { 0x000093f3, 0x000093f3, 0x00 }, - { 0x000093f5, 0x00009401, 0x01 }, - { 0x00009403, 0x00009404, 0x01 }, - { 0x00009406, 0x00009419, 0x01 }, - { 0x0000941b, 0x0000941b, 0x00 }, - { 0x0000941d, 0x0000941d, 0x00 }, - { 0x00009420, 0x00009420, 0x00 }, - { 0x00009424, 0x0000942e, 0x01 }, - { 0x00009430, 0x00009433, 0x01 }, - { 0x00009435, 0x00009440, 0x01 }, - { 0x00009442, 0x0000944d, 0x01 }, - { 0x0000944f, 0x00009452, 0x01 }, - { 0x00009454, 0x00009455, 0x01 }, - { 0x00009457, 0x00009458, 0x01 }, - { 0x0000945b, 0x0000945b, 0x00 }, - { 0x0000945d, 0x0000945e, 0x01 }, - { 0x00009460, 0x00009460, 0x00 }, - { 0x00009462, 0x00009465, 0x01 }, - { 0x00009467, 0x00009479, 0x01 }, - { 0x0000947b, 0x00009483, 0x01 }, - { 0x00009485, 0x00009490, 0x01 }, - { 0x00009492, 0x00009495, 0x01 }, - { 0x00009497, 0x00009497, 0x00 }, - { 0x00009499, 0x000094c6, 0x01 }, - { 0x000094c8, 0x000094ce, 0x01 }, - { 0x000094d0, 0x000094d2, 0x01 }, - { 0x000094d5, 0x000094d9, 0x01 }, - { 0x000094db, 0x000094e5, 0x01 }, - { 0x000094e7, 0x000094fa, 0x01 }, - { 0x000094fc, 0x0000951b, 0x01 }, - { 0x0000951d, 0x0000951f, 0x01 }, - { 0x00009521, 0x00009526, 0x01 }, - { 0x00009528, 0x00009532, 0x01 }, - { 0x00009534, 0x0000953c, 0x01 }, - { 0x0000953e, 0x00009542, 0x01 }, - { 0x00009544, 0x00009547, 0x01 }, - { 0x00009549, 0x0000954a, 0x01 }, - { 0x0000954c, 0x00009559, 0x01 }, - { 0x0000955b, 0x0000955f, 0x01 }, - { 0x00009561, 0x0000956d, 0x01 }, - { 0x0000956f, 0x00009573, 0x01 }, - { 0x00009576, 0x00009578, 0x01 }, - { 0x0000957a, 0x0000957d, 0x01 }, - { 0x0000957f, 0x00009580, 0x01 }, - { 0x00009582, 0x00009583, 0x01 }, - { 0x00009585, 0x00009586, 0x01 }, - { 0x00009588, 0x00009589, 0x01 }, - { 0x0000958b, 0x00009594, 0x01 }, - { 0x00009596, 0x00009599, 0x01 }, - { 0x0000959b, 0x0000959c, 0x01 }, - { 0x0000959e, 0x000095ae, 0x01 }, - { 0x000095b0, 0x000095b2, 0x01 }, - { 0x000095b5, 0x000095b7, 0x01 }, - { 0x000095b9, 0x000095c0, 0x01 }, - { 0x000095c3, 0x000095c3, 0x00 }, - { 0x000095c5, 0x000095cd, 0x01 }, - { 0x000095d0, 0x000095d6, 0x01 }, - { 0x000095da, 0x000095dc, 0x01 }, - { 0x000095de, 0x000095e5, 0x01 }, - { 0x000095e8, 0x000095eb, 0x01 }, - { 0x000095ed, 0x000095fe, 0x01 }, - { 0x00009600, 0x00009606, 0x01 }, - { 0x00009608, 0x00009612, 0x01 }, - { 0x00009614, 0x00009617, 0x01 }, - { 0x00009619, 0x0000961a, 0x01 }, - { 0x0000961c, 0x00009624, 0x01 }, - { 0x00009628, 0x00009628, 0x00 }, - { 0x0000962a, 0x0000962a, 0x00 }, - { 0x0000962c, 0x00009636, 0x01 }, - { 0x00009638, 0x0000963d, 0x01 }, - { 0x0000963f, 0x00009651, 0x01 }, - { 0x00009653, 0x00009656, 0x01 }, - { 0x00009658, 0x00009658, 0x00 }, - { 0x0000965b, 0x0000965f, 0x01 }, - { 0x00009661, 0x00009664, 0x01 }, - { 0x00009667, 0x0000966d, 0x01 }, - { 0x0000966f, 0x00009678, 0x01 }, - { 0x0000967b, 0x0000967e, 0x01 }, - { 0x00009680, 0x00009681, 0x01 }, - { 0x00009683, 0x0000968b, 0x01 }, - { 0x0000968d, 0x00009699, 0x01 }, - { 0x0000969b, 0x0000969c, 0x01 }, - { 0x0000969e, 0x0000969e, 0x00 }, - { 0x000096a1, 0x000096a5, 0x01 }, - { 0x000096a7, 0x000096aa, 0x01 }, - { 0x000096ac, 0x000096ac, 0x00 }, - { 0x000096ae, 0x000096ae, 0x00 }, - { 0x000096b0, 0x000096b1, 0x01 }, - { 0x000096b3, 0x000096b4, 0x01 }, - { 0x000096b6, 0x000096b9, 0x01 }, - { 0x000096bb, 0x000096cf, 0x01 }, - { 0x000096d2, 0x000096e3, 0x01 }, - { 0x000096e5, 0x000096e5, 0x00 }, - { 0x000096e8, 0x000096ea, 0x01 }, - { 0x000096ef, 0x000096fb, 0x01 }, - { 0x000096fd, 0x00009709, 0x01 }, - { 0x0000970b, 0x0000970b, 0x00 }, - { 0x0000970d, 0x00009713, 0x01 }, - { 0x00009716, 0x00009716, 0x00 }, - { 0x00009718, 0x00009719, 0x01 }, - { 0x0000971b, 0x00009732, 0x01 }, - { 0x00009735, 0x00009736, 0x01 }, - { 0x00009738, 0x0000973a, 0x01 }, - { 0x0000973d, 0x00009744, 0x01 }, - { 0x00009746, 0x00009749, 0x01 }, - { 0x0000974b, 0x0000974b, 0x00 }, - { 0x00009751, 0x00009753, 0x01 }, - { 0x00009756, 0x00009762, 0x01 }, - { 0x00009765, 0x00009766, 0x01 }, - { 0x00009768, 0x0000976a, 0x01 }, - { 0x0000976c, 0x0000976e, 0x01 }, - { 0x00009770, 0x00009774, 0x01 }, - { 0x00009776, 0x00009778, 0x01 }, - { 0x0000977a, 0x00009785, 0x01 }, - { 0x00009787, 0x0000978b, 0x01 }, - { 0x0000978d, 0x0000978f, 0x01 }, - { 0x00009791, 0x00009792, 0x01 }, - { 0x00009794, 0x00009794, 0x00 }, - { 0x00009797, 0x000097a6, 0x01 }, - { 0x000097a8, 0x000097a8, 0x00 }, - { 0x000097aa, 0x000097af, 0x01 }, - { 0x000097b1, 0x000097b4, 0x01 }, - { 0x000097b6, 0x000097bb, 0x01 }, - { 0x000097bd, 0x000097c9, 0x01 }, - { 0x000097cb, 0x000097d0, 0x01 }, - { 0x000097d2, 0x000097d9, 0x01 }, - { 0x000097dc, 0x000097e1, 0x01 }, - { 0x000097e3, 0x000097e3, 0x00 }, - { 0x000097e5, 0x000097e7, 0x01 }, - { 0x000097e9, 0x000097ee, 0x01 }, - { 0x000097f0, 0x000097f3, 0x01 }, - { 0x000097f5, 0x000097f6, 0x01 }, - { 0x000097f8, 0x000097fb, 0x01 }, - { 0x000097fd, 0x00009808, 0x01 }, - { 0x0000980a, 0x0000980a, 0x00 }, - { 0x0000980c, 0x00009818, 0x01 }, - { 0x0000981b, 0x00009821, 0x01 }, - { 0x00009823, 0x00009824, 0x01 }, - { 0x00009826, 0x00009829, 0x01 }, - { 0x0000982b, 0x0000982b, 0x00 }, - { 0x0000982d, 0x00009830, 0x01 }, - { 0x00009832, 0x00009835, 0x01 }, - { 0x00009837, 0x00009839, 0x01 }, - { 0x0000983b, 0x0000983b, 0x00 }, - { 0x0000983d, 0x0000983d, 0x00 }, - { 0x00009841, 0x00009841, 0x00 }, - { 0x00009843, 0x00009854, 0x01 }, - { 0x00009857, 0x00009859, 0x01 }, - { 0x0000985b, 0x00009860, 0x01 }, - { 0x00009862, 0x00009867, 0x01 }, - { 0x00009869, 0x0000986c, 0x01 }, - { 0x0000986f, 0x0000988a, 0x01 }, - { 0x0000988c, 0x0000988d, 0x01 }, - { 0x0000988f, 0x00009891, 0x01 }, - { 0x00009893, 0x00009894, 0x01 }, - { 0x00009896, 0x00009898, 0x01 }, - { 0x0000989a, 0x000098a2, 0x01 }, - { 0x000098a4, 0x000098a9, 0x01 }, - { 0x000098ac, 0x000098af, 0x01 }, - { 0x000098b1, 0x000098b4, 0x01 }, - { 0x000098b6, 0x000098c4, 0x01 }, - { 0x000098c6, 0x000098cc, 0x01 }, - { 0x000098ce, 0x000098ce, 0x00 }, - { 0x000098d1, 0x000098d3, 0x01 }, - { 0x000098d5, 0x000098d5, 0x00 }, - { 0x000098d8, 0x000098dc, 0x01 }, - { 0x000098de, 0x000098e3, 0x01 }, - { 0x000098e5, 0x000098ed, 0x01 }, - { 0x000098ef, 0x000098ef, 0x00 }, - { 0x000098f1, 0x000098f2, 0x01 }, - { 0x000098f4, 0x000098f6, 0x01 }, - { 0x000098f9, 0x000098fa, 0x01 }, - { 0x000098fc, 0x000098fe, 0x01 }, - { 0x00009900, 0x00009900, 0x00 }, - { 0x00009902, 0x00009903, 0x01 }, - { 0x00009905, 0x00009905, 0x00 }, - { 0x00009907, 0x0000990a, 0x01 }, - { 0x0000990c, 0x0000990e, 0x01 }, - { 0x00009910, 0x0000991c, 0x01 }, - { 0x0000991e, 0x0000991f, 0x01 }, - { 0x00009921, 0x00009921, 0x00 }, - { 0x00009924, 0x00009925, 0x01 }, - { 0x00009927, 0x00009933, 0x01 }, - { 0x00009935, 0x00009935, 0x00 }, - { 0x00009937, 0x00009943, 0x01 }, - { 0x00009945, 0x00009945, 0x00 }, - { 0x00009947, 0x0000994e, 0x01 }, - { 0x00009950, 0x00009959, 0x01 }, - { 0x0000995b, 0x0000995f, 0x01 }, - { 0x00009961, 0x00009963, 0x01 }, - { 0x00009965, 0x00009965, 0x00 }, - { 0x00009967, 0x00009972, 0x01 }, - { 0x00009974, 0x00009977, 0x01 }, - { 0x0000997a, 0x0000997a, 0x00 }, - { 0x0000997c, 0x0000997d, 0x01 }, - { 0x0000997f, 0x00009981, 0x01 }, - { 0x00009984, 0x00009988, 0x01 }, - { 0x0000998a, 0x0000998b, 0x01 }, - { 0x0000998d, 0x0000998d, 0x00 }, - { 0x0000998f, 0x00009999, 0x01 }, - { 0x0000999b, 0x0000999e, 0x01 }, - { 0x000099a1, 0x000099a1, 0x00 }, - { 0x000099a3, 0x000099a8, 0x01 }, - { 0x000099aa, 0x000099b5, 0x01 }, - { 0x000099b8, 0x000099bd, 0x01 }, - { 0x000099c1, 0x000099c5, 0x01 }, - { 0x000099c7, 0x000099c7, 0x00 }, - { 0x000099c9, 0x000099c9, 0x00 }, - { 0x000099cb, 0x000099dd, 0x01 }, - { 0x000099df, 0x000099df, 0x00 }, - { 0x000099e1, 0x000099e7, 0x01 }, - { 0x000099e9, 0x000099ea, 0x01 }, - { 0x000099ec, 0x000099ee, 0x01 }, - { 0x000099f0, 0x000099f1, 0x01 }, - { 0x000099f4, 0x000099ff, 0x01 }, - { 0x00009a01, 0x00009a07, 0x01 }, - { 0x00009a09, 0x00009a11, 0x01 }, - { 0x00009a14, 0x00009a16, 0x01 }, - { 0x00009a19, 0x00009a27, 0x01 }, - { 0x00009a29, 0x00009a32, 0x01 }, - { 0x00009a34, 0x00009a46, 0x01 }, - { 0x00009a48, 0x00009a4a, 0x01 }, - { 0x00009a4c, 0x00009a50, 0x01 }, - { 0x00009a52, 0x00009a5c, 0x01 }, - { 0x00009a5e, 0x00009a60, 0x01 }, - { 0x00009a62, 0x00009a71, 0x01 }, - { 0x00009a73, 0x00009a82, 0x01 }, - { 0x00009a84, 0x00009a88, 0x01 }, - { 0x00009a8a, 0x00009a8c, 0x01 }, - { 0x00009a8f, 0x00009a93, 0x01 }, - { 0x00009a96, 0x00009a98, 0x01 }, - { 0x00009a9a, 0x00009aa5, 0x01 }, - { 0x00009aa7, 0x00009aa8, 0x01 }, - { 0x00009aab, 0x00009aab, 0x00 }, - { 0x00009aad, 0x00009aad, 0x00 }, - { 0x00009aaf, 0x00009ab4, 0x01 }, - { 0x00009ab6, 0x00009ac2, 0x01 }, - { 0x00009ac5, 0x00009ac7, 0x01 }, - { 0x00009aca, 0x00009acd, 0x01 }, - { 0x00009acf, 0x00009ad8, 0x01 }, - { 0x00009adc, 0x00009adc, 0x00 }, - { 0x00009adf, 0x00009ae3, 0x01 }, - { 0x00009ae6, 0x00009ae7, 0x01 }, - { 0x00009aeb, 0x00009aef, 0x01 }, - { 0x00009af1, 0x00009af4, 0x01 }, - { 0x00009af6, 0x00009af7, 0x01 }, - { 0x00009af9, 0x00009aff, 0x01 }, - { 0x00009b01, 0x00009b06, 0x01 }, - { 0x00009b08, 0x00009b1a, 0x01 }, - { 0x00009b1e, 0x00009b20, 0x01 }, - { 0x00009b22, 0x00009b25, 0x01 }, - { 0x00009b27, 0x00009b2b, 0x01 }, - { 0x00009b2d, 0x00009b2f, 0x01 }, - { 0x00009b31, 0x00009b35, 0x01 }, - { 0x00009b37, 0x00009b37, 0x00 }, - { 0x00009b39, 0x00009b3c, 0x01 }, - { 0x00009b3e, 0x00009b52, 0x01 }, - { 0x00009b54, 0x00009b56, 0x01 }, - { 0x00009b58, 0x00009b5b, 0x01 }, - { 0x00009b5f, 0x00009b61, 0x01 }, - { 0x00009b64, 0x00009b64, 0x00 }, - { 0x00009b66, 0x00009b69, 0x01 }, - { 0x00009b6c, 0x00009b6c, 0x00 }, - { 0x00009b6f, 0x00009b71, 0x01 }, - { 0x00009b74, 0x00009b77, 0x01 }, - { 0x00009b7a, 0x00009b83, 0x01 }, - { 0x00009b85, 0x00009b88, 0x01 }, - { 0x00009b8b, 0x00009b8b, 0x00 }, - { 0x00009b8d, 0x00009b93, 0x01 }, - { 0x00009b95, 0x00009b95, 0x00 }, - { 0x00009b97, 0x00009b97, 0x00 }, - { 0x00009b9a, 0x00009b9b, 0x01 }, - { 0x00009b9d, 0x00009ba2, 0x01 }, - { 0x00009ba4, 0x00009ba6, 0x01 }, - { 0x00009ba8, 0x00009ba8, 0x00 }, - { 0x00009baa, 0x00009bab, 0x01 }, - { 0x00009bad, 0x00009bb0, 0x01 }, - { 0x00009bb5, 0x00009bb6, 0x01 }, - { 0x00009bb8, 0x00009bb9, 0x01 }, - { 0x00009bbd, 0x00009bbd, 0x00 }, - { 0x00009bbf, 0x00009bc1, 0x01 }, - { 0x00009bc3, 0x00009bc4, 0x01 }, - { 0x00009bc6, 0x00009bca, 0x01 }, - { 0x00009bcf, 0x00009bcf, 0x00 }, - { 0x00009bd3, 0x00009bd7, 0x01 }, - { 0x00009bd9, 0x00009bde, 0x01 }, - { 0x00009be0, 0x00009be2, 0x01 }, - { 0x00009be4, 0x00009bed, 0x01 }, - { 0x00009bf0, 0x00009bf1, 0x01 }, - { 0x00009bf4, 0x00009bf4, 0x00 }, - { 0x00009bf7, 0x00009bf8, 0x01 }, - { 0x00009bfd, 0x00009bfd, 0x00 }, - { 0x00009bff, 0x00009bff, 0x00 }, - { 0x00009c02, 0x00009c02, 0x00 }, - { 0x00009c05, 0x00009c0e, 0x01 }, - { 0x00009c10, 0x00009c10, 0x00 }, - { 0x00009c12, 0x00009c15, 0x01 }, - { 0x00009c17, 0x00009c17, 0x00 }, - { 0x00009c1b, 0x00009c1d, 0x01 }, - { 0x00009c1f, 0x00009c21, 0x01 }, - { 0x00009c23, 0x00009c26, 0x01 }, - { 0x00009c28, 0x00009c29, 0x01 }, - { 0x00009c2b, 0x00009c2d, 0x01 }, - { 0x00009c2f, 0x00009c2f, 0x00 }, - { 0x00009c31, 0x00009c37, 0x01 }, - { 0x00009c39, 0x00009c41, 0x01 }, - { 0x00009c44, 0x00009c46, 0x01 }, - { 0x00009c48, 0x00009c50, 0x01 }, - { 0x00009c52, 0x00009c59, 0x01 }, - { 0x00009c5d, 0x00009c60, 0x01 }, - { 0x00009c62, 0x00009c63, 0x01 }, - { 0x00009c66, 0x00009c68, 0x01 }, - { 0x00009c6d, 0x00009c6e, 0x01 }, - { 0x00009c71, 0x00009c75, 0x01 }, - { 0x00009c77, 0x00009c7c, 0x01 }, - { 0x00009c7f, 0x00009c7f, 0x00 }, - { 0x00009c81, 0x00009c82, 0x01 }, - { 0x00009c85, 0x00009c88, 0x01 }, - { 0x00009c8b, 0x00009c8b, 0x00 }, - { 0x00009c8d, 0x00009c8e, 0x01 }, - { 0x00009c90, 0x00009c92, 0x01 }, - { 0x00009c94, 0x00009c95, 0x01 }, - { 0x00009c9a, 0x00009c9c, 0x01 }, - { 0x00009c9e, 0x00009ca9, 0x01 }, - { 0x00009cab, 0x00009cab, 0x00 }, - { 0x00009cad, 0x00009cae, 0x01 }, - { 0x00009cb0, 0x00009cb8, 0x01 }, - { 0x00009cba, 0x00009cbd, 0x01 }, - { 0x00009cc3, 0x00009cc7, 0x01 }, - { 0x00009cca, 0x00009cd0, 0x01 }, - { 0x00009cd3, 0x00009cd9, 0x01 }, - { 0x00009cdc, 0x00009cdf, 0x01 }, - { 0x00009ce2, 0x00009ce2, 0x00 }, - { 0x00009ce5, 0x00009ce7, 0x01 }, - { 0x00009ce9, 0x00009cea, 0x01 }, - { 0x00009ced, 0x00009ced, 0x00 }, - { 0x00009cf1, 0x00009cf7, 0x01 }, - { 0x00009cf9, 0x00009cfd, 0x01 }, - { 0x00009cff, 0x00009d00, 0x01 }, - { 0x00009d02, 0x00009d09, 0x01 }, - { 0x00009d0c, 0x00009d0c, 0x00 }, - { 0x00009d10, 0x00009d10, 0x00 }, - { 0x00009d12, 0x00009d12, 0x00 }, - { 0x00009d14, 0x00009d19, 0x01 }, - { 0x00009d1b, 0x00009d1b, 0x00 }, - { 0x00009d1d, 0x00009d23, 0x01 }, - { 0x00009d25, 0x00009d26, 0x01 }, - { 0x00009d28, 0x00009d29, 0x01 }, - { 0x00009d2d, 0x00009d31, 0x01 }, - { 0x00009d33, 0x00009d34, 0x01 }, - { 0x00009d36, 0x00009d39, 0x01 }, - { 0x00009d3b, 0x00009d3b, 0x00 }, - { 0x00009d3d, 0x00009d45, 0x01 }, - { 0x00009d49, 0x00009d4c, 0x01 }, - { 0x00009d4e, 0x00009d54, 0x01 }, - { 0x00009d56, 0x00009d61, 0x01 }, - { 0x00009d67, 0x00009d75, 0x01 }, - { 0x00009d77, 0x00009d79, 0x01 }, - { 0x00009d7b, 0x00009d8c, 0x01 }, - { 0x00009d90, 0x00009d90, 0x00 }, - { 0x00009d92, 0x00009d94, 0x01 }, - { 0x00009d96, 0x00009dad, 0x01 }, - { 0x00009daf, 0x00009daf, 0x00 }, - { 0x00009db1, 0x00009dc5, 0x01 }, - { 0x00009dc7, 0x00009ddf, 0x01 }, - { 0x00009de1, 0x00009de6, 0x01 }, - { 0x00009de8, 0x00009de9, 0x01 }, - { 0x00009deb, 0x00009df0, 0x01 }, - { 0x00009df2, 0x00009e07, 0x01 }, - { 0x00009e09, 0x00009e15, 0x01 }, - { 0x00009e17, 0x00009e23, 0x01 }, - { 0x00009e25, 0x00009e26, 0x01 }, - { 0x00009e28, 0x00009e2d, 0x01 }, - { 0x00009e2f, 0x00009e2f, 0x00 }, - { 0x00009e31, 0x00009e33, 0x01 }, - { 0x00009e35, 0x00009e3a, 0x01 }, - { 0x00009e3d, 0x00009e3f, 0x01 }, - { 0x00009e41, 0x00009e4c, 0x01 }, - { 0x00009e4e, 0x00009e4f, 0x01 }, - { 0x00009e51, 0x00009e51, 0x00 }, - { 0x00009e55, 0x00009e55, 0x00 }, - { 0x00009e57, 0x00009e58, 0x01 }, - { 0x00009e5a, 0x00009e5c, 0x01 }, - { 0x00009e5e, 0x00009e5e, 0x00 }, - { 0x00009e63, 0x00009e64, 0x01 }, - { 0x00009e66, 0x00009e6d, 0x01 }, - { 0x00009e70, 0x00009e71, 0x01 }, - { 0x00009e73, 0x00009e73, 0x00 }, - { 0x00009e75, 0x00009e75, 0x00 }, - { 0x00009e79, 0x00009e8e, 0x01 }, - { 0x00009e90, 0x00009ea2, 0x01 }, - { 0x00009ea4, 0x00009eb1, 0x01 }, - { 0x00009eb4, 0x00009eb8, 0x01 }, - { 0x00009ebb, 0x00009ec4, 0x01 }, - { 0x00009ec6, 0x00009ec9, 0x01 }, - { 0x00009ecc, 0x00009ed1, 0x01 }, - { 0x00009ed3, 0x00009ed6, 0x01 }, - { 0x00009ed8, 0x00009ed8, 0x00 }, - { 0x00009eda, 0x00009ee0, 0x01 }, - { 0x00009ee2, 0x00009ee2, 0x00 }, - { 0x00009ee4, 0x00009eeb, 0x01 }, - { 0x00009eed, 0x00009f02, 0x01 }, - { 0x00009f06, 0x00009f0b, 0x01 }, - { 0x00009f0d, 0x00009f10, 0x01 }, - { 0x00009f12, 0x00009f13, 0x01 }, - { 0x00009f15, 0x00009f1c, 0x01 }, - { 0x00009f1e, 0x00009f1e, 0x00 }, - { 0x00009f20, 0x00009f20, 0x00 }, - { 0x00009f22, 0x00009f39, 0x01 }, - { 0x00009f3b, 0x00009f3b, 0x00 }, - { 0x00009f3d, 0x00009f3e, 0x01 }, - { 0x00009f40, 0x00009f67, 0x01 }, - { 0x00009f69, 0x00009f6c, 0x01 }, - { 0x00009f6e, 0x00009f72, 0x01 }, - { 0x00009f74, 0x00009f7b, 0x01 }, - { 0x00009f7e, 0x00009f80, 0x01 }, - { 0x00009f83, 0x00009f8e, 0x01 }, - { 0x00009f90, 0x00009f92, 0x01 }, - { 0x00009f94, 0x00009f95, 0x01 }, - { 0x00009f98, 0x00009f9c, 0x01 }, - { 0x00009f9f, 0x00009fa0, 0x01 }, - { 0x00009fa2, 0x00009fa2, 0x00 }, - { 0x00009fa4, 0x00009fa5, 0x01 }, - { 0x0000e000, 0x0000e000, 0x00 }, - { 0x0000e002, 0x0000e003, 0x01 }, - { 0x0000e009, 0x0000e00a, 0x01 }, - { 0x0000e00c, 0x0000e00c, 0x00 }, - { 0x0000e00e, 0x0000e00e, 0x00 }, - { 0x0000e012, 0x0000e016, 0x01 }, - { 0x0000e018, 0x0000e018, 0x00 }, - { 0x0000e01a, 0x0000e01e, 0x01 }, - { 0x0000e020, 0x0000e020, 0x00 }, - { 0x0000e022, 0x0000e023, 0x01 }, - { 0x0000e025, 0x0000e025, 0x00 }, - { 0x0000e02d, 0x0000e02e, 0x01 }, - { 0x0000e030, 0x0000e030, 0x00 }, - { 0x0000e032, 0x0000e038, 0x01 }, - { 0x0000e03b, 0x0000e03c, 0x01 }, - { 0x0000e045, 0x0000e045, 0x00 }, - { 0x0000e04c, 0x0000e04c, 0x00 }, - { 0x0000e05a, 0x0000e05a, 0x00 }, - { 0x0000e05c, 0x0000e05c, 0x00 }, - { 0x0000e05f, 0x0000e061, 0x01 }, - { 0x0000e064, 0x0000e064, 0x00 }, - { 0x0000e066, 0x0000e066, 0x00 }, - { 0x0000e06c, 0x0000e06c, 0x00 }, - { 0x0000e071, 0x0000e071, 0x00 }, - { 0x0000e074, 0x0000e075, 0x01 }, - { 0x0000e078, 0x0000e078, 0x00 }, - { 0x0000e07d, 0x0000e07d, 0x00 }, - { 0x0000e087, 0x0000e087, 0x00 }, - { 0x0000e089, 0x0000e08a, 0x01 }, - { 0x0000e08c, 0x0000e08c, 0x00 }, - { 0x0000e093, 0x0000e094, 0x01 }, - { 0x0000e099, 0x0000e09a, 0x01 }, - { 0x0000e09c, 0x0000e09e, 0x01 }, - { 0x0000e0a6, 0x0000e0a7, 0x01 }, - { 0x0000e0a9, 0x0000e0a9, 0x00 }, - { 0x0000e0ab, 0x0000e0ab, 0x00 }, - { 0x0000e0ae, 0x0000e0ae, 0x00 }, - { 0x0000e0ba, 0x0000e0ba, 0x00 }, - { 0x0000e0bc, 0x0000e0bc, 0x00 }, - { 0x0000e0be, 0x0000e0be, 0x00 }, - { 0x0000e0c3, 0x0000e0c3, 0x00 }, - { 0x0000e0c5, 0x0000e0c5, 0x00 }, - { 0x0000e0c7, 0x0000e0c8, 0x01 }, - { 0x0000e0ca, 0x0000e0ca, 0x00 }, - { 0x0000e0d0, 0x0000e0d0, 0x00 }, - { 0x0000e0d4, 0x0000e0d5, 0x01 }, - { 0x0000e0dc, 0x0000e0dc, 0x00 }, - { 0x0000e0df, 0x0000e0df, 0x00 }, - { 0x0000e0e2, 0x0000e0e5, 0x01 }, - { 0x0000e0e7, 0x0000e0e9, 0x01 }, - { 0x0000e0eb, 0x0000e0ec, 0x01 }, - { 0x0000e0ee, 0x0000e0ee, 0x00 }, - { 0x0000e0f2, 0x0000e0f2, 0x00 }, - { 0x0000e0f8, 0x0000e0f9, 0x01 }, - { 0x0000e0fb, 0x0000e0fb, 0x00 }, - { 0x0000e0fd, 0x0000e0fd, 0x00 }, - { 0x0000e103, 0x0000e103, 0x00 }, - { 0x0000e106, 0x0000e106, 0x00 }, - { 0x0000e109, 0x0000e10b, 0x01 }, - { 0x0000e110, 0x0000e110, 0x00 }, - { 0x0000e114, 0x0000e115, 0x01 }, - { 0x0000e11c, 0x0000e11d, 0x01 }, - { 0x0000e121, 0x0000e121, 0x00 }, - { 0x0000e126, 0x0000e128, 0x01 }, - { 0x0000e130, 0x0000e131, 0x01 }, - { 0x0000e136, 0x0000e136, 0x00 }, - { 0x0000e139, 0x0000e139, 0x00 }, - { 0x0000e141, 0x0000e142, 0x01 }, - { 0x0000e145, 0x0000e145, 0x00 }, - { 0x0000e147, 0x0000e148, 0x01 }, - { 0x0000e14a, 0x0000e14a, 0x00 }, - { 0x0000e14d, 0x0000e14d, 0x00 }, - { 0x0000e150, 0x0000e150, 0x00 }, - { 0x0000e154, 0x0000e157, 0x01 }, - { 0x0000e159, 0x0000e15a, 0x01 }, - { 0x0000e15d, 0x0000e15d, 0x00 }, - { 0x0000e162, 0x0000e162, 0x00 }, - { 0x0000e168, 0x0000e16a, 0x01 }, - { 0x0000e171, 0x0000e172, 0x01 }, - { 0x0000e175, 0x0000e175, 0x00 }, - { 0x0000e178, 0x0000e179, 0x01 }, - { 0x0000e17b, 0x0000e17c, 0x01 }, - { 0x0000e17f, 0x0000e180, 0x01 }, - { 0x0000e185, 0x0000e185, 0x00 }, - { 0x0000e187, 0x0000e187, 0x00 }, - { 0x0000e189, 0x0000e189, 0x00 }, - { 0x0000e18b, 0x0000e18b, 0x00 }, - { 0x0000e18f, 0x0000e190, 0x01 }, - { 0x0000e193, 0x0000e193, 0x00 }, - { 0x0000e195, 0x0000e196, 0x01 }, - { 0x0000e19f, 0x0000e1a0, 0x01 }, - { 0x0000e1a4, 0x0000e1a4, 0x00 }, - { 0x0000e1a6, 0x0000e1a6, 0x00 }, - { 0x0000e1aa, 0x0000e1aa, 0x00 }, - { 0x0000e1ae, 0x0000e1ae, 0x00 }, - { 0x0000e1b0, 0x0000e1b1, 0x01 }, - { 0x0000e1b3, 0x0000e1b4, 0x01 }, - { 0x0000e1b6, 0x0000e1b6, 0x00 }, - { 0x0000e1b8, 0x0000e1b8, 0x00 }, - { 0x0000e1bb, 0x0000e1bf, 0x01 }, - { 0x0000e1c1, 0x0000e1c1, 0x00 }, - { 0x0000e1c4, 0x0000e1c5, 0x01 }, - { 0x0000e1c8, 0x0000e1c8, 0x00 }, - { 0x0000e1cc, 0x0000e1cd, 0x01 }, - { 0x0000e1d4, 0x0000e1d5, 0x01 }, - { 0x0000e1d7, 0x0000e1d7, 0x00 }, - { 0x0000e1da, 0x0000e1da, 0x00 }, - { 0x0000e1dd, 0x0000e1dd, 0x00 }, - { 0x0000e1e2, 0x0000e1e2, 0x00 }, - { 0x0000e1e6, 0x0000e1e6, 0x00 }, - { 0x0000e1eb, 0x0000e1eb, 0x00 }, - { 0x0000e1ef, 0x0000e1f0, 0x01 }, - { 0x0000e1f2, 0x0000e1f2, 0x00 }, - { 0x0000e1f7, 0x0000e1f7, 0x00 }, - { 0x0000e1fa, 0x0000e1fa, 0x00 }, - { 0x0000e1fe, 0x0000e1fe, 0x00 }, - { 0x0000e200, 0x0000e202, 0x01 }, - { 0x0000e205, 0x0000e205, 0x00 }, - { 0x0000e207, 0x0000e207, 0x00 }, - { 0x0000e20a, 0x0000e20c, 0x01 }, - { 0x0000e210, 0x0000e210, 0x00 }, - { 0x0000e212, 0x0000e216, 0x01 }, - { 0x0000e219, 0x0000e219, 0x00 }, - { 0x0000e21b, 0x0000e21c, 0x01 }, - { 0x0000e21f, 0x0000e221, 0x01 }, - { 0x0000e226, 0x0000e228, 0x01 }, - { 0x0000e22a, 0x0000e22a, 0x00 }, - { 0x0000e22f, 0x0000e22f, 0x00 }, - { 0x0000e231, 0x0000e231, 0x00 }, - { 0x0000e233, 0x0000e233, 0x00 }, - { 0x0000e237, 0x0000e237, 0x00 }, - { 0x0000e23b, 0x0000e23b, 0x00 }, - { 0x0000e23d, 0x0000e23e, 0x01 }, - { 0x0000e245, 0x0000e245, 0x00 }, - { 0x0000e248, 0x0000e248, 0x00 }, - { 0x0000e24a, 0x0000e24f, 0x01 }, - { 0x0000e251, 0x0000e254, 0x01 }, - { 0x0000e261, 0x0000e261, 0x00 }, - { 0x0000e268, 0x0000e268, 0x00 }, - { 0x0000e26b, 0x0000e26b, 0x00 }, - { 0x0000e26d, 0x0000e26f, 0x01 }, - { 0x0000e271, 0x0000e271, 0x00 }, - { 0x0000e27a, 0x0000e27a, 0x00 }, - { 0x0000e27d, 0x0000e27d, 0x00 }, - { 0x0000e282, 0x0000e282, 0x00 }, - { 0x0000e288, 0x0000e289, 0x01 }, - { 0x0000e28b, 0x0000e28b, 0x00 }, - { 0x0000e290, 0x0000e291, 0x01 }, - { 0x0000e294, 0x0000e296, 0x01 }, - { 0x0000e299, 0x0000e29b, 0x01 }, - { 0x0000e29f, 0x0000e29f, 0x00 }, - { 0x0000e2a1, 0x0000e2a1, 0x00 }, - { 0x0000e2a4, 0x0000e2a4, 0x00 }, - { 0x0000e2a6, 0x0000e2a6, 0x00 }, - { 0x0000e2b2, 0x0000e2b5, 0x01 }, - { 0x0000e2b7, 0x0000e2b8, 0x01 }, - { 0x0000e2ba, 0x0000e2ba, 0x00 }, - { 0x0000e2be, 0x0000e2bf, 0x01 }, - { 0x0000e2c1, 0x0000e2c1, 0x00 }, - { 0x0000e2c7, 0x0000e2c7, 0x00 }, - { 0x0000e2c9, 0x0000e2c9, 0x00 }, - { 0x0000e2d4, 0x0000e2d4, 0x00 }, - { 0x0000e2d8, 0x0000e2d9, 0x01 }, - { 0x0000e2de, 0x0000e2de, 0x00 }, - { 0x0000e2e0, 0x0000e2e2, 0x01 }, - { 0x0000e2e7, 0x0000e2e7, 0x00 }, - { 0x0000e2e9, 0x0000e2e9, 0x00 }, - { 0x0000e2eb, 0x0000e2ed, 0x01 }, - { 0x0000e2f0, 0x0000e2f1, 0x01 }, - { 0x0000e2f8, 0x0000e2f8, 0x00 }, - { 0x0000e2fc, 0x0000e2fc, 0x00 }, - { 0x0000e2ff, 0x0000e301, 0x01 }, - { 0x0000e306, 0x0000e306, 0x00 }, - { 0x0000e308, 0x0000e308, 0x00 }, - { 0x0000e30c, 0x0000e30c, 0x00 }, - { 0x0000e30f, 0x0000e30f, 0x00 }, - { 0x0000e311, 0x0000e311, 0x00 }, - { 0x0000e313, 0x0000e313, 0x00 }, - { 0x0000e315, 0x0000e315, 0x00 }, - { 0x0000e318, 0x0000e318, 0x00 }, - { 0x0000e31b, 0x0000e31c, 0x01 }, - { 0x0000e31f, 0x0000e31f, 0x00 }, - { 0x0000e325, 0x0000e325, 0x00 }, - { 0x0000e32c, 0x0000e32c, 0x00 }, - { 0x0000e330, 0x0000e331, 0x01 }, - { 0x0000e335, 0x0000e336, 0x01 }, - { 0x0000e33b, 0x0000e33b, 0x00 }, - { 0x0000e33d, 0x0000e33d, 0x00 }, - { 0x0000e342, 0x0000e342, 0x00 }, - { 0x0000e345, 0x0000e345, 0x00 }, - { 0x0000e348, 0x0000e348, 0x00 }, - { 0x0000e352, 0x0000e352, 0x00 }, - { 0x0000e354, 0x0000e354, 0x00 }, - { 0x0000e35b, 0x0000e35c, 0x01 }, - { 0x0000e360, 0x0000e360, 0x00 }, - { 0x0000e362, 0x0000e362, 0x00 }, - { 0x0000e364, 0x0000e365, 0x01 }, - { 0x0000e36f, 0x0000e36f, 0x00 }, - { 0x0000e372, 0x0000e372, 0x00 }, - { 0x0000e374, 0x0000e375, 0x01 }, - { 0x0000e377, 0x0000e377, 0x00 }, - { 0x0000e379, 0x0000e379, 0x00 }, - { 0x0000e37b, 0x0000e37b, 0x00 }, - { 0x0000e381, 0x0000e382, 0x01 }, - { 0x0000e386, 0x0000e38a, 0x01 }, - { 0x0000e38d, 0x0000e38d, 0x00 }, - { 0x0000e391, 0x0000e391, 0x00 }, - { 0x0000e393, 0x0000e394, 0x01 }, - { 0x0000e396, 0x0000e396, 0x00 }, - { 0x0000e398, 0x0000e398, 0x00 }, - { 0x0000e39a, 0x0000e39b, 0x01 }, - { 0x0000e39e, 0x0000e3a0, 0x01 }, - { 0x0000e3a2, 0x0000e3a2, 0x00 }, - { 0x0000e3a5, 0x0000e3a9, 0x01 }, - { 0x0000e3ac, 0x0000e3ac, 0x00 }, - { 0x0000e3b1, 0x0000e3b2, 0x01 }, - { 0x0000e3b4, 0x0000e3b5, 0x01 }, - { 0x0000e3b9, 0x0000e3bd, 0x01 }, - { 0x0000e3c3, 0x0000e3c3, 0x00 }, - { 0x0000e3c8, 0x0000e3c8, 0x00 }, - { 0x0000e3cc, 0x0000e3cd, 0x01 }, - { 0x0000e3cf, 0x0000e3cf, 0x00 }, - { 0x0000e3d5, 0x0000e3d5, 0x00 }, - { 0x0000e3d8, 0x0000e3da, 0x01 }, - { 0x0000e3e1, 0x0000e3e1, 0x00 }, - { 0x0000e3e3, 0x0000e3e3, 0x00 }, - { 0x0000e3e7, 0x0000e3e7, 0x00 }, - { 0x0000e3ed, 0x0000e3ee, 0x01 }, - { 0x0000e3f0, 0x0000e3f0, 0x00 }, - { 0x0000e3f2, 0x0000e3f4, 0x01 }, - { 0x0000e3f8, 0x0000e3f8, 0x00 }, - { 0x0000e3fa, 0x0000e3fa, 0x00 }, - { 0x0000e3fd, 0x0000e3fd, 0x00 }, - { 0x0000e3ff, 0x0000e3ff, 0x00 }, - { 0x0000e409, 0x0000e40b, 0x01 }, - { 0x0000e414, 0x0000e414, 0x00 }, - { 0x0000e41b, 0x0000e41b, 0x00 }, - { 0x0000e41d, 0x0000e41e, 0x01 }, - { 0x0000e423, 0x0000e423, 0x00 }, - { 0x0000e425, 0x0000e426, 0x01 }, - { 0x0000e428, 0x0000e428, 0x00 }, - { 0x0000e42c, 0x0000e42d, 0x01 }, - { 0x0000e432, 0x0000e432, 0x00 }, - { 0x0000e436, 0x0000e436, 0x00 }, - { 0x0000e43a, 0x0000e43c, 0x01 }, - { 0x0000e43e, 0x0000e43e, 0x00 }, - { 0x0000e440, 0x0000e441, 0x01 }, - { 0x0000e444, 0x0000e444, 0x00 }, - { 0x0000e448, 0x0000e448, 0x00 }, - { 0x0000e44c, 0x0000e44e, 0x01 }, - { 0x0000e450, 0x0000e451, 0x01 }, - { 0x0000e459, 0x0000e45a, 0x01 }, - { 0x0000e45d, 0x0000e45e, 0x01 }, - { 0x0000e461, 0x0000e463, 0x01 }, - { 0x0000e465, 0x0000e465, 0x00 }, - { 0x0000e467, 0x0000e46a, 0x01 }, - { 0x0000e46c, 0x0000e46c, 0x00 }, - { 0x0000e46e, 0x0000e46f, 0x01 }, - { 0x0000e471, 0x0000e472, 0x01 }, - { 0x0000e474, 0x0000e474, 0x00 }, - { 0x0000e476, 0x0000e476, 0x00 }, - { 0x0000e47e, 0x0000e47f, 0x01 }, - { 0x0000e484, 0x0000e484, 0x00 }, - { 0x0000e486, 0x0000e48a, 0x01 }, - { 0x0000e48d, 0x0000e48e, 0x01 }, - { 0x0000e491, 0x0000e492, 0x01 }, - { 0x0000e495, 0x0000e497, 0x01 }, - { 0x0000e4a1, 0x0000e4a4, 0x01 }, - { 0x0000e4ab, 0x0000e4ab, 0x00 }, - { 0x0000e4af, 0x0000e4af, 0x00 }, - { 0x0000e4b3, 0x0000e4ba, 0x01 }, - { 0x0000e4c1, 0x0000e4c1, 0x00 }, - { 0x0000e4c6, 0x0000e4c6, 0x00 }, - { 0x0000e4c9, 0x0000e4c9, 0x00 }, - { 0x0000e4cd, 0x0000e4ce, 0x01 }, - { 0x0000e4d6, 0x0000e4d6, 0x00 }, - { 0x0000e4d9, 0x0000e4d9, 0x00 }, - { 0x0000e4dc, 0x0000e4dd, 0x01 }, - { 0x0000e4e4, 0x0000e4e4, 0x00 }, - { 0x0000e4e6, 0x0000e4e8, 0x01 }, - { 0x0000e4ee, 0x0000e4ef, 0x01 }, - { 0x0000e4f6, 0x0000e4f9, 0x01 }, - { 0x0000e4ff, 0x0000e4ff, 0x00 }, - { 0x0000e501, 0x0000e502, 0x01 }, - { 0x0000e505, 0x0000e505, 0x00 }, - { 0x0000e50a, 0x0000e50a, 0x00 }, - { 0x0000e50d, 0x0000e50d, 0x00 }, - { 0x0000e50f, 0x0000e50f, 0x00 }, - { 0x0000e512, 0x0000e512, 0x00 }, - { 0x0000e514, 0x0000e514, 0x00 }, - { 0x0000e516, 0x0000e516, 0x00 }, - { 0x0000e51a, 0x0000e51a, 0x00 }, - { 0x0000e51c, 0x0000e521, 0x01 }, - { 0x0000e524, 0x0000e524, 0x00 }, - { 0x0000e528, 0x0000e52c, 0x01 }, - { 0x0000e52e, 0x0000e52f, 0x01 }, - { 0x0000e537, 0x0000e537, 0x00 }, - { 0x0000e53e, 0x0000e53e, 0x00 }, - { 0x0000e543, 0x0000e543, 0x00 }, - { 0x0000e54b, 0x0000e54b, 0x00 }, - { 0x0000e554, 0x0000e555, 0x01 }, - { 0x0000e557, 0x0000e559, 0x01 }, - { 0x0000e55b, 0x0000e55c, 0x01 }, - { 0x0000e55e, 0x0000e55f, 0x01 }, - { 0x0000e562, 0x0000e562, 0x00 }, - { 0x0000e566, 0x0000e567, 0x01 }, - { 0x0000e56d, 0x0000e56e, 0x01 }, - { 0x0000e570, 0x0000e570, 0x00 }, - { 0x0000e572, 0x0000e573, 0x01 }, - { 0x0000e575, 0x0000e577, 0x01 }, - { 0x0000e579, 0x0000e57a, 0x01 }, - { 0x0000e57c, 0x0000e57e, 0x01 }, - { 0x0000e580, 0x0000e580, 0x00 }, - { 0x0000e582, 0x0000e586, 0x01 }, - { 0x0000e588, 0x0000e588, 0x00 }, - { 0x0000e58b, 0x0000e590, 0x01 }, - { 0x0000e592, 0x0000e594, 0x01 }, - { 0x0000e59a, 0x0000e59a, 0x00 }, - { 0x0000e59d, 0x0000e5a1, 0x01 }, - { 0x0000e5a4, 0x0000e5a4, 0x00 }, - { 0x0000e5a6, 0x0000e5a8, 0x01 }, - { 0x0000e5aa, 0x0000e5aa, 0x00 }, - { 0x0000e5af, 0x0000e5af, 0x00 }, - { 0x0000e5b1, 0x0000e5b2, 0x01 }, - { 0x0000e5b5, 0x0000e5b5, 0x00 }, - { 0x0000e5b7, 0x0000e5b8, 0x01 }, - { 0x0000e5ba, 0x0000e5bb, 0x01 }, - { 0x0000e5be, 0x0000e5c0, 0x01 }, - { 0x0000e5c2, 0x0000e5c2, 0x00 }, - { 0x0000e5c8, 0x0000e5c9, 0x01 }, - { 0x0000e5d7, 0x0000e5d9, 0x01 }, - { 0x0000e5db, 0x0000e5dc, 0x01 }, - { 0x0000e5df, 0x0000e5df, 0x00 }, - { 0x0000e5e1, 0x0000e5e3, 0x01 }, - { 0x0000e5e5, 0x0000e5e6, 0x01 }, - { 0x0000e5e9, 0x0000e5e9, 0x00 }, - { 0x0000e5ee, 0x0000e5f1, 0x01 }, - { 0x0000e5f3, 0x0000e5f3, 0x00 }, - { 0x0000e5fb, 0x0000e5fc, 0x01 }, - { 0x0000e600, 0x0000e600, 0x00 }, - { 0x0000e602, 0x0000e602, 0x00 }, - { 0x0000e604, 0x0000e604, 0x00 }, - { 0x0000e60f, 0x0000e612, 0x01 }, - { 0x0000e619, 0x0000e61c, 0x01 }, - { 0x0000e621, 0x0000e621, 0x00 }, - { 0x0000e623, 0x0000e624, 0x01 }, - { 0x0000e627, 0x0000e627, 0x00 }, - { 0x0000e62b, 0x0000e62b, 0x00 }, - { 0x0000e632, 0x0000e634, 0x01 }, - { 0x0000e637, 0x0000e638, 0x01 }, - { 0x0000e63a, 0x0000e63a, 0x00 }, - { 0x0000e63c, 0x0000e63c, 0x00 }, - { 0x0000e63f, 0x0000e642, 0x01 }, - { 0x0000e645, 0x0000e646, 0x01 }, - { 0x0000e648, 0x0000e648, 0x00 }, - { 0x0000e64b, 0x0000e64b, 0x00 }, - { 0x0000e64e, 0x0000e64f, 0x01 }, - { 0x0000e652, 0x0000e655, 0x01 }, - { 0x0000e657, 0x0000e659, 0x01 }, - { 0x0000e65d, 0x0000e660, 0x01 }, - { 0x0000e662, 0x0000e663, 0x01 }, - { 0x0000e665, 0x0000e668, 0x01 }, - { 0x0000e66a, 0x0000e66a, 0x00 }, - { 0x0000e66e, 0x0000e66f, 0x01 }, - { 0x0000e671, 0x0000e671, 0x00 }, - { 0x0000e676, 0x0000e679, 0x01 }, - { 0x0000e67b, 0x0000e67d, 0x01 }, - { 0x0000e67f, 0x0000e680, 0x01 }, - { 0x0000e683, 0x0000e688, 0x01 }, - { 0x0000e68a, 0x0000e68c, 0x01 }, - { 0x0000e68e, 0x0000e690, 0x01 }, - { 0x0000e692, 0x0000e692, 0x00 }, - { 0x0000e696, 0x0000e697, 0x01 }, - { 0x0000e699, 0x0000e69a, 0x01 }, - { 0x0000e69c, 0x0000e69c, 0x00 }, - { 0x0000e69e, 0x0000e69f, 0x01 }, - { 0x0000e6a1, 0x0000e6a2, 0x01 }, - { 0x0000e6a6, 0x0000e6a6, 0x00 }, - { 0x0000e6ac, 0x0000e6ad, 0x01 }, - { 0x0000e6b2, 0x0000e6b2, 0x00 }, - { 0x0000e6b9, 0x0000e6ba, 0x01 }, - { 0x0000e6bd, 0x0000e6be, 0x01 }, - { 0x0000e6c0, 0x0000e6c1, 0x01 }, - { 0x0000e6c5, 0x0000e6c5, 0x00 }, - { 0x0000e6c7, 0x0000e6c7, 0x00 }, - { 0x0000e6ca, 0x0000e6ca, 0x00 }, - { 0x0000e6d1, 0x0000e6d2, 0x01 }, - { 0x0000e6d7, 0x0000e6d8, 0x01 }, - { 0x0000e6da, 0x0000e6db, 0x01 }, - { 0x0000e6dd, 0x0000e6e1, 0x01 }, - { 0x0000e6e4, 0x0000e6e6, 0x01 }, - { 0x0000e6ee, 0x0000e6ee, 0x00 }, - { 0x0000e6f2, 0x0000e6f3, 0x01 }, - { 0x0000e6f7, 0x0000e6f7, 0x00 }, - { 0x0000e6fa, 0x0000e6fc, 0x01 }, - { 0x0000e6ff, 0x0000e6ff, 0x00 }, - { 0x0000e701, 0x0000e702, 0x01 }, - { 0x0000e706, 0x0000e707, 0x01 }, - { 0x0000e709, 0x0000e70a, 0x01 }, - { 0x0000e70c, 0x0000e70c, 0x00 }, - { 0x0000e710, 0x0000e711, 0x01 }, - { 0x0000e713, 0x0000e713, 0x00 }, - { 0x0000e717, 0x0000e718, 0x01 }, - { 0x0000e71a, 0x0000e71b, 0x01 }, - { 0x0000e71d, 0x0000e71d, 0x00 }, - { 0x0000e724, 0x0000e725, 0x01 }, - { 0x0000e72b, 0x0000e72b, 0x00 }, - { 0x0000e72f, 0x0000e72f, 0x00 }, - { 0x0000e733, 0x0000e737, 0x01 }, - { 0x0000e73c, 0x0000e73d, 0x01 }, - { 0x0000e740, 0x0000e742, 0x01 }, - { 0x0000e744, 0x0000e744, 0x00 }, - { 0x0000e747, 0x0000e747, 0x00 }, - { 0x0000e74d, 0x0000e74f, 0x01 }, - { 0x0000e751, 0x0000e752, 0x01 }, - { 0x0000e75b, 0x0000e75d, 0x01 }, - { 0x0000e75f, 0x0000e75f, 0x00 }, - { 0x0000e761, 0x0000e762, 0x01 }, - { 0x0000e764, 0x0000e765, 0x01 }, - { 0x0000e767, 0x0000e769, 0x01 }, - { 0x0000e76c, 0x0000e76e, 0x01 }, - { 0x0000e770, 0x0000e770, 0x00 }, - { 0x0000e775, 0x0000e775, 0x00 }, - { 0x0000e777, 0x0000e778, 0x01 }, - { 0x0000e77a, 0x0000e77a, 0x00 }, - { 0x0000e77c, 0x0000e77d, 0x01 }, - { 0x0000e784, 0x0000e784, 0x00 }, - { 0x0000e786, 0x0000e786, 0x00 }, - { 0x0000e789, 0x0000e789, 0x00 }, - { 0x0000e78b, 0x0000e78b, 0x00 }, - { 0x0000e78d, 0x0000e78d, 0x00 }, - { 0x0000e790, 0x0000e790, 0x00 }, - { 0x0000e792, 0x0000e792, 0x00 }, - { 0x0000e794, 0x0000e794, 0x00 }, - { 0x0000e796, 0x0000e797, 0x01 }, - { 0x0000e799, 0x0000e799, 0x00 }, - { 0x0000e7a2, 0x0000e7a2, 0x00 }, - { 0x0000e7a4, 0x0000e7a9, 0x01 }, - { 0x0000e7b1, 0x0000e7b1, 0x00 }, - { 0x0000e7b4, 0x0000e7b4, 0x00 }, - { 0x0000e7b8, 0x0000e7b8, 0x00 }, - { 0x0000e7bc, 0x0000e7bc, 0x00 }, - { 0x0000e7c4, 0x0000e7c4, 0x00 }, - { 0x0000e7ca, 0x0000e7ca, 0x00 }, - { 0x0000e7ce, 0x0000e7ce, 0x00 }, - { 0x0000e7d1, 0x0000e7d1, 0x00 }, - { 0x0000e7d8, 0x0000e7d8, 0x00 }, - { 0x0000e7da, 0x0000e7da, 0x00 }, - { 0x0000e7dc, 0x0000e7dd, 0x01 }, - { 0x0000e7e4, 0x0000e7e4, 0x00 }, - { 0x0000e7e7, 0x0000e7e9, 0x01 }, - { 0x0000e7eb, 0x0000e7eb, 0x00 }, - { 0x0000e7ed, 0x0000e7ef, 0x01 }, - { 0x0000e7f1, 0x0000e7f3, 0x01 }, - { 0x0000e7f8, 0x0000e7f8, 0x00 }, - { 0x0000e7fb, 0x0000e7fc, 0x01 }, - { 0x0000e7ff, 0x0000e802, 0x01 }, - { 0x0000e808, 0x0000e808, 0x00 }, - { 0x0000e80c, 0x0000e80c, 0x00 }, - { 0x0000e80e, 0x0000e80f, 0x01 }, - { 0x0000e811, 0x0000e811, 0x00 }, - { 0x0000e813, 0x0000e813, 0x00 }, - { 0x0000e816, 0x0000e818, 0x01 }, - { 0x0000e81a, 0x0000e81a, 0x00 }, - { 0x0000e821, 0x0000e821, 0x00 }, - { 0x0000e827, 0x0000e828, 0x01 }, - { 0x0000e82d, 0x0000e82d, 0x00 }, - { 0x0000e82f, 0x0000e82f, 0x00 }, - { 0x0000e835, 0x0000e835, 0x00 }, - { 0x0000e837, 0x0000e838, 0x01 }, - { 0x0000e83a, 0x0000e83b, 0x01 }, - { 0x0000e841, 0x0000e842, 0x01 }, - { 0x0000e84b, 0x0000e84b, 0x00 }, - { 0x0000e84d, 0x0000e84e, 0x01 }, - { 0x0000e851, 0x0000e851, 0x00 }, - { 0x0000e855, 0x0000e858, 0x01 }, - { 0x0000e85b, 0x0000e85d, 0x01 }, - { 0x0000e860, 0x0000e862, 0x01 }, - { 0x0000e865, 0x0000e867, 0x01 }, - { 0x0000e869, 0x0000e86a, 0x01 }, - { 0x0000e86c, 0x0000e86c, 0x00 }, - { 0x0000e871, 0x0000e871, 0x00 }, - { 0x0000e878, 0x0000e878, 0x00 }, - { 0x0000e87d, 0x0000e87f, 0x01 }, - { 0x0000e887, 0x0000e887, 0x00 }, - { 0x0000e88f, 0x0000e88f, 0x00 }, - { 0x0000e891, 0x0000e892, 0x01 }, - { 0x0000e894, 0x0000e895, 0x01 }, - { 0x0000e89a, 0x0000e89a, 0x00 }, - { 0x0000e89d, 0x0000e89d, 0x00 }, - { 0x0000e8a0, 0x0000e8a1, 0x01 }, - { 0x0000e8a3, 0x0000e8a7, 0x01 }, - { 0x0000e8a9, 0x0000e8aa, 0x01 }, - { 0x0000e8ac, 0x0000e8b0, 0x01 }, - { 0x0000e8b5, 0x0000e8b6, 0x01 }, - { 0x0000e8b8, 0x0000e8b8, 0x00 }, - { 0x0000e8bd, 0x0000e8c3, 0x01 }, - { 0x0000e8c5, 0x0000e8c5, 0x00 }, - { 0x0000e8c7, 0x0000e8c7, 0x00 }, - { 0x0000e8cb, 0x0000e8cb, 0x00 }, - { 0x0000e8cd, 0x0000e8ce, 0x01 }, - { 0x0000e8d0, 0x0000e8d1, 0x01 }, - { 0x0000e8d3, 0x0000e8d3, 0x00 }, - { 0x0000e8d5, 0x0000e8d6, 0x01 }, - { 0x0000e8d8, 0x0000e8da, 0x01 }, - { 0x0000e8dd, 0x0000e8dd, 0x00 }, - { 0x0000e8df, 0x0000e8e1, 0x01 }, - { 0x0000e8e5, 0x0000e8e6, 0x01 }, - { 0x0000e8e8, 0x0000e8ea, 0x01 }, - { 0x0000e8ed, 0x0000e8ed, 0x00 }, - { 0x0000e8f1, 0x0000e8f2, 0x01 }, - { 0x0000e8f5, 0x0000e8f6, 0x01 }, - { 0x0000e8fb, 0x0000e8fb, 0x00 }, - { 0x0000e8fe, 0x0000e8fe, 0x00 }, - { 0x0000e900, 0x0000e900, 0x00 }, - { 0x0000e903, 0x0000e903, 0x00 }, - { 0x0000e907, 0x0000e908, 0x01 }, - { 0x0000e90c, 0x0000e90c, 0x00 }, - { 0x0000e917, 0x0000e918, 0x01 }, - { 0x0000e91c, 0x0000e91c, 0x00 }, - { 0x0000e91e, 0x0000e922, 0x01 }, - { 0x0000e925, 0x0000e92c, 0x01 }, - { 0x0000e92e, 0x0000e92f, 0x01 }, - { 0x0000e933, 0x0000e936, 0x01 }, - { 0x0000e938, 0x0000e938, 0x00 }, - { 0x0000e93a, 0x0000e93a, 0x00 }, - { 0x0000e93c, 0x0000e93e, 0x01 }, - { 0x0000e941, 0x0000e941, 0x00 }, - { 0x0000e944, 0x0000e945, 0x01 }, - { 0x0000e948, 0x0000e948, 0x00 }, - { 0x0000e94d, 0x0000e94d, 0x00 }, - { 0x0000e950, 0x0000e950, 0x00 }, - { 0x0000e952, 0x0000e955, 0x01 }, - { 0x0000e957, 0x0000e958, 0x01 }, - { 0x0000e95a, 0x0000e95a, 0x00 }, - { 0x0000e95c, 0x0000e95e, 0x01 }, - { 0x0000e960, 0x0000e961, 0x01 }, - { 0x0000e964, 0x0000e964, 0x00 }, - { 0x0000e967, 0x0000e968, 0x01 }, - { 0x0000e96e, 0x0000e96f, 0x01 }, - { 0x0000e973, 0x0000e975, 0x01 }, - { 0x0000e977, 0x0000e978, 0x01 }, - { 0x0000e97a, 0x0000e97b, 0x01 }, - { 0x0000e97d, 0x0000e97d, 0x00 }, - { 0x0000e981, 0x0000e982, 0x01 }, - { 0x0000e987, 0x0000e987, 0x00 }, - { 0x0000e98a, 0x0000e98a, 0x00 }, - { 0x0000e98e, 0x0000e98e, 0x00 }, - { 0x0000e991, 0x0000e991, 0x00 }, - { 0x0000e9b0, 0x0000e9b0, 0x00 }, - { 0x0000e9bd, 0x0000e9bd, 0x00 }, - { 0x0000e9cb, 0x0000e9cb, 0x00 }, - { 0x0000e9ef, 0x0000e9ef, 0x00 }, - { 0x0000ea43, 0x0000ea43, 0x00 }, - { 0x0000ea82, 0x0000ea82, 0x00 }, - { 0x0000eaa9, 0x0000eaa9, 0x00 }, - { 0x0000eabf, 0x0000eac1, 0x01 }, - { 0x0000eac5, 0x0000eac5, 0x00 }, - { 0x0000eac9, 0x0000eacc, 0x01 }, - { 0x0000eacf, 0x0000ead1, 0x01 }, - { 0x0000ead3, 0x0000ead4, 0x01 }, - { 0x0000ead6, 0x0000eada, 0x01 }, - { 0x0000eadc, 0x0000eadc, 0x00 }, - { 0x0000eade, 0x0000eae3, 0x01 }, - { 0x0000eae7, 0x0000eaec, 0x01 }, - { 0x0000eaee, 0x0000eaee, 0x00 }, - { 0x0000eaf0, 0x0000eaf2, 0x01 }, - { 0x0000eaf4, 0x0000eaf6, 0x01 }, - { 0x0000eaf8, 0x0000eafb, 0x01 }, - { 0x0000eafe, 0x0000eb00, 0x01 }, - { 0x0000eb02, 0x0000eb05, 0x01 }, - { 0x0000eb08, 0x0000eb0f, 0x01 }, - { 0x0000eb11, 0x0000eb12, 0x01 }, - { 0x0000eb15, 0x0000eb15, 0x00 }, - { 0x0000eb18, 0x0000eb1d, 0x01 }, - { 0x0000eb1f, 0x0000eb21, 0x01 }, - { 0x0000eb23, 0x0000eb23, 0x00 }, - { 0x0000eb25, 0x0000eb25, 0x00 }, - { 0x0000eb27, 0x0000eb27, 0x00 }, - { 0x0000eb2a, 0x0000eb2a, 0x00 }, - { 0x0000eb2c, 0x0000eb39, 0x01 }, - { 0x0000eb3d, 0x0000eb3f, 0x01 }, - { 0x0000eb41, 0x0000eb41, 0x00 }, - { 0x0000eb43, 0x0000eb44, 0x01 }, - { 0x0000eb46, 0x0000eb46, 0x00 }, - { 0x0000eb4a, 0x0000eb50, 0x01 }, - { 0x0000eb53, 0x0000eb5b, 0x01 }, - { 0x0000eb5d, 0x0000eb5d, 0x00 }, - { 0x0000eb5f, 0x0000eb5f, 0x00 }, - { 0x0000eb61, 0x0000eb63, 0x01 }, - { 0x0000eb65, 0x0000eb65, 0x00 }, - { 0x0000eb67, 0x0000eb69, 0x01 }, - { 0x0000eb6b, 0x0000eb6b, 0x00 }, - { 0x0000eb6d, 0x0000eb6d, 0x00 }, - { 0x0000eb6f, 0x0000eb71, 0x01 }, - { 0x0000eb73, 0x0000eb74, 0x01 }, - { 0x0000eb76, 0x0000eb78, 0x01 }, - { 0x0000eb7a, 0x0000eb7a, 0x00 }, - { 0x0000eb7e, 0x0000eb81, 0x01 }, - { 0x0000eb83, 0x0000eb85, 0x01 }, - { 0x0000eb88, 0x0000eb8a, 0x01 }, - { 0x0000eb8c, 0x0000eb90, 0x01 }, - { 0x0000eb93, 0x0000eb93, 0x00 }, - { 0x0000eb95, 0x0000eb95, 0x00 }, - { 0x0000eb97, 0x0000eb9b, 0x01 }, - { 0x0000eb9f, 0x0000eba0, 0x01 }, - { 0x0000eba2, 0x0000eba3, 0x01 }, - { 0x0000eba5, 0x0000eba6, 0x01 }, - { 0x0000eba8, 0x0000eba8, 0x00 }, - { 0x0000ebaa, 0x0000ebab, 0x01 }, - { 0x0000ebad, 0x0000ebb0, 0x01 }, - { 0x0000ebb2, 0x0000ebb4, 0x01 }, - { 0x0000ebb6, 0x0000ebb6, 0x00 }, - { 0x0000ebb9, 0x0000ebb9, 0x00 }, - { 0x0000ebbc, 0x0000ebbd, 0x01 }, - { 0x0000ebbf, 0x0000ebbf, 0x00 }, - { 0x0000ebc2, 0x0000ebc2, 0x00 }, - { 0x0000ebc5, 0x0000ebc8, 0x01 }, - { 0x0000ebca, 0x0000ebca, 0x00 }, - { 0x0000ebcc, 0x0000ebce, 0x01 }, - { 0x0000ebd0, 0x0000ebd0, 0x00 }, - { 0x0000ebd3, 0x0000ebd3, 0x00 }, - { 0x0000ebd5, 0x0000ebd5, 0x00 }, - { 0x0000ebd7, 0x0000ebd8, 0x01 }, - { 0x0000ebda, 0x0000ebdb, 0x01 }, - { 0x0000ebdd, 0x0000ebdd, 0x00 }, - { 0x0000ebdf, 0x0000ebdf, 0x00 }, - { 0x0000ebe1, 0x0000ebe1, 0x00 }, - { 0x0000ebe4, 0x0000ebe4, 0x00 }, - { 0x0000ebe7, 0x0000ebe9, 0x01 }, - { 0x0000ebeb, 0x0000ebec, 0x01 }, - { 0x0000ebee, 0x0000ebef, 0x01 }, - { 0x0000ebf1, 0x0000ebf2, 0x01 }, - { 0x0000ebf5, 0x0000ebf6, 0x01 }, - { 0x0000ebf9, 0x0000ebfb, 0x01 }, - { 0x0000ebfd, 0x0000ebfe, 0x01 }, - { 0x0000ec05, 0x0000ec06, 0x01 }, - { 0x0000ec08, 0x0000ec09, 0x01 }, - { 0x0000ec0c, 0x0000ec0c, 0x00 }, - { 0x0000ec0e, 0x0000ec10, 0x01 }, - { 0x0000ec13, 0x0000ec14, 0x01 }, - { 0x0000ec17, 0x0000ec1d, 0x01 }, - { 0x0000ec20, 0x0000ec20, 0x00 }, - { 0x0000ec22, 0x0000ec22, 0x00 }, - { 0x0000ec24, 0x0000ec24, 0x00 }, - { 0x0000ec26, 0x0000ec26, 0x00 }, - { 0x0000ec2a, 0x0000ec2f, 0x01 }, - { 0x0000ec31, 0x0000ec32, 0x01 }, - { 0x0000ec35, 0x0000ec35, 0x00 }, - { 0x0000ec37, 0x0000ec37, 0x00 }, - { 0x0000ec3b, 0x0000ec3c, 0x01 }, - { 0x0000ec3f, 0x0000ec49, 0x01 }, - { 0x0000ec4b, 0x0000ec4c, 0x01 }, - { 0x0000ec4f, 0x0000ec4f, 0x00 }, - { 0x0000ec52, 0x0000ec52, 0x00 }, - { 0x0000ec54, 0x0000ec54, 0x00 }, - { 0x0000ec56, 0x0000ec58, 0x01 }, - { 0x0000ec5a, 0x0000ec5a, 0x00 }, - { 0x0000ec5c, 0x0000ec5d, 0x01 }, - { 0x0000ec5f, 0x0000ec60, 0x01 }, - { 0x0000ec62, 0x0000ec63, 0x01 }, - { 0x0000ec67, 0x0000ec73, 0x01 }, - { 0x0000ec75, 0x0000ec76, 0x01 }, - { 0x0000ec79, 0x0000ec79, 0x00 }, - { 0x0000ec7b, 0x0000ec7b, 0x00 }, - { 0x0000ec7e, 0x0000ec7e, 0x00 }, - { 0x0000ec80, 0x0000ec80, 0x00 }, - { 0x0000ec84, 0x0000ec84, 0x00 }, - { 0x0000ec86, 0x0000ec86, 0x00 }, - { 0x0000ec8d, 0x0000ec8e, 0x01 }, - { 0x0000ec91, 0x0000ec96, 0x01 }, - { 0x0000ec98, 0x0000ec9b, 0x01 }, - { 0x0000ec9d, 0x0000ec9e, 0x01 }, - { 0x0000eca0, 0x0000eca0, 0x00 }, - { 0x0000eca3, 0x0000eca4, 0x01 }, - { 0x0000eca7, 0x0000eca8, 0x01 }, - { 0x0000ecab, 0x0000ecab, 0x00 }, - { 0x0000ecad, 0x0000ecad, 0x00 }, - { 0x0000ecaf, 0x0000ecaf, 0x00 }, - { 0x0000ecb4, 0x0000ecb4, 0x00 }, - { 0x0000ecb6, 0x0000ecb6, 0x00 }, - { 0x0000ecb9, 0x0000ecbb, 0x01 }, - { 0x0000eccf, 0x0000eccf, 0x00 }, - { 0x0000ecd4, 0x0000ecd4, 0x00 }, - { 0x0000ecdb, 0x0000ecdc, 0x01 }, - { 0x0000ecde, 0x0000ece1, 0x01 }, - { 0x0000ece5, 0x0000ece5, 0x00 }, - { 0x0000ecf0, 0x0000ecf0, 0x00 }, - { 0x0000ecf2, 0x0000ecf2, 0x00 }, - { 0x0000ecf5, 0x0000ecf5, 0x00 }, - { 0x0000ecfc, 0x0000ecfc, 0x00 }, - { 0x0000ed04, 0x0000ed04, 0x00 }, - { 0x0000ed07, 0x0000ed07, 0x00 }, - { 0x0000ed0a, 0x0000ed0a, 0x00 }, - { 0x0000ed0c, 0x0000ed11, 0x01 }, - { 0x0000ed13, 0x0000ed13, 0x00 }, - { 0x0000ed15, 0x0000ed18, 0x01 }, - { 0x0000ed1a, 0x0000ed1a, 0x00 }, - { 0x0000ed1c, 0x0000ed1e, 0x01 }, - { 0x0000ed22, 0x0000ed22, 0x00 }, - { 0x0000ed24, 0x0000ed27, 0x01 }, - { 0x0000ed29, 0x0000ed2a, 0x01 }, - { 0x0000ed2c, 0x0000ed2d, 0x01 }, - { 0x0000ed3b, 0x0000ed3b, 0x00 }, - { 0x0000ed3d, 0x0000ed3d, 0x00 }, - { 0x0000ed41, 0x0000ed42, 0x01 }, - { 0x0000ed45, 0x0000ed45, 0x00 }, - { 0x0000ed47, 0x0000ed47, 0x00 }, - { 0x0000ed4a, 0x0000ed4b, 0x01 }, - { 0x0000ed4d, 0x0000ed4f, 0x01 }, - { 0x0000ed51, 0x0000ed54, 0x01 }, - { 0x0000ed57, 0x0000ed58, 0x01 }, - { 0x0000ed5f, 0x0000ed5f, 0x00 }, - { 0x0000ed62, 0x0000ed62, 0x00 }, - { 0x0000ed6b, 0x0000ed6b, 0x00 }, - { 0x0000ed71, 0x0000ed72, 0x01 }, - { 0x0000ed75, 0x0000ed75, 0x00 }, - { 0x0000ed77, 0x0000ed78, 0x01 }, - { 0x0000ed7a, 0x0000ed7a, 0x00 }, - { 0x0000ed81, 0x0000ed81, 0x00 }, - { 0x0000ed84, 0x0000ed86, 0x01 }, - { 0x0000ed88, 0x0000ed8b, 0x01 }, - { 0x0000ed8e, 0x0000ed8e, 0x00 }, - { 0x0000ed91, 0x0000ed91, 0x00 }, - { 0x0000eda6, 0x0000eda6, 0x00 }, - { 0x0000edc6, 0x0000edc6, 0x00 }, - { 0x0000edcf, 0x0000edcf, 0x00 }, - { 0x0000edd1, 0x0000edd1, 0x00 }, - { 0x0000edd7, 0x0000edd7, 0x00 }, - { 0x0000edda, 0x0000eddb, 0x01 }, - { 0x0000eddd, 0x0000eddd, 0x00 }, - { 0x0000ede1, 0x0000ede1, 0x00 }, - { 0x0000eded, 0x0000eded, 0x00 }, - { 0x0000ee08, 0x0000ee08, 0x00 }, - { 0x0000ee11, 0x0000ee11, 0x00 }, - { 0x0000ee15, 0x0000ee15, 0x00 }, - { 0x0000ee1b, 0x0000ee1b, 0x00 }, - { 0x0000ee20, 0x0000ee20, 0x00 }, - { 0x0000ee22, 0x0000ee22, 0x00 }, - { 0x0000ee2a, 0x0000ee2a, 0x00 }, - { 0x0000ee30, 0x0000ee31, 0x01 }, - { 0x0000ee34, 0x0000ee34, 0x00 }, - { 0x0000ee48, 0x0000ee48, 0x00 }, - { 0x0000ee56, 0x0000ee56, 0x00 }, - { 0x0000ee5b, 0x0000ee5b, 0x00 }, - { 0x0000ee5d, 0x0000ee5d, 0x00 }, - { 0x0000ee60, 0x0000ee60, 0x00 }, - { 0x0000ee64, 0x0000ee64, 0x00 }, - { 0x0000ee6a, 0x0000ee6a, 0x00 }, - { 0x0000ee76, 0x0000ee76, 0x00 }, - { 0x0000ee7c, 0x0000ee7c, 0x00 }, - { 0x0000ee7e, 0x0000ee7e, 0x00 }, - { 0x0000ee91, 0x0000ee91, 0x00 }, - { 0x0000ee9c, 0x0000ee9c, 0x00 }, - { 0x0000eea1, 0x0000eeaa, 0x01 }, - { 0x0000eeac, 0x0000eeb1, 0x01 }, - { 0x0000eeb4, 0x0000eeb4, 0x00 }, - { 0x0000eeb7, 0x0000eeb7, 0x00 }, - { 0x0000f303, 0x0000f318, 0x01 }, - { 0x0000f325, 0x0000f325, 0x00 }, - { 0x0000f327, 0x0000f327, 0x00 }, - { 0x0000f344, 0x0000f344, 0x00 }, - { 0x0000f346, 0x0000f346, 0x00 }, - { 0x0000f34a, 0x0000f34b, 0x01 }, - { 0x0000f3a0, 0x0000f3a1, 0x01 }, - { 0x0000f3ac, 0x0000f3ac, 0x00 }, - { 0x0000f3f0, 0x0000f3f0, 0x00 }, - { 0x0000f3f9, 0x0000f3fa, 0x01 }, - { 0x0000f3fc, 0x0000f3fc, 0x00 }, - { 0x0000f408, 0x0000f40b, 0x01 }, - { 0x0000f43d, 0x0000f43d, 0x00 }, - { 0x0000f440, 0x0000f442, 0x01 }, - { 0x0000f444, 0x0000f444, 0x00 }, - { 0x0000f446, 0x0000f446, 0x00 }, - { 0x0000f448, 0x0000f449, 0x01 }, - { 0x0000f44b, 0x0000f44b, 0x00 }, - { 0x0000f44d, 0x0000f44d, 0x00 }, - { 0x0000f450, 0x0000f452, 0x01 }, - { 0x0000f454, 0x0000f457, 0x01 }, - { 0x0000f45a, 0x0000f45f, 0x01 }, - { 0x0000f461, 0x0000f463, 0x01 }, - { 0x0000f465, 0x0000f466, 0x01 }, - { 0x0000f469, 0x0000f469, 0x00 }, - { 0x0000f46c, 0x0000f46f, 0x01 }, - { 0x0000f474, 0x0000f474, 0x00 }, - { 0x0000f477, 0x0000f479, 0x01 }, - { 0x0000f47b, 0x0000f47e, 0x01 }, - { 0x0000f480, 0x0000f481, 0x01 }, - { 0x0000f483, 0x0000f485, 0x01 }, - { 0x0000f488, 0x0000f488, 0x00 }, - { 0x0000f48b, 0x0000f48b, 0x00 }, - { 0x0000f48d, 0x0000f491, 0x01 }, - { 0x0000f497, 0x0000f498, 0x01 }, - { 0x0000f49b, 0x0000f49b, 0x00 }, - { 0x0000f49e, 0x0000f49e, 0x00 }, - { 0x0000f4a4, 0x0000f4a7, 0x01 }, - { 0x0000f4a9, 0x0000f4aa, 0x01 }, - { 0x0000f4ad, 0x0000f4ad, 0x00 }, - { 0x0000f4af, 0x0000f4b0, 0x01 }, - { 0x0000f4b2, 0x0000f4b4, 0x01 }, - { 0x0000f4b7, 0x0000f4b7, 0x00 }, - { 0x0000f4ba, 0x0000f4c1, 0x01 }, - { 0x0000f4c3, 0x0000f4c5, 0x01 }, - { 0x0000f4c7, 0x0000f4ca, 0x01 }, - { 0x0000f4cc, 0x0000f4cf, 0x01 }, - { 0x0000f4d1, 0x0000f4d5, 0x01 }, - { 0x0000f4d7, 0x0000f4d7, 0x00 }, - { 0x0000f4d9, 0x0000f4e0, 0x01 }, - { 0x0000f4e2, 0x0000f4e9, 0x01 }, - { 0x0000f4ef, 0x0000f4ef, 0x00 }, - { 0x0000f4f2, 0x0000f4f3, 0x01 }, - { 0x0000f4f8, 0x0000f4f8, 0x00 }, - { 0x0000f4fc, 0x0000f4fc, 0x00 }, - { 0x0000f4fe, 0x0000f501, 0x01 }, - { 0x0000f503, 0x0000f503, 0x00 }, - { 0x0000f505, 0x0000f505, 0x00 }, - { 0x0000f507, 0x0000f511, 0x01 }, - { 0x0000f513, 0x0000f516, 0x01 }, - { 0x0000f518, 0x0000f51d, 0x01 }, - { 0x0000f51f, 0x0000f526, 0x01 }, - { 0x0000f52a, 0x0000f52a, 0x00 }, - { 0x0000f533, 0x0000f534, 0x01 }, - { 0x0000f53a, 0x0000f53b, 0x01 }, - { 0x0000f53d, 0x0000f53d, 0x00 }, - { 0x0000f54e, 0x0000f54e, 0x00 }, - { 0x0000f553, 0x0000f553, 0x00 }, - { 0x0000f556, 0x0000f556, 0x00 }, - { 0x0000f559, 0x0000f55a, 0x01 }, - { 0x0000f55e, 0x0000f55e, 0x00 }, - { 0x0000f565, 0x0000f565, 0x00 }, - { 0x0000f56b, 0x0000f56b, 0x00 }, - { 0x0000f572, 0x0000f572, 0x00 }, - { 0x0000f694, 0x0000f694, 0x00 }, - { 0x0000f69e, 0x0000f69e, 0x00 }, - { 0x0000f6ad, 0x0000f6ad, 0x00 }, - { 0x0000f6b0, 0x0000f6b0, 0x00 }, - { 0x0000f7e5, 0x0000f7e6, 0x01 }, - { 0x0000f7e8, 0x0000f7e8, 0x00 }, - { 0x0000f7ea, 0x0000f7eb, 0x01 }, - { 0x0000f7ed, 0x0000f7ee, 0x01 }, - { 0x0000fa0c, 0x0000fa0c, 0x00 }, - { 0x0000fe30, 0x0000fe31, 0x01 }, - { 0x0000fe33, 0x0000fe44, 0x01 }, - { 0x0000fe49, 0x0000fe52, 0x01 }, - { 0x0000fe54, 0x0000fe57, 0x01 }, - { 0x0000fe59, 0x0000fe66, 0x01 }, - { 0x0000fe68, 0x0000fe6b, 0x01 }, - { 0x0000ff01, 0x0000ff5e, 0x01 }, - { 0x0000ffe0, 0x0000ffe5, 0x01 }, - { 0x0000ffed, 0x0000ffed, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterChina_Class_t NW_Unicode_LetterChina_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterChina_Table) - / sizeof(*_NW_Unicode_LetterChina_Table), - /* table */ _NW_Unicode_LetterChina_Table - }, - { /* NW_Unicode_LetterChina */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterChina_t NW_Unicode_LetterChina = { - { { &NW_Unicode_LetterChina_Class } } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterJapan.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterJapan.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterJapanI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterJapanFullKatakana_Table[] = { - { 0x000030a1, 0x000030f6, 0x01 }, - { 0x000030fb, 0x000030fe, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterJapanFullKatakana_Class_t NW_Unicode_LetterJapanFullKatakana_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterJapanFullKatakana_Table) - / sizeof(*_NW_Unicode_LetterJapanFullKatakana_Table), - /* table */ _NW_Unicode_LetterJapanFullKatakana_Table - }, - { /* NW_Unicode_LetterJapanFullKatakana */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterJapanFullKatakana_t NW_Unicode_LetterJapanFullKatakana = { - { { &NW_Unicode_LetterJapanFullKatakana_Class } } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterLowercase.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterLowercase.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterLowercaseI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterLowercase_Table[] = { - { 0x00000061, 0x0000007a, 0x01 }, - { 0x000000aa, 0x000000aa, 0x00 }, - { 0x000000b5, 0x000000b5, 0x00 }, - { 0x000000ba, 0x000000ba, 0x00 }, - { 0x000000df, 0x000000f6, 0x01 }, - { 0x000000f8, 0x000000ff, 0x01 }, - { 0x00000101, 0x00000137, 0x02 }, - { 0x00000138, 0x00000148, 0x02 }, - { 0x00000149, 0x00000177, 0x02 }, - { 0x0000017a, 0x0000017e, 0x02 }, - { 0x0000017f, 0x0000017f, 0x00 }, - { 0x00000180, 0x00000180, 0x00 }, - { 0x00000183, 0x00000183, 0x00 }, - { 0x00000185, 0x00000185, 0x00 }, - { 0x00000188, 0x00000188, 0x00 }, - { 0x0000018c, 0x0000018c, 0x00 }, - { 0x0000018d, 0x0000018d, 0x00 }, - { 0x00000192, 0x00000192, 0x00 }, - { 0x00000195, 0x00000195, 0x00 }, - { 0x00000199, 0x0000019b, 0x01 }, - { 0x0000019e, 0x0000019e, 0x00 }, - { 0x000001a1, 0x000001a5, 0x02 }, - { 0x000001a8, 0x000001a8, 0x00 }, - { 0x000001aa, 0x000001aa, 0x00 }, - { 0x000001ab, 0x000001ab, 0x00 }, - { 0x000001ad, 0x000001ad, 0x00 }, - { 0x000001b0, 0x000001b0, 0x00 }, - { 0x000001b4, 0x000001b4, 0x00 }, - { 0x000001b6, 0x000001b6, 0x00 }, - { 0x000001b9, 0x000001b9, 0x00 }, - { 0x000001ba, 0x000001ba, 0x00 }, - { 0x000001bd, 0x000001bf, 0x01 }, - { 0x000001c6, 0x000001cc, 0x03 }, - { 0x000001ce, 0x000001dc, 0x02 }, - { 0x000001dd, 0x000001ef, 0x02 }, - { 0x000001f0, 0x000001f0, 0x00 }, - { 0x000001f3, 0x000001f3, 0x00 }, - { 0x000001f5, 0x000001f5, 0x00 }, - { 0x000001f9, 0x0000021f, 0x02 }, - { 0x00000223, 0x00000233, 0x02 }, - { 0x00000250, 0x000002ad, 0x01 }, - { 0x00000390, 0x00000390, 0x00 }, - { 0x000003ac, 0x000003ce, 0x01 }, - { 0x000003d0, 0x000003d0, 0x00 }, - { 0x000003d1, 0x000003d1, 0x00 }, - { 0x000003d5, 0x000003d7, 0x01 }, - { 0x000003db, 0x000003ef, 0x02 }, - { 0x000003f0, 0x000003f3, 0x01 }, - { 0x000003f5, 0x000003f5, 0x00 }, - { 0x00000430, 0x0000045f, 0x01 }, - { 0x00000461, 0x00000481, 0x02 }, - { 0x0000048d, 0x000004bf, 0x02 }, - { 0x000004c2, 0x000004c2, 0x00 }, - { 0x000004c4, 0x000004cc, 0x04 }, - { 0x000004d1, 0x000004f5, 0x02 }, - { 0x000004f9, 0x000004f9, 0x00 }, - { 0x00000561, 0x00000587, 0x01 }, - { 0x00001e01, 0x00001e95, 0x02 }, - { 0x00001e96, 0x00001e9b, 0x01 }, - { 0x00001ea1, 0x00001ef9, 0x02 }, - { 0x00001f00, 0x00001f07, 0x01 }, - { 0x00001f10, 0x00001f15, 0x01 }, - { 0x00001f20, 0x00001f27, 0x01 }, - { 0x00001f30, 0x00001f37, 0x01 }, - { 0x00001f40, 0x00001f45, 0x01 }, - { 0x00001f50, 0x00001f57, 0x01 }, - { 0x00001f60, 0x00001f67, 0x01 }, - { 0x00001f70, 0x00001f7d, 0x01 }, - { 0x00001f80, 0x00001f87, 0x01 }, - { 0x00001f90, 0x00001f97, 0x01 }, - { 0x00001fa0, 0x00001fa7, 0x01 }, - { 0x00001fb0, 0x00001fb4, 0x01 }, - { 0x00001fb6, 0x00001fb6, 0x00 }, - { 0x00001fb7, 0x00001fb7, 0x00 }, - { 0x00001fbe, 0x00001fbe, 0x00 }, - { 0x00001fc2, 0x00001fc4, 0x01 }, - { 0x00001fc6, 0x00001fc6, 0x00 }, - { 0x00001fc7, 0x00001fc7, 0x00 }, - { 0x00001fd0, 0x00001fd3, 0x01 }, - { 0x00001fd6, 0x00001fd6, 0x00 }, - { 0x00001fd7, 0x00001fd7, 0x00 }, - { 0x00001fe0, 0x00001fe7, 0x01 }, - { 0x00001ff2, 0x00001ff4, 0x01 }, - { 0x00001ff6, 0x00001ff6, 0x00 }, - { 0x00001ff7, 0x00001ff7, 0x00 }, - { 0x0000207f, 0x0000207f, 0x00 }, - { 0x0000210a, 0x0000210a, 0x00 }, - { 0x0000210e, 0x0000210e, 0x00 }, - { 0x0000210f, 0x0000210f, 0x00 }, - { 0x00002113, 0x00002113, 0x00 }, - { 0x0000212f, 0x00002139, 0x05 }, - { 0x0000fb00, 0x0000fb06, 0x01 }, - { 0x0000fb13, 0x0000fb17, 0x01 }, - { 0x0000ff41, 0x0000ff5a, 0x01 }, - { 0x00010428, 0x0001044d, 0x01 }, - { 0x0001d41a, 0x0001d433, 0x01 }, - { 0x0001d44e, 0x0001d454, 0x01 }, - { 0x0001d456, 0x0001d467, 0x01 }, - { 0x0001d482, 0x0001d49b, 0x01 }, - { 0x0001d4b6, 0x0001d4b9, 0x01 }, - { 0x0001d4bb, 0x0001d4bb, 0x00 }, - { 0x0001d4bd, 0x0001d4c0, 0x01 }, - { 0x0001d4c2, 0x0001d4c2, 0x00 }, - { 0x0001d4c3, 0x0001d4c3, 0x00 }, - { 0x0001d4c5, 0x0001d4cf, 0x01 }, - { 0x0001d4ea, 0x0001d503, 0x01 }, - { 0x0001d51e, 0x0001d537, 0x01 }, - { 0x0001d552, 0x0001d56b, 0x01 }, - { 0x0001d586, 0x0001d59f, 0x01 }, - { 0x0001d5ba, 0x0001d5d3, 0x01 }, - { 0x0001d5ee, 0x0001d607, 0x01 }, - { 0x0001d622, 0x0001d63b, 0x01 }, - { 0x0001d656, 0x0001d66f, 0x01 }, - { 0x0001d68a, 0x0001d6a3, 0x01 }, - { 0x0001d6c2, 0x0001d6da, 0x01 }, - { 0x0001d6dc, 0x0001d6e1, 0x01 }, - { 0x0001d6fc, 0x0001d714, 0x01 }, - { 0x0001d716, 0x0001d71b, 0x01 }, - { 0x0001d736, 0x0001d74e, 0x01 }, - { 0x0001d750, 0x0001d755, 0x01 }, - { 0x0001d770, 0x0001d788, 0x01 }, - { 0x0001d78a, 0x0001d78f, 0x01 }, - { 0x0001d7aa, 0x0001d7c2, 0x01 }, - { 0x0001d7c4, 0x0001d7c9, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterLowercase_Class_t NW_Unicode_LetterLowercase_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterLowercase_Table) - / sizeof(*_NW_Unicode_LetterLowercase_Table), - /* table */ _NW_Unicode_LetterLowercase_Table - }, - { /* NW_Unicode_LetterLowercase */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterLowercase_t NW_Unicode_LetterLowercase = { - { { &NW_Unicode_LetterLowercase_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterModifier.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterModifier.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterModifierI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterModifier_Table[] = { - { 0x000002b0, 0x000002b8, 0x01 }, - { 0x000002bb, 0x000002c1, 0x01 }, - { 0x000002d0, 0x000002d0, 0x00 }, - { 0x000002d1, 0x000002d1, 0x00 }, - { 0x000002e0, 0x000002e4, 0x01 }, - { 0x000002ee, 0x000002ee, 0x00 }, - { 0x0000037a, 0x0000037a, 0x00 }, - { 0x00000559, 0x00000559, 0x00 }, - { 0x00000640, 0x00000640, 0x00 }, - { 0x000006e5, 0x000006e5, 0x00 }, - { 0x000006e6, 0x000006e6, 0x00 }, - { 0x00000e46, 0x00000e46, 0x00 }, - { 0x00000ec6, 0x00000ec6, 0x00 }, - { 0x00001843, 0x00001843, 0x00 }, - { 0x00003005, 0x00003005, 0x00 }, - { 0x00003031, 0x00003035, 0x01 }, - { 0x0000309d, 0x0000309d, 0x00 }, - { 0x0000309e, 0x0000309e, 0x00 }, - { 0x000030fc, 0x000030fe, 0x01 }, - { 0x0000ff70, 0x0000ff70, 0x00 }, - { 0x0000ff9e, 0x0000ff9e, 0x00 }, - { 0x0000ff9f, 0x0000ff9f, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterModifier_Class_t NW_Unicode_LetterModifier_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterModifier_Table) - / sizeof(*_NW_Unicode_LetterModifier_Table), - /* table */ _NW_Unicode_LetterModifier_Table - }, - { /* NW_Unicode_LetterModifier */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterModifier_t NW_Unicode_LetterModifier = { - { { &NW_Unicode_LetterModifier_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterOther.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterOther.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterOtherI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterOther_Table[] = { - { 0x000001bb, 0x000001bb, 0x00 }, - { 0x000001c0, 0x000001c3, 0x01 }, - { 0x000005d0, 0x000005ea, 0x01 }, - { 0x000005f0, 0x000005f2, 0x01 }, - { 0x00000621, 0x0000063a, 0x01 }, - { 0x00000641, 0x0000064a, 0x01 }, - { 0x00000671, 0x000006d3, 0x01 }, - { 0x000006d5, 0x000006d5, 0x00 }, - { 0x000006fa, 0x000006fc, 0x01 }, - { 0x00000710, 0x00000710, 0x00 }, - { 0x00000712, 0x0000072c, 0x01 }, - { 0x00000780, 0x000007a5, 0x01 }, - { 0x00000905, 0x00000939, 0x01 }, - { 0x0000093d, 0x0000093d, 0x00 }, - { 0x00000950, 0x00000950, 0x00 }, - { 0x00000958, 0x00000961, 0x01 }, - { 0x00000985, 0x0000098c, 0x01 }, - { 0x0000098f, 0x0000098f, 0x00 }, - { 0x00000990, 0x00000990, 0x00 }, - { 0x00000993, 0x000009a8, 0x01 }, - { 0x000009aa, 0x000009b0, 0x01 }, - { 0x000009b2, 0x000009b2, 0x00 }, - { 0x000009b6, 0x000009b9, 0x01 }, - { 0x000009dc, 0x000009dc, 0x00 }, - { 0x000009dd, 0x000009dd, 0x00 }, - { 0x000009df, 0x000009e1, 0x01 }, - { 0x000009f0, 0x000009f0, 0x00 }, - { 0x000009f1, 0x000009f1, 0x00 }, - { 0x00000a05, 0x00000a0a, 0x01 }, - { 0x00000a0f, 0x00000a0f, 0x00 }, - { 0x00000a10, 0x00000a10, 0x00 }, - { 0x00000a13, 0x00000a28, 0x01 }, - { 0x00000a2a, 0x00000a30, 0x01 }, - { 0x00000a32, 0x00000a32, 0x00 }, - { 0x00000a33, 0x00000a33, 0x00 }, - { 0x00000a35, 0x00000a35, 0x00 }, - { 0x00000a36, 0x00000a36, 0x00 }, - { 0x00000a38, 0x00000a38, 0x00 }, - { 0x00000a39, 0x00000a39, 0x00 }, - { 0x00000a59, 0x00000a5c, 0x01 }, - { 0x00000a5e, 0x00000a5e, 0x00 }, - { 0x00000a72, 0x00000a74, 0x01 }, - { 0x00000a85, 0x00000a8b, 0x01 }, - { 0x00000a8d, 0x00000a8d, 0x00 }, - { 0x00000a8f, 0x00000a91, 0x01 }, - { 0x00000a93, 0x00000aa8, 0x01 }, - { 0x00000aaa, 0x00000ab0, 0x01 }, - { 0x00000ab2, 0x00000ab2, 0x00 }, - { 0x00000ab3, 0x00000ab3, 0x00 }, - { 0x00000ab5, 0x00000ab9, 0x01 }, - { 0x00000abd, 0x00000abd, 0x00 }, - { 0x00000ad0, 0x00000ad0, 0x00 }, - { 0x00000ae0, 0x00000ae0, 0x00 }, - { 0x00000b05, 0x00000b0c, 0x01 }, - { 0x00000b0f, 0x00000b0f, 0x00 }, - { 0x00000b10, 0x00000b10, 0x00 }, - { 0x00000b13, 0x00000b28, 0x01 }, - { 0x00000b2a, 0x00000b30, 0x01 }, - { 0x00000b32, 0x00000b32, 0x00 }, - { 0x00000b33, 0x00000b33, 0x00 }, - { 0x00000b36, 0x00000b39, 0x01 }, - { 0x00000b3d, 0x00000b3d, 0x00 }, - { 0x00000b5c, 0x00000b5c, 0x00 }, - { 0x00000b5d, 0x00000b5d, 0x00 }, - { 0x00000b5f, 0x00000b61, 0x01 }, - { 0x00000b85, 0x00000b8a, 0x01 }, - { 0x00000b8e, 0x00000b90, 0x01 }, - { 0x00000b92, 0x00000b95, 0x01 }, - { 0x00000b99, 0x00000b99, 0x00 }, - { 0x00000b9a, 0x00000b9e, 0x02 }, - { 0x00000b9f, 0x00000b9f, 0x00 }, - { 0x00000ba3, 0x00000ba3, 0x00 }, - { 0x00000ba4, 0x00000ba4, 0x00 }, - { 0x00000ba8, 0x00000baa, 0x01 }, - { 0x00000bae, 0x00000bb5, 0x01 }, - { 0x00000bb7, 0x00000bb9, 0x01 }, - { 0x00000c05, 0x00000c0c, 0x01 }, - { 0x00000c0e, 0x00000c10, 0x01 }, - { 0x00000c12, 0x00000c28, 0x01 }, - { 0x00000c2a, 0x00000c33, 0x01 }, - { 0x00000c35, 0x00000c39, 0x01 }, - { 0x00000c60, 0x00000c60, 0x00 }, - { 0x00000c61, 0x00000c61, 0x00 }, - { 0x00000c85, 0x00000c8c, 0x01 }, - { 0x00000c8e, 0x00000c90, 0x01 }, - { 0x00000c92, 0x00000ca8, 0x01 }, - { 0x00000caa, 0x00000cb3, 0x01 }, - { 0x00000cb5, 0x00000cb9, 0x01 }, - { 0x00000cde, 0x00000cde, 0x00 }, - { 0x00000ce0, 0x00000ce0, 0x00 }, - { 0x00000ce1, 0x00000ce1, 0x00 }, - { 0x00000d05, 0x00000d0c, 0x01 }, - { 0x00000d0e, 0x00000d10, 0x01 }, - { 0x00000d12, 0x00000d28, 0x01 }, - { 0x00000d2a, 0x00000d39, 0x01 }, - { 0x00000d60, 0x00000d60, 0x00 }, - { 0x00000d61, 0x00000d61, 0x00 }, - { 0x00000d85, 0x00000d96, 0x01 }, - { 0x00000d9a, 0x00000db1, 0x01 }, - { 0x00000db3, 0x00000dbb, 0x01 }, - { 0x00000dbd, 0x00000dbd, 0x00 }, - { 0x00000dc0, 0x00000dc6, 0x01 }, - { 0x00000e01, 0x00000e30, 0x01 }, - { 0x00000e32, 0x00000e32, 0x00 }, - { 0x00000e33, 0x00000e33, 0x00 }, - { 0x00000e40, 0x00000e45, 0x01 }, - { 0x00000e81, 0x00000e81, 0x00 }, - { 0x00000e82, 0x00000e82, 0x00 }, - { 0x00000e84, 0x00000e84, 0x00 }, - { 0x00000e87, 0x00000e87, 0x00 }, - { 0x00000e88, 0x00000e88, 0x00 }, - { 0x00000e8a, 0x00000e8a, 0x00 }, - { 0x00000e8d, 0x00000e8d, 0x00 }, - { 0x00000e94, 0x00000e97, 0x01 }, - { 0x00000e99, 0x00000e9f, 0x01 }, - { 0x00000ea1, 0x00000ea3, 0x01 }, - { 0x00000ea5, 0x00000ea5, 0x00 }, - { 0x00000ea7, 0x00000ea7, 0x00 }, - { 0x00000eaa, 0x00000eaa, 0x00 }, - { 0x00000eab, 0x00000eab, 0x00 }, - { 0x00000ead, 0x00000eb0, 0x01 }, - { 0x00000eb2, 0x00000eb2, 0x00 }, - { 0x00000eb3, 0x00000eb3, 0x00 }, - { 0x00000ebd, 0x00000ebd, 0x00 }, - { 0x00000ec0, 0x00000ec4, 0x01 }, - { 0x00000edc, 0x00000edc, 0x00 }, - { 0x00000edd, 0x00000edd, 0x00 }, - { 0x00000f00, 0x00000f00, 0x00 }, - { 0x00000f40, 0x00000f47, 0x01 }, - { 0x00000f49, 0x00000f6a, 0x01 }, - { 0x00000f88, 0x00000f8b, 0x01 }, - { 0x00001000, 0x00001021, 0x01 }, - { 0x00001023, 0x00001027, 0x01 }, - { 0x00001029, 0x00001029, 0x00 }, - { 0x0000102a, 0x0000102a, 0x00 }, - { 0x00001050, 0x00001055, 0x01 }, - { 0x000010d0, 0x000010f6, 0x01 }, - { 0x00001100, 0x00001159, 0x01 }, - { 0x0000115f, 0x000011a2, 0x01 }, - { 0x000011a8, 0x000011f9, 0x01 }, - { 0x00001200, 0x00001206, 0x01 }, - { 0x00001208, 0x00001246, 0x01 }, - { 0x00001248, 0x00001248, 0x00 }, - { 0x0000124a, 0x0000124d, 0x01 }, - { 0x00001250, 0x00001256, 0x01 }, - { 0x00001258, 0x00001258, 0x00 }, - { 0x0000125a, 0x0000125d, 0x01 }, - { 0x00001260, 0x00001286, 0x01 }, - { 0x00001288, 0x00001288, 0x00 }, - { 0x0000128a, 0x0000128d, 0x01 }, - { 0x00001290, 0x000012ae, 0x01 }, - { 0x000012b0, 0x000012b0, 0x00 }, - { 0x000012b2, 0x000012b5, 0x01 }, - { 0x000012b8, 0x000012be, 0x01 }, - { 0x000012c0, 0x000012c0, 0x00 }, - { 0x000012c2, 0x000012c5, 0x01 }, - { 0x000012c8, 0x000012ce, 0x01 }, - { 0x000012d0, 0x000012d6, 0x01 }, - { 0x000012d8, 0x000012ee, 0x01 }, - { 0x000012f0, 0x0000130e, 0x01 }, - { 0x00001310, 0x00001310, 0x00 }, - { 0x00001312, 0x00001315, 0x01 }, - { 0x00001318, 0x0000131e, 0x01 }, - { 0x00001320, 0x00001346, 0x01 }, - { 0x00001348, 0x0000135a, 0x01 }, - { 0x000013a0, 0x000013f4, 0x01 }, - { 0x00001401, 0x0000166c, 0x01 }, - { 0x0000166f, 0x00001676, 0x01 }, - { 0x00001681, 0x0000169a, 0x01 }, - { 0x000016a0, 0x000016ea, 0x01 }, - { 0x00001780, 0x000017b3, 0x01 }, - { 0x00001820, 0x00001842, 0x01 }, - { 0x00001844, 0x00001877, 0x01 }, - { 0x00001880, 0x000018a8, 0x01 }, - { 0x00002135, 0x00002138, 0x01 }, - { 0x00003006, 0x00003006, 0x00 }, - { 0x00003041, 0x00003094, 0x01 }, - { 0x000030a1, 0x000030fa, 0x01 }, - { 0x00003105, 0x0000312c, 0x01 }, - { 0x00003131, 0x0000318e, 0x01 }, - { 0x000031a0, 0x000031b7, 0x01 }, - { 0x00003400, 0x00003400, 0x00 }, - { 0x00004db5, 0x00004db5, 0x00 }, - { 0x00004e00, 0x00004e00, 0x00 }, - { 0x00009fa5, 0x00009fa5, 0x00 }, - { 0x0000a000, 0x0000a48c, 0x01 }, - { 0x0000ac00, 0x0000ac00, 0x00 }, - { 0x0000d7a3, 0x0000d7a3, 0x00 }, - { 0x0000f900, 0x0000fa2d, 0x01 }, - { 0x0000fb1d, 0x0000fb1d, 0x00 }, - { 0x0000fb1f, 0x0000fb28, 0x01 }, - { 0x0000fb2a, 0x0000fb36, 0x01 }, - { 0x0000fb38, 0x0000fb3c, 0x01 }, - { 0x0000fb3e, 0x0000fb3e, 0x00 }, - { 0x0000fb40, 0x0000fb40, 0x00 }, - { 0x0000fb41, 0x0000fb41, 0x00 }, - { 0x0000fb43, 0x0000fb43, 0x00 }, - { 0x0000fb44, 0x0000fb44, 0x00 }, - { 0x0000fb46, 0x0000fbb1, 0x01 }, - { 0x0000fbd3, 0x0000fd3d, 0x01 }, - { 0x0000fd50, 0x0000fd8f, 0x01 }, - { 0x0000fd92, 0x0000fdc7, 0x01 }, - { 0x0000fdf0, 0x0000fdfb, 0x01 }, - { 0x0000fe70, 0x0000fe72, 0x01 }, - { 0x0000fe74, 0x0000fe74, 0x00 }, - { 0x0000fe76, 0x0000fefc, 0x01 }, - { 0x0000ff66, 0x0000ff6f, 0x01 }, - { 0x0000ff71, 0x0000ff9d, 0x01 }, - { 0x0000ffa0, 0x0000ffbe, 0x01 }, - { 0x0000ffc2, 0x0000ffc7, 0x01 }, - { 0x0000ffca, 0x0000ffcf, 0x01 }, - { 0x0000ffd2, 0x0000ffd7, 0x01 }, - { 0x0000ffda, 0x0000ffdc, 0x01 }, - { 0x00010300, 0x0001031e, 0x01 }, - { 0x00010330, 0x00010349, 0x01 }, - { 0x00020000, 0x00020000, 0x00 }, - { 0x0002a6d6, 0x0002a6d6, 0x00 }, - { 0x0002f800, 0x0002fa1d, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterOther_Class_t NW_Unicode_LetterOther_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterOther_Table) - / sizeof(*_NW_Unicode_LetterOther_Table), - /* table */ _NW_Unicode_LetterOther_Table - }, - { /* NW_Unicode_LetterOther */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterOther_t NW_Unicode_LetterOther = { - { { &NW_Unicode_LetterOther_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterThai.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterThai.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterThaiI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterThai_Table[] = { - { 0x00000e00, 0x00000e7f, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterThai_Class_t NW_Unicode_LetterThai_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterThai_Table) - / sizeof(*_NW_Unicode_LetterThai_Table), - /* table */ _NW_Unicode_LetterThai_Table - }, - { /* NW_Unicode_LetterThai */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterThai_t NW_Unicode_LetterThai = { - { { &NW_Unicode_LetterThai_Class } } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterTitlecase.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterTitlecase.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterTitlecaseI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterTitlecase_Table[] = { - { 0x000001c5, 0x000001cb, 0x03 }, - { 0x000001f2, 0x000001f2, 0x00 }, - { 0x00001f88, 0x00001f8f, 0x01 }, - { 0x00001f98, 0x00001f9f, 0x01 }, - { 0x00001fa8, 0x00001faf, 0x01 }, - { 0x00001fbc, 0x00001fbc, 0x00 }, - { 0x00001fcc, 0x00001fcc, 0x00 }, - { 0x00001ffc, 0x00001ffc, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterTitlecase_Class_t NW_Unicode_LetterTitlecase_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterTitlecase_Table) - / sizeof(*_NW_Unicode_LetterTitlecase_Table), - /* table */ _NW_Unicode_LetterTitlecase_Table - }, - { /* NW_Unicode_LetterTitlecase */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterTitlecase_t NW_Unicode_LetterTitlecase = { - { { &NW_Unicode_LetterTitlecase_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterUppercase.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_LetterUppercase.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_LetterUppercaseI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_LetterUppercase_Table[] = { - { 0x00000041, 0x0000005a, 0x01 }, - { 0x000000c0, 0x000000d6, 0x01 }, - { 0x000000d8, 0x000000de, 0x01 }, - { 0x00000100, 0x00000136, 0x02 }, - { 0x00000139, 0x00000147, 0x02 }, - { 0x0000014a, 0x00000178, 0x02 }, - { 0x00000179, 0x0000017d, 0x02 }, - { 0x00000181, 0x00000181, 0x00 }, - { 0x00000182, 0x00000186, 0x02 }, - { 0x00000187, 0x00000187, 0x00 }, - { 0x00000189, 0x0000018b, 0x01 }, - { 0x0000018e, 0x00000191, 0x01 }, - { 0x00000193, 0x00000193, 0x00 }, - { 0x00000194, 0x00000194, 0x00 }, - { 0x00000196, 0x00000198, 0x01 }, - { 0x0000019c, 0x0000019c, 0x00 }, - { 0x0000019d, 0x0000019d, 0x00 }, - { 0x0000019f, 0x0000019f, 0x00 }, - { 0x000001a0, 0x000001a6, 0x02 }, - { 0x000001a7, 0x000001a7, 0x00 }, - { 0x000001a9, 0x000001a9, 0x00 }, - { 0x000001ac, 0x000001ac, 0x00 }, - { 0x000001ae, 0x000001ae, 0x00 }, - { 0x000001af, 0x000001af, 0x00 }, - { 0x000001b1, 0x000001b3, 0x01 }, - { 0x000001b5, 0x000001b5, 0x00 }, - { 0x000001b7, 0x000001b7, 0x00 }, - { 0x000001b8, 0x000001b8, 0x00 }, - { 0x000001bc, 0x000001bc, 0x00 }, - { 0x000001c4, 0x000001cd, 0x03 }, - { 0x000001cf, 0x000001db, 0x02 }, - { 0x000001de, 0x000001ee, 0x02 }, - { 0x000001f1, 0x000001f1, 0x00 }, - { 0x000001f4, 0x000001f4, 0x00 }, - { 0x000001f6, 0x000001f8, 0x01 }, - { 0x000001fa, 0x0000021e, 0x02 }, - { 0x00000222, 0x00000232, 0x02 }, - { 0x00000386, 0x00000386, 0x00 }, - { 0x00000388, 0x0000038a, 0x01 }, - { 0x0000038c, 0x0000038c, 0x00 }, - { 0x0000038e, 0x0000038e, 0x00 }, - { 0x0000038f, 0x0000038f, 0x00 }, - { 0x00000391, 0x000003a1, 0x01 }, - { 0x000003a3, 0x000003ab, 0x01 }, - { 0x000003d2, 0x000003d4, 0x01 }, - { 0x000003da, 0x000003ee, 0x02 }, - { 0x000003f4, 0x000003f4, 0x00 }, - { 0x00000400, 0x0000042f, 0x01 }, - { 0x00000460, 0x00000480, 0x02 }, - { 0x0000048c, 0x000004c0, 0x02 }, - { 0x000004c1, 0x000004c1, 0x00 }, - { 0x000004c3, 0x000004cb, 0x04 }, - { 0x000004d0, 0x000004f4, 0x02 }, - { 0x000004f8, 0x000004f8, 0x00 }, - { 0x00000531, 0x00000556, 0x01 }, - { 0x000010a0, 0x000010c5, 0x01 }, - { 0x00001e00, 0x00001e94, 0x02 }, - { 0x00001ea0, 0x00001ef8, 0x02 }, - { 0x00001f08, 0x00001f0f, 0x01 }, - { 0x00001f18, 0x00001f1d, 0x01 }, - { 0x00001f28, 0x00001f2f, 0x01 }, - { 0x00001f38, 0x00001f3f, 0x01 }, - { 0x00001f48, 0x00001f4d, 0x01 }, - { 0x00001f59, 0x00001f5f, 0x02 }, - { 0x00001f68, 0x00001f6f, 0x01 }, - { 0x00001fb8, 0x00001fbb, 0x01 }, - { 0x00001fc8, 0x00001fcb, 0x01 }, - { 0x00001fd8, 0x00001fdb, 0x01 }, - { 0x00001fe8, 0x00001fec, 0x01 }, - { 0x00001ff8, 0x00001ffb, 0x01 }, - { 0x00002102, 0x00002102, 0x00 }, - { 0x00002107, 0x00002107, 0x00 }, - { 0x0000210b, 0x0000210d, 0x01 }, - { 0x00002110, 0x00002112, 0x01 }, - { 0x00002115, 0x00002115, 0x00 }, - { 0x00002119, 0x0000211d, 0x01 }, - { 0x00002124, 0x0000212a, 0x02 }, - { 0x0000212b, 0x0000212d, 0x01 }, - { 0x00002130, 0x00002130, 0x00 }, - { 0x00002131, 0x00002131, 0x00 }, - { 0x00002133, 0x00002133, 0x00 }, - { 0x0000ff21, 0x0000ff3a, 0x01 }, - { 0x00010400, 0x00010425, 0x01 }, - { 0x0001d400, 0x0001d419, 0x01 }, - { 0x0001d434, 0x0001d44d, 0x01 }, - { 0x0001d468, 0x0001d481, 0x01 }, - { 0x0001d49c, 0x0001d49c, 0x00 }, - { 0x0001d49e, 0x0001d49e, 0x00 }, - { 0x0001d49f, 0x0001d4a5, 0x03 }, - { 0x0001d4a6, 0x0001d4a6, 0x00 }, - { 0x0001d4a9, 0x0001d4ac, 0x01 }, - { 0x0001d4ae, 0x0001d4b5, 0x01 }, - { 0x0001d4d0, 0x0001d4e9, 0x01 }, - { 0x0001d504, 0x0001d504, 0x00 }, - { 0x0001d505, 0x0001d505, 0x00 }, - { 0x0001d507, 0x0001d50a, 0x01 }, - { 0x0001d50d, 0x0001d514, 0x01 }, - { 0x0001d516, 0x0001d51c, 0x01 }, - { 0x0001d538, 0x0001d538, 0x00 }, - { 0x0001d539, 0x0001d539, 0x00 }, - { 0x0001d53b, 0x0001d53e, 0x01 }, - { 0x0001d540, 0x0001d544, 0x01 }, - { 0x0001d546, 0x0001d546, 0x00 }, - { 0x0001d54a, 0x0001d550, 0x01 }, - { 0x0001d56c, 0x0001d585, 0x01 }, - { 0x0001d5a0, 0x0001d5b9, 0x01 }, - { 0x0001d5d4, 0x0001d5ed, 0x01 }, - { 0x0001d608, 0x0001d621, 0x01 }, - { 0x0001d63c, 0x0001d655, 0x01 }, - { 0x0001d670, 0x0001d689, 0x01 }, - { 0x0001d6a8, 0x0001d6c0, 0x01 }, - { 0x0001d6e2, 0x0001d6fa, 0x01 }, - { 0x0001d71c, 0x0001d734, 0x01 }, - { 0x0001d756, 0x0001d76e, 0x01 }, - { 0x0001d790, 0x0001d7a8, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterUppercase_Class_t NW_Unicode_LetterUppercase_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_LetterUppercase_Table) - / sizeof(*_NW_Unicode_LetterUppercase_Table), - /* table */ _NW_Unicode_LetterUppercase_Table - }, - { /* NW_Unicode_LetterUppercase */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_LetterUppercase_t NW_Unicode_LetterUppercase = { - { { &NW_Unicode_LetterUppercase_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkEnclosing.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkEnclosing.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_MarkEnclosingI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkEnclosing_Table[] = { - { 0x00000488, 0x00000488, 0x00 }, - { 0x00000489, 0x00000489, 0x00 }, - { 0x000006dd, 0x000006dd, 0x00 }, - { 0x000006de, 0x000006de, 0x00 }, - { 0x000020dd, 0x000020e0, 0x01 }, - { 0x000020e2, 0x000020e2, 0x00 }, - { 0x000020e3, 0x000020e3, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkEnclosing_Class_t NW_Unicode_MarkEnclosing_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_MarkEnclosing_Table) - / sizeof(*_NW_Unicode_MarkEnclosing_Table), - /* table */ _NW_Unicode_MarkEnclosing_Table - }, - { /* NW_Unicode_MarkEnclosing */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkEnclosing_t NW_Unicode_MarkEnclosing = { - { { &NW_Unicode_MarkEnclosing_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkNonSpacing.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkNonSpacing.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_MarkNonSpacingI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkNonSpacing_Table[] = { - { 0x00000300, 0x0000034e, 0x01 }, - { 0x00000360, 0x00000362, 0x01 }, - { 0x00000483, 0x00000486, 0x01 }, - { 0x00000591, 0x000005a1, 0x01 }, - { 0x000005a3, 0x000005b9, 0x01 }, - { 0x000005bb, 0x000005bd, 0x01 }, - { 0x000005bf, 0x000005bf, 0x00 }, - { 0x000005c1, 0x000005c1, 0x00 }, - { 0x000005c2, 0x000005c2, 0x00 }, - { 0x000005c4, 0x000005c4, 0x00 }, - { 0x0000064b, 0x00000655, 0x01 }, - { 0x00000670, 0x00000670, 0x00 }, - { 0x000006d6, 0x000006dc, 0x01 }, - { 0x000006df, 0x000006e4, 0x01 }, - { 0x000006e7, 0x000006e7, 0x00 }, - { 0x000006e8, 0x000006e8, 0x00 }, - { 0x000006ea, 0x000006ed, 0x01 }, - { 0x00000711, 0x00000711, 0x00 }, - { 0x00000730, 0x0000074a, 0x01 }, - { 0x000007a6, 0x000007b0, 0x01 }, - { 0x00000901, 0x00000901, 0x00 }, - { 0x00000902, 0x00000902, 0x00 }, - { 0x0000093c, 0x0000093c, 0x00 }, - { 0x00000941, 0x00000948, 0x01 }, - { 0x0000094d, 0x0000094d, 0x00 }, - { 0x00000951, 0x00000954, 0x01 }, - { 0x00000962, 0x00000962, 0x00 }, - { 0x00000963, 0x00000963, 0x00 }, - { 0x00000981, 0x00000981, 0x00 }, - { 0x000009bc, 0x000009bc, 0x00 }, - { 0x000009c1, 0x000009c4, 0x01 }, - { 0x000009cd, 0x000009cd, 0x00 }, - { 0x000009e2, 0x000009e2, 0x00 }, - { 0x000009e3, 0x000009e3, 0x00 }, - { 0x00000a02, 0x00000a02, 0x00 }, - { 0x00000a3c, 0x00000a3c, 0x00 }, - { 0x00000a41, 0x00000a41, 0x00 }, - { 0x00000a42, 0x00000a42, 0x00 }, - { 0x00000a47, 0x00000a47, 0x00 }, - { 0x00000a48, 0x00000a48, 0x00 }, - { 0x00000a4b, 0x00000a4d, 0x01 }, - { 0x00000a70, 0x00000a70, 0x00 }, - { 0x00000a71, 0x00000a71, 0x00 }, - { 0x00000a81, 0x00000a81, 0x00 }, - { 0x00000a82, 0x00000a82, 0x00 }, - { 0x00000abc, 0x00000abc, 0x00 }, - { 0x00000ac1, 0x00000ac5, 0x01 }, - { 0x00000ac7, 0x00000ac7, 0x00 }, - { 0x00000ac8, 0x00000ac8, 0x00 }, - { 0x00000acd, 0x00000acd, 0x00 }, - { 0x00000b01, 0x00000b01, 0x00 }, - { 0x00000b3c, 0x00000b3c, 0x00 }, - { 0x00000b3f, 0x00000b3f, 0x00 }, - { 0x00000b41, 0x00000b43, 0x01 }, - { 0x00000b4d, 0x00000b4d, 0x00 }, - { 0x00000b56, 0x00000b56, 0x00 }, - { 0x00000b82, 0x00000b82, 0x00 }, - { 0x00000bc0, 0x00000bc0, 0x00 }, - { 0x00000bcd, 0x00000bcd, 0x00 }, - { 0x00000c3e, 0x00000c40, 0x01 }, - { 0x00000c46, 0x00000c48, 0x01 }, - { 0x00000c4a, 0x00000c4d, 0x01 }, - { 0x00000c55, 0x00000c55, 0x00 }, - { 0x00000c56, 0x00000c56, 0x00 }, - { 0x00000cbf, 0x00000cbf, 0x00 }, - { 0x00000cc6, 0x00000cc6, 0x00 }, - { 0x00000ccc, 0x00000ccc, 0x00 }, - { 0x00000ccd, 0x00000ccd, 0x00 }, - { 0x00000d41, 0x00000d43, 0x01 }, - { 0x00000d4d, 0x00000d4d, 0x00 }, - { 0x00000dca, 0x00000dca, 0x00 }, - { 0x00000dd2, 0x00000dd4, 0x01 }, - { 0x00000dd6, 0x00000dd6, 0x00 }, - { 0x00000e31, 0x00000e31, 0x00 }, - { 0x00000e34, 0x00000e3a, 0x01 }, - { 0x00000e47, 0x00000e4e, 0x01 }, - { 0x00000eb1, 0x00000eb1, 0x00 }, - { 0x00000eb4, 0x00000eb9, 0x01 }, - { 0x00000ebb, 0x00000ebb, 0x00 }, - { 0x00000ebc, 0x00000ebc, 0x00 }, - { 0x00000ec8, 0x00000ecd, 0x01 }, - { 0x00000f18, 0x00000f18, 0x00 }, - { 0x00000f19, 0x00000f19, 0x00 }, - { 0x00000f35, 0x00000f39, 0x02 }, - { 0x00000f71, 0x00000f7e, 0x01 }, - { 0x00000f80, 0x00000f84, 0x01 }, - { 0x00000f86, 0x00000f86, 0x00 }, - { 0x00000f87, 0x00000f87, 0x00 }, - { 0x00000f90, 0x00000f97, 0x01 }, - { 0x00000f99, 0x00000fbc, 0x01 }, - { 0x00000fc6, 0x00000fc6, 0x00 }, - { 0x0000102d, 0x00001030, 0x01 }, - { 0x00001032, 0x00001032, 0x00 }, - { 0x00001036, 0x00001036, 0x00 }, - { 0x00001037, 0x00001037, 0x00 }, - { 0x00001039, 0x00001039, 0x00 }, - { 0x00001058, 0x00001058, 0x00 }, - { 0x00001059, 0x00001059, 0x00 }, - { 0x000017b7, 0x000017bd, 0x01 }, - { 0x000017c6, 0x000017c6, 0x00 }, - { 0x000017c9, 0x000017d3, 0x01 }, - { 0x000018a9, 0x000018a9, 0x00 }, - { 0x000020d0, 0x000020dc, 0x01 }, - { 0x000020e1, 0x000020e1, 0x00 }, - { 0x0000302a, 0x0000302f, 0x01 }, - { 0x00003099, 0x00003099, 0x00 }, - { 0x0000309a, 0x0000309a, 0x00 }, - { 0x0000fb1e, 0x0000fb1e, 0x00 }, - { 0x0000fe20, 0x0000fe23, 0x01 }, - { 0x0001d167, 0x0001d169, 0x01 }, - { 0x0001d17b, 0x0001d182, 0x01 }, - { 0x0001d185, 0x0001d18b, 0x01 }, - { 0x0001d1aa, 0x0001d1ad, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkNonSpacing_Class_t NW_Unicode_MarkNonSpacing_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_MarkNonSpacing_Table) - / sizeof(*_NW_Unicode_MarkNonSpacing_Table), - /* table */ _NW_Unicode_MarkNonSpacing_Table - }, - { /* NW_Unicode_MarkNonSpacing */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkNonSpacing_t NW_Unicode_MarkNonSpacing = { - { { &NW_Unicode_MarkNonSpacing_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkSpacingCombining.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_MarkSpacingCombining.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_MarkSpacingCombiningI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_MarkSpacingCombining_Table[] = { - { 0x00000903, 0x00000903, 0x00 }, - { 0x0000093e, 0x00000940, 0x01 }, - { 0x00000949, 0x0000094c, 0x01 }, - { 0x00000982, 0x00000982, 0x00 }, - { 0x00000983, 0x00000983, 0x00 }, - { 0x000009be, 0x000009c0, 0x01 }, - { 0x000009c7, 0x000009c7, 0x00 }, - { 0x000009c8, 0x000009c8, 0x00 }, - { 0x000009cb, 0x000009cb, 0x00 }, - { 0x000009cc, 0x000009cc, 0x00 }, - { 0x000009d7, 0x000009d7, 0x00 }, - { 0x00000a3e, 0x00000a40, 0x01 }, - { 0x00000a83, 0x00000a83, 0x00 }, - { 0x00000abe, 0x00000ac0, 0x01 }, - { 0x00000ac9, 0x00000ac9, 0x00 }, - { 0x00000acb, 0x00000acb, 0x00 }, - { 0x00000acc, 0x00000acc, 0x00 }, - { 0x00000b02, 0x00000b02, 0x00 }, - { 0x00000b03, 0x00000b03, 0x00 }, - { 0x00000b3e, 0x00000b3e, 0x00 }, - { 0x00000b40, 0x00000b40, 0x00 }, - { 0x00000b47, 0x00000b47, 0x00 }, - { 0x00000b48, 0x00000b48, 0x00 }, - { 0x00000b4b, 0x00000b4b, 0x00 }, - { 0x00000b4c, 0x00000b4c, 0x00 }, - { 0x00000b57, 0x00000b57, 0x00 }, - { 0x00000b83, 0x00000b83, 0x00 }, - { 0x00000bbe, 0x00000bbe, 0x00 }, - { 0x00000bbf, 0x00000bbf, 0x00 }, - { 0x00000bc1, 0x00000bc1, 0x00 }, - { 0x00000bc2, 0x00000bc2, 0x00 }, - { 0x00000bc6, 0x00000bc8, 0x01 }, - { 0x00000bca, 0x00000bcc, 0x01 }, - { 0x00000bd7, 0x00000bd7, 0x00 }, - { 0x00000c01, 0x00000c03, 0x01 }, - { 0x00000c41, 0x00000c44, 0x01 }, - { 0x00000c82, 0x00000c82, 0x00 }, - { 0x00000c83, 0x00000c83, 0x00 }, - { 0x00000cbe, 0x00000cbe, 0x00 }, - { 0x00000cc0, 0x00000cc4, 0x01 }, - { 0x00000cc7, 0x00000cc7, 0x00 }, - { 0x00000cc8, 0x00000cc8, 0x00 }, - { 0x00000cca, 0x00000cca, 0x00 }, - { 0x00000ccb, 0x00000ccb, 0x00 }, - { 0x00000cd5, 0x00000cd5, 0x00 }, - { 0x00000cd6, 0x00000cd6, 0x00 }, - { 0x00000d02, 0x00000d02, 0x00 }, - { 0x00000d03, 0x00000d03, 0x00 }, - { 0x00000d3e, 0x00000d40, 0x01 }, - { 0x00000d46, 0x00000d48, 0x01 }, - { 0x00000d4a, 0x00000d4c, 0x01 }, - { 0x00000d57, 0x00000d57, 0x00 }, - { 0x00000d82, 0x00000d82, 0x00 }, - { 0x00000d83, 0x00000d83, 0x00 }, - { 0x00000dcf, 0x00000dd1, 0x01 }, - { 0x00000dd8, 0x00000ddf, 0x01 }, - { 0x00000df2, 0x00000df2, 0x00 }, - { 0x00000df3, 0x00000df3, 0x00 }, - { 0x00000f3e, 0x00000f3e, 0x00 }, - { 0x00000f3f, 0x00000f3f, 0x00 }, - { 0x00000f7f, 0x00000f7f, 0x00 }, - { 0x0000102c, 0x0000102c, 0x00 }, - { 0x00001031, 0x00001031, 0x00 }, - { 0x00001038, 0x00001038, 0x00 }, - { 0x00001056, 0x00001056, 0x00 }, - { 0x00001057, 0x00001057, 0x00 }, - { 0x000017b4, 0x000017b6, 0x01 }, - { 0x000017be, 0x000017c5, 0x01 }, - { 0x000017c7, 0x000017c7, 0x00 }, - { 0x000017c8, 0x000017c8, 0x00 }, - { 0x0001d165, 0x0001d165, 0x00 }, - { 0x0001d166, 0x0001d166, 0x00 }, - { 0x0001d16d, 0x0001d172, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkSpacingCombining_Class_t NW_Unicode_MarkSpacingCombining_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_MarkSpacingCombining_Table) - / sizeof(*_NW_Unicode_MarkSpacingCombining_Table), - /* table */ _NW_Unicode_MarkSpacingCombining_Table - }, - { /* NW_Unicode_MarkSpacingCombining */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_MarkSpacingCombining_t NW_Unicode_MarkSpacingCombining = { - { { &NW_Unicode_MarkSpacingCombining_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberDecimalDigit.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberDecimalDigit.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_NumberDecimalDigitI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberDecimalDigit_Table[] = { - { 0x00000030, 0x00000039, 0x01 }, - { 0x00000660, 0x00000669, 0x01 }, - { 0x000006f0, 0x000006f9, 0x01 }, - { 0x00000966, 0x0000096f, 0x01 }, - { 0x000009e6, 0x000009ef, 0x01 }, - { 0x00000a66, 0x00000a6f, 0x01 }, - { 0x00000ae6, 0x00000aef, 0x01 }, - { 0x00000b66, 0x00000b6f, 0x01 }, - { 0x00000be7, 0x00000bef, 0x01 }, - { 0x00000c66, 0x00000c6f, 0x01 }, - { 0x00000ce6, 0x00000cef, 0x01 }, - { 0x00000d66, 0x00000d6f, 0x01 }, - { 0x00000e50, 0x00000e59, 0x01 }, - { 0x00000ed0, 0x00000ed9, 0x01 }, - { 0x00000f20, 0x00000f29, 0x01 }, - { 0x00001040, 0x00001049, 0x01 }, - { 0x00001369, 0x00001371, 0x01 }, - { 0x000017e0, 0x000017e9, 0x01 }, - { 0x00001810, 0x00001819, 0x01 }, - { 0x0000ff10, 0x0000ff19, 0x01 }, - { 0x0001d7ce, 0x0001d7ff, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberDecimalDigit_Class_t NW_Unicode_NumberDecimalDigit_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_NumberDecimalDigit_Table) - / sizeof(*_NW_Unicode_NumberDecimalDigit_Table), - /* table */ _NW_Unicode_NumberDecimalDigit_Table - }, - { /* NW_Unicode_NumberDecimalDigit */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberDecimalDigit_t NW_Unicode_NumberDecimalDigit = { - { { &NW_Unicode_NumberDecimalDigit_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberLetter.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberLetter.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_NumberLetterI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberLetter_Table[] = { - { 0x000016ee, 0x000016f0, 0x01 }, - { 0x00002160, 0x00002183, 0x01 }, - { 0x00003007, 0x00003007, 0x00 }, - { 0x00003021, 0x00003029, 0x01 }, - { 0x00003038, 0x0000303a, 0x01 }, - { 0x0001034a, 0x0001034a, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberLetter_Class_t NW_Unicode_NumberLetter_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_NumberLetter_Table) - / sizeof(*_NW_Unicode_NumberLetter_Table), - /* table */ _NW_Unicode_NumberLetter_Table - }, - { /* NW_Unicode_NumberLetter */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberLetter_t NW_Unicode_NumberLetter = { - { { &NW_Unicode_NumberLetter_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberOther.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_NumberOther.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_NumberOtherI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_NumberOther_Table[] = { - { 0x000000b2, 0x000000b2, 0x00 }, - { 0x000000b3, 0x000000b3, 0x00 }, - { 0x000000b9, 0x000000b9, 0x00 }, - { 0x000000bc, 0x000000be, 0x01 }, - { 0x000009f4, 0x000009f9, 0x01 }, - { 0x00000bf0, 0x00000bf2, 0x01 }, - { 0x00000f2a, 0x00000f33, 0x01 }, - { 0x00001372, 0x0000137c, 0x01 }, - { 0x00002070, 0x00002070, 0x00 }, - { 0x00002074, 0x00002079, 0x01 }, - { 0x00002080, 0x00002089, 0x01 }, - { 0x00002153, 0x0000215f, 0x01 }, - { 0x00002460, 0x0000249b, 0x01 }, - { 0x000024ea, 0x000024ea, 0x00 }, - { 0x00002776, 0x00002793, 0x01 }, - { 0x00003192, 0x00003195, 0x01 }, - { 0x00003220, 0x00003229, 0x01 }, - { 0x00003280, 0x00003289, 0x01 }, - { 0x00010320, 0x00010323, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberOther_Class_t NW_Unicode_NumberOther_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_NumberOther_Table) - / sizeof(*_NW_Unicode_NumberOther_Table), - /* table */ _NW_Unicode_NumberOther_Table - }, - { /* NW_Unicode_NumberOther */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_NumberOther_t NW_Unicode_NumberOther = { - { { &NW_Unicode_NumberOther_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherControl.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherControl.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_OtherControlI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherControl_Table[] = { - { 0x00000000, 0x0000001f, 0x01 }, - { 0x0000007f, 0x0000009f, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherControl_Class_t NW_Unicode_OtherControl_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_OtherControl_Table) - / sizeof(*_NW_Unicode_OtherControl_Table), - /* table */ _NW_Unicode_OtherControl_Table - }, - { /* NW_Unicode_OtherControl */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherControl_t NW_Unicode_OtherControl = { - { { &NW_Unicode_OtherControl_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherFormat.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherFormat.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_OtherFormatI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherFormat_Table[] = { - { 0x0000070f, 0x0000070f, 0x00 }, - { 0x0000180b, 0x0000180e, 0x01 }, - { 0x0000200c, 0x0000200f, 0x01 }, - { 0x0000202a, 0x0000202e, 0x01 }, - { 0x0000206a, 0x0000206f, 0x01 }, - { 0x0000feff, 0x0000feff, 0x00 }, - { 0x0000fff9, 0x0000fffb, 0x01 }, - { 0x0001d173, 0x0001d17a, 0x01 }, - { 0x000e0001, 0x000e0001, 0x00 }, - { 0x000e0020, 0x000e007f, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherFormat_Class_t NW_Unicode_OtherFormat_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_OtherFormat_Table) - / sizeof(*_NW_Unicode_OtherFormat_Table), - /* table */ _NW_Unicode_OtherFormat_Table - }, - { /* NW_Unicode_OtherFormat */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherFormat_t NW_Unicode_OtherFormat = { - { { &NW_Unicode_OtherFormat_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherNotAssigned.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherNotAssigned.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_OtherNotAssignedI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherNotAssigned_Class_t NW_Unicode_OtherNotAssigned_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ 0, - /* table */ NULL - }, - { /* NW_Unicode_OtherNotAssigned */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherNotAssigned_t NW_Unicode_OtherNotAssigned = { - { { &NW_Unicode_OtherNotAssigned_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherPrivateUse.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherPrivateUse.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_OtherPrivateUseI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherPrivateUse_Table[] = { - { 0x0000e000, 0x0000e000, 0x00 }, - { 0x0000f8ff, 0x0000f8ff, 0x00 }, - { 0x000f0000, 0x000f0000, 0x00 }, - { 0x000ffffd, 0x000ffffd, 0x00 }, - { 0x00100000, 0x00100000, 0x00 }, - { 0x0010fffd, 0x0010fffd, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherPrivateUse_Class_t NW_Unicode_OtherPrivateUse_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_OtherPrivateUse_Table) - / sizeof(*_NW_Unicode_OtherPrivateUse_Table), - /* table */ _NW_Unicode_OtherPrivateUse_Table - }, - { /* NW_Unicode_OtherPrivateUse */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherPrivateUse_t NW_Unicode_OtherPrivateUse = { - { { &NW_Unicode_OtherPrivateUse_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherSurrogate.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_OtherSurrogate.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_OtherSurrogateI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_OtherSurrogate_Table[] = { - { 0x0000d800, 0x0000d800, 0x00 }, - { 0x0000db7f, 0x0000db7f, 0x00 }, - { 0x0000db80, 0x0000db80, 0x00 }, - { 0x0000dbff, 0x0000dbff, 0x00 }, - { 0x0000dc00, 0x0000dc00, 0x00 }, - { 0x0000dfff, 0x0000dfff, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherSurrogate_Class_t NW_Unicode_OtherSurrogate_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_OtherSurrogate_Table) - / sizeof(*_NW_Unicode_OtherSurrogate_Table), - /* table */ _NW_Unicode_OtherSurrogate_Table - }, - { /* NW_Unicode_OtherSurrogate */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_OtherSurrogate_t NW_Unicode_OtherSurrogate = { - { { &NW_Unicode_OtherSurrogate_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationClose.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationClose.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationCloseI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationClose_Table[] = { - { 0x00000029, 0x00000029, 0x00 }, - { 0x0000005d, 0x0000005d, 0x00 }, - { 0x0000007d, 0x0000007d, 0x00 }, - { 0x00000f3b, 0x00000f3b, 0x00 }, - { 0x00000f3d, 0x00000f3d, 0x00 }, - { 0x0000169c, 0x0000169c, 0x00 }, - { 0x00002046, 0x00002046, 0x00 }, - { 0x0000207e, 0x0000207e, 0x00 }, - { 0x0000208e, 0x0000208e, 0x00 }, - { 0x0000232a, 0x0000232a, 0x00 }, - { 0x00003009, 0x00003011, 0x02 }, - { 0x00003015, 0x0000301b, 0x02 }, - { 0x0000301e, 0x0000301e, 0x00 }, - { 0x0000301f, 0x0000301f, 0x00 }, - { 0x0000fd3f, 0x0000fd3f, 0x00 }, - { 0x0000fe36, 0x0000fe44, 0x02 }, - { 0x0000fe5a, 0x0000fe5e, 0x02 }, - { 0x0000ff09, 0x0000ff09, 0x00 }, - { 0x0000ff3d, 0x0000ff3d, 0x00 }, - { 0x0000ff5d, 0x0000ff5d, 0x00 }, - { 0x0000ff63, 0x0000ff63, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationClose_Class_t NW_Unicode_PunctuationClose_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationClose_Table) - / sizeof(*_NW_Unicode_PunctuationClose_Table), - /* table */ _NW_Unicode_PunctuationClose_Table - }, - { /* NW_Unicode_PunctuationClose */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationClose_t NW_Unicode_PunctuationClose = { - { { &NW_Unicode_PunctuationClose_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationConnector.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationConnector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationConnectorI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationConnector_Table[] = { - { 0x0000005f, 0x0000005f, 0x00 }, - { 0x0000203f, 0x0000203f, 0x00 }, - { 0x00002040, 0x00002040, 0x00 }, - { 0x000030fb, 0x000030fb, 0x00 }, - { 0x0000fe33, 0x0000fe33, 0x00 }, - { 0x0000fe34, 0x0000fe34, 0x00 }, - { 0x0000fe4d, 0x0000fe4f, 0x01 }, - { 0x0000ff3f, 0x0000ff3f, 0x00 }, - { 0x0000ff65, 0x0000ff65, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationConnector_Class_t NW_Unicode_PunctuationConnector_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationConnector_Table) - / sizeof(*_NW_Unicode_PunctuationConnector_Table), - /* table */ _NW_Unicode_PunctuationConnector_Table - }, - { /* NW_Unicode_PunctuationConnector */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationConnector_t NW_Unicode_PunctuationConnector = { - { { &NW_Unicode_PunctuationConnector_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationDash.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationDash.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationDashI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationDash_Table[] = { - { 0x0000002d, 0x0000002d, 0x00 }, - { 0x000000ad, 0x000000ad, 0x00 }, - { 0x0000058a, 0x0000058a, 0x00 }, - { 0x00001806, 0x00001806, 0x00 }, - { 0x00002010, 0x00002015, 0x01 }, - { 0x0000301c, 0x0000301c, 0x00 }, - { 0x00003030, 0x00003030, 0x00 }, - { 0x0000fe31, 0x0000fe31, 0x00 }, - { 0x0000fe32, 0x0000fe32, 0x00 }, - { 0x0000fe58, 0x0000fe58, 0x00 }, - { 0x0000fe63, 0x0000fe63, 0x00 }, - { 0x0000ff0d, 0x0000ff0d, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationDash_Class_t NW_Unicode_PunctuationDash_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationDash_Table) - / sizeof(*_NW_Unicode_PunctuationDash_Table), - /* table */ _NW_Unicode_PunctuationDash_Table - }, - { /* NW_Unicode_PunctuationDash */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationDash_t NW_Unicode_PunctuationDash = { - { { &NW_Unicode_PunctuationDash_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationFinal.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationFinal.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationFinalI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationFinal_Table[] = { - { 0x000000bb, 0x000000bb, 0x00 }, - { 0x00002019, 0x00002019, 0x00 }, - { 0x0000201d, 0x0000201d, 0x00 }, - { 0x0000203a, 0x0000203a, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationFinal_Class_t NW_Unicode_PunctuationFinal_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationFinal_Table) - / sizeof(*_NW_Unicode_PunctuationFinal_Table), - /* table */ _NW_Unicode_PunctuationFinal_Table - }, - { /* NW_Unicode_PunctuationFinal */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationFinal_t NW_Unicode_PunctuationFinal = { - { { &NW_Unicode_PunctuationFinal_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationInitial.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationInitial.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationInitialI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationInitial_Table[] = { - { 0x000000ab, 0x000000ab, 0x00 }, - { 0x00002018, 0x00002018, 0x00 }, - { 0x0000201b, 0x0000201b, 0x00 }, - { 0x0000201c, 0x0000201c, 0x00 }, - { 0x0000201f, 0x0000201f, 0x00 }, - { 0x00002039, 0x00002039, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationInitial_Class_t NW_Unicode_PunctuationInitial_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationInitial_Table) - / sizeof(*_NW_Unicode_PunctuationInitial_Table), - /* table */ _NW_Unicode_PunctuationInitial_Table - }, - { /* NW_Unicode_PunctuationInitial */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationInitial_t NW_Unicode_PunctuationInitial = { - { { &NW_Unicode_PunctuationInitial_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationOpen.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationOpen.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationOpenI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationOpen_Table[] = { - { 0x00000028, 0x00000028, 0x00 }, - { 0x0000005b, 0x0000005b, 0x00 }, - { 0x0000007b, 0x0000007b, 0x00 }, - { 0x00000f3a, 0x00000f3a, 0x00 }, - { 0x00000f3c, 0x00000f3c, 0x00 }, - { 0x0000169b, 0x0000169b, 0x00 }, - { 0x0000201a, 0x0000201a, 0x00 }, - { 0x0000201e, 0x0000201e, 0x00 }, - { 0x00002045, 0x00002045, 0x00 }, - { 0x0000207d, 0x0000207d, 0x00 }, - { 0x0000208d, 0x0000208d, 0x00 }, - { 0x00002329, 0x00002329, 0x00 }, - { 0x00003008, 0x00003010, 0x02 }, - { 0x00003014, 0x0000301a, 0x02 }, - { 0x0000301d, 0x0000301d, 0x00 }, - { 0x0000fd3e, 0x0000fd3e, 0x00 }, - { 0x0000fe35, 0x0000fe43, 0x02 }, - { 0x0000fe59, 0x0000fe5d, 0x02 }, - { 0x0000ff08, 0x0000ff08, 0x00 }, - { 0x0000ff3b, 0x0000ff3b, 0x00 }, - { 0x0000ff5b, 0x0000ff5b, 0x00 }, - { 0x0000ff62, 0x0000ff62, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationOpen_Class_t NW_Unicode_PunctuationOpen_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationOpen_Table) - / sizeof(*_NW_Unicode_PunctuationOpen_Table), - /* table */ _NW_Unicode_PunctuationOpen_Table - }, - { /* NW_Unicode_PunctuationOpen */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationOpen_t NW_Unicode_PunctuationOpen = { - { { &NW_Unicode_PunctuationOpen_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationOther.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_PunctuationOther.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_PunctuationOtherI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_PunctuationOther_Table[] = { - { 0x00000021, 0x00000023, 0x01 }, - { 0x00000025, 0x00000027, 0x01 }, - { 0x0000002a, 0x0000002e, 0x02 }, - { 0x0000002f, 0x0000002f, 0x00 }, - { 0x0000003a, 0x0000003a, 0x00 }, - { 0x0000003b, 0x0000003b, 0x00 }, - { 0x0000003f, 0x0000003f, 0x00 }, - { 0x00000040, 0x00000040, 0x00 }, - { 0x0000005c, 0x0000005c, 0x00 }, - { 0x000000a1, 0x000000a1, 0x00 }, - { 0x000000b7, 0x000000b7, 0x00 }, - { 0x000000bf, 0x000000bf, 0x00 }, - { 0x0000037e, 0x0000037e, 0x00 }, - { 0x00000387, 0x00000387, 0x00 }, - { 0x0000055a, 0x0000055f, 0x01 }, - { 0x00000589, 0x00000589, 0x00 }, - { 0x000005be, 0x000005be, 0x00 }, - { 0x000005c0, 0x000005c0, 0x00 }, - { 0x000005c3, 0x000005c3, 0x00 }, - { 0x000005f3, 0x000005f3, 0x00 }, - { 0x000005f4, 0x000005f4, 0x00 }, - { 0x0000060c, 0x0000060c, 0x00 }, - { 0x0000061b, 0x0000061b, 0x00 }, - { 0x0000061f, 0x0000061f, 0x00 }, - { 0x0000066a, 0x0000066d, 0x01 }, - { 0x000006d4, 0x000006d4, 0x00 }, - { 0x00000700, 0x0000070d, 0x01 }, - { 0x00000964, 0x00000964, 0x00 }, - { 0x00000965, 0x00000965, 0x00 }, - { 0x00000970, 0x00000970, 0x00 }, - { 0x00000df4, 0x00000df4, 0x00 }, - { 0x00000e4f, 0x00000e4f, 0x00 }, - { 0x00000e5a, 0x00000e5a, 0x00 }, - { 0x00000e5b, 0x00000e5b, 0x00 }, - { 0x00000f04, 0x00000f12, 0x01 }, - { 0x00000f85, 0x00000f85, 0x00 }, - { 0x0000104a, 0x0000104f, 0x01 }, - { 0x000010fb, 0x000010fb, 0x00 }, - { 0x00001361, 0x00001368, 0x01 }, - { 0x0000166d, 0x0000166d, 0x00 }, - { 0x0000166e, 0x0000166e, 0x00 }, - { 0x000016eb, 0x000016ed, 0x01 }, - { 0x000017d4, 0x000017da, 0x01 }, - { 0x000017dc, 0x000017dc, 0x00 }, - { 0x00001800, 0x00001805, 0x01 }, - { 0x00001807, 0x0000180a, 0x01 }, - { 0x00002016, 0x00002016, 0x00 }, - { 0x00002017, 0x00002017, 0x00 }, - { 0x00002020, 0x00002027, 0x01 }, - { 0x00002030, 0x00002038, 0x01 }, - { 0x0000203b, 0x0000203e, 0x01 }, - { 0x00002041, 0x00002043, 0x01 }, - { 0x00002048, 0x0000204d, 0x01 }, - { 0x00003001, 0x00003003, 0x01 }, - { 0x0000fe30, 0x0000fe30, 0x00 }, - { 0x0000fe49, 0x0000fe4c, 0x01 }, - { 0x0000fe50, 0x0000fe52, 0x01 }, - { 0x0000fe54, 0x0000fe57, 0x01 }, - { 0x0000fe5f, 0x0000fe61, 0x01 }, - { 0x0000fe68, 0x0000fe68, 0x00 }, - { 0x0000fe6a, 0x0000fe6a, 0x00 }, - { 0x0000fe6b, 0x0000fe6b, 0x00 }, - { 0x0000ff01, 0x0000ff03, 0x01 }, - { 0x0000ff05, 0x0000ff07, 0x01 }, - { 0x0000ff0a, 0x0000ff0e, 0x02 }, - { 0x0000ff0f, 0x0000ff0f, 0x00 }, - { 0x0000ff1a, 0x0000ff1a, 0x00 }, - { 0x0000ff1b, 0x0000ff1b, 0x00 }, - { 0x0000ff1f, 0x0000ff1f, 0x00 }, - { 0x0000ff20, 0x0000ff20, 0x00 }, - { 0x0000ff3c, 0x0000ff3c, 0x00 }, - { 0x0000ff61, 0x0000ff61, 0x00 }, - { 0x0000ff64, 0x0000ff64, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationOther_Class_t NW_Unicode_PunctuationOther_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_PunctuationOther_Table) - / sizeof(*_NW_Unicode_PunctuationOther_Table), - /* table */ _NW_Unicode_PunctuationOther_Table - }, - { /* NW_Unicode_PunctuationOther */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_PunctuationOther_t NW_Unicode_PunctuationOther = { - { { &NW_Unicode_PunctuationOther_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorLine.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorLine.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SeparatorLineI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorLine_Table[] = { - { 0x00002028, 0x00002028, 0x00 }, - { 0x00002028, 0x00002028, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorLine_Class_t NW_Unicode_SeparatorLine_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SeparatorLine_Table) - / sizeof(*_NW_Unicode_SeparatorLine_Table), - /* table */ _NW_Unicode_SeparatorLine_Table - }, - { /* NW_Unicode_SeparatorLine */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorLine_t NW_Unicode_SeparatorLine = { - { { &NW_Unicode_SeparatorLine_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorParagraph.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorParagraph.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SeparatorParagraphI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorParagraph_Table[] = { - { 0x00002029, 0x00002029, 0x00 }, - { 0x00002029, 0x00002029, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorParagraph_Class_t NW_Unicode_SeparatorParagraph_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SeparatorParagraph_Table) - / sizeof(*_NW_Unicode_SeparatorParagraph_Table), - /* table */ _NW_Unicode_SeparatorParagraph_Table - }, - { /* NW_Unicode_SeparatorParagraph */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorParagraph_t NW_Unicode_SeparatorParagraph = { - { { &NW_Unicode_SeparatorParagraph_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorSpace.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SeparatorSpace.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SeparatorSpaceI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SeparatorSpace_Table[] = { - { 0x00000020, 0x00000020, 0x00 }, - { 0x000000a0, 0x000000a0, 0x00 }, - { 0x00001680, 0x00001680, 0x00 }, - { 0x00002000, 0x0000200b, 0x01 }, - { 0x0000202f, 0x0000202f, 0x00 }, - { 0x00003000, 0x00003000, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorSpace_Class_t NW_Unicode_SeparatorSpace_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SeparatorSpace_Table) - / sizeof(*_NW_Unicode_SeparatorSpace_Table), - /* table */ _NW_Unicode_SeparatorSpace_Table - }, - { /* NW_Unicode_SeparatorSpace */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SeparatorSpace_t NW_Unicode_SeparatorSpace = { - { { &NW_Unicode_SeparatorSpace_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolCurrency.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolCurrency.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SymbolCurrencyI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolCurrency_Table[] = { - { 0x00000024, 0x00000024, 0x00 }, - { 0x000000a2, 0x000000a5, 0x01 }, - { 0x000009f2, 0x000009f2, 0x00 }, - { 0x000009f3, 0x000009f3, 0x00 }, - { 0x00000e3f, 0x00000e3f, 0x00 }, - { 0x000017db, 0x000017db, 0x00 }, - { 0x000020a0, 0x000020af, 0x01 }, - { 0x0000fe69, 0x0000fe69, 0x00 }, - { 0x0000ff04, 0x0000ff04, 0x00 }, - { 0x0000ffe0, 0x0000ffe0, 0x00 }, - { 0x0000ffe1, 0x0000ffe1, 0x00 }, - { 0x0000ffe5, 0x0000ffe5, 0x00 }, - { 0x0000ffe6, 0x0000ffe6, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolCurrency_Class_t NW_Unicode_SymbolCurrency_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SymbolCurrency_Table) - / sizeof(*_NW_Unicode_SymbolCurrency_Table), - /* table */ _NW_Unicode_SymbolCurrency_Table - }, - { /* NW_Unicode_SymbolCurrency */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolCurrency_t NW_Unicode_SymbolCurrency = { - { { &NW_Unicode_SymbolCurrency_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolMath.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolMath.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SymbolMathI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolMath_Table[] = { - { 0x0000002b, 0x0000002b, 0x00 }, - { 0x0000003c, 0x0000003e, 0x01 }, - { 0x0000007c, 0x0000007c, 0x00 }, - { 0x0000007e, 0x0000007e, 0x00 }, - { 0x000000ac, 0x000000ac, 0x00 }, - { 0x000000b1, 0x000000b1, 0x00 }, - { 0x000000d7, 0x000000d7, 0x00 }, - { 0x000000f7, 0x000000f7, 0x00 }, - { 0x00002044, 0x00002044, 0x00 }, - { 0x0000207a, 0x0000207c, 0x01 }, - { 0x0000208a, 0x0000208c, 0x01 }, - { 0x00002190, 0x00002194, 0x01 }, - { 0x0000219a, 0x0000219a, 0x00 }, - { 0x0000219b, 0x0000219b, 0x00 }, - { 0x000021a0, 0x000021a6, 0x03 }, - { 0x000021ae, 0x000021ae, 0x00 }, - { 0x000021ce, 0x000021ce, 0x00 }, - { 0x000021cf, 0x000021cf, 0x00 }, - { 0x000021d2, 0x000021d2, 0x00 }, - { 0x000021d4, 0x000021d4, 0x00 }, - { 0x00002200, 0x000022f1, 0x01 }, - { 0x00002308, 0x0000230b, 0x01 }, - { 0x00002320, 0x00002320, 0x00 }, - { 0x00002321, 0x00002321, 0x00 }, - { 0x000025b7, 0x000025b7, 0x00 }, - { 0x000025c1, 0x000025c1, 0x00 }, - { 0x0000266f, 0x0000266f, 0x00 }, - { 0x0000fb29, 0x0000fb29, 0x00 }, - { 0x0000fe62, 0x0000fe62, 0x00 }, - { 0x0000fe64, 0x0000fe66, 0x01 }, - { 0x0000ff0b, 0x0000ff0b, 0x00 }, - { 0x0000ff1c, 0x0000ff1e, 0x01 }, - { 0x0000ff5c, 0x0000ff5c, 0x00 }, - { 0x0000ff5e, 0x0000ff5e, 0x00 }, - { 0x0000ffe2, 0x0000ffe2, 0x00 }, - { 0x0000ffe9, 0x0000ffec, 0x01 }, - { 0x0001d6c1, 0x0001d6c1, 0x00 }, - { 0x0001d6db, 0x0001d6db, 0x00 }, - { 0x0001d6fb, 0x0001d6fb, 0x00 }, - { 0x0001d715, 0x0001d715, 0x00 }, - { 0x0001d735, 0x0001d735, 0x00 }, - { 0x0001d74f, 0x0001d74f, 0x00 }, - { 0x0001d76f, 0x0001d76f, 0x00 }, - { 0x0001d789, 0x0001d789, 0x00 }, - { 0x0001d7a9, 0x0001d7a9, 0x00 }, - { 0x0001d7c3, 0x0001d7c3, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolMath_Class_t NW_Unicode_SymbolMath_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SymbolMath_Table) - / sizeof(*_NW_Unicode_SymbolMath_Table), - /* table */ _NW_Unicode_SymbolMath_Table - }, - { /* NW_Unicode_SymbolMath */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolMath_t NW_Unicode_SymbolMath = { - { { &NW_Unicode_SymbolMath_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolModifier.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolModifier.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SymbolModifierI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolModifier_Table[] = { - { 0x0000005e, 0x0000005e, 0x00 }, - { 0x00000060, 0x00000060, 0x00 }, - { 0x000000a8, 0x000000a8, 0x00 }, - { 0x000000af, 0x000000af, 0x00 }, - { 0x000000b4, 0x000000b4, 0x00 }, - { 0x000000b8, 0x000000b8, 0x00 }, - { 0x000002b9, 0x000002b9, 0x00 }, - { 0x000002ba, 0x000002ba, 0x00 }, - { 0x000002c2, 0x000002cf, 0x01 }, - { 0x000002d2, 0x000002df, 0x01 }, - { 0x000002e5, 0x000002ed, 0x01 }, - { 0x00000374, 0x00000374, 0x00 }, - { 0x00000375, 0x00000375, 0x00 }, - { 0x00000384, 0x00000384, 0x00 }, - { 0x00000385, 0x00000385, 0x00 }, - { 0x00001fbd, 0x00001fbd, 0x00 }, - { 0x00001fbf, 0x00001fc1, 0x01 }, - { 0x00001fcd, 0x00001fcf, 0x01 }, - { 0x00001fdd, 0x00001fdf, 0x01 }, - { 0x00001fed, 0x00001fef, 0x01 }, - { 0x00001ffd, 0x00001ffd, 0x00 }, - { 0x00001ffe, 0x00001ffe, 0x00 }, - { 0x0000309b, 0x0000309b, 0x00 }, - { 0x0000309c, 0x0000309c, 0x00 }, - { 0x0000ff3e, 0x0000ff3e, 0x00 }, - { 0x0000ff40, 0x0000ff40, 0x00 }, - { 0x0000ffe3, 0x0000ffe3, 0x00 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolModifier_Class_t NW_Unicode_SymbolModifier_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SymbolModifier_Table) - / sizeof(*_NW_Unicode_SymbolModifier_Table), - /* table */ _NW_Unicode_SymbolModifier_Table - }, - { /* NW_Unicode_SymbolModifier */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolModifier_t NW_Unicode_SymbolModifier = { - { { &NW_Unicode_SymbolModifier_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolOther.c --- a/webengine/wmlengine/src/Unicode/src/NW_Unicode_SymbolOther.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_SymbolOtherI.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_SymbolOther_Table[] = { - { 0x000000a6, 0x000000a6, 0x00 }, - { 0x000000a7, 0x000000a7, 0x00 }, - { 0x000000a9, 0x000000a9, 0x00 }, - { 0x000000ae, 0x000000ae, 0x00 }, - { 0x000000b0, 0x000000b0, 0x00 }, - { 0x000000b6, 0x000000b6, 0x00 }, - { 0x00000482, 0x00000482, 0x00 }, - { 0x000006e9, 0x000006e9, 0x00 }, - { 0x000006fd, 0x000006fd, 0x00 }, - { 0x000006fe, 0x000006fe, 0x00 }, - { 0x000009fa, 0x000009fa, 0x00 }, - { 0x00000b70, 0x00000b70, 0x00 }, - { 0x00000f01, 0x00000f03, 0x01 }, - { 0x00000f13, 0x00000f17, 0x01 }, - { 0x00000f1a, 0x00000f1f, 0x01 }, - { 0x00000f34, 0x00000f38, 0x02 }, - { 0x00000fbe, 0x00000fc5, 0x01 }, - { 0x00000fc7, 0x00000fcc, 0x01 }, - { 0x00000fcf, 0x00000fcf, 0x00 }, - { 0x00002100, 0x00002100, 0x00 }, - { 0x00002101, 0x00002101, 0x00 }, - { 0x00002103, 0x00002106, 0x01 }, - { 0x00002108, 0x00002108, 0x00 }, - { 0x00002109, 0x00002109, 0x00 }, - { 0x00002114, 0x00002114, 0x00 }, - { 0x00002116, 0x00002118, 0x01 }, - { 0x0000211e, 0x00002123, 0x01 }, - { 0x00002125, 0x00002129, 0x02 }, - { 0x0000212e, 0x0000212e, 0x00 }, - { 0x00002132, 0x00002132, 0x00 }, - { 0x0000213a, 0x0000213a, 0x00 }, - { 0x00002195, 0x00002199, 0x01 }, - { 0x0000219c, 0x0000219f, 0x01 }, - { 0x000021a1, 0x000021a1, 0x00 }, - { 0x000021a2, 0x000021a2, 0x00 }, - { 0x000021a4, 0x000021a4, 0x00 }, - { 0x000021a5, 0x000021a5, 0x00 }, - { 0x000021a7, 0x000021ad, 0x01 }, - { 0x000021af, 0x000021cd, 0x01 }, - { 0x000021d0, 0x000021d0, 0x00 }, - { 0x000021d1, 0x000021d5, 0x02 }, - { 0x000021d6, 0x000021f3, 0x01 }, - { 0x00002300, 0x00002307, 0x01 }, - { 0x0000230c, 0x0000231f, 0x01 }, - { 0x00002322, 0x00002328, 0x01 }, - { 0x0000232b, 0x0000237b, 0x01 }, - { 0x0000237d, 0x0000239a, 0x01 }, - { 0x00002400, 0x00002426, 0x01 }, - { 0x00002440, 0x0000244a, 0x01 }, - { 0x0000249c, 0x000024e9, 0x01 }, - { 0x00002500, 0x00002595, 0x01 }, - { 0x000025a0, 0x000025b6, 0x01 }, - { 0x000025b8, 0x000025c0, 0x01 }, - { 0x000025c2, 0x000025f7, 0x01 }, - { 0x00002600, 0x00002613, 0x01 }, - { 0x00002619, 0x0000266e, 0x01 }, - { 0x00002670, 0x00002670, 0x00 }, - { 0x00002671, 0x00002671, 0x00 }, - { 0x00002701, 0x00002704, 0x01 }, - { 0x00002706, 0x00002709, 0x01 }, - { 0x0000270c, 0x00002727, 0x01 }, - { 0x00002729, 0x0000274b, 0x01 }, - { 0x0000274d, 0x0000274d, 0x00 }, - { 0x0000274f, 0x00002752, 0x01 }, - { 0x00002756, 0x00002756, 0x00 }, - { 0x00002758, 0x0000275e, 0x01 }, - { 0x00002761, 0x00002767, 0x01 }, - { 0x00002794, 0x00002794, 0x00 }, - { 0x00002798, 0x000027af, 0x01 }, - { 0x000027b1, 0x000027be, 0x01 }, - { 0x00002800, 0x000028ff, 0x01 }, - { 0x00002e80, 0x00002e99, 0x01 }, - { 0x00002e9b, 0x00002ef3, 0x01 }, - { 0x00002f00, 0x00002fd5, 0x01 }, - { 0x00002ff0, 0x00002ffb, 0x01 }, - { 0x00003004, 0x00003004, 0x00 }, - { 0x00003012, 0x00003012, 0x00 }, - { 0x00003013, 0x00003013, 0x00 }, - { 0x00003020, 0x00003020, 0x00 }, - { 0x00003036, 0x00003036, 0x00 }, - { 0x00003037, 0x00003037, 0x00 }, - { 0x0000303e, 0x0000303e, 0x00 }, - { 0x0000303f, 0x0000303f, 0x00 }, - { 0x00003190, 0x00003190, 0x00 }, - { 0x00003191, 0x00003191, 0x00 }, - { 0x00003196, 0x0000319f, 0x01 }, - { 0x00003200, 0x0000321c, 0x01 }, - { 0x0000322a, 0x00003243, 0x01 }, - { 0x00003260, 0x0000327b, 0x01 }, - { 0x0000327f, 0x0000327f, 0x00 }, - { 0x0000328a, 0x000032b0, 0x01 }, - { 0x000032c0, 0x000032cb, 0x01 }, - { 0x000032d0, 0x000032fe, 0x01 }, - { 0x00003300, 0x00003376, 0x01 }, - { 0x0000337b, 0x000033dd, 0x01 }, - { 0x000033e0, 0x000033fe, 0x01 }, - { 0x0000a490, 0x0000a4a1, 0x01 }, - { 0x0000a4a4, 0x0000a4b3, 0x01 }, - { 0x0000a4b5, 0x0000a4c0, 0x01 }, - { 0x0000a4c2, 0x0000a4c4, 0x01 }, - { 0x0000a4c6, 0x0000a4c6, 0x00 }, - { 0x0000ffe4, 0x0000ffe4, 0x00 }, - { 0x0000ffe8, 0x0000ffe8, 0x00 }, - { 0x0000ffed, 0x0000ffed, 0x00 }, - { 0x0000ffee, 0x0000ffee, 0x00 }, - { 0x0000fffc, 0x0000fffc, 0x00 }, - { 0x0000fffd, 0x0000fffd, 0x00 }, - { 0x0001d000, 0x0001d0f5, 0x01 }, - { 0x0001d100, 0x0001d126, 0x01 }, - { 0x0001d12a, 0x0001d164, 0x01 }, - { 0x0001d16a, 0x0001d16c, 0x01 }, - { 0x0001d183, 0x0001d183, 0x00 }, - { 0x0001d184, 0x0001d184, 0x00 }, - { 0x0001d18c, 0x0001d1a9, 0x01 }, - { 0x0001d1ae, 0x0001d1dd, 0x01 }, -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolOther_Class_t NW_Unicode_SymbolOther_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_Unicode_Category_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category */ - /* tableSize */ sizeof(_NW_Unicode_SymbolOther_Table) - / sizeof(*_NW_Unicode_SymbolOther_Table), - /* table */ _NW_Unicode_SymbolOther_Table - }, - { /* NW_Unicode_SymbolOther */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_SymbolOther_t NW_Unicode_SymbolOther = { - { { &NW_Unicode_SymbolOther_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/NW_Unicode_%EMPTY%.c --- a/webengine/wmlengine/src/Unicode/tools/NW_Unicode_%EMPTY%.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Unicode_%NAME%I.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_%NAME%_Class_t NW_Unicode_%NAME%_Class = { - { /* NW_Object_Core %SPACE%*/ - /* superclass %SPACE%*/ &NW_Unicode_Category_Class, - /* queryInterface %SPACE%*/ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category%SPACE%*/ - /* tableSize %SPACE%*/ 0, - /* table %SPACE%*/ NULL - }, - { /* NW_Unicode_%NAME% */ - /* unused %SPACE%*/ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_%NAME%_t NW_Unicode_%NAME% = { - { { &NW_Unicode_%NAME%_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.c.post --- a/webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.c.post Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_%NAME%_Class_t NW_Unicode_%NAME%_Class = { - { /* NW_Object_Core %SPACE%*/ - /* superclass %SPACE%*/ &NW_Unicode_Category_Class, - /* queryInterface %SPACE%*/ _NW_Object_Core_QueryInterface - }, - { /* NW_Unicode_Category%SPACE%*/ - /* tableSize %SPACE%*/ sizeof(_NW_Unicode_%NAME%_Table) - / sizeof(*_NW_Unicode_%NAME%_Table), - /* table %SPACE%*/ _NW_Unicode_%NAME%_Table - }, - { /* NW_Unicode_%NAME% */ - /* unused %SPACE%*/ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_%NAME%_t NW_Unicode_%NAME% = { - { { &NW_Unicode_%NAME%_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.c.pre --- a/webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.c.pre Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* ------------------------------------------------------------------------- * - Copyright 2000 - 2001 Nokia Corporation All rights reserved. - Nokia Americas - 6000 Connection Drive - Irving, Texas 75039 - - Restricted Rights: Use, duplication, or disclosure by the - U.S. Government is subject to restrictions as set forth in - subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR - 52.227-19, or in FAR 52.227-14 Alt. III, as applicable. - - This software is proprietary to and embodies the - confidential technology of Nokia Possession, use, or copying - of this software and media is authorized only pursuant to a - valid written license from Nokia or an authorized - sublicensor. - - Nokia - Wireless Software Solutions - * ------------------------------------------------------------------------- */ - -#include "NW_Unicode_%NAME%I.h" - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Unicode_Category_TableEntry_t _NW_Unicode_%NAME%_Table[] = { diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.h --- a/webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_%NAME%_h_ -#define _NW_Unicode_%NAME%_h_ - -#include "NW_Unicode_Category.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_%NAME%_Class_s NW_Unicode_%NAME%_Class_t; -typedef struct NW_Unicode_%NAME%_s NW_Unicode_%NAME%_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Unicode_%NAME%_ClassPart_s { - void** unused; -} NW_Unicode_%NAME%_ClassPart_t; - -struct NW_Unicode_%NAME%_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Unicode_Category_ClassPart_t NW_Unicode_Category; - NW_Unicode_%NAME%_ClassPart_t NW_Unicode_%NAME%; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Unicode_%NAME%_s { - NW_Unicode_Category_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Unicode_%NAME%_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Unicode_%NAME%)) - -#define NW_Unicode_%NAME%Of(object) \ - (NW_Object_Cast (object, NW_Unicode_%NAME%)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Unicode_%NAME%_Class_t NW_Unicode_%NAME%_Class; -extern const NW_Unicode_%NAME%_t NW_Unicode_%NAME%; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_Unicode_Is%NAME%(_code) \ - (NW_Unicode_Category_IsMemberOf (&NW_Unicode_%NAME%, (_code))) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _NW_Unicode_%NAME%_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%I.h --- a/webengine/wmlengine/src/Unicode/tools/NW_Unicode_%NAME%I.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Unicode_%NAME%I_h_ -#define _NW_Unicode_%NAME%I_h_ - -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_%NAME%.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -extern const NW_Unicode_Category_TableEntry_t _NW_Unicode_%NAME%_Table[]; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _NW_Unicode_%NAME%I_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/UnicodeData.txt --- a/webengine/wmlengine/src/Unicode/tools/UnicodeData.txt Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12858 +0,0 @@ -0000;<control>;Cc;0;BN;;;;;N;NULL;;;; -0001;<control>;Cc;0;BN;;;;;N;START OF HEADING;;;; -0002;<control>;Cc;0;BN;;;;;N;START OF TEXT;;;; -0003;<control>;Cc;0;BN;;;;;N;END OF TEXT;;;; -0004;<control>;Cc;0;BN;;;;;N;END OF TRANSMISSION;;;; -0005;<control>;Cc;0;BN;;;;;N;ENQUIRY;;;; -0006;<control>;Cc;0;BN;;;;;N;ACKNOWLEDGE;;;; -0007;<control>;Cc;0;BN;;;;;N;BELL;;;; -0008;<control>;Cc;0;BN;;;;;N;BACKSPACE;;;; -0009;<control>;Cc;0;S;;;;;N;HORIZONTAL TABULATION;;;; -000A;<control>;Cc;0;B;;;;;N;LINE FEED;;;; -000B;<control>;Cc;0;S;;;;;N;VERTICAL TABULATION;;;; -000C;<control>;Cc;0;WS;;;;;N;FORM FEED;;;; -000D;<control>;Cc;0;B;;;;;N;CARRIAGE RETURN;;;; -000E;<control>;Cc;0;BN;;;;;N;SHIFT OUT;;;; -000F;<control>;Cc;0;BN;;;;;N;SHIFT IN;;;; -0010;<control>;Cc;0;BN;;;;;N;DATA LINK ESCAPE;;;; -0011;<control>;Cc;0;BN;;;;;N;DEVICE CONTROL ONE;;;; -0012;<control>;Cc;0;BN;;;;;N;DEVICE CONTROL TWO;;;; -0013;<control>;Cc;0;BN;;;;;N;DEVICE CONTROL THREE;;;; -0014;<control>;Cc;0;BN;;;;;N;DEVICE CONTROL FOUR;;;; -0015;<control>;Cc;0;BN;;;;;N;NEGATIVE ACKNOWLEDGE;;;; -0016;<control>;Cc;0;BN;;;;;N;SYNCHRONOUS IDLE;;;; -0017;<control>;Cc;0;BN;;;;;N;END OF TRANSMISSION BLOCK;;;; -0018;<control>;Cc;0;BN;;;;;N;CANCEL;;;; -0019;<control>;Cc;0;BN;;;;;N;END OF MEDIUM;;;; -001A;<control>;Cc;0;BN;;;;;N;SUBSTITUTE;;;; -001B;<control>;Cc;0;BN;;;;;N;ESCAPE;;;; -001C;<control>;Cc;0;B;;;;;N;FILE SEPARATOR;;;; -001D;<control>;Cc;0;B;;;;;N;GROUP SEPARATOR;;;; -001E;<control>;Cc;0;B;;;;;N;RECORD SEPARATOR;;;; -001F;<control>;Cc;0;S;;;;;N;UNIT SEPARATOR;;;; -0020;SPACE;Zs;0;WS;;;;;N;;;;; -0021;EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; -0022;QUOTATION MARK;Po;0;ON;;;;;N;;;;; -0023;NUMBER SIGN;Po;0;ET;;;;;N;;;;; -0024;DOLLAR SIGN;Sc;0;ET;;;;;N;;;;; -0025;PERCENT SIGN;Po;0;ET;;;;;N;;;;; -0026;AMPERSAND;Po;0;ON;;;;;N;;;;; -0027;APOSTROPHE;Po;0;ON;;;;;N;APOSTROPHE-QUOTE;;;; -0028;LEFT PARENTHESIS;Ps;0;ON;;;;;Y;OPENING PARENTHESIS;;;; -0029;RIGHT PARENTHESIS;Pe;0;ON;;;;;Y;CLOSING PARENTHESIS;;;; -002A;ASTERISK;Po;0;ON;;;;;N;;;;; -002B;PLUS SIGN;Sm;0;ET;;;;;N;;;;; -002C;COMMA;Po;0;CS;;;;;N;;;;; -002D;HYPHEN-MINUS;Pd;0;ET;;;;;N;;;;; -002E;FULL STOP;Po;0;CS;;;;;N;PERIOD;;;; -002F;SOLIDUS;Po;0;ES;;;;;N;SLASH;;;; -0030;DIGIT ZERO;Nd;0;EN;;0;0;0;N;;;;; -0031;DIGIT ONE;Nd;0;EN;;1;1;1;N;;;;; -0032;DIGIT TWO;Nd;0;EN;;2;2;2;N;;;;; -0033;DIGIT THREE;Nd;0;EN;;3;3;3;N;;;;; -0034;DIGIT FOUR;Nd;0;EN;;4;4;4;N;;;;; -0035;DIGIT FIVE;Nd;0;EN;;5;5;5;N;;;;; -0036;DIGIT SIX;Nd;0;EN;;6;6;6;N;;;;; -0037;DIGIT SEVEN;Nd;0;EN;;7;7;7;N;;;;; -0038;DIGIT EIGHT;Nd;0;EN;;8;8;8;N;;;;; -0039;DIGIT NINE;Nd;0;EN;;9;9;9;N;;;;; -003A;COLON;Po;0;CS;;;;;N;;;;; -003B;SEMICOLON;Po;0;ON;;;;;N;;;;; -003C;LESS-THAN SIGN;Sm;0;ON;;;;;Y;;;;; -003D;EQUALS SIGN;Sm;0;ON;;;;;N;;;;; -003E;GREATER-THAN SIGN;Sm;0;ON;;;;;Y;;;;; -003F;QUESTION MARK;Po;0;ON;;;;;N;;;;; -0040;COMMERCIAL AT;Po;0;ON;;;;;N;;;;; -0041;LATIN CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0061; -0042;LATIN CAPITAL LETTER B;Lu;0;L;;;;;N;;;;0062; -0043;LATIN CAPITAL LETTER C;Lu;0;L;;;;;N;;;;0063; -0044;LATIN CAPITAL LETTER D;Lu;0;L;;;;;N;;;;0064; -0045;LATIN CAPITAL LETTER E;Lu;0;L;;;;;N;;;;0065; -0046;LATIN CAPITAL LETTER F;Lu;0;L;;;;;N;;;;0066; -0047;LATIN CAPITAL LETTER G;Lu;0;L;;;;;N;;;;0067; -0048;LATIN CAPITAL LETTER H;Lu;0;L;;;;;N;;;;0068; -0049;LATIN CAPITAL LETTER I;Lu;0;L;;;;;N;;;;0069; -004A;LATIN CAPITAL LETTER J;Lu;0;L;;;;;N;;;;006A; -004B;LATIN CAPITAL LETTER K;Lu;0;L;;;;;N;;;;006B; -004C;LATIN CAPITAL LETTER L;Lu;0;L;;;;;N;;;;006C; -004D;LATIN CAPITAL LETTER M;Lu;0;L;;;;;N;;;;006D; -004E;LATIN CAPITAL LETTER N;Lu;0;L;;;;;N;;;;006E; -004F;LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F; -0050;LATIN CAPITAL LETTER P;Lu;0;L;;;;;N;;;;0070; -0051;LATIN CAPITAL LETTER Q;Lu;0;L;;;;;N;;;;0071; -0052;LATIN CAPITAL LETTER R;Lu;0;L;;;;;N;;;;0072; -0053;LATIN CAPITAL LETTER S;Lu;0;L;;;;;N;;;;0073; -0054;LATIN CAPITAL LETTER T;Lu;0;L;;;;;N;;;;0074; -0055;LATIN CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0075; -0056;LATIN CAPITAL LETTER V;Lu;0;L;;;;;N;;;;0076; -0057;LATIN CAPITAL LETTER W;Lu;0;L;;;;;N;;;;0077; -0058;LATIN CAPITAL LETTER X;Lu;0;L;;;;;N;;;;0078; -0059;LATIN CAPITAL LETTER Y;Lu;0;L;;;;;N;;;;0079; -005A;LATIN CAPITAL LETTER Z;Lu;0;L;;;;;N;;;;007A; -005B;LEFT SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING SQUARE BRACKET;;;; -005C;REVERSE SOLIDUS;Po;0;ON;;;;;N;BACKSLASH;;;; -005D;RIGHT SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING SQUARE BRACKET;;;; -005E;CIRCUMFLEX ACCENT;Sk;0;ON;;;;;N;SPACING CIRCUMFLEX;;;; -005F;LOW LINE;Pc;0;ON;;;;;N;SPACING UNDERSCORE;;;; -0060;GRAVE ACCENT;Sk;0;ON;;;;;N;SPACING GRAVE;;;; -0061;LATIN SMALL LETTER A;Ll;0;L;;;;;N;;;0041;;0041 -0062;LATIN SMALL LETTER B;Ll;0;L;;;;;N;;;0042;;0042 -0063;LATIN SMALL LETTER C;Ll;0;L;;;;;N;;;0043;;0043 -0064;LATIN SMALL LETTER D;Ll;0;L;;;;;N;;;0044;;0044 -0065;LATIN SMALL LETTER E;Ll;0;L;;;;;N;;;0045;;0045 -0066;LATIN SMALL LETTER F;Ll;0;L;;;;;N;;;0046;;0046 -0067;LATIN SMALL LETTER G;Ll;0;L;;;;;N;;;0047;;0047 -0068;LATIN SMALL LETTER H;Ll;0;L;;;;;N;;;0048;;0048 -0069;LATIN SMALL LETTER I;Ll;0;L;;;;;N;;;0049;;0049 -006A;LATIN SMALL LETTER J;Ll;0;L;;;;;N;;;004A;;004A -006B;LATIN SMALL LETTER K;Ll;0;L;;;;;N;;;004B;;004B -006C;LATIN SMALL LETTER L;Ll;0;L;;;;;N;;;004C;;004C -006D;LATIN SMALL LETTER M;Ll;0;L;;;;;N;;;004D;;004D -006E;LATIN SMALL LETTER N;Ll;0;L;;;;;N;;;004E;;004E -006F;LATIN SMALL LETTER O;Ll;0;L;;;;;N;;;004F;;004F -0070;LATIN SMALL LETTER P;Ll;0;L;;;;;N;;;0050;;0050 -0071;LATIN SMALL LETTER Q;Ll;0;L;;;;;N;;;0051;;0051 -0072;LATIN SMALL LETTER R;Ll;0;L;;;;;N;;;0052;;0052 -0073;LATIN SMALL LETTER S;Ll;0;L;;;;;N;;;0053;;0053 -0074;LATIN SMALL LETTER T;Ll;0;L;;;;;N;;;0054;;0054 -0075;LATIN SMALL LETTER U;Ll;0;L;;;;;N;;;0055;;0055 -0076;LATIN SMALL LETTER V;Ll;0;L;;;;;N;;;0056;;0056 -0077;LATIN SMALL LETTER W;Ll;0;L;;;;;N;;;0057;;0057 -0078;LATIN SMALL LETTER X;Ll;0;L;;;;;N;;;0058;;0058 -0079;LATIN SMALL LETTER Y;Ll;0;L;;;;;N;;;0059;;0059 -007A;LATIN SMALL LETTER Z;Ll;0;L;;;;;N;;;005A;;005A -007B;LEFT CURLY BRACKET;Ps;0;ON;;;;;Y;OPENING CURLY BRACKET;;;; -007C;VERTICAL LINE;Sm;0;ON;;;;;N;VERTICAL BAR;;;; -007D;RIGHT CURLY BRACKET;Pe;0;ON;;;;;Y;CLOSING CURLY BRACKET;;;; -007E;TILDE;Sm;0;ON;;;;;N;;;;; -007F;<control>;Cc;0;BN;;;;;N;DELETE;;;; -0080;<control>;Cc;0;BN;;;;;N;;;;; -0081;<control>;Cc;0;BN;;;;;N;;;;; -0082;<control>;Cc;0;BN;;;;;N;BREAK PERMITTED HERE;;;; -0083;<control>;Cc;0;BN;;;;;N;NO BREAK HERE;;;; -0084;<control>;Cc;0;BN;;;;;N;;;;; -0085;<control>;Cc;0;B;;;;;N;NEXT LINE;;;; -0086;<control>;Cc;0;BN;;;;;N;START OF SELECTED AREA;;;; -0087;<control>;Cc;0;BN;;;;;N;END OF SELECTED AREA;;;; -0088;<control>;Cc;0;BN;;;;;N;CHARACTER TABULATION SET;;;; -0089;<control>;Cc;0;BN;;;;;N;CHARACTER TABULATION WITH JUSTIFICATION;;;; -008A;<control>;Cc;0;BN;;;;;N;LINE TABULATION SET;;;; -008B;<control>;Cc;0;BN;;;;;N;PARTIAL LINE DOWN;;;; -008C;<control>;Cc;0;BN;;;;;N;PARTIAL LINE UP;;;; -008D;<control>;Cc;0;BN;;;;;N;REVERSE LINE FEED;;;; -008E;<control>;Cc;0;BN;;;;;N;SINGLE SHIFT TWO;;;; -008F;<control>;Cc;0;BN;;;;;N;SINGLE SHIFT THREE;;;; -0090;<control>;Cc;0;BN;;;;;N;DEVICE CONTROL STRING;;;; -0091;<control>;Cc;0;BN;;;;;N;PRIVATE USE ONE;;;; -0092;<control>;Cc;0;BN;;;;;N;PRIVATE USE TWO;;;; -0093;<control>;Cc;0;BN;;;;;N;SET TRANSMIT STATE;;;; -0094;<control>;Cc;0;BN;;;;;N;CANCEL CHARACTER;;;; -0095;<control>;Cc;0;BN;;;;;N;MESSAGE WAITING;;;; -0096;<control>;Cc;0;BN;;;;;N;START OF GUARDED AREA;;;; -0097;<control>;Cc;0;BN;;;;;N;END OF GUARDED AREA;;;; -0098;<control>;Cc;0;BN;;;;;N;START OF STRING;;;; -0099;<control>;Cc;0;BN;;;;;N;;;;; -009A;<control>;Cc;0;BN;;;;;N;SINGLE CHARACTER INTRODUCER;;;; -009B;<control>;Cc;0;BN;;;;;N;CONTROL SEQUENCE INTRODUCER;;;; -009C;<control>;Cc;0;BN;;;;;N;STRING TERMINATOR;;;; -009D;<control>;Cc;0;BN;;;;;N;OPERATING SYSTEM COMMAND;;;; -009E;<control>;Cc;0;BN;;;;;N;PRIVACY MESSAGE;;;; -009F;<control>;Cc;0;BN;;;;;N;APPLICATION PROGRAM COMMAND;;;; -00A0;NO-BREAK SPACE;Zs;0;CS;<noBreak> 0020;;;;N;NON-BREAKING SPACE;;;; -00A1;INVERTED EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; -00A2;CENT SIGN;Sc;0;ET;;;;;N;;;;; -00A3;POUND SIGN;Sc;0;ET;;;;;N;;;;; -00A4;CURRENCY SIGN;Sc;0;ET;;;;;N;;;;; -00A5;YEN SIGN;Sc;0;ET;;;;;N;;;;; -00A6;BROKEN BAR;So;0;ON;;;;;N;BROKEN VERTICAL BAR;;;; -00A7;SECTION SIGN;So;0;ON;;;;;N;;;;; -00A8;DIAERESIS;Sk;0;ON;<compat> 0020 0308;;;;N;SPACING DIAERESIS;;;; -00A9;COPYRIGHT SIGN;So;0;ON;;;;;N;;;;; -00AA;FEMININE ORDINAL INDICATOR;Ll;0;L;<super> 0061;;;;N;;;;; -00AB;LEFT-POINTING DOUBLE ANGLE QUOTATION MARK;Pi;0;ON;;;;;Y;LEFT POINTING GUILLEMET;*;;; -00AC;NOT SIGN;Sm;0;ON;;;;;N;;;;; -00AD;SOFT HYPHEN;Pd;0;ON;;;;;N;;;;; -00AE;REGISTERED SIGN;So;0;ON;;;;;N;REGISTERED TRADE MARK SIGN;;;; -00AF;MACRON;Sk;0;ON;<compat> 0020 0304;;;;N;SPACING MACRON;;;; -00B0;DEGREE SIGN;So;0;ET;;;;;N;;;;; -00B1;PLUS-MINUS SIGN;Sm;0;ET;;;;;N;PLUS-OR-MINUS SIGN;;;; -00B2;SUPERSCRIPT TWO;No;0;EN;<super> 0032;2;2;2;N;SUPERSCRIPT DIGIT TWO;;;; -00B3;SUPERSCRIPT THREE;No;0;EN;<super> 0033;3;3;3;N;SUPERSCRIPT DIGIT THREE;;;; -00B4;ACUTE ACCENT;Sk;0;ON;<compat> 0020 0301;;;;N;SPACING ACUTE;;;; -00B5;MICRO SIGN;Ll;0;L;<compat> 03BC;;;;N;;;039C;;039C -00B6;PILCROW SIGN;So;0;ON;;;;;N;PARAGRAPH SIGN;;;; -00B7;MIDDLE DOT;Po;0;ON;;;;;N;;;;; -00B8;CEDILLA;Sk;0;ON;<compat> 0020 0327;;;;N;SPACING CEDILLA;;;; -00B9;SUPERSCRIPT ONE;No;0;EN;<super> 0031;1;1;1;N;SUPERSCRIPT DIGIT ONE;;;; -00BA;MASCULINE ORDINAL INDICATOR;Ll;0;L;<super> 006F;;;;N;;;;; -00BB;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING GUILLEMET;*;;; -00BC;VULGAR FRACTION ONE QUARTER;No;0;ON;<fraction> 0031 2044 0034;;;1/4;N;FRACTION ONE QUARTER;;;; -00BD;VULGAR FRACTION ONE HALF;No;0;ON;<fraction> 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;; -00BE;VULGAR FRACTION THREE QUARTERS;No;0;ON;<fraction> 0033 2044 0034;;;3/4;N;FRACTION THREE QUARTERS;;;; -00BF;INVERTED QUESTION MARK;Po;0;ON;;;;;N;;;;; -00C0;LATIN CAPITAL LETTER A WITH GRAVE;Lu;0;L;0041 0300;;;;N;LATIN CAPITAL LETTER A GRAVE;;;00E0; -00C1;LATIN CAPITAL LETTER A WITH ACUTE;Lu;0;L;0041 0301;;;;N;LATIN CAPITAL LETTER A ACUTE;;;00E1; -00C2;LATIN CAPITAL LETTER A WITH CIRCUMFLEX;Lu;0;L;0041 0302;;;;N;LATIN CAPITAL LETTER A CIRCUMFLEX;;;00E2; -00C3;LATIN CAPITAL LETTER A WITH TILDE;Lu;0;L;0041 0303;;;;N;LATIN CAPITAL LETTER A TILDE;;;00E3; -00C4;LATIN CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0041 0308;;;;N;LATIN CAPITAL LETTER A DIAERESIS;;;00E4; -00C5;LATIN CAPITAL LETTER A WITH RING ABOVE;Lu;0;L;0041 030A;;;;N;LATIN CAPITAL LETTER A RING;;;00E5; -00C6;LATIN CAPITAL LETTER AE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER A E;ash *;;00E6; -00C7;LATIN CAPITAL LETTER C WITH CEDILLA;Lu;0;L;0043 0327;;;;N;LATIN CAPITAL LETTER C CEDILLA;;;00E7; -00C8;LATIN CAPITAL LETTER E WITH GRAVE;Lu;0;L;0045 0300;;;;N;LATIN CAPITAL LETTER E GRAVE;;;00E8; -00C9;LATIN CAPITAL LETTER E WITH ACUTE;Lu;0;L;0045 0301;;;;N;LATIN CAPITAL LETTER E ACUTE;;;00E9; -00CA;LATIN CAPITAL LETTER E WITH CIRCUMFLEX;Lu;0;L;0045 0302;;;;N;LATIN CAPITAL LETTER E CIRCUMFLEX;;;00EA; -00CB;LATIN CAPITAL LETTER E WITH DIAERESIS;Lu;0;L;0045 0308;;;;N;LATIN CAPITAL LETTER E DIAERESIS;;;00EB; -00CC;LATIN CAPITAL LETTER I WITH GRAVE;Lu;0;L;0049 0300;;;;N;LATIN CAPITAL LETTER I GRAVE;;;00EC; -00CD;LATIN CAPITAL LETTER I WITH ACUTE;Lu;0;L;0049 0301;;;;N;LATIN CAPITAL LETTER I ACUTE;;;00ED; -00CE;LATIN CAPITAL LETTER I WITH CIRCUMFLEX;Lu;0;L;0049 0302;;;;N;LATIN CAPITAL LETTER I CIRCUMFLEX;;;00EE; -00CF;LATIN CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0049 0308;;;;N;LATIN CAPITAL LETTER I DIAERESIS;;;00EF; -00D0;LATIN CAPITAL LETTER ETH;Lu;0;L;;;;;N;;Icelandic;;00F0; -00D1;LATIN CAPITAL LETTER N WITH TILDE;Lu;0;L;004E 0303;;;;N;LATIN CAPITAL LETTER N TILDE;;;00F1; -00D2;LATIN CAPITAL LETTER O WITH GRAVE;Lu;0;L;004F 0300;;;;N;LATIN CAPITAL LETTER O GRAVE;;;00F2; -00D3;LATIN CAPITAL LETTER O WITH ACUTE;Lu;0;L;004F 0301;;;;N;LATIN CAPITAL LETTER O ACUTE;;;00F3; -00D4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX;Lu;0;L;004F 0302;;;;N;LATIN CAPITAL LETTER O CIRCUMFLEX;;;00F4; -00D5;LATIN CAPITAL LETTER O WITH TILDE;Lu;0;L;004F 0303;;;;N;LATIN CAPITAL LETTER O TILDE;;;00F5; -00D6;LATIN CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;004F 0308;;;;N;LATIN CAPITAL LETTER O DIAERESIS;;;00F6; -00D7;MULTIPLICATION SIGN;Sm;0;ON;;;;;N;;;;; -00D8;LATIN CAPITAL LETTER O WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O SLASH;;;00F8; -00D9;LATIN CAPITAL LETTER U WITH GRAVE;Lu;0;L;0055 0300;;;;N;LATIN CAPITAL LETTER U GRAVE;;;00F9; -00DA;LATIN CAPITAL LETTER U WITH ACUTE;Lu;0;L;0055 0301;;;;N;LATIN CAPITAL LETTER U ACUTE;;;00FA; -00DB;LATIN CAPITAL LETTER U WITH CIRCUMFLEX;Lu;0;L;0055 0302;;;;N;LATIN CAPITAL LETTER U CIRCUMFLEX;;;00FB; -00DC;LATIN CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0055 0308;;;;N;LATIN CAPITAL LETTER U DIAERESIS;;;00FC; -00DD;LATIN CAPITAL LETTER Y WITH ACUTE;Lu;0;L;0059 0301;;;;N;LATIN CAPITAL LETTER Y ACUTE;;;00FD; -00DE;LATIN CAPITAL LETTER THORN;Lu;0;L;;;;;N;;Icelandic;;00FE; -00DF;LATIN SMALL LETTER SHARP S;Ll;0;L;;;;;N;;German;;; -00E0;LATIN SMALL LETTER A WITH GRAVE;Ll;0;L;0061 0300;;;;N;LATIN SMALL LETTER A GRAVE;;00C0;;00C0 -00E1;LATIN SMALL LETTER A WITH ACUTE;Ll;0;L;0061 0301;;;;N;LATIN SMALL LETTER A ACUTE;;00C1;;00C1 -00E2;LATIN SMALL LETTER A WITH CIRCUMFLEX;Ll;0;L;0061 0302;;;;N;LATIN SMALL LETTER A CIRCUMFLEX;;00C2;;00C2 -00E3;LATIN SMALL LETTER A WITH TILDE;Ll;0;L;0061 0303;;;;N;LATIN SMALL LETTER A TILDE;;00C3;;00C3 -00E4;LATIN SMALL LETTER A WITH DIAERESIS;Ll;0;L;0061 0308;;;;N;LATIN SMALL LETTER A DIAERESIS;;00C4;;00C4 -00E5;LATIN SMALL LETTER A WITH RING ABOVE;Ll;0;L;0061 030A;;;;N;LATIN SMALL LETTER A RING;;00C5;;00C5 -00E6;LATIN SMALL LETTER AE;Ll;0;L;;;;;N;LATIN SMALL LETTER A E;ash *;00C6;;00C6 -00E7;LATIN SMALL LETTER C WITH CEDILLA;Ll;0;L;0063 0327;;;;N;LATIN SMALL LETTER C CEDILLA;;00C7;;00C7 -00E8;LATIN SMALL LETTER E WITH GRAVE;Ll;0;L;0065 0300;;;;N;LATIN SMALL LETTER E GRAVE;;00C8;;00C8 -00E9;LATIN SMALL LETTER E WITH ACUTE;Ll;0;L;0065 0301;;;;N;LATIN SMALL LETTER E ACUTE;;00C9;;00C9 -00EA;LATIN SMALL LETTER E WITH CIRCUMFLEX;Ll;0;L;0065 0302;;;;N;LATIN SMALL LETTER E CIRCUMFLEX;;00CA;;00CA -00EB;LATIN SMALL LETTER E WITH DIAERESIS;Ll;0;L;0065 0308;;;;N;LATIN SMALL LETTER E DIAERESIS;;00CB;;00CB -00EC;LATIN SMALL LETTER I WITH GRAVE;Ll;0;L;0069 0300;;;;N;LATIN SMALL LETTER I GRAVE;;00CC;;00CC -00ED;LATIN SMALL LETTER I WITH ACUTE;Ll;0;L;0069 0301;;;;N;LATIN SMALL LETTER I ACUTE;;00CD;;00CD -00EE;LATIN SMALL LETTER I WITH CIRCUMFLEX;Ll;0;L;0069 0302;;;;N;LATIN SMALL LETTER I CIRCUMFLEX;;00CE;;00CE -00EF;LATIN SMALL LETTER I WITH DIAERESIS;Ll;0;L;0069 0308;;;;N;LATIN SMALL LETTER I DIAERESIS;;00CF;;00CF -00F0;LATIN SMALL LETTER ETH;Ll;0;L;;;;;N;;Icelandic;00D0;;00D0 -00F1;LATIN SMALL LETTER N WITH TILDE;Ll;0;L;006E 0303;;;;N;LATIN SMALL LETTER N TILDE;;00D1;;00D1 -00F2;LATIN SMALL LETTER O WITH GRAVE;Ll;0;L;006F 0300;;;;N;LATIN SMALL LETTER O GRAVE;;00D2;;00D2 -00F3;LATIN SMALL LETTER O WITH ACUTE;Ll;0;L;006F 0301;;;;N;LATIN SMALL LETTER O ACUTE;;00D3;;00D3 -00F4;LATIN SMALL LETTER O WITH CIRCUMFLEX;Ll;0;L;006F 0302;;;;N;LATIN SMALL LETTER O CIRCUMFLEX;;00D4;;00D4 -00F5;LATIN SMALL LETTER O WITH TILDE;Ll;0;L;006F 0303;;;;N;LATIN SMALL LETTER O TILDE;;00D5;;00D5 -00F6;LATIN SMALL LETTER O WITH DIAERESIS;Ll;0;L;006F 0308;;;;N;LATIN SMALL LETTER O DIAERESIS;;00D6;;00D6 -00F7;DIVISION SIGN;Sm;0;ON;;;;;N;;;;; -00F8;LATIN SMALL LETTER O WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER O SLASH;;00D8;;00D8 -00F9;LATIN SMALL LETTER U WITH GRAVE;Ll;0;L;0075 0300;;;;N;LATIN SMALL LETTER U GRAVE;;00D9;;00D9 -00FA;LATIN SMALL LETTER U WITH ACUTE;Ll;0;L;0075 0301;;;;N;LATIN SMALL LETTER U ACUTE;;00DA;;00DA -00FB;LATIN SMALL LETTER U WITH CIRCUMFLEX;Ll;0;L;0075 0302;;;;N;LATIN SMALL LETTER U CIRCUMFLEX;;00DB;;00DB -00FC;LATIN SMALL LETTER U WITH DIAERESIS;Ll;0;L;0075 0308;;;;N;LATIN SMALL LETTER U DIAERESIS;;00DC;;00DC -00FD;LATIN SMALL LETTER Y WITH ACUTE;Ll;0;L;0079 0301;;;;N;LATIN SMALL LETTER Y ACUTE;;00DD;;00DD -00FE;LATIN SMALL LETTER THORN;Ll;0;L;;;;;N;;Icelandic;00DE;;00DE -00FF;LATIN SMALL LETTER Y WITH DIAERESIS;Ll;0;L;0079 0308;;;;N;LATIN SMALL LETTER Y DIAERESIS;;0178;;0178 -0100;LATIN CAPITAL LETTER A WITH MACRON;Lu;0;L;0041 0304;;;;N;LATIN CAPITAL LETTER A MACRON;;;0101; -0101;LATIN SMALL LETTER A WITH MACRON;Ll;0;L;0061 0304;;;;N;LATIN SMALL LETTER A MACRON;;0100;;0100 -0102;LATIN CAPITAL LETTER A WITH BREVE;Lu;0;L;0041 0306;;;;N;LATIN CAPITAL LETTER A BREVE;;;0103; -0103;LATIN SMALL LETTER A WITH BREVE;Ll;0;L;0061 0306;;;;N;LATIN SMALL LETTER A BREVE;;0102;;0102 -0104;LATIN CAPITAL LETTER A WITH OGONEK;Lu;0;L;0041 0328;;;;N;LATIN CAPITAL LETTER A OGONEK;;;0105; -0105;LATIN SMALL LETTER A WITH OGONEK;Ll;0;L;0061 0328;;;;N;LATIN SMALL LETTER A OGONEK;;0104;;0104 -0106;LATIN CAPITAL LETTER C WITH ACUTE;Lu;0;L;0043 0301;;;;N;LATIN CAPITAL LETTER C ACUTE;;;0107; -0107;LATIN SMALL LETTER C WITH ACUTE;Ll;0;L;0063 0301;;;;N;LATIN SMALL LETTER C ACUTE;;0106;;0106 -0108;LATIN CAPITAL LETTER C WITH CIRCUMFLEX;Lu;0;L;0043 0302;;;;N;LATIN CAPITAL LETTER C CIRCUMFLEX;;;0109; -0109;LATIN SMALL LETTER C WITH CIRCUMFLEX;Ll;0;L;0063 0302;;;;N;LATIN SMALL LETTER C CIRCUMFLEX;;0108;;0108 -010A;LATIN CAPITAL LETTER C WITH DOT ABOVE;Lu;0;L;0043 0307;;;;N;LATIN CAPITAL LETTER C DOT;;;010B; -010B;LATIN SMALL LETTER C WITH DOT ABOVE;Ll;0;L;0063 0307;;;;N;LATIN SMALL LETTER C DOT;;010A;;010A -010C;LATIN CAPITAL LETTER C WITH CARON;Lu;0;L;0043 030C;;;;N;LATIN CAPITAL LETTER C HACEK;;;010D; -010D;LATIN SMALL LETTER C WITH CARON;Ll;0;L;0063 030C;;;;N;LATIN SMALL LETTER C HACEK;;010C;;010C -010E;LATIN CAPITAL LETTER D WITH CARON;Lu;0;L;0044 030C;;;;N;LATIN CAPITAL LETTER D HACEK;;;010F; -010F;LATIN SMALL LETTER D WITH CARON;Ll;0;L;0064 030C;;;;N;LATIN SMALL LETTER D HACEK;;010E;;010E -0110;LATIN CAPITAL LETTER D WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D BAR;;;0111; -0111;LATIN SMALL LETTER D WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER D BAR;;0110;;0110 -0112;LATIN CAPITAL LETTER E WITH MACRON;Lu;0;L;0045 0304;;;;N;LATIN CAPITAL LETTER E MACRON;;;0113; -0113;LATIN SMALL LETTER E WITH MACRON;Ll;0;L;0065 0304;;;;N;LATIN SMALL LETTER E MACRON;;0112;;0112 -0114;LATIN CAPITAL LETTER E WITH BREVE;Lu;0;L;0045 0306;;;;N;LATIN CAPITAL LETTER E BREVE;;;0115; -0115;LATIN SMALL LETTER E WITH BREVE;Ll;0;L;0065 0306;;;;N;LATIN SMALL LETTER E BREVE;;0114;;0114 -0116;LATIN CAPITAL LETTER E WITH DOT ABOVE;Lu;0;L;0045 0307;;;;N;LATIN CAPITAL LETTER E DOT;;;0117; -0117;LATIN SMALL LETTER E WITH DOT ABOVE;Ll;0;L;0065 0307;;;;N;LATIN SMALL LETTER E DOT;;0116;;0116 -0118;LATIN CAPITAL LETTER E WITH OGONEK;Lu;0;L;0045 0328;;;;N;LATIN CAPITAL LETTER E OGONEK;;;0119; -0119;LATIN SMALL LETTER E WITH OGONEK;Ll;0;L;0065 0328;;;;N;LATIN SMALL LETTER E OGONEK;;0118;;0118 -011A;LATIN CAPITAL LETTER E WITH CARON;Lu;0;L;0045 030C;;;;N;LATIN CAPITAL LETTER E HACEK;;;011B; -011B;LATIN SMALL LETTER E WITH CARON;Ll;0;L;0065 030C;;;;N;LATIN SMALL LETTER E HACEK;;011A;;011A -011C;LATIN CAPITAL LETTER G WITH CIRCUMFLEX;Lu;0;L;0047 0302;;;;N;LATIN CAPITAL LETTER G CIRCUMFLEX;;;011D; -011D;LATIN SMALL LETTER G WITH CIRCUMFLEX;Ll;0;L;0067 0302;;;;N;LATIN SMALL LETTER G CIRCUMFLEX;;011C;;011C -011E;LATIN CAPITAL LETTER G WITH BREVE;Lu;0;L;0047 0306;;;;N;LATIN CAPITAL LETTER G BREVE;;;011F; -011F;LATIN SMALL LETTER G WITH BREVE;Ll;0;L;0067 0306;;;;N;LATIN SMALL LETTER G BREVE;;011E;;011E -0120;LATIN CAPITAL LETTER G WITH DOT ABOVE;Lu;0;L;0047 0307;;;;N;LATIN CAPITAL LETTER G DOT;;;0121; -0121;LATIN SMALL LETTER G WITH DOT ABOVE;Ll;0;L;0067 0307;;;;N;LATIN SMALL LETTER G DOT;;0120;;0120 -0122;LATIN CAPITAL LETTER G WITH CEDILLA;Lu;0;L;0047 0327;;;;N;LATIN CAPITAL LETTER G CEDILLA;;;0123; -0123;LATIN SMALL LETTER G WITH CEDILLA;Ll;0;L;0067 0327;;;;N;LATIN SMALL LETTER G CEDILLA;;0122;;0122 -0124;LATIN CAPITAL LETTER H WITH CIRCUMFLEX;Lu;0;L;0048 0302;;;;N;LATIN CAPITAL LETTER H CIRCUMFLEX;;;0125; -0125;LATIN SMALL LETTER H WITH CIRCUMFLEX;Ll;0;L;0068 0302;;;;N;LATIN SMALL LETTER H CIRCUMFLEX;;0124;;0124 -0126;LATIN CAPITAL LETTER H WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER H BAR;;;0127; -0127;LATIN SMALL LETTER H WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER H BAR;;0126;;0126 -0128;LATIN CAPITAL LETTER I WITH TILDE;Lu;0;L;0049 0303;;;;N;LATIN CAPITAL LETTER I TILDE;;;0129; -0129;LATIN SMALL LETTER I WITH TILDE;Ll;0;L;0069 0303;;;;N;LATIN SMALL LETTER I TILDE;;0128;;0128 -012A;LATIN CAPITAL LETTER I WITH MACRON;Lu;0;L;0049 0304;;;;N;LATIN CAPITAL LETTER I MACRON;;;012B; -012B;LATIN SMALL LETTER I WITH MACRON;Ll;0;L;0069 0304;;;;N;LATIN SMALL LETTER I MACRON;;012A;;012A -012C;LATIN CAPITAL LETTER I WITH BREVE;Lu;0;L;0049 0306;;;;N;LATIN CAPITAL LETTER I BREVE;;;012D; -012D;LATIN SMALL LETTER I WITH BREVE;Ll;0;L;0069 0306;;;;N;LATIN SMALL LETTER I BREVE;;012C;;012C -012E;LATIN CAPITAL LETTER I WITH OGONEK;Lu;0;L;0049 0328;;;;N;LATIN CAPITAL LETTER I OGONEK;;;012F; -012F;LATIN SMALL LETTER I WITH OGONEK;Ll;0;L;0069 0328;;;;N;LATIN SMALL LETTER I OGONEK;;012E;;012E -0130;LATIN CAPITAL LETTER I WITH DOT ABOVE;Lu;0;L;0049 0307;;;;N;LATIN CAPITAL LETTER I DOT;;;0069; -0131;LATIN SMALL LETTER DOTLESS I;Ll;0;L;;;;;N;;;0049;;0049 -0132;LATIN CAPITAL LIGATURE IJ;Lu;0;L;<compat> 0049 004A;;;;N;LATIN CAPITAL LETTER I J;;;0133; -0133;LATIN SMALL LIGATURE IJ;Ll;0;L;<compat> 0069 006A;;;;N;LATIN SMALL LETTER I J;;0132;;0132 -0134;LATIN CAPITAL LETTER J WITH CIRCUMFLEX;Lu;0;L;004A 0302;;;;N;LATIN CAPITAL LETTER J CIRCUMFLEX;;;0135; -0135;LATIN SMALL LETTER J WITH CIRCUMFLEX;Ll;0;L;006A 0302;;;;N;LATIN SMALL LETTER J CIRCUMFLEX;;0134;;0134 -0136;LATIN CAPITAL LETTER K WITH CEDILLA;Lu;0;L;004B 0327;;;;N;LATIN CAPITAL LETTER K CEDILLA;;;0137; -0137;LATIN SMALL LETTER K WITH CEDILLA;Ll;0;L;006B 0327;;;;N;LATIN SMALL LETTER K CEDILLA;;0136;;0136 -0138;LATIN SMALL LETTER KRA;Ll;0;L;;;;;N;;Greenlandic;;; -0139;LATIN CAPITAL LETTER L WITH ACUTE;Lu;0;L;004C 0301;;;;N;LATIN CAPITAL LETTER L ACUTE;;;013A; -013A;LATIN SMALL LETTER L WITH ACUTE;Ll;0;L;006C 0301;;;;N;LATIN SMALL LETTER L ACUTE;;0139;;0139 -013B;LATIN CAPITAL LETTER L WITH CEDILLA;Lu;0;L;004C 0327;;;;N;LATIN CAPITAL LETTER L CEDILLA;;;013C; -013C;LATIN SMALL LETTER L WITH CEDILLA;Ll;0;L;006C 0327;;;;N;LATIN SMALL LETTER L CEDILLA;;013B;;013B -013D;LATIN CAPITAL LETTER L WITH CARON;Lu;0;L;004C 030C;;;;N;LATIN CAPITAL LETTER L HACEK;;;013E; -013E;LATIN SMALL LETTER L WITH CARON;Ll;0;L;006C 030C;;;;N;LATIN SMALL LETTER L HACEK;;013D;;013D -013F;LATIN CAPITAL LETTER L WITH MIDDLE DOT;Lu;0;L;<compat> 004C 00B7;;;;N;;;;0140; -0140;LATIN SMALL LETTER L WITH MIDDLE DOT;Ll;0;L;<compat> 006C 00B7;;;;N;;;013F;;013F -0141;LATIN CAPITAL LETTER L WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER L SLASH;;;0142; -0142;LATIN SMALL LETTER L WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER L SLASH;;0141;;0141 -0143;LATIN CAPITAL LETTER N WITH ACUTE;Lu;0;L;004E 0301;;;;N;LATIN CAPITAL LETTER N ACUTE;;;0144; -0144;LATIN SMALL LETTER N WITH ACUTE;Ll;0;L;006E 0301;;;;N;LATIN SMALL LETTER N ACUTE;;0143;;0143 -0145;LATIN CAPITAL LETTER N WITH CEDILLA;Lu;0;L;004E 0327;;;;N;LATIN CAPITAL LETTER N CEDILLA;;;0146; -0146;LATIN SMALL LETTER N WITH CEDILLA;Ll;0;L;006E 0327;;;;N;LATIN SMALL LETTER N CEDILLA;;0145;;0145 -0147;LATIN CAPITAL LETTER N WITH CARON;Lu;0;L;004E 030C;;;;N;LATIN CAPITAL LETTER N HACEK;;;0148; -0148;LATIN SMALL LETTER N WITH CARON;Ll;0;L;006E 030C;;;;N;LATIN SMALL LETTER N HACEK;;0147;;0147 -0149;LATIN SMALL LETTER N PRECEDED BY APOSTROPHE;Ll;0;L;<compat> 02BC 006E;;;;N;LATIN SMALL LETTER APOSTROPHE N;;;; -014A;LATIN CAPITAL LETTER ENG;Lu;0;L;;;;;N;;Sami;;014B; -014B;LATIN SMALL LETTER ENG;Ll;0;L;;;;;N;;Sami;014A;;014A -014C;LATIN CAPITAL LETTER O WITH MACRON;Lu;0;L;004F 0304;;;;N;LATIN CAPITAL LETTER O MACRON;;;014D; -014D;LATIN SMALL LETTER O WITH MACRON;Ll;0;L;006F 0304;;;;N;LATIN SMALL LETTER O MACRON;;014C;;014C -014E;LATIN CAPITAL LETTER O WITH BREVE;Lu;0;L;004F 0306;;;;N;LATIN CAPITAL LETTER O BREVE;;;014F; -014F;LATIN SMALL LETTER O WITH BREVE;Ll;0;L;006F 0306;;;;N;LATIN SMALL LETTER O BREVE;;014E;;014E -0150;LATIN CAPITAL LETTER O WITH DOUBLE ACUTE;Lu;0;L;004F 030B;;;;N;LATIN CAPITAL LETTER O DOUBLE ACUTE;;;0151; -0151;LATIN SMALL LETTER O WITH DOUBLE ACUTE;Ll;0;L;006F 030B;;;;N;LATIN SMALL LETTER O DOUBLE ACUTE;;0150;;0150 -0152;LATIN CAPITAL LIGATURE OE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O E;;;0153; -0153;LATIN SMALL LIGATURE OE;Ll;0;L;;;;;N;LATIN SMALL LETTER O E;;0152;;0152 -0154;LATIN CAPITAL LETTER R WITH ACUTE;Lu;0;L;0052 0301;;;;N;LATIN CAPITAL LETTER R ACUTE;;;0155; -0155;LATIN SMALL LETTER R WITH ACUTE;Ll;0;L;0072 0301;;;;N;LATIN SMALL LETTER R ACUTE;;0154;;0154 -0156;LATIN CAPITAL LETTER R WITH CEDILLA;Lu;0;L;0052 0327;;;;N;LATIN CAPITAL LETTER R CEDILLA;;;0157; -0157;LATIN SMALL LETTER R WITH CEDILLA;Ll;0;L;0072 0327;;;;N;LATIN SMALL LETTER R CEDILLA;;0156;;0156 -0158;LATIN CAPITAL LETTER R WITH CARON;Lu;0;L;0052 030C;;;;N;LATIN CAPITAL LETTER R HACEK;;;0159; -0159;LATIN SMALL LETTER R WITH CARON;Ll;0;L;0072 030C;;;;N;LATIN SMALL LETTER R HACEK;;0158;;0158 -015A;LATIN CAPITAL LETTER S WITH ACUTE;Lu;0;L;0053 0301;;;;N;LATIN CAPITAL LETTER S ACUTE;;;015B; -015B;LATIN SMALL LETTER S WITH ACUTE;Ll;0;L;0073 0301;;;;N;LATIN SMALL LETTER S ACUTE;;015A;;015A -015C;LATIN CAPITAL LETTER S WITH CIRCUMFLEX;Lu;0;L;0053 0302;;;;N;LATIN CAPITAL LETTER S CIRCUMFLEX;;;015D; -015D;LATIN SMALL LETTER S WITH CIRCUMFLEX;Ll;0;L;0073 0302;;;;N;LATIN SMALL LETTER S CIRCUMFLEX;;015C;;015C -015E;LATIN CAPITAL LETTER S WITH CEDILLA;Lu;0;L;0053 0327;;;;N;LATIN CAPITAL LETTER S CEDILLA;*;;015F; -015F;LATIN SMALL LETTER S WITH CEDILLA;Ll;0;L;0073 0327;;;;N;LATIN SMALL LETTER S CEDILLA;*;015E;;015E -0160;LATIN CAPITAL LETTER S WITH CARON;Lu;0;L;0053 030C;;;;N;LATIN CAPITAL LETTER S HACEK;;;0161; -0161;LATIN SMALL LETTER S WITH CARON;Ll;0;L;0073 030C;;;;N;LATIN SMALL LETTER S HACEK;;0160;;0160 -0162;LATIN CAPITAL LETTER T WITH CEDILLA;Lu;0;L;0054 0327;;;;N;LATIN CAPITAL LETTER T CEDILLA;*;;0163; -0163;LATIN SMALL LETTER T WITH CEDILLA;Ll;0;L;0074 0327;;;;N;LATIN SMALL LETTER T CEDILLA;*;0162;;0162 -0164;LATIN CAPITAL LETTER T WITH CARON;Lu;0;L;0054 030C;;;;N;LATIN CAPITAL LETTER T HACEK;;;0165; -0165;LATIN SMALL LETTER T WITH CARON;Ll;0;L;0074 030C;;;;N;LATIN SMALL LETTER T HACEK;;0164;;0164 -0166;LATIN CAPITAL LETTER T WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T BAR;;;0167; -0167;LATIN SMALL LETTER T WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER T BAR;;0166;;0166 -0168;LATIN CAPITAL LETTER U WITH TILDE;Lu;0;L;0055 0303;;;;N;LATIN CAPITAL LETTER U TILDE;;;0169; -0169;LATIN SMALL LETTER U WITH TILDE;Ll;0;L;0075 0303;;;;N;LATIN SMALL LETTER U TILDE;;0168;;0168 -016A;LATIN CAPITAL LETTER U WITH MACRON;Lu;0;L;0055 0304;;;;N;LATIN CAPITAL LETTER U MACRON;;;016B; -016B;LATIN SMALL LETTER U WITH MACRON;Ll;0;L;0075 0304;;;;N;LATIN SMALL LETTER U MACRON;;016A;;016A -016C;LATIN CAPITAL LETTER U WITH BREVE;Lu;0;L;0055 0306;;;;N;LATIN CAPITAL LETTER U BREVE;;;016D; -016D;LATIN SMALL LETTER U WITH BREVE;Ll;0;L;0075 0306;;;;N;LATIN SMALL LETTER U BREVE;;016C;;016C -016E;LATIN CAPITAL LETTER U WITH RING ABOVE;Lu;0;L;0055 030A;;;;N;LATIN CAPITAL LETTER U RING;;;016F; -016F;LATIN SMALL LETTER U WITH RING ABOVE;Ll;0;L;0075 030A;;;;N;LATIN SMALL LETTER U RING;;016E;;016E -0170;LATIN CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0055 030B;;;;N;LATIN CAPITAL LETTER U DOUBLE ACUTE;;;0171; -0171;LATIN SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0075 030B;;;;N;LATIN SMALL LETTER U DOUBLE ACUTE;;0170;;0170 -0172;LATIN CAPITAL LETTER U WITH OGONEK;Lu;0;L;0055 0328;;;;N;LATIN CAPITAL LETTER U OGONEK;;;0173; -0173;LATIN SMALL LETTER U WITH OGONEK;Ll;0;L;0075 0328;;;;N;LATIN SMALL LETTER U OGONEK;;0172;;0172 -0174;LATIN CAPITAL LETTER W WITH CIRCUMFLEX;Lu;0;L;0057 0302;;;;N;LATIN CAPITAL LETTER W CIRCUMFLEX;;;0175; -0175;LATIN SMALL LETTER W WITH CIRCUMFLEX;Ll;0;L;0077 0302;;;;N;LATIN SMALL LETTER W CIRCUMFLEX;;0174;;0174 -0176;LATIN CAPITAL LETTER Y WITH CIRCUMFLEX;Lu;0;L;0059 0302;;;;N;LATIN CAPITAL LETTER Y CIRCUMFLEX;;;0177; -0177;LATIN SMALL LETTER Y WITH CIRCUMFLEX;Ll;0;L;0079 0302;;;;N;LATIN SMALL LETTER Y CIRCUMFLEX;;0176;;0176 -0178;LATIN CAPITAL LETTER Y WITH DIAERESIS;Lu;0;L;0059 0308;;;;N;LATIN CAPITAL LETTER Y DIAERESIS;;;00FF; -0179;LATIN CAPITAL LETTER Z WITH ACUTE;Lu;0;L;005A 0301;;;;N;LATIN CAPITAL LETTER Z ACUTE;;;017A; -017A;LATIN SMALL LETTER Z WITH ACUTE;Ll;0;L;007A 0301;;;;N;LATIN SMALL LETTER Z ACUTE;;0179;;0179 -017B;LATIN CAPITAL LETTER Z WITH DOT ABOVE;Lu;0;L;005A 0307;;;;N;LATIN CAPITAL LETTER Z DOT;;;017C; -017C;LATIN SMALL LETTER Z WITH DOT ABOVE;Ll;0;L;007A 0307;;;;N;LATIN SMALL LETTER Z DOT;;017B;;017B -017D;LATIN CAPITAL LETTER Z WITH CARON;Lu;0;L;005A 030C;;;;N;LATIN CAPITAL LETTER Z HACEK;;;017E; -017E;LATIN SMALL LETTER Z WITH CARON;Ll;0;L;007A 030C;;;;N;LATIN SMALL LETTER Z HACEK;;017D;;017D -017F;LATIN SMALL LETTER LONG S;Ll;0;L;<compat> 0073;;;;N;;;0053;;0053 -0180;LATIN SMALL LETTER B WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER B BAR;;;; -0181;LATIN CAPITAL LETTER B WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B HOOK;;;0253; -0182;LATIN CAPITAL LETTER B WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B TOPBAR;;;0183; -0183;LATIN SMALL LETTER B WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER B TOPBAR;;0182;;0182 -0184;LATIN CAPITAL LETTER TONE SIX;Lu;0;L;;;;;N;;;;0185; -0185;LATIN SMALL LETTER TONE SIX;Ll;0;L;;;;;N;;;0184;;0184 -0186;LATIN CAPITAL LETTER OPEN O;Lu;0;L;;;;;N;;;;0254; -0187;LATIN CAPITAL LETTER C WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER C HOOK;;;0188; -0188;LATIN SMALL LETTER C WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER C HOOK;;0187;;0187 -0189;LATIN CAPITAL LETTER AFRICAN D;Lu;0;L;;;;;N;;*;;0256; -018A;LATIN CAPITAL LETTER D WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D HOOK;;;0257; -018B;LATIN CAPITAL LETTER D WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D TOPBAR;;;018C; -018C;LATIN SMALL LETTER D WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER D TOPBAR;;018B;;018B -018D;LATIN SMALL LETTER TURNED DELTA;Ll;0;L;;;;;N;;;;; -018E;LATIN CAPITAL LETTER REVERSED E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER TURNED E;;;01DD; -018F;LATIN CAPITAL LETTER SCHWA;Lu;0;L;;;;;N;;;;0259; -0190;LATIN CAPITAL LETTER OPEN E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER EPSILON;;;025B; -0191;LATIN CAPITAL LETTER F WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER F HOOK;;;0192; -0192;LATIN SMALL LETTER F WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT F;;0191;;0191 -0193;LATIN CAPITAL LETTER G WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G HOOK;;;0260; -0194;LATIN CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;0263; -0195;LATIN SMALL LETTER HV;Ll;0;L;;;;;N;LATIN SMALL LETTER H V;hwair;01F6;;01F6 -0196;LATIN CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;0269; -0197;LATIN CAPITAL LETTER I WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED I;;;0268; -0198;LATIN CAPITAL LETTER K WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER K HOOK;;;0199; -0199;LATIN SMALL LETTER K WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER K HOOK;;0198;;0198 -019A;LATIN SMALL LETTER L WITH BAR;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED L;;;; -019B;LATIN SMALL LETTER LAMBDA WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED LAMBDA;;;; -019C;LATIN CAPITAL LETTER TURNED M;Lu;0;L;;;;;N;;;;026F; -019D;LATIN CAPITAL LETTER N WITH LEFT HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER N HOOK;;;0272; -019E;LATIN SMALL LETTER N WITH LONG RIGHT LEG;Ll;0;L;;;;;N;;;;; -019F;LATIN CAPITAL LETTER O WITH MIDDLE TILDE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED O;*;;0275; -01A0;LATIN CAPITAL LETTER O WITH HORN;Lu;0;L;004F 031B;;;;N;LATIN CAPITAL LETTER O HORN;;;01A1; -01A1;LATIN SMALL LETTER O WITH HORN;Ll;0;L;006F 031B;;;;N;LATIN SMALL LETTER O HORN;;01A0;;01A0 -01A2;LATIN CAPITAL LETTER OI;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O I;gha;;01A3; -01A3;LATIN SMALL LETTER OI;Ll;0;L;;;;;N;LATIN SMALL LETTER O I;gha;01A2;;01A2 -01A4;LATIN CAPITAL LETTER P WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER P HOOK;;;01A5; -01A5;LATIN SMALL LETTER P WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER P HOOK;;01A4;;01A4 -01A6;LATIN LETTER YR;Lu;0;L;;;;;N;LATIN LETTER Y R;*;;0280; -01A7;LATIN CAPITAL LETTER TONE TWO;Lu;0;L;;;;;N;;;;01A8; -01A8;LATIN SMALL LETTER TONE TWO;Ll;0;L;;;;;N;;;01A7;;01A7 -01A9;LATIN CAPITAL LETTER ESH;Lu;0;L;;;;;N;;;;0283; -01AA;LATIN LETTER REVERSED ESH LOOP;Ll;0;L;;;;;N;;;;; -01AB;LATIN SMALL LETTER T WITH PALATAL HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T PALATAL HOOK;;;; -01AC;LATIN CAPITAL LETTER T WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T HOOK;;;01AD; -01AD;LATIN SMALL LETTER T WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T HOOK;;01AC;;01AC -01AE;LATIN CAPITAL LETTER T WITH RETROFLEX HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T RETROFLEX HOOK;;;0288; -01AF;LATIN CAPITAL LETTER U WITH HORN;Lu;0;L;0055 031B;;;;N;LATIN CAPITAL LETTER U HORN;;;01B0; -01B0;LATIN SMALL LETTER U WITH HORN;Ll;0;L;0075 031B;;;;N;LATIN SMALL LETTER U HORN;;01AF;;01AF -01B1;LATIN CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;028A; -01B2;LATIN CAPITAL LETTER V WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER SCRIPT V;;;028B; -01B3;LATIN CAPITAL LETTER Y WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Y HOOK;;;01B4; -01B4;LATIN SMALL LETTER Y WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Y HOOK;;01B3;;01B3 -01B5;LATIN CAPITAL LETTER Z WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Z BAR;;;01B6; -01B6;LATIN SMALL LETTER Z WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER Z BAR;;01B5;;01B5 -01B7;LATIN CAPITAL LETTER EZH;Lu;0;L;;;;;N;LATIN CAPITAL LETTER YOGH;;;0292; -01B8;LATIN CAPITAL LETTER EZH REVERSED;Lu;0;L;;;;;N;LATIN CAPITAL LETTER REVERSED YOGH;;;01B9; -01B9;LATIN SMALL LETTER EZH REVERSED;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED YOGH;;01B8;;01B8 -01BA;LATIN SMALL LETTER EZH WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH WITH TAIL;;;; -01BB;LATIN LETTER TWO WITH STROKE;Lo;0;L;;;;;N;LATIN LETTER TWO BAR;;;; -01BC;LATIN CAPITAL LETTER TONE FIVE;Lu;0;L;;;;;N;;;;01BD; -01BD;LATIN SMALL LETTER TONE FIVE;Ll;0;L;;;;;N;;;01BC;;01BC -01BE;LATIN LETTER INVERTED GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER INVERTED GLOTTAL STOP BAR;;;; -01BF;LATIN LETTER WYNN;Ll;0;L;;;;;N;;;01F7;;01F7 -01C0;LATIN LETTER DENTAL CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE;;;; -01C1;LATIN LETTER LATERAL CLICK;Lo;0;L;;;;;N;LATIN LETTER DOUBLE PIPE;;;; -01C2;LATIN LETTER ALVEOLAR CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE DOUBLE BAR;;;; -01C3;LATIN LETTER RETROFLEX CLICK;Lo;0;L;;;;;N;LATIN LETTER EXCLAMATION MARK;;;; -01C4;LATIN CAPITAL LETTER DZ WITH CARON;Lu;0;L;<compat> 0044 017D;;;;N;LATIN CAPITAL LETTER D Z HACEK;;;01C6;01C5 -01C5;LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON;Lt;0;L;<compat> 0044 017E;;;;N;LATIN LETTER CAPITAL D SMALL Z HACEK;;01C4;01C6; -01C6;LATIN SMALL LETTER DZ WITH CARON;Ll;0;L;<compat> 0064 017E;;;;N;LATIN SMALL LETTER D Z HACEK;;01C4;;01C5 -01C7;LATIN CAPITAL LETTER LJ;Lu;0;L;<compat> 004C 004A;;;;N;LATIN CAPITAL LETTER L J;;;01C9;01C8 -01C8;LATIN CAPITAL LETTER L WITH SMALL LETTER J;Lt;0;L;<compat> 004C 006A;;;;N;LATIN LETTER CAPITAL L SMALL J;;01C7;01C9; -01C9;LATIN SMALL LETTER LJ;Ll;0;L;<compat> 006C 006A;;;;N;LATIN SMALL LETTER L J;;01C7;;01C8 -01CA;LATIN CAPITAL LETTER NJ;Lu;0;L;<compat> 004E 004A;;;;N;LATIN CAPITAL LETTER N J;;;01CC;01CB -01CB;LATIN CAPITAL LETTER N WITH SMALL LETTER J;Lt;0;L;<compat> 004E 006A;;;;N;LATIN LETTER CAPITAL N SMALL J;;01CA;01CC; -01CC;LATIN SMALL LETTER NJ;Ll;0;L;<compat> 006E 006A;;;;N;LATIN SMALL LETTER N J;;01CA;;01CB -01CD;LATIN CAPITAL LETTER A WITH CARON;Lu;0;L;0041 030C;;;;N;LATIN CAPITAL LETTER A HACEK;;;01CE; -01CE;LATIN SMALL LETTER A WITH CARON;Ll;0;L;0061 030C;;;;N;LATIN SMALL LETTER A HACEK;;01CD;;01CD -01CF;LATIN CAPITAL LETTER I WITH CARON;Lu;0;L;0049 030C;;;;N;LATIN CAPITAL LETTER I HACEK;;;01D0; -01D0;LATIN SMALL LETTER I WITH CARON;Ll;0;L;0069 030C;;;;N;LATIN SMALL LETTER I HACEK;;01CF;;01CF -01D1;LATIN CAPITAL LETTER O WITH CARON;Lu;0;L;004F 030C;;;;N;LATIN CAPITAL LETTER O HACEK;;;01D2; -01D2;LATIN SMALL LETTER O WITH CARON;Ll;0;L;006F 030C;;;;N;LATIN SMALL LETTER O HACEK;;01D1;;01D1 -01D3;LATIN CAPITAL LETTER U WITH CARON;Lu;0;L;0055 030C;;;;N;LATIN CAPITAL LETTER U HACEK;;;01D4; -01D4;LATIN SMALL LETTER U WITH CARON;Ll;0;L;0075 030C;;;;N;LATIN SMALL LETTER U HACEK;;01D3;;01D3 -01D5;LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON;Lu;0;L;00DC 0304;;;;N;LATIN CAPITAL LETTER U DIAERESIS MACRON;;;01D6; -01D6;LATIN SMALL LETTER U WITH DIAERESIS AND MACRON;Ll;0;L;00FC 0304;;;;N;LATIN SMALL LETTER U DIAERESIS MACRON;;01D5;;01D5 -01D7;LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE;Lu;0;L;00DC 0301;;;;N;LATIN CAPITAL LETTER U DIAERESIS ACUTE;;;01D8; -01D8;LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE;Ll;0;L;00FC 0301;;;;N;LATIN SMALL LETTER U DIAERESIS ACUTE;;01D7;;01D7 -01D9;LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON;Lu;0;L;00DC 030C;;;;N;LATIN CAPITAL LETTER U DIAERESIS HACEK;;;01DA; -01DA;LATIN SMALL LETTER U WITH DIAERESIS AND CARON;Ll;0;L;00FC 030C;;;;N;LATIN SMALL LETTER U DIAERESIS HACEK;;01D9;;01D9 -01DB;LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE;Lu;0;L;00DC 0300;;;;N;LATIN CAPITAL LETTER U DIAERESIS GRAVE;;;01DC; -01DC;LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE;Ll;0;L;00FC 0300;;;;N;LATIN SMALL LETTER U DIAERESIS GRAVE;;01DB;;01DB -01DD;LATIN SMALL LETTER TURNED E;Ll;0;L;;;;;N;;;018E;;018E -01DE;LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON;Lu;0;L;00C4 0304;;;;N;LATIN CAPITAL LETTER A DIAERESIS MACRON;;;01DF; -01DF;LATIN SMALL LETTER A WITH DIAERESIS AND MACRON;Ll;0;L;00E4 0304;;;;N;LATIN SMALL LETTER A DIAERESIS MACRON;;01DE;;01DE -01E0;LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON;Lu;0;L;0226 0304;;;;N;LATIN CAPITAL LETTER A DOT MACRON;;;01E1; -01E1;LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON;Ll;0;L;0227 0304;;;;N;LATIN SMALL LETTER A DOT MACRON;;01E0;;01E0 -01E2;LATIN CAPITAL LETTER AE WITH MACRON;Lu;0;L;00C6 0304;;;;N;LATIN CAPITAL LETTER A E MACRON;ash *;;01E3; -01E3;LATIN SMALL LETTER AE WITH MACRON;Ll;0;L;00E6 0304;;;;N;LATIN SMALL LETTER A E MACRON;ash *;01E2;;01E2 -01E4;LATIN CAPITAL LETTER G WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G BAR;;;01E5; -01E5;LATIN SMALL LETTER G WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER G BAR;;01E4;;01E4 -01E6;LATIN CAPITAL LETTER G WITH CARON;Lu;0;L;0047 030C;;;;N;LATIN CAPITAL LETTER G HACEK;;;01E7; -01E7;LATIN SMALL LETTER G WITH CARON;Ll;0;L;0067 030C;;;;N;LATIN SMALL LETTER G HACEK;;01E6;;01E6 -01E8;LATIN CAPITAL LETTER K WITH CARON;Lu;0;L;004B 030C;;;;N;LATIN CAPITAL LETTER K HACEK;;;01E9; -01E9;LATIN SMALL LETTER K WITH CARON;Ll;0;L;006B 030C;;;;N;LATIN SMALL LETTER K HACEK;;01E8;;01E8 -01EA;LATIN CAPITAL LETTER O WITH OGONEK;Lu;0;L;004F 0328;;;;N;LATIN CAPITAL LETTER O OGONEK;;;01EB; -01EB;LATIN SMALL LETTER O WITH OGONEK;Ll;0;L;006F 0328;;;;N;LATIN SMALL LETTER O OGONEK;;01EA;;01EA -01EC;LATIN CAPITAL LETTER O WITH OGONEK AND MACRON;Lu;0;L;01EA 0304;;;;N;LATIN CAPITAL LETTER O OGONEK MACRON;;;01ED; -01ED;LATIN SMALL LETTER O WITH OGONEK AND MACRON;Ll;0;L;01EB 0304;;;;N;LATIN SMALL LETTER O OGONEK MACRON;;01EC;;01EC -01EE;LATIN CAPITAL LETTER EZH WITH CARON;Lu;0;L;01B7 030C;;;;N;LATIN CAPITAL LETTER YOGH HACEK;;;01EF; -01EF;LATIN SMALL LETTER EZH WITH CARON;Ll;0;L;0292 030C;;;;N;LATIN SMALL LETTER YOGH HACEK;;01EE;;01EE -01F0;LATIN SMALL LETTER J WITH CARON;Ll;0;L;006A 030C;;;;N;LATIN SMALL LETTER J HACEK;;;; -01F1;LATIN CAPITAL LETTER DZ;Lu;0;L;<compat> 0044 005A;;;;N;;;;01F3;01F2 -01F2;LATIN CAPITAL LETTER D WITH SMALL LETTER Z;Lt;0;L;<compat> 0044 007A;;;;N;;;01F1;01F3; -01F3;LATIN SMALL LETTER DZ;Ll;0;L;<compat> 0064 007A;;;;N;;;01F1;;01F2 -01F4;LATIN CAPITAL LETTER G WITH ACUTE;Lu;0;L;0047 0301;;;;N;;;;01F5; -01F5;LATIN SMALL LETTER G WITH ACUTE;Ll;0;L;0067 0301;;;;N;;;01F4;;01F4 -01F6;LATIN CAPITAL LETTER HWAIR;Lu;0;L;;;;;N;;;;0195; -01F7;LATIN CAPITAL LETTER WYNN;Lu;0;L;;;;;N;;;;01BF; -01F8;LATIN CAPITAL LETTER N WITH GRAVE;Lu;0;L;004E 0300;;;;N;;;;01F9; -01F9;LATIN SMALL LETTER N WITH GRAVE;Ll;0;L;006E 0300;;;;N;;;01F8;;01F8 -01FA;LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE;Lu;0;L;00C5 0301;;;;N;;;;01FB; -01FB;LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE;Ll;0;L;00E5 0301;;;;N;;;01FA;;01FA -01FC;LATIN CAPITAL LETTER AE WITH ACUTE;Lu;0;L;00C6 0301;;;;N;;ash *;;01FD; -01FD;LATIN SMALL LETTER AE WITH ACUTE;Ll;0;L;00E6 0301;;;;N;;ash *;01FC;;01FC -01FE;LATIN CAPITAL LETTER O WITH STROKE AND ACUTE;Lu;0;L;00D8 0301;;;;N;;;;01FF; -01FF;LATIN SMALL LETTER O WITH STROKE AND ACUTE;Ll;0;L;00F8 0301;;;;N;;;01FE;;01FE -0200;LATIN CAPITAL LETTER A WITH DOUBLE GRAVE;Lu;0;L;0041 030F;;;;N;;;;0201; -0201;LATIN SMALL LETTER A WITH DOUBLE GRAVE;Ll;0;L;0061 030F;;;;N;;;0200;;0200 -0202;LATIN CAPITAL LETTER A WITH INVERTED BREVE;Lu;0;L;0041 0311;;;;N;;;;0203; -0203;LATIN SMALL LETTER A WITH INVERTED BREVE;Ll;0;L;0061 0311;;;;N;;;0202;;0202 -0204;LATIN CAPITAL LETTER E WITH DOUBLE GRAVE;Lu;0;L;0045 030F;;;;N;;;;0205; -0205;LATIN SMALL LETTER E WITH DOUBLE GRAVE;Ll;0;L;0065 030F;;;;N;;;0204;;0204 -0206;LATIN CAPITAL LETTER E WITH INVERTED BREVE;Lu;0;L;0045 0311;;;;N;;;;0207; -0207;LATIN SMALL LETTER E WITH INVERTED BREVE;Ll;0;L;0065 0311;;;;N;;;0206;;0206 -0208;LATIN CAPITAL LETTER I WITH DOUBLE GRAVE;Lu;0;L;0049 030F;;;;N;;;;0209; -0209;LATIN SMALL LETTER I WITH DOUBLE GRAVE;Ll;0;L;0069 030F;;;;N;;;0208;;0208 -020A;LATIN CAPITAL LETTER I WITH INVERTED BREVE;Lu;0;L;0049 0311;;;;N;;;;020B; -020B;LATIN SMALL LETTER I WITH INVERTED BREVE;Ll;0;L;0069 0311;;;;N;;;020A;;020A -020C;LATIN CAPITAL LETTER O WITH DOUBLE GRAVE;Lu;0;L;004F 030F;;;;N;;;;020D; -020D;LATIN SMALL LETTER O WITH DOUBLE GRAVE;Ll;0;L;006F 030F;;;;N;;;020C;;020C -020E;LATIN CAPITAL LETTER O WITH INVERTED BREVE;Lu;0;L;004F 0311;;;;N;;;;020F; -020F;LATIN SMALL LETTER O WITH INVERTED BREVE;Ll;0;L;006F 0311;;;;N;;;020E;;020E -0210;LATIN CAPITAL LETTER R WITH DOUBLE GRAVE;Lu;0;L;0052 030F;;;;N;;;;0211; -0211;LATIN SMALL LETTER R WITH DOUBLE GRAVE;Ll;0;L;0072 030F;;;;N;;;0210;;0210 -0212;LATIN CAPITAL LETTER R WITH INVERTED BREVE;Lu;0;L;0052 0311;;;;N;;;;0213; -0213;LATIN SMALL LETTER R WITH INVERTED BREVE;Ll;0;L;0072 0311;;;;N;;;0212;;0212 -0214;LATIN CAPITAL LETTER U WITH DOUBLE GRAVE;Lu;0;L;0055 030F;;;;N;;;;0215; -0215;LATIN SMALL LETTER U WITH DOUBLE GRAVE;Ll;0;L;0075 030F;;;;N;;;0214;;0214 -0216;LATIN CAPITAL LETTER U WITH INVERTED BREVE;Lu;0;L;0055 0311;;;;N;;;;0217; -0217;LATIN SMALL LETTER U WITH INVERTED BREVE;Ll;0;L;0075 0311;;;;N;;;0216;;0216 -0218;LATIN CAPITAL LETTER S WITH COMMA BELOW;Lu;0;L;0053 0326;;;;N;;*;;0219; -0219;LATIN SMALL LETTER S WITH COMMA BELOW;Ll;0;L;0073 0326;;;;N;;*;0218;;0218 -021A;LATIN CAPITAL LETTER T WITH COMMA BELOW;Lu;0;L;0054 0326;;;;N;;*;;021B; -021B;LATIN SMALL LETTER T WITH COMMA BELOW;Ll;0;L;0074 0326;;;;N;;*;021A;;021A -021C;LATIN CAPITAL LETTER YOGH;Lu;0;L;;;;;N;;;;021D; -021D;LATIN SMALL LETTER YOGH;Ll;0;L;;;;;N;;;021C;;021C -021E;LATIN CAPITAL LETTER H WITH CARON;Lu;0;L;0048 030C;;;;N;;;;021F; -021F;LATIN SMALL LETTER H WITH CARON;Ll;0;L;0068 030C;;;;N;;;021E;;021E -0222;LATIN CAPITAL LETTER OU;Lu;0;L;;;;;N;;;;0223; -0223;LATIN SMALL LETTER OU;Ll;0;L;;;;;N;;;0222;;0222 -0224;LATIN CAPITAL LETTER Z WITH HOOK;Lu;0;L;;;;;N;;;;0225; -0225;LATIN SMALL LETTER Z WITH HOOK;Ll;0;L;;;;;N;;;0224;;0224 -0226;LATIN CAPITAL LETTER A WITH DOT ABOVE;Lu;0;L;0041 0307;;;;N;;;;0227; -0227;LATIN SMALL LETTER A WITH DOT ABOVE;Ll;0;L;0061 0307;;;;N;;;0226;;0226 -0228;LATIN CAPITAL LETTER E WITH CEDILLA;Lu;0;L;0045 0327;;;;N;;;;0229; -0229;LATIN SMALL LETTER E WITH CEDILLA;Ll;0;L;0065 0327;;;;N;;;0228;;0228 -022A;LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON;Lu;0;L;00D6 0304;;;;N;;;;022B; -022B;LATIN SMALL LETTER O WITH DIAERESIS AND MACRON;Ll;0;L;00F6 0304;;;;N;;;022A;;022A -022C;LATIN CAPITAL LETTER O WITH TILDE AND MACRON;Lu;0;L;00D5 0304;;;;N;;;;022D; -022D;LATIN SMALL LETTER O WITH TILDE AND MACRON;Ll;0;L;00F5 0304;;;;N;;;022C;;022C -022E;LATIN CAPITAL LETTER O WITH DOT ABOVE;Lu;0;L;004F 0307;;;;N;;;;022F; -022F;LATIN SMALL LETTER O WITH DOT ABOVE;Ll;0;L;006F 0307;;;;N;;;022E;;022E -0230;LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON;Lu;0;L;022E 0304;;;;N;;;;0231; -0231;LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON;Ll;0;L;022F 0304;;;;N;;;0230;;0230 -0232;LATIN CAPITAL LETTER Y WITH MACRON;Lu;0;L;0059 0304;;;;N;;;;0233; -0233;LATIN SMALL LETTER Y WITH MACRON;Ll;0;L;0079 0304;;;;N;;;0232;;0232 -0250;LATIN SMALL LETTER TURNED A;Ll;0;L;;;;;N;;;;; -0251;LATIN SMALL LETTER ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT A;;;; -0252;LATIN SMALL LETTER TURNED ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED SCRIPT A;;;; -0253;LATIN SMALL LETTER B WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER B HOOK;;0181;;0181 -0254;LATIN SMALL LETTER OPEN O;Ll;0;L;;;;;N;;;0186;;0186 -0255;LATIN SMALL LETTER C WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER C CURL;;;; -0256;LATIN SMALL LETTER D WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER D RETROFLEX HOOK;;0189;;0189 -0257;LATIN SMALL LETTER D WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER D HOOK;;018A;;018A -0258;LATIN SMALL LETTER REVERSED E;Ll;0;L;;;;;N;;;;; -0259;LATIN SMALL LETTER SCHWA;Ll;0;L;;;;;N;;;018F;;018F -025A;LATIN SMALL LETTER SCHWA WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCHWA HOOK;;;; -025B;LATIN SMALL LETTER OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER EPSILON;;0190;;0190 -025C;LATIN SMALL LETTER REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON;;;; -025D;LATIN SMALL LETTER REVERSED OPEN E WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON HOOK;;;; -025E;LATIN SMALL LETTER CLOSED REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED REVERSED EPSILON;;;; -025F;LATIN SMALL LETTER DOTLESS J WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR;;;; -0260;LATIN SMALL LETTER G WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER G HOOK;;0193;;0193 -0261;LATIN SMALL LETTER SCRIPT G;Ll;0;L;;;;;N;;;;; -0262;LATIN LETTER SMALL CAPITAL G;Ll;0;L;;;;;N;;;;; -0263;LATIN SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0194;;0194 -0264;LATIN SMALL LETTER RAMS HORN;Ll;0;L;;;;;N;LATIN SMALL LETTER BABY GAMMA;;;; -0265;LATIN SMALL LETTER TURNED H;Ll;0;L;;;;;N;;;;; -0266;LATIN SMALL LETTER H WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER H HOOK;;;; -0267;LATIN SMALL LETTER HENG WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER HENG HOOK;;;; -0268;LATIN SMALL LETTER I WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED I;;0197;;0197 -0269;LATIN SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0196;;0196 -026A;LATIN LETTER SMALL CAPITAL I;Ll;0;L;;;;;N;;;;; -026B;LATIN SMALL LETTER L WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; -026C;LATIN SMALL LETTER L WITH BELT;Ll;0;L;;;;;N;LATIN SMALL LETTER L BELT;;;; -026D;LATIN SMALL LETTER L WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER L RETROFLEX HOOK;;;; -026E;LATIN SMALL LETTER LEZH;Ll;0;L;;;;;N;LATIN SMALL LETTER L YOGH;;;; -026F;LATIN SMALL LETTER TURNED M;Ll;0;L;;;;;N;;;019C;;019C -0270;LATIN SMALL LETTER TURNED M WITH LONG LEG;Ll;0;L;;;;;N;;;;; -0271;LATIN SMALL LETTER M WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER M HOOK;;;; -0272;LATIN SMALL LETTER N WITH LEFT HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N HOOK;;019D;;019D -0273;LATIN SMALL LETTER N WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N RETROFLEX HOOK;;;; -0274;LATIN LETTER SMALL CAPITAL N;Ll;0;L;;;;;N;;;;; -0275;LATIN SMALL LETTER BARRED O;Ll;0;L;;;;;N;;;019F;;019F -0276;LATIN LETTER SMALL CAPITAL OE;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL O E;;;; -0277;LATIN SMALL LETTER CLOSED OMEGA;Ll;0;L;;;;;N;;;;; -0278;LATIN SMALL LETTER PHI;Ll;0;L;;;;;N;;;;; -0279;LATIN SMALL LETTER TURNED R;Ll;0;L;;;;;N;;;;; -027A;LATIN SMALL LETTER TURNED R WITH LONG LEG;Ll;0;L;;;;;N;;;;; -027B;LATIN SMALL LETTER TURNED R WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED R HOOK;;;; -027C;LATIN SMALL LETTER R WITH LONG LEG;Ll;0;L;;;;;N;;;;; -027D;LATIN SMALL LETTER R WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER R HOOK;;;; -027E;LATIN SMALL LETTER R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER FISHHOOK R;;;; -027F;LATIN SMALL LETTER REVERSED R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED FISHHOOK R;;;; -0280;LATIN LETTER SMALL CAPITAL R;Ll;0;L;;;;;N;;*;01A6;;01A6 -0281;LATIN LETTER SMALL CAPITAL INVERTED R;Ll;0;L;;;;;N;;;;; -0282;LATIN SMALL LETTER S WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER S HOOK;;;; -0283;LATIN SMALL LETTER ESH;Ll;0;L;;;;;N;;;01A9;;01A9 -0284;LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR HOOK;;;; -0285;LATIN SMALL LETTER SQUAT REVERSED ESH;Ll;0;L;;;;;N;;;;; -0286;LATIN SMALL LETTER ESH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER ESH CURL;;;; -0287;LATIN SMALL LETTER TURNED T;Ll;0;L;;;;;N;;;;; -0288;LATIN SMALL LETTER T WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T RETROFLEX HOOK;;01AE;;01AE -0289;LATIN SMALL LETTER U BAR;Ll;0;L;;;;;N;;;;; -028A;LATIN SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;01B1;;01B1 -028B;LATIN SMALL LETTER V WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT V;;01B2;;01B2 -028C;LATIN SMALL LETTER TURNED V;Ll;0;L;;;;;N;;;;; -028D;LATIN SMALL LETTER TURNED W;Ll;0;L;;;;;N;;;;; -028E;LATIN SMALL LETTER TURNED Y;Ll;0;L;;;;;N;;;;; -028F;LATIN LETTER SMALL CAPITAL Y;Ll;0;L;;;;;N;;;;; -0290;LATIN SMALL LETTER Z WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Z RETROFLEX HOOK;;;; -0291;LATIN SMALL LETTER Z WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER Z CURL;;;; -0292;LATIN SMALL LETTER EZH;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH;;01B7;;01B7 -0293;LATIN SMALL LETTER EZH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH CURL;;;; -0294;LATIN LETTER GLOTTAL STOP;Ll;0;L;;;;;N;;;;; -0295;LATIN LETTER PHARYNGEAL VOICED FRICATIVE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP;;;; -0296;LATIN LETTER INVERTED GLOTTAL STOP;Ll;0;L;;;;;N;;;;; -0297;LATIN LETTER STRETCHED C;Ll;0;L;;;;;N;;;;; -0298;LATIN LETTER BILABIAL CLICK;Ll;0;L;;;;;N;LATIN LETTER BULLSEYE;;;; -0299;LATIN LETTER SMALL CAPITAL B;Ll;0;L;;;;;N;;;;; -029A;LATIN SMALL LETTER CLOSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED EPSILON;;;; -029B;LATIN LETTER SMALL CAPITAL G WITH HOOK;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL G HOOK;;;; -029C;LATIN LETTER SMALL CAPITAL H;Ll;0;L;;;;;N;;;;; -029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER CROSSED-TAIL J;;;; -029E;LATIN SMALL LETTER TURNED K;Ll;0;L;;;;;N;;;;; -029F;LATIN LETTER SMALL CAPITAL L;Ll;0;L;;;;;N;;;;; -02A0;LATIN SMALL LETTER Q WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Q HOOK;;;; -02A1;LATIN LETTER GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER GLOTTAL STOP BAR;;;; -02A2;LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP BAR;;;; -02A3;LATIN SMALL LETTER DZ DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z;;;; -02A4;LATIN SMALL LETTER DEZH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D YOGH;;;; -02A5;LATIN SMALL LETTER DZ DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z CURL;;;; -02A6;LATIN SMALL LETTER TS DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T S;;;; -02A7;LATIN SMALL LETTER TESH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T ESH;;;; -02A8;LATIN SMALL LETTER TC DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER T C CURL;;;; -02A9;LATIN SMALL LETTER FENG DIGRAPH;Ll;0;L;;;;;N;;;;; -02AA;LATIN SMALL LETTER LS DIGRAPH;Ll;0;L;;;;;N;;;;; -02AB;LATIN SMALL LETTER LZ DIGRAPH;Ll;0;L;;;;;N;;;;; -02AC;LATIN LETTER BILABIAL PERCUSSIVE;Ll;0;L;;;;;N;;;;; -02AD;LATIN LETTER BIDENTAL PERCUSSIVE;Ll;0;L;;;;;N;;;;; -02B0;MODIFIER LETTER SMALL H;Lm;0;L;<super> 0068;;;;N;;;;; -02B1;MODIFIER LETTER SMALL H WITH HOOK;Lm;0;L;<super> 0266;;;;N;MODIFIER LETTER SMALL H HOOK;;;; -02B2;MODIFIER LETTER SMALL J;Lm;0;L;<super> 006A;;;;N;;;;; -02B3;MODIFIER LETTER SMALL R;Lm;0;L;<super> 0072;;;;N;;;;; -02B4;MODIFIER LETTER SMALL TURNED R;Lm;0;L;<super> 0279;;;;N;;;;; -02B5;MODIFIER LETTER SMALL TURNED R WITH HOOK;Lm;0;L;<super> 027B;;;;N;MODIFIER LETTER SMALL TURNED R HOOK;;;; -02B6;MODIFIER LETTER SMALL CAPITAL INVERTED R;Lm;0;L;<super> 0281;;;;N;;;;; -02B7;MODIFIER LETTER SMALL W;Lm;0;L;<super> 0077;;;;N;;;;; -02B8;MODIFIER LETTER SMALL Y;Lm;0;L;<super> 0079;;;;N;;;;; -02B9;MODIFIER LETTER PRIME;Sk;0;ON;;;;;N;;;;; -02BA;MODIFIER LETTER DOUBLE PRIME;Sk;0;ON;;;;;N;;;;; -02BB;MODIFIER LETTER TURNED COMMA;Lm;0;L;;;;;N;;;;; -02BC;MODIFIER LETTER APOSTROPHE;Lm;0;L;;;;;N;;;;; -02BD;MODIFIER LETTER REVERSED COMMA;Lm;0;L;;;;;N;;;;; -02BE;MODIFIER LETTER RIGHT HALF RING;Lm;0;L;;;;;N;;;;; -02BF;MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;; -02C0;MODIFIER LETTER GLOTTAL STOP;Lm;0;L;;;;;N;;;;; -02C1;MODIFIER LETTER REVERSED GLOTTAL STOP;Lm;0;L;;;;;N;;;;; -02C2;MODIFIER LETTER LEFT ARROWHEAD;Sk;0;ON;;;;;N;;;;; -02C3;MODIFIER LETTER RIGHT ARROWHEAD;Sk;0;ON;;;;;N;;;;; -02C4;MODIFIER LETTER UP ARROWHEAD;Sk;0;ON;;;;;N;;;;; -02C5;MODIFIER LETTER DOWN ARROWHEAD;Sk;0;ON;;;;;N;;;;; -02C6;MODIFIER LETTER CIRCUMFLEX ACCENT;Sk;0;ON;;;;;N;MODIFIER LETTER CIRCUMFLEX;;;; -02C7;CARON;Sk;0;ON;;;;;N;MODIFIER LETTER HACEK;Mandarin Chinese third tone;;; -02C8;MODIFIER LETTER VERTICAL LINE;Sk;0;ON;;;;;N;;;;; -02C9;MODIFIER LETTER MACRON;Sk;0;ON;;;;;N;;Mandarin Chinese first tone;;; -02CA;MODIFIER LETTER ACUTE ACCENT;Sk;0;ON;;;;;N;MODIFIER LETTER ACUTE;Mandarin Chinese second tone;;; -02CB;MODIFIER LETTER GRAVE ACCENT;Sk;0;ON;;;;;N;MODIFIER LETTER GRAVE;Mandarin Chinese fourth tone;;; -02CC;MODIFIER LETTER LOW VERTICAL LINE;Sk;0;ON;;;;;N;;;;; -02CD;MODIFIER LETTER LOW MACRON;Sk;0;ON;;;;;N;;;;; -02CE;MODIFIER LETTER LOW GRAVE ACCENT;Sk;0;ON;;;;;N;MODIFIER LETTER LOW GRAVE;;;; -02CF;MODIFIER LETTER LOW ACUTE ACCENT;Sk;0;ON;;;;;N;MODIFIER LETTER LOW ACUTE;;;; -02D0;MODIFIER LETTER TRIANGULAR COLON;Lm;0;L;;;;;N;;;;; -02D1;MODIFIER LETTER HALF TRIANGULAR COLON;Lm;0;L;;;;;N;;;;; -02D2;MODIFIER LETTER CENTRED RIGHT HALF RING;Sk;0;ON;;;;;N;MODIFIER LETTER CENTERED RIGHT HALF RING;;;; -02D3;MODIFIER LETTER CENTRED LEFT HALF RING;Sk;0;ON;;;;;N;MODIFIER LETTER CENTERED LEFT HALF RING;;;; -02D4;MODIFIER LETTER UP TACK;Sk;0;ON;;;;;N;;;;; -02D5;MODIFIER LETTER DOWN TACK;Sk;0;ON;;;;;N;;;;; -02D6;MODIFIER LETTER PLUS SIGN;Sk;0;ON;;;;;N;;;;; -02D7;MODIFIER LETTER MINUS SIGN;Sk;0;ON;;;;;N;;;;; -02D8;BREVE;Sk;0;ON;<compat> 0020 0306;;;;N;SPACING BREVE;;;; -02D9;DOT ABOVE;Sk;0;ON;<compat> 0020 0307;;;;N;SPACING DOT ABOVE;Mandarin Chinese light tone;;; -02DA;RING ABOVE;Sk;0;ON;<compat> 0020 030A;;;;N;SPACING RING ABOVE;;;; -02DB;OGONEK;Sk;0;ON;<compat> 0020 0328;;;;N;SPACING OGONEK;;;; -02DC;SMALL TILDE;Sk;0;ON;<compat> 0020 0303;;;;N;SPACING TILDE;;;; -02DD;DOUBLE ACUTE ACCENT;Sk;0;ON;<compat> 0020 030B;;;;N;SPACING DOUBLE ACUTE;;;; -02DE;MODIFIER LETTER RHOTIC HOOK;Sk;0;ON;;;;;N;;;;; -02DF;MODIFIER LETTER CROSS ACCENT;Sk;0;ON;;;;;N;;;;; -02E0;MODIFIER LETTER SMALL GAMMA;Lm;0;L;<super> 0263;;;;N;;;;; -02E1;MODIFIER LETTER SMALL L;Lm;0;L;<super> 006C;;;;N;;;;; -02E2;MODIFIER LETTER SMALL S;Lm;0;L;<super> 0073;;;;N;;;;; -02E3;MODIFIER LETTER SMALL X;Lm;0;L;<super> 0078;;;;N;;;;; -02E4;MODIFIER LETTER SMALL REVERSED GLOTTAL STOP;Lm;0;L;<super> 0295;;;;N;;;;; -02E5;MODIFIER LETTER EXTRA-HIGH TONE BAR;Sk;0;ON;;;;;N;;;;; -02E6;MODIFIER LETTER HIGH TONE BAR;Sk;0;ON;;;;;N;;;;; -02E7;MODIFIER LETTER MID TONE BAR;Sk;0;ON;;;;;N;;;;; -02E8;MODIFIER LETTER LOW TONE BAR;Sk;0;ON;;;;;N;;;;; -02E9;MODIFIER LETTER EXTRA-LOW TONE BAR;Sk;0;ON;;;;;N;;;;; -02EA;MODIFIER LETTER YIN DEPARTING TONE MARK;Sk;0;ON;;;;;N;;;;; -02EB;MODIFIER LETTER YANG DEPARTING TONE MARK;Sk;0;ON;;;;;N;;;;; -02EC;MODIFIER LETTER VOICING;Sk;0;ON;;;;;N;;;;; -02ED;MODIFIER LETTER UNASPIRATED;Sk;0;ON;;;;;N;;;;; -02EE;MODIFIER LETTER DOUBLE APOSTROPHE;Lm;0;L;;;;;N;;;;; -0300;COMBINING GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING GRAVE;Varia;;; -0301;COMBINING ACUTE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING ACUTE;Oxia;;; -0302;COMBINING CIRCUMFLEX ACCENT;Mn;230;NSM;;;;;N;NON-SPACING CIRCUMFLEX;;;; -0303;COMBINING TILDE;Mn;230;NSM;;;;;N;NON-SPACING TILDE;;;; -0304;COMBINING MACRON;Mn;230;NSM;;;;;N;NON-SPACING MACRON;;;; -0305;COMBINING OVERLINE;Mn;230;NSM;;;;;N;NON-SPACING OVERSCORE;;;; -0306;COMBINING BREVE;Mn;230;NSM;;;;;N;NON-SPACING BREVE;Vrachy;;; -0307;COMBINING DOT ABOVE;Mn;230;NSM;;;;;N;NON-SPACING DOT ABOVE;;;; -0308;COMBINING DIAERESIS;Mn;230;NSM;;;;;N;NON-SPACING DIAERESIS;Dialytika;;; -0309;COMBINING HOOK ABOVE;Mn;230;NSM;;;;;N;NON-SPACING HOOK ABOVE;;;; -030A;COMBINING RING ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RING ABOVE;;;; -030B;COMBINING DOUBLE ACUTE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE ACUTE;;;; -030C;COMBINING CARON;Mn;230;NSM;;;;;N;NON-SPACING HACEK;;;; -030D;COMBINING VERTICAL LINE ABOVE;Mn;230;NSM;;;;;N;NON-SPACING VERTICAL LINE ABOVE;Tonos;;; -030E;COMBINING DOUBLE VERTICAL LINE ABOVE;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE VERTICAL LINE ABOVE;;;; -030F;COMBINING DOUBLE GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE GRAVE;;;; -0310;COMBINING CANDRABINDU;Mn;230;NSM;;;;;N;NON-SPACING CANDRABINDU;;;; -0311;COMBINING INVERTED BREVE;Mn;230;NSM;;;;;N;NON-SPACING INVERTED BREVE;;;; -0312;COMBINING TURNED COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING TURNED COMMA ABOVE;;;; -0313;COMBINING COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING COMMA ABOVE;Psili;;; -0314;COMBINING REVERSED COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING REVERSED COMMA ABOVE;Dasia;;; -0315;COMBINING COMMA ABOVE RIGHT;Mn;232;NSM;;;;;N;NON-SPACING COMMA ABOVE RIGHT;;;; -0316;COMBINING GRAVE ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING GRAVE BELOW;;;; -0317;COMBINING ACUTE ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING ACUTE BELOW;;;; -0318;COMBINING LEFT TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING LEFT TACK BELOW;;;; -0319;COMBINING RIGHT TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING RIGHT TACK BELOW;;;; -031A;COMBINING LEFT ANGLE ABOVE;Mn;232;NSM;;;;;N;NON-SPACING LEFT ANGLE ABOVE;;;; -031B;COMBINING HORN;Mn;216;NSM;;;;;N;NON-SPACING HORN;;;; -031C;COMBINING LEFT HALF RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING LEFT HALF RING BELOW;;;; -031D;COMBINING UP TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING UP TACK BELOW;;;; -031E;COMBINING DOWN TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOWN TACK BELOW;;;; -031F;COMBINING PLUS SIGN BELOW;Mn;220;NSM;;;;;N;NON-SPACING PLUS SIGN BELOW;;;; -0320;COMBINING MINUS SIGN BELOW;Mn;220;NSM;;;;;N;NON-SPACING MINUS SIGN BELOW;;;; -0321;COMBINING PALATALIZED HOOK BELOW;Mn;202;NSM;;;;;N;NON-SPACING PALATALIZED HOOK BELOW;;;; -0322;COMBINING RETROFLEX HOOK BELOW;Mn;202;NSM;;;;;N;NON-SPACING RETROFLEX HOOK BELOW;;;; -0323;COMBINING DOT BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOT BELOW;;;; -0324;COMBINING DIAERESIS BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOUBLE DOT BELOW;;;; -0325;COMBINING RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RING BELOW;;;; -0326;COMBINING COMMA BELOW;Mn;220;NSM;;;;;N;NON-SPACING COMMA BELOW;;;; -0327;COMBINING CEDILLA;Mn;202;NSM;;;;;N;NON-SPACING CEDILLA;;;; -0328;COMBINING OGONEK;Mn;202;NSM;;;;;N;NON-SPACING OGONEK;;;; -0329;COMBINING VERTICAL LINE BELOW;Mn;220;NSM;;;;;N;NON-SPACING VERTICAL LINE BELOW;;;; -032A;COMBINING BRIDGE BELOW;Mn;220;NSM;;;;;N;NON-SPACING BRIDGE BELOW;;;; -032B;COMBINING INVERTED DOUBLE ARCH BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED DOUBLE ARCH BELOW;;;; -032C;COMBINING CARON BELOW;Mn;220;NSM;;;;;N;NON-SPACING HACEK BELOW;;;; -032D;COMBINING CIRCUMFLEX ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING CIRCUMFLEX BELOW;;;; -032E;COMBINING BREVE BELOW;Mn;220;NSM;;;;;N;NON-SPACING BREVE BELOW;;;; -032F;COMBINING INVERTED BREVE BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED BREVE BELOW;;;; -0330;COMBINING TILDE BELOW;Mn;220;NSM;;;;;N;NON-SPACING TILDE BELOW;;;; -0331;COMBINING MACRON BELOW;Mn;220;NSM;;;;;N;NON-SPACING MACRON BELOW;;;; -0332;COMBINING LOW LINE;Mn;220;NSM;;;;;N;NON-SPACING UNDERSCORE;;;; -0333;COMBINING DOUBLE LOW LINE;Mn;220;NSM;;;;;N;NON-SPACING DOUBLE UNDERSCORE;;;; -0334;COMBINING TILDE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING TILDE OVERLAY;;;; -0335;COMBINING SHORT STROKE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT BAR OVERLAY;;;; -0336;COMBINING LONG STROKE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG BAR OVERLAY;;;; -0337;COMBINING SHORT SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT SLASH OVERLAY;;;; -0338;COMBINING LONG SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG SLASH OVERLAY;;;; -0339;COMBINING RIGHT HALF RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RIGHT HALF RING BELOW;;;; -033A;COMBINING INVERTED BRIDGE BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED BRIDGE BELOW;;;; -033B;COMBINING SQUARE BELOW;Mn;220;NSM;;;;;N;NON-SPACING SQUARE BELOW;;;; -033C;COMBINING SEAGULL BELOW;Mn;220;NSM;;;;;N;NON-SPACING SEAGULL BELOW;;;; -033D;COMBINING X ABOVE;Mn;230;NSM;;;;;N;NON-SPACING X ABOVE;;;; -033E;COMBINING VERTICAL TILDE;Mn;230;NSM;;;;;N;NON-SPACING VERTICAL TILDE;;;; -033F;COMBINING DOUBLE OVERLINE;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE OVERSCORE;;;; -0340;COMBINING GRAVE TONE MARK;Mn;230;NSM;0300;;;;N;NON-SPACING GRAVE TONE MARK;Vietnamese;;; -0341;COMBINING ACUTE TONE MARK;Mn;230;NSM;0301;;;;N;NON-SPACING ACUTE TONE MARK;Vietnamese;;; -0342;COMBINING GREEK PERISPOMENI;Mn;230;NSM;;;;;N;;;;; -0343;COMBINING GREEK KORONIS;Mn;230;NSM;0313;;;;N;;;;; -0344;COMBINING GREEK DIALYTIKA TONOS;Mn;230;NSM;0308 0301;;;;N;GREEK NON-SPACING DIAERESIS TONOS;;;; -0345;COMBINING GREEK YPOGEGRAMMENI;Mn;240;NSM;;;;;N;GREEK NON-SPACING IOTA BELOW;;0399;;0399 -0346;COMBINING BRIDGE ABOVE;Mn;230;NSM;;;;;N;;;;; -0347;COMBINING EQUALS SIGN BELOW;Mn;220;NSM;;;;;N;;;;; -0348;COMBINING DOUBLE VERTICAL LINE BELOW;Mn;220;NSM;;;;;N;;;;; -0349;COMBINING LEFT ANGLE BELOW;Mn;220;NSM;;;;;N;;;;; -034A;COMBINING NOT TILDE ABOVE;Mn;230;NSM;;;;;N;;;;; -034B;COMBINING HOMOTHETIC ABOVE;Mn;230;NSM;;;;;N;;;;; -034C;COMBINING ALMOST EQUAL TO ABOVE;Mn;230;NSM;;;;;N;;;;; -034D;COMBINING LEFT RIGHT ARROW BELOW;Mn;220;NSM;;;;;N;;;;; -034E;COMBINING UPWARDS ARROW BELOW;Mn;220;NSM;;;;;N;;;;; -0360;COMBINING DOUBLE TILDE;Mn;234;NSM;;;;;N;;;;; -0361;COMBINING DOUBLE INVERTED BREVE;Mn;234;NSM;;;;;N;;;;; -0362;COMBINING DOUBLE RIGHTWARDS ARROW BELOW;Mn;233;NSM;;;;;N;;;;; -0374;GREEK NUMERAL SIGN;Sk;0;ON;02B9;;;;N;GREEK UPPER NUMERAL SIGN;Dexia keraia;;; -0375;GREEK LOWER NUMERAL SIGN;Sk;0;ON;;;;;N;;Aristeri keraia;;; -037A;GREEK YPOGEGRAMMENI;Lm;0;L;<compat> 0020 0345;;;;N;GREEK SPACING IOTA BELOW;;;; -037E;GREEK QUESTION MARK;Po;0;ON;003B;;;;N;;Erotimatiko;;; -0384;GREEK TONOS;Sk;0;ON;<compat> 0020 0301;;;;N;GREEK SPACING TONOS;;;; -0385;GREEK DIALYTIKA TONOS;Sk;0;ON;00A8 0301;;;;N;GREEK SPACING DIAERESIS TONOS;;;; -0386;GREEK CAPITAL LETTER ALPHA WITH TONOS;Lu;0;L;0391 0301;;;;N;GREEK CAPITAL LETTER ALPHA TONOS;;;03AC; -0387;GREEK ANO TELEIA;Po;0;ON;00B7;;;;N;;;;; -0388;GREEK CAPITAL LETTER EPSILON WITH TONOS;Lu;0;L;0395 0301;;;;N;GREEK CAPITAL LETTER EPSILON TONOS;;;03AD; -0389;GREEK CAPITAL LETTER ETA WITH TONOS;Lu;0;L;0397 0301;;;;N;GREEK CAPITAL LETTER ETA TONOS;;;03AE; -038A;GREEK CAPITAL LETTER IOTA WITH TONOS;Lu;0;L;0399 0301;;;;N;GREEK CAPITAL LETTER IOTA TONOS;;;03AF; -038C;GREEK CAPITAL LETTER OMICRON WITH TONOS;Lu;0;L;039F 0301;;;;N;GREEK CAPITAL LETTER OMICRON TONOS;;;03CC; -038E;GREEK CAPITAL LETTER UPSILON WITH TONOS;Lu;0;L;03A5 0301;;;;N;GREEK CAPITAL LETTER UPSILON TONOS;;;03CD; -038F;GREEK CAPITAL LETTER OMEGA WITH TONOS;Lu;0;L;03A9 0301;;;;N;GREEK CAPITAL LETTER OMEGA TONOS;;;03CE; -0390;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS;Ll;0;L;03CA 0301;;;;N;GREEK SMALL LETTER IOTA DIAERESIS TONOS;;;; -0391;GREEK CAPITAL LETTER ALPHA;Lu;0;L;;;;;N;;;;03B1; -0392;GREEK CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;03B2; -0393;GREEK CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;03B3; -0394;GREEK CAPITAL LETTER DELTA;Lu;0;L;;;;;N;;;;03B4; -0395;GREEK CAPITAL LETTER EPSILON;Lu;0;L;;;;;N;;;;03B5; -0396;GREEK CAPITAL LETTER ZETA;Lu;0;L;;;;;N;;;;03B6; -0397;GREEK CAPITAL LETTER ETA;Lu;0;L;;;;;N;;;;03B7; -0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8; -0399;GREEK CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;03B9; -039A;GREEK CAPITAL LETTER KAPPA;Lu;0;L;;;;;N;;;;03BA; -039B;GREEK CAPITAL LETTER LAMDA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER LAMBDA;;;03BB; -039C;GREEK CAPITAL LETTER MU;Lu;0;L;;;;;N;;;;03BC; -039D;GREEK CAPITAL LETTER NU;Lu;0;L;;;;;N;;;;03BD; -039E;GREEK CAPITAL LETTER XI;Lu;0;L;;;;;N;;;;03BE; -039F;GREEK CAPITAL LETTER OMICRON;Lu;0;L;;;;;N;;;;03BF; -03A0;GREEK CAPITAL LETTER PI;Lu;0;L;;;;;N;;;;03C0; -03A1;GREEK CAPITAL LETTER RHO;Lu;0;L;;;;;N;;;;03C1; -03A3;GREEK CAPITAL LETTER SIGMA;Lu;0;L;;;;;N;;;;03C3; -03A4;GREEK CAPITAL LETTER TAU;Lu;0;L;;;;;N;;;;03C4; -03A5;GREEK CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;03C5; -03A6;GREEK CAPITAL LETTER PHI;Lu;0;L;;;;;N;;;;03C6; -03A7;GREEK CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;03C7; -03A8;GREEK CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;03C8; -03A9;GREEK CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;03C9; -03AA;GREEK CAPITAL LETTER IOTA WITH DIALYTIKA;Lu;0;L;0399 0308;;;;N;GREEK CAPITAL LETTER IOTA DIAERESIS;;;03CA; -03AB;GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA;Lu;0;L;03A5 0308;;;;N;GREEK CAPITAL LETTER UPSILON DIAERESIS;;;03CB; -03AC;GREEK SMALL LETTER ALPHA WITH TONOS;Ll;0;L;03B1 0301;;;;N;GREEK SMALL LETTER ALPHA TONOS;;0386;;0386 -03AD;GREEK SMALL LETTER EPSILON WITH TONOS;Ll;0;L;03B5 0301;;;;N;GREEK SMALL LETTER EPSILON TONOS;;0388;;0388 -03AE;GREEK SMALL LETTER ETA WITH TONOS;Ll;0;L;03B7 0301;;;;N;GREEK SMALL LETTER ETA TONOS;;0389;;0389 -03AF;GREEK SMALL LETTER IOTA WITH TONOS;Ll;0;L;03B9 0301;;;;N;GREEK SMALL LETTER IOTA TONOS;;038A;;038A -03B0;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS;Ll;0;L;03CB 0301;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS TONOS;;;; -03B1;GREEK SMALL LETTER ALPHA;Ll;0;L;;;;;N;;;0391;;0391 -03B2;GREEK SMALL LETTER BETA;Ll;0;L;;;;;N;;;0392;;0392 -03B3;GREEK SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0393;;0393 -03B4;GREEK SMALL LETTER DELTA;Ll;0;L;;;;;N;;;0394;;0394 -03B5;GREEK SMALL LETTER EPSILON;Ll;0;L;;;;;N;;;0395;;0395 -03B6;GREEK SMALL LETTER ZETA;Ll;0;L;;;;;N;;;0396;;0396 -03B7;GREEK SMALL LETTER ETA;Ll;0;L;;;;;N;;;0397;;0397 -03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 -03B9;GREEK SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0399;;0399 -03BA;GREEK SMALL LETTER KAPPA;Ll;0;L;;;;;N;;;039A;;039A -03BB;GREEK SMALL LETTER LAMDA;Ll;0;L;;;;;N;GREEK SMALL LETTER LAMBDA;;039B;;039B -03BC;GREEK SMALL LETTER MU;Ll;0;L;;;;;N;;;039C;;039C -03BD;GREEK SMALL LETTER NU;Ll;0;L;;;;;N;;;039D;;039D -03BE;GREEK SMALL LETTER XI;Ll;0;L;;;;;N;;;039E;;039E -03BF;GREEK SMALL LETTER OMICRON;Ll;0;L;;;;;N;;;039F;;039F -03C0;GREEK SMALL LETTER PI;Ll;0;L;;;;;N;;;03A0;;03A0 -03C1;GREEK SMALL LETTER RHO;Ll;0;L;;;;;N;;;03A1;;03A1 -03C2;GREEK SMALL LETTER FINAL SIGMA;Ll;0;L;;;;;N;;;03A3;;03A3 -03C3;GREEK SMALL LETTER SIGMA;Ll;0;L;;;;;N;;;03A3;;03A3 -03C4;GREEK SMALL LETTER TAU;Ll;0;L;;;;;N;;;03A4;;03A4 -03C5;GREEK SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;03A5;;03A5 -03C6;GREEK SMALL LETTER PHI;Ll;0;L;;;;;N;;;03A6;;03A6 -03C7;GREEK SMALL LETTER CHI;Ll;0;L;;;;;N;;;03A7;;03A7 -03C8;GREEK SMALL LETTER PSI;Ll;0;L;;;;;N;;;03A8;;03A8 -03C9;GREEK SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;03A9;;03A9 -03CA;GREEK SMALL LETTER IOTA WITH DIALYTIKA;Ll;0;L;03B9 0308;;;;N;GREEK SMALL LETTER IOTA DIAERESIS;;03AA;;03AA -03CB;GREEK SMALL LETTER UPSILON WITH DIALYTIKA;Ll;0;L;03C5 0308;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS;;03AB;;03AB -03CC;GREEK SMALL LETTER OMICRON WITH TONOS;Ll;0;L;03BF 0301;;;;N;GREEK SMALL LETTER OMICRON TONOS;;038C;;038C -03CD;GREEK SMALL LETTER UPSILON WITH TONOS;Ll;0;L;03C5 0301;;;;N;GREEK SMALL LETTER UPSILON TONOS;;038E;;038E -03CE;GREEK SMALL LETTER OMEGA WITH TONOS;Ll;0;L;03C9 0301;;;;N;GREEK SMALL LETTER OMEGA TONOS;;038F;;038F -03D0;GREEK BETA SYMBOL;Ll;0;L;<compat> 03B2;;;;N;GREEK SMALL LETTER CURLED BETA;;0392;;0392 -03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 -03D2;GREEK UPSILON WITH HOOK SYMBOL;Lu;0;L;<compat> 03A5;;;;N;GREEK CAPITAL LETTER UPSILON HOOK;;;; -03D3;GREEK UPSILON WITH ACUTE AND HOOK SYMBOL;Lu;0;L;03D2 0301;;;;N;GREEK CAPITAL LETTER UPSILON HOOK TONOS;;;; -03D4;GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL;Lu;0;L;03D2 0308;;;;N;GREEK CAPITAL LETTER UPSILON HOOK DIAERESIS;;;; -03D5;GREEK PHI SYMBOL;Ll;0;L;<compat> 03C6;;;;N;GREEK SMALL LETTER SCRIPT PHI;;03A6;;03A6 -03D6;GREEK PI SYMBOL;Ll;0;L;<compat> 03C0;;;;N;GREEK SMALL LETTER OMEGA PI;;03A0;;03A0 -03D7;GREEK KAI SYMBOL;Ll;0;L;;;;;N;;;;; -03DA;GREEK LETTER STIGMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER STIGMA;;;03DB; -03DB;GREEK SMALL LETTER STIGMA;Ll;0;L;;;;;N;;;03DA;;03DA -03DC;GREEK LETTER DIGAMMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DIGAMMA;;;03DD; -03DD;GREEK SMALL LETTER DIGAMMA;Ll;0;L;;;;;N;;;03DC;;03DC -03DE;GREEK LETTER KOPPA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KOPPA;;;03DF; -03DF;GREEK SMALL LETTER KOPPA;Ll;0;L;;;;;N;;;03DE;;03DE -03E0;GREEK LETTER SAMPI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SAMPI;;;03E1; -03E1;GREEK SMALL LETTER SAMPI;Ll;0;L;;;;;N;;;03E0;;03E0 -03E2;COPTIC CAPITAL LETTER SHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHEI;;;03E3; -03E3;COPTIC SMALL LETTER SHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER SHEI;;03E2;;03E2 -03E4;COPTIC CAPITAL LETTER FEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER FEI;;;03E5; -03E5;COPTIC SMALL LETTER FEI;Ll;0;L;;;;;N;GREEK SMALL LETTER FEI;;03E4;;03E4 -03E6;COPTIC CAPITAL LETTER KHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KHEI;;;03E7; -03E7;COPTIC SMALL LETTER KHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER KHEI;;03E6;;03E6 -03E8;COPTIC CAPITAL LETTER HORI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER HORI;;;03E9; -03E9;COPTIC SMALL LETTER HORI;Ll;0;L;;;;;N;GREEK SMALL LETTER HORI;;03E8;;03E8 -03EA;COPTIC CAPITAL LETTER GANGIA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER GANGIA;;;03EB; -03EB;COPTIC SMALL LETTER GANGIA;Ll;0;L;;;;;N;GREEK SMALL LETTER GANGIA;;03EA;;03EA -03EC;COPTIC CAPITAL LETTER SHIMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHIMA;;;03ED; -03ED;COPTIC SMALL LETTER SHIMA;Ll;0;L;;;;;N;GREEK SMALL LETTER SHIMA;;03EC;;03EC -03EE;COPTIC CAPITAL LETTER DEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DEI;;;03EF; -03EF;COPTIC SMALL LETTER DEI;Ll;0;L;;;;;N;GREEK SMALL LETTER DEI;;03EE;;03EE -03F0;GREEK KAPPA SYMBOL;Ll;0;L;<compat> 03BA;;;;N;GREEK SMALL LETTER SCRIPT KAPPA;;039A;;039A -03F1;GREEK RHO SYMBOL;Ll;0;L;<compat> 03C1;;;;N;GREEK SMALL LETTER TAILED RHO;;03A1;;03A1 -03F2;GREEK LUNATE SIGMA SYMBOL;Ll;0;L;<compat> 03C2;;;;N;GREEK SMALL LETTER LUNATE SIGMA;;03A3;;03A3 -03F3;GREEK LETTER YOT;Ll;0;L;;;;;N;;;;; -03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8; -03F5;GREEK LUNATE EPSILON SYMBOL;Ll;0;L;<compat> 03B5;;;;N;;;0395;;0395 -0400;CYRILLIC CAPITAL LETTER IE WITH GRAVE;Lu;0;L;0415 0300;;;;N;;;;0450; -0401;CYRILLIC CAPITAL LETTER IO;Lu;0;L;0415 0308;;;;N;;;;0451; -0402;CYRILLIC CAPITAL LETTER DJE;Lu;0;L;;;;;N;;Serbocroatian;;0452; -0403;CYRILLIC CAPITAL LETTER GJE;Lu;0;L;0413 0301;;;;N;;;;0453; -0404;CYRILLIC CAPITAL LETTER UKRAINIAN IE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER E;;;0454; -0405;CYRILLIC CAPITAL LETTER DZE;Lu;0;L;;;;;N;;;;0455; -0406;CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER I;;;0456; -0407;CYRILLIC CAPITAL LETTER YI;Lu;0;L;0406 0308;;;;N;;Ukrainian;;0457; -0408;CYRILLIC CAPITAL LETTER JE;Lu;0;L;;;;;N;;;;0458; -0409;CYRILLIC CAPITAL LETTER LJE;Lu;0;L;;;;;N;;;;0459; -040A;CYRILLIC CAPITAL LETTER NJE;Lu;0;L;;;;;N;;;;045A; -040B;CYRILLIC CAPITAL LETTER TSHE;Lu;0;L;;;;;N;;Serbocroatian;;045B; -040C;CYRILLIC CAPITAL LETTER KJE;Lu;0;L;041A 0301;;;;N;;;;045C; -040D;CYRILLIC CAPITAL LETTER I WITH GRAVE;Lu;0;L;0418 0300;;;;N;;;;045D; -040E;CYRILLIC CAPITAL LETTER SHORT U;Lu;0;L;0423 0306;;;;N;;Byelorussian;;045E; -040F;CYRILLIC CAPITAL LETTER DZHE;Lu;0;L;;;;;N;;;;045F; -0410;CYRILLIC CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0430; -0411;CYRILLIC CAPITAL LETTER BE;Lu;0;L;;;;;N;;;;0431; -0412;CYRILLIC CAPITAL LETTER VE;Lu;0;L;;;;;N;;;;0432; -0413;CYRILLIC CAPITAL LETTER GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE;;;0433; -0414;CYRILLIC CAPITAL LETTER DE;Lu;0;L;;;;;N;;;;0434; -0415;CYRILLIC CAPITAL LETTER IE;Lu;0;L;;;;;N;;;;0435; -0416;CYRILLIC CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;0436; -0417;CYRILLIC CAPITAL LETTER ZE;Lu;0;L;;;;;N;;;;0437; -0418;CYRILLIC CAPITAL LETTER I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER II;;;0438; -0419;CYRILLIC CAPITAL LETTER SHORT I;Lu;0;L;0418 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT II;;;0439; -041A;CYRILLIC CAPITAL LETTER KA;Lu;0;L;;;;;N;;;;043A; -041B;CYRILLIC CAPITAL LETTER EL;Lu;0;L;;;;;N;;;;043B; -041C;CYRILLIC CAPITAL LETTER EM;Lu;0;L;;;;;N;;;;043C; -041D;CYRILLIC CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;043D; -041E;CYRILLIC CAPITAL LETTER O;Lu;0;L;;;;;N;;;;043E; -041F;CYRILLIC CAPITAL LETTER PE;Lu;0;L;;;;;N;;;;043F; -0420;CYRILLIC CAPITAL LETTER ER;Lu;0;L;;;;;N;;;;0440; -0421;CYRILLIC CAPITAL LETTER ES;Lu;0;L;;;;;N;;;;0441; -0422;CYRILLIC CAPITAL LETTER TE;Lu;0;L;;;;;N;;;;0442; -0423;CYRILLIC CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0443; -0424;CYRILLIC CAPITAL LETTER EF;Lu;0;L;;;;;N;;;;0444; -0425;CYRILLIC CAPITAL LETTER HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA;;;0445; -0426;CYRILLIC CAPITAL LETTER TSE;Lu;0;L;;;;;N;;;;0446; -0427;CYRILLIC CAPITAL LETTER CHE;Lu;0;L;;;;;N;;;;0447; -0428;CYRILLIC CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0448; -0429;CYRILLIC CAPITAL LETTER SHCHA;Lu;0;L;;;;;N;;;;0449; -042A;CYRILLIC CAPITAL LETTER HARD SIGN;Lu;0;L;;;;;N;;;;044A; -042B;CYRILLIC CAPITAL LETTER YERU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER YERI;;;044B; -042C;CYRILLIC CAPITAL LETTER SOFT SIGN;Lu;0;L;;;;;N;;;;044C; -042D;CYRILLIC CAPITAL LETTER E;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED E;;;044D; -042E;CYRILLIC CAPITAL LETTER YU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IU;;;044E; -042F;CYRILLIC CAPITAL LETTER YA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IA;;;044F; -0430;CYRILLIC SMALL LETTER A;Ll;0;L;;;;;N;;;0410;;0410 -0431;CYRILLIC SMALL LETTER BE;Ll;0;L;;;;;N;;;0411;;0411 -0432;CYRILLIC SMALL LETTER VE;Ll;0;L;;;;;N;;;0412;;0412 -0433;CYRILLIC SMALL LETTER GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE;;0413;;0413 -0434;CYRILLIC SMALL LETTER DE;Ll;0;L;;;;;N;;;0414;;0414 -0435;CYRILLIC SMALL LETTER IE;Ll;0;L;;;;;N;;;0415;;0415 -0436;CYRILLIC SMALL LETTER ZHE;Ll;0;L;;;;;N;;;0416;;0416 -0437;CYRILLIC SMALL LETTER ZE;Ll;0;L;;;;;N;;;0417;;0417 -0438;CYRILLIC SMALL LETTER I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER II;;0418;;0418 -0439;CYRILLIC SMALL LETTER SHORT I;Ll;0;L;0438 0306;;;;N;CYRILLIC SMALL LETTER SHORT II;;0419;;0419 -043A;CYRILLIC SMALL LETTER KA;Ll;0;L;;;;;N;;;041A;;041A -043B;CYRILLIC SMALL LETTER EL;Ll;0;L;;;;;N;;;041B;;041B -043C;CYRILLIC SMALL LETTER EM;Ll;0;L;;;;;N;;;041C;;041C -043D;CYRILLIC SMALL LETTER EN;Ll;0;L;;;;;N;;;041D;;041D -043E;CYRILLIC SMALL LETTER O;Ll;0;L;;;;;N;;;041E;;041E -043F;CYRILLIC SMALL LETTER PE;Ll;0;L;;;;;N;;;041F;;041F -0440;CYRILLIC SMALL LETTER ER;Ll;0;L;;;;;N;;;0420;;0420 -0441;CYRILLIC SMALL LETTER ES;Ll;0;L;;;;;N;;;0421;;0421 -0442;CYRILLIC SMALL LETTER TE;Ll;0;L;;;;;N;;;0422;;0422 -0443;CYRILLIC SMALL LETTER U;Ll;0;L;;;;;N;;;0423;;0423 -0444;CYRILLIC SMALL LETTER EF;Ll;0;L;;;;;N;;;0424;;0424 -0445;CYRILLIC SMALL LETTER HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA;;0425;;0425 -0446;CYRILLIC SMALL LETTER TSE;Ll;0;L;;;;;N;;;0426;;0426 -0447;CYRILLIC SMALL LETTER CHE;Ll;0;L;;;;;N;;;0427;;0427 -0448;CYRILLIC SMALL LETTER SHA;Ll;0;L;;;;;N;;;0428;;0428 -0449;CYRILLIC SMALL LETTER SHCHA;Ll;0;L;;;;;N;;;0429;;0429 -044A;CYRILLIC SMALL LETTER HARD SIGN;Ll;0;L;;;;;N;;;042A;;042A -044B;CYRILLIC SMALL LETTER YERU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER YERI;;042B;;042B -044C;CYRILLIC SMALL LETTER SOFT SIGN;Ll;0;L;;;;;N;;;042C;;042C -044D;CYRILLIC SMALL LETTER E;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED E;;042D;;042D -044E;CYRILLIC SMALL LETTER YU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IU;;042E;;042E -044F;CYRILLIC SMALL LETTER YA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IA;;042F;;042F -0450;CYRILLIC SMALL LETTER IE WITH GRAVE;Ll;0;L;0435 0300;;;;N;;;0400;;0400 -0451;CYRILLIC SMALL LETTER IO;Ll;0;L;0435 0308;;;;N;;;0401;;0401 -0452;CYRILLIC SMALL LETTER DJE;Ll;0;L;;;;;N;;Serbocroatian;0402;;0402 -0453;CYRILLIC SMALL LETTER GJE;Ll;0;L;0433 0301;;;;N;;;0403;;0403 -0454;CYRILLIC SMALL LETTER UKRAINIAN IE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER E;;0404;;0404 -0455;CYRILLIC SMALL LETTER DZE;Ll;0;L;;;;;N;;;0405;;0405 -0456;CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER I;;0406;;0406 -0457;CYRILLIC SMALL LETTER YI;Ll;0;L;0456 0308;;;;N;;Ukrainian;0407;;0407 -0458;CYRILLIC SMALL LETTER JE;Ll;0;L;;;;;N;;;0408;;0408 -0459;CYRILLIC SMALL LETTER LJE;Ll;0;L;;;;;N;;;0409;;0409 -045A;CYRILLIC SMALL LETTER NJE;Ll;0;L;;;;;N;;;040A;;040A -045B;CYRILLIC SMALL LETTER TSHE;Ll;0;L;;;;;N;;Serbocroatian;040B;;040B -045C;CYRILLIC SMALL LETTER KJE;Ll;0;L;043A 0301;;;;N;;;040C;;040C -045D;CYRILLIC SMALL LETTER I WITH GRAVE;Ll;0;L;0438 0300;;;;N;;;040D;;040D -045E;CYRILLIC SMALL LETTER SHORT U;Ll;0;L;0443 0306;;;;N;;Byelorussian;040E;;040E -045F;CYRILLIC SMALL LETTER DZHE;Ll;0;L;;;;;N;;;040F;;040F -0460;CYRILLIC CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;0461; -0461;CYRILLIC SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;0460;;0460 -0462;CYRILLIC CAPITAL LETTER YAT;Lu;0;L;;;;;N;;;;0463; -0463;CYRILLIC SMALL LETTER YAT;Ll;0;L;;;;;N;;;0462;;0462 -0464;CYRILLIC CAPITAL LETTER IOTIFIED E;Lu;0;L;;;;;N;;;;0465; -0465;CYRILLIC SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;0464;;0464 -0466;CYRILLIC CAPITAL LETTER LITTLE YUS;Lu;0;L;;;;;N;;;;0467; -0467;CYRILLIC SMALL LETTER LITTLE YUS;Ll;0;L;;;;;N;;;0466;;0466 -0468;CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS;Lu;0;L;;;;;N;;;;0469; -0469;CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS;Ll;0;L;;;;;N;;;0468;;0468 -046A;CYRILLIC CAPITAL LETTER BIG YUS;Lu;0;L;;;;;N;;;;046B; -046B;CYRILLIC SMALL LETTER BIG YUS;Ll;0;L;;;;;N;;;046A;;046A -046C;CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS;Lu;0;L;;;;;N;;;;046D; -046D;CYRILLIC SMALL LETTER IOTIFIED BIG YUS;Ll;0;L;;;;;N;;;046C;;046C -046E;CYRILLIC CAPITAL LETTER KSI;Lu;0;L;;;;;N;;;;046F; -046F;CYRILLIC SMALL LETTER KSI;Ll;0;L;;;;;N;;;046E;;046E -0470;CYRILLIC CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;0471; -0471;CYRILLIC SMALL LETTER PSI;Ll;0;L;;;;;N;;;0470;;0470 -0472;CYRILLIC CAPITAL LETTER FITA;Lu;0;L;;;;;N;;;;0473; -0473;CYRILLIC SMALL LETTER FITA;Ll;0;L;;;;;N;;;0472;;0472 -0474;CYRILLIC CAPITAL LETTER IZHITSA;Lu;0;L;;;;;N;;;;0475; -0475;CYRILLIC SMALL LETTER IZHITSA;Ll;0;L;;;;;N;;;0474;;0474 -0476;CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Lu;0;L;0474 030F;;;;N;CYRILLIC CAPITAL LETTER IZHITSA DOUBLE GRAVE;;;0477; -0477;CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Ll;0;L;0475 030F;;;;N;CYRILLIC SMALL LETTER IZHITSA DOUBLE GRAVE;;0476;;0476 -0478;CYRILLIC CAPITAL LETTER UK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER UK DIGRAPH;;;0479; -0479;CYRILLIC SMALL LETTER UK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER UK DIGRAPH;;0478;;0478 -047A;CYRILLIC CAPITAL LETTER ROUND OMEGA;Lu;0;L;;;;;N;;;;047B; -047B;CYRILLIC SMALL LETTER ROUND OMEGA;Ll;0;L;;;;;N;;;047A;;047A -047C;CYRILLIC CAPITAL LETTER OMEGA WITH TITLO;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER OMEGA TITLO;;;047D; -047D;CYRILLIC SMALL LETTER OMEGA WITH TITLO;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER OMEGA TITLO;;047C;;047C -047E;CYRILLIC CAPITAL LETTER OT;Lu;0;L;;;;;N;;;;047F; -047F;CYRILLIC SMALL LETTER OT;Ll;0;L;;;;;N;;;047E;;047E -0480;CYRILLIC CAPITAL LETTER KOPPA;Lu;0;L;;;;;N;;;;0481; -0481;CYRILLIC SMALL LETTER KOPPA;Ll;0;L;;;;;N;;;0480;;0480 -0482;CYRILLIC THOUSANDS SIGN;So;0;L;;;;;N;;;;; -0483;COMBINING CYRILLIC TITLO;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING TITLO;;;; -0484;COMBINING CYRILLIC PALATALIZATION;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING PALATALIZATION;;;; -0485;COMBINING CYRILLIC DASIA PNEUMATA;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING DASIA PNEUMATA;;;; -0486;COMBINING CYRILLIC PSILI PNEUMATA;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING PSILI PNEUMATA;;;; -0488;COMBINING CYRILLIC HUNDRED THOUSANDS SIGN;Me;0;NSM;;;;;N;;;;; -0489;COMBINING CYRILLIC MILLIONS SIGN;Me;0;NSM;;;;;N;;;;; -048C;CYRILLIC CAPITAL LETTER SEMISOFT SIGN;Lu;0;L;;;;;N;;;;048D; -048D;CYRILLIC SMALL LETTER SEMISOFT SIGN;Ll;0;L;;;;;N;;;048C;;048C -048E;CYRILLIC CAPITAL LETTER ER WITH TICK;Lu;0;L;;;;;N;;;;048F; -048F;CYRILLIC SMALL LETTER ER WITH TICK;Ll;0;L;;;;;N;;;048E;;048E -0490;CYRILLIC CAPITAL LETTER GHE WITH UPTURN;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE WITH UPTURN;;;0491; -0491;CYRILLIC SMALL LETTER GHE WITH UPTURN;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE WITH UPTURN;;0490;;0490 -0492;CYRILLIC CAPITAL LETTER GHE WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE BAR;;;0493; -0493;CYRILLIC SMALL LETTER GHE WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE BAR;;0492;;0492 -0494;CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE HOOK;;;0495; -0495;CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE HOOK;;0494;;0494 -0496;CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZHE WITH RIGHT DESCENDER;;;0497; -0497;CYRILLIC SMALL LETTER ZHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZHE WITH RIGHT DESCENDER;;0496;;0496 -0498;CYRILLIC CAPITAL LETTER ZE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZE CEDILLA;;;0499; -0499;CYRILLIC SMALL LETTER ZE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZE CEDILLA;;0498;;0498 -049A;CYRILLIC CAPITAL LETTER KA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA WITH RIGHT DESCENDER;;;049B; -049B;CYRILLIC SMALL LETTER KA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA WITH RIGHT DESCENDER;;049A;;049A -049C;CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA VERTICAL BAR;;;049D; -049D;CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA VERTICAL BAR;;049C;;049C -049E;CYRILLIC CAPITAL LETTER KA WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA BAR;;;049F; -049F;CYRILLIC SMALL LETTER KA WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA BAR;;049E;;049E -04A0;CYRILLIC CAPITAL LETTER BASHKIR KA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED GE KA;;;04A1; -04A1;CYRILLIC SMALL LETTER BASHKIR KA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED GE KA;;04A0;;04A0 -04A2;CYRILLIC CAPITAL LETTER EN WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN WITH RIGHT DESCENDER;;;04A3; -04A3;CYRILLIC SMALL LETTER EN WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN WITH RIGHT DESCENDER;;04A2;;04A2 -04A4;CYRILLIC CAPITAL LIGATURE EN GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN GE;;;04A5; -04A5;CYRILLIC SMALL LIGATURE EN GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN GE;;04A4;;04A4 -04A6;CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER PE HOOK;Abkhasian;;04A7; -04A7;CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER PE HOOK;Abkhasian;04A6;;04A6 -04A8;CYRILLIC CAPITAL LETTER ABKHASIAN HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER O HOOK;;;04A9; -04A9;CYRILLIC SMALL LETTER ABKHASIAN HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER O HOOK;;04A8;;04A8 -04AA;CYRILLIC CAPITAL LETTER ES WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ES CEDILLA;;;04AB; -04AB;CYRILLIC SMALL LETTER ES WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ES CEDILLA;;04AA;;04AA -04AC;CYRILLIC CAPITAL LETTER TE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE WITH RIGHT DESCENDER;;;04AD; -04AD;CYRILLIC SMALL LETTER TE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE WITH RIGHT DESCENDER;;04AC;;04AC -04AE;CYRILLIC CAPITAL LETTER STRAIGHT U;Lu;0;L;;;;;N;;;;04AF; -04AF;CYRILLIC SMALL LETTER STRAIGHT U;Ll;0;L;;;;;N;;;04AE;;04AE -04B0;CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER STRAIGHT U BAR;;;04B1; -04B1;CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER STRAIGHT U BAR;;04B0;;04B0 -04B2;CYRILLIC CAPITAL LETTER HA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA WITH RIGHT DESCENDER;;;04B3; -04B3;CYRILLIC SMALL LETTER HA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA WITH RIGHT DESCENDER;;04B2;;04B2 -04B4;CYRILLIC CAPITAL LIGATURE TE TSE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE TSE;Abkhasian;;04B5; -04B5;CYRILLIC SMALL LIGATURE TE TSE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE TSE;Abkhasian;04B4;;04B4 -04B6;CYRILLIC CAPITAL LETTER CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH RIGHT DESCENDER;;;04B7; -04B7;CYRILLIC SMALL LETTER CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH RIGHT DESCENDER;;04B6;;04B6 -04B8;CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE VERTICAL BAR;;;04B9; -04B9;CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE VERTICAL BAR;;04B8;;04B8 -04BA;CYRILLIC CAPITAL LETTER SHHA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER H;;;04BB; -04BB;CYRILLIC SMALL LETTER SHHA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER H;;04BA;;04BA -04BC;CYRILLIC CAPITAL LETTER ABKHASIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK;;;04BD; -04BD;CYRILLIC SMALL LETTER ABKHASIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK;;04BC;;04BC -04BE;CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK OGONEK;;;04BF; -04BF;CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK OGONEK;;04BE;;04BE -04C0;CYRILLIC LETTER PALOCHKA;Lu;0;L;;;;;N;CYRILLIC LETTER I;;;; -04C1;CYRILLIC CAPITAL LETTER ZHE WITH BREVE;Lu;0;L;0416 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT ZHE;;;04C2; -04C2;CYRILLIC SMALL LETTER ZHE WITH BREVE;Ll;0;L;0436 0306;;;;N;CYRILLIC SMALL LETTER SHORT ZHE;;04C1;;04C1 -04C3;CYRILLIC CAPITAL LETTER KA WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA HOOK;;;04C4; -04C4;CYRILLIC SMALL LETTER KA WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA HOOK;;04C3;;04C3 -04C7;CYRILLIC CAPITAL LETTER EN WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN HOOK;;;04C8; -04C8;CYRILLIC SMALL LETTER EN WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN HOOK;;04C7;;04C7 -04CB;CYRILLIC CAPITAL LETTER KHAKASSIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH LEFT DESCENDER;;;04CC; -04CC;CYRILLIC SMALL LETTER KHAKASSIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH LEFT DESCENDER;;04CB;;04CB -04D0;CYRILLIC CAPITAL LETTER A WITH BREVE;Lu;0;L;0410 0306;;;;N;;;;04D1; -04D1;CYRILLIC SMALL LETTER A WITH BREVE;Ll;0;L;0430 0306;;;;N;;;04D0;;04D0 -04D2;CYRILLIC CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0410 0308;;;;N;;;;04D3; -04D3;CYRILLIC SMALL LETTER A WITH DIAERESIS;Ll;0;L;0430 0308;;;;N;;;04D2;;04D2 -04D4;CYRILLIC CAPITAL LIGATURE A IE;Lu;0;L;;;;;N;;;;04D5; -04D5;CYRILLIC SMALL LIGATURE A IE;Ll;0;L;;;;;N;;;04D4;;04D4 -04D6;CYRILLIC CAPITAL LETTER IE WITH BREVE;Lu;0;L;0415 0306;;;;N;;;;04D7; -04D7;CYRILLIC SMALL LETTER IE WITH BREVE;Ll;0;L;0435 0306;;;;N;;;04D6;;04D6 -04D8;CYRILLIC CAPITAL LETTER SCHWA;Lu;0;L;;;;;N;;;;04D9; -04D9;CYRILLIC SMALL LETTER SCHWA;Ll;0;L;;;;;N;;;04D8;;04D8 -04DA;CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS;Lu;0;L;04D8 0308;;;;N;;;;04DB; -04DB;CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS;Ll;0;L;04D9 0308;;;;N;;;04DA;;04DA -04DC;CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS;Lu;0;L;0416 0308;;;;N;;;;04DD; -04DD;CYRILLIC SMALL LETTER ZHE WITH DIAERESIS;Ll;0;L;0436 0308;;;;N;;;04DC;;04DC -04DE;CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS;Lu;0;L;0417 0308;;;;N;;;;04DF; -04DF;CYRILLIC SMALL LETTER ZE WITH DIAERESIS;Ll;0;L;0437 0308;;;;N;;;04DE;;04DE -04E0;CYRILLIC CAPITAL LETTER ABKHASIAN DZE;Lu;0;L;;;;;N;;;;04E1; -04E1;CYRILLIC SMALL LETTER ABKHASIAN DZE;Ll;0;L;;;;;N;;;04E0;;04E0 -04E2;CYRILLIC CAPITAL LETTER I WITH MACRON;Lu;0;L;0418 0304;;;;N;;;;04E3; -04E3;CYRILLIC SMALL LETTER I WITH MACRON;Ll;0;L;0438 0304;;;;N;;;04E2;;04E2 -04E4;CYRILLIC CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0418 0308;;;;N;;;;04E5; -04E5;CYRILLIC SMALL LETTER I WITH DIAERESIS;Ll;0;L;0438 0308;;;;N;;;04E4;;04E4 -04E6;CYRILLIC CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;041E 0308;;;;N;;;;04E7; -04E7;CYRILLIC SMALL LETTER O WITH DIAERESIS;Ll;0;L;043E 0308;;;;N;;;04E6;;04E6 -04E8;CYRILLIC CAPITAL LETTER BARRED O;Lu;0;L;;;;;N;;;;04E9; -04E9;CYRILLIC SMALL LETTER BARRED O;Ll;0;L;;;;;N;;;04E8;;04E8 -04EA;CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS;Lu;0;L;04E8 0308;;;;N;;;;04EB; -04EB;CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS;Ll;0;L;04E9 0308;;;;N;;;04EA;;04EA -04EC;CYRILLIC CAPITAL LETTER E WITH DIAERESIS;Lu;0;L;042D 0308;;;;N;;;;04ED; -04ED;CYRILLIC SMALL LETTER E WITH DIAERESIS;Ll;0;L;044D 0308;;;;N;;;04EC;;04EC -04EE;CYRILLIC CAPITAL LETTER U WITH MACRON;Lu;0;L;0423 0304;;;;N;;;;04EF; -04EF;CYRILLIC SMALL LETTER U WITH MACRON;Ll;0;L;0443 0304;;;;N;;;04EE;;04EE -04F0;CYRILLIC CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0423 0308;;;;N;;;;04F1; -04F1;CYRILLIC SMALL LETTER U WITH DIAERESIS;Ll;0;L;0443 0308;;;;N;;;04F0;;04F0 -04F2;CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0423 030B;;;;N;;;;04F3; -04F3;CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0443 030B;;;;N;;;04F2;;04F2 -04F4;CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS;Lu;0;L;0427 0308;;;;N;;;;04F5; -04F5;CYRILLIC SMALL LETTER CHE WITH DIAERESIS;Ll;0;L;0447 0308;;;;N;;;04F4;;04F4 -04F8;CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS;Lu;0;L;042B 0308;;;;N;;;;04F9; -04F9;CYRILLIC SMALL LETTER YERU WITH DIAERESIS;Ll;0;L;044B 0308;;;;N;;;04F8;;04F8 -0531;ARMENIAN CAPITAL LETTER AYB;Lu;0;L;;;;;N;;;;0561; -0532;ARMENIAN CAPITAL LETTER BEN;Lu;0;L;;;;;N;;;;0562; -0533;ARMENIAN CAPITAL LETTER GIM;Lu;0;L;;;;;N;;;;0563; -0534;ARMENIAN CAPITAL LETTER DA;Lu;0;L;;;;;N;;;;0564; -0535;ARMENIAN CAPITAL LETTER ECH;Lu;0;L;;;;;N;;;;0565; -0536;ARMENIAN CAPITAL LETTER ZA;Lu;0;L;;;;;N;;;;0566; -0537;ARMENIAN CAPITAL LETTER EH;Lu;0;L;;;;;N;;;;0567; -0538;ARMENIAN CAPITAL LETTER ET;Lu;0;L;;;;;N;;;;0568; -0539;ARMENIAN CAPITAL LETTER TO;Lu;0;L;;;;;N;;;;0569; -053A;ARMENIAN CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;056A; -053B;ARMENIAN CAPITAL LETTER INI;Lu;0;L;;;;;N;;;;056B; -053C;ARMENIAN CAPITAL LETTER LIWN;Lu;0;L;;;;;N;;;;056C; -053D;ARMENIAN CAPITAL LETTER XEH;Lu;0;L;;;;;N;;;;056D; -053E;ARMENIAN CAPITAL LETTER CA;Lu;0;L;;;;;N;;;;056E; -053F;ARMENIAN CAPITAL LETTER KEN;Lu;0;L;;;;;N;;;;056F; -0540;ARMENIAN CAPITAL LETTER HO;Lu;0;L;;;;;N;;;;0570; -0541;ARMENIAN CAPITAL LETTER JA;Lu;0;L;;;;;N;;;;0571; -0542;ARMENIAN CAPITAL LETTER GHAD;Lu;0;L;;;;;N;ARMENIAN CAPITAL LETTER LAD;;;0572; -0543;ARMENIAN CAPITAL LETTER CHEH;Lu;0;L;;;;;N;;;;0573; -0544;ARMENIAN CAPITAL LETTER MEN;Lu;0;L;;;;;N;;;;0574; -0545;ARMENIAN CAPITAL LETTER YI;Lu;0;L;;;;;N;;;;0575; -0546;ARMENIAN CAPITAL LETTER NOW;Lu;0;L;;;;;N;;;;0576; -0547;ARMENIAN CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0577; -0548;ARMENIAN CAPITAL LETTER VO;Lu;0;L;;;;;N;;;;0578; -0549;ARMENIAN CAPITAL LETTER CHA;Lu;0;L;;;;;N;;;;0579; -054A;ARMENIAN CAPITAL LETTER PEH;Lu;0;L;;;;;N;;;;057A; -054B;ARMENIAN CAPITAL LETTER JHEH;Lu;0;L;;;;;N;;;;057B; -054C;ARMENIAN CAPITAL LETTER RA;Lu;0;L;;;;;N;;;;057C; -054D;ARMENIAN CAPITAL LETTER SEH;Lu;0;L;;;;;N;;;;057D; -054E;ARMENIAN CAPITAL LETTER VEW;Lu;0;L;;;;;N;;;;057E; -054F;ARMENIAN CAPITAL LETTER TIWN;Lu;0;L;;;;;N;;;;057F; -0550;ARMENIAN CAPITAL LETTER REH;Lu;0;L;;;;;N;;;;0580; -0551;ARMENIAN CAPITAL LETTER CO;Lu;0;L;;;;;N;;;;0581; -0552;ARMENIAN CAPITAL LETTER YIWN;Lu;0;L;;;;;N;;;;0582; -0553;ARMENIAN CAPITAL LETTER PIWR;Lu;0;L;;;;;N;;;;0583; -0554;ARMENIAN CAPITAL LETTER KEH;Lu;0;L;;;;;N;;;;0584; -0555;ARMENIAN CAPITAL LETTER OH;Lu;0;L;;;;;N;;;;0585; -0556;ARMENIAN CAPITAL LETTER FEH;Lu;0;L;;;;;N;;;;0586; -0559;ARMENIAN MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;; -055A;ARMENIAN APOSTROPHE;Po;0;L;;;;;N;ARMENIAN MODIFIER LETTER RIGHT HALF RING;;;; -055B;ARMENIAN EMPHASIS MARK;Po;0;L;;;;;N;;;;; -055C;ARMENIAN EXCLAMATION MARK;Po;0;L;;;;;N;;;;; -055D;ARMENIAN COMMA;Po;0;L;;;;;N;;;;; -055E;ARMENIAN QUESTION MARK;Po;0;L;;;;;N;;;;; -055F;ARMENIAN ABBREVIATION MARK;Po;0;L;;;;;N;;;;; -0561;ARMENIAN SMALL LETTER AYB;Ll;0;L;;;;;N;;;0531;;0531 -0562;ARMENIAN SMALL LETTER BEN;Ll;0;L;;;;;N;;;0532;;0532 -0563;ARMENIAN SMALL LETTER GIM;Ll;0;L;;;;;N;;;0533;;0533 -0564;ARMENIAN SMALL LETTER DA;Ll;0;L;;;;;N;;;0534;;0534 -0565;ARMENIAN SMALL LETTER ECH;Ll;0;L;;;;;N;;;0535;;0535 -0566;ARMENIAN SMALL LETTER ZA;Ll;0;L;;;;;N;;;0536;;0536 -0567;ARMENIAN SMALL LETTER EH;Ll;0;L;;;;;N;;;0537;;0537 -0568;ARMENIAN SMALL LETTER ET;Ll;0;L;;;;;N;;;0538;;0538 -0569;ARMENIAN SMALL LETTER TO;Ll;0;L;;;;;N;;;0539;;0539 -056A;ARMENIAN SMALL LETTER ZHE;Ll;0;L;;;;;N;;;053A;;053A -056B;ARMENIAN SMALL LETTER INI;Ll;0;L;;;;;N;;;053B;;053B -056C;ARMENIAN SMALL LETTER LIWN;Ll;0;L;;;;;N;;;053C;;053C -056D;ARMENIAN SMALL LETTER XEH;Ll;0;L;;;;;N;;;053D;;053D -056E;ARMENIAN SMALL LETTER CA;Ll;0;L;;;;;N;;;053E;;053E -056F;ARMENIAN SMALL LETTER KEN;Ll;0;L;;;;;N;;;053F;;053F -0570;ARMENIAN SMALL LETTER HO;Ll;0;L;;;;;N;;;0540;;0540 -0571;ARMENIAN SMALL LETTER JA;Ll;0;L;;;;;N;;;0541;;0541 -0572;ARMENIAN SMALL LETTER GHAD;Ll;0;L;;;;;N;ARMENIAN SMALL LETTER LAD;;0542;;0542 -0573;ARMENIAN SMALL LETTER CHEH;Ll;0;L;;;;;N;;;0543;;0543 -0574;ARMENIAN SMALL LETTER MEN;Ll;0;L;;;;;N;;;0544;;0544 -0575;ARMENIAN SMALL LETTER YI;Ll;0;L;;;;;N;;;0545;;0545 -0576;ARMENIAN SMALL LETTER NOW;Ll;0;L;;;;;N;;;0546;;0546 -0577;ARMENIAN SMALL LETTER SHA;Ll;0;L;;;;;N;;;0547;;0547 -0578;ARMENIAN SMALL LETTER VO;Ll;0;L;;;;;N;;;0548;;0548 -0579;ARMENIAN SMALL LETTER CHA;Ll;0;L;;;;;N;;;0549;;0549 -057A;ARMENIAN SMALL LETTER PEH;Ll;0;L;;;;;N;;;054A;;054A -057B;ARMENIAN SMALL LETTER JHEH;Ll;0;L;;;;;N;;;054B;;054B -057C;ARMENIAN SMALL LETTER RA;Ll;0;L;;;;;N;;;054C;;054C -057D;ARMENIAN SMALL LETTER SEH;Ll;0;L;;;;;N;;;054D;;054D -057E;ARMENIAN SMALL LETTER VEW;Ll;0;L;;;;;N;;;054E;;054E -057F;ARMENIAN SMALL LETTER TIWN;Ll;0;L;;;;;N;;;054F;;054F -0580;ARMENIAN SMALL LETTER REH;Ll;0;L;;;;;N;;;0550;;0550 -0581;ARMENIAN SMALL LETTER CO;Ll;0;L;;;;;N;;;0551;;0551 -0582;ARMENIAN SMALL LETTER YIWN;Ll;0;L;;;;;N;;;0552;;0552 -0583;ARMENIAN SMALL LETTER PIWR;Ll;0;L;;;;;N;;;0553;;0553 -0584;ARMENIAN SMALL LETTER KEH;Ll;0;L;;;;;N;;;0554;;0554 -0585;ARMENIAN SMALL LETTER OH;Ll;0;L;;;;;N;;;0555;;0555 -0586;ARMENIAN SMALL LETTER FEH;Ll;0;L;;;;;N;;;0556;;0556 -0587;ARMENIAN SMALL LIGATURE ECH YIWN;Ll;0;L;<compat> 0565 0582;;;;N;;;;; -0589;ARMENIAN FULL STOP;Po;0;L;;;;;N;ARMENIAN PERIOD;;;; -058A;ARMENIAN HYPHEN;Pd;0;ON;;;;;N;;;;; -0591;HEBREW ACCENT ETNAHTA;Mn;220;NSM;;;;;N;;;;; -0592;HEBREW ACCENT SEGOL;Mn;230;NSM;;;;;N;;;;; -0593;HEBREW ACCENT SHALSHELET;Mn;230;NSM;;;;;N;;;;; -0594;HEBREW ACCENT ZAQEF QATAN;Mn;230;NSM;;;;;N;;;;; -0595;HEBREW ACCENT ZAQEF GADOL;Mn;230;NSM;;;;;N;;;;; -0596;HEBREW ACCENT TIPEHA;Mn;220;NSM;;;;;N;;*;;; -0597;HEBREW ACCENT REVIA;Mn;230;NSM;;;;;N;;;;; -0598;HEBREW ACCENT ZARQA;Mn;230;NSM;;;;;N;;*;;; -0599;HEBREW ACCENT PASHTA;Mn;230;NSM;;;;;N;;;;; -059A;HEBREW ACCENT YETIV;Mn;222;NSM;;;;;N;;;;; -059B;HEBREW ACCENT TEVIR;Mn;220;NSM;;;;;N;;;;; -059C;HEBREW ACCENT GERESH;Mn;230;NSM;;;;;N;;;;; -059D;HEBREW ACCENT GERESH MUQDAM;Mn;230;NSM;;;;;N;;;;; -059E;HEBREW ACCENT GERSHAYIM;Mn;230;NSM;;;;;N;;;;; -059F;HEBREW ACCENT QARNEY PARA;Mn;230;NSM;;;;;N;;;;; -05A0;HEBREW ACCENT TELISHA GEDOLA;Mn;230;NSM;;;;;N;;;;; -05A1;HEBREW ACCENT PAZER;Mn;230;NSM;;;;;N;;;;; -05A3;HEBREW ACCENT MUNAH;Mn;220;NSM;;;;;N;;;;; -05A4;HEBREW ACCENT MAHAPAKH;Mn;220;NSM;;;;;N;;;;; -05A5;HEBREW ACCENT MERKHA;Mn;220;NSM;;;;;N;;*;;; -05A6;HEBREW ACCENT MERKHA KEFULA;Mn;220;NSM;;;;;N;;;;; -05A7;HEBREW ACCENT DARGA;Mn;220;NSM;;;;;N;;;;; -05A8;HEBREW ACCENT QADMA;Mn;230;NSM;;;;;N;;*;;; -05A9;HEBREW ACCENT TELISHA QETANA;Mn;230;NSM;;;;;N;;;;; -05AA;HEBREW ACCENT YERAH BEN YOMO;Mn;220;NSM;;;;;N;;*;;; -05AB;HEBREW ACCENT OLE;Mn;230;NSM;;;;;N;;;;; -05AC;HEBREW ACCENT ILUY;Mn;230;NSM;;;;;N;;;;; -05AD;HEBREW ACCENT DEHI;Mn;222;NSM;;;;;N;;;;; -05AE;HEBREW ACCENT ZINOR;Mn;228;NSM;;;;;N;;;;; -05AF;HEBREW MARK MASORA CIRCLE;Mn;230;NSM;;;;;N;;;;; -05B0;HEBREW POINT SHEVA;Mn;10;NSM;;;;;N;;;;; -05B1;HEBREW POINT HATAF SEGOL;Mn;11;NSM;;;;;N;;;;; -05B2;HEBREW POINT HATAF PATAH;Mn;12;NSM;;;;;N;;;;; -05B3;HEBREW POINT HATAF QAMATS;Mn;13;NSM;;;;;N;;;;; -05B4;HEBREW POINT HIRIQ;Mn;14;NSM;;;;;N;;;;; -05B5;HEBREW POINT TSERE;Mn;15;NSM;;;;;N;;;;; -05B6;HEBREW POINT SEGOL;Mn;16;NSM;;;;;N;;;;; -05B7;HEBREW POINT PATAH;Mn;17;NSM;;;;;N;;;;; -05B8;HEBREW POINT QAMATS;Mn;18;NSM;;;;;N;;;;; -05B9;HEBREW POINT HOLAM;Mn;19;NSM;;;;;N;;;;; -05BB;HEBREW POINT QUBUTS;Mn;20;NSM;;;;;N;;;;; -05BC;HEBREW POINT DAGESH OR MAPIQ;Mn;21;NSM;;;;;N;HEBREW POINT DAGESH;or shuruq;;; -05BD;HEBREW POINT METEG;Mn;22;NSM;;;;;N;;*;;; -05BE;HEBREW PUNCTUATION MAQAF;Po;0;R;;;;;N;;;;; -05BF;HEBREW POINT RAFE;Mn;23;NSM;;;;;N;;;;; -05C0;HEBREW PUNCTUATION PASEQ;Po;0;R;;;;;N;HEBREW POINT PASEQ;*;;; -05C1;HEBREW POINT SHIN DOT;Mn;24;NSM;;;;;N;;;;; -05C2;HEBREW POINT SIN DOT;Mn;25;NSM;;;;;N;;;;; -05C3;HEBREW PUNCTUATION SOF PASUQ;Po;0;R;;;;;N;;*;;; -05C4;HEBREW MARK UPPER DOT;Mn;230;NSM;;;;;N;;;;; -05D0;HEBREW LETTER ALEF;Lo;0;R;;;;;N;;;;; -05D1;HEBREW LETTER BET;Lo;0;R;;;;;N;;;;; -05D2;HEBREW LETTER GIMEL;Lo;0;R;;;;;N;;;;; -05D3;HEBREW LETTER DALET;Lo;0;R;;;;;N;;;;; -05D4;HEBREW LETTER HE;Lo;0;R;;;;;N;;;;; -05D5;HEBREW LETTER VAV;Lo;0;R;;;;;N;;;;; -05D6;HEBREW LETTER ZAYIN;Lo;0;R;;;;;N;;;;; -05D7;HEBREW LETTER HET;Lo;0;R;;;;;N;;;;; -05D8;HEBREW LETTER TET;Lo;0;R;;;;;N;;;;; -05D9;HEBREW LETTER YOD;Lo;0;R;;;;;N;;;;; -05DA;HEBREW LETTER FINAL KAF;Lo;0;R;;;;;N;;;;; -05DB;HEBREW LETTER KAF;Lo;0;R;;;;;N;;;;; -05DC;HEBREW LETTER LAMED;Lo;0;R;;;;;N;;;;; -05DD;HEBREW LETTER FINAL MEM;Lo;0;R;;;;;N;;;;; -05DE;HEBREW LETTER MEM;Lo;0;R;;;;;N;;;;; -05DF;HEBREW LETTER FINAL NUN;Lo;0;R;;;;;N;;;;; -05E0;HEBREW LETTER NUN;Lo;0;R;;;;;N;;;;; -05E1;HEBREW LETTER SAMEKH;Lo;0;R;;;;;N;;;;; -05E2;HEBREW LETTER AYIN;Lo;0;R;;;;;N;;;;; -05E3;HEBREW LETTER FINAL PE;Lo;0;R;;;;;N;;;;; -05E4;HEBREW LETTER PE;Lo;0;R;;;;;N;;;;; -05E5;HEBREW LETTER FINAL TSADI;Lo;0;R;;;;;N;;;;; -05E6;HEBREW LETTER TSADI;Lo;0;R;;;;;N;;;;; -05E7;HEBREW LETTER QOF;Lo;0;R;;;;;N;;;;; -05E8;HEBREW LETTER RESH;Lo;0;R;;;;;N;;;;; -05E9;HEBREW LETTER SHIN;Lo;0;R;;;;;N;;;;; -05EA;HEBREW LETTER TAV;Lo;0;R;;;;;N;;;;; -05F0;HEBREW LIGATURE YIDDISH DOUBLE VAV;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE VAV;;;; -05F1;HEBREW LIGATURE YIDDISH VAV YOD;Lo;0;R;;;;;N;HEBREW LETTER VAV YOD;;;; -05F2;HEBREW LIGATURE YIDDISH DOUBLE YOD;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE YOD;;;; -05F3;HEBREW PUNCTUATION GERESH;Po;0;R;;;;;N;;;;; -05F4;HEBREW PUNCTUATION GERSHAYIM;Po;0;R;;;;;N;;;;; -060C;ARABIC COMMA;Po;0;CS;;;;;N;;;;; -061B;ARABIC SEMICOLON;Po;0;AL;;;;;N;;;;; -061F;ARABIC QUESTION MARK;Po;0;AL;;;;;N;;;;; -0621;ARABIC LETTER HAMZA;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAH;;;; -0622;ARABIC LETTER ALEF WITH MADDA ABOVE;Lo;0;AL;0627 0653;;;;N;ARABIC LETTER MADDAH ON ALEF;;;; -0623;ARABIC LETTER ALEF WITH HAMZA ABOVE;Lo;0;AL;0627 0654;;;;N;ARABIC LETTER HAMZAH ON ALEF;;;; -0624;ARABIC LETTER WAW WITH HAMZA ABOVE;Lo;0;AL;0648 0654;;;;N;ARABIC LETTER HAMZAH ON WAW;;;; -0625;ARABIC LETTER ALEF WITH HAMZA BELOW;Lo;0;AL;0627 0655;;;;N;ARABIC LETTER HAMZAH UNDER ALEF;;;; -0626;ARABIC LETTER YEH WITH HAMZA ABOVE;Lo;0;AL;064A 0654;;;;N;ARABIC LETTER HAMZAH ON YA;;;; -0627;ARABIC LETTER ALEF;Lo;0;AL;;;;;N;;;;; -0628;ARABIC LETTER BEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA;;;; -0629;ARABIC LETTER TEH MARBUTA;Lo;0;AL;;;;;N;ARABIC LETTER TAA MARBUTAH;;;; -062A;ARABIC LETTER TEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA;;;; -062B;ARABIC LETTER THEH;Lo;0;AL;;;;;N;ARABIC LETTER THAA;;;; -062C;ARABIC LETTER JEEM;Lo;0;AL;;;;;N;;;;; -062D;ARABIC LETTER HAH;Lo;0;AL;;;;;N;ARABIC LETTER HAA;;;; -062E;ARABIC LETTER KHAH;Lo;0;AL;;;;;N;ARABIC LETTER KHAA;;;; -062F;ARABIC LETTER DAL;Lo;0;AL;;;;;N;;;;; -0630;ARABIC LETTER THAL;Lo;0;AL;;;;;N;;;;; -0631;ARABIC LETTER REH;Lo;0;AL;;;;;N;ARABIC LETTER RA;;;; -0632;ARABIC LETTER ZAIN;Lo;0;AL;;;;;N;;;;; -0633;ARABIC LETTER SEEN;Lo;0;AL;;;;;N;;;;; -0634;ARABIC LETTER SHEEN;Lo;0;AL;;;;;N;;;;; -0635;ARABIC LETTER SAD;Lo;0;AL;;;;;N;;;;; -0636;ARABIC LETTER DAD;Lo;0;AL;;;;;N;;;;; -0637;ARABIC LETTER TAH;Lo;0;AL;;;;;N;;;;; -0638;ARABIC LETTER ZAH;Lo;0;AL;;;;;N;ARABIC LETTER DHAH;;;; -0639;ARABIC LETTER AIN;Lo;0;AL;;;;;N;;;;; -063A;ARABIC LETTER GHAIN;Lo;0;AL;;;;;N;;;;; -0640;ARABIC TATWEEL;Lm;0;AL;;;;;N;;;;; -0641;ARABIC LETTER FEH;Lo;0;AL;;;;;N;ARABIC LETTER FA;;;; -0642;ARABIC LETTER QAF;Lo;0;AL;;;;;N;;;;; -0643;ARABIC LETTER KAF;Lo;0;AL;;;;;N;ARABIC LETTER CAF;;;; -0644;ARABIC LETTER LAM;Lo;0;AL;;;;;N;;;;; -0645;ARABIC LETTER MEEM;Lo;0;AL;;;;;N;;;;; -0646;ARABIC LETTER NOON;Lo;0;AL;;;;;N;;;;; -0647;ARABIC LETTER HEH;Lo;0;AL;;;;;N;ARABIC LETTER HA;;;; -0648;ARABIC LETTER WAW;Lo;0;AL;;;;;N;;;;; -0649;ARABIC LETTER ALEF MAKSURA;Lo;0;AL;;;;;N;ARABIC LETTER ALEF MAQSURAH;;;; -064A;ARABIC LETTER YEH;Lo;0;AL;;;;;N;ARABIC LETTER YA;;;; -064B;ARABIC FATHATAN;Mn;27;NSM;;;;;N;;;;; -064C;ARABIC DAMMATAN;Mn;28;NSM;;;;;N;;;;; -064D;ARABIC KASRATAN;Mn;29;NSM;;;;;N;;;;; -064E;ARABIC FATHA;Mn;30;NSM;;;;;N;ARABIC FATHAH;;;; -064F;ARABIC DAMMA;Mn;31;NSM;;;;;N;ARABIC DAMMAH;;;; -0650;ARABIC KASRA;Mn;32;NSM;;;;;N;ARABIC KASRAH;;;; -0651;ARABIC SHADDA;Mn;33;NSM;;;;;N;ARABIC SHADDAH;;;; -0652;ARABIC SUKUN;Mn;34;NSM;;;;;N;;;;; -0653;ARABIC MADDAH ABOVE;Mn;230;NSM;;;;;N;;;;; -0654;ARABIC HAMZA ABOVE;Mn;230;NSM;;;;;N;;;;; -0655;ARABIC HAMZA BELOW;Mn;220;NSM;;;;;N;;;;; -0660;ARABIC-INDIC DIGIT ZERO;Nd;0;AN;;0;0;0;N;;;;; -0661;ARABIC-INDIC DIGIT ONE;Nd;0;AN;;1;1;1;N;;;;; -0662;ARABIC-INDIC DIGIT TWO;Nd;0;AN;;2;2;2;N;;;;; -0663;ARABIC-INDIC DIGIT THREE;Nd;0;AN;;3;3;3;N;;;;; -0664;ARABIC-INDIC DIGIT FOUR;Nd;0;AN;;4;4;4;N;;;;; -0665;ARABIC-INDIC DIGIT FIVE;Nd;0;AN;;5;5;5;N;;;;; -0666;ARABIC-INDIC DIGIT SIX;Nd;0;AN;;6;6;6;N;;;;; -0667;ARABIC-INDIC DIGIT SEVEN;Nd;0;AN;;7;7;7;N;;;;; -0668;ARABIC-INDIC DIGIT EIGHT;Nd;0;AN;;8;8;8;N;;;;; -0669;ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;; -066A;ARABIC PERCENT SIGN;Po;0;ET;;;;;N;;;;; -066B;ARABIC DECIMAL SEPARATOR;Po;0;AN;;;;;N;;;;; -066C;ARABIC THOUSANDS SEPARATOR;Po;0;AN;;;;;N;;;;; -066D;ARABIC FIVE POINTED STAR;Po;0;AL;;;;;N;;;;; -0670;ARABIC LETTER SUPERSCRIPT ALEF;Mn;35;NSM;;;;;N;ARABIC ALEF ABOVE;;;; -0671;ARABIC LETTER ALEF WASLA;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAT WASL ON ALEF;;;; -0672;ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER WAVY HAMZAH ON ALEF;;;; -0673;ARABIC LETTER ALEF WITH WAVY HAMZA BELOW;Lo;0;AL;;;;;N;ARABIC LETTER WAVY HAMZAH UNDER ALEF;;;; -0674;ARABIC LETTER HIGH HAMZA;Lo;0;AL;;;;;N;ARABIC LETTER HIGH HAMZAH;;;; -0675;ARABIC LETTER HIGH HAMZA ALEF;Lo;0;AL;<compat> 0627 0674;;;;N;ARABIC LETTER HIGH HAMZAH ALEF;;;; -0676;ARABIC LETTER HIGH HAMZA WAW;Lo;0;AL;<compat> 0648 0674;;;;N;ARABIC LETTER HIGH HAMZAH WAW;;;; -0677;ARABIC LETTER U WITH HAMZA ABOVE;Lo;0;AL;<compat> 06C7 0674;;;;N;ARABIC LETTER HIGH HAMZAH WAW WITH DAMMAH;;;; -0678;ARABIC LETTER HIGH HAMZA YEH;Lo;0;AL;<compat> 064A 0674;;;;N;ARABIC LETTER HIGH HAMZAH YA;;;; -0679;ARABIC LETTER TTEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH SMALL TAH;;;; -067A;ARABIC LETTER TTEHEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH TWO DOTS VERTICAL ABOVE;;;; -067B;ARABIC LETTER BEEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA WITH TWO DOTS VERTICAL BELOW;;;; -067C;ARABIC LETTER TEH WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH RING;;;; -067D;ARABIC LETTER TEH WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH THREE DOTS ABOVE DOWNWARD;;;; -067E;ARABIC LETTER PEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH THREE DOTS BELOW;;;; -067F;ARABIC LETTER TEHEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH FOUR DOTS ABOVE;;;; -0680;ARABIC LETTER BEHEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA WITH FOUR DOTS BELOW;;;; -0681;ARABIC LETTER HAH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAH ON HAA;;;; -0682;ARABIC LETTER HAH WITH TWO DOTS VERTICAL ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH TWO DOTS VERTICAL ABOVE;;;; -0683;ARABIC LETTER NYEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS;;;; -0684;ARABIC LETTER DYEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS VERTICAL;;;; -0685;ARABIC LETTER HAH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH THREE DOTS ABOVE;;;; -0686;ARABIC LETTER TCHEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE THREE DOTS DOWNWARD;;;; -0687;ARABIC LETTER TCHEHEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE FOUR DOTS;;;; -0688;ARABIC LETTER DDAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH SMALL TAH;;;; -0689;ARABIC LETTER DAL WITH RING;Lo;0;AL;;;;;N;;;;; -068A;ARABIC LETTER DAL WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; -068B;ARABIC LETTER DAL WITH DOT BELOW AND SMALL TAH;Lo;0;AL;;;;;N;;;;; -068C;ARABIC LETTER DAHAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH TWO DOTS ABOVE;;;; -068D;ARABIC LETTER DDAHAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH TWO DOTS BELOW;;;; -068E;ARABIC LETTER DUL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE;;;; -068F;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARD;;;; -0690;ARABIC LETTER DAL WITH FOUR DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -0691;ARABIC LETTER RREH;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL TAH;;;; -0692;ARABIC LETTER REH WITH SMALL V;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL V;;;; -0693;ARABIC LETTER REH WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH RING;;;; -0694;ARABIC LETTER REH WITH DOT BELOW;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH DOT BELOW;;;; -0695;ARABIC LETTER REH WITH SMALL V BELOW;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL V BELOW;;;; -0696;ARABIC LETTER REH WITH DOT BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH DOT BELOW AND DOT ABOVE;;;; -0697;ARABIC LETTER REH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH TWO DOTS ABOVE;;;; -0698;ARABIC LETTER JEH;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH THREE DOTS ABOVE;;;; -0699;ARABIC LETTER REH WITH FOUR DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH FOUR DOTS ABOVE;;;; -069A;ARABIC LETTER SEEN WITH DOT BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;;;;; -069B;ARABIC LETTER SEEN WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; -069C;ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -069D;ARABIC LETTER SAD WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; -069E;ARABIC LETTER SAD WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -069F;ARABIC LETTER TAH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06A0;ARABIC LETTER AIN WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06A1;ARABIC LETTER DOTLESS FEH;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS FA;;;; -06A2;ARABIC LETTER FEH WITH DOT MOVED BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH DOT MOVED BELOW;;;; -06A3;ARABIC LETTER FEH WITH DOT BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH DOT BELOW;;;; -06A4;ARABIC LETTER VEH;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH THREE DOTS ABOVE;;;; -06A5;ARABIC LETTER FEH WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH THREE DOTS BELOW;;;; -06A6;ARABIC LETTER PEHEH;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH FOUR DOTS ABOVE;;;; -06A7;ARABIC LETTER QAF WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; -06A8;ARABIC LETTER QAF WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06A9;ARABIC LETTER KEHEH;Lo;0;AL;;;;;N;ARABIC LETTER OPEN CAF;;;; -06AA;ARABIC LETTER SWASH KAF;Lo;0;AL;;;;;N;ARABIC LETTER SWASH CAF;;;; -06AB;ARABIC LETTER KAF WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH RING;;;; -06AC;ARABIC LETTER KAF WITH DOT ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH DOT ABOVE;;;; -06AD;ARABIC LETTER NG;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH THREE DOTS ABOVE;;;; -06AE;ARABIC LETTER KAF WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH THREE DOTS BELOW;;;; -06AF;ARABIC LETTER GAF;Lo;0;AL;;;;;N;;*;;; -06B0;ARABIC LETTER GAF WITH RING;Lo;0;AL;;;;;N;;;;; -06B1;ARABIC LETTER NGOEH;Lo;0;AL;;;;;N;ARABIC LETTER GAF WITH TWO DOTS ABOVE;;;; -06B2;ARABIC LETTER GAF WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; -06B3;ARABIC LETTER GUEH;Lo;0;AL;;;;;N;ARABIC LETTER GAF WITH TWO DOTS VERTICAL BELOW;;;; -06B4;ARABIC LETTER GAF WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06B5;ARABIC LETTER LAM WITH SMALL V;Lo;0;AL;;;;;N;;;;; -06B6;ARABIC LETTER LAM WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; -06B7;ARABIC LETTER LAM WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06B8;ARABIC LETTER LAM WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; -06B9;ARABIC LETTER NOON WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; -06BA;ARABIC LETTER NOON GHUNNA;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS NOON;;;; -06BB;ARABIC LETTER RNOON;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS NOON WITH SMALL TAH;;;; -06BC;ARABIC LETTER NOON WITH RING;Lo;0;AL;;;;;N;;;;; -06BD;ARABIC LETTER NOON WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06BE;ARABIC LETTER HEH DOACHASHMEE;Lo;0;AL;;;;;N;ARABIC LETTER KNOTTED HA;;;; -06BF;ARABIC LETTER TCHEH WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; -06C0;ARABIC LETTER HEH WITH YEH ABOVE;Lo;0;AL;06D5 0654;;;;N;ARABIC LETTER HAMZAH ON HA;;;; -06C1;ARABIC LETTER HEH GOAL;Lo;0;AL;;;;;N;ARABIC LETTER HA GOAL;;;; -06C2;ARABIC LETTER HEH GOAL WITH HAMZA ABOVE;Lo;0;AL;06C1 0654;;;;N;ARABIC LETTER HAMZAH ON HA GOAL;;;; -06C3;ARABIC LETTER TEH MARBUTA GOAL;Lo;0;AL;;;;;N;ARABIC LETTER TAA MARBUTAH GOAL;;;; -06C4;ARABIC LETTER WAW WITH RING;Lo;0;AL;;;;;N;;;;; -06C5;ARABIC LETTER KIRGHIZ OE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH BAR;;;; -06C6;ARABIC LETTER OE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH SMALL V;;;; -06C7;ARABIC LETTER U;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH DAMMAH;;;; -06C8;ARABIC LETTER YU;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH ALEF ABOVE;;;; -06C9;ARABIC LETTER KIRGHIZ YU;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH INVERTED SMALL V;;;; -06CA;ARABIC LETTER WAW WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; -06CB;ARABIC LETTER VE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH THREE DOTS ABOVE;;;; -06CC;ARABIC LETTER FARSI YEH;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS YA;;;; -06CD;ARABIC LETTER YEH WITH TAIL;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH TAIL;;;; -06CE;ARABIC LETTER YEH WITH SMALL V;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH SMALL V;;;; -06CF;ARABIC LETTER WAW WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; -06D0;ARABIC LETTER E;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH TWO DOTS VERTICAL BELOW;*;;; -06D1;ARABIC LETTER YEH WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH THREE DOTS BELOW;;;; -06D2;ARABIC LETTER YEH BARREE;Lo;0;AL;;;;;N;ARABIC LETTER YA BARREE;;;; -06D3;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE;Lo;0;AL;06D2 0654;;;;N;ARABIC LETTER HAMZAH ON YA BARREE;;;; -06D4;ARABIC FULL STOP;Po;0;AL;;;;;N;ARABIC PERIOD;;;; -06D5;ARABIC LETTER AE;Lo;0;AL;;;;;N;;;;; -06D6;ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA;Mn;230;NSM;;;;;N;;;;; -06D7;ARABIC SMALL HIGH LIGATURE QAF WITH LAM WITH ALEF MAKSURA;Mn;230;NSM;;;;;N;;;;; -06D8;ARABIC SMALL HIGH MEEM INITIAL FORM;Mn;230;NSM;;;;;N;;;;; -06D9;ARABIC SMALL HIGH LAM ALEF;Mn;230;NSM;;;;;N;;;;; -06DA;ARABIC SMALL HIGH JEEM;Mn;230;NSM;;;;;N;;;;; -06DB;ARABIC SMALL HIGH THREE DOTS;Mn;230;NSM;;;;;N;;;;; -06DC;ARABIC SMALL HIGH SEEN;Mn;230;NSM;;;;;N;;;;; -06DD;ARABIC END OF AYAH;Me;0;NSM;;;;;N;;;;; -06DE;ARABIC START OF RUB EL HIZB;Me;0;NSM;;;;;N;;;;; -06DF;ARABIC SMALL HIGH ROUNDED ZERO;Mn;230;NSM;;;;;N;;;;; -06E0;ARABIC SMALL HIGH UPRIGHT RECTANGULAR ZERO;Mn;230;NSM;;;;;N;;;;; -06E1;ARABIC SMALL HIGH DOTLESS HEAD OF KHAH;Mn;230;NSM;;;;;N;;;;; -06E2;ARABIC SMALL HIGH MEEM ISOLATED FORM;Mn;230;NSM;;;;;N;;;;; -06E3;ARABIC SMALL LOW SEEN;Mn;220;NSM;;;;;N;;;;; -06E4;ARABIC SMALL HIGH MADDA;Mn;230;NSM;;;;;N;;;;; -06E5;ARABIC SMALL WAW;Lm;0;AL;;;;;N;;;;; -06E6;ARABIC SMALL YEH;Lm;0;AL;;;;;N;;;;; -06E7;ARABIC SMALL HIGH YEH;Mn;230;NSM;;;;;N;;;;; -06E8;ARABIC SMALL HIGH NOON;Mn;230;NSM;;;;;N;;;;; -06E9;ARABIC PLACE OF SAJDAH;So;0;ON;;;;;N;;;;; -06EA;ARABIC EMPTY CENTRE LOW STOP;Mn;220;NSM;;;;;N;;;;; -06EB;ARABIC EMPTY CENTRE HIGH STOP;Mn;230;NSM;;;;;N;;;;; -06EC;ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE;Mn;230;NSM;;;;;N;;;;; -06ED;ARABIC SMALL LOW MEEM;Mn;220;NSM;;;;;N;;;;; -06F0;EXTENDED ARABIC-INDIC DIGIT ZERO;Nd;0;EN;;0;0;0;N;EASTERN ARABIC-INDIC DIGIT ZERO;;;; -06F1;EXTENDED ARABIC-INDIC DIGIT ONE;Nd;0;EN;;1;1;1;N;EASTERN ARABIC-INDIC DIGIT ONE;;;; -06F2;EXTENDED ARABIC-INDIC DIGIT TWO;Nd;0;EN;;2;2;2;N;EASTERN ARABIC-INDIC DIGIT TWO;;;; -06F3;EXTENDED ARABIC-INDIC DIGIT THREE;Nd;0;EN;;3;3;3;N;EASTERN ARABIC-INDIC DIGIT THREE;;;; -06F4;EXTENDED ARABIC-INDIC DIGIT FOUR;Nd;0;EN;;4;4;4;N;EASTERN ARABIC-INDIC DIGIT FOUR;;;; -06F5;EXTENDED ARABIC-INDIC DIGIT FIVE;Nd;0;EN;;5;5;5;N;EASTERN ARABIC-INDIC DIGIT FIVE;;;; -06F6;EXTENDED ARABIC-INDIC DIGIT SIX;Nd;0;EN;;6;6;6;N;EASTERN ARABIC-INDIC DIGIT SIX;;;; -06F7;EXTENDED ARABIC-INDIC DIGIT SEVEN;Nd;0;EN;;7;7;7;N;EASTERN ARABIC-INDIC DIGIT SEVEN;;;; -06F8;EXTENDED ARABIC-INDIC DIGIT EIGHT;Nd;0;EN;;8;8;8;N;EASTERN ARABIC-INDIC DIGIT EIGHT;;;; -06F9;EXTENDED ARABIC-INDIC DIGIT NINE;Nd;0;EN;;9;9;9;N;EASTERN ARABIC-INDIC DIGIT NINE;;;; -06FA;ARABIC LETTER SHEEN WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; -06FB;ARABIC LETTER DAD WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; -06FC;ARABIC LETTER GHAIN WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; -06FD;ARABIC SIGN SINDHI AMPERSAND;So;0;AL;;;;;N;;;;; -06FE;ARABIC SIGN SINDHI POSTPOSITION MEN;So;0;AL;;;;;N;;;;; -0700;SYRIAC END OF PARAGRAPH;Po;0;AL;;;;;N;;;;; -0701;SYRIAC SUPRALINEAR FULL STOP;Po;0;AL;;;;;N;;;;; -0702;SYRIAC SUBLINEAR FULL STOP;Po;0;AL;;;;;N;;;;; -0703;SYRIAC SUPRALINEAR COLON;Po;0;AL;;;;;N;;;;; -0704;SYRIAC SUBLINEAR COLON;Po;0;AL;;;;;N;;;;; -0705;SYRIAC HORIZONTAL COLON;Po;0;AL;;;;;N;;;;; -0706;SYRIAC COLON SKEWED LEFT;Po;0;AL;;;;;N;;;;; -0707;SYRIAC COLON SKEWED RIGHT;Po;0;AL;;;;;N;;;;; -0708;SYRIAC SUPRALINEAR COLON SKEWED LEFT;Po;0;AL;;;;;N;;;;; -0709;SYRIAC SUBLINEAR COLON SKEWED RIGHT;Po;0;AL;;;;;N;;;;; -070A;SYRIAC CONTRACTION;Po;0;AL;;;;;N;;;;; -070B;SYRIAC HARKLEAN OBELUS;Po;0;AL;;;;;N;;;;; -070C;SYRIAC HARKLEAN METOBELUS;Po;0;AL;;;;;N;;;;; -070D;SYRIAC HARKLEAN ASTERISCUS;Po;0;AL;;;;;N;;;;; -070F;SYRIAC ABBREVIATION MARK;Cf;0;BN;;;;;N;;;;; -0710;SYRIAC LETTER ALAPH;Lo;0;AL;;;;;N;;;;; -0711;SYRIAC LETTER SUPERSCRIPT ALAPH;Mn;36;NSM;;;;;N;;;;; -0712;SYRIAC LETTER BETH;Lo;0;AL;;;;;N;;;;; -0713;SYRIAC LETTER GAMAL;Lo;0;AL;;;;;N;;;;; -0714;SYRIAC LETTER GAMAL GARSHUNI;Lo;0;AL;;;;;N;;;;; -0715;SYRIAC LETTER DALATH;Lo;0;AL;;;;;N;;;;; -0716;SYRIAC LETTER DOTLESS DALATH RISH;Lo;0;AL;;;;;N;;;;; -0717;SYRIAC LETTER HE;Lo;0;AL;;;;;N;;;;; -0718;SYRIAC LETTER WAW;Lo;0;AL;;;;;N;;;;; -0719;SYRIAC LETTER ZAIN;Lo;0;AL;;;;;N;;;;; -071A;SYRIAC LETTER HETH;Lo;0;AL;;;;;N;;;;; -071B;SYRIAC LETTER TETH;Lo;0;AL;;;;;N;;;;; -071C;SYRIAC LETTER TETH GARSHUNI;Lo;0;AL;;;;;N;;;;; -071D;SYRIAC LETTER YUDH;Lo;0;AL;;;;;N;;;;; -071E;SYRIAC LETTER YUDH HE;Lo;0;AL;;;;;N;;;;; -071F;SYRIAC LETTER KAPH;Lo;0;AL;;;;;N;;;;; -0720;SYRIAC LETTER LAMADH;Lo;0;AL;;;;;N;;;;; -0721;SYRIAC LETTER MIM;Lo;0;AL;;;;;N;;;;; -0722;SYRIAC LETTER NUN;Lo;0;AL;;;;;N;;;;; -0723;SYRIAC LETTER SEMKATH;Lo;0;AL;;;;;N;;;;; -0724;SYRIAC LETTER FINAL SEMKATH;Lo;0;AL;;;;;N;;;;; -0725;SYRIAC LETTER E;Lo;0;AL;;;;;N;;;;; -0726;SYRIAC LETTER PE;Lo;0;AL;;;;;N;;;;; -0727;SYRIAC LETTER REVERSED PE;Lo;0;AL;;;;;N;;;;; -0728;SYRIAC LETTER SADHE;Lo;0;AL;;;;;N;;;;; -0729;SYRIAC LETTER QAPH;Lo;0;AL;;;;;N;;;;; -072A;SYRIAC LETTER RISH;Lo;0;AL;;;;;N;;;;; -072B;SYRIAC LETTER SHIN;Lo;0;AL;;;;;N;;;;; -072C;SYRIAC LETTER TAW;Lo;0;AL;;;;;N;;;;; -0730;SYRIAC PTHAHA ABOVE;Mn;230;NSM;;;;;N;;;;; -0731;SYRIAC PTHAHA BELOW;Mn;220;NSM;;;;;N;;;;; -0732;SYRIAC PTHAHA DOTTED;Mn;230;NSM;;;;;N;;;;; -0733;SYRIAC ZQAPHA ABOVE;Mn;230;NSM;;;;;N;;;;; -0734;SYRIAC ZQAPHA BELOW;Mn;220;NSM;;;;;N;;;;; -0735;SYRIAC ZQAPHA DOTTED;Mn;230;NSM;;;;;N;;;;; -0736;SYRIAC RBASA ABOVE;Mn;230;NSM;;;;;N;;;;; -0737;SYRIAC RBASA BELOW;Mn;220;NSM;;;;;N;;;;; -0738;SYRIAC DOTTED ZLAMA HORIZONTAL;Mn;220;NSM;;;;;N;;;;; -0739;SYRIAC DOTTED ZLAMA ANGULAR;Mn;220;NSM;;;;;N;;;;; -073A;SYRIAC HBASA ABOVE;Mn;230;NSM;;;;;N;;;;; -073B;SYRIAC HBASA BELOW;Mn;220;NSM;;;;;N;;;;; -073C;SYRIAC HBASA-ESASA DOTTED;Mn;220;NSM;;;;;N;;;;; -073D;SYRIAC ESASA ABOVE;Mn;230;NSM;;;;;N;;;;; -073E;SYRIAC ESASA BELOW;Mn;220;NSM;;;;;N;;;;; -073F;SYRIAC RWAHA;Mn;230;NSM;;;;;N;;;;; -0740;SYRIAC FEMININE DOT;Mn;230;NSM;;;;;N;;;;; -0741;SYRIAC QUSHSHAYA;Mn;230;NSM;;;;;N;;;;; -0742;SYRIAC RUKKAKHA;Mn;220;NSM;;;;;N;;;;; -0743;SYRIAC TWO VERTICAL DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; -0744;SYRIAC TWO VERTICAL DOTS BELOW;Mn;220;NSM;;;;;N;;;;; -0745;SYRIAC THREE DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; -0746;SYRIAC THREE DOTS BELOW;Mn;220;NSM;;;;;N;;;;; -0747;SYRIAC OBLIQUE LINE ABOVE;Mn;230;NSM;;;;;N;;;;; -0748;SYRIAC OBLIQUE LINE BELOW;Mn;220;NSM;;;;;N;;;;; -0749;SYRIAC MUSIC;Mn;230;NSM;;;;;N;;;;; -074A;SYRIAC BARREKH;Mn;230;NSM;;;;;N;;;;; -0780;THAANA LETTER HAA;Lo;0;AL;;;;;N;;;;; -0781;THAANA LETTER SHAVIYANI;Lo;0;AL;;;;;N;;;;; -0782;THAANA LETTER NOONU;Lo;0;AL;;;;;N;;;;; -0783;THAANA LETTER RAA;Lo;0;AL;;;;;N;;;;; -0784;THAANA LETTER BAA;Lo;0;AL;;;;;N;;;;; -0785;THAANA LETTER LHAVIYANI;Lo;0;AL;;;;;N;;;;; -0786;THAANA LETTER KAAFU;Lo;0;AL;;;;;N;;;;; -0787;THAANA LETTER ALIFU;Lo;0;AL;;;;;N;;;;; -0788;THAANA LETTER VAAVU;Lo;0;AL;;;;;N;;;;; -0789;THAANA LETTER MEEMU;Lo;0;AL;;;;;N;;;;; -078A;THAANA LETTER FAAFU;Lo;0;AL;;;;;N;;;;; -078B;THAANA LETTER DHAALU;Lo;0;AL;;;;;N;;;;; -078C;THAANA LETTER THAA;Lo;0;AL;;;;;N;;;;; -078D;THAANA LETTER LAAMU;Lo;0;AL;;;;;N;;;;; -078E;THAANA LETTER GAAFU;Lo;0;AL;;;;;N;;;;; -078F;THAANA LETTER GNAVIYANI;Lo;0;AL;;;;;N;;;;; -0790;THAANA LETTER SEENU;Lo;0;AL;;;;;N;;;;; -0791;THAANA LETTER DAVIYANI;Lo;0;AL;;;;;N;;;;; -0792;THAANA LETTER ZAVIYANI;Lo;0;AL;;;;;N;;;;; -0793;THAANA LETTER TAVIYANI;Lo;0;AL;;;;;N;;;;; -0794;THAANA LETTER YAA;Lo;0;AL;;;;;N;;;;; -0795;THAANA LETTER PAVIYANI;Lo;0;AL;;;;;N;;;;; -0796;THAANA LETTER JAVIYANI;Lo;0;AL;;;;;N;;;;; -0797;THAANA LETTER CHAVIYANI;Lo;0;AL;;;;;N;;;;; -0798;THAANA LETTER TTAA;Lo;0;AL;;;;;N;;;;; -0799;THAANA LETTER HHAA;Lo;0;AL;;;;;N;;;;; -079A;THAANA LETTER KHAA;Lo;0;AL;;;;;N;;;;; -079B;THAANA LETTER THAALU;Lo;0;AL;;;;;N;;;;; -079C;THAANA LETTER ZAA;Lo;0;AL;;;;;N;;;;; -079D;THAANA LETTER SHEENU;Lo;0;AL;;;;;N;;;;; -079E;THAANA LETTER SAADHU;Lo;0;AL;;;;;N;;;;; -079F;THAANA LETTER DAADHU;Lo;0;AL;;;;;N;;;;; -07A0;THAANA LETTER TO;Lo;0;AL;;;;;N;;;;; -07A1;THAANA LETTER ZO;Lo;0;AL;;;;;N;;;;; -07A2;THAANA LETTER AINU;Lo;0;AL;;;;;N;;;;; -07A3;THAANA LETTER GHAINU;Lo;0;AL;;;;;N;;;;; -07A4;THAANA LETTER QAAFU;Lo;0;AL;;;;;N;;;;; -07A5;THAANA LETTER WAAVU;Lo;0;AL;;;;;N;;;;; -07A6;THAANA ABAFILI;Mn;0;NSM;;;;;N;;;;; -07A7;THAANA AABAAFILI;Mn;0;NSM;;;;;N;;;;; -07A8;THAANA IBIFILI;Mn;0;NSM;;;;;N;;;;; -07A9;THAANA EEBEEFILI;Mn;0;NSM;;;;;N;;;;; -07AA;THAANA UBUFILI;Mn;0;NSM;;;;;N;;;;; -07AB;THAANA OOBOOFILI;Mn;0;NSM;;;;;N;;;;; -07AC;THAANA EBEFILI;Mn;0;NSM;;;;;N;;;;; -07AD;THAANA EYBEYFILI;Mn;0;NSM;;;;;N;;;;; -07AE;THAANA OBOFILI;Mn;0;NSM;;;;;N;;;;; -07AF;THAANA OABOAFILI;Mn;0;NSM;;;;;N;;;;; -07B0;THAANA SUKUN;Mn;0;NSM;;;;;N;;;;; -0901;DEVANAGARI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; -0902;DEVANAGARI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; -0903;DEVANAGARI SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0905;DEVANAGARI LETTER A;Lo;0;L;;;;;N;;;;; -0906;DEVANAGARI LETTER AA;Lo;0;L;;;;;N;;;;; -0907;DEVANAGARI LETTER I;Lo;0;L;;;;;N;;;;; -0908;DEVANAGARI LETTER II;Lo;0;L;;;;;N;;;;; -0909;DEVANAGARI LETTER U;Lo;0;L;;;;;N;;;;; -090A;DEVANAGARI LETTER UU;Lo;0;L;;;;;N;;;;; -090B;DEVANAGARI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -090C;DEVANAGARI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -090D;DEVANAGARI LETTER CANDRA E;Lo;0;L;;;;;N;;;;; -090E;DEVANAGARI LETTER SHORT E;Lo;0;L;;;;;N;;;;; -090F;DEVANAGARI LETTER E;Lo;0;L;;;;;N;;;;; -0910;DEVANAGARI LETTER AI;Lo;0;L;;;;;N;;;;; -0911;DEVANAGARI LETTER CANDRA O;Lo;0;L;;;;;N;;;;; -0912;DEVANAGARI LETTER SHORT O;Lo;0;L;;;;;N;;;;; -0913;DEVANAGARI LETTER O;Lo;0;L;;;;;N;;;;; -0914;DEVANAGARI LETTER AU;Lo;0;L;;;;;N;;;;; -0915;DEVANAGARI LETTER KA;Lo;0;L;;;;;N;;;;; -0916;DEVANAGARI LETTER KHA;Lo;0;L;;;;;N;;;;; -0917;DEVANAGARI LETTER GA;Lo;0;L;;;;;N;;;;; -0918;DEVANAGARI LETTER GHA;Lo;0;L;;;;;N;;;;; -0919;DEVANAGARI LETTER NGA;Lo;0;L;;;;;N;;;;; -091A;DEVANAGARI LETTER CA;Lo;0;L;;;;;N;;;;; -091B;DEVANAGARI LETTER CHA;Lo;0;L;;;;;N;;;;; -091C;DEVANAGARI LETTER JA;Lo;0;L;;;;;N;;;;; -091D;DEVANAGARI LETTER JHA;Lo;0;L;;;;;N;;;;; -091E;DEVANAGARI LETTER NYA;Lo;0;L;;;;;N;;;;; -091F;DEVANAGARI LETTER TTA;Lo;0;L;;;;;N;;;;; -0920;DEVANAGARI LETTER TTHA;Lo;0;L;;;;;N;;;;; -0921;DEVANAGARI LETTER DDA;Lo;0;L;;;;;N;;;;; -0922;DEVANAGARI LETTER DDHA;Lo;0;L;;;;;N;;;;; -0923;DEVANAGARI LETTER NNA;Lo;0;L;;;;;N;;;;; -0924;DEVANAGARI LETTER TA;Lo;0;L;;;;;N;;;;; -0925;DEVANAGARI LETTER THA;Lo;0;L;;;;;N;;;;; -0926;DEVANAGARI LETTER DA;Lo;0;L;;;;;N;;;;; -0927;DEVANAGARI LETTER DHA;Lo;0;L;;;;;N;;;;; -0928;DEVANAGARI LETTER NA;Lo;0;L;;;;;N;;;;; -0929;DEVANAGARI LETTER NNNA;Lo;0;L;0928 093C;;;;N;;;;; -092A;DEVANAGARI LETTER PA;Lo;0;L;;;;;N;;;;; -092B;DEVANAGARI LETTER PHA;Lo;0;L;;;;;N;;;;; -092C;DEVANAGARI LETTER BA;Lo;0;L;;;;;N;;;;; -092D;DEVANAGARI LETTER BHA;Lo;0;L;;;;;N;;;;; -092E;DEVANAGARI LETTER MA;Lo;0;L;;;;;N;;;;; -092F;DEVANAGARI LETTER YA;Lo;0;L;;;;;N;;;;; -0930;DEVANAGARI LETTER RA;Lo;0;L;;;;;N;;;;; -0931;DEVANAGARI LETTER RRA;Lo;0;L;0930 093C;;;;N;;;;; -0932;DEVANAGARI LETTER LA;Lo;0;L;;;;;N;;;;; -0933;DEVANAGARI LETTER LLA;Lo;0;L;;;;;N;;;;; -0934;DEVANAGARI LETTER LLLA;Lo;0;L;0933 093C;;;;N;;;;; -0935;DEVANAGARI LETTER VA;Lo;0;L;;;;;N;;;;; -0936;DEVANAGARI LETTER SHA;Lo;0;L;;;;;N;;;;; -0937;DEVANAGARI LETTER SSA;Lo;0;L;;;;;N;;;;; -0938;DEVANAGARI LETTER SA;Lo;0;L;;;;;N;;;;; -0939;DEVANAGARI LETTER HA;Lo;0;L;;;;;N;;;;; -093C;DEVANAGARI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; -093D;DEVANAGARI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; -093E;DEVANAGARI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -093F;DEVANAGARI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -0940;DEVANAGARI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -0941;DEVANAGARI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -0942;DEVANAGARI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -0943;DEVANAGARI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; -0944;DEVANAGARI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; -0945;DEVANAGARI VOWEL SIGN CANDRA E;Mn;0;NSM;;;;;N;;;;; -0946;DEVANAGARI VOWEL SIGN SHORT E;Mn;0;NSM;;;;;N;;;;; -0947;DEVANAGARI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; -0948;DEVANAGARI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; -0949;DEVANAGARI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;; -094A;DEVANAGARI VOWEL SIGN SHORT O;Mc;0;L;;;;;N;;;;; -094B;DEVANAGARI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; -094C;DEVANAGARI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; -094D;DEVANAGARI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0950;DEVANAGARI OM;Lo;0;L;;;;;N;;;;; -0951;DEVANAGARI STRESS SIGN UDATTA;Mn;230;NSM;;;;;N;;;;; -0952;DEVANAGARI STRESS SIGN ANUDATTA;Mn;220;NSM;;;;;N;;;;; -0953;DEVANAGARI GRAVE ACCENT;Mn;230;NSM;;;;;N;;;;; -0954;DEVANAGARI ACUTE ACCENT;Mn;230;NSM;;;;;N;;;;; -0958;DEVANAGARI LETTER QA;Lo;0;L;0915 093C;;;;N;;;;; -0959;DEVANAGARI LETTER KHHA;Lo;0;L;0916 093C;;;;N;;;;; -095A;DEVANAGARI LETTER GHHA;Lo;0;L;0917 093C;;;;N;;;;; -095B;DEVANAGARI LETTER ZA;Lo;0;L;091C 093C;;;;N;;;;; -095C;DEVANAGARI LETTER DDDHA;Lo;0;L;0921 093C;;;;N;;;;; -095D;DEVANAGARI LETTER RHA;Lo;0;L;0922 093C;;;;N;;;;; -095E;DEVANAGARI LETTER FA;Lo;0;L;092B 093C;;;;N;;;;; -095F;DEVANAGARI LETTER YYA;Lo;0;L;092F 093C;;;;N;;;;; -0960;DEVANAGARI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0961;DEVANAGARI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -0962;DEVANAGARI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; -0963;DEVANAGARI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; -0964;DEVANAGARI DANDA;Po;0;L;;;;;N;;;;; -0965;DEVANAGARI DOUBLE DANDA;Po;0;L;;;;;N;;;;; -0966;DEVANAGARI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0967;DEVANAGARI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0968;DEVANAGARI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0969;DEVANAGARI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -096A;DEVANAGARI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -096B;DEVANAGARI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -096C;DEVANAGARI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -096D;DEVANAGARI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -096E;DEVANAGARI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -096F;DEVANAGARI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0970;DEVANAGARI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; -0981;BENGALI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; -0982;BENGALI SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; -0983;BENGALI SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0985;BENGALI LETTER A;Lo;0;L;;;;;N;;;;; -0986;BENGALI LETTER AA;Lo;0;L;;;;;N;;;;; -0987;BENGALI LETTER I;Lo;0;L;;;;;N;;;;; -0988;BENGALI LETTER II;Lo;0;L;;;;;N;;;;; -0989;BENGALI LETTER U;Lo;0;L;;;;;N;;;;; -098A;BENGALI LETTER UU;Lo;0;L;;;;;N;;;;; -098B;BENGALI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -098C;BENGALI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -098F;BENGALI LETTER E;Lo;0;L;;;;;N;;;;; -0990;BENGALI LETTER AI;Lo;0;L;;;;;N;;;;; -0993;BENGALI LETTER O;Lo;0;L;;;;;N;;;;; -0994;BENGALI LETTER AU;Lo;0;L;;;;;N;;;;; -0995;BENGALI LETTER KA;Lo;0;L;;;;;N;;;;; -0996;BENGALI LETTER KHA;Lo;0;L;;;;;N;;;;; -0997;BENGALI LETTER GA;Lo;0;L;;;;;N;;;;; -0998;BENGALI LETTER GHA;Lo;0;L;;;;;N;;;;; -0999;BENGALI LETTER NGA;Lo;0;L;;;;;N;;;;; -099A;BENGALI LETTER CA;Lo;0;L;;;;;N;;;;; -099B;BENGALI LETTER CHA;Lo;0;L;;;;;N;;;;; -099C;BENGALI LETTER JA;Lo;0;L;;;;;N;;;;; -099D;BENGALI LETTER JHA;Lo;0;L;;;;;N;;;;; -099E;BENGALI LETTER NYA;Lo;0;L;;;;;N;;;;; -099F;BENGALI LETTER TTA;Lo;0;L;;;;;N;;;;; -09A0;BENGALI LETTER TTHA;Lo;0;L;;;;;N;;;;; -09A1;BENGALI LETTER DDA;Lo;0;L;;;;;N;;;;; -09A2;BENGALI LETTER DDHA;Lo;0;L;;;;;N;;;;; -09A3;BENGALI LETTER NNA;Lo;0;L;;;;;N;;;;; -09A4;BENGALI LETTER TA;Lo;0;L;;;;;N;;;;; -09A5;BENGALI LETTER THA;Lo;0;L;;;;;N;;;;; -09A6;BENGALI LETTER DA;Lo;0;L;;;;;N;;;;; -09A7;BENGALI LETTER DHA;Lo;0;L;;;;;N;;;;; -09A8;BENGALI LETTER NA;Lo;0;L;;;;;N;;;;; -09AA;BENGALI LETTER PA;Lo;0;L;;;;;N;;;;; -09AB;BENGALI LETTER PHA;Lo;0;L;;;;;N;;;;; -09AC;BENGALI LETTER BA;Lo;0;L;;;;;N;;;;; -09AD;BENGALI LETTER BHA;Lo;0;L;;;;;N;;;;; -09AE;BENGALI LETTER MA;Lo;0;L;;;;;N;;;;; -09AF;BENGALI LETTER YA;Lo;0;L;;;;;N;;;;; -09B0;BENGALI LETTER RA;Lo;0;L;;;;;N;;;;; -09B2;BENGALI LETTER LA;Lo;0;L;;;;;N;;;;; -09B6;BENGALI LETTER SHA;Lo;0;L;;;;;N;;;;; -09B7;BENGALI LETTER SSA;Lo;0;L;;;;;N;;;;; -09B8;BENGALI LETTER SA;Lo;0;L;;;;;N;;;;; -09B9;BENGALI LETTER HA;Lo;0;L;;;;;N;;;;; -09BC;BENGALI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; -09BE;BENGALI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -09BF;BENGALI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -09C0;BENGALI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -09C1;BENGALI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -09C2;BENGALI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -09C3;BENGALI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; -09C4;BENGALI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; -09C7;BENGALI VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -09C8;BENGALI VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; -09CB;BENGALI VOWEL SIGN O;Mc;0;L;09C7 09BE;;;;N;;;;; -09CC;BENGALI VOWEL SIGN AU;Mc;0;L;09C7 09D7;;;;N;;;;; -09CD;BENGALI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -09D7;BENGALI AU LENGTH MARK;Mc;0;L;;;;;N;;;;; -09DC;BENGALI LETTER RRA;Lo;0;L;09A1 09BC;;;;N;;;;; -09DD;BENGALI LETTER RHA;Lo;0;L;09A2 09BC;;;;N;;;;; -09DF;BENGALI LETTER YYA;Lo;0;L;09AF 09BC;;;;N;;;;; -09E0;BENGALI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -09E1;BENGALI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -09E2;BENGALI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; -09E3;BENGALI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; -09E6;BENGALI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -09E7;BENGALI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -09E8;BENGALI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -09E9;BENGALI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -09EA;BENGALI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -09EB;BENGALI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -09EC;BENGALI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -09ED;BENGALI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -09EE;BENGALI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -09EF;BENGALI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -09F0;BENGALI LETTER RA WITH MIDDLE DIAGONAL;Lo;0;L;;;;;N;;Assamese;;; -09F1;BENGALI LETTER RA WITH LOWER DIAGONAL;Lo;0;L;;;;;N;BENGALI LETTER VA WITH LOWER DIAGONAL;Assamese;;; -09F2;BENGALI RUPEE MARK;Sc;0;ET;;;;;N;;;;; -09F3;BENGALI RUPEE SIGN;Sc;0;ET;;;;;N;;;;; -09F4;BENGALI CURRENCY NUMERATOR ONE;No;0;L;;;;1;N;;;;; -09F5;BENGALI CURRENCY NUMERATOR TWO;No;0;L;;;;2;N;;;;; -09F6;BENGALI CURRENCY NUMERATOR THREE;No;0;L;;;;3;N;;;;; -09F7;BENGALI CURRENCY NUMERATOR FOUR;No;0;L;;;;4;N;;;;; -09F8;BENGALI CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR;No;0;L;;;;;N;;;;; -09F9;BENGALI CURRENCY DENOMINATOR SIXTEEN;No;0;L;;;;16;N;;;;; -09FA;BENGALI ISSHAR;So;0;L;;;;;N;;;;; -0A02;GURMUKHI SIGN BINDI;Mn;0;NSM;;;;;N;;;;; -0A05;GURMUKHI LETTER A;Lo;0;L;;;;;N;;;;; -0A06;GURMUKHI LETTER AA;Lo;0;L;;;;;N;;;;; -0A07;GURMUKHI LETTER I;Lo;0;L;;;;;N;;;;; -0A08;GURMUKHI LETTER II;Lo;0;L;;;;;N;;;;; -0A09;GURMUKHI LETTER U;Lo;0;L;;;;;N;;;;; -0A0A;GURMUKHI LETTER UU;Lo;0;L;;;;;N;;;;; -0A0F;GURMUKHI LETTER EE;Lo;0;L;;;;;N;;;;; -0A10;GURMUKHI LETTER AI;Lo;0;L;;;;;N;;;;; -0A13;GURMUKHI LETTER OO;Lo;0;L;;;;;N;;;;; -0A14;GURMUKHI LETTER AU;Lo;0;L;;;;;N;;;;; -0A15;GURMUKHI LETTER KA;Lo;0;L;;;;;N;;;;; -0A16;GURMUKHI LETTER KHA;Lo;0;L;;;;;N;;;;; -0A17;GURMUKHI LETTER GA;Lo;0;L;;;;;N;;;;; -0A18;GURMUKHI LETTER GHA;Lo;0;L;;;;;N;;;;; -0A19;GURMUKHI LETTER NGA;Lo;0;L;;;;;N;;;;; -0A1A;GURMUKHI LETTER CA;Lo;0;L;;;;;N;;;;; -0A1B;GURMUKHI LETTER CHA;Lo;0;L;;;;;N;;;;; -0A1C;GURMUKHI LETTER JA;Lo;0;L;;;;;N;;;;; -0A1D;GURMUKHI LETTER JHA;Lo;0;L;;;;;N;;;;; -0A1E;GURMUKHI LETTER NYA;Lo;0;L;;;;;N;;;;; -0A1F;GURMUKHI LETTER TTA;Lo;0;L;;;;;N;;;;; -0A20;GURMUKHI LETTER TTHA;Lo;0;L;;;;;N;;;;; -0A21;GURMUKHI LETTER DDA;Lo;0;L;;;;;N;;;;; -0A22;GURMUKHI LETTER DDHA;Lo;0;L;;;;;N;;;;; -0A23;GURMUKHI LETTER NNA;Lo;0;L;;;;;N;;;;; -0A24;GURMUKHI LETTER TA;Lo;0;L;;;;;N;;;;; -0A25;GURMUKHI LETTER THA;Lo;0;L;;;;;N;;;;; -0A26;GURMUKHI LETTER DA;Lo;0;L;;;;;N;;;;; -0A27;GURMUKHI LETTER DHA;Lo;0;L;;;;;N;;;;; -0A28;GURMUKHI LETTER NA;Lo;0;L;;;;;N;;;;; -0A2A;GURMUKHI LETTER PA;Lo;0;L;;;;;N;;;;; -0A2B;GURMUKHI LETTER PHA;Lo;0;L;;;;;N;;;;; -0A2C;GURMUKHI LETTER BA;Lo;0;L;;;;;N;;;;; -0A2D;GURMUKHI LETTER BHA;Lo;0;L;;;;;N;;;;; -0A2E;GURMUKHI LETTER MA;Lo;0;L;;;;;N;;;;; -0A2F;GURMUKHI LETTER YA;Lo;0;L;;;;;N;;;;; -0A30;GURMUKHI LETTER RA;Lo;0;L;;;;;N;;;;; -0A32;GURMUKHI LETTER LA;Lo;0;L;;;;;N;;;;; -0A33;GURMUKHI LETTER LLA;Lo;0;L;0A32 0A3C;;;;N;;;;; -0A35;GURMUKHI LETTER VA;Lo;0;L;;;;;N;;;;; -0A36;GURMUKHI LETTER SHA;Lo;0;L;0A38 0A3C;;;;N;;;;; -0A38;GURMUKHI LETTER SA;Lo;0;L;;;;;N;;;;; -0A39;GURMUKHI LETTER HA;Lo;0;L;;;;;N;;;;; -0A3C;GURMUKHI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; -0A3E;GURMUKHI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0A3F;GURMUKHI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -0A40;GURMUKHI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -0A41;GURMUKHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -0A42;GURMUKHI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -0A47;GURMUKHI VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; -0A48;GURMUKHI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; -0A4B;GURMUKHI VOWEL SIGN OO;Mn;0;NSM;;;;;N;;;;; -0A4C;GURMUKHI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; -0A4D;GURMUKHI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0A59;GURMUKHI LETTER KHHA;Lo;0;L;0A16 0A3C;;;;N;;;;; -0A5A;GURMUKHI LETTER GHHA;Lo;0;L;0A17 0A3C;;;;N;;;;; -0A5B;GURMUKHI LETTER ZA;Lo;0;L;0A1C 0A3C;;;;N;;;;; -0A5C;GURMUKHI LETTER RRA;Lo;0;L;;;;;N;;;;; -0A5E;GURMUKHI LETTER FA;Lo;0;L;0A2B 0A3C;;;;N;;;;; -0A66;GURMUKHI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0A67;GURMUKHI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0A68;GURMUKHI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0A69;GURMUKHI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0A6A;GURMUKHI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0A6B;GURMUKHI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0A6C;GURMUKHI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0A6D;GURMUKHI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0A6E;GURMUKHI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0A6F;GURMUKHI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0A70;GURMUKHI TIPPI;Mn;0;NSM;;;;;N;;;;; -0A71;GURMUKHI ADDAK;Mn;0;NSM;;;;;N;;;;; -0A72;GURMUKHI IRI;Lo;0;L;;;;;N;;;;; -0A73;GURMUKHI URA;Lo;0;L;;;;;N;;;;; -0A74;GURMUKHI EK ONKAR;Lo;0;L;;;;;N;;;;; -0A81;GUJARATI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; -0A82;GUJARATI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; -0A83;GUJARATI SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0A85;GUJARATI LETTER A;Lo;0;L;;;;;N;;;;; -0A86;GUJARATI LETTER AA;Lo;0;L;;;;;N;;;;; -0A87;GUJARATI LETTER I;Lo;0;L;;;;;N;;;;; -0A88;GUJARATI LETTER II;Lo;0;L;;;;;N;;;;; -0A89;GUJARATI LETTER U;Lo;0;L;;;;;N;;;;; -0A8A;GUJARATI LETTER UU;Lo;0;L;;;;;N;;;;; -0A8B;GUJARATI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -0A8D;GUJARATI VOWEL CANDRA E;Lo;0;L;;;;;N;;;;; -0A8F;GUJARATI LETTER E;Lo;0;L;;;;;N;;;;; -0A90;GUJARATI LETTER AI;Lo;0;L;;;;;N;;;;; -0A91;GUJARATI VOWEL CANDRA O;Lo;0;L;;;;;N;;;;; -0A93;GUJARATI LETTER O;Lo;0;L;;;;;N;;;;; -0A94;GUJARATI LETTER AU;Lo;0;L;;;;;N;;;;; -0A95;GUJARATI LETTER KA;Lo;0;L;;;;;N;;;;; -0A96;GUJARATI LETTER KHA;Lo;0;L;;;;;N;;;;; -0A97;GUJARATI LETTER GA;Lo;0;L;;;;;N;;;;; -0A98;GUJARATI LETTER GHA;Lo;0;L;;;;;N;;;;; -0A99;GUJARATI LETTER NGA;Lo;0;L;;;;;N;;;;; -0A9A;GUJARATI LETTER CA;Lo;0;L;;;;;N;;;;; -0A9B;GUJARATI LETTER CHA;Lo;0;L;;;;;N;;;;; -0A9C;GUJARATI LETTER JA;Lo;0;L;;;;;N;;;;; -0A9D;GUJARATI LETTER JHA;Lo;0;L;;;;;N;;;;; -0A9E;GUJARATI LETTER NYA;Lo;0;L;;;;;N;;;;; -0A9F;GUJARATI LETTER TTA;Lo;0;L;;;;;N;;;;; -0AA0;GUJARATI LETTER TTHA;Lo;0;L;;;;;N;;;;; -0AA1;GUJARATI LETTER DDA;Lo;0;L;;;;;N;;;;; -0AA2;GUJARATI LETTER DDHA;Lo;0;L;;;;;N;;;;; -0AA3;GUJARATI LETTER NNA;Lo;0;L;;;;;N;;;;; -0AA4;GUJARATI LETTER TA;Lo;0;L;;;;;N;;;;; -0AA5;GUJARATI LETTER THA;Lo;0;L;;;;;N;;;;; -0AA6;GUJARATI LETTER DA;Lo;0;L;;;;;N;;;;; -0AA7;GUJARATI LETTER DHA;Lo;0;L;;;;;N;;;;; -0AA8;GUJARATI LETTER NA;Lo;0;L;;;;;N;;;;; -0AAA;GUJARATI LETTER PA;Lo;0;L;;;;;N;;;;; -0AAB;GUJARATI LETTER PHA;Lo;0;L;;;;;N;;;;; -0AAC;GUJARATI LETTER BA;Lo;0;L;;;;;N;;;;; -0AAD;GUJARATI LETTER BHA;Lo;0;L;;;;;N;;;;; -0AAE;GUJARATI LETTER MA;Lo;0;L;;;;;N;;;;; -0AAF;GUJARATI LETTER YA;Lo;0;L;;;;;N;;;;; -0AB0;GUJARATI LETTER RA;Lo;0;L;;;;;N;;;;; -0AB2;GUJARATI LETTER LA;Lo;0;L;;;;;N;;;;; -0AB3;GUJARATI LETTER LLA;Lo;0;L;;;;;N;;;;; -0AB5;GUJARATI LETTER VA;Lo;0;L;;;;;N;;;;; -0AB6;GUJARATI LETTER SHA;Lo;0;L;;;;;N;;;;; -0AB7;GUJARATI LETTER SSA;Lo;0;L;;;;;N;;;;; -0AB8;GUJARATI LETTER SA;Lo;0;L;;;;;N;;;;; -0AB9;GUJARATI LETTER HA;Lo;0;L;;;;;N;;;;; -0ABC;GUJARATI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; -0ABD;GUJARATI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; -0ABE;GUJARATI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0ABF;GUJARATI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -0AC0;GUJARATI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -0AC1;GUJARATI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -0AC2;GUJARATI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -0AC3;GUJARATI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; -0AC4;GUJARATI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; -0AC5;GUJARATI VOWEL SIGN CANDRA E;Mn;0;NSM;;;;;N;;;;; -0AC7;GUJARATI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; -0AC8;GUJARATI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; -0AC9;GUJARATI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;; -0ACB;GUJARATI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; -0ACC;GUJARATI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; -0ACD;GUJARATI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0AD0;GUJARATI OM;Lo;0;L;;;;;N;;;;; -0AE0;GUJARATI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0AE6;GUJARATI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0AE7;GUJARATI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0AE8;GUJARATI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0AE9;GUJARATI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0AEA;GUJARATI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0AEB;GUJARATI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0AEC;GUJARATI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0AED;GUJARATI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0AEE;GUJARATI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0AEF;GUJARATI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; -0B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; -0B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0B05;ORIYA LETTER A;Lo;0;L;;;;;N;;;;; -0B06;ORIYA LETTER AA;Lo;0;L;;;;;N;;;;; -0B07;ORIYA LETTER I;Lo;0;L;;;;;N;;;;; -0B08;ORIYA LETTER II;Lo;0;L;;;;;N;;;;; -0B09;ORIYA LETTER U;Lo;0;L;;;;;N;;;;; -0B0A;ORIYA LETTER UU;Lo;0;L;;;;;N;;;;; -0B0B;ORIYA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -0B0C;ORIYA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -0B0F;ORIYA LETTER E;Lo;0;L;;;;;N;;;;; -0B10;ORIYA LETTER AI;Lo;0;L;;;;;N;;;;; -0B13;ORIYA LETTER O;Lo;0;L;;;;;N;;;;; -0B14;ORIYA LETTER AU;Lo;0;L;;;;;N;;;;; -0B15;ORIYA LETTER KA;Lo;0;L;;;;;N;;;;; -0B16;ORIYA LETTER KHA;Lo;0;L;;;;;N;;;;; -0B17;ORIYA LETTER GA;Lo;0;L;;;;;N;;;;; -0B18;ORIYA LETTER GHA;Lo;0;L;;;;;N;;;;; -0B19;ORIYA LETTER NGA;Lo;0;L;;;;;N;;;;; -0B1A;ORIYA LETTER CA;Lo;0;L;;;;;N;;;;; -0B1B;ORIYA LETTER CHA;Lo;0;L;;;;;N;;;;; -0B1C;ORIYA LETTER JA;Lo;0;L;;;;;N;;;;; -0B1D;ORIYA LETTER JHA;Lo;0;L;;;;;N;;;;; -0B1E;ORIYA LETTER NYA;Lo;0;L;;;;;N;;;;; -0B1F;ORIYA LETTER TTA;Lo;0;L;;;;;N;;;;; -0B20;ORIYA LETTER TTHA;Lo;0;L;;;;;N;;;;; -0B21;ORIYA LETTER DDA;Lo;0;L;;;;;N;;;;; -0B22;ORIYA LETTER DDHA;Lo;0;L;;;;;N;;;;; -0B23;ORIYA LETTER NNA;Lo;0;L;;;;;N;;;;; -0B24;ORIYA LETTER TA;Lo;0;L;;;;;N;;;;; -0B25;ORIYA LETTER THA;Lo;0;L;;;;;N;;;;; -0B26;ORIYA LETTER DA;Lo;0;L;;;;;N;;;;; -0B27;ORIYA LETTER DHA;Lo;0;L;;;;;N;;;;; -0B28;ORIYA LETTER NA;Lo;0;L;;;;;N;;;;; -0B2A;ORIYA LETTER PA;Lo;0;L;;;;;N;;;;; -0B2B;ORIYA LETTER PHA;Lo;0;L;;;;;N;;;;; -0B2C;ORIYA LETTER BA;Lo;0;L;;;;;N;;;;; -0B2D;ORIYA LETTER BHA;Lo;0;L;;;;;N;;;;; -0B2E;ORIYA LETTER MA;Lo;0;L;;;;;N;;;;; -0B2F;ORIYA LETTER YA;Lo;0;L;;;;;N;;;;; -0B30;ORIYA LETTER RA;Lo;0;L;;;;;N;;;;; -0B32;ORIYA LETTER LA;Lo;0;L;;;;;N;;;;; -0B33;ORIYA LETTER LLA;Lo;0;L;;;;;N;;;;; -0B36;ORIYA LETTER SHA;Lo;0;L;;;;;N;;;;; -0B37;ORIYA LETTER SSA;Lo;0;L;;;;;N;;;;; -0B38;ORIYA LETTER SA;Lo;0;L;;;;;N;;;;; -0B39;ORIYA LETTER HA;Lo;0;L;;;;;N;;;;; -0B3C;ORIYA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; -0B3D;ORIYA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; -0B3E;ORIYA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0B3F;ORIYA VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -0B40;ORIYA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -0B41;ORIYA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -0B42;ORIYA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -0B43;ORIYA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; -0B47;ORIYA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -0B48;ORIYA VOWEL SIGN AI;Mc;0;L;0B47 0B56;;;;N;;;;; -0B4B;ORIYA VOWEL SIGN O;Mc;0;L;0B47 0B3E;;;;N;;;;; -0B4C;ORIYA VOWEL SIGN AU;Mc;0;L;0B47 0B57;;;;N;;;;; -0B4D;ORIYA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0B56;ORIYA AI LENGTH MARK;Mn;0;NSM;;;;;N;;;;; -0B57;ORIYA AU LENGTH MARK;Mc;0;L;;;;;N;;;;; -0B5C;ORIYA LETTER RRA;Lo;0;L;0B21 0B3C;;;;N;;;;; -0B5D;ORIYA LETTER RHA;Lo;0;L;0B22 0B3C;;;;N;;;;; -0B5F;ORIYA LETTER YYA;Lo;0;L;;;;;N;;;;; -0B60;ORIYA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0B61;ORIYA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -0B66;ORIYA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0B67;ORIYA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0B68;ORIYA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0B69;ORIYA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0B6A;ORIYA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0B6B;ORIYA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0B6C;ORIYA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0B6D;ORIYA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0B6E;ORIYA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0B6F;ORIYA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0B70;ORIYA ISSHAR;So;0;L;;;;;N;;;;; -0B82;TAMIL SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; -0B83;TAMIL SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0B85;TAMIL LETTER A;Lo;0;L;;;;;N;;;;; -0B86;TAMIL LETTER AA;Lo;0;L;;;;;N;;;;; -0B87;TAMIL LETTER I;Lo;0;L;;;;;N;;;;; -0B88;TAMIL LETTER II;Lo;0;L;;;;;N;;;;; -0B89;TAMIL LETTER U;Lo;0;L;;;;;N;;;;; -0B8A;TAMIL LETTER UU;Lo;0;L;;;;;N;;;;; -0B8E;TAMIL LETTER E;Lo;0;L;;;;;N;;;;; -0B8F;TAMIL LETTER EE;Lo;0;L;;;;;N;;;;; -0B90;TAMIL LETTER AI;Lo;0;L;;;;;N;;;;; -0B92;TAMIL LETTER O;Lo;0;L;;;;;N;;;;; -0B93;TAMIL LETTER OO;Lo;0;L;;;;;N;;;;; -0B94;TAMIL LETTER AU;Lo;0;L;0B92 0BD7;;;;N;;;;; -0B95;TAMIL LETTER KA;Lo;0;L;;;;;N;;;;; -0B99;TAMIL LETTER NGA;Lo;0;L;;;;;N;;;;; -0B9A;TAMIL LETTER CA;Lo;0;L;;;;;N;;;;; -0B9C;TAMIL LETTER JA;Lo;0;L;;;;;N;;;;; -0B9E;TAMIL LETTER NYA;Lo;0;L;;;;;N;;;;; -0B9F;TAMIL LETTER TTA;Lo;0;L;;;;;N;;;;; -0BA3;TAMIL LETTER NNA;Lo;0;L;;;;;N;;;;; -0BA4;TAMIL LETTER TA;Lo;0;L;;;;;N;;;;; -0BA8;TAMIL LETTER NA;Lo;0;L;;;;;N;;;;; -0BA9;TAMIL LETTER NNNA;Lo;0;L;;;;;N;;;;; -0BAA;TAMIL LETTER PA;Lo;0;L;;;;;N;;;;; -0BAE;TAMIL LETTER MA;Lo;0;L;;;;;N;;;;; -0BAF;TAMIL LETTER YA;Lo;0;L;;;;;N;;;;; -0BB0;TAMIL LETTER RA;Lo;0;L;;;;;N;;;;; -0BB1;TAMIL LETTER RRA;Lo;0;L;;;;;N;;;;; -0BB2;TAMIL LETTER LA;Lo;0;L;;;;;N;;;;; -0BB3;TAMIL LETTER LLA;Lo;0;L;;;;;N;;;;; -0BB4;TAMIL LETTER LLLA;Lo;0;L;;;;;N;;;;; -0BB5;TAMIL LETTER VA;Lo;0;L;;;;;N;;;;; -0BB7;TAMIL LETTER SSA;Lo;0;L;;;;;N;;;;; -0BB8;TAMIL LETTER SA;Lo;0;L;;;;;N;;;;; -0BB9;TAMIL LETTER HA;Lo;0;L;;;;;N;;;;; -0BBE;TAMIL VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0BBF;TAMIL VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -0BC0;TAMIL VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; -0BC1;TAMIL VOWEL SIGN U;Mc;0;L;;;;;N;;;;; -0BC2;TAMIL VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; -0BC6;TAMIL VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -0BC7;TAMIL VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; -0BC8;TAMIL VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; -0BCA;TAMIL VOWEL SIGN O;Mc;0;L;0BC6 0BBE;;;;N;;;;; -0BCB;TAMIL VOWEL SIGN OO;Mc;0;L;0BC7 0BBE;;;;N;;;;; -0BCC;TAMIL VOWEL SIGN AU;Mc;0;L;0BC6 0BD7;;;;N;;;;; -0BCD;TAMIL SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0BD7;TAMIL AU LENGTH MARK;Mc;0;L;;;;;N;;;;; -0BE7;TAMIL DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0BE8;TAMIL DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0BE9;TAMIL DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0BEA;TAMIL DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0BEB;TAMIL DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0BEC;TAMIL DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0BED;TAMIL DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0BEE;TAMIL DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0BEF;TAMIL DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0BF0;TAMIL NUMBER TEN;No;0;L;;;;10;N;;;;; -0BF1;TAMIL NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;; -0BF2;TAMIL NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;; -0C01;TELUGU SIGN CANDRABINDU;Mc;0;L;;;;;N;;;;; -0C02;TELUGU SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; -0C03;TELUGU SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0C05;TELUGU LETTER A;Lo;0;L;;;;;N;;;;; -0C06;TELUGU LETTER AA;Lo;0;L;;;;;N;;;;; -0C07;TELUGU LETTER I;Lo;0;L;;;;;N;;;;; -0C08;TELUGU LETTER II;Lo;0;L;;;;;N;;;;; -0C09;TELUGU LETTER U;Lo;0;L;;;;;N;;;;; -0C0A;TELUGU LETTER UU;Lo;0;L;;;;;N;;;;; -0C0B;TELUGU LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -0C0C;TELUGU LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -0C0E;TELUGU LETTER E;Lo;0;L;;;;;N;;;;; -0C0F;TELUGU LETTER EE;Lo;0;L;;;;;N;;;;; -0C10;TELUGU LETTER AI;Lo;0;L;;;;;N;;;;; -0C12;TELUGU LETTER O;Lo;0;L;;;;;N;;;;; -0C13;TELUGU LETTER OO;Lo;0;L;;;;;N;;;;; -0C14;TELUGU LETTER AU;Lo;0;L;;;;;N;;;;; -0C15;TELUGU LETTER KA;Lo;0;L;;;;;N;;;;; -0C16;TELUGU LETTER KHA;Lo;0;L;;;;;N;;;;; -0C17;TELUGU LETTER GA;Lo;0;L;;;;;N;;;;; -0C18;TELUGU LETTER GHA;Lo;0;L;;;;;N;;;;; -0C19;TELUGU LETTER NGA;Lo;0;L;;;;;N;;;;; -0C1A;TELUGU LETTER CA;Lo;0;L;;;;;N;;;;; -0C1B;TELUGU LETTER CHA;Lo;0;L;;;;;N;;;;; -0C1C;TELUGU LETTER JA;Lo;0;L;;;;;N;;;;; -0C1D;TELUGU LETTER JHA;Lo;0;L;;;;;N;;;;; -0C1E;TELUGU LETTER NYA;Lo;0;L;;;;;N;;;;; -0C1F;TELUGU LETTER TTA;Lo;0;L;;;;;N;;;;; -0C20;TELUGU LETTER TTHA;Lo;0;L;;;;;N;;;;; -0C21;TELUGU LETTER DDA;Lo;0;L;;;;;N;;;;; -0C22;TELUGU LETTER DDHA;Lo;0;L;;;;;N;;;;; -0C23;TELUGU LETTER NNA;Lo;0;L;;;;;N;;;;; -0C24;TELUGU LETTER TA;Lo;0;L;;;;;N;;;;; -0C25;TELUGU LETTER THA;Lo;0;L;;;;;N;;;;; -0C26;TELUGU LETTER DA;Lo;0;L;;;;;N;;;;; -0C27;TELUGU LETTER DHA;Lo;0;L;;;;;N;;;;; -0C28;TELUGU LETTER NA;Lo;0;L;;;;;N;;;;; -0C2A;TELUGU LETTER PA;Lo;0;L;;;;;N;;;;; -0C2B;TELUGU LETTER PHA;Lo;0;L;;;;;N;;;;; -0C2C;TELUGU LETTER BA;Lo;0;L;;;;;N;;;;; -0C2D;TELUGU LETTER BHA;Lo;0;L;;;;;N;;;;; -0C2E;TELUGU LETTER MA;Lo;0;L;;;;;N;;;;; -0C2F;TELUGU LETTER YA;Lo;0;L;;;;;N;;;;; -0C30;TELUGU LETTER RA;Lo;0;L;;;;;N;;;;; -0C31;TELUGU LETTER RRA;Lo;0;L;;;;;N;;;;; -0C32;TELUGU LETTER LA;Lo;0;L;;;;;N;;;;; -0C33;TELUGU LETTER LLA;Lo;0;L;;;;;N;;;;; -0C35;TELUGU LETTER VA;Lo;0;L;;;;;N;;;;; -0C36;TELUGU LETTER SHA;Lo;0;L;;;;;N;;;;; -0C37;TELUGU LETTER SSA;Lo;0;L;;;;;N;;;;; -0C38;TELUGU LETTER SA;Lo;0;L;;;;;N;;;;; -0C39;TELUGU LETTER HA;Lo;0;L;;;;;N;;;;; -0C3E;TELUGU VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; -0C3F;TELUGU VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -0C40;TELUGU VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; -0C41;TELUGU VOWEL SIGN U;Mc;0;L;;;;;N;;;;; -0C42;TELUGU VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; -0C43;TELUGU VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; -0C44;TELUGU VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; -0C46;TELUGU VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; -0C47;TELUGU VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; -0C48;TELUGU VOWEL SIGN AI;Mn;0;NSM;0C46 0C56;;;;N;;;;; -0C4A;TELUGU VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; -0C4B;TELUGU VOWEL SIGN OO;Mn;0;NSM;;;;;N;;;;; -0C4C;TELUGU VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; -0C4D;TELUGU SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0C55;TELUGU LENGTH MARK;Mn;84;NSM;;;;;N;;;;; -0C56;TELUGU AI LENGTH MARK;Mn;91;NSM;;;;;N;;;;; -0C60;TELUGU LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0C61;TELUGU LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -0C66;TELUGU DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0C67;TELUGU DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0C68;TELUGU DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0C69;TELUGU DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0C6A;TELUGU DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0C6B;TELUGU DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0C6C;TELUGU DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0C6D;TELUGU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0C6E;TELUGU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0C6F;TELUGU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0C82;KANNADA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; -0C83;KANNADA SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0C85;KANNADA LETTER A;Lo;0;L;;;;;N;;;;; -0C86;KANNADA LETTER AA;Lo;0;L;;;;;N;;;;; -0C87;KANNADA LETTER I;Lo;0;L;;;;;N;;;;; -0C88;KANNADA LETTER II;Lo;0;L;;;;;N;;;;; -0C89;KANNADA LETTER U;Lo;0;L;;;;;N;;;;; -0C8A;KANNADA LETTER UU;Lo;0;L;;;;;N;;;;; -0C8B;KANNADA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -0C8C;KANNADA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -0C8E;KANNADA LETTER E;Lo;0;L;;;;;N;;;;; -0C8F;KANNADA LETTER EE;Lo;0;L;;;;;N;;;;; -0C90;KANNADA LETTER AI;Lo;0;L;;;;;N;;;;; -0C92;KANNADA LETTER O;Lo;0;L;;;;;N;;;;; -0C93;KANNADA LETTER OO;Lo;0;L;;;;;N;;;;; -0C94;KANNADA LETTER AU;Lo;0;L;;;;;N;;;;; -0C95;KANNADA LETTER KA;Lo;0;L;;;;;N;;;;; -0C96;KANNADA LETTER KHA;Lo;0;L;;;;;N;;;;; -0C97;KANNADA LETTER GA;Lo;0;L;;;;;N;;;;; -0C98;KANNADA LETTER GHA;Lo;0;L;;;;;N;;;;; -0C99;KANNADA LETTER NGA;Lo;0;L;;;;;N;;;;; -0C9A;KANNADA LETTER CA;Lo;0;L;;;;;N;;;;; -0C9B;KANNADA LETTER CHA;Lo;0;L;;;;;N;;;;; -0C9C;KANNADA LETTER JA;Lo;0;L;;;;;N;;;;; -0C9D;KANNADA LETTER JHA;Lo;0;L;;;;;N;;;;; -0C9E;KANNADA LETTER NYA;Lo;0;L;;;;;N;;;;; -0C9F;KANNADA LETTER TTA;Lo;0;L;;;;;N;;;;; -0CA0;KANNADA LETTER TTHA;Lo;0;L;;;;;N;;;;; -0CA1;KANNADA LETTER DDA;Lo;0;L;;;;;N;;;;; -0CA2;KANNADA LETTER DDHA;Lo;0;L;;;;;N;;;;; -0CA3;KANNADA LETTER NNA;Lo;0;L;;;;;N;;;;; -0CA4;KANNADA LETTER TA;Lo;0;L;;;;;N;;;;; -0CA5;KANNADA LETTER THA;Lo;0;L;;;;;N;;;;; -0CA6;KANNADA LETTER DA;Lo;0;L;;;;;N;;;;; -0CA7;KANNADA LETTER DHA;Lo;0;L;;;;;N;;;;; -0CA8;KANNADA LETTER NA;Lo;0;L;;;;;N;;;;; -0CAA;KANNADA LETTER PA;Lo;0;L;;;;;N;;;;; -0CAB;KANNADA LETTER PHA;Lo;0;L;;;;;N;;;;; -0CAC;KANNADA LETTER BA;Lo;0;L;;;;;N;;;;; -0CAD;KANNADA LETTER BHA;Lo;0;L;;;;;N;;;;; -0CAE;KANNADA LETTER MA;Lo;0;L;;;;;N;;;;; -0CAF;KANNADA LETTER YA;Lo;0;L;;;;;N;;;;; -0CB0;KANNADA LETTER RA;Lo;0;L;;;;;N;;;;; -0CB1;KANNADA LETTER RRA;Lo;0;L;;;;;N;;;;; -0CB2;KANNADA LETTER LA;Lo;0;L;;;;;N;;;;; -0CB3;KANNADA LETTER LLA;Lo;0;L;;;;;N;;;;; -0CB5;KANNADA LETTER VA;Lo;0;L;;;;;N;;;;; -0CB6;KANNADA LETTER SHA;Lo;0;L;;;;;N;;;;; -0CB7;KANNADA LETTER SSA;Lo;0;L;;;;;N;;;;; -0CB8;KANNADA LETTER SA;Lo;0;L;;;;;N;;;;; -0CB9;KANNADA LETTER HA;Lo;0;L;;;;;N;;;;; -0CBE;KANNADA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0CBF;KANNADA VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -0CC0;KANNADA VOWEL SIGN II;Mc;0;L;0CBF 0CD5;;;;N;;;;; -0CC1;KANNADA VOWEL SIGN U;Mc;0;L;;;;;N;;;;; -0CC2;KANNADA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; -0CC3;KANNADA VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; -0CC4;KANNADA VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; -0CC6;KANNADA VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; -0CC7;KANNADA VOWEL SIGN EE;Mc;0;L;0CC6 0CD5;;;;N;;;;; -0CC8;KANNADA VOWEL SIGN AI;Mc;0;L;0CC6 0CD6;;;;N;;;;; -0CCA;KANNADA VOWEL SIGN O;Mc;0;L;0CC6 0CC2;;;;N;;;;; -0CCB;KANNADA VOWEL SIGN OO;Mc;0;L;0CCA 0CD5;;;;N;;;;; -0CCC;KANNADA VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; -0CCD;KANNADA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0CD5;KANNADA LENGTH MARK;Mc;0;L;;;;;N;;;;; -0CD6;KANNADA AI LENGTH MARK;Mc;0;L;;;;;N;;;;; -0CDE;KANNADA LETTER FA;Lo;0;L;;;;;N;;;;; -0CE0;KANNADA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0CE1;KANNADA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -0CE6;KANNADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0CE7;KANNADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0CE8;KANNADA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0CE9;KANNADA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0CEA;KANNADA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0CEB;KANNADA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0CEC;KANNADA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0CED;KANNADA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0CEE;KANNADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0CEF;KANNADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; -0D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;; -0D05;MALAYALAM LETTER A;Lo;0;L;;;;;N;;;;; -0D06;MALAYALAM LETTER AA;Lo;0;L;;;;;N;;;;; -0D07;MALAYALAM LETTER I;Lo;0;L;;;;;N;;;;; -0D08;MALAYALAM LETTER II;Lo;0;L;;;;;N;;;;; -0D09;MALAYALAM LETTER U;Lo;0;L;;;;;N;;;;; -0D0A;MALAYALAM LETTER UU;Lo;0;L;;;;;N;;;;; -0D0B;MALAYALAM LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -0D0C;MALAYALAM LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -0D0E;MALAYALAM LETTER E;Lo;0;L;;;;;N;;;;; -0D0F;MALAYALAM LETTER EE;Lo;0;L;;;;;N;;;;; -0D10;MALAYALAM LETTER AI;Lo;0;L;;;;;N;;;;; -0D12;MALAYALAM LETTER O;Lo;0;L;;;;;N;;;;; -0D13;MALAYALAM LETTER OO;Lo;0;L;;;;;N;;;;; -0D14;MALAYALAM LETTER AU;Lo;0;L;;;;;N;;;;; -0D15;MALAYALAM LETTER KA;Lo;0;L;;;;;N;;;;; -0D16;MALAYALAM LETTER KHA;Lo;0;L;;;;;N;;;;; -0D17;MALAYALAM LETTER GA;Lo;0;L;;;;;N;;;;; -0D18;MALAYALAM LETTER GHA;Lo;0;L;;;;;N;;;;; -0D19;MALAYALAM LETTER NGA;Lo;0;L;;;;;N;;;;; -0D1A;MALAYALAM LETTER CA;Lo;0;L;;;;;N;;;;; -0D1B;MALAYALAM LETTER CHA;Lo;0;L;;;;;N;;;;; -0D1C;MALAYALAM LETTER JA;Lo;0;L;;;;;N;;;;; -0D1D;MALAYALAM LETTER JHA;Lo;0;L;;;;;N;;;;; -0D1E;MALAYALAM LETTER NYA;Lo;0;L;;;;;N;;;;; -0D1F;MALAYALAM LETTER TTA;Lo;0;L;;;;;N;;;;; -0D20;MALAYALAM LETTER TTHA;Lo;0;L;;;;;N;;;;; -0D21;MALAYALAM LETTER DDA;Lo;0;L;;;;;N;;;;; -0D22;MALAYALAM LETTER DDHA;Lo;0;L;;;;;N;;;;; -0D23;MALAYALAM LETTER NNA;Lo;0;L;;;;;N;;;;; -0D24;MALAYALAM LETTER TA;Lo;0;L;;;;;N;;;;; -0D25;MALAYALAM LETTER THA;Lo;0;L;;;;;N;;;;; -0D26;MALAYALAM LETTER DA;Lo;0;L;;;;;N;;;;; -0D27;MALAYALAM LETTER DHA;Lo;0;L;;;;;N;;;;; -0D28;MALAYALAM LETTER NA;Lo;0;L;;;;;N;;;;; -0D2A;MALAYALAM LETTER PA;Lo;0;L;;;;;N;;;;; -0D2B;MALAYALAM LETTER PHA;Lo;0;L;;;;;N;;;;; -0D2C;MALAYALAM LETTER BA;Lo;0;L;;;;;N;;;;; -0D2D;MALAYALAM LETTER BHA;Lo;0;L;;;;;N;;;;; -0D2E;MALAYALAM LETTER MA;Lo;0;L;;;;;N;;;;; -0D2F;MALAYALAM LETTER YA;Lo;0;L;;;;;N;;;;; -0D30;MALAYALAM LETTER RA;Lo;0;L;;;;;N;;;;; -0D31;MALAYALAM LETTER RRA;Lo;0;L;;;;;N;;;;; -0D32;MALAYALAM LETTER LA;Lo;0;L;;;;;N;;;;; -0D33;MALAYALAM LETTER LLA;Lo;0;L;;;;;N;;;;; -0D34;MALAYALAM LETTER LLLA;Lo;0;L;;;;;N;;;;; -0D35;MALAYALAM LETTER VA;Lo;0;L;;;;;N;;;;; -0D36;MALAYALAM LETTER SHA;Lo;0;L;;;;;N;;;;; -0D37;MALAYALAM LETTER SSA;Lo;0;L;;;;;N;;;;; -0D38;MALAYALAM LETTER SA;Lo;0;L;;;;;N;;;;; -0D39;MALAYALAM LETTER HA;Lo;0;L;;;;;N;;;;; -0D3E;MALAYALAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -0D3F;MALAYALAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;; -0D40;MALAYALAM VOWEL SIGN II;Mc;0;L;;;;;N;;;;; -0D41;MALAYALAM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -0D42;MALAYALAM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -0D43;MALAYALAM VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; -0D46;MALAYALAM VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -0D47;MALAYALAM VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; -0D48;MALAYALAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; -0D4A;MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; -0D4B;MALAYALAM VOWEL SIGN OO;Mc;0;L;0D47 0D3E;;;;N;;;;; -0D4C;MALAYALAM VOWEL SIGN AU;Mc;0;L;0D46 0D57;;;;N;;;;; -0D4D;MALAYALAM SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -0D57;MALAYALAM AU LENGTH MARK;Mc;0;L;;;;;N;;;;; -0D60;MALAYALAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -0D61;MALAYALAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -0D66;MALAYALAM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0D67;MALAYALAM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0D68;MALAYALAM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0D69;MALAYALAM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0D6A;MALAYALAM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0D6B;MALAYALAM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0D6C;MALAYALAM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0D6D;MALAYALAM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0D6E;MALAYALAM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0D6F;MALAYALAM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0D82;SINHALA SIGN ANUSVARAYA;Mc;0;L;;;;;N;;;;; -0D83;SINHALA SIGN VISARGAYA;Mc;0;L;;;;;N;;;;; -0D85;SINHALA LETTER AYANNA;Lo;0;L;;;;;N;;;;; -0D86;SINHALA LETTER AAYANNA;Lo;0;L;;;;;N;;;;; -0D87;SINHALA LETTER AEYANNA;Lo;0;L;;;;;N;;;;; -0D88;SINHALA LETTER AEEYANNA;Lo;0;L;;;;;N;;;;; -0D89;SINHALA LETTER IYANNA;Lo;0;L;;;;;N;;;;; -0D8A;SINHALA LETTER IIYANNA;Lo;0;L;;;;;N;;;;; -0D8B;SINHALA LETTER UYANNA;Lo;0;L;;;;;N;;;;; -0D8C;SINHALA LETTER UUYANNA;Lo;0;L;;;;;N;;;;; -0D8D;SINHALA LETTER IRUYANNA;Lo;0;L;;;;;N;;;;; -0D8E;SINHALA LETTER IRUUYANNA;Lo;0;L;;;;;N;;;;; -0D8F;SINHALA LETTER ILUYANNA;Lo;0;L;;;;;N;;;;; -0D90;SINHALA LETTER ILUUYANNA;Lo;0;L;;;;;N;;;;; -0D91;SINHALA LETTER EYANNA;Lo;0;L;;;;;N;;;;; -0D92;SINHALA LETTER EEYANNA;Lo;0;L;;;;;N;;;;; -0D93;SINHALA LETTER AIYANNA;Lo;0;L;;;;;N;;;;; -0D94;SINHALA LETTER OYANNA;Lo;0;L;;;;;N;;;;; -0D95;SINHALA LETTER OOYANNA;Lo;0;L;;;;;N;;;;; -0D96;SINHALA LETTER AUYANNA;Lo;0;L;;;;;N;;;;; -0D9A;SINHALA LETTER ALPAPRAANA KAYANNA;Lo;0;L;;;;;N;;;;; -0D9B;SINHALA LETTER MAHAAPRAANA KAYANNA;Lo;0;L;;;;;N;;;;; -0D9C;SINHALA LETTER ALPAPRAANA GAYANNA;Lo;0;L;;;;;N;;;;; -0D9D;SINHALA LETTER MAHAAPRAANA GAYANNA;Lo;0;L;;;;;N;;;;; -0D9E;SINHALA LETTER KANTAJA NAASIKYAYA;Lo;0;L;;;;;N;;;;; -0D9F;SINHALA LETTER SANYAKA GAYANNA;Lo;0;L;;;;;N;;;;; -0DA0;SINHALA LETTER ALPAPRAANA CAYANNA;Lo;0;L;;;;;N;;;;; -0DA1;SINHALA LETTER MAHAAPRAANA CAYANNA;Lo;0;L;;;;;N;;;;; -0DA2;SINHALA LETTER ALPAPRAANA JAYANNA;Lo;0;L;;;;;N;;;;; -0DA3;SINHALA LETTER MAHAAPRAANA JAYANNA;Lo;0;L;;;;;N;;;;; -0DA4;SINHALA LETTER TAALUJA NAASIKYAYA;Lo;0;L;;;;;N;;;;; -0DA5;SINHALA LETTER TAALUJA SANYOOGA NAAKSIKYAYA;Lo;0;L;;;;;N;;;;; -0DA6;SINHALA LETTER SANYAKA JAYANNA;Lo;0;L;;;;;N;;;;; -0DA7;SINHALA LETTER ALPAPRAANA TTAYANNA;Lo;0;L;;;;;N;;;;; -0DA8;SINHALA LETTER MAHAAPRAANA TTAYANNA;Lo;0;L;;;;;N;;;;; -0DA9;SINHALA LETTER ALPAPRAANA DDAYANNA;Lo;0;L;;;;;N;;;;; -0DAA;SINHALA LETTER MAHAAPRAANA DDAYANNA;Lo;0;L;;;;;N;;;;; -0DAB;SINHALA LETTER MUURDHAJA NAYANNA;Lo;0;L;;;;;N;;;;; -0DAC;SINHALA LETTER SANYAKA DDAYANNA;Lo;0;L;;;;;N;;;;; -0DAD;SINHALA LETTER ALPAPRAANA TAYANNA;Lo;0;L;;;;;N;;;;; -0DAE;SINHALA LETTER MAHAAPRAANA TAYANNA;Lo;0;L;;;;;N;;;;; -0DAF;SINHALA LETTER ALPAPRAANA DAYANNA;Lo;0;L;;;;;N;;;;; -0DB0;SINHALA LETTER MAHAAPRAANA DAYANNA;Lo;0;L;;;;;N;;;;; -0DB1;SINHALA LETTER DANTAJA NAYANNA;Lo;0;L;;;;;N;;;;; -0DB3;SINHALA LETTER SANYAKA DAYANNA;Lo;0;L;;;;;N;;;;; -0DB4;SINHALA LETTER ALPAPRAANA PAYANNA;Lo;0;L;;;;;N;;;;; -0DB5;SINHALA LETTER MAHAAPRAANA PAYANNA;Lo;0;L;;;;;N;;;;; -0DB6;SINHALA LETTER ALPAPRAANA BAYANNA;Lo;0;L;;;;;N;;;;; -0DB7;SINHALA LETTER MAHAAPRAANA BAYANNA;Lo;0;L;;;;;N;;;;; -0DB8;SINHALA LETTER MAYANNA;Lo;0;L;;;;;N;;;;; -0DB9;SINHALA LETTER AMBA BAYANNA;Lo;0;L;;;;;N;;;;; -0DBA;SINHALA LETTER YAYANNA;Lo;0;L;;;;;N;;;;; -0DBB;SINHALA LETTER RAYANNA;Lo;0;L;;;;;N;;;;; -0DBD;SINHALA LETTER DANTAJA LAYANNA;Lo;0;L;;;;;N;;;;; -0DC0;SINHALA LETTER VAYANNA;Lo;0;L;;;;;N;;;;; -0DC1;SINHALA LETTER TAALUJA SAYANNA;Lo;0;L;;;;;N;;;;; -0DC2;SINHALA LETTER MUURDHAJA SAYANNA;Lo;0;L;;;;;N;;;;; -0DC3;SINHALA LETTER DANTAJA SAYANNA;Lo;0;L;;;;;N;;;;; -0DC4;SINHALA LETTER HAYANNA;Lo;0;L;;;;;N;;;;; -0DC5;SINHALA LETTER MUURDHAJA LAYANNA;Lo;0;L;;;;;N;;;;; -0DC6;SINHALA LETTER FAYANNA;Lo;0;L;;;;;N;;;;; -0DCA;SINHALA SIGN AL-LAKUNA;Mn;9;NSM;;;;;N;;;;; -0DCF;SINHALA VOWEL SIGN AELA-PILLA;Mc;0;L;;;;;N;;;;; -0DD0;SINHALA VOWEL SIGN KETTI AEDA-PILLA;Mc;0;L;;;;;N;;;;; -0DD1;SINHALA VOWEL SIGN DIGA AEDA-PILLA;Mc;0;L;;;;;N;;;;; -0DD2;SINHALA VOWEL SIGN KETTI IS-PILLA;Mn;0;NSM;;;;;N;;;;; -0DD3;SINHALA VOWEL SIGN DIGA IS-PILLA;Mn;0;NSM;;;;;N;;;;; -0DD4;SINHALA VOWEL SIGN KETTI PAA-PILLA;Mn;0;NSM;;;;;N;;;;; -0DD6;SINHALA VOWEL SIGN DIGA PAA-PILLA;Mn;0;NSM;;;;;N;;;;; -0DD8;SINHALA VOWEL SIGN GAETTA-PILLA;Mc;0;L;;;;;N;;;;; -0DD9;SINHALA VOWEL SIGN KOMBUVA;Mc;0;L;;;;;N;;;;; -0DDA;SINHALA VOWEL SIGN DIGA KOMBUVA;Mc;0;L;0DD9 0DCA;;;;N;;;;; -0DDB;SINHALA VOWEL SIGN KOMBU DEKA;Mc;0;L;;;;;N;;;;; -0DDC;SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA;Mc;0;L;0DD9 0DCF;;;;N;;;;; -0DDD;SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA;Mc;0;L;0DDC 0DCA;;;;N;;;;; -0DDE;SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA;Mc;0;L;0DD9 0DDF;;;;N;;;;; -0DDF;SINHALA VOWEL SIGN GAYANUKITTA;Mc;0;L;;;;;N;;;;; -0DF2;SINHALA VOWEL SIGN DIGA GAETTA-PILLA;Mc;0;L;;;;;N;;;;; -0DF3;SINHALA VOWEL SIGN DIGA GAYANUKITTA;Mc;0;L;;;;;N;;;;; -0DF4;SINHALA PUNCTUATION KUNDDALIYA;Po;0;L;;;;;N;;;;; -0E01;THAI CHARACTER KO KAI;Lo;0;L;;;;;N;THAI LETTER KO KAI;;;; -0E02;THAI CHARACTER KHO KHAI;Lo;0;L;;;;;N;THAI LETTER KHO KHAI;;;; -0E03;THAI CHARACTER KHO KHUAT;Lo;0;L;;;;;N;THAI LETTER KHO KHUAT;;;; -0E04;THAI CHARACTER KHO KHWAI;Lo;0;L;;;;;N;THAI LETTER KHO KHWAI;;;; -0E05;THAI CHARACTER KHO KHON;Lo;0;L;;;;;N;THAI LETTER KHO KHON;;;; -0E06;THAI CHARACTER KHO RAKHANG;Lo;0;L;;;;;N;THAI LETTER KHO RAKHANG;;;; -0E07;THAI CHARACTER NGO NGU;Lo;0;L;;;;;N;THAI LETTER NGO NGU;;;; -0E08;THAI CHARACTER CHO CHAN;Lo;0;L;;;;;N;THAI LETTER CHO CHAN;;;; -0E09;THAI CHARACTER CHO CHING;Lo;0;L;;;;;N;THAI LETTER CHO CHING;;;; -0E0A;THAI CHARACTER CHO CHANG;Lo;0;L;;;;;N;THAI LETTER CHO CHANG;;;; -0E0B;THAI CHARACTER SO SO;Lo;0;L;;;;;N;THAI LETTER SO SO;;;; -0E0C;THAI CHARACTER CHO CHOE;Lo;0;L;;;;;N;THAI LETTER CHO CHOE;;;; -0E0D;THAI CHARACTER YO YING;Lo;0;L;;;;;N;THAI LETTER YO YING;;;; -0E0E;THAI CHARACTER DO CHADA;Lo;0;L;;;;;N;THAI LETTER DO CHADA;;;; -0E0F;THAI CHARACTER TO PATAK;Lo;0;L;;;;;N;THAI LETTER TO PATAK;;;; -0E10;THAI CHARACTER THO THAN;Lo;0;L;;;;;N;THAI LETTER THO THAN;;;; -0E11;THAI CHARACTER THO NANGMONTHO;Lo;0;L;;;;;N;THAI LETTER THO NANGMONTHO;;;; -0E12;THAI CHARACTER THO PHUTHAO;Lo;0;L;;;;;N;THAI LETTER THO PHUTHAO;;;; -0E13;THAI CHARACTER NO NEN;Lo;0;L;;;;;N;THAI LETTER NO NEN;;;; -0E14;THAI CHARACTER DO DEK;Lo;0;L;;;;;N;THAI LETTER DO DEK;;;; -0E15;THAI CHARACTER TO TAO;Lo;0;L;;;;;N;THAI LETTER TO TAO;;;; -0E16;THAI CHARACTER THO THUNG;Lo;0;L;;;;;N;THAI LETTER THO THUNG;;;; -0E17;THAI CHARACTER THO THAHAN;Lo;0;L;;;;;N;THAI LETTER THO THAHAN;;;; -0E18;THAI CHARACTER THO THONG;Lo;0;L;;;;;N;THAI LETTER THO THONG;;;; -0E19;THAI CHARACTER NO NU;Lo;0;L;;;;;N;THAI LETTER NO NU;;;; -0E1A;THAI CHARACTER BO BAIMAI;Lo;0;L;;;;;N;THAI LETTER BO BAIMAI;;;; -0E1B;THAI CHARACTER PO PLA;Lo;0;L;;;;;N;THAI LETTER PO PLA;;;; -0E1C;THAI CHARACTER PHO PHUNG;Lo;0;L;;;;;N;THAI LETTER PHO PHUNG;;;; -0E1D;THAI CHARACTER FO FA;Lo;0;L;;;;;N;THAI LETTER FO FA;;;; -0E1E;THAI CHARACTER PHO PHAN;Lo;0;L;;;;;N;THAI LETTER PHO PHAN;;;; -0E1F;THAI CHARACTER FO FAN;Lo;0;L;;;;;N;THAI LETTER FO FAN;;;; -0E20;THAI CHARACTER PHO SAMPHAO;Lo;0;L;;;;;N;THAI LETTER PHO SAMPHAO;;;; -0E21;THAI CHARACTER MO MA;Lo;0;L;;;;;N;THAI LETTER MO MA;;;; -0E22;THAI CHARACTER YO YAK;Lo;0;L;;;;;N;THAI LETTER YO YAK;;;; -0E23;THAI CHARACTER RO RUA;Lo;0;L;;;;;N;THAI LETTER RO RUA;;;; -0E24;THAI CHARACTER RU;Lo;0;L;;;;;N;THAI LETTER RU;;;; -0E25;THAI CHARACTER LO LING;Lo;0;L;;;;;N;THAI LETTER LO LING;;;; -0E26;THAI CHARACTER LU;Lo;0;L;;;;;N;THAI LETTER LU;;;; -0E27;THAI CHARACTER WO WAEN;Lo;0;L;;;;;N;THAI LETTER WO WAEN;;;; -0E28;THAI CHARACTER SO SALA;Lo;0;L;;;;;N;THAI LETTER SO SALA;;;; -0E29;THAI CHARACTER SO RUSI;Lo;0;L;;;;;N;THAI LETTER SO RUSI;;;; -0E2A;THAI CHARACTER SO SUA;Lo;0;L;;;;;N;THAI LETTER SO SUA;;;; -0E2B;THAI CHARACTER HO HIP;Lo;0;L;;;;;N;THAI LETTER HO HIP;;;; -0E2C;THAI CHARACTER LO CHULA;Lo;0;L;;;;;N;THAI LETTER LO CHULA;;;; -0E2D;THAI CHARACTER O ANG;Lo;0;L;;;;;N;THAI LETTER O ANG;;;; -0E2E;THAI CHARACTER HO NOKHUK;Lo;0;L;;;;;N;THAI LETTER HO NOK HUK;;;; -0E2F;THAI CHARACTER PAIYANNOI;Lo;0;L;;;;;N;THAI PAI YAN NOI;paiyan noi;;; -0E30;THAI CHARACTER SARA A;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA A;;;; -0E31;THAI CHARACTER MAI HAN-AKAT;Mn;0;NSM;;;;;N;THAI VOWEL SIGN MAI HAN-AKAT;;;; -0E32;THAI CHARACTER SARA AA;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AA;;;; -0E33;THAI CHARACTER SARA AM;Lo;0;L;<compat> 0E4D 0E32;;;;N;THAI VOWEL SIGN SARA AM;;;; -0E34;THAI CHARACTER SARA I;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA I;;;; -0E35;THAI CHARACTER SARA II;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA II;;;; -0E36;THAI CHARACTER SARA UE;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA UE;;;; -0E37;THAI CHARACTER SARA UEE;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA UEE;sara uue;;; -0E38;THAI CHARACTER SARA U;Mn;103;NSM;;;;;N;THAI VOWEL SIGN SARA U;;;; -0E39;THAI CHARACTER SARA UU;Mn;103;NSM;;;;;N;THAI VOWEL SIGN SARA UU;;;; -0E3A;THAI CHARACTER PHINTHU;Mn;9;NSM;;;;;N;THAI VOWEL SIGN PHINTHU;;;; -0E3F;THAI CURRENCY SYMBOL BAHT;Sc;0;ET;;;;;N;THAI BAHT SIGN;;;; -0E40;THAI CHARACTER SARA E;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA E;;;; -0E41;THAI CHARACTER SARA AE;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AE;;;; -0E42;THAI CHARACTER SARA O;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA O;;;; -0E43;THAI CHARACTER SARA AI MAIMUAN;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MUAN;sara ai mai muan;;; -0E44;THAI CHARACTER SARA AI MAIMALAI;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MALAI;sara ai mai malai;;; -0E45;THAI CHARACTER LAKKHANGYAO;Lo;0;L;;;;;N;THAI LAK KHANG YAO;lakkhang yao;;; -0E46;THAI CHARACTER MAIYAMOK;Lm;0;L;;;;;N;THAI MAI YAMOK;mai yamok;;; -0E47;THAI CHARACTER MAITAIKHU;Mn;0;NSM;;;;;N;THAI VOWEL SIGN MAI TAI KHU;mai taikhu;;; -0E48;THAI CHARACTER MAI EK;Mn;107;NSM;;;;;N;THAI TONE MAI EK;;;; -0E49;THAI CHARACTER MAI THO;Mn;107;NSM;;;;;N;THAI TONE MAI THO;;;; -0E4A;THAI CHARACTER MAI TRI;Mn;107;NSM;;;;;N;THAI TONE MAI TRI;;;; -0E4B;THAI CHARACTER MAI CHATTAWA;Mn;107;NSM;;;;;N;THAI TONE MAI CHATTAWA;;;; -0E4C;THAI CHARACTER THANTHAKHAT;Mn;0;NSM;;;;;N;THAI THANTHAKHAT;;;; -0E4D;THAI CHARACTER NIKHAHIT;Mn;0;NSM;;;;;N;THAI NIKKHAHIT;nikkhahit;;; -0E4E;THAI CHARACTER YAMAKKAN;Mn;0;NSM;;;;;N;THAI YAMAKKAN;;;; -0E4F;THAI CHARACTER FONGMAN;Po;0;L;;;;;N;THAI FONGMAN;;;; -0E50;THAI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0E51;THAI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0E52;THAI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0E53;THAI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0E54;THAI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0E55;THAI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0E56;THAI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0E57;THAI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0E58;THAI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0E59;THAI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0E5A;THAI CHARACTER ANGKHANKHU;Po;0;L;;;;;N;THAI ANGKHANKHU;;;; -0E5B;THAI CHARACTER KHOMUT;Po;0;L;;;;;N;THAI KHOMUT;;;; -0E81;LAO LETTER KO;Lo;0;L;;;;;N;;;;; -0E82;LAO LETTER KHO SUNG;Lo;0;L;;;;;N;;;;; -0E84;LAO LETTER KHO TAM;Lo;0;L;;;;;N;;;;; -0E87;LAO LETTER NGO;Lo;0;L;;;;;N;;;;; -0E88;LAO LETTER CO;Lo;0;L;;;;;N;;;;; -0E8A;LAO LETTER SO TAM;Lo;0;L;;;;;N;;;;; -0E8D;LAO LETTER NYO;Lo;0;L;;;;;N;;;;; -0E94;LAO LETTER DO;Lo;0;L;;;;;N;;;;; -0E95;LAO LETTER TO;Lo;0;L;;;;;N;;;;; -0E96;LAO LETTER THO SUNG;Lo;0;L;;;;;N;;;;; -0E97;LAO LETTER THO TAM;Lo;0;L;;;;;N;;;;; -0E99;LAO LETTER NO;Lo;0;L;;;;;N;;;;; -0E9A;LAO LETTER BO;Lo;0;L;;;;;N;;;;; -0E9B;LAO LETTER PO;Lo;0;L;;;;;N;;;;; -0E9C;LAO LETTER PHO SUNG;Lo;0;L;;;;;N;;;;; -0E9D;LAO LETTER FO TAM;Lo;0;L;;;;;N;;;;; -0E9E;LAO LETTER PHO TAM;Lo;0;L;;;;;N;;;;; -0E9F;LAO LETTER FO SUNG;Lo;0;L;;;;;N;;;;; -0EA1;LAO LETTER MO;Lo;0;L;;;;;N;;;;; -0EA2;LAO LETTER YO;Lo;0;L;;;;;N;;;;; -0EA3;LAO LETTER LO LING;Lo;0;L;;;;;N;;;;; -0EA5;LAO LETTER LO LOOT;Lo;0;L;;;;;N;;;;; -0EA7;LAO LETTER WO;Lo;0;L;;;;;N;;;;; -0EAA;LAO LETTER SO SUNG;Lo;0;L;;;;;N;;;;; -0EAB;LAO LETTER HO SUNG;Lo;0;L;;;;;N;;;;; -0EAD;LAO LETTER O;Lo;0;L;;;;;N;;;;; -0EAE;LAO LETTER HO TAM;Lo;0;L;;;;;N;;;;; -0EAF;LAO ELLIPSIS;Lo;0;L;;;;;N;;;;; -0EB0;LAO VOWEL SIGN A;Lo;0;L;;;;;N;;;;; -0EB1;LAO VOWEL SIGN MAI KAN;Mn;0;NSM;;;;;N;;;;; -0EB2;LAO VOWEL SIGN AA;Lo;0;L;;;;;N;;;;; -0EB3;LAO VOWEL SIGN AM;Lo;0;L;<compat> 0ECD 0EB2;;;;N;;;;; -0EB4;LAO VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -0EB5;LAO VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; -0EB6;LAO VOWEL SIGN Y;Mn;0;NSM;;;;;N;;;;; -0EB7;LAO VOWEL SIGN YY;Mn;0;NSM;;;;;N;;;;; -0EB8;LAO VOWEL SIGN U;Mn;118;NSM;;;;;N;;;;; -0EB9;LAO VOWEL SIGN UU;Mn;118;NSM;;;;;N;;;;; -0EBB;LAO VOWEL SIGN MAI KON;Mn;0;NSM;;;;;N;;;;; -0EBC;LAO SEMIVOWEL SIGN LO;Mn;0;NSM;;;;;N;;;;; -0EBD;LAO SEMIVOWEL SIGN NYO;Lo;0;L;;;;;N;;;;; -0EC0;LAO VOWEL SIGN E;Lo;0;L;;;;;N;;;;; -0EC1;LAO VOWEL SIGN EI;Lo;0;L;;;;;N;;;;; -0EC2;LAO VOWEL SIGN O;Lo;0;L;;;;;N;;;;; -0EC3;LAO VOWEL SIGN AY;Lo;0;L;;;;;N;;;;; -0EC4;LAO VOWEL SIGN AI;Lo;0;L;;;;;N;;;;; -0EC6;LAO KO LA;Lm;0;L;;;;;N;;;;; -0EC8;LAO TONE MAI EK;Mn;122;NSM;;;;;N;;;;; -0EC9;LAO TONE MAI THO;Mn;122;NSM;;;;;N;;;;; -0ECA;LAO TONE MAI TI;Mn;122;NSM;;;;;N;;;;; -0ECB;LAO TONE MAI CATAWA;Mn;122;NSM;;;;;N;;;;; -0ECC;LAO CANCELLATION MARK;Mn;0;NSM;;;;;N;;;;; -0ECD;LAO NIGGAHITA;Mn;0;NSM;;;;;N;;;;; -0ED0;LAO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0ED1;LAO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0ED2;LAO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0ED3;LAO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0ED4;LAO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0ED5;LAO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0ED6;LAO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0ED7;LAO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0ED8;LAO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0ED9;LAO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0EDC;LAO HO NO;Lo;0;L;<compat> 0EAB 0E99;;;;N;;;;; -0EDD;LAO HO MO;Lo;0;L;<compat> 0EAB 0EA1;;;;N;;;;; -0F00;TIBETAN SYLLABLE OM;Lo;0;L;;;;;N;;;;; -0F01;TIBETAN MARK GTER YIG MGO TRUNCATED A;So;0;L;;;;;N;;ter yik go a thung;;; -0F02;TIBETAN MARK GTER YIG MGO -UM RNAM BCAD MA;So;0;L;;;;;N;;ter yik go wum nam chey ma;;; -0F03;TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA;So;0;L;;;;;N;;ter yik go wum ter tsek ma;;; -0F04;TIBETAN MARK INITIAL YIG MGO MDUN MA;Po;0;L;;;;;N;TIBETAN SINGLE ORNAMENT;yik go dun ma;;; -0F05;TIBETAN MARK CLOSING YIG MGO SGAB MA;Po;0;L;;;;;N;;yik go kab ma;;; -0F06;TIBETAN MARK CARET YIG MGO PHUR SHAD MA;Po;0;L;;;;;N;;yik go pur shey ma;;; -0F07;TIBETAN MARK YIG MGO TSHEG SHAD MA;Po;0;L;;;;;N;;yik go tsek shey ma;;; -0F08;TIBETAN MARK SBRUL SHAD;Po;0;L;;;;;N;TIBETAN RGYANSHAD;drul shey;;; -0F09;TIBETAN MARK BSKUR YIG MGO;Po;0;L;;;;;N;;kur yik go;;; -0F0A;TIBETAN MARK BKA- SHOG YIG MGO;Po;0;L;;;;;N;;ka sho yik go;;; -0F0B;TIBETAN MARK INTERSYLLABIC TSHEG;Po;0;L;;;;;N;TIBETAN TSEG;tsek;;; -0F0C;TIBETAN MARK DELIMITER TSHEG BSTAR;Po;0;L;<noBreak> 0F0B;;;;N;;tsek tar;;; -0F0D;TIBETAN MARK SHAD;Po;0;L;;;;;N;TIBETAN SHAD;shey;;; -0F0E;TIBETAN MARK NYIS SHAD;Po;0;L;;;;;N;TIBETAN DOUBLE SHAD;nyi shey;;; -0F0F;TIBETAN MARK TSHEG SHAD;Po;0;L;;;;;N;;tsek shey;;; -0F10;TIBETAN MARK NYIS TSHEG SHAD;Po;0;L;;;;;N;;nyi tsek shey;;; -0F11;TIBETAN MARK RIN CHEN SPUNGS SHAD;Po;0;L;;;;;N;TIBETAN RINCHANPHUNGSHAD;rinchen pung shey;;; -0F12;TIBETAN MARK RGYA GRAM SHAD;Po;0;L;;;;;N;;gya tram shey;;; -0F13;TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN;So;0;L;;;;;N;;dzu ta me long chen;;; -0F14;TIBETAN MARK GTER TSHEG;So;0;L;;;;;N;TIBETAN COMMA;ter tsek;;; -0F15;TIBETAN LOGOTYPE SIGN CHAD RTAGS;So;0;L;;;;;N;;che ta;;; -0F16;TIBETAN LOGOTYPE SIGN LHAG RTAGS;So;0;L;;;;;N;;hlak ta;;; -0F17;TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS;So;0;L;;;;;N;;trachen char ta;;; -0F18;TIBETAN ASTROLOGICAL SIGN -KHYUD PA;Mn;220;NSM;;;;;N;;kyu pa;;; -0F19;TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS;Mn;220;NSM;;;;;N;;dong tsu;;; -0F1A;TIBETAN SIGN RDEL DKAR GCIG;So;0;L;;;;;N;;deka chig;;; -0F1B;TIBETAN SIGN RDEL DKAR GNYIS;So;0;L;;;;;N;;deka nyi;;; -0F1C;TIBETAN SIGN RDEL DKAR GSUM;So;0;L;;;;;N;;deka sum;;; -0F1D;TIBETAN SIGN RDEL NAG GCIG;So;0;L;;;;;N;;dena chig;;; -0F1E;TIBETAN SIGN RDEL NAG GNYIS;So;0;L;;;;;N;;dena nyi;;; -0F1F;TIBETAN SIGN RDEL DKAR RDEL NAG;So;0;L;;;;;N;;deka dena;;; -0F20;TIBETAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -0F21;TIBETAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -0F22;TIBETAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -0F23;TIBETAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -0F24;TIBETAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -0F25;TIBETAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -0F26;TIBETAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -0F27;TIBETAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -0F28;TIBETAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -0F29;TIBETAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -0F2A;TIBETAN DIGIT HALF ONE;No;0;L;;;;1/2;N;;;;; -0F2B;TIBETAN DIGIT HALF TWO;No;0;L;;;;3/2;N;;;;; -0F2C;TIBETAN DIGIT HALF THREE;No;0;L;;;;5/2;N;;;;; -0F2D;TIBETAN DIGIT HALF FOUR;No;0;L;;;;7/2;N;;;;; -0F2E;TIBETAN DIGIT HALF FIVE;No;0;L;;;;9/2;N;;;;; -0F2F;TIBETAN DIGIT HALF SIX;No;0;L;;;;11/2;N;;;;; -0F30;TIBETAN DIGIT HALF SEVEN;No;0;L;;;;13/2;N;;;;; -0F31;TIBETAN DIGIT HALF EIGHT;No;0;L;;;;15/2;N;;;;; -0F32;TIBETAN DIGIT HALF NINE;No;0;L;;;;17/2;N;;;;; -0F33;TIBETAN DIGIT HALF ZERO;No;0;L;;;;-1/2;N;;;;; -0F34;TIBETAN MARK BSDUS RTAGS;So;0;L;;;;;N;;du ta;;; -0F35;TIBETAN MARK NGAS BZUNG NYI ZLA;Mn;220;NSM;;;;;N;TIBETAN HONORIFIC UNDER RING;nge zung nyi da;;; -0F36;TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN;So;0;L;;;;;N;;dzu ta shi mig chen;;; -0F37;TIBETAN MARK NGAS BZUNG SGOR RTAGS;Mn;220;NSM;;;;;N;TIBETAN UNDER RING;nge zung gor ta;;; -0F38;TIBETAN MARK CHE MGO;So;0;L;;;;;N;;che go;;; -0F39;TIBETAN MARK TSA -PHRU;Mn;216;NSM;;;;;N;TIBETAN LENITION MARK;tsa tru;;; -0F3A;TIBETAN MARK GUG RTAGS GYON;Ps;0;ON;;;;;N;;gug ta yun;;; -0F3B;TIBETAN MARK GUG RTAGS GYAS;Pe;0;ON;;;;;N;;gug ta ye;;; -0F3C;TIBETAN MARK ANG KHANG GYON;Ps;0;ON;;;;;N;TIBETAN LEFT BRACE;ang kang yun;;; -0F3D;TIBETAN MARK ANG KHANG GYAS;Pe;0;ON;;;;;N;TIBETAN RIGHT BRACE;ang kang ye;;; -0F3E;TIBETAN SIGN YAR TSHES;Mc;0;L;;;;;N;;yar tse;;; -0F3F;TIBETAN SIGN MAR TSHES;Mc;0;L;;;;;N;;mar tse;;; -0F40;TIBETAN LETTER KA;Lo;0;L;;;;;N;;;;; -0F41;TIBETAN LETTER KHA;Lo;0;L;;;;;N;;;;; -0F42;TIBETAN LETTER GA;Lo;0;L;;;;;N;;;;; -0F43;TIBETAN LETTER GHA;Lo;0;L;0F42 0FB7;;;;N;;;;; -0F44;TIBETAN LETTER NGA;Lo;0;L;;;;;N;;;;; -0F45;TIBETAN LETTER CA;Lo;0;L;;;;;N;;;;; -0F46;TIBETAN LETTER CHA;Lo;0;L;;;;;N;;;;; -0F47;TIBETAN LETTER JA;Lo;0;L;;;;;N;;;;; -0F49;TIBETAN LETTER NYA;Lo;0;L;;;;;N;;;;; -0F4A;TIBETAN LETTER TTA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED TA;;;; -0F4B;TIBETAN LETTER TTHA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED THA;;;; -0F4C;TIBETAN LETTER DDA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED DA;;;; -0F4D;TIBETAN LETTER DDHA;Lo;0;L;0F4C 0FB7;;;;N;;;;; -0F4E;TIBETAN LETTER NNA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED NA;;;; -0F4F;TIBETAN LETTER TA;Lo;0;L;;;;;N;;;;; -0F50;TIBETAN LETTER THA;Lo;0;L;;;;;N;;;;; -0F51;TIBETAN LETTER DA;Lo;0;L;;;;;N;;;;; -0F52;TIBETAN LETTER DHA;Lo;0;L;0F51 0FB7;;;;N;;;;; -0F53;TIBETAN LETTER NA;Lo;0;L;;;;;N;;;;; -0F54;TIBETAN LETTER PA;Lo;0;L;;;;;N;;;;; -0F55;TIBETAN LETTER PHA;Lo;0;L;;;;;N;;;;; -0F56;TIBETAN LETTER BA;Lo;0;L;;;;;N;;;;; -0F57;TIBETAN LETTER BHA;Lo;0;L;0F56 0FB7;;;;N;;;;; -0F58;TIBETAN LETTER MA;Lo;0;L;;;;;N;;;;; -0F59;TIBETAN LETTER TSA;Lo;0;L;;;;;N;;;;; -0F5A;TIBETAN LETTER TSHA;Lo;0;L;;;;;N;;;;; -0F5B;TIBETAN LETTER DZA;Lo;0;L;;;;;N;;;;; -0F5C;TIBETAN LETTER DZHA;Lo;0;L;0F5B 0FB7;;;;N;;;;; -0F5D;TIBETAN LETTER WA;Lo;0;L;;;;;N;;;;; -0F5E;TIBETAN LETTER ZHA;Lo;0;L;;;;;N;;;;; -0F5F;TIBETAN LETTER ZA;Lo;0;L;;;;;N;;;;; -0F60;TIBETAN LETTER -A;Lo;0;L;;;;;N;TIBETAN LETTER AA;;;; -0F61;TIBETAN LETTER YA;Lo;0;L;;;;;N;;;;; -0F62;TIBETAN LETTER RA;Lo;0;L;;;;;N;;*;;; -0F63;TIBETAN LETTER LA;Lo;0;L;;;;;N;;;;; -0F64;TIBETAN LETTER SHA;Lo;0;L;;;;;N;;;;; -0F65;TIBETAN LETTER SSA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED SHA;;;; -0F66;TIBETAN LETTER SA;Lo;0;L;;;;;N;;;;; -0F67;TIBETAN LETTER HA;Lo;0;L;;;;;N;;;;; -0F68;TIBETAN LETTER A;Lo;0;L;;;;;N;;;;; -0F69;TIBETAN LETTER KSSA;Lo;0;L;0F40 0FB5;;;;N;;;;; -0F6A;TIBETAN LETTER FIXED-FORM RA;Lo;0;L;;;;;N;;*;;; -0F71;TIBETAN VOWEL SIGN AA;Mn;129;NSM;;;;;N;;;;; -0F72;TIBETAN VOWEL SIGN I;Mn;130;NSM;;;;;N;;;;; -0F73;TIBETAN VOWEL SIGN II;Mn;0;NSM;0F71 0F72;;;;N;;;;; -0F74;TIBETAN VOWEL SIGN U;Mn;132;NSM;;;;;N;;;;; -0F75;TIBETAN VOWEL SIGN UU;Mn;0;NSM;0F71 0F74;;;;N;;;;; -0F76;TIBETAN VOWEL SIGN VOCALIC R;Mn;0;NSM;0FB2 0F80;;;;N;;;;; -0F77;TIBETAN VOWEL SIGN VOCALIC RR;Mn;0;NSM;<compat> 0FB2 0F81;;;;N;;;;; -0F78;TIBETAN VOWEL SIGN VOCALIC L;Mn;0;NSM;0FB3 0F80;;;;N;;;;; -0F79;TIBETAN VOWEL SIGN VOCALIC LL;Mn;0;NSM;<compat> 0FB3 0F81;;;;N;;;;; -0F7A;TIBETAN VOWEL SIGN E;Mn;130;NSM;;;;;N;;;;; -0F7B;TIBETAN VOWEL SIGN EE;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN AI;;;; -0F7C;TIBETAN VOWEL SIGN O;Mn;130;NSM;;;;;N;;;;; -0F7D;TIBETAN VOWEL SIGN OO;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN AU;;;; -0F7E;TIBETAN SIGN RJES SU NGA RO;Mn;0;NSM;;;;;N;TIBETAN ANUSVARA;je su nga ro;;; -0F7F;TIBETAN SIGN RNAM BCAD;Mc;0;L;;;;;N;TIBETAN VISARGA;nam chey;;; -0F80;TIBETAN VOWEL SIGN REVERSED I;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN SHORT I;;;; -0F81;TIBETAN VOWEL SIGN REVERSED II;Mn;0;NSM;0F71 0F80;;;;N;;;;; -0F82;TIBETAN SIGN NYI ZLA NAA DA;Mn;230;NSM;;;;;N;TIBETAN CANDRABINDU WITH ORNAMENT;nyi da na da;;; -0F83;TIBETAN SIGN SNA LDAN;Mn;230;NSM;;;;;N;TIBETAN CANDRABINDU;nan de;;; -0F84;TIBETAN MARK HALANTA;Mn;9;NSM;;;;;N;TIBETAN VIRAMA;;;; -0F85;TIBETAN MARK PALUTA;Po;0;L;;;;;N;TIBETAN CHUCHENYIGE;;;; -0F86;TIBETAN SIGN LCI RTAGS;Mn;230;NSM;;;;;N;;ji ta;;; -0F87;TIBETAN SIGN YANG RTAGS;Mn;230;NSM;;;;;N;;yang ta;;; -0F88;TIBETAN SIGN LCE TSA CAN;Lo;0;L;;;;;N;;che tsa chen;;; -0F89;TIBETAN SIGN MCHU CAN;Lo;0;L;;;;;N;;chu chen;;; -0F8A;TIBETAN SIGN GRU CAN RGYINGS;Lo;0;L;;;;;N;;tru chen ging;;; -0F8B;TIBETAN SIGN GRU MED RGYINGS;Lo;0;L;;;;;N;;tru me ging;;; -0F90;TIBETAN SUBJOINED LETTER KA;Mn;0;NSM;;;;;N;;;;; -0F91;TIBETAN SUBJOINED LETTER KHA;Mn;0;NSM;;;;;N;;;;; -0F92;TIBETAN SUBJOINED LETTER GA;Mn;0;NSM;;;;;N;;;;; -0F93;TIBETAN SUBJOINED LETTER GHA;Mn;0;NSM;0F92 0FB7;;;;N;;;;; -0F94;TIBETAN SUBJOINED LETTER NGA;Mn;0;NSM;;;;;N;;;;; -0F95;TIBETAN SUBJOINED LETTER CA;Mn;0;NSM;;;;;N;;;;; -0F96;TIBETAN SUBJOINED LETTER CHA;Mn;0;NSM;;;;;N;;;;; -0F97;TIBETAN SUBJOINED LETTER JA;Mn;0;NSM;;;;;N;;;;; -0F99;TIBETAN SUBJOINED LETTER NYA;Mn;0;NSM;;;;;N;;;;; -0F9A;TIBETAN SUBJOINED LETTER TTA;Mn;0;NSM;;;;;N;;;;; -0F9B;TIBETAN SUBJOINED LETTER TTHA;Mn;0;NSM;;;;;N;;;;; -0F9C;TIBETAN SUBJOINED LETTER DDA;Mn;0;NSM;;;;;N;;;;; -0F9D;TIBETAN SUBJOINED LETTER DDHA;Mn;0;NSM;0F9C 0FB7;;;;N;;;;; -0F9E;TIBETAN SUBJOINED LETTER NNA;Mn;0;NSM;;;;;N;;;;; -0F9F;TIBETAN SUBJOINED LETTER TA;Mn;0;NSM;;;;;N;;;;; -0FA0;TIBETAN SUBJOINED LETTER THA;Mn;0;NSM;;;;;N;;;;; -0FA1;TIBETAN SUBJOINED LETTER DA;Mn;0;NSM;;;;;N;;;;; -0FA2;TIBETAN SUBJOINED LETTER DHA;Mn;0;NSM;0FA1 0FB7;;;;N;;;;; -0FA3;TIBETAN SUBJOINED LETTER NA;Mn;0;NSM;;;;;N;;;;; -0FA4;TIBETAN SUBJOINED LETTER PA;Mn;0;NSM;;;;;N;;;;; -0FA5;TIBETAN SUBJOINED LETTER PHA;Mn;0;NSM;;;;;N;;;;; -0FA6;TIBETAN SUBJOINED LETTER BA;Mn;0;NSM;;;;;N;;;;; -0FA7;TIBETAN SUBJOINED LETTER BHA;Mn;0;NSM;0FA6 0FB7;;;;N;;;;; -0FA8;TIBETAN SUBJOINED LETTER MA;Mn;0;NSM;;;;;N;;;;; -0FA9;TIBETAN SUBJOINED LETTER TSA;Mn;0;NSM;;;;;N;;;;; -0FAA;TIBETAN SUBJOINED LETTER TSHA;Mn;0;NSM;;;;;N;;;;; -0FAB;TIBETAN SUBJOINED LETTER DZA;Mn;0;NSM;;;;;N;;;;; -0FAC;TIBETAN SUBJOINED LETTER DZHA;Mn;0;NSM;0FAB 0FB7;;;;N;;;;; -0FAD;TIBETAN SUBJOINED LETTER WA;Mn;0;NSM;;;;;N;;*;;; -0FAE;TIBETAN SUBJOINED LETTER ZHA;Mn;0;NSM;;;;;N;;;;; -0FAF;TIBETAN SUBJOINED LETTER ZA;Mn;0;NSM;;;;;N;;;;; -0FB0;TIBETAN SUBJOINED LETTER -A;Mn;0;NSM;;;;;N;;;;; -0FB1;TIBETAN SUBJOINED LETTER YA;Mn;0;NSM;;;;;N;;*;;; -0FB2;TIBETAN SUBJOINED LETTER RA;Mn;0;NSM;;;;;N;;*;;; -0FB3;TIBETAN SUBJOINED LETTER LA;Mn;0;NSM;;;;;N;;;;; -0FB4;TIBETAN SUBJOINED LETTER SHA;Mn;0;NSM;;;;;N;;;;; -0FB5;TIBETAN SUBJOINED LETTER SSA;Mn;0;NSM;;;;;N;;;;; -0FB6;TIBETAN SUBJOINED LETTER SA;Mn;0;NSM;;;;;N;;;;; -0FB7;TIBETAN SUBJOINED LETTER HA;Mn;0;NSM;;;;;N;;;;; -0FB8;TIBETAN SUBJOINED LETTER A;Mn;0;NSM;;;;;N;;;;; -0FB9;TIBETAN SUBJOINED LETTER KSSA;Mn;0;NSM;0F90 0FB5;;;;N;;;;; -0FBA;TIBETAN SUBJOINED LETTER FIXED-FORM WA;Mn;0;NSM;;;;;N;;*;;; -0FBB;TIBETAN SUBJOINED LETTER FIXED-FORM YA;Mn;0;NSM;;;;;N;;*;;; -0FBC;TIBETAN SUBJOINED LETTER FIXED-FORM RA;Mn;0;NSM;;;;;N;;*;;; -0FBE;TIBETAN KU RU KHA;So;0;L;;;;;N;;kuruka;;; -0FBF;TIBETAN KU RU KHA BZHI MIG CAN;So;0;L;;;;;N;;kuruka shi mik chen;;; -0FC0;TIBETAN CANTILLATION SIGN HEAVY BEAT;So;0;L;;;;;N;;;;; -0FC1;TIBETAN CANTILLATION SIGN LIGHT BEAT;So;0;L;;;;;N;;;;; -0FC2;TIBETAN CANTILLATION SIGN CANG TE-U;So;0;L;;;;;N;;chang tyu;;; -0FC3;TIBETAN CANTILLATION SIGN SBUB -CHAL;So;0;L;;;;;N;;bub chey;;; -0FC4;TIBETAN SYMBOL DRIL BU;So;0;L;;;;;N;;drilbu;;; -0FC5;TIBETAN SYMBOL RDO RJE;So;0;L;;;;;N;;dorje;;; -0FC6;TIBETAN SYMBOL PADMA GDAN;Mn;220;NSM;;;;;N;;pema den;;; -0FC7;TIBETAN SYMBOL RDO RJE RGYA GRAM;So;0;L;;;;;N;;dorje gya dram;;; -0FC8;TIBETAN SYMBOL PHUR PA;So;0;L;;;;;N;;phurba;;; -0FC9;TIBETAN SYMBOL NOR BU;So;0;L;;;;;N;;norbu;;; -0FCA;TIBETAN SYMBOL NOR BU NYIS -KHYIL;So;0;L;;;;;N;;norbu nyi khyi;;; -0FCB;TIBETAN SYMBOL NOR BU GSUM -KHYIL;So;0;L;;;;;N;;norbu sum khyi;;; -0FCC;TIBETAN SYMBOL NOR BU BZHI -KHYIL;So;0;L;;;;;N;;norbu shi khyi;;; -0FCF;TIBETAN SIGN RDEL NAG GSUM;So;0;L;;;;;N;;dena sum;;; -1000;MYANMAR LETTER KA;Lo;0;L;;;;;N;;;;; -1001;MYANMAR LETTER KHA;Lo;0;L;;;;;N;;;;; -1002;MYANMAR LETTER GA;Lo;0;L;;;;;N;;;;; -1003;MYANMAR LETTER GHA;Lo;0;L;;;;;N;;;;; -1004;MYANMAR LETTER NGA;Lo;0;L;;;;;N;;;;; -1005;MYANMAR LETTER CA;Lo;0;L;;;;;N;;;;; -1006;MYANMAR LETTER CHA;Lo;0;L;;;;;N;;;;; -1007;MYANMAR LETTER JA;Lo;0;L;;;;;N;;;;; -1008;MYANMAR LETTER JHA;Lo;0;L;;;;;N;;;;; -1009;MYANMAR LETTER NYA;Lo;0;L;;;;;N;;;;; -100A;MYANMAR LETTER NNYA;Lo;0;L;;;;;N;;;;; -100B;MYANMAR LETTER TTA;Lo;0;L;;;;;N;;;;; -100C;MYANMAR LETTER TTHA;Lo;0;L;;;;;N;;;;; -100D;MYANMAR LETTER DDA;Lo;0;L;;;;;N;;;;; -100E;MYANMAR LETTER DDHA;Lo;0;L;;;;;N;;;;; -100F;MYANMAR LETTER NNA;Lo;0;L;;;;;N;;;;; -1010;MYANMAR LETTER TA;Lo;0;L;;;;;N;;;;; -1011;MYANMAR LETTER THA;Lo;0;L;;;;;N;;;;; -1012;MYANMAR LETTER DA;Lo;0;L;;;;;N;;;;; -1013;MYANMAR LETTER DHA;Lo;0;L;;;;;N;;;;; -1014;MYANMAR LETTER NA;Lo;0;L;;;;;N;;;;; -1015;MYANMAR LETTER PA;Lo;0;L;;;;;N;;;;; -1016;MYANMAR LETTER PHA;Lo;0;L;;;;;N;;;;; -1017;MYANMAR LETTER BA;Lo;0;L;;;;;N;;;;; -1018;MYANMAR LETTER BHA;Lo;0;L;;;;;N;;;;; -1019;MYANMAR LETTER MA;Lo;0;L;;;;;N;;;;; -101A;MYANMAR LETTER YA;Lo;0;L;;;;;N;;;;; -101B;MYANMAR LETTER RA;Lo;0;L;;;;;N;;;;; -101C;MYANMAR LETTER LA;Lo;0;L;;;;;N;;;;; -101D;MYANMAR LETTER WA;Lo;0;L;;;;;N;;;;; -101E;MYANMAR LETTER SA;Lo;0;L;;;;;N;;;;; -101F;MYANMAR LETTER HA;Lo;0;L;;;;;N;;;;; -1020;MYANMAR LETTER LLA;Lo;0;L;;;;;N;;;;; -1021;MYANMAR LETTER A;Lo;0;L;;;;;N;;;;; -1023;MYANMAR LETTER I;Lo;0;L;;;;;N;;;;; -1024;MYANMAR LETTER II;Lo;0;L;;;;;N;;;;; -1025;MYANMAR LETTER U;Lo;0;L;;;;;N;;;;; -1026;MYANMAR LETTER UU;Lo;0;L;1025 102E;;;;N;;;;; -1027;MYANMAR LETTER E;Lo;0;L;;;;;N;;;;; -1029;MYANMAR LETTER O;Lo;0;L;;;;;N;;;;; -102A;MYANMAR LETTER AU;Lo;0;L;;;;;N;;;;; -102C;MYANMAR VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -102D;MYANMAR VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -102E;MYANMAR VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; -102F;MYANMAR VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -1030;MYANMAR VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -1031;MYANMAR VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -1032;MYANMAR VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; -1036;MYANMAR SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; -1037;MYANMAR SIGN DOT BELOW;Mn;7;NSM;;;;;N;;;;; -1038;MYANMAR SIGN VISARGA;Mc;0;L;;;;;N;;;;; -1039;MYANMAR SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; -1040;MYANMAR DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -1041;MYANMAR DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -1042;MYANMAR DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -1043;MYANMAR DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -1044;MYANMAR DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -1045;MYANMAR DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -1046;MYANMAR DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -1047;MYANMAR DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -1048;MYANMAR DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -1049;MYANMAR DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -104A;MYANMAR SIGN LITTLE SECTION;Po;0;L;;;;;N;;;;; -104B;MYANMAR SIGN SECTION;Po;0;L;;;;;N;;;;; -104C;MYANMAR SYMBOL LOCATIVE;Po;0;L;;;;;N;;;;; -104D;MYANMAR SYMBOL COMPLETED;Po;0;L;;;;;N;;;;; -104E;MYANMAR SYMBOL AFOREMENTIONED;Po;0;L;;;;;N;;;;; -104F;MYANMAR SYMBOL GENITIVE;Po;0;L;;;;;N;;;;; -1050;MYANMAR LETTER SHA;Lo;0;L;;;;;N;;;;; -1051;MYANMAR LETTER SSA;Lo;0;L;;;;;N;;;;; -1052;MYANMAR LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; -1053;MYANMAR LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; -1054;MYANMAR LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; -1055;MYANMAR LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; -1056;MYANMAR VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; -1057;MYANMAR VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; -1058;MYANMAR VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; -1059;MYANMAR VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; -10A0;GEORGIAN CAPITAL LETTER AN;Lu;0;L;;;;;N;;Khutsuri;;; -10A1;GEORGIAN CAPITAL LETTER BAN;Lu;0;L;;;;;N;;Khutsuri;;; -10A2;GEORGIAN CAPITAL LETTER GAN;Lu;0;L;;;;;N;;Khutsuri;;; -10A3;GEORGIAN CAPITAL LETTER DON;Lu;0;L;;;;;N;;Khutsuri;;; -10A4;GEORGIAN CAPITAL LETTER EN;Lu;0;L;;;;;N;;Khutsuri;;; -10A5;GEORGIAN CAPITAL LETTER VIN;Lu;0;L;;;;;N;;Khutsuri;;; -10A6;GEORGIAN CAPITAL LETTER ZEN;Lu;0;L;;;;;N;;Khutsuri;;; -10A7;GEORGIAN CAPITAL LETTER TAN;Lu;0;L;;;;;N;;Khutsuri;;; -10A8;GEORGIAN CAPITAL LETTER IN;Lu;0;L;;;;;N;;Khutsuri;;; -10A9;GEORGIAN CAPITAL LETTER KAN;Lu;0;L;;;;;N;;Khutsuri;;; -10AA;GEORGIAN CAPITAL LETTER LAS;Lu;0;L;;;;;N;;Khutsuri;;; -10AB;GEORGIAN CAPITAL LETTER MAN;Lu;0;L;;;;;N;;Khutsuri;;; -10AC;GEORGIAN CAPITAL LETTER NAR;Lu;0;L;;;;;N;;Khutsuri;;; -10AD;GEORGIAN CAPITAL LETTER ON;Lu;0;L;;;;;N;;Khutsuri;;; -10AE;GEORGIAN CAPITAL LETTER PAR;Lu;0;L;;;;;N;;Khutsuri;;; -10AF;GEORGIAN CAPITAL LETTER ZHAR;Lu;0;L;;;;;N;;Khutsuri;;; -10B0;GEORGIAN CAPITAL LETTER RAE;Lu;0;L;;;;;N;;Khutsuri;;; -10B1;GEORGIAN CAPITAL LETTER SAN;Lu;0;L;;;;;N;;Khutsuri;;; -10B2;GEORGIAN CAPITAL LETTER TAR;Lu;0;L;;;;;N;;Khutsuri;;; -10B3;GEORGIAN CAPITAL LETTER UN;Lu;0;L;;;;;N;;Khutsuri;;; -10B4;GEORGIAN CAPITAL LETTER PHAR;Lu;0;L;;;;;N;;Khutsuri;;; -10B5;GEORGIAN CAPITAL LETTER KHAR;Lu;0;L;;;;;N;;Khutsuri;;; -10B6;GEORGIAN CAPITAL LETTER GHAN;Lu;0;L;;;;;N;;Khutsuri;;; -10B7;GEORGIAN CAPITAL LETTER QAR;Lu;0;L;;;;;N;;Khutsuri;;; -10B8;GEORGIAN CAPITAL LETTER SHIN;Lu;0;L;;;;;N;;Khutsuri;;; -10B9;GEORGIAN CAPITAL LETTER CHIN;Lu;0;L;;;;;N;;Khutsuri;;; -10BA;GEORGIAN CAPITAL LETTER CAN;Lu;0;L;;;;;N;;Khutsuri;;; -10BB;GEORGIAN CAPITAL LETTER JIL;Lu;0;L;;;;;N;;Khutsuri;;; -10BC;GEORGIAN CAPITAL LETTER CIL;Lu;0;L;;;;;N;;Khutsuri;;; -10BD;GEORGIAN CAPITAL LETTER CHAR;Lu;0;L;;;;;N;;Khutsuri;;; -10BE;GEORGIAN CAPITAL LETTER XAN;Lu;0;L;;;;;N;;Khutsuri;;; -10BF;GEORGIAN CAPITAL LETTER JHAN;Lu;0;L;;;;;N;;Khutsuri;;; -10C0;GEORGIAN CAPITAL LETTER HAE;Lu;0;L;;;;;N;;Khutsuri;;; -10C1;GEORGIAN CAPITAL LETTER HE;Lu;0;L;;;;;N;;Khutsuri;;; -10C2;GEORGIAN CAPITAL LETTER HIE;Lu;0;L;;;;;N;;Khutsuri;;; -10C3;GEORGIAN CAPITAL LETTER WE;Lu;0;L;;;;;N;;Khutsuri;;; -10C4;GEORGIAN CAPITAL LETTER HAR;Lu;0;L;;;;;N;;Khutsuri;;; -10C5;GEORGIAN CAPITAL LETTER HOE;Lu;0;L;;;;;N;;Khutsuri;;; -10D0;GEORGIAN LETTER AN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER AN;;;; -10D1;GEORGIAN LETTER BAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER BAN;;;; -10D2;GEORGIAN LETTER GAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER GAN;;;; -10D3;GEORGIAN LETTER DON;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER DON;;;; -10D4;GEORGIAN LETTER EN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER EN;;;; -10D5;GEORGIAN LETTER VIN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER VIN;;;; -10D6;GEORGIAN LETTER ZEN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER ZEN;;;; -10D7;GEORGIAN LETTER TAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER TAN;;;; -10D8;GEORGIAN LETTER IN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER IN;;;; -10D9;GEORGIAN LETTER KAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER KAN;;;; -10DA;GEORGIAN LETTER LAS;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER LAS;;;; -10DB;GEORGIAN LETTER MAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER MAN;;;; -10DC;GEORGIAN LETTER NAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER NAR;;;; -10DD;GEORGIAN LETTER ON;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER ON;;;; -10DE;GEORGIAN LETTER PAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER PAR;;;; -10DF;GEORGIAN LETTER ZHAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER ZHAR;;;; -10E0;GEORGIAN LETTER RAE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER RAE;;;; -10E1;GEORGIAN LETTER SAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER SAN;;;; -10E2;GEORGIAN LETTER TAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER TAR;;;; -10E3;GEORGIAN LETTER UN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER UN;;;; -10E4;GEORGIAN LETTER PHAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER PHAR;;;; -10E5;GEORGIAN LETTER KHAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER KHAR;;;; -10E6;GEORGIAN LETTER GHAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER GHAN;;;; -10E7;GEORGIAN LETTER QAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER QAR;;;; -10E8;GEORGIAN LETTER SHIN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER SHIN;;;; -10E9;GEORGIAN LETTER CHIN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER CHIN;;;; -10EA;GEORGIAN LETTER CAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER CAN;;;; -10EB;GEORGIAN LETTER JIL;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER JIL;;;; -10EC;GEORGIAN LETTER CIL;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER CIL;;;; -10ED;GEORGIAN LETTER CHAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER CHAR;;;; -10EE;GEORGIAN LETTER XAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER XAN;;;; -10EF;GEORGIAN LETTER JHAN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER JHAN;;;; -10F0;GEORGIAN LETTER HAE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER HAE;;;; -10F1;GEORGIAN LETTER HE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER HE;;;; -10F2;GEORGIAN LETTER HIE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER HIE;;;; -10F3;GEORGIAN LETTER WE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER WE;;;; -10F4;GEORGIAN LETTER HAR;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER HAR;;;; -10F5;GEORGIAN LETTER HOE;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER HOE;;;; -10F6;GEORGIAN LETTER FI;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER FI;;;; -10FB;GEORGIAN PARAGRAPH SEPARATOR;Po;0;L;;;;;N;;;;; -1100;HANGUL CHOSEONG KIYEOK;Lo;0;L;;;;;N;;g *;;; -1101;HANGUL CHOSEONG SSANGKIYEOK;Lo;0;L;;;;;N;;gg *;;; -1102;HANGUL CHOSEONG NIEUN;Lo;0;L;;;;;N;;n *;;; -1103;HANGUL CHOSEONG TIKEUT;Lo;0;L;;;;;N;;d *;;; -1104;HANGUL CHOSEONG SSANGTIKEUT;Lo;0;L;;;;;N;;dd *;;; -1105;HANGUL CHOSEONG RIEUL;Lo;0;L;;;;;N;;r *;;; -1106;HANGUL CHOSEONG MIEUM;Lo;0;L;;;;;N;;m *;;; -1107;HANGUL CHOSEONG PIEUP;Lo;0;L;;;;;N;;b *;;; -1108;HANGUL CHOSEONG SSANGPIEUP;Lo;0;L;;;;;N;;bb *;;; -1109;HANGUL CHOSEONG SIOS;Lo;0;L;;;;;N;;s *;;; -110A;HANGUL CHOSEONG SSANGSIOS;Lo;0;L;;;;;N;;ss *;;; -110B;HANGUL CHOSEONG IEUNG;Lo;0;L;;;;;N;;;;; -110C;HANGUL CHOSEONG CIEUC;Lo;0;L;;;;;N;;j *;;; -110D;HANGUL CHOSEONG SSANGCIEUC;Lo;0;L;;;;;N;;jj *;;; -110E;HANGUL CHOSEONG CHIEUCH;Lo;0;L;;;;;N;;c *;;; -110F;HANGUL CHOSEONG KHIEUKH;Lo;0;L;;;;;N;;k *;;; -1110;HANGUL CHOSEONG THIEUTH;Lo;0;L;;;;;N;;t *;;; -1111;HANGUL CHOSEONG PHIEUPH;Lo;0;L;;;;;N;;p *;;; -1112;HANGUL CHOSEONG HIEUH;Lo;0;L;;;;;N;;h *;;; -1113;HANGUL CHOSEONG NIEUN-KIYEOK;Lo;0;L;;;;;N;;;;; -1114;HANGUL CHOSEONG SSANGNIEUN;Lo;0;L;;;;;N;;;;; -1115;HANGUL CHOSEONG NIEUN-TIKEUT;Lo;0;L;;;;;N;;;;; -1116;HANGUL CHOSEONG NIEUN-PIEUP;Lo;0;L;;;;;N;;;;; -1117;HANGUL CHOSEONG TIKEUT-KIYEOK;Lo;0;L;;;;;N;;;;; -1118;HANGUL CHOSEONG RIEUL-NIEUN;Lo;0;L;;;;;N;;;;; -1119;HANGUL CHOSEONG SSANGRIEUL;Lo;0;L;;;;;N;;;;; -111A;HANGUL CHOSEONG RIEUL-HIEUH;Lo;0;L;;;;;N;;;;; -111B;HANGUL CHOSEONG KAPYEOUNRIEUL;Lo;0;L;;;;;N;;;;; -111C;HANGUL CHOSEONG MIEUM-PIEUP;Lo;0;L;;;;;N;;;;; -111D;HANGUL CHOSEONG KAPYEOUNMIEUM;Lo;0;L;;;;;N;;;;; -111E;HANGUL CHOSEONG PIEUP-KIYEOK;Lo;0;L;;;;;N;;;;; -111F;HANGUL CHOSEONG PIEUP-NIEUN;Lo;0;L;;;;;N;;;;; -1120;HANGUL CHOSEONG PIEUP-TIKEUT;Lo;0;L;;;;;N;;;;; -1121;HANGUL CHOSEONG PIEUP-SIOS;Lo;0;L;;;;;N;;;;; -1122;HANGUL CHOSEONG PIEUP-SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; -1123;HANGUL CHOSEONG PIEUP-SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; -1124;HANGUL CHOSEONG PIEUP-SIOS-PIEUP;Lo;0;L;;;;;N;;;;; -1125;HANGUL CHOSEONG PIEUP-SSANGSIOS;Lo;0;L;;;;;N;;;;; -1126;HANGUL CHOSEONG PIEUP-SIOS-CIEUC;Lo;0;L;;;;;N;;;;; -1127;HANGUL CHOSEONG PIEUP-CIEUC;Lo;0;L;;;;;N;;;;; -1128;HANGUL CHOSEONG PIEUP-CHIEUCH;Lo;0;L;;;;;N;;;;; -1129;HANGUL CHOSEONG PIEUP-THIEUTH;Lo;0;L;;;;;N;;;;; -112A;HANGUL CHOSEONG PIEUP-PHIEUPH;Lo;0;L;;;;;N;;;;; -112B;HANGUL CHOSEONG KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; -112C;HANGUL CHOSEONG KAPYEOUNSSANGPIEUP;Lo;0;L;;;;;N;;;;; -112D;HANGUL CHOSEONG SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; -112E;HANGUL CHOSEONG SIOS-NIEUN;Lo;0;L;;;;;N;;;;; -112F;HANGUL CHOSEONG SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; -1130;HANGUL CHOSEONG SIOS-RIEUL;Lo;0;L;;;;;N;;;;; -1131;HANGUL CHOSEONG SIOS-MIEUM;Lo;0;L;;;;;N;;;;; -1132;HANGUL CHOSEONG SIOS-PIEUP;Lo;0;L;;;;;N;;;;; -1133;HANGUL CHOSEONG SIOS-PIEUP-KIYEOK;Lo;0;L;;;;;N;;;;; -1134;HANGUL CHOSEONG SIOS-SSANGSIOS;Lo;0;L;;;;;N;;;;; -1135;HANGUL CHOSEONG SIOS-IEUNG;Lo;0;L;;;;;N;;;;; -1136;HANGUL CHOSEONG SIOS-CIEUC;Lo;0;L;;;;;N;;;;; -1137;HANGUL CHOSEONG SIOS-CHIEUCH;Lo;0;L;;;;;N;;;;; -1138;HANGUL CHOSEONG SIOS-KHIEUKH;Lo;0;L;;;;;N;;;;; -1139;HANGUL CHOSEONG SIOS-THIEUTH;Lo;0;L;;;;;N;;;;; -113A;HANGUL CHOSEONG SIOS-PHIEUPH;Lo;0;L;;;;;N;;;;; -113B;HANGUL CHOSEONG SIOS-HIEUH;Lo;0;L;;;;;N;;;;; -113C;HANGUL CHOSEONG CHITUEUMSIOS;Lo;0;L;;;;;N;;;;; -113D;HANGUL CHOSEONG CHITUEUMSSANGSIOS;Lo;0;L;;;;;N;;;;; -113E;HANGUL CHOSEONG CEONGCHIEUMSIOS;Lo;0;L;;;;;N;;;;; -113F;HANGUL CHOSEONG CEONGCHIEUMSSANGSIOS;Lo;0;L;;;;;N;;;;; -1140;HANGUL CHOSEONG PANSIOS;Lo;0;L;;;;;N;;;;; -1141;HANGUL CHOSEONG IEUNG-KIYEOK;Lo;0;L;;;;;N;;;;; -1142;HANGUL CHOSEONG IEUNG-TIKEUT;Lo;0;L;;;;;N;;;;; -1143;HANGUL CHOSEONG IEUNG-MIEUM;Lo;0;L;;;;;N;;;;; -1144;HANGUL CHOSEONG IEUNG-PIEUP;Lo;0;L;;;;;N;;;;; -1145;HANGUL CHOSEONG IEUNG-SIOS;Lo;0;L;;;;;N;;;;; -1146;HANGUL CHOSEONG IEUNG-PANSIOS;Lo;0;L;;;;;N;;;;; -1147;HANGUL CHOSEONG SSANGIEUNG;Lo;0;L;;;;;N;;;;; -1148;HANGUL CHOSEONG IEUNG-CIEUC;Lo;0;L;;;;;N;;;;; -1149;HANGUL CHOSEONG IEUNG-CHIEUCH;Lo;0;L;;;;;N;;;;; -114A;HANGUL CHOSEONG IEUNG-THIEUTH;Lo;0;L;;;;;N;;;;; -114B;HANGUL CHOSEONG IEUNG-PHIEUPH;Lo;0;L;;;;;N;;;;; -114C;HANGUL CHOSEONG YESIEUNG;Lo;0;L;;;;;N;;;;; -114D;HANGUL CHOSEONG CIEUC-IEUNG;Lo;0;L;;;;;N;;;;; -114E;HANGUL CHOSEONG CHITUEUMCIEUC;Lo;0;L;;;;;N;;;;; -114F;HANGUL CHOSEONG CHITUEUMSSANGCIEUC;Lo;0;L;;;;;N;;;;; -1150;HANGUL CHOSEONG CEONGCHIEUMCIEUC;Lo;0;L;;;;;N;;;;; -1151;HANGUL CHOSEONG CEONGCHIEUMSSANGCIEUC;Lo;0;L;;;;;N;;;;; -1152;HANGUL CHOSEONG CHIEUCH-KHIEUKH;Lo;0;L;;;;;N;;;;; -1153;HANGUL CHOSEONG CHIEUCH-HIEUH;Lo;0;L;;;;;N;;;;; -1154;HANGUL CHOSEONG CHITUEUMCHIEUCH;Lo;0;L;;;;;N;;;;; -1155;HANGUL CHOSEONG CEONGCHIEUMCHIEUCH;Lo;0;L;;;;;N;;;;; -1156;HANGUL CHOSEONG PHIEUPH-PIEUP;Lo;0;L;;;;;N;;;;; -1157;HANGUL CHOSEONG KAPYEOUNPHIEUPH;Lo;0;L;;;;;N;;;;; -1158;HANGUL CHOSEONG SSANGHIEUH;Lo;0;L;;;;;N;;;;; -1159;HANGUL CHOSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;; -115F;HANGUL CHOSEONG FILLER;Lo;0;L;;;;;N;;;;; -1160;HANGUL JUNGSEONG FILLER;Lo;0;L;;;;;N;;;;; -1161;HANGUL JUNGSEONG A;Lo;0;L;;;;;N;;;;; -1162;HANGUL JUNGSEONG AE;Lo;0;L;;;;;N;;;;; -1163;HANGUL JUNGSEONG YA;Lo;0;L;;;;;N;;;;; -1164;HANGUL JUNGSEONG YAE;Lo;0;L;;;;;N;;;;; -1165;HANGUL JUNGSEONG EO;Lo;0;L;;;;;N;;;;; -1166;HANGUL JUNGSEONG E;Lo;0;L;;;;;N;;;;; -1167;HANGUL JUNGSEONG YEO;Lo;0;L;;;;;N;;;;; -1168;HANGUL JUNGSEONG YE;Lo;0;L;;;;;N;;;;; -1169;HANGUL JUNGSEONG O;Lo;0;L;;;;;N;;;;; -116A;HANGUL JUNGSEONG WA;Lo;0;L;;;;;N;;;;; -116B;HANGUL JUNGSEONG WAE;Lo;0;L;;;;;N;;;;; -116C;HANGUL JUNGSEONG OE;Lo;0;L;;;;;N;;;;; -116D;HANGUL JUNGSEONG YO;Lo;0;L;;;;;N;;;;; -116E;HANGUL JUNGSEONG U;Lo;0;L;;;;;N;;;;; -116F;HANGUL JUNGSEONG WEO;Lo;0;L;;;;;N;;;;; -1170;HANGUL JUNGSEONG WE;Lo;0;L;;;;;N;;;;; -1171;HANGUL JUNGSEONG WI;Lo;0;L;;;;;N;;;;; -1172;HANGUL JUNGSEONG YU;Lo;0;L;;;;;N;;;;; -1173;HANGUL JUNGSEONG EU;Lo;0;L;;;;;N;;;;; -1174;HANGUL JUNGSEONG YI;Lo;0;L;;;;;N;;;;; -1175;HANGUL JUNGSEONG I;Lo;0;L;;;;;N;;;;; -1176;HANGUL JUNGSEONG A-O;Lo;0;L;;;;;N;;;;; -1177;HANGUL JUNGSEONG A-U;Lo;0;L;;;;;N;;;;; -1178;HANGUL JUNGSEONG YA-O;Lo;0;L;;;;;N;;;;; -1179;HANGUL JUNGSEONG YA-YO;Lo;0;L;;;;;N;;;;; -117A;HANGUL JUNGSEONG EO-O;Lo;0;L;;;;;N;;;;; -117B;HANGUL JUNGSEONG EO-U;Lo;0;L;;;;;N;;;;; -117C;HANGUL JUNGSEONG EO-EU;Lo;0;L;;;;;N;;;;; -117D;HANGUL JUNGSEONG YEO-O;Lo;0;L;;;;;N;;;;; -117E;HANGUL JUNGSEONG YEO-U;Lo;0;L;;;;;N;;;;; -117F;HANGUL JUNGSEONG O-EO;Lo;0;L;;;;;N;;;;; -1180;HANGUL JUNGSEONG O-E;Lo;0;L;;;;;N;;;;; -1181;HANGUL JUNGSEONG O-YE;Lo;0;L;;;;;N;;;;; -1182;HANGUL JUNGSEONG O-O;Lo;0;L;;;;;N;;;;; -1183;HANGUL JUNGSEONG O-U;Lo;0;L;;;;;N;;;;; -1184;HANGUL JUNGSEONG YO-YA;Lo;0;L;;;;;N;;;;; -1185;HANGUL JUNGSEONG YO-YAE;Lo;0;L;;;;;N;;;;; -1186;HANGUL JUNGSEONG YO-YEO;Lo;0;L;;;;;N;;;;; -1187;HANGUL JUNGSEONG YO-O;Lo;0;L;;;;;N;;;;; -1188;HANGUL JUNGSEONG YO-I;Lo;0;L;;;;;N;;;;; -1189;HANGUL JUNGSEONG U-A;Lo;0;L;;;;;N;;;;; -118A;HANGUL JUNGSEONG U-AE;Lo;0;L;;;;;N;;;;; -118B;HANGUL JUNGSEONG U-EO-EU;Lo;0;L;;;;;N;;;;; -118C;HANGUL JUNGSEONG U-YE;Lo;0;L;;;;;N;;;;; -118D;HANGUL JUNGSEONG U-U;Lo;0;L;;;;;N;;;;; -118E;HANGUL JUNGSEONG YU-A;Lo;0;L;;;;;N;;;;; -118F;HANGUL JUNGSEONG YU-EO;Lo;0;L;;;;;N;;;;; -1190;HANGUL JUNGSEONG YU-E;Lo;0;L;;;;;N;;;;; -1191;HANGUL JUNGSEONG YU-YEO;Lo;0;L;;;;;N;;;;; -1192;HANGUL JUNGSEONG YU-YE;Lo;0;L;;;;;N;;;;; -1193;HANGUL JUNGSEONG YU-U;Lo;0;L;;;;;N;;;;; -1194;HANGUL JUNGSEONG YU-I;Lo;0;L;;;;;N;;;;; -1195;HANGUL JUNGSEONG EU-U;Lo;0;L;;;;;N;;;;; -1196;HANGUL JUNGSEONG EU-EU;Lo;0;L;;;;;N;;;;; -1197;HANGUL JUNGSEONG YI-U;Lo;0;L;;;;;N;;;;; -1198;HANGUL JUNGSEONG I-A;Lo;0;L;;;;;N;;;;; -1199;HANGUL JUNGSEONG I-YA;Lo;0;L;;;;;N;;;;; -119A;HANGUL JUNGSEONG I-O;Lo;0;L;;;;;N;;;;; -119B;HANGUL JUNGSEONG I-U;Lo;0;L;;;;;N;;;;; -119C;HANGUL JUNGSEONG I-EU;Lo;0;L;;;;;N;;;;; -119D;HANGUL JUNGSEONG I-ARAEA;Lo;0;L;;;;;N;;;;; -119E;HANGUL JUNGSEONG ARAEA;Lo;0;L;;;;;N;;;;; -119F;HANGUL JUNGSEONG ARAEA-EO;Lo;0;L;;;;;N;;;;; -11A0;HANGUL JUNGSEONG ARAEA-U;Lo;0;L;;;;;N;;;;; -11A1;HANGUL JUNGSEONG ARAEA-I;Lo;0;L;;;;;N;;;;; -11A2;HANGUL JUNGSEONG SSANGARAEA;Lo;0;L;;;;;N;;;;; -11A8;HANGUL JONGSEONG KIYEOK;Lo;0;L;;;;;N;;g *;;; -11A9;HANGUL JONGSEONG SSANGKIYEOK;Lo;0;L;;;;;N;;gg *;;; -11AA;HANGUL JONGSEONG KIYEOK-SIOS;Lo;0;L;;;;;N;;gs *;;; -11AB;HANGUL JONGSEONG NIEUN;Lo;0;L;;;;;N;;n *;;; -11AC;HANGUL JONGSEONG NIEUN-CIEUC;Lo;0;L;;;;;N;;nj *;;; -11AD;HANGUL JONGSEONG NIEUN-HIEUH;Lo;0;L;;;;;N;;nh *;;; -11AE;HANGUL JONGSEONG TIKEUT;Lo;0;L;;;;;N;;d *;;; -11AF;HANGUL JONGSEONG RIEUL;Lo;0;L;;;;;N;;l *;;; -11B0;HANGUL JONGSEONG RIEUL-KIYEOK;Lo;0;L;;;;;N;;lg *;;; -11B1;HANGUL JONGSEONG RIEUL-MIEUM;Lo;0;L;;;;;N;;lm *;;; -11B2;HANGUL JONGSEONG RIEUL-PIEUP;Lo;0;L;;;;;N;;lb *;;; -11B3;HANGUL JONGSEONG RIEUL-SIOS;Lo;0;L;;;;;N;;ls *;;; -11B4;HANGUL JONGSEONG RIEUL-THIEUTH;Lo;0;L;;;;;N;;lt *;;; -11B5;HANGUL JONGSEONG RIEUL-PHIEUPH;Lo;0;L;;;;;N;;lp *;;; -11B6;HANGUL JONGSEONG RIEUL-HIEUH;Lo;0;L;;;;;N;;lh *;;; -11B7;HANGUL JONGSEONG MIEUM;Lo;0;L;;;;;N;;m *;;; -11B8;HANGUL JONGSEONG PIEUP;Lo;0;L;;;;;N;;b *;;; -11B9;HANGUL JONGSEONG PIEUP-SIOS;Lo;0;L;;;;;N;;bs *;;; -11BA;HANGUL JONGSEONG SIOS;Lo;0;L;;;;;N;;s *;;; -11BB;HANGUL JONGSEONG SSANGSIOS;Lo;0;L;;;;;N;;ss *;;; -11BC;HANGUL JONGSEONG IEUNG;Lo;0;L;;;;;N;;ng *;;; -11BD;HANGUL JONGSEONG CIEUC;Lo;0;L;;;;;N;;j *;;; -11BE;HANGUL JONGSEONG CHIEUCH;Lo;0;L;;;;;N;;c *;;; -11BF;HANGUL JONGSEONG KHIEUKH;Lo;0;L;;;;;N;;k *;;; -11C0;HANGUL JONGSEONG THIEUTH;Lo;0;L;;;;;N;;t *;;; -11C1;HANGUL JONGSEONG PHIEUPH;Lo;0;L;;;;;N;;p *;;; -11C2;HANGUL JONGSEONG HIEUH;Lo;0;L;;;;;N;;h *;;; -11C3;HANGUL JONGSEONG KIYEOK-RIEUL;Lo;0;L;;;;;N;;;;; -11C4;HANGUL JONGSEONG KIYEOK-SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; -11C5;HANGUL JONGSEONG NIEUN-KIYEOK;Lo;0;L;;;;;N;;;;; -11C6;HANGUL JONGSEONG NIEUN-TIKEUT;Lo;0;L;;;;;N;;;;; -11C7;HANGUL JONGSEONG NIEUN-SIOS;Lo;0;L;;;;;N;;;;; -11C8;HANGUL JONGSEONG NIEUN-PANSIOS;Lo;0;L;;;;;N;;;;; -11C9;HANGUL JONGSEONG NIEUN-THIEUTH;Lo;0;L;;;;;N;;;;; -11CA;HANGUL JONGSEONG TIKEUT-KIYEOK;Lo;0;L;;;;;N;;;;; -11CB;HANGUL JONGSEONG TIKEUT-RIEUL;Lo;0;L;;;;;N;;;;; -11CC;HANGUL JONGSEONG RIEUL-KIYEOK-SIOS;Lo;0;L;;;;;N;;;;; -11CD;HANGUL JONGSEONG RIEUL-NIEUN;Lo;0;L;;;;;N;;;;; -11CE;HANGUL JONGSEONG RIEUL-TIKEUT;Lo;0;L;;;;;N;;;;; -11CF;HANGUL JONGSEONG RIEUL-TIKEUT-HIEUH;Lo;0;L;;;;;N;;;;; -11D0;HANGUL JONGSEONG SSANGRIEUL;Lo;0;L;;;;;N;;;;; -11D1;HANGUL JONGSEONG RIEUL-MIEUM-KIYEOK;Lo;0;L;;;;;N;;;;; -11D2;HANGUL JONGSEONG RIEUL-MIEUM-SIOS;Lo;0;L;;;;;N;;;;; -11D3;HANGUL JONGSEONG RIEUL-PIEUP-SIOS;Lo;0;L;;;;;N;;;;; -11D4;HANGUL JONGSEONG RIEUL-PIEUP-HIEUH;Lo;0;L;;;;;N;;;;; -11D5;HANGUL JONGSEONG RIEUL-KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; -11D6;HANGUL JONGSEONG RIEUL-SSANGSIOS;Lo;0;L;;;;;N;;;;; -11D7;HANGUL JONGSEONG RIEUL-PANSIOS;Lo;0;L;;;;;N;;;;; -11D8;HANGUL JONGSEONG RIEUL-KHIEUKH;Lo;0;L;;;;;N;;;;; -11D9;HANGUL JONGSEONG RIEUL-YEORINHIEUH;Lo;0;L;;;;;N;;;;; -11DA;HANGUL JONGSEONG MIEUM-KIYEOK;Lo;0;L;;;;;N;;;;; -11DB;HANGUL JONGSEONG MIEUM-RIEUL;Lo;0;L;;;;;N;;;;; -11DC;HANGUL JONGSEONG MIEUM-PIEUP;Lo;0;L;;;;;N;;;;; -11DD;HANGUL JONGSEONG MIEUM-SIOS;Lo;0;L;;;;;N;;;;; -11DE;HANGUL JONGSEONG MIEUM-SSANGSIOS;Lo;0;L;;;;;N;;;;; -11DF;HANGUL JONGSEONG MIEUM-PANSIOS;Lo;0;L;;;;;N;;;;; -11E0;HANGUL JONGSEONG MIEUM-CHIEUCH;Lo;0;L;;;;;N;;;;; -11E1;HANGUL JONGSEONG MIEUM-HIEUH;Lo;0;L;;;;;N;;;;; -11E2;HANGUL JONGSEONG KAPYEOUNMIEUM;Lo;0;L;;;;;N;;;;; -11E3;HANGUL JONGSEONG PIEUP-RIEUL;Lo;0;L;;;;;N;;;;; -11E4;HANGUL JONGSEONG PIEUP-PHIEUPH;Lo;0;L;;;;;N;;;;; -11E5;HANGUL JONGSEONG PIEUP-HIEUH;Lo;0;L;;;;;N;;;;; -11E6;HANGUL JONGSEONG KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; -11E7;HANGUL JONGSEONG SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; -11E8;HANGUL JONGSEONG SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; -11E9;HANGUL JONGSEONG SIOS-RIEUL;Lo;0;L;;;;;N;;;;; -11EA;HANGUL JONGSEONG SIOS-PIEUP;Lo;0;L;;;;;N;;;;; -11EB;HANGUL JONGSEONG PANSIOS;Lo;0;L;;;;;N;;;;; -11EC;HANGUL JONGSEONG IEUNG-KIYEOK;Lo;0;L;;;;;N;;;;; -11ED;HANGUL JONGSEONG IEUNG-SSANGKIYEOK;Lo;0;L;;;;;N;;;;; -11EE;HANGUL JONGSEONG SSANGIEUNG;Lo;0;L;;;;;N;;;;; -11EF;HANGUL JONGSEONG IEUNG-KHIEUKH;Lo;0;L;;;;;N;;;;; -11F0;HANGUL JONGSEONG YESIEUNG;Lo;0;L;;;;;N;;;;; -11F1;HANGUL JONGSEONG YESIEUNG-SIOS;Lo;0;L;;;;;N;;;;; -11F2;HANGUL JONGSEONG YESIEUNG-PANSIOS;Lo;0;L;;;;;N;;;;; -11F3;HANGUL JONGSEONG PHIEUPH-PIEUP;Lo;0;L;;;;;N;;;;; -11F4;HANGUL JONGSEONG KAPYEOUNPHIEUPH;Lo;0;L;;;;;N;;;;; -11F5;HANGUL JONGSEONG HIEUH-NIEUN;Lo;0;L;;;;;N;;;;; -11F6;HANGUL JONGSEONG HIEUH-RIEUL;Lo;0;L;;;;;N;;;;; -11F7;HANGUL JONGSEONG HIEUH-MIEUM;Lo;0;L;;;;;N;;;;; -11F8;HANGUL JONGSEONG HIEUH-PIEUP;Lo;0;L;;;;;N;;;;; -11F9;HANGUL JONGSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;; -1200;ETHIOPIC SYLLABLE HA;Lo;0;L;;;;;N;;;;; -1201;ETHIOPIC SYLLABLE HU;Lo;0;L;;;;;N;;;;; -1202;ETHIOPIC SYLLABLE HI;Lo;0;L;;;;;N;;;;; -1203;ETHIOPIC SYLLABLE HAA;Lo;0;L;;;;;N;;;;; -1204;ETHIOPIC SYLLABLE HEE;Lo;0;L;;;;;N;;;;; -1205;ETHIOPIC SYLLABLE HE;Lo;0;L;;;;;N;;;;; -1206;ETHIOPIC SYLLABLE HO;Lo;0;L;;;;;N;;;;; -1208;ETHIOPIC SYLLABLE LA;Lo;0;L;;;;;N;;;;; -1209;ETHIOPIC SYLLABLE LU;Lo;0;L;;;;;N;;;;; -120A;ETHIOPIC SYLLABLE LI;Lo;0;L;;;;;N;;;;; -120B;ETHIOPIC SYLLABLE LAA;Lo;0;L;;;;;N;;;;; -120C;ETHIOPIC SYLLABLE LEE;Lo;0;L;;;;;N;;;;; -120D;ETHIOPIC SYLLABLE LE;Lo;0;L;;;;;N;;;;; -120E;ETHIOPIC SYLLABLE LO;Lo;0;L;;;;;N;;;;; -120F;ETHIOPIC SYLLABLE LWA;Lo;0;L;;;;;N;;;;; -1210;ETHIOPIC SYLLABLE HHA;Lo;0;L;;;;;N;;;;; -1211;ETHIOPIC SYLLABLE HHU;Lo;0;L;;;;;N;;;;; -1212;ETHIOPIC SYLLABLE HHI;Lo;0;L;;;;;N;;;;; -1213;ETHIOPIC SYLLABLE HHAA;Lo;0;L;;;;;N;;;;; -1214;ETHIOPIC SYLLABLE HHEE;Lo;0;L;;;;;N;;;;; -1215;ETHIOPIC SYLLABLE HHE;Lo;0;L;;;;;N;;;;; -1216;ETHIOPIC SYLLABLE HHO;Lo;0;L;;;;;N;;;;; -1217;ETHIOPIC SYLLABLE HHWA;Lo;0;L;;;;;N;;;;; -1218;ETHIOPIC SYLLABLE MA;Lo;0;L;;;;;N;;;;; -1219;ETHIOPIC SYLLABLE MU;Lo;0;L;;;;;N;;;;; -121A;ETHIOPIC SYLLABLE MI;Lo;0;L;;;;;N;;;;; -121B;ETHIOPIC SYLLABLE MAA;Lo;0;L;;;;;N;;;;; -121C;ETHIOPIC SYLLABLE MEE;Lo;0;L;;;;;N;;;;; -121D;ETHIOPIC SYLLABLE ME;Lo;0;L;;;;;N;;;;; -121E;ETHIOPIC SYLLABLE MO;Lo;0;L;;;;;N;;;;; -121F;ETHIOPIC SYLLABLE MWA;Lo;0;L;;;;;N;;;;; -1220;ETHIOPIC SYLLABLE SZA;Lo;0;L;;;;;N;;;;; -1221;ETHIOPIC SYLLABLE SZU;Lo;0;L;;;;;N;;;;; -1222;ETHIOPIC SYLLABLE SZI;Lo;0;L;;;;;N;;;;; -1223;ETHIOPIC SYLLABLE SZAA;Lo;0;L;;;;;N;;;;; -1224;ETHIOPIC SYLLABLE SZEE;Lo;0;L;;;;;N;;;;; -1225;ETHIOPIC SYLLABLE SZE;Lo;0;L;;;;;N;;;;; -1226;ETHIOPIC SYLLABLE SZO;Lo;0;L;;;;;N;;;;; -1227;ETHIOPIC SYLLABLE SZWA;Lo;0;L;;;;;N;;;;; -1228;ETHIOPIC SYLLABLE RA;Lo;0;L;;;;;N;;;;; -1229;ETHIOPIC SYLLABLE RU;Lo;0;L;;;;;N;;;;; -122A;ETHIOPIC SYLLABLE RI;Lo;0;L;;;;;N;;;;; -122B;ETHIOPIC SYLLABLE RAA;Lo;0;L;;;;;N;;;;; -122C;ETHIOPIC SYLLABLE REE;Lo;0;L;;;;;N;;;;; -122D;ETHIOPIC SYLLABLE RE;Lo;0;L;;;;;N;;;;; -122E;ETHIOPIC SYLLABLE RO;Lo;0;L;;;;;N;;;;; -122F;ETHIOPIC SYLLABLE RWA;Lo;0;L;;;;;N;;;;; -1230;ETHIOPIC SYLLABLE SA;Lo;0;L;;;;;N;;;;; -1231;ETHIOPIC SYLLABLE SU;Lo;0;L;;;;;N;;;;; -1232;ETHIOPIC SYLLABLE SI;Lo;0;L;;;;;N;;;;; -1233;ETHIOPIC SYLLABLE SAA;Lo;0;L;;;;;N;;;;; -1234;ETHIOPIC SYLLABLE SEE;Lo;0;L;;;;;N;;;;; -1235;ETHIOPIC SYLLABLE SE;Lo;0;L;;;;;N;;;;; -1236;ETHIOPIC SYLLABLE SO;Lo;0;L;;;;;N;;;;; -1237;ETHIOPIC SYLLABLE SWA;Lo;0;L;;;;;N;;;;; -1238;ETHIOPIC SYLLABLE SHA;Lo;0;L;;;;;N;;;;; -1239;ETHIOPIC SYLLABLE SHU;Lo;0;L;;;;;N;;;;; -123A;ETHIOPIC SYLLABLE SHI;Lo;0;L;;;;;N;;;;; -123B;ETHIOPIC SYLLABLE SHAA;Lo;0;L;;;;;N;;;;; -123C;ETHIOPIC SYLLABLE SHEE;Lo;0;L;;;;;N;;;;; -123D;ETHIOPIC SYLLABLE SHE;Lo;0;L;;;;;N;;;;; -123E;ETHIOPIC SYLLABLE SHO;Lo;0;L;;;;;N;;;;; -123F;ETHIOPIC SYLLABLE SHWA;Lo;0;L;;;;;N;;;;; -1240;ETHIOPIC SYLLABLE QA;Lo;0;L;;;;;N;;;;; -1241;ETHIOPIC SYLLABLE QU;Lo;0;L;;;;;N;;;;; -1242;ETHIOPIC SYLLABLE QI;Lo;0;L;;;;;N;;;;; -1243;ETHIOPIC SYLLABLE QAA;Lo;0;L;;;;;N;;;;; -1244;ETHIOPIC SYLLABLE QEE;Lo;0;L;;;;;N;;;;; -1245;ETHIOPIC SYLLABLE QE;Lo;0;L;;;;;N;;;;; -1246;ETHIOPIC SYLLABLE QO;Lo;0;L;;;;;N;;;;; -1248;ETHIOPIC SYLLABLE QWA;Lo;0;L;;;;;N;;;;; -124A;ETHIOPIC SYLLABLE QWI;Lo;0;L;;;;;N;;;;; -124B;ETHIOPIC SYLLABLE QWAA;Lo;0;L;;;;;N;;;;; -124C;ETHIOPIC SYLLABLE QWEE;Lo;0;L;;;;;N;;;;; -124D;ETHIOPIC SYLLABLE QWE;Lo;0;L;;;;;N;;;;; -1250;ETHIOPIC SYLLABLE QHA;Lo;0;L;;;;;N;;;;; -1251;ETHIOPIC SYLLABLE QHU;Lo;0;L;;;;;N;;;;; -1252;ETHIOPIC SYLLABLE QHI;Lo;0;L;;;;;N;;;;; -1253;ETHIOPIC SYLLABLE QHAA;Lo;0;L;;;;;N;;;;; -1254;ETHIOPIC SYLLABLE QHEE;Lo;0;L;;;;;N;;;;; -1255;ETHIOPIC SYLLABLE QHE;Lo;0;L;;;;;N;;;;; -1256;ETHIOPIC SYLLABLE QHO;Lo;0;L;;;;;N;;;;; -1258;ETHIOPIC SYLLABLE QHWA;Lo;0;L;;;;;N;;;;; -125A;ETHIOPIC SYLLABLE QHWI;Lo;0;L;;;;;N;;;;; -125B;ETHIOPIC SYLLABLE QHWAA;Lo;0;L;;;;;N;;;;; -125C;ETHIOPIC SYLLABLE QHWEE;Lo;0;L;;;;;N;;;;; -125D;ETHIOPIC SYLLABLE QHWE;Lo;0;L;;;;;N;;;;; -1260;ETHIOPIC SYLLABLE BA;Lo;0;L;;;;;N;;;;; -1261;ETHIOPIC SYLLABLE BU;Lo;0;L;;;;;N;;;;; -1262;ETHIOPIC SYLLABLE BI;Lo;0;L;;;;;N;;;;; -1263;ETHIOPIC SYLLABLE BAA;Lo;0;L;;;;;N;;;;; -1264;ETHIOPIC SYLLABLE BEE;Lo;0;L;;;;;N;;;;; -1265;ETHIOPIC SYLLABLE BE;Lo;0;L;;;;;N;;;;; -1266;ETHIOPIC SYLLABLE BO;Lo;0;L;;;;;N;;;;; -1267;ETHIOPIC SYLLABLE BWA;Lo;0;L;;;;;N;;;;; -1268;ETHIOPIC SYLLABLE VA;Lo;0;L;;;;;N;;;;; -1269;ETHIOPIC SYLLABLE VU;Lo;0;L;;;;;N;;;;; -126A;ETHIOPIC SYLLABLE VI;Lo;0;L;;;;;N;;;;; -126B;ETHIOPIC SYLLABLE VAA;Lo;0;L;;;;;N;;;;; -126C;ETHIOPIC SYLLABLE VEE;Lo;0;L;;;;;N;;;;; -126D;ETHIOPIC SYLLABLE VE;Lo;0;L;;;;;N;;;;; -126E;ETHIOPIC SYLLABLE VO;Lo;0;L;;;;;N;;;;; -126F;ETHIOPIC SYLLABLE VWA;Lo;0;L;;;;;N;;;;; -1270;ETHIOPIC SYLLABLE TA;Lo;0;L;;;;;N;;;;; -1271;ETHIOPIC SYLLABLE TU;Lo;0;L;;;;;N;;;;; -1272;ETHIOPIC SYLLABLE TI;Lo;0;L;;;;;N;;;;; -1273;ETHIOPIC SYLLABLE TAA;Lo;0;L;;;;;N;;;;; -1274;ETHIOPIC SYLLABLE TEE;Lo;0;L;;;;;N;;;;; -1275;ETHIOPIC SYLLABLE TE;Lo;0;L;;;;;N;;;;; -1276;ETHIOPIC SYLLABLE TO;Lo;0;L;;;;;N;;;;; -1277;ETHIOPIC SYLLABLE TWA;Lo;0;L;;;;;N;;;;; -1278;ETHIOPIC SYLLABLE CA;Lo;0;L;;;;;N;;;;; -1279;ETHIOPIC SYLLABLE CU;Lo;0;L;;;;;N;;;;; -127A;ETHIOPIC SYLLABLE CI;Lo;0;L;;;;;N;;;;; -127B;ETHIOPIC SYLLABLE CAA;Lo;0;L;;;;;N;;;;; -127C;ETHIOPIC SYLLABLE CEE;Lo;0;L;;;;;N;;;;; -127D;ETHIOPIC SYLLABLE CE;Lo;0;L;;;;;N;;;;; -127E;ETHIOPIC SYLLABLE CO;Lo;0;L;;;;;N;;;;; -127F;ETHIOPIC SYLLABLE CWA;Lo;0;L;;;;;N;;;;; -1280;ETHIOPIC SYLLABLE XA;Lo;0;L;;;;;N;;;;; -1281;ETHIOPIC SYLLABLE XU;Lo;0;L;;;;;N;;;;; -1282;ETHIOPIC SYLLABLE XI;Lo;0;L;;;;;N;;;;; -1283;ETHIOPIC SYLLABLE XAA;Lo;0;L;;;;;N;;;;; -1284;ETHIOPIC SYLLABLE XEE;Lo;0;L;;;;;N;;;;; -1285;ETHIOPIC SYLLABLE XE;Lo;0;L;;;;;N;;;;; -1286;ETHIOPIC SYLLABLE XO;Lo;0;L;;;;;N;;;;; -1288;ETHIOPIC SYLLABLE XWA;Lo;0;L;;;;;N;;;;; -128A;ETHIOPIC SYLLABLE XWI;Lo;0;L;;;;;N;;;;; -128B;ETHIOPIC SYLLABLE XWAA;Lo;0;L;;;;;N;;;;; -128C;ETHIOPIC SYLLABLE XWEE;Lo;0;L;;;;;N;;;;; -128D;ETHIOPIC SYLLABLE XWE;Lo;0;L;;;;;N;;;;; -1290;ETHIOPIC SYLLABLE NA;Lo;0;L;;;;;N;;;;; -1291;ETHIOPIC SYLLABLE NU;Lo;0;L;;;;;N;;;;; -1292;ETHIOPIC SYLLABLE NI;Lo;0;L;;;;;N;;;;; -1293;ETHIOPIC SYLLABLE NAA;Lo;0;L;;;;;N;;;;; -1294;ETHIOPIC SYLLABLE NEE;Lo;0;L;;;;;N;;;;; -1295;ETHIOPIC SYLLABLE NE;Lo;0;L;;;;;N;;;;; -1296;ETHIOPIC SYLLABLE NO;Lo;0;L;;;;;N;;;;; -1297;ETHIOPIC SYLLABLE NWA;Lo;0;L;;;;;N;;;;; -1298;ETHIOPIC SYLLABLE NYA;Lo;0;L;;;;;N;;;;; -1299;ETHIOPIC SYLLABLE NYU;Lo;0;L;;;;;N;;;;; -129A;ETHIOPIC SYLLABLE NYI;Lo;0;L;;;;;N;;;;; -129B;ETHIOPIC SYLLABLE NYAA;Lo;0;L;;;;;N;;;;; -129C;ETHIOPIC SYLLABLE NYEE;Lo;0;L;;;;;N;;;;; -129D;ETHIOPIC SYLLABLE NYE;Lo;0;L;;;;;N;;;;; -129E;ETHIOPIC SYLLABLE NYO;Lo;0;L;;;;;N;;;;; -129F;ETHIOPIC SYLLABLE NYWA;Lo;0;L;;;;;N;;;;; -12A0;ETHIOPIC SYLLABLE GLOTTAL A;Lo;0;L;;;;;N;;;;; -12A1;ETHIOPIC SYLLABLE GLOTTAL U;Lo;0;L;;;;;N;;;;; -12A2;ETHIOPIC SYLLABLE GLOTTAL I;Lo;0;L;;;;;N;;;;; -12A3;ETHIOPIC SYLLABLE GLOTTAL AA;Lo;0;L;;;;;N;;;;; -12A4;ETHIOPIC SYLLABLE GLOTTAL EE;Lo;0;L;;;;;N;;;;; -12A5;ETHIOPIC SYLLABLE GLOTTAL E;Lo;0;L;;;;;N;;;;; -12A6;ETHIOPIC SYLLABLE GLOTTAL O;Lo;0;L;;;;;N;;;;; -12A7;ETHIOPIC SYLLABLE GLOTTAL WA;Lo;0;L;;;;;N;;;;; -12A8;ETHIOPIC SYLLABLE KA;Lo;0;L;;;;;N;;;;; -12A9;ETHIOPIC SYLLABLE KU;Lo;0;L;;;;;N;;;;; -12AA;ETHIOPIC SYLLABLE KI;Lo;0;L;;;;;N;;;;; -12AB;ETHIOPIC SYLLABLE KAA;Lo;0;L;;;;;N;;;;; -12AC;ETHIOPIC SYLLABLE KEE;Lo;0;L;;;;;N;;;;; -12AD;ETHIOPIC SYLLABLE KE;Lo;0;L;;;;;N;;;;; -12AE;ETHIOPIC SYLLABLE KO;Lo;0;L;;;;;N;;;;; -12B0;ETHIOPIC SYLLABLE KWA;Lo;0;L;;;;;N;;;;; -12B2;ETHIOPIC SYLLABLE KWI;Lo;0;L;;;;;N;;;;; -12B3;ETHIOPIC SYLLABLE KWAA;Lo;0;L;;;;;N;;;;; -12B4;ETHIOPIC SYLLABLE KWEE;Lo;0;L;;;;;N;;;;; -12B5;ETHIOPIC SYLLABLE KWE;Lo;0;L;;;;;N;;;;; -12B8;ETHIOPIC SYLLABLE KXA;Lo;0;L;;;;;N;;;;; -12B9;ETHIOPIC SYLLABLE KXU;Lo;0;L;;;;;N;;;;; -12BA;ETHIOPIC SYLLABLE KXI;Lo;0;L;;;;;N;;;;; -12BB;ETHIOPIC SYLLABLE KXAA;Lo;0;L;;;;;N;;;;; -12BC;ETHIOPIC SYLLABLE KXEE;Lo;0;L;;;;;N;;;;; -12BD;ETHIOPIC SYLLABLE KXE;Lo;0;L;;;;;N;;;;; -12BE;ETHIOPIC SYLLABLE KXO;Lo;0;L;;;;;N;;;;; -12C0;ETHIOPIC SYLLABLE KXWA;Lo;0;L;;;;;N;;;;; -12C2;ETHIOPIC SYLLABLE KXWI;Lo;0;L;;;;;N;;;;; -12C3;ETHIOPIC SYLLABLE KXWAA;Lo;0;L;;;;;N;;;;; -12C4;ETHIOPIC SYLLABLE KXWEE;Lo;0;L;;;;;N;;;;; -12C5;ETHIOPIC SYLLABLE KXWE;Lo;0;L;;;;;N;;;;; -12C8;ETHIOPIC SYLLABLE WA;Lo;0;L;;;;;N;;;;; -12C9;ETHIOPIC SYLLABLE WU;Lo;0;L;;;;;N;;;;; -12CA;ETHIOPIC SYLLABLE WI;Lo;0;L;;;;;N;;;;; -12CB;ETHIOPIC SYLLABLE WAA;Lo;0;L;;;;;N;;;;; -12CC;ETHIOPIC SYLLABLE WEE;Lo;0;L;;;;;N;;;;; -12CD;ETHIOPIC SYLLABLE WE;Lo;0;L;;;;;N;;;;; -12CE;ETHIOPIC SYLLABLE WO;Lo;0;L;;;;;N;;;;; -12D0;ETHIOPIC SYLLABLE PHARYNGEAL A;Lo;0;L;;;;;N;;;;; -12D1;ETHIOPIC SYLLABLE PHARYNGEAL U;Lo;0;L;;;;;N;;;;; -12D2;ETHIOPIC SYLLABLE PHARYNGEAL I;Lo;0;L;;;;;N;;;;; -12D3;ETHIOPIC SYLLABLE PHARYNGEAL AA;Lo;0;L;;;;;N;;;;; -12D4;ETHIOPIC SYLLABLE PHARYNGEAL EE;Lo;0;L;;;;;N;;;;; -12D5;ETHIOPIC SYLLABLE PHARYNGEAL E;Lo;0;L;;;;;N;;;;; -12D6;ETHIOPIC SYLLABLE PHARYNGEAL O;Lo;0;L;;;;;N;;;;; -12D8;ETHIOPIC SYLLABLE ZA;Lo;0;L;;;;;N;;;;; -12D9;ETHIOPIC SYLLABLE ZU;Lo;0;L;;;;;N;;;;; -12DA;ETHIOPIC SYLLABLE ZI;Lo;0;L;;;;;N;;;;; -12DB;ETHIOPIC SYLLABLE ZAA;Lo;0;L;;;;;N;;;;; -12DC;ETHIOPIC SYLLABLE ZEE;Lo;0;L;;;;;N;;;;; -12DD;ETHIOPIC SYLLABLE ZE;Lo;0;L;;;;;N;;;;; -12DE;ETHIOPIC SYLLABLE ZO;Lo;0;L;;;;;N;;;;; -12DF;ETHIOPIC SYLLABLE ZWA;Lo;0;L;;;;;N;;;;; -12E0;ETHIOPIC SYLLABLE ZHA;Lo;0;L;;;;;N;;;;; -12E1;ETHIOPIC SYLLABLE ZHU;Lo;0;L;;;;;N;;;;; -12E2;ETHIOPIC SYLLABLE ZHI;Lo;0;L;;;;;N;;;;; -12E3;ETHIOPIC SYLLABLE ZHAA;Lo;0;L;;;;;N;;;;; -12E4;ETHIOPIC SYLLABLE ZHEE;Lo;0;L;;;;;N;;;;; -12E5;ETHIOPIC SYLLABLE ZHE;Lo;0;L;;;;;N;;;;; -12E6;ETHIOPIC SYLLABLE ZHO;Lo;0;L;;;;;N;;;;; -12E7;ETHIOPIC SYLLABLE ZHWA;Lo;0;L;;;;;N;;;;; -12E8;ETHIOPIC SYLLABLE YA;Lo;0;L;;;;;N;;;;; -12E9;ETHIOPIC SYLLABLE YU;Lo;0;L;;;;;N;;;;; -12EA;ETHIOPIC SYLLABLE YI;Lo;0;L;;;;;N;;;;; -12EB;ETHIOPIC SYLLABLE YAA;Lo;0;L;;;;;N;;;;; -12EC;ETHIOPIC SYLLABLE YEE;Lo;0;L;;;;;N;;;;; -12ED;ETHIOPIC SYLLABLE YE;Lo;0;L;;;;;N;;;;; -12EE;ETHIOPIC SYLLABLE YO;Lo;0;L;;;;;N;;;;; -12F0;ETHIOPIC SYLLABLE DA;Lo;0;L;;;;;N;;;;; -12F1;ETHIOPIC SYLLABLE DU;Lo;0;L;;;;;N;;;;; -12F2;ETHIOPIC SYLLABLE DI;Lo;0;L;;;;;N;;;;; -12F3;ETHIOPIC SYLLABLE DAA;Lo;0;L;;;;;N;;;;; -12F4;ETHIOPIC SYLLABLE DEE;Lo;0;L;;;;;N;;;;; -12F5;ETHIOPIC SYLLABLE DE;Lo;0;L;;;;;N;;;;; -12F6;ETHIOPIC SYLLABLE DO;Lo;0;L;;;;;N;;;;; -12F7;ETHIOPIC SYLLABLE DWA;Lo;0;L;;;;;N;;;;; -12F8;ETHIOPIC SYLLABLE DDA;Lo;0;L;;;;;N;;;;; -12F9;ETHIOPIC SYLLABLE DDU;Lo;0;L;;;;;N;;;;; -12FA;ETHIOPIC SYLLABLE DDI;Lo;0;L;;;;;N;;;;; -12FB;ETHIOPIC SYLLABLE DDAA;Lo;0;L;;;;;N;;;;; -12FC;ETHIOPIC SYLLABLE DDEE;Lo;0;L;;;;;N;;;;; -12FD;ETHIOPIC SYLLABLE DDE;Lo;0;L;;;;;N;;;;; -12FE;ETHIOPIC SYLLABLE DDO;Lo;0;L;;;;;N;;;;; -12FF;ETHIOPIC SYLLABLE DDWA;Lo;0;L;;;;;N;;;;; -1300;ETHIOPIC SYLLABLE JA;Lo;0;L;;;;;N;;;;; -1301;ETHIOPIC SYLLABLE JU;Lo;0;L;;;;;N;;;;; -1302;ETHIOPIC SYLLABLE JI;Lo;0;L;;;;;N;;;;; -1303;ETHIOPIC SYLLABLE JAA;Lo;0;L;;;;;N;;;;; -1304;ETHIOPIC SYLLABLE JEE;Lo;0;L;;;;;N;;;;; -1305;ETHIOPIC SYLLABLE JE;Lo;0;L;;;;;N;;;;; -1306;ETHIOPIC SYLLABLE JO;Lo;0;L;;;;;N;;;;; -1307;ETHIOPIC SYLLABLE JWA;Lo;0;L;;;;;N;;;;; -1308;ETHIOPIC SYLLABLE GA;Lo;0;L;;;;;N;;;;; -1309;ETHIOPIC SYLLABLE GU;Lo;0;L;;;;;N;;;;; -130A;ETHIOPIC SYLLABLE GI;Lo;0;L;;;;;N;;;;; -130B;ETHIOPIC SYLLABLE GAA;Lo;0;L;;;;;N;;;;; -130C;ETHIOPIC SYLLABLE GEE;Lo;0;L;;;;;N;;;;; -130D;ETHIOPIC SYLLABLE GE;Lo;0;L;;;;;N;;;;; -130E;ETHIOPIC SYLLABLE GO;Lo;0;L;;;;;N;;;;; -1310;ETHIOPIC SYLLABLE GWA;Lo;0;L;;;;;N;;;;; -1312;ETHIOPIC SYLLABLE GWI;Lo;0;L;;;;;N;;;;; -1313;ETHIOPIC SYLLABLE GWAA;Lo;0;L;;;;;N;;;;; -1314;ETHIOPIC SYLLABLE GWEE;Lo;0;L;;;;;N;;;;; -1315;ETHIOPIC SYLLABLE GWE;Lo;0;L;;;;;N;;;;; -1318;ETHIOPIC SYLLABLE GGA;Lo;0;L;;;;;N;;;;; -1319;ETHIOPIC SYLLABLE GGU;Lo;0;L;;;;;N;;;;; -131A;ETHIOPIC SYLLABLE GGI;Lo;0;L;;;;;N;;;;; -131B;ETHIOPIC SYLLABLE GGAA;Lo;0;L;;;;;N;;;;; -131C;ETHIOPIC SYLLABLE GGEE;Lo;0;L;;;;;N;;;;; -131D;ETHIOPIC SYLLABLE GGE;Lo;0;L;;;;;N;;;;; -131E;ETHIOPIC SYLLABLE GGO;Lo;0;L;;;;;N;;;;; -1320;ETHIOPIC SYLLABLE THA;Lo;0;L;;;;;N;;;;; -1321;ETHIOPIC SYLLABLE THU;Lo;0;L;;;;;N;;;;; -1322;ETHIOPIC SYLLABLE THI;Lo;0;L;;;;;N;;;;; -1323;ETHIOPIC SYLLABLE THAA;Lo;0;L;;;;;N;;;;; -1324;ETHIOPIC SYLLABLE THEE;Lo;0;L;;;;;N;;;;; -1325;ETHIOPIC SYLLABLE THE;Lo;0;L;;;;;N;;;;; -1326;ETHIOPIC SYLLABLE THO;Lo;0;L;;;;;N;;;;; -1327;ETHIOPIC SYLLABLE THWA;Lo;0;L;;;;;N;;;;; -1328;ETHIOPIC SYLLABLE CHA;Lo;0;L;;;;;N;;;;; -1329;ETHIOPIC SYLLABLE CHU;Lo;0;L;;;;;N;;;;; -132A;ETHIOPIC SYLLABLE CHI;Lo;0;L;;;;;N;;;;; -132B;ETHIOPIC SYLLABLE CHAA;Lo;0;L;;;;;N;;;;; -132C;ETHIOPIC SYLLABLE CHEE;Lo;0;L;;;;;N;;;;; -132D;ETHIOPIC SYLLABLE CHE;Lo;0;L;;;;;N;;;;; -132E;ETHIOPIC SYLLABLE CHO;Lo;0;L;;;;;N;;;;; -132F;ETHIOPIC SYLLABLE CHWA;Lo;0;L;;;;;N;;;;; -1330;ETHIOPIC SYLLABLE PHA;Lo;0;L;;;;;N;;;;; -1331;ETHIOPIC SYLLABLE PHU;Lo;0;L;;;;;N;;;;; -1332;ETHIOPIC SYLLABLE PHI;Lo;0;L;;;;;N;;;;; -1333;ETHIOPIC SYLLABLE PHAA;Lo;0;L;;;;;N;;;;; -1334;ETHIOPIC SYLLABLE PHEE;Lo;0;L;;;;;N;;;;; -1335;ETHIOPIC SYLLABLE PHE;Lo;0;L;;;;;N;;;;; -1336;ETHIOPIC SYLLABLE PHO;Lo;0;L;;;;;N;;;;; -1337;ETHIOPIC SYLLABLE PHWA;Lo;0;L;;;;;N;;;;; -1338;ETHIOPIC SYLLABLE TSA;Lo;0;L;;;;;N;;;;; -1339;ETHIOPIC SYLLABLE TSU;Lo;0;L;;;;;N;;;;; -133A;ETHIOPIC SYLLABLE TSI;Lo;0;L;;;;;N;;;;; -133B;ETHIOPIC SYLLABLE TSAA;Lo;0;L;;;;;N;;;;; -133C;ETHIOPIC SYLLABLE TSEE;Lo;0;L;;;;;N;;;;; -133D;ETHIOPIC SYLLABLE TSE;Lo;0;L;;;;;N;;;;; -133E;ETHIOPIC SYLLABLE TSO;Lo;0;L;;;;;N;;;;; -133F;ETHIOPIC SYLLABLE TSWA;Lo;0;L;;;;;N;;;;; -1340;ETHIOPIC SYLLABLE TZA;Lo;0;L;;;;;N;;;;; -1341;ETHIOPIC SYLLABLE TZU;Lo;0;L;;;;;N;;;;; -1342;ETHIOPIC SYLLABLE TZI;Lo;0;L;;;;;N;;;;; -1343;ETHIOPIC SYLLABLE TZAA;Lo;0;L;;;;;N;;;;; -1344;ETHIOPIC SYLLABLE TZEE;Lo;0;L;;;;;N;;;;; -1345;ETHIOPIC SYLLABLE TZE;Lo;0;L;;;;;N;;;;; -1346;ETHIOPIC SYLLABLE TZO;Lo;0;L;;;;;N;;;;; -1348;ETHIOPIC SYLLABLE FA;Lo;0;L;;;;;N;;;;; -1349;ETHIOPIC SYLLABLE FU;Lo;0;L;;;;;N;;;;; -134A;ETHIOPIC SYLLABLE FI;Lo;0;L;;;;;N;;;;; -134B;ETHIOPIC SYLLABLE FAA;Lo;0;L;;;;;N;;;;; -134C;ETHIOPIC SYLLABLE FEE;Lo;0;L;;;;;N;;;;; -134D;ETHIOPIC SYLLABLE FE;Lo;0;L;;;;;N;;;;; -134E;ETHIOPIC SYLLABLE FO;Lo;0;L;;;;;N;;;;; -134F;ETHIOPIC SYLLABLE FWA;Lo;0;L;;;;;N;;;;; -1350;ETHIOPIC SYLLABLE PA;Lo;0;L;;;;;N;;;;; -1351;ETHIOPIC SYLLABLE PU;Lo;0;L;;;;;N;;;;; -1352;ETHIOPIC SYLLABLE PI;Lo;0;L;;;;;N;;;;; -1353;ETHIOPIC SYLLABLE PAA;Lo;0;L;;;;;N;;;;; -1354;ETHIOPIC SYLLABLE PEE;Lo;0;L;;;;;N;;;;; -1355;ETHIOPIC SYLLABLE PE;Lo;0;L;;;;;N;;;;; -1356;ETHIOPIC SYLLABLE PO;Lo;0;L;;;;;N;;;;; -1357;ETHIOPIC SYLLABLE PWA;Lo;0;L;;;;;N;;;;; -1358;ETHIOPIC SYLLABLE RYA;Lo;0;L;;;;;N;;;;; -1359;ETHIOPIC SYLLABLE MYA;Lo;0;L;;;;;N;;;;; -135A;ETHIOPIC SYLLABLE FYA;Lo;0;L;;;;;N;;;;; -1361;ETHIOPIC WORDSPACE;Po;0;L;;;;;N;;;;; -1362;ETHIOPIC FULL STOP;Po;0;L;;;;;N;;;;; -1363;ETHIOPIC COMMA;Po;0;L;;;;;N;;;;; -1364;ETHIOPIC SEMICOLON;Po;0;L;;;;;N;;;;; -1365;ETHIOPIC COLON;Po;0;L;;;;;N;;;;; -1366;ETHIOPIC PREFACE COLON;Po;0;L;;;;;N;;;;; -1367;ETHIOPIC QUESTION MARK;Po;0;L;;;;;N;;;;; -1368;ETHIOPIC PARAGRAPH SEPARATOR;Po;0;L;;;;;N;;;;; -1369;ETHIOPIC DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -136A;ETHIOPIC DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -136B;ETHIOPIC DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -136C;ETHIOPIC DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -136D;ETHIOPIC DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -136E;ETHIOPIC DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -136F;ETHIOPIC DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -1370;ETHIOPIC DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -1371;ETHIOPIC DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -1372;ETHIOPIC NUMBER TEN;No;0;L;;;;10;N;;;;; -1373;ETHIOPIC NUMBER TWENTY;No;0;L;;;;20;N;;;;; -1374;ETHIOPIC NUMBER THIRTY;No;0;L;;;;30;N;;;;; -1375;ETHIOPIC NUMBER FORTY;No;0;L;;;;40;N;;;;; -1376;ETHIOPIC NUMBER FIFTY;No;0;L;;;;50;N;;;;; -1377;ETHIOPIC NUMBER SIXTY;No;0;L;;;;60;N;;;;; -1378;ETHIOPIC NUMBER SEVENTY;No;0;L;;;;70;N;;;;; -1379;ETHIOPIC NUMBER EIGHTY;No;0;L;;;;80;N;;;;; -137A;ETHIOPIC NUMBER NINETY;No;0;L;;;;90;N;;;;; -137B;ETHIOPIC NUMBER HUNDRED;No;0;L;;;;100;N;;;;; -137C;ETHIOPIC NUMBER TEN THOUSAND;No;0;L;;;;10000;N;;;;; -13A0;CHEROKEE LETTER A;Lo;0;L;;;;;N;;;;; -13A1;CHEROKEE LETTER E;Lo;0;L;;;;;N;;;;; -13A2;CHEROKEE LETTER I;Lo;0;L;;;;;N;;;;; -13A3;CHEROKEE LETTER O;Lo;0;L;;;;;N;;;;; -13A4;CHEROKEE LETTER U;Lo;0;L;;;;;N;;;;; -13A5;CHEROKEE LETTER V;Lo;0;L;;;;;N;;;;; -13A6;CHEROKEE LETTER GA;Lo;0;L;;;;;N;;;;; -13A7;CHEROKEE LETTER KA;Lo;0;L;;;;;N;;;;; -13A8;CHEROKEE LETTER GE;Lo;0;L;;;;;N;;;;; -13A9;CHEROKEE LETTER GI;Lo;0;L;;;;;N;;;;; -13AA;CHEROKEE LETTER GO;Lo;0;L;;;;;N;;;;; -13AB;CHEROKEE LETTER GU;Lo;0;L;;;;;N;;;;; -13AC;CHEROKEE LETTER GV;Lo;0;L;;;;;N;;;;; -13AD;CHEROKEE LETTER HA;Lo;0;L;;;;;N;;;;; -13AE;CHEROKEE LETTER HE;Lo;0;L;;;;;N;;;;; -13AF;CHEROKEE LETTER HI;Lo;0;L;;;;;N;;;;; -13B0;CHEROKEE LETTER HO;Lo;0;L;;;;;N;;;;; -13B1;CHEROKEE LETTER HU;Lo;0;L;;;;;N;;;;; -13B2;CHEROKEE LETTER HV;Lo;0;L;;;;;N;;;;; -13B3;CHEROKEE LETTER LA;Lo;0;L;;;;;N;;;;; -13B4;CHEROKEE LETTER LE;Lo;0;L;;;;;N;;;;; -13B5;CHEROKEE LETTER LI;Lo;0;L;;;;;N;;;;; -13B6;CHEROKEE LETTER LO;Lo;0;L;;;;;N;;;;; -13B7;CHEROKEE LETTER LU;Lo;0;L;;;;;N;;;;; -13B8;CHEROKEE LETTER LV;Lo;0;L;;;;;N;;;;; -13B9;CHEROKEE LETTER MA;Lo;0;L;;;;;N;;;;; -13BA;CHEROKEE LETTER ME;Lo;0;L;;;;;N;;;;; -13BB;CHEROKEE LETTER MI;Lo;0;L;;;;;N;;;;; -13BC;CHEROKEE LETTER MO;Lo;0;L;;;;;N;;;;; -13BD;CHEROKEE LETTER MU;Lo;0;L;;;;;N;;;;; -13BE;CHEROKEE LETTER NA;Lo;0;L;;;;;N;;;;; -13BF;CHEROKEE LETTER HNA;Lo;0;L;;;;;N;;;;; -13C0;CHEROKEE LETTER NAH;Lo;0;L;;;;;N;;;;; -13C1;CHEROKEE LETTER NE;Lo;0;L;;;;;N;;;;; -13C2;CHEROKEE LETTER NI;Lo;0;L;;;;;N;;;;; -13C3;CHEROKEE LETTER NO;Lo;0;L;;;;;N;;;;; -13C4;CHEROKEE LETTER NU;Lo;0;L;;;;;N;;;;; -13C5;CHEROKEE LETTER NV;Lo;0;L;;;;;N;;;;; -13C6;CHEROKEE LETTER QUA;Lo;0;L;;;;;N;;;;; -13C7;CHEROKEE LETTER QUE;Lo;0;L;;;;;N;;;;; -13C8;CHEROKEE LETTER QUI;Lo;0;L;;;;;N;;;;; -13C9;CHEROKEE LETTER QUO;Lo;0;L;;;;;N;;;;; -13CA;CHEROKEE LETTER QUU;Lo;0;L;;;;;N;;;;; -13CB;CHEROKEE LETTER QUV;Lo;0;L;;;;;N;;;;; -13CC;CHEROKEE LETTER SA;Lo;0;L;;;;;N;;;;; -13CD;CHEROKEE LETTER S;Lo;0;L;;;;;N;;;;; -13CE;CHEROKEE LETTER SE;Lo;0;L;;;;;N;;;;; -13CF;CHEROKEE LETTER SI;Lo;0;L;;;;;N;;;;; -13D0;CHEROKEE LETTER SO;Lo;0;L;;;;;N;;;;; -13D1;CHEROKEE LETTER SU;Lo;0;L;;;;;N;;;;; -13D2;CHEROKEE LETTER SV;Lo;0;L;;;;;N;;;;; -13D3;CHEROKEE LETTER DA;Lo;0;L;;;;;N;;;;; -13D4;CHEROKEE LETTER TA;Lo;0;L;;;;;N;;;;; -13D5;CHEROKEE LETTER DE;Lo;0;L;;;;;N;;;;; -13D6;CHEROKEE LETTER TE;Lo;0;L;;;;;N;;;;; -13D7;CHEROKEE LETTER DI;Lo;0;L;;;;;N;;;;; -13D8;CHEROKEE LETTER TI;Lo;0;L;;;;;N;;;;; -13D9;CHEROKEE LETTER DO;Lo;0;L;;;;;N;;;;; -13DA;CHEROKEE LETTER DU;Lo;0;L;;;;;N;;;;; -13DB;CHEROKEE LETTER DV;Lo;0;L;;;;;N;;;;; -13DC;CHEROKEE LETTER DLA;Lo;0;L;;;;;N;;;;; -13DD;CHEROKEE LETTER TLA;Lo;0;L;;;;;N;;;;; -13DE;CHEROKEE LETTER TLE;Lo;0;L;;;;;N;;;;; -13DF;CHEROKEE LETTER TLI;Lo;0;L;;;;;N;;;;; -13E0;CHEROKEE LETTER TLO;Lo;0;L;;;;;N;;;;; -13E1;CHEROKEE LETTER TLU;Lo;0;L;;;;;N;;;;; -13E2;CHEROKEE LETTER TLV;Lo;0;L;;;;;N;;;;; -13E3;CHEROKEE LETTER TSA;Lo;0;L;;;;;N;;;;; -13E4;CHEROKEE LETTER TSE;Lo;0;L;;;;;N;;;;; -13E5;CHEROKEE LETTER TSI;Lo;0;L;;;;;N;;;;; -13E6;CHEROKEE LETTER TSO;Lo;0;L;;;;;N;;;;; -13E7;CHEROKEE LETTER TSU;Lo;0;L;;;;;N;;;;; -13E8;CHEROKEE LETTER TSV;Lo;0;L;;;;;N;;;;; -13E9;CHEROKEE LETTER WA;Lo;0;L;;;;;N;;;;; -13EA;CHEROKEE LETTER WE;Lo;0;L;;;;;N;;;;; -13EB;CHEROKEE LETTER WI;Lo;0;L;;;;;N;;;;; -13EC;CHEROKEE LETTER WO;Lo;0;L;;;;;N;;;;; -13ED;CHEROKEE LETTER WU;Lo;0;L;;;;;N;;;;; -13EE;CHEROKEE LETTER WV;Lo;0;L;;;;;N;;;;; -13EF;CHEROKEE LETTER YA;Lo;0;L;;;;;N;;;;; -13F0;CHEROKEE LETTER YE;Lo;0;L;;;;;N;;;;; -13F1;CHEROKEE LETTER YI;Lo;0;L;;;;;N;;;;; -13F2;CHEROKEE LETTER YO;Lo;0;L;;;;;N;;;;; -13F3;CHEROKEE LETTER YU;Lo;0;L;;;;;N;;;;; -13F4;CHEROKEE LETTER YV;Lo;0;L;;;;;N;;;;; -1401;CANADIAN SYLLABICS E;Lo;0;L;;;;;N;;;;; -1402;CANADIAN SYLLABICS AAI;Lo;0;L;;;;;N;;;;; -1403;CANADIAN SYLLABICS I;Lo;0;L;;;;;N;;;;; -1404;CANADIAN SYLLABICS II;Lo;0;L;;;;;N;;;;; -1405;CANADIAN SYLLABICS O;Lo;0;L;;;;;N;;;;; -1406;CANADIAN SYLLABICS OO;Lo;0;L;;;;;N;;;;; -1407;CANADIAN SYLLABICS Y-CREE OO;Lo;0;L;;;;;N;;;;; -1408;CANADIAN SYLLABICS CARRIER EE;Lo;0;L;;;;;N;;;;; -1409;CANADIAN SYLLABICS CARRIER I;Lo;0;L;;;;;N;;;;; -140A;CANADIAN SYLLABICS A;Lo;0;L;;;;;N;;;;; -140B;CANADIAN SYLLABICS AA;Lo;0;L;;;;;N;;;;; -140C;CANADIAN SYLLABICS WE;Lo;0;L;;;;;N;;;;; -140D;CANADIAN SYLLABICS WEST-CREE WE;Lo;0;L;;;;;N;;;;; -140E;CANADIAN SYLLABICS WI;Lo;0;L;;;;;N;;;;; -140F;CANADIAN SYLLABICS WEST-CREE WI;Lo;0;L;;;;;N;;;;; -1410;CANADIAN SYLLABICS WII;Lo;0;L;;;;;N;;;;; -1411;CANADIAN SYLLABICS WEST-CREE WII;Lo;0;L;;;;;N;;;;; -1412;CANADIAN SYLLABICS WO;Lo;0;L;;;;;N;;;;; -1413;CANADIAN SYLLABICS WEST-CREE WO;Lo;0;L;;;;;N;;;;; -1414;CANADIAN SYLLABICS WOO;Lo;0;L;;;;;N;;;;; -1415;CANADIAN SYLLABICS WEST-CREE WOO;Lo;0;L;;;;;N;;;;; -1416;CANADIAN SYLLABICS NASKAPI WOO;Lo;0;L;;;;;N;;;;; -1417;CANADIAN SYLLABICS WA;Lo;0;L;;;;;N;;;;; -1418;CANADIAN SYLLABICS WEST-CREE WA;Lo;0;L;;;;;N;;;;; -1419;CANADIAN SYLLABICS WAA;Lo;0;L;;;;;N;;;;; -141A;CANADIAN SYLLABICS WEST-CREE WAA;Lo;0;L;;;;;N;;;;; -141B;CANADIAN SYLLABICS NASKAPI WAA;Lo;0;L;;;;;N;;;;; -141C;CANADIAN SYLLABICS AI;Lo;0;L;;;;;N;;;;; -141D;CANADIAN SYLLABICS Y-CREE W;Lo;0;L;;;;;N;;;;; -141E;CANADIAN SYLLABICS GLOTTAL STOP;Lo;0;L;;;;;N;;;;; -141F;CANADIAN SYLLABICS FINAL ACUTE;Lo;0;L;;;;;N;;;;; -1420;CANADIAN SYLLABICS FINAL GRAVE;Lo;0;L;;;;;N;;;;; -1421;CANADIAN SYLLABICS FINAL BOTTOM HALF RING;Lo;0;L;;;;;N;;;;; -1422;CANADIAN SYLLABICS FINAL TOP HALF RING;Lo;0;L;;;;;N;;;;; -1423;CANADIAN SYLLABICS FINAL RIGHT HALF RING;Lo;0;L;;;;;N;;;;; -1424;CANADIAN SYLLABICS FINAL RING;Lo;0;L;;;;;N;;;;; -1425;CANADIAN SYLLABICS FINAL DOUBLE ACUTE;Lo;0;L;;;;;N;;;;; -1426;CANADIAN SYLLABICS FINAL DOUBLE SHORT VERTICAL STROKES;Lo;0;L;;;;;N;;;;; -1427;CANADIAN SYLLABICS FINAL MIDDLE DOT;Lo;0;L;;;;;N;;;;; -1428;CANADIAN SYLLABICS FINAL SHORT HORIZONTAL STROKE;Lo;0;L;;;;;N;;;;; -1429;CANADIAN SYLLABICS FINAL PLUS;Lo;0;L;;;;;N;;;;; -142A;CANADIAN SYLLABICS FINAL DOWN TACK;Lo;0;L;;;;;N;;;;; -142B;CANADIAN SYLLABICS EN;Lo;0;L;;;;;N;;;;; -142C;CANADIAN SYLLABICS IN;Lo;0;L;;;;;N;;;;; -142D;CANADIAN SYLLABICS ON;Lo;0;L;;;;;N;;;;; -142E;CANADIAN SYLLABICS AN;Lo;0;L;;;;;N;;;;; -142F;CANADIAN SYLLABICS PE;Lo;0;L;;;;;N;;;;; -1430;CANADIAN SYLLABICS PAAI;Lo;0;L;;;;;N;;;;; -1431;CANADIAN SYLLABICS PI;Lo;0;L;;;;;N;;;;; -1432;CANADIAN SYLLABICS PII;Lo;0;L;;;;;N;;;;; -1433;CANADIAN SYLLABICS PO;Lo;0;L;;;;;N;;;;; -1434;CANADIAN SYLLABICS POO;Lo;0;L;;;;;N;;;;; -1435;CANADIAN SYLLABICS Y-CREE POO;Lo;0;L;;;;;N;;;;; -1436;CANADIAN SYLLABICS CARRIER HEE;Lo;0;L;;;;;N;;;;; -1437;CANADIAN SYLLABICS CARRIER HI;Lo;0;L;;;;;N;;;;; -1438;CANADIAN SYLLABICS PA;Lo;0;L;;;;;N;;;;; -1439;CANADIAN SYLLABICS PAA;Lo;0;L;;;;;N;;;;; -143A;CANADIAN SYLLABICS PWE;Lo;0;L;;;;;N;;;;; -143B;CANADIAN SYLLABICS WEST-CREE PWE;Lo;0;L;;;;;N;;;;; -143C;CANADIAN SYLLABICS PWI;Lo;0;L;;;;;N;;;;; -143D;CANADIAN SYLLABICS WEST-CREE PWI;Lo;0;L;;;;;N;;;;; -143E;CANADIAN SYLLABICS PWII;Lo;0;L;;;;;N;;;;; -143F;CANADIAN SYLLABICS WEST-CREE PWII;Lo;0;L;;;;;N;;;;; -1440;CANADIAN SYLLABICS PWO;Lo;0;L;;;;;N;;;;; -1441;CANADIAN SYLLABICS WEST-CREE PWO;Lo;0;L;;;;;N;;;;; -1442;CANADIAN SYLLABICS PWOO;Lo;0;L;;;;;N;;;;; -1443;CANADIAN SYLLABICS WEST-CREE PWOO;Lo;0;L;;;;;N;;;;; -1444;CANADIAN SYLLABICS PWA;Lo;0;L;;;;;N;;;;; -1445;CANADIAN SYLLABICS WEST-CREE PWA;Lo;0;L;;;;;N;;;;; -1446;CANADIAN SYLLABICS PWAA;Lo;0;L;;;;;N;;;;; -1447;CANADIAN SYLLABICS WEST-CREE PWAA;Lo;0;L;;;;;N;;;;; -1448;CANADIAN SYLLABICS Y-CREE PWAA;Lo;0;L;;;;;N;;;;; -1449;CANADIAN SYLLABICS P;Lo;0;L;;;;;N;;;;; -144A;CANADIAN SYLLABICS WEST-CREE P;Lo;0;L;;;;;N;;;;; -144B;CANADIAN SYLLABICS CARRIER H;Lo;0;L;;;;;N;;;;; -144C;CANADIAN SYLLABICS TE;Lo;0;L;;;;;N;;;;; -144D;CANADIAN SYLLABICS TAAI;Lo;0;L;;;;;N;;;;; -144E;CANADIAN SYLLABICS TI;Lo;0;L;;;;;N;;;;; -144F;CANADIAN SYLLABICS TII;Lo;0;L;;;;;N;;;;; -1450;CANADIAN SYLLABICS TO;Lo;0;L;;;;;N;;;;; -1451;CANADIAN SYLLABICS TOO;Lo;0;L;;;;;N;;;;; -1452;CANADIAN SYLLABICS Y-CREE TOO;Lo;0;L;;;;;N;;;;; -1453;CANADIAN SYLLABICS CARRIER DEE;Lo;0;L;;;;;N;;;;; -1454;CANADIAN SYLLABICS CARRIER DI;Lo;0;L;;;;;N;;;;; -1455;CANADIAN SYLLABICS TA;Lo;0;L;;;;;N;;;;; -1456;CANADIAN SYLLABICS TAA;Lo;0;L;;;;;N;;;;; -1457;CANADIAN SYLLABICS TWE;Lo;0;L;;;;;N;;;;; -1458;CANADIAN SYLLABICS WEST-CREE TWE;Lo;0;L;;;;;N;;;;; -1459;CANADIAN SYLLABICS TWI;Lo;0;L;;;;;N;;;;; -145A;CANADIAN SYLLABICS WEST-CREE TWI;Lo;0;L;;;;;N;;;;; -145B;CANADIAN SYLLABICS TWII;Lo;0;L;;;;;N;;;;; -145C;CANADIAN SYLLABICS WEST-CREE TWII;Lo;0;L;;;;;N;;;;; -145D;CANADIAN SYLLABICS TWO;Lo;0;L;;;;;N;;;;; -145E;CANADIAN SYLLABICS WEST-CREE TWO;Lo;0;L;;;;;N;;;;; -145F;CANADIAN SYLLABICS TWOO;Lo;0;L;;;;;N;;;;; -1460;CANADIAN SYLLABICS WEST-CREE TWOO;Lo;0;L;;;;;N;;;;; -1461;CANADIAN SYLLABICS TWA;Lo;0;L;;;;;N;;;;; -1462;CANADIAN SYLLABICS WEST-CREE TWA;Lo;0;L;;;;;N;;;;; -1463;CANADIAN SYLLABICS TWAA;Lo;0;L;;;;;N;;;;; -1464;CANADIAN SYLLABICS WEST-CREE TWAA;Lo;0;L;;;;;N;;;;; -1465;CANADIAN SYLLABICS NASKAPI TWAA;Lo;0;L;;;;;N;;;;; -1466;CANADIAN SYLLABICS T;Lo;0;L;;;;;N;;;;; -1467;CANADIAN SYLLABICS TTE;Lo;0;L;;;;;N;;;;; -1468;CANADIAN SYLLABICS TTI;Lo;0;L;;;;;N;;;;; -1469;CANADIAN SYLLABICS TTO;Lo;0;L;;;;;N;;;;; -146A;CANADIAN SYLLABICS TTA;Lo;0;L;;;;;N;;;;; -146B;CANADIAN SYLLABICS KE;Lo;0;L;;;;;N;;;;; -146C;CANADIAN SYLLABICS KAAI;Lo;0;L;;;;;N;;;;; -146D;CANADIAN SYLLABICS KI;Lo;0;L;;;;;N;;;;; -146E;CANADIAN SYLLABICS KII;Lo;0;L;;;;;N;;;;; -146F;CANADIAN SYLLABICS KO;Lo;0;L;;;;;N;;;;; -1470;CANADIAN SYLLABICS KOO;Lo;0;L;;;;;N;;;;; -1471;CANADIAN SYLLABICS Y-CREE KOO;Lo;0;L;;;;;N;;;;; -1472;CANADIAN SYLLABICS KA;Lo;0;L;;;;;N;;;;; -1473;CANADIAN SYLLABICS KAA;Lo;0;L;;;;;N;;;;; -1474;CANADIAN SYLLABICS KWE;Lo;0;L;;;;;N;;;;; -1475;CANADIAN SYLLABICS WEST-CREE KWE;Lo;0;L;;;;;N;;;;; -1476;CANADIAN SYLLABICS KWI;Lo;0;L;;;;;N;;;;; -1477;CANADIAN SYLLABICS WEST-CREE KWI;Lo;0;L;;;;;N;;;;; -1478;CANADIAN SYLLABICS KWII;Lo;0;L;;;;;N;;;;; -1479;CANADIAN SYLLABICS WEST-CREE KWII;Lo;0;L;;;;;N;;;;; -147A;CANADIAN SYLLABICS KWO;Lo;0;L;;;;;N;;;;; -147B;CANADIAN SYLLABICS WEST-CREE KWO;Lo;0;L;;;;;N;;;;; -147C;CANADIAN SYLLABICS KWOO;Lo;0;L;;;;;N;;;;; -147D;CANADIAN SYLLABICS WEST-CREE KWOO;Lo;0;L;;;;;N;;;;; -147E;CANADIAN SYLLABICS KWA;Lo;0;L;;;;;N;;;;; -147F;CANADIAN SYLLABICS WEST-CREE KWA;Lo;0;L;;;;;N;;;;; -1480;CANADIAN SYLLABICS KWAA;Lo;0;L;;;;;N;;;;; -1481;CANADIAN SYLLABICS WEST-CREE KWAA;Lo;0;L;;;;;N;;;;; -1482;CANADIAN SYLLABICS NASKAPI KWAA;Lo;0;L;;;;;N;;;;; -1483;CANADIAN SYLLABICS K;Lo;0;L;;;;;N;;;;; -1484;CANADIAN SYLLABICS KW;Lo;0;L;;;;;N;;;;; -1485;CANADIAN SYLLABICS SOUTH-SLAVEY KEH;Lo;0;L;;;;;N;;;;; -1486;CANADIAN SYLLABICS SOUTH-SLAVEY KIH;Lo;0;L;;;;;N;;;;; -1487;CANADIAN SYLLABICS SOUTH-SLAVEY KOH;Lo;0;L;;;;;N;;;;; -1488;CANADIAN SYLLABICS SOUTH-SLAVEY KAH;Lo;0;L;;;;;N;;;;; -1489;CANADIAN SYLLABICS CE;Lo;0;L;;;;;N;;;;; -148A;CANADIAN SYLLABICS CAAI;Lo;0;L;;;;;N;;;;; -148B;CANADIAN SYLLABICS CI;Lo;0;L;;;;;N;;;;; -148C;CANADIAN SYLLABICS CII;Lo;0;L;;;;;N;;;;; -148D;CANADIAN SYLLABICS CO;Lo;0;L;;;;;N;;;;; -148E;CANADIAN SYLLABICS COO;Lo;0;L;;;;;N;;;;; -148F;CANADIAN SYLLABICS Y-CREE COO;Lo;0;L;;;;;N;;;;; -1490;CANADIAN SYLLABICS CA;Lo;0;L;;;;;N;;;;; -1491;CANADIAN SYLLABICS CAA;Lo;0;L;;;;;N;;;;; -1492;CANADIAN SYLLABICS CWE;Lo;0;L;;;;;N;;;;; -1493;CANADIAN SYLLABICS WEST-CREE CWE;Lo;0;L;;;;;N;;;;; -1494;CANADIAN SYLLABICS CWI;Lo;0;L;;;;;N;;;;; -1495;CANADIAN SYLLABICS WEST-CREE CWI;Lo;0;L;;;;;N;;;;; -1496;CANADIAN SYLLABICS CWII;Lo;0;L;;;;;N;;;;; -1497;CANADIAN SYLLABICS WEST-CREE CWII;Lo;0;L;;;;;N;;;;; -1498;CANADIAN SYLLABICS CWO;Lo;0;L;;;;;N;;;;; -1499;CANADIAN SYLLABICS WEST-CREE CWO;Lo;0;L;;;;;N;;;;; -149A;CANADIAN SYLLABICS CWOO;Lo;0;L;;;;;N;;;;; -149B;CANADIAN SYLLABICS WEST-CREE CWOO;Lo;0;L;;;;;N;;;;; -149C;CANADIAN SYLLABICS CWA;Lo;0;L;;;;;N;;;;; -149D;CANADIAN SYLLABICS WEST-CREE CWA;Lo;0;L;;;;;N;;;;; -149E;CANADIAN SYLLABICS CWAA;Lo;0;L;;;;;N;;;;; -149F;CANADIAN SYLLABICS WEST-CREE CWAA;Lo;0;L;;;;;N;;;;; -14A0;CANADIAN SYLLABICS NASKAPI CWAA;Lo;0;L;;;;;N;;;;; -14A1;CANADIAN SYLLABICS C;Lo;0;L;;;;;N;;;;; -14A2;CANADIAN SYLLABICS SAYISI TH;Lo;0;L;;;;;N;;;;; -14A3;CANADIAN SYLLABICS ME;Lo;0;L;;;;;N;;;;; -14A4;CANADIAN SYLLABICS MAAI;Lo;0;L;;;;;N;;;;; -14A5;CANADIAN SYLLABICS MI;Lo;0;L;;;;;N;;;;; -14A6;CANADIAN SYLLABICS MII;Lo;0;L;;;;;N;;;;; -14A7;CANADIAN SYLLABICS MO;Lo;0;L;;;;;N;;;;; -14A8;CANADIAN SYLLABICS MOO;Lo;0;L;;;;;N;;;;; -14A9;CANADIAN SYLLABICS Y-CREE MOO;Lo;0;L;;;;;N;;;;; -14AA;CANADIAN SYLLABICS MA;Lo;0;L;;;;;N;;;;; -14AB;CANADIAN SYLLABICS MAA;Lo;0;L;;;;;N;;;;; -14AC;CANADIAN SYLLABICS MWE;Lo;0;L;;;;;N;;;;; -14AD;CANADIAN SYLLABICS WEST-CREE MWE;Lo;0;L;;;;;N;;;;; -14AE;CANADIAN SYLLABICS MWI;Lo;0;L;;;;;N;;;;; -14AF;CANADIAN SYLLABICS WEST-CREE MWI;Lo;0;L;;;;;N;;;;; -14B0;CANADIAN SYLLABICS MWII;Lo;0;L;;;;;N;;;;; -14B1;CANADIAN SYLLABICS WEST-CREE MWII;Lo;0;L;;;;;N;;;;; -14B2;CANADIAN SYLLABICS MWO;Lo;0;L;;;;;N;;;;; -14B3;CANADIAN SYLLABICS WEST-CREE MWO;Lo;0;L;;;;;N;;;;; -14B4;CANADIAN SYLLABICS MWOO;Lo;0;L;;;;;N;;;;; -14B5;CANADIAN SYLLABICS WEST-CREE MWOO;Lo;0;L;;;;;N;;;;; -14B6;CANADIAN SYLLABICS MWA;Lo;0;L;;;;;N;;;;; -14B7;CANADIAN SYLLABICS WEST-CREE MWA;Lo;0;L;;;;;N;;;;; -14B8;CANADIAN SYLLABICS MWAA;Lo;0;L;;;;;N;;;;; -14B9;CANADIAN SYLLABICS WEST-CREE MWAA;Lo;0;L;;;;;N;;;;; -14BA;CANADIAN SYLLABICS NASKAPI MWAA;Lo;0;L;;;;;N;;;;; -14BB;CANADIAN SYLLABICS M;Lo;0;L;;;;;N;;;;; -14BC;CANADIAN SYLLABICS WEST-CREE M;Lo;0;L;;;;;N;;;;; -14BD;CANADIAN SYLLABICS MH;Lo;0;L;;;;;N;;;;; -14BE;CANADIAN SYLLABICS ATHAPASCAN M;Lo;0;L;;;;;N;;;;; -14BF;CANADIAN SYLLABICS SAYISI M;Lo;0;L;;;;;N;;;;; -14C0;CANADIAN SYLLABICS NE;Lo;0;L;;;;;N;;;;; -14C1;CANADIAN SYLLABICS NAAI;Lo;0;L;;;;;N;;;;; -14C2;CANADIAN SYLLABICS NI;Lo;0;L;;;;;N;;;;; -14C3;CANADIAN SYLLABICS NII;Lo;0;L;;;;;N;;;;; -14C4;CANADIAN SYLLABICS NO;Lo;0;L;;;;;N;;;;; -14C5;CANADIAN SYLLABICS NOO;Lo;0;L;;;;;N;;;;; -14C6;CANADIAN SYLLABICS Y-CREE NOO;Lo;0;L;;;;;N;;;;; -14C7;CANADIAN SYLLABICS NA;Lo;0;L;;;;;N;;;;; -14C8;CANADIAN SYLLABICS NAA;Lo;0;L;;;;;N;;;;; -14C9;CANADIAN SYLLABICS NWE;Lo;0;L;;;;;N;;;;; -14CA;CANADIAN SYLLABICS WEST-CREE NWE;Lo;0;L;;;;;N;;;;; -14CB;CANADIAN SYLLABICS NWA;Lo;0;L;;;;;N;;;;; -14CC;CANADIAN SYLLABICS WEST-CREE NWA;Lo;0;L;;;;;N;;;;; -14CD;CANADIAN SYLLABICS NWAA;Lo;0;L;;;;;N;;;;; -14CE;CANADIAN SYLLABICS WEST-CREE NWAA;Lo;0;L;;;;;N;;;;; -14CF;CANADIAN SYLLABICS NASKAPI NWAA;Lo;0;L;;;;;N;;;;; -14D0;CANADIAN SYLLABICS N;Lo;0;L;;;;;N;;;;; -14D1;CANADIAN SYLLABICS CARRIER NG;Lo;0;L;;;;;N;;;;; -14D2;CANADIAN SYLLABICS NH;Lo;0;L;;;;;N;;;;; -14D3;CANADIAN SYLLABICS LE;Lo;0;L;;;;;N;;;;; -14D4;CANADIAN SYLLABICS LAAI;Lo;0;L;;;;;N;;;;; -14D5;CANADIAN SYLLABICS LI;Lo;0;L;;;;;N;;;;; -14D6;CANADIAN SYLLABICS LII;Lo;0;L;;;;;N;;;;; -14D7;CANADIAN SYLLABICS LO;Lo;0;L;;;;;N;;;;; -14D8;CANADIAN SYLLABICS LOO;Lo;0;L;;;;;N;;;;; -14D9;CANADIAN SYLLABICS Y-CREE LOO;Lo;0;L;;;;;N;;;;; -14DA;CANADIAN SYLLABICS LA;Lo;0;L;;;;;N;;;;; -14DB;CANADIAN SYLLABICS LAA;Lo;0;L;;;;;N;;;;; -14DC;CANADIAN SYLLABICS LWE;Lo;0;L;;;;;N;;;;; -14DD;CANADIAN SYLLABICS WEST-CREE LWE;Lo;0;L;;;;;N;;;;; -14DE;CANADIAN SYLLABICS LWI;Lo;0;L;;;;;N;;;;; -14DF;CANADIAN SYLLABICS WEST-CREE LWI;Lo;0;L;;;;;N;;;;; -14E0;CANADIAN SYLLABICS LWII;Lo;0;L;;;;;N;;;;; -14E1;CANADIAN SYLLABICS WEST-CREE LWII;Lo;0;L;;;;;N;;;;; -14E2;CANADIAN SYLLABICS LWO;Lo;0;L;;;;;N;;;;; -14E3;CANADIAN SYLLABICS WEST-CREE LWO;Lo;0;L;;;;;N;;;;; -14E4;CANADIAN SYLLABICS LWOO;Lo;0;L;;;;;N;;;;; -14E5;CANADIAN SYLLABICS WEST-CREE LWOO;Lo;0;L;;;;;N;;;;; -14E6;CANADIAN SYLLABICS LWA;Lo;0;L;;;;;N;;;;; -14E7;CANADIAN SYLLABICS WEST-CREE LWA;Lo;0;L;;;;;N;;;;; -14E8;CANADIAN SYLLABICS LWAA;Lo;0;L;;;;;N;;;;; -14E9;CANADIAN SYLLABICS WEST-CREE LWAA;Lo;0;L;;;;;N;;;;; -14EA;CANADIAN SYLLABICS L;Lo;0;L;;;;;N;;;;; -14EB;CANADIAN SYLLABICS WEST-CREE L;Lo;0;L;;;;;N;;;;; -14EC;CANADIAN SYLLABICS MEDIAL L;Lo;0;L;;;;;N;;;;; -14ED;CANADIAN SYLLABICS SE;Lo;0;L;;;;;N;;;;; -14EE;CANADIAN SYLLABICS SAAI;Lo;0;L;;;;;N;;;;; -14EF;CANADIAN SYLLABICS SI;Lo;0;L;;;;;N;;;;; -14F0;CANADIAN SYLLABICS SII;Lo;0;L;;;;;N;;;;; -14F1;CANADIAN SYLLABICS SO;Lo;0;L;;;;;N;;;;; -14F2;CANADIAN SYLLABICS SOO;Lo;0;L;;;;;N;;;;; -14F3;CANADIAN SYLLABICS Y-CREE SOO;Lo;0;L;;;;;N;;;;; -14F4;CANADIAN SYLLABICS SA;Lo;0;L;;;;;N;;;;; -14F5;CANADIAN SYLLABICS SAA;Lo;0;L;;;;;N;;;;; -14F6;CANADIAN SYLLABICS SWE;Lo;0;L;;;;;N;;;;; -14F7;CANADIAN SYLLABICS WEST-CREE SWE;Lo;0;L;;;;;N;;;;; -14F8;CANADIAN SYLLABICS SWI;Lo;0;L;;;;;N;;;;; -14F9;CANADIAN SYLLABICS WEST-CREE SWI;Lo;0;L;;;;;N;;;;; -14FA;CANADIAN SYLLABICS SWII;Lo;0;L;;;;;N;;;;; -14FB;CANADIAN SYLLABICS WEST-CREE SWII;Lo;0;L;;;;;N;;;;; -14FC;CANADIAN SYLLABICS SWO;Lo;0;L;;;;;N;;;;; -14FD;CANADIAN SYLLABICS WEST-CREE SWO;Lo;0;L;;;;;N;;;;; -14FE;CANADIAN SYLLABICS SWOO;Lo;0;L;;;;;N;;;;; -14FF;CANADIAN SYLLABICS WEST-CREE SWOO;Lo;0;L;;;;;N;;;;; -1500;CANADIAN SYLLABICS SWA;Lo;0;L;;;;;N;;;;; -1501;CANADIAN SYLLABICS WEST-CREE SWA;Lo;0;L;;;;;N;;;;; -1502;CANADIAN SYLLABICS SWAA;Lo;0;L;;;;;N;;;;; -1503;CANADIAN SYLLABICS WEST-CREE SWAA;Lo;0;L;;;;;N;;;;; -1504;CANADIAN SYLLABICS NASKAPI SWAA;Lo;0;L;;;;;N;;;;; -1505;CANADIAN SYLLABICS S;Lo;0;L;;;;;N;;;;; -1506;CANADIAN SYLLABICS ATHAPASCAN S;Lo;0;L;;;;;N;;;;; -1507;CANADIAN SYLLABICS SW;Lo;0;L;;;;;N;;;;; -1508;CANADIAN SYLLABICS BLACKFOOT S;Lo;0;L;;;;;N;;;;; -1509;CANADIAN SYLLABICS MOOSE-CREE SK;Lo;0;L;;;;;N;;;;; -150A;CANADIAN SYLLABICS NASKAPI SKW;Lo;0;L;;;;;N;;;;; -150B;CANADIAN SYLLABICS NASKAPI S-W;Lo;0;L;;;;;N;;;;; -150C;CANADIAN SYLLABICS NASKAPI SPWA;Lo;0;L;;;;;N;;;;; -150D;CANADIAN SYLLABICS NASKAPI STWA;Lo;0;L;;;;;N;;;;; -150E;CANADIAN SYLLABICS NASKAPI SKWA;Lo;0;L;;;;;N;;;;; -150F;CANADIAN SYLLABICS NASKAPI SCWA;Lo;0;L;;;;;N;;;;; -1510;CANADIAN SYLLABICS SHE;Lo;0;L;;;;;N;;;;; -1511;CANADIAN SYLLABICS SHI;Lo;0;L;;;;;N;;;;; -1512;CANADIAN SYLLABICS SHII;Lo;0;L;;;;;N;;;;; -1513;CANADIAN SYLLABICS SHO;Lo;0;L;;;;;N;;;;; -1514;CANADIAN SYLLABICS SHOO;Lo;0;L;;;;;N;;;;; -1515;CANADIAN SYLLABICS SHA;Lo;0;L;;;;;N;;;;; -1516;CANADIAN SYLLABICS SHAA;Lo;0;L;;;;;N;;;;; -1517;CANADIAN SYLLABICS SHWE;Lo;0;L;;;;;N;;;;; -1518;CANADIAN SYLLABICS WEST-CREE SHWE;Lo;0;L;;;;;N;;;;; -1519;CANADIAN SYLLABICS SHWI;Lo;0;L;;;;;N;;;;; -151A;CANADIAN SYLLABICS WEST-CREE SHWI;Lo;0;L;;;;;N;;;;; -151B;CANADIAN SYLLABICS SHWII;Lo;0;L;;;;;N;;;;; -151C;CANADIAN SYLLABICS WEST-CREE SHWII;Lo;0;L;;;;;N;;;;; -151D;CANADIAN SYLLABICS SHWO;Lo;0;L;;;;;N;;;;; -151E;CANADIAN SYLLABICS WEST-CREE SHWO;Lo;0;L;;;;;N;;;;; -151F;CANADIAN SYLLABICS SHWOO;Lo;0;L;;;;;N;;;;; -1520;CANADIAN SYLLABICS WEST-CREE SHWOO;Lo;0;L;;;;;N;;;;; -1521;CANADIAN SYLLABICS SHWA;Lo;0;L;;;;;N;;;;; -1522;CANADIAN SYLLABICS WEST-CREE SHWA;Lo;0;L;;;;;N;;;;; -1523;CANADIAN SYLLABICS SHWAA;Lo;0;L;;;;;N;;;;; -1524;CANADIAN SYLLABICS WEST-CREE SHWAA;Lo;0;L;;;;;N;;;;; -1525;CANADIAN SYLLABICS SH;Lo;0;L;;;;;N;;;;; -1526;CANADIAN SYLLABICS YE;Lo;0;L;;;;;N;;;;; -1527;CANADIAN SYLLABICS YAAI;Lo;0;L;;;;;N;;;;; -1528;CANADIAN SYLLABICS YI;Lo;0;L;;;;;N;;;;; -1529;CANADIAN SYLLABICS YII;Lo;0;L;;;;;N;;;;; -152A;CANADIAN SYLLABICS YO;Lo;0;L;;;;;N;;;;; -152B;CANADIAN SYLLABICS YOO;Lo;0;L;;;;;N;;;;; -152C;CANADIAN SYLLABICS Y-CREE YOO;Lo;0;L;;;;;N;;;;; -152D;CANADIAN SYLLABICS YA;Lo;0;L;;;;;N;;;;; -152E;CANADIAN SYLLABICS YAA;Lo;0;L;;;;;N;;;;; -152F;CANADIAN SYLLABICS YWE;Lo;0;L;;;;;N;;;;; -1530;CANADIAN SYLLABICS WEST-CREE YWE;Lo;0;L;;;;;N;;;;; -1531;CANADIAN SYLLABICS YWI;Lo;0;L;;;;;N;;;;; -1532;CANADIAN SYLLABICS WEST-CREE YWI;Lo;0;L;;;;;N;;;;; -1533;CANADIAN SYLLABICS YWII;Lo;0;L;;;;;N;;;;; -1534;CANADIAN SYLLABICS WEST-CREE YWII;Lo;0;L;;;;;N;;;;; -1535;CANADIAN SYLLABICS YWO;Lo;0;L;;;;;N;;;;; -1536;CANADIAN SYLLABICS WEST-CREE YWO;Lo;0;L;;;;;N;;;;; -1537;CANADIAN SYLLABICS YWOO;Lo;0;L;;;;;N;;;;; -1538;CANADIAN SYLLABICS WEST-CREE YWOO;Lo;0;L;;;;;N;;;;; -1539;CANADIAN SYLLABICS YWA;Lo;0;L;;;;;N;;;;; -153A;CANADIAN SYLLABICS WEST-CREE YWA;Lo;0;L;;;;;N;;;;; -153B;CANADIAN SYLLABICS YWAA;Lo;0;L;;;;;N;;;;; -153C;CANADIAN SYLLABICS WEST-CREE YWAA;Lo;0;L;;;;;N;;;;; -153D;CANADIAN SYLLABICS NASKAPI YWAA;Lo;0;L;;;;;N;;;;; -153E;CANADIAN SYLLABICS Y;Lo;0;L;;;;;N;;;;; -153F;CANADIAN SYLLABICS BIBLE-CREE Y;Lo;0;L;;;;;N;;;;; -1540;CANADIAN SYLLABICS WEST-CREE Y;Lo;0;L;;;;;N;;;;; -1541;CANADIAN SYLLABICS SAYISI YI;Lo;0;L;;;;;N;;;;; -1542;CANADIAN SYLLABICS RE;Lo;0;L;;;;;N;;;;; -1543;CANADIAN SYLLABICS R-CREE RE;Lo;0;L;;;;;N;;;;; -1544;CANADIAN SYLLABICS WEST-CREE LE;Lo;0;L;;;;;N;;;;; -1545;CANADIAN SYLLABICS RAAI;Lo;0;L;;;;;N;;;;; -1546;CANADIAN SYLLABICS RI;Lo;0;L;;;;;N;;;;; -1547;CANADIAN SYLLABICS RII;Lo;0;L;;;;;N;;;;; -1548;CANADIAN SYLLABICS RO;Lo;0;L;;;;;N;;;;; -1549;CANADIAN SYLLABICS ROO;Lo;0;L;;;;;N;;;;; -154A;CANADIAN SYLLABICS WEST-CREE LO;Lo;0;L;;;;;N;;;;; -154B;CANADIAN SYLLABICS RA;Lo;0;L;;;;;N;;;;; -154C;CANADIAN SYLLABICS RAA;Lo;0;L;;;;;N;;;;; -154D;CANADIAN SYLLABICS WEST-CREE LA;Lo;0;L;;;;;N;;;;; -154E;CANADIAN SYLLABICS RWAA;Lo;0;L;;;;;N;;;;; -154F;CANADIAN SYLLABICS WEST-CREE RWAA;Lo;0;L;;;;;N;;;;; -1550;CANADIAN SYLLABICS R;Lo;0;L;;;;;N;;;;; -1551;CANADIAN SYLLABICS WEST-CREE R;Lo;0;L;;;;;N;;;;; -1552;CANADIAN SYLLABICS MEDIAL R;Lo;0;L;;;;;N;;;;; -1553;CANADIAN SYLLABICS FE;Lo;0;L;;;;;N;;;;; -1554;CANADIAN SYLLABICS FAAI;Lo;0;L;;;;;N;;;;; -1555;CANADIAN SYLLABICS FI;Lo;0;L;;;;;N;;;;; -1556;CANADIAN SYLLABICS FII;Lo;0;L;;;;;N;;;;; -1557;CANADIAN SYLLABICS FO;Lo;0;L;;;;;N;;;;; -1558;CANADIAN SYLLABICS FOO;Lo;0;L;;;;;N;;;;; -1559;CANADIAN SYLLABICS FA;Lo;0;L;;;;;N;;;;; -155A;CANADIAN SYLLABICS FAA;Lo;0;L;;;;;N;;;;; -155B;CANADIAN SYLLABICS FWAA;Lo;0;L;;;;;N;;;;; -155C;CANADIAN SYLLABICS WEST-CREE FWAA;Lo;0;L;;;;;N;;;;; -155D;CANADIAN SYLLABICS F;Lo;0;L;;;;;N;;;;; -155E;CANADIAN SYLLABICS THE;Lo;0;L;;;;;N;;;;; -155F;CANADIAN SYLLABICS N-CREE THE;Lo;0;L;;;;;N;;;;; -1560;CANADIAN SYLLABICS THI;Lo;0;L;;;;;N;;;;; -1561;CANADIAN SYLLABICS N-CREE THI;Lo;0;L;;;;;N;;;;; -1562;CANADIAN SYLLABICS THII;Lo;0;L;;;;;N;;;;; -1563;CANADIAN SYLLABICS N-CREE THII;Lo;0;L;;;;;N;;;;; -1564;CANADIAN SYLLABICS THO;Lo;0;L;;;;;N;;;;; -1565;CANADIAN SYLLABICS THOO;Lo;0;L;;;;;N;;;;; -1566;CANADIAN SYLLABICS THA;Lo;0;L;;;;;N;;;;; -1567;CANADIAN SYLLABICS THAA;Lo;0;L;;;;;N;;;;; -1568;CANADIAN SYLLABICS THWAA;Lo;0;L;;;;;N;;;;; -1569;CANADIAN SYLLABICS WEST-CREE THWAA;Lo;0;L;;;;;N;;;;; -156A;CANADIAN SYLLABICS TH;Lo;0;L;;;;;N;;;;; -156B;CANADIAN SYLLABICS TTHE;Lo;0;L;;;;;N;;;;; -156C;CANADIAN SYLLABICS TTHI;Lo;0;L;;;;;N;;;;; -156D;CANADIAN SYLLABICS TTHO;Lo;0;L;;;;;N;;;;; -156E;CANADIAN SYLLABICS TTHA;Lo;0;L;;;;;N;;;;; -156F;CANADIAN SYLLABICS TTH;Lo;0;L;;;;;N;;;;; -1570;CANADIAN SYLLABICS TYE;Lo;0;L;;;;;N;;;;; -1571;CANADIAN SYLLABICS TYI;Lo;0;L;;;;;N;;;;; -1572;CANADIAN SYLLABICS TYO;Lo;0;L;;;;;N;;;;; -1573;CANADIAN SYLLABICS TYA;Lo;0;L;;;;;N;;;;; -1574;CANADIAN SYLLABICS NUNAVIK HE;Lo;0;L;;;;;N;;;;; -1575;CANADIAN SYLLABICS NUNAVIK HI;Lo;0;L;;;;;N;;;;; -1576;CANADIAN SYLLABICS NUNAVIK HII;Lo;0;L;;;;;N;;;;; -1577;CANADIAN SYLLABICS NUNAVIK HO;Lo;0;L;;;;;N;;;;; -1578;CANADIAN SYLLABICS NUNAVIK HOO;Lo;0;L;;;;;N;;;;; -1579;CANADIAN SYLLABICS NUNAVIK HA;Lo;0;L;;;;;N;;;;; -157A;CANADIAN SYLLABICS NUNAVIK HAA;Lo;0;L;;;;;N;;;;; -157B;CANADIAN SYLLABICS NUNAVIK H;Lo;0;L;;;;;N;;;;; -157C;CANADIAN SYLLABICS NUNAVUT H;Lo;0;L;;;;;N;;;;; -157D;CANADIAN SYLLABICS HK;Lo;0;L;;;;;N;;;;; -157E;CANADIAN SYLLABICS QAAI;Lo;0;L;;;;;N;;;;; -157F;CANADIAN SYLLABICS QI;Lo;0;L;;;;;N;;;;; -1580;CANADIAN SYLLABICS QII;Lo;0;L;;;;;N;;;;; -1581;CANADIAN SYLLABICS QO;Lo;0;L;;;;;N;;;;; -1582;CANADIAN SYLLABICS QOO;Lo;0;L;;;;;N;;;;; -1583;CANADIAN SYLLABICS QA;Lo;0;L;;;;;N;;;;; -1584;CANADIAN SYLLABICS QAA;Lo;0;L;;;;;N;;;;; -1585;CANADIAN SYLLABICS Q;Lo;0;L;;;;;N;;;;; -1586;CANADIAN SYLLABICS TLHE;Lo;0;L;;;;;N;;;;; -1587;CANADIAN SYLLABICS TLHI;Lo;0;L;;;;;N;;;;; -1588;CANADIAN SYLLABICS TLHO;Lo;0;L;;;;;N;;;;; -1589;CANADIAN SYLLABICS TLHA;Lo;0;L;;;;;N;;;;; -158A;CANADIAN SYLLABICS WEST-CREE RE;Lo;0;L;;;;;N;;;;; -158B;CANADIAN SYLLABICS WEST-CREE RI;Lo;0;L;;;;;N;;;;; -158C;CANADIAN SYLLABICS WEST-CREE RO;Lo;0;L;;;;;N;;;;; -158D;CANADIAN SYLLABICS WEST-CREE RA;Lo;0;L;;;;;N;;;;; -158E;CANADIAN SYLLABICS NGAAI;Lo;0;L;;;;;N;;;;; -158F;CANADIAN SYLLABICS NGI;Lo;0;L;;;;;N;;;;; -1590;CANADIAN SYLLABICS NGII;Lo;0;L;;;;;N;;;;; -1591;CANADIAN SYLLABICS NGO;Lo;0;L;;;;;N;;;;; -1592;CANADIAN SYLLABICS NGOO;Lo;0;L;;;;;N;;;;; -1593;CANADIAN SYLLABICS NGA;Lo;0;L;;;;;N;;;;; -1594;CANADIAN SYLLABICS NGAA;Lo;0;L;;;;;N;;;;; -1595;CANADIAN SYLLABICS NG;Lo;0;L;;;;;N;;;;; -1596;CANADIAN SYLLABICS NNG;Lo;0;L;;;;;N;;;;; -1597;CANADIAN SYLLABICS SAYISI SHE;Lo;0;L;;;;;N;;;;; -1598;CANADIAN SYLLABICS SAYISI SHI;Lo;0;L;;;;;N;;;;; -1599;CANADIAN SYLLABICS SAYISI SHO;Lo;0;L;;;;;N;;;;; -159A;CANADIAN SYLLABICS SAYISI SHA;Lo;0;L;;;;;N;;;;; -159B;CANADIAN SYLLABICS WOODS-CREE THE;Lo;0;L;;;;;N;;;;; -159C;CANADIAN SYLLABICS WOODS-CREE THI;Lo;0;L;;;;;N;;;;; -159D;CANADIAN SYLLABICS WOODS-CREE THO;Lo;0;L;;;;;N;;;;; -159E;CANADIAN SYLLABICS WOODS-CREE THA;Lo;0;L;;;;;N;;;;; -159F;CANADIAN SYLLABICS WOODS-CREE TH;Lo;0;L;;;;;N;;;;; -15A0;CANADIAN SYLLABICS LHI;Lo;0;L;;;;;N;;;;; -15A1;CANADIAN SYLLABICS LHII;Lo;0;L;;;;;N;;;;; -15A2;CANADIAN SYLLABICS LHO;Lo;0;L;;;;;N;;;;; -15A3;CANADIAN SYLLABICS LHOO;Lo;0;L;;;;;N;;;;; -15A4;CANADIAN SYLLABICS LHA;Lo;0;L;;;;;N;;;;; -15A5;CANADIAN SYLLABICS LHAA;Lo;0;L;;;;;N;;;;; -15A6;CANADIAN SYLLABICS LH;Lo;0;L;;;;;N;;;;; -15A7;CANADIAN SYLLABICS TH-CREE THE;Lo;0;L;;;;;N;;;;; -15A8;CANADIAN SYLLABICS TH-CREE THI;Lo;0;L;;;;;N;;;;; -15A9;CANADIAN SYLLABICS TH-CREE THII;Lo;0;L;;;;;N;;;;; -15AA;CANADIAN SYLLABICS TH-CREE THO;Lo;0;L;;;;;N;;;;; -15AB;CANADIAN SYLLABICS TH-CREE THOO;Lo;0;L;;;;;N;;;;; -15AC;CANADIAN SYLLABICS TH-CREE THA;Lo;0;L;;;;;N;;;;; -15AD;CANADIAN SYLLABICS TH-CREE THAA;Lo;0;L;;;;;N;;;;; -15AE;CANADIAN SYLLABICS TH-CREE TH;Lo;0;L;;;;;N;;;;; -15AF;CANADIAN SYLLABICS AIVILIK B;Lo;0;L;;;;;N;;;;; -15B0;CANADIAN SYLLABICS BLACKFOOT E;Lo;0;L;;;;;N;;;;; -15B1;CANADIAN SYLLABICS BLACKFOOT I;Lo;0;L;;;;;N;;;;; -15B2;CANADIAN SYLLABICS BLACKFOOT O;Lo;0;L;;;;;N;;;;; -15B3;CANADIAN SYLLABICS BLACKFOOT A;Lo;0;L;;;;;N;;;;; -15B4;CANADIAN SYLLABICS BLACKFOOT WE;Lo;0;L;;;;;N;;;;; -15B5;CANADIAN SYLLABICS BLACKFOOT WI;Lo;0;L;;;;;N;;;;; -15B6;CANADIAN SYLLABICS BLACKFOOT WO;Lo;0;L;;;;;N;;;;; -15B7;CANADIAN SYLLABICS BLACKFOOT WA;Lo;0;L;;;;;N;;;;; -15B8;CANADIAN SYLLABICS BLACKFOOT NE;Lo;0;L;;;;;N;;;;; -15B9;CANADIAN SYLLABICS BLACKFOOT NI;Lo;0;L;;;;;N;;;;; -15BA;CANADIAN SYLLABICS BLACKFOOT NO;Lo;0;L;;;;;N;;;;; -15BB;CANADIAN SYLLABICS BLACKFOOT NA;Lo;0;L;;;;;N;;;;; -15BC;CANADIAN SYLLABICS BLACKFOOT KE;Lo;0;L;;;;;N;;;;; -15BD;CANADIAN SYLLABICS BLACKFOOT KI;Lo;0;L;;;;;N;;;;; -15BE;CANADIAN SYLLABICS BLACKFOOT KO;Lo;0;L;;;;;N;;;;; -15BF;CANADIAN SYLLABICS BLACKFOOT KA;Lo;0;L;;;;;N;;;;; -15C0;CANADIAN SYLLABICS SAYISI HE;Lo;0;L;;;;;N;;;;; -15C1;CANADIAN SYLLABICS SAYISI HI;Lo;0;L;;;;;N;;;;; -15C2;CANADIAN SYLLABICS SAYISI HO;Lo;0;L;;;;;N;;;;; -15C3;CANADIAN SYLLABICS SAYISI HA;Lo;0;L;;;;;N;;;;; -15C4;CANADIAN SYLLABICS CARRIER GHU;Lo;0;L;;;;;N;;;;; -15C5;CANADIAN SYLLABICS CARRIER GHO;Lo;0;L;;;;;N;;;;; -15C6;CANADIAN SYLLABICS CARRIER GHE;Lo;0;L;;;;;N;;;;; -15C7;CANADIAN SYLLABICS CARRIER GHEE;Lo;0;L;;;;;N;;;;; -15C8;CANADIAN SYLLABICS CARRIER GHI;Lo;0;L;;;;;N;;;;; -15C9;CANADIAN SYLLABICS CARRIER GHA;Lo;0;L;;;;;N;;;;; -15CA;CANADIAN SYLLABICS CARRIER RU;Lo;0;L;;;;;N;;;;; -15CB;CANADIAN SYLLABICS CARRIER RO;Lo;0;L;;;;;N;;;;; -15CC;CANADIAN SYLLABICS CARRIER RE;Lo;0;L;;;;;N;;;;; -15CD;CANADIAN SYLLABICS CARRIER REE;Lo;0;L;;;;;N;;;;; -15CE;CANADIAN SYLLABICS CARRIER RI;Lo;0;L;;;;;N;;;;; -15CF;CANADIAN SYLLABICS CARRIER RA;Lo;0;L;;;;;N;;;;; -15D0;CANADIAN SYLLABICS CARRIER WU;Lo;0;L;;;;;N;;;;; -15D1;CANADIAN SYLLABICS CARRIER WO;Lo;0;L;;;;;N;;;;; -15D2;CANADIAN SYLLABICS CARRIER WE;Lo;0;L;;;;;N;;;;; -15D3;CANADIAN SYLLABICS CARRIER WEE;Lo;0;L;;;;;N;;;;; -15D4;CANADIAN SYLLABICS CARRIER WI;Lo;0;L;;;;;N;;;;; -15D5;CANADIAN SYLLABICS CARRIER WA;Lo;0;L;;;;;N;;;;; -15D6;CANADIAN SYLLABICS CARRIER HWU;Lo;0;L;;;;;N;;;;; -15D7;CANADIAN SYLLABICS CARRIER HWO;Lo;0;L;;;;;N;;;;; -15D8;CANADIAN SYLLABICS CARRIER HWE;Lo;0;L;;;;;N;;;;; -15D9;CANADIAN SYLLABICS CARRIER HWEE;Lo;0;L;;;;;N;;;;; -15DA;CANADIAN SYLLABICS CARRIER HWI;Lo;0;L;;;;;N;;;;; -15DB;CANADIAN SYLLABICS CARRIER HWA;Lo;0;L;;;;;N;;;;; -15DC;CANADIAN SYLLABICS CARRIER THU;Lo;0;L;;;;;N;;;;; -15DD;CANADIAN SYLLABICS CARRIER THO;Lo;0;L;;;;;N;;;;; -15DE;CANADIAN SYLLABICS CARRIER THE;Lo;0;L;;;;;N;;;;; -15DF;CANADIAN SYLLABICS CARRIER THEE;Lo;0;L;;;;;N;;;;; -15E0;CANADIAN SYLLABICS CARRIER THI;Lo;0;L;;;;;N;;;;; -15E1;CANADIAN SYLLABICS CARRIER THA;Lo;0;L;;;;;N;;;;; -15E2;CANADIAN SYLLABICS CARRIER TTU;Lo;0;L;;;;;N;;;;; -15E3;CANADIAN SYLLABICS CARRIER TTO;Lo;0;L;;;;;N;;;;; -15E4;CANADIAN SYLLABICS CARRIER TTE;Lo;0;L;;;;;N;;;;; -15E5;CANADIAN SYLLABICS CARRIER TTEE;Lo;0;L;;;;;N;;;;; -15E6;CANADIAN SYLLABICS CARRIER TTI;Lo;0;L;;;;;N;;;;; -15E7;CANADIAN SYLLABICS CARRIER TTA;Lo;0;L;;;;;N;;;;; -15E8;CANADIAN SYLLABICS CARRIER PU;Lo;0;L;;;;;N;;;;; -15E9;CANADIAN SYLLABICS CARRIER PO;Lo;0;L;;;;;N;;;;; -15EA;CANADIAN SYLLABICS CARRIER PE;Lo;0;L;;;;;N;;;;; -15EB;CANADIAN SYLLABICS CARRIER PEE;Lo;0;L;;;;;N;;;;; -15EC;CANADIAN SYLLABICS CARRIER PI;Lo;0;L;;;;;N;;;;; -15ED;CANADIAN SYLLABICS CARRIER PA;Lo;0;L;;;;;N;;;;; -15EE;CANADIAN SYLLABICS CARRIER P;Lo;0;L;;;;;N;;;;; -15EF;CANADIAN SYLLABICS CARRIER GU;Lo;0;L;;;;;N;;;;; -15F0;CANADIAN SYLLABICS CARRIER GO;Lo;0;L;;;;;N;;;;; -15F1;CANADIAN SYLLABICS CARRIER GE;Lo;0;L;;;;;N;;;;; -15F2;CANADIAN SYLLABICS CARRIER GEE;Lo;0;L;;;;;N;;;;; -15F3;CANADIAN SYLLABICS CARRIER GI;Lo;0;L;;;;;N;;;;; -15F4;CANADIAN SYLLABICS CARRIER GA;Lo;0;L;;;;;N;;;;; -15F5;CANADIAN SYLLABICS CARRIER KHU;Lo;0;L;;;;;N;;;;; -15F6;CANADIAN SYLLABICS CARRIER KHO;Lo;0;L;;;;;N;;;;; -15F7;CANADIAN SYLLABICS CARRIER KHE;Lo;0;L;;;;;N;;;;; -15F8;CANADIAN SYLLABICS CARRIER KHEE;Lo;0;L;;;;;N;;;;; -15F9;CANADIAN SYLLABICS CARRIER KHI;Lo;0;L;;;;;N;;;;; -15FA;CANADIAN SYLLABICS CARRIER KHA;Lo;0;L;;;;;N;;;;; -15FB;CANADIAN SYLLABICS CARRIER KKU;Lo;0;L;;;;;N;;;;; -15FC;CANADIAN SYLLABICS CARRIER KKO;Lo;0;L;;;;;N;;;;; -15FD;CANADIAN SYLLABICS CARRIER KKE;Lo;0;L;;;;;N;;;;; -15FE;CANADIAN SYLLABICS CARRIER KKEE;Lo;0;L;;;;;N;;;;; -15FF;CANADIAN SYLLABICS CARRIER KKI;Lo;0;L;;;;;N;;;;; -1600;CANADIAN SYLLABICS CARRIER KKA;Lo;0;L;;;;;N;;;;; -1601;CANADIAN SYLLABICS CARRIER KK;Lo;0;L;;;;;N;;;;; -1602;CANADIAN SYLLABICS CARRIER NU;Lo;0;L;;;;;N;;;;; -1603;CANADIAN SYLLABICS CARRIER NO;Lo;0;L;;;;;N;;;;; -1604;CANADIAN SYLLABICS CARRIER NE;Lo;0;L;;;;;N;;;;; -1605;CANADIAN SYLLABICS CARRIER NEE;Lo;0;L;;;;;N;;;;; -1606;CANADIAN SYLLABICS CARRIER NI;Lo;0;L;;;;;N;;;;; -1607;CANADIAN SYLLABICS CARRIER NA;Lo;0;L;;;;;N;;;;; -1608;CANADIAN SYLLABICS CARRIER MU;Lo;0;L;;;;;N;;;;; -1609;CANADIAN SYLLABICS CARRIER MO;Lo;0;L;;;;;N;;;;; -160A;CANADIAN SYLLABICS CARRIER ME;Lo;0;L;;;;;N;;;;; -160B;CANADIAN SYLLABICS CARRIER MEE;Lo;0;L;;;;;N;;;;; -160C;CANADIAN SYLLABICS CARRIER MI;Lo;0;L;;;;;N;;;;; -160D;CANADIAN SYLLABICS CARRIER MA;Lo;0;L;;;;;N;;;;; -160E;CANADIAN SYLLABICS CARRIER YU;Lo;0;L;;;;;N;;;;; -160F;CANADIAN SYLLABICS CARRIER YO;Lo;0;L;;;;;N;;;;; -1610;CANADIAN SYLLABICS CARRIER YE;Lo;0;L;;;;;N;;;;; -1611;CANADIAN SYLLABICS CARRIER YEE;Lo;0;L;;;;;N;;;;; -1612;CANADIAN SYLLABICS CARRIER YI;Lo;0;L;;;;;N;;;;; -1613;CANADIAN SYLLABICS CARRIER YA;Lo;0;L;;;;;N;;;;; -1614;CANADIAN SYLLABICS CARRIER JU;Lo;0;L;;;;;N;;;;; -1615;CANADIAN SYLLABICS SAYISI JU;Lo;0;L;;;;;N;;;;; -1616;CANADIAN SYLLABICS CARRIER JO;Lo;0;L;;;;;N;;;;; -1617;CANADIAN SYLLABICS CARRIER JE;Lo;0;L;;;;;N;;;;; -1618;CANADIAN SYLLABICS CARRIER JEE;Lo;0;L;;;;;N;;;;; -1619;CANADIAN SYLLABICS CARRIER JI;Lo;0;L;;;;;N;;;;; -161A;CANADIAN SYLLABICS SAYISI JI;Lo;0;L;;;;;N;;;;; -161B;CANADIAN SYLLABICS CARRIER JA;Lo;0;L;;;;;N;;;;; -161C;CANADIAN SYLLABICS CARRIER JJU;Lo;0;L;;;;;N;;;;; -161D;CANADIAN SYLLABICS CARRIER JJO;Lo;0;L;;;;;N;;;;; -161E;CANADIAN SYLLABICS CARRIER JJE;Lo;0;L;;;;;N;;;;; -161F;CANADIAN SYLLABICS CARRIER JJEE;Lo;0;L;;;;;N;;;;; -1620;CANADIAN SYLLABICS CARRIER JJI;Lo;0;L;;;;;N;;;;; -1621;CANADIAN SYLLABICS CARRIER JJA;Lo;0;L;;;;;N;;;;; -1622;CANADIAN SYLLABICS CARRIER LU;Lo;0;L;;;;;N;;;;; -1623;CANADIAN SYLLABICS CARRIER LO;Lo;0;L;;;;;N;;;;; -1624;CANADIAN SYLLABICS CARRIER LE;Lo;0;L;;;;;N;;;;; -1625;CANADIAN SYLLABICS CARRIER LEE;Lo;0;L;;;;;N;;;;; -1626;CANADIAN SYLLABICS CARRIER LI;Lo;0;L;;;;;N;;;;; -1627;CANADIAN SYLLABICS CARRIER LA;Lo;0;L;;;;;N;;;;; -1628;CANADIAN SYLLABICS CARRIER DLU;Lo;0;L;;;;;N;;;;; -1629;CANADIAN SYLLABICS CARRIER DLO;Lo;0;L;;;;;N;;;;; -162A;CANADIAN SYLLABICS CARRIER DLE;Lo;0;L;;;;;N;;;;; -162B;CANADIAN SYLLABICS CARRIER DLEE;Lo;0;L;;;;;N;;;;; -162C;CANADIAN SYLLABICS CARRIER DLI;Lo;0;L;;;;;N;;;;; -162D;CANADIAN SYLLABICS CARRIER DLA;Lo;0;L;;;;;N;;;;; -162E;CANADIAN SYLLABICS CARRIER LHU;Lo;0;L;;;;;N;;;;; -162F;CANADIAN SYLLABICS CARRIER LHO;Lo;0;L;;;;;N;;;;; -1630;CANADIAN SYLLABICS CARRIER LHE;Lo;0;L;;;;;N;;;;; -1631;CANADIAN SYLLABICS CARRIER LHEE;Lo;0;L;;;;;N;;;;; -1632;CANADIAN SYLLABICS CARRIER LHI;Lo;0;L;;;;;N;;;;; -1633;CANADIAN SYLLABICS CARRIER LHA;Lo;0;L;;;;;N;;;;; -1634;CANADIAN SYLLABICS CARRIER TLHU;Lo;0;L;;;;;N;;;;; -1635;CANADIAN SYLLABICS CARRIER TLHO;Lo;0;L;;;;;N;;;;; -1636;CANADIAN SYLLABICS CARRIER TLHE;Lo;0;L;;;;;N;;;;; -1637;CANADIAN SYLLABICS CARRIER TLHEE;Lo;0;L;;;;;N;;;;; -1638;CANADIAN SYLLABICS CARRIER TLHI;Lo;0;L;;;;;N;;;;; -1639;CANADIAN SYLLABICS CARRIER TLHA;Lo;0;L;;;;;N;;;;; -163A;CANADIAN SYLLABICS CARRIER TLU;Lo;0;L;;;;;N;;;;; -163B;CANADIAN SYLLABICS CARRIER TLO;Lo;0;L;;;;;N;;;;; -163C;CANADIAN SYLLABICS CARRIER TLE;Lo;0;L;;;;;N;;;;; -163D;CANADIAN SYLLABICS CARRIER TLEE;Lo;0;L;;;;;N;;;;; -163E;CANADIAN SYLLABICS CARRIER TLI;Lo;0;L;;;;;N;;;;; -163F;CANADIAN SYLLABICS CARRIER TLA;Lo;0;L;;;;;N;;;;; -1640;CANADIAN SYLLABICS CARRIER ZU;Lo;0;L;;;;;N;;;;; -1641;CANADIAN SYLLABICS CARRIER ZO;Lo;0;L;;;;;N;;;;; -1642;CANADIAN SYLLABICS CARRIER ZE;Lo;0;L;;;;;N;;;;; -1643;CANADIAN SYLLABICS CARRIER ZEE;Lo;0;L;;;;;N;;;;; -1644;CANADIAN SYLLABICS CARRIER ZI;Lo;0;L;;;;;N;;;;; -1645;CANADIAN SYLLABICS CARRIER ZA;Lo;0;L;;;;;N;;;;; -1646;CANADIAN SYLLABICS CARRIER Z;Lo;0;L;;;;;N;;;;; -1647;CANADIAN SYLLABICS CARRIER INITIAL Z;Lo;0;L;;;;;N;;;;; -1648;CANADIAN SYLLABICS CARRIER DZU;Lo;0;L;;;;;N;;;;; -1649;CANADIAN SYLLABICS CARRIER DZO;Lo;0;L;;;;;N;;;;; -164A;CANADIAN SYLLABICS CARRIER DZE;Lo;0;L;;;;;N;;;;; -164B;CANADIAN SYLLABICS CARRIER DZEE;Lo;0;L;;;;;N;;;;; -164C;CANADIAN SYLLABICS CARRIER DZI;Lo;0;L;;;;;N;;;;; -164D;CANADIAN SYLLABICS CARRIER DZA;Lo;0;L;;;;;N;;;;; -164E;CANADIAN SYLLABICS CARRIER SU;Lo;0;L;;;;;N;;;;; -164F;CANADIAN SYLLABICS CARRIER SO;Lo;0;L;;;;;N;;;;; -1650;CANADIAN SYLLABICS CARRIER SE;Lo;0;L;;;;;N;;;;; -1651;CANADIAN SYLLABICS CARRIER SEE;Lo;0;L;;;;;N;;;;; -1652;CANADIAN SYLLABICS CARRIER SI;Lo;0;L;;;;;N;;;;; -1653;CANADIAN SYLLABICS CARRIER SA;Lo;0;L;;;;;N;;;;; -1654;CANADIAN SYLLABICS CARRIER SHU;Lo;0;L;;;;;N;;;;; -1655;CANADIAN SYLLABICS CARRIER SHO;Lo;0;L;;;;;N;;;;; -1656;CANADIAN SYLLABICS CARRIER SHE;Lo;0;L;;;;;N;;;;; -1657;CANADIAN SYLLABICS CARRIER SHEE;Lo;0;L;;;;;N;;;;; -1658;CANADIAN SYLLABICS CARRIER SHI;Lo;0;L;;;;;N;;;;; -1659;CANADIAN SYLLABICS CARRIER SHA;Lo;0;L;;;;;N;;;;; -165A;CANADIAN SYLLABICS CARRIER SH;Lo;0;L;;;;;N;;;;; -165B;CANADIAN SYLLABICS CARRIER TSU;Lo;0;L;;;;;N;;;;; -165C;CANADIAN SYLLABICS CARRIER TSO;Lo;0;L;;;;;N;;;;; -165D;CANADIAN SYLLABICS CARRIER TSE;Lo;0;L;;;;;N;;;;; -165E;CANADIAN SYLLABICS CARRIER TSEE;Lo;0;L;;;;;N;;;;; -165F;CANADIAN SYLLABICS CARRIER TSI;Lo;0;L;;;;;N;;;;; -1660;CANADIAN SYLLABICS CARRIER TSA;Lo;0;L;;;;;N;;;;; -1661;CANADIAN SYLLABICS CARRIER CHU;Lo;0;L;;;;;N;;;;; -1662;CANADIAN SYLLABICS CARRIER CHO;Lo;0;L;;;;;N;;;;; -1663;CANADIAN SYLLABICS CARRIER CHE;Lo;0;L;;;;;N;;;;; -1664;CANADIAN SYLLABICS CARRIER CHEE;Lo;0;L;;;;;N;;;;; -1665;CANADIAN SYLLABICS CARRIER CHI;Lo;0;L;;;;;N;;;;; -1666;CANADIAN SYLLABICS CARRIER CHA;Lo;0;L;;;;;N;;;;; -1667;CANADIAN SYLLABICS CARRIER TTSU;Lo;0;L;;;;;N;;;;; -1668;CANADIAN SYLLABICS CARRIER TTSO;Lo;0;L;;;;;N;;;;; -1669;CANADIAN SYLLABICS CARRIER TTSE;Lo;0;L;;;;;N;;;;; -166A;CANADIAN SYLLABICS CARRIER TTSEE;Lo;0;L;;;;;N;;;;; -166B;CANADIAN SYLLABICS CARRIER TTSI;Lo;0;L;;;;;N;;;;; -166C;CANADIAN SYLLABICS CARRIER TTSA;Lo;0;L;;;;;N;;;;; -166D;CANADIAN SYLLABICS CHI SIGN;Po;0;L;;;;;N;;;;; -166E;CANADIAN SYLLABICS FULL STOP;Po;0;L;;;;;N;;;;; -166F;CANADIAN SYLLABICS QAI;Lo;0;L;;;;;N;;;;; -1670;CANADIAN SYLLABICS NGAI;Lo;0;L;;;;;N;;;;; -1671;CANADIAN SYLLABICS NNGI;Lo;0;L;;;;;N;;;;; -1672;CANADIAN SYLLABICS NNGII;Lo;0;L;;;;;N;;;;; -1673;CANADIAN SYLLABICS NNGO;Lo;0;L;;;;;N;;;;; -1674;CANADIAN SYLLABICS NNGOO;Lo;0;L;;;;;N;;;;; -1675;CANADIAN SYLLABICS NNGA;Lo;0;L;;;;;N;;;;; -1676;CANADIAN SYLLABICS NNGAA;Lo;0;L;;;;;N;;;;; -1680;OGHAM SPACE MARK;Zs;0;WS;;;;;N;;;;; -1681;OGHAM LETTER BEITH;Lo;0;L;;;;;N;;;;; -1682;OGHAM LETTER LUIS;Lo;0;L;;;;;N;;;;; -1683;OGHAM LETTER FEARN;Lo;0;L;;;;;N;;;;; -1684;OGHAM LETTER SAIL;Lo;0;L;;;;;N;;;;; -1685;OGHAM LETTER NION;Lo;0;L;;;;;N;;;;; -1686;OGHAM LETTER UATH;Lo;0;L;;;;;N;;;;; -1687;OGHAM LETTER DAIR;Lo;0;L;;;;;N;;;;; -1688;OGHAM LETTER TINNE;Lo;0;L;;;;;N;;;;; -1689;OGHAM LETTER COLL;Lo;0;L;;;;;N;;;;; -168A;OGHAM LETTER CEIRT;Lo;0;L;;;;;N;;;;; -168B;OGHAM LETTER MUIN;Lo;0;L;;;;;N;;;;; -168C;OGHAM LETTER GORT;Lo;0;L;;;;;N;;;;; -168D;OGHAM LETTER NGEADAL;Lo;0;L;;;;;N;;;;; -168E;OGHAM LETTER STRAIF;Lo;0;L;;;;;N;;;;; -168F;OGHAM LETTER RUIS;Lo;0;L;;;;;N;;;;; -1690;OGHAM LETTER AILM;Lo;0;L;;;;;N;;;;; -1691;OGHAM LETTER ONN;Lo;0;L;;;;;N;;;;; -1692;OGHAM LETTER UR;Lo;0;L;;;;;N;;;;; -1693;OGHAM LETTER EADHADH;Lo;0;L;;;;;N;;;;; -1694;OGHAM LETTER IODHADH;Lo;0;L;;;;;N;;;;; -1695;OGHAM LETTER EABHADH;Lo;0;L;;;;;N;;;;; -1696;OGHAM LETTER OR;Lo;0;L;;;;;N;;;;; -1697;OGHAM LETTER UILLEANN;Lo;0;L;;;;;N;;;;; -1698;OGHAM LETTER IFIN;Lo;0;L;;;;;N;;;;; -1699;OGHAM LETTER EAMHANCHOLL;Lo;0;L;;;;;N;;;;; -169A;OGHAM LETTER PEITH;Lo;0;L;;;;;N;;;;; -169B;OGHAM FEATHER MARK;Ps;0;ON;;;;;N;;;;; -169C;OGHAM REVERSED FEATHER MARK;Pe;0;ON;;;;;N;;;;; -16A0;RUNIC LETTER FEHU FEOH FE F;Lo;0;L;;;;;N;;;;; -16A1;RUNIC LETTER V;Lo;0;L;;;;;N;;;;; -16A2;RUNIC LETTER URUZ UR U;Lo;0;L;;;;;N;;;;; -16A3;RUNIC LETTER YR;Lo;0;L;;;;;N;;;;; -16A4;RUNIC LETTER Y;Lo;0;L;;;;;N;;;;; -16A5;RUNIC LETTER W;Lo;0;L;;;;;N;;;;; -16A6;RUNIC LETTER THURISAZ THURS THORN;Lo;0;L;;;;;N;;;;; -16A7;RUNIC LETTER ETH;Lo;0;L;;;;;N;;;;; -16A8;RUNIC LETTER ANSUZ A;Lo;0;L;;;;;N;;;;; -16A9;RUNIC LETTER OS O;Lo;0;L;;;;;N;;;;; -16AA;RUNIC LETTER AC A;Lo;0;L;;;;;N;;;;; -16AB;RUNIC LETTER AESC;Lo;0;L;;;;;N;;;;; -16AC;RUNIC LETTER LONG-BRANCH-OSS O;Lo;0;L;;;;;N;;;;; -16AD;RUNIC LETTER SHORT-TWIG-OSS O;Lo;0;L;;;;;N;;;;; -16AE;RUNIC LETTER O;Lo;0;L;;;;;N;;;;; -16AF;RUNIC LETTER OE;Lo;0;L;;;;;N;;;;; -16B0;RUNIC LETTER ON;Lo;0;L;;;;;N;;;;; -16B1;RUNIC LETTER RAIDO RAD REID R;Lo;0;L;;;;;N;;;;; -16B2;RUNIC LETTER KAUNA;Lo;0;L;;;;;N;;;;; -16B3;RUNIC LETTER CEN;Lo;0;L;;;;;N;;;;; -16B4;RUNIC LETTER KAUN K;Lo;0;L;;;;;N;;;;; -16B5;RUNIC LETTER G;Lo;0;L;;;;;N;;;;; -16B6;RUNIC LETTER ENG;Lo;0;L;;;;;N;;;;; -16B7;RUNIC LETTER GEBO GYFU G;Lo;0;L;;;;;N;;;;; -16B8;RUNIC LETTER GAR;Lo;0;L;;;;;N;;;;; -16B9;RUNIC LETTER WUNJO WYNN W;Lo;0;L;;;;;N;;;;; -16BA;RUNIC LETTER HAGLAZ H;Lo;0;L;;;;;N;;;;; -16BB;RUNIC LETTER HAEGL H;Lo;0;L;;;;;N;;;;; -16BC;RUNIC LETTER LONG-BRANCH-HAGALL H;Lo;0;L;;;;;N;;;;; -16BD;RUNIC LETTER SHORT-TWIG-HAGALL H;Lo;0;L;;;;;N;;;;; -16BE;RUNIC LETTER NAUDIZ NYD NAUD N;Lo;0;L;;;;;N;;;;; -16BF;RUNIC LETTER SHORT-TWIG-NAUD N;Lo;0;L;;;;;N;;;;; -16C0;RUNIC LETTER DOTTED-N;Lo;0;L;;;;;N;;;;; -16C1;RUNIC LETTER ISAZ IS ISS I;Lo;0;L;;;;;N;;;;; -16C2;RUNIC LETTER E;Lo;0;L;;;;;N;;;;; -16C3;RUNIC LETTER JERAN J;Lo;0;L;;;;;N;;;;; -16C4;RUNIC LETTER GER;Lo;0;L;;;;;N;;;;; -16C5;RUNIC LETTER LONG-BRANCH-AR AE;Lo;0;L;;;;;N;;;;; -16C6;RUNIC LETTER SHORT-TWIG-AR A;Lo;0;L;;;;;N;;;;; -16C7;RUNIC LETTER IWAZ EOH;Lo;0;L;;;;;N;;;;; -16C8;RUNIC LETTER PERTHO PEORTH P;Lo;0;L;;;;;N;;;;; -16C9;RUNIC LETTER ALGIZ EOLHX;Lo;0;L;;;;;N;;;;; -16CA;RUNIC LETTER SOWILO S;Lo;0;L;;;;;N;;;;; -16CB;RUNIC LETTER SIGEL LONG-BRANCH-SOL S;Lo;0;L;;;;;N;;;;; -16CC;RUNIC LETTER SHORT-TWIG-SOL S;Lo;0;L;;;;;N;;;;; -16CD;RUNIC LETTER C;Lo;0;L;;;;;N;;;;; -16CE;RUNIC LETTER Z;Lo;0;L;;;;;N;;;;; -16CF;RUNIC LETTER TIWAZ TIR TYR T;Lo;0;L;;;;;N;;;;; -16D0;RUNIC LETTER SHORT-TWIG-TYR T;Lo;0;L;;;;;N;;;;; -16D1;RUNIC LETTER D;Lo;0;L;;;;;N;;;;; -16D2;RUNIC LETTER BERKANAN BEORC BJARKAN B;Lo;0;L;;;;;N;;;;; -16D3;RUNIC LETTER SHORT-TWIG-BJARKAN B;Lo;0;L;;;;;N;;;;; -16D4;RUNIC LETTER DOTTED-P;Lo;0;L;;;;;N;;;;; -16D5;RUNIC LETTER OPEN-P;Lo;0;L;;;;;N;;;;; -16D6;RUNIC LETTER EHWAZ EH E;Lo;0;L;;;;;N;;;;; -16D7;RUNIC LETTER MANNAZ MAN M;Lo;0;L;;;;;N;;;;; -16D8;RUNIC LETTER LONG-BRANCH-MADR M;Lo;0;L;;;;;N;;;;; -16D9;RUNIC LETTER SHORT-TWIG-MADR M;Lo;0;L;;;;;N;;;;; -16DA;RUNIC LETTER LAUKAZ LAGU LOGR L;Lo;0;L;;;;;N;;;;; -16DB;RUNIC LETTER DOTTED-L;Lo;0;L;;;;;N;;;;; -16DC;RUNIC LETTER INGWAZ;Lo;0;L;;;;;N;;;;; -16DD;RUNIC LETTER ING;Lo;0;L;;;;;N;;;;; -16DE;RUNIC LETTER DAGAZ DAEG D;Lo;0;L;;;;;N;;;;; -16DF;RUNIC LETTER OTHALAN ETHEL O;Lo;0;L;;;;;N;;;;; -16E0;RUNIC LETTER EAR;Lo;0;L;;;;;N;;;;; -16E1;RUNIC LETTER IOR;Lo;0;L;;;;;N;;;;; -16E2;RUNIC LETTER CWEORTH;Lo;0;L;;;;;N;;;;; -16E3;RUNIC LETTER CALC;Lo;0;L;;;;;N;;;;; -16E4;RUNIC LETTER CEALC;Lo;0;L;;;;;N;;;;; -16E5;RUNIC LETTER STAN;Lo;0;L;;;;;N;;;;; -16E6;RUNIC LETTER LONG-BRANCH-YR;Lo;0;L;;;;;N;;;;; -16E7;RUNIC LETTER SHORT-TWIG-YR;Lo;0;L;;;;;N;;;;; -16E8;RUNIC LETTER ICELANDIC-YR;Lo;0;L;;;;;N;;;;; -16E9;RUNIC LETTER Q;Lo;0;L;;;;;N;;;;; -16EA;RUNIC LETTER X;Lo;0;L;;;;;N;;;;; -16EB;RUNIC SINGLE PUNCTUATION;Po;0;L;;;;;N;;;;; -16EC;RUNIC MULTIPLE PUNCTUATION;Po;0;L;;;;;N;;;;; -16ED;RUNIC CROSS PUNCTUATION;Po;0;L;;;;;N;;;;; -16EE;RUNIC ARLAUG SYMBOL;Nl;0;L;;;;17;N;;golden number 17;;; -16EF;RUNIC TVIMADUR SYMBOL;Nl;0;L;;;;18;N;;golden number 18;;; -16F0;RUNIC BELGTHOR SYMBOL;Nl;0;L;;;;19;N;;golden number 19;;; -1780;KHMER LETTER KA;Lo;0;L;;;;;N;;;;; -1781;KHMER LETTER KHA;Lo;0;L;;;;;N;;;;; -1782;KHMER LETTER KO;Lo;0;L;;;;;N;;;;; -1783;KHMER LETTER KHO;Lo;0;L;;;;;N;;;;; -1784;KHMER LETTER NGO;Lo;0;L;;;;;N;;;;; -1785;KHMER LETTER CA;Lo;0;L;;;;;N;;;;; -1786;KHMER LETTER CHA;Lo;0;L;;;;;N;;;;; -1787;KHMER LETTER CO;Lo;0;L;;;;;N;;;;; -1788;KHMER LETTER CHO;Lo;0;L;;;;;N;;;;; -1789;KHMER LETTER NYO;Lo;0;L;;;;;N;;;;; -178A;KHMER LETTER DA;Lo;0;L;;;;;N;;;;; -178B;KHMER LETTER TTHA;Lo;0;L;;;;;N;;;;; -178C;KHMER LETTER DO;Lo;0;L;;;;;N;;;;; -178D;KHMER LETTER TTHO;Lo;0;L;;;;;N;;;;; -178E;KHMER LETTER NNO;Lo;0;L;;;;;N;;;;; -178F;KHMER LETTER TA;Lo;0;L;;;;;N;;;;; -1790;KHMER LETTER THA;Lo;0;L;;;;;N;;;;; -1791;KHMER LETTER TO;Lo;0;L;;;;;N;;;;; -1792;KHMER LETTER THO;Lo;0;L;;;;;N;;;;; -1793;KHMER LETTER NO;Lo;0;L;;;;;N;;;;; -1794;KHMER LETTER BA;Lo;0;L;;;;;N;;;;; -1795;KHMER LETTER PHA;Lo;0;L;;;;;N;;;;; -1796;KHMER LETTER PO;Lo;0;L;;;;;N;;;;; -1797;KHMER LETTER PHO;Lo;0;L;;;;;N;;;;; -1798;KHMER LETTER MO;Lo;0;L;;;;;N;;;;; -1799;KHMER LETTER YO;Lo;0;L;;;;;N;;;;; -179A;KHMER LETTER RO;Lo;0;L;;;;;N;;;;; -179B;KHMER LETTER LO;Lo;0;L;;;;;N;;;;; -179C;KHMER LETTER VO;Lo;0;L;;;;;N;;;;; -179D;KHMER LETTER SHA;Lo;0;L;;;;;N;;;;; -179E;KHMER LETTER SSO;Lo;0;L;;;;;N;;;;; -179F;KHMER LETTER SA;Lo;0;L;;;;;N;;;;; -17A0;KHMER LETTER HA;Lo;0;L;;;;;N;;;;; -17A1;KHMER LETTER LA;Lo;0;L;;;;;N;;;;; -17A2;KHMER LETTER QA;Lo;0;L;;;;;N;;;;; -17A3;KHMER INDEPENDENT VOWEL QAQ;Lo;0;L;;;;;N;;;;; -17A4;KHMER INDEPENDENT VOWEL QAA;Lo;0;L;;;;;N;;;;; -17A5;KHMER INDEPENDENT VOWEL QI;Lo;0;L;;;;;N;;;;; -17A6;KHMER INDEPENDENT VOWEL QII;Lo;0;L;;;;;N;;;;; -17A7;KHMER INDEPENDENT VOWEL QU;Lo;0;L;;;;;N;;;;; -17A8;KHMER INDEPENDENT VOWEL QUK;Lo;0;L;;;;;N;;;;; -17A9;KHMER INDEPENDENT VOWEL QUU;Lo;0;L;;;;;N;;;;; -17AA;KHMER INDEPENDENT VOWEL QUUV;Lo;0;L;;;;;N;;;;; -17AB;KHMER INDEPENDENT VOWEL RY;Lo;0;L;;;;;N;;;;; -17AC;KHMER INDEPENDENT VOWEL RYY;Lo;0;L;;;;;N;;;;; -17AD;KHMER INDEPENDENT VOWEL LY;Lo;0;L;;;;;N;;;;; -17AE;KHMER INDEPENDENT VOWEL LYY;Lo;0;L;;;;;N;;;;; -17AF;KHMER INDEPENDENT VOWEL QE;Lo;0;L;;;;;N;;;;; -17B0;KHMER INDEPENDENT VOWEL QAI;Lo;0;L;;;;;N;;;;; -17B1;KHMER INDEPENDENT VOWEL QOO TYPE ONE;Lo;0;L;;;;;N;;;;; -17B2;KHMER INDEPENDENT VOWEL QOO TYPE TWO;Lo;0;L;;;;;N;;;;; -17B3;KHMER INDEPENDENT VOWEL QAU;Lo;0;L;;;;;N;;;;; -17B4;KHMER VOWEL INHERENT AQ;Mc;0;L;;;;;N;;;;; -17B5;KHMER VOWEL INHERENT AA;Mc;0;L;;;;;N;;;;; -17B6;KHMER VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; -17B7;KHMER VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; -17B8;KHMER VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; -17B9;KHMER VOWEL SIGN Y;Mn;0;NSM;;;;;N;;;;; -17BA;KHMER VOWEL SIGN YY;Mn;0;NSM;;;;;N;;;;; -17BB;KHMER VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; -17BC;KHMER VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; -17BD;KHMER VOWEL SIGN UA;Mn;0;NSM;;;;;N;;;;; -17BE;KHMER VOWEL SIGN OE;Mc;0;L;;;;;N;;;;; -17BF;KHMER VOWEL SIGN YA;Mc;0;L;;;;;N;;;;; -17C0;KHMER VOWEL SIGN IE;Mc;0;L;;;;;N;;;;; -17C1;KHMER VOWEL SIGN E;Mc;0;L;;;;;N;;;;; -17C2;KHMER VOWEL SIGN AE;Mc;0;L;;;;;N;;;;; -17C3;KHMER VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; -17C4;KHMER VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; -17C5;KHMER VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; -17C6;KHMER SIGN NIKAHIT;Mn;0;NSM;;;;;N;;;;; -17C7;KHMER SIGN REAHMUK;Mc;0;L;;;;;N;;;;; -17C8;KHMER SIGN YUUKALEAPINTU;Mc;0;L;;;;;N;;;;; -17C9;KHMER SIGN MUUSIKATOAN;Mn;0;NSM;;;;;N;;;;; -17CA;KHMER SIGN TRIISAP;Mn;0;NSM;;;;;N;;;;; -17CB;KHMER SIGN BANTOC;Mn;0;NSM;;;;;N;;;;; -17CC;KHMER SIGN ROBAT;Mn;0;NSM;;;;;N;;;;; -17CD;KHMER SIGN TOANDAKHIAT;Mn;0;NSM;;;;;N;;;;; -17CE;KHMER SIGN KAKABAT;Mn;0;NSM;;;;;N;;;;; -17CF;KHMER SIGN AHSDA;Mn;0;NSM;;;;;N;;;;; -17D0;KHMER SIGN SAMYOK SANNYA;Mn;0;NSM;;;;;N;;;;; -17D1;KHMER SIGN VIRIAM;Mn;0;NSM;;;;;N;;;;; -17D2;KHMER SIGN COENG;Mn;9;NSM;;;;;N;;;;; -17D3;KHMER SIGN BATHAMASAT;Mn;0;NSM;;;;;N;;;;; -17D4;KHMER SIGN KHAN;Po;0;L;;;;;N;;;;; -17D5;KHMER SIGN BARIYOOSAN;Po;0;L;;;;;N;;;;; -17D6;KHMER SIGN CAMNUC PII KUUH;Po;0;L;;;;;N;;;;; -17D7;KHMER SIGN LEK TOO;Po;0;L;;;;;N;;;;; -17D8;KHMER SIGN BEYYAL;Po;0;L;;;;;N;;;;; -17D9;KHMER SIGN PHNAEK MUAN;Po;0;L;;;;;N;;;;; -17DA;KHMER SIGN KOOMUUT;Po;0;L;;;;;N;;;;; -17DB;KHMER CURRENCY SYMBOL RIEL;Sc;0;ET;;;;;N;;;;; -17DC;KHMER SIGN AVAKRAHASANYA;Po;0;L;;;;;N;;;;; -17E0;KHMER DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -17E1;KHMER DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -17E2;KHMER DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -17E3;KHMER DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -17E4;KHMER DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -17E5;KHMER DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -17E6;KHMER DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -17E7;KHMER DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -17E8;KHMER DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -17E9;KHMER DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -1800;MONGOLIAN BIRGA;Po;0;ON;;;;;N;;;;; -1801;MONGOLIAN ELLIPSIS;Po;0;ON;;;;;N;;;;; -1802;MONGOLIAN COMMA;Po;0;ON;;;;;N;;;;; -1803;MONGOLIAN FULL STOP;Po;0;ON;;;;;N;;;;; -1804;MONGOLIAN COLON;Po;0;ON;;;;;N;;;;; -1805;MONGOLIAN FOUR DOTS;Po;0;ON;;;;;N;;;;; -1806;MONGOLIAN TODO SOFT HYPHEN;Pd;0;ON;;;;;N;;;;; -1807;MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER;Po;0;ON;;;;;N;;;;; -1808;MONGOLIAN MANCHU COMMA;Po;0;ON;;;;;N;;;;; -1809;MONGOLIAN MANCHU FULL STOP;Po;0;ON;;;;;N;;;;; -180A;MONGOLIAN NIRUGU;Po;0;ON;;;;;N;;;;; -180B;MONGOLIAN FREE VARIATION SELECTOR ONE;Cf;0;BN;;;;;N;;;;; -180C;MONGOLIAN FREE VARIATION SELECTOR TWO;Cf;0;BN;;;;;N;;;;; -180D;MONGOLIAN FREE VARIATION SELECTOR THREE;Cf;0;BN;;;;;N;;;;; -180E;MONGOLIAN VOWEL SEPARATOR;Cf;0;BN;;;;;N;;;;; -1810;MONGOLIAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; -1811;MONGOLIAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; -1812;MONGOLIAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; -1813;MONGOLIAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; -1814;MONGOLIAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; -1815;MONGOLIAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; -1816;MONGOLIAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; -1817;MONGOLIAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; -1818;MONGOLIAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; -1819;MONGOLIAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; -1820;MONGOLIAN LETTER A;Lo;0;L;;;;;N;;;;; -1821;MONGOLIAN LETTER E;Lo;0;L;;;;;N;;;;; -1822;MONGOLIAN LETTER I;Lo;0;L;;;;;N;;;;; -1823;MONGOLIAN LETTER O;Lo;0;L;;;;;N;;;;; -1824;MONGOLIAN LETTER U;Lo;0;L;;;;;N;;;;; -1825;MONGOLIAN LETTER OE;Lo;0;L;;;;;N;;;;; -1826;MONGOLIAN LETTER UE;Lo;0;L;;;;;N;;;;; -1827;MONGOLIAN LETTER EE;Lo;0;L;;;;;N;;;;; -1828;MONGOLIAN LETTER NA;Lo;0;L;;;;;N;;;;; -1829;MONGOLIAN LETTER ANG;Lo;0;L;;;;;N;;;;; -182A;MONGOLIAN LETTER BA;Lo;0;L;;;;;N;;;;; -182B;MONGOLIAN LETTER PA;Lo;0;L;;;;;N;;;;; -182C;MONGOLIAN LETTER QA;Lo;0;L;;;;;N;;;;; -182D;MONGOLIAN LETTER GA;Lo;0;L;;;;;N;;;;; -182E;MONGOLIAN LETTER MA;Lo;0;L;;;;;N;;;;; -182F;MONGOLIAN LETTER LA;Lo;0;L;;;;;N;;;;; -1830;MONGOLIAN LETTER SA;Lo;0;L;;;;;N;;;;; -1831;MONGOLIAN LETTER SHA;Lo;0;L;;;;;N;;;;; -1832;MONGOLIAN LETTER TA;Lo;0;L;;;;;N;;;;; -1833;MONGOLIAN LETTER DA;Lo;0;L;;;;;N;;;;; -1834;MONGOLIAN LETTER CHA;Lo;0;L;;;;;N;;;;; -1835;MONGOLIAN LETTER JA;Lo;0;L;;;;;N;;;;; -1836;MONGOLIAN LETTER YA;Lo;0;L;;;;;N;;;;; -1837;MONGOLIAN LETTER RA;Lo;0;L;;;;;N;;;;; -1838;MONGOLIAN LETTER WA;Lo;0;L;;;;;N;;;;; -1839;MONGOLIAN LETTER FA;Lo;0;L;;;;;N;;;;; -183A;MONGOLIAN LETTER KA;Lo;0;L;;;;;N;;;;; -183B;MONGOLIAN LETTER KHA;Lo;0;L;;;;;N;;;;; -183C;MONGOLIAN LETTER TSA;Lo;0;L;;;;;N;;;;; -183D;MONGOLIAN LETTER ZA;Lo;0;L;;;;;N;;;;; -183E;MONGOLIAN LETTER HAA;Lo;0;L;;;;;N;;;;; -183F;MONGOLIAN LETTER ZRA;Lo;0;L;;;;;N;;;;; -1840;MONGOLIAN LETTER LHA;Lo;0;L;;;;;N;;;;; -1841;MONGOLIAN LETTER ZHI;Lo;0;L;;;;;N;;;;; -1842;MONGOLIAN LETTER CHI;Lo;0;L;;;;;N;;;;; -1843;MONGOLIAN LETTER TODO LONG VOWEL SIGN;Lm;0;L;;;;;N;;;;; -1844;MONGOLIAN LETTER TODO E;Lo;0;L;;;;;N;;;;; -1845;MONGOLIAN LETTER TODO I;Lo;0;L;;;;;N;;;;; -1846;MONGOLIAN LETTER TODO O;Lo;0;L;;;;;N;;;;; -1847;MONGOLIAN LETTER TODO U;Lo;0;L;;;;;N;;;;; -1848;MONGOLIAN LETTER TODO OE;Lo;0;L;;;;;N;;;;; -1849;MONGOLIAN LETTER TODO UE;Lo;0;L;;;;;N;;;;; -184A;MONGOLIAN LETTER TODO ANG;Lo;0;L;;;;;N;;;;; -184B;MONGOLIAN LETTER TODO BA;Lo;0;L;;;;;N;;;;; -184C;MONGOLIAN LETTER TODO PA;Lo;0;L;;;;;N;;;;; -184D;MONGOLIAN LETTER TODO QA;Lo;0;L;;;;;N;;;;; -184E;MONGOLIAN LETTER TODO GA;Lo;0;L;;;;;N;;;;; -184F;MONGOLIAN LETTER TODO MA;Lo;0;L;;;;;N;;;;; -1850;MONGOLIAN LETTER TODO TA;Lo;0;L;;;;;N;;;;; -1851;MONGOLIAN LETTER TODO DA;Lo;0;L;;;;;N;;;;; -1852;MONGOLIAN LETTER TODO CHA;Lo;0;L;;;;;N;;;;; -1853;MONGOLIAN LETTER TODO JA;Lo;0;L;;;;;N;;;;; -1854;MONGOLIAN LETTER TODO TSA;Lo;0;L;;;;;N;;;;; -1855;MONGOLIAN LETTER TODO YA;Lo;0;L;;;;;N;;;;; -1856;MONGOLIAN LETTER TODO WA;Lo;0;L;;;;;N;;;;; -1857;MONGOLIAN LETTER TODO KA;Lo;0;L;;;;;N;;;;; -1858;MONGOLIAN LETTER TODO GAA;Lo;0;L;;;;;N;;;;; -1859;MONGOLIAN LETTER TODO HAA;Lo;0;L;;;;;N;;;;; -185A;MONGOLIAN LETTER TODO JIA;Lo;0;L;;;;;N;;;;; -185B;MONGOLIAN LETTER TODO NIA;Lo;0;L;;;;;N;;;;; -185C;MONGOLIAN LETTER TODO DZA;Lo;0;L;;;;;N;;;;; -185D;MONGOLIAN LETTER SIBE E;Lo;0;L;;;;;N;;;;; -185E;MONGOLIAN LETTER SIBE I;Lo;0;L;;;;;N;;;;; -185F;MONGOLIAN LETTER SIBE IY;Lo;0;L;;;;;N;;;;; -1860;MONGOLIAN LETTER SIBE UE;Lo;0;L;;;;;N;;;;; -1861;MONGOLIAN LETTER SIBE U;Lo;0;L;;;;;N;;;;; -1862;MONGOLIAN LETTER SIBE ANG;Lo;0;L;;;;;N;;;;; -1863;MONGOLIAN LETTER SIBE KA;Lo;0;L;;;;;N;;;;; -1864;MONGOLIAN LETTER SIBE GA;Lo;0;L;;;;;N;;;;; -1865;MONGOLIAN LETTER SIBE HA;Lo;0;L;;;;;N;;;;; -1866;MONGOLIAN LETTER SIBE PA;Lo;0;L;;;;;N;;;;; -1867;MONGOLIAN LETTER SIBE SHA;Lo;0;L;;;;;N;;;;; -1868;MONGOLIAN LETTER SIBE TA;Lo;0;L;;;;;N;;;;; -1869;MONGOLIAN LETTER SIBE DA;Lo;0;L;;;;;N;;;;; -186A;MONGOLIAN LETTER SIBE JA;Lo;0;L;;;;;N;;;;; -186B;MONGOLIAN LETTER SIBE FA;Lo;0;L;;;;;N;;;;; -186C;MONGOLIAN LETTER SIBE GAA;Lo;0;L;;;;;N;;;;; -186D;MONGOLIAN LETTER SIBE HAA;Lo;0;L;;;;;N;;;;; -186E;MONGOLIAN LETTER SIBE TSA;Lo;0;L;;;;;N;;;;; -186F;MONGOLIAN LETTER SIBE ZA;Lo;0;L;;;;;N;;;;; -1870;MONGOLIAN LETTER SIBE RAA;Lo;0;L;;;;;N;;;;; -1871;MONGOLIAN LETTER SIBE CHA;Lo;0;L;;;;;N;;;;; -1872;MONGOLIAN LETTER SIBE ZHA;Lo;0;L;;;;;N;;;;; -1873;MONGOLIAN LETTER MANCHU I;Lo;0;L;;;;;N;;;;; -1874;MONGOLIAN LETTER MANCHU KA;Lo;0;L;;;;;N;;;;; -1875;MONGOLIAN LETTER MANCHU RA;Lo;0;L;;;;;N;;;;; -1876;MONGOLIAN LETTER MANCHU FA;Lo;0;L;;;;;N;;;;; -1877;MONGOLIAN LETTER MANCHU ZHA;Lo;0;L;;;;;N;;;;; -1880;MONGOLIAN LETTER ALI GALI ANUSVARA ONE;Lo;0;L;;;;;N;;;;; -1881;MONGOLIAN LETTER ALI GALI VISARGA ONE;Lo;0;L;;;;;N;;;;; -1882;MONGOLIAN LETTER ALI GALI DAMARU;Lo;0;L;;;;;N;;;;; -1883;MONGOLIAN LETTER ALI GALI UBADAMA;Lo;0;L;;;;;N;;;;; -1884;MONGOLIAN LETTER ALI GALI INVERTED UBADAMA;Lo;0;L;;;;;N;;;;; -1885;MONGOLIAN LETTER ALI GALI BALUDA;Lo;0;L;;;;;N;;;;; -1886;MONGOLIAN LETTER ALI GALI THREE BALUDA;Lo;0;L;;;;;N;;;;; -1887;MONGOLIAN LETTER ALI GALI A;Lo;0;L;;;;;N;;;;; -1888;MONGOLIAN LETTER ALI GALI I;Lo;0;L;;;;;N;;;;; -1889;MONGOLIAN LETTER ALI GALI KA;Lo;0;L;;;;;N;;;;; -188A;MONGOLIAN LETTER ALI GALI NGA;Lo;0;L;;;;;N;;;;; -188B;MONGOLIAN LETTER ALI GALI CA;Lo;0;L;;;;;N;;;;; -188C;MONGOLIAN LETTER ALI GALI TTA;Lo;0;L;;;;;N;;;;; -188D;MONGOLIAN LETTER ALI GALI TTHA;Lo;0;L;;;;;N;;;;; -188E;MONGOLIAN LETTER ALI GALI DDA;Lo;0;L;;;;;N;;;;; -188F;MONGOLIAN LETTER ALI GALI NNA;Lo;0;L;;;;;N;;;;; -1890;MONGOLIAN LETTER ALI GALI TA;Lo;0;L;;;;;N;;;;; -1891;MONGOLIAN LETTER ALI GALI DA;Lo;0;L;;;;;N;;;;; -1892;MONGOLIAN LETTER ALI GALI PA;Lo;0;L;;;;;N;;;;; -1893;MONGOLIAN LETTER ALI GALI PHA;Lo;0;L;;;;;N;;;;; -1894;MONGOLIAN LETTER ALI GALI SSA;Lo;0;L;;;;;N;;;;; -1895;MONGOLIAN LETTER ALI GALI ZHA;Lo;0;L;;;;;N;;;;; -1896;MONGOLIAN LETTER ALI GALI ZA;Lo;0;L;;;;;N;;;;; -1897;MONGOLIAN LETTER ALI GALI AH;Lo;0;L;;;;;N;;;;; -1898;MONGOLIAN LETTER TODO ALI GALI TA;Lo;0;L;;;;;N;;;;; -1899;MONGOLIAN LETTER TODO ALI GALI ZHA;Lo;0;L;;;;;N;;;;; -189A;MONGOLIAN LETTER MANCHU ALI GALI GHA;Lo;0;L;;;;;N;;;;; -189B;MONGOLIAN LETTER MANCHU ALI GALI NGA;Lo;0;L;;;;;N;;;;; -189C;MONGOLIAN LETTER MANCHU ALI GALI CA;Lo;0;L;;;;;N;;;;; -189D;MONGOLIAN LETTER MANCHU ALI GALI JHA;Lo;0;L;;;;;N;;;;; -189E;MONGOLIAN LETTER MANCHU ALI GALI TTA;Lo;0;L;;;;;N;;;;; -189F;MONGOLIAN LETTER MANCHU ALI GALI DDHA;Lo;0;L;;;;;N;;;;; -18A0;MONGOLIAN LETTER MANCHU ALI GALI TA;Lo;0;L;;;;;N;;;;; -18A1;MONGOLIAN LETTER MANCHU ALI GALI DHA;Lo;0;L;;;;;N;;;;; -18A2;MONGOLIAN LETTER MANCHU ALI GALI SSA;Lo;0;L;;;;;N;;;;; -18A3;MONGOLIAN LETTER MANCHU ALI GALI CYA;Lo;0;L;;;;;N;;;;; -18A4;MONGOLIAN LETTER MANCHU ALI GALI ZHA;Lo;0;L;;;;;N;;;;; -18A5;MONGOLIAN LETTER MANCHU ALI GALI ZA;Lo;0;L;;;;;N;;;;; -18A6;MONGOLIAN LETTER ALI GALI HALF U;Lo;0;L;;;;;N;;;;; -18A7;MONGOLIAN LETTER ALI GALI HALF YA;Lo;0;L;;;;;N;;;;; -18A8;MONGOLIAN LETTER MANCHU ALI GALI BHA;Lo;0;L;;;;;N;;;;; -18A9;MONGOLIAN LETTER ALI GALI DAGALGA;Mn;228;NSM;;;;;N;;;;; -1E00;LATIN CAPITAL LETTER A WITH RING BELOW;Lu;0;L;0041 0325;;;;N;;;;1E01; -1E01;LATIN SMALL LETTER A WITH RING BELOW;Ll;0;L;0061 0325;;;;N;;;1E00;;1E00 -1E02;LATIN CAPITAL LETTER B WITH DOT ABOVE;Lu;0;L;0042 0307;;;;N;;;;1E03; -1E03;LATIN SMALL LETTER B WITH DOT ABOVE;Ll;0;L;0062 0307;;;;N;;;1E02;;1E02 -1E04;LATIN CAPITAL LETTER B WITH DOT BELOW;Lu;0;L;0042 0323;;;;N;;;;1E05; -1E05;LATIN SMALL LETTER B WITH DOT BELOW;Ll;0;L;0062 0323;;;;N;;;1E04;;1E04 -1E06;LATIN CAPITAL LETTER B WITH LINE BELOW;Lu;0;L;0042 0331;;;;N;;;;1E07; -1E07;LATIN SMALL LETTER B WITH LINE BELOW;Ll;0;L;0062 0331;;;;N;;;1E06;;1E06 -1E08;LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE;Lu;0;L;00C7 0301;;;;N;;;;1E09; -1E09;LATIN SMALL LETTER C WITH CEDILLA AND ACUTE;Ll;0;L;00E7 0301;;;;N;;;1E08;;1E08 -1E0A;LATIN CAPITAL LETTER D WITH DOT ABOVE;Lu;0;L;0044 0307;;;;N;;;;1E0B; -1E0B;LATIN SMALL LETTER D WITH DOT ABOVE;Ll;0;L;0064 0307;;;;N;;;1E0A;;1E0A -1E0C;LATIN CAPITAL LETTER D WITH DOT BELOW;Lu;0;L;0044 0323;;;;N;;;;1E0D; -1E0D;LATIN SMALL LETTER D WITH DOT BELOW;Ll;0;L;0064 0323;;;;N;;;1E0C;;1E0C -1E0E;LATIN CAPITAL LETTER D WITH LINE BELOW;Lu;0;L;0044 0331;;;;N;;;;1E0F; -1E0F;LATIN SMALL LETTER D WITH LINE BELOW;Ll;0;L;0064 0331;;;;N;;;1E0E;;1E0E -1E10;LATIN CAPITAL LETTER D WITH CEDILLA;Lu;0;L;0044 0327;;;;N;;;;1E11; -1E11;LATIN SMALL LETTER D WITH CEDILLA;Ll;0;L;0064 0327;;;;N;;;1E10;;1E10 -1E12;LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW;Lu;0;L;0044 032D;;;;N;;;;1E13; -1E13;LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW;Ll;0;L;0064 032D;;;;N;;;1E12;;1E12 -1E14;LATIN CAPITAL LETTER E WITH MACRON AND GRAVE;Lu;0;L;0112 0300;;;;N;;;;1E15; -1E15;LATIN SMALL LETTER E WITH MACRON AND GRAVE;Ll;0;L;0113 0300;;;;N;;;1E14;;1E14 -1E16;LATIN CAPITAL LETTER E WITH MACRON AND ACUTE;Lu;0;L;0112 0301;;;;N;;;;1E17; -1E17;LATIN SMALL LETTER E WITH MACRON AND ACUTE;Ll;0;L;0113 0301;;;;N;;;1E16;;1E16 -1E18;LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW;Lu;0;L;0045 032D;;;;N;;;;1E19; -1E19;LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW;Ll;0;L;0065 032D;;;;N;;;1E18;;1E18 -1E1A;LATIN CAPITAL LETTER E WITH TILDE BELOW;Lu;0;L;0045 0330;;;;N;;;;1E1B; -1E1B;LATIN SMALL LETTER E WITH TILDE BELOW;Ll;0;L;0065 0330;;;;N;;;1E1A;;1E1A -1E1C;LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE;Lu;0;L;0228 0306;;;;N;;;;1E1D; -1E1D;LATIN SMALL LETTER E WITH CEDILLA AND BREVE;Ll;0;L;0229 0306;;;;N;;;1E1C;;1E1C -1E1E;LATIN CAPITAL LETTER F WITH DOT ABOVE;Lu;0;L;0046 0307;;;;N;;;;1E1F; -1E1F;LATIN SMALL LETTER F WITH DOT ABOVE;Ll;0;L;0066 0307;;;;N;;;1E1E;;1E1E -1E20;LATIN CAPITAL LETTER G WITH MACRON;Lu;0;L;0047 0304;;;;N;;;;1E21; -1E21;LATIN SMALL LETTER G WITH MACRON;Ll;0;L;0067 0304;;;;N;;;1E20;;1E20 -1E22;LATIN CAPITAL LETTER H WITH DOT ABOVE;Lu;0;L;0048 0307;;;;N;;;;1E23; -1E23;LATIN SMALL LETTER H WITH DOT ABOVE;Ll;0;L;0068 0307;;;;N;;;1E22;;1E22 -1E24;LATIN CAPITAL LETTER H WITH DOT BELOW;Lu;0;L;0048 0323;;;;N;;;;1E25; -1E25;LATIN SMALL LETTER H WITH DOT BELOW;Ll;0;L;0068 0323;;;;N;;;1E24;;1E24 -1E26;LATIN CAPITAL LETTER H WITH DIAERESIS;Lu;0;L;0048 0308;;;;N;;;;1E27; -1E27;LATIN SMALL LETTER H WITH DIAERESIS;Ll;0;L;0068 0308;;;;N;;;1E26;;1E26 -1E28;LATIN CAPITAL LETTER H WITH CEDILLA;Lu;0;L;0048 0327;;;;N;;;;1E29; -1E29;LATIN SMALL LETTER H WITH CEDILLA;Ll;0;L;0068 0327;;;;N;;;1E28;;1E28 -1E2A;LATIN CAPITAL LETTER H WITH BREVE BELOW;Lu;0;L;0048 032E;;;;N;;;;1E2B; -1E2B;LATIN SMALL LETTER H WITH BREVE BELOW;Ll;0;L;0068 032E;;;;N;;;1E2A;;1E2A -1E2C;LATIN CAPITAL LETTER I WITH TILDE BELOW;Lu;0;L;0049 0330;;;;N;;;;1E2D; -1E2D;LATIN SMALL LETTER I WITH TILDE BELOW;Ll;0;L;0069 0330;;;;N;;;1E2C;;1E2C -1E2E;LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE;Lu;0;L;00CF 0301;;;;N;;;;1E2F; -1E2F;LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE;Ll;0;L;00EF 0301;;;;N;;;1E2E;;1E2E -1E30;LATIN CAPITAL LETTER K WITH ACUTE;Lu;0;L;004B 0301;;;;N;;;;1E31; -1E31;LATIN SMALL LETTER K WITH ACUTE;Ll;0;L;006B 0301;;;;N;;;1E30;;1E30 -1E32;LATIN CAPITAL LETTER K WITH DOT BELOW;Lu;0;L;004B 0323;;;;N;;;;1E33; -1E33;LATIN SMALL LETTER K WITH DOT BELOW;Ll;0;L;006B 0323;;;;N;;;1E32;;1E32 -1E34;LATIN CAPITAL LETTER K WITH LINE BELOW;Lu;0;L;004B 0331;;;;N;;;;1E35; -1E35;LATIN SMALL LETTER K WITH LINE BELOW;Ll;0;L;006B 0331;;;;N;;;1E34;;1E34 -1E36;LATIN CAPITAL LETTER L WITH DOT BELOW;Lu;0;L;004C 0323;;;;N;;;;1E37; -1E37;LATIN SMALL LETTER L WITH DOT BELOW;Ll;0;L;006C 0323;;;;N;;;1E36;;1E36 -1E38;LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON;Lu;0;L;1E36 0304;;;;N;;;;1E39; -1E39;LATIN SMALL LETTER L WITH DOT BELOW AND MACRON;Ll;0;L;1E37 0304;;;;N;;;1E38;;1E38 -1E3A;LATIN CAPITAL LETTER L WITH LINE BELOW;Lu;0;L;004C 0331;;;;N;;;;1E3B; -1E3B;LATIN SMALL LETTER L WITH LINE BELOW;Ll;0;L;006C 0331;;;;N;;;1E3A;;1E3A -1E3C;LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW;Lu;0;L;004C 032D;;;;N;;;;1E3D; -1E3D;LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW;Ll;0;L;006C 032D;;;;N;;;1E3C;;1E3C -1E3E;LATIN CAPITAL LETTER M WITH ACUTE;Lu;0;L;004D 0301;;;;N;;;;1E3F; -1E3F;LATIN SMALL LETTER M WITH ACUTE;Ll;0;L;006D 0301;;;;N;;;1E3E;;1E3E -1E40;LATIN CAPITAL LETTER M WITH DOT ABOVE;Lu;0;L;004D 0307;;;;N;;;;1E41; -1E41;LATIN SMALL LETTER M WITH DOT ABOVE;Ll;0;L;006D 0307;;;;N;;;1E40;;1E40 -1E42;LATIN CAPITAL LETTER M WITH DOT BELOW;Lu;0;L;004D 0323;;;;N;;;;1E43; -1E43;LATIN SMALL LETTER M WITH DOT BELOW;Ll;0;L;006D 0323;;;;N;;;1E42;;1E42 -1E44;LATIN CAPITAL LETTER N WITH DOT ABOVE;Lu;0;L;004E 0307;;;;N;;;;1E45; -1E45;LATIN SMALL LETTER N WITH DOT ABOVE;Ll;0;L;006E 0307;;;;N;;;1E44;;1E44 -1E46;LATIN CAPITAL LETTER N WITH DOT BELOW;Lu;0;L;004E 0323;;;;N;;;;1E47; -1E47;LATIN SMALL LETTER N WITH DOT BELOW;Ll;0;L;006E 0323;;;;N;;;1E46;;1E46 -1E48;LATIN CAPITAL LETTER N WITH LINE BELOW;Lu;0;L;004E 0331;;;;N;;;;1E49; -1E49;LATIN SMALL LETTER N WITH LINE BELOW;Ll;0;L;006E 0331;;;;N;;;1E48;;1E48 -1E4A;LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW;Lu;0;L;004E 032D;;;;N;;;;1E4B; -1E4B;LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW;Ll;0;L;006E 032D;;;;N;;;1E4A;;1E4A -1E4C;LATIN CAPITAL LETTER O WITH TILDE AND ACUTE;Lu;0;L;00D5 0301;;;;N;;;;1E4D; -1E4D;LATIN SMALL LETTER O WITH TILDE AND ACUTE;Ll;0;L;00F5 0301;;;;N;;;1E4C;;1E4C -1E4E;LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS;Lu;0;L;00D5 0308;;;;N;;;;1E4F; -1E4F;LATIN SMALL LETTER O WITH TILDE AND DIAERESIS;Ll;0;L;00F5 0308;;;;N;;;1E4E;;1E4E -1E50;LATIN CAPITAL LETTER O WITH MACRON AND GRAVE;Lu;0;L;014C 0300;;;;N;;;;1E51; -1E51;LATIN SMALL LETTER O WITH MACRON AND GRAVE;Ll;0;L;014D 0300;;;;N;;;1E50;;1E50 -1E52;LATIN CAPITAL LETTER O WITH MACRON AND ACUTE;Lu;0;L;014C 0301;;;;N;;;;1E53; -1E53;LATIN SMALL LETTER O WITH MACRON AND ACUTE;Ll;0;L;014D 0301;;;;N;;;1E52;;1E52 -1E54;LATIN CAPITAL LETTER P WITH ACUTE;Lu;0;L;0050 0301;;;;N;;;;1E55; -1E55;LATIN SMALL LETTER P WITH ACUTE;Ll;0;L;0070 0301;;;;N;;;1E54;;1E54 -1E56;LATIN CAPITAL LETTER P WITH DOT ABOVE;Lu;0;L;0050 0307;;;;N;;;;1E57; -1E57;LATIN SMALL LETTER P WITH DOT ABOVE;Ll;0;L;0070 0307;;;;N;;;1E56;;1E56 -1E58;LATIN CAPITAL LETTER R WITH DOT ABOVE;Lu;0;L;0052 0307;;;;N;;;;1E59; -1E59;LATIN SMALL LETTER R WITH DOT ABOVE;Ll;0;L;0072 0307;;;;N;;;1E58;;1E58 -1E5A;LATIN CAPITAL LETTER R WITH DOT BELOW;Lu;0;L;0052 0323;;;;N;;;;1E5B; -1E5B;LATIN SMALL LETTER R WITH DOT BELOW;Ll;0;L;0072 0323;;;;N;;;1E5A;;1E5A -1E5C;LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON;Lu;0;L;1E5A 0304;;;;N;;;;1E5D; -1E5D;LATIN SMALL LETTER R WITH DOT BELOW AND MACRON;Ll;0;L;1E5B 0304;;;;N;;;1E5C;;1E5C -1E5E;LATIN CAPITAL LETTER R WITH LINE BELOW;Lu;0;L;0052 0331;;;;N;;;;1E5F; -1E5F;LATIN SMALL LETTER R WITH LINE BELOW;Ll;0;L;0072 0331;;;;N;;;1E5E;;1E5E -1E60;LATIN CAPITAL LETTER S WITH DOT ABOVE;Lu;0;L;0053 0307;;;;N;;;;1E61; -1E61;LATIN SMALL LETTER S WITH DOT ABOVE;Ll;0;L;0073 0307;;;;N;;;1E60;;1E60 -1E62;LATIN CAPITAL LETTER S WITH DOT BELOW;Lu;0;L;0053 0323;;;;N;;;;1E63; -1E63;LATIN SMALL LETTER S WITH DOT BELOW;Ll;0;L;0073 0323;;;;N;;;1E62;;1E62 -1E64;LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE;Lu;0;L;015A 0307;;;;N;;;;1E65; -1E65;LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE;Ll;0;L;015B 0307;;;;N;;;1E64;;1E64 -1E66;LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE;Lu;0;L;0160 0307;;;;N;;;;1E67; -1E67;LATIN SMALL LETTER S WITH CARON AND DOT ABOVE;Ll;0;L;0161 0307;;;;N;;;1E66;;1E66 -1E68;LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE;Lu;0;L;1E62 0307;;;;N;;;;1E69; -1E69;LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE;Ll;0;L;1E63 0307;;;;N;;;1E68;;1E68 -1E6A;LATIN CAPITAL LETTER T WITH DOT ABOVE;Lu;0;L;0054 0307;;;;N;;;;1E6B; -1E6B;LATIN SMALL LETTER T WITH DOT ABOVE;Ll;0;L;0074 0307;;;;N;;;1E6A;;1E6A -1E6C;LATIN CAPITAL LETTER T WITH DOT BELOW;Lu;0;L;0054 0323;;;;N;;;;1E6D; -1E6D;LATIN SMALL LETTER T WITH DOT BELOW;Ll;0;L;0074 0323;;;;N;;;1E6C;;1E6C -1E6E;LATIN CAPITAL LETTER T WITH LINE BELOW;Lu;0;L;0054 0331;;;;N;;;;1E6F; -1E6F;LATIN SMALL LETTER T WITH LINE BELOW;Ll;0;L;0074 0331;;;;N;;;1E6E;;1E6E -1E70;LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW;Lu;0;L;0054 032D;;;;N;;;;1E71; -1E71;LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW;Ll;0;L;0074 032D;;;;N;;;1E70;;1E70 -1E72;LATIN CAPITAL LETTER U WITH DIAERESIS BELOW;Lu;0;L;0055 0324;;;;N;;;;1E73; -1E73;LATIN SMALL LETTER U WITH DIAERESIS BELOW;Ll;0;L;0075 0324;;;;N;;;1E72;;1E72 -1E74;LATIN CAPITAL LETTER U WITH TILDE BELOW;Lu;0;L;0055 0330;;;;N;;;;1E75; -1E75;LATIN SMALL LETTER U WITH TILDE BELOW;Ll;0;L;0075 0330;;;;N;;;1E74;;1E74 -1E76;LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW;Lu;0;L;0055 032D;;;;N;;;;1E77; -1E77;LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW;Ll;0;L;0075 032D;;;;N;;;1E76;;1E76 -1E78;LATIN CAPITAL LETTER U WITH TILDE AND ACUTE;Lu;0;L;0168 0301;;;;N;;;;1E79; -1E79;LATIN SMALL LETTER U WITH TILDE AND ACUTE;Ll;0;L;0169 0301;;;;N;;;1E78;;1E78 -1E7A;LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS;Lu;0;L;016A 0308;;;;N;;;;1E7B; -1E7B;LATIN SMALL LETTER U WITH MACRON AND DIAERESIS;Ll;0;L;016B 0308;;;;N;;;1E7A;;1E7A -1E7C;LATIN CAPITAL LETTER V WITH TILDE;Lu;0;L;0056 0303;;;;N;;;;1E7D; -1E7D;LATIN SMALL LETTER V WITH TILDE;Ll;0;L;0076 0303;;;;N;;;1E7C;;1E7C -1E7E;LATIN CAPITAL LETTER V WITH DOT BELOW;Lu;0;L;0056 0323;;;;N;;;;1E7F; -1E7F;LATIN SMALL LETTER V WITH DOT BELOW;Ll;0;L;0076 0323;;;;N;;;1E7E;;1E7E -1E80;LATIN CAPITAL LETTER W WITH GRAVE;Lu;0;L;0057 0300;;;;N;;;;1E81; -1E81;LATIN SMALL LETTER W WITH GRAVE;Ll;0;L;0077 0300;;;;N;;;1E80;;1E80 -1E82;LATIN CAPITAL LETTER W WITH ACUTE;Lu;0;L;0057 0301;;;;N;;;;1E83; -1E83;LATIN SMALL LETTER W WITH ACUTE;Ll;0;L;0077 0301;;;;N;;;1E82;;1E82 -1E84;LATIN CAPITAL LETTER W WITH DIAERESIS;Lu;0;L;0057 0308;;;;N;;;;1E85; -1E85;LATIN SMALL LETTER W WITH DIAERESIS;Ll;0;L;0077 0308;;;;N;;;1E84;;1E84 -1E86;LATIN CAPITAL LETTER W WITH DOT ABOVE;Lu;0;L;0057 0307;;;;N;;;;1E87; -1E87;LATIN SMALL LETTER W WITH DOT ABOVE;Ll;0;L;0077 0307;;;;N;;;1E86;;1E86 -1E88;LATIN CAPITAL LETTER W WITH DOT BELOW;Lu;0;L;0057 0323;;;;N;;;;1E89; -1E89;LATIN SMALL LETTER W WITH DOT BELOW;Ll;0;L;0077 0323;;;;N;;;1E88;;1E88 -1E8A;LATIN CAPITAL LETTER X WITH DOT ABOVE;Lu;0;L;0058 0307;;;;N;;;;1E8B; -1E8B;LATIN SMALL LETTER X WITH DOT ABOVE;Ll;0;L;0078 0307;;;;N;;;1E8A;;1E8A -1E8C;LATIN CAPITAL LETTER X WITH DIAERESIS;Lu;0;L;0058 0308;;;;N;;;;1E8D; -1E8D;LATIN SMALL LETTER X WITH DIAERESIS;Ll;0;L;0078 0308;;;;N;;;1E8C;;1E8C -1E8E;LATIN CAPITAL LETTER Y WITH DOT ABOVE;Lu;0;L;0059 0307;;;;N;;;;1E8F; -1E8F;LATIN SMALL LETTER Y WITH DOT ABOVE;Ll;0;L;0079 0307;;;;N;;;1E8E;;1E8E -1E90;LATIN CAPITAL LETTER Z WITH CIRCUMFLEX;Lu;0;L;005A 0302;;;;N;;;;1E91; -1E91;LATIN SMALL LETTER Z WITH CIRCUMFLEX;Ll;0;L;007A 0302;;;;N;;;1E90;;1E90 -1E92;LATIN CAPITAL LETTER Z WITH DOT BELOW;Lu;0;L;005A 0323;;;;N;;;;1E93; -1E93;LATIN SMALL LETTER Z WITH DOT BELOW;Ll;0;L;007A 0323;;;;N;;;1E92;;1E92 -1E94;LATIN CAPITAL LETTER Z WITH LINE BELOW;Lu;0;L;005A 0331;;;;N;;;;1E95; -1E95;LATIN SMALL LETTER Z WITH LINE BELOW;Ll;0;L;007A 0331;;;;N;;;1E94;;1E94 -1E96;LATIN SMALL LETTER H WITH LINE BELOW;Ll;0;L;0068 0331;;;;N;;;;; -1E97;LATIN SMALL LETTER T WITH DIAERESIS;Ll;0;L;0074 0308;;;;N;;;;; -1E98;LATIN SMALL LETTER W WITH RING ABOVE;Ll;0;L;0077 030A;;;;N;;;;; -1E99;LATIN SMALL LETTER Y WITH RING ABOVE;Ll;0;L;0079 030A;;;;N;;;;; -1E9A;LATIN SMALL LETTER A WITH RIGHT HALF RING;Ll;0;L;<compat> 0061 02BE;;;;N;;;;; -1E9B;LATIN SMALL LETTER LONG S WITH DOT ABOVE;Ll;0;L;017F 0307;;;;N;;;1E60;;1E60 -1EA0;LATIN CAPITAL LETTER A WITH DOT BELOW;Lu;0;L;0041 0323;;;;N;;;;1EA1; -1EA1;LATIN SMALL LETTER A WITH DOT BELOW;Ll;0;L;0061 0323;;;;N;;;1EA0;;1EA0 -1EA2;LATIN CAPITAL LETTER A WITH HOOK ABOVE;Lu;0;L;0041 0309;;;;N;;;;1EA3; -1EA3;LATIN SMALL LETTER A WITH HOOK ABOVE;Ll;0;L;0061 0309;;;;N;;;1EA2;;1EA2 -1EA4;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00C2 0301;;;;N;;;;1EA5; -1EA5;LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00E2 0301;;;;N;;;1EA4;;1EA4 -1EA6;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00C2 0300;;;;N;;;;1EA7; -1EA7;LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00E2 0300;;;;N;;;1EA6;;1EA6 -1EA8;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00C2 0309;;;;N;;;;1EA9; -1EA9;LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00E2 0309;;;;N;;;1EA8;;1EA8 -1EAA;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE;Lu;0;L;00C2 0303;;;;N;;;;1EAB; -1EAB;LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE;Ll;0;L;00E2 0303;;;;N;;;1EAA;;1EAA -1EAC;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1EA0 0302;;;;N;;;;1EAD; -1EAD;LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1EA1 0302;;;;N;;;1EAC;;1EAC -1EAE;LATIN CAPITAL LETTER A WITH BREVE AND ACUTE;Lu;0;L;0102 0301;;;;N;;;;1EAF; -1EAF;LATIN SMALL LETTER A WITH BREVE AND ACUTE;Ll;0;L;0103 0301;;;;N;;;1EAE;;1EAE -1EB0;LATIN CAPITAL LETTER A WITH BREVE AND GRAVE;Lu;0;L;0102 0300;;;;N;;;;1EB1; -1EB1;LATIN SMALL LETTER A WITH BREVE AND GRAVE;Ll;0;L;0103 0300;;;;N;;;1EB0;;1EB0 -1EB2;LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE;Lu;0;L;0102 0309;;;;N;;;;1EB3; -1EB3;LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE;Ll;0;L;0103 0309;;;;N;;;1EB2;;1EB2 -1EB4;LATIN CAPITAL LETTER A WITH BREVE AND TILDE;Lu;0;L;0102 0303;;;;N;;;;1EB5; -1EB5;LATIN SMALL LETTER A WITH BREVE AND TILDE;Ll;0;L;0103 0303;;;;N;;;1EB4;;1EB4 -1EB6;LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW;Lu;0;L;1EA0 0306;;;;N;;;;1EB7; -1EB7;LATIN SMALL LETTER A WITH BREVE AND DOT BELOW;Ll;0;L;1EA1 0306;;;;N;;;1EB6;;1EB6 -1EB8;LATIN CAPITAL LETTER E WITH DOT BELOW;Lu;0;L;0045 0323;;;;N;;;;1EB9; -1EB9;LATIN SMALL LETTER E WITH DOT BELOW;Ll;0;L;0065 0323;;;;N;;;1EB8;;1EB8 -1EBA;LATIN CAPITAL LETTER E WITH HOOK ABOVE;Lu;0;L;0045 0309;;;;N;;;;1EBB; -1EBB;LATIN SMALL LETTER E WITH HOOK ABOVE;Ll;0;L;0065 0309;;;;N;;;1EBA;;1EBA -1EBC;LATIN CAPITAL LETTER E WITH TILDE;Lu;0;L;0045 0303;;;;N;;;;1EBD; -1EBD;LATIN SMALL LETTER E WITH TILDE;Ll;0;L;0065 0303;;;;N;;;1EBC;;1EBC -1EBE;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00CA 0301;;;;N;;;;1EBF; -1EBF;LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00EA 0301;;;;N;;;1EBE;;1EBE -1EC0;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00CA 0300;;;;N;;;;1EC1; -1EC1;LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00EA 0300;;;;N;;;1EC0;;1EC0 -1EC2;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00CA 0309;;;;N;;;;1EC3; -1EC3;LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00EA 0309;;;;N;;;1EC2;;1EC2 -1EC4;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE;Lu;0;L;00CA 0303;;;;N;;;;1EC5; -1EC5;LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE;Ll;0;L;00EA 0303;;;;N;;;1EC4;;1EC4 -1EC6;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1EB8 0302;;;;N;;;;1EC7; -1EC7;LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1EB9 0302;;;;N;;;1EC6;;1EC6 -1EC8;LATIN CAPITAL LETTER I WITH HOOK ABOVE;Lu;0;L;0049 0309;;;;N;;;;1EC9; -1EC9;LATIN SMALL LETTER I WITH HOOK ABOVE;Ll;0;L;0069 0309;;;;N;;;1EC8;;1EC8 -1ECA;LATIN CAPITAL LETTER I WITH DOT BELOW;Lu;0;L;0049 0323;;;;N;;;;1ECB; -1ECB;LATIN SMALL LETTER I WITH DOT BELOW;Ll;0;L;0069 0323;;;;N;;;1ECA;;1ECA -1ECC;LATIN CAPITAL LETTER O WITH DOT BELOW;Lu;0;L;004F 0323;;;;N;;;;1ECD; -1ECD;LATIN SMALL LETTER O WITH DOT BELOW;Ll;0;L;006F 0323;;;;N;;;1ECC;;1ECC -1ECE;LATIN CAPITAL LETTER O WITH HOOK ABOVE;Lu;0;L;004F 0309;;;;N;;;;1ECF; -1ECF;LATIN SMALL LETTER O WITH HOOK ABOVE;Ll;0;L;006F 0309;;;;N;;;1ECE;;1ECE -1ED0;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00D4 0301;;;;N;;;;1ED1; -1ED1;LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00F4 0301;;;;N;;;1ED0;;1ED0 -1ED2;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00D4 0300;;;;N;;;;1ED3; -1ED3;LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00F4 0300;;;;N;;;1ED2;;1ED2 -1ED4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00D4 0309;;;;N;;;;1ED5; -1ED5;LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00F4 0309;;;;N;;;1ED4;;1ED4 -1ED6;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE;Lu;0;L;00D4 0303;;;;N;;;;1ED7; -1ED7;LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE;Ll;0;L;00F4 0303;;;;N;;;1ED6;;1ED6 -1ED8;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1ECC 0302;;;;N;;;;1ED9; -1ED9;LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1ECD 0302;;;;N;;;1ED8;;1ED8 -1EDA;LATIN CAPITAL LETTER O WITH HORN AND ACUTE;Lu;0;L;01A0 0301;;;;N;;;;1EDB; -1EDB;LATIN SMALL LETTER O WITH HORN AND ACUTE;Ll;0;L;01A1 0301;;;;N;;;1EDA;;1EDA -1EDC;LATIN CAPITAL LETTER O WITH HORN AND GRAVE;Lu;0;L;01A0 0300;;;;N;;;;1EDD; -1EDD;LATIN SMALL LETTER O WITH HORN AND GRAVE;Ll;0;L;01A1 0300;;;;N;;;1EDC;;1EDC -1EDE;LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE;Lu;0;L;01A0 0309;;;;N;;;;1EDF; -1EDF;LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE;Ll;0;L;01A1 0309;;;;N;;;1EDE;;1EDE -1EE0;LATIN CAPITAL LETTER O WITH HORN AND TILDE;Lu;0;L;01A0 0303;;;;N;;;;1EE1; -1EE1;LATIN SMALL LETTER O WITH HORN AND TILDE;Ll;0;L;01A1 0303;;;;N;;;1EE0;;1EE0 -1EE2;LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW;Lu;0;L;01A0 0323;;;;N;;;;1EE3; -1EE3;LATIN SMALL LETTER O WITH HORN AND DOT BELOW;Ll;0;L;01A1 0323;;;;N;;;1EE2;;1EE2 -1EE4;LATIN CAPITAL LETTER U WITH DOT BELOW;Lu;0;L;0055 0323;;;;N;;;;1EE5; -1EE5;LATIN SMALL LETTER U WITH DOT BELOW;Ll;0;L;0075 0323;;;;N;;;1EE4;;1EE4 -1EE6;LATIN CAPITAL LETTER U WITH HOOK ABOVE;Lu;0;L;0055 0309;;;;N;;;;1EE7; -1EE7;LATIN SMALL LETTER U WITH HOOK ABOVE;Ll;0;L;0075 0309;;;;N;;;1EE6;;1EE6 -1EE8;LATIN CAPITAL LETTER U WITH HORN AND ACUTE;Lu;0;L;01AF 0301;;;;N;;;;1EE9; -1EE9;LATIN SMALL LETTER U WITH HORN AND ACUTE;Ll;0;L;01B0 0301;;;;N;;;1EE8;;1EE8 -1EEA;LATIN CAPITAL LETTER U WITH HORN AND GRAVE;Lu;0;L;01AF 0300;;;;N;;;;1EEB; -1EEB;LATIN SMALL LETTER U WITH HORN AND GRAVE;Ll;0;L;01B0 0300;;;;N;;;1EEA;;1EEA -1EEC;LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE;Lu;0;L;01AF 0309;;;;N;;;;1EED; -1EED;LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE;Ll;0;L;01B0 0309;;;;N;;;1EEC;;1EEC -1EEE;LATIN CAPITAL LETTER U WITH HORN AND TILDE;Lu;0;L;01AF 0303;;;;N;;;;1EEF; -1EEF;LATIN SMALL LETTER U WITH HORN AND TILDE;Ll;0;L;01B0 0303;;;;N;;;1EEE;;1EEE -1EF0;LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW;Lu;0;L;01AF 0323;;;;N;;;;1EF1; -1EF1;LATIN SMALL LETTER U WITH HORN AND DOT BELOW;Ll;0;L;01B0 0323;;;;N;;;1EF0;;1EF0 -1EF2;LATIN CAPITAL LETTER Y WITH GRAVE;Lu;0;L;0059 0300;;;;N;;;;1EF3; -1EF3;LATIN SMALL LETTER Y WITH GRAVE;Ll;0;L;0079 0300;;;;N;;;1EF2;;1EF2 -1EF4;LATIN CAPITAL LETTER Y WITH DOT BELOW;Lu;0;L;0059 0323;;;;N;;;;1EF5; -1EF5;LATIN SMALL LETTER Y WITH DOT BELOW;Ll;0;L;0079 0323;;;;N;;;1EF4;;1EF4 -1EF6;LATIN CAPITAL LETTER Y WITH HOOK ABOVE;Lu;0;L;0059 0309;;;;N;;;;1EF7; -1EF7;LATIN SMALL LETTER Y WITH HOOK ABOVE;Ll;0;L;0079 0309;;;;N;;;1EF6;;1EF6 -1EF8;LATIN CAPITAL LETTER Y WITH TILDE;Lu;0;L;0059 0303;;;;N;;;;1EF9; -1EF9;LATIN SMALL LETTER Y WITH TILDE;Ll;0;L;0079 0303;;;;N;;;1EF8;;1EF8 -1F00;GREEK SMALL LETTER ALPHA WITH PSILI;Ll;0;L;03B1 0313;;;;N;;;1F08;;1F08 -1F01;GREEK SMALL LETTER ALPHA WITH DASIA;Ll;0;L;03B1 0314;;;;N;;;1F09;;1F09 -1F02;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA;Ll;0;L;1F00 0300;;;;N;;;1F0A;;1F0A -1F03;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA;Ll;0;L;1F01 0300;;;;N;;;1F0B;;1F0B -1F04;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA;Ll;0;L;1F00 0301;;;;N;;;1F0C;;1F0C -1F05;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA;Ll;0;L;1F01 0301;;;;N;;;1F0D;;1F0D -1F06;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI;Ll;0;L;1F00 0342;;;;N;;;1F0E;;1F0E -1F07;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI;Ll;0;L;1F01 0342;;;;N;;;1F0F;;1F0F -1F08;GREEK CAPITAL LETTER ALPHA WITH PSILI;Lu;0;L;0391 0313;;;;N;;;;1F00; -1F09;GREEK CAPITAL LETTER ALPHA WITH DASIA;Lu;0;L;0391 0314;;;;N;;;;1F01; -1F0A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA;Lu;0;L;1F08 0300;;;;N;;;;1F02; -1F0B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA;Lu;0;L;1F09 0300;;;;N;;;;1F03; -1F0C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA;Lu;0;L;1F08 0301;;;;N;;;;1F04; -1F0D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA;Lu;0;L;1F09 0301;;;;N;;;;1F05; -1F0E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI;Lu;0;L;1F08 0342;;;;N;;;;1F06; -1F0F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI;Lu;0;L;1F09 0342;;;;N;;;;1F07; -1F10;GREEK SMALL LETTER EPSILON WITH PSILI;Ll;0;L;03B5 0313;;;;N;;;1F18;;1F18 -1F11;GREEK SMALL LETTER EPSILON WITH DASIA;Ll;0;L;03B5 0314;;;;N;;;1F19;;1F19 -1F12;GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA;Ll;0;L;1F10 0300;;;;N;;;1F1A;;1F1A -1F13;GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA;Ll;0;L;1F11 0300;;;;N;;;1F1B;;1F1B -1F14;GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA;Ll;0;L;1F10 0301;;;;N;;;1F1C;;1F1C -1F15;GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA;Ll;0;L;1F11 0301;;;;N;;;1F1D;;1F1D -1F18;GREEK CAPITAL LETTER EPSILON WITH PSILI;Lu;0;L;0395 0313;;;;N;;;;1F10; -1F19;GREEK CAPITAL LETTER EPSILON WITH DASIA;Lu;0;L;0395 0314;;;;N;;;;1F11; -1F1A;GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA;Lu;0;L;1F18 0300;;;;N;;;;1F12; -1F1B;GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA;Lu;0;L;1F19 0300;;;;N;;;;1F13; -1F1C;GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA;Lu;0;L;1F18 0301;;;;N;;;;1F14; -1F1D;GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA;Lu;0;L;1F19 0301;;;;N;;;;1F15; -1F20;GREEK SMALL LETTER ETA WITH PSILI;Ll;0;L;03B7 0313;;;;N;;;1F28;;1F28 -1F21;GREEK SMALL LETTER ETA WITH DASIA;Ll;0;L;03B7 0314;;;;N;;;1F29;;1F29 -1F22;GREEK SMALL LETTER ETA WITH PSILI AND VARIA;Ll;0;L;1F20 0300;;;;N;;;1F2A;;1F2A -1F23;GREEK SMALL LETTER ETA WITH DASIA AND VARIA;Ll;0;L;1F21 0300;;;;N;;;1F2B;;1F2B -1F24;GREEK SMALL LETTER ETA WITH PSILI AND OXIA;Ll;0;L;1F20 0301;;;;N;;;1F2C;;1F2C -1F25;GREEK SMALL LETTER ETA WITH DASIA AND OXIA;Ll;0;L;1F21 0301;;;;N;;;1F2D;;1F2D -1F26;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI;Ll;0;L;1F20 0342;;;;N;;;1F2E;;1F2E -1F27;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI;Ll;0;L;1F21 0342;;;;N;;;1F2F;;1F2F -1F28;GREEK CAPITAL LETTER ETA WITH PSILI;Lu;0;L;0397 0313;;;;N;;;;1F20; -1F29;GREEK CAPITAL LETTER ETA WITH DASIA;Lu;0;L;0397 0314;;;;N;;;;1F21; -1F2A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA;Lu;0;L;1F28 0300;;;;N;;;;1F22; -1F2B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA;Lu;0;L;1F29 0300;;;;N;;;;1F23; -1F2C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA;Lu;0;L;1F28 0301;;;;N;;;;1F24; -1F2D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA;Lu;0;L;1F29 0301;;;;N;;;;1F25; -1F2E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI;Lu;0;L;1F28 0342;;;;N;;;;1F26; -1F2F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI;Lu;0;L;1F29 0342;;;;N;;;;1F27; -1F30;GREEK SMALL LETTER IOTA WITH PSILI;Ll;0;L;03B9 0313;;;;N;;;1F38;;1F38 -1F31;GREEK SMALL LETTER IOTA WITH DASIA;Ll;0;L;03B9 0314;;;;N;;;1F39;;1F39 -1F32;GREEK SMALL LETTER IOTA WITH PSILI AND VARIA;Ll;0;L;1F30 0300;;;;N;;;1F3A;;1F3A -1F33;GREEK SMALL LETTER IOTA WITH DASIA AND VARIA;Ll;0;L;1F31 0300;;;;N;;;1F3B;;1F3B -1F34;GREEK SMALL LETTER IOTA WITH PSILI AND OXIA;Ll;0;L;1F30 0301;;;;N;;;1F3C;;1F3C -1F35;GREEK SMALL LETTER IOTA WITH DASIA AND OXIA;Ll;0;L;1F31 0301;;;;N;;;1F3D;;1F3D -1F36;GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI;Ll;0;L;1F30 0342;;;;N;;;1F3E;;1F3E -1F37;GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI;Ll;0;L;1F31 0342;;;;N;;;1F3F;;1F3F -1F38;GREEK CAPITAL LETTER IOTA WITH PSILI;Lu;0;L;0399 0313;;;;N;;;;1F30; -1F39;GREEK CAPITAL LETTER IOTA WITH DASIA;Lu;0;L;0399 0314;;;;N;;;;1F31; -1F3A;GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA;Lu;0;L;1F38 0300;;;;N;;;;1F32; -1F3B;GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA;Lu;0;L;1F39 0300;;;;N;;;;1F33; -1F3C;GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA;Lu;0;L;1F38 0301;;;;N;;;;1F34; -1F3D;GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA;Lu;0;L;1F39 0301;;;;N;;;;1F35; -1F3E;GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI;Lu;0;L;1F38 0342;;;;N;;;;1F36; -1F3F;GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI;Lu;0;L;1F39 0342;;;;N;;;;1F37; -1F40;GREEK SMALL LETTER OMICRON WITH PSILI;Ll;0;L;03BF 0313;;;;N;;;1F48;;1F48 -1F41;GREEK SMALL LETTER OMICRON WITH DASIA;Ll;0;L;03BF 0314;;;;N;;;1F49;;1F49 -1F42;GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA;Ll;0;L;1F40 0300;;;;N;;;1F4A;;1F4A -1F43;GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA;Ll;0;L;1F41 0300;;;;N;;;1F4B;;1F4B -1F44;GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA;Ll;0;L;1F40 0301;;;;N;;;1F4C;;1F4C -1F45;GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA;Ll;0;L;1F41 0301;;;;N;;;1F4D;;1F4D -1F48;GREEK CAPITAL LETTER OMICRON WITH PSILI;Lu;0;L;039F 0313;;;;N;;;;1F40; -1F49;GREEK CAPITAL LETTER OMICRON WITH DASIA;Lu;0;L;039F 0314;;;;N;;;;1F41; -1F4A;GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA;Lu;0;L;1F48 0300;;;;N;;;;1F42; -1F4B;GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA;Lu;0;L;1F49 0300;;;;N;;;;1F43; -1F4C;GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA;Lu;0;L;1F48 0301;;;;N;;;;1F44; -1F4D;GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA;Lu;0;L;1F49 0301;;;;N;;;;1F45; -1F50;GREEK SMALL LETTER UPSILON WITH PSILI;Ll;0;L;03C5 0313;;;;N;;;;; -1F51;GREEK SMALL LETTER UPSILON WITH DASIA;Ll;0;L;03C5 0314;;;;N;;;1F59;;1F59 -1F52;GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA;Ll;0;L;1F50 0300;;;;N;;;;; -1F53;GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA;Ll;0;L;1F51 0300;;;;N;;;1F5B;;1F5B -1F54;GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA;Ll;0;L;1F50 0301;;;;N;;;;; -1F55;GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA;Ll;0;L;1F51 0301;;;;N;;;1F5D;;1F5D -1F56;GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI;Ll;0;L;1F50 0342;;;;N;;;;; -1F57;GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI;Ll;0;L;1F51 0342;;;;N;;;1F5F;;1F5F -1F59;GREEK CAPITAL LETTER UPSILON WITH DASIA;Lu;0;L;03A5 0314;;;;N;;;;1F51; -1F5B;GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA;Lu;0;L;1F59 0300;;;;N;;;;1F53; -1F5D;GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA;Lu;0;L;1F59 0301;;;;N;;;;1F55; -1F5F;GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI;Lu;0;L;1F59 0342;;;;N;;;;1F57; -1F60;GREEK SMALL LETTER OMEGA WITH PSILI;Ll;0;L;03C9 0313;;;;N;;;1F68;;1F68 -1F61;GREEK SMALL LETTER OMEGA WITH DASIA;Ll;0;L;03C9 0314;;;;N;;;1F69;;1F69 -1F62;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA;Ll;0;L;1F60 0300;;;;N;;;1F6A;;1F6A -1F63;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA;Ll;0;L;1F61 0300;;;;N;;;1F6B;;1F6B -1F64;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA;Ll;0;L;1F60 0301;;;;N;;;1F6C;;1F6C -1F65;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA;Ll;0;L;1F61 0301;;;;N;;;1F6D;;1F6D -1F66;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI;Ll;0;L;1F60 0342;;;;N;;;1F6E;;1F6E -1F67;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI;Ll;0;L;1F61 0342;;;;N;;;1F6F;;1F6F -1F68;GREEK CAPITAL LETTER OMEGA WITH PSILI;Lu;0;L;03A9 0313;;;;N;;;;1F60; -1F69;GREEK CAPITAL LETTER OMEGA WITH DASIA;Lu;0;L;03A9 0314;;;;N;;;;1F61; -1F6A;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA;Lu;0;L;1F68 0300;;;;N;;;;1F62; -1F6B;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA;Lu;0;L;1F69 0300;;;;N;;;;1F63; -1F6C;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA;Lu;0;L;1F68 0301;;;;N;;;;1F64; -1F6D;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA;Lu;0;L;1F69 0301;;;;N;;;;1F65; -1F6E;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI;Lu;0;L;1F68 0342;;;;N;;;;1F66; -1F6F;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI;Lu;0;L;1F69 0342;;;;N;;;;1F67; -1F70;GREEK SMALL LETTER ALPHA WITH VARIA;Ll;0;L;03B1 0300;;;;N;;;1FBA;;1FBA -1F71;GREEK SMALL LETTER ALPHA WITH OXIA;Ll;0;L;03AC;;;;N;;;1FBB;;1FBB -1F72;GREEK SMALL LETTER EPSILON WITH VARIA;Ll;0;L;03B5 0300;;;;N;;;1FC8;;1FC8 -1F73;GREEK SMALL LETTER EPSILON WITH OXIA;Ll;0;L;03AD;;;;N;;;1FC9;;1FC9 -1F74;GREEK SMALL LETTER ETA WITH VARIA;Ll;0;L;03B7 0300;;;;N;;;1FCA;;1FCA -1F75;GREEK SMALL LETTER ETA WITH OXIA;Ll;0;L;03AE;;;;N;;;1FCB;;1FCB -1F76;GREEK SMALL LETTER IOTA WITH VARIA;Ll;0;L;03B9 0300;;;;N;;;1FDA;;1FDA -1F77;GREEK SMALL LETTER IOTA WITH OXIA;Ll;0;L;03AF;;;;N;;;1FDB;;1FDB -1F78;GREEK SMALL LETTER OMICRON WITH VARIA;Ll;0;L;03BF 0300;;;;N;;;1FF8;;1FF8 -1F79;GREEK SMALL LETTER OMICRON WITH OXIA;Ll;0;L;03CC;;;;N;;;1FF9;;1FF9 -1F7A;GREEK SMALL LETTER UPSILON WITH VARIA;Ll;0;L;03C5 0300;;;;N;;;1FEA;;1FEA -1F7B;GREEK SMALL LETTER UPSILON WITH OXIA;Ll;0;L;03CD;;;;N;;;1FEB;;1FEB -1F7C;GREEK SMALL LETTER OMEGA WITH VARIA;Ll;0;L;03C9 0300;;;;N;;;1FFA;;1FFA -1F7D;GREEK SMALL LETTER OMEGA WITH OXIA;Ll;0;L;03CE;;;;N;;;1FFB;;1FFB -1F80;GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F00 0345;;;;N;;;1F88;;1F88 -1F81;GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F01 0345;;;;N;;;1F89;;1F89 -1F82;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F02 0345;;;;N;;;1F8A;;1F8A -1F83;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F03 0345;;;;N;;;1F8B;;1F8B -1F84;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F04 0345;;;;N;;;1F8C;;1F8C -1F85;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F05 0345;;;;N;;;1F8D;;1F8D -1F86;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F06 0345;;;;N;;;1F8E;;1F8E -1F87;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F07 0345;;;;N;;;1F8F;;1F8F -1F88;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F08 0345;;;;N;;;;1F80; -1F89;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F09 0345;;;;N;;;;1F81; -1F8A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F0A 0345;;;;N;;;;1F82; -1F8B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F0B 0345;;;;N;;;;1F83; -1F8C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F0C 0345;;;;N;;;;1F84; -1F8D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F0D 0345;;;;N;;;;1F85; -1F8E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F0E 0345;;;;N;;;;1F86; -1F8F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F0F 0345;;;;N;;;;1F87; -1F90;GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F20 0345;;;;N;;;1F98;;1F98 -1F91;GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F21 0345;;;;N;;;1F99;;1F99 -1F92;GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F22 0345;;;;N;;;1F9A;;1F9A -1F93;GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F23 0345;;;;N;;;1F9B;;1F9B -1F94;GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F24 0345;;;;N;;;1F9C;;1F9C -1F95;GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F25 0345;;;;N;;;1F9D;;1F9D -1F96;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F26 0345;;;;N;;;1F9E;;1F9E -1F97;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F27 0345;;;;N;;;1F9F;;1F9F -1F98;GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F28 0345;;;;N;;;;1F90; -1F99;GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F29 0345;;;;N;;;;1F91; -1F9A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F2A 0345;;;;N;;;;1F92; -1F9B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F2B 0345;;;;N;;;;1F93; -1F9C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F2C 0345;;;;N;;;;1F94; -1F9D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F2D 0345;;;;N;;;;1F95; -1F9E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F2E 0345;;;;N;;;;1F96; -1F9F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F2F 0345;;;;N;;;;1F97; -1FA0;GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F60 0345;;;;N;;;1FA8;;1FA8 -1FA1;GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F61 0345;;;;N;;;1FA9;;1FA9 -1FA2;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F62 0345;;;;N;;;1FAA;;1FAA -1FA3;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F63 0345;;;;N;;;1FAB;;1FAB -1FA4;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F64 0345;;;;N;;;1FAC;;1FAC -1FA5;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F65 0345;;;;N;;;1FAD;;1FAD -1FA6;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F66 0345;;;;N;;;1FAE;;1FAE -1FA7;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F67 0345;;;;N;;;1FAF;;1FAF -1FA8;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F68 0345;;;;N;;;;1FA0; -1FA9;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F69 0345;;;;N;;;;1FA1; -1FAA;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F6A 0345;;;;N;;;;1FA2; -1FAB;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F6B 0345;;;;N;;;;1FA3; -1FAC;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F6C 0345;;;;N;;;;1FA4; -1FAD;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F6D 0345;;;;N;;;;1FA5; -1FAE;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F6E 0345;;;;N;;;;1FA6; -1FAF;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F6F 0345;;;;N;;;;1FA7; -1FB0;GREEK SMALL LETTER ALPHA WITH VRACHY;Ll;0;L;03B1 0306;;;;N;;;1FB8;;1FB8 -1FB1;GREEK SMALL LETTER ALPHA WITH MACRON;Ll;0;L;03B1 0304;;;;N;;;1FB9;;1FB9 -1FB2;GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F70 0345;;;;N;;;;; -1FB3;GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI;Ll;0;L;03B1 0345;;;;N;;;1FBC;;1FBC -1FB4;GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03AC 0345;;;;N;;;;; -1FB6;GREEK SMALL LETTER ALPHA WITH PERISPOMENI;Ll;0;L;03B1 0342;;;;N;;;;; -1FB7;GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FB6 0345;;;;N;;;;; -1FB8;GREEK CAPITAL LETTER ALPHA WITH VRACHY;Lu;0;L;0391 0306;;;;N;;;;1FB0; -1FB9;GREEK CAPITAL LETTER ALPHA WITH MACRON;Lu;0;L;0391 0304;;;;N;;;;1FB1; -1FBA;GREEK CAPITAL LETTER ALPHA WITH VARIA;Lu;0;L;0391 0300;;;;N;;;;1F70; -1FBB;GREEK CAPITAL LETTER ALPHA WITH OXIA;Lu;0;L;0386;;;;N;;;;1F71; -1FBC;GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI;Lt;0;L;0391 0345;;;;N;;;;1FB3; -1FBD;GREEK KORONIS;Sk;0;ON;<compat> 0020 0313;;;;N;;;;; -1FBE;GREEK PROSGEGRAMMENI;Ll;0;L;03B9;;;;N;;;0399;;0399 -1FBF;GREEK PSILI;Sk;0;ON;<compat> 0020 0313;;;;N;;;;; -1FC0;GREEK PERISPOMENI;Sk;0;ON;<compat> 0020 0342;;;;N;;;;; -1FC1;GREEK DIALYTIKA AND PERISPOMENI;Sk;0;ON;00A8 0342;;;;N;;;;; -1FC2;GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F74 0345;;;;N;;;;; -1FC3;GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI;Ll;0;L;03B7 0345;;;;N;;;1FCC;;1FCC -1FC4;GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03AE 0345;;;;N;;;;; -1FC6;GREEK SMALL LETTER ETA WITH PERISPOMENI;Ll;0;L;03B7 0342;;;;N;;;;; -1FC7;GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FC6 0345;;;;N;;;;; -1FC8;GREEK CAPITAL LETTER EPSILON WITH VARIA;Lu;0;L;0395 0300;;;;N;;;;1F72; -1FC9;GREEK CAPITAL LETTER EPSILON WITH OXIA;Lu;0;L;0388;;;;N;;;;1F73; -1FCA;GREEK CAPITAL LETTER ETA WITH VARIA;Lu;0;L;0397 0300;;;;N;;;;1F74; -1FCB;GREEK CAPITAL LETTER ETA WITH OXIA;Lu;0;L;0389;;;;N;;;;1F75; -1FCC;GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI;Lt;0;L;0397 0345;;;;N;;;;1FC3; -1FCD;GREEK PSILI AND VARIA;Sk;0;ON;1FBF 0300;;;;N;;;;; -1FCE;GREEK PSILI AND OXIA;Sk;0;ON;1FBF 0301;;;;N;;;;; -1FCF;GREEK PSILI AND PERISPOMENI;Sk;0;ON;1FBF 0342;;;;N;;;;; -1FD0;GREEK SMALL LETTER IOTA WITH VRACHY;Ll;0;L;03B9 0306;;;;N;;;1FD8;;1FD8 -1FD1;GREEK SMALL LETTER IOTA WITH MACRON;Ll;0;L;03B9 0304;;;;N;;;1FD9;;1FD9 -1FD2;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA;Ll;0;L;03CA 0300;;;;N;;;;; -1FD3;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA;Ll;0;L;0390;;;;N;;;;; -1FD6;GREEK SMALL LETTER IOTA WITH PERISPOMENI;Ll;0;L;03B9 0342;;;;N;;;;; -1FD7;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CA 0342;;;;N;;;;; -1FD8;GREEK CAPITAL LETTER IOTA WITH VRACHY;Lu;0;L;0399 0306;;;;N;;;;1FD0; -1FD9;GREEK CAPITAL LETTER IOTA WITH MACRON;Lu;0;L;0399 0304;;;;N;;;;1FD1; -1FDA;GREEK CAPITAL LETTER IOTA WITH VARIA;Lu;0;L;0399 0300;;;;N;;;;1F76; -1FDB;GREEK CAPITAL LETTER IOTA WITH OXIA;Lu;0;L;038A;;;;N;;;;1F77; -1FDD;GREEK DASIA AND VARIA;Sk;0;ON;1FFE 0300;;;;N;;;;; -1FDE;GREEK DASIA AND OXIA;Sk;0;ON;1FFE 0301;;;;N;;;;; -1FDF;GREEK DASIA AND PERISPOMENI;Sk;0;ON;1FFE 0342;;;;N;;;;; -1FE0;GREEK SMALL LETTER UPSILON WITH VRACHY;Ll;0;L;03C5 0306;;;;N;;;1FE8;;1FE8 -1FE1;GREEK SMALL LETTER UPSILON WITH MACRON;Ll;0;L;03C5 0304;;;;N;;;1FE9;;1FE9 -1FE2;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA;Ll;0;L;03CB 0300;;;;N;;;;; -1FE3;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA;Ll;0;L;03B0;;;;N;;;;; -1FE4;GREEK SMALL LETTER RHO WITH PSILI;Ll;0;L;03C1 0313;;;;N;;;;; -1FE5;GREEK SMALL LETTER RHO WITH DASIA;Ll;0;L;03C1 0314;;;;N;;;1FEC;;1FEC -1FE6;GREEK SMALL LETTER UPSILON WITH PERISPOMENI;Ll;0;L;03C5 0342;;;;N;;;;; -1FE7;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CB 0342;;;;N;;;;; -1FE8;GREEK CAPITAL LETTER UPSILON WITH VRACHY;Lu;0;L;03A5 0306;;;;N;;;;1FE0; -1FE9;GREEK CAPITAL LETTER UPSILON WITH MACRON;Lu;0;L;03A5 0304;;;;N;;;;1FE1; -1FEA;GREEK CAPITAL LETTER UPSILON WITH VARIA;Lu;0;L;03A5 0300;;;;N;;;;1F7A; -1FEB;GREEK CAPITAL LETTER UPSILON WITH OXIA;Lu;0;L;038E;;;;N;;;;1F7B; -1FEC;GREEK CAPITAL LETTER RHO WITH DASIA;Lu;0;L;03A1 0314;;;;N;;;;1FE5; -1FED;GREEK DIALYTIKA AND VARIA;Sk;0;ON;00A8 0300;;;;N;;;;; -1FEE;GREEK DIALYTIKA AND OXIA;Sk;0;ON;0385;;;;N;;;;; -1FEF;GREEK VARIA;Sk;0;ON;0060;;;;N;;;;; -1FF2;GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F7C 0345;;;;N;;;;; -1FF3;GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI;Ll;0;L;03C9 0345;;;;N;;;1FFC;;1FFC -1FF4;GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03CE 0345;;;;N;;;;; -1FF6;GREEK SMALL LETTER OMEGA WITH PERISPOMENI;Ll;0;L;03C9 0342;;;;N;;;;; -1FF7;GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FF6 0345;;;;N;;;;; -1FF8;GREEK CAPITAL LETTER OMICRON WITH VARIA;Lu;0;L;039F 0300;;;;N;;;;1F78; -1FF9;GREEK CAPITAL LETTER OMICRON WITH OXIA;Lu;0;L;038C;;;;N;;;;1F79; -1FFA;GREEK CAPITAL LETTER OMEGA WITH VARIA;Lu;0;L;03A9 0300;;;;N;;;;1F7C; -1FFB;GREEK CAPITAL LETTER OMEGA WITH OXIA;Lu;0;L;038F;;;;N;;;;1F7D; -1FFC;GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI;Lt;0;L;03A9 0345;;;;N;;;;1FF3; -1FFD;GREEK OXIA;Sk;0;ON;00B4;;;;N;;;;; -1FFE;GREEK DASIA;Sk;0;ON;<compat> 0020 0314;;;;N;;;;; -2000;EN QUAD;Zs;0;WS;2002;;;;N;;;;; -2001;EM QUAD;Zs;0;WS;2003;;;;N;;;;; -2002;EN SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2003;EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2004;THREE-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2005;FOUR-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2006;SIX-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2007;FIGURE SPACE;Zs;0;WS;<noBreak> 0020;;;;N;;;;; -2008;PUNCTUATION SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -2009;THIN SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -200A;HAIR SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;; -200B;ZERO WIDTH SPACE;Zs;0;BN;;;;;N;;;;; -200C;ZERO WIDTH NON-JOINER;Cf;0;BN;;;;;N;;;;; -200D;ZERO WIDTH JOINER;Cf;0;BN;;;;;N;;;;; -200E;LEFT-TO-RIGHT MARK;Cf;0;L;;;;;N;;;;; -200F;RIGHT-TO-LEFT MARK;Cf;0;R;;;;;N;;;;; -2010;HYPHEN;Pd;0;ON;;;;;N;;;;; -2011;NON-BREAKING HYPHEN;Pd;0;ON;<noBreak> 2010;;;;N;;;;; -2012;FIGURE DASH;Pd;0;ON;;;;;N;;;;; -2013;EN DASH;Pd;0;ON;;;;;N;;;;; -2014;EM DASH;Pd;0;ON;;;;;N;;;;; -2015;HORIZONTAL BAR;Pd;0;ON;;;;;N;QUOTATION DASH;;;; -2016;DOUBLE VERTICAL LINE;Po;0;ON;;;;;N;DOUBLE VERTICAL BAR;;;; -2017;DOUBLE LOW LINE;Po;0;ON;<compat> 0020 0333;;;;N;SPACING DOUBLE UNDERSCORE;;;; -2018;LEFT SINGLE QUOTATION MARK;Pi;0;ON;;;;;N;SINGLE TURNED COMMA QUOTATION MARK;;;; -2019;RIGHT SINGLE QUOTATION MARK;Pf;0;ON;;;;;N;SINGLE COMMA QUOTATION MARK;;;; -201A;SINGLE LOW-9 QUOTATION MARK;Ps;0;ON;;;;;N;LOW SINGLE COMMA QUOTATION MARK;;;; -201B;SINGLE HIGH-REVERSED-9 QUOTATION MARK;Pi;0;ON;;;;;N;SINGLE REVERSED COMMA QUOTATION MARK;;;; -201C;LEFT DOUBLE QUOTATION MARK;Pi;0;ON;;;;;N;DOUBLE TURNED COMMA QUOTATION MARK;;;; -201D;RIGHT DOUBLE QUOTATION MARK;Pf;0;ON;;;;;N;DOUBLE COMMA QUOTATION MARK;;;; -201E;DOUBLE LOW-9 QUOTATION MARK;Ps;0;ON;;;;;N;LOW DOUBLE COMMA QUOTATION MARK;;;; -201F;DOUBLE HIGH-REVERSED-9 QUOTATION MARK;Pi;0;ON;;;;;N;DOUBLE REVERSED COMMA QUOTATION MARK;;;; -2020;DAGGER;Po;0;ON;;;;;N;;;;; -2021;DOUBLE DAGGER;Po;0;ON;;;;;N;;;;; -2022;BULLET;Po;0;ON;;;;;N;;;;; -2023;TRIANGULAR BULLET;Po;0;ON;;;;;N;;;;; -2024;ONE DOT LEADER;Po;0;ON;<compat> 002E;;;;N;;;;; -2025;TWO DOT LEADER;Po;0;ON;<compat> 002E 002E;;;;N;;;;; -2026;HORIZONTAL ELLIPSIS;Po;0;ON;<compat> 002E 002E 002E;;;;N;;;;; -2027;HYPHENATION POINT;Po;0;ON;;;;;N;;;;; -2028;LINE SEPARATOR;Zl;0;WS;;;;;N;;;;; -2029;PARAGRAPH SEPARATOR;Zp;0;B;;;;;N;;;;; -202A;LEFT-TO-RIGHT EMBEDDING;Cf;0;LRE;;;;;N;;;;; -202B;RIGHT-TO-LEFT EMBEDDING;Cf;0;RLE;;;;;N;;;;; -202C;POP DIRECTIONAL FORMATTING;Cf;0;PDF;;;;;N;;;;; -202D;LEFT-TO-RIGHT OVERRIDE;Cf;0;LRO;;;;;N;;;;; -202E;RIGHT-TO-LEFT OVERRIDE;Cf;0;RLO;;;;;N;;;;; -202F;NARROW NO-BREAK SPACE;Zs;0;WS;<noBreak> 0020;;;;N;;;;; -2030;PER MILLE SIGN;Po;0;ET;;;;;N;;;;; -2031;PER TEN THOUSAND SIGN;Po;0;ET;;;;;N;;;;; -2032;PRIME;Po;0;ET;;;;;N;;;;; -2033;DOUBLE PRIME;Po;0;ET;<compat> 2032 2032;;;;N;;;;; -2034;TRIPLE PRIME;Po;0;ET;<compat> 2032 2032 2032;;;;N;;;;; -2035;REVERSED PRIME;Po;0;ON;;;;;N;;;;; -2036;REVERSED DOUBLE PRIME;Po;0;ON;<compat> 2035 2035;;;;N;;;;; -2037;REVERSED TRIPLE PRIME;Po;0;ON;<compat> 2035 2035 2035;;;;N;;;;; -2038;CARET;Po;0;ON;;;;;N;;;;; -2039;SINGLE LEFT-POINTING ANGLE QUOTATION MARK;Pi;0;ON;;;;;Y;LEFT POINTING SINGLE GUILLEMET;;;; -203A;SINGLE RIGHT-POINTING ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING SINGLE GUILLEMET;;;; -203B;REFERENCE MARK;Po;0;ON;;;;;N;;;;; -203C;DOUBLE EXCLAMATION MARK;Po;0;ON;<compat> 0021 0021;;;;N;;;;; -203D;INTERROBANG;Po;0;ON;;;;;N;;;;; -203E;OVERLINE;Po;0;ON;<compat> 0020 0305;;;;N;SPACING OVERSCORE;;;; -203F;UNDERTIE;Pc;0;ON;;;;;N;;Enotikon;;; -2040;CHARACTER TIE;Pc;0;ON;;;;;N;;;;; -2041;CARET INSERTION POINT;Po;0;ON;;;;;N;;;;; -2042;ASTERISM;Po;0;ON;;;;;N;;;;; -2043;HYPHEN BULLET;Po;0;ON;;;;;N;;;;; -2044;FRACTION SLASH;Sm;0;ON;;;;;N;;;;; -2045;LEFT SQUARE BRACKET WITH QUILL;Ps;0;ON;;;;;Y;;;;; -2046;RIGHT SQUARE BRACKET WITH QUILL;Pe;0;ON;;;;;Y;;;;; -2048;QUESTION EXCLAMATION MARK;Po;0;ON;<compat> 003F 0021;;;;N;;;;; -2049;EXCLAMATION QUESTION MARK;Po;0;ON;<compat> 0021 003F;;;;N;;;;; -204A;TIRONIAN SIGN ET;Po;0;ON;;;;;N;;;;; -204B;REVERSED PILCROW SIGN;Po;0;ON;;;;;N;;;;; -204C;BLACK LEFTWARDS BULLET;Po;0;ON;;;;;N;;;;; -204D;BLACK RIGHTWARDS BULLET;Po;0;ON;;;;;N;;;;; -206A;INHIBIT SYMMETRIC SWAPPING;Cf;0;BN;;;;;N;;;;; -206B;ACTIVATE SYMMETRIC SWAPPING;Cf;0;BN;;;;;N;;;;; -206C;INHIBIT ARABIC FORM SHAPING;Cf;0;BN;;;;;N;;;;; -206D;ACTIVATE ARABIC FORM SHAPING;Cf;0;BN;;;;;N;;;;; -206E;NATIONAL DIGIT SHAPES;Cf;0;BN;;;;;N;;;;; -206F;NOMINAL DIGIT SHAPES;Cf;0;BN;;;;;N;;;;; -2070;SUPERSCRIPT ZERO;No;0;EN;<super> 0030;0;0;0;N;SUPERSCRIPT DIGIT ZERO;;;; -2074;SUPERSCRIPT FOUR;No;0;EN;<super> 0034;4;4;4;N;SUPERSCRIPT DIGIT FOUR;;;; -2075;SUPERSCRIPT FIVE;No;0;EN;<super> 0035;5;5;5;N;SUPERSCRIPT DIGIT FIVE;;;; -2076;SUPERSCRIPT SIX;No;0;EN;<super> 0036;6;6;6;N;SUPERSCRIPT DIGIT SIX;;;; -2077;SUPERSCRIPT SEVEN;No;0;EN;<super> 0037;7;7;7;N;SUPERSCRIPT DIGIT SEVEN;;;; -2078;SUPERSCRIPT EIGHT;No;0;EN;<super> 0038;8;8;8;N;SUPERSCRIPT DIGIT EIGHT;;;; -2079;SUPERSCRIPT NINE;No;0;EN;<super> 0039;9;9;9;N;SUPERSCRIPT DIGIT NINE;;;; -207A;SUPERSCRIPT PLUS SIGN;Sm;0;ET;<super> 002B;;;;N;;;;; -207B;SUPERSCRIPT MINUS;Sm;0;ET;<super> 2212;;;;N;SUPERSCRIPT HYPHEN-MINUS;;;; -207C;SUPERSCRIPT EQUALS SIGN;Sm;0;ON;<super> 003D;;;;N;;;;; -207D;SUPERSCRIPT LEFT PARENTHESIS;Ps;0;ON;<super> 0028;;;;Y;SUPERSCRIPT OPENING PARENTHESIS;;;; -207E;SUPERSCRIPT RIGHT PARENTHESIS;Pe;0;ON;<super> 0029;;;;Y;SUPERSCRIPT CLOSING PARENTHESIS;;;; -207F;SUPERSCRIPT LATIN SMALL LETTER N;Ll;0;L;<super> 006E;;;;N;;;;; -2080;SUBSCRIPT ZERO;No;0;EN;<sub> 0030;0;0;0;N;SUBSCRIPT DIGIT ZERO;;;; -2081;SUBSCRIPT ONE;No;0;EN;<sub> 0031;1;1;1;N;SUBSCRIPT DIGIT ONE;;;; -2082;SUBSCRIPT TWO;No;0;EN;<sub> 0032;2;2;2;N;SUBSCRIPT DIGIT TWO;;;; -2083;SUBSCRIPT THREE;No;0;EN;<sub> 0033;3;3;3;N;SUBSCRIPT DIGIT THREE;;;; -2084;SUBSCRIPT FOUR;No;0;EN;<sub> 0034;4;4;4;N;SUBSCRIPT DIGIT FOUR;;;; -2085;SUBSCRIPT FIVE;No;0;EN;<sub> 0035;5;5;5;N;SUBSCRIPT DIGIT FIVE;;;; -2086;SUBSCRIPT SIX;No;0;EN;<sub> 0036;6;6;6;N;SUBSCRIPT DIGIT SIX;;;; -2087;SUBSCRIPT SEVEN;No;0;EN;<sub> 0037;7;7;7;N;SUBSCRIPT DIGIT SEVEN;;;; -2088;SUBSCRIPT EIGHT;No;0;EN;<sub> 0038;8;8;8;N;SUBSCRIPT DIGIT EIGHT;;;; -2089;SUBSCRIPT NINE;No;0;EN;<sub> 0039;9;9;9;N;SUBSCRIPT DIGIT NINE;;;; -208A;SUBSCRIPT PLUS SIGN;Sm;0;ET;<sub> 002B;;;;N;;;;; -208B;SUBSCRIPT MINUS;Sm;0;ET;<sub> 2212;;;;N;SUBSCRIPT HYPHEN-MINUS;;;; -208C;SUBSCRIPT EQUALS SIGN;Sm;0;ON;<sub> 003D;;;;N;;;;; -208D;SUBSCRIPT LEFT PARENTHESIS;Ps;0;ON;<sub> 0028;;;;Y;SUBSCRIPT OPENING PARENTHESIS;;;; -208E;SUBSCRIPT RIGHT PARENTHESIS;Pe;0;ON;<sub> 0029;;;;Y;SUBSCRIPT CLOSING PARENTHESIS;;;; -20A0;EURO-CURRENCY SIGN;Sc;0;ET;;;;;N;;;;; -20A1;COLON SIGN;Sc;0;ET;;;;;N;;;;; -20A2;CRUZEIRO SIGN;Sc;0;ET;;;;;N;;;;; -20A3;FRENCH FRANC SIGN;Sc;0;ET;;;;;N;;;;; -20A4;LIRA SIGN;Sc;0;ET;;;;;N;;;;; -20A5;MILL SIGN;Sc;0;ET;;;;;N;;;;; -20A6;NAIRA SIGN;Sc;0;ET;;;;;N;;;;; -20A7;PESETA SIGN;Sc;0;ET;;;;;N;;;;; -20A8;RUPEE SIGN;Sc;0;ET;<compat> 0052 0073;;;;N;;;;; -20A9;WON SIGN;Sc;0;ET;;;;;N;;;;; -20AA;NEW SHEQEL SIGN;Sc;0;ET;;;;;N;;;;; -20AB;DONG SIGN;Sc;0;ET;;;;;N;;;;; -20AC;EURO SIGN;Sc;0;ET;;;;;N;;;;; -20AD;KIP SIGN;Sc;0;ET;;;;;N;;;;; -20AE;TUGRIK SIGN;Sc;0;ET;;;;;N;;;;; -20AF;DRACHMA SIGN;Sc;0;ET;;;;;N;;;;; -20D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;; -20D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;; -20D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;; -20D3;COMBINING SHORT VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT VERTICAL BAR OVERLAY;;;; -20D4;COMBINING ANTICLOCKWISE ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING ANTICLOCKWISE ARROW ABOVE;;;; -20D5;COMBINING CLOCKWISE ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING CLOCKWISE ARROW ABOVE;;;; -20D6;COMBINING LEFT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT ARROW ABOVE;;;; -20D7;COMBINING RIGHT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT ARROW ABOVE;;;; -20D8;COMBINING RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING RING OVERLAY;;;; -20D9;COMBINING CLOCKWISE RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING CLOCKWISE RING OVERLAY;;;; -20DA;COMBINING ANTICLOCKWISE RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING ANTICLOCKWISE RING OVERLAY;;;; -20DB;COMBINING THREE DOTS ABOVE;Mn;230;NSM;;;;;N;NON-SPACING THREE DOTS ABOVE;;;; -20DC;COMBINING FOUR DOTS ABOVE;Mn;230;NSM;;;;;N;NON-SPACING FOUR DOTS ABOVE;;;; -20DD;COMBINING ENCLOSING CIRCLE;Me;0;NSM;;;;;N;ENCLOSING CIRCLE;;;; -20DE;COMBINING ENCLOSING SQUARE;Me;0;NSM;;;;;N;ENCLOSING SQUARE;;;; -20DF;COMBINING ENCLOSING DIAMOND;Me;0;NSM;;;;;N;ENCLOSING DIAMOND;;;; -20E0;COMBINING ENCLOSING CIRCLE BACKSLASH;Me;0;NSM;;;;;N;ENCLOSING CIRCLE SLASH;;;; -20E1;COMBINING LEFT RIGHT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT RIGHT ARROW ABOVE;;;; -20E2;COMBINING ENCLOSING SCREEN;Me;0;NSM;;;;;N;;;;; -20E3;COMBINING ENCLOSING KEYCAP;Me;0;NSM;;;;;N;;;;; -2100;ACCOUNT OF;So;0;ON;<compat> 0061 002F 0063;;;;N;;;;; -2101;ADDRESSED TO THE SUBJECT;So;0;ON;<compat> 0061 002F 0073;;;;N;;;;; -2102;DOUBLE-STRUCK CAPITAL C;Lu;0;L;<font> 0043;;;;N;DOUBLE-STRUCK C;;;; -2103;DEGREE CELSIUS;So;0;ON;<compat> 00B0 0043;;;;N;DEGREES CENTIGRADE;;;; -2104;CENTRE LINE SYMBOL;So;0;ON;;;;;N;C L SYMBOL;;;; -2105;CARE OF;So;0;ON;<compat> 0063 002F 006F;;;;N;;;;; -2106;CADA UNA;So;0;ON;<compat> 0063 002F 0075;;;;N;;;;; -2107;EULER CONSTANT;Lu;0;L;<compat> 0190;;;;N;EULERS;;;; -2108;SCRUPLE;So;0;ON;;;;;N;;;;; -2109;DEGREE FAHRENHEIT;So;0;ON;<compat> 00B0 0046;;;;N;DEGREES FAHRENHEIT;;;; -210A;SCRIPT SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -210B;SCRIPT CAPITAL H;Lu;0;L;<font> 0048;;;;N;SCRIPT H;;;; -210C;BLACK-LETTER CAPITAL H;Lu;0;L;<font> 0048;;;;N;BLACK-LETTER H;;;; -210D;DOUBLE-STRUCK CAPITAL H;Lu;0;L;<font> 0048;;;;N;DOUBLE-STRUCK H;;;; -210E;PLANCK CONSTANT;Ll;0;L;<font> 0068;;;;N;;;;; -210F;PLANCK CONSTANT OVER TWO PI;Ll;0;L;<font> 0127;;;;N;PLANCK CONSTANT OVER 2 PI;;;; -2110;SCRIPT CAPITAL I;Lu;0;L;<font> 0049;;;;N;SCRIPT I;;;; -2111;BLACK-LETTER CAPITAL I;Lu;0;L;<font> 0049;;;;N;BLACK-LETTER I;;;; -2112;SCRIPT CAPITAL L;Lu;0;L;<font> 004C;;;;N;SCRIPT L;;;; -2113;SCRIPT SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -2114;L B BAR SYMBOL;So;0;ON;;;;;N;;;;; -2115;DOUBLE-STRUCK CAPITAL N;Lu;0;L;<font> 004E;;;;N;DOUBLE-STRUCK N;;;; -2116;NUMERO SIGN;So;0;ON;<compat> 004E 006F;;;;N;NUMERO;;;; -2117;SOUND RECORDING COPYRIGHT;So;0;ON;;;;;N;;;;; -2118;SCRIPT CAPITAL P;So;0;ON;;;;;N;SCRIPT P;;;; -2119;DOUBLE-STRUCK CAPITAL P;Lu;0;L;<font> 0050;;;;N;DOUBLE-STRUCK P;;;; -211A;DOUBLE-STRUCK CAPITAL Q;Lu;0;L;<font> 0051;;;;N;DOUBLE-STRUCK Q;;;; -211B;SCRIPT CAPITAL R;Lu;0;L;<font> 0052;;;;N;SCRIPT R;;;; -211C;BLACK-LETTER CAPITAL R;Lu;0;L;<font> 0052;;;;N;BLACK-LETTER R;;;; -211D;DOUBLE-STRUCK CAPITAL R;Lu;0;L;<font> 0052;;;;N;DOUBLE-STRUCK R;;;; -211E;PRESCRIPTION TAKE;So;0;ON;;;;;N;;;;; -211F;RESPONSE;So;0;ON;;;;;N;;;;; -2120;SERVICE MARK;So;0;ON;<super> 0053 004D;;;;N;;;;; -2121;TELEPHONE SIGN;So;0;ON;<compat> 0054 0045 004C;;;;N;T E L SYMBOL;;;; -2122;TRADE MARK SIGN;So;0;ON;<super> 0054 004D;;;;N;TRADEMARK;;;; -2123;VERSICLE;So;0;ON;;;;;N;;;;; -2124;DOUBLE-STRUCK CAPITAL Z;Lu;0;L;<font> 005A;;;;N;DOUBLE-STRUCK Z;;;; -2125;OUNCE SIGN;So;0;ON;;;;;N;OUNCE;;;; -2126;OHM SIGN;Lu;0;L;03A9;;;;N;OHM;;;03C9; -2127;INVERTED OHM SIGN;So;0;ON;;;;;N;MHO;;;; -2128;BLACK-LETTER CAPITAL Z;Lu;0;L;<font> 005A;;;;N;BLACK-LETTER Z;;;; -2129;TURNED GREEK SMALL LETTER IOTA;So;0;ON;;;;;N;;;;; -212A;KELVIN SIGN;Lu;0;L;004B;;;;N;DEGREES KELVIN;;;006B; -212B;ANGSTROM SIGN;Lu;0;L;00C5;;;;N;ANGSTROM UNIT;;;00E5; -212C;SCRIPT CAPITAL B;Lu;0;L;<font> 0042;;;;N;SCRIPT B;;;; -212D;BLACK-LETTER CAPITAL C;Lu;0;L;<font> 0043;;;;N;BLACK-LETTER C;;;; -212E;ESTIMATED SYMBOL;So;0;ET;;;;;N;;;;; -212F;SCRIPT SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -2130;SCRIPT CAPITAL E;Lu;0;L;<font> 0045;;;;N;SCRIPT E;;;; -2131;SCRIPT CAPITAL F;Lu;0;L;<font> 0046;;;;N;SCRIPT F;;;; -2132;TURNED CAPITAL F;So;0;ON;;;;;N;TURNED F;;;; -2133;SCRIPT CAPITAL M;Lu;0;L;<font> 004D;;;;N;SCRIPT M;;;; -2134;SCRIPT SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -2135;ALEF SYMBOL;Lo;0;L;<compat> 05D0;;;;N;FIRST TRANSFINITE CARDINAL;;;; -2136;BET SYMBOL;Lo;0;L;<compat> 05D1;;;;N;SECOND TRANSFINITE CARDINAL;;;; -2137;GIMEL SYMBOL;Lo;0;L;<compat> 05D2;;;;N;THIRD TRANSFINITE CARDINAL;;;; -2138;DALET SYMBOL;Lo;0;L;<compat> 05D3;;;;N;FOURTH TRANSFINITE CARDINAL;;;; -2139;INFORMATION SOURCE;Ll;0;L;<font> 0069;;;;N;;;;; -213A;ROTATED CAPITAL Q;So;0;ON;;;;;N;;;;; -2153;VULGAR FRACTION ONE THIRD;No;0;ON;<fraction> 0031 2044 0033;;;1/3;N;FRACTION ONE THIRD;;;; -2154;VULGAR FRACTION TWO THIRDS;No;0;ON;<fraction> 0032 2044 0033;;;2/3;N;FRACTION TWO THIRDS;;;; -2155;VULGAR FRACTION ONE FIFTH;No;0;ON;<fraction> 0031 2044 0035;;;1/5;N;FRACTION ONE FIFTH;;;; -2156;VULGAR FRACTION TWO FIFTHS;No;0;ON;<fraction> 0032 2044 0035;;;2/5;N;FRACTION TWO FIFTHS;;;; -2157;VULGAR FRACTION THREE FIFTHS;No;0;ON;<fraction> 0033 2044 0035;;;3/5;N;FRACTION THREE FIFTHS;;;; -2158;VULGAR FRACTION FOUR FIFTHS;No;0;ON;<fraction> 0034 2044 0035;;;4/5;N;FRACTION FOUR FIFTHS;;;; -2159;VULGAR FRACTION ONE SIXTH;No;0;ON;<fraction> 0031 2044 0036;;;1/6;N;FRACTION ONE SIXTH;;;; -215A;VULGAR FRACTION FIVE SIXTHS;No;0;ON;<fraction> 0035 2044 0036;;;5/6;N;FRACTION FIVE SIXTHS;;;; -215B;VULGAR FRACTION ONE EIGHTH;No;0;ON;<fraction> 0031 2044 0038;;;1/8;N;FRACTION ONE EIGHTH;;;; -215C;VULGAR FRACTION THREE EIGHTHS;No;0;ON;<fraction> 0033 2044 0038;;;3/8;N;FRACTION THREE EIGHTHS;;;; -215D;VULGAR FRACTION FIVE EIGHTHS;No;0;ON;<fraction> 0035 2044 0038;;;5/8;N;FRACTION FIVE EIGHTHS;;;; -215E;VULGAR FRACTION SEVEN EIGHTHS;No;0;ON;<fraction> 0037 2044 0038;;;7/8;N;FRACTION SEVEN EIGHTHS;;;; -215F;FRACTION NUMERATOR ONE;No;0;ON;<fraction> 0031 2044;;;1;N;;;;; -2160;ROMAN NUMERAL ONE;Nl;0;L;<compat> 0049;;;1;N;;;;2170; -2161;ROMAN NUMERAL TWO;Nl;0;L;<compat> 0049 0049;;;2;N;;;;2171; -2162;ROMAN NUMERAL THREE;Nl;0;L;<compat> 0049 0049 0049;;;3;N;;;;2172; -2163;ROMAN NUMERAL FOUR;Nl;0;L;<compat> 0049 0056;;;4;N;;;;2173; -2164;ROMAN NUMERAL FIVE;Nl;0;L;<compat> 0056;;;5;N;;;;2174; -2165;ROMAN NUMERAL SIX;Nl;0;L;<compat> 0056 0049;;;6;N;;;;2175; -2166;ROMAN NUMERAL SEVEN;Nl;0;L;<compat> 0056 0049 0049;;;7;N;;;;2176; -2167;ROMAN NUMERAL EIGHT;Nl;0;L;<compat> 0056 0049 0049 0049;;;8;N;;;;2177; -2168;ROMAN NUMERAL NINE;Nl;0;L;<compat> 0049 0058;;;9;N;;;;2178; -2169;ROMAN NUMERAL TEN;Nl;0;L;<compat> 0058;;;10;N;;;;2179; -216A;ROMAN NUMERAL ELEVEN;Nl;0;L;<compat> 0058 0049;;;11;N;;;;217A; -216B;ROMAN NUMERAL TWELVE;Nl;0;L;<compat> 0058 0049 0049;;;12;N;;;;217B; -216C;ROMAN NUMERAL FIFTY;Nl;0;L;<compat> 004C;;;50;N;;;;217C; -216D;ROMAN NUMERAL ONE HUNDRED;Nl;0;L;<compat> 0043;;;100;N;;;;217D; -216E;ROMAN NUMERAL FIVE HUNDRED;Nl;0;L;<compat> 0044;;;500;N;;;;217E; -216F;ROMAN NUMERAL ONE THOUSAND;Nl;0;L;<compat> 004D;;;1000;N;;;;217F; -2170;SMALL ROMAN NUMERAL ONE;Nl;0;L;<compat> 0069;;;1;N;;;2160;;2160 -2171;SMALL ROMAN NUMERAL TWO;Nl;0;L;<compat> 0069 0069;;;2;N;;;2161;;2161 -2172;SMALL ROMAN NUMERAL THREE;Nl;0;L;<compat> 0069 0069 0069;;;3;N;;;2162;;2162 -2173;SMALL ROMAN NUMERAL FOUR;Nl;0;L;<compat> 0069 0076;;;4;N;;;2163;;2163 -2174;SMALL ROMAN NUMERAL FIVE;Nl;0;L;<compat> 0076;;;5;N;;;2164;;2164 -2175;SMALL ROMAN NUMERAL SIX;Nl;0;L;<compat> 0076 0069;;;6;N;;;2165;;2165 -2176;SMALL ROMAN NUMERAL SEVEN;Nl;0;L;<compat> 0076 0069 0069;;;7;N;;;2166;;2166 -2177;SMALL ROMAN NUMERAL EIGHT;Nl;0;L;<compat> 0076 0069 0069 0069;;;8;N;;;2167;;2167 -2178;SMALL ROMAN NUMERAL NINE;Nl;0;L;<compat> 0069 0078;;;9;N;;;2168;;2168 -2179;SMALL ROMAN NUMERAL TEN;Nl;0;L;<compat> 0078;;;10;N;;;2169;;2169 -217A;SMALL ROMAN NUMERAL ELEVEN;Nl;0;L;<compat> 0078 0069;;;11;N;;;216A;;216A -217B;SMALL ROMAN NUMERAL TWELVE;Nl;0;L;<compat> 0078 0069 0069;;;12;N;;;216B;;216B -217C;SMALL ROMAN NUMERAL FIFTY;Nl;0;L;<compat> 006C;;;50;N;;;216C;;216C -217D;SMALL ROMAN NUMERAL ONE HUNDRED;Nl;0;L;<compat> 0063;;;100;N;;;216D;;216D -217E;SMALL ROMAN NUMERAL FIVE HUNDRED;Nl;0;L;<compat> 0064;;;500;N;;;216E;;216E -217F;SMALL ROMAN NUMERAL ONE THOUSAND;Nl;0;L;<compat> 006D;;;1000;N;;;216F;;216F -2180;ROMAN NUMERAL ONE THOUSAND C D;Nl;0;L;;;;1000;N;;;;; -2181;ROMAN NUMERAL FIVE THOUSAND;Nl;0;L;;;;5000;N;;;;; -2182;ROMAN NUMERAL TEN THOUSAND;Nl;0;L;;;;10000;N;;;;; -2183;ROMAN NUMERAL REVERSED ONE HUNDRED;Nl;0;L;;;;;N;;;;; -2190;LEFTWARDS ARROW;Sm;0;ON;;;;;N;LEFT ARROW;;;; -2191;UPWARDS ARROW;Sm;0;ON;;;;;N;UP ARROW;;;; -2192;RIGHTWARDS ARROW;Sm;0;ON;;;;;N;RIGHT ARROW;;;; -2193;DOWNWARDS ARROW;Sm;0;ON;;;;;N;DOWN ARROW;;;; -2194;LEFT RIGHT ARROW;Sm;0;ON;;;;;N;;;;; -2195;UP DOWN ARROW;So;0;ON;;;;;N;;;;; -2196;NORTH WEST ARROW;So;0;ON;;;;;N;UPPER LEFT ARROW;;;; -2197;NORTH EAST ARROW;So;0;ON;;;;;N;UPPER RIGHT ARROW;;;; -2198;SOUTH EAST ARROW;So;0;ON;;;;;N;LOWER RIGHT ARROW;;;; -2199;SOUTH WEST ARROW;So;0;ON;;;;;N;LOWER LEFT ARROW;;;; -219A;LEFTWARDS ARROW WITH STROKE;Sm;0;ON;2190 0338;;;;N;LEFT ARROW WITH STROKE;;;; -219B;RIGHTWARDS ARROW WITH STROKE;Sm;0;ON;2192 0338;;;;N;RIGHT ARROW WITH STROKE;;;; -219C;LEFTWARDS WAVE ARROW;So;0;ON;;;;;N;LEFT WAVE ARROW;;;; -219D;RIGHTWARDS WAVE ARROW;So;0;ON;;;;;N;RIGHT WAVE ARROW;;;; -219E;LEFTWARDS TWO HEADED ARROW;So;0;ON;;;;;N;LEFT TWO HEADED ARROW;;;; -219F;UPWARDS TWO HEADED ARROW;So;0;ON;;;;;N;UP TWO HEADED ARROW;;;; -21A0;RIGHTWARDS TWO HEADED ARROW;Sm;0;ON;;;;;N;RIGHT TWO HEADED ARROW;;;; -21A1;DOWNWARDS TWO HEADED ARROW;So;0;ON;;;;;N;DOWN TWO HEADED ARROW;;;; -21A2;LEFTWARDS ARROW WITH TAIL;So;0;ON;;;;;N;LEFT ARROW WITH TAIL;;;; -21A3;RIGHTWARDS ARROW WITH TAIL;Sm;0;ON;;;;;N;RIGHT ARROW WITH TAIL;;;; -21A4;LEFTWARDS ARROW FROM BAR;So;0;ON;;;;;N;LEFT ARROW FROM BAR;;;; -21A5;UPWARDS ARROW FROM BAR;So;0;ON;;;;;N;UP ARROW FROM BAR;;;; -21A6;RIGHTWARDS ARROW FROM BAR;Sm;0;ON;;;;;N;RIGHT ARROW FROM BAR;;;; -21A7;DOWNWARDS ARROW FROM BAR;So;0;ON;;;;;N;DOWN ARROW FROM BAR;;;; -21A8;UP DOWN ARROW WITH BASE;So;0;ON;;;;;N;;;;; -21A9;LEFTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;LEFT ARROW WITH HOOK;;;; -21AA;RIGHTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;RIGHT ARROW WITH HOOK;;;; -21AB;LEFTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;LEFT ARROW WITH LOOP;;;; -21AC;RIGHTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;RIGHT ARROW WITH LOOP;;;; -21AD;LEFT RIGHT WAVE ARROW;So;0;ON;;;;;N;;;;; -21AE;LEFT RIGHT ARROW WITH STROKE;Sm;0;ON;2194 0338;;;;N;;;;; -21AF;DOWNWARDS ZIGZAG ARROW;So;0;ON;;;;;N;DOWN ZIGZAG ARROW;;;; -21B0;UPWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP LEFT;;;; -21B1;UPWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP RIGHT;;;; -21B2;DOWNWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP LEFT;;;; -21B3;DOWNWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP RIGHT;;;; -21B4;RIGHTWARDS ARROW WITH CORNER DOWNWARDS;So;0;ON;;;;;N;RIGHT ARROW WITH CORNER DOWN;;;; -21B5;DOWNWARDS ARROW WITH CORNER LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH CORNER LEFT;;;; -21B6;ANTICLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;; -21B7;CLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;; -21B8;NORTH WEST ARROW TO LONG BAR;So;0;ON;;;;;N;UPPER LEFT ARROW TO LONG BAR;;;; -21B9;LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR OVER RIGHT ARROW TO BAR;;;; -21BA;ANTICLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; -21BB;CLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; -21BC;LEFTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB UP;;;; -21BD;LEFTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB DOWN;;;; -21BE;UPWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB RIGHT;;;; -21BF;UPWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB LEFT;;;; -21C0;RIGHTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB UP;;;; -21C1;RIGHTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB DOWN;;;; -21C2;DOWNWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB RIGHT;;;; -21C3;DOWNWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB LEFT;;;; -21C4;RIGHTWARDS ARROW OVER LEFTWARDS ARROW;So;0;ON;;;;;N;RIGHT ARROW OVER LEFT ARROW;;;; -21C5;UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW;So;0;ON;;;;;N;UP ARROW LEFT OF DOWN ARROW;;;; -21C6;LEFTWARDS ARROW OVER RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT ARROW OVER RIGHT ARROW;;;; -21C7;LEFTWARDS PAIRED ARROWS;So;0;ON;;;;;N;LEFT PAIRED ARROWS;;;; -21C8;UPWARDS PAIRED ARROWS;So;0;ON;;;;;N;UP PAIRED ARROWS;;;; -21C9;RIGHTWARDS PAIRED ARROWS;So;0;ON;;;;;N;RIGHT PAIRED ARROWS;;;; -21CA;DOWNWARDS PAIRED ARROWS;So;0;ON;;;;;N;DOWN PAIRED ARROWS;;;; -21CB;LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON;So;0;ON;;;;;N;LEFT HARPOON OVER RIGHT HARPOON;;;; -21CC;RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON;So;0;ON;;;;;N;RIGHT HARPOON OVER LEFT HARPOON;;;; -21CD;LEFTWARDS DOUBLE ARROW WITH STROKE;So;0;ON;21D0 0338;;;;N;LEFT DOUBLE ARROW WITH STROKE;;;; -21CE;LEFT RIGHT DOUBLE ARROW WITH STROKE;Sm;0;ON;21D4 0338;;;;N;;;;; -21CF;RIGHTWARDS DOUBLE ARROW WITH STROKE;Sm;0;ON;21D2 0338;;;;N;RIGHT DOUBLE ARROW WITH STROKE;;;; -21D0;LEFTWARDS DOUBLE ARROW;So;0;ON;;;;;N;LEFT DOUBLE ARROW;;;; -21D1;UPWARDS DOUBLE ARROW;So;0;ON;;;;;N;UP DOUBLE ARROW;;;; -21D2;RIGHTWARDS DOUBLE ARROW;Sm;0;ON;;;;;N;RIGHT DOUBLE ARROW;;;; -21D3;DOWNWARDS DOUBLE ARROW;So;0;ON;;;;;N;DOWN DOUBLE ARROW;;;; -21D4;LEFT RIGHT DOUBLE ARROW;Sm;0;ON;;;;;N;;;;; -21D5;UP DOWN DOUBLE ARROW;So;0;ON;;;;;N;;;;; -21D6;NORTH WEST DOUBLE ARROW;So;0;ON;;;;;N;UPPER LEFT DOUBLE ARROW;;;; -21D7;NORTH EAST DOUBLE ARROW;So;0;ON;;;;;N;UPPER RIGHT DOUBLE ARROW;;;; -21D8;SOUTH EAST DOUBLE ARROW;So;0;ON;;;;;N;LOWER RIGHT DOUBLE ARROW;;;; -21D9;SOUTH WEST DOUBLE ARROW;So;0;ON;;;;;N;LOWER LEFT DOUBLE ARROW;;;; -21DA;LEFTWARDS TRIPLE ARROW;So;0;ON;;;;;N;LEFT TRIPLE ARROW;;;; -21DB;RIGHTWARDS TRIPLE ARROW;So;0;ON;;;;;N;RIGHT TRIPLE ARROW;;;; -21DC;LEFTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;LEFT SQUIGGLE ARROW;;;; -21DD;RIGHTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;RIGHT SQUIGGLE ARROW;;;; -21DE;UPWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;UP ARROW WITH DOUBLE STROKE;;;; -21DF;DOWNWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;DOWN ARROW WITH DOUBLE STROKE;;;; -21E0;LEFTWARDS DASHED ARROW;So;0;ON;;;;;N;LEFT DASHED ARROW;;;; -21E1;UPWARDS DASHED ARROW;So;0;ON;;;;;N;UP DASHED ARROW;;;; -21E2;RIGHTWARDS DASHED ARROW;So;0;ON;;;;;N;RIGHT DASHED ARROW;;;; -21E3;DOWNWARDS DASHED ARROW;So;0;ON;;;;;N;DOWN DASHED ARROW;;;; -21E4;LEFTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR;;;; -21E5;RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;RIGHT ARROW TO BAR;;;; -21E6;LEFTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE LEFT ARROW;;;; -21E7;UPWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE UP ARROW;;;; -21E8;RIGHTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE RIGHT ARROW;;;; -21E9;DOWNWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE DOWN ARROW;;;; -21EA;UPWARDS WHITE ARROW FROM BAR;So;0;ON;;;;;N;WHITE UP ARROW FROM BAR;;;; -21EB;UPWARDS WHITE ARROW ON PEDESTAL;So;0;ON;;;;;N;;;;; -21EC;UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR;So;0;ON;;;;;N;;;;; -21ED;UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR;So;0;ON;;;;;N;;;;; -21EE;UPWARDS WHITE DOUBLE ARROW;So;0;ON;;;;;N;;;;; -21EF;UPWARDS WHITE DOUBLE ARROW ON PEDESTAL;So;0;ON;;;;;N;;;;; -21F0;RIGHTWARDS WHITE ARROW FROM WALL;So;0;ON;;;;;N;;;;; -21F1;NORTH WEST ARROW TO CORNER;So;0;ON;;;;;N;;;;; -21F2;SOUTH EAST ARROW TO CORNER;So;0;ON;;;;;N;;;;; -21F3;UP DOWN WHITE ARROW;So;0;ON;;;;;N;;;;; -2200;FOR ALL;Sm;0;ON;;;;;N;;;;; -2201;COMPLEMENT;Sm;0;ON;;;;;Y;;;;; -2202;PARTIAL DIFFERENTIAL;Sm;0;ON;;;;;Y;;;;; -2203;THERE EXISTS;Sm;0;ON;;;;;Y;;;;; -2204;THERE DOES NOT EXIST;Sm;0;ON;2203 0338;;;;Y;;;;; -2205;EMPTY SET;Sm;0;ON;;;;;N;;;;; -2206;INCREMENT;Sm;0;ON;;;;;N;;;;; -2207;NABLA;Sm;0;ON;;;;;N;;;;; -2208;ELEMENT OF;Sm;0;ON;;;;;Y;;;;; -2209;NOT AN ELEMENT OF;Sm;0;ON;2208 0338;;;;Y;;;;; -220A;SMALL ELEMENT OF;Sm;0;ON;;;;;Y;;;;; -220B;CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;; -220C;DOES NOT CONTAIN AS MEMBER;Sm;0;ON;220B 0338;;;;Y;;;;; -220D;SMALL CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;; -220E;END OF PROOF;Sm;0;ON;;;;;N;;;;; -220F;N-ARY PRODUCT;Sm;0;ON;;;;;N;;;;; -2210;N-ARY COPRODUCT;Sm;0;ON;;;;;N;;;;; -2211;N-ARY SUMMATION;Sm;0;ON;;;;;Y;;;;; -2212;MINUS SIGN;Sm;0;ET;;;;;N;;;;; -2213;MINUS-OR-PLUS SIGN;Sm;0;ET;;;;;N;;;;; -2214;DOT PLUS;Sm;0;ON;;;;;N;;;;; -2215;DIVISION SLASH;Sm;0;ON;;;;;Y;;;;; -2216;SET MINUS;Sm;0;ON;;;;;Y;;;;; -2217;ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;; -2218;RING OPERATOR;Sm;0;ON;;;;;N;;;;; -2219;BULLET OPERATOR;Sm;0;ON;;;;;N;;;;; -221A;SQUARE ROOT;Sm;0;ON;;;;;Y;;;;; -221B;CUBE ROOT;Sm;0;ON;;;;;Y;;;;; -221C;FOURTH ROOT;Sm;0;ON;;;;;Y;;;;; -221D;PROPORTIONAL TO;Sm;0;ON;;;;;Y;;;;; -221E;INFINITY;Sm;0;ON;;;;;N;;;;; -221F;RIGHT ANGLE;Sm;0;ON;;;;;Y;;;;; -2220;ANGLE;Sm;0;ON;;;;;Y;;;;; -2221;MEASURED ANGLE;Sm;0;ON;;;;;Y;;;;; -2222;SPHERICAL ANGLE;Sm;0;ON;;;;;Y;;;;; -2223;DIVIDES;Sm;0;ON;;;;;N;;;;; -2224;DOES NOT DIVIDE;Sm;0;ON;2223 0338;;;;Y;;;;; -2225;PARALLEL TO;Sm;0;ON;;;;;N;;;;; -2226;NOT PARALLEL TO;Sm;0;ON;2225 0338;;;;Y;;;;; -2227;LOGICAL AND;Sm;0;ON;;;;;N;;;;; -2228;LOGICAL OR;Sm;0;ON;;;;;N;;;;; -2229;INTERSECTION;Sm;0;ON;;;;;N;;;;; -222A;UNION;Sm;0;ON;;;;;N;;;;; -222B;INTEGRAL;Sm;0;ON;;;;;Y;;;;; -222C;DOUBLE INTEGRAL;Sm;0;ON;<compat> 222B 222B;;;;Y;;;;; -222D;TRIPLE INTEGRAL;Sm;0;ON;<compat> 222B 222B 222B;;;;Y;;;;; -222E;CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; -222F;SURFACE INTEGRAL;Sm;0;ON;<compat> 222E 222E;;;;Y;;;;; -2230;VOLUME INTEGRAL;Sm;0;ON;<compat> 222E 222E 222E;;;;Y;;;;; -2231;CLOCKWISE INTEGRAL;Sm;0;ON;;;;;Y;;;;; -2232;CLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; -2233;ANTICLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; -2234;THEREFORE;Sm;0;ON;;;;;N;;;;; -2235;BECAUSE;Sm;0;ON;;;;;N;;;;; -2236;RATIO;Sm;0;ON;;;;;N;;;;; -2237;PROPORTION;Sm;0;ON;;;;;N;;;;; -2238;DOT MINUS;Sm;0;ON;;;;;N;;;;; -2239;EXCESS;Sm;0;ON;;;;;Y;;;;; -223A;GEOMETRIC PROPORTION;Sm;0;ON;;;;;N;;;;; -223B;HOMOTHETIC;Sm;0;ON;;;;;Y;;;;; -223C;TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; -223D;REVERSED TILDE;Sm;0;ON;;;;;Y;;lazy S;;; -223E;INVERTED LAZY S;Sm;0;ON;;;;;Y;;;;; -223F;SINE WAVE;Sm;0;ON;;;;;Y;;;;; -2240;WREATH PRODUCT;Sm;0;ON;;;;;Y;;;;; -2241;NOT TILDE;Sm;0;ON;223C 0338;;;;Y;;;;; -2242;MINUS TILDE;Sm;0;ON;;;;;Y;;;;; -2243;ASYMPTOTICALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2244;NOT ASYMPTOTICALLY EQUAL TO;Sm;0;ON;2243 0338;;;;Y;;;;; -2245;APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2246;APPROXIMATELY BUT NOT ACTUALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2247;NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO;Sm;0;ON;2245 0338;;;;Y;;;;; -2248;ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2249;NOT ALMOST EQUAL TO;Sm;0;ON;2248 0338;;;;Y;;;;; -224A;ALMOST EQUAL OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -224B;TRIPLE TILDE;Sm;0;ON;;;;;Y;;;;; -224C;ALL EQUAL TO;Sm;0;ON;;;;;Y;;;;; -224D;EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; -224E;GEOMETRICALLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; -224F;DIFFERENCE BETWEEN;Sm;0;ON;;;;;N;;;;; -2250;APPROACHES THE LIMIT;Sm;0;ON;;;;;N;;;;; -2251;GEOMETRICALLY EQUAL TO;Sm;0;ON;;;;;N;;;;; -2252;APPROXIMATELY EQUAL TO OR THE IMAGE OF;Sm;0;ON;;;;;Y;;;;; -2253;IMAGE OF OR APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2254;COLON EQUALS;Sm;0;ON;;;;;Y;COLON EQUAL;;;; -2255;EQUALS COLON;Sm;0;ON;;;;;Y;EQUAL COLON;;;; -2256;RING IN EQUAL TO;Sm;0;ON;;;;;N;;;;; -2257;RING EQUAL TO;Sm;0;ON;;;;;N;;;;; -2258;CORRESPONDS TO;Sm;0;ON;;;;;N;;;;; -2259;ESTIMATES;Sm;0;ON;;;;;N;;;;; -225A;EQUIANGULAR TO;Sm;0;ON;;;;;N;;;;; -225B;STAR EQUALS;Sm;0;ON;;;;;N;;;;; -225C;DELTA EQUAL TO;Sm;0;ON;;;;;N;;;;; -225D;EQUAL TO BY DEFINITION;Sm;0;ON;;;;;N;;;;; -225E;MEASURED BY;Sm;0;ON;;;;;N;;;;; -225F;QUESTIONED EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2260;NOT EQUAL TO;Sm;0;ON;003D 0338;;;;Y;;;;; -2261;IDENTICAL TO;Sm;0;ON;;;;;N;;;;; -2262;NOT IDENTICAL TO;Sm;0;ON;2261 0338;;;;Y;;;;; -2263;STRICTLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; -2264;LESS-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUAL TO;;;; -2265;GREATER-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUAL TO;;;; -2266;LESS-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OVER EQUAL TO;;;; -2267;GREATER-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OVER EQUAL TO;;;; -2268;LESS-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUAL TO;;;; -2269;GREATER-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUAL TO;;;; -226A;MUCH LESS-THAN;Sm;0;ON;;;;;Y;MUCH LESS THAN;;;; -226B;MUCH GREATER-THAN;Sm;0;ON;;;;;Y;MUCH GREATER THAN;;;; -226C;BETWEEN;Sm;0;ON;;;;;N;;;;; -226D;NOT EQUIVALENT TO;Sm;0;ON;224D 0338;;;;N;;;;; -226E;NOT LESS-THAN;Sm;0;ON;003C 0338;;;;Y;NOT LESS THAN;;;; -226F;NOT GREATER-THAN;Sm;0;ON;003E 0338;;;;Y;NOT GREATER THAN;;;; -2270;NEITHER LESS-THAN NOR EQUAL TO;Sm;0;ON;2264 0338;;;;Y;NEITHER LESS THAN NOR EQUAL TO;;;; -2271;NEITHER GREATER-THAN NOR EQUAL TO;Sm;0;ON;2265 0338;;;;Y;NEITHER GREATER THAN NOR EQUAL TO;;;; -2272;LESS-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUIVALENT TO;;;; -2273;GREATER-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUIVALENT TO;;;; -2274;NEITHER LESS-THAN NOR EQUIVALENT TO;Sm;0;ON;2272 0338;;;;Y;NEITHER LESS THAN NOR EQUIVALENT TO;;;; -2275;NEITHER GREATER-THAN NOR EQUIVALENT TO;Sm;0;ON;2273 0338;;;;Y;NEITHER GREATER THAN NOR EQUIVALENT TO;;;; -2276;LESS-THAN OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN OR GREATER THAN;;;; -2277;GREATER-THAN OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN OR LESS THAN;;;; -2278;NEITHER LESS-THAN NOR GREATER-THAN;Sm;0;ON;2276 0338;;;;Y;NEITHER LESS THAN NOR GREATER THAN;;;; -2279;NEITHER GREATER-THAN NOR LESS-THAN;Sm;0;ON;2277 0338;;;;Y;NEITHER GREATER THAN NOR LESS THAN;;;; -227A;PRECEDES;Sm;0;ON;;;;;Y;;;;; -227B;SUCCEEDS;Sm;0;ON;;;;;Y;;;;; -227C;PRECEDES OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -227D;SUCCEEDS OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -227E;PRECEDES OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; -227F;SUCCEEDS OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; -2280;DOES NOT PRECEDE;Sm;0;ON;227A 0338;;;;Y;;;;; -2281;DOES NOT SUCCEED;Sm;0;ON;227B 0338;;;;Y;;;;; -2282;SUBSET OF;Sm;0;ON;;;;;Y;;;;; -2283;SUPERSET OF;Sm;0;ON;;;;;Y;;;;; -2284;NOT A SUBSET OF;Sm;0;ON;2282 0338;;;;Y;;;;; -2285;NOT A SUPERSET OF;Sm;0;ON;2283 0338;;;;Y;;;;; -2286;SUBSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2287;SUPERSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2288;NEITHER A SUBSET OF NOR EQUAL TO;Sm;0;ON;2286 0338;;;;Y;;;;; -2289;NEITHER A SUPERSET OF NOR EQUAL TO;Sm;0;ON;2287 0338;;;;Y;;;;; -228A;SUBSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUBSET OF OR NOT EQUAL TO;;;; -228B;SUPERSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUPERSET OF OR NOT EQUAL TO;;;; -228C;MULTISET;Sm;0;ON;;;;;Y;;;;; -228D;MULTISET MULTIPLICATION;Sm;0;ON;;;;;N;;;;; -228E;MULTISET UNION;Sm;0;ON;;;;;N;;;;; -228F;SQUARE IMAGE OF;Sm;0;ON;;;;;Y;;;;; -2290;SQUARE ORIGINAL OF;Sm;0;ON;;;;;Y;;;;; -2291;SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2292;SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -2293;SQUARE CAP;Sm;0;ON;;;;;N;;;;; -2294;SQUARE CUP;Sm;0;ON;;;;;N;;;;; -2295;CIRCLED PLUS;Sm;0;ON;;;;;N;;;;; -2296;CIRCLED MINUS;Sm;0;ON;;;;;N;;;;; -2297;CIRCLED TIMES;Sm;0;ON;;;;;N;;;;; -2298;CIRCLED DIVISION SLASH;Sm;0;ON;;;;;Y;;;;; -2299;CIRCLED DOT OPERATOR;Sm;0;ON;;;;;N;;;;; -229A;CIRCLED RING OPERATOR;Sm;0;ON;;;;;N;;;;; -229B;CIRCLED ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;; -229C;CIRCLED EQUALS;Sm;0;ON;;;;;N;;;;; -229D;CIRCLED DASH;Sm;0;ON;;;;;N;;;;; -229E;SQUARED PLUS;Sm;0;ON;;;;;N;;;;; -229F;SQUARED MINUS;Sm;0;ON;;;;;N;;;;; -22A0;SQUARED TIMES;Sm;0;ON;;;;;N;;;;; -22A1;SQUARED DOT OPERATOR;Sm;0;ON;;;;;N;;;;; -22A2;RIGHT TACK;Sm;0;ON;;;;;Y;;;;; -22A3;LEFT TACK;Sm;0;ON;;;;;Y;;;;; -22A4;DOWN TACK;Sm;0;ON;;;;;N;;;;; -22A5;UP TACK;Sm;0;ON;;;;;N;;;;; -22A6;ASSERTION;Sm;0;ON;;;;;Y;;;;; -22A7;MODELS;Sm;0;ON;;;;;Y;;;;; -22A8;TRUE;Sm;0;ON;;;;;Y;;;;; -22A9;FORCES;Sm;0;ON;;;;;Y;;;;; -22AA;TRIPLE VERTICAL BAR RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;; -22AB;DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;; -22AC;DOES NOT PROVE;Sm;0;ON;22A2 0338;;;;Y;;;;; -22AD;NOT TRUE;Sm;0;ON;22A8 0338;;;;Y;;;;; -22AE;DOES NOT FORCE;Sm;0;ON;22A9 0338;;;;Y;;;;; -22AF;NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;22AB 0338;;;;Y;;;;; -22B0;PRECEDES UNDER RELATION;Sm;0;ON;;;;;Y;;;;; -22B1;SUCCEEDS UNDER RELATION;Sm;0;ON;;;;;Y;;;;; -22B2;NORMAL SUBGROUP OF;Sm;0;ON;;;;;Y;;;;; -22B3;CONTAINS AS NORMAL SUBGROUP;Sm;0;ON;;;;;Y;;;;; -22B4;NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -22B5;CONTAINS AS NORMAL SUBGROUP OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; -22B6;ORIGINAL OF;Sm;0;ON;;;;;Y;;;;; -22B7;IMAGE OF;Sm;0;ON;;;;;Y;;;;; -22B8;MULTIMAP;Sm;0;ON;;;;;Y;;;;; -22B9;HERMITIAN CONJUGATE MATRIX;Sm;0;ON;;;;;N;;;;; -22BA;INTERCALATE;Sm;0;ON;;;;;N;;;;; -22BB;XOR;Sm;0;ON;;;;;N;;;;; -22BC;NAND;Sm;0;ON;;;;;N;;;;; -22BD;NOR;Sm;0;ON;;;;;N;;;;; -22BE;RIGHT ANGLE WITH ARC;Sm;0;ON;;;;;Y;;;;; -22BF;RIGHT TRIANGLE;Sm;0;ON;;;;;Y;;;;; -22C0;N-ARY LOGICAL AND;Sm;0;ON;;;;;N;;;;; -22C1;N-ARY LOGICAL OR;Sm;0;ON;;;;;N;;;;; -22C2;N-ARY INTERSECTION;Sm;0;ON;;;;;N;;;;; -22C3;N-ARY UNION;Sm;0;ON;;;;;N;;;;; -22C4;DIAMOND OPERATOR;Sm;0;ON;;;;;N;;;;; -22C5;DOT OPERATOR;Sm;0;ON;;;;;N;;;;; -22C6;STAR OPERATOR;Sm;0;ON;;;;;N;;;;; -22C7;DIVISION TIMES;Sm;0;ON;;;;;N;;;;; -22C8;BOWTIE;Sm;0;ON;;;;;N;;;;; -22C9;LEFT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; -22CA;RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; -22CB;LEFT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; -22CC;RIGHT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; -22CD;REVERSED TILDE EQUALS;Sm;0;ON;;;;;Y;;;;; -22CE;CURLY LOGICAL OR;Sm;0;ON;;;;;N;;;;; -22CF;CURLY LOGICAL AND;Sm;0;ON;;;;;N;;;;; -22D0;DOUBLE SUBSET;Sm;0;ON;;;;;Y;;;;; -22D1;DOUBLE SUPERSET;Sm;0;ON;;;;;Y;;;;; -22D2;DOUBLE INTERSECTION;Sm;0;ON;;;;;N;;;;; -22D3;DOUBLE UNION;Sm;0;ON;;;;;N;;;;; -22D4;PITCHFORK;Sm;0;ON;;;;;N;;;;; -22D5;EQUAL AND PARALLEL TO;Sm;0;ON;;;;;N;;;;; -22D6;LESS-THAN WITH DOT;Sm;0;ON;;;;;Y;LESS THAN WITH DOT;;;; -22D7;GREATER-THAN WITH DOT;Sm;0;ON;;;;;Y;GREATER THAN WITH DOT;;;; -22D8;VERY MUCH LESS-THAN;Sm;0;ON;;;;;Y;VERY MUCH LESS THAN;;;; -22D9;VERY MUCH GREATER-THAN;Sm;0;ON;;;;;Y;VERY MUCH GREATER THAN;;;; -22DA;LESS-THAN EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN EQUAL TO OR GREATER THAN;;;; -22DB;GREATER-THAN EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN EQUAL TO OR LESS THAN;;;; -22DC;EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR LESS THAN;;;; -22DD;EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR GREATER THAN;;;; -22DE;EQUAL TO OR PRECEDES;Sm;0;ON;;;;;Y;;;;; -22DF;EQUAL TO OR SUCCEEDS;Sm;0;ON;;;;;Y;;;;; -22E0;DOES NOT PRECEDE OR EQUAL;Sm;0;ON;227C 0338;;;;Y;;;;; -22E1;DOES NOT SUCCEED OR EQUAL;Sm;0;ON;227D 0338;;;;Y;;;;; -22E2;NOT SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;2291 0338;;;;Y;;;;; -22E3;NOT SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;2292 0338;;;;Y;;;;; -22E4;SQUARE IMAGE OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; -22E5;SQUARE ORIGINAL OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; -22E6;LESS-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUIVALENT TO;;;; -22E7;GREATER-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUIVALENT TO;;;; -22E8;PRECEDES BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; -22E9;SUCCEEDS BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; -22EA;NOT NORMAL SUBGROUP OF;Sm;0;ON;22B2 0338;;;;Y;;;;; -22EB;DOES NOT CONTAIN AS NORMAL SUBGROUP;Sm;0;ON;22B3 0338;;;;Y;;;;; -22EC;NOT NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;22B4 0338;;;;Y;;;;; -22ED;DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL;Sm;0;ON;22B5 0338;;;;Y;;;;; -22EE;VERTICAL ELLIPSIS;Sm;0;ON;;;;;N;;;;; -22EF;MIDLINE HORIZONTAL ELLIPSIS;Sm;0;ON;;;;;N;;;;; -22F0;UP RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;; -22F1;DOWN RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;; -2300;DIAMETER SIGN;So;0;ON;;;;;N;;;;; -2301;ELECTRIC ARROW;So;0;ON;;;;;N;;;;; -2302;HOUSE;So;0;ON;;;;;N;;;;; -2303;UP ARROWHEAD;So;0;ON;;;;;N;;;;; -2304;DOWN ARROWHEAD;So;0;ON;;;;;N;;;;; -2305;PROJECTIVE;So;0;ON;;;;;N;;;;; -2306;PERSPECTIVE;So;0;ON;;;;;N;;;;; -2307;WAVY LINE;So;0;ON;;;;;N;;;;; -2308;LEFT CEILING;Sm;0;ON;;;;;Y;;;;; -2309;RIGHT CEILING;Sm;0;ON;;;;;Y;;;;; -230A;LEFT FLOOR;Sm;0;ON;;;;;Y;;;;; -230B;RIGHT FLOOR;Sm;0;ON;;;;;Y;;;;; -230C;BOTTOM RIGHT CROP;So;0;ON;;;;;N;;;;; -230D;BOTTOM LEFT CROP;So;0;ON;;;;;N;;;;; -230E;TOP RIGHT CROP;So;0;ON;;;;;N;;;;; -230F;TOP LEFT CROP;So;0;ON;;;;;N;;;;; -2310;REVERSED NOT SIGN;So;0;ON;;;;;N;;;;; -2311;SQUARE LOZENGE;So;0;ON;;;;;N;;;;; -2312;ARC;So;0;ON;;;;;N;;;;; -2313;SEGMENT;So;0;ON;;;;;N;;;;; -2314;SECTOR;So;0;ON;;;;;N;;;;; -2315;TELEPHONE RECORDER;So;0;ON;;;;;N;;;;; -2316;POSITION INDICATOR;So;0;ON;;;;;N;;;;; -2317;VIEWDATA SQUARE;So;0;ON;;;;;N;;;;; -2318;PLACE OF INTEREST SIGN;So;0;ON;;;;;N;COMMAND KEY;;;; -2319;TURNED NOT SIGN;So;0;ON;;;;;N;;;;; -231A;WATCH;So;0;ON;;;;;N;;;;; -231B;HOURGLASS;So;0;ON;;;;;N;;;;; -231C;TOP LEFT CORNER;So;0;ON;;;;;N;;;;; -231D;TOP RIGHT CORNER;So;0;ON;;;;;N;;;;; -231E;BOTTOM LEFT CORNER;So;0;ON;;;;;N;;;;; -231F;BOTTOM RIGHT CORNER;So;0;ON;;;;;N;;;;; -2320;TOP HALF INTEGRAL;Sm;0;ON;;;;;Y;;;;; -2321;BOTTOM HALF INTEGRAL;Sm;0;ON;;;;;Y;;;;; -2322;FROWN;So;0;ON;;;;;N;;;;; -2323;SMILE;So;0;ON;;;;;N;;;;; -2324;UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS;So;0;ON;;;;;N;ENTER KEY;;;; -2325;OPTION KEY;So;0;ON;;;;;N;;;;; -2326;ERASE TO THE RIGHT;So;0;ON;;;;;N;DELETE TO THE RIGHT KEY;;;; -2327;X IN A RECTANGLE BOX;So;0;ON;;;;;N;CLEAR KEY;;;; -2328;KEYBOARD;So;0;ON;;;;;N;;;;; -2329;LEFT-POINTING ANGLE BRACKET;Ps;0;ON;3008;;;;Y;BRA;;;; -232A;RIGHT-POINTING ANGLE BRACKET;Pe;0;ON;3009;;;;Y;KET;;;; -232B;ERASE TO THE LEFT;So;0;ON;;;;;N;DELETE TO THE LEFT KEY;;;; -232C;BENZENE RING;So;0;ON;;;;;N;;;;; -232D;CYLINDRICITY;So;0;ON;;;;;N;;;;; -232E;ALL AROUND-PROFILE;So;0;ON;;;;;N;;;;; -232F;SYMMETRY;So;0;ON;;;;;N;;;;; -2330;TOTAL RUNOUT;So;0;ON;;;;;N;;;;; -2331;DIMENSION ORIGIN;So;0;ON;;;;;N;;;;; -2332;CONICAL TAPER;So;0;ON;;;;;N;;;;; -2333;SLOPE;So;0;ON;;;;;N;;;;; -2334;COUNTERBORE;So;0;ON;;;;;N;;;;; -2335;COUNTERSINK;So;0;ON;;;;;N;;;;; -2336;APL FUNCTIONAL SYMBOL I-BEAM;So;0;L;;;;;N;;;;; -2337;APL FUNCTIONAL SYMBOL SQUISH QUAD;So;0;L;;;;;N;;;;; -2338;APL FUNCTIONAL SYMBOL QUAD EQUAL;So;0;L;;;;;N;;;;; -2339;APL FUNCTIONAL SYMBOL QUAD DIVIDE;So;0;L;;;;;N;;;;; -233A;APL FUNCTIONAL SYMBOL QUAD DIAMOND;So;0;L;;;;;N;;;;; -233B;APL FUNCTIONAL SYMBOL QUAD JOT;So;0;L;;;;;N;;;;; -233C;APL FUNCTIONAL SYMBOL QUAD CIRCLE;So;0;L;;;;;N;;;;; -233D;APL FUNCTIONAL SYMBOL CIRCLE STILE;So;0;L;;;;;N;;;;; -233E;APL FUNCTIONAL SYMBOL CIRCLE JOT;So;0;L;;;;;N;;;;; -233F;APL FUNCTIONAL SYMBOL SLASH BAR;So;0;L;;;;;N;;;;; -2340;APL FUNCTIONAL SYMBOL BACKSLASH BAR;So;0;L;;;;;N;;;;; -2341;APL FUNCTIONAL SYMBOL QUAD SLASH;So;0;L;;;;;N;;;;; -2342;APL FUNCTIONAL SYMBOL QUAD BACKSLASH;So;0;L;;;;;N;;;;; -2343;APL FUNCTIONAL SYMBOL QUAD LESS-THAN;So;0;L;;;;;N;;;;; -2344;APL FUNCTIONAL SYMBOL QUAD GREATER-THAN;So;0;L;;;;;N;;;;; -2345;APL FUNCTIONAL SYMBOL LEFTWARDS VANE;So;0;L;;;;;N;;;;; -2346;APL FUNCTIONAL SYMBOL RIGHTWARDS VANE;So;0;L;;;;;N;;;;; -2347;APL FUNCTIONAL SYMBOL QUAD LEFTWARDS ARROW;So;0;L;;;;;N;;;;; -2348;APL FUNCTIONAL SYMBOL QUAD RIGHTWARDS ARROW;So;0;L;;;;;N;;;;; -2349;APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH;So;0;L;;;;;N;;;;; -234A;APL FUNCTIONAL SYMBOL DOWN TACK UNDERBAR;So;0;L;;;;;N;;*;;; -234B;APL FUNCTIONAL SYMBOL DELTA STILE;So;0;L;;;;;N;;;;; -234C;APL FUNCTIONAL SYMBOL QUAD DOWN CARET;So;0;L;;;;;N;;;;; -234D;APL FUNCTIONAL SYMBOL QUAD DELTA;So;0;L;;;;;N;;;;; -234E;APL FUNCTIONAL SYMBOL DOWN TACK JOT;So;0;L;;;;;N;;*;;; -234F;APL FUNCTIONAL SYMBOL UPWARDS VANE;So;0;L;;;;;N;;;;; -2350;APL FUNCTIONAL SYMBOL QUAD UPWARDS ARROW;So;0;L;;;;;N;;;;; -2351;APL FUNCTIONAL SYMBOL UP TACK OVERBAR;So;0;L;;;;;N;;*;;; -2352;APL FUNCTIONAL SYMBOL DEL STILE;So;0;L;;;;;N;;;;; -2353;APL FUNCTIONAL SYMBOL QUAD UP CARET;So;0;L;;;;;N;;;;; -2354;APL FUNCTIONAL SYMBOL QUAD DEL;So;0;L;;;;;N;;;;; -2355;APL FUNCTIONAL SYMBOL UP TACK JOT;So;0;L;;;;;N;;*;;; -2356;APL FUNCTIONAL SYMBOL DOWNWARDS VANE;So;0;L;;;;;N;;;;; -2357;APL FUNCTIONAL SYMBOL QUAD DOWNWARDS ARROW;So;0;L;;;;;N;;;;; -2358;APL FUNCTIONAL SYMBOL QUOTE UNDERBAR;So;0;L;;;;;N;;;;; -2359;APL FUNCTIONAL SYMBOL DELTA UNDERBAR;So;0;L;;;;;N;;;;; -235A;APL FUNCTIONAL SYMBOL DIAMOND UNDERBAR;So;0;L;;;;;N;;;;; -235B;APL FUNCTIONAL SYMBOL JOT UNDERBAR;So;0;L;;;;;N;;;;; -235C;APL FUNCTIONAL SYMBOL CIRCLE UNDERBAR;So;0;L;;;;;N;;;;; -235D;APL FUNCTIONAL SYMBOL UP SHOE JOT;So;0;L;;;;;N;;;;; -235E;APL FUNCTIONAL SYMBOL QUOTE QUAD;So;0;L;;;;;N;;;;; -235F;APL FUNCTIONAL SYMBOL CIRCLE STAR;So;0;L;;;;;N;;;;; -2360;APL FUNCTIONAL SYMBOL QUAD COLON;So;0;L;;;;;N;;;;; -2361;APL FUNCTIONAL SYMBOL UP TACK DIAERESIS;So;0;L;;;;;N;;*;;; -2362;APL FUNCTIONAL SYMBOL DEL DIAERESIS;So;0;L;;;;;N;;;;; -2363;APL FUNCTIONAL SYMBOL STAR DIAERESIS;So;0;L;;;;;N;;;;; -2364;APL FUNCTIONAL SYMBOL JOT DIAERESIS;So;0;L;;;;;N;;;;; -2365;APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS;So;0;L;;;;;N;;;;; -2366;APL FUNCTIONAL SYMBOL DOWN SHOE STILE;So;0;L;;;;;N;;;;; -2367;APL FUNCTIONAL SYMBOL LEFT SHOE STILE;So;0;L;;;;;N;;;;; -2368;APL FUNCTIONAL SYMBOL TILDE DIAERESIS;So;0;L;;;;;N;;;;; -2369;APL FUNCTIONAL SYMBOL GREATER-THAN DIAERESIS;So;0;L;;;;;N;;;;; -236A;APL FUNCTIONAL SYMBOL COMMA BAR;So;0;L;;;;;N;;;;; -236B;APL FUNCTIONAL SYMBOL DEL TILDE;So;0;L;;;;;N;;;;; -236C;APL FUNCTIONAL SYMBOL ZILDE;So;0;L;;;;;N;;;;; -236D;APL FUNCTIONAL SYMBOL STILE TILDE;So;0;L;;;;;N;;;;; -236E;APL FUNCTIONAL SYMBOL SEMICOLON UNDERBAR;So;0;L;;;;;N;;;;; -236F;APL FUNCTIONAL SYMBOL QUAD NOT EQUAL;So;0;L;;;;;N;;;;; -2370;APL FUNCTIONAL SYMBOL QUAD QUESTION;So;0;L;;;;;N;;;;; -2371;APL FUNCTIONAL SYMBOL DOWN CARET TILDE;So;0;L;;;;;N;;;;; -2372;APL FUNCTIONAL SYMBOL UP CARET TILDE;So;0;L;;;;;N;;;;; -2373;APL FUNCTIONAL SYMBOL IOTA;So;0;L;;;;;N;;;;; -2374;APL FUNCTIONAL SYMBOL RHO;So;0;L;;;;;N;;;;; -2375;APL FUNCTIONAL SYMBOL OMEGA;So;0;L;;;;;N;;;;; -2376;APL FUNCTIONAL SYMBOL ALPHA UNDERBAR;So;0;L;;;;;N;;;;; -2377;APL FUNCTIONAL SYMBOL EPSILON UNDERBAR;So;0;L;;;;;N;;;;; -2378;APL FUNCTIONAL SYMBOL IOTA UNDERBAR;So;0;L;;;;;N;;;;; -2379;APL FUNCTIONAL SYMBOL OMEGA UNDERBAR;So;0;L;;;;;N;;;;; -237A;APL FUNCTIONAL SYMBOL ALPHA;So;0;L;;;;;N;;;;; -237B;NOT CHECK MARK;So;0;ON;;;;;N;;;;; -237D;SHOULDERED OPEN BOX;So;0;ON;;;;;N;;;;; -237E;BELL SYMBOL;So;0;ON;;;;;N;;;;; -237F;VERTICAL LINE WITH MIDDLE DOT;So;0;ON;;;;;N;;;;; -2380;INSERTION SYMBOL;So;0;ON;;;;;N;;;;; -2381;CONTINUOUS UNDERLINE SYMBOL;So;0;ON;;;;;N;;;;; -2382;DISCONTINUOUS UNDERLINE SYMBOL;So;0;ON;;;;;N;;;;; -2383;EMPHASIS SYMBOL;So;0;ON;;;;;N;;;;; -2384;COMPOSITION SYMBOL;So;0;ON;;;;;N;;;;; -2385;WHITE SQUARE WITH CENTRE VERTICAL LINE;So;0;ON;;;;;N;;;;; -2386;ENTER SYMBOL;So;0;ON;;;;;N;;;;; -2387;ALTERNATIVE KEY SYMBOL;So;0;ON;;;;;N;;;;; -2388;HELM SYMBOL;So;0;ON;;;;;N;;;;; -2389;CIRCLED HORIZONTAL BAR WITH NOTCH;So;0;ON;;;;;N;;pause;;; -238A;CIRCLED TRIANGLE DOWN;So;0;ON;;;;;N;;break;;; -238B;BROKEN CIRCLE WITH NORTHWEST ARROW;So;0;ON;;;;;N;;escape;;; -238C;UNDO SYMBOL;So;0;ON;;;;;N;;;;; -238D;MONOSTABLE SYMBOL;So;0;ON;;;;;N;;;;; -238E;HYSTERESIS SYMBOL;So;0;ON;;;;;N;;;;; -238F;OPEN-CIRCUIT-OUTPUT H-TYPE SYMBOL;So;0;ON;;;;;N;;;;; -2390;OPEN-CIRCUIT-OUTPUT L-TYPE SYMBOL;So;0;ON;;;;;N;;;;; -2391;PASSIVE-PULL-DOWN-OUTPUT SYMBOL;So;0;ON;;;;;N;;;;; -2392;PASSIVE-PULL-UP-OUTPUT SYMBOL;So;0;ON;;;;;N;;;;; -2393;DIRECT CURRENT SYMBOL FORM TWO;So;0;ON;;;;;N;;;;; -2394;SOFTWARE-FUNCTION SYMBOL;So;0;ON;;;;;N;;;;; -2395;APL FUNCTIONAL SYMBOL QUAD;So;0;L;;;;;N;;;;; -2396;DECIMAL SEPARATOR KEY SYMBOL;So;0;ON;;;;;N;;;;; -2397;PREVIOUS PAGE;So;0;ON;;;;;N;;;;; -2398;NEXT PAGE;So;0;ON;;;;;N;;;;; -2399;PRINT SCREEN SYMBOL;So;0;ON;;;;;N;;;;; -239A;CLEAR SCREEN SYMBOL;So;0;ON;;;;;N;;;;; -2400;SYMBOL FOR NULL;So;0;ON;;;;;N;GRAPHIC FOR NULL;;;; -2401;SYMBOL FOR START OF HEADING;So;0;ON;;;;;N;GRAPHIC FOR START OF HEADING;;;; -2402;SYMBOL FOR START OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR START OF TEXT;;;; -2403;SYMBOL FOR END OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR END OF TEXT;;;; -2404;SYMBOL FOR END OF TRANSMISSION;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION;;;; -2405;SYMBOL FOR ENQUIRY;So;0;ON;;;;;N;GRAPHIC FOR ENQUIRY;;;; -2406;SYMBOL FOR ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR ACKNOWLEDGE;;;; -2407;SYMBOL FOR BELL;So;0;ON;;;;;N;GRAPHIC FOR BELL;;;; -2408;SYMBOL FOR BACKSPACE;So;0;ON;;;;;N;GRAPHIC FOR BACKSPACE;;;; -2409;SYMBOL FOR HORIZONTAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR HORIZONTAL TABULATION;;;; -240A;SYMBOL FOR LINE FEED;So;0;ON;;;;;N;GRAPHIC FOR LINE FEED;;;; -240B;SYMBOL FOR VERTICAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR VERTICAL TABULATION;;;; -240C;SYMBOL FOR FORM FEED;So;0;ON;;;;;N;GRAPHIC FOR FORM FEED;;;; -240D;SYMBOL FOR CARRIAGE RETURN;So;0;ON;;;;;N;GRAPHIC FOR CARRIAGE RETURN;;;; -240E;SYMBOL FOR SHIFT OUT;So;0;ON;;;;;N;GRAPHIC FOR SHIFT OUT;;;; -240F;SYMBOL FOR SHIFT IN;So;0;ON;;;;;N;GRAPHIC FOR SHIFT IN;;;; -2410;SYMBOL FOR DATA LINK ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR DATA LINK ESCAPE;;;; -2411;SYMBOL FOR DEVICE CONTROL ONE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL ONE;;;; -2412;SYMBOL FOR DEVICE CONTROL TWO;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL TWO;;;; -2413;SYMBOL FOR DEVICE CONTROL THREE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL THREE;;;; -2414;SYMBOL FOR DEVICE CONTROL FOUR;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL FOUR;;;; -2415;SYMBOL FOR NEGATIVE ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR NEGATIVE ACKNOWLEDGE;;;; -2416;SYMBOL FOR SYNCHRONOUS IDLE;So;0;ON;;;;;N;GRAPHIC FOR SYNCHRONOUS IDLE;;;; -2417;SYMBOL FOR END OF TRANSMISSION BLOCK;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION BLOCK;;;; -2418;SYMBOL FOR CANCEL;So;0;ON;;;;;N;GRAPHIC FOR CANCEL;;;; -2419;SYMBOL FOR END OF MEDIUM;So;0;ON;;;;;N;GRAPHIC FOR END OF MEDIUM;;;; -241A;SYMBOL FOR SUBSTITUTE;So;0;ON;;;;;N;GRAPHIC FOR SUBSTITUTE;;;; -241B;SYMBOL FOR ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR ESCAPE;;;; -241C;SYMBOL FOR FILE SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR FILE SEPARATOR;;;; -241D;SYMBOL FOR GROUP SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR GROUP SEPARATOR;;;; -241E;SYMBOL FOR RECORD SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR RECORD SEPARATOR;;;; -241F;SYMBOL FOR UNIT SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR UNIT SEPARATOR;;;; -2420;SYMBOL FOR SPACE;So;0;ON;;;;;N;GRAPHIC FOR SPACE;;;; -2421;SYMBOL FOR DELETE;So;0;ON;;;;;N;GRAPHIC FOR DELETE;;;; -2422;BLANK SYMBOL;So;0;ON;;;;;N;BLANK;;;; -2423;OPEN BOX;So;0;ON;;;;;N;;;;; -2424;SYMBOL FOR NEWLINE;So;0;ON;;;;;N;GRAPHIC FOR NEWLINE;;;; -2425;SYMBOL FOR DELETE FORM TWO;So;0;ON;;;;;N;;;;; -2426;SYMBOL FOR SUBSTITUTE FORM TWO;So;0;ON;;;;;N;;;;; -2440;OCR HOOK;So;0;ON;;;;;N;;;;; -2441;OCR CHAIR;So;0;ON;;;;;N;;;;; -2442;OCR FORK;So;0;ON;;;;;N;;;;; -2443;OCR INVERTED FORK;So;0;ON;;;;;N;;;;; -2444;OCR BELT BUCKLE;So;0;ON;;;;;N;;;;; -2445;OCR BOW TIE;So;0;ON;;;;;N;;;;; -2446;OCR BRANCH BANK IDENTIFICATION;So;0;ON;;;;;N;;;;; -2447;OCR AMOUNT OF CHECK;So;0;ON;;;;;N;;;;; -2448;OCR DASH;So;0;ON;;;;;N;;;;; -2449;OCR CUSTOMER ACCOUNT NUMBER;So;0;ON;;;;;N;;;;; -244A;OCR DOUBLE BACKSLASH;So;0;ON;;;;;N;;;;; -2460;CIRCLED DIGIT ONE;No;0;EN;<circle> 0031;;1;1;N;;;;; -2461;CIRCLED DIGIT TWO;No;0;EN;<circle> 0032;;2;2;N;;;;; -2462;CIRCLED DIGIT THREE;No;0;EN;<circle> 0033;;3;3;N;;;;; -2463;CIRCLED DIGIT FOUR;No;0;EN;<circle> 0034;;4;4;N;;;;; -2464;CIRCLED DIGIT FIVE;No;0;EN;<circle> 0035;;5;5;N;;;;; -2465;CIRCLED DIGIT SIX;No;0;EN;<circle> 0036;;6;6;N;;;;; -2466;CIRCLED DIGIT SEVEN;No;0;EN;<circle> 0037;;7;7;N;;;;; -2467;CIRCLED DIGIT EIGHT;No;0;EN;<circle> 0038;;8;8;N;;;;; -2468;CIRCLED DIGIT NINE;No;0;EN;<circle> 0039;;9;9;N;;;;; -2469;CIRCLED NUMBER TEN;No;0;EN;<circle> 0031 0030;;;10;N;;;;; -246A;CIRCLED NUMBER ELEVEN;No;0;EN;<circle> 0031 0031;;;11;N;;;;; -246B;CIRCLED NUMBER TWELVE;No;0;EN;<circle> 0031 0032;;;12;N;;;;; -246C;CIRCLED NUMBER THIRTEEN;No;0;EN;<circle> 0031 0033;;;13;N;;;;; -246D;CIRCLED NUMBER FOURTEEN;No;0;EN;<circle> 0031 0034;;;14;N;;;;; -246E;CIRCLED NUMBER FIFTEEN;No;0;EN;<circle> 0031 0035;;;15;N;;;;; -246F;CIRCLED NUMBER SIXTEEN;No;0;EN;<circle> 0031 0036;;;16;N;;;;; -2470;CIRCLED NUMBER SEVENTEEN;No;0;EN;<circle> 0031 0037;;;17;N;;;;; -2471;CIRCLED NUMBER EIGHTEEN;No;0;EN;<circle> 0031 0038;;;18;N;;;;; -2472;CIRCLED NUMBER NINETEEN;No;0;EN;<circle> 0031 0039;;;19;N;;;;; -2473;CIRCLED NUMBER TWENTY;No;0;EN;<circle> 0032 0030;;;20;N;;;;; -2474;PARENTHESIZED DIGIT ONE;No;0;EN;<compat> 0028 0031 0029;;1;1;N;;;;; -2475;PARENTHESIZED DIGIT TWO;No;0;EN;<compat> 0028 0032 0029;;2;2;N;;;;; -2476;PARENTHESIZED DIGIT THREE;No;0;EN;<compat> 0028 0033 0029;;3;3;N;;;;; -2477;PARENTHESIZED DIGIT FOUR;No;0;EN;<compat> 0028 0034 0029;;4;4;N;;;;; -2478;PARENTHESIZED DIGIT FIVE;No;0;EN;<compat> 0028 0035 0029;;5;5;N;;;;; -2479;PARENTHESIZED DIGIT SIX;No;0;EN;<compat> 0028 0036 0029;;6;6;N;;;;; -247A;PARENTHESIZED DIGIT SEVEN;No;0;EN;<compat> 0028 0037 0029;;7;7;N;;;;; -247B;PARENTHESIZED DIGIT EIGHT;No;0;EN;<compat> 0028 0038 0029;;8;8;N;;;;; -247C;PARENTHESIZED DIGIT NINE;No;0;EN;<compat> 0028 0039 0029;;9;9;N;;;;; -247D;PARENTHESIZED NUMBER TEN;No;0;EN;<compat> 0028 0031 0030 0029;;;10;N;;;;; -247E;PARENTHESIZED NUMBER ELEVEN;No;0;EN;<compat> 0028 0031 0031 0029;;;11;N;;;;; -247F;PARENTHESIZED NUMBER TWELVE;No;0;EN;<compat> 0028 0031 0032 0029;;;12;N;;;;; -2480;PARENTHESIZED NUMBER THIRTEEN;No;0;EN;<compat> 0028 0031 0033 0029;;;13;N;;;;; -2481;PARENTHESIZED NUMBER FOURTEEN;No;0;EN;<compat> 0028 0031 0034 0029;;;14;N;;;;; -2482;PARENTHESIZED NUMBER FIFTEEN;No;0;EN;<compat> 0028 0031 0035 0029;;;15;N;;;;; -2483;PARENTHESIZED NUMBER SIXTEEN;No;0;EN;<compat> 0028 0031 0036 0029;;;16;N;;;;; -2484;PARENTHESIZED NUMBER SEVENTEEN;No;0;EN;<compat> 0028 0031 0037 0029;;;17;N;;;;; -2485;PARENTHESIZED NUMBER EIGHTEEN;No;0;EN;<compat> 0028 0031 0038 0029;;;18;N;;;;; -2486;PARENTHESIZED NUMBER NINETEEN;No;0;EN;<compat> 0028 0031 0039 0029;;;19;N;;;;; -2487;PARENTHESIZED NUMBER TWENTY;No;0;EN;<compat> 0028 0032 0030 0029;;;20;N;;;;; -2488;DIGIT ONE FULL STOP;No;0;EN;<compat> 0031 002E;;1;1;N;DIGIT ONE PERIOD;;;; -2489;DIGIT TWO FULL STOP;No;0;EN;<compat> 0032 002E;;2;2;N;DIGIT TWO PERIOD;;;; -248A;DIGIT THREE FULL STOP;No;0;EN;<compat> 0033 002E;;3;3;N;DIGIT THREE PERIOD;;;; -248B;DIGIT FOUR FULL STOP;No;0;EN;<compat> 0034 002E;;4;4;N;DIGIT FOUR PERIOD;;;; -248C;DIGIT FIVE FULL STOP;No;0;EN;<compat> 0035 002E;;5;5;N;DIGIT FIVE PERIOD;;;; -248D;DIGIT SIX FULL STOP;No;0;EN;<compat> 0036 002E;;6;6;N;DIGIT SIX PERIOD;;;; -248E;DIGIT SEVEN FULL STOP;No;0;EN;<compat> 0037 002E;;7;7;N;DIGIT SEVEN PERIOD;;;; -248F;DIGIT EIGHT FULL STOP;No;0;EN;<compat> 0038 002E;;8;8;N;DIGIT EIGHT PERIOD;;;; -2490;DIGIT NINE FULL STOP;No;0;EN;<compat> 0039 002E;;9;9;N;DIGIT NINE PERIOD;;;; -2491;NUMBER TEN FULL STOP;No;0;EN;<compat> 0031 0030 002E;;;10;N;NUMBER TEN PERIOD;;;; -2492;NUMBER ELEVEN FULL STOP;No;0;EN;<compat> 0031 0031 002E;;;11;N;NUMBER ELEVEN PERIOD;;;; -2493;NUMBER TWELVE FULL STOP;No;0;EN;<compat> 0031 0032 002E;;;12;N;NUMBER TWELVE PERIOD;;;; -2494;NUMBER THIRTEEN FULL STOP;No;0;EN;<compat> 0031 0033 002E;;;13;N;NUMBER THIRTEEN PERIOD;;;; -2495;NUMBER FOURTEEN FULL STOP;No;0;EN;<compat> 0031 0034 002E;;;14;N;NUMBER FOURTEEN PERIOD;;;; -2496;NUMBER FIFTEEN FULL STOP;No;0;EN;<compat> 0031 0035 002E;;;15;N;NUMBER FIFTEEN PERIOD;;;; -2497;NUMBER SIXTEEN FULL STOP;No;0;EN;<compat> 0031 0036 002E;;;16;N;NUMBER SIXTEEN PERIOD;;;; -2498;NUMBER SEVENTEEN FULL STOP;No;0;EN;<compat> 0031 0037 002E;;;17;N;NUMBER SEVENTEEN PERIOD;;;; -2499;NUMBER EIGHTEEN FULL STOP;No;0;EN;<compat> 0031 0038 002E;;;18;N;NUMBER EIGHTEEN PERIOD;;;; -249A;NUMBER NINETEEN FULL STOP;No;0;EN;<compat> 0031 0039 002E;;;19;N;NUMBER NINETEEN PERIOD;;;; -249B;NUMBER TWENTY FULL STOP;No;0;EN;<compat> 0032 0030 002E;;;20;N;NUMBER TWENTY PERIOD;;;; -249C;PARENTHESIZED LATIN SMALL LETTER A;So;0;L;<compat> 0028 0061 0029;;;;N;;;;; -249D;PARENTHESIZED LATIN SMALL LETTER B;So;0;L;<compat> 0028 0062 0029;;;;N;;;;; -249E;PARENTHESIZED LATIN SMALL LETTER C;So;0;L;<compat> 0028 0063 0029;;;;N;;;;; -249F;PARENTHESIZED LATIN SMALL LETTER D;So;0;L;<compat> 0028 0064 0029;;;;N;;;;; -24A0;PARENTHESIZED LATIN SMALL LETTER E;So;0;L;<compat> 0028 0065 0029;;;;N;;;;; -24A1;PARENTHESIZED LATIN SMALL LETTER F;So;0;L;<compat> 0028 0066 0029;;;;N;;;;; -24A2;PARENTHESIZED LATIN SMALL LETTER G;So;0;L;<compat> 0028 0067 0029;;;;N;;;;; -24A3;PARENTHESIZED LATIN SMALL LETTER H;So;0;L;<compat> 0028 0068 0029;;;;N;;;;; -24A4;PARENTHESIZED LATIN SMALL LETTER I;So;0;L;<compat> 0028 0069 0029;;;;N;;;;; -24A5;PARENTHESIZED LATIN SMALL LETTER J;So;0;L;<compat> 0028 006A 0029;;;;N;;;;; -24A6;PARENTHESIZED LATIN SMALL LETTER K;So;0;L;<compat> 0028 006B 0029;;;;N;;;;; -24A7;PARENTHESIZED LATIN SMALL LETTER L;So;0;L;<compat> 0028 006C 0029;;;;N;;;;; -24A8;PARENTHESIZED LATIN SMALL LETTER M;So;0;L;<compat> 0028 006D 0029;;;;N;;;;; -24A9;PARENTHESIZED LATIN SMALL LETTER N;So;0;L;<compat> 0028 006E 0029;;;;N;;;;; -24AA;PARENTHESIZED LATIN SMALL LETTER O;So;0;L;<compat> 0028 006F 0029;;;;N;;;;; -24AB;PARENTHESIZED LATIN SMALL LETTER P;So;0;L;<compat> 0028 0070 0029;;;;N;;;;; -24AC;PARENTHESIZED LATIN SMALL LETTER Q;So;0;L;<compat> 0028 0071 0029;;;;N;;;;; -24AD;PARENTHESIZED LATIN SMALL LETTER R;So;0;L;<compat> 0028 0072 0029;;;;N;;;;; -24AE;PARENTHESIZED LATIN SMALL LETTER S;So;0;L;<compat> 0028 0073 0029;;;;N;;;;; -24AF;PARENTHESIZED LATIN SMALL LETTER T;So;0;L;<compat> 0028 0074 0029;;;;N;;;;; -24B0;PARENTHESIZED LATIN SMALL LETTER U;So;0;L;<compat> 0028 0075 0029;;;;N;;;;; -24B1;PARENTHESIZED LATIN SMALL LETTER V;So;0;L;<compat> 0028 0076 0029;;;;N;;;;; -24B2;PARENTHESIZED LATIN SMALL LETTER W;So;0;L;<compat> 0028 0077 0029;;;;N;;;;; -24B3;PARENTHESIZED LATIN SMALL LETTER X;So;0;L;<compat> 0028 0078 0029;;;;N;;;;; -24B4;PARENTHESIZED LATIN SMALL LETTER Y;So;0;L;<compat> 0028 0079 0029;;;;N;;;;; -24B5;PARENTHESIZED LATIN SMALL LETTER Z;So;0;L;<compat> 0028 007A 0029;;;;N;;;;; -24B6;CIRCLED LATIN CAPITAL LETTER A;So;0;L;<circle> 0041;;;;N;;;;24D0; -24B7;CIRCLED LATIN CAPITAL LETTER B;So;0;L;<circle> 0042;;;;N;;;;24D1; -24B8;CIRCLED LATIN CAPITAL LETTER C;So;0;L;<circle> 0043;;;;N;;;;24D2; -24B9;CIRCLED LATIN CAPITAL LETTER D;So;0;L;<circle> 0044;;;;N;;;;24D3; -24BA;CIRCLED LATIN CAPITAL LETTER E;So;0;L;<circle> 0045;;;;N;;;;24D4; -24BB;CIRCLED LATIN CAPITAL LETTER F;So;0;L;<circle> 0046;;;;N;;;;24D5; -24BC;CIRCLED LATIN CAPITAL LETTER G;So;0;L;<circle> 0047;;;;N;;;;24D6; -24BD;CIRCLED LATIN CAPITAL LETTER H;So;0;L;<circle> 0048;;;;N;;;;24D7; -24BE;CIRCLED LATIN CAPITAL LETTER I;So;0;L;<circle> 0049;;;;N;;;;24D8; -24BF;CIRCLED LATIN CAPITAL LETTER J;So;0;L;<circle> 004A;;;;N;;;;24D9; -24C0;CIRCLED LATIN CAPITAL LETTER K;So;0;L;<circle> 004B;;;;N;;;;24DA; -24C1;CIRCLED LATIN CAPITAL LETTER L;So;0;L;<circle> 004C;;;;N;;;;24DB; -24C2;CIRCLED LATIN CAPITAL LETTER M;So;0;L;<circle> 004D;;;;N;;;;24DC; -24C3;CIRCLED LATIN CAPITAL LETTER N;So;0;L;<circle> 004E;;;;N;;;;24DD; -24C4;CIRCLED LATIN CAPITAL LETTER O;So;0;L;<circle> 004F;;;;N;;;;24DE; -24C5;CIRCLED LATIN CAPITAL LETTER P;So;0;L;<circle> 0050;;;;N;;;;24DF; -24C6;CIRCLED LATIN CAPITAL LETTER Q;So;0;L;<circle> 0051;;;;N;;;;24E0; -24C7;CIRCLED LATIN CAPITAL LETTER R;So;0;L;<circle> 0052;;;;N;;;;24E1; -24C8;CIRCLED LATIN CAPITAL LETTER S;So;0;L;<circle> 0053;;;;N;;;;24E2; -24C9;CIRCLED LATIN CAPITAL LETTER T;So;0;L;<circle> 0054;;;;N;;;;24E3; -24CA;CIRCLED LATIN CAPITAL LETTER U;So;0;L;<circle> 0055;;;;N;;;;24E4; -24CB;CIRCLED LATIN CAPITAL LETTER V;So;0;L;<circle> 0056;;;;N;;;;24E5; -24CC;CIRCLED LATIN CAPITAL LETTER W;So;0;L;<circle> 0057;;;;N;;;;24E6; -24CD;CIRCLED LATIN CAPITAL LETTER X;So;0;L;<circle> 0058;;;;N;;;;24E7; -24CE;CIRCLED LATIN CAPITAL LETTER Y;So;0;L;<circle> 0059;;;;N;;;;24E8; -24CF;CIRCLED LATIN CAPITAL LETTER Z;So;0;L;<circle> 005A;;;;N;;;;24E9; -24D0;CIRCLED LATIN SMALL LETTER A;So;0;L;<circle> 0061;;;;N;;;24B6;;24B6 -24D1;CIRCLED LATIN SMALL LETTER B;So;0;L;<circle> 0062;;;;N;;;24B7;;24B7 -24D2;CIRCLED LATIN SMALL LETTER C;So;0;L;<circle> 0063;;;;N;;;24B8;;24B8 -24D3;CIRCLED LATIN SMALL LETTER D;So;0;L;<circle> 0064;;;;N;;;24B9;;24B9 -24D4;CIRCLED LATIN SMALL LETTER E;So;0;L;<circle> 0065;;;;N;;;24BA;;24BA -24D5;CIRCLED LATIN SMALL LETTER F;So;0;L;<circle> 0066;;;;N;;;24BB;;24BB -24D6;CIRCLED LATIN SMALL LETTER G;So;0;L;<circle> 0067;;;;N;;;24BC;;24BC -24D7;CIRCLED LATIN SMALL LETTER H;So;0;L;<circle> 0068;;;;N;;;24BD;;24BD -24D8;CIRCLED LATIN SMALL LETTER I;So;0;L;<circle> 0069;;;;N;;;24BE;;24BE -24D9;CIRCLED LATIN SMALL LETTER J;So;0;L;<circle> 006A;;;;N;;;24BF;;24BF -24DA;CIRCLED LATIN SMALL LETTER K;So;0;L;<circle> 006B;;;;N;;;24C0;;24C0 -24DB;CIRCLED LATIN SMALL LETTER L;So;0;L;<circle> 006C;;;;N;;;24C1;;24C1 -24DC;CIRCLED LATIN SMALL LETTER M;So;0;L;<circle> 006D;;;;N;;;24C2;;24C2 -24DD;CIRCLED LATIN SMALL LETTER N;So;0;L;<circle> 006E;;;;N;;;24C3;;24C3 -24DE;CIRCLED LATIN SMALL LETTER O;So;0;L;<circle> 006F;;;;N;;;24C4;;24C4 -24DF;CIRCLED LATIN SMALL LETTER P;So;0;L;<circle> 0070;;;;N;;;24C5;;24C5 -24E0;CIRCLED LATIN SMALL LETTER Q;So;0;L;<circle> 0071;;;;N;;;24C6;;24C6 -24E1;CIRCLED LATIN SMALL LETTER R;So;0;L;<circle> 0072;;;;N;;;24C7;;24C7 -24E2;CIRCLED LATIN SMALL LETTER S;So;0;L;<circle> 0073;;;;N;;;24C8;;24C8 -24E3;CIRCLED LATIN SMALL LETTER T;So;0;L;<circle> 0074;;;;N;;;24C9;;24C9 -24E4;CIRCLED LATIN SMALL LETTER U;So;0;L;<circle> 0075;;;;N;;;24CA;;24CA -24E5;CIRCLED LATIN SMALL LETTER V;So;0;L;<circle> 0076;;;;N;;;24CB;;24CB -24E6;CIRCLED LATIN SMALL LETTER W;So;0;L;<circle> 0077;;;;N;;;24CC;;24CC -24E7;CIRCLED LATIN SMALL LETTER X;So;0;L;<circle> 0078;;;;N;;;24CD;;24CD -24E8;CIRCLED LATIN SMALL LETTER Y;So;0;L;<circle> 0079;;;;N;;;24CE;;24CE -24E9;CIRCLED LATIN SMALL LETTER Z;So;0;L;<circle> 007A;;;;N;;;24CF;;24CF -24EA;CIRCLED DIGIT ZERO;No;0;EN;<circle> 0030;;0;0;N;;;;; -2500;BOX DRAWINGS LIGHT HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT HORIZONTAL;;;; -2501;BOX DRAWINGS HEAVY HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY HORIZONTAL;;;; -2502;BOX DRAWINGS LIGHT VERTICAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL;;;; -2503;BOX DRAWINGS HEAVY VERTICAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL;;;; -2504;BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH HORIZONTAL;;;; -2505;BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH HORIZONTAL;;;; -2506;BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH VERTICAL;;;; -2507;BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH VERTICAL;;;; -2508;BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH HORIZONTAL;;;; -2509;BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH HORIZONTAL;;;; -250A;BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH VERTICAL;;;; -250B;BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH VERTICAL;;;; -250C;BOX DRAWINGS LIGHT DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND RIGHT;;;; -250D;BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT HEAVY;;;; -250E;BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT LIGHT;;;; -250F;BOX DRAWINGS HEAVY DOWN AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND RIGHT;;;; -2510;BOX DRAWINGS LIGHT DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND LEFT;;;; -2511;BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT HEAVY;;;; -2512;BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT LIGHT;;;; -2513;BOX DRAWINGS HEAVY DOWN AND LEFT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND LEFT;;;; -2514;BOX DRAWINGS LIGHT UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT UP AND RIGHT;;;; -2515;BOX DRAWINGS UP LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT HEAVY;;;; -2516;BOX DRAWINGS UP HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT LIGHT;;;; -2517;BOX DRAWINGS HEAVY UP AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY UP AND RIGHT;;;; -2518;BOX DRAWINGS LIGHT UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT UP AND LEFT;;;; -2519;BOX DRAWINGS UP LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT HEAVY;;;; -251A;BOX DRAWINGS UP HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT LIGHT;;;; -251B;BOX DRAWINGS HEAVY UP AND LEFT;So;0;ON;;;;;N;FORMS HEAVY UP AND LEFT;;;; -251C;BOX DRAWINGS LIGHT VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND RIGHT;;;; -251D;BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND RIGHT HEAVY;;;; -251E;BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT DOWN LIGHT;;;; -251F;BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT UP LIGHT;;;; -2520;BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND RIGHT LIGHT;;;; -2521;BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT UP HEAVY;;;; -2522;BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT DOWN HEAVY;;;; -2523;BOX DRAWINGS HEAVY VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND RIGHT;;;; -2524;BOX DRAWINGS LIGHT VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND LEFT;;;; -2525;BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND LEFT HEAVY;;;; -2526;BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT DOWN LIGHT;;;; -2527;BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT UP LIGHT;;;; -2528;BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND LEFT LIGHT;;;; -2529;BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT UP HEAVY;;;; -252A;BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT DOWN HEAVY;;;; -252B;BOX DRAWINGS HEAVY VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND LEFT;;;; -252C;BOX DRAWINGS LIGHT DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOWN AND HORIZONTAL;;;; -252D;BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT DOWN LIGHT;;;; -252E;BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT DOWN LIGHT;;;; -252F;BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND HORIZONTAL HEAVY;;;; -2530;BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND HORIZONTAL LIGHT;;;; -2531;BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT DOWN HEAVY;;;; -2532;BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT DOWN HEAVY;;;; -2533;BOX DRAWINGS HEAVY DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOWN AND HORIZONTAL;;;; -2534;BOX DRAWINGS LIGHT UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT UP AND HORIZONTAL;;;; -2535;BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT UP LIGHT;;;; -2536;BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT UP LIGHT;;;; -2537;BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND HORIZONTAL HEAVY;;;; -2538;BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND HORIZONTAL LIGHT;;;; -2539;BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT UP HEAVY;;;; -253A;BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT UP HEAVY;;;; -253B;BOX DRAWINGS HEAVY UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY UP AND HORIZONTAL;;;; -253C;BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND HORIZONTAL;;;; -253D;BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT VERTICAL LIGHT;;;; -253E;BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT VERTICAL LIGHT;;;; -253F;BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND HORIZONTAL HEAVY;;;; -2540;BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND DOWN HORIZONTAL LIGHT;;;; -2541;BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND UP HORIZONTAL LIGHT;;;; -2542;BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND HORIZONTAL LIGHT;;;; -2543;BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT UP HEAVY AND RIGHT DOWN LIGHT;;;; -2544;BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT UP HEAVY AND LEFT DOWN LIGHT;;;; -2545;BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT DOWN HEAVY AND RIGHT UP LIGHT;;;; -2546;BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT DOWN HEAVY AND LEFT UP LIGHT;;;; -2547;BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND UP HORIZONTAL HEAVY;;;; -2548;BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND DOWN HORIZONTAL HEAVY;;;; -2549;BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT VERTICAL HEAVY;;;; -254A;BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT VERTICAL HEAVY;;;; -254B;BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND HORIZONTAL;;;; -254C;BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH HORIZONTAL;;;; -254D;BOX DRAWINGS HEAVY DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH HORIZONTAL;;;; -254E;BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH VERTICAL;;;; -254F;BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH VERTICAL;;;; -2550;BOX DRAWINGS DOUBLE HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE HORIZONTAL;;;; -2551;BOX DRAWINGS DOUBLE VERTICAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL;;;; -2552;BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND RIGHT DOUBLE;;;; -2553;BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND RIGHT SINGLE;;;; -2554;BOX DRAWINGS DOUBLE DOWN AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND RIGHT;;;; -2555;BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND LEFT DOUBLE;;;; -2556;BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND LEFT SINGLE;;;; -2557;BOX DRAWINGS DOUBLE DOWN AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND LEFT;;;; -2558;BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND RIGHT DOUBLE;;;; -2559;BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND RIGHT SINGLE;;;; -255A;BOX DRAWINGS DOUBLE UP AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE UP AND RIGHT;;;; -255B;BOX DRAWINGS UP SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND LEFT DOUBLE;;;; -255C;BOX DRAWINGS UP DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND LEFT SINGLE;;;; -255D;BOX DRAWINGS DOUBLE UP AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE UP AND LEFT;;;; -255E;BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND RIGHT DOUBLE;;;; -255F;BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND RIGHT SINGLE;;;; -2560;BOX DRAWINGS DOUBLE VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND RIGHT;;;; -2561;BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND LEFT DOUBLE;;;; -2562;BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND LEFT SINGLE;;;; -2563;BOX DRAWINGS DOUBLE VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND LEFT;;;; -2564;BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND HORIZONTAL DOUBLE;;;; -2565;BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND HORIZONTAL SINGLE;;;; -2566;BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND HORIZONTAL;;;; -2567;BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND HORIZONTAL DOUBLE;;;; -2568;BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND HORIZONTAL SINGLE;;;; -2569;BOX DRAWINGS DOUBLE UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE UP AND HORIZONTAL;;;; -256A;BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE;;;; -256B;BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE;;;; -256C;BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND HORIZONTAL;;;; -256D;BOX DRAWINGS LIGHT ARC DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND RIGHT;;;; -256E;BOX DRAWINGS LIGHT ARC DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND LEFT;;;; -256F;BOX DRAWINGS LIGHT ARC UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND LEFT;;;; -2570;BOX DRAWINGS LIGHT ARC UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND RIGHT;;;; -2571;BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;;;; -2572;BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;;;; -2573;BOX DRAWINGS LIGHT DIAGONAL CROSS;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL CROSS;;;; -2574;BOX DRAWINGS LIGHT LEFT;So;0;ON;;;;;N;FORMS LIGHT LEFT;;;; -2575;BOX DRAWINGS LIGHT UP;So;0;ON;;;;;N;FORMS LIGHT UP;;;; -2576;BOX DRAWINGS LIGHT RIGHT;So;0;ON;;;;;N;FORMS LIGHT RIGHT;;;; -2577;BOX DRAWINGS LIGHT DOWN;So;0;ON;;;;;N;FORMS LIGHT DOWN;;;; -2578;BOX DRAWINGS HEAVY LEFT;So;0;ON;;;;;N;FORMS HEAVY LEFT;;;; -2579;BOX DRAWINGS HEAVY UP;So;0;ON;;;;;N;FORMS HEAVY UP;;;; -257A;BOX DRAWINGS HEAVY RIGHT;So;0;ON;;;;;N;FORMS HEAVY RIGHT;;;; -257B;BOX DRAWINGS HEAVY DOWN;So;0;ON;;;;;N;FORMS HEAVY DOWN;;;; -257C;BOX DRAWINGS LIGHT LEFT AND HEAVY RIGHT;So;0;ON;;;;;N;FORMS LIGHT LEFT AND HEAVY RIGHT;;;; -257D;BOX DRAWINGS LIGHT UP AND HEAVY DOWN;So;0;ON;;;;;N;FORMS LIGHT UP AND HEAVY DOWN;;;; -257E;BOX DRAWINGS HEAVY LEFT AND LIGHT RIGHT;So;0;ON;;;;;N;FORMS HEAVY LEFT AND LIGHT RIGHT;;;; -257F;BOX DRAWINGS HEAVY UP AND LIGHT DOWN;So;0;ON;;;;;N;FORMS HEAVY UP AND LIGHT DOWN;;;; -2580;UPPER HALF BLOCK;So;0;ON;;;;;N;;;;; -2581;LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; -2582;LOWER ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; -2583;LOWER THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -2584;LOWER HALF BLOCK;So;0;ON;;;;;N;;;;; -2585;LOWER FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -2586;LOWER THREE QUARTERS BLOCK;So;0;ON;;;;;N;LOWER THREE QUARTER BLOCK;;;; -2587;LOWER SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -2588;FULL BLOCK;So;0;ON;;;;;N;;;;; -2589;LEFT SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -258A;LEFT THREE QUARTERS BLOCK;So;0;ON;;;;;N;LEFT THREE QUARTER BLOCK;;;; -258B;LEFT FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -258C;LEFT HALF BLOCK;So;0;ON;;;;;N;;;;; -258D;LEFT THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; -258E;LEFT ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; -258F;LEFT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; -2590;RIGHT HALF BLOCK;So;0;ON;;;;;N;;;;; -2591;LIGHT SHADE;So;0;ON;;;;;N;;;;; -2592;MEDIUM SHADE;So;0;ON;;;;;N;;;;; -2593;DARK SHADE;So;0;ON;;;;;N;;;;; -2594;UPPER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; -2595;RIGHT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; -25A0;BLACK SQUARE;So;0;ON;;;;;N;;;;; -25A1;WHITE SQUARE;So;0;ON;;;;;N;;;;; -25A2;WHITE SQUARE WITH ROUNDED CORNERS;So;0;ON;;;;;N;;;;; -25A3;WHITE SQUARE CONTAINING BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;; -25A4;SQUARE WITH HORIZONTAL FILL;So;0;ON;;;;;N;;;;; -25A5;SQUARE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;; -25A6;SQUARE WITH ORTHOGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;; -25A7;SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL;So;0;ON;;;;;N;;;;; -25A8;SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL;So;0;ON;;;;;N;;;;; -25A9;SQUARE WITH DIAGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;; -25AA;BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;; -25AB;WHITE SMALL SQUARE;So;0;ON;;;;;N;;;;; -25AC;BLACK RECTANGLE;So;0;ON;;;;;N;;;;; -25AD;WHITE RECTANGLE;So;0;ON;;;;;N;;;;; -25AE;BLACK VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;; -25AF;WHITE VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;; -25B0;BLACK PARALLELOGRAM;So;0;ON;;;;;N;;;;; -25B1;WHITE PARALLELOGRAM;So;0;ON;;;;;N;;;;; -25B2;BLACK UP-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING TRIANGLE;;;; -25B3;WHITE UP-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE;;;; -25B4;BLACK UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING SMALL TRIANGLE;;;; -25B5;WHITE UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING SMALL TRIANGLE;;;; -25B6;BLACK RIGHT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING TRIANGLE;;;; -25B7;WHITE RIGHT-POINTING TRIANGLE;Sm;0;ON;;;;;N;WHITE RIGHT POINTING TRIANGLE;;;; -25B8;BLACK RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING SMALL TRIANGLE;;;; -25B9;WHITE RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE RIGHT POINTING SMALL TRIANGLE;;;; -25BA;BLACK RIGHT-POINTING POINTER;So;0;ON;;;;;N;BLACK RIGHT POINTING POINTER;;;; -25BB;WHITE RIGHT-POINTING POINTER;So;0;ON;;;;;N;WHITE RIGHT POINTING POINTER;;;; -25BC;BLACK DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING TRIANGLE;;;; -25BD;WHITE DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING TRIANGLE;;;; -25BE;BLACK DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING SMALL TRIANGLE;;;; -25BF;WHITE DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING SMALL TRIANGLE;;;; -25C0;BLACK LEFT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING TRIANGLE;;;; -25C1;WHITE LEFT-POINTING TRIANGLE;Sm;0;ON;;;;;N;WHITE LEFT POINTING TRIANGLE;;;; -25C2;BLACK LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING SMALL TRIANGLE;;;; -25C3;WHITE LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE LEFT POINTING SMALL TRIANGLE;;;; -25C4;BLACK LEFT-POINTING POINTER;So;0;ON;;;;;N;BLACK LEFT POINTING POINTER;;;; -25C5;WHITE LEFT-POINTING POINTER;So;0;ON;;;;;N;WHITE LEFT POINTING POINTER;;;; -25C6;BLACK DIAMOND;So;0;ON;;;;;N;;;;; -25C7;WHITE DIAMOND;So;0;ON;;;;;N;;;;; -25C8;WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND;So;0;ON;;;;;N;;;;; -25C9;FISHEYE;So;0;ON;;;;;N;;;;; -25CA;LOZENGE;So;0;ON;;;;;N;;;;; -25CB;WHITE CIRCLE;So;0;ON;;;;;N;;;;; -25CC;DOTTED CIRCLE;So;0;ON;;;;;N;;;;; -25CD;CIRCLE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;; -25CE;BULLSEYE;So;0;ON;;;;;N;;;;; -25CF;BLACK CIRCLE;So;0;ON;;;;;N;;;;; -25D0;CIRCLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; -25D1;CIRCLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; -25D2;CIRCLE WITH LOWER HALF BLACK;So;0;ON;;;;;N;;;;; -25D3;CIRCLE WITH UPPER HALF BLACK;So;0;ON;;;;;N;;;;; -25D4;CIRCLE WITH UPPER RIGHT QUADRANT BLACK;So;0;ON;;;;;N;;;;; -25D5;CIRCLE WITH ALL BUT UPPER LEFT QUADRANT BLACK;So;0;ON;;;;;N;;;;; -25D6;LEFT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; -25D7;RIGHT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; -25D8;INVERSE BULLET;So;0;ON;;;;;N;;;;; -25D9;INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; -25DA;UPPER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; -25DB;LOWER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; -25DC;UPPER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; -25DD;UPPER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; -25DE;LOWER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; -25DF;LOWER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; -25E0;UPPER HALF CIRCLE;So;0;ON;;;;;N;;;;; -25E1;LOWER HALF CIRCLE;So;0;ON;;;;;N;;;;; -25E2;BLACK LOWER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; -25E3;BLACK LOWER LEFT TRIANGLE;So;0;ON;;;;;N;;;;; -25E4;BLACK UPPER LEFT TRIANGLE;So;0;ON;;;;;N;;;;; -25E5;BLACK UPPER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; -25E6;WHITE BULLET;So;0;ON;;;;;N;;;;; -25E7;SQUARE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; -25E8;SQUARE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; -25E9;SQUARE WITH UPPER LEFT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; -25EA;SQUARE WITH LOWER RIGHT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; -25EB;WHITE SQUARE WITH VERTICAL BISECTING LINE;So;0;ON;;;;;N;;;;; -25EC;WHITE UP-POINTING TRIANGLE WITH DOT;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE WITH DOT;;;; -25ED;UP-POINTING TRIANGLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH LEFT HALF BLACK;;;; -25EE;UP-POINTING TRIANGLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH RIGHT HALF BLACK;;;; -25EF;LARGE CIRCLE;So;0;ON;;;;;N;;;;; -25F0;WHITE SQUARE WITH UPPER LEFT QUADRANT;So;0;ON;;;;;N;;;;; -25F1;WHITE SQUARE WITH LOWER LEFT QUADRANT;So;0;ON;;;;;N;;;;; -25F2;WHITE SQUARE WITH LOWER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; -25F3;WHITE SQUARE WITH UPPER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; -25F4;WHITE CIRCLE WITH UPPER LEFT QUADRANT;So;0;ON;;;;;N;;;;; -25F5;WHITE CIRCLE WITH LOWER LEFT QUADRANT;So;0;ON;;;;;N;;;;; -25F6;WHITE CIRCLE WITH LOWER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; -25F7;WHITE CIRCLE WITH UPPER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; -2600;BLACK SUN WITH RAYS;So;0;ON;;;;;N;;;;; -2601;CLOUD;So;0;ON;;;;;N;;;;; -2602;UMBRELLA;So;0;ON;;;;;N;;;;; -2603;SNOWMAN;So;0;ON;;;;;N;;;;; -2604;COMET;So;0;ON;;;;;N;;;;; -2605;BLACK STAR;So;0;ON;;;;;N;;;;; -2606;WHITE STAR;So;0;ON;;;;;N;;;;; -2607;LIGHTNING;So;0;ON;;;;;N;;;;; -2608;THUNDERSTORM;So;0;ON;;;;;N;;;;; -2609;SUN;So;0;ON;;;;;N;;;;; -260A;ASCENDING NODE;So;0;ON;;;;;N;;;;; -260B;DESCENDING NODE;So;0;ON;;;;;N;;;;; -260C;CONJUNCTION;So;0;ON;;;;;N;;;;; -260D;OPPOSITION;So;0;ON;;;;;N;;;;; -260E;BLACK TELEPHONE;So;0;ON;;;;;N;;;;; -260F;WHITE TELEPHONE;So;0;ON;;;;;N;;;;; -2610;BALLOT BOX;So;0;ON;;;;;N;;;;; -2611;BALLOT BOX WITH CHECK;So;0;ON;;;;;N;;;;; -2612;BALLOT BOX WITH X;So;0;ON;;;;;N;;;;; -2613;SALTIRE;So;0;ON;;;;;N;;;;; -2619;REVERSED ROTATED FLORAL HEART BULLET;So;0;ON;;;;;N;;;;; -261A;BLACK LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; -261B;BLACK RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; -261C;WHITE LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; -261D;WHITE UP POINTING INDEX;So;0;ON;;;;;N;;;;; -261E;WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; -261F;WHITE DOWN POINTING INDEX;So;0;ON;;;;;N;;;;; -2620;SKULL AND CROSSBONES;So;0;ON;;;;;N;;;;; -2621;CAUTION SIGN;So;0;ON;;;;;N;;;;; -2622;RADIOACTIVE SIGN;So;0;ON;;;;;N;;;;; -2623;BIOHAZARD SIGN;So;0;ON;;;;;N;;;;; -2624;CADUCEUS;So;0;ON;;;;;N;;;;; -2625;ANKH;So;0;ON;;;;;N;;;;; -2626;ORTHODOX CROSS;So;0;ON;;;;;N;;;;; -2627;CHI RHO;So;0;ON;;;;;N;;;;; -2628;CROSS OF LORRAINE;So;0;ON;;;;;N;;;;; -2629;CROSS OF JERUSALEM;So;0;ON;;;;;N;;;;; -262A;STAR AND CRESCENT;So;0;ON;;;;;N;;;;; -262B;FARSI SYMBOL;So;0;ON;;;;;N;SYMBOL OF IRAN;;;; -262C;ADI SHAKTI;So;0;ON;;;;;N;;;;; -262D;HAMMER AND SICKLE;So;0;ON;;;;;N;;;;; -262E;PEACE SYMBOL;So;0;ON;;;;;N;;;;; -262F;YIN YANG;So;0;ON;;;;;N;;;;; -2630;TRIGRAM FOR HEAVEN;So;0;ON;;;;;N;;;;; -2631;TRIGRAM FOR LAKE;So;0;ON;;;;;N;;;;; -2632;TRIGRAM FOR FIRE;So;0;ON;;;;;N;;;;; -2633;TRIGRAM FOR THUNDER;So;0;ON;;;;;N;;;;; -2634;TRIGRAM FOR WIND;So;0;ON;;;;;N;;;;; -2635;TRIGRAM FOR WATER;So;0;ON;;;;;N;;;;; -2636;TRIGRAM FOR MOUNTAIN;So;0;ON;;;;;N;;;;; -2637;TRIGRAM FOR EARTH;So;0;ON;;;;;N;;;;; -2638;WHEEL OF DHARMA;So;0;ON;;;;;N;;;;; -2639;WHITE FROWNING FACE;So;0;ON;;;;;N;;;;; -263A;WHITE SMILING FACE;So;0;ON;;;;;N;;;;; -263B;BLACK SMILING FACE;So;0;ON;;;;;N;;;;; -263C;WHITE SUN WITH RAYS;So;0;ON;;;;;N;;;;; -263D;FIRST QUARTER MOON;So;0;ON;;;;;N;;;;; -263E;LAST QUARTER MOON;So;0;ON;;;;;N;;;;; -263F;MERCURY;So;0;ON;;;;;N;;;;; -2640;FEMALE SIGN;So;0;ON;;;;;N;;;;; -2641;EARTH;So;0;ON;;;;;N;;;;; -2642;MALE SIGN;So;0;ON;;;;;N;;;;; -2643;JUPITER;So;0;ON;;;;;N;;;;; -2644;SATURN;So;0;ON;;;;;N;;;;; -2645;URANUS;So;0;ON;;;;;N;;;;; -2646;NEPTUNE;So;0;ON;;;;;N;;;;; -2647;PLUTO;So;0;ON;;;;;N;;;;; -2648;ARIES;So;0;ON;;;;;N;;;;; -2649;TAURUS;So;0;ON;;;;;N;;;;; -264A;GEMINI;So;0;ON;;;;;N;;;;; -264B;CANCER;So;0;ON;;;;;N;;;;; -264C;LEO;So;0;ON;;;;;N;;;;; -264D;VIRGO;So;0;ON;;;;;N;;;;; -264E;LIBRA;So;0;ON;;;;;N;;;;; -264F;SCORPIUS;So;0;ON;;;;;N;;;;; -2650;SAGITTARIUS;So;0;ON;;;;;N;;;;; -2651;CAPRICORN;So;0;ON;;;;;N;;;;; -2652;AQUARIUS;So;0;ON;;;;;N;;;;; -2653;PISCES;So;0;ON;;;;;N;;;;; -2654;WHITE CHESS KING;So;0;ON;;;;;N;;;;; -2655;WHITE CHESS QUEEN;So;0;ON;;;;;N;;;;; -2656;WHITE CHESS ROOK;So;0;ON;;;;;N;;;;; -2657;WHITE CHESS BISHOP;So;0;ON;;;;;N;;;;; -2658;WHITE CHESS KNIGHT;So;0;ON;;;;;N;;;;; -2659;WHITE CHESS PAWN;So;0;ON;;;;;N;;;;; -265A;BLACK CHESS KING;So;0;ON;;;;;N;;;;; -265B;BLACK CHESS QUEEN;So;0;ON;;;;;N;;;;; -265C;BLACK CHESS ROOK;So;0;ON;;;;;N;;;;; -265D;BLACK CHESS BISHOP;So;0;ON;;;;;N;;;;; -265E;BLACK CHESS KNIGHT;So;0;ON;;;;;N;;;;; -265F;BLACK CHESS PAWN;So;0;ON;;;;;N;;;;; -2660;BLACK SPADE SUIT;So;0;ON;;;;;N;;;;; -2661;WHITE HEART SUIT;So;0;ON;;;;;N;;;;; -2662;WHITE DIAMOND SUIT;So;0;ON;;;;;N;;;;; -2663;BLACK CLUB SUIT;So;0;ON;;;;;N;;;;; -2664;WHITE SPADE SUIT;So;0;ON;;;;;N;;;;; -2665;BLACK HEART SUIT;So;0;ON;;;;;N;;;;; -2666;BLACK DIAMOND SUIT;So;0;ON;;;;;N;;;;; -2667;WHITE CLUB SUIT;So;0;ON;;;;;N;;;;; -2668;HOT SPRINGS;So;0;ON;;;;;N;;;;; -2669;QUARTER NOTE;So;0;ON;;;;;N;;;;; -266A;EIGHTH NOTE;So;0;ON;;;;;N;;;;; -266B;BEAMED EIGHTH NOTES;So;0;ON;;;;;N;BARRED EIGHTH NOTES;;;; -266C;BEAMED SIXTEENTH NOTES;So;0;ON;;;;;N;BARRED SIXTEENTH NOTES;;;; -266D;MUSIC FLAT SIGN;So;0;ON;;;;;N;FLAT;;;; -266E;MUSIC NATURAL SIGN;So;0;ON;;;;;N;NATURAL;;;; -266F;MUSIC SHARP SIGN;Sm;0;ON;;;;;N;SHARP;;;; -2670;WEST SYRIAC CROSS;So;0;ON;;;;;N;;;;; -2671;EAST SYRIAC CROSS;So;0;ON;;;;;N;;;;; -2701;UPPER BLADE SCISSORS;So;0;ON;;;;;N;;;;; -2702;BLACK SCISSORS;So;0;ON;;;;;N;;;;; -2703;LOWER BLADE SCISSORS;So;0;ON;;;;;N;;;;; -2704;WHITE SCISSORS;So;0;ON;;;;;N;;;;; -2706;TELEPHONE LOCATION SIGN;So;0;ON;;;;;N;;;;; -2707;TAPE DRIVE;So;0;ON;;;;;N;;;;; -2708;AIRPLANE;So;0;ON;;;;;N;;;;; -2709;ENVELOPE;So;0;ON;;;;;N;;;;; -270C;VICTORY HAND;So;0;ON;;;;;N;;;;; -270D;WRITING HAND;So;0;ON;;;;;N;;;;; -270E;LOWER RIGHT PENCIL;So;0;ON;;;;;N;;;;; -270F;PENCIL;So;0;ON;;;;;N;;;;; -2710;UPPER RIGHT PENCIL;So;0;ON;;;;;N;;;;; -2711;WHITE NIB;So;0;ON;;;;;N;;;;; -2712;BLACK NIB;So;0;ON;;;;;N;;;;; -2713;CHECK MARK;So;0;ON;;;;;N;;;;; -2714;HEAVY CHECK MARK;So;0;ON;;;;;N;;;;; -2715;MULTIPLICATION X;So;0;ON;;;;;N;;;;; -2716;HEAVY MULTIPLICATION X;So;0;ON;;;;;N;;;;; -2717;BALLOT X;So;0;ON;;;;;N;;;;; -2718;HEAVY BALLOT X;So;0;ON;;;;;N;;;;; -2719;OUTLINED GREEK CROSS;So;0;ON;;;;;N;;;;; -271A;HEAVY GREEK CROSS;So;0;ON;;;;;N;;;;; -271B;OPEN CENTRE CROSS;So;0;ON;;;;;N;OPEN CENTER CROSS;;;; -271C;HEAVY OPEN CENTRE CROSS;So;0;ON;;;;;N;HEAVY OPEN CENTER CROSS;;;; -271D;LATIN CROSS;So;0;ON;;;;;N;;;;; -271E;SHADOWED WHITE LATIN CROSS;So;0;ON;;;;;N;;;;; -271F;OUTLINED LATIN CROSS;So;0;ON;;;;;N;;;;; -2720;MALTESE CROSS;So;0;ON;;;;;N;;;;; -2721;STAR OF DAVID;So;0;ON;;;;;N;;;;; -2722;FOUR TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -2723;FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -2724;HEAVY FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -2725;FOUR CLUB-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -2726;BLACK FOUR POINTED STAR;So;0;ON;;;;;N;;;;; -2727;WHITE FOUR POINTED STAR;So;0;ON;;;;;N;;;;; -2729;STRESS OUTLINED WHITE STAR;So;0;ON;;;;;N;;;;; -272A;CIRCLED WHITE STAR;So;0;ON;;;;;N;;;;; -272B;OPEN CENTRE BLACK STAR;So;0;ON;;;;;N;OPEN CENTER BLACK STAR;;;; -272C;BLACK CENTRE WHITE STAR;So;0;ON;;;;;N;BLACK CENTER WHITE STAR;;;; -272D;OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;; -272E;HEAVY OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;; -272F;PINWHEEL STAR;So;0;ON;;;;;N;;;;; -2730;SHADOWED WHITE STAR;So;0;ON;;;;;N;;;;; -2731;HEAVY ASTERISK;So;0;ON;;;;;N;;;;; -2732;OPEN CENTRE ASTERISK;So;0;ON;;;;;N;OPEN CENTER ASTERISK;;;; -2733;EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -2734;EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;; -2735;EIGHT POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; -2736;SIX POINTED BLACK STAR;So;0;ON;;;;;N;;;;; -2737;EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;; -2738;HEAVY EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;; -2739;TWELVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; -273A;SIXTEEN POINTED ASTERISK;So;0;ON;;;;;N;;;;; -273B;TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -273C;OPEN CENTRE TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;OPEN CENTER TEARDROP-SPOKED ASTERISK;;;; -273D;HEAVY TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -273E;SIX PETALLED BLACK AND WHITE FLORETTE;So;0;ON;;;;;N;;;;; -273F;BLACK FLORETTE;So;0;ON;;;;;N;;;;; -2740;WHITE FLORETTE;So;0;ON;;;;;N;;;;; -2741;EIGHT PETALLED OUTLINED BLACK FLORETTE;So;0;ON;;;;;N;;;;; -2742;CIRCLED OPEN CENTRE EIGHT POINTED STAR;So;0;ON;;;;;N;CIRCLED OPEN CENTER EIGHT POINTED STAR;;;; -2743;HEAVY TEARDROP-SPOKED PINWHEEL ASTERISK;So;0;ON;;;;;N;;;;; -2744;SNOWFLAKE;So;0;ON;;;;;N;;;;; -2745;TIGHT TRIFOLIATE SNOWFLAKE;So;0;ON;;;;;N;;;;; -2746;HEAVY CHEVRON SNOWFLAKE;So;0;ON;;;;;N;;;;; -2747;SPARKLE;So;0;ON;;;;;N;;;;; -2748;HEAVY SPARKLE;So;0;ON;;;;;N;;;;; -2749;BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; -274A;EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;; -274B;HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;; -274D;SHADOWED WHITE CIRCLE;So;0;ON;;;;;N;;;;; -274F;LOWER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; -2750;UPPER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; -2751;LOWER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; -2752;UPPER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; -2756;BLACK DIAMOND MINUS WHITE X;So;0;ON;;;;;N;;;;; -2758;LIGHT VERTICAL BAR;So;0;ON;;;;;N;;;;; -2759;MEDIUM VERTICAL BAR;So;0;ON;;;;;N;;;;; -275A;HEAVY VERTICAL BAR;So;0;ON;;;;;N;;;;; -275B;HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -275C;HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -275D;HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -275E;HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -2761;CURVED STEM PARAGRAPH SIGN ORNAMENT;So;0;ON;;;;;N;;;;; -2762;HEAVY EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -2763;HEAVY HEART EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; -2764;HEAVY BLACK HEART;So;0;ON;;;;;N;;;;; -2765;ROTATED HEAVY BLACK HEART BULLET;So;0;ON;;;;;N;;;;; -2766;FLORAL HEART;So;0;ON;;;;;N;;;;; -2767;ROTATED FLORAL HEART BULLET;So;0;ON;;;;;N;;;;; -2776;DINGBAT NEGATIVE CIRCLED DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED DIGIT ONE;;;; -2777;DINGBAT NEGATIVE CIRCLED DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED DIGIT TWO;;;; -2778;DINGBAT NEGATIVE CIRCLED DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED DIGIT THREE;;;; -2779;DINGBAT NEGATIVE CIRCLED DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED DIGIT FOUR;;;; -277A;DINGBAT NEGATIVE CIRCLED DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED DIGIT FIVE;;;; -277B;DINGBAT NEGATIVE CIRCLED DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED DIGIT SIX;;;; -277C;DINGBAT NEGATIVE CIRCLED DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED DIGIT SEVEN;;;; -277D;DINGBAT NEGATIVE CIRCLED DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED DIGIT EIGHT;;;; -277E;DINGBAT NEGATIVE CIRCLED DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED DIGIT NINE;;;; -277F;DINGBAT NEGATIVE CIRCLED NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED NUMBER TEN;;;; -2780;DINGBAT CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;CIRCLED SANS-SERIF DIGIT ONE;;;; -2781;DINGBAT CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;CIRCLED SANS-SERIF DIGIT TWO;;;; -2782;DINGBAT CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;CIRCLED SANS-SERIF DIGIT THREE;;;; -2783;DINGBAT CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;CIRCLED SANS-SERIF DIGIT FOUR;;;; -2784;DINGBAT CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;CIRCLED SANS-SERIF DIGIT FIVE;;;; -2785;DINGBAT CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;CIRCLED SANS-SERIF DIGIT SIX;;;; -2786;DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;CIRCLED SANS-SERIF DIGIT SEVEN;;;; -2787;DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;CIRCLED SANS-SERIF DIGIT EIGHT;;;; -2788;DINGBAT CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;CIRCLED SANS-SERIF DIGIT NINE;;;; -2789;DINGBAT CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;CIRCLED SANS-SERIF NUMBER TEN;;;; -278A;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED SANS-SERIF DIGIT ONE;;;; -278B;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED SANS-SERIF DIGIT TWO;;;; -278C;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED SANS-SERIF DIGIT THREE;;;; -278D;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED SANS-SERIF DIGIT FOUR;;;; -278E;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED SANS-SERIF DIGIT FIVE;;;; -278F;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED SANS-SERIF DIGIT SIX;;;; -2790;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED SANS-SERIF DIGIT SEVEN;;;; -2791;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED SANS-SERIF DIGIT EIGHT;;;; -2792;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED SANS-SERIF DIGIT NINE;;;; -2793;DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED SANS-SERIF NUMBER TEN;;;; -2794;HEAVY WIDE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WIDE-HEADED RIGHT ARROW;;;; -2798;HEAVY SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT ARROW;;;; -2799;HEAVY RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY RIGHT ARROW;;;; -279A;HEAVY NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT ARROW;;;; -279B;DRAFTING POINT RIGHTWARDS ARROW;So;0;ON;;;;;N;DRAFTING POINT RIGHT ARROW;;;; -279C;HEAVY ROUND-TIPPED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY ROUND-TIPPED RIGHT ARROW;;;; -279D;TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;TRIANGLE-HEADED RIGHT ARROW;;;; -279E;HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TRIANGLE-HEADED RIGHT ARROW;;;; -279F;DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;DASHED TRIANGLE-HEADED RIGHT ARROW;;;; -27A0;HEAVY DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY DASHED TRIANGLE-HEADED RIGHT ARROW;;;; -27A1;BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK RIGHT ARROW;;;; -27A2;THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D TOP-LIGHTED RIGHT ARROWHEAD;;;; -27A3;THREE-D BOTTOM-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D BOTTOM-LIGHTED RIGHT ARROWHEAD;;;; -27A4;BLACK RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;BLACK RIGHT ARROWHEAD;;;; -27A5;HEAVY BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED DOWN AND RIGHT ARROW;;;; -27A6;HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED UP AND RIGHT ARROW;;;; -27A7;SQUAT BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;SQUAT BLACK RIGHT ARROW;;;; -27A8;HEAVY CONCAVE-POINTED BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY CONCAVE-POINTED BLACK RIGHT ARROW;;;; -27A9;RIGHT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;RIGHT-SHADED WHITE RIGHT ARROW;;;; -27AA;LEFT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT-SHADED WHITE RIGHT ARROW;;;; -27AB;BACK-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;BACK-TILTED SHADOWED WHITE RIGHT ARROW;;;; -27AC;FRONT-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;FRONT-TILTED SHADOWED WHITE RIGHT ARROW;;;; -27AD;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; -27AE;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; -27AF;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; -27B1;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; -27B2;CIRCLED HEAVY WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;CIRCLED HEAVY WHITE RIGHT ARROW;;;; -27B3;WHITE-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;WHITE-FEATHERED RIGHT ARROW;;;; -27B4;BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED LOWER RIGHT ARROW;;;; -27B5;BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK-FEATHERED RIGHT ARROW;;;; -27B6;BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED UPPER RIGHT ARROW;;;; -27B7;HEAVY BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED LOWER RIGHT ARROW;;;; -27B8;HEAVY BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED RIGHT ARROW;;;; -27B9;HEAVY BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED UPPER RIGHT ARROW;;;; -27BA;TEARDROP-BARBED RIGHTWARDS ARROW;So;0;ON;;;;;N;TEARDROP-BARBED RIGHT ARROW;;;; -27BB;HEAVY TEARDROP-SHANKED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TEARDROP-SHANKED RIGHT ARROW;;;; -27BC;WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;WEDGE-TAILED RIGHT ARROW;;;; -27BD;HEAVY WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WEDGE-TAILED RIGHT ARROW;;;; -27BE;OPEN-OUTLINED RIGHTWARDS ARROW;So;0;ON;;;;;N;OPEN-OUTLINED RIGHT ARROW;;;; -2800;BRAILLE PATTERN BLANK;So;0;ON;;;;;N;;;;; -2801;BRAILLE PATTERN DOTS-1;So;0;ON;;;;;N;;;;; -2802;BRAILLE PATTERN DOTS-2;So;0;ON;;;;;N;;;;; -2803;BRAILLE PATTERN DOTS-12;So;0;ON;;;;;N;;;;; -2804;BRAILLE PATTERN DOTS-3;So;0;ON;;;;;N;;;;; -2805;BRAILLE PATTERN DOTS-13;So;0;ON;;;;;N;;;;; -2806;BRAILLE PATTERN DOTS-23;So;0;ON;;;;;N;;;;; -2807;BRAILLE PATTERN DOTS-123;So;0;ON;;;;;N;;;;; -2808;BRAILLE PATTERN DOTS-4;So;0;ON;;;;;N;;;;; -2809;BRAILLE PATTERN DOTS-14;So;0;ON;;;;;N;;;;; -280A;BRAILLE PATTERN DOTS-24;So;0;ON;;;;;N;;;;; -280B;BRAILLE PATTERN DOTS-124;So;0;ON;;;;;N;;;;; -280C;BRAILLE PATTERN DOTS-34;So;0;ON;;;;;N;;;;; -280D;BRAILLE PATTERN DOTS-134;So;0;ON;;;;;N;;;;; -280E;BRAILLE PATTERN DOTS-234;So;0;ON;;;;;N;;;;; -280F;BRAILLE PATTERN DOTS-1234;So;0;ON;;;;;N;;;;; -2810;BRAILLE PATTERN DOTS-5;So;0;ON;;;;;N;;;;; -2811;BRAILLE PATTERN DOTS-15;So;0;ON;;;;;N;;;;; -2812;BRAILLE PATTERN DOTS-25;So;0;ON;;;;;N;;;;; -2813;BRAILLE PATTERN DOTS-125;So;0;ON;;;;;N;;;;; -2814;BRAILLE PATTERN DOTS-35;So;0;ON;;;;;N;;;;; -2815;BRAILLE PATTERN DOTS-135;So;0;ON;;;;;N;;;;; -2816;BRAILLE PATTERN DOTS-235;So;0;ON;;;;;N;;;;; -2817;BRAILLE PATTERN DOTS-1235;So;0;ON;;;;;N;;;;; -2818;BRAILLE PATTERN DOTS-45;So;0;ON;;;;;N;;;;; -2819;BRAILLE PATTERN DOTS-145;So;0;ON;;;;;N;;;;; -281A;BRAILLE PATTERN DOTS-245;So;0;ON;;;;;N;;;;; -281B;BRAILLE PATTERN DOTS-1245;So;0;ON;;;;;N;;;;; -281C;BRAILLE PATTERN DOTS-345;So;0;ON;;;;;N;;;;; -281D;BRAILLE PATTERN DOTS-1345;So;0;ON;;;;;N;;;;; -281E;BRAILLE PATTERN DOTS-2345;So;0;ON;;;;;N;;;;; -281F;BRAILLE PATTERN DOTS-12345;So;0;ON;;;;;N;;;;; -2820;BRAILLE PATTERN DOTS-6;So;0;ON;;;;;N;;;;; -2821;BRAILLE PATTERN DOTS-16;So;0;ON;;;;;N;;;;; -2822;BRAILLE PATTERN DOTS-26;So;0;ON;;;;;N;;;;; -2823;BRAILLE PATTERN DOTS-126;So;0;ON;;;;;N;;;;; -2824;BRAILLE PATTERN DOTS-36;So;0;ON;;;;;N;;;;; -2825;BRAILLE PATTERN DOTS-136;So;0;ON;;;;;N;;;;; -2826;BRAILLE PATTERN DOTS-236;So;0;ON;;;;;N;;;;; -2827;BRAILLE PATTERN DOTS-1236;So;0;ON;;;;;N;;;;; -2828;BRAILLE PATTERN DOTS-46;So;0;ON;;;;;N;;;;; -2829;BRAILLE PATTERN DOTS-146;So;0;ON;;;;;N;;;;; -282A;BRAILLE PATTERN DOTS-246;So;0;ON;;;;;N;;;;; -282B;BRAILLE PATTERN DOTS-1246;So;0;ON;;;;;N;;;;; -282C;BRAILLE PATTERN DOTS-346;So;0;ON;;;;;N;;;;; -282D;BRAILLE PATTERN DOTS-1346;So;0;ON;;;;;N;;;;; -282E;BRAILLE PATTERN DOTS-2346;So;0;ON;;;;;N;;;;; -282F;BRAILLE PATTERN DOTS-12346;So;0;ON;;;;;N;;;;; -2830;BRAILLE PATTERN DOTS-56;So;0;ON;;;;;N;;;;; -2831;BRAILLE PATTERN DOTS-156;So;0;ON;;;;;N;;;;; -2832;BRAILLE PATTERN DOTS-256;So;0;ON;;;;;N;;;;; -2833;BRAILLE PATTERN DOTS-1256;So;0;ON;;;;;N;;;;; -2834;BRAILLE PATTERN DOTS-356;So;0;ON;;;;;N;;;;; -2835;BRAILLE PATTERN DOTS-1356;So;0;ON;;;;;N;;;;; -2836;BRAILLE PATTERN DOTS-2356;So;0;ON;;;;;N;;;;; -2837;BRAILLE PATTERN DOTS-12356;So;0;ON;;;;;N;;;;; -2838;BRAILLE PATTERN DOTS-456;So;0;ON;;;;;N;;;;; -2839;BRAILLE PATTERN DOTS-1456;So;0;ON;;;;;N;;;;; -283A;BRAILLE PATTERN DOTS-2456;So;0;ON;;;;;N;;;;; -283B;BRAILLE PATTERN DOTS-12456;So;0;ON;;;;;N;;;;; -283C;BRAILLE PATTERN DOTS-3456;So;0;ON;;;;;N;;;;; -283D;BRAILLE PATTERN DOTS-13456;So;0;ON;;;;;N;;;;; -283E;BRAILLE PATTERN DOTS-23456;So;0;ON;;;;;N;;;;; -283F;BRAILLE PATTERN DOTS-123456;So;0;ON;;;;;N;;;;; -2840;BRAILLE PATTERN DOTS-7;So;0;ON;;;;;N;;;;; -2841;BRAILLE PATTERN DOTS-17;So;0;ON;;;;;N;;;;; -2842;BRAILLE PATTERN DOTS-27;So;0;ON;;;;;N;;;;; -2843;BRAILLE PATTERN DOTS-127;So;0;ON;;;;;N;;;;; -2844;BRAILLE PATTERN DOTS-37;So;0;ON;;;;;N;;;;; -2845;BRAILLE PATTERN DOTS-137;So;0;ON;;;;;N;;;;; -2846;BRAILLE PATTERN DOTS-237;So;0;ON;;;;;N;;;;; -2847;BRAILLE PATTERN DOTS-1237;So;0;ON;;;;;N;;;;; -2848;BRAILLE PATTERN DOTS-47;So;0;ON;;;;;N;;;;; -2849;BRAILLE PATTERN DOTS-147;So;0;ON;;;;;N;;;;; -284A;BRAILLE PATTERN DOTS-247;So;0;ON;;;;;N;;;;; -284B;BRAILLE PATTERN DOTS-1247;So;0;ON;;;;;N;;;;; -284C;BRAILLE PATTERN DOTS-347;So;0;ON;;;;;N;;;;; -284D;BRAILLE PATTERN DOTS-1347;So;0;ON;;;;;N;;;;; -284E;BRAILLE PATTERN DOTS-2347;So;0;ON;;;;;N;;;;; -284F;BRAILLE PATTERN DOTS-12347;So;0;ON;;;;;N;;;;; -2850;BRAILLE PATTERN DOTS-57;So;0;ON;;;;;N;;;;; -2851;BRAILLE PATTERN DOTS-157;So;0;ON;;;;;N;;;;; -2852;BRAILLE PATTERN DOTS-257;So;0;ON;;;;;N;;;;; -2853;BRAILLE PATTERN DOTS-1257;So;0;ON;;;;;N;;;;; -2854;BRAILLE PATTERN DOTS-357;So;0;ON;;;;;N;;;;; -2855;BRAILLE PATTERN DOTS-1357;So;0;ON;;;;;N;;;;; -2856;BRAILLE PATTERN DOTS-2357;So;0;ON;;;;;N;;;;; -2857;BRAILLE PATTERN DOTS-12357;So;0;ON;;;;;N;;;;; -2858;BRAILLE PATTERN DOTS-457;So;0;ON;;;;;N;;;;; -2859;BRAILLE PATTERN DOTS-1457;So;0;ON;;;;;N;;;;; -285A;BRAILLE PATTERN DOTS-2457;So;0;ON;;;;;N;;;;; -285B;BRAILLE PATTERN DOTS-12457;So;0;ON;;;;;N;;;;; -285C;BRAILLE PATTERN DOTS-3457;So;0;ON;;;;;N;;;;; -285D;BRAILLE PATTERN DOTS-13457;So;0;ON;;;;;N;;;;; -285E;BRAILLE PATTERN DOTS-23457;So;0;ON;;;;;N;;;;; -285F;BRAILLE PATTERN DOTS-123457;So;0;ON;;;;;N;;;;; -2860;BRAILLE PATTERN DOTS-67;So;0;ON;;;;;N;;;;; -2861;BRAILLE PATTERN DOTS-167;So;0;ON;;;;;N;;;;; -2862;BRAILLE PATTERN DOTS-267;So;0;ON;;;;;N;;;;; -2863;BRAILLE PATTERN DOTS-1267;So;0;ON;;;;;N;;;;; -2864;BRAILLE PATTERN DOTS-367;So;0;ON;;;;;N;;;;; -2865;BRAILLE PATTERN DOTS-1367;So;0;ON;;;;;N;;;;; -2866;BRAILLE PATTERN DOTS-2367;So;0;ON;;;;;N;;;;; -2867;BRAILLE PATTERN DOTS-12367;So;0;ON;;;;;N;;;;; -2868;BRAILLE PATTERN DOTS-467;So;0;ON;;;;;N;;;;; -2869;BRAILLE PATTERN DOTS-1467;So;0;ON;;;;;N;;;;; -286A;BRAILLE PATTERN DOTS-2467;So;0;ON;;;;;N;;;;; -286B;BRAILLE PATTERN DOTS-12467;So;0;ON;;;;;N;;;;; -286C;BRAILLE PATTERN DOTS-3467;So;0;ON;;;;;N;;;;; -286D;BRAILLE PATTERN DOTS-13467;So;0;ON;;;;;N;;;;; -286E;BRAILLE PATTERN DOTS-23467;So;0;ON;;;;;N;;;;; -286F;BRAILLE PATTERN DOTS-123467;So;0;ON;;;;;N;;;;; -2870;BRAILLE PATTERN DOTS-567;So;0;ON;;;;;N;;;;; -2871;BRAILLE PATTERN DOTS-1567;So;0;ON;;;;;N;;;;; -2872;BRAILLE PATTERN DOTS-2567;So;0;ON;;;;;N;;;;; -2873;BRAILLE PATTERN DOTS-12567;So;0;ON;;;;;N;;;;; -2874;BRAILLE PATTERN DOTS-3567;So;0;ON;;;;;N;;;;; -2875;BRAILLE PATTERN DOTS-13567;So;0;ON;;;;;N;;;;; -2876;BRAILLE PATTERN DOTS-23567;So;0;ON;;;;;N;;;;; -2877;BRAILLE PATTERN DOTS-123567;So;0;ON;;;;;N;;;;; -2878;BRAILLE PATTERN DOTS-4567;So;0;ON;;;;;N;;;;; -2879;BRAILLE PATTERN DOTS-14567;So;0;ON;;;;;N;;;;; -287A;BRAILLE PATTERN DOTS-24567;So;0;ON;;;;;N;;;;; -287B;BRAILLE PATTERN DOTS-124567;So;0;ON;;;;;N;;;;; -287C;BRAILLE PATTERN DOTS-34567;So;0;ON;;;;;N;;;;; -287D;BRAILLE PATTERN DOTS-134567;So;0;ON;;;;;N;;;;; -287E;BRAILLE PATTERN DOTS-234567;So;0;ON;;;;;N;;;;; -287F;BRAILLE PATTERN DOTS-1234567;So;0;ON;;;;;N;;;;; -2880;BRAILLE PATTERN DOTS-8;So;0;ON;;;;;N;;;;; -2881;BRAILLE PATTERN DOTS-18;So;0;ON;;;;;N;;;;; -2882;BRAILLE PATTERN DOTS-28;So;0;ON;;;;;N;;;;; -2883;BRAILLE PATTERN DOTS-128;So;0;ON;;;;;N;;;;; -2884;BRAILLE PATTERN DOTS-38;So;0;ON;;;;;N;;;;; -2885;BRAILLE PATTERN DOTS-138;So;0;ON;;;;;N;;;;; -2886;BRAILLE PATTERN DOTS-238;So;0;ON;;;;;N;;;;; -2887;BRAILLE PATTERN DOTS-1238;So;0;ON;;;;;N;;;;; -2888;BRAILLE PATTERN DOTS-48;So;0;ON;;;;;N;;;;; -2889;BRAILLE PATTERN DOTS-148;So;0;ON;;;;;N;;;;; -288A;BRAILLE PATTERN DOTS-248;So;0;ON;;;;;N;;;;; -288B;BRAILLE PATTERN DOTS-1248;So;0;ON;;;;;N;;;;; -288C;BRAILLE PATTERN DOTS-348;So;0;ON;;;;;N;;;;; -288D;BRAILLE PATTERN DOTS-1348;So;0;ON;;;;;N;;;;; -288E;BRAILLE PATTERN DOTS-2348;So;0;ON;;;;;N;;;;; -288F;BRAILLE PATTERN DOTS-12348;So;0;ON;;;;;N;;;;; -2890;BRAILLE PATTERN DOTS-58;So;0;ON;;;;;N;;;;; -2891;BRAILLE PATTERN DOTS-158;So;0;ON;;;;;N;;;;; -2892;BRAILLE PATTERN DOTS-258;So;0;ON;;;;;N;;;;; -2893;BRAILLE PATTERN DOTS-1258;So;0;ON;;;;;N;;;;; -2894;BRAILLE PATTERN DOTS-358;So;0;ON;;;;;N;;;;; -2895;BRAILLE PATTERN DOTS-1358;So;0;ON;;;;;N;;;;; -2896;BRAILLE PATTERN DOTS-2358;So;0;ON;;;;;N;;;;; -2897;BRAILLE PATTERN DOTS-12358;So;0;ON;;;;;N;;;;; -2898;BRAILLE PATTERN DOTS-458;So;0;ON;;;;;N;;;;; -2899;BRAILLE PATTERN DOTS-1458;So;0;ON;;;;;N;;;;; -289A;BRAILLE PATTERN DOTS-2458;So;0;ON;;;;;N;;;;; -289B;BRAILLE PATTERN DOTS-12458;So;0;ON;;;;;N;;;;; -289C;BRAILLE PATTERN DOTS-3458;So;0;ON;;;;;N;;;;; -289D;BRAILLE PATTERN DOTS-13458;So;0;ON;;;;;N;;;;; -289E;BRAILLE PATTERN DOTS-23458;So;0;ON;;;;;N;;;;; -289F;BRAILLE PATTERN DOTS-123458;So;0;ON;;;;;N;;;;; -28A0;BRAILLE PATTERN DOTS-68;So;0;ON;;;;;N;;;;; -28A1;BRAILLE PATTERN DOTS-168;So;0;ON;;;;;N;;;;; -28A2;BRAILLE PATTERN DOTS-268;So;0;ON;;;;;N;;;;; -28A3;BRAILLE PATTERN DOTS-1268;So;0;ON;;;;;N;;;;; -28A4;BRAILLE PATTERN DOTS-368;So;0;ON;;;;;N;;;;; -28A5;BRAILLE PATTERN DOTS-1368;So;0;ON;;;;;N;;;;; -28A6;BRAILLE PATTERN DOTS-2368;So;0;ON;;;;;N;;;;; -28A7;BRAILLE PATTERN DOTS-12368;So;0;ON;;;;;N;;;;; -28A8;BRAILLE PATTERN DOTS-468;So;0;ON;;;;;N;;;;; -28A9;BRAILLE PATTERN DOTS-1468;So;0;ON;;;;;N;;;;; -28AA;BRAILLE PATTERN DOTS-2468;So;0;ON;;;;;N;;;;; -28AB;BRAILLE PATTERN DOTS-12468;So;0;ON;;;;;N;;;;; -28AC;BRAILLE PATTERN DOTS-3468;So;0;ON;;;;;N;;;;; -28AD;BRAILLE PATTERN DOTS-13468;So;0;ON;;;;;N;;;;; -28AE;BRAILLE PATTERN DOTS-23468;So;0;ON;;;;;N;;;;; -28AF;BRAILLE PATTERN DOTS-123468;So;0;ON;;;;;N;;;;; -28B0;BRAILLE PATTERN DOTS-568;So;0;ON;;;;;N;;;;; -28B1;BRAILLE PATTERN DOTS-1568;So;0;ON;;;;;N;;;;; -28B2;BRAILLE PATTERN DOTS-2568;So;0;ON;;;;;N;;;;; -28B3;BRAILLE PATTERN DOTS-12568;So;0;ON;;;;;N;;;;; -28B4;BRAILLE PATTERN DOTS-3568;So;0;ON;;;;;N;;;;; -28B5;BRAILLE PATTERN DOTS-13568;So;0;ON;;;;;N;;;;; -28B6;BRAILLE PATTERN DOTS-23568;So;0;ON;;;;;N;;;;; -28B7;BRAILLE PATTERN DOTS-123568;So;0;ON;;;;;N;;;;; -28B8;BRAILLE PATTERN DOTS-4568;So;0;ON;;;;;N;;;;; -28B9;BRAILLE PATTERN DOTS-14568;So;0;ON;;;;;N;;;;; -28BA;BRAILLE PATTERN DOTS-24568;So;0;ON;;;;;N;;;;; -28BB;BRAILLE PATTERN DOTS-124568;So;0;ON;;;;;N;;;;; -28BC;BRAILLE PATTERN DOTS-34568;So;0;ON;;;;;N;;;;; -28BD;BRAILLE PATTERN DOTS-134568;So;0;ON;;;;;N;;;;; -28BE;BRAILLE PATTERN DOTS-234568;So;0;ON;;;;;N;;;;; -28BF;BRAILLE PATTERN DOTS-1234568;So;0;ON;;;;;N;;;;; -28C0;BRAILLE PATTERN DOTS-78;So;0;ON;;;;;N;;;;; -28C1;BRAILLE PATTERN DOTS-178;So;0;ON;;;;;N;;;;; -28C2;BRAILLE PATTERN DOTS-278;So;0;ON;;;;;N;;;;; -28C3;BRAILLE PATTERN DOTS-1278;So;0;ON;;;;;N;;;;; -28C4;BRAILLE PATTERN DOTS-378;So;0;ON;;;;;N;;;;; -28C5;BRAILLE PATTERN DOTS-1378;So;0;ON;;;;;N;;;;; -28C6;BRAILLE PATTERN DOTS-2378;So;0;ON;;;;;N;;;;; -28C7;BRAILLE PATTERN DOTS-12378;So;0;ON;;;;;N;;;;; -28C8;BRAILLE PATTERN DOTS-478;So;0;ON;;;;;N;;;;; -28C9;BRAILLE PATTERN DOTS-1478;So;0;ON;;;;;N;;;;; -28CA;BRAILLE PATTERN DOTS-2478;So;0;ON;;;;;N;;;;; -28CB;BRAILLE PATTERN DOTS-12478;So;0;ON;;;;;N;;;;; -28CC;BRAILLE PATTERN DOTS-3478;So;0;ON;;;;;N;;;;; -28CD;BRAILLE PATTERN DOTS-13478;So;0;ON;;;;;N;;;;; -28CE;BRAILLE PATTERN DOTS-23478;So;0;ON;;;;;N;;;;; -28CF;BRAILLE PATTERN DOTS-123478;So;0;ON;;;;;N;;;;; -28D0;BRAILLE PATTERN DOTS-578;So;0;ON;;;;;N;;;;; -28D1;BRAILLE PATTERN DOTS-1578;So;0;ON;;;;;N;;;;; -28D2;BRAILLE PATTERN DOTS-2578;So;0;ON;;;;;N;;;;; -28D3;BRAILLE PATTERN DOTS-12578;So;0;ON;;;;;N;;;;; -28D4;BRAILLE PATTERN DOTS-3578;So;0;ON;;;;;N;;;;; -28D5;BRAILLE PATTERN DOTS-13578;So;0;ON;;;;;N;;;;; -28D6;BRAILLE PATTERN DOTS-23578;So;0;ON;;;;;N;;;;; -28D7;BRAILLE PATTERN DOTS-123578;So;0;ON;;;;;N;;;;; -28D8;BRAILLE PATTERN DOTS-4578;So;0;ON;;;;;N;;;;; -28D9;BRAILLE PATTERN DOTS-14578;So;0;ON;;;;;N;;;;; -28DA;BRAILLE PATTERN DOTS-24578;So;0;ON;;;;;N;;;;; -28DB;BRAILLE PATTERN DOTS-124578;So;0;ON;;;;;N;;;;; -28DC;BRAILLE PATTERN DOTS-34578;So;0;ON;;;;;N;;;;; -28DD;BRAILLE PATTERN DOTS-134578;So;0;ON;;;;;N;;;;; -28DE;BRAILLE PATTERN DOTS-234578;So;0;ON;;;;;N;;;;; -28DF;BRAILLE PATTERN DOTS-1234578;So;0;ON;;;;;N;;;;; -28E0;BRAILLE PATTERN DOTS-678;So;0;ON;;;;;N;;;;; -28E1;BRAILLE PATTERN DOTS-1678;So;0;ON;;;;;N;;;;; -28E2;BRAILLE PATTERN DOTS-2678;So;0;ON;;;;;N;;;;; -28E3;BRAILLE PATTERN DOTS-12678;So;0;ON;;;;;N;;;;; -28E4;BRAILLE PATTERN DOTS-3678;So;0;ON;;;;;N;;;;; -28E5;BRAILLE PATTERN DOTS-13678;So;0;ON;;;;;N;;;;; -28E6;BRAILLE PATTERN DOTS-23678;So;0;ON;;;;;N;;;;; -28E7;BRAILLE PATTERN DOTS-123678;So;0;ON;;;;;N;;;;; -28E8;BRAILLE PATTERN DOTS-4678;So;0;ON;;;;;N;;;;; -28E9;BRAILLE PATTERN DOTS-14678;So;0;ON;;;;;N;;;;; -28EA;BRAILLE PATTERN DOTS-24678;So;0;ON;;;;;N;;;;; -28EB;BRAILLE PATTERN DOTS-124678;So;0;ON;;;;;N;;;;; -28EC;BRAILLE PATTERN DOTS-34678;So;0;ON;;;;;N;;;;; -28ED;BRAILLE PATTERN DOTS-134678;So;0;ON;;;;;N;;;;; -28EE;BRAILLE PATTERN DOTS-234678;So;0;ON;;;;;N;;;;; -28EF;BRAILLE PATTERN DOTS-1234678;So;0;ON;;;;;N;;;;; -28F0;BRAILLE PATTERN DOTS-5678;So;0;ON;;;;;N;;;;; -28F1;BRAILLE PATTERN DOTS-15678;So;0;ON;;;;;N;;;;; -28F2;BRAILLE PATTERN DOTS-25678;So;0;ON;;;;;N;;;;; -28F3;BRAILLE PATTERN DOTS-125678;So;0;ON;;;;;N;;;;; -28F4;BRAILLE PATTERN DOTS-35678;So;0;ON;;;;;N;;;;; -28F5;BRAILLE PATTERN DOTS-135678;So;0;ON;;;;;N;;;;; -28F6;BRAILLE PATTERN DOTS-235678;So;0;ON;;;;;N;;;;; -28F7;BRAILLE PATTERN DOTS-1235678;So;0;ON;;;;;N;;;;; -28F8;BRAILLE PATTERN DOTS-45678;So;0;ON;;;;;N;;;;; -28F9;BRAILLE PATTERN DOTS-145678;So;0;ON;;;;;N;;;;; -28FA;BRAILLE PATTERN DOTS-245678;So;0;ON;;;;;N;;;;; -28FB;BRAILLE PATTERN DOTS-1245678;So;0;ON;;;;;N;;;;; -28FC;BRAILLE PATTERN DOTS-345678;So;0;ON;;;;;N;;;;; -28FD;BRAILLE PATTERN DOTS-1345678;So;0;ON;;;;;N;;;;; -28FE;BRAILLE PATTERN DOTS-2345678;So;0;ON;;;;;N;;;;; -28FF;BRAILLE PATTERN DOTS-12345678;So;0;ON;;;;;N;;;;; -2E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;; -2E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;; -2E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;; -2E83;CJK RADICAL SECOND TWO;So;0;ON;;;;;N;;;;; -2E84;CJK RADICAL SECOND THREE;So;0;ON;;;;;N;;;;; -2E85;CJK RADICAL PERSON;So;0;ON;;;;;N;;;;; -2E86;CJK RADICAL BOX;So;0;ON;;;;;N;;;;; -2E87;CJK RADICAL TABLE;So;0;ON;;;;;N;;;;; -2E88;CJK RADICAL KNIFE ONE;So;0;ON;;;;;N;;;;; -2E89;CJK RADICAL KNIFE TWO;So;0;ON;;;;;N;;;;; -2E8A;CJK RADICAL DIVINATION;So;0;ON;;;;;N;;;;; -2E8B;CJK RADICAL SEAL;So;0;ON;;;;;N;;;;; -2E8C;CJK RADICAL SMALL ONE;So;0;ON;;;;;N;;;;; -2E8D;CJK RADICAL SMALL TWO;So;0;ON;;;;;N;;;;; -2E8E;CJK RADICAL LAME ONE;So;0;ON;;;;;N;;;;; -2E8F;CJK RADICAL LAME TWO;So;0;ON;;;;;N;;;;; -2E90;CJK RADICAL LAME THREE;So;0;ON;;;;;N;;;;; -2E91;CJK RADICAL LAME FOUR;So;0;ON;;;;;N;;;;; -2E92;CJK RADICAL SNAKE;So;0;ON;;;;;N;;;;; -2E93;CJK RADICAL THREAD;So;0;ON;;;;;N;;;;; -2E94;CJK RADICAL SNOUT ONE;So;0;ON;;;;;N;;;;; -2E95;CJK RADICAL SNOUT TWO;So;0;ON;;;;;N;;;;; -2E96;CJK RADICAL HEART ONE;So;0;ON;;;;;N;;;;; -2E97;CJK RADICAL HEART TWO;So;0;ON;;;;;N;;;;; -2E98;CJK RADICAL HAND;So;0;ON;;;;;N;;;;; -2E99;CJK RADICAL RAP;So;0;ON;;;;;N;;;;; -2E9B;CJK RADICAL CHOKE;So;0;ON;;;;;N;;;;; -2E9C;CJK RADICAL SUN;So;0;ON;;;;;N;;;;; -2E9D;CJK RADICAL MOON;So;0;ON;;;;;N;;;;; -2E9E;CJK RADICAL DEATH;So;0;ON;;;;;N;;;;; -2E9F;CJK RADICAL MOTHER;So;0;ON;<compat> 6BCD;;;;N;;;;; -2EA0;CJK RADICAL CIVILIAN;So;0;ON;;;;;N;;;;; -2EA1;CJK RADICAL WATER ONE;So;0;ON;;;;;N;;;;; -2EA2;CJK RADICAL WATER TWO;So;0;ON;;;;;N;;;;; -2EA3;CJK RADICAL FIRE;So;0;ON;;;;;N;;;;; -2EA4;CJK RADICAL PAW ONE;So;0;ON;;;;;N;;;;; -2EA5;CJK RADICAL PAW TWO;So;0;ON;;;;;N;;;;; -2EA6;CJK RADICAL SIMPLIFIED HALF TREE TRUNK;So;0;ON;;;;;N;;;;; -2EA7;CJK RADICAL COW;So;0;ON;;;;;N;;;;; -2EA8;CJK RADICAL DOG;So;0;ON;;;;;N;;;;; -2EA9;CJK RADICAL JADE;So;0;ON;;;;;N;;;;; -2EAA;CJK RADICAL BOLT OF CLOTH;So;0;ON;;;;;N;;;;; -2EAB;CJK RADICAL EYE;So;0;ON;;;;;N;;;;; -2EAC;CJK RADICAL SPIRIT ONE;So;0;ON;;;;;N;;;;; -2EAD;CJK RADICAL SPIRIT TWO;So;0;ON;;;;;N;;;;; -2EAE;CJK RADICAL BAMBOO;So;0;ON;;;;;N;;;;; -2EAF;CJK RADICAL SILK;So;0;ON;;;;;N;;;;; -2EB0;CJK RADICAL C-SIMPLIFIED SILK;So;0;ON;;;;;N;;;;; -2EB1;CJK RADICAL NET ONE;So;0;ON;;;;;N;;;;; -2EB2;CJK RADICAL NET TWO;So;0;ON;;;;;N;;;;; -2EB3;CJK RADICAL NET THREE;So;0;ON;;;;;N;;;;; -2EB4;CJK RADICAL NET FOUR;So;0;ON;;;;;N;;;;; -2EB5;CJK RADICAL MESH;So;0;ON;;;;;N;;;;; -2EB6;CJK RADICAL SHEEP;So;0;ON;;;;;N;;;;; -2EB7;CJK RADICAL RAM;So;0;ON;;;;;N;;;;; -2EB8;CJK RADICAL EWE;So;0;ON;;;;;N;;;;; -2EB9;CJK RADICAL OLD;So;0;ON;;;;;N;;;;; -2EBA;CJK RADICAL BRUSH ONE;So;0;ON;;;;;N;;;;; -2EBB;CJK RADICAL BRUSH TWO;So;0;ON;;;;;N;;;;; -2EBC;CJK RADICAL MEAT;So;0;ON;;;;;N;;;;; -2EBD;CJK RADICAL MORTAR;So;0;ON;;;;;N;;;;; -2EBE;CJK RADICAL GRASS ONE;So;0;ON;;;;;N;;;;; -2EBF;CJK RADICAL GRASS TWO;So;0;ON;;;;;N;;;;; -2EC0;CJK RADICAL GRASS THREE;So;0;ON;;;;;N;;;;; -2EC1;CJK RADICAL TIGER;So;0;ON;;;;;N;;;;; -2EC2;CJK RADICAL CLOTHES;So;0;ON;;;;;N;;;;; -2EC3;CJK RADICAL WEST ONE;So;0;ON;;;;;N;;;;; -2EC4;CJK RADICAL WEST TWO;So;0;ON;;;;;N;;;;; -2EC5;CJK RADICAL C-SIMPLIFIED SEE;So;0;ON;;;;;N;;;;; -2EC6;CJK RADICAL SIMPLIFIED HORN;So;0;ON;;;;;N;;;;; -2EC7;CJK RADICAL HORN;So;0;ON;;;;;N;;;;; -2EC8;CJK RADICAL C-SIMPLIFIED SPEECH;So;0;ON;;;;;N;;;;; -2EC9;CJK RADICAL C-SIMPLIFIED SHELL;So;0;ON;;;;;N;;;;; -2ECA;CJK RADICAL FOOT;So;0;ON;;;;;N;;;;; -2ECB;CJK RADICAL C-SIMPLIFIED CART;So;0;ON;;;;;N;;;;; -2ECC;CJK RADICAL SIMPLIFIED WALK;So;0;ON;;;;;N;;;;; -2ECD;CJK RADICAL WALK ONE;So;0;ON;;;;;N;;;;; -2ECE;CJK RADICAL WALK TWO;So;0;ON;;;;;N;;;;; -2ECF;CJK RADICAL CITY;So;0;ON;;;;;N;;;;; -2ED0;CJK RADICAL C-SIMPLIFIED GOLD;So;0;ON;;;;;N;;;;; -2ED1;CJK RADICAL LONG ONE;So;0;ON;;;;;N;;;;; -2ED2;CJK RADICAL LONG TWO;So;0;ON;;;;;N;;;;; -2ED3;CJK RADICAL C-SIMPLIFIED LONG;So;0;ON;;;;;N;;;;; -2ED4;CJK RADICAL C-SIMPLIFIED GATE;So;0;ON;;;;;N;;;;; -2ED5;CJK RADICAL MOUND ONE;So;0;ON;;;;;N;;;;; -2ED6;CJK RADICAL MOUND TWO;So;0;ON;;;;;N;;;;; -2ED7;CJK RADICAL RAIN;So;0;ON;;;;;N;;;;; -2ED8;CJK RADICAL BLUE;So;0;ON;;;;;N;;;;; -2ED9;CJK RADICAL C-SIMPLIFIED TANNED LEATHER;So;0;ON;;;;;N;;;;; -2EDA;CJK RADICAL C-SIMPLIFIED LEAF;So;0;ON;;;;;N;;;;; -2EDB;CJK RADICAL C-SIMPLIFIED WIND;So;0;ON;;;;;N;;;;; -2EDC;CJK RADICAL C-SIMPLIFIED FLY;So;0;ON;;;;;N;;;;; -2EDD;CJK RADICAL EAT ONE;So;0;ON;;;;;N;;;;; -2EDE;CJK RADICAL EAT TWO;So;0;ON;;;;;N;;;;; -2EDF;CJK RADICAL EAT THREE;So;0;ON;;;;;N;;;;; -2EE0;CJK RADICAL C-SIMPLIFIED EAT;So;0;ON;;;;;N;;;;; -2EE1;CJK RADICAL HEAD;So;0;ON;;;;;N;;;;; -2EE2;CJK RADICAL C-SIMPLIFIED HORSE;So;0;ON;;;;;N;;;;; -2EE3;CJK RADICAL BONE;So;0;ON;;;;;N;;;;; -2EE4;CJK RADICAL GHOST;So;0;ON;;;;;N;;;;; -2EE5;CJK RADICAL C-SIMPLIFIED FISH;So;0;ON;;;;;N;;;;; -2EE6;CJK RADICAL C-SIMPLIFIED BIRD;So;0;ON;;;;;N;;;;; -2EE7;CJK RADICAL C-SIMPLIFIED SALT;So;0;ON;;;;;N;;;;; -2EE8;CJK RADICAL SIMPLIFIED WHEAT;So;0;ON;;;;;N;;;;; -2EE9;CJK RADICAL SIMPLIFIED YELLOW;So;0;ON;;;;;N;;;;; -2EEA;CJK RADICAL C-SIMPLIFIED FROG;So;0;ON;;;;;N;;;;; -2EEB;CJK RADICAL J-SIMPLIFIED EVEN;So;0;ON;;;;;N;;;;; -2EEC;CJK RADICAL C-SIMPLIFIED EVEN;So;0;ON;;;;;N;;;;; -2EED;CJK RADICAL J-SIMPLIFIED TOOTH;So;0;ON;;;;;N;;;;; -2EEE;CJK RADICAL C-SIMPLIFIED TOOTH;So;0;ON;;;;;N;;;;; -2EEF;CJK RADICAL J-SIMPLIFIED DRAGON;So;0;ON;;;;;N;;;;; -2EF0;CJK RADICAL C-SIMPLIFIED DRAGON;So;0;ON;;;;;N;;;;; -2EF1;CJK RADICAL TURTLE;So;0;ON;;;;;N;;;;; -2EF2;CJK RADICAL J-SIMPLIFIED TURTLE;So;0;ON;;;;;N;;;;; -2EF3;CJK RADICAL C-SIMPLIFIED TURTLE;So;0;ON;<compat> 9F9F;;;;N;;;;; -2F00;KANGXI RADICAL ONE;So;0;ON;<compat> 4E00;;;;N;;;;; -2F01;KANGXI RADICAL LINE;So;0;ON;<compat> 4E28;;;;N;;;;; -2F02;KANGXI RADICAL DOT;So;0;ON;<compat> 4E36;;;;N;;;;; -2F03;KANGXI RADICAL SLASH;So;0;ON;<compat> 4E3F;;;;N;;;;; -2F04;KANGXI RADICAL SECOND;So;0;ON;<compat> 4E59;;;;N;;;;; -2F05;KANGXI RADICAL HOOK;So;0;ON;<compat> 4E85;;;;N;;;;; -2F06;KANGXI RADICAL TWO;So;0;ON;<compat> 4E8C;;;;N;;;;; -2F07;KANGXI RADICAL LID;So;0;ON;<compat> 4EA0;;;;N;;;;; -2F08;KANGXI RADICAL MAN;So;0;ON;<compat> 4EBA;;;;N;;;;; -2F09;KANGXI RADICAL LEGS;So;0;ON;<compat> 513F;;;;N;;;;; -2F0A;KANGXI RADICAL ENTER;So;0;ON;<compat> 5165;;;;N;;;;; -2F0B;KANGXI RADICAL EIGHT;So;0;ON;<compat> 516B;;;;N;;;;; -2F0C;KANGXI RADICAL DOWN BOX;So;0;ON;<compat> 5182;;;;N;;;;; -2F0D;KANGXI RADICAL COVER;So;0;ON;<compat> 5196;;;;N;;;;; -2F0E;KANGXI RADICAL ICE;So;0;ON;<compat> 51AB;;;;N;;;;; -2F0F;KANGXI RADICAL TABLE;So;0;ON;<compat> 51E0;;;;N;;;;; -2F10;KANGXI RADICAL OPEN BOX;So;0;ON;<compat> 51F5;;;;N;;;;; -2F11;KANGXI RADICAL KNIFE;So;0;ON;<compat> 5200;;;;N;;;;; -2F12;KANGXI RADICAL POWER;So;0;ON;<compat> 529B;;;;N;;;;; -2F13;KANGXI RADICAL WRAP;So;0;ON;<compat> 52F9;;;;N;;;;; -2F14;KANGXI RADICAL SPOON;So;0;ON;<compat> 5315;;;;N;;;;; -2F15;KANGXI RADICAL RIGHT OPEN BOX;So;0;ON;<compat> 531A;;;;N;;;;; -2F16;KANGXI RADICAL HIDING ENCLOSURE;So;0;ON;<compat> 5338;;;;N;;;;; -2F17;KANGXI RADICAL TEN;So;0;ON;<compat> 5341;;;;N;;;;; -2F18;KANGXI RADICAL DIVINATION;So;0;ON;<compat> 535C;;;;N;;;;; -2F19;KANGXI RADICAL SEAL;So;0;ON;<compat> 5369;;;;N;;;;; -2F1A;KANGXI RADICAL CLIFF;So;0;ON;<compat> 5382;;;;N;;;;; -2F1B;KANGXI RADICAL PRIVATE;So;0;ON;<compat> 53B6;;;;N;;;;; -2F1C;KANGXI RADICAL AGAIN;So;0;ON;<compat> 53C8;;;;N;;;;; -2F1D;KANGXI RADICAL MOUTH;So;0;ON;<compat> 53E3;;;;N;;;;; -2F1E;KANGXI RADICAL ENCLOSURE;So;0;ON;<compat> 56D7;;;;N;;;;; -2F1F;KANGXI RADICAL EARTH;So;0;ON;<compat> 571F;;;;N;;;;; -2F20;KANGXI RADICAL SCHOLAR;So;0;ON;<compat> 58EB;;;;N;;;;; -2F21;KANGXI RADICAL GO;So;0;ON;<compat> 5902;;;;N;;;;; -2F22;KANGXI RADICAL GO SLOWLY;So;0;ON;<compat> 590A;;;;N;;;;; -2F23;KANGXI RADICAL EVENING;So;0;ON;<compat> 5915;;;;N;;;;; -2F24;KANGXI RADICAL BIG;So;0;ON;<compat> 5927;;;;N;;;;; -2F25;KANGXI RADICAL WOMAN;So;0;ON;<compat> 5973;;;;N;;;;; -2F26;KANGXI RADICAL CHILD;So;0;ON;<compat> 5B50;;;;N;;;;; -2F27;KANGXI RADICAL ROOF;So;0;ON;<compat> 5B80;;;;N;;;;; -2F28;KANGXI RADICAL INCH;So;0;ON;<compat> 5BF8;;;;N;;;;; -2F29;KANGXI RADICAL SMALL;So;0;ON;<compat> 5C0F;;;;N;;;;; -2F2A;KANGXI RADICAL LAME;So;0;ON;<compat> 5C22;;;;N;;;;; -2F2B;KANGXI RADICAL CORPSE;So;0;ON;<compat> 5C38;;;;N;;;;; -2F2C;KANGXI RADICAL SPROUT;So;0;ON;<compat> 5C6E;;;;N;;;;; -2F2D;KANGXI RADICAL MOUNTAIN;So;0;ON;<compat> 5C71;;;;N;;;;; -2F2E;KANGXI RADICAL RIVER;So;0;ON;<compat> 5DDB;;;;N;;;;; -2F2F;KANGXI RADICAL WORK;So;0;ON;<compat> 5DE5;;;;N;;;;; -2F30;KANGXI RADICAL ONESELF;So;0;ON;<compat> 5DF1;;;;N;;;;; -2F31;KANGXI RADICAL TURBAN;So;0;ON;<compat> 5DFE;;;;N;;;;; -2F32;KANGXI RADICAL DRY;So;0;ON;<compat> 5E72;;;;N;;;;; -2F33;KANGXI RADICAL SHORT THREAD;So;0;ON;<compat> 5E7A;;;;N;;;;; -2F34;KANGXI RADICAL DOTTED CLIFF;So;0;ON;<compat> 5E7F;;;;N;;;;; -2F35;KANGXI RADICAL LONG STRIDE;So;0;ON;<compat> 5EF4;;;;N;;;;; -2F36;KANGXI RADICAL TWO HANDS;So;0;ON;<compat> 5EFE;;;;N;;;;; -2F37;KANGXI RADICAL SHOOT;So;0;ON;<compat> 5F0B;;;;N;;;;; -2F38;KANGXI RADICAL BOW;So;0;ON;<compat> 5F13;;;;N;;;;; -2F39;KANGXI RADICAL SNOUT;So;0;ON;<compat> 5F50;;;;N;;;;; -2F3A;KANGXI RADICAL BRISTLE;So;0;ON;<compat> 5F61;;;;N;;;;; -2F3B;KANGXI RADICAL STEP;So;0;ON;<compat> 5F73;;;;N;;;;; -2F3C;KANGXI RADICAL HEART;So;0;ON;<compat> 5FC3;;;;N;;;;; -2F3D;KANGXI RADICAL HALBERD;So;0;ON;<compat> 6208;;;;N;;;;; -2F3E;KANGXI RADICAL DOOR;So;0;ON;<compat> 6236;;;;N;;;;; -2F3F;KANGXI RADICAL HAND;So;0;ON;<compat> 624B;;;;N;;;;; -2F40;KANGXI RADICAL BRANCH;So;0;ON;<compat> 652F;;;;N;;;;; -2F41;KANGXI RADICAL RAP;So;0;ON;<compat> 6534;;;;N;;;;; -2F42;KANGXI RADICAL SCRIPT;So;0;ON;<compat> 6587;;;;N;;;;; -2F43;KANGXI RADICAL DIPPER;So;0;ON;<compat> 6597;;;;N;;;;; -2F44;KANGXI RADICAL AXE;So;0;ON;<compat> 65A4;;;;N;;;;; -2F45;KANGXI RADICAL SQUARE;So;0;ON;<compat> 65B9;;;;N;;;;; -2F46;KANGXI RADICAL NOT;So;0;ON;<compat> 65E0;;;;N;;;;; -2F47;KANGXI RADICAL SUN;So;0;ON;<compat> 65E5;;;;N;;;;; -2F48;KANGXI RADICAL SAY;So;0;ON;<compat> 66F0;;;;N;;;;; -2F49;KANGXI RADICAL MOON;So;0;ON;<compat> 6708;;;;N;;;;; -2F4A;KANGXI RADICAL TREE;So;0;ON;<compat> 6728;;;;N;;;;; -2F4B;KANGXI RADICAL LACK;So;0;ON;<compat> 6B20;;;;N;;;;; -2F4C;KANGXI RADICAL STOP;So;0;ON;<compat> 6B62;;;;N;;;;; -2F4D;KANGXI RADICAL DEATH;So;0;ON;<compat> 6B79;;;;N;;;;; -2F4E;KANGXI RADICAL WEAPON;So;0;ON;<compat> 6BB3;;;;N;;;;; -2F4F;KANGXI RADICAL DO NOT;So;0;ON;<compat> 6BCB;;;;N;;;;; -2F50;KANGXI RADICAL COMPARE;So;0;ON;<compat> 6BD4;;;;N;;;;; -2F51;KANGXI RADICAL FUR;So;0;ON;<compat> 6BDB;;;;N;;;;; -2F52;KANGXI RADICAL CLAN;So;0;ON;<compat> 6C0F;;;;N;;;;; -2F53;KANGXI RADICAL STEAM;So;0;ON;<compat> 6C14;;;;N;;;;; -2F54;KANGXI RADICAL WATER;So;0;ON;<compat> 6C34;;;;N;;;;; -2F55;KANGXI RADICAL FIRE;So;0;ON;<compat> 706B;;;;N;;;;; -2F56;KANGXI RADICAL CLAW;So;0;ON;<compat> 722A;;;;N;;;;; -2F57;KANGXI RADICAL FATHER;So;0;ON;<compat> 7236;;;;N;;;;; -2F58;KANGXI RADICAL DOUBLE X;So;0;ON;<compat> 723B;;;;N;;;;; -2F59;KANGXI RADICAL HALF TREE TRUNK;So;0;ON;<compat> 723F;;;;N;;;;; -2F5A;KANGXI RADICAL SLICE;So;0;ON;<compat> 7247;;;;N;;;;; -2F5B;KANGXI RADICAL FANG;So;0;ON;<compat> 7259;;;;N;;;;; -2F5C;KANGXI RADICAL COW;So;0;ON;<compat> 725B;;;;N;;;;; -2F5D;KANGXI RADICAL DOG;So;0;ON;<compat> 72AC;;;;N;;;;; -2F5E;KANGXI RADICAL PROFOUND;So;0;ON;<compat> 7384;;;;N;;;;; -2F5F;KANGXI RADICAL JADE;So;0;ON;<compat> 7389;;;;N;;;;; -2F60;KANGXI RADICAL MELON;So;0;ON;<compat> 74DC;;;;N;;;;; -2F61;KANGXI RADICAL TILE;So;0;ON;<compat> 74E6;;;;N;;;;; -2F62;KANGXI RADICAL SWEET;So;0;ON;<compat> 7518;;;;N;;;;; -2F63;KANGXI RADICAL LIFE;So;0;ON;<compat> 751F;;;;N;;;;; -2F64;KANGXI RADICAL USE;So;0;ON;<compat> 7528;;;;N;;;;; -2F65;KANGXI RADICAL FIELD;So;0;ON;<compat> 7530;;;;N;;;;; -2F66;KANGXI RADICAL BOLT OF CLOTH;So;0;ON;<compat> 758B;;;;N;;;;; -2F67;KANGXI RADICAL SICKNESS;So;0;ON;<compat> 7592;;;;N;;;;; -2F68;KANGXI RADICAL DOTTED TENT;So;0;ON;<compat> 7676;;;;N;;;;; -2F69;KANGXI RADICAL WHITE;So;0;ON;<compat> 767D;;;;N;;;;; -2F6A;KANGXI RADICAL SKIN;So;0;ON;<compat> 76AE;;;;N;;;;; -2F6B;KANGXI RADICAL DISH;So;0;ON;<compat> 76BF;;;;N;;;;; -2F6C;KANGXI RADICAL EYE;So;0;ON;<compat> 76EE;;;;N;;;;; -2F6D;KANGXI RADICAL SPEAR;So;0;ON;<compat> 77DB;;;;N;;;;; -2F6E;KANGXI RADICAL ARROW;So;0;ON;<compat> 77E2;;;;N;;;;; -2F6F;KANGXI RADICAL STONE;So;0;ON;<compat> 77F3;;;;N;;;;; -2F70;KANGXI RADICAL SPIRIT;So;0;ON;<compat> 793A;;;;N;;;;; -2F71;KANGXI RADICAL TRACK;So;0;ON;<compat> 79B8;;;;N;;;;; -2F72;KANGXI RADICAL GRAIN;So;0;ON;<compat> 79BE;;;;N;;;;; -2F73;KANGXI RADICAL CAVE;So;0;ON;<compat> 7A74;;;;N;;;;; -2F74;KANGXI RADICAL STAND;So;0;ON;<compat> 7ACB;;;;N;;;;; -2F75;KANGXI RADICAL BAMBOO;So;0;ON;<compat> 7AF9;;;;N;;;;; -2F76;KANGXI RADICAL RICE;So;0;ON;<compat> 7C73;;;;N;;;;; -2F77;KANGXI RADICAL SILK;So;0;ON;<compat> 7CF8;;;;N;;;;; -2F78;KANGXI RADICAL JAR;So;0;ON;<compat> 7F36;;;;N;;;;; -2F79;KANGXI RADICAL NET;So;0;ON;<compat> 7F51;;;;N;;;;; -2F7A;KANGXI RADICAL SHEEP;So;0;ON;<compat> 7F8A;;;;N;;;;; -2F7B;KANGXI RADICAL FEATHER;So;0;ON;<compat> 7FBD;;;;N;;;;; -2F7C;KANGXI RADICAL OLD;So;0;ON;<compat> 8001;;;;N;;;;; -2F7D;KANGXI RADICAL AND;So;0;ON;<compat> 800C;;;;N;;;;; -2F7E;KANGXI RADICAL PLOW;So;0;ON;<compat> 8012;;;;N;;;;; -2F7F;KANGXI RADICAL EAR;So;0;ON;<compat> 8033;;;;N;;;;; -2F80;KANGXI RADICAL BRUSH;So;0;ON;<compat> 807F;;;;N;;;;; -2F81;KANGXI RADICAL MEAT;So;0;ON;<compat> 8089;;;;N;;;;; -2F82;KANGXI RADICAL MINISTER;So;0;ON;<compat> 81E3;;;;N;;;;; -2F83;KANGXI RADICAL SELF;So;0;ON;<compat> 81EA;;;;N;;;;; -2F84;KANGXI RADICAL ARRIVE;So;0;ON;<compat> 81F3;;;;N;;;;; -2F85;KANGXI RADICAL MORTAR;So;0;ON;<compat> 81FC;;;;N;;;;; -2F86;KANGXI RADICAL TONGUE;So;0;ON;<compat> 820C;;;;N;;;;; -2F87;KANGXI RADICAL OPPOSE;So;0;ON;<compat> 821B;;;;N;;;;; -2F88;KANGXI RADICAL BOAT;So;0;ON;<compat> 821F;;;;N;;;;; -2F89;KANGXI RADICAL STOPPING;So;0;ON;<compat> 826E;;;;N;;;;; -2F8A;KANGXI RADICAL COLOR;So;0;ON;<compat> 8272;;;;N;;;;; -2F8B;KANGXI RADICAL GRASS;So;0;ON;<compat> 8278;;;;N;;;;; -2F8C;KANGXI RADICAL TIGER;So;0;ON;<compat> 864D;;;;N;;;;; -2F8D;KANGXI RADICAL INSECT;So;0;ON;<compat> 866B;;;;N;;;;; -2F8E;KANGXI RADICAL BLOOD;So;0;ON;<compat> 8840;;;;N;;;;; -2F8F;KANGXI RADICAL WALK ENCLOSURE;So;0;ON;<compat> 884C;;;;N;;;;; -2F90;KANGXI RADICAL CLOTHES;So;0;ON;<compat> 8863;;;;N;;;;; -2F91;KANGXI RADICAL WEST;So;0;ON;<compat> 897E;;;;N;;;;; -2F92;KANGXI RADICAL SEE;So;0;ON;<compat> 898B;;;;N;;;;; -2F93;KANGXI RADICAL HORN;So;0;ON;<compat> 89D2;;;;N;;;;; -2F94;KANGXI RADICAL SPEECH;So;0;ON;<compat> 8A00;;;;N;;;;; -2F95;KANGXI RADICAL VALLEY;So;0;ON;<compat> 8C37;;;;N;;;;; -2F96;KANGXI RADICAL BEAN;So;0;ON;<compat> 8C46;;;;N;;;;; -2F97;KANGXI RADICAL PIG;So;0;ON;<compat> 8C55;;;;N;;;;; -2F98;KANGXI RADICAL BADGER;So;0;ON;<compat> 8C78;;;;N;;;;; -2F99;KANGXI RADICAL SHELL;So;0;ON;<compat> 8C9D;;;;N;;;;; -2F9A;KANGXI RADICAL RED;So;0;ON;<compat> 8D64;;;;N;;;;; -2F9B;KANGXI RADICAL RUN;So;0;ON;<compat> 8D70;;;;N;;;;; -2F9C;KANGXI RADICAL FOOT;So;0;ON;<compat> 8DB3;;;;N;;;;; -2F9D;KANGXI RADICAL BODY;So;0;ON;<compat> 8EAB;;;;N;;;;; -2F9E;KANGXI RADICAL CART;So;0;ON;<compat> 8ECA;;;;N;;;;; -2F9F;KANGXI RADICAL BITTER;So;0;ON;<compat> 8F9B;;;;N;;;;; -2FA0;KANGXI RADICAL MORNING;So;0;ON;<compat> 8FB0;;;;N;;;;; -2FA1;KANGXI RADICAL WALK;So;0;ON;<compat> 8FB5;;;;N;;;;; -2FA2;KANGXI RADICAL CITY;So;0;ON;<compat> 9091;;;;N;;;;; -2FA3;KANGXI RADICAL WINE;So;0;ON;<compat> 9149;;;;N;;;;; -2FA4;KANGXI RADICAL DISTINGUISH;So;0;ON;<compat> 91C6;;;;N;;;;; -2FA5;KANGXI RADICAL VILLAGE;So;0;ON;<compat> 91CC;;;;N;;;;; -2FA6;KANGXI RADICAL GOLD;So;0;ON;<compat> 91D1;;;;N;;;;; -2FA7;KANGXI RADICAL LONG;So;0;ON;<compat> 9577;;;;N;;;;; -2FA8;KANGXI RADICAL GATE;So;0;ON;<compat> 9580;;;;N;;;;; -2FA9;KANGXI RADICAL MOUND;So;0;ON;<compat> 961C;;;;N;;;;; -2FAA;KANGXI RADICAL SLAVE;So;0;ON;<compat> 96B6;;;;N;;;;; -2FAB;KANGXI RADICAL SHORT TAILED BIRD;So;0;ON;<compat> 96B9;;;;N;;;;; -2FAC;KANGXI RADICAL RAIN;So;0;ON;<compat> 96E8;;;;N;;;;; -2FAD;KANGXI RADICAL BLUE;So;0;ON;<compat> 9751;;;;N;;;;; -2FAE;KANGXI RADICAL WRONG;So;0;ON;<compat> 975E;;;;N;;;;; -2FAF;KANGXI RADICAL FACE;So;0;ON;<compat> 9762;;;;N;;;;; -2FB0;KANGXI RADICAL LEATHER;So;0;ON;<compat> 9769;;;;N;;;;; -2FB1;KANGXI RADICAL TANNED LEATHER;So;0;ON;<compat> 97CB;;;;N;;;;; -2FB2;KANGXI RADICAL LEEK;So;0;ON;<compat> 97ED;;;;N;;;;; -2FB3;KANGXI RADICAL SOUND;So;0;ON;<compat> 97F3;;;;N;;;;; -2FB4;KANGXI RADICAL LEAF;So;0;ON;<compat> 9801;;;;N;;;;; -2FB5;KANGXI RADICAL WIND;So;0;ON;<compat> 98A8;;;;N;;;;; -2FB6;KANGXI RADICAL FLY;So;0;ON;<compat> 98DB;;;;N;;;;; -2FB7;KANGXI RADICAL EAT;So;0;ON;<compat> 98DF;;;;N;;;;; -2FB8;KANGXI RADICAL HEAD;So;0;ON;<compat> 9996;;;;N;;;;; -2FB9;KANGXI RADICAL FRAGRANT;So;0;ON;<compat> 9999;;;;N;;;;; -2FBA;KANGXI RADICAL HORSE;So;0;ON;<compat> 99AC;;;;N;;;;; -2FBB;KANGXI RADICAL BONE;So;0;ON;<compat> 9AA8;;;;N;;;;; -2FBC;KANGXI RADICAL TALL;So;0;ON;<compat> 9AD8;;;;N;;;;; -2FBD;KANGXI RADICAL HAIR;So;0;ON;<compat> 9ADF;;;;N;;;;; -2FBE;KANGXI RADICAL FIGHT;So;0;ON;<compat> 9B25;;;;N;;;;; -2FBF;KANGXI RADICAL SACRIFICIAL WINE;So;0;ON;<compat> 9B2F;;;;N;;;;; -2FC0;KANGXI RADICAL CAULDRON;So;0;ON;<compat> 9B32;;;;N;;;;; -2FC1;KANGXI RADICAL GHOST;So;0;ON;<compat> 9B3C;;;;N;;;;; -2FC2;KANGXI RADICAL FISH;So;0;ON;<compat> 9B5A;;;;N;;;;; -2FC3;KANGXI RADICAL BIRD;So;0;ON;<compat> 9CE5;;;;N;;;;; -2FC4;KANGXI RADICAL SALT;So;0;ON;<compat> 9E75;;;;N;;;;; -2FC5;KANGXI RADICAL DEER;So;0;ON;<compat> 9E7F;;;;N;;;;; -2FC6;KANGXI RADICAL WHEAT;So;0;ON;<compat> 9EA5;;;;N;;;;; -2FC7;KANGXI RADICAL HEMP;So;0;ON;<compat> 9EBB;;;;N;;;;; -2FC8;KANGXI RADICAL YELLOW;So;0;ON;<compat> 9EC3;;;;N;;;;; -2FC9;KANGXI RADICAL MILLET;So;0;ON;<compat> 9ECD;;;;N;;;;; -2FCA;KANGXI RADICAL BLACK;So;0;ON;<compat> 9ED1;;;;N;;;;; -2FCB;KANGXI RADICAL EMBROIDERY;So;0;ON;<compat> 9EF9;;;;N;;;;; -2FCC;KANGXI RADICAL FROG;So;0;ON;<compat> 9EFD;;;;N;;;;; -2FCD;KANGXI RADICAL TRIPOD;So;0;ON;<compat> 9F0E;;;;N;;;;; -2FCE;KANGXI RADICAL DRUM;So;0;ON;<compat> 9F13;;;;N;;;;; -2FCF;KANGXI RADICAL RAT;So;0;ON;<compat> 9F20;;;;N;;;;; -2FD0;KANGXI RADICAL NOSE;So;0;ON;<compat> 9F3B;;;;N;;;;; -2FD1;KANGXI RADICAL EVEN;So;0;ON;<compat> 9F4A;;;;N;;;;; -2FD2;KANGXI RADICAL TOOTH;So;0;ON;<compat> 9F52;;;;N;;;;; -2FD3;KANGXI RADICAL DRAGON;So;0;ON;<compat> 9F8D;;;;N;;;;; -2FD4;KANGXI RADICAL TURTLE;So;0;ON;<compat> 9F9C;;;;N;;;;; -2FD5;KANGXI RADICAL FLUTE;So;0;ON;<compat> 9FA0;;;;N;;;;; -2FF0;IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT;So;0;ON;;;;;N;;;;; -2FF1;IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW;So;0;ON;;;;;N;;;;; -2FF2;IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO MIDDLE AND RIGHT;So;0;ON;;;;;N;;;;; -2FF3;IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO MIDDLE AND BELOW;So;0;ON;;;;;N;;;;; -2FF4;IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND;So;0;ON;;;;;N;;;;; -2FF5;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM ABOVE;So;0;ON;;;;;N;;;;; -2FF6;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM BELOW;So;0;ON;;;;;N;;;;; -2FF7;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LEFT;So;0;ON;;;;;N;;;;; -2FF8;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER LEFT;So;0;ON;;;;;N;;;;; -2FF9;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER RIGHT;So;0;ON;;;;;N;;;;; -2FFA;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER LEFT;So;0;ON;;;;;N;;;;; -2FFB;IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID;So;0;ON;;;;;N;;;;; -3000;IDEOGRAPHIC SPACE;Zs;0;WS;<wide> 0020;;;;N;;;;; -3001;IDEOGRAPHIC COMMA;Po;0;ON;;;;;N;;;;; -3002;IDEOGRAPHIC FULL STOP;Po;0;ON;;;;;N;IDEOGRAPHIC PERIOD;;;; -3003;DITTO MARK;Po;0;ON;;;;;N;;;;; -3004;JAPANESE INDUSTRIAL STANDARD SYMBOL;So;0;ON;;;;;N;;;;; -3005;IDEOGRAPHIC ITERATION MARK;Lm;0;L;;;;;N;;;;; -3006;IDEOGRAPHIC CLOSING MARK;Lo;0;L;;;;;N;;;;; -3007;IDEOGRAPHIC NUMBER ZERO;Nl;0;L;;;;0;N;;;;; -3008;LEFT ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING ANGLE BRACKET;;;; -3009;RIGHT ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING ANGLE BRACKET;;;; -300A;LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING DOUBLE ANGLE BRACKET;;;; -300B;RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING DOUBLE ANGLE BRACKET;;;; -300C;LEFT CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING CORNER BRACKET;;;; -300D;RIGHT CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING CORNER BRACKET;;;; -300E;LEFT WHITE CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE CORNER BRACKET;;;; -300F;RIGHT WHITE CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE CORNER BRACKET;;;; -3010;LEFT BLACK LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING BLACK LENTICULAR BRACKET;;;; -3011;RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING BLACK LENTICULAR BRACKET;;;; -3012;POSTAL MARK;So;0;ON;;;;;N;;;;; -3013;GETA MARK;So;0;ON;;;;;N;;;;; -3014;LEFT TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING TORTOISE SHELL BRACKET;;;; -3015;RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING TORTOISE SHELL BRACKET;;;; -3016;LEFT WHITE LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE LENTICULAR BRACKET;;;; -3017;RIGHT WHITE LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE LENTICULAR BRACKET;;;; -3018;LEFT WHITE TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE TORTOISE SHELL BRACKET;;;; -3019;RIGHT WHITE TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE TORTOISE SHELL BRACKET;;;; -301A;LEFT WHITE SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE SQUARE BRACKET;;;; -301B;RIGHT WHITE SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE SQUARE BRACKET;;;; -301C;WAVE DASH;Pd;0;ON;;;;;N;;;;; -301D;REVERSED DOUBLE PRIME QUOTATION MARK;Ps;0;ON;;;;;N;;;;; -301E;DOUBLE PRIME QUOTATION MARK;Pe;0;ON;;;;;N;;;;; -301F;LOW DOUBLE PRIME QUOTATION MARK;Pe;0;ON;;;;;N;;;;; -3020;POSTAL MARK FACE;So;0;ON;;;;;N;;;;; -3021;HANGZHOU NUMERAL ONE;Nl;0;L;;;;1;N;;;;; -3022;HANGZHOU NUMERAL TWO;Nl;0;L;;;;2;N;;;;; -3023;HANGZHOU NUMERAL THREE;Nl;0;L;;;;3;N;;;;; -3024;HANGZHOU NUMERAL FOUR;Nl;0;L;;;;4;N;;;;; -3025;HANGZHOU NUMERAL FIVE;Nl;0;L;;;;5;N;;;;; -3026;HANGZHOU NUMERAL SIX;Nl;0;L;;;;6;N;;;;; -3027;HANGZHOU NUMERAL SEVEN;Nl;0;L;;;;7;N;;;;; -3028;HANGZHOU NUMERAL EIGHT;Nl;0;L;;;;8;N;;;;; -3029;HANGZHOU NUMERAL NINE;Nl;0;L;;;;9;N;;;;; -302A;IDEOGRAPHIC LEVEL TONE MARK;Mn;218;NSM;;;;;N;;;;; -302B;IDEOGRAPHIC RISING TONE MARK;Mn;228;NSM;;;;;N;;;;; -302C;IDEOGRAPHIC DEPARTING TONE MARK;Mn;232;NSM;;;;;N;;;;; -302D;IDEOGRAPHIC ENTERING TONE MARK;Mn;222;NSM;;;;;N;;;;; -302E;HANGUL SINGLE DOT TONE MARK;Mn;224;NSM;;;;;N;;;;; -302F;HANGUL DOUBLE DOT TONE MARK;Mn;224;NSM;;;;;N;;;;; -3030;WAVY DASH;Pd;0;ON;;;;;N;;;;; -3031;VERTICAL KANA REPEAT MARK;Lm;0;L;;;;;N;;;;; -3032;VERTICAL KANA REPEAT WITH VOICED SOUND MARK;Lm;0;L;;;;;N;;;;; -3033;VERTICAL KANA REPEAT MARK UPPER HALF;Lm;0;L;;;;;N;;;;; -3034;VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF;Lm;0;L;;;;;N;;;;; -3035;VERTICAL KANA REPEAT MARK LOWER HALF;Lm;0;L;;;;;N;;;;; -3036;CIRCLED POSTAL MARK;So;0;ON;<compat> 3012;;;;N;;;;; -3037;IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL;So;0;ON;;;;;N;;;;; -3038;HANGZHOU NUMERAL TEN;Nl;0;L;<compat> 5341;;;10;N;;;;; -3039;HANGZHOU NUMERAL TWENTY;Nl;0;L;<compat> 5344;;;20;N;;;;; -303A;HANGZHOU NUMERAL THIRTY;Nl;0;L;<compat> 5345;;;30;N;;;;; -303E;IDEOGRAPHIC VARIATION INDICATOR;So;0;ON;;;;;N;;;;; -303F;IDEOGRAPHIC HALF FILL SPACE;So;0;ON;;;;;N;;;;; -3041;HIRAGANA LETTER SMALL A;Lo;0;L;;;;;N;;;;; -3042;HIRAGANA LETTER A;Lo;0;L;;;;;N;;;;; -3043;HIRAGANA LETTER SMALL I;Lo;0;L;;;;;N;;;;; -3044;HIRAGANA LETTER I;Lo;0;L;;;;;N;;;;; -3045;HIRAGANA LETTER SMALL U;Lo;0;L;;;;;N;;;;; -3046;HIRAGANA LETTER U;Lo;0;L;;;;;N;;;;; -3047;HIRAGANA LETTER SMALL E;Lo;0;L;;;;;N;;;;; -3048;HIRAGANA LETTER E;Lo;0;L;;;;;N;;;;; -3049;HIRAGANA LETTER SMALL O;Lo;0;L;;;;;N;;;;; -304A;HIRAGANA LETTER O;Lo;0;L;;;;;N;;;;; -304B;HIRAGANA LETTER KA;Lo;0;L;;;;;N;;;;; -304C;HIRAGANA LETTER GA;Lo;0;L;304B 3099;;;;N;;;;; -304D;HIRAGANA LETTER KI;Lo;0;L;;;;;N;;;;; -304E;HIRAGANA LETTER GI;Lo;0;L;304D 3099;;;;N;;;;; -304F;HIRAGANA LETTER KU;Lo;0;L;;;;;N;;;;; -3050;HIRAGANA LETTER GU;Lo;0;L;304F 3099;;;;N;;;;; -3051;HIRAGANA LETTER KE;Lo;0;L;;;;;N;;;;; -3052;HIRAGANA LETTER GE;Lo;0;L;3051 3099;;;;N;;;;; -3053;HIRAGANA LETTER KO;Lo;0;L;;;;;N;;;;; -3054;HIRAGANA LETTER GO;Lo;0;L;3053 3099;;;;N;;;;; -3055;HIRAGANA LETTER SA;Lo;0;L;;;;;N;;;;; -3056;HIRAGANA LETTER ZA;Lo;0;L;3055 3099;;;;N;;;;; -3057;HIRAGANA LETTER SI;Lo;0;L;;;;;N;;;;; -3058;HIRAGANA LETTER ZI;Lo;0;L;3057 3099;;;;N;;;;; -3059;HIRAGANA LETTER SU;Lo;0;L;;;;;N;;;;; -305A;HIRAGANA LETTER ZU;Lo;0;L;3059 3099;;;;N;;;;; -305B;HIRAGANA LETTER SE;Lo;0;L;;;;;N;;;;; -305C;HIRAGANA LETTER ZE;Lo;0;L;305B 3099;;;;N;;;;; -305D;HIRAGANA LETTER SO;Lo;0;L;;;;;N;;;;; -305E;HIRAGANA LETTER ZO;Lo;0;L;305D 3099;;;;N;;;;; -305F;HIRAGANA LETTER TA;Lo;0;L;;;;;N;;;;; -3060;HIRAGANA LETTER DA;Lo;0;L;305F 3099;;;;N;;;;; -3061;HIRAGANA LETTER TI;Lo;0;L;;;;;N;;;;; -3062;HIRAGANA LETTER DI;Lo;0;L;3061 3099;;;;N;;;;; -3063;HIRAGANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;; -3064;HIRAGANA LETTER TU;Lo;0;L;;;;;N;;;;; -3065;HIRAGANA LETTER DU;Lo;0;L;3064 3099;;;;N;;;;; -3066;HIRAGANA LETTER TE;Lo;0;L;;;;;N;;;;; -3067;HIRAGANA LETTER DE;Lo;0;L;3066 3099;;;;N;;;;; -3068;HIRAGANA LETTER TO;Lo;0;L;;;;;N;;;;; -3069;HIRAGANA LETTER DO;Lo;0;L;3068 3099;;;;N;;;;; -306A;HIRAGANA LETTER NA;Lo;0;L;;;;;N;;;;; -306B;HIRAGANA LETTER NI;Lo;0;L;;;;;N;;;;; -306C;HIRAGANA LETTER NU;Lo;0;L;;;;;N;;;;; -306D;HIRAGANA LETTER NE;Lo;0;L;;;;;N;;;;; -306E;HIRAGANA LETTER NO;Lo;0;L;;;;;N;;;;; -306F;HIRAGANA LETTER HA;Lo;0;L;;;;;N;;;;; -3070;HIRAGANA LETTER BA;Lo;0;L;306F 3099;;;;N;;;;; -3071;HIRAGANA LETTER PA;Lo;0;L;306F 309A;;;;N;;;;; -3072;HIRAGANA LETTER HI;Lo;0;L;;;;;N;;;;; -3073;HIRAGANA LETTER BI;Lo;0;L;3072 3099;;;;N;;;;; -3074;HIRAGANA LETTER PI;Lo;0;L;3072 309A;;;;N;;;;; -3075;HIRAGANA LETTER HU;Lo;0;L;;;;;N;;;;; -3076;HIRAGANA LETTER BU;Lo;0;L;3075 3099;;;;N;;;;; -3077;HIRAGANA LETTER PU;Lo;0;L;3075 309A;;;;N;;;;; -3078;HIRAGANA LETTER HE;Lo;0;L;;;;;N;;;;; -3079;HIRAGANA LETTER BE;Lo;0;L;3078 3099;;;;N;;;;; -307A;HIRAGANA LETTER PE;Lo;0;L;3078 309A;;;;N;;;;; -307B;HIRAGANA LETTER HO;Lo;0;L;;;;;N;;;;; -307C;HIRAGANA LETTER BO;Lo;0;L;307B 3099;;;;N;;;;; -307D;HIRAGANA LETTER PO;Lo;0;L;307B 309A;;;;N;;;;; -307E;HIRAGANA LETTER MA;Lo;0;L;;;;;N;;;;; -307F;HIRAGANA LETTER MI;Lo;0;L;;;;;N;;;;; -3080;HIRAGANA LETTER MU;Lo;0;L;;;;;N;;;;; -3081;HIRAGANA LETTER ME;Lo;0;L;;;;;N;;;;; -3082;HIRAGANA LETTER MO;Lo;0;L;;;;;N;;;;; -3083;HIRAGANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;; -3084;HIRAGANA LETTER YA;Lo;0;L;;;;;N;;;;; -3085;HIRAGANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;; -3086;HIRAGANA LETTER YU;Lo;0;L;;;;;N;;;;; -3087;HIRAGANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;; -3088;HIRAGANA LETTER YO;Lo;0;L;;;;;N;;;;; -3089;HIRAGANA LETTER RA;Lo;0;L;;;;;N;;;;; -308A;HIRAGANA LETTER RI;Lo;0;L;;;;;N;;;;; -308B;HIRAGANA LETTER RU;Lo;0;L;;;;;N;;;;; -308C;HIRAGANA LETTER RE;Lo;0;L;;;;;N;;;;; -308D;HIRAGANA LETTER RO;Lo;0;L;;;;;N;;;;; -308E;HIRAGANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;; -308F;HIRAGANA LETTER WA;Lo;0;L;;;;;N;;;;; -3090;HIRAGANA LETTER WI;Lo;0;L;;;;;N;;;;; -3091;HIRAGANA LETTER WE;Lo;0;L;;;;;N;;;;; -3092;HIRAGANA LETTER WO;Lo;0;L;;;;;N;;;;; -3093;HIRAGANA LETTER N;Lo;0;L;;;;;N;;;;; -3094;HIRAGANA LETTER VU;Lo;0;L;3046 3099;;;;N;;;;; -3099;COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK;Mn;8;NSM;;;;;N;NON-SPACING KATAKANA-HIRAGANA VOICED SOUND MARK;;;; -309A;COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Mn;8;NSM;;;;;N;NON-SPACING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;;;; -309B;KATAKANA-HIRAGANA VOICED SOUND MARK;Sk;0;ON;<compat> 0020 3099;;;;N;;;;; -309C;KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Sk;0;ON;<compat> 0020 309A;;;;N;;;;; -309D;HIRAGANA ITERATION MARK;Lm;0;L;;;;;N;;;;; -309E;HIRAGANA VOICED ITERATION MARK;Lm;0;L;309D 3099;;;;N;;;;; -30A1;KATAKANA LETTER SMALL A;Lo;0;L;;;;;N;;;;; -30A2;KATAKANA LETTER A;Lo;0;L;;;;;N;;;;; -30A3;KATAKANA LETTER SMALL I;Lo;0;L;;;;;N;;;;; -30A4;KATAKANA LETTER I;Lo;0;L;;;;;N;;;;; -30A5;KATAKANA LETTER SMALL U;Lo;0;L;;;;;N;;;;; -30A6;KATAKANA LETTER U;Lo;0;L;;;;;N;;;;; -30A7;KATAKANA LETTER SMALL E;Lo;0;L;;;;;N;;;;; -30A8;KATAKANA LETTER E;Lo;0;L;;;;;N;;;;; -30A9;KATAKANA LETTER SMALL O;Lo;0;L;;;;;N;;;;; -30AA;KATAKANA LETTER O;Lo;0;L;;;;;N;;;;; -30AB;KATAKANA LETTER KA;Lo;0;L;;;;;N;;;;; -30AC;KATAKANA LETTER GA;Lo;0;L;30AB 3099;;;;N;;;;; -30AD;KATAKANA LETTER KI;Lo;0;L;;;;;N;;;;; -30AE;KATAKANA LETTER GI;Lo;0;L;30AD 3099;;;;N;;;;; -30AF;KATAKANA LETTER KU;Lo;0;L;;;;;N;;;;; -30B0;KATAKANA LETTER GU;Lo;0;L;30AF 3099;;;;N;;;;; -30B1;KATAKANA LETTER KE;Lo;0;L;;;;;N;;;;; -30B2;KATAKANA LETTER GE;Lo;0;L;30B1 3099;;;;N;;;;; -30B3;KATAKANA LETTER KO;Lo;0;L;;;;;N;;;;; -30B4;KATAKANA LETTER GO;Lo;0;L;30B3 3099;;;;N;;;;; -30B5;KATAKANA LETTER SA;Lo;0;L;;;;;N;;;;; -30B6;KATAKANA LETTER ZA;Lo;0;L;30B5 3099;;;;N;;;;; -30B7;KATAKANA LETTER SI;Lo;0;L;;;;;N;;;;; -30B8;KATAKANA LETTER ZI;Lo;0;L;30B7 3099;;;;N;;;;; -30B9;KATAKANA LETTER SU;Lo;0;L;;;;;N;;;;; -30BA;KATAKANA LETTER ZU;Lo;0;L;30B9 3099;;;;N;;;;; -30BB;KATAKANA LETTER SE;Lo;0;L;;;;;N;;;;; -30BC;KATAKANA LETTER ZE;Lo;0;L;30BB 3099;;;;N;;;;; -30BD;KATAKANA LETTER SO;Lo;0;L;;;;;N;;;;; -30BE;KATAKANA LETTER ZO;Lo;0;L;30BD 3099;;;;N;;;;; -30BF;KATAKANA LETTER TA;Lo;0;L;;;;;N;;;;; -30C0;KATAKANA LETTER DA;Lo;0;L;30BF 3099;;;;N;;;;; -30C1;KATAKANA LETTER TI;Lo;0;L;;;;;N;;;;; -30C2;KATAKANA LETTER DI;Lo;0;L;30C1 3099;;;;N;;;;; -30C3;KATAKANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;; -30C4;KATAKANA LETTER TU;Lo;0;L;;;;;N;;;;; -30C5;KATAKANA LETTER DU;Lo;0;L;30C4 3099;;;;N;;;;; -30C6;KATAKANA LETTER TE;Lo;0;L;;;;;N;;;;; -30C7;KATAKANA LETTER DE;Lo;0;L;30C6 3099;;;;N;;;;; -30C8;KATAKANA LETTER TO;Lo;0;L;;;;;N;;;;; -30C9;KATAKANA LETTER DO;Lo;0;L;30C8 3099;;;;N;;;;; -30CA;KATAKANA LETTER NA;Lo;0;L;;;;;N;;;;; -30CB;KATAKANA LETTER NI;Lo;0;L;;;;;N;;;;; -30CC;KATAKANA LETTER NU;Lo;0;L;;;;;N;;;;; -30CD;KATAKANA LETTER NE;Lo;0;L;;;;;N;;;;; -30CE;KATAKANA LETTER NO;Lo;0;L;;;;;N;;;;; -30CF;KATAKANA LETTER HA;Lo;0;L;;;;;N;;;;; -30D0;KATAKANA LETTER BA;Lo;0;L;30CF 3099;;;;N;;;;; -30D1;KATAKANA LETTER PA;Lo;0;L;30CF 309A;;;;N;;;;; -30D2;KATAKANA LETTER HI;Lo;0;L;;;;;N;;;;; -30D3;KATAKANA LETTER BI;Lo;0;L;30D2 3099;;;;N;;;;; -30D4;KATAKANA LETTER PI;Lo;0;L;30D2 309A;;;;N;;;;; -30D5;KATAKANA LETTER HU;Lo;0;L;;;;;N;;;;; -30D6;KATAKANA LETTER BU;Lo;0;L;30D5 3099;;;;N;;;;; -30D7;KATAKANA LETTER PU;Lo;0;L;30D5 309A;;;;N;;;;; -30D8;KATAKANA LETTER HE;Lo;0;L;;;;;N;;;;; -30D9;KATAKANA LETTER BE;Lo;0;L;30D8 3099;;;;N;;;;; -30DA;KATAKANA LETTER PE;Lo;0;L;30D8 309A;;;;N;;;;; -30DB;KATAKANA LETTER HO;Lo;0;L;;;;;N;;;;; -30DC;KATAKANA LETTER BO;Lo;0;L;30DB 3099;;;;N;;;;; -30DD;KATAKANA LETTER PO;Lo;0;L;30DB 309A;;;;N;;;;; -30DE;KATAKANA LETTER MA;Lo;0;L;;;;;N;;;;; -30DF;KATAKANA LETTER MI;Lo;0;L;;;;;N;;;;; -30E0;KATAKANA LETTER MU;Lo;0;L;;;;;N;;;;; -30E1;KATAKANA LETTER ME;Lo;0;L;;;;;N;;;;; -30E2;KATAKANA LETTER MO;Lo;0;L;;;;;N;;;;; -30E3;KATAKANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;; -30E4;KATAKANA LETTER YA;Lo;0;L;;;;;N;;;;; -30E5;KATAKANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;; -30E6;KATAKANA LETTER YU;Lo;0;L;;;;;N;;;;; -30E7;KATAKANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;; -30E8;KATAKANA LETTER YO;Lo;0;L;;;;;N;;;;; -30E9;KATAKANA LETTER RA;Lo;0;L;;;;;N;;;;; -30EA;KATAKANA LETTER RI;Lo;0;L;;;;;N;;;;; -30EB;KATAKANA LETTER RU;Lo;0;L;;;;;N;;;;; -30EC;KATAKANA LETTER RE;Lo;0;L;;;;;N;;;;; -30ED;KATAKANA LETTER RO;Lo;0;L;;;;;N;;;;; -30EE;KATAKANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;; -30EF;KATAKANA LETTER WA;Lo;0;L;;;;;N;;;;; -30F0;KATAKANA LETTER WI;Lo;0;L;;;;;N;;;;; -30F1;KATAKANA LETTER WE;Lo;0;L;;;;;N;;;;; -30F2;KATAKANA LETTER WO;Lo;0;L;;;;;N;;;;; -30F3;KATAKANA LETTER N;Lo;0;L;;;;;N;;;;; -30F4;KATAKANA LETTER VU;Lo;0;L;30A6 3099;;;;N;;;;; -30F5;KATAKANA LETTER SMALL KA;Lo;0;L;;;;;N;;;;; -30F6;KATAKANA LETTER SMALL KE;Lo;0;L;;;;;N;;;;; -30F7;KATAKANA LETTER VA;Lo;0;L;30EF 3099;;;;N;;;;; -30F8;KATAKANA LETTER VI;Lo;0;L;30F0 3099;;;;N;;;;; -30F9;KATAKANA LETTER VE;Lo;0;L;30F1 3099;;;;N;;;;; -30FA;KATAKANA LETTER VO;Lo;0;L;30F2 3099;;;;N;;;;; -30FB;KATAKANA MIDDLE DOT;Pc;0;ON;;;;;N;;;;; -30FC;KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L;;;;;N;;;;; -30FD;KATAKANA ITERATION MARK;Lm;0;L;;;;;N;;;;; -30FE;KATAKANA VOICED ITERATION MARK;Lm;0;L;30FD 3099;;;;N;;;;; -3105;BOPOMOFO LETTER B;Lo;0;L;;;;;N;;;;; -3106;BOPOMOFO LETTER P;Lo;0;L;;;;;N;;;;; -3107;BOPOMOFO LETTER M;Lo;0;L;;;;;N;;;;; -3108;BOPOMOFO LETTER F;Lo;0;L;;;;;N;;;;; -3109;BOPOMOFO LETTER D;Lo;0;L;;;;;N;;;;; -310A;BOPOMOFO LETTER T;Lo;0;L;;;;;N;;;;; -310B;BOPOMOFO LETTER N;Lo;0;L;;;;;N;;;;; -310C;BOPOMOFO LETTER L;Lo;0;L;;;;;N;;;;; -310D;BOPOMOFO LETTER G;Lo;0;L;;;;;N;;;;; -310E;BOPOMOFO LETTER K;Lo;0;L;;;;;N;;;;; -310F;BOPOMOFO LETTER H;Lo;0;L;;;;;N;;;;; -3110;BOPOMOFO LETTER J;Lo;0;L;;;;;N;;;;; -3111;BOPOMOFO LETTER Q;Lo;0;L;;;;;N;;;;; -3112;BOPOMOFO LETTER X;Lo;0;L;;;;;N;;;;; -3113;BOPOMOFO LETTER ZH;Lo;0;L;;;;;N;;;;; -3114;BOPOMOFO LETTER CH;Lo;0;L;;;;;N;;;;; -3115;BOPOMOFO LETTER SH;Lo;0;L;;;;;N;;;;; -3116;BOPOMOFO LETTER R;Lo;0;L;;;;;N;;;;; -3117;BOPOMOFO LETTER Z;Lo;0;L;;;;;N;;;;; -3118;BOPOMOFO LETTER C;Lo;0;L;;;;;N;;;;; -3119;BOPOMOFO LETTER S;Lo;0;L;;;;;N;;;;; -311A;BOPOMOFO LETTER A;Lo;0;L;;;;;N;;;;; -311B;BOPOMOFO LETTER O;Lo;0;L;;;;;N;;;;; -311C;BOPOMOFO LETTER E;Lo;0;L;;;;;N;;;;; -311D;BOPOMOFO LETTER EH;Lo;0;L;;;;;N;;;;; -311E;BOPOMOFO LETTER AI;Lo;0;L;;;;;N;;;;; -311F;BOPOMOFO LETTER EI;Lo;0;L;;;;;N;;;;; -3120;BOPOMOFO LETTER AU;Lo;0;L;;;;;N;;;;; -3121;BOPOMOFO LETTER OU;Lo;0;L;;;;;N;;;;; -3122;BOPOMOFO LETTER AN;Lo;0;L;;;;;N;;;;; -3123;BOPOMOFO LETTER EN;Lo;0;L;;;;;N;;;;; -3124;BOPOMOFO LETTER ANG;Lo;0;L;;;;;N;;;;; -3125;BOPOMOFO LETTER ENG;Lo;0;L;;;;;N;;;;; -3126;BOPOMOFO LETTER ER;Lo;0;L;;;;;N;;;;; -3127;BOPOMOFO LETTER I;Lo;0;L;;;;;N;;;;; -3128;BOPOMOFO LETTER U;Lo;0;L;;;;;N;;;;; -3129;BOPOMOFO LETTER IU;Lo;0;L;;;;;N;;;;; -312A;BOPOMOFO LETTER V;Lo;0;L;;;;;N;;;;; -312B;BOPOMOFO LETTER NG;Lo;0;L;;;;;N;;;;; -312C;BOPOMOFO LETTER GN;Lo;0;L;;;;;N;;;;; -3131;HANGUL LETTER KIYEOK;Lo;0;L;<compat> 1100;;;;N;HANGUL LETTER GIYEOG;;;; -3132;HANGUL LETTER SSANGKIYEOK;Lo;0;L;<compat> 1101;;;;N;HANGUL LETTER SSANG GIYEOG;;;; -3133;HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<compat> 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;; -3134;HANGUL LETTER NIEUN;Lo;0;L;<compat> 1102;;;;N;;;;; -3135;HANGUL LETTER NIEUN-CIEUC;Lo;0;L;<compat> 11AC;;;;N;HANGUL LETTER NIEUN JIEUJ;;;; -3136;HANGUL LETTER NIEUN-HIEUH;Lo;0;L;<compat> 11AD;;;;N;HANGUL LETTER NIEUN HIEUH;;;; -3137;HANGUL LETTER TIKEUT;Lo;0;L;<compat> 1103;;;;N;HANGUL LETTER DIGEUD;;;; -3138;HANGUL LETTER SSANGTIKEUT;Lo;0;L;<compat> 1104;;;;N;HANGUL LETTER SSANG DIGEUD;;;; -3139;HANGUL LETTER RIEUL;Lo;0;L;<compat> 1105;;;;N;HANGUL LETTER LIEUL;;;; -313A;HANGUL LETTER RIEUL-KIYEOK;Lo;0;L;<compat> 11B0;;;;N;HANGUL LETTER LIEUL GIYEOG;;;; -313B;HANGUL LETTER RIEUL-MIEUM;Lo;0;L;<compat> 11B1;;;;N;HANGUL LETTER LIEUL MIEUM;;;; -313C;HANGUL LETTER RIEUL-PIEUP;Lo;0;L;<compat> 11B2;;;;N;HANGUL LETTER LIEUL BIEUB;;;; -313D;HANGUL LETTER RIEUL-SIOS;Lo;0;L;<compat> 11B3;;;;N;HANGUL LETTER LIEUL SIOS;;;; -313E;HANGUL LETTER RIEUL-THIEUTH;Lo;0;L;<compat> 11B4;;;;N;HANGUL LETTER LIEUL TIEUT;;;; -313F;HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L;<compat> 11B5;;;;N;HANGUL LETTER LIEUL PIEUP;;;; -3140;HANGUL LETTER RIEUL-HIEUH;Lo;0;L;<compat> 111A;;;;N;HANGUL LETTER LIEUL HIEUH;;;; -3141;HANGUL LETTER MIEUM;Lo;0;L;<compat> 1106;;;;N;;;;; -3142;HANGUL LETTER PIEUP;Lo;0;L;<compat> 1107;;;;N;HANGUL LETTER BIEUB;;;; -3143;HANGUL LETTER SSANGPIEUP;Lo;0;L;<compat> 1108;;;;N;HANGUL LETTER SSANG BIEUB;;;; -3144;HANGUL LETTER PIEUP-SIOS;Lo;0;L;<compat> 1121;;;;N;HANGUL LETTER BIEUB SIOS;;;; -3145;HANGUL LETTER SIOS;Lo;0;L;<compat> 1109;;;;N;;;;; -3146;HANGUL LETTER SSANGSIOS;Lo;0;L;<compat> 110A;;;;N;HANGUL LETTER SSANG SIOS;;;; -3147;HANGUL LETTER IEUNG;Lo;0;L;<compat> 110B;;;;N;;;;; -3148;HANGUL LETTER CIEUC;Lo;0;L;<compat> 110C;;;;N;HANGUL LETTER JIEUJ;;;; -3149;HANGUL LETTER SSANGCIEUC;Lo;0;L;<compat> 110D;;;;N;HANGUL LETTER SSANG JIEUJ;;;; -314A;HANGUL LETTER CHIEUCH;Lo;0;L;<compat> 110E;;;;N;HANGUL LETTER CIEUC;;;; -314B;HANGUL LETTER KHIEUKH;Lo;0;L;<compat> 110F;;;;N;HANGUL LETTER KIYEOK;;;; -314C;HANGUL LETTER THIEUTH;Lo;0;L;<compat> 1110;;;;N;HANGUL LETTER TIEUT;;;; -314D;HANGUL LETTER PHIEUPH;Lo;0;L;<compat> 1111;;;;N;HANGUL LETTER PIEUP;;;; -314E;HANGUL LETTER HIEUH;Lo;0;L;<compat> 1112;;;;N;;;;; -314F;HANGUL LETTER A;Lo;0;L;<compat> 1161;;;;N;;;;; -3150;HANGUL LETTER AE;Lo;0;L;<compat> 1162;;;;N;;;;; -3151;HANGUL LETTER YA;Lo;0;L;<compat> 1163;;;;N;;;;; -3152;HANGUL LETTER YAE;Lo;0;L;<compat> 1164;;;;N;;;;; -3153;HANGUL LETTER EO;Lo;0;L;<compat> 1165;;;;N;;;;; -3154;HANGUL LETTER E;Lo;0;L;<compat> 1166;;;;N;;;;; -3155;HANGUL LETTER YEO;Lo;0;L;<compat> 1167;;;;N;;;;; -3156;HANGUL LETTER YE;Lo;0;L;<compat> 1168;;;;N;;;;; -3157;HANGUL LETTER O;Lo;0;L;<compat> 1169;;;;N;;;;; -3158;HANGUL LETTER WA;Lo;0;L;<compat> 116A;;;;N;;;;; -3159;HANGUL LETTER WAE;Lo;0;L;<compat> 116B;;;;N;;;;; -315A;HANGUL LETTER OE;Lo;0;L;<compat> 116C;;;;N;;;;; -315B;HANGUL LETTER YO;Lo;0;L;<compat> 116D;;;;N;;;;; -315C;HANGUL LETTER U;Lo;0;L;<compat> 116E;;;;N;;;;; -315D;HANGUL LETTER WEO;Lo;0;L;<compat> 116F;;;;N;;;;; -315E;HANGUL LETTER WE;Lo;0;L;<compat> 1170;;;;N;;;;; -315F;HANGUL LETTER WI;Lo;0;L;<compat> 1171;;;;N;;;;; -3160;HANGUL LETTER YU;Lo;0;L;<compat> 1172;;;;N;;;;; -3161;HANGUL LETTER EU;Lo;0;L;<compat> 1173;;;;N;;;;; -3162;HANGUL LETTER YI;Lo;0;L;<compat> 1174;;;;N;;;;; -3163;HANGUL LETTER I;Lo;0;L;<compat> 1175;;;;N;;;;; -3164;HANGUL FILLER;Lo;0;L;<compat> 1160;;;;N;HANGUL CAE OM;;;; -3165;HANGUL LETTER SSANGNIEUN;Lo;0;L;<compat> 1114;;;;N;HANGUL LETTER SSANG NIEUN;;;; -3166;HANGUL LETTER NIEUN-TIKEUT;Lo;0;L;<compat> 1115;;;;N;HANGUL LETTER NIEUN DIGEUD;;;; -3167;HANGUL LETTER NIEUN-SIOS;Lo;0;L;<compat> 11C7;;;;N;HANGUL LETTER NIEUN SIOS;;;; -3168;HANGUL LETTER NIEUN-PANSIOS;Lo;0;L;<compat> 11C8;;;;N;HANGUL LETTER NIEUN BAN CHI EUM;;;; -3169;HANGUL LETTER RIEUL-KIYEOK-SIOS;Lo;0;L;<compat> 11CC;;;;N;HANGUL LETTER LIEUL GIYEOG SIOS;;;; -316A;HANGUL LETTER RIEUL-TIKEUT;Lo;0;L;<compat> 11CE;;;;N;HANGUL LETTER LIEUL DIGEUD;;;; -316B;HANGUL LETTER RIEUL-PIEUP-SIOS;Lo;0;L;<compat> 11D3;;;;N;HANGUL LETTER LIEUL BIEUB SIOS;;;; -316C;HANGUL LETTER RIEUL-PANSIOS;Lo;0;L;<compat> 11D7;;;;N;HANGUL LETTER LIEUL BAN CHI EUM;;;; -316D;HANGUL LETTER RIEUL-YEORINHIEUH;Lo;0;L;<compat> 11D9;;;;N;HANGUL LETTER LIEUL YEOLIN HIEUH;;;; -316E;HANGUL LETTER MIEUM-PIEUP;Lo;0;L;<compat> 111C;;;;N;HANGUL LETTER MIEUM BIEUB;;;; -316F;HANGUL LETTER MIEUM-SIOS;Lo;0;L;<compat> 11DD;;;;N;HANGUL LETTER MIEUM SIOS;;;; -3170;HANGUL LETTER MIEUM-PANSIOS;Lo;0;L;<compat> 11DF;;;;N;HANGUL LETTER BIEUB BAN CHI EUM;;;; -3171;HANGUL LETTER KAPYEOUNMIEUM;Lo;0;L;<compat> 111D;;;;N;HANGUL LETTER MIEUM SUN GYEONG EUM;;;; -3172;HANGUL LETTER PIEUP-KIYEOK;Lo;0;L;<compat> 111E;;;;N;HANGUL LETTER BIEUB GIYEOG;;;; -3173;HANGUL LETTER PIEUP-TIKEUT;Lo;0;L;<compat> 1120;;;;N;HANGUL LETTER BIEUB DIGEUD;;;; -3174;HANGUL LETTER PIEUP-SIOS-KIYEOK;Lo;0;L;<compat> 1122;;;;N;HANGUL LETTER BIEUB SIOS GIYEOG;;;; -3175;HANGUL LETTER PIEUP-SIOS-TIKEUT;Lo;0;L;<compat> 1123;;;;N;HANGUL LETTER BIEUB SIOS DIGEUD;;;; -3176;HANGUL LETTER PIEUP-CIEUC;Lo;0;L;<compat> 1127;;;;N;HANGUL LETTER BIEUB JIEUJ;;;; -3177;HANGUL LETTER PIEUP-THIEUTH;Lo;0;L;<compat> 1129;;;;N;HANGUL LETTER BIEUB TIEUT;;;; -3178;HANGUL LETTER KAPYEOUNPIEUP;Lo;0;L;<compat> 112B;;;;N;HANGUL LETTER BIEUB SUN GYEONG EUM;;;; -3179;HANGUL LETTER KAPYEOUNSSANGPIEUP;Lo;0;L;<compat> 112C;;;;N;HANGUL LETTER SSANG BIEUB SUN GYEONG EUM;;;; -317A;HANGUL LETTER SIOS-KIYEOK;Lo;0;L;<compat> 112D;;;;N;HANGUL LETTER SIOS GIYEOG;;;; -317B;HANGUL LETTER SIOS-NIEUN;Lo;0;L;<compat> 112E;;;;N;HANGUL LETTER SIOS NIEUN;;;; -317C;HANGUL LETTER SIOS-TIKEUT;Lo;0;L;<compat> 112F;;;;N;HANGUL LETTER SIOS DIGEUD;;;; -317D;HANGUL LETTER SIOS-PIEUP;Lo;0;L;<compat> 1132;;;;N;HANGUL LETTER SIOS BIEUB;;;; -317E;HANGUL LETTER SIOS-CIEUC;Lo;0;L;<compat> 1136;;;;N;HANGUL LETTER SIOS JIEUJ;;;; -317F;HANGUL LETTER PANSIOS;Lo;0;L;<compat> 1140;;;;N;HANGUL LETTER BAN CHI EUM;;;; -3180;HANGUL LETTER SSANGIEUNG;Lo;0;L;<compat> 1147;;;;N;HANGUL LETTER SSANG IEUNG;;;; -3181;HANGUL LETTER YESIEUNG;Lo;0;L;<compat> 114C;;;;N;HANGUL LETTER NGIEUNG;;;; -3182;HANGUL LETTER YESIEUNG-SIOS;Lo;0;L;<compat> 11F1;;;;N;HANGUL LETTER NGIEUNG SIOS;;;; -3183;HANGUL LETTER YESIEUNG-PANSIOS;Lo;0;L;<compat> 11F2;;;;N;HANGUL LETTER NGIEUNG BAN CHI EUM;;;; -3184;HANGUL LETTER KAPYEOUNPHIEUPH;Lo;0;L;<compat> 1157;;;;N;HANGUL LETTER PIEUP SUN GYEONG EUM;;;; -3185;HANGUL LETTER SSANGHIEUH;Lo;0;L;<compat> 1158;;;;N;HANGUL LETTER SSANG HIEUH;;;; -3186;HANGUL LETTER YEORINHIEUH;Lo;0;L;<compat> 1159;;;;N;HANGUL LETTER YEOLIN HIEUH;;;; -3187;HANGUL LETTER YO-YA;Lo;0;L;<compat> 1184;;;;N;HANGUL LETTER YOYA;;;; -3188;HANGUL LETTER YO-YAE;Lo;0;L;<compat> 1185;;;;N;HANGUL LETTER YOYAE;;;; -3189;HANGUL LETTER YO-I;Lo;0;L;<compat> 1188;;;;N;HANGUL LETTER YOI;;;; -318A;HANGUL LETTER YU-YEO;Lo;0;L;<compat> 1191;;;;N;HANGUL LETTER YUYEO;;;; -318B;HANGUL LETTER YU-YE;Lo;0;L;<compat> 1192;;;;N;HANGUL LETTER YUYE;;;; -318C;HANGUL LETTER YU-I;Lo;0;L;<compat> 1194;;;;N;HANGUL LETTER YUI;;;; -318D;HANGUL LETTER ARAEA;Lo;0;L;<compat> 119E;;;;N;HANGUL LETTER ALAE A;;;; -318E;HANGUL LETTER ARAEAE;Lo;0;L;<compat> 11A1;;;;N;HANGUL LETTER ALAE AE;;;; -3190;IDEOGRAPHIC ANNOTATION LINKING MARK;So;0;L;;;;;N;KANBUN TATETEN;Kanbun Tateten;;; -3191;IDEOGRAPHIC ANNOTATION REVERSE MARK;So;0;L;;;;;N;KAERITEN RE;Kaeriten;;; -3192;IDEOGRAPHIC ANNOTATION ONE MARK;No;0;L;<super> 4E00;;;1;N;KAERITEN ITI;Kaeriten;;; -3193;IDEOGRAPHIC ANNOTATION TWO MARK;No;0;L;<super> 4E8C;;;2;N;KAERITEN NI;Kaeriten;;; -3194;IDEOGRAPHIC ANNOTATION THREE MARK;No;0;L;<super> 4E09;;;3;N;KAERITEN SAN;Kaeriten;;; -3195;IDEOGRAPHIC ANNOTATION FOUR MARK;No;0;L;<super> 56DB;;;4;N;KAERITEN SI;Kaeriten;;; -3196;IDEOGRAPHIC ANNOTATION TOP MARK;So;0;L;<super> 4E0A;;;;N;KAERITEN ZYOU;Kaeriten;;; -3197;IDEOGRAPHIC ANNOTATION MIDDLE MARK;So;0;L;<super> 4E2D;;;;N;KAERITEN TYUU;Kaeriten;;; -3198;IDEOGRAPHIC ANNOTATION BOTTOM MARK;So;0;L;<super> 4E0B;;;;N;KAERITEN GE;Kaeriten;;; -3199;IDEOGRAPHIC ANNOTATION FIRST MARK;So;0;L;<super> 7532;;;;N;KAERITEN KOU;Kaeriten;;; -319A;IDEOGRAPHIC ANNOTATION SECOND MARK;So;0;L;<super> 4E59;;;;N;KAERITEN OTU;Kaeriten;;; -319B;IDEOGRAPHIC ANNOTATION THIRD MARK;So;0;L;<super> 4E19;;;;N;KAERITEN HEI;Kaeriten;;; -319C;IDEOGRAPHIC ANNOTATION FOURTH MARK;So;0;L;<super> 4E01;;;;N;KAERITEN TEI;Kaeriten;;; -319D;IDEOGRAPHIC ANNOTATION HEAVEN MARK;So;0;L;<super> 5929;;;;N;KAERITEN TEN;Kaeriten;;; -319E;IDEOGRAPHIC ANNOTATION EARTH MARK;So;0;L;<super> 5730;;;;N;KAERITEN TI;Kaeriten;;; -319F;IDEOGRAPHIC ANNOTATION MAN MARK;So;0;L;<super> 4EBA;;;;N;KAERITEN ZIN;Kaeriten;;; -31A0;BOPOMOFO LETTER BU;Lo;0;L;;;;;N;;;;; -31A1;BOPOMOFO LETTER ZI;Lo;0;L;;;;;N;;;;; -31A2;BOPOMOFO LETTER JI;Lo;0;L;;;;;N;;;;; -31A3;BOPOMOFO LETTER GU;Lo;0;L;;;;;N;;;;; -31A4;BOPOMOFO LETTER EE;Lo;0;L;;;;;N;;;;; -31A5;BOPOMOFO LETTER ENN;Lo;0;L;;;;;N;;;;; -31A6;BOPOMOFO LETTER OO;Lo;0;L;;;;;N;;;;; -31A7;BOPOMOFO LETTER ONN;Lo;0;L;;;;;N;;;;; -31A8;BOPOMOFO LETTER IR;Lo;0;L;;;;;N;;;;; -31A9;BOPOMOFO LETTER ANN;Lo;0;L;;;;;N;;;;; -31AA;BOPOMOFO LETTER INN;Lo;0;L;;;;;N;;;;; -31AB;BOPOMOFO LETTER UNN;Lo;0;L;;;;;N;;;;; -31AC;BOPOMOFO LETTER IM;Lo;0;L;;;;;N;;;;; -31AD;BOPOMOFO LETTER NGG;Lo;0;L;;;;;N;;;;; -31AE;BOPOMOFO LETTER AINN;Lo;0;L;;;;;N;;;;; -31AF;BOPOMOFO LETTER AUNN;Lo;0;L;;;;;N;;;;; -31B0;BOPOMOFO LETTER AM;Lo;0;L;;;;;N;;;;; -31B1;BOPOMOFO LETTER OM;Lo;0;L;;;;;N;;;;; -31B2;BOPOMOFO LETTER ONG;Lo;0;L;;;;;N;;;;; -31B3;BOPOMOFO LETTER INNN;Lo;0;L;;;;;N;;;;; -31B4;BOPOMOFO FINAL LETTER P;Lo;0;L;;;;;N;;;;; -31B5;BOPOMOFO FINAL LETTER T;Lo;0;L;;;;;N;;;;; -31B6;BOPOMOFO FINAL LETTER K;Lo;0;L;;;;;N;;;;; -31B7;BOPOMOFO FINAL LETTER H;Lo;0;L;;;;;N;;;;; -3200;PARENTHESIZED HANGUL KIYEOK;So;0;L;<compat> 0028 1100 0029;;;;N;PARENTHESIZED HANGUL GIYEOG;;;; -3201;PARENTHESIZED HANGUL NIEUN;So;0;L;<compat> 0028 1102 0029;;;;N;;;;; -3202;PARENTHESIZED HANGUL TIKEUT;So;0;L;<compat> 0028 1103 0029;;;;N;PARENTHESIZED HANGUL DIGEUD;;;; -3203;PARENTHESIZED HANGUL RIEUL;So;0;L;<compat> 0028 1105 0029;;;;N;PARENTHESIZED HANGUL LIEUL;;;; -3204;PARENTHESIZED HANGUL MIEUM;So;0;L;<compat> 0028 1106 0029;;;;N;;;;; -3205;PARENTHESIZED HANGUL PIEUP;So;0;L;<compat> 0028 1107 0029;;;;N;PARENTHESIZED HANGUL BIEUB;;;; -3206;PARENTHESIZED HANGUL SIOS;So;0;L;<compat> 0028 1109 0029;;;;N;;;;; -3207;PARENTHESIZED HANGUL IEUNG;So;0;L;<compat> 0028 110B 0029;;;;N;;;;; -3208;PARENTHESIZED HANGUL CIEUC;So;0;L;<compat> 0028 110C 0029;;;;N;PARENTHESIZED HANGUL JIEUJ;;;; -3209;PARENTHESIZED HANGUL CHIEUCH;So;0;L;<compat> 0028 110E 0029;;;;N;PARENTHESIZED HANGUL CIEUC;;;; -320A;PARENTHESIZED HANGUL KHIEUKH;So;0;L;<compat> 0028 110F 0029;;;;N;PARENTHESIZED HANGUL KIYEOK;;;; -320B;PARENTHESIZED HANGUL THIEUTH;So;0;L;<compat> 0028 1110 0029;;;;N;PARENTHESIZED HANGUL TIEUT;;;; -320C;PARENTHESIZED HANGUL PHIEUPH;So;0;L;<compat> 0028 1111 0029;;;;N;PARENTHESIZED HANGUL PIEUP;;;; -320D;PARENTHESIZED HANGUL HIEUH;So;0;L;<compat> 0028 1112 0029;;;;N;;;;; -320E;PARENTHESIZED HANGUL KIYEOK A;So;0;L;<compat> 0028 1100 1161 0029;;;;N;PARENTHESIZED HANGUL GA;;;; -320F;PARENTHESIZED HANGUL NIEUN A;So;0;L;<compat> 0028 1102 1161 0029;;;;N;PARENTHESIZED HANGUL NA;;;; -3210;PARENTHESIZED HANGUL TIKEUT A;So;0;L;<compat> 0028 1103 1161 0029;;;;N;PARENTHESIZED HANGUL DA;;;; -3211;PARENTHESIZED HANGUL RIEUL A;So;0;L;<compat> 0028 1105 1161 0029;;;;N;PARENTHESIZED HANGUL LA;;;; -3212;PARENTHESIZED HANGUL MIEUM A;So;0;L;<compat> 0028 1106 1161 0029;;;;N;PARENTHESIZED HANGUL MA;;;; -3213;PARENTHESIZED HANGUL PIEUP A;So;0;L;<compat> 0028 1107 1161 0029;;;;N;PARENTHESIZED HANGUL BA;;;; -3214;PARENTHESIZED HANGUL SIOS A;So;0;L;<compat> 0028 1109 1161 0029;;;;N;PARENTHESIZED HANGUL SA;;;; -3215;PARENTHESIZED HANGUL IEUNG A;So;0;L;<compat> 0028 110B 1161 0029;;;;N;PARENTHESIZED HANGUL A;;;; -3216;PARENTHESIZED HANGUL CIEUC A;So;0;L;<compat> 0028 110C 1161 0029;;;;N;PARENTHESIZED HANGUL JA;;;; -3217;PARENTHESIZED HANGUL CHIEUCH A;So;0;L;<compat> 0028 110E 1161 0029;;;;N;PARENTHESIZED HANGUL CA;;;; -3218;PARENTHESIZED HANGUL KHIEUKH A;So;0;L;<compat> 0028 110F 1161 0029;;;;N;PARENTHESIZED HANGUL KA;;;; -3219;PARENTHESIZED HANGUL THIEUTH A;So;0;L;<compat> 0028 1110 1161 0029;;;;N;PARENTHESIZED HANGUL TA;;;; -321A;PARENTHESIZED HANGUL PHIEUPH A;So;0;L;<compat> 0028 1111 1161 0029;;;;N;PARENTHESIZED HANGUL PA;;;; -321B;PARENTHESIZED HANGUL HIEUH A;So;0;L;<compat> 0028 1112 1161 0029;;;;N;PARENTHESIZED HANGUL HA;;;; -321C;PARENTHESIZED HANGUL CIEUC U;So;0;L;<compat> 0028 110C 116E 0029;;;;N;PARENTHESIZED HANGUL JU;;;; -3220;PARENTHESIZED IDEOGRAPH ONE;No;0;L;<compat> 0028 4E00 0029;;;1;N;;;;; -3221;PARENTHESIZED IDEOGRAPH TWO;No;0;L;<compat> 0028 4E8C 0029;;;2;N;;;;; -3222;PARENTHESIZED IDEOGRAPH THREE;No;0;L;<compat> 0028 4E09 0029;;;3;N;;;;; -3223;PARENTHESIZED IDEOGRAPH FOUR;No;0;L;<compat> 0028 56DB 0029;;;4;N;;;;; -3224;PARENTHESIZED IDEOGRAPH FIVE;No;0;L;<compat> 0028 4E94 0029;;;5;N;;;;; -3225;PARENTHESIZED IDEOGRAPH SIX;No;0;L;<compat> 0028 516D 0029;;;6;N;;;;; -3226;PARENTHESIZED IDEOGRAPH SEVEN;No;0;L;<compat> 0028 4E03 0029;;;7;N;;;;; -3227;PARENTHESIZED IDEOGRAPH EIGHT;No;0;L;<compat> 0028 516B 0029;;;8;N;;;;; -3228;PARENTHESIZED IDEOGRAPH NINE;No;0;L;<compat> 0028 4E5D 0029;;;9;N;;;;; -3229;PARENTHESIZED IDEOGRAPH TEN;No;0;L;<compat> 0028 5341 0029;;;10;N;;;;; -322A;PARENTHESIZED IDEOGRAPH MOON;So;0;L;<compat> 0028 6708 0029;;;;N;;;;; -322B;PARENTHESIZED IDEOGRAPH FIRE;So;0;L;<compat> 0028 706B 0029;;;;N;;;;; -322C;PARENTHESIZED IDEOGRAPH WATER;So;0;L;<compat> 0028 6C34 0029;;;;N;;;;; -322D;PARENTHESIZED IDEOGRAPH WOOD;So;0;L;<compat> 0028 6728 0029;;;;N;;;;; -322E;PARENTHESIZED IDEOGRAPH METAL;So;0;L;<compat> 0028 91D1 0029;;;;N;;;;; -322F;PARENTHESIZED IDEOGRAPH EARTH;So;0;L;<compat> 0028 571F 0029;;;;N;;;;; -3230;PARENTHESIZED IDEOGRAPH SUN;So;0;L;<compat> 0028 65E5 0029;;;;N;;;;; -3231;PARENTHESIZED IDEOGRAPH STOCK;So;0;L;<compat> 0028 682A 0029;;;;N;;;;; -3232;PARENTHESIZED IDEOGRAPH HAVE;So;0;L;<compat> 0028 6709 0029;;;;N;;;;; -3233;PARENTHESIZED IDEOGRAPH SOCIETY;So;0;L;<compat> 0028 793E 0029;;;;N;;;;; -3234;PARENTHESIZED IDEOGRAPH NAME;So;0;L;<compat> 0028 540D 0029;;;;N;;;;; -3235;PARENTHESIZED IDEOGRAPH SPECIAL;So;0;L;<compat> 0028 7279 0029;;;;N;;;;; -3236;PARENTHESIZED IDEOGRAPH FINANCIAL;So;0;L;<compat> 0028 8CA1 0029;;;;N;;;;; -3237;PARENTHESIZED IDEOGRAPH CONGRATULATION;So;0;L;<compat> 0028 795D 0029;;;;N;;;;; -3238;PARENTHESIZED IDEOGRAPH LABOR;So;0;L;<compat> 0028 52B4 0029;;;;N;;;;; -3239;PARENTHESIZED IDEOGRAPH REPRESENT;So;0;L;<compat> 0028 4EE3 0029;;;;N;;;;; -323A;PARENTHESIZED IDEOGRAPH CALL;So;0;L;<compat> 0028 547C 0029;;;;N;;;;; -323B;PARENTHESIZED IDEOGRAPH STUDY;So;0;L;<compat> 0028 5B66 0029;;;;N;;;;; -323C;PARENTHESIZED IDEOGRAPH SUPERVISE;So;0;L;<compat> 0028 76E3 0029;;;;N;;;;; -323D;PARENTHESIZED IDEOGRAPH ENTERPRISE;So;0;L;<compat> 0028 4F01 0029;;;;N;;;;; -323E;PARENTHESIZED IDEOGRAPH RESOURCE;So;0;L;<compat> 0028 8CC7 0029;;;;N;;;;; -323F;PARENTHESIZED IDEOGRAPH ALLIANCE;So;0;L;<compat> 0028 5354 0029;;;;N;;;;; -3240;PARENTHESIZED IDEOGRAPH FESTIVAL;So;0;L;<compat> 0028 796D 0029;;;;N;;;;; -3241;PARENTHESIZED IDEOGRAPH REST;So;0;L;<compat> 0028 4F11 0029;;;;N;;;;; -3242;PARENTHESIZED IDEOGRAPH SELF;So;0;L;<compat> 0028 81EA 0029;;;;N;;;;; -3243;PARENTHESIZED IDEOGRAPH REACH;So;0;L;<compat> 0028 81F3 0029;;;;N;;;;; -3260;CIRCLED HANGUL KIYEOK;So;0;L;<circle> 1100;;;;N;CIRCLED HANGUL GIYEOG;;;; -3261;CIRCLED HANGUL NIEUN;So;0;L;<circle> 1102;;;;N;;;;; -3262;CIRCLED HANGUL TIKEUT;So;0;L;<circle> 1103;;;;N;CIRCLED HANGUL DIGEUD;;;; -3263;CIRCLED HANGUL RIEUL;So;0;L;<circle> 1105;;;;N;CIRCLED HANGUL LIEUL;;;; -3264;CIRCLED HANGUL MIEUM;So;0;L;<circle> 1106;;;;N;;;;; -3265;CIRCLED HANGUL PIEUP;So;0;L;<circle> 1107;;;;N;CIRCLED HANGUL BIEUB;;;; -3266;CIRCLED HANGUL SIOS;So;0;L;<circle> 1109;;;;N;;;;; -3267;CIRCLED HANGUL IEUNG;So;0;L;<circle> 110B;;;;N;;;;; -3268;CIRCLED HANGUL CIEUC;So;0;L;<circle> 110C;;;;N;CIRCLED HANGUL JIEUJ;;;; -3269;CIRCLED HANGUL CHIEUCH;So;0;L;<circle> 110E;;;;N;CIRCLED HANGUL CIEUC;;;; -326A;CIRCLED HANGUL KHIEUKH;So;0;L;<circle> 110F;;;;N;CIRCLED HANGUL KIYEOK;;;; -326B;CIRCLED HANGUL THIEUTH;So;0;L;<circle> 1110;;;;N;CIRCLED HANGUL TIEUT;;;; -326C;CIRCLED HANGUL PHIEUPH;So;0;L;<circle> 1111;;;;N;CIRCLED HANGUL PIEUP;;;; -326D;CIRCLED HANGUL HIEUH;So;0;L;<circle> 1112;;;;N;;;;; -326E;CIRCLED HANGUL KIYEOK A;So;0;L;<circle> 1100 1161;;;;N;CIRCLED HANGUL GA;;;; -326F;CIRCLED HANGUL NIEUN A;So;0;L;<circle> 1102 1161;;;;N;CIRCLED HANGUL NA;;;; -3270;CIRCLED HANGUL TIKEUT A;So;0;L;<circle> 1103 1161;;;;N;CIRCLED HANGUL DA;;;; -3271;CIRCLED HANGUL RIEUL A;So;0;L;<circle> 1105 1161;;;;N;CIRCLED HANGUL LA;;;; -3272;CIRCLED HANGUL MIEUM A;So;0;L;<circle> 1106 1161;;;;N;CIRCLED HANGUL MA;;;; -3273;CIRCLED HANGUL PIEUP A;So;0;L;<circle> 1107 1161;;;;N;CIRCLED HANGUL BA;;;; -3274;CIRCLED HANGUL SIOS A;So;0;L;<circle> 1109 1161;;;;N;CIRCLED HANGUL SA;;;; -3275;CIRCLED HANGUL IEUNG A;So;0;L;<circle> 110B 1161;;;;N;CIRCLED HANGUL A;;;; -3276;CIRCLED HANGUL CIEUC A;So;0;L;<circle> 110C 1161;;;;N;CIRCLED HANGUL JA;;;; -3277;CIRCLED HANGUL CHIEUCH A;So;0;L;<circle> 110E 1161;;;;N;CIRCLED HANGUL CA;;;; -3278;CIRCLED HANGUL KHIEUKH A;So;0;L;<circle> 110F 1161;;;;N;CIRCLED HANGUL KA;;;; -3279;CIRCLED HANGUL THIEUTH A;So;0;L;<circle> 1110 1161;;;;N;CIRCLED HANGUL TA;;;; -327A;CIRCLED HANGUL PHIEUPH A;So;0;L;<circle> 1111 1161;;;;N;CIRCLED HANGUL PA;;;; -327B;CIRCLED HANGUL HIEUH A;So;0;L;<circle> 1112 1161;;;;N;CIRCLED HANGUL HA;;;; -327F;KOREAN STANDARD SYMBOL;So;0;L;;;;;N;;;;; -3280;CIRCLED IDEOGRAPH ONE;No;0;L;<circle> 4E00;;;1;N;;;;; -3281;CIRCLED IDEOGRAPH TWO;No;0;L;<circle> 4E8C;;;2;N;;;;; -3282;CIRCLED IDEOGRAPH THREE;No;0;L;<circle> 4E09;;;3;N;;;;; -3283;CIRCLED IDEOGRAPH FOUR;No;0;L;<circle> 56DB;;;4;N;;;;; -3284;CIRCLED IDEOGRAPH FIVE;No;0;L;<circle> 4E94;;;5;N;;;;; -3285;CIRCLED IDEOGRAPH SIX;No;0;L;<circle> 516D;;;6;N;;;;; -3286;CIRCLED IDEOGRAPH SEVEN;No;0;L;<circle> 4E03;;;7;N;;;;; -3287;CIRCLED IDEOGRAPH EIGHT;No;0;L;<circle> 516B;;;8;N;;;;; -3288;CIRCLED IDEOGRAPH NINE;No;0;L;<circle> 4E5D;;;9;N;;;;; -3289;CIRCLED IDEOGRAPH TEN;No;0;L;<circle> 5341;;;10;N;;;;; -328A;CIRCLED IDEOGRAPH MOON;So;0;L;<circle> 6708;;;;N;;;;; -328B;CIRCLED IDEOGRAPH FIRE;So;0;L;<circle> 706B;;;;N;;;;; -328C;CIRCLED IDEOGRAPH WATER;So;0;L;<circle> 6C34;;;;N;;;;; -328D;CIRCLED IDEOGRAPH WOOD;So;0;L;<circle> 6728;;;;N;;;;; -328E;CIRCLED IDEOGRAPH METAL;So;0;L;<circle> 91D1;;;;N;;;;; -328F;CIRCLED IDEOGRAPH EARTH;So;0;L;<circle> 571F;;;;N;;;;; -3290;CIRCLED IDEOGRAPH SUN;So;0;L;<circle> 65E5;;;;N;;;;; -3291;CIRCLED IDEOGRAPH STOCK;So;0;L;<circle> 682A;;;;N;;;;; -3292;CIRCLED IDEOGRAPH HAVE;So;0;L;<circle> 6709;;;;N;;;;; -3293;CIRCLED IDEOGRAPH SOCIETY;So;0;L;<circle> 793E;;;;N;;;;; -3294;CIRCLED IDEOGRAPH NAME;So;0;L;<circle> 540D;;;;N;;;;; -3295;CIRCLED IDEOGRAPH SPECIAL;So;0;L;<circle> 7279;;;;N;;;;; -3296;CIRCLED IDEOGRAPH FINANCIAL;So;0;L;<circle> 8CA1;;;;N;;;;; -3297;CIRCLED IDEOGRAPH CONGRATULATION;So;0;L;<circle> 795D;;;;N;;;;; -3298;CIRCLED IDEOGRAPH LABOR;So;0;L;<circle> 52B4;;;;N;;;;; -3299;CIRCLED IDEOGRAPH SECRET;So;0;L;<circle> 79D8;;;;N;;;;; -329A;CIRCLED IDEOGRAPH MALE;So;0;L;<circle> 7537;;;;N;;;;; -329B;CIRCLED IDEOGRAPH FEMALE;So;0;L;<circle> 5973;;;;N;;;;; -329C;CIRCLED IDEOGRAPH SUITABLE;So;0;L;<circle> 9069;;;;N;;;;; -329D;CIRCLED IDEOGRAPH EXCELLENT;So;0;L;<circle> 512A;;;;N;;;;; -329E;CIRCLED IDEOGRAPH PRINT;So;0;L;<circle> 5370;;;;N;;;;; -329F;CIRCLED IDEOGRAPH ATTENTION;So;0;L;<circle> 6CE8;;;;N;;;;; -32A0;CIRCLED IDEOGRAPH ITEM;So;0;L;<circle> 9805;;;;N;;;;; -32A1;CIRCLED IDEOGRAPH REST;So;0;L;<circle> 4F11;;;;N;;;;; -32A2;CIRCLED IDEOGRAPH COPY;So;0;L;<circle> 5199;;;;N;;;;; -32A3;CIRCLED IDEOGRAPH CORRECT;So;0;L;<circle> 6B63;;;;N;;;;; -32A4;CIRCLED IDEOGRAPH HIGH;So;0;L;<circle> 4E0A;;;;N;;;;; -32A5;CIRCLED IDEOGRAPH CENTRE;So;0;L;<circle> 4E2D;;;;N;CIRCLED IDEOGRAPH CENTER;;;; -32A6;CIRCLED IDEOGRAPH LOW;So;0;L;<circle> 4E0B;;;;N;;;;; -32A7;CIRCLED IDEOGRAPH LEFT;So;0;L;<circle> 5DE6;;;;N;;;;; -32A8;CIRCLED IDEOGRAPH RIGHT;So;0;L;<circle> 53F3;;;;N;;;;; -32A9;CIRCLED IDEOGRAPH MEDICINE;So;0;L;<circle> 533B;;;;N;;;;; -32AA;CIRCLED IDEOGRAPH RELIGION;So;0;L;<circle> 5B97;;;;N;;;;; -32AB;CIRCLED IDEOGRAPH STUDY;So;0;L;<circle> 5B66;;;;N;;;;; -32AC;CIRCLED IDEOGRAPH SUPERVISE;So;0;L;<circle> 76E3;;;;N;;;;; -32AD;CIRCLED IDEOGRAPH ENTERPRISE;So;0;L;<circle> 4F01;;;;N;;;;; -32AE;CIRCLED IDEOGRAPH RESOURCE;So;0;L;<circle> 8CC7;;;;N;;;;; -32AF;CIRCLED IDEOGRAPH ALLIANCE;So;0;L;<circle> 5354;;;;N;;;;; -32B0;CIRCLED IDEOGRAPH NIGHT;So;0;L;<circle> 591C;;;;N;;;;; -32C0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY;So;0;L;<compat> 0031 6708;;;;N;;;;; -32C1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR FEBRUARY;So;0;L;<compat> 0032 6708;;;;N;;;;; -32C2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MARCH;So;0;L;<compat> 0033 6708;;;;N;;;;; -32C3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR APRIL;So;0;L;<compat> 0034 6708;;;;N;;;;; -32C4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MAY;So;0;L;<compat> 0035 6708;;;;N;;;;; -32C5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JUNE;So;0;L;<compat> 0036 6708;;;;N;;;;; -32C6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JULY;So;0;L;<compat> 0037 6708;;;;N;;;;; -32C7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR AUGUST;So;0;L;<compat> 0038 6708;;;;N;;;;; -32C8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR SEPTEMBER;So;0;L;<compat> 0039 6708;;;;N;;;;; -32C9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER;So;0;L;<compat> 0031 0030 6708;;;;N;;;;; -32CA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR NOVEMBER;So;0;L;<compat> 0031 0031 6708;;;;N;;;;; -32CB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DECEMBER;So;0;L;<compat> 0031 0032 6708;;;;N;;;;; -32D0;CIRCLED KATAKANA A;So;0;L;<circle> 30A2;;;;N;;;;; -32D1;CIRCLED KATAKANA I;So;0;L;<circle> 30A4;;;;N;;;;; -32D2;CIRCLED KATAKANA U;So;0;L;<circle> 30A6;;;;N;;;;; -32D3;CIRCLED KATAKANA E;So;0;L;<circle> 30A8;;;;N;;;;; -32D4;CIRCLED KATAKANA O;So;0;L;<circle> 30AA;;;;N;;;;; -32D5;CIRCLED KATAKANA KA;So;0;L;<circle> 30AB;;;;N;;;;; -32D6;CIRCLED KATAKANA KI;So;0;L;<circle> 30AD;;;;N;;;;; -32D7;CIRCLED KATAKANA KU;So;0;L;<circle> 30AF;;;;N;;;;; -32D8;CIRCLED KATAKANA KE;So;0;L;<circle> 30B1;;;;N;;;;; -32D9;CIRCLED KATAKANA KO;So;0;L;<circle> 30B3;;;;N;;;;; -32DA;CIRCLED KATAKANA SA;So;0;L;<circle> 30B5;;;;N;;;;; -32DB;CIRCLED KATAKANA SI;So;0;L;<circle> 30B7;;;;N;;;;; -32DC;CIRCLED KATAKANA SU;So;0;L;<circle> 30B9;;;;N;;;;; -32DD;CIRCLED KATAKANA SE;So;0;L;<circle> 30BB;;;;N;;;;; -32DE;CIRCLED KATAKANA SO;So;0;L;<circle> 30BD;;;;N;;;;; -32DF;CIRCLED KATAKANA TA;So;0;L;<circle> 30BF;;;;N;;;;; -32E0;CIRCLED KATAKANA TI;So;0;L;<circle> 30C1;;;;N;;;;; -32E1;CIRCLED KATAKANA TU;So;0;L;<circle> 30C4;;;;N;;;;; -32E2;CIRCLED KATAKANA TE;So;0;L;<circle> 30C6;;;;N;;;;; -32E3;CIRCLED KATAKANA TO;So;0;L;<circle> 30C8;;;;N;;;;; -32E4;CIRCLED KATAKANA NA;So;0;L;<circle> 30CA;;;;N;;;;; -32E5;CIRCLED KATAKANA NI;So;0;L;<circle> 30CB;;;;N;;;;; -32E6;CIRCLED KATAKANA NU;So;0;L;<circle> 30CC;;;;N;;;;; -32E7;CIRCLED KATAKANA NE;So;0;L;<circle> 30CD;;;;N;;;;; -32E8;CIRCLED KATAKANA NO;So;0;L;<circle> 30CE;;;;N;;;;; -32E9;CIRCLED KATAKANA HA;So;0;L;<circle> 30CF;;;;N;;;;; -32EA;CIRCLED KATAKANA HI;So;0;L;<circle> 30D2;;;;N;;;;; -32EB;CIRCLED KATAKANA HU;So;0;L;<circle> 30D5;;;;N;;;;; -32EC;CIRCLED KATAKANA HE;So;0;L;<circle> 30D8;;;;N;;;;; -32ED;CIRCLED KATAKANA HO;So;0;L;<circle> 30DB;;;;N;;;;; -32EE;CIRCLED KATAKANA MA;So;0;L;<circle> 30DE;;;;N;;;;; -32EF;CIRCLED KATAKANA MI;So;0;L;<circle> 30DF;;;;N;;;;; -32F0;CIRCLED KATAKANA MU;So;0;L;<circle> 30E0;;;;N;;;;; -32F1;CIRCLED KATAKANA ME;So;0;L;<circle> 30E1;;;;N;;;;; -32F2;CIRCLED KATAKANA MO;So;0;L;<circle> 30E2;;;;N;;;;; -32F3;CIRCLED KATAKANA YA;So;0;L;<circle> 30E4;;;;N;;;;; -32F4;CIRCLED KATAKANA YU;So;0;L;<circle> 30E6;;;;N;;;;; -32F5;CIRCLED KATAKANA YO;So;0;L;<circle> 30E8;;;;N;;;;; -32F6;CIRCLED KATAKANA RA;So;0;L;<circle> 30E9;;;;N;;;;; -32F7;CIRCLED KATAKANA RI;So;0;L;<circle> 30EA;;;;N;;;;; -32F8;CIRCLED KATAKANA RU;So;0;L;<circle> 30EB;;;;N;;;;; -32F9;CIRCLED KATAKANA RE;So;0;L;<circle> 30EC;;;;N;;;;; -32FA;CIRCLED KATAKANA RO;So;0;L;<circle> 30ED;;;;N;;;;; -32FB;CIRCLED KATAKANA WA;So;0;L;<circle> 30EF;;;;N;;;;; -32FC;CIRCLED KATAKANA WI;So;0;L;<circle> 30F0;;;;N;;;;; -32FD;CIRCLED KATAKANA WE;So;0;L;<circle> 30F1;;;;N;;;;; -32FE;CIRCLED KATAKANA WO;So;0;L;<circle> 30F2;;;;N;;;;; -3300;SQUARE APAATO;So;0;L;<square> 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; -3301;SQUARE ARUHUA;So;0;L;<square> 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; -3302;SQUARE ANPEA;So;0;L;<square> 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; -3303;SQUARE AARU;So;0;L;<square> 30A2 30FC 30EB;;;;N;SQUARED AARU;;;; -3304;SQUARE ININGU;So;0;L;<square> 30A4 30CB 30F3 30B0;;;;N;SQUARED ININGU;;;; -3305;SQUARE INTI;So;0;L;<square> 30A4 30F3 30C1;;;;N;SQUARED INTI;;;; -3306;SQUARE UON;So;0;L;<square> 30A6 30A9 30F3;;;;N;SQUARED UON;;;; -3307;SQUARE ESUKUUDO;So;0;L;<square> 30A8 30B9 30AF 30FC 30C9;;;;N;SQUARED ESUKUUDO;;;; -3308;SQUARE EEKAA;So;0;L;<square> 30A8 30FC 30AB 30FC;;;;N;SQUARED EEKAA;;;; -3309;SQUARE ONSU;So;0;L;<square> 30AA 30F3 30B9;;;;N;SQUARED ONSU;;;; -330A;SQUARE OOMU;So;0;L;<square> 30AA 30FC 30E0;;;;N;SQUARED OOMU;;;; -330B;SQUARE KAIRI;So;0;L;<square> 30AB 30A4 30EA;;;;N;SQUARED KAIRI;;;; -330C;SQUARE KARATTO;So;0;L;<square> 30AB 30E9 30C3 30C8;;;;N;SQUARED KARATTO;;;; -330D;SQUARE KARORII;So;0;L;<square> 30AB 30ED 30EA 30FC;;;;N;SQUARED KARORII;;;; -330E;SQUARE GARON;So;0;L;<square> 30AC 30ED 30F3;;;;N;SQUARED GARON;;;; -330F;SQUARE GANMA;So;0;L;<square> 30AC 30F3 30DE;;;;N;SQUARED GANMA;;;; -3310;SQUARE GIGA;So;0;L;<square> 30AE 30AC;;;;N;SQUARED GIGA;;;; -3311;SQUARE GINII;So;0;L;<square> 30AE 30CB 30FC;;;;N;SQUARED GINII;;;; -3312;SQUARE KYURII;So;0;L;<square> 30AD 30E5 30EA 30FC;;;;N;SQUARED KYURII;;;; -3313;SQUARE GIRUDAA;So;0;L;<square> 30AE 30EB 30C0 30FC;;;;N;SQUARED GIRUDAA;;;; -3314;SQUARE KIRO;So;0;L;<square> 30AD 30ED;;;;N;SQUARED KIRO;;;; -3315;SQUARE KIROGURAMU;So;0;L;<square> 30AD 30ED 30B0 30E9 30E0;;;;N;SQUARED KIROGURAMU;;;; -3316;SQUARE KIROMEETORU;So;0;L;<square> 30AD 30ED 30E1 30FC 30C8 30EB;;;;N;SQUARED KIROMEETORU;;;; -3317;SQUARE KIROWATTO;So;0;L;<square> 30AD 30ED 30EF 30C3 30C8;;;;N;SQUARED KIROWATTO;;;; -3318;SQUARE GURAMU;So;0;L;<square> 30B0 30E9 30E0;;;;N;SQUARED GURAMU;;;; -3319;SQUARE GURAMUTON;So;0;L;<square> 30B0 30E9 30E0 30C8 30F3;;;;N;SQUARED GURAMUTON;;;; -331A;SQUARE KURUZEIRO;So;0;L;<square> 30AF 30EB 30BC 30A4 30ED;;;;N;SQUARED KURUZEIRO;;;; -331B;SQUARE KUROONE;So;0;L;<square> 30AF 30ED 30FC 30CD;;;;N;SQUARED KUROONE;;;; -331C;SQUARE KEESU;So;0;L;<square> 30B1 30FC 30B9;;;;N;SQUARED KEESU;;;; -331D;SQUARE KORUNA;So;0;L;<square> 30B3 30EB 30CA;;;;N;SQUARED KORUNA;;;; -331E;SQUARE KOOPO;So;0;L;<square> 30B3 30FC 30DD;;;;N;SQUARED KOOPO;;;; -331F;SQUARE SAIKURU;So;0;L;<square> 30B5 30A4 30AF 30EB;;;;N;SQUARED SAIKURU;;;; -3320;SQUARE SANTIIMU;So;0;L;<square> 30B5 30F3 30C1 30FC 30E0;;;;N;SQUARED SANTIIMU;;;; -3321;SQUARE SIRINGU;So;0;L;<square> 30B7 30EA 30F3 30B0;;;;N;SQUARED SIRINGU;;;; -3322;SQUARE SENTI;So;0;L;<square> 30BB 30F3 30C1;;;;N;SQUARED SENTI;;;; -3323;SQUARE SENTO;So;0;L;<square> 30BB 30F3 30C8;;;;N;SQUARED SENTO;;;; -3324;SQUARE DAASU;So;0;L;<square> 30C0 30FC 30B9;;;;N;SQUARED DAASU;;;; -3325;SQUARE DESI;So;0;L;<square> 30C7 30B7;;;;N;SQUARED DESI;;;; -3326;SQUARE DORU;So;0;L;<square> 30C9 30EB;;;;N;SQUARED DORU;;;; -3327;SQUARE TON;So;0;L;<square> 30C8 30F3;;;;N;SQUARED TON;;;; -3328;SQUARE NANO;So;0;L;<square> 30CA 30CE;;;;N;SQUARED NANO;;;; -3329;SQUARE NOTTO;So;0;L;<square> 30CE 30C3 30C8;;;;N;SQUARED NOTTO;;;; -332A;SQUARE HAITU;So;0;L;<square> 30CF 30A4 30C4;;;;N;SQUARED HAITU;;;; -332B;SQUARE PAASENTO;So;0;L;<square> 30D1 30FC 30BB 30F3 30C8;;;;N;SQUARED PAASENTO;;;; -332C;SQUARE PAATU;So;0;L;<square> 30D1 30FC 30C4;;;;N;SQUARED PAATU;;;; -332D;SQUARE BAARERU;So;0;L;<square> 30D0 30FC 30EC 30EB;;;;N;SQUARED BAARERU;;;; -332E;SQUARE PIASUTORU;So;0;L;<square> 30D4 30A2 30B9 30C8 30EB;;;;N;SQUARED PIASUTORU;;;; -332F;SQUARE PIKURU;So;0;L;<square> 30D4 30AF 30EB;;;;N;SQUARED PIKURU;;;; -3330;SQUARE PIKO;So;0;L;<square> 30D4 30B3;;;;N;SQUARED PIKO;;;; -3331;SQUARE BIRU;So;0;L;<square> 30D3 30EB;;;;N;SQUARED BIRU;;;; -3332;SQUARE HUARADDO;So;0;L;<square> 30D5 30A1 30E9 30C3 30C9;;;;N;SQUARED HUARADDO;;;; -3333;SQUARE HUIITO;So;0;L;<square> 30D5 30A3 30FC 30C8;;;;N;SQUARED HUIITO;;;; -3334;SQUARE BUSSYERU;So;0;L;<square> 30D6 30C3 30B7 30A7 30EB;;;;N;SQUARED BUSSYERU;;;; -3335;SQUARE HURAN;So;0;L;<square> 30D5 30E9 30F3;;;;N;SQUARED HURAN;;;; -3336;SQUARE HEKUTAARU;So;0;L;<square> 30D8 30AF 30BF 30FC 30EB;;;;N;SQUARED HEKUTAARU;;;; -3337;SQUARE PESO;So;0;L;<square> 30DA 30BD;;;;N;SQUARED PESO;;;; -3338;SQUARE PENIHI;So;0;L;<square> 30DA 30CB 30D2;;;;N;SQUARED PENIHI;;;; -3339;SQUARE HERUTU;So;0;L;<square> 30D8 30EB 30C4;;;;N;SQUARED HERUTU;;;; -333A;SQUARE PENSU;So;0;L;<square> 30DA 30F3 30B9;;;;N;SQUARED PENSU;;;; -333B;SQUARE PEEZI;So;0;L;<square> 30DA 30FC 30B8;;;;N;SQUARED PEEZI;;;; -333C;SQUARE BEETA;So;0;L;<square> 30D9 30FC 30BF;;;;N;SQUARED BEETA;;;; -333D;SQUARE POINTO;So;0;L;<square> 30DD 30A4 30F3 30C8;;;;N;SQUARED POINTO;;;; -333E;SQUARE BORUTO;So;0;L;<square> 30DC 30EB 30C8;;;;N;SQUARED BORUTO;;;; -333F;SQUARE HON;So;0;L;<square> 30DB 30F3;;;;N;SQUARED HON;;;; -3340;SQUARE PONDO;So;0;L;<square> 30DD 30F3 30C9;;;;N;SQUARED PONDO;;;; -3341;SQUARE HOORU;So;0;L;<square> 30DB 30FC 30EB;;;;N;SQUARED HOORU;;;; -3342;SQUARE HOON;So;0;L;<square> 30DB 30FC 30F3;;;;N;SQUARED HOON;;;; -3343;SQUARE MAIKURO;So;0;L;<square> 30DE 30A4 30AF 30ED;;;;N;SQUARED MAIKURO;;;; -3344;SQUARE MAIRU;So;0;L;<square> 30DE 30A4 30EB;;;;N;SQUARED MAIRU;;;; -3345;SQUARE MAHHA;So;0;L;<square> 30DE 30C3 30CF;;;;N;SQUARED MAHHA;;;; -3346;SQUARE MARUKU;So;0;L;<square> 30DE 30EB 30AF;;;;N;SQUARED MARUKU;;;; -3347;SQUARE MANSYON;So;0;L;<square> 30DE 30F3 30B7 30E7 30F3;;;;N;SQUARED MANSYON;;;; -3348;SQUARE MIKURON;So;0;L;<square> 30DF 30AF 30ED 30F3;;;;N;SQUARED MIKURON;;;; -3349;SQUARE MIRI;So;0;L;<square> 30DF 30EA;;;;N;SQUARED MIRI;;;; -334A;SQUARE MIRIBAARU;So;0;L;<square> 30DF 30EA 30D0 30FC 30EB;;;;N;SQUARED MIRIBAARU;;;; -334B;SQUARE MEGA;So;0;L;<square> 30E1 30AC;;;;N;SQUARED MEGA;;;; -334C;SQUARE MEGATON;So;0;L;<square> 30E1 30AC 30C8 30F3;;;;N;SQUARED MEGATON;;;; -334D;SQUARE MEETORU;So;0;L;<square> 30E1 30FC 30C8 30EB;;;;N;SQUARED MEETORU;;;; -334E;SQUARE YAADO;So;0;L;<square> 30E4 30FC 30C9;;;;N;SQUARED YAADO;;;; -334F;SQUARE YAARU;So;0;L;<square> 30E4 30FC 30EB;;;;N;SQUARED YAARU;;;; -3350;SQUARE YUAN;So;0;L;<square> 30E6 30A2 30F3;;;;N;SQUARED YUAN;;;; -3351;SQUARE RITTORU;So;0;L;<square> 30EA 30C3 30C8 30EB;;;;N;SQUARED RITTORU;;;; -3352;SQUARE RIRA;So;0;L;<square> 30EA 30E9;;;;N;SQUARED RIRA;;;; -3353;SQUARE RUPII;So;0;L;<square> 30EB 30D4 30FC;;;;N;SQUARED RUPII;;;; -3354;SQUARE RUUBURU;So;0;L;<square> 30EB 30FC 30D6 30EB;;;;N;SQUARED RUUBURU;;;; -3355;SQUARE REMU;So;0;L;<square> 30EC 30E0;;;;N;SQUARED REMU;;;; -3356;SQUARE RENTOGEN;So;0;L;<square> 30EC 30F3 30C8 30B2 30F3;;;;N;SQUARED RENTOGEN;;;; -3357;SQUARE WATTO;So;0;L;<square> 30EF 30C3 30C8;;;;N;SQUARED WATTO;;;; -3358;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO;So;0;L;<compat> 0030 70B9;;;;N;;;;; -3359;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ONE;So;0;L;<compat> 0031 70B9;;;;N;;;;; -335A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWO;So;0;L;<compat> 0032 70B9;;;;N;;;;; -335B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THREE;So;0;L;<compat> 0033 70B9;;;;N;;;;; -335C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOUR;So;0;L;<compat> 0034 70B9;;;;N;;;;; -335D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIVE;So;0;L;<compat> 0035 70B9;;;;N;;;;; -335E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIX;So;0;L;<compat> 0036 70B9;;;;N;;;;; -335F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVEN;So;0;L;<compat> 0037 70B9;;;;N;;;;; -3360;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHT;So;0;L;<compat> 0038 70B9;;;;N;;;;; -3361;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINE;So;0;L;<compat> 0039 70B9;;;;N;;;;; -3362;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TEN;So;0;L;<compat> 0031 0030 70B9;;;;N;;;;; -3363;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ELEVEN;So;0;L;<compat> 0031 0031 70B9;;;;N;;;;; -3364;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWELVE;So;0;L;<compat> 0031 0032 70B9;;;;N;;;;; -3365;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THIRTEEN;So;0;L;<compat> 0031 0033 70B9;;;;N;;;;; -3366;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOURTEEN;So;0;L;<compat> 0031 0034 70B9;;;;N;;;;; -3367;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIFTEEN;So;0;L;<compat> 0031 0035 70B9;;;;N;;;;; -3368;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIXTEEN;So;0;L;<compat> 0031 0036 70B9;;;;N;;;;; -3369;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVENTEEN;So;0;L;<compat> 0031 0037 70B9;;;;N;;;;; -336A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHTEEN;So;0;L;<compat> 0031 0038 70B9;;;;N;;;;; -336B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINETEEN;So;0;L;<compat> 0031 0039 70B9;;;;N;;;;; -336C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY;So;0;L;<compat> 0032 0030 70B9;;;;N;;;;; -336D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-ONE;So;0;L;<compat> 0032 0031 70B9;;;;N;;;;; -336E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-TWO;So;0;L;<compat> 0032 0032 70B9;;;;N;;;;; -336F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-THREE;So;0;L;<compat> 0032 0033 70B9;;;;N;;;;; -3370;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-FOUR;So;0;L;<compat> 0032 0034 70B9;;;;N;;;;; -3371;SQUARE HPA;So;0;L;<square> 0068 0050 0061;;;;N;;;;; -3372;SQUARE DA;So;0;L;<square> 0064 0061;;;;N;;;;; -3373;SQUARE AU;So;0;L;<square> 0041 0055;;;;N;;;;; -3374;SQUARE BAR;So;0;L;<square> 0062 0061 0072;;;;N;;;;; -3375;SQUARE OV;So;0;L;<square> 006F 0056;;;;N;;;;; -3376;SQUARE PC;So;0;L;<square> 0070 0063;;;;N;;;;; -337B;SQUARE ERA NAME HEISEI;So;0;L;<square> 5E73 6210;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME HEISEI;;;; -337C;SQUARE ERA NAME SYOUWA;So;0;L;<square> 662D 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME SYOUWA;;;; -337D;SQUARE ERA NAME TAISYOU;So;0;L;<square> 5927 6B63;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME TAISYOU;;;; -337E;SQUARE ERA NAME MEIZI;So;0;L;<square> 660E 6CBB;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME MEIZI;;;; -337F;SQUARE CORPORATION;So;0;L;<square> 682A 5F0F 4F1A 793E;;;;N;SQUARED FOUR IDEOGRAPHS CORPORATION;;;; -3380;SQUARE PA AMPS;So;0;L;<square> 0070 0041;;;;N;SQUARED PA AMPS;;;; -3381;SQUARE NA;So;0;L;<square> 006E 0041;;;;N;SQUARED NA;;;; -3382;SQUARE MU A;So;0;L;<square> 03BC 0041;;;;N;SQUARED MU A;;;; -3383;SQUARE MA;So;0;L;<square> 006D 0041;;;;N;SQUARED MA;;;; -3384;SQUARE KA;So;0;L;<square> 006B 0041;;;;N;SQUARED KA;;;; -3385;SQUARE KB;So;0;L;<square> 004B 0042;;;;N;SQUARED KB;;;; -3386;SQUARE MB;So;0;L;<square> 004D 0042;;;;N;SQUARED MB;;;; -3387;SQUARE GB;So;0;L;<square> 0047 0042;;;;N;SQUARED GB;;;; -3388;SQUARE CAL;So;0;L;<square> 0063 0061 006C;;;;N;SQUARED CAL;;;; -3389;SQUARE KCAL;So;0;L;<square> 006B 0063 0061 006C;;;;N;SQUARED KCAL;;;; -338A;SQUARE PF;So;0;L;<square> 0070 0046;;;;N;SQUARED PF;;;; -338B;SQUARE NF;So;0;L;<square> 006E 0046;;;;N;SQUARED NF;;;; -338C;SQUARE MU F;So;0;L;<square> 03BC 0046;;;;N;SQUARED MU F;;;; -338D;SQUARE MU G;So;0;L;<square> 03BC 0067;;;;N;SQUARED MU G;;;; -338E;SQUARE MG;So;0;L;<square> 006D 0067;;;;N;SQUARED MG;;;; -338F;SQUARE KG;So;0;L;<square> 006B 0067;;;;N;SQUARED KG;;;; -3390;SQUARE HZ;So;0;L;<square> 0048 007A;;;;N;SQUARED HZ;;;; -3391;SQUARE KHZ;So;0;L;<square> 006B 0048 007A;;;;N;SQUARED KHZ;;;; -3392;SQUARE MHZ;So;0;L;<square> 004D 0048 007A;;;;N;SQUARED MHZ;;;; -3393;SQUARE GHZ;So;0;L;<square> 0047 0048 007A;;;;N;SQUARED GHZ;;;; -3394;SQUARE THZ;So;0;L;<square> 0054 0048 007A;;;;N;SQUARED THZ;;;; -3395;SQUARE MU L;So;0;L;<square> 03BC 2113;;;;N;SQUARED MU L;;;; -3396;SQUARE ML;So;0;L;<square> 006D 2113;;;;N;SQUARED ML;;;; -3397;SQUARE DL;So;0;L;<square> 0064 2113;;;;N;SQUARED DL;;;; -3398;SQUARE KL;So;0;L;<square> 006B 2113;;;;N;SQUARED KL;;;; -3399;SQUARE FM;So;0;L;<square> 0066 006D;;;;N;SQUARED FM;;;; -339A;SQUARE NM;So;0;L;<square> 006E 006D;;;;N;SQUARED NM;;;; -339B;SQUARE MU M;So;0;L;<square> 03BC 006D;;;;N;SQUARED MU M;;;; -339C;SQUARE MM;So;0;L;<square> 006D 006D;;;;N;SQUARED MM;;;; -339D;SQUARE CM;So;0;L;<square> 0063 006D;;;;N;SQUARED CM;;;; -339E;SQUARE KM;So;0;L;<square> 006B 006D;;;;N;SQUARED KM;;;; -339F;SQUARE MM SQUARED;So;0;L;<square> 006D 006D 00B2;;;;N;SQUARED MM SQUARED;;;; -33A0;SQUARE CM SQUARED;So;0;L;<square> 0063 006D 00B2;;;;N;SQUARED CM SQUARED;;;; -33A1;SQUARE M SQUARED;So;0;L;<square> 006D 00B2;;;;N;SQUARED M SQUARED;;;; -33A2;SQUARE KM SQUARED;So;0;L;<square> 006B 006D 00B2;;;;N;SQUARED KM SQUARED;;;; -33A3;SQUARE MM CUBED;So;0;L;<square> 006D 006D 00B3;;;;N;SQUARED MM CUBED;;;; -33A4;SQUARE CM CUBED;So;0;L;<square> 0063 006D 00B3;;;;N;SQUARED CM CUBED;;;; -33A5;SQUARE M CUBED;So;0;L;<square> 006D 00B3;;;;N;SQUARED M CUBED;;;; -33A6;SQUARE KM CUBED;So;0;L;<square> 006B 006D 00B3;;;;N;SQUARED KM CUBED;;;; -33A7;SQUARE M OVER S;So;0;L;<square> 006D 2215 0073;;;;N;SQUARED M OVER S;;;; -33A8;SQUARE M OVER S SQUARED;So;0;L;<square> 006D 2215 0073 00B2;;;;N;SQUARED M OVER S SQUARED;;;; -33A9;SQUARE PA;So;0;L;<square> 0050 0061;;;;N;SQUARED PA;;;; -33AA;SQUARE KPA;So;0;L;<square> 006B 0050 0061;;;;N;SQUARED KPA;;;; -33AB;SQUARE MPA;So;0;L;<square> 004D 0050 0061;;;;N;SQUARED MPA;;;; -33AC;SQUARE GPA;So;0;L;<square> 0047 0050 0061;;;;N;SQUARED GPA;;;; -33AD;SQUARE RAD;So;0;L;<square> 0072 0061 0064;;;;N;SQUARED RAD;;;; -33AE;SQUARE RAD OVER S;So;0;L;<square> 0072 0061 0064 2215 0073;;;;N;SQUARED RAD OVER S;;;; -33AF;SQUARE RAD OVER S SQUARED;So;0;L;<square> 0072 0061 0064 2215 0073 00B2;;;;N;SQUARED RAD OVER S SQUARED;;;; -33B0;SQUARE PS;So;0;L;<square> 0070 0073;;;;N;SQUARED PS;;;; -33B1;SQUARE NS;So;0;L;<square> 006E 0073;;;;N;SQUARED NS;;;; -33B2;SQUARE MU S;So;0;L;<square> 03BC 0073;;;;N;SQUARED MU S;;;; -33B3;SQUARE MS;So;0;L;<square> 006D 0073;;;;N;SQUARED MS;;;; -33B4;SQUARE PV;So;0;L;<square> 0070 0056;;;;N;SQUARED PV;;;; -33B5;SQUARE NV;So;0;L;<square> 006E 0056;;;;N;SQUARED NV;;;; -33B6;SQUARE MU V;So;0;L;<square> 03BC 0056;;;;N;SQUARED MU V;;;; -33B7;SQUARE MV;So;0;L;<square> 006D 0056;;;;N;SQUARED MV;;;; -33B8;SQUARE KV;So;0;L;<square> 006B 0056;;;;N;SQUARED KV;;;; -33B9;SQUARE MV MEGA;So;0;L;<square> 004D 0056;;;;N;SQUARED MV MEGA;;;; -33BA;SQUARE PW;So;0;L;<square> 0070 0057;;;;N;SQUARED PW;;;; -33BB;SQUARE NW;So;0;L;<square> 006E 0057;;;;N;SQUARED NW;;;; -33BC;SQUARE MU W;So;0;L;<square> 03BC 0057;;;;N;SQUARED MU W;;;; -33BD;SQUARE MW;So;0;L;<square> 006D 0057;;;;N;SQUARED MW;;;; -33BE;SQUARE KW;So;0;L;<square> 006B 0057;;;;N;SQUARED KW;;;; -33BF;SQUARE MW MEGA;So;0;L;<square> 004D 0057;;;;N;SQUARED MW MEGA;;;; -33C0;SQUARE K OHM;So;0;L;<square> 006B 03A9;;;;N;SQUARED K OHM;;;; -33C1;SQUARE M OHM;So;0;L;<square> 004D 03A9;;;;N;SQUARED M OHM;;;; -33C2;SQUARE AM;So;0;L;<square> 0061 002E 006D 002E;;;;N;SQUARED AM;;;; -33C3;SQUARE BQ;So;0;L;<square> 0042 0071;;;;N;SQUARED BQ;;;; -33C4;SQUARE CC;So;0;L;<square> 0063 0063;;;;N;SQUARED CC;;;; -33C5;SQUARE CD;So;0;L;<square> 0063 0064;;;;N;SQUARED CD;;;; -33C6;SQUARE C OVER KG;So;0;L;<square> 0043 2215 006B 0067;;;;N;SQUARED C OVER KG;;;; -33C7;SQUARE CO;So;0;L;<square> 0043 006F 002E;;;;N;SQUARED CO;;;; -33C8;SQUARE DB;So;0;L;<square> 0064 0042;;;;N;SQUARED DB;;;; -33C9;SQUARE GY;So;0;L;<square> 0047 0079;;;;N;SQUARED GY;;;; -33CA;SQUARE HA;So;0;L;<square> 0068 0061;;;;N;SQUARED HA;;;; -33CB;SQUARE HP;So;0;L;<square> 0048 0050;;;;N;SQUARED HP;;;; -33CC;SQUARE IN;So;0;L;<square> 0069 006E;;;;N;SQUARED IN;;;; -33CD;SQUARE KK;So;0;L;<square> 004B 004B;;;;N;SQUARED KK;;;; -33CE;SQUARE KM CAPITAL;So;0;L;<square> 004B 004D;;;;N;SQUARED KM CAPITAL;;;; -33CF;SQUARE KT;So;0;L;<square> 006B 0074;;;;N;SQUARED KT;;;; -33D0;SQUARE LM;So;0;L;<square> 006C 006D;;;;N;SQUARED LM;;;; -33D1;SQUARE LN;So;0;L;<square> 006C 006E;;;;N;SQUARED LN;;;; -33D2;SQUARE LOG;So;0;L;<square> 006C 006F 0067;;;;N;SQUARED LOG;;;; -33D3;SQUARE LX;So;0;L;<square> 006C 0078;;;;N;SQUARED LX;;;; -33D4;SQUARE MB SMALL;So;0;L;<square> 006D 0062;;;;N;SQUARED MB SMALL;;;; -33D5;SQUARE MIL;So;0;L;<square> 006D 0069 006C;;;;N;SQUARED MIL;;;; -33D6;SQUARE MOL;So;0;L;<square> 006D 006F 006C;;;;N;SQUARED MOL;;;; -33D7;SQUARE PH;So;0;L;<square> 0050 0048;;;;N;SQUARED PH;;;; -33D8;SQUARE PM;So;0;L;<square> 0070 002E 006D 002E;;;;N;SQUARED PM;;;; -33D9;SQUARE PPM;So;0;L;<square> 0050 0050 004D;;;;N;SQUARED PPM;;;; -33DA;SQUARE PR;So;0;L;<square> 0050 0052;;;;N;SQUARED PR;;;; -33DB;SQUARE SR;So;0;L;<square> 0073 0072;;;;N;SQUARED SR;;;; -33DC;SQUARE SV;So;0;L;<square> 0053 0076;;;;N;SQUARED SV;;;; -33DD;SQUARE WB;So;0;L;<square> 0057 0062;;;;N;SQUARED WB;;;; -33E0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ONE;So;0;L;<compat> 0031 65E5;;;;N;;;;; -33E1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWO;So;0;L;<compat> 0032 65E5;;;;N;;;;; -33E2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THREE;So;0;L;<compat> 0033 65E5;;;;N;;;;; -33E3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOUR;So;0;L;<compat> 0034 65E5;;;;N;;;;; -33E4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIVE;So;0;L;<compat> 0035 65E5;;;;N;;;;; -33E5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX;So;0;L;<compat> 0036 65E5;;;;N;;;;; -33E6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVEN;So;0;L;<compat> 0037 65E5;;;;N;;;;; -33E7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHT;So;0;L;<compat> 0038 65E5;;;;N;;;;; -33E8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINE;So;0;L;<compat> 0039 65E5;;;;N;;;;; -33E9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TEN;So;0;L;<compat> 0031 0030 65E5;;;;N;;;;; -33EA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ELEVEN;So;0;L;<compat> 0031 0031 65E5;;;;N;;;;; -33EB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWELVE;So;0;L;<compat> 0031 0032 65E5;;;;N;;;;; -33EC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTEEN;So;0;L;<compat> 0031 0033 65E5;;;;N;;;;; -33ED;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOURTEEN;So;0;L;<compat> 0031 0034 65E5;;;;N;;;;; -33EE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIFTEEN;So;0;L;<compat> 0031 0035 65E5;;;;N;;;;; -33EF;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIXTEEN;So;0;L;<compat> 0031 0036 65E5;;;;N;;;;; -33F0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVENTEEN;So;0;L;<compat> 0031 0037 65E5;;;;N;;;;; -33F1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHTEEN;So;0;L;<compat> 0031 0038 65E5;;;;N;;;;; -33F2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINETEEN;So;0;L;<compat> 0031 0039 65E5;;;;N;;;;; -33F3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY;So;0;L;<compat> 0032 0030 65E5;;;;N;;;;; -33F4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-ONE;So;0;L;<compat> 0032 0031 65E5;;;;N;;;;; -33F5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-TWO;So;0;L;<compat> 0032 0032 65E5;;;;N;;;;; -33F6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-THREE;So;0;L;<compat> 0032 0033 65E5;;;;N;;;;; -33F7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FOUR;So;0;L;<compat> 0032 0034 65E5;;;;N;;;;; -33F8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FIVE;So;0;L;<compat> 0032 0035 65E5;;;;N;;;;; -33F9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SIX;So;0;L;<compat> 0032 0036 65E5;;;;N;;;;; -33FA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SEVEN;So;0;L;<compat> 0032 0037 65E5;;;;N;;;;; -33FB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-EIGHT;So;0;L;<compat> 0032 0038 65E5;;;;N;;;;; -33FC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-NINE;So;0;L;<compat> 0032 0039 65E5;;;;N;;;;; -33FD;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY;So;0;L;<compat> 0033 0030 65E5;;;;N;;;;; -33FE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE;So;0;L;<compat> 0033 0031 65E5;;;;N;;;;; -3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;; -4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;; -4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;; -9FA5;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;; -A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;; -A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;; -A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;; -A003;YI SYLLABLE IP;Lo;0;L;;;;;N;;;;; -A004;YI SYLLABLE IET;Lo;0;L;;;;;N;;;;; -A005;YI SYLLABLE IEX;Lo;0;L;;;;;N;;;;; -A006;YI SYLLABLE IE;Lo;0;L;;;;;N;;;;; -A007;YI SYLLABLE IEP;Lo;0;L;;;;;N;;;;; -A008;YI SYLLABLE AT;Lo;0;L;;;;;N;;;;; -A009;YI SYLLABLE AX;Lo;0;L;;;;;N;;;;; -A00A;YI SYLLABLE A;Lo;0;L;;;;;N;;;;; -A00B;YI SYLLABLE AP;Lo;0;L;;;;;N;;;;; -A00C;YI SYLLABLE UOX;Lo;0;L;;;;;N;;;;; -A00D;YI SYLLABLE UO;Lo;0;L;;;;;N;;;;; -A00E;YI SYLLABLE UOP;Lo;0;L;;;;;N;;;;; -A00F;YI SYLLABLE OT;Lo;0;L;;;;;N;;;;; -A010;YI SYLLABLE OX;Lo;0;L;;;;;N;;;;; -A011;YI SYLLABLE O;Lo;0;L;;;;;N;;;;; -A012;YI SYLLABLE OP;Lo;0;L;;;;;N;;;;; -A013;YI SYLLABLE EX;Lo;0;L;;;;;N;;;;; -A014;YI SYLLABLE E;Lo;0;L;;;;;N;;;;; -A015;YI SYLLABLE WU;Lo;0;L;;;;;N;;;;; -A016;YI SYLLABLE BIT;Lo;0;L;;;;;N;;;;; -A017;YI SYLLABLE BIX;Lo;0;L;;;;;N;;;;; -A018;YI SYLLABLE BI;Lo;0;L;;;;;N;;;;; -A019;YI SYLLABLE BIP;Lo;0;L;;;;;N;;;;; -A01A;YI SYLLABLE BIET;Lo;0;L;;;;;N;;;;; -A01B;YI SYLLABLE BIEX;Lo;0;L;;;;;N;;;;; -A01C;YI SYLLABLE BIE;Lo;0;L;;;;;N;;;;; -A01D;YI SYLLABLE BIEP;Lo;0;L;;;;;N;;;;; -A01E;YI SYLLABLE BAT;Lo;0;L;;;;;N;;;;; -A01F;YI SYLLABLE BAX;Lo;0;L;;;;;N;;;;; -A020;YI SYLLABLE BA;Lo;0;L;;;;;N;;;;; -A021;YI SYLLABLE BAP;Lo;0;L;;;;;N;;;;; -A022;YI SYLLABLE BUOX;Lo;0;L;;;;;N;;;;; -A023;YI SYLLABLE BUO;Lo;0;L;;;;;N;;;;; -A024;YI SYLLABLE BUOP;Lo;0;L;;;;;N;;;;; -A025;YI SYLLABLE BOT;Lo;0;L;;;;;N;;;;; -A026;YI SYLLABLE BOX;Lo;0;L;;;;;N;;;;; -A027;YI SYLLABLE BO;Lo;0;L;;;;;N;;;;; -A028;YI SYLLABLE BOP;Lo;0;L;;;;;N;;;;; -A029;YI SYLLABLE BEX;Lo;0;L;;;;;N;;;;; -A02A;YI SYLLABLE BE;Lo;0;L;;;;;N;;;;; -A02B;YI SYLLABLE BEP;Lo;0;L;;;;;N;;;;; -A02C;YI SYLLABLE BUT;Lo;0;L;;;;;N;;;;; -A02D;YI SYLLABLE BUX;Lo;0;L;;;;;N;;;;; -A02E;YI SYLLABLE BU;Lo;0;L;;;;;N;;;;; -A02F;YI SYLLABLE BUP;Lo;0;L;;;;;N;;;;; -A030;YI SYLLABLE BURX;Lo;0;L;;;;;N;;;;; -A031;YI SYLLABLE BUR;Lo;0;L;;;;;N;;;;; -A032;YI SYLLABLE BYT;Lo;0;L;;;;;N;;;;; -A033;YI SYLLABLE BYX;Lo;0;L;;;;;N;;;;; -A034;YI SYLLABLE BY;Lo;0;L;;;;;N;;;;; -A035;YI SYLLABLE BYP;Lo;0;L;;;;;N;;;;; -A036;YI SYLLABLE BYRX;Lo;0;L;;;;;N;;;;; -A037;YI SYLLABLE BYR;Lo;0;L;;;;;N;;;;; -A038;YI SYLLABLE PIT;Lo;0;L;;;;;N;;;;; -A039;YI SYLLABLE PIX;Lo;0;L;;;;;N;;;;; -A03A;YI SYLLABLE PI;Lo;0;L;;;;;N;;;;; -A03B;YI SYLLABLE PIP;Lo;0;L;;;;;N;;;;; -A03C;YI SYLLABLE PIEX;Lo;0;L;;;;;N;;;;; -A03D;YI SYLLABLE PIE;Lo;0;L;;;;;N;;;;; -A03E;YI SYLLABLE PIEP;Lo;0;L;;;;;N;;;;; -A03F;YI SYLLABLE PAT;Lo;0;L;;;;;N;;;;; -A040;YI SYLLABLE PAX;Lo;0;L;;;;;N;;;;; -A041;YI SYLLABLE PA;Lo;0;L;;;;;N;;;;; -A042;YI SYLLABLE PAP;Lo;0;L;;;;;N;;;;; -A043;YI SYLLABLE PUOX;Lo;0;L;;;;;N;;;;; -A044;YI SYLLABLE PUO;Lo;0;L;;;;;N;;;;; -A045;YI SYLLABLE PUOP;Lo;0;L;;;;;N;;;;; -A046;YI SYLLABLE POT;Lo;0;L;;;;;N;;;;; -A047;YI SYLLABLE POX;Lo;0;L;;;;;N;;;;; -A048;YI SYLLABLE PO;Lo;0;L;;;;;N;;;;; -A049;YI SYLLABLE POP;Lo;0;L;;;;;N;;;;; -A04A;YI SYLLABLE PUT;Lo;0;L;;;;;N;;;;; -A04B;YI SYLLABLE PUX;Lo;0;L;;;;;N;;;;; -A04C;YI SYLLABLE PU;Lo;0;L;;;;;N;;;;; -A04D;YI SYLLABLE PUP;Lo;0;L;;;;;N;;;;; -A04E;YI SYLLABLE PURX;Lo;0;L;;;;;N;;;;; -A04F;YI SYLLABLE PUR;Lo;0;L;;;;;N;;;;; -A050;YI SYLLABLE PYT;Lo;0;L;;;;;N;;;;; -A051;YI SYLLABLE PYX;Lo;0;L;;;;;N;;;;; -A052;YI SYLLABLE PY;Lo;0;L;;;;;N;;;;; -A053;YI SYLLABLE PYP;Lo;0;L;;;;;N;;;;; -A054;YI SYLLABLE PYRX;Lo;0;L;;;;;N;;;;; -A055;YI SYLLABLE PYR;Lo;0;L;;;;;N;;;;; -A056;YI SYLLABLE BBIT;Lo;0;L;;;;;N;;;;; -A057;YI SYLLABLE BBIX;Lo;0;L;;;;;N;;;;; -A058;YI SYLLABLE BBI;Lo;0;L;;;;;N;;;;; -A059;YI SYLLABLE BBIP;Lo;0;L;;;;;N;;;;; -A05A;YI SYLLABLE BBIET;Lo;0;L;;;;;N;;;;; -A05B;YI SYLLABLE BBIEX;Lo;0;L;;;;;N;;;;; -A05C;YI SYLLABLE BBIE;Lo;0;L;;;;;N;;;;; -A05D;YI SYLLABLE BBIEP;Lo;0;L;;;;;N;;;;; -A05E;YI SYLLABLE BBAT;Lo;0;L;;;;;N;;;;; -A05F;YI SYLLABLE BBAX;Lo;0;L;;;;;N;;;;; -A060;YI SYLLABLE BBA;Lo;0;L;;;;;N;;;;; -A061;YI SYLLABLE BBAP;Lo;0;L;;;;;N;;;;; -A062;YI SYLLABLE BBUOX;Lo;0;L;;;;;N;;;;; -A063;YI SYLLABLE BBUO;Lo;0;L;;;;;N;;;;; -A064;YI SYLLABLE BBUOP;Lo;0;L;;;;;N;;;;; -A065;YI SYLLABLE BBOT;Lo;0;L;;;;;N;;;;; -A066;YI SYLLABLE BBOX;Lo;0;L;;;;;N;;;;; -A067;YI SYLLABLE BBO;Lo;0;L;;;;;N;;;;; -A068;YI SYLLABLE BBOP;Lo;0;L;;;;;N;;;;; -A069;YI SYLLABLE BBEX;Lo;0;L;;;;;N;;;;; -A06A;YI SYLLABLE BBE;Lo;0;L;;;;;N;;;;; -A06B;YI SYLLABLE BBEP;Lo;0;L;;;;;N;;;;; -A06C;YI SYLLABLE BBUT;Lo;0;L;;;;;N;;;;; -A06D;YI SYLLABLE BBUX;Lo;0;L;;;;;N;;;;; -A06E;YI SYLLABLE BBU;Lo;0;L;;;;;N;;;;; -A06F;YI SYLLABLE BBUP;Lo;0;L;;;;;N;;;;; -A070;YI SYLLABLE BBURX;Lo;0;L;;;;;N;;;;; -A071;YI SYLLABLE BBUR;Lo;0;L;;;;;N;;;;; -A072;YI SYLLABLE BBYT;Lo;0;L;;;;;N;;;;; -A073;YI SYLLABLE BBYX;Lo;0;L;;;;;N;;;;; -A074;YI SYLLABLE BBY;Lo;0;L;;;;;N;;;;; -A075;YI SYLLABLE BBYP;Lo;0;L;;;;;N;;;;; -A076;YI SYLLABLE NBIT;Lo;0;L;;;;;N;;;;; -A077;YI SYLLABLE NBIX;Lo;0;L;;;;;N;;;;; -A078;YI SYLLABLE NBI;Lo;0;L;;;;;N;;;;; -A079;YI SYLLABLE NBIP;Lo;0;L;;;;;N;;;;; -A07A;YI SYLLABLE NBIEX;Lo;0;L;;;;;N;;;;; -A07B;YI SYLLABLE NBIE;Lo;0;L;;;;;N;;;;; -A07C;YI SYLLABLE NBIEP;Lo;0;L;;;;;N;;;;; -A07D;YI SYLLABLE NBAT;Lo;0;L;;;;;N;;;;; -A07E;YI SYLLABLE NBAX;Lo;0;L;;;;;N;;;;; -A07F;YI SYLLABLE NBA;Lo;0;L;;;;;N;;;;; -A080;YI SYLLABLE NBAP;Lo;0;L;;;;;N;;;;; -A081;YI SYLLABLE NBOT;Lo;0;L;;;;;N;;;;; -A082;YI SYLLABLE NBOX;Lo;0;L;;;;;N;;;;; -A083;YI SYLLABLE NBO;Lo;0;L;;;;;N;;;;; -A084;YI SYLLABLE NBOP;Lo;0;L;;;;;N;;;;; -A085;YI SYLLABLE NBUT;Lo;0;L;;;;;N;;;;; -A086;YI SYLLABLE NBUX;Lo;0;L;;;;;N;;;;; -A087;YI SYLLABLE NBU;Lo;0;L;;;;;N;;;;; -A088;YI SYLLABLE NBUP;Lo;0;L;;;;;N;;;;; -A089;YI SYLLABLE NBURX;Lo;0;L;;;;;N;;;;; -A08A;YI SYLLABLE NBUR;Lo;0;L;;;;;N;;;;; -A08B;YI SYLLABLE NBYT;Lo;0;L;;;;;N;;;;; -A08C;YI SYLLABLE NBYX;Lo;0;L;;;;;N;;;;; -A08D;YI SYLLABLE NBY;Lo;0;L;;;;;N;;;;; -A08E;YI SYLLABLE NBYP;Lo;0;L;;;;;N;;;;; -A08F;YI SYLLABLE NBYRX;Lo;0;L;;;;;N;;;;; -A090;YI SYLLABLE NBYR;Lo;0;L;;;;;N;;;;; -A091;YI SYLLABLE HMIT;Lo;0;L;;;;;N;;;;; -A092;YI SYLLABLE HMIX;Lo;0;L;;;;;N;;;;; -A093;YI SYLLABLE HMI;Lo;0;L;;;;;N;;;;; -A094;YI SYLLABLE HMIP;Lo;0;L;;;;;N;;;;; -A095;YI SYLLABLE HMIEX;Lo;0;L;;;;;N;;;;; -A096;YI SYLLABLE HMIE;Lo;0;L;;;;;N;;;;; -A097;YI SYLLABLE HMIEP;Lo;0;L;;;;;N;;;;; -A098;YI SYLLABLE HMAT;Lo;0;L;;;;;N;;;;; -A099;YI SYLLABLE HMAX;Lo;0;L;;;;;N;;;;; -A09A;YI SYLLABLE HMA;Lo;0;L;;;;;N;;;;; -A09B;YI SYLLABLE HMAP;Lo;0;L;;;;;N;;;;; -A09C;YI SYLLABLE HMUOX;Lo;0;L;;;;;N;;;;; -A09D;YI SYLLABLE HMUO;Lo;0;L;;;;;N;;;;; -A09E;YI SYLLABLE HMUOP;Lo;0;L;;;;;N;;;;; -A09F;YI SYLLABLE HMOT;Lo;0;L;;;;;N;;;;; -A0A0;YI SYLLABLE HMOX;Lo;0;L;;;;;N;;;;; -A0A1;YI SYLLABLE HMO;Lo;0;L;;;;;N;;;;; -A0A2;YI SYLLABLE HMOP;Lo;0;L;;;;;N;;;;; -A0A3;YI SYLLABLE HMUT;Lo;0;L;;;;;N;;;;; -A0A4;YI SYLLABLE HMUX;Lo;0;L;;;;;N;;;;; -A0A5;YI SYLLABLE HMU;Lo;0;L;;;;;N;;;;; -A0A6;YI SYLLABLE HMUP;Lo;0;L;;;;;N;;;;; -A0A7;YI SYLLABLE HMURX;Lo;0;L;;;;;N;;;;; -A0A8;YI SYLLABLE HMUR;Lo;0;L;;;;;N;;;;; -A0A9;YI SYLLABLE HMYX;Lo;0;L;;;;;N;;;;; -A0AA;YI SYLLABLE HMY;Lo;0;L;;;;;N;;;;; -A0AB;YI SYLLABLE HMYP;Lo;0;L;;;;;N;;;;; -A0AC;YI SYLLABLE HMYRX;Lo;0;L;;;;;N;;;;; -A0AD;YI SYLLABLE HMYR;Lo;0;L;;;;;N;;;;; -A0AE;YI SYLLABLE MIT;Lo;0;L;;;;;N;;;;; -A0AF;YI SYLLABLE MIX;Lo;0;L;;;;;N;;;;; -A0B0;YI SYLLABLE MI;Lo;0;L;;;;;N;;;;; -A0B1;YI SYLLABLE MIP;Lo;0;L;;;;;N;;;;; -A0B2;YI SYLLABLE MIEX;Lo;0;L;;;;;N;;;;; -A0B3;YI SYLLABLE MIE;Lo;0;L;;;;;N;;;;; -A0B4;YI SYLLABLE MIEP;Lo;0;L;;;;;N;;;;; -A0B5;YI SYLLABLE MAT;Lo;0;L;;;;;N;;;;; -A0B6;YI SYLLABLE MAX;Lo;0;L;;;;;N;;;;; -A0B7;YI SYLLABLE MA;Lo;0;L;;;;;N;;;;; -A0B8;YI SYLLABLE MAP;Lo;0;L;;;;;N;;;;; -A0B9;YI SYLLABLE MUOT;Lo;0;L;;;;;N;;;;; -A0BA;YI SYLLABLE MUOX;Lo;0;L;;;;;N;;;;; -A0BB;YI SYLLABLE MUO;Lo;0;L;;;;;N;;;;; -A0BC;YI SYLLABLE MUOP;Lo;0;L;;;;;N;;;;; -A0BD;YI SYLLABLE MOT;Lo;0;L;;;;;N;;;;; -A0BE;YI SYLLABLE MOX;Lo;0;L;;;;;N;;;;; -A0BF;YI SYLLABLE MO;Lo;0;L;;;;;N;;;;; -A0C0;YI SYLLABLE MOP;Lo;0;L;;;;;N;;;;; -A0C1;YI SYLLABLE MEX;Lo;0;L;;;;;N;;;;; -A0C2;YI SYLLABLE ME;Lo;0;L;;;;;N;;;;; -A0C3;YI SYLLABLE MUT;Lo;0;L;;;;;N;;;;; -A0C4;YI SYLLABLE MUX;Lo;0;L;;;;;N;;;;; -A0C5;YI SYLLABLE MU;Lo;0;L;;;;;N;;;;; -A0C6;YI SYLLABLE MUP;Lo;0;L;;;;;N;;;;; -A0C7;YI SYLLABLE MURX;Lo;0;L;;;;;N;;;;; -A0C8;YI SYLLABLE MUR;Lo;0;L;;;;;N;;;;; -A0C9;YI SYLLABLE MYT;Lo;0;L;;;;;N;;;;; -A0CA;YI SYLLABLE MYX;Lo;0;L;;;;;N;;;;; -A0CB;YI SYLLABLE MY;Lo;0;L;;;;;N;;;;; -A0CC;YI SYLLABLE MYP;Lo;0;L;;;;;N;;;;; -A0CD;YI SYLLABLE FIT;Lo;0;L;;;;;N;;;;; -A0CE;YI SYLLABLE FIX;Lo;0;L;;;;;N;;;;; -A0CF;YI SYLLABLE FI;Lo;0;L;;;;;N;;;;; -A0D0;YI SYLLABLE FIP;Lo;0;L;;;;;N;;;;; -A0D1;YI SYLLABLE FAT;Lo;0;L;;;;;N;;;;; -A0D2;YI SYLLABLE FAX;Lo;0;L;;;;;N;;;;; -A0D3;YI SYLLABLE FA;Lo;0;L;;;;;N;;;;; -A0D4;YI SYLLABLE FAP;Lo;0;L;;;;;N;;;;; -A0D5;YI SYLLABLE FOX;Lo;0;L;;;;;N;;;;; -A0D6;YI SYLLABLE FO;Lo;0;L;;;;;N;;;;; -A0D7;YI SYLLABLE FOP;Lo;0;L;;;;;N;;;;; -A0D8;YI SYLLABLE FUT;Lo;0;L;;;;;N;;;;; -A0D9;YI SYLLABLE FUX;Lo;0;L;;;;;N;;;;; -A0DA;YI SYLLABLE FU;Lo;0;L;;;;;N;;;;; -A0DB;YI SYLLABLE FUP;Lo;0;L;;;;;N;;;;; -A0DC;YI SYLLABLE FURX;Lo;0;L;;;;;N;;;;; -A0DD;YI SYLLABLE FUR;Lo;0;L;;;;;N;;;;; -A0DE;YI SYLLABLE FYT;Lo;0;L;;;;;N;;;;; -A0DF;YI SYLLABLE FYX;Lo;0;L;;;;;N;;;;; -A0E0;YI SYLLABLE FY;Lo;0;L;;;;;N;;;;; -A0E1;YI SYLLABLE FYP;Lo;0;L;;;;;N;;;;; -A0E2;YI SYLLABLE VIT;Lo;0;L;;;;;N;;;;; -A0E3;YI SYLLABLE VIX;Lo;0;L;;;;;N;;;;; -A0E4;YI SYLLABLE VI;Lo;0;L;;;;;N;;;;; -A0E5;YI SYLLABLE VIP;Lo;0;L;;;;;N;;;;; -A0E6;YI SYLLABLE VIET;Lo;0;L;;;;;N;;;;; -A0E7;YI SYLLABLE VIEX;Lo;0;L;;;;;N;;;;; -A0E8;YI SYLLABLE VIE;Lo;0;L;;;;;N;;;;; -A0E9;YI SYLLABLE VIEP;Lo;0;L;;;;;N;;;;; -A0EA;YI SYLLABLE VAT;Lo;0;L;;;;;N;;;;; -A0EB;YI SYLLABLE VAX;Lo;0;L;;;;;N;;;;; -A0EC;YI SYLLABLE VA;Lo;0;L;;;;;N;;;;; -A0ED;YI SYLLABLE VAP;Lo;0;L;;;;;N;;;;; -A0EE;YI SYLLABLE VOT;Lo;0;L;;;;;N;;;;; -A0EF;YI SYLLABLE VOX;Lo;0;L;;;;;N;;;;; -A0F0;YI SYLLABLE VO;Lo;0;L;;;;;N;;;;; -A0F1;YI SYLLABLE VOP;Lo;0;L;;;;;N;;;;; -A0F2;YI SYLLABLE VEX;Lo;0;L;;;;;N;;;;; -A0F3;YI SYLLABLE VEP;Lo;0;L;;;;;N;;;;; -A0F4;YI SYLLABLE VUT;Lo;0;L;;;;;N;;;;; -A0F5;YI SYLLABLE VUX;Lo;0;L;;;;;N;;;;; -A0F6;YI SYLLABLE VU;Lo;0;L;;;;;N;;;;; -A0F7;YI SYLLABLE VUP;Lo;0;L;;;;;N;;;;; -A0F8;YI SYLLABLE VURX;Lo;0;L;;;;;N;;;;; -A0F9;YI SYLLABLE VUR;Lo;0;L;;;;;N;;;;; -A0FA;YI SYLLABLE VYT;Lo;0;L;;;;;N;;;;; -A0FB;YI SYLLABLE VYX;Lo;0;L;;;;;N;;;;; -A0FC;YI SYLLABLE VY;Lo;0;L;;;;;N;;;;; -A0FD;YI SYLLABLE VYP;Lo;0;L;;;;;N;;;;; -A0FE;YI SYLLABLE VYRX;Lo;0;L;;;;;N;;;;; -A0FF;YI SYLLABLE VYR;Lo;0;L;;;;;N;;;;; -A100;YI SYLLABLE DIT;Lo;0;L;;;;;N;;;;; -A101;YI SYLLABLE DIX;Lo;0;L;;;;;N;;;;; -A102;YI SYLLABLE DI;Lo;0;L;;;;;N;;;;; -A103;YI SYLLABLE DIP;Lo;0;L;;;;;N;;;;; -A104;YI SYLLABLE DIEX;Lo;0;L;;;;;N;;;;; -A105;YI SYLLABLE DIE;Lo;0;L;;;;;N;;;;; -A106;YI SYLLABLE DIEP;Lo;0;L;;;;;N;;;;; -A107;YI SYLLABLE DAT;Lo;0;L;;;;;N;;;;; -A108;YI SYLLABLE DAX;Lo;0;L;;;;;N;;;;; -A109;YI SYLLABLE DA;Lo;0;L;;;;;N;;;;; -A10A;YI SYLLABLE DAP;Lo;0;L;;;;;N;;;;; -A10B;YI SYLLABLE DUOX;Lo;0;L;;;;;N;;;;; -A10C;YI SYLLABLE DUO;Lo;0;L;;;;;N;;;;; -A10D;YI SYLLABLE DOT;Lo;0;L;;;;;N;;;;; -A10E;YI SYLLABLE DOX;Lo;0;L;;;;;N;;;;; -A10F;YI SYLLABLE DO;Lo;0;L;;;;;N;;;;; -A110;YI SYLLABLE DOP;Lo;0;L;;;;;N;;;;; -A111;YI SYLLABLE DEX;Lo;0;L;;;;;N;;;;; -A112;YI SYLLABLE DE;Lo;0;L;;;;;N;;;;; -A113;YI SYLLABLE DEP;Lo;0;L;;;;;N;;;;; -A114;YI SYLLABLE DUT;Lo;0;L;;;;;N;;;;; -A115;YI SYLLABLE DUX;Lo;0;L;;;;;N;;;;; -A116;YI SYLLABLE DU;Lo;0;L;;;;;N;;;;; -A117;YI SYLLABLE DUP;Lo;0;L;;;;;N;;;;; -A118;YI SYLLABLE DURX;Lo;0;L;;;;;N;;;;; -A119;YI SYLLABLE DUR;Lo;0;L;;;;;N;;;;; -A11A;YI SYLLABLE TIT;Lo;0;L;;;;;N;;;;; -A11B;YI SYLLABLE TIX;Lo;0;L;;;;;N;;;;; -A11C;YI SYLLABLE TI;Lo;0;L;;;;;N;;;;; -A11D;YI SYLLABLE TIP;Lo;0;L;;;;;N;;;;; -A11E;YI SYLLABLE TIEX;Lo;0;L;;;;;N;;;;; -A11F;YI SYLLABLE TIE;Lo;0;L;;;;;N;;;;; -A120;YI SYLLABLE TIEP;Lo;0;L;;;;;N;;;;; -A121;YI SYLLABLE TAT;Lo;0;L;;;;;N;;;;; -A122;YI SYLLABLE TAX;Lo;0;L;;;;;N;;;;; -A123;YI SYLLABLE TA;Lo;0;L;;;;;N;;;;; -A124;YI SYLLABLE TAP;Lo;0;L;;;;;N;;;;; -A125;YI SYLLABLE TUOT;Lo;0;L;;;;;N;;;;; -A126;YI SYLLABLE TUOX;Lo;0;L;;;;;N;;;;; -A127;YI SYLLABLE TUO;Lo;0;L;;;;;N;;;;; -A128;YI SYLLABLE TUOP;Lo;0;L;;;;;N;;;;; -A129;YI SYLLABLE TOT;Lo;0;L;;;;;N;;;;; -A12A;YI SYLLABLE TOX;Lo;0;L;;;;;N;;;;; -A12B;YI SYLLABLE TO;Lo;0;L;;;;;N;;;;; -A12C;YI SYLLABLE TOP;Lo;0;L;;;;;N;;;;; -A12D;YI SYLLABLE TEX;Lo;0;L;;;;;N;;;;; -A12E;YI SYLLABLE TE;Lo;0;L;;;;;N;;;;; -A12F;YI SYLLABLE TEP;Lo;0;L;;;;;N;;;;; -A130;YI SYLLABLE TUT;Lo;0;L;;;;;N;;;;; -A131;YI SYLLABLE TUX;Lo;0;L;;;;;N;;;;; -A132;YI SYLLABLE TU;Lo;0;L;;;;;N;;;;; -A133;YI SYLLABLE TUP;Lo;0;L;;;;;N;;;;; -A134;YI SYLLABLE TURX;Lo;0;L;;;;;N;;;;; -A135;YI SYLLABLE TUR;Lo;0;L;;;;;N;;;;; -A136;YI SYLLABLE DDIT;Lo;0;L;;;;;N;;;;; -A137;YI SYLLABLE DDIX;Lo;0;L;;;;;N;;;;; -A138;YI SYLLABLE DDI;Lo;0;L;;;;;N;;;;; -A139;YI SYLLABLE DDIP;Lo;0;L;;;;;N;;;;; -A13A;YI SYLLABLE DDIEX;Lo;0;L;;;;;N;;;;; -A13B;YI SYLLABLE DDIE;Lo;0;L;;;;;N;;;;; -A13C;YI SYLLABLE DDIEP;Lo;0;L;;;;;N;;;;; -A13D;YI SYLLABLE DDAT;Lo;0;L;;;;;N;;;;; -A13E;YI SYLLABLE DDAX;Lo;0;L;;;;;N;;;;; -A13F;YI SYLLABLE DDA;Lo;0;L;;;;;N;;;;; -A140;YI SYLLABLE DDAP;Lo;0;L;;;;;N;;;;; -A141;YI SYLLABLE DDUOX;Lo;0;L;;;;;N;;;;; -A142;YI SYLLABLE DDUO;Lo;0;L;;;;;N;;;;; -A143;YI SYLLABLE DDUOP;Lo;0;L;;;;;N;;;;; -A144;YI SYLLABLE DDOT;Lo;0;L;;;;;N;;;;; -A145;YI SYLLABLE DDOX;Lo;0;L;;;;;N;;;;; -A146;YI SYLLABLE DDO;Lo;0;L;;;;;N;;;;; -A147;YI SYLLABLE DDOP;Lo;0;L;;;;;N;;;;; -A148;YI SYLLABLE DDEX;Lo;0;L;;;;;N;;;;; -A149;YI SYLLABLE DDE;Lo;0;L;;;;;N;;;;; -A14A;YI SYLLABLE DDEP;Lo;0;L;;;;;N;;;;; -A14B;YI SYLLABLE DDUT;Lo;0;L;;;;;N;;;;; -A14C;YI SYLLABLE DDUX;Lo;0;L;;;;;N;;;;; -A14D;YI SYLLABLE DDU;Lo;0;L;;;;;N;;;;; -A14E;YI SYLLABLE DDUP;Lo;0;L;;;;;N;;;;; -A14F;YI SYLLABLE DDURX;Lo;0;L;;;;;N;;;;; -A150;YI SYLLABLE DDUR;Lo;0;L;;;;;N;;;;; -A151;YI SYLLABLE NDIT;Lo;0;L;;;;;N;;;;; -A152;YI SYLLABLE NDIX;Lo;0;L;;;;;N;;;;; -A153;YI SYLLABLE NDI;Lo;0;L;;;;;N;;;;; -A154;YI SYLLABLE NDIP;Lo;0;L;;;;;N;;;;; -A155;YI SYLLABLE NDIEX;Lo;0;L;;;;;N;;;;; -A156;YI SYLLABLE NDIE;Lo;0;L;;;;;N;;;;; -A157;YI SYLLABLE NDAT;Lo;0;L;;;;;N;;;;; -A158;YI SYLLABLE NDAX;Lo;0;L;;;;;N;;;;; -A159;YI SYLLABLE NDA;Lo;0;L;;;;;N;;;;; -A15A;YI SYLLABLE NDAP;Lo;0;L;;;;;N;;;;; -A15B;YI SYLLABLE NDOT;Lo;0;L;;;;;N;;;;; -A15C;YI SYLLABLE NDOX;Lo;0;L;;;;;N;;;;; -A15D;YI SYLLABLE NDO;Lo;0;L;;;;;N;;;;; -A15E;YI SYLLABLE NDOP;Lo;0;L;;;;;N;;;;; -A15F;YI SYLLABLE NDEX;Lo;0;L;;;;;N;;;;; -A160;YI SYLLABLE NDE;Lo;0;L;;;;;N;;;;; -A161;YI SYLLABLE NDEP;Lo;0;L;;;;;N;;;;; -A162;YI SYLLABLE NDUT;Lo;0;L;;;;;N;;;;; -A163;YI SYLLABLE NDUX;Lo;0;L;;;;;N;;;;; -A164;YI SYLLABLE NDU;Lo;0;L;;;;;N;;;;; -A165;YI SYLLABLE NDUP;Lo;0;L;;;;;N;;;;; -A166;YI SYLLABLE NDURX;Lo;0;L;;;;;N;;;;; -A167;YI SYLLABLE NDUR;Lo;0;L;;;;;N;;;;; -A168;YI SYLLABLE HNIT;Lo;0;L;;;;;N;;;;; -A169;YI SYLLABLE HNIX;Lo;0;L;;;;;N;;;;; -A16A;YI SYLLABLE HNI;Lo;0;L;;;;;N;;;;; -A16B;YI SYLLABLE HNIP;Lo;0;L;;;;;N;;;;; -A16C;YI SYLLABLE HNIET;Lo;0;L;;;;;N;;;;; -A16D;YI SYLLABLE HNIEX;Lo;0;L;;;;;N;;;;; -A16E;YI SYLLABLE HNIE;Lo;0;L;;;;;N;;;;; -A16F;YI SYLLABLE HNIEP;Lo;0;L;;;;;N;;;;; -A170;YI SYLLABLE HNAT;Lo;0;L;;;;;N;;;;; -A171;YI SYLLABLE HNAX;Lo;0;L;;;;;N;;;;; -A172;YI SYLLABLE HNA;Lo;0;L;;;;;N;;;;; -A173;YI SYLLABLE HNAP;Lo;0;L;;;;;N;;;;; -A174;YI SYLLABLE HNUOX;Lo;0;L;;;;;N;;;;; -A175;YI SYLLABLE HNUO;Lo;0;L;;;;;N;;;;; -A176;YI SYLLABLE HNOT;Lo;0;L;;;;;N;;;;; -A177;YI SYLLABLE HNOX;Lo;0;L;;;;;N;;;;; -A178;YI SYLLABLE HNOP;Lo;0;L;;;;;N;;;;; -A179;YI SYLLABLE HNEX;Lo;0;L;;;;;N;;;;; -A17A;YI SYLLABLE HNE;Lo;0;L;;;;;N;;;;; -A17B;YI SYLLABLE HNEP;Lo;0;L;;;;;N;;;;; -A17C;YI SYLLABLE HNUT;Lo;0;L;;;;;N;;;;; -A17D;YI SYLLABLE NIT;Lo;0;L;;;;;N;;;;; -A17E;YI SYLLABLE NIX;Lo;0;L;;;;;N;;;;; -A17F;YI SYLLABLE NI;Lo;0;L;;;;;N;;;;; -A180;YI SYLLABLE NIP;Lo;0;L;;;;;N;;;;; -A181;YI SYLLABLE NIEX;Lo;0;L;;;;;N;;;;; -A182;YI SYLLABLE NIE;Lo;0;L;;;;;N;;;;; -A183;YI SYLLABLE NIEP;Lo;0;L;;;;;N;;;;; -A184;YI SYLLABLE NAX;Lo;0;L;;;;;N;;;;; -A185;YI SYLLABLE NA;Lo;0;L;;;;;N;;;;; -A186;YI SYLLABLE NAP;Lo;0;L;;;;;N;;;;; -A187;YI SYLLABLE NUOX;Lo;0;L;;;;;N;;;;; -A188;YI SYLLABLE NUO;Lo;0;L;;;;;N;;;;; -A189;YI SYLLABLE NUOP;Lo;0;L;;;;;N;;;;; -A18A;YI SYLLABLE NOT;Lo;0;L;;;;;N;;;;; -A18B;YI SYLLABLE NOX;Lo;0;L;;;;;N;;;;; -A18C;YI SYLLABLE NO;Lo;0;L;;;;;N;;;;; -A18D;YI SYLLABLE NOP;Lo;0;L;;;;;N;;;;; -A18E;YI SYLLABLE NEX;Lo;0;L;;;;;N;;;;; -A18F;YI SYLLABLE NE;Lo;0;L;;;;;N;;;;; -A190;YI SYLLABLE NEP;Lo;0;L;;;;;N;;;;; -A191;YI SYLLABLE NUT;Lo;0;L;;;;;N;;;;; -A192;YI SYLLABLE NUX;Lo;0;L;;;;;N;;;;; -A193;YI SYLLABLE NU;Lo;0;L;;;;;N;;;;; -A194;YI SYLLABLE NUP;Lo;0;L;;;;;N;;;;; -A195;YI SYLLABLE NURX;Lo;0;L;;;;;N;;;;; -A196;YI SYLLABLE NUR;Lo;0;L;;;;;N;;;;; -A197;YI SYLLABLE HLIT;Lo;0;L;;;;;N;;;;; -A198;YI SYLLABLE HLIX;Lo;0;L;;;;;N;;;;; -A199;YI SYLLABLE HLI;Lo;0;L;;;;;N;;;;; -A19A;YI SYLLABLE HLIP;Lo;0;L;;;;;N;;;;; -A19B;YI SYLLABLE HLIEX;Lo;0;L;;;;;N;;;;; -A19C;YI SYLLABLE HLIE;Lo;0;L;;;;;N;;;;; -A19D;YI SYLLABLE HLIEP;Lo;0;L;;;;;N;;;;; -A19E;YI SYLLABLE HLAT;Lo;0;L;;;;;N;;;;; -A19F;YI SYLLABLE HLAX;Lo;0;L;;;;;N;;;;; -A1A0;YI SYLLABLE HLA;Lo;0;L;;;;;N;;;;; -A1A1;YI SYLLABLE HLAP;Lo;0;L;;;;;N;;;;; -A1A2;YI SYLLABLE HLUOX;Lo;0;L;;;;;N;;;;; -A1A3;YI SYLLABLE HLUO;Lo;0;L;;;;;N;;;;; -A1A4;YI SYLLABLE HLUOP;Lo;0;L;;;;;N;;;;; -A1A5;YI SYLLABLE HLOX;Lo;0;L;;;;;N;;;;; -A1A6;YI SYLLABLE HLO;Lo;0;L;;;;;N;;;;; -A1A7;YI SYLLABLE HLOP;Lo;0;L;;;;;N;;;;; -A1A8;YI SYLLABLE HLEX;Lo;0;L;;;;;N;;;;; -A1A9;YI SYLLABLE HLE;Lo;0;L;;;;;N;;;;; -A1AA;YI SYLLABLE HLEP;Lo;0;L;;;;;N;;;;; -A1AB;YI SYLLABLE HLUT;Lo;0;L;;;;;N;;;;; -A1AC;YI SYLLABLE HLUX;Lo;0;L;;;;;N;;;;; -A1AD;YI SYLLABLE HLU;Lo;0;L;;;;;N;;;;; -A1AE;YI SYLLABLE HLUP;Lo;0;L;;;;;N;;;;; -A1AF;YI SYLLABLE HLURX;Lo;0;L;;;;;N;;;;; -A1B0;YI SYLLABLE HLUR;Lo;0;L;;;;;N;;;;; -A1B1;YI SYLLABLE HLYT;Lo;0;L;;;;;N;;;;; -A1B2;YI SYLLABLE HLYX;Lo;0;L;;;;;N;;;;; -A1B3;YI SYLLABLE HLY;Lo;0;L;;;;;N;;;;; -A1B4;YI SYLLABLE HLYP;Lo;0;L;;;;;N;;;;; -A1B5;YI SYLLABLE HLYRX;Lo;0;L;;;;;N;;;;; -A1B6;YI SYLLABLE HLYR;Lo;0;L;;;;;N;;;;; -A1B7;YI SYLLABLE LIT;Lo;0;L;;;;;N;;;;; -A1B8;YI SYLLABLE LIX;Lo;0;L;;;;;N;;;;; -A1B9;YI SYLLABLE LI;Lo;0;L;;;;;N;;;;; -A1BA;YI SYLLABLE LIP;Lo;0;L;;;;;N;;;;; -A1BB;YI SYLLABLE LIET;Lo;0;L;;;;;N;;;;; -A1BC;YI SYLLABLE LIEX;Lo;0;L;;;;;N;;;;; -A1BD;YI SYLLABLE LIE;Lo;0;L;;;;;N;;;;; -A1BE;YI SYLLABLE LIEP;Lo;0;L;;;;;N;;;;; -A1BF;YI SYLLABLE LAT;Lo;0;L;;;;;N;;;;; -A1C0;YI SYLLABLE LAX;Lo;0;L;;;;;N;;;;; -A1C1;YI SYLLABLE LA;Lo;0;L;;;;;N;;;;; -A1C2;YI SYLLABLE LAP;Lo;0;L;;;;;N;;;;; -A1C3;YI SYLLABLE LUOT;Lo;0;L;;;;;N;;;;; -A1C4;YI SYLLABLE LUOX;Lo;0;L;;;;;N;;;;; -A1C5;YI SYLLABLE LUO;Lo;0;L;;;;;N;;;;; -A1C6;YI SYLLABLE LUOP;Lo;0;L;;;;;N;;;;; -A1C7;YI SYLLABLE LOT;Lo;0;L;;;;;N;;;;; -A1C8;YI SYLLABLE LOX;Lo;0;L;;;;;N;;;;; -A1C9;YI SYLLABLE LO;Lo;0;L;;;;;N;;;;; -A1CA;YI SYLLABLE LOP;Lo;0;L;;;;;N;;;;; -A1CB;YI SYLLABLE LEX;Lo;0;L;;;;;N;;;;; -A1CC;YI SYLLABLE LE;Lo;0;L;;;;;N;;;;; -A1CD;YI SYLLABLE LEP;Lo;0;L;;;;;N;;;;; -A1CE;YI SYLLABLE LUT;Lo;0;L;;;;;N;;;;; -A1CF;YI SYLLABLE LUX;Lo;0;L;;;;;N;;;;; -A1D0;YI SYLLABLE LU;Lo;0;L;;;;;N;;;;; -A1D1;YI SYLLABLE LUP;Lo;0;L;;;;;N;;;;; -A1D2;YI SYLLABLE LURX;Lo;0;L;;;;;N;;;;; -A1D3;YI SYLLABLE LUR;Lo;0;L;;;;;N;;;;; -A1D4;YI SYLLABLE LYT;Lo;0;L;;;;;N;;;;; -A1D5;YI SYLLABLE LYX;Lo;0;L;;;;;N;;;;; -A1D6;YI SYLLABLE LY;Lo;0;L;;;;;N;;;;; -A1D7;YI SYLLABLE LYP;Lo;0;L;;;;;N;;;;; -A1D8;YI SYLLABLE LYRX;Lo;0;L;;;;;N;;;;; -A1D9;YI SYLLABLE LYR;Lo;0;L;;;;;N;;;;; -A1DA;YI SYLLABLE GIT;Lo;0;L;;;;;N;;;;; -A1DB;YI SYLLABLE GIX;Lo;0;L;;;;;N;;;;; -A1DC;YI SYLLABLE GI;Lo;0;L;;;;;N;;;;; -A1DD;YI SYLLABLE GIP;Lo;0;L;;;;;N;;;;; -A1DE;YI SYLLABLE GIET;Lo;0;L;;;;;N;;;;; -A1DF;YI SYLLABLE GIEX;Lo;0;L;;;;;N;;;;; -A1E0;YI SYLLABLE GIE;Lo;0;L;;;;;N;;;;; -A1E1;YI SYLLABLE GIEP;Lo;0;L;;;;;N;;;;; -A1E2;YI SYLLABLE GAT;Lo;0;L;;;;;N;;;;; -A1E3;YI SYLLABLE GAX;Lo;0;L;;;;;N;;;;; -A1E4;YI SYLLABLE GA;Lo;0;L;;;;;N;;;;; -A1E5;YI SYLLABLE GAP;Lo;0;L;;;;;N;;;;; -A1E6;YI SYLLABLE GUOT;Lo;0;L;;;;;N;;;;; -A1E7;YI SYLLABLE GUOX;Lo;0;L;;;;;N;;;;; -A1E8;YI SYLLABLE GUO;Lo;0;L;;;;;N;;;;; -A1E9;YI SYLLABLE GUOP;Lo;0;L;;;;;N;;;;; -A1EA;YI SYLLABLE GOT;Lo;0;L;;;;;N;;;;; -A1EB;YI SYLLABLE GOX;Lo;0;L;;;;;N;;;;; -A1EC;YI SYLLABLE GO;Lo;0;L;;;;;N;;;;; -A1ED;YI SYLLABLE GOP;Lo;0;L;;;;;N;;;;; -A1EE;YI SYLLABLE GET;Lo;0;L;;;;;N;;;;; -A1EF;YI SYLLABLE GEX;Lo;0;L;;;;;N;;;;; -A1F0;YI SYLLABLE GE;Lo;0;L;;;;;N;;;;; -A1F1;YI SYLLABLE GEP;Lo;0;L;;;;;N;;;;; -A1F2;YI SYLLABLE GUT;Lo;0;L;;;;;N;;;;; -A1F3;YI SYLLABLE GUX;Lo;0;L;;;;;N;;;;; -A1F4;YI SYLLABLE GU;Lo;0;L;;;;;N;;;;; -A1F5;YI SYLLABLE GUP;Lo;0;L;;;;;N;;;;; -A1F6;YI SYLLABLE GURX;Lo;0;L;;;;;N;;;;; -A1F7;YI SYLLABLE GUR;Lo;0;L;;;;;N;;;;; -A1F8;YI SYLLABLE KIT;Lo;0;L;;;;;N;;;;; -A1F9;YI SYLLABLE KIX;Lo;0;L;;;;;N;;;;; -A1FA;YI SYLLABLE KI;Lo;0;L;;;;;N;;;;; -A1FB;YI SYLLABLE KIP;Lo;0;L;;;;;N;;;;; -A1FC;YI SYLLABLE KIEX;Lo;0;L;;;;;N;;;;; -A1FD;YI SYLLABLE KIE;Lo;0;L;;;;;N;;;;; -A1FE;YI SYLLABLE KIEP;Lo;0;L;;;;;N;;;;; -A1FF;YI SYLLABLE KAT;Lo;0;L;;;;;N;;;;; -A200;YI SYLLABLE KAX;Lo;0;L;;;;;N;;;;; -A201;YI SYLLABLE KA;Lo;0;L;;;;;N;;;;; -A202;YI SYLLABLE KAP;Lo;0;L;;;;;N;;;;; -A203;YI SYLLABLE KUOX;Lo;0;L;;;;;N;;;;; -A204;YI SYLLABLE KUO;Lo;0;L;;;;;N;;;;; -A205;YI SYLLABLE KUOP;Lo;0;L;;;;;N;;;;; -A206;YI SYLLABLE KOT;Lo;0;L;;;;;N;;;;; -A207;YI SYLLABLE KOX;Lo;0;L;;;;;N;;;;; -A208;YI SYLLABLE KO;Lo;0;L;;;;;N;;;;; -A209;YI SYLLABLE KOP;Lo;0;L;;;;;N;;;;; -A20A;YI SYLLABLE KET;Lo;0;L;;;;;N;;;;; -A20B;YI SYLLABLE KEX;Lo;0;L;;;;;N;;;;; -A20C;YI SYLLABLE KE;Lo;0;L;;;;;N;;;;; -A20D;YI SYLLABLE KEP;Lo;0;L;;;;;N;;;;; -A20E;YI SYLLABLE KUT;Lo;0;L;;;;;N;;;;; -A20F;YI SYLLABLE KUX;Lo;0;L;;;;;N;;;;; -A210;YI SYLLABLE KU;Lo;0;L;;;;;N;;;;; -A211;YI SYLLABLE KUP;Lo;0;L;;;;;N;;;;; -A212;YI SYLLABLE KURX;Lo;0;L;;;;;N;;;;; -A213;YI SYLLABLE KUR;Lo;0;L;;;;;N;;;;; -A214;YI SYLLABLE GGIT;Lo;0;L;;;;;N;;;;; -A215;YI SYLLABLE GGIX;Lo;0;L;;;;;N;;;;; -A216;YI SYLLABLE GGI;Lo;0;L;;;;;N;;;;; -A217;YI SYLLABLE GGIEX;Lo;0;L;;;;;N;;;;; -A218;YI SYLLABLE GGIE;Lo;0;L;;;;;N;;;;; -A219;YI SYLLABLE GGIEP;Lo;0;L;;;;;N;;;;; -A21A;YI SYLLABLE GGAT;Lo;0;L;;;;;N;;;;; -A21B;YI SYLLABLE GGAX;Lo;0;L;;;;;N;;;;; -A21C;YI SYLLABLE GGA;Lo;0;L;;;;;N;;;;; -A21D;YI SYLLABLE GGAP;Lo;0;L;;;;;N;;;;; -A21E;YI SYLLABLE GGUOT;Lo;0;L;;;;;N;;;;; -A21F;YI SYLLABLE GGUOX;Lo;0;L;;;;;N;;;;; -A220;YI SYLLABLE GGUO;Lo;0;L;;;;;N;;;;; -A221;YI SYLLABLE GGUOP;Lo;0;L;;;;;N;;;;; -A222;YI SYLLABLE GGOT;Lo;0;L;;;;;N;;;;; -A223;YI SYLLABLE GGOX;Lo;0;L;;;;;N;;;;; -A224;YI SYLLABLE GGO;Lo;0;L;;;;;N;;;;; -A225;YI SYLLABLE GGOP;Lo;0;L;;;;;N;;;;; -A226;YI SYLLABLE GGET;Lo;0;L;;;;;N;;;;; -A227;YI SYLLABLE GGEX;Lo;0;L;;;;;N;;;;; -A228;YI SYLLABLE GGE;Lo;0;L;;;;;N;;;;; -A229;YI SYLLABLE GGEP;Lo;0;L;;;;;N;;;;; -A22A;YI SYLLABLE GGUT;Lo;0;L;;;;;N;;;;; -A22B;YI SYLLABLE GGUX;Lo;0;L;;;;;N;;;;; -A22C;YI SYLLABLE GGU;Lo;0;L;;;;;N;;;;; -A22D;YI SYLLABLE GGUP;Lo;0;L;;;;;N;;;;; -A22E;YI SYLLABLE GGURX;Lo;0;L;;;;;N;;;;; -A22F;YI SYLLABLE GGUR;Lo;0;L;;;;;N;;;;; -A230;YI SYLLABLE MGIEX;Lo;0;L;;;;;N;;;;; -A231;YI SYLLABLE MGIE;Lo;0;L;;;;;N;;;;; -A232;YI SYLLABLE MGAT;Lo;0;L;;;;;N;;;;; -A233;YI SYLLABLE MGAX;Lo;0;L;;;;;N;;;;; -A234;YI SYLLABLE MGA;Lo;0;L;;;;;N;;;;; -A235;YI SYLLABLE MGAP;Lo;0;L;;;;;N;;;;; -A236;YI SYLLABLE MGUOX;Lo;0;L;;;;;N;;;;; -A237;YI SYLLABLE MGUO;Lo;0;L;;;;;N;;;;; -A238;YI SYLLABLE MGUOP;Lo;0;L;;;;;N;;;;; -A239;YI SYLLABLE MGOT;Lo;0;L;;;;;N;;;;; -A23A;YI SYLLABLE MGOX;Lo;0;L;;;;;N;;;;; -A23B;YI SYLLABLE MGO;Lo;0;L;;;;;N;;;;; -A23C;YI SYLLABLE MGOP;Lo;0;L;;;;;N;;;;; -A23D;YI SYLLABLE MGEX;Lo;0;L;;;;;N;;;;; -A23E;YI SYLLABLE MGE;Lo;0;L;;;;;N;;;;; -A23F;YI SYLLABLE MGEP;Lo;0;L;;;;;N;;;;; -A240;YI SYLLABLE MGUT;Lo;0;L;;;;;N;;;;; -A241;YI SYLLABLE MGUX;Lo;0;L;;;;;N;;;;; -A242;YI SYLLABLE MGU;Lo;0;L;;;;;N;;;;; -A243;YI SYLLABLE MGUP;Lo;0;L;;;;;N;;;;; -A244;YI SYLLABLE MGURX;Lo;0;L;;;;;N;;;;; -A245;YI SYLLABLE MGUR;Lo;0;L;;;;;N;;;;; -A246;YI SYLLABLE HXIT;Lo;0;L;;;;;N;;;;; -A247;YI SYLLABLE HXIX;Lo;0;L;;;;;N;;;;; -A248;YI SYLLABLE HXI;Lo;0;L;;;;;N;;;;; -A249;YI SYLLABLE HXIP;Lo;0;L;;;;;N;;;;; -A24A;YI SYLLABLE HXIET;Lo;0;L;;;;;N;;;;; -A24B;YI SYLLABLE HXIEX;Lo;0;L;;;;;N;;;;; -A24C;YI SYLLABLE HXIE;Lo;0;L;;;;;N;;;;; -A24D;YI SYLLABLE HXIEP;Lo;0;L;;;;;N;;;;; -A24E;YI SYLLABLE HXAT;Lo;0;L;;;;;N;;;;; -A24F;YI SYLLABLE HXAX;Lo;0;L;;;;;N;;;;; -A250;YI SYLLABLE HXA;Lo;0;L;;;;;N;;;;; -A251;YI SYLLABLE HXAP;Lo;0;L;;;;;N;;;;; -A252;YI SYLLABLE HXUOT;Lo;0;L;;;;;N;;;;; -A253;YI SYLLABLE HXUOX;Lo;0;L;;;;;N;;;;; -A254;YI SYLLABLE HXUO;Lo;0;L;;;;;N;;;;; -A255;YI SYLLABLE HXUOP;Lo;0;L;;;;;N;;;;; -A256;YI SYLLABLE HXOT;Lo;0;L;;;;;N;;;;; -A257;YI SYLLABLE HXOX;Lo;0;L;;;;;N;;;;; -A258;YI SYLLABLE HXO;Lo;0;L;;;;;N;;;;; -A259;YI SYLLABLE HXOP;Lo;0;L;;;;;N;;;;; -A25A;YI SYLLABLE HXEX;Lo;0;L;;;;;N;;;;; -A25B;YI SYLLABLE HXE;Lo;0;L;;;;;N;;;;; -A25C;YI SYLLABLE HXEP;Lo;0;L;;;;;N;;;;; -A25D;YI SYLLABLE NGIEX;Lo;0;L;;;;;N;;;;; -A25E;YI SYLLABLE NGIE;Lo;0;L;;;;;N;;;;; -A25F;YI SYLLABLE NGIEP;Lo;0;L;;;;;N;;;;; -A260;YI SYLLABLE NGAT;Lo;0;L;;;;;N;;;;; -A261;YI SYLLABLE NGAX;Lo;0;L;;;;;N;;;;; -A262;YI SYLLABLE NGA;Lo;0;L;;;;;N;;;;; -A263;YI SYLLABLE NGAP;Lo;0;L;;;;;N;;;;; -A264;YI SYLLABLE NGUOT;Lo;0;L;;;;;N;;;;; -A265;YI SYLLABLE NGUOX;Lo;0;L;;;;;N;;;;; -A266;YI SYLLABLE NGUO;Lo;0;L;;;;;N;;;;; -A267;YI SYLLABLE NGOT;Lo;0;L;;;;;N;;;;; -A268;YI SYLLABLE NGOX;Lo;0;L;;;;;N;;;;; -A269;YI SYLLABLE NGO;Lo;0;L;;;;;N;;;;; -A26A;YI SYLLABLE NGOP;Lo;0;L;;;;;N;;;;; -A26B;YI SYLLABLE NGEX;Lo;0;L;;;;;N;;;;; -A26C;YI SYLLABLE NGE;Lo;0;L;;;;;N;;;;; -A26D;YI SYLLABLE NGEP;Lo;0;L;;;;;N;;;;; -A26E;YI SYLLABLE HIT;Lo;0;L;;;;;N;;;;; -A26F;YI SYLLABLE HIEX;Lo;0;L;;;;;N;;;;; -A270;YI SYLLABLE HIE;Lo;0;L;;;;;N;;;;; -A271;YI SYLLABLE HAT;Lo;0;L;;;;;N;;;;; -A272;YI SYLLABLE HAX;Lo;0;L;;;;;N;;;;; -A273;YI SYLLABLE HA;Lo;0;L;;;;;N;;;;; -A274;YI SYLLABLE HAP;Lo;0;L;;;;;N;;;;; -A275;YI SYLLABLE HUOT;Lo;0;L;;;;;N;;;;; -A276;YI SYLLABLE HUOX;Lo;0;L;;;;;N;;;;; -A277;YI SYLLABLE HUO;Lo;0;L;;;;;N;;;;; -A278;YI SYLLABLE HUOP;Lo;0;L;;;;;N;;;;; -A279;YI SYLLABLE HOT;Lo;0;L;;;;;N;;;;; -A27A;YI SYLLABLE HOX;Lo;0;L;;;;;N;;;;; -A27B;YI SYLLABLE HO;Lo;0;L;;;;;N;;;;; -A27C;YI SYLLABLE HOP;Lo;0;L;;;;;N;;;;; -A27D;YI SYLLABLE HEX;Lo;0;L;;;;;N;;;;; -A27E;YI SYLLABLE HE;Lo;0;L;;;;;N;;;;; -A27F;YI SYLLABLE HEP;Lo;0;L;;;;;N;;;;; -A280;YI SYLLABLE WAT;Lo;0;L;;;;;N;;;;; -A281;YI SYLLABLE WAX;Lo;0;L;;;;;N;;;;; -A282;YI SYLLABLE WA;Lo;0;L;;;;;N;;;;; -A283;YI SYLLABLE WAP;Lo;0;L;;;;;N;;;;; -A284;YI SYLLABLE WUOX;Lo;0;L;;;;;N;;;;; -A285;YI SYLLABLE WUO;Lo;0;L;;;;;N;;;;; -A286;YI SYLLABLE WUOP;Lo;0;L;;;;;N;;;;; -A287;YI SYLLABLE WOX;Lo;0;L;;;;;N;;;;; -A288;YI SYLLABLE WO;Lo;0;L;;;;;N;;;;; -A289;YI SYLLABLE WOP;Lo;0;L;;;;;N;;;;; -A28A;YI SYLLABLE WEX;Lo;0;L;;;;;N;;;;; -A28B;YI SYLLABLE WE;Lo;0;L;;;;;N;;;;; -A28C;YI SYLLABLE WEP;Lo;0;L;;;;;N;;;;; -A28D;YI SYLLABLE ZIT;Lo;0;L;;;;;N;;;;; -A28E;YI SYLLABLE ZIX;Lo;0;L;;;;;N;;;;; -A28F;YI SYLLABLE ZI;Lo;0;L;;;;;N;;;;; -A290;YI SYLLABLE ZIP;Lo;0;L;;;;;N;;;;; -A291;YI SYLLABLE ZIEX;Lo;0;L;;;;;N;;;;; -A292;YI SYLLABLE ZIE;Lo;0;L;;;;;N;;;;; -A293;YI SYLLABLE ZIEP;Lo;0;L;;;;;N;;;;; -A294;YI SYLLABLE ZAT;Lo;0;L;;;;;N;;;;; -A295;YI SYLLABLE ZAX;Lo;0;L;;;;;N;;;;; -A296;YI SYLLABLE ZA;Lo;0;L;;;;;N;;;;; -A297;YI SYLLABLE ZAP;Lo;0;L;;;;;N;;;;; -A298;YI SYLLABLE ZUOX;Lo;0;L;;;;;N;;;;; -A299;YI SYLLABLE ZUO;Lo;0;L;;;;;N;;;;; -A29A;YI SYLLABLE ZUOP;Lo;0;L;;;;;N;;;;; -A29B;YI SYLLABLE ZOT;Lo;0;L;;;;;N;;;;; -A29C;YI SYLLABLE ZOX;Lo;0;L;;;;;N;;;;; -A29D;YI SYLLABLE ZO;Lo;0;L;;;;;N;;;;; -A29E;YI SYLLABLE ZOP;Lo;0;L;;;;;N;;;;; -A29F;YI SYLLABLE ZEX;Lo;0;L;;;;;N;;;;; -A2A0;YI SYLLABLE ZE;Lo;0;L;;;;;N;;;;; -A2A1;YI SYLLABLE ZEP;Lo;0;L;;;;;N;;;;; -A2A2;YI SYLLABLE ZUT;Lo;0;L;;;;;N;;;;; -A2A3;YI SYLLABLE ZUX;Lo;0;L;;;;;N;;;;; -A2A4;YI SYLLABLE ZU;Lo;0;L;;;;;N;;;;; -A2A5;YI SYLLABLE ZUP;Lo;0;L;;;;;N;;;;; -A2A6;YI SYLLABLE ZURX;Lo;0;L;;;;;N;;;;; -A2A7;YI SYLLABLE ZUR;Lo;0;L;;;;;N;;;;; -A2A8;YI SYLLABLE ZYT;Lo;0;L;;;;;N;;;;; -A2A9;YI SYLLABLE ZYX;Lo;0;L;;;;;N;;;;; -A2AA;YI SYLLABLE ZY;Lo;0;L;;;;;N;;;;; -A2AB;YI SYLLABLE ZYP;Lo;0;L;;;;;N;;;;; -A2AC;YI SYLLABLE ZYRX;Lo;0;L;;;;;N;;;;; -A2AD;YI SYLLABLE ZYR;Lo;0;L;;;;;N;;;;; -A2AE;YI SYLLABLE CIT;Lo;0;L;;;;;N;;;;; -A2AF;YI SYLLABLE CIX;Lo;0;L;;;;;N;;;;; -A2B0;YI SYLLABLE CI;Lo;0;L;;;;;N;;;;; -A2B1;YI SYLLABLE CIP;Lo;0;L;;;;;N;;;;; -A2B2;YI SYLLABLE CIET;Lo;0;L;;;;;N;;;;; -A2B3;YI SYLLABLE CIEX;Lo;0;L;;;;;N;;;;; -A2B4;YI SYLLABLE CIE;Lo;0;L;;;;;N;;;;; -A2B5;YI SYLLABLE CIEP;Lo;0;L;;;;;N;;;;; -A2B6;YI SYLLABLE CAT;Lo;0;L;;;;;N;;;;; -A2B7;YI SYLLABLE CAX;Lo;0;L;;;;;N;;;;; -A2B8;YI SYLLABLE CA;Lo;0;L;;;;;N;;;;; -A2B9;YI SYLLABLE CAP;Lo;0;L;;;;;N;;;;; -A2BA;YI SYLLABLE CUOX;Lo;0;L;;;;;N;;;;; -A2BB;YI SYLLABLE CUO;Lo;0;L;;;;;N;;;;; -A2BC;YI SYLLABLE CUOP;Lo;0;L;;;;;N;;;;; -A2BD;YI SYLLABLE COT;Lo;0;L;;;;;N;;;;; -A2BE;YI SYLLABLE COX;Lo;0;L;;;;;N;;;;; -A2BF;YI SYLLABLE CO;Lo;0;L;;;;;N;;;;; -A2C0;YI SYLLABLE COP;Lo;0;L;;;;;N;;;;; -A2C1;YI SYLLABLE CEX;Lo;0;L;;;;;N;;;;; -A2C2;YI SYLLABLE CE;Lo;0;L;;;;;N;;;;; -A2C3;YI SYLLABLE CEP;Lo;0;L;;;;;N;;;;; -A2C4;YI SYLLABLE CUT;Lo;0;L;;;;;N;;;;; -A2C5;YI SYLLABLE CUX;Lo;0;L;;;;;N;;;;; -A2C6;YI SYLLABLE CU;Lo;0;L;;;;;N;;;;; -A2C7;YI SYLLABLE CUP;Lo;0;L;;;;;N;;;;; -A2C8;YI SYLLABLE CURX;Lo;0;L;;;;;N;;;;; -A2C9;YI SYLLABLE CUR;Lo;0;L;;;;;N;;;;; -A2CA;YI SYLLABLE CYT;Lo;0;L;;;;;N;;;;; -A2CB;YI SYLLABLE CYX;Lo;0;L;;;;;N;;;;; -A2CC;YI SYLLABLE CY;Lo;0;L;;;;;N;;;;; -A2CD;YI SYLLABLE CYP;Lo;0;L;;;;;N;;;;; -A2CE;YI SYLLABLE CYRX;Lo;0;L;;;;;N;;;;; -A2CF;YI SYLLABLE CYR;Lo;0;L;;;;;N;;;;; -A2D0;YI SYLLABLE ZZIT;Lo;0;L;;;;;N;;;;; -A2D1;YI SYLLABLE ZZIX;Lo;0;L;;;;;N;;;;; -A2D2;YI SYLLABLE ZZI;Lo;0;L;;;;;N;;;;; -A2D3;YI SYLLABLE ZZIP;Lo;0;L;;;;;N;;;;; -A2D4;YI SYLLABLE ZZIET;Lo;0;L;;;;;N;;;;; -A2D5;YI SYLLABLE ZZIEX;Lo;0;L;;;;;N;;;;; -A2D6;YI SYLLABLE ZZIE;Lo;0;L;;;;;N;;;;; -A2D7;YI SYLLABLE ZZIEP;Lo;0;L;;;;;N;;;;; -A2D8;YI SYLLABLE ZZAT;Lo;0;L;;;;;N;;;;; -A2D9;YI SYLLABLE ZZAX;Lo;0;L;;;;;N;;;;; -A2DA;YI SYLLABLE ZZA;Lo;0;L;;;;;N;;;;; -A2DB;YI SYLLABLE ZZAP;Lo;0;L;;;;;N;;;;; -A2DC;YI SYLLABLE ZZOX;Lo;0;L;;;;;N;;;;; -A2DD;YI SYLLABLE ZZO;Lo;0;L;;;;;N;;;;; -A2DE;YI SYLLABLE ZZOP;Lo;0;L;;;;;N;;;;; -A2DF;YI SYLLABLE ZZEX;Lo;0;L;;;;;N;;;;; -A2E0;YI SYLLABLE ZZE;Lo;0;L;;;;;N;;;;; -A2E1;YI SYLLABLE ZZEP;Lo;0;L;;;;;N;;;;; -A2E2;YI SYLLABLE ZZUX;Lo;0;L;;;;;N;;;;; -A2E3;YI SYLLABLE ZZU;Lo;0;L;;;;;N;;;;; -A2E4;YI SYLLABLE ZZUP;Lo;0;L;;;;;N;;;;; -A2E5;YI SYLLABLE ZZURX;Lo;0;L;;;;;N;;;;; -A2E6;YI SYLLABLE ZZUR;Lo;0;L;;;;;N;;;;; -A2E7;YI SYLLABLE ZZYT;Lo;0;L;;;;;N;;;;; -A2E8;YI SYLLABLE ZZYX;Lo;0;L;;;;;N;;;;; -A2E9;YI SYLLABLE ZZY;Lo;0;L;;;;;N;;;;; -A2EA;YI SYLLABLE ZZYP;Lo;0;L;;;;;N;;;;; -A2EB;YI SYLLABLE ZZYRX;Lo;0;L;;;;;N;;;;; -A2EC;YI SYLLABLE ZZYR;Lo;0;L;;;;;N;;;;; -A2ED;YI SYLLABLE NZIT;Lo;0;L;;;;;N;;;;; -A2EE;YI SYLLABLE NZIX;Lo;0;L;;;;;N;;;;; -A2EF;YI SYLLABLE NZI;Lo;0;L;;;;;N;;;;; -A2F0;YI SYLLABLE NZIP;Lo;0;L;;;;;N;;;;; -A2F1;YI SYLLABLE NZIEX;Lo;0;L;;;;;N;;;;; -A2F2;YI SYLLABLE NZIE;Lo;0;L;;;;;N;;;;; -A2F3;YI SYLLABLE NZIEP;Lo;0;L;;;;;N;;;;; -A2F4;YI SYLLABLE NZAT;Lo;0;L;;;;;N;;;;; -A2F5;YI SYLLABLE NZAX;Lo;0;L;;;;;N;;;;; -A2F6;YI SYLLABLE NZA;Lo;0;L;;;;;N;;;;; -A2F7;YI SYLLABLE NZAP;Lo;0;L;;;;;N;;;;; -A2F8;YI SYLLABLE NZUOX;Lo;0;L;;;;;N;;;;; -A2F9;YI SYLLABLE NZUO;Lo;0;L;;;;;N;;;;; -A2FA;YI SYLLABLE NZOX;Lo;0;L;;;;;N;;;;; -A2FB;YI SYLLABLE NZOP;Lo;0;L;;;;;N;;;;; -A2FC;YI SYLLABLE NZEX;Lo;0;L;;;;;N;;;;; -A2FD;YI SYLLABLE NZE;Lo;0;L;;;;;N;;;;; -A2FE;YI SYLLABLE NZUX;Lo;0;L;;;;;N;;;;; -A2FF;YI SYLLABLE NZU;Lo;0;L;;;;;N;;;;; -A300;YI SYLLABLE NZUP;Lo;0;L;;;;;N;;;;; -A301;YI SYLLABLE NZURX;Lo;0;L;;;;;N;;;;; -A302;YI SYLLABLE NZUR;Lo;0;L;;;;;N;;;;; -A303;YI SYLLABLE NZYT;Lo;0;L;;;;;N;;;;; -A304;YI SYLLABLE NZYX;Lo;0;L;;;;;N;;;;; -A305;YI SYLLABLE NZY;Lo;0;L;;;;;N;;;;; -A306;YI SYLLABLE NZYP;Lo;0;L;;;;;N;;;;; -A307;YI SYLLABLE NZYRX;Lo;0;L;;;;;N;;;;; -A308;YI SYLLABLE NZYR;Lo;0;L;;;;;N;;;;; -A309;YI SYLLABLE SIT;Lo;0;L;;;;;N;;;;; -A30A;YI SYLLABLE SIX;Lo;0;L;;;;;N;;;;; -A30B;YI SYLLABLE SI;Lo;0;L;;;;;N;;;;; -A30C;YI SYLLABLE SIP;Lo;0;L;;;;;N;;;;; -A30D;YI SYLLABLE SIEX;Lo;0;L;;;;;N;;;;; -A30E;YI SYLLABLE SIE;Lo;0;L;;;;;N;;;;; -A30F;YI SYLLABLE SIEP;Lo;0;L;;;;;N;;;;; -A310;YI SYLLABLE SAT;Lo;0;L;;;;;N;;;;; -A311;YI SYLLABLE SAX;Lo;0;L;;;;;N;;;;; -A312;YI SYLLABLE SA;Lo;0;L;;;;;N;;;;; -A313;YI SYLLABLE SAP;Lo;0;L;;;;;N;;;;; -A314;YI SYLLABLE SUOX;Lo;0;L;;;;;N;;;;; -A315;YI SYLLABLE SUO;Lo;0;L;;;;;N;;;;; -A316;YI SYLLABLE SUOP;Lo;0;L;;;;;N;;;;; -A317;YI SYLLABLE SOT;Lo;0;L;;;;;N;;;;; -A318;YI SYLLABLE SOX;Lo;0;L;;;;;N;;;;; -A319;YI SYLLABLE SO;Lo;0;L;;;;;N;;;;; -A31A;YI SYLLABLE SOP;Lo;0;L;;;;;N;;;;; -A31B;YI SYLLABLE SEX;Lo;0;L;;;;;N;;;;; -A31C;YI SYLLABLE SE;Lo;0;L;;;;;N;;;;; -A31D;YI SYLLABLE SEP;Lo;0;L;;;;;N;;;;; -A31E;YI SYLLABLE SUT;Lo;0;L;;;;;N;;;;; -A31F;YI SYLLABLE SUX;Lo;0;L;;;;;N;;;;; -A320;YI SYLLABLE SU;Lo;0;L;;;;;N;;;;; -A321;YI SYLLABLE SUP;Lo;0;L;;;;;N;;;;; -A322;YI SYLLABLE SURX;Lo;0;L;;;;;N;;;;; -A323;YI SYLLABLE SUR;Lo;0;L;;;;;N;;;;; -A324;YI SYLLABLE SYT;Lo;0;L;;;;;N;;;;; -A325;YI SYLLABLE SYX;Lo;0;L;;;;;N;;;;; -A326;YI SYLLABLE SY;Lo;0;L;;;;;N;;;;; -A327;YI SYLLABLE SYP;Lo;0;L;;;;;N;;;;; -A328;YI SYLLABLE SYRX;Lo;0;L;;;;;N;;;;; -A329;YI SYLLABLE SYR;Lo;0;L;;;;;N;;;;; -A32A;YI SYLLABLE SSIT;Lo;0;L;;;;;N;;;;; -A32B;YI SYLLABLE SSIX;Lo;0;L;;;;;N;;;;; -A32C;YI SYLLABLE SSI;Lo;0;L;;;;;N;;;;; -A32D;YI SYLLABLE SSIP;Lo;0;L;;;;;N;;;;; -A32E;YI SYLLABLE SSIEX;Lo;0;L;;;;;N;;;;; -A32F;YI SYLLABLE SSIE;Lo;0;L;;;;;N;;;;; -A330;YI SYLLABLE SSIEP;Lo;0;L;;;;;N;;;;; -A331;YI SYLLABLE SSAT;Lo;0;L;;;;;N;;;;; -A332;YI SYLLABLE SSAX;Lo;0;L;;;;;N;;;;; -A333;YI SYLLABLE SSA;Lo;0;L;;;;;N;;;;; -A334;YI SYLLABLE SSAP;Lo;0;L;;;;;N;;;;; -A335;YI SYLLABLE SSOT;Lo;0;L;;;;;N;;;;; -A336;YI SYLLABLE SSOX;Lo;0;L;;;;;N;;;;; -A337;YI SYLLABLE SSO;Lo;0;L;;;;;N;;;;; -A338;YI SYLLABLE SSOP;Lo;0;L;;;;;N;;;;; -A339;YI SYLLABLE SSEX;Lo;0;L;;;;;N;;;;; -A33A;YI SYLLABLE SSE;Lo;0;L;;;;;N;;;;; -A33B;YI SYLLABLE SSEP;Lo;0;L;;;;;N;;;;; -A33C;YI SYLLABLE SSUT;Lo;0;L;;;;;N;;;;; -A33D;YI SYLLABLE SSUX;Lo;0;L;;;;;N;;;;; -A33E;YI SYLLABLE SSU;Lo;0;L;;;;;N;;;;; -A33F;YI SYLLABLE SSUP;Lo;0;L;;;;;N;;;;; -A340;YI SYLLABLE SSYT;Lo;0;L;;;;;N;;;;; -A341;YI SYLLABLE SSYX;Lo;0;L;;;;;N;;;;; -A342;YI SYLLABLE SSY;Lo;0;L;;;;;N;;;;; -A343;YI SYLLABLE SSYP;Lo;0;L;;;;;N;;;;; -A344;YI SYLLABLE SSYRX;Lo;0;L;;;;;N;;;;; -A345;YI SYLLABLE SSYR;Lo;0;L;;;;;N;;;;; -A346;YI SYLLABLE ZHAT;Lo;0;L;;;;;N;;;;; -A347;YI SYLLABLE ZHAX;Lo;0;L;;;;;N;;;;; -A348;YI SYLLABLE ZHA;Lo;0;L;;;;;N;;;;; -A349;YI SYLLABLE ZHAP;Lo;0;L;;;;;N;;;;; -A34A;YI SYLLABLE ZHUOX;Lo;0;L;;;;;N;;;;; -A34B;YI SYLLABLE ZHUO;Lo;0;L;;;;;N;;;;; -A34C;YI SYLLABLE ZHUOP;Lo;0;L;;;;;N;;;;; -A34D;YI SYLLABLE ZHOT;Lo;0;L;;;;;N;;;;; -A34E;YI SYLLABLE ZHOX;Lo;0;L;;;;;N;;;;; -A34F;YI SYLLABLE ZHO;Lo;0;L;;;;;N;;;;; -A350;YI SYLLABLE ZHOP;Lo;0;L;;;;;N;;;;; -A351;YI SYLLABLE ZHET;Lo;0;L;;;;;N;;;;; -A352;YI SYLLABLE ZHEX;Lo;0;L;;;;;N;;;;; -A353;YI SYLLABLE ZHE;Lo;0;L;;;;;N;;;;; -A354;YI SYLLABLE ZHEP;Lo;0;L;;;;;N;;;;; -A355;YI SYLLABLE ZHUT;Lo;0;L;;;;;N;;;;; -A356;YI SYLLABLE ZHUX;Lo;0;L;;;;;N;;;;; -A357;YI SYLLABLE ZHU;Lo;0;L;;;;;N;;;;; -A358;YI SYLLABLE ZHUP;Lo;0;L;;;;;N;;;;; -A359;YI SYLLABLE ZHURX;Lo;0;L;;;;;N;;;;; -A35A;YI SYLLABLE ZHUR;Lo;0;L;;;;;N;;;;; -A35B;YI SYLLABLE ZHYT;Lo;0;L;;;;;N;;;;; -A35C;YI SYLLABLE ZHYX;Lo;0;L;;;;;N;;;;; -A35D;YI SYLLABLE ZHY;Lo;0;L;;;;;N;;;;; -A35E;YI SYLLABLE ZHYP;Lo;0;L;;;;;N;;;;; -A35F;YI SYLLABLE ZHYRX;Lo;0;L;;;;;N;;;;; -A360;YI SYLLABLE ZHYR;Lo;0;L;;;;;N;;;;; -A361;YI SYLLABLE CHAT;Lo;0;L;;;;;N;;;;; -A362;YI SYLLABLE CHAX;Lo;0;L;;;;;N;;;;; -A363;YI SYLLABLE CHA;Lo;0;L;;;;;N;;;;; -A364;YI SYLLABLE CHAP;Lo;0;L;;;;;N;;;;; -A365;YI SYLLABLE CHUOT;Lo;0;L;;;;;N;;;;; -A366;YI SYLLABLE CHUOX;Lo;0;L;;;;;N;;;;; -A367;YI SYLLABLE CHUO;Lo;0;L;;;;;N;;;;; -A368;YI SYLLABLE CHUOP;Lo;0;L;;;;;N;;;;; -A369;YI SYLLABLE CHOT;Lo;0;L;;;;;N;;;;; -A36A;YI SYLLABLE CHOX;Lo;0;L;;;;;N;;;;; -A36B;YI SYLLABLE CHO;Lo;0;L;;;;;N;;;;; -A36C;YI SYLLABLE CHOP;Lo;0;L;;;;;N;;;;; -A36D;YI SYLLABLE CHET;Lo;0;L;;;;;N;;;;; -A36E;YI SYLLABLE CHEX;Lo;0;L;;;;;N;;;;; -A36F;YI SYLLABLE CHE;Lo;0;L;;;;;N;;;;; -A370;YI SYLLABLE CHEP;Lo;0;L;;;;;N;;;;; -A371;YI SYLLABLE CHUX;Lo;0;L;;;;;N;;;;; -A372;YI SYLLABLE CHU;Lo;0;L;;;;;N;;;;; -A373;YI SYLLABLE CHUP;Lo;0;L;;;;;N;;;;; -A374;YI SYLLABLE CHURX;Lo;0;L;;;;;N;;;;; -A375;YI SYLLABLE CHUR;Lo;0;L;;;;;N;;;;; -A376;YI SYLLABLE CHYT;Lo;0;L;;;;;N;;;;; -A377;YI SYLLABLE CHYX;Lo;0;L;;;;;N;;;;; -A378;YI SYLLABLE CHY;Lo;0;L;;;;;N;;;;; -A379;YI SYLLABLE CHYP;Lo;0;L;;;;;N;;;;; -A37A;YI SYLLABLE CHYRX;Lo;0;L;;;;;N;;;;; -A37B;YI SYLLABLE CHYR;Lo;0;L;;;;;N;;;;; -A37C;YI SYLLABLE RRAX;Lo;0;L;;;;;N;;;;; -A37D;YI SYLLABLE RRA;Lo;0;L;;;;;N;;;;; -A37E;YI SYLLABLE RRUOX;Lo;0;L;;;;;N;;;;; -A37F;YI SYLLABLE RRUO;Lo;0;L;;;;;N;;;;; -A380;YI SYLLABLE RROT;Lo;0;L;;;;;N;;;;; -A381;YI SYLLABLE RROX;Lo;0;L;;;;;N;;;;; -A382;YI SYLLABLE RRO;Lo;0;L;;;;;N;;;;; -A383;YI SYLLABLE RROP;Lo;0;L;;;;;N;;;;; -A384;YI SYLLABLE RRET;Lo;0;L;;;;;N;;;;; -A385;YI SYLLABLE RREX;Lo;0;L;;;;;N;;;;; -A386;YI SYLLABLE RRE;Lo;0;L;;;;;N;;;;; -A387;YI SYLLABLE RREP;Lo;0;L;;;;;N;;;;; -A388;YI SYLLABLE RRUT;Lo;0;L;;;;;N;;;;; -A389;YI SYLLABLE RRUX;Lo;0;L;;;;;N;;;;; -A38A;YI SYLLABLE RRU;Lo;0;L;;;;;N;;;;; -A38B;YI SYLLABLE RRUP;Lo;0;L;;;;;N;;;;; -A38C;YI SYLLABLE RRURX;Lo;0;L;;;;;N;;;;; -A38D;YI SYLLABLE RRUR;Lo;0;L;;;;;N;;;;; -A38E;YI SYLLABLE RRYT;Lo;0;L;;;;;N;;;;; -A38F;YI SYLLABLE RRYX;Lo;0;L;;;;;N;;;;; -A390;YI SYLLABLE RRY;Lo;0;L;;;;;N;;;;; -A391;YI SYLLABLE RRYP;Lo;0;L;;;;;N;;;;; -A392;YI SYLLABLE RRYRX;Lo;0;L;;;;;N;;;;; -A393;YI SYLLABLE RRYR;Lo;0;L;;;;;N;;;;; -A394;YI SYLLABLE NRAT;Lo;0;L;;;;;N;;;;; -A395;YI SYLLABLE NRAX;Lo;0;L;;;;;N;;;;; -A396;YI SYLLABLE NRA;Lo;0;L;;;;;N;;;;; -A397;YI SYLLABLE NRAP;Lo;0;L;;;;;N;;;;; -A398;YI SYLLABLE NROX;Lo;0;L;;;;;N;;;;; -A399;YI SYLLABLE NRO;Lo;0;L;;;;;N;;;;; -A39A;YI SYLLABLE NROP;Lo;0;L;;;;;N;;;;; -A39B;YI SYLLABLE NRET;Lo;0;L;;;;;N;;;;; -A39C;YI SYLLABLE NREX;Lo;0;L;;;;;N;;;;; -A39D;YI SYLLABLE NRE;Lo;0;L;;;;;N;;;;; -A39E;YI SYLLABLE NREP;Lo;0;L;;;;;N;;;;; -A39F;YI SYLLABLE NRUT;Lo;0;L;;;;;N;;;;; -A3A0;YI SYLLABLE NRUX;Lo;0;L;;;;;N;;;;; -A3A1;YI SYLLABLE NRU;Lo;0;L;;;;;N;;;;; -A3A2;YI SYLLABLE NRUP;Lo;0;L;;;;;N;;;;; -A3A3;YI SYLLABLE NRURX;Lo;0;L;;;;;N;;;;; -A3A4;YI SYLLABLE NRUR;Lo;0;L;;;;;N;;;;; -A3A5;YI SYLLABLE NRYT;Lo;0;L;;;;;N;;;;; -A3A6;YI SYLLABLE NRYX;Lo;0;L;;;;;N;;;;; -A3A7;YI SYLLABLE NRY;Lo;0;L;;;;;N;;;;; -A3A8;YI SYLLABLE NRYP;Lo;0;L;;;;;N;;;;; -A3A9;YI SYLLABLE NRYRX;Lo;0;L;;;;;N;;;;; -A3AA;YI SYLLABLE NRYR;Lo;0;L;;;;;N;;;;; -A3AB;YI SYLLABLE SHAT;Lo;0;L;;;;;N;;;;; -A3AC;YI SYLLABLE SHAX;Lo;0;L;;;;;N;;;;; -A3AD;YI SYLLABLE SHA;Lo;0;L;;;;;N;;;;; -A3AE;YI SYLLABLE SHAP;Lo;0;L;;;;;N;;;;; -A3AF;YI SYLLABLE SHUOX;Lo;0;L;;;;;N;;;;; -A3B0;YI SYLLABLE SHUO;Lo;0;L;;;;;N;;;;; -A3B1;YI SYLLABLE SHUOP;Lo;0;L;;;;;N;;;;; -A3B2;YI SYLLABLE SHOT;Lo;0;L;;;;;N;;;;; -A3B3;YI SYLLABLE SHOX;Lo;0;L;;;;;N;;;;; -A3B4;YI SYLLABLE SHO;Lo;0;L;;;;;N;;;;; -A3B5;YI SYLLABLE SHOP;Lo;0;L;;;;;N;;;;; -A3B6;YI SYLLABLE SHET;Lo;0;L;;;;;N;;;;; -A3B7;YI SYLLABLE SHEX;Lo;0;L;;;;;N;;;;; -A3B8;YI SYLLABLE SHE;Lo;0;L;;;;;N;;;;; -A3B9;YI SYLLABLE SHEP;Lo;0;L;;;;;N;;;;; -A3BA;YI SYLLABLE SHUT;Lo;0;L;;;;;N;;;;; -A3BB;YI SYLLABLE SHUX;Lo;0;L;;;;;N;;;;; -A3BC;YI SYLLABLE SHU;Lo;0;L;;;;;N;;;;; -A3BD;YI SYLLABLE SHUP;Lo;0;L;;;;;N;;;;; -A3BE;YI SYLLABLE SHURX;Lo;0;L;;;;;N;;;;; -A3BF;YI SYLLABLE SHUR;Lo;0;L;;;;;N;;;;; -A3C0;YI SYLLABLE SHYT;Lo;0;L;;;;;N;;;;; -A3C1;YI SYLLABLE SHYX;Lo;0;L;;;;;N;;;;; -A3C2;YI SYLLABLE SHY;Lo;0;L;;;;;N;;;;; -A3C3;YI SYLLABLE SHYP;Lo;0;L;;;;;N;;;;; -A3C4;YI SYLLABLE SHYRX;Lo;0;L;;;;;N;;;;; -A3C5;YI SYLLABLE SHYR;Lo;0;L;;;;;N;;;;; -A3C6;YI SYLLABLE RAT;Lo;0;L;;;;;N;;;;; -A3C7;YI SYLLABLE RAX;Lo;0;L;;;;;N;;;;; -A3C8;YI SYLLABLE RA;Lo;0;L;;;;;N;;;;; -A3C9;YI SYLLABLE RAP;Lo;0;L;;;;;N;;;;; -A3CA;YI SYLLABLE RUOX;Lo;0;L;;;;;N;;;;; -A3CB;YI SYLLABLE RUO;Lo;0;L;;;;;N;;;;; -A3CC;YI SYLLABLE RUOP;Lo;0;L;;;;;N;;;;; -A3CD;YI SYLLABLE ROT;Lo;0;L;;;;;N;;;;; -A3CE;YI SYLLABLE ROX;Lo;0;L;;;;;N;;;;; -A3CF;YI SYLLABLE RO;Lo;0;L;;;;;N;;;;; -A3D0;YI SYLLABLE ROP;Lo;0;L;;;;;N;;;;; -A3D1;YI SYLLABLE REX;Lo;0;L;;;;;N;;;;; -A3D2;YI SYLLABLE RE;Lo;0;L;;;;;N;;;;; -A3D3;YI SYLLABLE REP;Lo;0;L;;;;;N;;;;; -A3D4;YI SYLLABLE RUT;Lo;0;L;;;;;N;;;;; -A3D5;YI SYLLABLE RUX;Lo;0;L;;;;;N;;;;; -A3D6;YI SYLLABLE RU;Lo;0;L;;;;;N;;;;; -A3D7;YI SYLLABLE RUP;Lo;0;L;;;;;N;;;;; -A3D8;YI SYLLABLE RURX;Lo;0;L;;;;;N;;;;; -A3D9;YI SYLLABLE RUR;Lo;0;L;;;;;N;;;;; -A3DA;YI SYLLABLE RYT;Lo;0;L;;;;;N;;;;; -A3DB;YI SYLLABLE RYX;Lo;0;L;;;;;N;;;;; -A3DC;YI SYLLABLE RY;Lo;0;L;;;;;N;;;;; -A3DD;YI SYLLABLE RYP;Lo;0;L;;;;;N;;;;; -A3DE;YI SYLLABLE RYRX;Lo;0;L;;;;;N;;;;; -A3DF;YI SYLLABLE RYR;Lo;0;L;;;;;N;;;;; -A3E0;YI SYLLABLE JIT;Lo;0;L;;;;;N;;;;; -A3E1;YI SYLLABLE JIX;Lo;0;L;;;;;N;;;;; -A3E2;YI SYLLABLE JI;Lo;0;L;;;;;N;;;;; -A3E3;YI SYLLABLE JIP;Lo;0;L;;;;;N;;;;; -A3E4;YI SYLLABLE JIET;Lo;0;L;;;;;N;;;;; -A3E5;YI SYLLABLE JIEX;Lo;0;L;;;;;N;;;;; -A3E6;YI SYLLABLE JIE;Lo;0;L;;;;;N;;;;; -A3E7;YI SYLLABLE JIEP;Lo;0;L;;;;;N;;;;; -A3E8;YI SYLLABLE JUOT;Lo;0;L;;;;;N;;;;; -A3E9;YI SYLLABLE JUOX;Lo;0;L;;;;;N;;;;; -A3EA;YI SYLLABLE JUO;Lo;0;L;;;;;N;;;;; -A3EB;YI SYLLABLE JUOP;Lo;0;L;;;;;N;;;;; -A3EC;YI SYLLABLE JOT;Lo;0;L;;;;;N;;;;; -A3ED;YI SYLLABLE JOX;Lo;0;L;;;;;N;;;;; -A3EE;YI SYLLABLE JO;Lo;0;L;;;;;N;;;;; -A3EF;YI SYLLABLE JOP;Lo;0;L;;;;;N;;;;; -A3F0;YI SYLLABLE JUT;Lo;0;L;;;;;N;;;;; -A3F1;YI SYLLABLE JUX;Lo;0;L;;;;;N;;;;; -A3F2;YI SYLLABLE JU;Lo;0;L;;;;;N;;;;; -A3F3;YI SYLLABLE JUP;Lo;0;L;;;;;N;;;;; -A3F4;YI SYLLABLE JURX;Lo;0;L;;;;;N;;;;; -A3F5;YI SYLLABLE JUR;Lo;0;L;;;;;N;;;;; -A3F6;YI SYLLABLE JYT;Lo;0;L;;;;;N;;;;; -A3F7;YI SYLLABLE JYX;Lo;0;L;;;;;N;;;;; -A3F8;YI SYLLABLE JY;Lo;0;L;;;;;N;;;;; -A3F9;YI SYLLABLE JYP;Lo;0;L;;;;;N;;;;; -A3FA;YI SYLLABLE JYRX;Lo;0;L;;;;;N;;;;; -A3FB;YI SYLLABLE JYR;Lo;0;L;;;;;N;;;;; -A3FC;YI SYLLABLE QIT;Lo;0;L;;;;;N;;;;; -A3FD;YI SYLLABLE QIX;Lo;0;L;;;;;N;;;;; -A3FE;YI SYLLABLE QI;Lo;0;L;;;;;N;;;;; -A3FF;YI SYLLABLE QIP;Lo;0;L;;;;;N;;;;; -A400;YI SYLLABLE QIET;Lo;0;L;;;;;N;;;;; -A401;YI SYLLABLE QIEX;Lo;0;L;;;;;N;;;;; -A402;YI SYLLABLE QIE;Lo;0;L;;;;;N;;;;; -A403;YI SYLLABLE QIEP;Lo;0;L;;;;;N;;;;; -A404;YI SYLLABLE QUOT;Lo;0;L;;;;;N;;;;; -A405;YI SYLLABLE QUOX;Lo;0;L;;;;;N;;;;; -A406;YI SYLLABLE QUO;Lo;0;L;;;;;N;;;;; -A407;YI SYLLABLE QUOP;Lo;0;L;;;;;N;;;;; -A408;YI SYLLABLE QOT;Lo;0;L;;;;;N;;;;; -A409;YI SYLLABLE QOX;Lo;0;L;;;;;N;;;;; -A40A;YI SYLLABLE QO;Lo;0;L;;;;;N;;;;; -A40B;YI SYLLABLE QOP;Lo;0;L;;;;;N;;;;; -A40C;YI SYLLABLE QUT;Lo;0;L;;;;;N;;;;; -A40D;YI SYLLABLE QUX;Lo;0;L;;;;;N;;;;; -A40E;YI SYLLABLE QU;Lo;0;L;;;;;N;;;;; -A40F;YI SYLLABLE QUP;Lo;0;L;;;;;N;;;;; -A410;YI SYLLABLE QURX;Lo;0;L;;;;;N;;;;; -A411;YI SYLLABLE QUR;Lo;0;L;;;;;N;;;;; -A412;YI SYLLABLE QYT;Lo;0;L;;;;;N;;;;; -A413;YI SYLLABLE QYX;Lo;0;L;;;;;N;;;;; -A414;YI SYLLABLE QY;Lo;0;L;;;;;N;;;;; -A415;YI SYLLABLE QYP;Lo;0;L;;;;;N;;;;; -A416;YI SYLLABLE QYRX;Lo;0;L;;;;;N;;;;; -A417;YI SYLLABLE QYR;Lo;0;L;;;;;N;;;;; -A418;YI SYLLABLE JJIT;Lo;0;L;;;;;N;;;;; -A419;YI SYLLABLE JJIX;Lo;0;L;;;;;N;;;;; -A41A;YI SYLLABLE JJI;Lo;0;L;;;;;N;;;;; -A41B;YI SYLLABLE JJIP;Lo;0;L;;;;;N;;;;; -A41C;YI SYLLABLE JJIET;Lo;0;L;;;;;N;;;;; -A41D;YI SYLLABLE JJIEX;Lo;0;L;;;;;N;;;;; -A41E;YI SYLLABLE JJIE;Lo;0;L;;;;;N;;;;; -A41F;YI SYLLABLE JJIEP;Lo;0;L;;;;;N;;;;; -A420;YI SYLLABLE JJUOX;Lo;0;L;;;;;N;;;;; -A421;YI SYLLABLE JJUO;Lo;0;L;;;;;N;;;;; -A422;YI SYLLABLE JJUOP;Lo;0;L;;;;;N;;;;; -A423;YI SYLLABLE JJOT;Lo;0;L;;;;;N;;;;; -A424;YI SYLLABLE JJOX;Lo;0;L;;;;;N;;;;; -A425;YI SYLLABLE JJO;Lo;0;L;;;;;N;;;;; -A426;YI SYLLABLE JJOP;Lo;0;L;;;;;N;;;;; -A427;YI SYLLABLE JJUT;Lo;0;L;;;;;N;;;;; -A428;YI SYLLABLE JJUX;Lo;0;L;;;;;N;;;;; -A429;YI SYLLABLE JJU;Lo;0;L;;;;;N;;;;; -A42A;YI SYLLABLE JJUP;Lo;0;L;;;;;N;;;;; -A42B;YI SYLLABLE JJURX;Lo;0;L;;;;;N;;;;; -A42C;YI SYLLABLE JJUR;Lo;0;L;;;;;N;;;;; -A42D;YI SYLLABLE JJYT;Lo;0;L;;;;;N;;;;; -A42E;YI SYLLABLE JJYX;Lo;0;L;;;;;N;;;;; -A42F;YI SYLLABLE JJY;Lo;0;L;;;;;N;;;;; -A430;YI SYLLABLE JJYP;Lo;0;L;;;;;N;;;;; -A431;YI SYLLABLE NJIT;Lo;0;L;;;;;N;;;;; -A432;YI SYLLABLE NJIX;Lo;0;L;;;;;N;;;;; -A433;YI SYLLABLE NJI;Lo;0;L;;;;;N;;;;; -A434;YI SYLLABLE NJIP;Lo;0;L;;;;;N;;;;; -A435;YI SYLLABLE NJIET;Lo;0;L;;;;;N;;;;; -A436;YI SYLLABLE NJIEX;Lo;0;L;;;;;N;;;;; -A437;YI SYLLABLE NJIE;Lo;0;L;;;;;N;;;;; -A438;YI SYLLABLE NJIEP;Lo;0;L;;;;;N;;;;; -A439;YI SYLLABLE NJUOX;Lo;0;L;;;;;N;;;;; -A43A;YI SYLLABLE NJUO;Lo;0;L;;;;;N;;;;; -A43B;YI SYLLABLE NJOT;Lo;0;L;;;;;N;;;;; -A43C;YI SYLLABLE NJOX;Lo;0;L;;;;;N;;;;; -A43D;YI SYLLABLE NJO;Lo;0;L;;;;;N;;;;; -A43E;YI SYLLABLE NJOP;Lo;0;L;;;;;N;;;;; -A43F;YI SYLLABLE NJUX;Lo;0;L;;;;;N;;;;; -A440;YI SYLLABLE NJU;Lo;0;L;;;;;N;;;;; -A441;YI SYLLABLE NJUP;Lo;0;L;;;;;N;;;;; -A442;YI SYLLABLE NJURX;Lo;0;L;;;;;N;;;;; -A443;YI SYLLABLE NJUR;Lo;0;L;;;;;N;;;;; -A444;YI SYLLABLE NJYT;Lo;0;L;;;;;N;;;;; -A445;YI SYLLABLE NJYX;Lo;0;L;;;;;N;;;;; -A446;YI SYLLABLE NJY;Lo;0;L;;;;;N;;;;; -A447;YI SYLLABLE NJYP;Lo;0;L;;;;;N;;;;; -A448;YI SYLLABLE NJYRX;Lo;0;L;;;;;N;;;;; -A449;YI SYLLABLE NJYR;Lo;0;L;;;;;N;;;;; -A44A;YI SYLLABLE NYIT;Lo;0;L;;;;;N;;;;; -A44B;YI SYLLABLE NYIX;Lo;0;L;;;;;N;;;;; -A44C;YI SYLLABLE NYI;Lo;0;L;;;;;N;;;;; -A44D;YI SYLLABLE NYIP;Lo;0;L;;;;;N;;;;; -A44E;YI SYLLABLE NYIET;Lo;0;L;;;;;N;;;;; -A44F;YI SYLLABLE NYIEX;Lo;0;L;;;;;N;;;;; -A450;YI SYLLABLE NYIE;Lo;0;L;;;;;N;;;;; -A451;YI SYLLABLE NYIEP;Lo;0;L;;;;;N;;;;; -A452;YI SYLLABLE NYUOX;Lo;0;L;;;;;N;;;;; -A453;YI SYLLABLE NYUO;Lo;0;L;;;;;N;;;;; -A454;YI SYLLABLE NYUOP;Lo;0;L;;;;;N;;;;; -A455;YI SYLLABLE NYOT;Lo;0;L;;;;;N;;;;; -A456;YI SYLLABLE NYOX;Lo;0;L;;;;;N;;;;; -A457;YI SYLLABLE NYO;Lo;0;L;;;;;N;;;;; -A458;YI SYLLABLE NYOP;Lo;0;L;;;;;N;;;;; -A459;YI SYLLABLE NYUT;Lo;0;L;;;;;N;;;;; -A45A;YI SYLLABLE NYUX;Lo;0;L;;;;;N;;;;; -A45B;YI SYLLABLE NYU;Lo;0;L;;;;;N;;;;; -A45C;YI SYLLABLE NYUP;Lo;0;L;;;;;N;;;;; -A45D;YI SYLLABLE XIT;Lo;0;L;;;;;N;;;;; -A45E;YI SYLLABLE XIX;Lo;0;L;;;;;N;;;;; -A45F;YI SYLLABLE XI;Lo;0;L;;;;;N;;;;; -A460;YI SYLLABLE XIP;Lo;0;L;;;;;N;;;;; -A461;YI SYLLABLE XIET;Lo;0;L;;;;;N;;;;; -A462;YI SYLLABLE XIEX;Lo;0;L;;;;;N;;;;; -A463;YI SYLLABLE XIE;Lo;0;L;;;;;N;;;;; -A464;YI SYLLABLE XIEP;Lo;0;L;;;;;N;;;;; -A465;YI SYLLABLE XUOX;Lo;0;L;;;;;N;;;;; -A466;YI SYLLABLE XUO;Lo;0;L;;;;;N;;;;; -A467;YI SYLLABLE XOT;Lo;0;L;;;;;N;;;;; -A468;YI SYLLABLE XOX;Lo;0;L;;;;;N;;;;; -A469;YI SYLLABLE XO;Lo;0;L;;;;;N;;;;; -A46A;YI SYLLABLE XOP;Lo;0;L;;;;;N;;;;; -A46B;YI SYLLABLE XYT;Lo;0;L;;;;;N;;;;; -A46C;YI SYLLABLE XYX;Lo;0;L;;;;;N;;;;; -A46D;YI SYLLABLE XY;Lo;0;L;;;;;N;;;;; -A46E;YI SYLLABLE XYP;Lo;0;L;;;;;N;;;;; -A46F;YI SYLLABLE XYRX;Lo;0;L;;;;;N;;;;; -A470;YI SYLLABLE XYR;Lo;0;L;;;;;N;;;;; -A471;YI SYLLABLE YIT;Lo;0;L;;;;;N;;;;; -A472;YI SYLLABLE YIX;Lo;0;L;;;;;N;;;;; -A473;YI SYLLABLE YI;Lo;0;L;;;;;N;;;;; -A474;YI SYLLABLE YIP;Lo;0;L;;;;;N;;;;; -A475;YI SYLLABLE YIET;Lo;0;L;;;;;N;;;;; -A476;YI SYLLABLE YIEX;Lo;0;L;;;;;N;;;;; -A477;YI SYLLABLE YIE;Lo;0;L;;;;;N;;;;; -A478;YI SYLLABLE YIEP;Lo;0;L;;;;;N;;;;; -A479;YI SYLLABLE YUOT;Lo;0;L;;;;;N;;;;; -A47A;YI SYLLABLE YUOX;Lo;0;L;;;;;N;;;;; -A47B;YI SYLLABLE YUO;Lo;0;L;;;;;N;;;;; -A47C;YI SYLLABLE YUOP;Lo;0;L;;;;;N;;;;; -A47D;YI SYLLABLE YOT;Lo;0;L;;;;;N;;;;; -A47E;YI SYLLABLE YOX;Lo;0;L;;;;;N;;;;; -A47F;YI SYLLABLE YO;Lo;0;L;;;;;N;;;;; -A480;YI SYLLABLE YOP;Lo;0;L;;;;;N;;;;; -A481;YI SYLLABLE YUT;Lo;0;L;;;;;N;;;;; -A482;YI SYLLABLE YUX;Lo;0;L;;;;;N;;;;; -A483;YI SYLLABLE YU;Lo;0;L;;;;;N;;;;; -A484;YI SYLLABLE YUP;Lo;0;L;;;;;N;;;;; -A485;YI SYLLABLE YURX;Lo;0;L;;;;;N;;;;; -A486;YI SYLLABLE YUR;Lo;0;L;;;;;N;;;;; -A487;YI SYLLABLE YYT;Lo;0;L;;;;;N;;;;; -A488;YI SYLLABLE YYX;Lo;0;L;;;;;N;;;;; -A489;YI SYLLABLE YY;Lo;0;L;;;;;N;;;;; -A48A;YI SYLLABLE YYP;Lo;0;L;;;;;N;;;;; -A48B;YI SYLLABLE YYRX;Lo;0;L;;;;;N;;;;; -A48C;YI SYLLABLE YYR;Lo;0;L;;;;;N;;;;; -A490;YI RADICAL QOT;So;0;ON;;;;;N;;;;; -A491;YI RADICAL LI;So;0;ON;;;;;N;;;;; -A492;YI RADICAL KIT;So;0;ON;;;;;N;;;;; -A493;YI RADICAL NYIP;So;0;ON;;;;;N;;;;; -A494;YI RADICAL CYP;So;0;ON;;;;;N;;;;; -A495;YI RADICAL SSI;So;0;ON;;;;;N;;;;; -A496;YI RADICAL GGOP;So;0;ON;;;;;N;;;;; -A497;YI RADICAL GEP;So;0;ON;;;;;N;;;;; -A498;YI RADICAL MI;So;0;ON;;;;;N;;;;; -A499;YI RADICAL HXIT;So;0;ON;;;;;N;;;;; -A49A;YI RADICAL LYR;So;0;ON;;;;;N;;;;; -A49B;YI RADICAL BBUT;So;0;ON;;;;;N;;;;; -A49C;YI RADICAL MOP;So;0;ON;;;;;N;;;;; -A49D;YI RADICAL YO;So;0;ON;;;;;N;;;;; -A49E;YI RADICAL PUT;So;0;ON;;;;;N;;;;; -A49F;YI RADICAL HXUO;So;0;ON;;;;;N;;;;; -A4A0;YI RADICAL TAT;So;0;ON;;;;;N;;;;; -A4A1;YI RADICAL GA;So;0;ON;;;;;N;;;;; -A4A4;YI RADICAL DDUR;So;0;ON;;;;;N;;;;; -A4A5;YI RADICAL BUR;So;0;ON;;;;;N;;;;; -A4A6;YI RADICAL GGUO;So;0;ON;;;;;N;;;;; -A4A7;YI RADICAL NYOP;So;0;ON;;;;;N;;;;; -A4A8;YI RADICAL TU;So;0;ON;;;;;N;;;;; -A4A9;YI RADICAL OP;So;0;ON;;;;;N;;;;; -A4AA;YI RADICAL JJUT;So;0;ON;;;;;N;;;;; -A4AB;YI RADICAL ZOT;So;0;ON;;;;;N;;;;; -A4AC;YI RADICAL PYT;So;0;ON;;;;;N;;;;; -A4AD;YI RADICAL HMO;So;0;ON;;;;;N;;;;; -A4AE;YI RADICAL YIT;So;0;ON;;;;;N;;;;; -A4AF;YI RADICAL VUR;So;0;ON;;;;;N;;;;; -A4B0;YI RADICAL SHY;So;0;ON;;;;;N;;;;; -A4B1;YI RADICAL VEP;So;0;ON;;;;;N;;;;; -A4B2;YI RADICAL ZA;So;0;ON;;;;;N;;;;; -A4B3;YI RADICAL JO;So;0;ON;;;;;N;;;;; -A4B5;YI RADICAL JJY;So;0;ON;;;;;N;;;;; -A4B6;YI RADICAL GOT;So;0;ON;;;;;N;;;;; -A4B7;YI RADICAL JJIE;So;0;ON;;;;;N;;;;; -A4B8;YI RADICAL WO;So;0;ON;;;;;N;;;;; -A4B9;YI RADICAL DU;So;0;ON;;;;;N;;;;; -A4BA;YI RADICAL SHUR;So;0;ON;;;;;N;;;;; -A4BB;YI RADICAL LIE;So;0;ON;;;;;N;;;;; -A4BC;YI RADICAL CY;So;0;ON;;;;;N;;;;; -A4BD;YI RADICAL CUOP;So;0;ON;;;;;N;;;;; -A4BE;YI RADICAL CIP;So;0;ON;;;;;N;;;;; -A4BF;YI RADICAL HXOP;So;0;ON;;;;;N;;;;; -A4C0;YI RADICAL SHAT;So;0;ON;;;;;N;;;;; -A4C2;YI RADICAL SHOP;So;0;ON;;;;;N;;;;; -A4C3;YI RADICAL CHE;So;0;ON;;;;;N;;;;; -A4C4;YI RADICAL ZZIET;So;0;ON;;;;;N;;;;; -A4C6;YI RADICAL KE;So;0;ON;;;;;N;;;;; -AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;; -D7A3;<Hangul Syllable, Last>;Lo;0;L;;;;;N;;;;; -D800;<Non Private Use High Surrogate, First>;Cs;0;L;;;;;N;;;;; -DB7F;<Non Private Use High Surrogate, Last>;Cs;0;L;;;;;N;;;;; -DB80;<Private Use High Surrogate, First>;Cs;0;L;;;;;N;;;;; -DBFF;<Private Use High Surrogate, Last>;Cs;0;L;;;;;N;;;;; -DC00;<Low Surrogate, First>;Cs;0;L;;;;;N;;;;; -DFFF;<Low Surrogate, Last>;Cs;0;L;;;;;N;;;;; -E000;<Private Use, First>;Co;0;L;;;;;N;;;;; -F8FF;<Private Use, Last>;Co;0;L;;;;;N;;;;; -F900;CJK COMPATIBILITY IDEOGRAPH-F900;Lo;0;L;8C48;;;;N;;;;; -F901;CJK COMPATIBILITY IDEOGRAPH-F901;Lo;0;L;66F4;;;;N;;;;; -F902;CJK COMPATIBILITY IDEOGRAPH-F902;Lo;0;L;8ECA;;;;N;;;;; -F903;CJK COMPATIBILITY IDEOGRAPH-F903;Lo;0;L;8CC8;;;;N;;;;; -F904;CJK COMPATIBILITY IDEOGRAPH-F904;Lo;0;L;6ED1;;;;N;;;;; -F905;CJK COMPATIBILITY IDEOGRAPH-F905;Lo;0;L;4E32;;;;N;;;;; -F906;CJK COMPATIBILITY IDEOGRAPH-F906;Lo;0;L;53E5;;;;N;;;;; -F907;CJK COMPATIBILITY IDEOGRAPH-F907;Lo;0;L;9F9C;;;;N;;;;; -F908;CJK COMPATIBILITY IDEOGRAPH-F908;Lo;0;L;9F9C;;;;N;;;;; -F909;CJK COMPATIBILITY IDEOGRAPH-F909;Lo;0;L;5951;;;;N;;;;; -F90A;CJK COMPATIBILITY IDEOGRAPH-F90A;Lo;0;L;91D1;;;;N;;;;; -F90B;CJK COMPATIBILITY IDEOGRAPH-F90B;Lo;0;L;5587;;;;N;;;;; -F90C;CJK COMPATIBILITY IDEOGRAPH-F90C;Lo;0;L;5948;;;;N;;;;; -F90D;CJK COMPATIBILITY IDEOGRAPH-F90D;Lo;0;L;61F6;;;;N;;;;; -F90E;CJK COMPATIBILITY IDEOGRAPH-F90E;Lo;0;L;7669;;;;N;;;;; -F90F;CJK COMPATIBILITY IDEOGRAPH-F90F;Lo;0;L;7F85;;;;N;;;;; -F910;CJK COMPATIBILITY IDEOGRAPH-F910;Lo;0;L;863F;;;;N;;;;; -F911;CJK COMPATIBILITY IDEOGRAPH-F911;Lo;0;L;87BA;;;;N;;;;; -F912;CJK COMPATIBILITY IDEOGRAPH-F912;Lo;0;L;88F8;;;;N;;;;; -F913;CJK COMPATIBILITY IDEOGRAPH-F913;Lo;0;L;908F;;;;N;;;;; -F914;CJK COMPATIBILITY IDEOGRAPH-F914;Lo;0;L;6A02;;;;N;;;;; -F915;CJK COMPATIBILITY IDEOGRAPH-F915;Lo;0;L;6D1B;;;;N;;;;; -F916;CJK COMPATIBILITY IDEOGRAPH-F916;Lo;0;L;70D9;;;;N;;;;; -F917;CJK COMPATIBILITY IDEOGRAPH-F917;Lo;0;L;73DE;;;;N;;;;; -F918;CJK COMPATIBILITY IDEOGRAPH-F918;Lo;0;L;843D;;;;N;;;;; -F919;CJK COMPATIBILITY IDEOGRAPH-F919;Lo;0;L;916A;;;;N;;;;; -F91A;CJK COMPATIBILITY IDEOGRAPH-F91A;Lo;0;L;99F1;;;;N;;;;; -F91B;CJK COMPATIBILITY IDEOGRAPH-F91B;Lo;0;L;4E82;;;;N;;;;; -F91C;CJK COMPATIBILITY IDEOGRAPH-F91C;Lo;0;L;5375;;;;N;;;;; -F91D;CJK COMPATIBILITY IDEOGRAPH-F91D;Lo;0;L;6B04;;;;N;;;;; -F91E;CJK COMPATIBILITY IDEOGRAPH-F91E;Lo;0;L;721B;;;;N;;;;; -F91F;CJK COMPATIBILITY IDEOGRAPH-F91F;Lo;0;L;862D;;;;N;;;;; -F920;CJK COMPATIBILITY IDEOGRAPH-F920;Lo;0;L;9E1E;;;;N;;;;; -F921;CJK COMPATIBILITY IDEOGRAPH-F921;Lo;0;L;5D50;;;;N;;;;; -F922;CJK COMPATIBILITY IDEOGRAPH-F922;Lo;0;L;6FEB;;;;N;;;;; -F923;CJK COMPATIBILITY IDEOGRAPH-F923;Lo;0;L;85CD;;;;N;;;;; -F924;CJK COMPATIBILITY IDEOGRAPH-F924;Lo;0;L;8964;;;;N;;;;; -F925;CJK COMPATIBILITY IDEOGRAPH-F925;Lo;0;L;62C9;;;;N;;;;; -F926;CJK COMPATIBILITY IDEOGRAPH-F926;Lo;0;L;81D8;;;;N;;;;; -F927;CJK COMPATIBILITY IDEOGRAPH-F927;Lo;0;L;881F;;;;N;;;;; -F928;CJK COMPATIBILITY IDEOGRAPH-F928;Lo;0;L;5ECA;;;;N;;;;; -F929;CJK COMPATIBILITY IDEOGRAPH-F929;Lo;0;L;6717;;;;N;;;;; -F92A;CJK COMPATIBILITY IDEOGRAPH-F92A;Lo;0;L;6D6A;;;;N;;;;; -F92B;CJK COMPATIBILITY IDEOGRAPH-F92B;Lo;0;L;72FC;;;;N;;;;; -F92C;CJK COMPATIBILITY IDEOGRAPH-F92C;Lo;0;L;90CE;;;;N;;;;; -F92D;CJK COMPATIBILITY IDEOGRAPH-F92D;Lo;0;L;4F86;;;;N;;;;; -F92E;CJK COMPATIBILITY IDEOGRAPH-F92E;Lo;0;L;51B7;;;;N;;;;; -F92F;CJK COMPATIBILITY IDEOGRAPH-F92F;Lo;0;L;52DE;;;;N;;;;; -F930;CJK COMPATIBILITY IDEOGRAPH-F930;Lo;0;L;64C4;;;;N;;;;; -F931;CJK COMPATIBILITY IDEOGRAPH-F931;Lo;0;L;6AD3;;;;N;;;;; -F932;CJK COMPATIBILITY IDEOGRAPH-F932;Lo;0;L;7210;;;;N;;;;; -F933;CJK COMPATIBILITY IDEOGRAPH-F933;Lo;0;L;76E7;;;;N;;;;; -F934;CJK COMPATIBILITY IDEOGRAPH-F934;Lo;0;L;8001;;;;N;;;;; -F935;CJK COMPATIBILITY IDEOGRAPH-F935;Lo;0;L;8606;;;;N;;;;; -F936;CJK COMPATIBILITY IDEOGRAPH-F936;Lo;0;L;865C;;;;N;;;;; -F937;CJK COMPATIBILITY IDEOGRAPH-F937;Lo;0;L;8DEF;;;;N;;;;; -F938;CJK COMPATIBILITY IDEOGRAPH-F938;Lo;0;L;9732;;;;N;;;;; -F939;CJK COMPATIBILITY IDEOGRAPH-F939;Lo;0;L;9B6F;;;;N;;;;; -F93A;CJK COMPATIBILITY IDEOGRAPH-F93A;Lo;0;L;9DFA;;;;N;;;;; -F93B;CJK COMPATIBILITY IDEOGRAPH-F93B;Lo;0;L;788C;;;;N;;;;; -F93C;CJK COMPATIBILITY IDEOGRAPH-F93C;Lo;0;L;797F;;;;N;;;;; -F93D;CJK COMPATIBILITY IDEOGRAPH-F93D;Lo;0;L;7DA0;;;;N;;;;; -F93E;CJK COMPATIBILITY IDEOGRAPH-F93E;Lo;0;L;83C9;;;;N;;;;; -F93F;CJK COMPATIBILITY IDEOGRAPH-F93F;Lo;0;L;9304;;;;N;;;;; -F940;CJK COMPATIBILITY IDEOGRAPH-F940;Lo;0;L;9E7F;;;;N;;;;; -F941;CJK COMPATIBILITY IDEOGRAPH-F941;Lo;0;L;8AD6;;;;N;;;;; -F942;CJK COMPATIBILITY IDEOGRAPH-F942;Lo;0;L;58DF;;;;N;;;;; -F943;CJK COMPATIBILITY IDEOGRAPH-F943;Lo;0;L;5F04;;;;N;;;;; -F944;CJK COMPATIBILITY IDEOGRAPH-F944;Lo;0;L;7C60;;;;N;;;;; -F945;CJK COMPATIBILITY IDEOGRAPH-F945;Lo;0;L;807E;;;;N;;;;; -F946;CJK COMPATIBILITY IDEOGRAPH-F946;Lo;0;L;7262;;;;N;;;;; -F947;CJK COMPATIBILITY IDEOGRAPH-F947;Lo;0;L;78CA;;;;N;;;;; -F948;CJK COMPATIBILITY IDEOGRAPH-F948;Lo;0;L;8CC2;;;;N;;;;; -F949;CJK COMPATIBILITY IDEOGRAPH-F949;Lo;0;L;96F7;;;;N;;;;; -F94A;CJK COMPATIBILITY IDEOGRAPH-F94A;Lo;0;L;58D8;;;;N;;;;; -F94B;CJK COMPATIBILITY IDEOGRAPH-F94B;Lo;0;L;5C62;;;;N;;;;; -F94C;CJK COMPATIBILITY IDEOGRAPH-F94C;Lo;0;L;6A13;;;;N;;;;; -F94D;CJK COMPATIBILITY IDEOGRAPH-F94D;Lo;0;L;6DDA;;;;N;;;;; -F94E;CJK COMPATIBILITY IDEOGRAPH-F94E;Lo;0;L;6F0F;;;;N;;;;; -F94F;CJK COMPATIBILITY IDEOGRAPH-F94F;Lo;0;L;7D2F;;;;N;;;;; -F950;CJK COMPATIBILITY IDEOGRAPH-F950;Lo;0;L;7E37;;;;N;;;;; -F951;CJK COMPATIBILITY IDEOGRAPH-F951;Lo;0;L;96FB;;;;N;;;;; -F952;CJK COMPATIBILITY IDEOGRAPH-F952;Lo;0;L;52D2;;;;N;;;;; -F953;CJK COMPATIBILITY IDEOGRAPH-F953;Lo;0;L;808B;;;;N;;;;; -F954;CJK COMPATIBILITY IDEOGRAPH-F954;Lo;0;L;51DC;;;;N;;;;; -F955;CJK COMPATIBILITY IDEOGRAPH-F955;Lo;0;L;51CC;;;;N;;;;; -F956;CJK COMPATIBILITY IDEOGRAPH-F956;Lo;0;L;7A1C;;;;N;;;;; -F957;CJK COMPATIBILITY IDEOGRAPH-F957;Lo;0;L;7DBE;;;;N;;;;; -F958;CJK COMPATIBILITY IDEOGRAPH-F958;Lo;0;L;83F1;;;;N;;;;; -F959;CJK COMPATIBILITY IDEOGRAPH-F959;Lo;0;L;9675;;;;N;;;;; -F95A;CJK COMPATIBILITY IDEOGRAPH-F95A;Lo;0;L;8B80;;;;N;;;;; -F95B;CJK COMPATIBILITY IDEOGRAPH-F95B;Lo;0;L;62CF;;;;N;;;;; -F95C;CJK COMPATIBILITY IDEOGRAPH-F95C;Lo;0;L;6A02;;;;N;;;;; -F95D;CJK COMPATIBILITY IDEOGRAPH-F95D;Lo;0;L;8AFE;;;;N;;;;; -F95E;CJK COMPATIBILITY IDEOGRAPH-F95E;Lo;0;L;4E39;;;;N;;;;; -F95F;CJK COMPATIBILITY IDEOGRAPH-F95F;Lo;0;L;5BE7;;;;N;;;;; -F960;CJK COMPATIBILITY IDEOGRAPH-F960;Lo;0;L;6012;;;;N;;;;; -F961;CJK COMPATIBILITY IDEOGRAPH-F961;Lo;0;L;7387;;;;N;;;;; -F962;CJK COMPATIBILITY IDEOGRAPH-F962;Lo;0;L;7570;;;;N;;;;; -F963;CJK COMPATIBILITY IDEOGRAPH-F963;Lo;0;L;5317;;;;N;;;;; -F964;CJK COMPATIBILITY IDEOGRAPH-F964;Lo;0;L;78FB;;;;N;;;;; -F965;CJK COMPATIBILITY IDEOGRAPH-F965;Lo;0;L;4FBF;;;;N;;;;; -F966;CJK COMPATIBILITY IDEOGRAPH-F966;Lo;0;L;5FA9;;;;N;;;;; -F967;CJK COMPATIBILITY IDEOGRAPH-F967;Lo;0;L;4E0D;;;;N;;;;; -F968;CJK COMPATIBILITY IDEOGRAPH-F968;Lo;0;L;6CCC;;;;N;;;;; -F969;CJK COMPATIBILITY IDEOGRAPH-F969;Lo;0;L;6578;;;;N;;;;; -F96A;CJK COMPATIBILITY IDEOGRAPH-F96A;Lo;0;L;7D22;;;;N;;;;; -F96B;CJK COMPATIBILITY IDEOGRAPH-F96B;Lo;0;L;53C3;;;;N;;;;; -F96C;CJK COMPATIBILITY IDEOGRAPH-F96C;Lo;0;L;585E;;;;N;;;;; -F96D;CJK COMPATIBILITY IDEOGRAPH-F96D;Lo;0;L;7701;;;;N;;;;; -F96E;CJK COMPATIBILITY IDEOGRAPH-F96E;Lo;0;L;8449;;;;N;;;;; -F96F;CJK COMPATIBILITY IDEOGRAPH-F96F;Lo;0;L;8AAA;;;;N;;;;; -F970;CJK COMPATIBILITY IDEOGRAPH-F970;Lo;0;L;6BBA;;;;N;;;;; -F971;CJK COMPATIBILITY IDEOGRAPH-F971;Lo;0;L;8FB0;;;;N;;;;; -F972;CJK COMPATIBILITY IDEOGRAPH-F972;Lo;0;L;6C88;;;;N;;;;; -F973;CJK COMPATIBILITY IDEOGRAPH-F973;Lo;0;L;62FE;;;;N;;;;; -F974;CJK COMPATIBILITY IDEOGRAPH-F974;Lo;0;L;82E5;;;;N;;;;; -F975;CJK COMPATIBILITY IDEOGRAPH-F975;Lo;0;L;63A0;;;;N;;;;; -F976;CJK COMPATIBILITY IDEOGRAPH-F976;Lo;0;L;7565;;;;N;;;;; -F977;CJK COMPATIBILITY IDEOGRAPH-F977;Lo;0;L;4EAE;;;;N;;;;; -F978;CJK COMPATIBILITY IDEOGRAPH-F978;Lo;0;L;5169;;;;N;;;;; -F979;CJK COMPATIBILITY IDEOGRAPH-F979;Lo;0;L;51C9;;;;N;;;;; -F97A;CJK COMPATIBILITY IDEOGRAPH-F97A;Lo;0;L;6881;;;;N;;;;; -F97B;CJK COMPATIBILITY IDEOGRAPH-F97B;Lo;0;L;7CE7;;;;N;;;;; -F97C;CJK COMPATIBILITY IDEOGRAPH-F97C;Lo;0;L;826F;;;;N;;;;; -F97D;CJK COMPATIBILITY IDEOGRAPH-F97D;Lo;0;L;8AD2;;;;N;;;;; -F97E;CJK COMPATIBILITY IDEOGRAPH-F97E;Lo;0;L;91CF;;;;N;;;;; -F97F;CJK COMPATIBILITY IDEOGRAPH-F97F;Lo;0;L;52F5;;;;N;;;;; -F980;CJK COMPATIBILITY IDEOGRAPH-F980;Lo;0;L;5442;;;;N;;;;; -F981;CJK COMPATIBILITY IDEOGRAPH-F981;Lo;0;L;5973;;;;N;;;;; -F982;CJK COMPATIBILITY IDEOGRAPH-F982;Lo;0;L;5EEC;;;;N;;;;; -F983;CJK COMPATIBILITY IDEOGRAPH-F983;Lo;0;L;65C5;;;;N;;;;; -F984;CJK COMPATIBILITY IDEOGRAPH-F984;Lo;0;L;6FFE;;;;N;;;;; -F985;CJK COMPATIBILITY IDEOGRAPH-F985;Lo;0;L;792A;;;;N;;;;; -F986;CJK COMPATIBILITY IDEOGRAPH-F986;Lo;0;L;95AD;;;;N;;;;; -F987;CJK COMPATIBILITY IDEOGRAPH-F987;Lo;0;L;9A6A;;;;N;;;;; -F988;CJK COMPATIBILITY IDEOGRAPH-F988;Lo;0;L;9E97;;;;N;;;;; -F989;CJK COMPATIBILITY IDEOGRAPH-F989;Lo;0;L;9ECE;;;;N;;;;; -F98A;CJK COMPATIBILITY IDEOGRAPH-F98A;Lo;0;L;529B;;;;N;;;;; -F98B;CJK COMPATIBILITY IDEOGRAPH-F98B;Lo;0;L;66C6;;;;N;;;;; -F98C;CJK COMPATIBILITY IDEOGRAPH-F98C;Lo;0;L;6B77;;;;N;;;;; -F98D;CJK COMPATIBILITY IDEOGRAPH-F98D;Lo;0;L;8F62;;;;N;;;;; -F98E;CJK COMPATIBILITY IDEOGRAPH-F98E;Lo;0;L;5E74;;;;N;;;;; -F98F;CJK COMPATIBILITY IDEOGRAPH-F98F;Lo;0;L;6190;;;;N;;;;; -F990;CJK COMPATIBILITY IDEOGRAPH-F990;Lo;0;L;6200;;;;N;;;;; -F991;CJK COMPATIBILITY IDEOGRAPH-F991;Lo;0;L;649A;;;;N;;;;; -F992;CJK COMPATIBILITY IDEOGRAPH-F992;Lo;0;L;6F23;;;;N;;;;; -F993;CJK COMPATIBILITY IDEOGRAPH-F993;Lo;0;L;7149;;;;N;;;;; -F994;CJK COMPATIBILITY IDEOGRAPH-F994;Lo;0;L;7489;;;;N;;;;; -F995;CJK COMPATIBILITY IDEOGRAPH-F995;Lo;0;L;79CA;;;;N;;;;; -F996;CJK COMPATIBILITY IDEOGRAPH-F996;Lo;0;L;7DF4;;;;N;;;;; -F997;CJK COMPATIBILITY IDEOGRAPH-F997;Lo;0;L;806F;;;;N;;;;; -F998;CJK COMPATIBILITY IDEOGRAPH-F998;Lo;0;L;8F26;;;;N;;;;; -F999;CJK COMPATIBILITY IDEOGRAPH-F999;Lo;0;L;84EE;;;;N;;;;; -F99A;CJK COMPATIBILITY IDEOGRAPH-F99A;Lo;0;L;9023;;;;N;;;;; -F99B;CJK COMPATIBILITY IDEOGRAPH-F99B;Lo;0;L;934A;;;;N;;;;; -F99C;CJK COMPATIBILITY IDEOGRAPH-F99C;Lo;0;L;5217;;;;N;;;;; -F99D;CJK COMPATIBILITY IDEOGRAPH-F99D;Lo;0;L;52A3;;;;N;;;;; -F99E;CJK COMPATIBILITY IDEOGRAPH-F99E;Lo;0;L;54BD;;;;N;;;;; -F99F;CJK COMPATIBILITY IDEOGRAPH-F99F;Lo;0;L;70C8;;;;N;;;;; -F9A0;CJK COMPATIBILITY IDEOGRAPH-F9A0;Lo;0;L;88C2;;;;N;;;;; -F9A1;CJK COMPATIBILITY IDEOGRAPH-F9A1;Lo;0;L;8AAA;;;;N;;;;; -F9A2;CJK COMPATIBILITY IDEOGRAPH-F9A2;Lo;0;L;5EC9;;;;N;;;;; -F9A3;CJK COMPATIBILITY IDEOGRAPH-F9A3;Lo;0;L;5FF5;;;;N;;;;; -F9A4;CJK COMPATIBILITY IDEOGRAPH-F9A4;Lo;0;L;637B;;;;N;;;;; -F9A5;CJK COMPATIBILITY IDEOGRAPH-F9A5;Lo;0;L;6BAE;;;;N;;;;; -F9A6;CJK COMPATIBILITY IDEOGRAPH-F9A6;Lo;0;L;7C3E;;;;N;;;;; -F9A7;CJK COMPATIBILITY IDEOGRAPH-F9A7;Lo;0;L;7375;;;;N;;;;; -F9A8;CJK COMPATIBILITY IDEOGRAPH-F9A8;Lo;0;L;4EE4;;;;N;;;;; -F9A9;CJK COMPATIBILITY IDEOGRAPH-F9A9;Lo;0;L;56F9;;;;N;;;;; -F9AA;CJK COMPATIBILITY IDEOGRAPH-F9AA;Lo;0;L;5BE7;;;;N;;;;; -F9AB;CJK COMPATIBILITY IDEOGRAPH-F9AB;Lo;0;L;5DBA;;;;N;;;;; -F9AC;CJK COMPATIBILITY IDEOGRAPH-F9AC;Lo;0;L;601C;;;;N;;;;; -F9AD;CJK COMPATIBILITY IDEOGRAPH-F9AD;Lo;0;L;73B2;;;;N;;;;; -F9AE;CJK COMPATIBILITY IDEOGRAPH-F9AE;Lo;0;L;7469;;;;N;;;;; -F9AF;CJK COMPATIBILITY IDEOGRAPH-F9AF;Lo;0;L;7F9A;;;;N;;;;; -F9B0;CJK COMPATIBILITY IDEOGRAPH-F9B0;Lo;0;L;8046;;;;N;;;;; -F9B1;CJK COMPATIBILITY IDEOGRAPH-F9B1;Lo;0;L;9234;;;;N;;;;; -F9B2;CJK COMPATIBILITY IDEOGRAPH-F9B2;Lo;0;L;96F6;;;;N;;;;; -F9B3;CJK COMPATIBILITY IDEOGRAPH-F9B3;Lo;0;L;9748;;;;N;;;;; -F9B4;CJK COMPATIBILITY IDEOGRAPH-F9B4;Lo;0;L;9818;;;;N;;;;; -F9B5;CJK COMPATIBILITY IDEOGRAPH-F9B5;Lo;0;L;4F8B;;;;N;;;;; -F9B6;CJK COMPATIBILITY IDEOGRAPH-F9B6;Lo;0;L;79AE;;;;N;;;;; -F9B7;CJK COMPATIBILITY IDEOGRAPH-F9B7;Lo;0;L;91B4;;;;N;;;;; -F9B8;CJK COMPATIBILITY IDEOGRAPH-F9B8;Lo;0;L;96B8;;;;N;;;;; -F9B9;CJK COMPATIBILITY IDEOGRAPH-F9B9;Lo;0;L;60E1;;;;N;;;;; -F9BA;CJK COMPATIBILITY IDEOGRAPH-F9BA;Lo;0;L;4E86;;;;N;;;;; -F9BB;CJK COMPATIBILITY IDEOGRAPH-F9BB;Lo;0;L;50DA;;;;N;;;;; -F9BC;CJK COMPATIBILITY IDEOGRAPH-F9BC;Lo;0;L;5BEE;;;;N;;;;; -F9BD;CJK COMPATIBILITY IDEOGRAPH-F9BD;Lo;0;L;5C3F;;;;N;;;;; -F9BE;CJK COMPATIBILITY IDEOGRAPH-F9BE;Lo;0;L;6599;;;;N;;;;; -F9BF;CJK COMPATIBILITY IDEOGRAPH-F9BF;Lo;0;L;6A02;;;;N;;;;; -F9C0;CJK COMPATIBILITY IDEOGRAPH-F9C0;Lo;0;L;71CE;;;;N;;;;; -F9C1;CJK COMPATIBILITY IDEOGRAPH-F9C1;Lo;0;L;7642;;;;N;;;;; -F9C2;CJK COMPATIBILITY IDEOGRAPH-F9C2;Lo;0;L;84FC;;;;N;;;;; -F9C3;CJK COMPATIBILITY IDEOGRAPH-F9C3;Lo;0;L;907C;;;;N;;;;; -F9C4;CJK COMPATIBILITY IDEOGRAPH-F9C4;Lo;0;L;9F8D;;;;N;;;;; -F9C5;CJK COMPATIBILITY IDEOGRAPH-F9C5;Lo;0;L;6688;;;;N;;;;; -F9C6;CJK COMPATIBILITY IDEOGRAPH-F9C6;Lo;0;L;962E;;;;N;;;;; -F9C7;CJK COMPATIBILITY IDEOGRAPH-F9C7;Lo;0;L;5289;;;;N;;;;; -F9C8;CJK COMPATIBILITY IDEOGRAPH-F9C8;Lo;0;L;677B;;;;N;;;;; -F9C9;CJK COMPATIBILITY IDEOGRAPH-F9C9;Lo;0;L;67F3;;;;N;;;;; -F9CA;CJK COMPATIBILITY IDEOGRAPH-F9CA;Lo;0;L;6D41;;;;N;;;;; -F9CB;CJK COMPATIBILITY IDEOGRAPH-F9CB;Lo;0;L;6E9C;;;;N;;;;; -F9CC;CJK COMPATIBILITY IDEOGRAPH-F9CC;Lo;0;L;7409;;;;N;;;;; -F9CD;CJK COMPATIBILITY IDEOGRAPH-F9CD;Lo;0;L;7559;;;;N;;;;; -F9CE;CJK COMPATIBILITY IDEOGRAPH-F9CE;Lo;0;L;786B;;;;N;;;;; -F9CF;CJK COMPATIBILITY IDEOGRAPH-F9CF;Lo;0;L;7D10;;;;N;;;;; -F9D0;CJK COMPATIBILITY IDEOGRAPH-F9D0;Lo;0;L;985E;;;;N;;;;; -F9D1;CJK COMPATIBILITY IDEOGRAPH-F9D1;Lo;0;L;516D;;;;N;;;;; -F9D2;CJK COMPATIBILITY IDEOGRAPH-F9D2;Lo;0;L;622E;;;;N;;;;; -F9D3;CJK COMPATIBILITY IDEOGRAPH-F9D3;Lo;0;L;9678;;;;N;;;;; -F9D4;CJK COMPATIBILITY IDEOGRAPH-F9D4;Lo;0;L;502B;;;;N;;;;; -F9D5;CJK COMPATIBILITY IDEOGRAPH-F9D5;Lo;0;L;5D19;;;;N;;;;; -F9D6;CJK COMPATIBILITY IDEOGRAPH-F9D6;Lo;0;L;6DEA;;;;N;;;;; -F9D7;CJK COMPATIBILITY IDEOGRAPH-F9D7;Lo;0;L;8F2A;;;;N;;;;; -F9D8;CJK COMPATIBILITY IDEOGRAPH-F9D8;Lo;0;L;5F8B;;;;N;;;;; -F9D9;CJK COMPATIBILITY IDEOGRAPH-F9D9;Lo;0;L;6144;;;;N;;;;; -F9DA;CJK COMPATIBILITY IDEOGRAPH-F9DA;Lo;0;L;6817;;;;N;;;;; -F9DB;CJK COMPATIBILITY IDEOGRAPH-F9DB;Lo;0;L;7387;;;;N;;;;; -F9DC;CJK COMPATIBILITY IDEOGRAPH-F9DC;Lo;0;L;9686;;;;N;;;;; -F9DD;CJK COMPATIBILITY IDEOGRAPH-F9DD;Lo;0;L;5229;;;;N;;;;; -F9DE;CJK COMPATIBILITY IDEOGRAPH-F9DE;Lo;0;L;540F;;;;N;;;;; -F9DF;CJK COMPATIBILITY IDEOGRAPH-F9DF;Lo;0;L;5C65;;;;N;;;;; -F9E0;CJK COMPATIBILITY IDEOGRAPH-F9E0;Lo;0;L;6613;;;;N;;;;; -F9E1;CJK COMPATIBILITY IDEOGRAPH-F9E1;Lo;0;L;674E;;;;N;;;;; -F9E2;CJK COMPATIBILITY IDEOGRAPH-F9E2;Lo;0;L;68A8;;;;N;;;;; -F9E3;CJK COMPATIBILITY IDEOGRAPH-F9E3;Lo;0;L;6CE5;;;;N;;;;; -F9E4;CJK COMPATIBILITY IDEOGRAPH-F9E4;Lo;0;L;7406;;;;N;;;;; -F9E5;CJK COMPATIBILITY IDEOGRAPH-F9E5;Lo;0;L;75E2;;;;N;;;;; -F9E6;CJK COMPATIBILITY IDEOGRAPH-F9E6;Lo;0;L;7F79;;;;N;;;;; -F9E7;CJK COMPATIBILITY IDEOGRAPH-F9E7;Lo;0;L;88CF;;;;N;;;;; -F9E8;CJK COMPATIBILITY IDEOGRAPH-F9E8;Lo;0;L;88E1;;;;N;;;;; -F9E9;CJK COMPATIBILITY IDEOGRAPH-F9E9;Lo;0;L;91CC;;;;N;;;;; -F9EA;CJK COMPATIBILITY IDEOGRAPH-F9EA;Lo;0;L;96E2;;;;N;;;;; -F9EB;CJK COMPATIBILITY IDEOGRAPH-F9EB;Lo;0;L;533F;;;;N;;;;; -F9EC;CJK COMPATIBILITY IDEOGRAPH-F9EC;Lo;0;L;6EBA;;;;N;;;;; -F9ED;CJK COMPATIBILITY IDEOGRAPH-F9ED;Lo;0;L;541D;;;;N;;;;; -F9EE;CJK COMPATIBILITY IDEOGRAPH-F9EE;Lo;0;L;71D0;;;;N;;;;; -F9EF;CJK COMPATIBILITY IDEOGRAPH-F9EF;Lo;0;L;7498;;;;N;;;;; -F9F0;CJK COMPATIBILITY IDEOGRAPH-F9F0;Lo;0;L;85FA;;;;N;;;;; -F9F1;CJK COMPATIBILITY IDEOGRAPH-F9F1;Lo;0;L;96A3;;;;N;;;;; -F9F2;CJK COMPATIBILITY IDEOGRAPH-F9F2;Lo;0;L;9C57;;;;N;;;;; -F9F3;CJK COMPATIBILITY IDEOGRAPH-F9F3;Lo;0;L;9E9F;;;;N;;;;; -F9F4;CJK COMPATIBILITY IDEOGRAPH-F9F4;Lo;0;L;6797;;;;N;;;;; -F9F5;CJK COMPATIBILITY IDEOGRAPH-F9F5;Lo;0;L;6DCB;;;;N;;;;; -F9F6;CJK COMPATIBILITY IDEOGRAPH-F9F6;Lo;0;L;81E8;;;;N;;;;; -F9F7;CJK COMPATIBILITY IDEOGRAPH-F9F7;Lo;0;L;7ACB;;;;N;;;;; -F9F8;CJK COMPATIBILITY IDEOGRAPH-F9F8;Lo;0;L;7B20;;;;N;;;;; -F9F9;CJK COMPATIBILITY IDEOGRAPH-F9F9;Lo;0;L;7C92;;;;N;;;;; -F9FA;CJK COMPATIBILITY IDEOGRAPH-F9FA;Lo;0;L;72C0;;;;N;;;;; -F9FB;CJK COMPATIBILITY IDEOGRAPH-F9FB;Lo;0;L;7099;;;;N;;;;; -F9FC;CJK COMPATIBILITY IDEOGRAPH-F9FC;Lo;0;L;8B58;;;;N;;;;; -F9FD;CJK COMPATIBILITY IDEOGRAPH-F9FD;Lo;0;L;4EC0;;;;N;;;;; -F9FE;CJK COMPATIBILITY IDEOGRAPH-F9FE;Lo;0;L;8336;;;;N;;;;; -F9FF;CJK COMPATIBILITY IDEOGRAPH-F9FF;Lo;0;L;523A;;;;N;;;;; -FA00;CJK COMPATIBILITY IDEOGRAPH-FA00;Lo;0;L;5207;;;;N;;;;; -FA01;CJK COMPATIBILITY IDEOGRAPH-FA01;Lo;0;L;5EA6;;;;N;;;;; -FA02;CJK COMPATIBILITY IDEOGRAPH-FA02;Lo;0;L;62D3;;;;N;;;;; -FA03;CJK COMPATIBILITY IDEOGRAPH-FA03;Lo;0;L;7CD6;;;;N;;;;; -FA04;CJK COMPATIBILITY IDEOGRAPH-FA04;Lo;0;L;5B85;;;;N;;;;; -FA05;CJK COMPATIBILITY IDEOGRAPH-FA05;Lo;0;L;6D1E;;;;N;;;;; -FA06;CJK COMPATIBILITY IDEOGRAPH-FA06;Lo;0;L;66B4;;;;N;;;;; -FA07;CJK COMPATIBILITY IDEOGRAPH-FA07;Lo;0;L;8F3B;;;;N;;;;; -FA08;CJK COMPATIBILITY IDEOGRAPH-FA08;Lo;0;L;884C;;;;N;;;;; -FA09;CJK COMPATIBILITY IDEOGRAPH-FA09;Lo;0;L;964D;;;;N;;;;; -FA0A;CJK COMPATIBILITY IDEOGRAPH-FA0A;Lo;0;L;898B;;;;N;;;;; -FA0B;CJK COMPATIBILITY IDEOGRAPH-FA0B;Lo;0;L;5ED3;;;;N;;;;; -FA0C;CJK COMPATIBILITY IDEOGRAPH-FA0C;Lo;0;L;5140;;;;N;;;;; -FA0D;CJK COMPATIBILITY IDEOGRAPH-FA0D;Lo;0;L;55C0;;;;N;;;;; -FA0E;CJK COMPATIBILITY IDEOGRAPH-FA0E;Lo;0;L;;;;;N;;;;; -FA0F;CJK COMPATIBILITY IDEOGRAPH-FA0F;Lo;0;L;;;;;N;;;;; -FA10;CJK COMPATIBILITY IDEOGRAPH-FA10;Lo;0;L;585A;;;;N;;;;; -FA11;CJK COMPATIBILITY IDEOGRAPH-FA11;Lo;0;L;;;;;N;;;;; -FA12;CJK COMPATIBILITY IDEOGRAPH-FA12;Lo;0;L;6674;;;;N;;;;; -FA13;CJK COMPATIBILITY IDEOGRAPH-FA13;Lo;0;L;;;;;N;;;;; -FA14;CJK COMPATIBILITY IDEOGRAPH-FA14;Lo;0;L;;;;;N;;;;; -FA15;CJK COMPATIBILITY IDEOGRAPH-FA15;Lo;0;L;51DE;;;;N;;;;; -FA16;CJK COMPATIBILITY IDEOGRAPH-FA16;Lo;0;L;732A;;;;N;;;;; -FA17;CJK COMPATIBILITY IDEOGRAPH-FA17;Lo;0;L;76CA;;;;N;;;;; -FA18;CJK COMPATIBILITY IDEOGRAPH-FA18;Lo;0;L;793C;;;;N;;;;; -FA19;CJK COMPATIBILITY IDEOGRAPH-FA19;Lo;0;L;795E;;;;N;;;;; -FA1A;CJK COMPATIBILITY IDEOGRAPH-FA1A;Lo;0;L;7965;;;;N;;;;; -FA1B;CJK COMPATIBILITY IDEOGRAPH-FA1B;Lo;0;L;798F;;;;N;;;;; -FA1C;CJK COMPATIBILITY IDEOGRAPH-FA1C;Lo;0;L;9756;;;;N;;;;; -FA1D;CJK COMPATIBILITY IDEOGRAPH-FA1D;Lo;0;L;7CBE;;;;N;;;;; -FA1E;CJK COMPATIBILITY IDEOGRAPH-FA1E;Lo;0;L;7FBD;;;;N;;;;; -FA1F;CJK COMPATIBILITY IDEOGRAPH-FA1F;Lo;0;L;;;;;N;;*;;; -FA20;CJK COMPATIBILITY IDEOGRAPH-FA20;Lo;0;L;8612;;;;N;;;;; -FA21;CJK COMPATIBILITY IDEOGRAPH-FA21;Lo;0;L;;;;;N;;;;; -FA22;CJK COMPATIBILITY IDEOGRAPH-FA22;Lo;0;L;8AF8;;;;N;;;;; -FA23;CJK COMPATIBILITY IDEOGRAPH-FA23;Lo;0;L;;;;;N;;*;;; -FA24;CJK COMPATIBILITY IDEOGRAPH-FA24;Lo;0;L;;;;;N;;;;; -FA25;CJK COMPATIBILITY IDEOGRAPH-FA25;Lo;0;L;9038;;;;N;;;;; -FA26;CJK COMPATIBILITY IDEOGRAPH-FA26;Lo;0;L;90FD;;;;N;;;;; -FA27;CJK COMPATIBILITY IDEOGRAPH-FA27;Lo;0;L;;;;;N;;;;; -FA28;CJK COMPATIBILITY IDEOGRAPH-FA28;Lo;0;L;;;;;N;;;;; -FA29;CJK COMPATIBILITY IDEOGRAPH-FA29;Lo;0;L;;;;;N;;;;; -FA2A;CJK COMPATIBILITY IDEOGRAPH-FA2A;Lo;0;L;98EF;;;;N;;;;; -FA2B;CJK COMPATIBILITY IDEOGRAPH-FA2B;Lo;0;L;98FC;;;;N;;;;; -FA2C;CJK COMPATIBILITY IDEOGRAPH-FA2C;Lo;0;L;9928;;;;N;;;;; -FA2D;CJK COMPATIBILITY IDEOGRAPH-FA2D;Lo;0;L;9DB4;;;;N;;;;; -FB00;LATIN SMALL LIGATURE FF;Ll;0;L;<compat> 0066 0066;;;;N;;;;; -FB01;LATIN SMALL LIGATURE FI;Ll;0;L;<compat> 0066 0069;;;;N;;;;; -FB02;LATIN SMALL LIGATURE FL;Ll;0;L;<compat> 0066 006C;;;;N;;;;; -FB03;LATIN SMALL LIGATURE FFI;Ll;0;L;<compat> 0066 0066 0069;;;;N;;;;; -FB04;LATIN SMALL LIGATURE FFL;Ll;0;L;<compat> 0066 0066 006C;;;;N;;;;; -FB05;LATIN SMALL LIGATURE LONG S T;Ll;0;L;<compat> 017F 0074;;;;N;;;;; -FB06;LATIN SMALL LIGATURE ST;Ll;0;L;<compat> 0073 0074;;;;N;;;;; -FB13;ARMENIAN SMALL LIGATURE MEN NOW;Ll;0;L;<compat> 0574 0576;;;;N;;;;; -FB14;ARMENIAN SMALL LIGATURE MEN ECH;Ll;0;L;<compat> 0574 0565;;;;N;;;;; -FB15;ARMENIAN SMALL LIGATURE MEN INI;Ll;0;L;<compat> 0574 056B;;;;N;;;;; -FB16;ARMENIAN SMALL LIGATURE VEW NOW;Ll;0;L;<compat> 057E 0576;;;;N;;;;; -FB17;ARMENIAN SMALL LIGATURE MEN XEH;Ll;0;L;<compat> 0574 056D;;;;N;;;;; -FB1D;HEBREW LETTER YOD WITH HIRIQ;Lo;0;R;05D9 05B4;;;;N;;;;; -FB1E;HEBREW POINT JUDEO-SPANISH VARIKA;Mn;26;NSM;;;;;N;HEBREW POINT VARIKA;;;; -FB1F;HEBREW LIGATURE YIDDISH YOD YOD PATAH;Lo;0;R;05F2 05B7;;;;N;;;;; -FB20;HEBREW LETTER ALTERNATIVE AYIN;Lo;0;R;<font> 05E2;;;;N;;;;; -FB21;HEBREW LETTER WIDE ALEF;Lo;0;R;<font> 05D0;;;;N;;;;; -FB22;HEBREW LETTER WIDE DALET;Lo;0;R;<font> 05D3;;;;N;;;;; -FB23;HEBREW LETTER WIDE HE;Lo;0;R;<font> 05D4;;;;N;;;;; -FB24;HEBREW LETTER WIDE KAF;Lo;0;R;<font> 05DB;;;;N;;;;; -FB25;HEBREW LETTER WIDE LAMED;Lo;0;R;<font> 05DC;;;;N;;;;; -FB26;HEBREW LETTER WIDE FINAL MEM;Lo;0;R;<font> 05DD;;;;N;;;;; -FB27;HEBREW LETTER WIDE RESH;Lo;0;R;<font> 05E8;;;;N;;;;; -FB28;HEBREW LETTER WIDE TAV;Lo;0;R;<font> 05EA;;;;N;;;;; -FB29;HEBREW LETTER ALTERNATIVE PLUS SIGN;Sm;0;ET;<font> 002B;;;;N;;;;; -FB2A;HEBREW LETTER SHIN WITH SHIN DOT;Lo;0;R;05E9 05C1;;;;N;;;;; -FB2B;HEBREW LETTER SHIN WITH SIN DOT;Lo;0;R;05E9 05C2;;;;N;;;;; -FB2C;HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT;Lo;0;R;FB49 05C1;;;;N;;;;; -FB2D;HEBREW LETTER SHIN WITH DAGESH AND SIN DOT;Lo;0;R;FB49 05C2;;;;N;;;;; -FB2E;HEBREW LETTER ALEF WITH PATAH;Lo;0;R;05D0 05B7;;;;N;;;;; -FB2F;HEBREW LETTER ALEF WITH QAMATS;Lo;0;R;05D0 05B8;;;;N;;;;; -FB30;HEBREW LETTER ALEF WITH MAPIQ;Lo;0;R;05D0 05BC;;;;N;;;;; -FB31;HEBREW LETTER BET WITH DAGESH;Lo;0;R;05D1 05BC;;;;N;;;;; -FB32;HEBREW LETTER GIMEL WITH DAGESH;Lo;0;R;05D2 05BC;;;;N;;;;; -FB33;HEBREW LETTER DALET WITH DAGESH;Lo;0;R;05D3 05BC;;;;N;;;;; -FB34;HEBREW LETTER HE WITH MAPIQ;Lo;0;R;05D4 05BC;;;;N;;;;; -FB35;HEBREW LETTER VAV WITH DAGESH;Lo;0;R;05D5 05BC;;;;N;;;;; -FB36;HEBREW LETTER ZAYIN WITH DAGESH;Lo;0;R;05D6 05BC;;;;N;;;;; -FB38;HEBREW LETTER TET WITH DAGESH;Lo;0;R;05D8 05BC;;;;N;;;;; -FB39;HEBREW LETTER YOD WITH DAGESH;Lo;0;R;05D9 05BC;;;;N;;;;; -FB3A;HEBREW LETTER FINAL KAF WITH DAGESH;Lo;0;R;05DA 05BC;;;;N;;;;; -FB3B;HEBREW LETTER KAF WITH DAGESH;Lo;0;R;05DB 05BC;;;;N;;;;; -FB3C;HEBREW LETTER LAMED WITH DAGESH;Lo;0;R;05DC 05BC;;;;N;;;;; -FB3E;HEBREW LETTER MEM WITH DAGESH;Lo;0;R;05DE 05BC;;;;N;;;;; -FB40;HEBREW LETTER NUN WITH DAGESH;Lo;0;R;05E0 05BC;;;;N;;;;; -FB41;HEBREW LETTER SAMEKH WITH DAGESH;Lo;0;R;05E1 05BC;;;;N;;;;; -FB43;HEBREW LETTER FINAL PE WITH DAGESH;Lo;0;R;05E3 05BC;;;;N;;;;; -FB44;HEBREW LETTER PE WITH DAGESH;Lo;0;R;05E4 05BC;;;;N;;;;; -FB46;HEBREW LETTER TSADI WITH DAGESH;Lo;0;R;05E6 05BC;;;;N;;;;; -FB47;HEBREW LETTER QOF WITH DAGESH;Lo;0;R;05E7 05BC;;;;N;;;;; -FB48;HEBREW LETTER RESH WITH DAGESH;Lo;0;R;05E8 05BC;;;;N;;;;; -FB49;HEBREW LETTER SHIN WITH DAGESH;Lo;0;R;05E9 05BC;;;;N;;;;; -FB4A;HEBREW LETTER TAV WITH DAGESH;Lo;0;R;05EA 05BC;;;;N;;;;; -FB4B;HEBREW LETTER VAV WITH HOLAM;Lo;0;R;05D5 05B9;;;;N;;;;; -FB4C;HEBREW LETTER BET WITH RAFE;Lo;0;R;05D1 05BF;;;;N;;;;; -FB4D;HEBREW LETTER KAF WITH RAFE;Lo;0;R;05DB 05BF;;;;N;;;;; -FB4E;HEBREW LETTER PE WITH RAFE;Lo;0;R;05E4 05BF;;;;N;;;;; -FB4F;HEBREW LIGATURE ALEF LAMED;Lo;0;R;<compat> 05D0 05DC;;;;N;;;;; -FB50;ARABIC LETTER ALEF WASLA ISOLATED FORM;Lo;0;AL;<isolated> 0671;;;;N;;;;; -FB51;ARABIC LETTER ALEF WASLA FINAL FORM;Lo;0;AL;<final> 0671;;;;N;;;;; -FB52;ARABIC LETTER BEEH ISOLATED FORM;Lo;0;AL;<isolated> 067B;;;;N;;;;; -FB53;ARABIC LETTER BEEH FINAL FORM;Lo;0;AL;<final> 067B;;;;N;;;;; -FB54;ARABIC LETTER BEEH INITIAL FORM;Lo;0;AL;<initial> 067B;;;;N;;;;; -FB55;ARABIC LETTER BEEH MEDIAL FORM;Lo;0;AL;<medial> 067B;;;;N;;;;; -FB56;ARABIC LETTER PEH ISOLATED FORM;Lo;0;AL;<isolated> 067E;;;;N;;;;; -FB57;ARABIC LETTER PEH FINAL FORM;Lo;0;AL;<final> 067E;;;;N;;;;; -FB58;ARABIC LETTER PEH INITIAL FORM;Lo;0;AL;<initial> 067E;;;;N;;;;; -FB59;ARABIC LETTER PEH MEDIAL FORM;Lo;0;AL;<medial> 067E;;;;N;;;;; -FB5A;ARABIC LETTER BEHEH ISOLATED FORM;Lo;0;AL;<isolated> 0680;;;;N;;;;; -FB5B;ARABIC LETTER BEHEH FINAL FORM;Lo;0;AL;<final> 0680;;;;N;;;;; -FB5C;ARABIC LETTER BEHEH INITIAL FORM;Lo;0;AL;<initial> 0680;;;;N;;;;; -FB5D;ARABIC LETTER BEHEH MEDIAL FORM;Lo;0;AL;<medial> 0680;;;;N;;;;; -FB5E;ARABIC LETTER TTEHEH ISOLATED FORM;Lo;0;AL;<isolated> 067A;;;;N;;;;; -FB5F;ARABIC LETTER TTEHEH FINAL FORM;Lo;0;AL;<final> 067A;;;;N;;;;; -FB60;ARABIC LETTER TTEHEH INITIAL FORM;Lo;0;AL;<initial> 067A;;;;N;;;;; -FB61;ARABIC LETTER TTEHEH MEDIAL FORM;Lo;0;AL;<medial> 067A;;;;N;;;;; -FB62;ARABIC LETTER TEHEH ISOLATED FORM;Lo;0;AL;<isolated> 067F;;;;N;;;;; -FB63;ARABIC LETTER TEHEH FINAL FORM;Lo;0;AL;<final> 067F;;;;N;;;;; -FB64;ARABIC LETTER TEHEH INITIAL FORM;Lo;0;AL;<initial> 067F;;;;N;;;;; -FB65;ARABIC LETTER TEHEH MEDIAL FORM;Lo;0;AL;<medial> 067F;;;;N;;;;; -FB66;ARABIC LETTER TTEH ISOLATED FORM;Lo;0;AL;<isolated> 0679;;;;N;;;;; -FB67;ARABIC LETTER TTEH FINAL FORM;Lo;0;AL;<final> 0679;;;;N;;;;; -FB68;ARABIC LETTER TTEH INITIAL FORM;Lo;0;AL;<initial> 0679;;;;N;;;;; -FB69;ARABIC LETTER TTEH MEDIAL FORM;Lo;0;AL;<medial> 0679;;;;N;;;;; -FB6A;ARABIC LETTER VEH ISOLATED FORM;Lo;0;AL;<isolated> 06A4;;;;N;;;;; -FB6B;ARABIC LETTER VEH FINAL FORM;Lo;0;AL;<final> 06A4;;;;N;;;;; -FB6C;ARABIC LETTER VEH INITIAL FORM;Lo;0;AL;<initial> 06A4;;;;N;;;;; -FB6D;ARABIC LETTER VEH MEDIAL FORM;Lo;0;AL;<medial> 06A4;;;;N;;;;; -FB6E;ARABIC LETTER PEHEH ISOLATED FORM;Lo;0;AL;<isolated> 06A6;;;;N;;;;; -FB6F;ARABIC LETTER PEHEH FINAL FORM;Lo;0;AL;<final> 06A6;;;;N;;;;; -FB70;ARABIC LETTER PEHEH INITIAL FORM;Lo;0;AL;<initial> 06A6;;;;N;;;;; -FB71;ARABIC LETTER PEHEH MEDIAL FORM;Lo;0;AL;<medial> 06A6;;;;N;;;;; -FB72;ARABIC LETTER DYEH ISOLATED FORM;Lo;0;AL;<isolated> 0684;;;;N;;;;; -FB73;ARABIC LETTER DYEH FINAL FORM;Lo;0;AL;<final> 0684;;;;N;;;;; -FB74;ARABIC LETTER DYEH INITIAL FORM;Lo;0;AL;<initial> 0684;;;;N;;;;; -FB75;ARABIC LETTER DYEH MEDIAL FORM;Lo;0;AL;<medial> 0684;;;;N;;;;; -FB76;ARABIC LETTER NYEH ISOLATED FORM;Lo;0;AL;<isolated> 0683;;;;N;;;;; -FB77;ARABIC LETTER NYEH FINAL FORM;Lo;0;AL;<final> 0683;;;;N;;;;; -FB78;ARABIC LETTER NYEH INITIAL FORM;Lo;0;AL;<initial> 0683;;;;N;;;;; -FB79;ARABIC LETTER NYEH MEDIAL FORM;Lo;0;AL;<medial> 0683;;;;N;;;;; -FB7A;ARABIC LETTER TCHEH ISOLATED FORM;Lo;0;AL;<isolated> 0686;;;;N;;;;; -FB7B;ARABIC LETTER TCHEH FINAL FORM;Lo;0;AL;<final> 0686;;;;N;;;;; -FB7C;ARABIC LETTER TCHEH INITIAL FORM;Lo;0;AL;<initial> 0686;;;;N;;;;; -FB7D;ARABIC LETTER TCHEH MEDIAL FORM;Lo;0;AL;<medial> 0686;;;;N;;;;; -FB7E;ARABIC LETTER TCHEHEH ISOLATED FORM;Lo;0;AL;<isolated> 0687;;;;N;;;;; -FB7F;ARABIC LETTER TCHEHEH FINAL FORM;Lo;0;AL;<final> 0687;;;;N;;;;; -FB80;ARABIC LETTER TCHEHEH INITIAL FORM;Lo;0;AL;<initial> 0687;;;;N;;;;; -FB81;ARABIC LETTER TCHEHEH MEDIAL FORM;Lo;0;AL;<medial> 0687;;;;N;;;;; -FB82;ARABIC LETTER DDAHAL ISOLATED FORM;Lo;0;AL;<isolated> 068D;;;;N;;;;; -FB83;ARABIC LETTER DDAHAL FINAL FORM;Lo;0;AL;<final> 068D;;;;N;;;;; -FB84;ARABIC LETTER DAHAL ISOLATED FORM;Lo;0;AL;<isolated> 068C;;;;N;;;;; -FB85;ARABIC LETTER DAHAL FINAL FORM;Lo;0;AL;<final> 068C;;;;N;;;;; -FB86;ARABIC LETTER DUL ISOLATED FORM;Lo;0;AL;<isolated> 068E;;;;N;;;;; -FB87;ARABIC LETTER DUL FINAL FORM;Lo;0;AL;<final> 068E;;;;N;;;;; -FB88;ARABIC LETTER DDAL ISOLATED FORM;Lo;0;AL;<isolated> 0688;;;;N;;;;; -FB89;ARABIC LETTER DDAL FINAL FORM;Lo;0;AL;<final> 0688;;;;N;;;;; -FB8A;ARABIC LETTER JEH ISOLATED FORM;Lo;0;AL;<isolated> 0698;;;;N;;;;; -FB8B;ARABIC LETTER JEH FINAL FORM;Lo;0;AL;<final> 0698;;;;N;;;;; -FB8C;ARABIC LETTER RREH ISOLATED FORM;Lo;0;AL;<isolated> 0691;;;;N;;;;; -FB8D;ARABIC LETTER RREH FINAL FORM;Lo;0;AL;<final> 0691;;;;N;;;;; -FB8E;ARABIC LETTER KEHEH ISOLATED FORM;Lo;0;AL;<isolated> 06A9;;;;N;;;;; -FB8F;ARABIC LETTER KEHEH FINAL FORM;Lo;0;AL;<final> 06A9;;;;N;;;;; -FB90;ARABIC LETTER KEHEH INITIAL FORM;Lo;0;AL;<initial> 06A9;;;;N;;;;; -FB91;ARABIC LETTER KEHEH MEDIAL FORM;Lo;0;AL;<medial> 06A9;;;;N;;;;; -FB92;ARABIC LETTER GAF ISOLATED FORM;Lo;0;AL;<isolated> 06AF;;;;N;;;;; -FB93;ARABIC LETTER GAF FINAL FORM;Lo;0;AL;<final> 06AF;;;;N;;;;; -FB94;ARABIC LETTER GAF INITIAL FORM;Lo;0;AL;<initial> 06AF;;;;N;;;;; -FB95;ARABIC LETTER GAF MEDIAL FORM;Lo;0;AL;<medial> 06AF;;;;N;;;;; -FB96;ARABIC LETTER GUEH ISOLATED FORM;Lo;0;AL;<isolated> 06B3;;;;N;;;;; -FB97;ARABIC LETTER GUEH FINAL FORM;Lo;0;AL;<final> 06B3;;;;N;;;;; -FB98;ARABIC LETTER GUEH INITIAL FORM;Lo;0;AL;<initial> 06B3;;;;N;;;;; -FB99;ARABIC LETTER GUEH MEDIAL FORM;Lo;0;AL;<medial> 06B3;;;;N;;;;; -FB9A;ARABIC LETTER NGOEH ISOLATED FORM;Lo;0;AL;<isolated> 06B1;;;;N;;;;; -FB9B;ARABIC LETTER NGOEH FINAL FORM;Lo;0;AL;<final> 06B1;;;;N;;;;; -FB9C;ARABIC LETTER NGOEH INITIAL FORM;Lo;0;AL;<initial> 06B1;;;;N;;;;; -FB9D;ARABIC LETTER NGOEH MEDIAL FORM;Lo;0;AL;<medial> 06B1;;;;N;;;;; -FB9E;ARABIC LETTER NOON GHUNNA ISOLATED FORM;Lo;0;AL;<isolated> 06BA;;;;N;;;;; -FB9F;ARABIC LETTER NOON GHUNNA FINAL FORM;Lo;0;AL;<final> 06BA;;;;N;;;;; -FBA0;ARABIC LETTER RNOON ISOLATED FORM;Lo;0;AL;<isolated> 06BB;;;;N;;;;; -FBA1;ARABIC LETTER RNOON FINAL FORM;Lo;0;AL;<final> 06BB;;;;N;;;;; -FBA2;ARABIC LETTER RNOON INITIAL FORM;Lo;0;AL;<initial> 06BB;;;;N;;;;; -FBA3;ARABIC LETTER RNOON MEDIAL FORM;Lo;0;AL;<medial> 06BB;;;;N;;;;; -FBA4;ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 06C0;;;;N;;;;; -FBA5;ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM;Lo;0;AL;<final> 06C0;;;;N;;;;; -FBA6;ARABIC LETTER HEH GOAL ISOLATED FORM;Lo;0;AL;<isolated> 06C1;;;;N;;;;; -FBA7;ARABIC LETTER HEH GOAL FINAL FORM;Lo;0;AL;<final> 06C1;;;;N;;;;; -FBA8;ARABIC LETTER HEH GOAL INITIAL FORM;Lo;0;AL;<initial> 06C1;;;;N;;;;; -FBA9;ARABIC LETTER HEH GOAL MEDIAL FORM;Lo;0;AL;<medial> 06C1;;;;N;;;;; -FBAA;ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM;Lo;0;AL;<isolated> 06BE;;;;N;;;;; -FBAB;ARABIC LETTER HEH DOACHASHMEE FINAL FORM;Lo;0;AL;<final> 06BE;;;;N;;;;; -FBAC;ARABIC LETTER HEH DOACHASHMEE INITIAL FORM;Lo;0;AL;<initial> 06BE;;;;N;;;;; -FBAD;ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM;Lo;0;AL;<medial> 06BE;;;;N;;;;; -FBAE;ARABIC LETTER YEH BARREE ISOLATED FORM;Lo;0;AL;<isolated> 06D2;;;;N;;;;; -FBAF;ARABIC LETTER YEH BARREE FINAL FORM;Lo;0;AL;<final> 06D2;;;;N;;;;; -FBB0;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 06D3;;;;N;;;;; -FBB1;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM;Lo;0;AL;<final> 06D3;;;;N;;;;; -FBD3;ARABIC LETTER NG ISOLATED FORM;Lo;0;AL;<isolated> 06AD;;;;N;;;;; -FBD4;ARABIC LETTER NG FINAL FORM;Lo;0;AL;<final> 06AD;;;;N;;;;; -FBD5;ARABIC LETTER NG INITIAL FORM;Lo;0;AL;<initial> 06AD;;;;N;;;;; -FBD6;ARABIC LETTER NG MEDIAL FORM;Lo;0;AL;<medial> 06AD;;;;N;;;;; -FBD7;ARABIC LETTER U ISOLATED FORM;Lo;0;AL;<isolated> 06C7;;;;N;;;;; -FBD8;ARABIC LETTER U FINAL FORM;Lo;0;AL;<final> 06C7;;;;N;;;;; -FBD9;ARABIC LETTER OE ISOLATED FORM;Lo;0;AL;<isolated> 06C6;;;;N;;;;; -FBDA;ARABIC LETTER OE FINAL FORM;Lo;0;AL;<final> 06C6;;;;N;;;;; -FBDB;ARABIC LETTER YU ISOLATED FORM;Lo;0;AL;<isolated> 06C8;;;;N;;;;; -FBDC;ARABIC LETTER YU FINAL FORM;Lo;0;AL;<final> 06C8;;;;N;;;;; -FBDD;ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0677;;;;N;;;;; -FBDE;ARABIC LETTER VE ISOLATED FORM;Lo;0;AL;<isolated> 06CB;;;;N;;;;; -FBDF;ARABIC LETTER VE FINAL FORM;Lo;0;AL;<final> 06CB;;;;N;;;;; -FBE0;ARABIC LETTER KIRGHIZ OE ISOLATED FORM;Lo;0;AL;<isolated> 06C5;;;;N;;;;; -FBE1;ARABIC LETTER KIRGHIZ OE FINAL FORM;Lo;0;AL;<final> 06C5;;;;N;;;;; -FBE2;ARABIC LETTER KIRGHIZ YU ISOLATED FORM;Lo;0;AL;<isolated> 06C9;;;;N;;;;; -FBE3;ARABIC LETTER KIRGHIZ YU FINAL FORM;Lo;0;AL;<final> 06C9;;;;N;;;;; -FBE4;ARABIC LETTER E ISOLATED FORM;Lo;0;AL;<isolated> 06D0;;;;N;;;;; -FBE5;ARABIC LETTER E FINAL FORM;Lo;0;AL;<final> 06D0;;;;N;;;;; -FBE6;ARABIC LETTER E INITIAL FORM;Lo;0;AL;<initial> 06D0;;;;N;;;;; -FBE7;ARABIC LETTER E MEDIAL FORM;Lo;0;AL;<medial> 06D0;;;;N;;;;; -FBE8;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM;Lo;0;AL;<initial> 0649;;;;N;;;;; -FBE9;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM;Lo;0;AL;<medial> 0649;;;;N;;;;; -FBEA;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0626 0627;;;;N;;;;; -FBEB;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM;Lo;0;AL;<final> 0626 0627;;;;N;;;;; -FBEC;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM;Lo;0;AL;<isolated> 0626 06D5;;;;N;;;;; -FBED;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM;Lo;0;AL;<final> 0626 06D5;;;;N;;;;; -FBEE;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM;Lo;0;AL;<isolated> 0626 0648;;;;N;;;;; -FBEF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM;Lo;0;AL;<final> 0626 0648;;;;N;;;;; -FBF0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM;Lo;0;AL;<isolated> 0626 06C7;;;;N;;;;; -FBF1;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM;Lo;0;AL;<final> 0626 06C7;;;;N;;;;; -FBF2;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM;Lo;0;AL;<isolated> 0626 06C6;;;;N;;;;; -FBF3;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM;Lo;0;AL;<final> 0626 06C6;;;;N;;;;; -FBF4;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM;Lo;0;AL;<isolated> 0626 06C8;;;;N;;;;; -FBF5;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM;Lo;0;AL;<final> 0626 06C8;;;;N;;;;; -FBF6;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM;Lo;0;AL;<isolated> 0626 06D0;;;;N;;;;; -FBF7;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E FINAL FORM;Lo;0;AL;<final> 0626 06D0;;;;N;;;;; -FBF8;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM;Lo;0;AL;<initial> 0626 06D0;;;;N;;;;; -FBF9;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0626 0649;;;;N;;;;; -FBFA;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0626 0649;;;;N;;;;; -FBFB;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM;Lo;0;AL;<initial> 0626 0649;;;;N;;;;; -FBFC;ARABIC LETTER FARSI YEH ISOLATED FORM;Lo;0;AL;<isolated> 06CC;;;;N;;;;; -FBFD;ARABIC LETTER FARSI YEH FINAL FORM;Lo;0;AL;<final> 06CC;;;;N;;;;; -FBFE;ARABIC LETTER FARSI YEH INITIAL FORM;Lo;0;AL;<initial> 06CC;;;;N;;;;; -FBFF;ARABIC LETTER FARSI YEH MEDIAL FORM;Lo;0;AL;<medial> 06CC;;;;N;;;;; -FC00;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0626 062C;;;;N;;;;; -FC01;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0626 062D;;;;N;;;;; -FC02;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0626 0645;;;;N;;;;; -FC03;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0626 0649;;;;N;;;;; -FC04;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0626 064A;;;;N;;;;; -FC05;ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0628 062C;;;;N;;;;; -FC06;ARABIC LIGATURE BEH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0628 062D;;;;N;;;;; -FC07;ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0628 062E;;;;N;;;;; -FC08;ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0628 0645;;;;N;;;;; -FC09;ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0628 0649;;;;N;;;;; -FC0A;ARABIC LIGATURE BEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0628 064A;;;;N;;;;; -FC0B;ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 062A 062C;;;;N;;;;; -FC0C;ARABIC LIGATURE TEH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 062A 062D;;;;N;;;;; -FC0D;ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 062A 062E;;;;N;;;;; -FC0E;ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 062A 0645;;;;N;;;;; -FC0F;ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 062A 0649;;;;N;;;;; -FC10;ARABIC LIGATURE TEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 062A 064A;;;;N;;;;; -FC11;ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 062B 062C;;;;N;;;;; -FC12;ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 062B 0645;;;;N;;;;; -FC13;ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 062B 0649;;;;N;;;;; -FC14;ARABIC LIGATURE THEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 062B 064A;;;;N;;;;; -FC15;ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 062C 062D;;;;N;;;;; -FC16;ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 062C 0645;;;;N;;;;; -FC17;ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 062D 062C;;;;N;;;;; -FC18;ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 062D 0645;;;;N;;;;; -FC19;ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 062E 062C;;;;N;;;;; -FC1A;ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 062E 062D;;;;N;;;;; -FC1B;ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 062E 0645;;;;N;;;;; -FC1C;ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0633 062C;;;;N;;;;; -FC1D;ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0633 062D;;;;N;;;;; -FC1E;ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0633 062E;;;;N;;;;; -FC1F;ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0633 0645;;;;N;;;;; -FC20;ARABIC LIGATURE SAD WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0635 062D;;;;N;;;;; -FC21;ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0635 0645;;;;N;;;;; -FC22;ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0636 062C;;;;N;;;;; -FC23;ARABIC LIGATURE DAD WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0636 062D;;;;N;;;;; -FC24;ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0636 062E;;;;N;;;;; -FC25;ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0636 0645;;;;N;;;;; -FC26;ARABIC LIGATURE TAH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0637 062D;;;;N;;;;; -FC27;ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0637 0645;;;;N;;;;; -FC28;ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0638 0645;;;;N;;;;; -FC29;ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0639 062C;;;;N;;;;; -FC2A;ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0639 0645;;;;N;;;;; -FC2B;ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 063A 062C;;;;N;;;;; -FC2C;ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 063A 0645;;;;N;;;;; -FC2D;ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0641 062C;;;;N;;;;; -FC2E;ARABIC LIGATURE FEH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0641 062D;;;;N;;;;; -FC2F;ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0641 062E;;;;N;;;;; -FC30;ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0641 0645;;;;N;;;;; -FC31;ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0641 0649;;;;N;;;;; -FC32;ARABIC LIGATURE FEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0641 064A;;;;N;;;;; -FC33;ARABIC LIGATURE QAF WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0642 062D;;;;N;;;;; -FC34;ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0642 0645;;;;N;;;;; -FC35;ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0642 0649;;;;N;;;;; -FC36;ARABIC LIGATURE QAF WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0642 064A;;;;N;;;;; -FC37;ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0643 0627;;;;N;;;;; -FC38;ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0643 062C;;;;N;;;;; -FC39;ARABIC LIGATURE KAF WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0643 062D;;;;N;;;;; -FC3A;ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0643 062E;;;;N;;;;; -FC3B;ARABIC LIGATURE KAF WITH LAM ISOLATED FORM;Lo;0;AL;<isolated> 0643 0644;;;;N;;;;; -FC3C;ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0643 0645;;;;N;;;;; -FC3D;ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0643 0649;;;;N;;;;; -FC3E;ARABIC LIGATURE KAF WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0643 064A;;;;N;;;;; -FC3F;ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0644 062C;;;;N;;;;; -FC40;ARABIC LIGATURE LAM WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0644 062D;;;;N;;;;; -FC41;ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0644 062E;;;;N;;;;; -FC42;ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0644 0645;;;;N;;;;; -FC43;ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0644 0649;;;;N;;;;; -FC44;ARABIC LIGATURE LAM WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0644 064A;;;;N;;;;; -FC45;ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0645 062C;;;;N;;;;; -FC46;ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0645 062D;;;;N;;;;; -FC47;ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0645 062E;;;;N;;;;; -FC48;ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0645 0645;;;;N;;;;; -FC49;ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0645 0649;;;;N;;;;; -FC4A;ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0645 064A;;;;N;;;;; -FC4B;ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0646 062C;;;;N;;;;; -FC4C;ARABIC LIGATURE NOON WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0646 062D;;;;N;;;;; -FC4D;ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0646 062E;;;;N;;;;; -FC4E;ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0646 0645;;;;N;;;;; -FC4F;ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0646 0649;;;;N;;;;; -FC50;ARABIC LIGATURE NOON WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0646 064A;;;;N;;;;; -FC51;ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0647 062C;;;;N;;;;; -FC52;ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0647 0645;;;;N;;;;; -FC53;ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0647 0649;;;;N;;;;; -FC54;ARABIC LIGATURE HEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0647 064A;;;;N;;;;; -FC55;ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 064A 062C;;;;N;;;;; -FC56;ARABIC LIGATURE YEH WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 064A 062D;;;;N;;;;; -FC57;ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 064A 062E;;;;N;;;;; -FC58;ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 064A 0645;;;;N;;;;; -FC59;ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 064A 0649;;;;N;;;;; -FC5A;ARABIC LIGATURE YEH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 064A 064A;;;;N;;;;; -FC5B;ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0630 0670;;;;N;;;;; -FC5C;ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0631 0670;;;;N;;;;; -FC5D;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0649 0670;;;;N;;;;; -FC5E;ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM;Lo;0;AL;<isolated> 0020 064C 0651;;;;N;;;;; -FC5F;ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM;Lo;0;AL;<isolated> 0020 064D 0651;;;;N;;;;; -FC60;ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM;Lo;0;AL;<isolated> 0020 064E 0651;;;;N;;;;; -FC61;ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM;Lo;0;AL;<isolated> 0020 064F 0651;;;;N;;;;; -FC62;ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM;Lo;0;AL;<isolated> 0020 0650 0651;;;;N;;;;; -FC63;ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0020 0651 0670;;;;N;;;;; -FC64;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM;Lo;0;AL;<final> 0626 0631;;;;N;;;;; -FC65;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM;Lo;0;AL;<final> 0626 0632;;;;N;;;;; -FC66;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM;Lo;0;AL;<final> 0626 0645;;;;N;;;;; -FC67;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM;Lo;0;AL;<final> 0626 0646;;;;N;;;;; -FC68;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0626 0649;;;;N;;;;; -FC69;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM;Lo;0;AL;<final> 0626 064A;;;;N;;;;; -FC6A;ARABIC LIGATURE BEH WITH REH FINAL FORM;Lo;0;AL;<final> 0628 0631;;;;N;;;;; -FC6B;ARABIC LIGATURE BEH WITH ZAIN FINAL FORM;Lo;0;AL;<final> 0628 0632;;;;N;;;;; -FC6C;ARABIC LIGATURE BEH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0628 0645;;;;N;;;;; -FC6D;ARABIC LIGATURE BEH WITH NOON FINAL FORM;Lo;0;AL;<final> 0628 0646;;;;N;;;;; -FC6E;ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0628 0649;;;;N;;;;; -FC6F;ARABIC LIGATURE BEH WITH YEH FINAL FORM;Lo;0;AL;<final> 0628 064A;;;;N;;;;; -FC70;ARABIC LIGATURE TEH WITH REH FINAL FORM;Lo;0;AL;<final> 062A 0631;;;;N;;;;; -FC71;ARABIC LIGATURE TEH WITH ZAIN FINAL FORM;Lo;0;AL;<final> 062A 0632;;;;N;;;;; -FC72;ARABIC LIGATURE TEH WITH MEEM FINAL FORM;Lo;0;AL;<final> 062A 0645;;;;N;;;;; -FC73;ARABIC LIGATURE TEH WITH NOON FINAL FORM;Lo;0;AL;<final> 062A 0646;;;;N;;;;; -FC74;ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062A 0649;;;;N;;;;; -FC75;ARABIC LIGATURE TEH WITH YEH FINAL FORM;Lo;0;AL;<final> 062A 064A;;;;N;;;;; -FC76;ARABIC LIGATURE THEH WITH REH FINAL FORM;Lo;0;AL;<final> 062B 0631;;;;N;;;;; -FC77;ARABIC LIGATURE THEH WITH ZAIN FINAL FORM;Lo;0;AL;<final> 062B 0632;;;;N;;;;; -FC78;ARABIC LIGATURE THEH WITH MEEM FINAL FORM;Lo;0;AL;<final> 062B 0645;;;;N;;;;; -FC79;ARABIC LIGATURE THEH WITH NOON FINAL FORM;Lo;0;AL;<final> 062B 0646;;;;N;;;;; -FC7A;ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062B 0649;;;;N;;;;; -FC7B;ARABIC LIGATURE THEH WITH YEH FINAL FORM;Lo;0;AL;<final> 062B 064A;;;;N;;;;; -FC7C;ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0641 0649;;;;N;;;;; -FC7D;ARABIC LIGATURE FEH WITH YEH FINAL FORM;Lo;0;AL;<final> 0641 064A;;;;N;;;;; -FC7E;ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0642 0649;;;;N;;;;; -FC7F;ARABIC LIGATURE QAF WITH YEH FINAL FORM;Lo;0;AL;<final> 0642 064A;;;;N;;;;; -FC80;ARABIC LIGATURE KAF WITH ALEF FINAL FORM;Lo;0;AL;<final> 0643 0627;;;;N;;;;; -FC81;ARABIC LIGATURE KAF WITH LAM FINAL FORM;Lo;0;AL;<final> 0643 0644;;;;N;;;;; -FC82;ARABIC LIGATURE KAF WITH MEEM FINAL FORM;Lo;0;AL;<final> 0643 0645;;;;N;;;;; -FC83;ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0643 0649;;;;N;;;;; -FC84;ARABIC LIGATURE KAF WITH YEH FINAL FORM;Lo;0;AL;<final> 0643 064A;;;;N;;;;; -FC85;ARABIC LIGATURE LAM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0644 0645;;;;N;;;;; -FC86;ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0644 0649;;;;N;;;;; -FC87;ARABIC LIGATURE LAM WITH YEH FINAL FORM;Lo;0;AL;<final> 0644 064A;;;;N;;;;; -FC88;ARABIC LIGATURE MEEM WITH ALEF FINAL FORM;Lo;0;AL;<final> 0645 0627;;;;N;;;;; -FC89;ARABIC LIGATURE MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0645 0645;;;;N;;;;; -FC8A;ARABIC LIGATURE NOON WITH REH FINAL FORM;Lo;0;AL;<final> 0646 0631;;;;N;;;;; -FC8B;ARABIC LIGATURE NOON WITH ZAIN FINAL FORM;Lo;0;AL;<final> 0646 0632;;;;N;;;;; -FC8C;ARABIC LIGATURE NOON WITH MEEM FINAL FORM;Lo;0;AL;<final> 0646 0645;;;;N;;;;; -FC8D;ARABIC LIGATURE NOON WITH NOON FINAL FORM;Lo;0;AL;<final> 0646 0646;;;;N;;;;; -FC8E;ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0646 0649;;;;N;;;;; -FC8F;ARABIC LIGATURE NOON WITH YEH FINAL FORM;Lo;0;AL;<final> 0646 064A;;;;N;;;;; -FC90;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM;Lo;0;AL;<final> 0649 0670;;;;N;;;;; -FC91;ARABIC LIGATURE YEH WITH REH FINAL FORM;Lo;0;AL;<final> 064A 0631;;;;N;;;;; -FC92;ARABIC LIGATURE YEH WITH ZAIN FINAL FORM;Lo;0;AL;<final> 064A 0632;;;;N;;;;; -FC93;ARABIC LIGATURE YEH WITH MEEM FINAL FORM;Lo;0;AL;<final> 064A 0645;;;;N;;;;; -FC94;ARABIC LIGATURE YEH WITH NOON FINAL FORM;Lo;0;AL;<final> 064A 0646;;;;N;;;;; -FC95;ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 064A 0649;;;;N;;;;; -FC96;ARABIC LIGATURE YEH WITH YEH FINAL FORM;Lo;0;AL;<final> 064A 064A;;;;N;;;;; -FC97;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0626 062C;;;;N;;;;; -FC98;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0626 062D;;;;N;;;;; -FC99;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0626 062E;;;;N;;;;; -FC9A;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0626 0645;;;;N;;;;; -FC9B;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0626 0647;;;;N;;;;; -FC9C;ARABIC LIGATURE BEH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0628 062C;;;;N;;;;; -FC9D;ARABIC LIGATURE BEH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0628 062D;;;;N;;;;; -FC9E;ARABIC LIGATURE BEH WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0628 062E;;;;N;;;;; -FC9F;ARABIC LIGATURE BEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0628 0645;;;;N;;;;; -FCA0;ARABIC LIGATURE BEH WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0628 0647;;;;N;;;;; -FCA1;ARABIC LIGATURE TEH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 062A 062C;;;;N;;;;; -FCA2;ARABIC LIGATURE TEH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 062A 062D;;;;N;;;;; -FCA3;ARABIC LIGATURE TEH WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 062A 062E;;;;N;;;;; -FCA4;ARABIC LIGATURE TEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062A 0645;;;;N;;;;; -FCA5;ARABIC LIGATURE TEH WITH HEH INITIAL FORM;Lo;0;AL;<initial> 062A 0647;;;;N;;;;; -FCA6;ARABIC LIGATURE THEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062B 0645;;;;N;;;;; -FCA7;ARABIC LIGATURE JEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 062C 062D;;;;N;;;;; -FCA8;ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062C 0645;;;;N;;;;; -FCA9;ARABIC LIGATURE HAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 062D 062C;;;;N;;;;; -FCAA;ARABIC LIGATURE HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062D 0645;;;;N;;;;; -FCAB;ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 062E 062C;;;;N;;;;; -FCAC;ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062E 0645;;;;N;;;;; -FCAD;ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0633 062C;;;;N;;;;; -FCAE;ARABIC LIGATURE SEEN WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0633 062D;;;;N;;;;; -FCAF;ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0633 062E;;;;N;;;;; -FCB0;ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0633 0645;;;;N;;;;; -FCB1;ARABIC LIGATURE SAD WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0635 062D;;;;N;;;;; -FCB2;ARABIC LIGATURE SAD WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0635 062E;;;;N;;;;; -FCB3;ARABIC LIGATURE SAD WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0635 0645;;;;N;;;;; -FCB4;ARABIC LIGATURE DAD WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0636 062C;;;;N;;;;; -FCB5;ARABIC LIGATURE DAD WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0636 062D;;;;N;;;;; -FCB6;ARABIC LIGATURE DAD WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0636 062E;;;;N;;;;; -FCB7;ARABIC LIGATURE DAD WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0636 0645;;;;N;;;;; -FCB8;ARABIC LIGATURE TAH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0637 062D;;;;N;;;;; -FCB9;ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0638 0645;;;;N;;;;; -FCBA;ARABIC LIGATURE AIN WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0639 062C;;;;N;;;;; -FCBB;ARABIC LIGATURE AIN WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0639 0645;;;;N;;;;; -FCBC;ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 063A 062C;;;;N;;;;; -FCBD;ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 063A 0645;;;;N;;;;; -FCBE;ARABIC LIGATURE FEH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0641 062C;;;;N;;;;; -FCBF;ARABIC LIGATURE FEH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0641 062D;;;;N;;;;; -FCC0;ARABIC LIGATURE FEH WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0641 062E;;;;N;;;;; -FCC1;ARABIC LIGATURE FEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0641 0645;;;;N;;;;; -FCC2;ARABIC LIGATURE QAF WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0642 062D;;;;N;;;;; -FCC3;ARABIC LIGATURE QAF WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0642 0645;;;;N;;;;; -FCC4;ARABIC LIGATURE KAF WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0643 062C;;;;N;;;;; -FCC5;ARABIC LIGATURE KAF WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0643 062D;;;;N;;;;; -FCC6;ARABIC LIGATURE KAF WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0643 062E;;;;N;;;;; -FCC7;ARABIC LIGATURE KAF WITH LAM INITIAL FORM;Lo;0;AL;<initial> 0643 0644;;;;N;;;;; -FCC8;ARABIC LIGATURE KAF WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0643 0645;;;;N;;;;; -FCC9;ARABIC LIGATURE LAM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0644 062C;;;;N;;;;; -FCCA;ARABIC LIGATURE LAM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0644 062D;;;;N;;;;; -FCCB;ARABIC LIGATURE LAM WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0644 062E;;;;N;;;;; -FCCC;ARABIC LIGATURE LAM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0644 0645;;;;N;;;;; -FCCD;ARABIC LIGATURE LAM WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0644 0647;;;;N;;;;; -FCCE;ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062C;;;;N;;;;; -FCCF;ARABIC LIGATURE MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0645 062D;;;;N;;;;; -FCD0;ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0645 062E;;;;N;;;;; -FCD1;ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0645 0645;;;;N;;;;; -FCD2;ARABIC LIGATURE NOON WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0646 062C;;;;N;;;;; -FCD3;ARABIC LIGATURE NOON WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0646 062D;;;;N;;;;; -FCD4;ARABIC LIGATURE NOON WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0646 062E;;;;N;;;;; -FCD5;ARABIC LIGATURE NOON WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0646 0645;;;;N;;;;; -FCD6;ARABIC LIGATURE NOON WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0646 0647;;;;N;;;;; -FCD7;ARABIC LIGATURE HEH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0647 062C;;;;N;;;;; -FCD8;ARABIC LIGATURE HEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0647 0645;;;;N;;;;; -FCD9;ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM;Lo;0;AL;<initial> 0647 0670;;;;N;;;;; -FCDA;ARABIC LIGATURE YEH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 064A 062C;;;;N;;;;; -FCDB;ARABIC LIGATURE YEH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 064A 062D;;;;N;;;;; -FCDC;ARABIC LIGATURE YEH WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 064A 062E;;;;N;;;;; -FCDD;ARABIC LIGATURE YEH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 064A 0645;;;;N;;;;; -FCDE;ARABIC LIGATURE YEH WITH HEH INITIAL FORM;Lo;0;AL;<initial> 064A 0647;;;;N;;;;; -FCDF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0626 0645;;;;N;;;;; -FCE0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 0626 0647;;;;N;;;;; -FCE1;ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0628 0645;;;;N;;;;; -FCE2;ARABIC LIGATURE BEH WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 0628 0647;;;;N;;;;; -FCE3;ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 062A 0645;;;;N;;;;; -FCE4;ARABIC LIGATURE TEH WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 062A 0647;;;;N;;;;; -FCE5;ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 062B 0645;;;;N;;;;; -FCE6;ARABIC LIGATURE THEH WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 062B 0647;;;;N;;;;; -FCE7;ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0633 0645;;;;N;;;;; -FCE8;ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 0633 0647;;;;N;;;;; -FCE9;ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0634 0645;;;;N;;;;; -FCEA;ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 0634 0647;;;;N;;;;; -FCEB;ARABIC LIGATURE KAF WITH LAM MEDIAL FORM;Lo;0;AL;<medial> 0643 0644;;;;N;;;;; -FCEC;ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0643 0645;;;;N;;;;; -FCED;ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0644 0645;;;;N;;;;; -FCEE;ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0646 0645;;;;N;;;;; -FCEF;ARABIC LIGATURE NOON WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 0646 0647;;;;N;;;;; -FCF0;ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 064A 0645;;;;N;;;;; -FCF1;ARABIC LIGATURE YEH WITH HEH MEDIAL FORM;Lo;0;AL;<medial> 064A 0647;;;;N;;;;; -FCF2;ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM;Lo;0;AL;<medial> 0640 064E 0651;;;;N;;;;; -FCF3;ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM;Lo;0;AL;<medial> 0640 064F 0651;;;;N;;;;; -FCF4;ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM;Lo;0;AL;<medial> 0640 0650 0651;;;;N;;;;; -FCF5;ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0637 0649;;;;N;;;;; -FCF6;ARABIC LIGATURE TAH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0637 064A;;;;N;;;;; -FCF7;ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0639 0649;;;;N;;;;; -FCF8;ARABIC LIGATURE AIN WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0639 064A;;;;N;;;;; -FCF9;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 063A 0649;;;;N;;;;; -FCFA;ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 063A 064A;;;;N;;;;; -FCFB;ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0633 0649;;;;N;;;;; -FCFC;ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0633 064A;;;;N;;;;; -FCFD;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0634 0649;;;;N;;;;; -FCFE;ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0634 064A;;;;N;;;;; -FCFF;ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 062D 0649;;;;N;;;;; -FD00;ARABIC LIGATURE HAH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 062D 064A;;;;N;;;;; -FD01;ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 062C 0649;;;;N;;;;; -FD02;ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 062C 064A;;;;N;;;;; -FD03;ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 062E 0649;;;;N;;;;; -FD04;ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 062E 064A;;;;N;;;;; -FD05;ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0635 0649;;;;N;;;;; -FD06;ARABIC LIGATURE SAD WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0635 064A;;;;N;;;;; -FD07;ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0636 0649;;;;N;;;;; -FD08;ARABIC LIGATURE DAD WITH YEH ISOLATED FORM;Lo;0;AL;<isolated> 0636 064A;;;;N;;;;; -FD09;ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM;Lo;0;AL;<isolated> 0634 062C;;;;N;;;;; -FD0A;ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM;Lo;0;AL;<isolated> 0634 062D;;;;N;;;;; -FD0B;ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM;Lo;0;AL;<isolated> 0634 062E;;;;N;;;;; -FD0C;ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0634 0645;;;;N;;;;; -FD0D;ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM;Lo;0;AL;<isolated> 0634 0631;;;;N;;;;; -FD0E;ARABIC LIGATURE SEEN WITH REH ISOLATED FORM;Lo;0;AL;<isolated> 0633 0631;;;;N;;;;; -FD0F;ARABIC LIGATURE SAD WITH REH ISOLATED FORM;Lo;0;AL;<isolated> 0635 0631;;;;N;;;;; -FD10;ARABIC LIGATURE DAD WITH REH ISOLATED FORM;Lo;0;AL;<isolated> 0636 0631;;;;N;;;;; -FD11;ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0637 0649;;;;N;;;;; -FD12;ARABIC LIGATURE TAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0637 064A;;;;N;;;;; -FD13;ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0639 0649;;;;N;;;;; -FD14;ARABIC LIGATURE AIN WITH YEH FINAL FORM;Lo;0;AL;<final> 0639 064A;;;;N;;;;; -FD15;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 063A 0649;;;;N;;;;; -FD16;ARABIC LIGATURE GHAIN WITH YEH FINAL FORM;Lo;0;AL;<final> 063A 064A;;;;N;;;;; -FD17;ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0633 0649;;;;N;;;;; -FD18;ARABIC LIGATURE SEEN WITH YEH FINAL FORM;Lo;0;AL;<final> 0633 064A;;;;N;;;;; -FD19;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0634 0649;;;;N;;;;; -FD1A;ARABIC LIGATURE SHEEN WITH YEH FINAL FORM;Lo;0;AL;<final> 0634 064A;;;;N;;;;; -FD1B;ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062D 0649;;;;N;;;;; -FD1C;ARABIC LIGATURE HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 062D 064A;;;;N;;;;; -FD1D;ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062C 0649;;;;N;;;;; -FD1E;ARABIC LIGATURE JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062C 064A;;;;N;;;;; -FD1F;ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062E 0649;;;;N;;;;; -FD20;ARABIC LIGATURE KHAH WITH YEH FINAL FORM;Lo;0;AL;<final> 062E 064A;;;;N;;;;; -FD21;ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0635 0649;;;;N;;;;; -FD22;ARABIC LIGATURE SAD WITH YEH FINAL FORM;Lo;0;AL;<final> 0635 064A;;;;N;;;;; -FD23;ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0636 0649;;;;N;;;;; -FD24;ARABIC LIGATURE DAD WITH YEH FINAL FORM;Lo;0;AL;<final> 0636 064A;;;;N;;;;; -FD25;ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM;Lo;0;AL;<final> 0634 062C;;;;N;;;;; -FD26;ARABIC LIGATURE SHEEN WITH HAH FINAL FORM;Lo;0;AL;<final> 0634 062D;;;;N;;;;; -FD27;ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM;Lo;0;AL;<final> 0634 062E;;;;N;;;;; -FD28;ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM;Lo;0;AL;<final> 0634 0645;;;;N;;;;; -FD29;ARABIC LIGATURE SHEEN WITH REH FINAL FORM;Lo;0;AL;<final> 0634 0631;;;;N;;;;; -FD2A;ARABIC LIGATURE SEEN WITH REH FINAL FORM;Lo;0;AL;<final> 0633 0631;;;;N;;;;; -FD2B;ARABIC LIGATURE SAD WITH REH FINAL FORM;Lo;0;AL;<final> 0635 0631;;;;N;;;;; -FD2C;ARABIC LIGATURE DAD WITH REH FINAL FORM;Lo;0;AL;<final> 0636 0631;;;;N;;;;; -FD2D;ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0634 062C;;;;N;;;;; -FD2E;ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0634 062D;;;;N;;;;; -FD2F;ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0634 062E;;;;N;;;;; -FD30;ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0634 0645;;;;N;;;;; -FD31;ARABIC LIGATURE SEEN WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0633 0647;;;;N;;;;; -FD32;ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM;Lo;0;AL;<initial> 0634 0647;;;;N;;;;; -FD33;ARABIC LIGATURE TAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0637 0645;;;;N;;;;; -FD34;ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM;Lo;0;AL;<medial> 0633 062C;;;;N;;;;; -FD35;ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM;Lo;0;AL;<medial> 0633 062D;;;;N;;;;; -FD36;ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM;Lo;0;AL;<medial> 0633 062E;;;;N;;;;; -FD37;ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM;Lo;0;AL;<medial> 0634 062C;;;;N;;;;; -FD38;ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM;Lo;0;AL;<medial> 0634 062D;;;;N;;;;; -FD39;ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM;Lo;0;AL;<medial> 0634 062E;;;;N;;;;; -FD3A;ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0637 0645;;;;N;;;;; -FD3B;ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM;Lo;0;AL;<medial> 0638 0645;;;;N;;;;; -FD3C;ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM;Lo;0;AL;<final> 0627 064B;;;;N;;;;; -FD3D;ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM;Lo;0;AL;<isolated> 0627 064B;;;;N;;;;; -FD3E;ORNATE LEFT PARENTHESIS;Ps;0;ON;;;;;N;;;;; -FD3F;ORNATE RIGHT PARENTHESIS;Pe;0;ON;;;;;N;;;;; -FD50;ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062A 062C 0645;;;;N;;;;; -FD51;ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM;Lo;0;AL;<final> 062A 062D 062C;;;;N;;;;; -FD52;ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 062A 062D 062C;;;;N;;;;; -FD53;ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062A 062D 0645;;;;N;;;;; -FD54;ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 062A 062E 0645;;;;N;;;;; -FD55;ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 062A 0645 062C;;;;N;;;;; -FD56;ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 062A 0645 062D;;;;N;;;;; -FD57;ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 062A 0645 062E;;;;N;;;;; -FD58;ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 062C 0645 062D;;;;N;;;;; -FD59;ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 062C 0645 062D;;;;N;;;;; -FD5A;ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062D 0645 064A;;;;N;;;;; -FD5B;ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062D 0645 0649;;;;N;;;;; -FD5C;ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0633 062D 062C;;;;N;;;;; -FD5D;ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0633 062C 062D;;;;N;;;;; -FD5E;ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0633 062C 0649;;;;N;;;;; -FD5F;ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 0633 0645 062D;;;;N;;;;; -FD60;ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0633 0645 062D;;;;N;;;;; -FD61;ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0633 0645 062C;;;;N;;;;; -FD62;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0633 0645 0645;;;;N;;;;; -FD63;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0633 0645 0645;;;;N;;;;; -FD64;ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM;Lo;0;AL;<final> 0635 062D 062D;;;;N;;;;; -FD65;ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0635 062D 062D;;;;N;;;;; -FD66;ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0635 0645 0645;;;;N;;;;; -FD67;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0634 062D 0645;;;;N;;;;; -FD68;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0634 062D 0645;;;;N;;;;; -FD69;ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0634 062C 064A;;;;N;;;;; -FD6A;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM;Lo;0;AL;<final> 0634 0645 062E;;;;N;;;;; -FD6B;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0634 0645 062E;;;;N;;;;; -FD6C;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0634 0645 0645;;;;N;;;;; -FD6D;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0634 0645 0645;;;;N;;;;; -FD6E;ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0636 062D 0649;;;;N;;;;; -FD6F;ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0636 062E 0645;;;;N;;;;; -FD70;ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0636 062E 0645;;;;N;;;;; -FD71;ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 0637 0645 062D;;;;N;;;;; -FD72;ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0637 0645 062D;;;;N;;;;; -FD73;ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0637 0645 0645;;;;N;;;;; -FD74;ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0637 0645 064A;;;;N;;;;; -FD75;ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0639 062C 0645;;;;N;;;;; -FD76;ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0639 0645 0645;;;;N;;;;; -FD77;ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0639 0645 0645;;;;N;;;;; -FD78;ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0639 0645 0649;;;;N;;;;; -FD79;ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 063A 0645 0645;;;;N;;;;; -FD7A;ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 063A 0645 064A;;;;N;;;;; -FD7B;ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 063A 0645 0649;;;;N;;;;; -FD7C;ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0641 062E 0645;;;;N;;;;; -FD7D;ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0641 062E 0645;;;;N;;;;; -FD7E;ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 0642 0645 062D;;;;N;;;;; -FD7F;ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0642 0645 0645;;;;N;;;;; -FD80;ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0644 062D 0645;;;;N;;;;; -FD81;ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0644 062D 064A;;;;N;;;;; -FD82;ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0644 062D 0649;;;;N;;;;; -FD83;ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0644 062C 062C;;;;N;;;;; -FD84;ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM;Lo;0;AL;<final> 0644 062C 062C;;;;N;;;;; -FD85;ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL;<final> 0644 062E 0645;;;;N;;;;; -FD86;ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0644 062E 0645;;;;N;;;;; -FD87;ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 0644 0645 062D;;;;N;;;;; -FD88;ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0644 0645 062D;;;;N;;;;; -FD89;ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062D 062C;;;;N;;;;; -FD8A;ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062D 0645;;;;N;;;;; -FD8B;ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0645 062D 064A;;;;N;;;;; -FD8C;ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0645 062C 062D;;;;N;;;;; -FD8D;ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062C 0645;;;;N;;;;; -FD8E;ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062E 062C;;;;N;;;;; -FD8F;ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0645 062E 0645;;;;N;;;;; -FD92;ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM;Lo;0;AL;<initial> 0645 062C 062E;;;;N;;;;; -FD93;ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL;<initial> 0647 0645 062C;;;;N;;;;; -FD94;ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0647 0645 0645;;;;N;;;;; -FD95;ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0646 062D 0645;;;;N;;;;; -FD96;ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0646 062D 0649;;;;N;;;;; -FD97;ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0646 062C 0645;;;;N;;;;; -FD98;ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0646 062C 0645;;;;N;;;;; -FD99;ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0646 062C 0649;;;;N;;;;; -FD9A;ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0646 0645 064A;;;;N;;;;; -FD9B;ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0646 0645 0649;;;;N;;;;; -FD9C;ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 064A 0645 0645;;;;N;;;;; -FD9D;ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 064A 0645 0645;;;;N;;;;; -FD9E;ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0628 062E 064A;;;;N;;;;; -FD9F;ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062A 062C 064A;;;;N;;;;; -FDA0;ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062A 062C 0649;;;;N;;;;; -FDA1;ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM;Lo;0;AL;<final> 062A 062E 064A;;;;N;;;;; -FDA2;ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062A 062E 0649;;;;N;;;;; -FDA3;ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062A 0645 064A;;;;N;;;;; -FDA4;ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062A 0645 0649;;;;N;;;;; -FDA5;ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062C 0645 064A;;;;N;;;;; -FDA6;ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062C 062D 0649;;;;N;;;;; -FDA7;ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 062C 0645 0649;;;;N;;;;; -FDA8;ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0633 062E 0649;;;;N;;;;; -FDA9;ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0635 062D 064A;;;;N;;;;; -FDAA;ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0634 062D 064A;;;;N;;;;; -FDAB;ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0636 062D 064A;;;;N;;;;; -FDAC;ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0644 062C 064A;;;;N;;;;; -FDAD;ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0644 0645 064A;;;;N;;;;; -FDAE;ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 064A 062D 064A;;;;N;;;;; -FDAF;ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 064A 062C 064A;;;;N;;;;; -FDB0;ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 064A 0645 064A;;;;N;;;;; -FDB1;ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0645 0645 064A;;;;N;;;;; -FDB2;ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0642 0645 064A;;;;N;;;;; -FDB3;ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0646 062D 064A;;;;N;;;;; -FDB4;ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0642 0645 062D;;;;N;;;;; -FDB5;ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0644 062D 0645;;;;N;;;;; -FDB6;ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0639 0645 064A;;;;N;;;;; -FDB7;ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0643 0645 064A;;;;N;;;;; -FDB8;ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL;<initial> 0646 062C 062D;;;;N;;;;; -FDB9;ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0645 062E 064A;;;;N;;;;; -FDBA;ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0644 062C 0645;;;;N;;;;; -FDBB;ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0643 0645 0645;;;;N;;;;; -FDBC;ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL;<final> 0644 062C 0645;;;;N;;;;; -FDBD;ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM;Lo;0;AL;<final> 0646 062C 062D;;;;N;;;;; -FDBE;ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 062C 062D 064A;;;;N;;;;; -FDBF;ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 062D 062C 064A;;;;N;;;;; -FDC0;ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0645 062C 064A;;;;N;;;;; -FDC1;ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0641 0645 064A;;;;N;;;;; -FDC2;ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0628 062D 064A;;;;N;;;;; -FDC3;ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0643 0645 0645;;;;N;;;;; -FDC4;ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0639 062C 0645;;;;N;;;;; -FDC5;ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL;<initial> 0635 0645 0645;;;;N;;;;; -FDC6;ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM;Lo;0;AL;<final> 0633 062E 064A;;;;N;;;;; -FDC7;ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM;Lo;0;AL;<final> 0646 062C 064A;;;;N;;;;; -FDF0;ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;AL;<isolated> 0635 0644 06D2;;;;N;;;;; -FDF1;ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;AL;<isolated> 0642 0644 06D2;;;;N;;;;; -FDF2;ARABIC LIGATURE ALLAH ISOLATED FORM;Lo;0;AL;<isolated> 0627 0644 0644 0647;;;;N;;;;; -FDF3;ARABIC LIGATURE AKBAR ISOLATED FORM;Lo;0;AL;<isolated> 0627 0643 0628 0631;;;;N;;;;; -FDF4;ARABIC LIGATURE MOHAMMAD ISOLATED FORM;Lo;0;AL;<isolated> 0645 062D 0645 062F;;;;N;;;;; -FDF5;ARABIC LIGATURE SALAM ISOLATED FORM;Lo;0;AL;<isolated> 0635 0644 0639 0645;;;;N;;;;; -FDF6;ARABIC LIGATURE RASOUL ISOLATED FORM;Lo;0;AL;<isolated> 0631 0633 0648 0644;;;;N;;;;; -FDF7;ARABIC LIGATURE ALAYHE ISOLATED FORM;Lo;0;AL;<isolated> 0639 0644 064A 0647;;;;N;;;;; -FDF8;ARABIC LIGATURE WASALLAM ISOLATED FORM;Lo;0;AL;<isolated> 0648 0633 0644 0645;;;;N;;;;; -FDF9;ARABIC LIGATURE SALLA ISOLATED FORM;Lo;0;AL;<isolated> 0635 0644 0649;;;;N;;;;; -FDFA;ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM;Lo;0;AL;<isolated> 0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645;;;;N;ARABIC LETTER SALLALLAHOU ALAYHE WASALLAM;;;; -FDFB;ARABIC LIGATURE JALLAJALALOUHOU;Lo;0;AL;<isolated> 062C 0644 0020 062C 0644 0627 0644 0647;;;;N;ARABIC LETTER JALLAJALALOUHOU;;;; -FE20;COMBINING LIGATURE LEFT HALF;Mn;230;NSM;;;;;N;;;;; -FE21;COMBINING LIGATURE RIGHT HALF;Mn;230;NSM;;;;;N;;;;; -FE22;COMBINING DOUBLE TILDE LEFT HALF;Mn;230;NSM;;;;;N;;;;; -FE23;COMBINING DOUBLE TILDE RIGHT HALF;Mn;230;NSM;;;;;N;;;;; -FE30;PRESENTATION FORM FOR VERTICAL TWO DOT LEADER;Po;0;ON;<vertical> 2025;;;;N;GLYPH FOR VERTICAL TWO DOT LEADER;;;; -FE31;PRESENTATION FORM FOR VERTICAL EM DASH;Pd;0;ON;<vertical> 2014;;;;N;GLYPH FOR VERTICAL EM DASH;;;; -FE32;PRESENTATION FORM FOR VERTICAL EN DASH;Pd;0;ON;<vertical> 2013;;;;N;GLYPH FOR VERTICAL EN DASH;;;; -FE33;PRESENTATION FORM FOR VERTICAL LOW LINE;Pc;0;ON;<vertical> 005F;;;;N;GLYPH FOR VERTICAL SPACING UNDERSCORE;;;; -FE34;PRESENTATION FORM FOR VERTICAL WAVY LOW LINE;Pc;0;ON;<vertical> 005F;;;;N;GLYPH FOR VERTICAL SPACING WAVY UNDERSCORE;;;; -FE35;PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS;Ps;0;ON;<vertical> 0028;;;;N;GLYPH FOR VERTICAL OPENING PARENTHESIS;;;; -FE36;PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS;Pe;0;ON;<vertical> 0029;;;;N;GLYPH FOR VERTICAL CLOSING PARENTHESIS;;;; -FE37;PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET;Ps;0;ON;<vertical> 007B;;;;N;GLYPH FOR VERTICAL OPENING CURLY BRACKET;;;; -FE38;PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET;Pe;0;ON;<vertical> 007D;;;;N;GLYPH FOR VERTICAL CLOSING CURLY BRACKET;;;; -FE39;PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET;Ps;0;ON;<vertical> 3014;;;;N;GLYPH FOR VERTICAL OPENING TORTOISE SHELL BRACKET;;;; -FE3A;PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;<vertical> 3015;;;;N;GLYPH FOR VERTICAL CLOSING TORTOISE SHELL BRACKET;;;; -FE3B;PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET;Ps;0;ON;<vertical> 3010;;;;N;GLYPH FOR VERTICAL OPENING BLACK LENTICULAR BRACKET;;;; -FE3C;PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON;<vertical> 3011;;;;N;GLYPH FOR VERTICAL CLOSING BLACK LENTICULAR BRACKET;;;; -FE3D;PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;<vertical> 300A;;;;N;GLYPH FOR VERTICAL OPENING DOUBLE ANGLE BRACKET;;;; -FE3E;PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;<vertical> 300B;;;;N;GLYPH FOR VERTICAL CLOSING DOUBLE ANGLE BRACKET;;;; -FE3F;PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET;Ps;0;ON;<vertical> 3008;;;;N;GLYPH FOR VERTICAL OPENING ANGLE BRACKET;;;; -FE40;PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET;Pe;0;ON;<vertical> 3009;;;;N;GLYPH FOR VERTICAL CLOSING ANGLE BRACKET;;;; -FE41;PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET;Ps;0;ON;<vertical> 300C;;;;N;GLYPH FOR VERTICAL OPENING CORNER BRACKET;;;; -FE42;PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET;Pe;0;ON;<vertical> 300D;;;;N;GLYPH FOR VERTICAL CLOSING CORNER BRACKET;;;; -FE43;PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET;Ps;0;ON;<vertical> 300E;;;;N;GLYPH FOR VERTICAL OPENING WHITE CORNER BRACKET;;;; -FE44;PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET;Pe;0;ON;<vertical> 300F;;;;N;GLYPH FOR VERTICAL CLOSING WHITE CORNER BRACKET;;;; -FE49;DASHED OVERLINE;Po;0;ON;<compat> 203E;;;;N;SPACING DASHED OVERSCORE;;;; -FE4A;CENTRELINE OVERLINE;Po;0;ON;<compat> 203E;;;;N;SPACING CENTERLINE OVERSCORE;;;; -FE4B;WAVY OVERLINE;Po;0;ON;<compat> 203E;;;;N;SPACING WAVY OVERSCORE;;;; -FE4C;DOUBLE WAVY OVERLINE;Po;0;ON;<compat> 203E;;;;N;SPACING DOUBLE WAVY OVERSCORE;;;; -FE4D;DASHED LOW LINE;Pc;0;ON;<compat> 005F;;;;N;SPACING DASHED UNDERSCORE;;;; -FE4E;CENTRELINE LOW LINE;Pc;0;ON;<compat> 005F;;;;N;SPACING CENTERLINE UNDERSCORE;;;; -FE4F;WAVY LOW LINE;Pc;0;ON;<compat> 005F;;;;N;SPACING WAVY UNDERSCORE;;;; -FE50;SMALL COMMA;Po;0;CS;<small> 002C;;;;N;;;;; -FE51;SMALL IDEOGRAPHIC COMMA;Po;0;ON;<small> 3001;;;;N;;;;; -FE52;SMALL FULL STOP;Po;0;CS;<small> 002E;;;;N;SMALL PERIOD;;;; -FE54;SMALL SEMICOLON;Po;0;ON;<small> 003B;;;;N;;;;; -FE55;SMALL COLON;Po;0;CS;<small> 003A;;;;N;;;;; -FE56;SMALL QUESTION MARK;Po;0;ON;<small> 003F;;;;N;;;;; -FE57;SMALL EXCLAMATION MARK;Po;0;ON;<small> 0021;;;;N;;;;; -FE58;SMALL EM DASH;Pd;0;ON;<small> 2014;;;;N;;;;; -FE59;SMALL LEFT PARENTHESIS;Ps;0;ON;<small> 0028;;;;N;SMALL OPENING PARENTHESIS;;;; -FE5A;SMALL RIGHT PARENTHESIS;Pe;0;ON;<small> 0029;;;;N;SMALL CLOSING PARENTHESIS;;;; -FE5B;SMALL LEFT CURLY BRACKET;Ps;0;ON;<small> 007B;;;;N;SMALL OPENING CURLY BRACKET;;;; -FE5C;SMALL RIGHT CURLY BRACKET;Pe;0;ON;<small> 007D;;;;N;SMALL CLOSING CURLY BRACKET;;;; -FE5D;SMALL LEFT TORTOISE SHELL BRACKET;Ps;0;ON;<small> 3014;;;;N;SMALL OPENING TORTOISE SHELL BRACKET;;;; -FE5E;SMALL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;<small> 3015;;;;N;SMALL CLOSING TORTOISE SHELL BRACKET;;;; -FE5F;SMALL NUMBER SIGN;Po;0;ET;<small> 0023;;;;N;;;;; -FE60;SMALL AMPERSAND;Po;0;ON;<small> 0026;;;;N;;;;; -FE61;SMALL ASTERISK;Po;0;ON;<small> 002A;;;;N;;;;; -FE62;SMALL PLUS SIGN;Sm;0;ET;<small> 002B;;;;N;;;;; -FE63;SMALL HYPHEN-MINUS;Pd;0;ET;<small> 002D;;;;N;;;;; -FE64;SMALL LESS-THAN SIGN;Sm;0;ON;<small> 003C;;;;N;;;;; -FE65;SMALL GREATER-THAN SIGN;Sm;0;ON;<small> 003E;;;;N;;;;; -FE66;SMALL EQUALS SIGN;Sm;0;ON;<small> 003D;;;;N;;;;; -FE68;SMALL REVERSE SOLIDUS;Po;0;ON;<small> 005C;;;;N;SMALL BACKSLASH;;;; -FE69;SMALL DOLLAR SIGN;Sc;0;ET;<small> 0024;;;;N;;;;; -FE6A;SMALL PERCENT SIGN;Po;0;ET;<small> 0025;;;;N;;;;; -FE6B;SMALL COMMERCIAL AT;Po;0;ON;<small> 0040;;;;N;;;;; -FE70;ARABIC FATHATAN ISOLATED FORM;Lo;0;AL;<isolated> 0020 064B;;;;N;ARABIC SPACING FATHATAN;;;; -FE71;ARABIC TATWEEL WITH FATHATAN ABOVE;Lo;0;AL;<medial> 0640 064B;;;;N;ARABIC FATHATAN ON TATWEEL;;;; -FE72;ARABIC DAMMATAN ISOLATED FORM;Lo;0;AL;<isolated> 0020 064C;;;;N;ARABIC SPACING DAMMATAN;;;; -FE74;ARABIC KASRATAN ISOLATED FORM;Lo;0;AL;<isolated> 0020 064D;;;;N;ARABIC SPACING KASRATAN;;;; -FE76;ARABIC FATHA ISOLATED FORM;Lo;0;AL;<isolated> 0020 064E;;;;N;ARABIC SPACING FATHAH;;;; -FE77;ARABIC FATHA MEDIAL FORM;Lo;0;AL;<medial> 0640 064E;;;;N;ARABIC FATHAH ON TATWEEL;;;; -FE78;ARABIC DAMMA ISOLATED FORM;Lo;0;AL;<isolated> 0020 064F;;;;N;ARABIC SPACING DAMMAH;;;; -FE79;ARABIC DAMMA MEDIAL FORM;Lo;0;AL;<medial> 0640 064F;;;;N;ARABIC DAMMAH ON TATWEEL;;;; -FE7A;ARABIC KASRA ISOLATED FORM;Lo;0;AL;<isolated> 0020 0650;;;;N;ARABIC SPACING KASRAH;;;; -FE7B;ARABIC KASRA MEDIAL FORM;Lo;0;AL;<medial> 0640 0650;;;;N;ARABIC KASRAH ON TATWEEL;;;; -FE7C;ARABIC SHADDA ISOLATED FORM;Lo;0;AL;<isolated> 0020 0651;;;;N;ARABIC SPACING SHADDAH;;;; -FE7D;ARABIC SHADDA MEDIAL FORM;Lo;0;AL;<medial> 0640 0651;;;;N;ARABIC SHADDAH ON TATWEEL;;;; -FE7E;ARABIC SUKUN ISOLATED FORM;Lo;0;AL;<isolated> 0020 0652;;;;N;ARABIC SPACING SUKUN;;;; -FE7F;ARABIC SUKUN MEDIAL FORM;Lo;0;AL;<medial> 0640 0652;;;;N;ARABIC SUKUN ON TATWEEL;;;; -FE80;ARABIC LETTER HAMZA ISOLATED FORM;Lo;0;AL;<isolated> 0621;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH;;;; -FE81;ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON ALEF;;;; -FE82;ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;AL;<final> 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON ALEF;;;; -FE83;ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON ALEF;;;; -FE84;ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;AL;<final> 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON ALEF;;;; -FE85;ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0624;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON WAW;;;; -FE86;ARABIC LETTER WAW WITH HAMZA ABOVE FINAL FORM;Lo;0;AL;<final> 0624;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON WAW;;;; -FE87;ARABIC LETTER ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;AL;<isolated> 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER ALEF;;;; -FE88;ARABIC LETTER ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;AL;<final> 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER ALEF;;;; -FE89;ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0626;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON YA;;;; -FE8A;ARABIC LETTER YEH WITH HAMZA ABOVE FINAL FORM;Lo;0;AL;<final> 0626;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON YA;;;; -FE8B;ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM;Lo;0;AL;<initial> 0626;;;;N;GLYPH FOR INITIAL ARABIC HAMZAH ON YA;;;; -FE8C;ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM;Lo;0;AL;<medial> 0626;;;;N;GLYPH FOR MEDIAL ARABIC HAMZAH ON YA;;;; -FE8D;ARABIC LETTER ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0627;;;;N;GLYPH FOR ISOLATE ARABIC ALEF;;;; -FE8E;ARABIC LETTER ALEF FINAL FORM;Lo;0;AL;<final> 0627;;;;N;GLYPH FOR FINAL ARABIC ALEF;;;; -FE8F;ARABIC LETTER BEH ISOLATED FORM;Lo;0;AL;<isolated> 0628;;;;N;GLYPH FOR ISOLATE ARABIC BAA;;;; -FE90;ARABIC LETTER BEH FINAL FORM;Lo;0;AL;<final> 0628;;;;N;GLYPH FOR FINAL ARABIC BAA;;;; -FE91;ARABIC LETTER BEH INITIAL FORM;Lo;0;AL;<initial> 0628;;;;N;GLYPH FOR INITIAL ARABIC BAA;;;; -FE92;ARABIC LETTER BEH MEDIAL FORM;Lo;0;AL;<medial> 0628;;;;N;GLYPH FOR MEDIAL ARABIC BAA;;;; -FE93;ARABIC LETTER TEH MARBUTA ISOLATED FORM;Lo;0;AL;<isolated> 0629;;;;N;GLYPH FOR ISOLATE ARABIC TAA MARBUTAH;;;; -FE94;ARABIC LETTER TEH MARBUTA FINAL FORM;Lo;0;AL;<final> 0629;;;;N;GLYPH FOR FINAL ARABIC TAA MARBUTAH;;;; -FE95;ARABIC LETTER TEH ISOLATED FORM;Lo;0;AL;<isolated> 062A;;;;N;GLYPH FOR ISOLATE ARABIC TAA;;;; -FE96;ARABIC LETTER TEH FINAL FORM;Lo;0;AL;<final> 062A;;;;N;GLYPH FOR FINAL ARABIC TAA;;;; -FE97;ARABIC LETTER TEH INITIAL FORM;Lo;0;AL;<initial> 062A;;;;N;GLYPH FOR INITIAL ARABIC TAA;;;; -FE98;ARABIC LETTER TEH MEDIAL FORM;Lo;0;AL;<medial> 062A;;;;N;GLYPH FOR MEDIAL ARABIC TAA;;;; -FE99;ARABIC LETTER THEH ISOLATED FORM;Lo;0;AL;<isolated> 062B;;;;N;GLYPH FOR ISOLATE ARABIC THAA;;;; -FE9A;ARABIC LETTER THEH FINAL FORM;Lo;0;AL;<final> 062B;;;;N;GLYPH FOR FINAL ARABIC THAA;;;; -FE9B;ARABIC LETTER THEH INITIAL FORM;Lo;0;AL;<initial> 062B;;;;N;GLYPH FOR INITIAL ARABIC THAA;;;; -FE9C;ARABIC LETTER THEH MEDIAL FORM;Lo;0;AL;<medial> 062B;;;;N;GLYPH FOR MEDIAL ARABIC THAA;;;; -FE9D;ARABIC LETTER JEEM ISOLATED FORM;Lo;0;AL;<isolated> 062C;;;;N;GLYPH FOR ISOLATE ARABIC JEEM;;;; -FE9E;ARABIC LETTER JEEM FINAL FORM;Lo;0;AL;<final> 062C;;;;N;GLYPH FOR FINAL ARABIC JEEM;;;; -FE9F;ARABIC LETTER JEEM INITIAL FORM;Lo;0;AL;<initial> 062C;;;;N;GLYPH FOR INITIAL ARABIC JEEM;;;; -FEA0;ARABIC LETTER JEEM MEDIAL FORM;Lo;0;AL;<medial> 062C;;;;N;GLYPH FOR MEDIAL ARABIC JEEM;;;; -FEA1;ARABIC LETTER HAH ISOLATED FORM;Lo;0;AL;<isolated> 062D;;;;N;GLYPH FOR ISOLATE ARABIC HAA;;;; -FEA2;ARABIC LETTER HAH FINAL FORM;Lo;0;AL;<final> 062D;;;;N;GLYPH FOR FINAL ARABIC HAA;;;; -FEA3;ARABIC LETTER HAH INITIAL FORM;Lo;0;AL;<initial> 062D;;;;N;GLYPH FOR INITIAL ARABIC HAA;;;; -FEA4;ARABIC LETTER HAH MEDIAL FORM;Lo;0;AL;<medial> 062D;;;;N;GLYPH FOR MEDIAL ARABIC HAA;;;; -FEA5;ARABIC LETTER KHAH ISOLATED FORM;Lo;0;AL;<isolated> 062E;;;;N;GLYPH FOR ISOLATE ARABIC KHAA;;;; -FEA6;ARABIC LETTER KHAH FINAL FORM;Lo;0;AL;<final> 062E;;;;N;GLYPH FOR FINAL ARABIC KHAA;;;; -FEA7;ARABIC LETTER KHAH INITIAL FORM;Lo;0;AL;<initial> 062E;;;;N;GLYPH FOR INITIAL ARABIC KHAA;;;; -FEA8;ARABIC LETTER KHAH MEDIAL FORM;Lo;0;AL;<medial> 062E;;;;N;GLYPH FOR MEDIAL ARABIC KHAA;;;; -FEA9;ARABIC LETTER DAL ISOLATED FORM;Lo;0;AL;<isolated> 062F;;;;N;GLYPH FOR ISOLATE ARABIC DAL;;;; -FEAA;ARABIC LETTER DAL FINAL FORM;Lo;0;AL;<final> 062F;;;;N;GLYPH FOR FINAL ARABIC DAL;;;; -FEAB;ARABIC LETTER THAL ISOLATED FORM;Lo;0;AL;<isolated> 0630;;;;N;GLYPH FOR ISOLATE ARABIC THAL;;;; -FEAC;ARABIC LETTER THAL FINAL FORM;Lo;0;AL;<final> 0630;;;;N;GLYPH FOR FINAL ARABIC THAL;;;; -FEAD;ARABIC LETTER REH ISOLATED FORM;Lo;0;AL;<isolated> 0631;;;;N;GLYPH FOR ISOLATE ARABIC RA;;;; -FEAE;ARABIC LETTER REH FINAL FORM;Lo;0;AL;<final> 0631;;;;N;GLYPH FOR FINAL ARABIC RA;;;; -FEAF;ARABIC LETTER ZAIN ISOLATED FORM;Lo;0;AL;<isolated> 0632;;;;N;GLYPH FOR ISOLATE ARABIC ZAIN;;;; -FEB0;ARABIC LETTER ZAIN FINAL FORM;Lo;0;AL;<final> 0632;;;;N;GLYPH FOR FINAL ARABIC ZAIN;;;; -FEB1;ARABIC LETTER SEEN ISOLATED FORM;Lo;0;AL;<isolated> 0633;;;;N;GLYPH FOR ISOLATE ARABIC SEEN;;;; -FEB2;ARABIC LETTER SEEN FINAL FORM;Lo;0;AL;<final> 0633;;;;N;GLYPH FOR FINAL ARABIC SEEN;;;; -FEB3;ARABIC LETTER SEEN INITIAL FORM;Lo;0;AL;<initial> 0633;;;;N;GLYPH FOR INITIAL ARABIC SEEN;;;; -FEB4;ARABIC LETTER SEEN MEDIAL FORM;Lo;0;AL;<medial> 0633;;;;N;GLYPH FOR MEDIAL ARABIC SEEN;;;; -FEB5;ARABIC LETTER SHEEN ISOLATED FORM;Lo;0;AL;<isolated> 0634;;;;N;GLYPH FOR ISOLATE ARABIC SHEEN;;;; -FEB6;ARABIC LETTER SHEEN FINAL FORM;Lo;0;AL;<final> 0634;;;;N;GLYPH FOR FINAL ARABIC SHEEN;;;; -FEB7;ARABIC LETTER SHEEN INITIAL FORM;Lo;0;AL;<initial> 0634;;;;N;GLYPH FOR INITIAL ARABIC SHEEN;;;; -FEB8;ARABIC LETTER SHEEN MEDIAL FORM;Lo;0;AL;<medial> 0634;;;;N;GLYPH FOR MEDIAL ARABIC SHEEN;;;; -FEB9;ARABIC LETTER SAD ISOLATED FORM;Lo;0;AL;<isolated> 0635;;;;N;GLYPH FOR ISOLATE ARABIC SAD;;;; -FEBA;ARABIC LETTER SAD FINAL FORM;Lo;0;AL;<final> 0635;;;;N;GLYPH FOR FINAL ARABIC SAD;;;; -FEBB;ARABIC LETTER SAD INITIAL FORM;Lo;0;AL;<initial> 0635;;;;N;GLYPH FOR INITIAL ARABIC SAD;;;; -FEBC;ARABIC LETTER SAD MEDIAL FORM;Lo;0;AL;<medial> 0635;;;;N;GLYPH FOR MEDIAL ARABIC SAD;;;; -FEBD;ARABIC LETTER DAD ISOLATED FORM;Lo;0;AL;<isolated> 0636;;;;N;GLYPH FOR ISOLATE ARABIC DAD;;;; -FEBE;ARABIC LETTER DAD FINAL FORM;Lo;0;AL;<final> 0636;;;;N;GLYPH FOR FINAL ARABIC DAD;;;; -FEBF;ARABIC LETTER DAD INITIAL FORM;Lo;0;AL;<initial> 0636;;;;N;GLYPH FOR INITIAL ARABIC DAD;;;; -FEC0;ARABIC LETTER DAD MEDIAL FORM;Lo;0;AL;<medial> 0636;;;;N;GLYPH FOR MEDIAL ARABIC DAD;;;; -FEC1;ARABIC LETTER TAH ISOLATED FORM;Lo;0;AL;<isolated> 0637;;;;N;GLYPH FOR ISOLATE ARABIC TAH;;;; -FEC2;ARABIC LETTER TAH FINAL FORM;Lo;0;AL;<final> 0637;;;;N;GLYPH FOR FINAL ARABIC TAH;;;; -FEC3;ARABIC LETTER TAH INITIAL FORM;Lo;0;AL;<initial> 0637;;;;N;GLYPH FOR INITIAL ARABIC TAH;;;; -FEC4;ARABIC LETTER TAH MEDIAL FORM;Lo;0;AL;<medial> 0637;;;;N;GLYPH FOR MEDIAL ARABIC TAH;;;; -FEC5;ARABIC LETTER ZAH ISOLATED FORM;Lo;0;AL;<isolated> 0638;;;;N;GLYPH FOR ISOLATE ARABIC DHAH;;;; -FEC6;ARABIC LETTER ZAH FINAL FORM;Lo;0;AL;<final> 0638;;;;N;GLYPH FOR FINAL ARABIC DHAH;;;; -FEC7;ARABIC LETTER ZAH INITIAL FORM;Lo;0;AL;<initial> 0638;;;;N;GLYPH FOR INITIAL ARABIC DHAH;;;; -FEC8;ARABIC LETTER ZAH MEDIAL FORM;Lo;0;AL;<medial> 0638;;;;N;GLYPH FOR MEDIAL ARABIC DHAH;;;; -FEC9;ARABIC LETTER AIN ISOLATED FORM;Lo;0;AL;<isolated> 0639;;;;N;GLYPH FOR ISOLATE ARABIC AIN;;;; -FECA;ARABIC LETTER AIN FINAL FORM;Lo;0;AL;<final> 0639;;;;N;GLYPH FOR FINAL ARABIC AIN;;;; -FECB;ARABIC LETTER AIN INITIAL FORM;Lo;0;AL;<initial> 0639;;;;N;GLYPH FOR INITIAL ARABIC AIN;;;; -FECC;ARABIC LETTER AIN MEDIAL FORM;Lo;0;AL;<medial> 0639;;;;N;GLYPH FOR MEDIAL ARABIC AIN;;;; -FECD;ARABIC LETTER GHAIN ISOLATED FORM;Lo;0;AL;<isolated> 063A;;;;N;GLYPH FOR ISOLATE ARABIC GHAIN;;;; -FECE;ARABIC LETTER GHAIN FINAL FORM;Lo;0;AL;<final> 063A;;;;N;GLYPH FOR FINAL ARABIC GHAIN;;;; -FECF;ARABIC LETTER GHAIN INITIAL FORM;Lo;0;AL;<initial> 063A;;;;N;GLYPH FOR INITIAL ARABIC GHAIN;;;; -FED0;ARABIC LETTER GHAIN MEDIAL FORM;Lo;0;AL;<medial> 063A;;;;N;GLYPH FOR MEDIAL ARABIC GHAIN;;;; -FED1;ARABIC LETTER FEH ISOLATED FORM;Lo;0;AL;<isolated> 0641;;;;N;GLYPH FOR ISOLATE ARABIC FA;;;; -FED2;ARABIC LETTER FEH FINAL FORM;Lo;0;AL;<final> 0641;;;;N;GLYPH FOR FINAL ARABIC FA;;;; -FED3;ARABIC LETTER FEH INITIAL FORM;Lo;0;AL;<initial> 0641;;;;N;GLYPH FOR INITIAL ARABIC FA;;;; -FED4;ARABIC LETTER FEH MEDIAL FORM;Lo;0;AL;<medial> 0641;;;;N;GLYPH FOR MEDIAL ARABIC FA;;;; -FED5;ARABIC LETTER QAF ISOLATED FORM;Lo;0;AL;<isolated> 0642;;;;N;GLYPH FOR ISOLATE ARABIC QAF;;;; -FED6;ARABIC LETTER QAF FINAL FORM;Lo;0;AL;<final> 0642;;;;N;GLYPH FOR FINAL ARABIC QAF;;;; -FED7;ARABIC LETTER QAF INITIAL FORM;Lo;0;AL;<initial> 0642;;;;N;GLYPH FOR INITIAL ARABIC QAF;;;; -FED8;ARABIC LETTER QAF MEDIAL FORM;Lo;0;AL;<medial> 0642;;;;N;GLYPH FOR MEDIAL ARABIC QAF;;;; -FED9;ARABIC LETTER KAF ISOLATED FORM;Lo;0;AL;<isolated> 0643;;;;N;GLYPH FOR ISOLATE ARABIC CAF;;;; -FEDA;ARABIC LETTER KAF FINAL FORM;Lo;0;AL;<final> 0643;;;;N;GLYPH FOR FINAL ARABIC CAF;;;; -FEDB;ARABIC LETTER KAF INITIAL FORM;Lo;0;AL;<initial> 0643;;;;N;GLYPH FOR INITIAL ARABIC CAF;;;; -FEDC;ARABIC LETTER KAF MEDIAL FORM;Lo;0;AL;<medial> 0643;;;;N;GLYPH FOR MEDIAL ARABIC CAF;;;; -FEDD;ARABIC LETTER LAM ISOLATED FORM;Lo;0;AL;<isolated> 0644;;;;N;GLYPH FOR ISOLATE ARABIC LAM;;;; -FEDE;ARABIC LETTER LAM FINAL FORM;Lo;0;AL;<final> 0644;;;;N;GLYPH FOR FINAL ARABIC LAM;;;; -FEDF;ARABIC LETTER LAM INITIAL FORM;Lo;0;AL;<initial> 0644;;;;N;GLYPH FOR INITIAL ARABIC LAM;;;; -FEE0;ARABIC LETTER LAM MEDIAL FORM;Lo;0;AL;<medial> 0644;;;;N;GLYPH FOR MEDIAL ARABIC LAM;;;; -FEE1;ARABIC LETTER MEEM ISOLATED FORM;Lo;0;AL;<isolated> 0645;;;;N;GLYPH FOR ISOLATE ARABIC MEEM;;;; -FEE2;ARABIC LETTER MEEM FINAL FORM;Lo;0;AL;<final> 0645;;;;N;GLYPH FOR FINAL ARABIC MEEM;;;; -FEE3;ARABIC LETTER MEEM INITIAL FORM;Lo;0;AL;<initial> 0645;;;;N;GLYPH FOR INITIAL ARABIC MEEM;;;; -FEE4;ARABIC LETTER MEEM MEDIAL FORM;Lo;0;AL;<medial> 0645;;;;N;GLYPH FOR MEDIAL ARABIC MEEM;;;; -FEE5;ARABIC LETTER NOON ISOLATED FORM;Lo;0;AL;<isolated> 0646;;;;N;GLYPH FOR ISOLATE ARABIC NOON;;;; -FEE6;ARABIC LETTER NOON FINAL FORM;Lo;0;AL;<final> 0646;;;;N;GLYPH FOR FINAL ARABIC NOON;;;; -FEE7;ARABIC LETTER NOON INITIAL FORM;Lo;0;AL;<initial> 0646;;;;N;GLYPH FOR INITIAL ARABIC NOON;;;; -FEE8;ARABIC LETTER NOON MEDIAL FORM;Lo;0;AL;<medial> 0646;;;;N;GLYPH FOR MEDIAL ARABIC NOON;;;; -FEE9;ARABIC LETTER HEH ISOLATED FORM;Lo;0;AL;<isolated> 0647;;;;N;GLYPH FOR ISOLATE ARABIC HA;;;; -FEEA;ARABIC LETTER HEH FINAL FORM;Lo;0;AL;<final> 0647;;;;N;GLYPH FOR FINAL ARABIC HA;;;; -FEEB;ARABIC LETTER HEH INITIAL FORM;Lo;0;AL;<initial> 0647;;;;N;GLYPH FOR INITIAL ARABIC HA;;;; -FEEC;ARABIC LETTER HEH MEDIAL FORM;Lo;0;AL;<medial> 0647;;;;N;GLYPH FOR MEDIAL ARABIC HA;;;; -FEED;ARABIC LETTER WAW ISOLATED FORM;Lo;0;AL;<isolated> 0648;;;;N;GLYPH FOR ISOLATE ARABIC WAW;;;; -FEEE;ARABIC LETTER WAW FINAL FORM;Lo;0;AL;<final> 0648;;;;N;GLYPH FOR FINAL ARABIC WAW;;;; -FEEF;ARABIC LETTER ALEF MAKSURA ISOLATED FORM;Lo;0;AL;<isolated> 0649;;;;N;GLYPH FOR ISOLATE ARABIC ALEF MAQSURAH;;;; -FEF0;ARABIC LETTER ALEF MAKSURA FINAL FORM;Lo;0;AL;<final> 0649;;;;N;GLYPH FOR FINAL ARABIC ALEF MAQSURAH;;;; -FEF1;ARABIC LETTER YEH ISOLATED FORM;Lo;0;AL;<isolated> 064A;;;;N;GLYPH FOR ISOLATE ARABIC YA;;;; -FEF2;ARABIC LETTER YEH FINAL FORM;Lo;0;AL;<final> 064A;;;;N;GLYPH FOR FINAL ARABIC YA;;;; -FEF3;ARABIC LETTER YEH INITIAL FORM;Lo;0;AL;<initial> 064A;;;;N;GLYPH FOR INITIAL ARABIC YA;;;; -FEF4;ARABIC LETTER YEH MEDIAL FORM;Lo;0;AL;<medial> 064A;;;;N;GLYPH FOR MEDIAL ARABIC YA;;;; -FEF5;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0644 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON LIGATURE LAM ALEF;;;; -FEF6;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;AL;<final> 0644 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON LIGATURE LAM ALEF;;;; -FEF7;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL;<isolated> 0644 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON LIGATURE LAM ALEF;;;; -FEF8;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;AL;<final> 0644 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON LIGATURE LAM ALEF;;;; -FEF9;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;AL;<isolated> 0644 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;; -FEFA;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;AL;<final> 0644 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;; -FEFB;ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM;Lo;0;AL;<isolated> 0644 0627;;;;N;GLYPH FOR ISOLATE ARABIC LIGATURE LAM ALEF;;;; -FEFC;ARABIC LIGATURE LAM WITH ALEF FINAL FORM;Lo;0;AL;<final> 0644 0627;;;;N;GLYPH FOR FINAL ARABIC LIGATURE LAM ALEF;;;; -FEFF;ZERO WIDTH NO-BREAK SPACE;Cf;0;BN;;;;;N;BYTE ORDER MARK;;;; -FF01;FULLWIDTH EXCLAMATION MARK;Po;0;ON;<wide> 0021;;;;N;;;;; -FF02;FULLWIDTH QUOTATION MARK;Po;0;ON;<wide> 0022;;;;N;;;;; -FF03;FULLWIDTH NUMBER SIGN;Po;0;ET;<wide> 0023;;;;N;;;;; -FF04;FULLWIDTH DOLLAR SIGN;Sc;0;ET;<wide> 0024;;;;N;;;;; -FF05;FULLWIDTH PERCENT SIGN;Po;0;ET;<wide> 0025;;;;N;;;;; -FF06;FULLWIDTH AMPERSAND;Po;0;ON;<wide> 0026;;;;N;;;;; -FF07;FULLWIDTH APOSTROPHE;Po;0;ON;<wide> 0027;;;;N;;;;; -FF08;FULLWIDTH LEFT PARENTHESIS;Ps;0;ON;<wide> 0028;;;;N;FULLWIDTH OPENING PARENTHESIS;;;; -FF09;FULLWIDTH RIGHT PARENTHESIS;Pe;0;ON;<wide> 0029;;;;N;FULLWIDTH CLOSING PARENTHESIS;;;; -FF0A;FULLWIDTH ASTERISK;Po;0;ON;<wide> 002A;;;;N;;;;; -FF0B;FULLWIDTH PLUS SIGN;Sm;0;ET;<wide> 002B;;;;N;;;;; -FF0C;FULLWIDTH COMMA;Po;0;CS;<wide> 002C;;;;N;;;;; -FF0D;FULLWIDTH HYPHEN-MINUS;Pd;0;ET;<wide> 002D;;;;N;;;;; -FF0E;FULLWIDTH FULL STOP;Po;0;CS;<wide> 002E;;;;N;FULLWIDTH PERIOD;;;; -FF0F;FULLWIDTH SOLIDUS;Po;0;ES;<wide> 002F;;;;N;FULLWIDTH SLASH;;;; -FF10;FULLWIDTH DIGIT ZERO;Nd;0;EN;<wide> 0030;0;0;0;N;;;;; -FF11;FULLWIDTH DIGIT ONE;Nd;0;EN;<wide> 0031;1;1;1;N;;;;; -FF12;FULLWIDTH DIGIT TWO;Nd;0;EN;<wide> 0032;2;2;2;N;;;;; -FF13;FULLWIDTH DIGIT THREE;Nd;0;EN;<wide> 0033;3;3;3;N;;;;; -FF14;FULLWIDTH DIGIT FOUR;Nd;0;EN;<wide> 0034;4;4;4;N;;;;; -FF15;FULLWIDTH DIGIT FIVE;Nd;0;EN;<wide> 0035;5;5;5;N;;;;; -FF16;FULLWIDTH DIGIT SIX;Nd;0;EN;<wide> 0036;6;6;6;N;;;;; -FF17;FULLWIDTH DIGIT SEVEN;Nd;0;EN;<wide> 0037;7;7;7;N;;;;; -FF18;FULLWIDTH DIGIT EIGHT;Nd;0;EN;<wide> 0038;8;8;8;N;;;;; -FF19;FULLWIDTH DIGIT NINE;Nd;0;EN;<wide> 0039;9;9;9;N;;;;; -FF1A;FULLWIDTH COLON;Po;0;CS;<wide> 003A;;;;N;;;;; -FF1B;FULLWIDTH SEMICOLON;Po;0;ON;<wide> 003B;;;;N;;;;; -FF1C;FULLWIDTH LESS-THAN SIGN;Sm;0;ON;<wide> 003C;;;;N;;;;; -FF1D;FULLWIDTH EQUALS SIGN;Sm;0;ON;<wide> 003D;;;;N;;;;; -FF1E;FULLWIDTH GREATER-THAN SIGN;Sm;0;ON;<wide> 003E;;;;N;;;;; -FF1F;FULLWIDTH QUESTION MARK;Po;0;ON;<wide> 003F;;;;N;;;;; -FF20;FULLWIDTH COMMERCIAL AT;Po;0;ON;<wide> 0040;;;;N;;;;; -FF21;FULLWIDTH LATIN CAPITAL LETTER A;Lu;0;L;<wide> 0041;;;;N;;;;FF41; -FF22;FULLWIDTH LATIN CAPITAL LETTER B;Lu;0;L;<wide> 0042;;;;N;;;;FF42; -FF23;FULLWIDTH LATIN CAPITAL LETTER C;Lu;0;L;<wide> 0043;;;;N;;;;FF43; -FF24;FULLWIDTH LATIN CAPITAL LETTER D;Lu;0;L;<wide> 0044;;;;N;;;;FF44; -FF25;FULLWIDTH LATIN CAPITAL LETTER E;Lu;0;L;<wide> 0045;;;;N;;;;FF45; -FF26;FULLWIDTH LATIN CAPITAL LETTER F;Lu;0;L;<wide> 0046;;;;N;;;;FF46; -FF27;FULLWIDTH LATIN CAPITAL LETTER G;Lu;0;L;<wide> 0047;;;;N;;;;FF47; -FF28;FULLWIDTH LATIN CAPITAL LETTER H;Lu;0;L;<wide> 0048;;;;N;;;;FF48; -FF29;FULLWIDTH LATIN CAPITAL LETTER I;Lu;0;L;<wide> 0049;;;;N;;;;FF49; -FF2A;FULLWIDTH LATIN CAPITAL LETTER J;Lu;0;L;<wide> 004A;;;;N;;;;FF4A; -FF2B;FULLWIDTH LATIN CAPITAL LETTER K;Lu;0;L;<wide> 004B;;;;N;;;;FF4B; -FF2C;FULLWIDTH LATIN CAPITAL LETTER L;Lu;0;L;<wide> 004C;;;;N;;;;FF4C; -FF2D;FULLWIDTH LATIN CAPITAL LETTER M;Lu;0;L;<wide> 004D;;;;N;;;;FF4D; -FF2E;FULLWIDTH LATIN CAPITAL LETTER N;Lu;0;L;<wide> 004E;;;;N;;;;FF4E; -FF2F;FULLWIDTH LATIN CAPITAL LETTER O;Lu;0;L;<wide> 004F;;;;N;;;;FF4F; -FF30;FULLWIDTH LATIN CAPITAL LETTER P;Lu;0;L;<wide> 0050;;;;N;;;;FF50; -FF31;FULLWIDTH LATIN CAPITAL LETTER Q;Lu;0;L;<wide> 0051;;;;N;;;;FF51; -FF32;FULLWIDTH LATIN CAPITAL LETTER R;Lu;0;L;<wide> 0052;;;;N;;;;FF52; -FF33;FULLWIDTH LATIN CAPITAL LETTER S;Lu;0;L;<wide> 0053;;;;N;;;;FF53; -FF34;FULLWIDTH LATIN CAPITAL LETTER T;Lu;0;L;<wide> 0054;;;;N;;;;FF54; -FF35;FULLWIDTH LATIN CAPITAL LETTER U;Lu;0;L;<wide> 0055;;;;N;;;;FF55; -FF36;FULLWIDTH LATIN CAPITAL LETTER V;Lu;0;L;<wide> 0056;;;;N;;;;FF56; -FF37;FULLWIDTH LATIN CAPITAL LETTER W;Lu;0;L;<wide> 0057;;;;N;;;;FF57; -FF38;FULLWIDTH LATIN CAPITAL LETTER X;Lu;0;L;<wide> 0058;;;;N;;;;FF58; -FF39;FULLWIDTH LATIN CAPITAL LETTER Y;Lu;0;L;<wide> 0059;;;;N;;;;FF59; -FF3A;FULLWIDTH LATIN CAPITAL LETTER Z;Lu;0;L;<wide> 005A;;;;N;;;;FF5A; -FF3B;FULLWIDTH LEFT SQUARE BRACKET;Ps;0;ON;<wide> 005B;;;;N;FULLWIDTH OPENING SQUARE BRACKET;;;; -FF3C;FULLWIDTH REVERSE SOLIDUS;Po;0;ON;<wide> 005C;;;;N;FULLWIDTH BACKSLASH;;;; -FF3D;FULLWIDTH RIGHT SQUARE BRACKET;Pe;0;ON;<wide> 005D;;;;N;FULLWIDTH CLOSING SQUARE BRACKET;;;; -FF3E;FULLWIDTH CIRCUMFLEX ACCENT;Sk;0;ON;<wide> 005E;;;;N;FULLWIDTH SPACING CIRCUMFLEX;;;; -FF3F;FULLWIDTH LOW LINE;Pc;0;ON;<wide> 005F;;;;N;FULLWIDTH SPACING UNDERSCORE;;;; -FF40;FULLWIDTH GRAVE ACCENT;Sk;0;ON;<wide> 0060;;;;N;FULLWIDTH SPACING GRAVE;;;; -FF41;FULLWIDTH LATIN SMALL LETTER A;Ll;0;L;<wide> 0061;;;;N;;;FF21;;FF21 -FF42;FULLWIDTH LATIN SMALL LETTER B;Ll;0;L;<wide> 0062;;;;N;;;FF22;;FF22 -FF43;FULLWIDTH LATIN SMALL LETTER C;Ll;0;L;<wide> 0063;;;;N;;;FF23;;FF23 -FF44;FULLWIDTH LATIN SMALL LETTER D;Ll;0;L;<wide> 0064;;;;N;;;FF24;;FF24 -FF45;FULLWIDTH LATIN SMALL LETTER E;Ll;0;L;<wide> 0065;;;;N;;;FF25;;FF25 -FF46;FULLWIDTH LATIN SMALL LETTER F;Ll;0;L;<wide> 0066;;;;N;;;FF26;;FF26 -FF47;FULLWIDTH LATIN SMALL LETTER G;Ll;0;L;<wide> 0067;;;;N;;;FF27;;FF27 -FF48;FULLWIDTH LATIN SMALL LETTER H;Ll;0;L;<wide> 0068;;;;N;;;FF28;;FF28 -FF49;FULLWIDTH LATIN SMALL LETTER I;Ll;0;L;<wide> 0069;;;;N;;;FF29;;FF29 -FF4A;FULLWIDTH LATIN SMALL LETTER J;Ll;0;L;<wide> 006A;;;;N;;;FF2A;;FF2A -FF4B;FULLWIDTH LATIN SMALL LETTER K;Ll;0;L;<wide> 006B;;;;N;;;FF2B;;FF2B -FF4C;FULLWIDTH LATIN SMALL LETTER L;Ll;0;L;<wide> 006C;;;;N;;;FF2C;;FF2C -FF4D;FULLWIDTH LATIN SMALL LETTER M;Ll;0;L;<wide> 006D;;;;N;;;FF2D;;FF2D -FF4E;FULLWIDTH LATIN SMALL LETTER N;Ll;0;L;<wide> 006E;;;;N;;;FF2E;;FF2E -FF4F;FULLWIDTH LATIN SMALL LETTER O;Ll;0;L;<wide> 006F;;;;N;;;FF2F;;FF2F -FF50;FULLWIDTH LATIN SMALL LETTER P;Ll;0;L;<wide> 0070;;;;N;;;FF30;;FF30 -FF51;FULLWIDTH LATIN SMALL LETTER Q;Ll;0;L;<wide> 0071;;;;N;;;FF31;;FF31 -FF52;FULLWIDTH LATIN SMALL LETTER R;Ll;0;L;<wide> 0072;;;;N;;;FF32;;FF32 -FF53;FULLWIDTH LATIN SMALL LETTER S;Ll;0;L;<wide> 0073;;;;N;;;FF33;;FF33 -FF54;FULLWIDTH LATIN SMALL LETTER T;Ll;0;L;<wide> 0074;;;;N;;;FF34;;FF34 -FF55;FULLWIDTH LATIN SMALL LETTER U;Ll;0;L;<wide> 0075;;;;N;;;FF35;;FF35 -FF56;FULLWIDTH LATIN SMALL LETTER V;Ll;0;L;<wide> 0076;;;;N;;;FF36;;FF36 -FF57;FULLWIDTH LATIN SMALL LETTER W;Ll;0;L;<wide> 0077;;;;N;;;FF37;;FF37 -FF58;FULLWIDTH LATIN SMALL LETTER X;Ll;0;L;<wide> 0078;;;;N;;;FF38;;FF38 -FF59;FULLWIDTH LATIN SMALL LETTER Y;Ll;0;L;<wide> 0079;;;;N;;;FF39;;FF39 -FF5A;FULLWIDTH LATIN SMALL LETTER Z;Ll;0;L;<wide> 007A;;;;N;;;FF3A;;FF3A -FF5B;FULLWIDTH LEFT CURLY BRACKET;Ps;0;ON;<wide> 007B;;;;N;FULLWIDTH OPENING CURLY BRACKET;;;; -FF5C;FULLWIDTH VERTICAL LINE;Sm;0;ON;<wide> 007C;;;;N;FULLWIDTH VERTICAL BAR;;;; -FF5D;FULLWIDTH RIGHT CURLY BRACKET;Pe;0;ON;<wide> 007D;;;;N;FULLWIDTH CLOSING CURLY BRACKET;;;; -FF5E;FULLWIDTH TILDE;Sm;0;ON;<wide> 007E;;;;N;FULLWIDTH SPACING TILDE;;;; -FF61;HALFWIDTH IDEOGRAPHIC FULL STOP;Po;0;ON;<narrow> 3002;;;;N;HALFWIDTH IDEOGRAPHIC PERIOD;;;; -FF62;HALFWIDTH LEFT CORNER BRACKET;Ps;0;ON;<narrow> 300C;;;;N;HALFWIDTH OPENING CORNER BRACKET;;;; -FF63;HALFWIDTH RIGHT CORNER BRACKET;Pe;0;ON;<narrow> 300D;;;;N;HALFWIDTH CLOSING CORNER BRACKET;;;; -FF64;HALFWIDTH IDEOGRAPHIC COMMA;Po;0;ON;<narrow> 3001;;;;N;;;;; -FF65;HALFWIDTH KATAKANA MIDDLE DOT;Pc;0;ON;<narrow> 30FB;;;;N;;;;; -FF66;HALFWIDTH KATAKANA LETTER WO;Lo;0;L;<narrow> 30F2;;;;N;;;;; -FF67;HALFWIDTH KATAKANA LETTER SMALL A;Lo;0;L;<narrow> 30A1;;;;N;;;;; -FF68;HALFWIDTH KATAKANA LETTER SMALL I;Lo;0;L;<narrow> 30A3;;;;N;;;;; -FF69;HALFWIDTH KATAKANA LETTER SMALL U;Lo;0;L;<narrow> 30A5;;;;N;;;;; -FF6A;HALFWIDTH KATAKANA LETTER SMALL E;Lo;0;L;<narrow> 30A7;;;;N;;;;; -FF6B;HALFWIDTH KATAKANA LETTER SMALL O;Lo;0;L;<narrow> 30A9;;;;N;;;;; -FF6C;HALFWIDTH KATAKANA LETTER SMALL YA;Lo;0;L;<narrow> 30E3;;;;N;;;;; -FF6D;HALFWIDTH KATAKANA LETTER SMALL YU;Lo;0;L;<narrow> 30E5;;;;N;;;;; -FF6E;HALFWIDTH KATAKANA LETTER SMALL YO;Lo;0;L;<narrow> 30E7;;;;N;;;;; -FF6F;HALFWIDTH KATAKANA LETTER SMALL TU;Lo;0;L;<narrow> 30C3;;;;N;;;;; -FF70;HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L;<narrow> 30FC;;;;N;;;;; -FF71;HALFWIDTH KATAKANA LETTER A;Lo;0;L;<narrow> 30A2;;;;N;;;;; -FF72;HALFWIDTH KATAKANA LETTER I;Lo;0;L;<narrow> 30A4;;;;N;;;;; -FF73;HALFWIDTH KATAKANA LETTER U;Lo;0;L;<narrow> 30A6;;;;N;;;;; -FF74;HALFWIDTH KATAKANA LETTER E;Lo;0;L;<narrow> 30A8;;;;N;;;;; -FF75;HALFWIDTH KATAKANA LETTER O;Lo;0;L;<narrow> 30AA;;;;N;;;;; -FF76;HALFWIDTH KATAKANA LETTER KA;Lo;0;L;<narrow> 30AB;;;;N;;;;; -FF77;HALFWIDTH KATAKANA LETTER KI;Lo;0;L;<narrow> 30AD;;;;N;;;;; -FF78;HALFWIDTH KATAKANA LETTER KU;Lo;0;L;<narrow> 30AF;;;;N;;;;; -FF79;HALFWIDTH KATAKANA LETTER KE;Lo;0;L;<narrow> 30B1;;;;N;;;;; -FF7A;HALFWIDTH KATAKANA LETTER KO;Lo;0;L;<narrow> 30B3;;;;N;;;;; -FF7B;HALFWIDTH KATAKANA LETTER SA;Lo;0;L;<narrow> 30B5;;;;N;;;;; -FF7C;HALFWIDTH KATAKANA LETTER SI;Lo;0;L;<narrow> 30B7;;;;N;;;;; -FF7D;HALFWIDTH KATAKANA LETTER SU;Lo;0;L;<narrow> 30B9;;;;N;;;;; -FF7E;HALFWIDTH KATAKANA LETTER SE;Lo;0;L;<narrow> 30BB;;;;N;;;;; -FF7F;HALFWIDTH KATAKANA LETTER SO;Lo;0;L;<narrow> 30BD;;;;N;;;;; -FF80;HALFWIDTH KATAKANA LETTER TA;Lo;0;L;<narrow> 30BF;;;;N;;;;; -FF81;HALFWIDTH KATAKANA LETTER TI;Lo;0;L;<narrow> 30C1;;;;N;;;;; -FF82;HALFWIDTH KATAKANA LETTER TU;Lo;0;L;<narrow> 30C4;;;;N;;;;; -FF83;HALFWIDTH KATAKANA LETTER TE;Lo;0;L;<narrow> 30C6;;;;N;;;;; -FF84;HALFWIDTH KATAKANA LETTER TO;Lo;0;L;<narrow> 30C8;;;;N;;;;; -FF85;HALFWIDTH KATAKANA LETTER NA;Lo;0;L;<narrow> 30CA;;;;N;;;;; -FF86;HALFWIDTH KATAKANA LETTER NI;Lo;0;L;<narrow> 30CB;;;;N;;;;; -FF87;HALFWIDTH KATAKANA LETTER NU;Lo;0;L;<narrow> 30CC;;;;N;;;;; -FF88;HALFWIDTH KATAKANA LETTER NE;Lo;0;L;<narrow> 30CD;;;;N;;;;; -FF89;HALFWIDTH KATAKANA LETTER NO;Lo;0;L;<narrow> 30CE;;;;N;;;;; -FF8A;HALFWIDTH KATAKANA LETTER HA;Lo;0;L;<narrow> 30CF;;;;N;;;;; -FF8B;HALFWIDTH KATAKANA LETTER HI;Lo;0;L;<narrow> 30D2;;;;N;;;;; -FF8C;HALFWIDTH KATAKANA LETTER HU;Lo;0;L;<narrow> 30D5;;;;N;;;;; -FF8D;HALFWIDTH KATAKANA LETTER HE;Lo;0;L;<narrow> 30D8;;;;N;;;;; -FF8E;HALFWIDTH KATAKANA LETTER HO;Lo;0;L;<narrow> 30DB;;;;N;;;;; -FF8F;HALFWIDTH KATAKANA LETTER MA;Lo;0;L;<narrow> 30DE;;;;N;;;;; -FF90;HALFWIDTH KATAKANA LETTER MI;Lo;0;L;<narrow> 30DF;;;;N;;;;; -FF91;HALFWIDTH KATAKANA LETTER MU;Lo;0;L;<narrow> 30E0;;;;N;;;;; -FF92;HALFWIDTH KATAKANA LETTER ME;Lo;0;L;<narrow> 30E1;;;;N;;;;; -FF93;HALFWIDTH KATAKANA LETTER MO;Lo;0;L;<narrow> 30E2;;;;N;;;;; -FF94;HALFWIDTH KATAKANA LETTER YA;Lo;0;L;<narrow> 30E4;;;;N;;;;; -FF95;HALFWIDTH KATAKANA LETTER YU;Lo;0;L;<narrow> 30E6;;;;N;;;;; -FF96;HALFWIDTH KATAKANA LETTER YO;Lo;0;L;<narrow> 30E8;;;;N;;;;; -FF97;HALFWIDTH KATAKANA LETTER RA;Lo;0;L;<narrow> 30E9;;;;N;;;;; -FF98;HALFWIDTH KATAKANA LETTER RI;Lo;0;L;<narrow> 30EA;;;;N;;;;; -FF99;HALFWIDTH KATAKANA LETTER RU;Lo;0;L;<narrow> 30EB;;;;N;;;;; -FF9A;HALFWIDTH KATAKANA LETTER RE;Lo;0;L;<narrow> 30EC;;;;N;;;;; -FF9B;HALFWIDTH KATAKANA LETTER RO;Lo;0;L;<narrow> 30ED;;;;N;;;;; -FF9C;HALFWIDTH KATAKANA LETTER WA;Lo;0;L;<narrow> 30EF;;;;N;;;;; -FF9D;HALFWIDTH KATAKANA LETTER N;Lo;0;L;<narrow> 30F3;;;;N;;;;; -FF9E;HALFWIDTH KATAKANA VOICED SOUND MARK;Lm;0;L;<narrow> 3099;;;;N;;halfwidth katakana-hiragana voiced sound mark;;; -FF9F;HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK;Lm;0;L;<narrow> 309A;;;;N;;halfwidth katakana-hiragana semi-voiced sound mark;;; -FFA0;HALFWIDTH HANGUL FILLER;Lo;0;L;<narrow> 3164;;;;N;HALFWIDTH HANGUL CAE OM;;;; -FFA1;HALFWIDTH HANGUL LETTER KIYEOK;Lo;0;L;<narrow> 3131;;;;N;HALFWIDTH HANGUL LETTER GIYEOG;;;; -FFA2;HALFWIDTH HANGUL LETTER SSANGKIYEOK;Lo;0;L;<narrow> 3132;;;;N;HALFWIDTH HANGUL LETTER SSANG GIYEOG;;;; -FFA3;HALFWIDTH HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<narrow> 3133;;;;N;HALFWIDTH HANGUL LETTER GIYEOG SIOS;;;; -FFA4;HALFWIDTH HANGUL LETTER NIEUN;Lo;0;L;<narrow> 3134;;;;N;;;;; -FFA5;HALFWIDTH HANGUL LETTER NIEUN-CIEUC;Lo;0;L;<narrow> 3135;;;;N;HALFWIDTH HANGUL LETTER NIEUN JIEUJ;;;; -FFA6;HALFWIDTH HANGUL LETTER NIEUN-HIEUH;Lo;0;L;<narrow> 3136;;;;N;HALFWIDTH HANGUL LETTER NIEUN HIEUH;;;; -FFA7;HALFWIDTH HANGUL LETTER TIKEUT;Lo;0;L;<narrow> 3137;;;;N;HALFWIDTH HANGUL LETTER DIGEUD;;;; -FFA8;HALFWIDTH HANGUL LETTER SSANGTIKEUT;Lo;0;L;<narrow> 3138;;;;N;HALFWIDTH HANGUL LETTER SSANG DIGEUD;;;; -FFA9;HALFWIDTH HANGUL LETTER RIEUL;Lo;0;L;<narrow> 3139;;;;N;HALFWIDTH HANGUL LETTER LIEUL;;;; -FFAA;HALFWIDTH HANGUL LETTER RIEUL-KIYEOK;Lo;0;L;<narrow> 313A;;;;N;HALFWIDTH HANGUL LETTER LIEUL GIYEOG;;;; -FFAB;HALFWIDTH HANGUL LETTER RIEUL-MIEUM;Lo;0;L;<narrow> 313B;;;;N;HALFWIDTH HANGUL LETTER LIEUL MIEUM;;;; -FFAC;HALFWIDTH HANGUL LETTER RIEUL-PIEUP;Lo;0;L;<narrow> 313C;;;;N;HALFWIDTH HANGUL LETTER LIEUL BIEUB;;;; -FFAD;HALFWIDTH HANGUL LETTER RIEUL-SIOS;Lo;0;L;<narrow> 313D;;;;N;HALFWIDTH HANGUL LETTER LIEUL SIOS;;;; -FFAE;HALFWIDTH HANGUL LETTER RIEUL-THIEUTH;Lo;0;L;<narrow> 313E;;;;N;HALFWIDTH HANGUL LETTER LIEUL TIEUT;;;; -FFAF;HALFWIDTH HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L;<narrow> 313F;;;;N;HALFWIDTH HANGUL LETTER LIEUL PIEUP;;;; -FFB0;HALFWIDTH HANGUL LETTER RIEUL-HIEUH;Lo;0;L;<narrow> 3140;;;;N;HALFWIDTH HANGUL LETTER LIEUL HIEUH;;;; -FFB1;HALFWIDTH HANGUL LETTER MIEUM;Lo;0;L;<narrow> 3141;;;;N;;;;; -FFB2;HALFWIDTH HANGUL LETTER PIEUP;Lo;0;L;<narrow> 3142;;;;N;HALFWIDTH HANGUL LETTER BIEUB;;;; -FFB3;HALFWIDTH HANGUL LETTER SSANGPIEUP;Lo;0;L;<narrow> 3143;;;;N;HALFWIDTH HANGUL LETTER SSANG BIEUB;;;; -FFB4;HALFWIDTH HANGUL LETTER PIEUP-SIOS;Lo;0;L;<narrow> 3144;;;;N;HALFWIDTH HANGUL LETTER BIEUB SIOS;;;; -FFB5;HALFWIDTH HANGUL LETTER SIOS;Lo;0;L;<narrow> 3145;;;;N;;;;; -FFB6;HALFWIDTH HANGUL LETTER SSANGSIOS;Lo;0;L;<narrow> 3146;;;;N;HALFWIDTH HANGUL LETTER SSANG SIOS;;;; -FFB7;HALFWIDTH HANGUL LETTER IEUNG;Lo;0;L;<narrow> 3147;;;;N;;;;; -FFB8;HALFWIDTH HANGUL LETTER CIEUC;Lo;0;L;<narrow> 3148;;;;N;HALFWIDTH HANGUL LETTER JIEUJ;;;; -FFB9;HALFWIDTH HANGUL LETTER SSANGCIEUC;Lo;0;L;<narrow> 3149;;;;N;HALFWIDTH HANGUL LETTER SSANG JIEUJ;;;; -FFBA;HALFWIDTH HANGUL LETTER CHIEUCH;Lo;0;L;<narrow> 314A;;;;N;HALFWIDTH HANGUL LETTER CIEUC;;;; -FFBB;HALFWIDTH HANGUL LETTER KHIEUKH;Lo;0;L;<narrow> 314B;;;;N;HALFWIDTH HANGUL LETTER KIYEOK;;;; -FFBC;HALFWIDTH HANGUL LETTER THIEUTH;Lo;0;L;<narrow> 314C;;;;N;HALFWIDTH HANGUL LETTER TIEUT;;;; -FFBD;HALFWIDTH HANGUL LETTER PHIEUPH;Lo;0;L;<narrow> 314D;;;;N;HALFWIDTH HANGUL LETTER PIEUP;;;; -FFBE;HALFWIDTH HANGUL LETTER HIEUH;Lo;0;L;<narrow> 314E;;;;N;;;;; -FFC2;HALFWIDTH HANGUL LETTER A;Lo;0;L;<narrow> 314F;;;;N;;;;; -FFC3;HALFWIDTH HANGUL LETTER AE;Lo;0;L;<narrow> 3150;;;;N;;;;; -FFC4;HALFWIDTH HANGUL LETTER YA;Lo;0;L;<narrow> 3151;;;;N;;;;; -FFC5;HALFWIDTH HANGUL LETTER YAE;Lo;0;L;<narrow> 3152;;;;N;;;;; -FFC6;HALFWIDTH HANGUL LETTER EO;Lo;0;L;<narrow> 3153;;;;N;;;;; -FFC7;HALFWIDTH HANGUL LETTER E;Lo;0;L;<narrow> 3154;;;;N;;;;; -FFCA;HALFWIDTH HANGUL LETTER YEO;Lo;0;L;<narrow> 3155;;;;N;;;;; -FFCB;HALFWIDTH HANGUL LETTER YE;Lo;0;L;<narrow> 3156;;;;N;;;;; -FFCC;HALFWIDTH HANGUL LETTER O;Lo;0;L;<narrow> 3157;;;;N;;;;; -FFCD;HALFWIDTH HANGUL LETTER WA;Lo;0;L;<narrow> 3158;;;;N;;;;; -FFCE;HALFWIDTH HANGUL LETTER WAE;Lo;0;L;<narrow> 3159;;;;N;;;;; -FFCF;HALFWIDTH HANGUL LETTER OE;Lo;0;L;<narrow> 315A;;;;N;;;;; -FFD2;HALFWIDTH HANGUL LETTER YO;Lo;0;L;<narrow> 315B;;;;N;;;;; -FFD3;HALFWIDTH HANGUL LETTER U;Lo;0;L;<narrow> 315C;;;;N;;;;; -FFD4;HALFWIDTH HANGUL LETTER WEO;Lo;0;L;<narrow> 315D;;;;N;;;;; -FFD5;HALFWIDTH HANGUL LETTER WE;Lo;0;L;<narrow> 315E;;;;N;;;;; -FFD6;HALFWIDTH HANGUL LETTER WI;Lo;0;L;<narrow> 315F;;;;N;;;;; -FFD7;HALFWIDTH HANGUL LETTER YU;Lo;0;L;<narrow> 3160;;;;N;;;;; -FFDA;HALFWIDTH HANGUL LETTER EU;Lo;0;L;<narrow> 3161;;;;N;;;;; -FFDB;HALFWIDTH HANGUL LETTER YI;Lo;0;L;<narrow> 3162;;;;N;;;;; -FFDC;HALFWIDTH HANGUL LETTER I;Lo;0;L;<narrow> 3163;;;;N;;;;; -FFE0;FULLWIDTH CENT SIGN;Sc;0;ET;<wide> 00A2;;;;N;;;;; -FFE1;FULLWIDTH POUND SIGN;Sc;0;ET;<wide> 00A3;;;;N;;;;; -FFE2;FULLWIDTH NOT SIGN;Sm;0;ON;<wide> 00AC;;;;N;;;;; -FFE3;FULLWIDTH MACRON;Sk;0;ON;<wide> 00AF;;;;N;FULLWIDTH SPACING MACRON;*;;; -FFE4;FULLWIDTH BROKEN BAR;So;0;ON;<wide> 00A6;;;;N;FULLWIDTH BROKEN VERTICAL BAR;;;; -FFE5;FULLWIDTH YEN SIGN;Sc;0;ET;<wide> 00A5;;;;N;;;;; -FFE6;FULLWIDTH WON SIGN;Sc;0;ET;<wide> 20A9;;;;N;;;;; -FFE8;HALFWIDTH FORMS LIGHT VERTICAL;So;0;ON;<narrow> 2502;;;;N;;;;; -FFE9;HALFWIDTH LEFTWARDS ARROW;Sm;0;ON;<narrow> 2190;;;;N;;;;; -FFEA;HALFWIDTH UPWARDS ARROW;Sm;0;ON;<narrow> 2191;;;;N;;;;; -FFEB;HALFWIDTH RIGHTWARDS ARROW;Sm;0;ON;<narrow> 2192;;;;N;;;;; -FFEC;HALFWIDTH DOWNWARDS ARROW;Sm;0;ON;<narrow> 2193;;;;N;;;;; -FFED;HALFWIDTH BLACK SQUARE;So;0;ON;<narrow> 25A0;;;;N;;;;; -FFEE;HALFWIDTH WHITE CIRCLE;So;0;ON;<narrow> 25CB;;;;N;;;;; -FFF9;INTERLINEAR ANNOTATION ANCHOR;Cf;0;BN;;;;;N;;;;; -FFFA;INTERLINEAR ANNOTATION SEPARATOR;Cf;0;BN;;;;;N;;;;; -FFFB;INTERLINEAR ANNOTATION TERMINATOR;Cf;0;BN;;;;;N;;;;; -FFFC;OBJECT REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; -FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; -10300;OLD ITALIC LETTER A;Lo;0;L;;;;;N;;;;; -10301;OLD ITALIC LETTER BE;Lo;0;L;;;;;N;;;;; -10302;OLD ITALIC LETTER KE;Lo;0;L;;;;;N;;;;; -10303;OLD ITALIC LETTER DE;Lo;0;L;;;;;N;;;;; -10304;OLD ITALIC LETTER E;Lo;0;L;;;;;N;;;;; -10305;OLD ITALIC LETTER VE;Lo;0;L;;;;;N;;;;; -10306;OLD ITALIC LETTER ZE;Lo;0;L;;;;;N;;;;; -10307;OLD ITALIC LETTER HE;Lo;0;L;;;;;N;;;;; -10308;OLD ITALIC LETTER THE;Lo;0;L;;;;;N;;;;; -10309;OLD ITALIC LETTER I;Lo;0;L;;;;;N;;;;; -1030A;OLD ITALIC LETTER KA;Lo;0;L;;;;;N;;;;; -1030B;OLD ITALIC LETTER EL;Lo;0;L;;;;;N;;;;; -1030C;OLD ITALIC LETTER EM;Lo;0;L;;;;;N;;;;; -1030D;OLD ITALIC LETTER EN;Lo;0;L;;;;;N;;;;; -1030E;OLD ITALIC LETTER ESH;Lo;0;L;;;;;N;;;;; -1030F;OLD ITALIC LETTER O;Lo;0;L;;;;;N;;Faliscan;;; -10310;OLD ITALIC LETTER PE;Lo;0;L;;;;;N;;;;; -10311;OLD ITALIC LETTER SHE;Lo;0;L;;;;;N;;;;; -10312;OLD ITALIC LETTER KU;Lo;0;L;;;;;N;;;;; -10313;OLD ITALIC LETTER ER;Lo;0;L;;;;;N;;;;; -10314;OLD ITALIC LETTER ES;Lo;0;L;;;;;N;;;;; -10315;OLD ITALIC LETTER TE;Lo;0;L;;;;;N;;;;; -10316;OLD ITALIC LETTER U;Lo;0;L;;;;;N;;;;; -10317;OLD ITALIC LETTER EKS;Lo;0;L;;;;;N;;Faliscan;;; -10318;OLD ITALIC LETTER PHE;Lo;0;L;;;;;N;;;;; -10319;OLD ITALIC LETTER KHE;Lo;0;L;;;;;N;;;;; -1031A;OLD ITALIC LETTER EF;Lo;0;L;;;;;N;;;;; -1031B;OLD ITALIC LETTER ERS;Lo;0;L;;;;;N;;Umbrian;;; -1031C;OLD ITALIC LETTER CHE;Lo;0;L;;;;;N;;Umbrian;;; -1031D;OLD ITALIC LETTER II;Lo;0;L;;;;;N;;Oscan;;; -1031E;OLD ITALIC LETTER UU;Lo;0;L;;;;;N;;Oscan;;; -10320;OLD ITALIC NUMERAL ONE;No;0;L;;;;1;N;;;;; -10321;OLD ITALIC NUMERAL FIVE;No;0;L;;;;5;N;;;;; -10322;OLD ITALIC NUMERAL TEN;No;0;L;;;;10;N;;;;; -10323;OLD ITALIC NUMERAL FIFTY;No;0;L;;;;50;N;;;;; -10330;GOTHIC LETTER AHSA;Lo;0;L;;;;;N;;;;; -10331;GOTHIC LETTER BAIRKAN;Lo;0;L;;;;;N;;;;; -10332;GOTHIC LETTER GIBA;Lo;0;L;;;;;N;;;;; -10333;GOTHIC LETTER DAGS;Lo;0;L;;;;;N;;;;; -10334;GOTHIC LETTER AIHVUS;Lo;0;L;;;;;N;;;;; -10335;GOTHIC LETTER QAIRTHRA;Lo;0;L;;;;;N;;;;; -10336;GOTHIC LETTER IUJA;Lo;0;L;;;;;N;;;;; -10337;GOTHIC LETTER HAGL;Lo;0;L;;;;;N;;;;; -10338;GOTHIC LETTER THIUTH;Lo;0;L;;;;;N;;;;; -10339;GOTHIC LETTER EIS;Lo;0;L;;;;;N;;;;; -1033A;GOTHIC LETTER KUSMA;Lo;0;L;;;;;N;;;;; -1033B;GOTHIC LETTER LAGUS;Lo;0;L;;;;;N;;;;; -1033C;GOTHIC LETTER MANNA;Lo;0;L;;;;;N;;;;; -1033D;GOTHIC LETTER NAUTHS;Lo;0;L;;;;;N;;;;; -1033E;GOTHIC LETTER JER;Lo;0;L;;;;;N;;;;; -1033F;GOTHIC LETTER URUS;Lo;0;L;;;;;N;;;;; -10340;GOTHIC LETTER PAIRTHRA;Lo;0;L;;;;;N;;;;; -10341;GOTHIC LETTER NINETY;Lo;0;L;;;;;N;;;;; -10342;GOTHIC LETTER RAIDA;Lo;0;L;;;;;N;;;;; -10343;GOTHIC LETTER SAUIL;Lo;0;L;;;;;N;;;;; -10344;GOTHIC LETTER TEIWS;Lo;0;L;;;;;N;;;;; -10345;GOTHIC LETTER WINJA;Lo;0;L;;;;;N;;;;; -10346;GOTHIC LETTER FAIHU;Lo;0;L;;;;;N;;;;; -10347;GOTHIC LETTER IGGWS;Lo;0;L;;;;;N;;;;; -10348;GOTHIC LETTER HWAIR;Lo;0;L;;;;;N;;;;; -10349;GOTHIC LETTER OTHAL;Lo;0;L;;;;;N;;;;; -1034A;GOTHIC LETTER NINE HUNDRED;Nl;0;L;;;;;N;;;;; -10400;DESERET CAPITAL LETTER LONG I;Lu;0;L;;;;;N;;;;10428; -10401;DESERET CAPITAL LETTER LONG E;Lu;0;L;;;;;N;;;;10429; -10402;DESERET CAPITAL LETTER LONG A;Lu;0;L;;;;;N;;;;1042A; -10403;DESERET CAPITAL LETTER LONG AH;Lu;0;L;;;;;N;;;;1042B; -10404;DESERET CAPITAL LETTER LONG O;Lu;0;L;;;;;N;;;;1042C; -10405;DESERET CAPITAL LETTER LONG OO;Lu;0;L;;;;;N;;;;1042D; -10406;DESERET CAPITAL LETTER SHORT I;Lu;0;L;;;;;N;;;;1042E; -10407;DESERET CAPITAL LETTER SHORT E;Lu;0;L;;;;;N;;;;1042F; -10408;DESERET CAPITAL LETTER SHORT A;Lu;0;L;;;;;N;;;;10430; -10409;DESERET CAPITAL LETTER SHORT AH;Lu;0;L;;;;;N;;;;10431; -1040A;DESERET CAPITAL LETTER SHORT O;Lu;0;L;;;;;N;;;;10432; -1040B;DESERET CAPITAL LETTER SHORT OO;Lu;0;L;;;;;N;;;;10433; -1040C;DESERET CAPITAL LETTER AY;Lu;0;L;;;;;N;;;;10434; -1040D;DESERET CAPITAL LETTER OW;Lu;0;L;;;;;N;;;;10435; -1040E;DESERET CAPITAL LETTER WU;Lu;0;L;;;;;N;;;;10436; -1040F;DESERET CAPITAL LETTER YEE;Lu;0;L;;;;;N;;;;10437; -10410;DESERET CAPITAL LETTER H;Lu;0;L;;;;;N;;;;10438; -10411;DESERET CAPITAL LETTER PEE;Lu;0;L;;;;;N;;;;10439; -10412;DESERET CAPITAL LETTER BEE;Lu;0;L;;;;;N;;;;1043A; -10413;DESERET CAPITAL LETTER TEE;Lu;0;L;;;;;N;;;;1043B; -10414;DESERET CAPITAL LETTER DEE;Lu;0;L;;;;;N;;;;1043C; -10415;DESERET CAPITAL LETTER CHEE;Lu;0;L;;;;;N;;;;1043D; -10416;DESERET CAPITAL LETTER JEE;Lu;0;L;;;;;N;;;;1043E; -10417;DESERET CAPITAL LETTER KAY;Lu;0;L;;;;;N;;;;1043F; -10418;DESERET CAPITAL LETTER GAY;Lu;0;L;;;;;N;;;;10440; -10419;DESERET CAPITAL LETTER EF;Lu;0;L;;;;;N;;;;10441; -1041A;DESERET CAPITAL LETTER VEE;Lu;0;L;;;;;N;;;;10442; -1041B;DESERET CAPITAL LETTER ETH;Lu;0;L;;;;;N;;;;10443; -1041C;DESERET CAPITAL LETTER THEE;Lu;0;L;;;;;N;;;;10444; -1041D;DESERET CAPITAL LETTER ES;Lu;0;L;;;;;N;;;;10445; -1041E;DESERET CAPITAL LETTER ZEE;Lu;0;L;;;;;N;;;;10446; -1041F;DESERET CAPITAL LETTER ESH;Lu;0;L;;;;;N;;;;10447; -10420;DESERET CAPITAL LETTER ZHEE;Lu;0;L;;;;;N;;;;10448; -10421;DESERET CAPITAL LETTER ER;Lu;0;L;;;;;N;;;;10449; -10422;DESERET CAPITAL LETTER EL;Lu;0;L;;;;;N;;;;1044A; -10423;DESERET CAPITAL LETTER EM;Lu;0;L;;;;;N;;;;1044B; -10424;DESERET CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;1044C; -10425;DESERET CAPITAL LETTER ENG;Lu;0;L;;;;;N;;;;1044D; -10428;DESERET SMALL LETTER LONG I;Ll;0;L;;;;;N;;;10400;;10400 -10429;DESERET SMALL LETTER LONG E;Ll;0;L;;;;;N;;;10401;;10401 -1042A;DESERET SMALL LETTER LONG A;Ll;0;L;;;;;N;;;10402;;10402 -1042B;DESERET SMALL LETTER LONG AH;Ll;0;L;;;;;N;;;10403;;10403 -1042C;DESERET SMALL LETTER LONG O;Ll;0;L;;;;;N;;;10404;;10404 -1042D;DESERET SMALL LETTER LONG OO;Ll;0;L;;;;;N;;;10405;;10405 -1042E;DESERET SMALL LETTER SHORT I;Ll;0;L;;;;;N;;;10406;;10406 -1042F;DESERET SMALL LETTER SHORT E;Ll;0;L;;;;;N;;;10407;;10407 -10430;DESERET SMALL LETTER SHORT A;Ll;0;L;;;;;N;;;10408;;10408 -10431;DESERET SMALL LETTER SHORT AH;Ll;0;L;;;;;N;;;10409;;10409 -10432;DESERET SMALL LETTER SHORT O;Ll;0;L;;;;;N;;;1040A;;1040A -10433;DESERET SMALL LETTER SHORT OO;Ll;0;L;;;;;N;;;1040B;;1040B -10434;DESERET SMALL LETTER AY;Ll;0;L;;;;;N;;;1040C;;1040C -10435;DESERET SMALL LETTER OW;Ll;0;L;;;;;N;;;1040D;;1040D -10436;DESERET SMALL LETTER WU;Ll;0;L;;;;;N;;;1040E;;1040E -10437;DESERET SMALL LETTER YEE;Ll;0;L;;;;;N;;;1040F;;1040F -10438;DESERET SMALL LETTER H;Ll;0;L;;;;;N;;;10410;;10410 -10439;DESERET SMALL LETTER PEE;Ll;0;L;;;;;N;;;10411;;10411 -1043A;DESERET SMALL LETTER BEE;Ll;0;L;;;;;N;;;10412;;10412 -1043B;DESERET SMALL LETTER TEE;Ll;0;L;;;;;N;;;10413;;10413 -1043C;DESERET SMALL LETTER DEE;Ll;0;L;;;;;N;;;10414;;10414 -1043D;DESERET SMALL LETTER CHEE;Ll;0;L;;;;;N;;;10415;;10415 -1043E;DESERET SMALL LETTER JEE;Ll;0;L;;;;;N;;;10416;;10416 -1043F;DESERET SMALL LETTER KAY;Ll;0;L;;;;;N;;;10417;;10417 -10440;DESERET SMALL LETTER GAY;Ll;0;L;;;;;N;;;10418;;10418 -10441;DESERET SMALL LETTER EF;Ll;0;L;;;;;N;;;10419;;10419 -10442;DESERET SMALL LETTER VEE;Ll;0;L;;;;;N;;;1041A;;1041A -10443;DESERET SMALL LETTER ETH;Ll;0;L;;;;;N;;;1041B;;1041B -10444;DESERET SMALL LETTER THEE;Ll;0;L;;;;;N;;;1041C;;1041C -10445;DESERET SMALL LETTER ES;Ll;0;L;;;;;N;;;1041D;;1041D -10446;DESERET SMALL LETTER ZEE;Ll;0;L;;;;;N;;;1041E;;1041E -10447;DESERET SMALL LETTER ESH;Ll;0;L;;;;;N;;;1041F;;1041F -10448;DESERET SMALL LETTER ZHEE;Ll;0;L;;;;;N;;;10420;;10420 -10449;DESERET SMALL LETTER ER;Ll;0;L;;;;;N;;;10421;;10421 -1044A;DESERET SMALL LETTER EL;Ll;0;L;;;;;N;;;10422;;10422 -1044B;DESERET SMALL LETTER EM;Ll;0;L;;;;;N;;;10423;;10423 -1044C;DESERET SMALL LETTER EN;Ll;0;L;;;;;N;;;10424;;10424 -1044D;DESERET SMALL LETTER ENG;Ll;0;L;;;;;N;;;10425;;10425 -1D000;BYZANTINE MUSICAL SYMBOL PSILI;So;0;L;;;;;N;;;;; -1D001;BYZANTINE MUSICAL SYMBOL DASEIA;So;0;L;;;;;N;;;;; -1D002;BYZANTINE MUSICAL SYMBOL PERISPOMENI;So;0;L;;;;;N;;;;; -1D003;BYZANTINE MUSICAL SYMBOL OXEIA EKFONITIKON;So;0;L;;;;;N;;;;; -1D004;BYZANTINE MUSICAL SYMBOL OXEIA DIPLI;So;0;L;;;;;N;;;;; -1D005;BYZANTINE MUSICAL SYMBOL VAREIA EKFONITIKON;So;0;L;;;;;N;;;;; -1D006;BYZANTINE MUSICAL SYMBOL VAREIA DIPLI;So;0;L;;;;;N;;;;; -1D007;BYZANTINE MUSICAL SYMBOL KATHISTI;So;0;L;;;;;N;;;;; -1D008;BYZANTINE MUSICAL SYMBOL SYRMATIKI;So;0;L;;;;;N;;;;; -1D009;BYZANTINE MUSICAL SYMBOL PARAKLITIKI;So;0;L;;;;;N;;;;; -1D00A;BYZANTINE MUSICAL SYMBOL YPOKRISIS;So;0;L;;;;;N;;;;; -1D00B;BYZANTINE MUSICAL SYMBOL YPOKRISIS DIPLI;So;0;L;;;;;N;;;;; -1D00C;BYZANTINE MUSICAL SYMBOL KREMASTI;So;0;L;;;;;N;;;;; -1D00D;BYZANTINE MUSICAL SYMBOL APESO EKFONITIKON;So;0;L;;;;;N;;;;; -1D00E;BYZANTINE MUSICAL SYMBOL EXO EKFONITIKON;So;0;L;;;;;N;;;;; -1D00F;BYZANTINE MUSICAL SYMBOL TELEIA;So;0;L;;;;;N;;;;; -1D010;BYZANTINE MUSICAL SYMBOL KENTIMATA;So;0;L;;;;;N;;;;; -1D011;BYZANTINE MUSICAL SYMBOL APOSTROFOS;So;0;L;;;;;N;;;;; -1D012;BYZANTINE MUSICAL SYMBOL APOSTROFOS DIPLI;So;0;L;;;;;N;;;;; -1D013;BYZANTINE MUSICAL SYMBOL SYNEVMA;So;0;L;;;;;N;;;;; -1D014;BYZANTINE MUSICAL SYMBOL THITA;So;0;L;;;;;N;;;;; -1D015;BYZANTINE MUSICAL SYMBOL OLIGON ARCHAION;So;0;L;;;;;N;;;;; -1D016;BYZANTINE MUSICAL SYMBOL GORGON ARCHAION;So;0;L;;;;;N;;;;; -1D017;BYZANTINE MUSICAL SYMBOL PSILON;So;0;L;;;;;N;;;;; -1D018;BYZANTINE MUSICAL SYMBOL CHAMILON;So;0;L;;;;;N;;;;; -1D019;BYZANTINE MUSICAL SYMBOL VATHY;So;0;L;;;;;N;;;;; -1D01A;BYZANTINE MUSICAL SYMBOL ISON ARCHAION;So;0;L;;;;;N;;;;; -1D01B;BYZANTINE MUSICAL SYMBOL KENTIMA ARCHAION;So;0;L;;;;;N;;;;; -1D01C;BYZANTINE MUSICAL SYMBOL KENTIMATA ARCHAION;So;0;L;;;;;N;;;;; -1D01D;BYZANTINE MUSICAL SYMBOL SAXIMATA;So;0;L;;;;;N;;;;; -1D01E;BYZANTINE MUSICAL SYMBOL PARICHON;So;0;L;;;;;N;;;;; -1D01F;BYZANTINE MUSICAL SYMBOL STAVROS APODEXIA;So;0;L;;;;;N;;;;; -1D020;BYZANTINE MUSICAL SYMBOL OXEIAI ARCHAION;So;0;L;;;;;N;;;;; -1D021;BYZANTINE MUSICAL SYMBOL VAREIAI ARCHAION;So;0;L;;;;;N;;;;; -1D022;BYZANTINE MUSICAL SYMBOL APODERMA ARCHAION;So;0;L;;;;;N;;;;; -1D023;BYZANTINE MUSICAL SYMBOL APOTHEMA;So;0;L;;;;;N;;;;; -1D024;BYZANTINE MUSICAL SYMBOL KLASMA;So;0;L;;;;;N;;;;; -1D025;BYZANTINE MUSICAL SYMBOL REVMA;So;0;L;;;;;N;;;;; -1D026;BYZANTINE MUSICAL SYMBOL PIASMA ARCHAION;So;0;L;;;;;N;;;;; -1D027;BYZANTINE MUSICAL SYMBOL TINAGMA;So;0;L;;;;;N;;;;; -1D028;BYZANTINE MUSICAL SYMBOL ANATRICHISMA;So;0;L;;;;;N;;;;; -1D029;BYZANTINE MUSICAL SYMBOL SEISMA;So;0;L;;;;;N;;;;; -1D02A;BYZANTINE MUSICAL SYMBOL SYNAGMA ARCHAION;So;0;L;;;;;N;;;;; -1D02B;BYZANTINE MUSICAL SYMBOL SYNAGMA META STAVROU;So;0;L;;;;;N;;;;; -1D02C;BYZANTINE MUSICAL SYMBOL OYRANISMA ARCHAION;So;0;L;;;;;N;;;;; -1D02D;BYZANTINE MUSICAL SYMBOL THEMA;So;0;L;;;;;N;;;;; -1D02E;BYZANTINE MUSICAL SYMBOL LEMOI;So;0;L;;;;;N;;;;; -1D02F;BYZANTINE MUSICAL SYMBOL DYO;So;0;L;;;;;N;;;;; -1D030;BYZANTINE MUSICAL SYMBOL TRIA;So;0;L;;;;;N;;;;; -1D031;BYZANTINE MUSICAL SYMBOL TESSERA;So;0;L;;;;;N;;;;; -1D032;BYZANTINE MUSICAL SYMBOL KRATIMATA;So;0;L;;;;;N;;;;; -1D033;BYZANTINE MUSICAL SYMBOL APESO EXO NEO;So;0;L;;;;;N;;;;; -1D034;BYZANTINE MUSICAL SYMBOL FTHORA ARCHAION;So;0;L;;;;;N;;;;; -1D035;BYZANTINE MUSICAL SYMBOL IMIFTHORA;So;0;L;;;;;N;;;;; -1D036;BYZANTINE MUSICAL SYMBOL TROMIKON ARCHAION;So;0;L;;;;;N;;;;; -1D037;BYZANTINE MUSICAL SYMBOL KATAVA TROMIKON;So;0;L;;;;;N;;;;; -1D038;BYZANTINE MUSICAL SYMBOL PELASTON;So;0;L;;;;;N;;;;; -1D039;BYZANTINE MUSICAL SYMBOL PSIFISTON;So;0;L;;;;;N;;;;; -1D03A;BYZANTINE MUSICAL SYMBOL KONTEVMA;So;0;L;;;;;N;;;;; -1D03B;BYZANTINE MUSICAL SYMBOL CHOREVMA ARCHAION;So;0;L;;;;;N;;;;; -1D03C;BYZANTINE MUSICAL SYMBOL RAPISMA;So;0;L;;;;;N;;;;; -1D03D;BYZANTINE MUSICAL SYMBOL PARAKALESMA ARCHAION;So;0;L;;;;;N;;;;; -1D03E;BYZANTINE MUSICAL SYMBOL PARAKLITIKI ARCHAION;So;0;L;;;;;N;;;;; -1D03F;BYZANTINE MUSICAL SYMBOL ICHADIN;So;0;L;;;;;N;;;;; -1D040;BYZANTINE MUSICAL SYMBOL NANA;So;0;L;;;;;N;;;;; -1D041;BYZANTINE MUSICAL SYMBOL PETASMA;So;0;L;;;;;N;;;;; -1D042;BYZANTINE MUSICAL SYMBOL KONTEVMA ALLO;So;0;L;;;;;N;;;;; -1D043;BYZANTINE MUSICAL SYMBOL TROMIKON ALLO;So;0;L;;;;;N;;;;; -1D044;BYZANTINE MUSICAL SYMBOL STRAGGISMATA;So;0;L;;;;;N;;;;; -1D045;BYZANTINE MUSICAL SYMBOL GRONTHISMATA;So;0;L;;;;;N;;;;; -1D046;BYZANTINE MUSICAL SYMBOL ISON NEO;So;0;L;;;;;N;;;;; -1D047;BYZANTINE MUSICAL SYMBOL OLIGON NEO;So;0;L;;;;;N;;;;; -1D048;BYZANTINE MUSICAL SYMBOL OXEIA NEO;So;0;L;;;;;N;;;;; -1D049;BYZANTINE MUSICAL SYMBOL PETASTI;So;0;L;;;;;N;;;;; -1D04A;BYZANTINE MUSICAL SYMBOL KOUFISMA;So;0;L;;;;;N;;;;; -1D04B;BYZANTINE MUSICAL SYMBOL PETASTOKOUFISMA;So;0;L;;;;;N;;;;; -1D04C;BYZANTINE MUSICAL SYMBOL KRATIMOKOUFISMA;So;0;L;;;;;N;;;;; -1D04D;BYZANTINE MUSICAL SYMBOL PELASTON NEO;So;0;L;;;;;N;;;;; -1D04E;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO ANO;So;0;L;;;;;N;;;;; -1D04F;BYZANTINE MUSICAL SYMBOL KENTIMA NEO ANO;So;0;L;;;;;N;;;;; -1D050;BYZANTINE MUSICAL SYMBOL YPSILI;So;0;L;;;;;N;;;;; -1D051;BYZANTINE MUSICAL SYMBOL APOSTROFOS NEO;So;0;L;;;;;N;;;;; -1D052;BYZANTINE MUSICAL SYMBOL APOSTROFOI SYNDESMOS NEO;So;0;L;;;;;N;;;;; -1D053;BYZANTINE MUSICAL SYMBOL YPORROI;So;0;L;;;;;N;;;;; -1D054;BYZANTINE MUSICAL SYMBOL KRATIMOYPORROON;So;0;L;;;;;N;;;;; -1D055;BYZANTINE MUSICAL SYMBOL ELAFRON;So;0;L;;;;;N;;;;; -1D056;BYZANTINE MUSICAL SYMBOL CHAMILI;So;0;L;;;;;N;;;;; -1D057;BYZANTINE MUSICAL SYMBOL MIKRON ISON;So;0;L;;;;;N;;;;; -1D058;BYZANTINE MUSICAL SYMBOL VAREIA NEO;So;0;L;;;;;N;;;;; -1D059;BYZANTINE MUSICAL SYMBOL PIASMA NEO;So;0;L;;;;;N;;;;; -1D05A;BYZANTINE MUSICAL SYMBOL PSIFISTON NEO;So;0;L;;;;;N;;;;; -1D05B;BYZANTINE MUSICAL SYMBOL OMALON;So;0;L;;;;;N;;;;; -1D05C;BYZANTINE MUSICAL SYMBOL ANTIKENOMA;So;0;L;;;;;N;;;;; -1D05D;BYZANTINE MUSICAL SYMBOL LYGISMA;So;0;L;;;;;N;;;;; -1D05E;BYZANTINE MUSICAL SYMBOL PARAKLITIKI NEO;So;0;L;;;;;N;;;;; -1D05F;BYZANTINE MUSICAL SYMBOL PARAKALESMA NEO;So;0;L;;;;;N;;;;; -1D060;BYZANTINE MUSICAL SYMBOL ETERON PARAKALESMA;So;0;L;;;;;N;;;;; -1D061;BYZANTINE MUSICAL SYMBOL KYLISMA;So;0;L;;;;;N;;;;; -1D062;BYZANTINE MUSICAL SYMBOL ANTIKENOKYLISMA;So;0;L;;;;;N;;;;; -1D063;BYZANTINE MUSICAL SYMBOL TROMIKON NEO;So;0;L;;;;;N;;;;; -1D064;BYZANTINE MUSICAL SYMBOL EKSTREPTON;So;0;L;;;;;N;;;;; -1D065;BYZANTINE MUSICAL SYMBOL SYNAGMA NEO;So;0;L;;;;;N;;;;; -1D066;BYZANTINE MUSICAL SYMBOL SYRMA;So;0;L;;;;;N;;;;; -1D067;BYZANTINE MUSICAL SYMBOL CHOREVMA NEO;So;0;L;;;;;N;;;;; -1D068;BYZANTINE MUSICAL SYMBOL EPEGERMA;So;0;L;;;;;N;;;;; -1D069;BYZANTINE MUSICAL SYMBOL SEISMA NEO;So;0;L;;;;;N;;;;; -1D06A;BYZANTINE MUSICAL SYMBOL XIRON KLASMA;So;0;L;;;;;N;;;;; -1D06B;BYZANTINE MUSICAL SYMBOL TROMIKOPSIFISTON;So;0;L;;;;;N;;;;; -1D06C;BYZANTINE MUSICAL SYMBOL PSIFISTOLYGISMA;So;0;L;;;;;N;;;;; -1D06D;BYZANTINE MUSICAL SYMBOL TROMIKOLYGISMA;So;0;L;;;;;N;;;;; -1D06E;BYZANTINE MUSICAL SYMBOL TROMIKOPARAKALESMA;So;0;L;;;;;N;;;;; -1D06F;BYZANTINE MUSICAL SYMBOL PSIFISTOPARAKALESMA;So;0;L;;;;;N;;;;; -1D070;BYZANTINE MUSICAL SYMBOL TROMIKOSYNAGMA;So;0;L;;;;;N;;;;; -1D071;BYZANTINE MUSICAL SYMBOL PSIFISTOSYNAGMA;So;0;L;;;;;N;;;;; -1D072;BYZANTINE MUSICAL SYMBOL GORGOSYNTHETON;So;0;L;;;;;N;;;;; -1D073;BYZANTINE MUSICAL SYMBOL ARGOSYNTHETON;So;0;L;;;;;N;;;;; -1D074;BYZANTINE MUSICAL SYMBOL ETERON ARGOSYNTHETON;So;0;L;;;;;N;;;;; -1D075;BYZANTINE MUSICAL SYMBOL OYRANISMA NEO;So;0;L;;;;;N;;;;; -1D076;BYZANTINE MUSICAL SYMBOL THEMATISMOS ESO;So;0;L;;;;;N;;;;; -1D077;BYZANTINE MUSICAL SYMBOL THEMATISMOS EXO;So;0;L;;;;;N;;;;; -1D078;BYZANTINE MUSICAL SYMBOL THEMA APLOUN;So;0;L;;;;;N;;;;; -1D079;BYZANTINE MUSICAL SYMBOL THES KAI APOTHES;So;0;L;;;;;N;;;;; -1D07A;BYZANTINE MUSICAL SYMBOL KATAVASMA;So;0;L;;;;;N;;;;; -1D07B;BYZANTINE MUSICAL SYMBOL ENDOFONON;So;0;L;;;;;N;;;;; -1D07C;BYZANTINE MUSICAL SYMBOL YFEN KATO;So;0;L;;;;;N;;;;; -1D07D;BYZANTINE MUSICAL SYMBOL YFEN ANO;So;0;L;;;;;N;;;;; -1D07E;BYZANTINE MUSICAL SYMBOL STAVROS;So;0;L;;;;;N;;;;; -1D07F;BYZANTINE MUSICAL SYMBOL KLASMA ANO;So;0;L;;;;;N;;;;; -1D080;BYZANTINE MUSICAL SYMBOL DIPLI ARCHAION;So;0;L;;;;;N;;;;; -1D081;BYZANTINE MUSICAL SYMBOL KRATIMA ARCHAION;So;0;L;;;;;N;;;;; -1D082;BYZANTINE MUSICAL SYMBOL KRATIMA ALLO;So;0;L;;;;;N;;;;; -1D083;BYZANTINE MUSICAL SYMBOL KRATIMA NEO;So;0;L;;;;;N;;;;; -1D084;BYZANTINE MUSICAL SYMBOL APODERMA NEO;So;0;L;;;;;N;;;;; -1D085;BYZANTINE MUSICAL SYMBOL APLI;So;0;L;;;;;N;;;;; -1D086;BYZANTINE MUSICAL SYMBOL DIPLI;So;0;L;;;;;N;;;;; -1D087;BYZANTINE MUSICAL SYMBOL TRIPLI;So;0;L;;;;;N;;;;; -1D088;BYZANTINE MUSICAL SYMBOL TETRAPLI;So;0;L;;;;;N;;;;; -1D089;BYZANTINE MUSICAL SYMBOL KORONIS;So;0;L;;;;;N;;;;; -1D08A;BYZANTINE MUSICAL SYMBOL LEIMMA ENOS CHRONOU;So;0;L;;;;;N;;;;; -1D08B;BYZANTINE MUSICAL SYMBOL LEIMMA DYO CHRONON;So;0;L;;;;;N;;;;; -1D08C;BYZANTINE MUSICAL SYMBOL LEIMMA TRION CHRONON;So;0;L;;;;;N;;;;; -1D08D;BYZANTINE MUSICAL SYMBOL LEIMMA TESSARON CHRONON;So;0;L;;;;;N;;;;; -1D08E;BYZANTINE MUSICAL SYMBOL LEIMMA IMISEOS CHRONOU;So;0;L;;;;;N;;;;; -1D08F;BYZANTINE MUSICAL SYMBOL GORGON NEO ANO;So;0;L;;;;;N;;;;; -1D090;BYZANTINE MUSICAL SYMBOL GORGON PARESTIGMENON ARISTERA;So;0;L;;;;;N;;;;; -1D091;BYZANTINE MUSICAL SYMBOL GORGON PARESTIGMENON DEXIA;So;0;L;;;;;N;;;;; -1D092;BYZANTINE MUSICAL SYMBOL DIGORGON;So;0;L;;;;;N;;;;; -1D093;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON ARISTERA KATO;So;0;L;;;;;N;;;;; -1D094;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON ARISTERA ANO;So;0;L;;;;;N;;;;; -1D095;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON DEXIA;So;0;L;;;;;N;;;;; -1D096;BYZANTINE MUSICAL SYMBOL TRIGORGON;So;0;L;;;;;N;;;;; -1D097;BYZANTINE MUSICAL SYMBOL ARGON;So;0;L;;;;;N;;;;; -1D098;BYZANTINE MUSICAL SYMBOL IMIDIARGON;So;0;L;;;;;N;;;;; -1D099;BYZANTINE MUSICAL SYMBOL DIARGON;So;0;L;;;;;N;;;;; -1D09A;BYZANTINE MUSICAL SYMBOL AGOGI POLI ARGI;So;0;L;;;;;N;;;;; -1D09B;BYZANTINE MUSICAL SYMBOL AGOGI ARGOTERI;So;0;L;;;;;N;;;;; -1D09C;BYZANTINE MUSICAL SYMBOL AGOGI ARGI;So;0;L;;;;;N;;;;; -1D09D;BYZANTINE MUSICAL SYMBOL AGOGI METRIA;So;0;L;;;;;N;;;;; -1D09E;BYZANTINE MUSICAL SYMBOL AGOGI MESI;So;0;L;;;;;N;;;;; -1D09F;BYZANTINE MUSICAL SYMBOL AGOGI GORGI;So;0;L;;;;;N;;;;; -1D0A0;BYZANTINE MUSICAL SYMBOL AGOGI GORGOTERI;So;0;L;;;;;N;;;;; -1D0A1;BYZANTINE MUSICAL SYMBOL AGOGI POLI GORGI;So;0;L;;;;;N;;;;; -1D0A2;BYZANTINE MUSICAL SYMBOL MARTYRIA PROTOS ICHOS;So;0;L;;;;;N;;;;; -1D0A3;BYZANTINE MUSICAL SYMBOL MARTYRIA ALLI PROTOS ICHOS;So;0;L;;;;;N;;;;; -1D0A4;BYZANTINE MUSICAL SYMBOL MARTYRIA DEYTEROS ICHOS;So;0;L;;;;;N;;;;; -1D0A5;BYZANTINE MUSICAL SYMBOL MARTYRIA ALLI DEYTEROS ICHOS;So;0;L;;;;;N;;;;; -1D0A6;BYZANTINE MUSICAL SYMBOL MARTYRIA TRITOS ICHOS;So;0;L;;;;;N;;;;; -1D0A7;BYZANTINE MUSICAL SYMBOL MARTYRIA TRIFONIAS;So;0;L;;;;;N;;;;; -1D0A8;BYZANTINE MUSICAL SYMBOL MARTYRIA TETARTOS ICHOS;So;0;L;;;;;N;;;;; -1D0A9;BYZANTINE MUSICAL SYMBOL MARTYRIA TETARTOS LEGETOS ICHOS;So;0;L;;;;;N;;;;; -1D0AA;BYZANTINE MUSICAL SYMBOL MARTYRIA LEGETOS ICHOS;So;0;L;;;;;N;;;;; -1D0AB;BYZANTINE MUSICAL SYMBOL MARTYRIA PLAGIOS ICHOS;So;0;L;;;;;N;;;;; -1D0AC;BYZANTINE MUSICAL SYMBOL ISAKIA TELOUS ICHIMATOS;So;0;L;;;;;N;;;;; -1D0AD;BYZANTINE MUSICAL SYMBOL APOSTROFOI TELOUS ICHIMATOS;So;0;L;;;;;N;;;;; -1D0AE;BYZANTINE MUSICAL SYMBOL FANEROSIS TETRAFONIAS;So;0;L;;;;;N;;;;; -1D0AF;BYZANTINE MUSICAL SYMBOL FANEROSIS MONOFONIAS;So;0;L;;;;;N;;;;; -1D0B0;BYZANTINE MUSICAL SYMBOL FANEROSIS DIFONIAS;So;0;L;;;;;N;;;;; -1D0B1;BYZANTINE MUSICAL SYMBOL MARTYRIA VARYS ICHOS;So;0;L;;;;;N;;;;; -1D0B2;BYZANTINE MUSICAL SYMBOL MARTYRIA PROTOVARYS ICHOS;So;0;L;;;;;N;;;;; -1D0B3;BYZANTINE MUSICAL SYMBOL MARTYRIA PLAGIOS TETARTOS ICHOS;So;0;L;;;;;N;;;;; -1D0B4;BYZANTINE MUSICAL SYMBOL GORTHMIKON N APLOUN;So;0;L;;;;;N;;;;; -1D0B5;BYZANTINE MUSICAL SYMBOL GORTHMIKON N DIPLOUN;So;0;L;;;;;N;;;;; -1D0B6;BYZANTINE MUSICAL SYMBOL ENARXIS KAI FTHORA VOU;So;0;L;;;;;N;;;;; -1D0B7;BYZANTINE MUSICAL SYMBOL IMIFONON;So;0;L;;;;;N;;;;; -1D0B8;BYZANTINE MUSICAL SYMBOL IMIFTHORON;So;0;L;;;;;N;;;;; -1D0B9;BYZANTINE MUSICAL SYMBOL FTHORA ARCHAION DEYTEROU ICHOU;So;0;L;;;;;N;;;;; -1D0BA;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI PA;So;0;L;;;;;N;;;;; -1D0BB;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NANA;So;0;L;;;;;N;;;;; -1D0BC;BYZANTINE MUSICAL SYMBOL FTHORA NAOS ICHOS;So;0;L;;;;;N;;;;; -1D0BD;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI DI;So;0;L;;;;;N;;;;; -1D0BE;BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON DIATONON DI;So;0;L;;;;;N;;;;; -1D0BF;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI KE;So;0;L;;;;;N;;;;; -1D0C0;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI ZO;So;0;L;;;;;N;;;;; -1D0C1;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NI KATO;So;0;L;;;;;N;;;;; -1D0C2;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NI ANO;So;0;L;;;;;N;;;;; -1D0C3;BYZANTINE MUSICAL SYMBOL FTHORA MALAKON CHROMA DIFONIAS;So;0;L;;;;;N;;;;; -1D0C4;BYZANTINE MUSICAL SYMBOL FTHORA MALAKON CHROMA MONOFONIAS;So;0;L;;;;;N;;;;; -1D0C5;BYZANTINE MUSICAL SYMBOL FHTORA SKLIRON CHROMA VASIS;So;0;L;;;;;N;;;;; -1D0C6;BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA SYNAFI;So;0;L;;;;;N;;;;; -1D0C7;BYZANTINE MUSICAL SYMBOL FTHORA NENANO;So;0;L;;;;;N;;;;; -1D0C8;BYZANTINE MUSICAL SYMBOL CHROA ZYGOS;So;0;L;;;;;N;;;;; -1D0C9;BYZANTINE MUSICAL SYMBOL CHROA KLITON;So;0;L;;;;;N;;;;; -1D0CA;BYZANTINE MUSICAL SYMBOL CHROA SPATHI;So;0;L;;;;;N;;;;; -1D0CB;BYZANTINE MUSICAL SYMBOL FTHORA I YFESIS TETARTIMORION;So;0;L;;;;;N;;;;; -1D0CC;BYZANTINE MUSICAL SYMBOL FTHORA ENARMONIOS ANTIFONIA;So;0;L;;;;;N;;;;; -1D0CD;BYZANTINE MUSICAL SYMBOL YFESIS TRITIMORION;So;0;L;;;;;N;;;;; -1D0CE;BYZANTINE MUSICAL SYMBOL DIESIS TRITIMORION;So;0;L;;;;;N;;;;; -1D0CF;BYZANTINE MUSICAL SYMBOL DIESIS TETARTIMORION;So;0;L;;;;;N;;;;; -1D0D0;BYZANTINE MUSICAL SYMBOL DIESIS APLI DYO DODEKATA;So;0;L;;;;;N;;;;; -1D0D1;BYZANTINE MUSICAL SYMBOL DIESIS MONOGRAMMOS TESSERA DODEKATA;So;0;L;;;;;N;;;;; -1D0D2;BYZANTINE MUSICAL SYMBOL DIESIS DIGRAMMOS EX DODEKATA;So;0;L;;;;;N;;;;; -1D0D3;BYZANTINE MUSICAL SYMBOL DIESIS TRIGRAMMOS OKTO DODEKATA;So;0;L;;;;;N;;;;; -1D0D4;BYZANTINE MUSICAL SYMBOL YFESIS APLI DYO DODEKATA;So;0;L;;;;;N;;;;; -1D0D5;BYZANTINE MUSICAL SYMBOL YFESIS MONOGRAMMOS TESSERA DODEKATA;So;0;L;;;;;N;;;;; -1D0D6;BYZANTINE MUSICAL SYMBOL YFESIS DIGRAMMOS EX DODEKATA;So;0;L;;;;;N;;;;; -1D0D7;BYZANTINE MUSICAL SYMBOL YFESIS TRIGRAMMOS OKTO DODEKATA;So;0;L;;;;;N;;;;; -1D0D8;BYZANTINE MUSICAL SYMBOL GENIKI DIESIS;So;0;L;;;;;N;;;;; -1D0D9;BYZANTINE MUSICAL SYMBOL GENIKI YFESIS;So;0;L;;;;;N;;;;; -1D0DA;BYZANTINE MUSICAL SYMBOL DIASTOLI APLI MIKRI;So;0;L;;;;;N;;;;; -1D0DB;BYZANTINE MUSICAL SYMBOL DIASTOLI APLI MEGALI;So;0;L;;;;;N;;;;; -1D0DC;BYZANTINE MUSICAL SYMBOL DIASTOLI DIPLI;So;0;L;;;;;N;;;;; -1D0DD;BYZANTINE MUSICAL SYMBOL DIASTOLI THESEOS;So;0;L;;;;;N;;;;; -1D0DE;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS;So;0;L;;;;;N;;;;; -1D0DF;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS DISIMOU;So;0;L;;;;;N;;;;; -1D0E0;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS TRISIMOU;So;0;L;;;;;N;;;;; -1D0E1;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS TETRASIMOU;So;0;L;;;;;N;;;;; -1D0E2;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS;So;0;L;;;;;N;;;;; -1D0E3;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS DISIMOU;So;0;L;;;;;N;;;;; -1D0E4;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS TRISIMOU;So;0;L;;;;;N;;;;; -1D0E5;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS TETRASIMOU;So;0;L;;;;;N;;;;; -1D0E6;BYZANTINE MUSICAL SYMBOL DIGRAMMA GG;So;0;L;;;;;N;;;;; -1D0E7;BYZANTINE MUSICAL SYMBOL DIFTOGGOS OU;So;0;L;;;;;N;;;;; -1D0E8;BYZANTINE MUSICAL SYMBOL STIGMA;So;0;L;;;;;N;;;;; -1D0E9;BYZANTINE MUSICAL SYMBOL ARKTIKO PA;So;0;L;;;;;N;;;;; -1D0EA;BYZANTINE MUSICAL SYMBOL ARKTIKO VOU;So;0;L;;;;;N;;;;; -1D0EB;BYZANTINE MUSICAL SYMBOL ARKTIKO GA;So;0;L;;;;;N;;;;; -1D0EC;BYZANTINE MUSICAL SYMBOL ARKTIKO DI;So;0;L;;;;;N;;;;; -1D0ED;BYZANTINE MUSICAL SYMBOL ARKTIKO KE;So;0;L;;;;;N;;;;; -1D0EE;BYZANTINE MUSICAL SYMBOL ARKTIKO ZO;So;0;L;;;;;N;;;;; -1D0EF;BYZANTINE MUSICAL SYMBOL ARKTIKO NI;So;0;L;;;;;N;;;;; -1D0F0;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO MESO;So;0;L;;;;;N;;;;; -1D0F1;BYZANTINE MUSICAL SYMBOL KENTIMA NEO MESO;So;0;L;;;;;N;;;;; -1D0F2;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO KATO;So;0;L;;;;;N;;;;; -1D0F3;BYZANTINE MUSICAL SYMBOL KENTIMA NEO KATO;So;0;L;;;;;N;;;;; -1D0F4;BYZANTINE MUSICAL SYMBOL KLASMA KATO;So;0;L;;;;;N;;;;; -1D0F5;BYZANTINE MUSICAL SYMBOL GORGON NEO KATO;So;0;L;;;;;N;;;;; -1D100;MUSICAL SYMBOL SINGLE BARLINE;So;0;L;;;;;N;;;;; -1D101;MUSICAL SYMBOL DOUBLE BARLINE;So;0;L;;;;;N;;;;; -1D102;MUSICAL SYMBOL FINAL BARLINE;So;0;L;;;;;N;;;;; -1D103;MUSICAL SYMBOL REVERSE FINAL BARLINE;So;0;L;;;;;N;;;;; -1D104;MUSICAL SYMBOL DASHED BARLINE;So;0;L;;;;;N;;;;; -1D105;MUSICAL SYMBOL SHORT BARLINE;So;0;L;;;;;N;;;;; -1D106;MUSICAL SYMBOL LEFT REPEAT SIGN;So;0;L;;;;;N;;;;; -1D107;MUSICAL SYMBOL RIGHT REPEAT SIGN;So;0;L;;;;;N;;;;; -1D108;MUSICAL SYMBOL REPEAT DOTS;So;0;L;;;;;N;;;;; -1D109;MUSICAL SYMBOL DAL SEGNO;So;0;L;;;;;N;;;;; -1D10A;MUSICAL SYMBOL DA CAPO;So;0;L;;;;;N;;;;; -1D10B;MUSICAL SYMBOL SEGNO;So;0;L;;;;;N;;;;; -1D10C;MUSICAL SYMBOL CODA;So;0;L;;;;;N;;;;; -1D10D;MUSICAL SYMBOL REPEATED FIGURE-1;So;0;L;;;;;N;;;;; -1D10E;MUSICAL SYMBOL REPEATED FIGURE-2;So;0;L;;;;;N;;;;; -1D10F;MUSICAL SYMBOL REPEATED FIGURE-3;So;0;L;;;;;N;;;;; -1D110;MUSICAL SYMBOL FERMATA;So;0;L;;;;;N;;;;; -1D111;MUSICAL SYMBOL FERMATA BELOW;So;0;L;;;;;N;;;;; -1D112;MUSICAL SYMBOL BREATH MARK;So;0;L;;;;;N;;;;; -1D113;MUSICAL SYMBOL CAESURA;So;0;L;;;;;N;;;;; -1D114;MUSICAL SYMBOL BRACE;So;0;L;;;;;N;;;;; -1D115;MUSICAL SYMBOL BRACKET;So;0;L;;;;;N;;;;; -1D116;MUSICAL SYMBOL ONE-LINE STAFF;So;0;L;;;;;N;;;;; -1D117;MUSICAL SYMBOL TWO-LINE STAFF;So;0;L;;;;;N;;;;; -1D118;MUSICAL SYMBOL THREE-LINE STAFF;So;0;L;;;;;N;;;;; -1D119;MUSICAL SYMBOL FOUR-LINE STAFF;So;0;L;;;;;N;;;;; -1D11A;MUSICAL SYMBOL FIVE-LINE STAFF;So;0;L;;;;;N;;;;; -1D11B;MUSICAL SYMBOL SIX-LINE STAFF;So;0;L;;;;;N;;;;; -1D11C;MUSICAL SYMBOL SIX-STRING FRETBOARD;So;0;L;;;;;N;;;;; -1D11D;MUSICAL SYMBOL FOUR-STRING FRETBOARD;So;0;L;;;;;N;;;;; -1D11E;MUSICAL SYMBOL G CLEF;So;0;L;;;;;N;;;;; -1D11F;MUSICAL SYMBOL G CLEF OTTAVA ALTA;So;0;L;;;;;N;;;;; -1D120;MUSICAL SYMBOL G CLEF OTTAVA BASSA;So;0;L;;;;;N;;;;; -1D121;MUSICAL SYMBOL C CLEF;So;0;L;;;;;N;;;;; -1D122;MUSICAL SYMBOL F CLEF;So;0;L;;;;;N;;;;; -1D123;MUSICAL SYMBOL F CLEF OTTAVA ALTA;So;0;L;;;;;N;;;;; -1D124;MUSICAL SYMBOL F CLEF OTTAVA BASSA;So;0;L;;;;;N;;;;; -1D125;MUSICAL SYMBOL DRUM CLEF-1;So;0;L;;;;;N;;;;; -1D126;MUSICAL SYMBOL DRUM CLEF-2;So;0;L;;;;;N;;;;; -1D12A;MUSICAL SYMBOL DOUBLE SHARP;So;0;L;;;;;N;;;;; -1D12B;MUSICAL SYMBOL DOUBLE FLAT;So;0;L;;;;;N;;;;; -1D12C;MUSICAL SYMBOL FLAT UP;So;0;L;;;;;N;;;;; -1D12D;MUSICAL SYMBOL FLAT DOWN;So;0;L;;;;;N;;;;; -1D12E;MUSICAL SYMBOL NATURAL UP;So;0;L;;;;;N;;;;; -1D12F;MUSICAL SYMBOL NATURAL DOWN;So;0;L;;;;;N;;;;; -1D130;MUSICAL SYMBOL SHARP UP;So;0;L;;;;;N;;;;; -1D131;MUSICAL SYMBOL SHARP DOWN;So;0;L;;;;;N;;;;; -1D132;MUSICAL SYMBOL QUARTER TONE SHARP;So;0;L;;;;;N;;;;; -1D133;MUSICAL SYMBOL QUARTER TONE FLAT;So;0;L;;;;;N;;;;; -1D134;MUSICAL SYMBOL COMMON TIME;So;0;L;;;;;N;;;;; -1D135;MUSICAL SYMBOL CUT TIME;So;0;L;;;;;N;;;;; -1D136;MUSICAL SYMBOL OTTAVA ALTA;So;0;L;;;;;N;;;;; -1D137;MUSICAL SYMBOL OTTAVA BASSA;So;0;L;;;;;N;;;;; -1D138;MUSICAL SYMBOL QUINDICESIMA ALTA;So;0;L;;;;;N;;;;; -1D139;MUSICAL SYMBOL QUINDICESIMA BASSA;So;0;L;;;;;N;;;;; -1D13A;MUSICAL SYMBOL MULTI REST;So;0;L;;;;;N;;;;; -1D13B;MUSICAL SYMBOL WHOLE REST;So;0;L;;;;;N;;;;; -1D13C;MUSICAL SYMBOL HALF REST;So;0;L;;;;;N;;;;; -1D13D;MUSICAL SYMBOL QUARTER REST;So;0;L;;;;;N;;;;; -1D13E;MUSICAL SYMBOL EIGHTH REST;So;0;L;;;;;N;;;;; -1D13F;MUSICAL SYMBOL SIXTEENTH REST;So;0;L;;;;;N;;;;; -1D140;MUSICAL SYMBOL THIRTY-SECOND REST;So;0;L;;;;;N;;;;; -1D141;MUSICAL SYMBOL SIXTY-FOURTH REST;So;0;L;;;;;N;;;;; -1D142;MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH REST;So;0;L;;;;;N;;;;; -1D143;MUSICAL SYMBOL X NOTEHEAD;So;0;L;;;;;N;;;;; -1D144;MUSICAL SYMBOL PLUS NOTEHEAD;So;0;L;;;;;N;;;;; -1D145;MUSICAL SYMBOL CIRCLE X NOTEHEAD;So;0;L;;;;;N;;;;; -1D146;MUSICAL SYMBOL SQUARE NOTEHEAD WHITE;So;0;L;;;;;N;;;;; -1D147;MUSICAL SYMBOL SQUARE NOTEHEAD BLACK;So;0;L;;;;;N;;;;; -1D148;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE;So;0;L;;;;;N;;;;; -1D149;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK;So;0;L;;;;;N;;;;; -1D14A;MUSICAL SYMBOL TRIANGLE NOTEHEAD LEFT WHITE;So;0;L;;;;;N;;;;; -1D14B;MUSICAL SYMBOL TRIANGLE NOTEHEAD LEFT BLACK;So;0;L;;;;;N;;;;; -1D14C;MUSICAL SYMBOL TRIANGLE NOTEHEAD RIGHT WHITE;So;0;L;;;;;N;;;;; -1D14D;MUSICAL SYMBOL TRIANGLE NOTEHEAD RIGHT BLACK;So;0;L;;;;;N;;;;; -1D14E;MUSICAL SYMBOL TRIANGLE NOTEHEAD DOWN WHITE;So;0;L;;;;;N;;;;; -1D14F;MUSICAL SYMBOL TRIANGLE NOTEHEAD DOWN BLACK;So;0;L;;;;;N;;;;; -1D150;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP RIGHT WHITE;So;0;L;;;;;N;;;;; -1D151;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP RIGHT BLACK;So;0;L;;;;;N;;;;; -1D152;MUSICAL SYMBOL MOON NOTEHEAD WHITE;So;0;L;;;;;N;;;;; -1D153;MUSICAL SYMBOL MOON NOTEHEAD BLACK;So;0;L;;;;;N;;;;; -1D154;MUSICAL SYMBOL TRIANGLE-ROUND NOTEHEAD DOWN WHITE;So;0;L;;;;;N;;;;; -1D155;MUSICAL SYMBOL TRIANGLE-ROUND NOTEHEAD DOWN BLACK;So;0;L;;;;;N;;;;; -1D156;MUSICAL SYMBOL PARENTHESIS NOTEHEAD;So;0;L;;;;;N;;;;; -1D157;MUSICAL SYMBOL VOID NOTEHEAD;So;0;L;;;;;N;;;;; -1D158;MUSICAL SYMBOL NOTEHEAD BLACK;So;0;L;;;;;N;;;;; -1D159;MUSICAL SYMBOL NULL NOTEHEAD;So;0;L;;;;;N;;;;; -1D15A;MUSICAL SYMBOL CLUSTER NOTEHEAD WHITE;So;0;L;;;;;N;;;;; -1D15B;MUSICAL SYMBOL CLUSTER NOTEHEAD BLACK;So;0;L;;;;;N;;;;; -1D15C;MUSICAL SYMBOL BREVE;So;0;L;;;;;N;;;;; -1D15D;MUSICAL SYMBOL WHOLE NOTE;So;0;L;;;;;N;;;;; -1D15E;MUSICAL SYMBOL HALF NOTE;So;0;L;1D157 1D165;;;;N;;;;; -1D15F;MUSICAL SYMBOL QUARTER NOTE;So;0;L;1D158 1D165;;;;N;;;;; -1D160;MUSICAL SYMBOL EIGHTH NOTE;So;0;L;1D15F 1D16E;;;;N;;;;; -1D161;MUSICAL SYMBOL SIXTEENTH NOTE;So;0;L;1D15F 1D16F;;;;N;;;;; -1D162;MUSICAL SYMBOL THIRTY-SECOND NOTE;So;0;L;1D15F 1D170;;;;N;;;;; -1D163;MUSICAL SYMBOL SIXTY-FOURTH NOTE;So;0;L;1D15F 1D171;;;;N;;;;; -1D164;MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE;So;0;L;1D15F 1D172;;;;N;;;;; -1D165;MUSICAL SYMBOL COMBINING STEM;Mc;216;L;;;;;N;;;;; -1D166;MUSICAL SYMBOL COMBINING SPRECHGESANG STEM;Mc;216;L;;;;;N;;;;; -1D167;MUSICAL SYMBOL COMBINING TREMOLO-1;Mn;1;NSM;;;;;N;;;;; -1D168;MUSICAL SYMBOL COMBINING TREMOLO-2;Mn;1;NSM;;;;;N;;;;; -1D169;MUSICAL SYMBOL COMBINING TREMOLO-3;Mn;1;NSM;;;;;N;;;;; -1D16A;MUSICAL SYMBOL FINGERED TREMOLO-1;So;0;L;;;;;N;;;;; -1D16B;MUSICAL SYMBOL FINGERED TREMOLO-2;So;0;L;;;;;N;;;;; -1D16C;MUSICAL SYMBOL FINGERED TREMOLO-3;So;0;L;;;;;N;;;;; -1D16D;MUSICAL SYMBOL COMBINING AUGMENTATION DOT;Mc;226;L;;;;;N;;;;; -1D16E;MUSICAL SYMBOL COMBINING FLAG-1;Mc;216;L;;;;;N;;;;; -1D16F;MUSICAL SYMBOL COMBINING FLAG-2;Mc;216;L;;;;;N;;;;; -1D170;MUSICAL SYMBOL COMBINING FLAG-3;Mc;216;L;;;;;N;;;;; -1D171;MUSICAL SYMBOL COMBINING FLAG-4;Mc;216;L;;;;;N;;;;; -1D172;MUSICAL SYMBOL COMBINING FLAG-5;Mc;216;L;;;;;N;;;;; -1D173;MUSICAL SYMBOL BEGIN BEAM;Cf;0;BN;;;;;N;;;;; -1D174;MUSICAL SYMBOL END BEAM;Cf;0;BN;;;;;N;;;;; -1D175;MUSICAL SYMBOL BEGIN TIE;Cf;0;BN;;;;;N;;;;; -1D176;MUSICAL SYMBOL END TIE;Cf;0;BN;;;;;N;;;;; -1D177;MUSICAL SYMBOL BEGIN SLUR;Cf;0;BN;;;;;N;;;;; -1D178;MUSICAL SYMBOL END SLUR;Cf;0;BN;;;;;N;;;;; -1D179;MUSICAL SYMBOL BEGIN PHRASE;Cf;0;BN;;;;;N;;;;; -1D17A;MUSICAL SYMBOL END PHRASE;Cf;0;BN;;;;;N;;;;; -1D17B;MUSICAL SYMBOL COMBINING ACCENT;Mn;220;NSM;;;;;N;;;;; -1D17C;MUSICAL SYMBOL COMBINING STACCATO;Mn;220;NSM;;;;;N;;;;; -1D17D;MUSICAL SYMBOL COMBINING TENUTO;Mn;220;NSM;;;;;N;;;;; -1D17E;MUSICAL SYMBOL COMBINING STACCATISSIMO;Mn;220;NSM;;;;;N;;;;; -1D17F;MUSICAL SYMBOL COMBINING MARCATO;Mn;220;NSM;;;;;N;;;;; -1D180;MUSICAL SYMBOL COMBINING MARCATO-STACCATO;Mn;220;NSM;;;;;N;;;;; -1D181;MUSICAL SYMBOL COMBINING ACCENT-STACCATO;Mn;220;NSM;;;;;N;;;;; -1D182;MUSICAL SYMBOL COMBINING LOURE;Mn;220;NSM;;;;;N;;;;; -1D183;MUSICAL SYMBOL ARPEGGIATO UP;So;0;L;;;;;N;;;;; -1D184;MUSICAL SYMBOL ARPEGGIATO DOWN;So;0;L;;;;;N;;;;; -1D185;MUSICAL SYMBOL COMBINING DOIT;Mn;230;NSM;;;;;N;;;;; -1D186;MUSICAL SYMBOL COMBINING RIP;Mn;230;NSM;;;;;N;;;;; -1D187;MUSICAL SYMBOL COMBINING FLIP;Mn;230;NSM;;;;;N;;;;; -1D188;MUSICAL SYMBOL COMBINING SMEAR;Mn;230;NSM;;;;;N;;;;; -1D189;MUSICAL SYMBOL COMBINING BEND;Mn;230;NSM;;;;;N;;;;; -1D18A;MUSICAL SYMBOL COMBINING DOUBLE TONGUE;Mn;220;NSM;;;;;N;;;;; -1D18B;MUSICAL SYMBOL COMBINING TRIPLE TONGUE;Mn;220;NSM;;;;;N;;;;; -1D18C;MUSICAL SYMBOL RINFORZANDO;So;0;L;;;;;N;;;;; -1D18D;MUSICAL SYMBOL SUBITO;So;0;L;;;;;N;;;;; -1D18E;MUSICAL SYMBOL Z;So;0;L;;;;;N;;;;; -1D18F;MUSICAL SYMBOL PIANO;So;0;L;;;;;N;;;;; -1D190;MUSICAL SYMBOL MEZZO;So;0;L;;;;;N;;;;; -1D191;MUSICAL SYMBOL FORTE;So;0;L;;;;;N;;;;; -1D192;MUSICAL SYMBOL CRESCENDO;So;0;L;;;;;N;;;;; -1D193;MUSICAL SYMBOL DECRESCENDO;So;0;L;;;;;N;;;;; -1D194;MUSICAL SYMBOL GRACE NOTE SLASH;So;0;L;;;;;N;;;;; -1D195;MUSICAL SYMBOL GRACE NOTE NO SLASH;So;0;L;;;;;N;;;;; -1D196;MUSICAL SYMBOL TR;So;0;L;;;;;N;;;;; -1D197;MUSICAL SYMBOL TURN;So;0;L;;;;;N;;;;; -1D198;MUSICAL SYMBOL INVERTED TURN;So;0;L;;;;;N;;;;; -1D199;MUSICAL SYMBOL TURN SLASH;So;0;L;;;;;N;;;;; -1D19A;MUSICAL SYMBOL TURN UP;So;0;L;;;;;N;;;;; -1D19B;MUSICAL SYMBOL ORNAMENT STROKE-1;So;0;L;;;;;N;;;;; -1D19C;MUSICAL SYMBOL ORNAMENT STROKE-2;So;0;L;;;;;N;;;;; -1D19D;MUSICAL SYMBOL ORNAMENT STROKE-3;So;0;L;;;;;N;;;;; -1D19E;MUSICAL SYMBOL ORNAMENT STROKE-4;So;0;L;;;;;N;;;;; -1D19F;MUSICAL SYMBOL ORNAMENT STROKE-5;So;0;L;;;;;N;;;;; -1D1A0;MUSICAL SYMBOL ORNAMENT STROKE-6;So;0;L;;;;;N;;;;; -1D1A1;MUSICAL SYMBOL ORNAMENT STROKE-7;So;0;L;;;;;N;;;;; -1D1A2;MUSICAL SYMBOL ORNAMENT STROKE-8;So;0;L;;;;;N;;;;; -1D1A3;MUSICAL SYMBOL ORNAMENT STROKE-9;So;0;L;;;;;N;;;;; -1D1A4;MUSICAL SYMBOL ORNAMENT STROKE-10;So;0;L;;;;;N;;;;; -1D1A5;MUSICAL SYMBOL ORNAMENT STROKE-11;So;0;L;;;;;N;;;;; -1D1A6;MUSICAL SYMBOL HAUPTSTIMME;So;0;L;;;;;N;;;;; -1D1A7;MUSICAL SYMBOL NEBENSTIMME;So;0;L;;;;;N;;;;; -1D1A8;MUSICAL SYMBOL END OF STIMME;So;0;L;;;;;N;;;;; -1D1A9;MUSICAL SYMBOL DEGREE SLASH;So;0;L;;;;;N;;;;; -1D1AA;MUSICAL SYMBOL COMBINING DOWN BOW;Mn;230;NSM;;;;;N;;;;; -1D1AB;MUSICAL SYMBOL COMBINING UP BOW;Mn;230;NSM;;;;;N;;;;; -1D1AC;MUSICAL SYMBOL COMBINING HARMONIC;Mn;230;NSM;;;;;N;;;;; -1D1AD;MUSICAL SYMBOL COMBINING SNAP PIZZICATO;Mn;230;NSM;;;;;N;;;;; -1D1AE;MUSICAL SYMBOL PEDAL MARK;So;0;L;;;;;N;;;;; -1D1AF;MUSICAL SYMBOL PEDAL UP MARK;So;0;L;;;;;N;;;;; -1D1B0;MUSICAL SYMBOL HALF PEDAL MARK;So;0;L;;;;;N;;;;; -1D1B1;MUSICAL SYMBOL GLISSANDO UP;So;0;L;;;;;N;;;;; -1D1B2;MUSICAL SYMBOL GLISSANDO DOWN;So;0;L;;;;;N;;;;; -1D1B3;MUSICAL SYMBOL WITH FINGERNAILS;So;0;L;;;;;N;;;;; -1D1B4;MUSICAL SYMBOL DAMP;So;0;L;;;;;N;;;;; -1D1B5;MUSICAL SYMBOL DAMP ALL;So;0;L;;;;;N;;;;; -1D1B6;MUSICAL SYMBOL MAXIMA;So;0;L;;;;;N;;;;; -1D1B7;MUSICAL SYMBOL LONGA;So;0;L;;;;;N;;;;; -1D1B8;MUSICAL SYMBOL BREVIS;So;0;L;;;;;N;;;;; -1D1B9;MUSICAL SYMBOL SEMIBREVIS WHITE;So;0;L;;;;;N;;;;; -1D1BA;MUSICAL SYMBOL SEMIBREVIS BLACK;So;0;L;;;;;N;;;;; -1D1BB;MUSICAL SYMBOL MINIMA;So;0;L;1D1B9 1D165;;;;N;;;;; -1D1BC;MUSICAL SYMBOL MINIMA BLACK;So;0;L;1D1BA 1D165;;;;N;;;;; -1D1BD;MUSICAL SYMBOL SEMIMINIMA WHITE;So;0;L;1D1BB 1D16E;;;;N;;;;; -1D1BE;MUSICAL SYMBOL SEMIMINIMA BLACK;So;0;L;1D1BC 1D16E;;;;N;;;;; -1D1BF;MUSICAL SYMBOL FUSA WHITE;So;0;L;1D1BB 1D16F;;;;N;;;;; -1D1C0;MUSICAL SYMBOL FUSA BLACK;So;0;L;1D1BC 1D16F;;;;N;;;;; -1D1C1;MUSICAL SYMBOL LONGA PERFECTA REST;So;0;L;;;;;N;;;;; -1D1C2;MUSICAL SYMBOL LONGA IMPERFECTA REST;So;0;L;;;;;N;;;;; -1D1C3;MUSICAL SYMBOL BREVIS REST;So;0;L;;;;;N;;;;; -1D1C4;MUSICAL SYMBOL SEMIBREVIS REST;So;0;L;;;;;N;;;;; -1D1C5;MUSICAL SYMBOL MINIMA REST;So;0;L;;;;;N;;;;; -1D1C6;MUSICAL SYMBOL SEMIMINIMA REST;So;0;L;;;;;N;;;;; -1D1C7;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE PERFECTA;So;0;L;;;;;N;;;;; -1D1C8;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE IMPERFECTA;So;0;L;;;;;N;;;;; -1D1C9;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE PERFECTA DIMINUTION-1;So;0;L;;;;;N;;;;; -1D1CA;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE PERFECTA;So;0;L;;;;;N;;;;; -1D1CB;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA;So;0;L;;;;;N;;;;; -1D1CC;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-1;So;0;L;;;;;N;;;;; -1D1CD;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-2;So;0;L;;;;;N;;;;; -1D1CE;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-3;So;0;L;;;;;N;;;;; -1D1CF;MUSICAL SYMBOL CROIX;So;0;L;;;;;N;;;;; -1D1D0;MUSICAL SYMBOL GREGORIAN C CLEF;So;0;L;;;;;N;;;;; -1D1D1;MUSICAL SYMBOL GREGORIAN F CLEF;So;0;L;;;;;N;;;;; -1D1D2;MUSICAL SYMBOL SQUARE B;So;0;L;;;;;N;;;;; -1D1D3;MUSICAL SYMBOL VIRGA;So;0;L;;;;;N;;;;; -1D1D4;MUSICAL SYMBOL PODATUS;So;0;L;;;;;N;;;;; -1D1D5;MUSICAL SYMBOL CLIVIS;So;0;L;;;;;N;;;;; -1D1D6;MUSICAL SYMBOL SCANDICUS;So;0;L;;;;;N;;;;; -1D1D7;MUSICAL SYMBOL CLIMACUS;So;0;L;;;;;N;;;;; -1D1D8;MUSICAL SYMBOL TORCULUS;So;0;L;;;;;N;;;;; -1D1D9;MUSICAL SYMBOL PORRECTUS;So;0;L;;;;;N;;;;; -1D1DA;MUSICAL SYMBOL PORRECTUS FLEXUS;So;0;L;;;;;N;;;;; -1D1DB;MUSICAL SYMBOL SCANDICUS FLEXUS;So;0;L;;;;;N;;;;; -1D1DC;MUSICAL SYMBOL TORCULUS RESUPINUS;So;0;L;;;;;N;;;;; -1D1DD;MUSICAL SYMBOL PES SUBPUNCTIS;So;0;L;;;;;N;;;;; -1D400;MATHEMATICAL BOLD CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D401;MATHEMATICAL BOLD CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D402;MATHEMATICAL BOLD CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D403;MATHEMATICAL BOLD CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D404;MATHEMATICAL BOLD CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D405;MATHEMATICAL BOLD CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D406;MATHEMATICAL BOLD CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D407;MATHEMATICAL BOLD CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D408;MATHEMATICAL BOLD CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D409;MATHEMATICAL BOLD CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D40A;MATHEMATICAL BOLD CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D40B;MATHEMATICAL BOLD CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D40C;MATHEMATICAL BOLD CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D40D;MATHEMATICAL BOLD CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D40E;MATHEMATICAL BOLD CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D40F;MATHEMATICAL BOLD CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D410;MATHEMATICAL BOLD CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D411;MATHEMATICAL BOLD CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D412;MATHEMATICAL BOLD CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D413;MATHEMATICAL BOLD CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D414;MATHEMATICAL BOLD CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D415;MATHEMATICAL BOLD CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D416;MATHEMATICAL BOLD CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D417;MATHEMATICAL BOLD CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D418;MATHEMATICAL BOLD CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D419;MATHEMATICAL BOLD CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D41A;MATHEMATICAL BOLD SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D41B;MATHEMATICAL BOLD SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D41C;MATHEMATICAL BOLD SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D41D;MATHEMATICAL BOLD SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D41E;MATHEMATICAL BOLD SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D41F;MATHEMATICAL BOLD SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D420;MATHEMATICAL BOLD SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D421;MATHEMATICAL BOLD SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D422;MATHEMATICAL BOLD SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D423;MATHEMATICAL BOLD SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D424;MATHEMATICAL BOLD SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D425;MATHEMATICAL BOLD SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D426;MATHEMATICAL BOLD SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D427;MATHEMATICAL BOLD SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D428;MATHEMATICAL BOLD SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D429;MATHEMATICAL BOLD SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D42A;MATHEMATICAL BOLD SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D42B;MATHEMATICAL BOLD SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D42C;MATHEMATICAL BOLD SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D42D;MATHEMATICAL BOLD SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D42E;MATHEMATICAL BOLD SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D42F;MATHEMATICAL BOLD SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D430;MATHEMATICAL BOLD SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D431;MATHEMATICAL BOLD SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D432;MATHEMATICAL BOLD SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D433;MATHEMATICAL BOLD SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D434;MATHEMATICAL ITALIC CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D435;MATHEMATICAL ITALIC CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D436;MATHEMATICAL ITALIC CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D437;MATHEMATICAL ITALIC CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D438;MATHEMATICAL ITALIC CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D439;MATHEMATICAL ITALIC CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D43A;MATHEMATICAL ITALIC CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D43B;MATHEMATICAL ITALIC CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D43C;MATHEMATICAL ITALIC CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D43D;MATHEMATICAL ITALIC CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D43E;MATHEMATICAL ITALIC CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D43F;MATHEMATICAL ITALIC CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D440;MATHEMATICAL ITALIC CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D441;MATHEMATICAL ITALIC CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D442;MATHEMATICAL ITALIC CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D443;MATHEMATICAL ITALIC CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D444;MATHEMATICAL ITALIC CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D445;MATHEMATICAL ITALIC CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D446;MATHEMATICAL ITALIC CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D447;MATHEMATICAL ITALIC CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D448;MATHEMATICAL ITALIC CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D449;MATHEMATICAL ITALIC CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D44A;MATHEMATICAL ITALIC CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D44B;MATHEMATICAL ITALIC CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D44C;MATHEMATICAL ITALIC CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D44D;MATHEMATICAL ITALIC CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D44E;MATHEMATICAL ITALIC SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D44F;MATHEMATICAL ITALIC SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D450;MATHEMATICAL ITALIC SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D451;MATHEMATICAL ITALIC SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D452;MATHEMATICAL ITALIC SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D453;MATHEMATICAL ITALIC SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D454;MATHEMATICAL ITALIC SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D456;MATHEMATICAL ITALIC SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D457;MATHEMATICAL ITALIC SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D458;MATHEMATICAL ITALIC SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D459;MATHEMATICAL ITALIC SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D45A;MATHEMATICAL ITALIC SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D45B;MATHEMATICAL ITALIC SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D45C;MATHEMATICAL ITALIC SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D45D;MATHEMATICAL ITALIC SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D45E;MATHEMATICAL ITALIC SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D45F;MATHEMATICAL ITALIC SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D460;MATHEMATICAL ITALIC SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D461;MATHEMATICAL ITALIC SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D462;MATHEMATICAL ITALIC SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D463;MATHEMATICAL ITALIC SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D464;MATHEMATICAL ITALIC SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D465;MATHEMATICAL ITALIC SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D466;MATHEMATICAL ITALIC SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D467;MATHEMATICAL ITALIC SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D468;MATHEMATICAL BOLD ITALIC CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D469;MATHEMATICAL BOLD ITALIC CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D46A;MATHEMATICAL BOLD ITALIC CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D46B;MATHEMATICAL BOLD ITALIC CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D46C;MATHEMATICAL BOLD ITALIC CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D46D;MATHEMATICAL BOLD ITALIC CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D46E;MATHEMATICAL BOLD ITALIC CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D46F;MATHEMATICAL BOLD ITALIC CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D470;MATHEMATICAL BOLD ITALIC CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D471;MATHEMATICAL BOLD ITALIC CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D472;MATHEMATICAL BOLD ITALIC CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D473;MATHEMATICAL BOLD ITALIC CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D474;MATHEMATICAL BOLD ITALIC CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D475;MATHEMATICAL BOLD ITALIC CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D476;MATHEMATICAL BOLD ITALIC CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D477;MATHEMATICAL BOLD ITALIC CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D478;MATHEMATICAL BOLD ITALIC CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D479;MATHEMATICAL BOLD ITALIC CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D47A;MATHEMATICAL BOLD ITALIC CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D47B;MATHEMATICAL BOLD ITALIC CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D47C;MATHEMATICAL BOLD ITALIC CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D47D;MATHEMATICAL BOLD ITALIC CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D47E;MATHEMATICAL BOLD ITALIC CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D47F;MATHEMATICAL BOLD ITALIC CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D480;MATHEMATICAL BOLD ITALIC CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D481;MATHEMATICAL BOLD ITALIC CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D482;MATHEMATICAL BOLD ITALIC SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D483;MATHEMATICAL BOLD ITALIC SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D484;MATHEMATICAL BOLD ITALIC SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D485;MATHEMATICAL BOLD ITALIC SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D486;MATHEMATICAL BOLD ITALIC SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D487;MATHEMATICAL BOLD ITALIC SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D488;MATHEMATICAL BOLD ITALIC SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D489;MATHEMATICAL BOLD ITALIC SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D48A;MATHEMATICAL BOLD ITALIC SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D48B;MATHEMATICAL BOLD ITALIC SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D48C;MATHEMATICAL BOLD ITALIC SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D48D;MATHEMATICAL BOLD ITALIC SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D48E;MATHEMATICAL BOLD ITALIC SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D48F;MATHEMATICAL BOLD ITALIC SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D490;MATHEMATICAL BOLD ITALIC SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D491;MATHEMATICAL BOLD ITALIC SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D492;MATHEMATICAL BOLD ITALIC SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D493;MATHEMATICAL BOLD ITALIC SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D494;MATHEMATICAL BOLD ITALIC SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D495;MATHEMATICAL BOLD ITALIC SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D496;MATHEMATICAL BOLD ITALIC SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D497;MATHEMATICAL BOLD ITALIC SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D498;MATHEMATICAL BOLD ITALIC SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D499;MATHEMATICAL BOLD ITALIC SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D49A;MATHEMATICAL BOLD ITALIC SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D49B;MATHEMATICAL BOLD ITALIC SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D49C;MATHEMATICAL SCRIPT CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D49E;MATHEMATICAL SCRIPT CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D49F;MATHEMATICAL SCRIPT CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D4A2;MATHEMATICAL SCRIPT CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D4A5;MATHEMATICAL SCRIPT CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D4A6;MATHEMATICAL SCRIPT CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D4A9;MATHEMATICAL SCRIPT CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D4AA;MATHEMATICAL SCRIPT CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D4AB;MATHEMATICAL SCRIPT CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D4AC;MATHEMATICAL SCRIPT CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D4AE;MATHEMATICAL SCRIPT CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D4AF;MATHEMATICAL SCRIPT CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D4B0;MATHEMATICAL SCRIPT CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D4B1;MATHEMATICAL SCRIPT CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D4B2;MATHEMATICAL SCRIPT CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D4B3;MATHEMATICAL SCRIPT CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D4B4;MATHEMATICAL SCRIPT CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D4B5;MATHEMATICAL SCRIPT CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D4B6;MATHEMATICAL SCRIPT SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D4B7;MATHEMATICAL SCRIPT SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D4B8;MATHEMATICAL SCRIPT SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D4B9;MATHEMATICAL SCRIPT SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D4BB;MATHEMATICAL SCRIPT SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D4BD;MATHEMATICAL SCRIPT SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D4BE;MATHEMATICAL SCRIPT SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D4BF;MATHEMATICAL SCRIPT SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D4C0;MATHEMATICAL SCRIPT SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D4C2;MATHEMATICAL SCRIPT SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D4C3;MATHEMATICAL SCRIPT SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D4C5;MATHEMATICAL SCRIPT SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D4C6;MATHEMATICAL SCRIPT SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D4C7;MATHEMATICAL SCRIPT SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D4C8;MATHEMATICAL SCRIPT SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D4C9;MATHEMATICAL SCRIPT SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D4CA;MATHEMATICAL SCRIPT SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D4CB;MATHEMATICAL SCRIPT SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D4CC;MATHEMATICAL SCRIPT SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D4CD;MATHEMATICAL SCRIPT SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D4CE;MATHEMATICAL SCRIPT SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D4CF;MATHEMATICAL SCRIPT SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D4D0;MATHEMATICAL BOLD SCRIPT CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D4D1;MATHEMATICAL BOLD SCRIPT CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D4D2;MATHEMATICAL BOLD SCRIPT CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D4D3;MATHEMATICAL BOLD SCRIPT CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D4D4;MATHEMATICAL BOLD SCRIPT CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D4D5;MATHEMATICAL BOLD SCRIPT CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D4D6;MATHEMATICAL BOLD SCRIPT CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D4D7;MATHEMATICAL BOLD SCRIPT CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D4D8;MATHEMATICAL BOLD SCRIPT CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D4D9;MATHEMATICAL BOLD SCRIPT CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D4DA;MATHEMATICAL BOLD SCRIPT CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D4DB;MATHEMATICAL BOLD SCRIPT CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D4DC;MATHEMATICAL BOLD SCRIPT CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D4DD;MATHEMATICAL BOLD SCRIPT CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D4DE;MATHEMATICAL BOLD SCRIPT CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D4DF;MATHEMATICAL BOLD SCRIPT CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D4E0;MATHEMATICAL BOLD SCRIPT CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D4E1;MATHEMATICAL BOLD SCRIPT CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D4E2;MATHEMATICAL BOLD SCRIPT CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D4E3;MATHEMATICAL BOLD SCRIPT CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D4E4;MATHEMATICAL BOLD SCRIPT CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D4E5;MATHEMATICAL BOLD SCRIPT CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D4E6;MATHEMATICAL BOLD SCRIPT CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D4E7;MATHEMATICAL BOLD SCRIPT CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D4E8;MATHEMATICAL BOLD SCRIPT CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D4E9;MATHEMATICAL BOLD SCRIPT CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D4EA;MATHEMATICAL BOLD SCRIPT SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D4EB;MATHEMATICAL BOLD SCRIPT SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D4EC;MATHEMATICAL BOLD SCRIPT SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D4ED;MATHEMATICAL BOLD SCRIPT SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D4EE;MATHEMATICAL BOLD SCRIPT SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D4EF;MATHEMATICAL BOLD SCRIPT SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D4F0;MATHEMATICAL BOLD SCRIPT SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D4F1;MATHEMATICAL BOLD SCRIPT SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D4F2;MATHEMATICAL BOLD SCRIPT SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D4F3;MATHEMATICAL BOLD SCRIPT SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D4F4;MATHEMATICAL BOLD SCRIPT SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D4F5;MATHEMATICAL BOLD SCRIPT SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D4F6;MATHEMATICAL BOLD SCRIPT SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D4F7;MATHEMATICAL BOLD SCRIPT SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D4F8;MATHEMATICAL BOLD SCRIPT SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D4F9;MATHEMATICAL BOLD SCRIPT SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D4FA;MATHEMATICAL BOLD SCRIPT SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D4FB;MATHEMATICAL BOLD SCRIPT SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D4FC;MATHEMATICAL BOLD SCRIPT SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D4FD;MATHEMATICAL BOLD SCRIPT SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D4FE;MATHEMATICAL BOLD SCRIPT SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D4FF;MATHEMATICAL BOLD SCRIPT SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D500;MATHEMATICAL BOLD SCRIPT SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D501;MATHEMATICAL BOLD SCRIPT SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D502;MATHEMATICAL BOLD SCRIPT SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D503;MATHEMATICAL BOLD SCRIPT SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D504;MATHEMATICAL FRAKTUR CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D505;MATHEMATICAL FRAKTUR CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D507;MATHEMATICAL FRAKTUR CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D508;MATHEMATICAL FRAKTUR CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D509;MATHEMATICAL FRAKTUR CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D50A;MATHEMATICAL FRAKTUR CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D50D;MATHEMATICAL FRAKTUR CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D50E;MATHEMATICAL FRAKTUR CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D50F;MATHEMATICAL FRAKTUR CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D510;MATHEMATICAL FRAKTUR CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D511;MATHEMATICAL FRAKTUR CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D512;MATHEMATICAL FRAKTUR CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D513;MATHEMATICAL FRAKTUR CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D514;MATHEMATICAL FRAKTUR CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D516;MATHEMATICAL FRAKTUR CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D517;MATHEMATICAL FRAKTUR CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D518;MATHEMATICAL FRAKTUR CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D519;MATHEMATICAL FRAKTUR CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D51A;MATHEMATICAL FRAKTUR CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D51B;MATHEMATICAL FRAKTUR CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D51C;MATHEMATICAL FRAKTUR CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D51E;MATHEMATICAL FRAKTUR SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D51F;MATHEMATICAL FRAKTUR SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D520;MATHEMATICAL FRAKTUR SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D521;MATHEMATICAL FRAKTUR SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D522;MATHEMATICAL FRAKTUR SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D523;MATHEMATICAL FRAKTUR SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D524;MATHEMATICAL FRAKTUR SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D525;MATHEMATICAL FRAKTUR SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D526;MATHEMATICAL FRAKTUR SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D527;MATHEMATICAL FRAKTUR SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D528;MATHEMATICAL FRAKTUR SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D529;MATHEMATICAL FRAKTUR SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D52A;MATHEMATICAL FRAKTUR SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D52B;MATHEMATICAL FRAKTUR SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D52C;MATHEMATICAL FRAKTUR SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D52D;MATHEMATICAL FRAKTUR SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D52E;MATHEMATICAL FRAKTUR SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D52F;MATHEMATICAL FRAKTUR SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D530;MATHEMATICAL FRAKTUR SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D531;MATHEMATICAL FRAKTUR SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D532;MATHEMATICAL FRAKTUR SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D533;MATHEMATICAL FRAKTUR SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D534;MATHEMATICAL FRAKTUR SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D535;MATHEMATICAL FRAKTUR SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D536;MATHEMATICAL FRAKTUR SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D537;MATHEMATICAL FRAKTUR SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D538;MATHEMATICAL DOUBLE-STRUCK CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D539;MATHEMATICAL DOUBLE-STRUCK CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D53B;MATHEMATICAL DOUBLE-STRUCK CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D53C;MATHEMATICAL DOUBLE-STRUCK CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D53D;MATHEMATICAL DOUBLE-STRUCK CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D53E;MATHEMATICAL DOUBLE-STRUCK CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D540;MATHEMATICAL DOUBLE-STRUCK CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D541;MATHEMATICAL DOUBLE-STRUCK CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D542;MATHEMATICAL DOUBLE-STRUCK CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D543;MATHEMATICAL DOUBLE-STRUCK CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D544;MATHEMATICAL DOUBLE-STRUCK CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D546;MATHEMATICAL DOUBLE-STRUCK CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D54A;MATHEMATICAL DOUBLE-STRUCK CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D54B;MATHEMATICAL DOUBLE-STRUCK CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D54C;MATHEMATICAL DOUBLE-STRUCK CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D54D;MATHEMATICAL DOUBLE-STRUCK CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D54E;MATHEMATICAL DOUBLE-STRUCK CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D54F;MATHEMATICAL DOUBLE-STRUCK CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D550;MATHEMATICAL DOUBLE-STRUCK CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D552;MATHEMATICAL DOUBLE-STRUCK SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D553;MATHEMATICAL DOUBLE-STRUCK SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D554;MATHEMATICAL DOUBLE-STRUCK SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D555;MATHEMATICAL DOUBLE-STRUCK SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D556;MATHEMATICAL DOUBLE-STRUCK SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D557;MATHEMATICAL DOUBLE-STRUCK SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D558;MATHEMATICAL DOUBLE-STRUCK SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D559;MATHEMATICAL DOUBLE-STRUCK SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D55A;MATHEMATICAL DOUBLE-STRUCK SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D55B;MATHEMATICAL DOUBLE-STRUCK SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D55C;MATHEMATICAL DOUBLE-STRUCK SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D55D;MATHEMATICAL DOUBLE-STRUCK SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D55E;MATHEMATICAL DOUBLE-STRUCK SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D55F;MATHEMATICAL DOUBLE-STRUCK SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D560;MATHEMATICAL DOUBLE-STRUCK SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D561;MATHEMATICAL DOUBLE-STRUCK SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D562;MATHEMATICAL DOUBLE-STRUCK SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D563;MATHEMATICAL DOUBLE-STRUCK SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D564;MATHEMATICAL DOUBLE-STRUCK SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D565;MATHEMATICAL DOUBLE-STRUCK SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D566;MATHEMATICAL DOUBLE-STRUCK SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D567;MATHEMATICAL DOUBLE-STRUCK SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D568;MATHEMATICAL DOUBLE-STRUCK SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D569;MATHEMATICAL DOUBLE-STRUCK SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D56A;MATHEMATICAL DOUBLE-STRUCK SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D56B;MATHEMATICAL DOUBLE-STRUCK SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D56C;MATHEMATICAL BOLD FRAKTUR CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D56D;MATHEMATICAL BOLD FRAKTUR CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D56E;MATHEMATICAL BOLD FRAKTUR CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D56F;MATHEMATICAL BOLD FRAKTUR CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D570;MATHEMATICAL BOLD FRAKTUR CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D571;MATHEMATICAL BOLD FRAKTUR CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D572;MATHEMATICAL BOLD FRAKTUR CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D573;MATHEMATICAL BOLD FRAKTUR CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D574;MATHEMATICAL BOLD FRAKTUR CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D575;MATHEMATICAL BOLD FRAKTUR CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D576;MATHEMATICAL BOLD FRAKTUR CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D577;MATHEMATICAL BOLD FRAKTUR CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D578;MATHEMATICAL BOLD FRAKTUR CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D579;MATHEMATICAL BOLD FRAKTUR CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D57A;MATHEMATICAL BOLD FRAKTUR CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D57B;MATHEMATICAL BOLD FRAKTUR CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D57C;MATHEMATICAL BOLD FRAKTUR CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D57D;MATHEMATICAL BOLD FRAKTUR CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D57E;MATHEMATICAL BOLD FRAKTUR CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D57F;MATHEMATICAL BOLD FRAKTUR CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D580;MATHEMATICAL BOLD FRAKTUR CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D581;MATHEMATICAL BOLD FRAKTUR CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D582;MATHEMATICAL BOLD FRAKTUR CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D583;MATHEMATICAL BOLD FRAKTUR CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D584;MATHEMATICAL BOLD FRAKTUR CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D585;MATHEMATICAL BOLD FRAKTUR CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D586;MATHEMATICAL BOLD FRAKTUR SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D587;MATHEMATICAL BOLD FRAKTUR SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D588;MATHEMATICAL BOLD FRAKTUR SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D589;MATHEMATICAL BOLD FRAKTUR SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D58A;MATHEMATICAL BOLD FRAKTUR SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D58B;MATHEMATICAL BOLD FRAKTUR SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D58C;MATHEMATICAL BOLD FRAKTUR SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D58D;MATHEMATICAL BOLD FRAKTUR SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D58E;MATHEMATICAL BOLD FRAKTUR SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D58F;MATHEMATICAL BOLD FRAKTUR SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D590;MATHEMATICAL BOLD FRAKTUR SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D591;MATHEMATICAL BOLD FRAKTUR SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D592;MATHEMATICAL BOLD FRAKTUR SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D593;MATHEMATICAL BOLD FRAKTUR SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D594;MATHEMATICAL BOLD FRAKTUR SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D595;MATHEMATICAL BOLD FRAKTUR SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D596;MATHEMATICAL BOLD FRAKTUR SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D597;MATHEMATICAL BOLD FRAKTUR SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D598;MATHEMATICAL BOLD FRAKTUR SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D599;MATHEMATICAL BOLD FRAKTUR SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D59A;MATHEMATICAL BOLD FRAKTUR SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D59B;MATHEMATICAL BOLD FRAKTUR SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D59C;MATHEMATICAL BOLD FRAKTUR SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D59D;MATHEMATICAL BOLD FRAKTUR SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D59E;MATHEMATICAL BOLD FRAKTUR SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D59F;MATHEMATICAL BOLD FRAKTUR SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D5A0;MATHEMATICAL SANS-SERIF CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D5A1;MATHEMATICAL SANS-SERIF CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D5A2;MATHEMATICAL SANS-SERIF CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D5A3;MATHEMATICAL SANS-SERIF CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D5A4;MATHEMATICAL SANS-SERIF CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D5A5;MATHEMATICAL SANS-SERIF CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D5A6;MATHEMATICAL SANS-SERIF CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D5A7;MATHEMATICAL SANS-SERIF CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D5A8;MATHEMATICAL SANS-SERIF CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D5A9;MATHEMATICAL SANS-SERIF CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D5AA;MATHEMATICAL SANS-SERIF CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D5AB;MATHEMATICAL SANS-SERIF CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D5AC;MATHEMATICAL SANS-SERIF CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D5AD;MATHEMATICAL SANS-SERIF CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D5AE;MATHEMATICAL SANS-SERIF CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D5AF;MATHEMATICAL SANS-SERIF CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D5B0;MATHEMATICAL SANS-SERIF CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D5B1;MATHEMATICAL SANS-SERIF CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D5B2;MATHEMATICAL SANS-SERIF CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D5B3;MATHEMATICAL SANS-SERIF CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D5B4;MATHEMATICAL SANS-SERIF CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D5B5;MATHEMATICAL SANS-SERIF CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D5B6;MATHEMATICAL SANS-SERIF CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D5B7;MATHEMATICAL SANS-SERIF CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D5B8;MATHEMATICAL SANS-SERIF CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D5B9;MATHEMATICAL SANS-SERIF CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D5BA;MATHEMATICAL SANS-SERIF SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D5BB;MATHEMATICAL SANS-SERIF SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D5BC;MATHEMATICAL SANS-SERIF SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D5BD;MATHEMATICAL SANS-SERIF SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D5BE;MATHEMATICAL SANS-SERIF SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D5BF;MATHEMATICAL SANS-SERIF SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D5C0;MATHEMATICAL SANS-SERIF SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D5C1;MATHEMATICAL SANS-SERIF SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D5C2;MATHEMATICAL SANS-SERIF SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D5C3;MATHEMATICAL SANS-SERIF SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D5C4;MATHEMATICAL SANS-SERIF SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D5C5;MATHEMATICAL SANS-SERIF SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D5C6;MATHEMATICAL SANS-SERIF SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D5C7;MATHEMATICAL SANS-SERIF SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D5C8;MATHEMATICAL SANS-SERIF SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D5C9;MATHEMATICAL SANS-SERIF SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D5CA;MATHEMATICAL SANS-SERIF SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D5CB;MATHEMATICAL SANS-SERIF SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D5CC;MATHEMATICAL SANS-SERIF SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D5CD;MATHEMATICAL SANS-SERIF SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D5CE;MATHEMATICAL SANS-SERIF SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D5CF;MATHEMATICAL SANS-SERIF SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D5D0;MATHEMATICAL SANS-SERIF SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D5D1;MATHEMATICAL SANS-SERIF SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D5D2;MATHEMATICAL SANS-SERIF SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D5D3;MATHEMATICAL SANS-SERIF SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D5D4;MATHEMATICAL SANS-SERIF BOLD CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D5D5;MATHEMATICAL SANS-SERIF BOLD CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D5D6;MATHEMATICAL SANS-SERIF BOLD CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D5D7;MATHEMATICAL SANS-SERIF BOLD CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D5D8;MATHEMATICAL SANS-SERIF BOLD CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D5D9;MATHEMATICAL SANS-SERIF BOLD CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D5DA;MATHEMATICAL SANS-SERIF BOLD CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D5DB;MATHEMATICAL SANS-SERIF BOLD CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D5DC;MATHEMATICAL SANS-SERIF BOLD CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D5DD;MATHEMATICAL SANS-SERIF BOLD CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D5DE;MATHEMATICAL SANS-SERIF BOLD CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D5DF;MATHEMATICAL SANS-SERIF BOLD CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D5E0;MATHEMATICAL SANS-SERIF BOLD CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D5E1;MATHEMATICAL SANS-SERIF BOLD CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D5E2;MATHEMATICAL SANS-SERIF BOLD CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D5E3;MATHEMATICAL SANS-SERIF BOLD CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D5E4;MATHEMATICAL SANS-SERIF BOLD CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D5E5;MATHEMATICAL SANS-SERIF BOLD CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D5E6;MATHEMATICAL SANS-SERIF BOLD CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D5E7;MATHEMATICAL SANS-SERIF BOLD CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D5E8;MATHEMATICAL SANS-SERIF BOLD CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D5E9;MATHEMATICAL SANS-SERIF BOLD CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D5EA;MATHEMATICAL SANS-SERIF BOLD CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D5EB;MATHEMATICAL SANS-SERIF BOLD CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D5EC;MATHEMATICAL SANS-SERIF BOLD CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D5ED;MATHEMATICAL SANS-SERIF BOLD CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D5EE;MATHEMATICAL SANS-SERIF BOLD SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D5EF;MATHEMATICAL SANS-SERIF BOLD SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D5F0;MATHEMATICAL SANS-SERIF BOLD SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D5F1;MATHEMATICAL SANS-SERIF BOLD SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D5F2;MATHEMATICAL SANS-SERIF BOLD SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D5F3;MATHEMATICAL SANS-SERIF BOLD SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D5F4;MATHEMATICAL SANS-SERIF BOLD SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D5F5;MATHEMATICAL SANS-SERIF BOLD SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D5F6;MATHEMATICAL SANS-SERIF BOLD SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D5F7;MATHEMATICAL SANS-SERIF BOLD SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D5F8;MATHEMATICAL SANS-SERIF BOLD SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D5F9;MATHEMATICAL SANS-SERIF BOLD SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D5FA;MATHEMATICAL SANS-SERIF BOLD SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D5FB;MATHEMATICAL SANS-SERIF BOLD SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D5FC;MATHEMATICAL SANS-SERIF BOLD SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D5FD;MATHEMATICAL SANS-SERIF BOLD SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D5FE;MATHEMATICAL SANS-SERIF BOLD SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D5FF;MATHEMATICAL SANS-SERIF BOLD SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D600;MATHEMATICAL SANS-SERIF BOLD SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D601;MATHEMATICAL SANS-SERIF BOLD SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D602;MATHEMATICAL SANS-SERIF BOLD SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D603;MATHEMATICAL SANS-SERIF BOLD SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D604;MATHEMATICAL SANS-SERIF BOLD SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D605;MATHEMATICAL SANS-SERIF BOLD SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D606;MATHEMATICAL SANS-SERIF BOLD SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D607;MATHEMATICAL SANS-SERIF BOLD SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D608;MATHEMATICAL SANS-SERIF ITALIC CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D609;MATHEMATICAL SANS-SERIF ITALIC CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D60A;MATHEMATICAL SANS-SERIF ITALIC CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D60B;MATHEMATICAL SANS-SERIF ITALIC CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D60C;MATHEMATICAL SANS-SERIF ITALIC CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D60D;MATHEMATICAL SANS-SERIF ITALIC CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D60E;MATHEMATICAL SANS-SERIF ITALIC CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D60F;MATHEMATICAL SANS-SERIF ITALIC CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D610;MATHEMATICAL SANS-SERIF ITALIC CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D611;MATHEMATICAL SANS-SERIF ITALIC CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D612;MATHEMATICAL SANS-SERIF ITALIC CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D613;MATHEMATICAL SANS-SERIF ITALIC CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D614;MATHEMATICAL SANS-SERIF ITALIC CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D615;MATHEMATICAL SANS-SERIF ITALIC CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D616;MATHEMATICAL SANS-SERIF ITALIC CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D617;MATHEMATICAL SANS-SERIF ITALIC CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D618;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D619;MATHEMATICAL SANS-SERIF ITALIC CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D61A;MATHEMATICAL SANS-SERIF ITALIC CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D61B;MATHEMATICAL SANS-SERIF ITALIC CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D61C;MATHEMATICAL SANS-SERIF ITALIC CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D61D;MATHEMATICAL SANS-SERIF ITALIC CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D61E;MATHEMATICAL SANS-SERIF ITALIC CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D61F;MATHEMATICAL SANS-SERIF ITALIC CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D620;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D621;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D622;MATHEMATICAL SANS-SERIF ITALIC SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D623;MATHEMATICAL SANS-SERIF ITALIC SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D624;MATHEMATICAL SANS-SERIF ITALIC SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D625;MATHEMATICAL SANS-SERIF ITALIC SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D626;MATHEMATICAL SANS-SERIF ITALIC SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D627;MATHEMATICAL SANS-SERIF ITALIC SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D628;MATHEMATICAL SANS-SERIF ITALIC SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D629;MATHEMATICAL SANS-SERIF ITALIC SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D62A;MATHEMATICAL SANS-SERIF ITALIC SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D62B;MATHEMATICAL SANS-SERIF ITALIC SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D62C;MATHEMATICAL SANS-SERIF ITALIC SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D62D;MATHEMATICAL SANS-SERIF ITALIC SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D62E;MATHEMATICAL SANS-SERIF ITALIC SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D62F;MATHEMATICAL SANS-SERIF ITALIC SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D630;MATHEMATICAL SANS-SERIF ITALIC SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D631;MATHEMATICAL SANS-SERIF ITALIC SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D632;MATHEMATICAL SANS-SERIF ITALIC SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D633;MATHEMATICAL SANS-SERIF ITALIC SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D634;MATHEMATICAL SANS-SERIF ITALIC SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D635;MATHEMATICAL SANS-SERIF ITALIC SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D636;MATHEMATICAL SANS-SERIF ITALIC SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D637;MATHEMATICAL SANS-SERIF ITALIC SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D638;MATHEMATICAL SANS-SERIF ITALIC SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D639;MATHEMATICAL SANS-SERIF ITALIC SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D63A;MATHEMATICAL SANS-SERIF ITALIC SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D63B;MATHEMATICAL SANS-SERIF ITALIC SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D63C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D63D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D63E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D63F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D640;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D641;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D642;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D643;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D644;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D645;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D646;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D647;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D648;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D649;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D64A;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D64B;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D64C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D64D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D64E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D64F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D650;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D651;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D652;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D653;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D654;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D655;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D656;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D657;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D658;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D659;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D65A;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D65B;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D65C;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D65D;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D65E;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D65F;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D660;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D661;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D662;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D663;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D664;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D665;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D666;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D667;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D668;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D669;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D66A;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D66B;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D66C;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D66D;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D66E;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D66F;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D670;MATHEMATICAL MONOSPACE CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;; -1D671;MATHEMATICAL MONOSPACE CAPITAL B;Lu;0;L;<font> 0042;;;;N;;;;; -1D672;MATHEMATICAL MONOSPACE CAPITAL C;Lu;0;L;<font> 0043;;;;N;;;;; -1D673;MATHEMATICAL MONOSPACE CAPITAL D;Lu;0;L;<font> 0044;;;;N;;;;; -1D674;MATHEMATICAL MONOSPACE CAPITAL E;Lu;0;L;<font> 0045;;;;N;;;;; -1D675;MATHEMATICAL MONOSPACE CAPITAL F;Lu;0;L;<font> 0046;;;;N;;;;; -1D676;MATHEMATICAL MONOSPACE CAPITAL G;Lu;0;L;<font> 0047;;;;N;;;;; -1D677;MATHEMATICAL MONOSPACE CAPITAL H;Lu;0;L;<font> 0048;;;;N;;;;; -1D678;MATHEMATICAL MONOSPACE CAPITAL I;Lu;0;L;<font> 0049;;;;N;;;;; -1D679;MATHEMATICAL MONOSPACE CAPITAL J;Lu;0;L;<font> 004A;;;;N;;;;; -1D67A;MATHEMATICAL MONOSPACE CAPITAL K;Lu;0;L;<font> 004B;;;;N;;;;; -1D67B;MATHEMATICAL MONOSPACE CAPITAL L;Lu;0;L;<font> 004C;;;;N;;;;; -1D67C;MATHEMATICAL MONOSPACE CAPITAL M;Lu;0;L;<font> 004D;;;;N;;;;; -1D67D;MATHEMATICAL MONOSPACE CAPITAL N;Lu;0;L;<font> 004E;;;;N;;;;; -1D67E;MATHEMATICAL MONOSPACE CAPITAL O;Lu;0;L;<font> 004F;;;;N;;;;; -1D67F;MATHEMATICAL MONOSPACE CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;; -1D680;MATHEMATICAL MONOSPACE CAPITAL Q;Lu;0;L;<font> 0051;;;;N;;;;; -1D681;MATHEMATICAL MONOSPACE CAPITAL R;Lu;0;L;<font> 0052;;;;N;;;;; -1D682;MATHEMATICAL MONOSPACE CAPITAL S;Lu;0;L;<font> 0053;;;;N;;;;; -1D683;MATHEMATICAL MONOSPACE CAPITAL T;Lu;0;L;<font> 0054;;;;N;;;;; -1D684;MATHEMATICAL MONOSPACE CAPITAL U;Lu;0;L;<font> 0055;;;;N;;;;; -1D685;MATHEMATICAL MONOSPACE CAPITAL V;Lu;0;L;<font> 0056;;;;N;;;;; -1D686;MATHEMATICAL MONOSPACE CAPITAL W;Lu;0;L;<font> 0057;;;;N;;;;; -1D687;MATHEMATICAL MONOSPACE CAPITAL X;Lu;0;L;<font> 0058;;;;N;;;;; -1D688;MATHEMATICAL MONOSPACE CAPITAL Y;Lu;0;L;<font> 0059;;;;N;;;;; -1D689;MATHEMATICAL MONOSPACE CAPITAL Z;Lu;0;L;<font> 005A;;;;N;;;;; -1D68A;MATHEMATICAL MONOSPACE SMALL A;Ll;0;L;<font> 0061;;;;N;;;;; -1D68B;MATHEMATICAL MONOSPACE SMALL B;Ll;0;L;<font> 0062;;;;N;;;;; -1D68C;MATHEMATICAL MONOSPACE SMALL C;Ll;0;L;<font> 0063;;;;N;;;;; -1D68D;MATHEMATICAL MONOSPACE SMALL D;Ll;0;L;<font> 0064;;;;N;;;;; -1D68E;MATHEMATICAL MONOSPACE SMALL E;Ll;0;L;<font> 0065;;;;N;;;;; -1D68F;MATHEMATICAL MONOSPACE SMALL F;Ll;0;L;<font> 0066;;;;N;;;;; -1D690;MATHEMATICAL MONOSPACE SMALL G;Ll;0;L;<font> 0067;;;;N;;;;; -1D691;MATHEMATICAL MONOSPACE SMALL H;Ll;0;L;<font> 0068;;;;N;;;;; -1D692;MATHEMATICAL MONOSPACE SMALL I;Ll;0;L;<font> 0069;;;;N;;;;; -1D693;MATHEMATICAL MONOSPACE SMALL J;Ll;0;L;<font> 006A;;;;N;;;;; -1D694;MATHEMATICAL MONOSPACE SMALL K;Ll;0;L;<font> 006B;;;;N;;;;; -1D695;MATHEMATICAL MONOSPACE SMALL L;Ll;0;L;<font> 006C;;;;N;;;;; -1D696;MATHEMATICAL MONOSPACE SMALL M;Ll;0;L;<font> 006D;;;;N;;;;; -1D697;MATHEMATICAL MONOSPACE SMALL N;Ll;0;L;<font> 006E;;;;N;;;;; -1D698;MATHEMATICAL MONOSPACE SMALL O;Ll;0;L;<font> 006F;;;;N;;;;; -1D699;MATHEMATICAL MONOSPACE SMALL P;Ll;0;L;<font> 0070;;;;N;;;;; -1D69A;MATHEMATICAL MONOSPACE SMALL Q;Ll;0;L;<font> 0071;;;;N;;;;; -1D69B;MATHEMATICAL MONOSPACE SMALL R;Ll;0;L;<font> 0072;;;;N;;;;; -1D69C;MATHEMATICAL MONOSPACE SMALL S;Ll;0;L;<font> 0073;;;;N;;;;; -1D69D;MATHEMATICAL MONOSPACE SMALL T;Ll;0;L;<font> 0074;;;;N;;;;; -1D69E;MATHEMATICAL MONOSPACE SMALL U;Ll;0;L;<font> 0075;;;;N;;;;; -1D69F;MATHEMATICAL MONOSPACE SMALL V;Ll;0;L;<font> 0076;;;;N;;;;; -1D6A0;MATHEMATICAL MONOSPACE SMALL W;Ll;0;L;<font> 0077;;;;N;;;;; -1D6A1;MATHEMATICAL MONOSPACE SMALL X;Ll;0;L;<font> 0078;;;;N;;;;; -1D6A2;MATHEMATICAL MONOSPACE SMALL Y;Ll;0;L;<font> 0079;;;;N;;;;; -1D6A3;MATHEMATICAL MONOSPACE SMALL Z;Ll;0;L;<font> 007A;;;;N;;;;; -1D6A8;MATHEMATICAL BOLD CAPITAL ALPHA;Lu;0;L;<font> 0391;;;;N;;;;; -1D6A9;MATHEMATICAL BOLD CAPITAL BETA;Lu;0;L;<font> 0392;;;;N;;;;; -1D6AA;MATHEMATICAL BOLD CAPITAL GAMMA;Lu;0;L;<font> 0393;;;;N;;;;; -1D6AB;MATHEMATICAL BOLD CAPITAL DELTA;Lu;0;L;<font> 0394;;;;N;;;;; -1D6AC;MATHEMATICAL BOLD CAPITAL EPSILON;Lu;0;L;<font> 0395;;;;N;;;;; -1D6AD;MATHEMATICAL BOLD CAPITAL ZETA;Lu;0;L;<font> 0396;;;;N;;;;; -1D6AE;MATHEMATICAL BOLD CAPITAL ETA;Lu;0;L;<font> 0397;;;;N;;;;; -1D6AF;MATHEMATICAL BOLD CAPITAL THETA;Lu;0;L;<font> 0398;;;;N;;;;; -1D6B0;MATHEMATICAL BOLD CAPITAL IOTA;Lu;0;L;<font> 0399;;;;N;;;;; -1D6B1;MATHEMATICAL BOLD CAPITAL KAPPA;Lu;0;L;<font> 039A;;;;N;;;;; -1D6B2;MATHEMATICAL BOLD CAPITAL LAMDA;Lu;0;L;<font> 039B;;;;N;;;;; -1D6B3;MATHEMATICAL BOLD CAPITAL MU;Lu;0;L;<font> 039C;;;;N;;;;; -1D6B4;MATHEMATICAL BOLD CAPITAL NU;Lu;0;L;<font> 039D;;;;N;;;;; -1D6B5;MATHEMATICAL BOLD CAPITAL XI;Lu;0;L;<font> 039E;;;;N;;;;; -1D6B6;MATHEMATICAL BOLD CAPITAL OMICRON;Lu;0;L;<font> 039F;;;;N;;;;; -1D6B7;MATHEMATICAL BOLD CAPITAL PI;Lu;0;L;<font> 03A0;;;;N;;;;; -1D6B8;MATHEMATICAL BOLD CAPITAL RHO;Lu;0;L;<font> 03A1;;;;N;;;;; -1D6B9;MATHEMATICAL BOLD CAPITAL THETA SYMBOL;Lu;0;L;<font> 03F4;;;;N;;;;; -1D6BA;MATHEMATICAL BOLD CAPITAL SIGMA;Lu;0;L;<font> 03A3;;;;N;;;;; -1D6BB;MATHEMATICAL BOLD CAPITAL TAU;Lu;0;L;<font> 03A4;;;;N;;;;; -1D6BC;MATHEMATICAL BOLD CAPITAL UPSILON;Lu;0;L;<font> 03A5;;;;N;;;;; -1D6BD;MATHEMATICAL BOLD CAPITAL PHI;Lu;0;L;<font> 03A6;;;;N;;;;; -1D6BE;MATHEMATICAL BOLD CAPITAL CHI;Lu;0;L;<font> 03A7;;;;N;;;;; -1D6BF;MATHEMATICAL BOLD CAPITAL PSI;Lu;0;L;<font> 03A8;;;;N;;;;; -1D6C0;MATHEMATICAL BOLD CAPITAL OMEGA;Lu;0;L;<font> 03A9;;;;N;;;;; -1D6C1;MATHEMATICAL BOLD NABLA;Sm;0;L;<font> 2207;;;;N;;;;; -1D6C2;MATHEMATICAL BOLD SMALL ALPHA;Ll;0;L;<font> 03B1;;;;N;;;;; -1D6C3;MATHEMATICAL BOLD SMALL BETA;Ll;0;L;<font> 03B2;;;;N;;;;; -1D6C4;MATHEMATICAL BOLD SMALL GAMMA;Ll;0;L;<font> 03B3;;;;N;;;;; -1D6C5;MATHEMATICAL BOLD SMALL DELTA;Ll;0;L;<font> 03B4;;;;N;;;;; -1D6C6;MATHEMATICAL BOLD SMALL EPSILON;Ll;0;L;<font> 03B5;;;;N;;;;; -1D6C7;MATHEMATICAL BOLD SMALL ZETA;Ll;0;L;<font> 03B6;;;;N;;;;; -1D6C8;MATHEMATICAL BOLD SMALL ETA;Ll;0;L;<font> 03B7;;;;N;;;;; -1D6C9;MATHEMATICAL BOLD SMALL THETA;Ll;0;L;<font> 03B8;;;;N;;;;; -1D6CA;MATHEMATICAL BOLD SMALL IOTA;Ll;0;L;<font> 03B9;;;;N;;;;; -1D6CB;MATHEMATICAL BOLD SMALL KAPPA;Ll;0;L;<font> 03BA;;;;N;;;;; -1D6CC;MATHEMATICAL BOLD SMALL LAMDA;Ll;0;L;<font> 03BB;;;;N;;;;; -1D6CD;MATHEMATICAL BOLD SMALL MU;Ll;0;L;<font> 03BC;;;;N;;;;; -1D6CE;MATHEMATICAL BOLD SMALL NU;Ll;0;L;<font> 03BD;;;;N;;;;; -1D6CF;MATHEMATICAL BOLD SMALL XI;Ll;0;L;<font> 03BE;;;;N;;;;; -1D6D0;MATHEMATICAL BOLD SMALL OMICRON;Ll;0;L;<font> 03BF;;;;N;;;;; -1D6D1;MATHEMATICAL BOLD SMALL PI;Ll;0;L;<font> 03C0;;;;N;;;;; -1D6D2;MATHEMATICAL BOLD SMALL RHO;Ll;0;L;<font> 03C1;;;;N;;;;; -1D6D3;MATHEMATICAL BOLD SMALL FINAL SIGMA;Ll;0;L;<font> 03C2;;;;N;;;;; -1D6D4;MATHEMATICAL BOLD SMALL SIGMA;Ll;0;L;<font> 03C3;;;;N;;;;; -1D6D5;MATHEMATICAL BOLD SMALL TAU;Ll;0;L;<font> 03C4;;;;N;;;;; -1D6D6;MATHEMATICAL BOLD SMALL UPSILON;Ll;0;L;<font> 03C5;;;;N;;;;; -1D6D7;MATHEMATICAL BOLD SMALL PHI;Ll;0;L;<font> 03C6;;;;N;;;;; -1D6D8;MATHEMATICAL BOLD SMALL CHI;Ll;0;L;<font> 03C7;;;;N;;;;; -1D6D9;MATHEMATICAL BOLD SMALL PSI;Ll;0;L;<font> 03C8;;;;N;;;;; -1D6DA;MATHEMATICAL BOLD SMALL OMEGA;Ll;0;L;<font> 03C9;;;;N;;;;; -1D6DB;MATHEMATICAL BOLD PARTIAL DIFFERENTIAL;Sm;0;L;<font> 2202;;;;N;;;;; -1D6DC;MATHEMATICAL BOLD EPSILON SYMBOL;Ll;0;L;<font> 03F5;;;;N;;;;; -1D6DD;MATHEMATICAL BOLD THETA SYMBOL;Ll;0;L;<font> 03D1;;;;N;;;;; -1D6DE;MATHEMATICAL BOLD KAPPA SYMBOL;Ll;0;L;<font> 03F0;;;;N;;;;; -1D6DF;MATHEMATICAL BOLD PHI SYMBOL;Ll;0;L;<font> 03D5;;;;N;;;;; -1D6E0;MATHEMATICAL BOLD RHO SYMBOL;Ll;0;L;<font> 03F1;;;;N;;;;; -1D6E1;MATHEMATICAL BOLD PI SYMBOL;Ll;0;L;<font> 03D6;;;;N;;;;; -1D6E2;MATHEMATICAL ITALIC CAPITAL ALPHA;Lu;0;L;<font> 0391;;;;N;;;;; -1D6E3;MATHEMATICAL ITALIC CAPITAL BETA;Lu;0;L;<font> 0392;;;;N;;;;; -1D6E4;MATHEMATICAL ITALIC CAPITAL GAMMA;Lu;0;L;<font> 0393;;;;N;;;;; -1D6E5;MATHEMATICAL ITALIC CAPITAL DELTA;Lu;0;L;<font> 0394;;;;N;;;;; -1D6E6;MATHEMATICAL ITALIC CAPITAL EPSILON;Lu;0;L;<font> 0395;;;;N;;;;; -1D6E7;MATHEMATICAL ITALIC CAPITAL ZETA;Lu;0;L;<font> 0396;;;;N;;;;; -1D6E8;MATHEMATICAL ITALIC CAPITAL ETA;Lu;0;L;<font> 0397;;;;N;;;;; -1D6E9;MATHEMATICAL ITALIC CAPITAL THETA;Lu;0;L;<font> 0398;;;;N;;;;; -1D6EA;MATHEMATICAL ITALIC CAPITAL IOTA;Lu;0;L;<font> 0399;;;;N;;;;; -1D6EB;MATHEMATICAL ITALIC CAPITAL KAPPA;Lu;0;L;<font> 039A;;;;N;;;;; -1D6EC;MATHEMATICAL ITALIC CAPITAL LAMDA;Lu;0;L;<font> 039B;;;;N;;;;; -1D6ED;MATHEMATICAL ITALIC CAPITAL MU;Lu;0;L;<font> 039C;;;;N;;;;; -1D6EE;MATHEMATICAL ITALIC CAPITAL NU;Lu;0;L;<font> 039D;;;;N;;;;; -1D6EF;MATHEMATICAL ITALIC CAPITAL XI;Lu;0;L;<font> 039E;;;;N;;;;; -1D6F0;MATHEMATICAL ITALIC CAPITAL OMICRON;Lu;0;L;<font> 039F;;;;N;;;;; -1D6F1;MATHEMATICAL ITALIC CAPITAL PI;Lu;0;L;<font> 03A0;;;;N;;;;; -1D6F2;MATHEMATICAL ITALIC CAPITAL RHO;Lu;0;L;<font> 03A1;;;;N;;;;; -1D6F3;MATHEMATICAL ITALIC CAPITAL THETA SYMBOL;Lu;0;L;<font> 03F4;;;;N;;;;; -1D6F4;MATHEMATICAL ITALIC CAPITAL SIGMA;Lu;0;L;<font> 03A3;;;;N;;;;; -1D6F5;MATHEMATICAL ITALIC CAPITAL TAU;Lu;0;L;<font> 03A4;;;;N;;;;; -1D6F6;MATHEMATICAL ITALIC CAPITAL UPSILON;Lu;0;L;<font> 03A5;;;;N;;;;; -1D6F7;MATHEMATICAL ITALIC CAPITAL PHI;Lu;0;L;<font> 03A6;;;;N;;;;; -1D6F8;MATHEMATICAL ITALIC CAPITAL CHI;Lu;0;L;<font> 03A7;;;;N;;;;; -1D6F9;MATHEMATICAL ITALIC CAPITAL PSI;Lu;0;L;<font> 03A8;;;;N;;;;; -1D6FA;MATHEMATICAL ITALIC CAPITAL OMEGA;Lu;0;L;<font> 03A9;;;;N;;;;; -1D6FB;MATHEMATICAL ITALIC NABLA;Sm;0;L;<font> 2207;;;;N;;;;; -1D6FC;MATHEMATICAL ITALIC SMALL ALPHA;Ll;0;L;<font> 03B1;;;;N;;;;; -1D6FD;MATHEMATICAL ITALIC SMALL BETA;Ll;0;L;<font> 03B2;;;;N;;;;; -1D6FE;MATHEMATICAL ITALIC SMALL GAMMA;Ll;0;L;<font> 03B3;;;;N;;;;; -1D6FF;MATHEMATICAL ITALIC SMALL DELTA;Ll;0;L;<font> 03B4;;;;N;;;;; -1D700;MATHEMATICAL ITALIC SMALL EPSILON;Ll;0;L;<font> 03B5;;;;N;;;;; -1D701;MATHEMATICAL ITALIC SMALL ZETA;Ll;0;L;<font> 03B6;;;;N;;;;; -1D702;MATHEMATICAL ITALIC SMALL ETA;Ll;0;L;<font> 03B7;;;;N;;;;; -1D703;MATHEMATICAL ITALIC SMALL THETA;Ll;0;L;<font> 03B8;;;;N;;;;; -1D704;MATHEMATICAL ITALIC SMALL IOTA;Ll;0;L;<font> 03B9;;;;N;;;;; -1D705;MATHEMATICAL ITALIC SMALL KAPPA;Ll;0;L;<font> 03BA;;;;N;;;;; -1D706;MATHEMATICAL ITALIC SMALL LAMDA;Ll;0;L;<font> 03BB;;;;N;;;;; -1D707;MATHEMATICAL ITALIC SMALL MU;Ll;0;L;<font> 03BC;;;;N;;;;; -1D708;MATHEMATICAL ITALIC SMALL NU;Ll;0;L;<font> 03BD;;;;N;;;;; -1D709;MATHEMATICAL ITALIC SMALL XI;Ll;0;L;<font> 03BE;;;;N;;;;; -1D70A;MATHEMATICAL ITALIC SMALL OMICRON;Ll;0;L;<font> 03BF;;;;N;;;;; -1D70B;MATHEMATICAL ITALIC SMALL PI;Ll;0;L;<font> 03C0;;;;N;;;;; -1D70C;MATHEMATICAL ITALIC SMALL RHO;Ll;0;L;<font> 03C1;;;;N;;;;; -1D70D;MATHEMATICAL ITALIC SMALL FINAL SIGMA;Ll;0;L;<font> 03C2;;;;N;;;;; -1D70E;MATHEMATICAL ITALIC SMALL SIGMA;Ll;0;L;<font> 03C3;;;;N;;;;; -1D70F;MATHEMATICAL ITALIC SMALL TAU;Ll;0;L;<font> 03C4;;;;N;;;;; -1D710;MATHEMATICAL ITALIC SMALL UPSILON;Ll;0;L;<font> 03C5;;;;N;;;;; -1D711;MATHEMATICAL ITALIC SMALL PHI;Ll;0;L;<font> 03C6;;;;N;;;;; -1D712;MATHEMATICAL ITALIC SMALL CHI;Ll;0;L;<font> 03C7;;;;N;;;;; -1D713;MATHEMATICAL ITALIC SMALL PSI;Ll;0;L;<font> 03C8;;;;N;;;;; -1D714;MATHEMATICAL ITALIC SMALL OMEGA;Ll;0;L;<font> 03C9;;;;N;;;;; -1D715;MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL;Sm;0;L;<font> 2202;;;;N;;;;; -1D716;MATHEMATICAL ITALIC EPSILON SYMBOL;Ll;0;L;<font> 03F5;;;;N;;;;; -1D717;MATHEMATICAL ITALIC THETA SYMBOL;Ll;0;L;<font> 03D1;;;;N;;;;; -1D718;MATHEMATICAL ITALIC KAPPA SYMBOL;Ll;0;L;<font> 03F0;;;;N;;;;; -1D719;MATHEMATICAL ITALIC PHI SYMBOL;Ll;0;L;<font> 03D5;;;;N;;;;; -1D71A;MATHEMATICAL ITALIC RHO SYMBOL;Ll;0;L;<font> 03F1;;;;N;;;;; -1D71B;MATHEMATICAL ITALIC PI SYMBOL;Ll;0;L;<font> 03D6;;;;N;;;;; -1D71C;MATHEMATICAL BOLD ITALIC CAPITAL ALPHA;Lu;0;L;<font> 0391;;;;N;;;;; -1D71D;MATHEMATICAL BOLD ITALIC CAPITAL BETA;Lu;0;L;<font> 0392;;;;N;;;;; -1D71E;MATHEMATICAL BOLD ITALIC CAPITAL GAMMA;Lu;0;L;<font> 0393;;;;N;;;;; -1D71F;MATHEMATICAL BOLD ITALIC CAPITAL DELTA;Lu;0;L;<font> 0394;;;;N;;;;; -1D720;MATHEMATICAL BOLD ITALIC CAPITAL EPSILON;Lu;0;L;<font> 0395;;;;N;;;;; -1D721;MATHEMATICAL BOLD ITALIC CAPITAL ZETA;Lu;0;L;<font> 0396;;;;N;;;;; -1D722;MATHEMATICAL BOLD ITALIC CAPITAL ETA;Lu;0;L;<font> 0397;;;;N;;;;; -1D723;MATHEMATICAL BOLD ITALIC CAPITAL THETA;Lu;0;L;<font> 0398;;;;N;;;;; -1D724;MATHEMATICAL BOLD ITALIC CAPITAL IOTA;Lu;0;L;<font> 0399;;;;N;;;;; -1D725;MATHEMATICAL BOLD ITALIC CAPITAL KAPPA;Lu;0;L;<font> 039A;;;;N;;;;; -1D726;MATHEMATICAL BOLD ITALIC CAPITAL LAMDA;Lu;0;L;<font> 039B;;;;N;;;;; -1D727;MATHEMATICAL BOLD ITALIC CAPITAL MU;Lu;0;L;<font> 039C;;;;N;;;;; -1D728;MATHEMATICAL BOLD ITALIC CAPITAL NU;Lu;0;L;<font> 039D;;;;N;;;;; -1D729;MATHEMATICAL BOLD ITALIC CAPITAL XI;Lu;0;L;<font> 039E;;;;N;;;;; -1D72A;MATHEMATICAL BOLD ITALIC CAPITAL OMICRON;Lu;0;L;<font> 039F;;;;N;;;;; -1D72B;MATHEMATICAL BOLD ITALIC CAPITAL PI;Lu;0;L;<font> 03A0;;;;N;;;;; -1D72C;MATHEMATICAL BOLD ITALIC CAPITAL RHO;Lu;0;L;<font> 03A1;;;;N;;;;; -1D72D;MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL;Lu;0;L;<font> 03F4;;;;N;;;;; -1D72E;MATHEMATICAL BOLD ITALIC CAPITAL SIGMA;Lu;0;L;<font> 03A3;;;;N;;;;; -1D72F;MATHEMATICAL BOLD ITALIC CAPITAL TAU;Lu;0;L;<font> 03A4;;;;N;;;;; -1D730;MATHEMATICAL BOLD ITALIC CAPITAL UPSILON;Lu;0;L;<font> 03A5;;;;N;;;;; -1D731;MATHEMATICAL BOLD ITALIC CAPITAL PHI;Lu;0;L;<font> 03A6;;;;N;;;;; -1D732;MATHEMATICAL BOLD ITALIC CAPITAL CHI;Lu;0;L;<font> 03A7;;;;N;;;;; -1D733;MATHEMATICAL BOLD ITALIC CAPITAL PSI;Lu;0;L;<font> 03A8;;;;N;;;;; -1D734;MATHEMATICAL BOLD ITALIC CAPITAL OMEGA;Lu;0;L;<font> 03A9;;;;N;;;;; -1D735;MATHEMATICAL BOLD ITALIC NABLA;Sm;0;L;<font> 2207;;;;N;;;;; -1D736;MATHEMATICAL BOLD ITALIC SMALL ALPHA;Ll;0;L;<font> 03B1;;;;N;;;;; -1D737;MATHEMATICAL BOLD ITALIC SMALL BETA;Ll;0;L;<font> 03B2;;;;N;;;;; -1D738;MATHEMATICAL BOLD ITALIC SMALL GAMMA;Ll;0;L;<font> 03B3;;;;N;;;;; -1D739;MATHEMATICAL BOLD ITALIC SMALL DELTA;Ll;0;L;<font> 03B4;;;;N;;;;; -1D73A;MATHEMATICAL BOLD ITALIC SMALL EPSILON;Ll;0;L;<font> 03B5;;;;N;;;;; -1D73B;MATHEMATICAL BOLD ITALIC SMALL ZETA;Ll;0;L;<font> 03B6;;;;N;;;;; -1D73C;MATHEMATICAL BOLD ITALIC SMALL ETA;Ll;0;L;<font> 03B7;;;;N;;;;; -1D73D;MATHEMATICAL BOLD ITALIC SMALL THETA;Ll;0;L;<font> 03B8;;;;N;;;;; -1D73E;MATHEMATICAL BOLD ITALIC SMALL IOTA;Ll;0;L;<font> 03B9;;;;N;;;;; -1D73F;MATHEMATICAL BOLD ITALIC SMALL KAPPA;Ll;0;L;<font> 03BA;;;;N;;;;; -1D740;MATHEMATICAL BOLD ITALIC SMALL LAMDA;Ll;0;L;<font> 03BB;;;;N;;;;; -1D741;MATHEMATICAL BOLD ITALIC SMALL MU;Ll;0;L;<font> 03BC;;;;N;;;;; -1D742;MATHEMATICAL BOLD ITALIC SMALL NU;Ll;0;L;<font> 03BD;;;;N;;;;; -1D743;MATHEMATICAL BOLD ITALIC SMALL XI;Ll;0;L;<font> 03BE;;;;N;;;;; -1D744;MATHEMATICAL BOLD ITALIC SMALL OMICRON;Ll;0;L;<font> 03BF;;;;N;;;;; -1D745;MATHEMATICAL BOLD ITALIC SMALL PI;Ll;0;L;<font> 03C0;;;;N;;;;; -1D746;MATHEMATICAL BOLD ITALIC SMALL RHO;Ll;0;L;<font> 03C1;;;;N;;;;; -1D747;MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA;Ll;0;L;<font> 03C2;;;;N;;;;; -1D748;MATHEMATICAL BOLD ITALIC SMALL SIGMA;Ll;0;L;<font> 03C3;;;;N;;;;; -1D749;MATHEMATICAL BOLD ITALIC SMALL TAU;Ll;0;L;<font> 03C4;;;;N;;;;; -1D74A;MATHEMATICAL BOLD ITALIC SMALL UPSILON;Ll;0;L;<font> 03C5;;;;N;;;;; -1D74B;MATHEMATICAL BOLD ITALIC SMALL PHI;Ll;0;L;<font> 03C6;;;;N;;;;; -1D74C;MATHEMATICAL BOLD ITALIC SMALL CHI;Ll;0;L;<font> 03C7;;;;N;;;;; -1D74D;MATHEMATICAL BOLD ITALIC SMALL PSI;Ll;0;L;<font> 03C8;;;;N;;;;; -1D74E;MATHEMATICAL BOLD ITALIC SMALL OMEGA;Ll;0;L;<font> 03C9;;;;N;;;;; -1D74F;MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL;Sm;0;L;<font> 2202;;;;N;;;;; -1D750;MATHEMATICAL BOLD ITALIC EPSILON SYMBOL;Ll;0;L;<font> 03F5;;;;N;;;;; -1D751;MATHEMATICAL BOLD ITALIC THETA SYMBOL;Ll;0;L;<font> 03D1;;;;N;;;;; -1D752;MATHEMATICAL BOLD ITALIC KAPPA SYMBOL;Ll;0;L;<font> 03F0;;;;N;;;;; -1D753;MATHEMATICAL BOLD ITALIC PHI SYMBOL;Ll;0;L;<font> 03D5;;;;N;;;;; -1D754;MATHEMATICAL BOLD ITALIC RHO SYMBOL;Ll;0;L;<font> 03F1;;;;N;;;;; -1D755;MATHEMATICAL BOLD ITALIC PI SYMBOL;Ll;0;L;<font> 03D6;;;;N;;;;; -1D756;MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA;Lu;0;L;<font> 0391;;;;N;;;;; -1D757;MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA;Lu;0;L;<font> 0392;;;;N;;;;; -1D758;MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA;Lu;0;L;<font> 0393;;;;N;;;;; -1D759;MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA;Lu;0;L;<font> 0394;;;;N;;;;; -1D75A;MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON;Lu;0;L;<font> 0395;;;;N;;;;; -1D75B;MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA;Lu;0;L;<font> 0396;;;;N;;;;; -1D75C;MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA;Lu;0;L;<font> 0397;;;;N;;;;; -1D75D;MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA;Lu;0;L;<font> 0398;;;;N;;;;; -1D75E;MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA;Lu;0;L;<font> 0399;;;;N;;;;; -1D75F;MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA;Lu;0;L;<font> 039A;;;;N;;;;; -1D760;MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA;Lu;0;L;<font> 039B;;;;N;;;;; -1D761;MATHEMATICAL SANS-SERIF BOLD CAPITAL MU;Lu;0;L;<font> 039C;;;;N;;;;; -1D762;MATHEMATICAL SANS-SERIF BOLD CAPITAL NU;Lu;0;L;<font> 039D;;;;N;;;;; -1D763;MATHEMATICAL SANS-SERIF BOLD CAPITAL XI;Lu;0;L;<font> 039E;;;;N;;;;; -1D764;MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON;Lu;0;L;<font> 039F;;;;N;;;;; -1D765;MATHEMATICAL SANS-SERIF BOLD CAPITAL PI;Lu;0;L;<font> 03A0;;;;N;;;;; -1D766;MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO;Lu;0;L;<font> 03A1;;;;N;;;;; -1D767;MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL;Lu;0;L;<font> 03F4;;;;N;;;;; -1D768;MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA;Lu;0;L;<font> 03A3;;;;N;;;;; -1D769;MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU;Lu;0;L;<font> 03A4;;;;N;;;;; -1D76A;MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON;Lu;0;L;<font> 03A5;;;;N;;;;; -1D76B;MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI;Lu;0;L;<font> 03A6;;;;N;;;;; -1D76C;MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI;Lu;0;L;<font> 03A7;;;;N;;;;; -1D76D;MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI;Lu;0;L;<font> 03A8;;;;N;;;;; -1D76E;MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA;Lu;0;L;<font> 03A9;;;;N;;;;; -1D76F;MATHEMATICAL SANS-SERIF BOLD NABLA;Sm;0;L;<font> 2207;;;;N;;;;; -1D770;MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA;Ll;0;L;<font> 03B1;;;;N;;;;; -1D771;MATHEMATICAL SANS-SERIF BOLD SMALL BETA;Ll;0;L;<font> 03B2;;;;N;;;;; -1D772;MATHEMATICAL SANS-SERIF BOLD SMALL GAMMA;Ll;0;L;<font> 03B3;;;;N;;;;; -1D773;MATHEMATICAL SANS-SERIF BOLD SMALL DELTA;Ll;0;L;<font> 03B4;;;;N;;;;; -1D774;MATHEMATICAL SANS-SERIF BOLD SMALL EPSILON;Ll;0;L;<font> 03B5;;;;N;;;;; -1D775;MATHEMATICAL SANS-SERIF BOLD SMALL ZETA;Ll;0;L;<font> 03B6;;;;N;;;;; -1D776;MATHEMATICAL SANS-SERIF BOLD SMALL ETA;Ll;0;L;<font> 03B7;;;;N;;;;; -1D777;MATHEMATICAL SANS-SERIF BOLD SMALL THETA;Ll;0;L;<font> 03B8;;;;N;;;;; -1D778;MATHEMATICAL SANS-SERIF BOLD SMALL IOTA;Ll;0;L;<font> 03B9;;;;N;;;;; -1D779;MATHEMATICAL SANS-SERIF BOLD SMALL KAPPA;Ll;0;L;<font> 03BA;;;;N;;;;; -1D77A;MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA;Ll;0;L;<font> 03BB;;;;N;;;;; -1D77B;MATHEMATICAL SANS-SERIF BOLD SMALL MU;Ll;0;L;<font> 03BC;;;;N;;;;; -1D77C;MATHEMATICAL SANS-SERIF BOLD SMALL NU;Ll;0;L;<font> 03BD;;;;N;;;;; -1D77D;MATHEMATICAL SANS-SERIF BOLD SMALL XI;Ll;0;L;<font> 03BE;;;;N;;;;; -1D77E;MATHEMATICAL SANS-SERIF BOLD SMALL OMICRON;Ll;0;L;<font> 03BF;;;;N;;;;; -1D77F;MATHEMATICAL SANS-SERIF BOLD SMALL PI;Ll;0;L;<font> 03C0;;;;N;;;;; -1D780;MATHEMATICAL SANS-SERIF BOLD SMALL RHO;Ll;0;L;<font> 03C1;;;;N;;;;; -1D781;MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA;Ll;0;L;<font> 03C2;;;;N;;;;; -1D782;MATHEMATICAL SANS-SERIF BOLD SMALL SIGMA;Ll;0;L;<font> 03C3;;;;N;;;;; -1D783;MATHEMATICAL SANS-SERIF BOLD SMALL TAU;Ll;0;L;<font> 03C4;;;;N;;;;; -1D784;MATHEMATICAL SANS-SERIF BOLD SMALL UPSILON;Ll;0;L;<font> 03C5;;;;N;;;;; -1D785;MATHEMATICAL SANS-SERIF BOLD SMALL PHI;Ll;0;L;<font> 03C6;;;;N;;;;; -1D786;MATHEMATICAL SANS-SERIF BOLD SMALL CHI;Ll;0;L;<font> 03C7;;;;N;;;;; -1D787;MATHEMATICAL SANS-SERIF BOLD SMALL PSI;Ll;0;L;<font> 03C8;;;;N;;;;; -1D788;MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA;Ll;0;L;<font> 03C9;;;;N;;;;; -1D789;MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL;Sm;0;L;<font> 2202;;;;N;;;;; -1D78A;MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL;Ll;0;L;<font> 03F5;;;;N;;;;; -1D78B;MATHEMATICAL SANS-SERIF BOLD THETA SYMBOL;Ll;0;L;<font> 03D1;;;;N;;;;; -1D78C;MATHEMATICAL SANS-SERIF BOLD KAPPA SYMBOL;Ll;0;L;<font> 03F0;;;;N;;;;; -1D78D;MATHEMATICAL SANS-SERIF BOLD PHI SYMBOL;Ll;0;L;<font> 03D5;;;;N;;;;; -1D78E;MATHEMATICAL SANS-SERIF BOLD RHO SYMBOL;Ll;0;L;<font> 03F1;;;;N;;;;; -1D78F;MATHEMATICAL SANS-SERIF BOLD PI SYMBOL;Ll;0;L;<font> 03D6;;;;N;;;;; -1D790;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA;Lu;0;L;<font> 0391;;;;N;;;;; -1D791;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA;Lu;0;L;<font> 0392;;;;N;;;;; -1D792;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA;Lu;0;L;<font> 0393;;;;N;;;;; -1D793;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA;Lu;0;L;<font> 0394;;;;N;;;;; -1D794;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON;Lu;0;L;<font> 0395;;;;N;;;;; -1D795;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA;Lu;0;L;<font> 0396;;;;N;;;;; -1D796;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA;Lu;0;L;<font> 0397;;;;N;;;;; -1D797;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA;Lu;0;L;<font> 0398;;;;N;;;;; -1D798;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA;Lu;0;L;<font> 0399;;;;N;;;;; -1D799;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA;Lu;0;L;<font> 039A;;;;N;;;;; -1D79A;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA;Lu;0;L;<font> 039B;;;;N;;;;; -1D79B;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU;Lu;0;L;<font> 039C;;;;N;;;;; -1D79C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU;Lu;0;L;<font> 039D;;;;N;;;;; -1D79D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI;Lu;0;L;<font> 039E;;;;N;;;;; -1D79E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON;Lu;0;L;<font> 039F;;;;N;;;;; -1D79F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI;Lu;0;L;<font> 03A0;;;;N;;;;; -1D7A0;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO;Lu;0;L;<font> 03A1;;;;N;;;;; -1D7A1;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL;Lu;0;L;<font> 03F4;;;;N;;;;; -1D7A2;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA;Lu;0;L;<font> 03A3;;;;N;;;;; -1D7A3;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU;Lu;0;L;<font> 03A4;;;;N;;;;; -1D7A4;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON;Lu;0;L;<font> 03A5;;;;N;;;;; -1D7A5;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI;Lu;0;L;<font> 03A6;;;;N;;;;; -1D7A6;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI;Lu;0;L;<font> 03A7;;;;N;;;;; -1D7A7;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI;Lu;0;L;<font> 03A8;;;;N;;;;; -1D7A8;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA;Lu;0;L;<font> 03A9;;;;N;;;;; -1D7A9;MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA;Sm;0;L;<font> 2207;;;;N;;;;; -1D7AA;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA;Ll;0;L;<font> 03B1;;;;N;;;;; -1D7AB;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL BETA;Ll;0;L;<font> 03B2;;;;N;;;;; -1D7AC;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL GAMMA;Ll;0;L;<font> 03B3;;;;N;;;;; -1D7AD;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL DELTA;Ll;0;L;<font> 03B4;;;;N;;;;; -1D7AE;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL EPSILON;Ll;0;L;<font> 03B5;;;;N;;;;; -1D7AF;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ZETA;Ll;0;L;<font> 03B6;;;;N;;;;; -1D7B0;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ETA;Ll;0;L;<font> 03B7;;;;N;;;;; -1D7B1;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL THETA;Ll;0;L;<font> 03B8;;;;N;;;;; -1D7B2;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL IOTA;Ll;0;L;<font> 03B9;;;;N;;;;; -1D7B3;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL KAPPA;Ll;0;L;<font> 03BA;;;;N;;;;; -1D7B4;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA;Ll;0;L;<font> 03BB;;;;N;;;;; -1D7B5;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU;Ll;0;L;<font> 03BC;;;;N;;;;; -1D7B6;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL NU;Ll;0;L;<font> 03BD;;;;N;;;;; -1D7B7;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL XI;Ll;0;L;<font> 03BE;;;;N;;;;; -1D7B8;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMICRON;Ll;0;L;<font> 03BF;;;;N;;;;; -1D7B9;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PI;Ll;0;L;<font> 03C0;;;;N;;;;; -1D7BA;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL RHO;Ll;0;L;<font> 03C1;;;;N;;;;; -1D7BB;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA;Ll;0;L;<font> 03C2;;;;N;;;;; -1D7BC;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL SIGMA;Ll;0;L;<font> 03C3;;;;N;;;;; -1D7BD;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL TAU;Ll;0;L;<font> 03C4;;;;N;;;;; -1D7BE;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL UPSILON;Ll;0;L;<font> 03C5;;;;N;;;;; -1D7BF;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PHI;Ll;0;L;<font> 03C6;;;;N;;;;; -1D7C0;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL CHI;Ll;0;L;<font> 03C7;;;;N;;;;; -1D7C1;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PSI;Ll;0;L;<font> 03C8;;;;N;;;;; -1D7C2;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA;Ll;0;L;<font> 03C9;;;;N;;;;; -1D7C3;MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL;Sm;0;L;<font> 2202;;;;N;;;;; -1D7C4;MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL;Ll;0;L;<font> 03F5;;;;N;;;;; -1D7C5;MATHEMATICAL SANS-SERIF BOLD ITALIC THETA SYMBOL;Ll;0;L;<font> 03D1;;;;N;;;;; -1D7C6;MATHEMATICAL SANS-SERIF BOLD ITALIC KAPPA SYMBOL;Ll;0;L;<font> 03F0;;;;N;;;;; -1D7C7;MATHEMATICAL SANS-SERIF BOLD ITALIC PHI SYMBOL;Ll;0;L;<font> 03D5;;;;N;;;;; -1D7C8;MATHEMATICAL SANS-SERIF BOLD ITALIC RHO SYMBOL;Ll;0;L;<font> 03F1;;;;N;;;;; -1D7C9;MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL;Ll;0;L;<font> 03D6;;;;N;;;;; -1D7CE;MATHEMATICAL BOLD DIGIT ZERO;Nd;0;EN;<font> 0030;0;0;0;N;;;;; -1D7CF;MATHEMATICAL BOLD DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;; -1D7D0;MATHEMATICAL BOLD DIGIT TWO;Nd;0;EN;<font> 0032;2;2;2;N;;;;; -1D7D1;MATHEMATICAL BOLD DIGIT THREE;Nd;0;EN;<font> 0033;3;3;3;N;;;;; -1D7D2;MATHEMATICAL BOLD DIGIT FOUR;Nd;0;EN;<font> 0034;4;4;4;N;;;;; -1D7D3;MATHEMATICAL BOLD DIGIT FIVE;Nd;0;EN;<font> 0035;5;5;5;N;;;;; -1D7D4;MATHEMATICAL BOLD DIGIT SIX;Nd;0;EN;<font> 0036;6;6;6;N;;;;; -1D7D5;MATHEMATICAL BOLD DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;; -1D7D6;MATHEMATICAL BOLD DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;; -1D7D7;MATHEMATICAL BOLD DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;; -1D7D8;MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO;Nd;0;EN;<font> 0030;0;0;0;N;;;;; -1D7D9;MATHEMATICAL DOUBLE-STRUCK DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;; -1D7DA;MATHEMATICAL DOUBLE-STRUCK DIGIT TWO;Nd;0;EN;<font> 0032;2;2;2;N;;;;; -1D7DB;MATHEMATICAL DOUBLE-STRUCK DIGIT THREE;Nd;0;EN;<font> 0033;3;3;3;N;;;;; -1D7DC;MATHEMATICAL DOUBLE-STRUCK DIGIT FOUR;Nd;0;EN;<font> 0034;4;4;4;N;;;;; -1D7DD;MATHEMATICAL DOUBLE-STRUCK DIGIT FIVE;Nd;0;EN;<font> 0035;5;5;5;N;;;;; -1D7DE;MATHEMATICAL DOUBLE-STRUCK DIGIT SIX;Nd;0;EN;<font> 0036;6;6;6;N;;;;; -1D7DF;MATHEMATICAL DOUBLE-STRUCK DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;; -1D7E0;MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;; -1D7E1;MATHEMATICAL DOUBLE-STRUCK DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;; -1D7E2;MATHEMATICAL SANS-SERIF DIGIT ZERO;Nd;0;EN;<font> 0030;0;0;0;N;;;;; -1D7E3;MATHEMATICAL SANS-SERIF DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;; -1D7E4;MATHEMATICAL SANS-SERIF DIGIT TWO;Nd;0;EN;<font> 0032;2;2;2;N;;;;; -1D7E5;MATHEMATICAL SANS-SERIF DIGIT THREE;Nd;0;EN;<font> 0033;3;3;3;N;;;;; -1D7E6;MATHEMATICAL SANS-SERIF DIGIT FOUR;Nd;0;EN;<font> 0034;4;4;4;N;;;;; -1D7E7;MATHEMATICAL SANS-SERIF DIGIT FIVE;Nd;0;EN;<font> 0035;5;5;5;N;;;;; -1D7E8;MATHEMATICAL SANS-SERIF DIGIT SIX;Nd;0;EN;<font> 0036;6;6;6;N;;;;; -1D7E9;MATHEMATICAL SANS-SERIF DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;; -1D7EA;MATHEMATICAL SANS-SERIF DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;; -1D7EB;MATHEMATICAL SANS-SERIF DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;; -1D7EC;MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO;Nd;0;EN;<font> 0030;0;0;0;N;;;;; -1D7ED;MATHEMATICAL SANS-SERIF BOLD DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;; -1D7EE;MATHEMATICAL SANS-SERIF BOLD DIGIT TWO;Nd;0;EN;<font> 0032;2;2;2;N;;;;; -1D7EF;MATHEMATICAL SANS-SERIF BOLD DIGIT THREE;Nd;0;EN;<font> 0033;3;3;3;N;;;;; -1D7F0;MATHEMATICAL SANS-SERIF BOLD DIGIT FOUR;Nd;0;EN;<font> 0034;4;4;4;N;;;;; -1D7F1;MATHEMATICAL SANS-SERIF BOLD DIGIT FIVE;Nd;0;EN;<font> 0035;5;5;5;N;;;;; -1D7F2;MATHEMATICAL SANS-SERIF BOLD DIGIT SIX;Nd;0;EN;<font> 0036;6;6;6;N;;;;; -1D7F3;MATHEMATICAL SANS-SERIF BOLD DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;; -1D7F4;MATHEMATICAL SANS-SERIF BOLD DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;; -1D7F5;MATHEMATICAL SANS-SERIF BOLD DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;; -1D7F6;MATHEMATICAL MONOSPACE DIGIT ZERO;Nd;0;EN;<font> 0030;0;0;0;N;;;;; -1D7F7;MATHEMATICAL MONOSPACE DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;; -1D7F8;MATHEMATICAL MONOSPACE DIGIT TWO;Nd;0;EN;<font> 0032;2;2;2;N;;;;; -1D7F9;MATHEMATICAL MONOSPACE DIGIT THREE;Nd;0;EN;<font> 0033;3;3;3;N;;;;; -1D7FA;MATHEMATICAL MONOSPACE DIGIT FOUR;Nd;0;EN;<font> 0034;4;4;4;N;;;;; -1D7FB;MATHEMATICAL MONOSPACE DIGIT FIVE;Nd;0;EN;<font> 0035;5;5;5;N;;;;; -1D7FC;MATHEMATICAL MONOSPACE DIGIT SIX;Nd;0;EN;<font> 0036;6;6;6;N;;;;; -1D7FD;MATHEMATICAL MONOSPACE DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;; -1D7FE;MATHEMATICAL MONOSPACE DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;; -1D7FF;MATHEMATICAL MONOSPACE DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;; -20000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;; -2A6D6;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;; -2F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;; -2F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;; -2F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;; -2F803;CJK COMPATIBILITY IDEOGRAPH-2F803;Lo;0;L;20122;;;;N;;;;; -2F804;CJK COMPATIBILITY IDEOGRAPH-2F804;Lo;0;L;4F60;;;;N;;;;; -2F805;CJK COMPATIBILITY IDEOGRAPH-2F805;Lo;0;L;4FAE;;;;N;;;;; -2F806;CJK COMPATIBILITY IDEOGRAPH-2F806;Lo;0;L;4FBB;;;;N;;;;; -2F807;CJK COMPATIBILITY IDEOGRAPH-2F807;Lo;0;L;5002;;;;N;;;;; -2F808;CJK COMPATIBILITY IDEOGRAPH-2F808;Lo;0;L;507A;;;;N;;;;; -2F809;CJK COMPATIBILITY IDEOGRAPH-2F809;Lo;0;L;5099;;;;N;;;;; -2F80A;CJK COMPATIBILITY IDEOGRAPH-2F80A;Lo;0;L;50E7;;;;N;;;;; -2F80B;CJK COMPATIBILITY IDEOGRAPH-2F80B;Lo;0;L;50CF;;;;N;;;;; -2F80C;CJK COMPATIBILITY IDEOGRAPH-2F80C;Lo;0;L;349E;;;;N;;;;; -2F80D;CJK COMPATIBILITY IDEOGRAPH-2F80D;Lo;0;L;2063A;;;;N;;;;; -2F80E;CJK COMPATIBILITY IDEOGRAPH-2F80E;Lo;0;L;514D;;;;N;;;;; -2F80F;CJK COMPATIBILITY IDEOGRAPH-2F80F;Lo;0;L;5154;;;;N;;;;; -2F810;CJK COMPATIBILITY IDEOGRAPH-2F810;Lo;0;L;5164;;;;N;;;;; -2F811;CJK COMPATIBILITY IDEOGRAPH-2F811;Lo;0;L;5177;;;;N;;;;; -2F812;CJK COMPATIBILITY IDEOGRAPH-2F812;Lo;0;L;2051C;;;;N;;;;; -2F813;CJK COMPATIBILITY IDEOGRAPH-2F813;Lo;0;L;34B9;;;;N;;;;; -2F814;CJK COMPATIBILITY IDEOGRAPH-2F814;Lo;0;L;5167;;;;N;;;;; -2F815;CJK COMPATIBILITY IDEOGRAPH-2F815;Lo;0;L;518D;;;;N;;;;; -2F816;CJK COMPATIBILITY IDEOGRAPH-2F816;Lo;0;L;2054B;;;;N;;;;; -2F817;CJK COMPATIBILITY IDEOGRAPH-2F817;Lo;0;L;5197;;;;N;;;;; -2F818;CJK COMPATIBILITY IDEOGRAPH-2F818;Lo;0;L;51A4;;;;N;;;;; -2F819;CJK COMPATIBILITY IDEOGRAPH-2F819;Lo;0;L;4ECC;;;;N;;;;; -2F81A;CJK COMPATIBILITY IDEOGRAPH-2F81A;Lo;0;L;51AC;;;;N;;;;; -2F81B;CJK COMPATIBILITY IDEOGRAPH-2F81B;Lo;0;L;51B5;;;;N;;;;; -2F81C;CJK COMPATIBILITY IDEOGRAPH-2F81C;Lo;0;L;291DF;;;;N;;;;; -2F81D;CJK COMPATIBILITY IDEOGRAPH-2F81D;Lo;0;L;51F5;;;;N;;;;; -2F81E;CJK COMPATIBILITY IDEOGRAPH-2F81E;Lo;0;L;5203;;;;N;;;;; -2F81F;CJK COMPATIBILITY IDEOGRAPH-2F81F;Lo;0;L;34DF;;;;N;;;;; -2F820;CJK COMPATIBILITY IDEOGRAPH-2F820;Lo;0;L;523B;;;;N;;;;; -2F821;CJK COMPATIBILITY IDEOGRAPH-2F821;Lo;0;L;5246;;;;N;;;;; -2F822;CJK COMPATIBILITY IDEOGRAPH-2F822;Lo;0;L;5272;;;;N;;;;; -2F823;CJK COMPATIBILITY IDEOGRAPH-2F823;Lo;0;L;5277;;;;N;;;;; -2F824;CJK COMPATIBILITY IDEOGRAPH-2F824;Lo;0;L;3515;;;;N;;;;; -2F825;CJK COMPATIBILITY IDEOGRAPH-2F825;Lo;0;L;52C7;;;;N;;;;; -2F826;CJK COMPATIBILITY IDEOGRAPH-2F826;Lo;0;L;52C9;;;;N;;;;; -2F827;CJK COMPATIBILITY IDEOGRAPH-2F827;Lo;0;L;52E4;;;;N;;;;; -2F828;CJK COMPATIBILITY IDEOGRAPH-2F828;Lo;0;L;52FA;;;;N;;;;; -2F829;CJK COMPATIBILITY IDEOGRAPH-2F829;Lo;0;L;5305;;;;N;;;;; -2F82A;CJK COMPATIBILITY IDEOGRAPH-2F82A;Lo;0;L;5306;;;;N;;;;; -2F82B;CJK COMPATIBILITY IDEOGRAPH-2F82B;Lo;0;L;5317;;;;N;;;;; -2F82C;CJK COMPATIBILITY IDEOGRAPH-2F82C;Lo;0;L;5349;;;;N;;;;; -2F82D;CJK COMPATIBILITY IDEOGRAPH-2F82D;Lo;0;L;5351;;;;N;;;;; -2F82E;CJK COMPATIBILITY IDEOGRAPH-2F82E;Lo;0;L;535A;;;;N;;;;; -2F82F;CJK COMPATIBILITY IDEOGRAPH-2F82F;Lo;0;L;5373;;;;N;;;;; -2F830;CJK COMPATIBILITY IDEOGRAPH-2F830;Lo;0;L;537D;;;;N;;;;; -2F831;CJK COMPATIBILITY IDEOGRAPH-2F831;Lo;0;L;537F;;;;N;;;;; -2F832;CJK COMPATIBILITY IDEOGRAPH-2F832;Lo;0;L;537F;;;;N;;;;; -2F833;CJK COMPATIBILITY IDEOGRAPH-2F833;Lo;0;L;537F;;;;N;;;;; -2F834;CJK COMPATIBILITY IDEOGRAPH-2F834;Lo;0;L;20A2C;;;;N;;;;; -2F835;CJK COMPATIBILITY IDEOGRAPH-2F835;Lo;0;L;7070;;;;N;;;;; -2F836;CJK COMPATIBILITY IDEOGRAPH-2F836;Lo;0;L;53CA;;;;N;;;;; -2F837;CJK COMPATIBILITY IDEOGRAPH-2F837;Lo;0;L;53DF;;;;N;;;;; -2F838;CJK COMPATIBILITY IDEOGRAPH-2F838;Lo;0;L;20B63;;;;N;;;;; -2F839;CJK COMPATIBILITY IDEOGRAPH-2F839;Lo;0;L;53EB;;;;N;;;;; -2F83A;CJK COMPATIBILITY IDEOGRAPH-2F83A;Lo;0;L;53F1;;;;N;;;;; -2F83B;CJK COMPATIBILITY IDEOGRAPH-2F83B;Lo;0;L;5406;;;;N;;;;; -2F83C;CJK COMPATIBILITY IDEOGRAPH-2F83C;Lo;0;L;549E;;;;N;;;;; -2F83D;CJK COMPATIBILITY IDEOGRAPH-2F83D;Lo;0;L;5438;;;;N;;;;; -2F83E;CJK COMPATIBILITY IDEOGRAPH-2F83E;Lo;0;L;5448;;;;N;;;;; -2F83F;CJK COMPATIBILITY IDEOGRAPH-2F83F;Lo;0;L;5468;;;;N;;;;; -2F840;CJK COMPATIBILITY IDEOGRAPH-2F840;Lo;0;L;54A2;;;;N;;;;; -2F841;CJK COMPATIBILITY IDEOGRAPH-2F841;Lo;0;L;54F6;;;;N;;;;; -2F842;CJK COMPATIBILITY IDEOGRAPH-2F842;Lo;0;L;5510;;;;N;;;;; -2F843;CJK COMPATIBILITY IDEOGRAPH-2F843;Lo;0;L;5553;;;;N;;;;; -2F844;CJK COMPATIBILITY IDEOGRAPH-2F844;Lo;0;L;5563;;;;N;;;;; -2F845;CJK COMPATIBILITY IDEOGRAPH-2F845;Lo;0;L;5584;;;;N;;;;; -2F846;CJK COMPATIBILITY IDEOGRAPH-2F846;Lo;0;L;5584;;;;N;;;;; -2F847;CJK COMPATIBILITY IDEOGRAPH-2F847;Lo;0;L;5599;;;;N;;;;; -2F848;CJK COMPATIBILITY IDEOGRAPH-2F848;Lo;0;L;55AB;;;;N;;;;; -2F849;CJK COMPATIBILITY IDEOGRAPH-2F849;Lo;0;L;55B3;;;;N;;;;; -2F84A;CJK COMPATIBILITY IDEOGRAPH-2F84A;Lo;0;L;55C2;;;;N;;;;; -2F84B;CJK COMPATIBILITY IDEOGRAPH-2F84B;Lo;0;L;5716;;;;N;;;;; -2F84C;CJK COMPATIBILITY IDEOGRAPH-2F84C;Lo;0;L;5606;;;;N;;;;; -2F84D;CJK COMPATIBILITY IDEOGRAPH-2F84D;Lo;0;L;5717;;;;N;;;;; -2F84E;CJK COMPATIBILITY IDEOGRAPH-2F84E;Lo;0;L;5651;;;;N;;;;; -2F84F;CJK COMPATIBILITY IDEOGRAPH-2F84F;Lo;0;L;5674;;;;N;;;;; -2F850;CJK COMPATIBILITY IDEOGRAPH-2F850;Lo;0;L;5207;;;;N;;;;; -2F851;CJK COMPATIBILITY IDEOGRAPH-2F851;Lo;0;L;58EE;;;;N;;;;; -2F852;CJK COMPATIBILITY IDEOGRAPH-2F852;Lo;0;L;57CE;;;;N;;;;; -2F853;CJK COMPATIBILITY IDEOGRAPH-2F853;Lo;0;L;57F4;;;;N;;;;; -2F854;CJK COMPATIBILITY IDEOGRAPH-2F854;Lo;0;L;580D;;;;N;;;;; -2F855;CJK COMPATIBILITY IDEOGRAPH-2F855;Lo;0;L;578B;;;;N;;;;; -2F856;CJK COMPATIBILITY IDEOGRAPH-2F856;Lo;0;L;5832;;;;N;;;;; -2F857;CJK COMPATIBILITY IDEOGRAPH-2F857;Lo;0;L;5831;;;;N;;;;; -2F858;CJK COMPATIBILITY IDEOGRAPH-2F858;Lo;0;L;58AC;;;;N;;;;; -2F859;CJK COMPATIBILITY IDEOGRAPH-2F859;Lo;0;L;214E4;;;;N;;;;; -2F85A;CJK COMPATIBILITY IDEOGRAPH-2F85A;Lo;0;L;58F2;;;;N;;;;; -2F85B;CJK COMPATIBILITY IDEOGRAPH-2F85B;Lo;0;L;58F7;;;;N;;;;; -2F85C;CJK COMPATIBILITY IDEOGRAPH-2F85C;Lo;0;L;5906;;;;N;;;;; -2F85D;CJK COMPATIBILITY IDEOGRAPH-2F85D;Lo;0;L;591A;;;;N;;;;; -2F85E;CJK COMPATIBILITY IDEOGRAPH-2F85E;Lo;0;L;5922;;;;N;;;;; -2F85F;CJK COMPATIBILITY IDEOGRAPH-2F85F;Lo;0;L;5962;;;;N;;;;; -2F860;CJK COMPATIBILITY IDEOGRAPH-2F860;Lo;0;L;216A8;;;;N;;;;; -2F861;CJK COMPATIBILITY IDEOGRAPH-2F861;Lo;0;L;216EA;;;;N;;;;; -2F862;CJK COMPATIBILITY IDEOGRAPH-2F862;Lo;0;L;59EC;;;;N;;;;; -2F863;CJK COMPATIBILITY IDEOGRAPH-2F863;Lo;0;L;5A1B;;;;N;;;;; -2F864;CJK COMPATIBILITY IDEOGRAPH-2F864;Lo;0;L;5A27;;;;N;;;;; -2F865;CJK COMPATIBILITY IDEOGRAPH-2F865;Lo;0;L;59D8;;;;N;;;;; -2F866;CJK COMPATIBILITY IDEOGRAPH-2F866;Lo;0;L;5A66;;;;N;;;;; -2F867;CJK COMPATIBILITY IDEOGRAPH-2F867;Lo;0;L;36EE;;;;N;;;;; -2F868;CJK COMPATIBILITY IDEOGRAPH-2F868;Lo;0;L;2136A;;;;N;;;;; -2F869;CJK COMPATIBILITY IDEOGRAPH-2F869;Lo;0;L;5B08;;;;N;;;;; -2F86A;CJK COMPATIBILITY IDEOGRAPH-2F86A;Lo;0;L;5B3E;;;;N;;;;; -2F86B;CJK COMPATIBILITY IDEOGRAPH-2F86B;Lo;0;L;5B3E;;;;N;;;;; -2F86C;CJK COMPATIBILITY IDEOGRAPH-2F86C;Lo;0;L;219C8;;;;N;;;;; -2F86D;CJK COMPATIBILITY IDEOGRAPH-2F86D;Lo;0;L;5BC3;;;;N;;;;; -2F86E;CJK COMPATIBILITY IDEOGRAPH-2F86E;Lo;0;L;5BD8;;;;N;;;;; -2F86F;CJK COMPATIBILITY IDEOGRAPH-2F86F;Lo;0;L;5BE7;;;;N;;;;; -2F870;CJK COMPATIBILITY IDEOGRAPH-2F870;Lo;0;L;5BF3;;;;N;;;;; -2F871;CJK COMPATIBILITY IDEOGRAPH-2F871;Lo;0;L;21B18;;;;N;;;;; -2F872;CJK COMPATIBILITY IDEOGRAPH-2F872;Lo;0;L;5BFF;;;;N;;;;; -2F873;CJK COMPATIBILITY IDEOGRAPH-2F873;Lo;0;L;5C06;;;;N;;;;; -2F874;CJK COMPATIBILITY IDEOGRAPH-2F874;Lo;0;L;5F33;;;;N;;;;; -2F875;CJK COMPATIBILITY IDEOGRAPH-2F875;Lo;0;L;5C22;;;;N;;;;; -2F876;CJK COMPATIBILITY IDEOGRAPH-2F876;Lo;0;L;3781;;;;N;;;;; -2F877;CJK COMPATIBILITY IDEOGRAPH-2F877;Lo;0;L;5C60;;;;N;;;;; -2F878;CJK COMPATIBILITY IDEOGRAPH-2F878;Lo;0;L;5C6E;;;;N;;;;; -2F879;CJK COMPATIBILITY IDEOGRAPH-2F879;Lo;0;L;5CC0;;;;N;;;;; -2F87A;CJK COMPATIBILITY IDEOGRAPH-2F87A;Lo;0;L;5C8D;;;;N;;;;; -2F87B;CJK COMPATIBILITY IDEOGRAPH-2F87B;Lo;0;L;21DE4;;;;N;;;;; -2F87C;CJK COMPATIBILITY IDEOGRAPH-2F87C;Lo;0;L;5D43;;;;N;;;;; -2F87D;CJK COMPATIBILITY IDEOGRAPH-2F87D;Lo;0;L;21DE6;;;;N;;;;; -2F87E;CJK COMPATIBILITY IDEOGRAPH-2F87E;Lo;0;L;5D6E;;;;N;;;;; -2F87F;CJK COMPATIBILITY IDEOGRAPH-2F87F;Lo;0;L;5D6B;;;;N;;;;; -2F880;CJK COMPATIBILITY IDEOGRAPH-2F880;Lo;0;L;5D7C;;;;N;;;;; -2F881;CJK COMPATIBILITY IDEOGRAPH-2F881;Lo;0;L;5DE1;;;;N;;;;; -2F882;CJK COMPATIBILITY IDEOGRAPH-2F882;Lo;0;L;5DE2;;;;N;;;;; -2F883;CJK COMPATIBILITY IDEOGRAPH-2F883;Lo;0;L;382F;;;;N;;;;; -2F884;CJK COMPATIBILITY IDEOGRAPH-2F884;Lo;0;L;5DFD;;;;N;;;;; -2F885;CJK COMPATIBILITY IDEOGRAPH-2F885;Lo;0;L;5E28;;;;N;;;;; -2F886;CJK COMPATIBILITY IDEOGRAPH-2F886;Lo;0;L;5E3D;;;;N;;;;; -2F887;CJK COMPATIBILITY IDEOGRAPH-2F887;Lo;0;L;5E69;;;;N;;;;; -2F888;CJK COMPATIBILITY IDEOGRAPH-2F888;Lo;0;L;3862;;;;N;;;;; -2F889;CJK COMPATIBILITY IDEOGRAPH-2F889;Lo;0;L;22183;;;;N;;;;; -2F88A;CJK COMPATIBILITY IDEOGRAPH-2F88A;Lo;0;L;387C;;;;N;;;;; -2F88B;CJK COMPATIBILITY IDEOGRAPH-2F88B;Lo;0;L;5EB0;;;;N;;;;; -2F88C;CJK COMPATIBILITY IDEOGRAPH-2F88C;Lo;0;L;5EB3;;;;N;;;;; -2F88D;CJK COMPATIBILITY IDEOGRAPH-2F88D;Lo;0;L;5EB6;;;;N;;;;; -2F88E;CJK COMPATIBILITY IDEOGRAPH-2F88E;Lo;0;L;5ECA;;;;N;;;;; -2F88F;CJK COMPATIBILITY IDEOGRAPH-2F88F;Lo;0;L;2A392;;;;N;;;;; -2F890;CJK COMPATIBILITY IDEOGRAPH-2F890;Lo;0;L;5EFE;;;;N;;;;; -2F891;CJK COMPATIBILITY IDEOGRAPH-2F891;Lo;0;L;22331;;;;N;;;;; -2F892;CJK COMPATIBILITY IDEOGRAPH-2F892;Lo;0;L;22331;;;;N;;;;; -2F893;CJK COMPATIBILITY IDEOGRAPH-2F893;Lo;0;L;8201;;;;N;;;;; -2F894;CJK COMPATIBILITY IDEOGRAPH-2F894;Lo;0;L;5F22;;;;N;;;;; -2F895;CJK COMPATIBILITY IDEOGRAPH-2F895;Lo;0;L;5F22;;;;N;;;;; -2F896;CJK COMPATIBILITY IDEOGRAPH-2F896;Lo;0;L;38C7;;;;N;;;;; -2F897;CJK COMPATIBILITY IDEOGRAPH-2F897;Lo;0;L;232B8;;;;N;;;;; -2F898;CJK COMPATIBILITY IDEOGRAPH-2F898;Lo;0;L;261DA;;;;N;;;;; -2F899;CJK COMPATIBILITY IDEOGRAPH-2F899;Lo;0;L;5F62;;;;N;;;;; -2F89A;CJK COMPATIBILITY IDEOGRAPH-2F89A;Lo;0;L;5F6B;;;;N;;;;; -2F89B;CJK COMPATIBILITY IDEOGRAPH-2F89B;Lo;0;L;38E3;;;;N;;;;; -2F89C;CJK COMPATIBILITY IDEOGRAPH-2F89C;Lo;0;L;5F9A;;;;N;;;;; -2F89D;CJK COMPATIBILITY IDEOGRAPH-2F89D;Lo;0;L;5FCD;;;;N;;;;; -2F89E;CJK COMPATIBILITY IDEOGRAPH-2F89E;Lo;0;L;5FD7;;;;N;;;;; -2F89F;CJK COMPATIBILITY IDEOGRAPH-2F89F;Lo;0;L;5FF9;;;;N;;;;; -2F8A0;CJK COMPATIBILITY IDEOGRAPH-2F8A0;Lo;0;L;6081;;;;N;;;;; -2F8A1;CJK COMPATIBILITY IDEOGRAPH-2F8A1;Lo;0;L;393A;;;;N;;;;; -2F8A2;CJK COMPATIBILITY IDEOGRAPH-2F8A2;Lo;0;L;391C;;;;N;;;;; -2F8A3;CJK COMPATIBILITY IDEOGRAPH-2F8A3;Lo;0;L;6094;;;;N;;;;; -2F8A4;CJK COMPATIBILITY IDEOGRAPH-2F8A4;Lo;0;L;226D4;;;;N;;;;; -2F8A5;CJK COMPATIBILITY IDEOGRAPH-2F8A5;Lo;0;L;60C7;;;;N;;;;; -2F8A6;CJK COMPATIBILITY IDEOGRAPH-2F8A6;Lo;0;L;6148;;;;N;;;;; -2F8A7;CJK COMPATIBILITY IDEOGRAPH-2F8A7;Lo;0;L;614C;;;;N;;;;; -2F8A8;CJK COMPATIBILITY IDEOGRAPH-2F8A8;Lo;0;L;614E;;;;N;;;;; -2F8A9;CJK COMPATIBILITY IDEOGRAPH-2F8A9;Lo;0;L;614C;;;;N;;;;; -2F8AA;CJK COMPATIBILITY IDEOGRAPH-2F8AA;Lo;0;L;617A;;;;N;;;;; -2F8AB;CJK COMPATIBILITY IDEOGRAPH-2F8AB;Lo;0;L;618E;;;;N;;;;; -2F8AC;CJK COMPATIBILITY IDEOGRAPH-2F8AC;Lo;0;L;61B2;;;;N;;;;; -2F8AD;CJK COMPATIBILITY IDEOGRAPH-2F8AD;Lo;0;L;61A4;;;;N;;;;; -2F8AE;CJK COMPATIBILITY IDEOGRAPH-2F8AE;Lo;0;L;61AF;;;;N;;;;; -2F8AF;CJK COMPATIBILITY IDEOGRAPH-2F8AF;Lo;0;L;61DE;;;;N;;;;; -2F8B0;CJK COMPATIBILITY IDEOGRAPH-2F8B0;Lo;0;L;61F2;;;;N;;;;; -2F8B1;CJK COMPATIBILITY IDEOGRAPH-2F8B1;Lo;0;L;61F6;;;;N;;;;; -2F8B2;CJK COMPATIBILITY IDEOGRAPH-2F8B2;Lo;0;L;6210;;;;N;;;;; -2F8B3;CJK COMPATIBILITY IDEOGRAPH-2F8B3;Lo;0;L;621B;;;;N;;;;; -2F8B4;CJK COMPATIBILITY IDEOGRAPH-2F8B4;Lo;0;L;625D;;;;N;;;;; -2F8B5;CJK COMPATIBILITY IDEOGRAPH-2F8B5;Lo;0;L;62B1;;;;N;;;;; -2F8B6;CJK COMPATIBILITY IDEOGRAPH-2F8B6;Lo;0;L;62D4;;;;N;;;;; -2F8B7;CJK COMPATIBILITY IDEOGRAPH-2F8B7;Lo;0;L;6350;;;;N;;;;; -2F8B8;CJK COMPATIBILITY IDEOGRAPH-2F8B8;Lo;0;L;22B0C;;;;N;;;;; -2F8B9;CJK COMPATIBILITY IDEOGRAPH-2F8B9;Lo;0;L;633D;;;;N;;;;; -2F8BA;CJK COMPATIBILITY IDEOGRAPH-2F8BA;Lo;0;L;62FC;;;;N;;;;; -2F8BB;CJK COMPATIBILITY IDEOGRAPH-2F8BB;Lo;0;L;6368;;;;N;;;;; -2F8BC;CJK COMPATIBILITY IDEOGRAPH-2F8BC;Lo;0;L;6383;;;;N;;;;; -2F8BD;CJK COMPATIBILITY IDEOGRAPH-2F8BD;Lo;0;L;63E4;;;;N;;;;; -2F8BE;CJK COMPATIBILITY IDEOGRAPH-2F8BE;Lo;0;L;22BF1;;;;N;;;;; -2F8BF;CJK COMPATIBILITY IDEOGRAPH-2F8BF;Lo;0;L;6422;;;;N;;;;; -2F8C0;CJK COMPATIBILITY IDEOGRAPH-2F8C0;Lo;0;L;63C5;;;;N;;;;; -2F8C1;CJK COMPATIBILITY IDEOGRAPH-2F8C1;Lo;0;L;63A9;;;;N;;;;; -2F8C2;CJK COMPATIBILITY IDEOGRAPH-2F8C2;Lo;0;L;3A2E;;;;N;;;;; -2F8C3;CJK COMPATIBILITY IDEOGRAPH-2F8C3;Lo;0;L;6469;;;;N;;;;; -2F8C4;CJK COMPATIBILITY IDEOGRAPH-2F8C4;Lo;0;L;647E;;;;N;;;;; -2F8C5;CJK COMPATIBILITY IDEOGRAPH-2F8C5;Lo;0;L;649D;;;;N;;;;; -2F8C6;CJK COMPATIBILITY IDEOGRAPH-2F8C6;Lo;0;L;6477;;;;N;;;;; -2F8C7;CJK COMPATIBILITY IDEOGRAPH-2F8C7;Lo;0;L;3A6C;;;;N;;;;; -2F8C8;CJK COMPATIBILITY IDEOGRAPH-2F8C8;Lo;0;L;654F;;;;N;;;;; -2F8C9;CJK COMPATIBILITY IDEOGRAPH-2F8C9;Lo;0;L;656C;;;;N;;;;; -2F8CA;CJK COMPATIBILITY IDEOGRAPH-2F8CA;Lo;0;L;2300A;;;;N;;;;; -2F8CB;CJK COMPATIBILITY IDEOGRAPH-2F8CB;Lo;0;L;65E3;;;;N;;;;; -2F8CC;CJK COMPATIBILITY IDEOGRAPH-2F8CC;Lo;0;L;66F8;;;;N;;;;; -2F8CD;CJK COMPATIBILITY IDEOGRAPH-2F8CD;Lo;0;L;6649;;;;N;;;;; -2F8CE;CJK COMPATIBILITY IDEOGRAPH-2F8CE;Lo;0;L;3B19;;;;N;;;;; -2F8CF;CJK COMPATIBILITY IDEOGRAPH-2F8CF;Lo;0;L;6691;;;;N;;;;; -2F8D0;CJK COMPATIBILITY IDEOGRAPH-2F8D0;Lo;0;L;3B08;;;;N;;;;; -2F8D1;CJK COMPATIBILITY IDEOGRAPH-2F8D1;Lo;0;L;3AE4;;;;N;;;;; -2F8D2;CJK COMPATIBILITY IDEOGRAPH-2F8D2;Lo;0;L;5192;;;;N;;;;; -2F8D3;CJK COMPATIBILITY IDEOGRAPH-2F8D3;Lo;0;L;5195;;;;N;;;;; -2F8D4;CJK COMPATIBILITY IDEOGRAPH-2F8D4;Lo;0;L;6700;;;;N;;;;; -2F8D5;CJK COMPATIBILITY IDEOGRAPH-2F8D5;Lo;0;L;669C;;;;N;;;;; -2F8D6;CJK COMPATIBILITY IDEOGRAPH-2F8D6;Lo;0;L;80AD;;;;N;;;;; -2F8D7;CJK COMPATIBILITY IDEOGRAPH-2F8D7;Lo;0;L;43D9;;;;N;;;;; -2F8D8;CJK COMPATIBILITY IDEOGRAPH-2F8D8;Lo;0;L;6717;;;;N;;;;; -2F8D9;CJK COMPATIBILITY IDEOGRAPH-2F8D9;Lo;0;L;671B;;;;N;;;;; -2F8DA;CJK COMPATIBILITY IDEOGRAPH-2F8DA;Lo;0;L;6721;;;;N;;;;; -2F8DB;CJK COMPATIBILITY IDEOGRAPH-2F8DB;Lo;0;L;675E;;;;N;;;;; -2F8DC;CJK COMPATIBILITY IDEOGRAPH-2F8DC;Lo;0;L;6753;;;;N;;;;; -2F8DD;CJK COMPATIBILITY IDEOGRAPH-2F8DD;Lo;0;L;233C3;;;;N;;;;; -2F8DE;CJK COMPATIBILITY IDEOGRAPH-2F8DE;Lo;0;L;3B49;;;;N;;;;; -2F8DF;CJK COMPATIBILITY IDEOGRAPH-2F8DF;Lo;0;L;67FA;;;;N;;;;; -2F8E0;CJK COMPATIBILITY IDEOGRAPH-2F8E0;Lo;0;L;6785;;;;N;;;;; -2F8E1;CJK COMPATIBILITY IDEOGRAPH-2F8E1;Lo;0;L;6852;;;;N;;;;; -2F8E2;CJK COMPATIBILITY IDEOGRAPH-2F8E2;Lo;0;L;6885;;;;N;;;;; -2F8E3;CJK COMPATIBILITY IDEOGRAPH-2F8E3;Lo;0;L;2346D;;;;N;;;;; -2F8E4;CJK COMPATIBILITY IDEOGRAPH-2F8E4;Lo;0;L;688E;;;;N;;;;; -2F8E5;CJK COMPATIBILITY IDEOGRAPH-2F8E5;Lo;0;L;681F;;;;N;;;;; -2F8E6;CJK COMPATIBILITY IDEOGRAPH-2F8E6;Lo;0;L;6914;;;;N;;;;; -2F8E7;CJK COMPATIBILITY IDEOGRAPH-2F8E7;Lo;0;L;3B9D;;;;N;;;;; -2F8E8;CJK COMPATIBILITY IDEOGRAPH-2F8E8;Lo;0;L;6942;;;;N;;;;; -2F8E9;CJK COMPATIBILITY IDEOGRAPH-2F8E9;Lo;0;L;69A3;;;;N;;;;; -2F8EA;CJK COMPATIBILITY IDEOGRAPH-2F8EA;Lo;0;L;69EA;;;;N;;;;; -2F8EB;CJK COMPATIBILITY IDEOGRAPH-2F8EB;Lo;0;L;6AA8;;;;N;;;;; -2F8EC;CJK COMPATIBILITY IDEOGRAPH-2F8EC;Lo;0;L;236A3;;;;N;;;;; -2F8ED;CJK COMPATIBILITY IDEOGRAPH-2F8ED;Lo;0;L;6ADB;;;;N;;;;; -2F8EE;CJK COMPATIBILITY IDEOGRAPH-2F8EE;Lo;0;L;3C18;;;;N;;;;; -2F8EF;CJK COMPATIBILITY IDEOGRAPH-2F8EF;Lo;0;L;6B21;;;;N;;;;; -2F8F0;CJK COMPATIBILITY IDEOGRAPH-2F8F0;Lo;0;L;238A7;;;;N;;;;; -2F8F1;CJK COMPATIBILITY IDEOGRAPH-2F8F1;Lo;0;L;6B54;;;;N;;;;; -2F8F2;CJK COMPATIBILITY IDEOGRAPH-2F8F2;Lo;0;L;3C4E;;;;N;;;;; -2F8F3;CJK COMPATIBILITY IDEOGRAPH-2F8F3;Lo;0;L;6B72;;;;N;;;;; -2F8F4;CJK COMPATIBILITY IDEOGRAPH-2F8F4;Lo;0;L;6B9F;;;;N;;;;; -2F8F5;CJK COMPATIBILITY IDEOGRAPH-2F8F5;Lo;0;L;6BBA;;;;N;;;;; -2F8F6;CJK COMPATIBILITY IDEOGRAPH-2F8F6;Lo;0;L;6BBB;;;;N;;;;; -2F8F7;CJK COMPATIBILITY IDEOGRAPH-2F8F7;Lo;0;L;23A8D;;;;N;;;;; -2F8F8;CJK COMPATIBILITY IDEOGRAPH-2F8F8;Lo;0;L;21D0B;;;;N;;;;; -2F8F9;CJK COMPATIBILITY IDEOGRAPH-2F8F9;Lo;0;L;23AFA;;;;N;;;;; -2F8FA;CJK COMPATIBILITY IDEOGRAPH-2F8FA;Lo;0;L;6C4E;;;;N;;;;; -2F8FB;CJK COMPATIBILITY IDEOGRAPH-2F8FB;Lo;0;L;23CBC;;;;N;;;;; -2F8FC;CJK COMPATIBILITY IDEOGRAPH-2F8FC;Lo;0;L;6CBF;;;;N;;;;; -2F8FD;CJK COMPATIBILITY IDEOGRAPH-2F8FD;Lo;0;L;6CCD;;;;N;;;;; -2F8FE;CJK COMPATIBILITY IDEOGRAPH-2F8FE;Lo;0;L;6C67;;;;N;;;;; -2F8FF;CJK COMPATIBILITY IDEOGRAPH-2F8FF;Lo;0;L;6D16;;;;N;;;;; -2F900;CJK COMPATIBILITY IDEOGRAPH-2F900;Lo;0;L;6D3E;;;;N;;;;; -2F901;CJK COMPATIBILITY IDEOGRAPH-2F901;Lo;0;L;6D77;;;;N;;;;; -2F902;CJK COMPATIBILITY IDEOGRAPH-2F902;Lo;0;L;6D41;;;;N;;;;; -2F903;CJK COMPATIBILITY IDEOGRAPH-2F903;Lo;0;L;6D69;;;;N;;;;; -2F904;CJK COMPATIBILITY IDEOGRAPH-2F904;Lo;0;L;6D78;;;;N;;;;; -2F905;CJK COMPATIBILITY IDEOGRAPH-2F905;Lo;0;L;6D85;;;;N;;;;; -2F906;CJK COMPATIBILITY IDEOGRAPH-2F906;Lo;0;L;23D1E;;;;N;;;;; -2F907;CJK COMPATIBILITY IDEOGRAPH-2F907;Lo;0;L;6D34;;;;N;;;;; -2F908;CJK COMPATIBILITY IDEOGRAPH-2F908;Lo;0;L;6E2F;;;;N;;;;; -2F909;CJK COMPATIBILITY IDEOGRAPH-2F909;Lo;0;L;6E6E;;;;N;;;;; -2F90A;CJK COMPATIBILITY IDEOGRAPH-2F90A;Lo;0;L;3D33;;;;N;;;;; -2F90B;CJK COMPATIBILITY IDEOGRAPH-2F90B;Lo;0;L;6ECB;;;;N;;;;; -2F90C;CJK COMPATIBILITY IDEOGRAPH-2F90C;Lo;0;L;6EC7;;;;N;;;;; -2F90D;CJK COMPATIBILITY IDEOGRAPH-2F90D;Lo;0;L;23ED1;;;;N;;;;; -2F90E;CJK COMPATIBILITY IDEOGRAPH-2F90E;Lo;0;L;6DF9;;;;N;;;;; -2F90F;CJK COMPATIBILITY IDEOGRAPH-2F90F;Lo;0;L;6F6E;;;;N;;;;; -2F910;CJK COMPATIBILITY IDEOGRAPH-2F910;Lo;0;L;23F5E;;;;N;;;;; -2F911;CJK COMPATIBILITY IDEOGRAPH-2F911;Lo;0;L;23F8E;;;;N;;;;; -2F912;CJK COMPATIBILITY IDEOGRAPH-2F912;Lo;0;L;6FC6;;;;N;;;;; -2F913;CJK COMPATIBILITY IDEOGRAPH-2F913;Lo;0;L;7039;;;;N;;;;; -2F914;CJK COMPATIBILITY IDEOGRAPH-2F914;Lo;0;L;701E;;;;N;;;;; -2F915;CJK COMPATIBILITY IDEOGRAPH-2F915;Lo;0;L;701B;;;;N;;;;; -2F916;CJK COMPATIBILITY IDEOGRAPH-2F916;Lo;0;L;3D96;;;;N;;;;; -2F917;CJK COMPATIBILITY IDEOGRAPH-2F917;Lo;0;L;704A;;;;N;;;;; -2F918;CJK COMPATIBILITY IDEOGRAPH-2F918;Lo;0;L;707D;;;;N;;;;; -2F919;CJK COMPATIBILITY IDEOGRAPH-2F919;Lo;0;L;7077;;;;N;;;;; -2F91A;CJK COMPATIBILITY IDEOGRAPH-2F91A;Lo;0;L;70AD;;;;N;;;;; -2F91B;CJK COMPATIBILITY IDEOGRAPH-2F91B;Lo;0;L;20525;;;;N;;;;; -2F91C;CJK COMPATIBILITY IDEOGRAPH-2F91C;Lo;0;L;7145;;;;N;;;;; -2F91D;CJK COMPATIBILITY IDEOGRAPH-2F91D;Lo;0;L;24263;;;;N;;;;; -2F91E;CJK COMPATIBILITY IDEOGRAPH-2F91E;Lo;0;L;719C;;;;N;;;;; -2F91F;CJK COMPATIBILITY IDEOGRAPH-2F91F;Lo;0;L;43AB;;;;N;;;;; -2F920;CJK COMPATIBILITY IDEOGRAPH-2F920;Lo;0;L;7228;;;;N;;;;; -2F921;CJK COMPATIBILITY IDEOGRAPH-2F921;Lo;0;L;7235;;;;N;;;;; -2F922;CJK COMPATIBILITY IDEOGRAPH-2F922;Lo;0;L;7250;;;;N;;;;; -2F923;CJK COMPATIBILITY IDEOGRAPH-2F923;Lo;0;L;24608;;;;N;;;;; -2F924;CJK COMPATIBILITY IDEOGRAPH-2F924;Lo;0;L;7280;;;;N;;;;; -2F925;CJK COMPATIBILITY IDEOGRAPH-2F925;Lo;0;L;7295;;;;N;;;;; -2F926;CJK COMPATIBILITY IDEOGRAPH-2F926;Lo;0;L;24735;;;;N;;;;; -2F927;CJK COMPATIBILITY IDEOGRAPH-2F927;Lo;0;L;24814;;;;N;;;;; -2F928;CJK COMPATIBILITY IDEOGRAPH-2F928;Lo;0;L;737A;;;;N;;;;; -2F929;CJK COMPATIBILITY IDEOGRAPH-2F929;Lo;0;L;738B;;;;N;;;;; -2F92A;CJK COMPATIBILITY IDEOGRAPH-2F92A;Lo;0;L;3EAC;;;;N;;;;; -2F92B;CJK COMPATIBILITY IDEOGRAPH-2F92B;Lo;0;L;73A5;;;;N;;;;; -2F92C;CJK COMPATIBILITY IDEOGRAPH-2F92C;Lo;0;L;3EB8;;;;N;;;;; -2F92D;CJK COMPATIBILITY IDEOGRAPH-2F92D;Lo;0;L;3EB8;;;;N;;;;; -2F92E;CJK COMPATIBILITY IDEOGRAPH-2F92E;Lo;0;L;7447;;;;N;;;;; -2F92F;CJK COMPATIBILITY IDEOGRAPH-2F92F;Lo;0;L;745C;;;;N;;;;; -2F930;CJK COMPATIBILITY IDEOGRAPH-2F930;Lo;0;L;7471;;;;N;;;;; -2F931;CJK COMPATIBILITY IDEOGRAPH-2F931;Lo;0;L;7485;;;;N;;;;; -2F932;CJK COMPATIBILITY IDEOGRAPH-2F932;Lo;0;L;74CA;;;;N;;;;; -2F933;CJK COMPATIBILITY IDEOGRAPH-2F933;Lo;0;L;3F1B;;;;N;;;;; -2F934;CJK COMPATIBILITY IDEOGRAPH-2F934;Lo;0;L;7524;;;;N;;;;; -2F935;CJK COMPATIBILITY IDEOGRAPH-2F935;Lo;0;L;24C36;;;;N;;;;; -2F936;CJK COMPATIBILITY IDEOGRAPH-2F936;Lo;0;L;753E;;;;N;;;;; -2F937;CJK COMPATIBILITY IDEOGRAPH-2F937;Lo;0;L;24C92;;;;N;;;;; -2F938;CJK COMPATIBILITY IDEOGRAPH-2F938;Lo;0;L;7570;;;;N;;;;; -2F939;CJK COMPATIBILITY IDEOGRAPH-2F939;Lo;0;L;2219F;;;;N;;;;; -2F93A;CJK COMPATIBILITY IDEOGRAPH-2F93A;Lo;0;L;7610;;;;N;;;;; -2F93B;CJK COMPATIBILITY IDEOGRAPH-2F93B;Lo;0;L;24FA1;;;;N;;;;; -2F93C;CJK COMPATIBILITY IDEOGRAPH-2F93C;Lo;0;L;24FB8;;;;N;;;;; -2F93D;CJK COMPATIBILITY IDEOGRAPH-2F93D;Lo;0;L;25044;;;;N;;;;; -2F93E;CJK COMPATIBILITY IDEOGRAPH-2F93E;Lo;0;L;3FFC;;;;N;;;;; -2F93F;CJK COMPATIBILITY IDEOGRAPH-2F93F;Lo;0;L;4008;;;;N;;;;; -2F940;CJK COMPATIBILITY IDEOGRAPH-2F940;Lo;0;L;76F4;;;;N;;;;; -2F941;CJK COMPATIBILITY IDEOGRAPH-2F941;Lo;0;L;250F3;;;;N;;;;; -2F942;CJK COMPATIBILITY IDEOGRAPH-2F942;Lo;0;L;250F2;;;;N;;;;; -2F943;CJK COMPATIBILITY IDEOGRAPH-2F943;Lo;0;L;25119;;;;N;;;;; -2F944;CJK COMPATIBILITY IDEOGRAPH-2F944;Lo;0;L;25133;;;;N;;;;; -2F945;CJK COMPATIBILITY IDEOGRAPH-2F945;Lo;0;L;771E;;;;N;;;;; -2F946;CJK COMPATIBILITY IDEOGRAPH-2F946;Lo;0;L;771F;;;;N;;;;; -2F947;CJK COMPATIBILITY IDEOGRAPH-2F947;Lo;0;L;771F;;;;N;;;;; -2F948;CJK COMPATIBILITY IDEOGRAPH-2F948;Lo;0;L;774A;;;;N;;;;; -2F949;CJK COMPATIBILITY IDEOGRAPH-2F949;Lo;0;L;4039;;;;N;;;;; -2F94A;CJK COMPATIBILITY IDEOGRAPH-2F94A;Lo;0;L;778B;;;;N;;;;; -2F94B;CJK COMPATIBILITY IDEOGRAPH-2F94B;Lo;0;L;4046;;;;N;;;;; -2F94C;CJK COMPATIBILITY IDEOGRAPH-2F94C;Lo;0;L;4096;;;;N;;;;; -2F94D;CJK COMPATIBILITY IDEOGRAPH-2F94D;Lo;0;L;2541D;;;;N;;;;; -2F94E;CJK COMPATIBILITY IDEOGRAPH-2F94E;Lo;0;L;784E;;;;N;;;;; -2F94F;CJK COMPATIBILITY IDEOGRAPH-2F94F;Lo;0;L;788C;;;;N;;;;; -2F950;CJK COMPATIBILITY IDEOGRAPH-2F950;Lo;0;L;78CC;;;;N;;;;; -2F951;CJK COMPATIBILITY IDEOGRAPH-2F951;Lo;0;L;40E3;;;;N;;;;; -2F952;CJK COMPATIBILITY IDEOGRAPH-2F952;Lo;0;L;25626;;;;N;;;;; -2F953;CJK COMPATIBILITY IDEOGRAPH-2F953;Lo;0;L;7956;;;;N;;;;; -2F954;CJK COMPATIBILITY IDEOGRAPH-2F954;Lo;0;L;2569A;;;;N;;;;; -2F955;CJK COMPATIBILITY IDEOGRAPH-2F955;Lo;0;L;256C5;;;;N;;;;; -2F956;CJK COMPATIBILITY IDEOGRAPH-2F956;Lo;0;L;798F;;;;N;;;;; -2F957;CJK COMPATIBILITY IDEOGRAPH-2F957;Lo;0;L;79EB;;;;N;;;;; -2F958;CJK COMPATIBILITY IDEOGRAPH-2F958;Lo;0;L;412F;;;;N;;;;; -2F959;CJK COMPATIBILITY IDEOGRAPH-2F959;Lo;0;L;7A40;;;;N;;;;; -2F95A;CJK COMPATIBILITY IDEOGRAPH-2F95A;Lo;0;L;7A4A;;;;N;;;;; -2F95B;CJK COMPATIBILITY IDEOGRAPH-2F95B;Lo;0;L;7A4F;;;;N;;;;; -2F95C;CJK COMPATIBILITY IDEOGRAPH-2F95C;Lo;0;L;2597C;;;;N;;;;; -2F95D;CJK COMPATIBILITY IDEOGRAPH-2F95D;Lo;0;L;25AA7;;;;N;;;;; -2F95E;CJK COMPATIBILITY IDEOGRAPH-2F95E;Lo;0;L;25AA7;;;;N;;;;; -2F95F;CJK COMPATIBILITY IDEOGRAPH-2F95F;Lo;0;L;7AAE;;;;N;;;;; -2F960;CJK COMPATIBILITY IDEOGRAPH-2F960;Lo;0;L;4202;;;;N;;;;; -2F961;CJK COMPATIBILITY IDEOGRAPH-2F961;Lo;0;L;25BAB;;;;N;;;;; -2F962;CJK COMPATIBILITY IDEOGRAPH-2F962;Lo;0;L;7BC6;;;;N;;;;; -2F963;CJK COMPATIBILITY IDEOGRAPH-2F963;Lo;0;L;7BC9;;;;N;;;;; -2F964;CJK COMPATIBILITY IDEOGRAPH-2F964;Lo;0;L;4227;;;;N;;;;; -2F965;CJK COMPATIBILITY IDEOGRAPH-2F965;Lo;0;L;25C80;;;;N;;;;; -2F966;CJK COMPATIBILITY IDEOGRAPH-2F966;Lo;0;L;7CD2;;;;N;;;;; -2F967;CJK COMPATIBILITY IDEOGRAPH-2F967;Lo;0;L;42A0;;;;N;;;;; -2F968;CJK COMPATIBILITY IDEOGRAPH-2F968;Lo;0;L;7CE8;;;;N;;;;; -2F969;CJK COMPATIBILITY IDEOGRAPH-2F969;Lo;0;L;7CE3;;;;N;;;;; -2F96A;CJK COMPATIBILITY IDEOGRAPH-2F96A;Lo;0;L;7D00;;;;N;;;;; -2F96B;CJK COMPATIBILITY IDEOGRAPH-2F96B;Lo;0;L;25F86;;;;N;;;;; -2F96C;CJK COMPATIBILITY IDEOGRAPH-2F96C;Lo;0;L;7D63;;;;N;;;;; -2F96D;CJK COMPATIBILITY IDEOGRAPH-2F96D;Lo;0;L;4301;;;;N;;;;; -2F96E;CJK COMPATIBILITY IDEOGRAPH-2F96E;Lo;0;L;7DC7;;;;N;;;;; -2F96F;CJK COMPATIBILITY IDEOGRAPH-2F96F;Lo;0;L;7E02;;;;N;;;;; -2F970;CJK COMPATIBILITY IDEOGRAPH-2F970;Lo;0;L;7E45;;;;N;;;;; -2F971;CJK COMPATIBILITY IDEOGRAPH-2F971;Lo;0;L;4334;;;;N;;;;; -2F972;CJK COMPATIBILITY IDEOGRAPH-2F972;Lo;0;L;26228;;;;N;;;;; -2F973;CJK COMPATIBILITY IDEOGRAPH-2F973;Lo;0;L;26247;;;;N;;;;; -2F974;CJK COMPATIBILITY IDEOGRAPH-2F974;Lo;0;L;4359;;;;N;;;;; -2F975;CJK COMPATIBILITY IDEOGRAPH-2F975;Lo;0;L;262D9;;;;N;;;;; -2F976;CJK COMPATIBILITY IDEOGRAPH-2F976;Lo;0;L;7F7A;;;;N;;;;; -2F977;CJK COMPATIBILITY IDEOGRAPH-2F977;Lo;0;L;2633E;;;;N;;;;; -2F978;CJK COMPATIBILITY IDEOGRAPH-2F978;Lo;0;L;7F95;;;;N;;;;; -2F979;CJK COMPATIBILITY IDEOGRAPH-2F979;Lo;0;L;7FFA;;;;N;;;;; -2F97A;CJK COMPATIBILITY IDEOGRAPH-2F97A;Lo;0;L;8005;;;;N;;;;; -2F97B;CJK COMPATIBILITY IDEOGRAPH-2F97B;Lo;0;L;264DA;;;;N;;;;; -2F97C;CJK COMPATIBILITY IDEOGRAPH-2F97C;Lo;0;L;26523;;;;N;;;;; -2F97D;CJK COMPATIBILITY IDEOGRAPH-2F97D;Lo;0;L;8060;;;;N;;;;; -2F97E;CJK COMPATIBILITY IDEOGRAPH-2F97E;Lo;0;L;265A8;;;;N;;;;; -2F97F;CJK COMPATIBILITY IDEOGRAPH-2F97F;Lo;0;L;8070;;;;N;;;;; -2F980;CJK COMPATIBILITY IDEOGRAPH-2F980;Lo;0;L;2335F;;;;N;;;;; -2F981;CJK COMPATIBILITY IDEOGRAPH-2F981;Lo;0;L;43D5;;;;N;;;;; -2F982;CJK COMPATIBILITY IDEOGRAPH-2F982;Lo;0;L;80B2;;;;N;;;;; -2F983;CJK COMPATIBILITY IDEOGRAPH-2F983;Lo;0;L;8103;;;;N;;;;; -2F984;CJK COMPATIBILITY IDEOGRAPH-2F984;Lo;0;L;440B;;;;N;;;;; -2F985;CJK COMPATIBILITY IDEOGRAPH-2F985;Lo;0;L;813E;;;;N;;;;; -2F986;CJK COMPATIBILITY IDEOGRAPH-2F986;Lo;0;L;5AB5;;;;N;;;;; -2F987;CJK COMPATIBILITY IDEOGRAPH-2F987;Lo;0;L;267A7;;;;N;;;;; -2F988;CJK COMPATIBILITY IDEOGRAPH-2F988;Lo;0;L;267B5;;;;N;;;;; -2F989;CJK COMPATIBILITY IDEOGRAPH-2F989;Lo;0;L;23393;;;;N;;;;; -2F98A;CJK COMPATIBILITY IDEOGRAPH-2F98A;Lo;0;L;2339C;;;;N;;;;; -2F98B;CJK COMPATIBILITY IDEOGRAPH-2F98B;Lo;0;L;8201;;;;N;;;;; -2F98C;CJK COMPATIBILITY IDEOGRAPH-2F98C;Lo;0;L;8204;;;;N;;;;; -2F98D;CJK COMPATIBILITY IDEOGRAPH-2F98D;Lo;0;L;8F9E;;;;N;;;;; -2F98E;CJK COMPATIBILITY IDEOGRAPH-2F98E;Lo;0;L;446B;;;;N;;;;; -2F98F;CJK COMPATIBILITY IDEOGRAPH-2F98F;Lo;0;L;8291;;;;N;;;;; -2F990;CJK COMPATIBILITY IDEOGRAPH-2F990;Lo;0;L;828B;;;;N;;;;; -2F991;CJK COMPATIBILITY IDEOGRAPH-2F991;Lo;0;L;829D;;;;N;;;;; -2F992;CJK COMPATIBILITY IDEOGRAPH-2F992;Lo;0;L;52B3;;;;N;;;;; -2F993;CJK COMPATIBILITY IDEOGRAPH-2F993;Lo;0;L;82B1;;;;N;;;;; -2F994;CJK COMPATIBILITY IDEOGRAPH-2F994;Lo;0;L;82B3;;;;N;;;;; -2F995;CJK COMPATIBILITY IDEOGRAPH-2F995;Lo;0;L;82BD;;;;N;;;;; -2F996;CJK COMPATIBILITY IDEOGRAPH-2F996;Lo;0;L;82E6;;;;N;;;;; -2F997;CJK COMPATIBILITY IDEOGRAPH-2F997;Lo;0;L;26B3C;;;;N;;;;; -2F998;CJK COMPATIBILITY IDEOGRAPH-2F998;Lo;0;L;82E5;;;;N;;;;; -2F999;CJK COMPATIBILITY IDEOGRAPH-2F999;Lo;0;L;831D;;;;N;;;;; -2F99A;CJK COMPATIBILITY IDEOGRAPH-2F99A;Lo;0;L;8363;;;;N;;;;; -2F99B;CJK COMPATIBILITY IDEOGRAPH-2F99B;Lo;0;L;83AD;;;;N;;;;; -2F99C;CJK COMPATIBILITY IDEOGRAPH-2F99C;Lo;0;L;8323;;;;N;;;;; -2F99D;CJK COMPATIBILITY IDEOGRAPH-2F99D;Lo;0;L;83BD;;;;N;;;;; -2F99E;CJK COMPATIBILITY IDEOGRAPH-2F99E;Lo;0;L;83E7;;;;N;;;;; -2F99F;CJK COMPATIBILITY IDEOGRAPH-2F99F;Lo;0;L;8457;;;;N;;;;; -2F9A0;CJK COMPATIBILITY IDEOGRAPH-2F9A0;Lo;0;L;8353;;;;N;;;;; -2F9A1;CJK COMPATIBILITY IDEOGRAPH-2F9A1;Lo;0;L;83CA;;;;N;;;;; -2F9A2;CJK COMPATIBILITY IDEOGRAPH-2F9A2;Lo;0;L;83CC;;;;N;;;;; -2F9A3;CJK COMPATIBILITY IDEOGRAPH-2F9A3;Lo;0;L;83DC;;;;N;;;;; -2F9A4;CJK COMPATIBILITY IDEOGRAPH-2F9A4;Lo;0;L;26C36;;;;N;;;;; -2F9A5;CJK COMPATIBILITY IDEOGRAPH-2F9A5;Lo;0;L;26D6B;;;;N;;;;; -2F9A6;CJK COMPATIBILITY IDEOGRAPH-2F9A6;Lo;0;L;26CD5;;;;N;;;;; -2F9A7;CJK COMPATIBILITY IDEOGRAPH-2F9A7;Lo;0;L;452B;;;;N;;;;; -2F9A8;CJK COMPATIBILITY IDEOGRAPH-2F9A8;Lo;0;L;84F1;;;;N;;;;; -2F9A9;CJK COMPATIBILITY IDEOGRAPH-2F9A9;Lo;0;L;84F3;;;;N;;;;; -2F9AA;CJK COMPATIBILITY IDEOGRAPH-2F9AA;Lo;0;L;8516;;;;N;;;;; -2F9AB;CJK COMPATIBILITY IDEOGRAPH-2F9AB;Lo;0;L;273CA;;;;N;;;;; -2F9AC;CJK COMPATIBILITY IDEOGRAPH-2F9AC;Lo;0;L;8564;;;;N;;;;; -2F9AD;CJK COMPATIBILITY IDEOGRAPH-2F9AD;Lo;0;L;26F2C;;;;N;;;;; -2F9AE;CJK COMPATIBILITY IDEOGRAPH-2F9AE;Lo;0;L;455D;;;;N;;;;; -2F9AF;CJK COMPATIBILITY IDEOGRAPH-2F9AF;Lo;0;L;4561;;;;N;;;;; -2F9B0;CJK COMPATIBILITY IDEOGRAPH-2F9B0;Lo;0;L;26FB1;;;;N;;;;; -2F9B1;CJK COMPATIBILITY IDEOGRAPH-2F9B1;Lo;0;L;270D2;;;;N;;;;; -2F9B2;CJK COMPATIBILITY IDEOGRAPH-2F9B2;Lo;0;L;456B;;;;N;;;;; -2F9B3;CJK COMPATIBILITY IDEOGRAPH-2F9B3;Lo;0;L;8650;;;;N;;;;; -2F9B4;CJK COMPATIBILITY IDEOGRAPH-2F9B4;Lo;0;L;865C;;;;N;;;;; -2F9B5;CJK COMPATIBILITY IDEOGRAPH-2F9B5;Lo;0;L;8667;;;;N;;;;; -2F9B6;CJK COMPATIBILITY IDEOGRAPH-2F9B6;Lo;0;L;8669;;;;N;;;;; -2F9B7;CJK COMPATIBILITY IDEOGRAPH-2F9B7;Lo;0;L;86A9;;;;N;;;;; -2F9B8;CJK COMPATIBILITY IDEOGRAPH-2F9B8;Lo;0;L;8688;;;;N;;;;; -2F9B9;CJK COMPATIBILITY IDEOGRAPH-2F9B9;Lo;0;L;870E;;;;N;;;;; -2F9BA;CJK COMPATIBILITY IDEOGRAPH-2F9BA;Lo;0;L;86E2;;;;N;;;;; -2F9BB;CJK COMPATIBILITY IDEOGRAPH-2F9BB;Lo;0;L;8779;;;;N;;;;; -2F9BC;CJK COMPATIBILITY IDEOGRAPH-2F9BC;Lo;0;L;8728;;;;N;;;;; -2F9BD;CJK COMPATIBILITY IDEOGRAPH-2F9BD;Lo;0;L;876B;;;;N;;;;; -2F9BE;CJK COMPATIBILITY IDEOGRAPH-2F9BE;Lo;0;L;8786;;;;N;;;;; -2F9BF;CJK COMPATIBILITY IDEOGRAPH-2F9BF;Lo;0;L;4D57;;;;N;;;;; -2F9C0;CJK COMPATIBILITY IDEOGRAPH-2F9C0;Lo;0;L;87E1;;;;N;;;;; -2F9C1;CJK COMPATIBILITY IDEOGRAPH-2F9C1;Lo;0;L;8801;;;;N;;;;; -2F9C2;CJK COMPATIBILITY IDEOGRAPH-2F9C2;Lo;0;L;45F9;;;;N;;;;; -2F9C3;CJK COMPATIBILITY IDEOGRAPH-2F9C3;Lo;0;L;8860;;;;N;;;;; -2F9C4;CJK COMPATIBILITY IDEOGRAPH-2F9C4;Lo;0;L;8863;;;;N;;;;; -2F9C5;CJK COMPATIBILITY IDEOGRAPH-2F9C5;Lo;0;L;27667;;;;N;;;;; -2F9C6;CJK COMPATIBILITY IDEOGRAPH-2F9C6;Lo;0;L;88D7;;;;N;;;;; -2F9C7;CJK COMPATIBILITY IDEOGRAPH-2F9C7;Lo;0;L;88DE;;;;N;;;;; -2F9C8;CJK COMPATIBILITY IDEOGRAPH-2F9C8;Lo;0;L;4635;;;;N;;;;; -2F9C9;CJK COMPATIBILITY IDEOGRAPH-2F9C9;Lo;0;L;88FA;;;;N;;;;; -2F9CA;CJK COMPATIBILITY IDEOGRAPH-2F9CA;Lo;0;L;34BB;;;;N;;;;; -2F9CB;CJK COMPATIBILITY IDEOGRAPH-2F9CB;Lo;0;L;278AE;;;;N;;;;; -2F9CC;CJK COMPATIBILITY IDEOGRAPH-2F9CC;Lo;0;L;27966;;;;N;;;;; -2F9CD;CJK COMPATIBILITY IDEOGRAPH-2F9CD;Lo;0;L;46BE;;;;N;;;;; -2F9CE;CJK COMPATIBILITY IDEOGRAPH-2F9CE;Lo;0;L;46C7;;;;N;;;;; -2F9CF;CJK COMPATIBILITY IDEOGRAPH-2F9CF;Lo;0;L;8AA0;;;;N;;;;; -2F9D0;CJK COMPATIBILITY IDEOGRAPH-2F9D0;Lo;0;L;8AED;;;;N;;;;; -2F9D1;CJK COMPATIBILITY IDEOGRAPH-2F9D1;Lo;0;L;8B8A;;;;N;;;;; -2F9D2;CJK COMPATIBILITY IDEOGRAPH-2F9D2;Lo;0;L;8C55;;;;N;;;;; -2F9D3;CJK COMPATIBILITY IDEOGRAPH-2F9D3;Lo;0;L;27CA8;;;;N;;;;; -2F9D4;CJK COMPATIBILITY IDEOGRAPH-2F9D4;Lo;0;L;8CAB;;;;N;;;;; -2F9D5;CJK COMPATIBILITY IDEOGRAPH-2F9D5;Lo;0;L;8CC1;;;;N;;;;; -2F9D6;CJK COMPATIBILITY IDEOGRAPH-2F9D6;Lo;0;L;8D1B;;;;N;;;;; -2F9D7;CJK COMPATIBILITY IDEOGRAPH-2F9D7;Lo;0;L;8D77;;;;N;;;;; -2F9D8;CJK COMPATIBILITY IDEOGRAPH-2F9D8;Lo;0;L;27F2F;;;;N;;;;; -2F9D9;CJK COMPATIBILITY IDEOGRAPH-2F9D9;Lo;0;L;20804;;;;N;;;;; -2F9DA;CJK COMPATIBILITY IDEOGRAPH-2F9DA;Lo;0;L;8DCB;;;;N;;;;; -2F9DB;CJK COMPATIBILITY IDEOGRAPH-2F9DB;Lo;0;L;8DBC;;;;N;;;;; -2F9DC;CJK COMPATIBILITY IDEOGRAPH-2F9DC;Lo;0;L;8DF0;;;;N;;;;; -2F9DD;CJK COMPATIBILITY IDEOGRAPH-2F9DD;Lo;0;L;208DE;;;;N;;;;; -2F9DE;CJK COMPATIBILITY IDEOGRAPH-2F9DE;Lo;0;L;8ED4;;;;N;;;;; -2F9DF;CJK COMPATIBILITY IDEOGRAPH-2F9DF;Lo;0;L;8F38;;;;N;;;;; -2F9E0;CJK COMPATIBILITY IDEOGRAPH-2F9E0;Lo;0;L;285D2;;;;N;;;;; -2F9E1;CJK COMPATIBILITY IDEOGRAPH-2F9E1;Lo;0;L;285ED;;;;N;;;;; -2F9E2;CJK COMPATIBILITY IDEOGRAPH-2F9E2;Lo;0;L;9094;;;;N;;;;; -2F9E3;CJK COMPATIBILITY IDEOGRAPH-2F9E3;Lo;0;L;90F1;;;;N;;;;; -2F9E4;CJK COMPATIBILITY IDEOGRAPH-2F9E4;Lo;0;L;9111;;;;N;;;;; -2F9E5;CJK COMPATIBILITY IDEOGRAPH-2F9E5;Lo;0;L;2872E;;;;N;;;;; -2F9E6;CJK COMPATIBILITY IDEOGRAPH-2F9E6;Lo;0;L;911B;;;;N;;;;; -2F9E7;CJK COMPATIBILITY IDEOGRAPH-2F9E7;Lo;0;L;9238;;;;N;;;;; -2F9E8;CJK COMPATIBILITY IDEOGRAPH-2F9E8;Lo;0;L;92D7;;;;N;;;;; -2F9E9;CJK COMPATIBILITY IDEOGRAPH-2F9E9;Lo;0;L;92D8;;;;N;;;;; -2F9EA;CJK COMPATIBILITY IDEOGRAPH-2F9EA;Lo;0;L;927C;;;;N;;;;; -2F9EB;CJK COMPATIBILITY IDEOGRAPH-2F9EB;Lo;0;L;93F9;;;;N;;;;; -2F9EC;CJK COMPATIBILITY IDEOGRAPH-2F9EC;Lo;0;L;9415;;;;N;;;;; -2F9ED;CJK COMPATIBILITY IDEOGRAPH-2F9ED;Lo;0;L;28BFA;;;;N;;;;; -2F9EE;CJK COMPATIBILITY IDEOGRAPH-2F9EE;Lo;0;L;958B;;;;N;;;;; -2F9EF;CJK COMPATIBILITY IDEOGRAPH-2F9EF;Lo;0;L;4995;;;;N;;;;; -2F9F0;CJK COMPATIBILITY IDEOGRAPH-2F9F0;Lo;0;L;95B7;;;;N;;;;; -2F9F1;CJK COMPATIBILITY IDEOGRAPH-2F9F1;Lo;0;L;28D77;;;;N;;;;; -2F9F2;CJK COMPATIBILITY IDEOGRAPH-2F9F2;Lo;0;L;49E6;;;;N;;;;; -2F9F3;CJK COMPATIBILITY IDEOGRAPH-2F9F3;Lo;0;L;96C3;;;;N;;;;; -2F9F4;CJK COMPATIBILITY IDEOGRAPH-2F9F4;Lo;0;L;5DB2;;;;N;;;;; -2F9F5;CJK COMPATIBILITY IDEOGRAPH-2F9F5;Lo;0;L;9723;;;;N;;;;; -2F9F6;CJK COMPATIBILITY IDEOGRAPH-2F9F6;Lo;0;L;29145;;;;N;;;;; -2F9F7;CJK COMPATIBILITY IDEOGRAPH-2F9F7;Lo;0;L;2921A;;;;N;;;;; -2F9F8;CJK COMPATIBILITY IDEOGRAPH-2F9F8;Lo;0;L;4A6E;;;;N;;;;; -2F9F9;CJK COMPATIBILITY IDEOGRAPH-2F9F9;Lo;0;L;4A76;;;;N;;;;; -2F9FA;CJK COMPATIBILITY IDEOGRAPH-2F9FA;Lo;0;L;97E0;;;;N;;;;; -2F9FB;CJK COMPATIBILITY IDEOGRAPH-2F9FB;Lo;0;L;2940A;;;;N;;;;; -2F9FC;CJK COMPATIBILITY IDEOGRAPH-2F9FC;Lo;0;L;4AB2;;;;N;;;;; -2F9FD;CJK COMPATIBILITY IDEOGRAPH-2F9FD;Lo;0;L;29496;;;;N;;;;; -2F9FE;CJK COMPATIBILITY IDEOGRAPH-2F9FE;Lo;0;L;980B;;;;N;;;;; -2F9FF;CJK COMPATIBILITY IDEOGRAPH-2F9FF;Lo;0;L;980B;;;;N;;;;; -2FA00;CJK COMPATIBILITY IDEOGRAPH-2FA00;Lo;0;L;9829;;;;N;;;;; -2FA01;CJK COMPATIBILITY IDEOGRAPH-2FA01;Lo;0;L;295B6;;;;N;;;;; -2FA02;CJK COMPATIBILITY IDEOGRAPH-2FA02;Lo;0;L;98E2;;;;N;;;;; -2FA03;CJK COMPATIBILITY IDEOGRAPH-2FA03;Lo;0;L;4B33;;;;N;;;;; -2FA04;CJK COMPATIBILITY IDEOGRAPH-2FA04;Lo;0;L;9929;;;;N;;;;; -2FA05;CJK COMPATIBILITY IDEOGRAPH-2FA05;Lo;0;L;99A7;;;;N;;;;; -2FA06;CJK COMPATIBILITY IDEOGRAPH-2FA06;Lo;0;L;99C2;;;;N;;;;; -2FA07;CJK COMPATIBILITY IDEOGRAPH-2FA07;Lo;0;L;99FE;;;;N;;;;; -2FA08;CJK COMPATIBILITY IDEOGRAPH-2FA08;Lo;0;L;4BCE;;;;N;;;;; -2FA09;CJK COMPATIBILITY IDEOGRAPH-2FA09;Lo;0;L;29B30;;;;N;;;;; -2FA0A;CJK COMPATIBILITY IDEOGRAPH-2FA0A;Lo;0;L;9B12;;;;N;;;;; -2FA0B;CJK COMPATIBILITY IDEOGRAPH-2FA0B;Lo;0;L;9C40;;;;N;;;;; -2FA0C;CJK COMPATIBILITY IDEOGRAPH-2FA0C;Lo;0;L;9CFD;;;;N;;;;; -2FA0D;CJK COMPATIBILITY IDEOGRAPH-2FA0D;Lo;0;L;4CCE;;;;N;;;;; -2FA0E;CJK COMPATIBILITY IDEOGRAPH-2FA0E;Lo;0;L;4CED;;;;N;;;;; -2FA0F;CJK COMPATIBILITY IDEOGRAPH-2FA0F;Lo;0;L;9D67;;;;N;;;;; -2FA10;CJK COMPATIBILITY IDEOGRAPH-2FA10;Lo;0;L;2A0CE;;;;N;;;;; -2FA11;CJK COMPATIBILITY IDEOGRAPH-2FA11;Lo;0;L;4CF8;;;;N;;;;; -2FA12;CJK COMPATIBILITY IDEOGRAPH-2FA12;Lo;0;L;2A105;;;;N;;;;; -2FA13;CJK COMPATIBILITY IDEOGRAPH-2FA13;Lo;0;L;2A20E;;;;N;;;;; -2FA14;CJK COMPATIBILITY IDEOGRAPH-2FA14;Lo;0;L;2A291;;;;N;;;;; -2FA15;CJK COMPATIBILITY IDEOGRAPH-2FA15;Lo;0;L;9EBB;;;;N;;;;; -2FA16;CJK COMPATIBILITY IDEOGRAPH-2FA16;Lo;0;L;4D56;;;;N;;;;; -2FA17;CJK COMPATIBILITY IDEOGRAPH-2FA17;Lo;0;L;9EF9;;;;N;;;;; -2FA18;CJK COMPATIBILITY IDEOGRAPH-2FA18;Lo;0;L;9EFE;;;;N;;;;; -2FA19;CJK COMPATIBILITY IDEOGRAPH-2FA19;Lo;0;L;9F05;;;;N;;;;; -2FA1A;CJK COMPATIBILITY IDEOGRAPH-2FA1A;Lo;0;L;9F0F;;;;N;;;;; -2FA1B;CJK COMPATIBILITY IDEOGRAPH-2FA1B;Lo;0;L;9F16;;;;N;;;;; -2FA1C;CJK COMPATIBILITY IDEOGRAPH-2FA1C;Lo;0;L;9F3B;;;;N;;;;; -2FA1D;CJK COMPATIBILITY IDEOGRAPH-2FA1D;Lo;0;L;2A600;;;;N;;;;; -E0001;LANGUAGE TAG;Cf;0;BN;;;;;N;;;;; -E0020;TAG SPACE;Cf;0;BN;;;;;N;;;;; -E0021;TAG EXCLAMATION MARK;Cf;0;BN;;;;;N;;;;; -E0022;TAG QUOTATION MARK;Cf;0;BN;;;;;N;;;;; -E0023;TAG NUMBER SIGN;Cf;0;BN;;;;;N;;;;; -E0024;TAG DOLLAR SIGN;Cf;0;BN;;;;;N;;;;; -E0025;TAG PERCENT SIGN;Cf;0;BN;;;;;N;;;;; -E0026;TAG AMPERSAND;Cf;0;BN;;;;;N;;;;; -E0027;TAG APOSTROPHE;Cf;0;BN;;;;;N;;;;; -E0028;TAG LEFT PARENTHESIS;Cf;0;BN;;;;;N;;;;; -E0029;TAG RIGHT PARENTHESIS;Cf;0;BN;;;;;N;;;;; -E002A;TAG ASTERISK;Cf;0;BN;;;;;N;;;;; -E002B;TAG PLUS SIGN;Cf;0;BN;;;;;N;;;;; -E002C;TAG COMMA;Cf;0;BN;;;;;N;;;;; -E002D;TAG HYPHEN-MINUS;Cf;0;BN;;;;;N;;;;; -E002E;TAG FULL STOP;Cf;0;BN;;;;;N;;;;; -E002F;TAG SOLIDUS;Cf;0;BN;;;;;N;;;;; -E0030;TAG DIGIT ZERO;Cf;0;BN;;;;;N;;;;; -E0031;TAG DIGIT ONE;Cf;0;BN;;;;;N;;;;; -E0032;TAG DIGIT TWO;Cf;0;BN;;;;;N;;;;; -E0033;TAG DIGIT THREE;Cf;0;BN;;;;;N;;;;; -E0034;TAG DIGIT FOUR;Cf;0;BN;;;;;N;;;;; -E0035;TAG DIGIT FIVE;Cf;0;BN;;;;;N;;;;; -E0036;TAG DIGIT SIX;Cf;0;BN;;;;;N;;;;; -E0037;TAG DIGIT SEVEN;Cf;0;BN;;;;;N;;;;; -E0038;TAG DIGIT EIGHT;Cf;0;BN;;;;;N;;;;; -E0039;TAG DIGIT NINE;Cf;0;BN;;;;;N;;;;; -E003A;TAG COLON;Cf;0;BN;;;;;N;;;;; -E003B;TAG SEMICOLON;Cf;0;BN;;;;;N;;;;; -E003C;TAG LESS-THAN SIGN;Cf;0;BN;;;;;N;;;;; -E003D;TAG EQUALS SIGN;Cf;0;BN;;;;;N;;;;; -E003E;TAG GREATER-THAN SIGN;Cf;0;BN;;;;;N;;;;; -E003F;TAG QUESTION MARK;Cf;0;BN;;;;;N;;;;; -E0040;TAG COMMERCIAL AT;Cf;0;BN;;;;;N;;;;; -E0041;TAG LATIN CAPITAL LETTER A;Cf;0;BN;;;;;N;;;;; -E0042;TAG LATIN CAPITAL LETTER B;Cf;0;BN;;;;;N;;;;; -E0043;TAG LATIN CAPITAL LETTER C;Cf;0;BN;;;;;N;;;;; -E0044;TAG LATIN CAPITAL LETTER D;Cf;0;BN;;;;;N;;;;; -E0045;TAG LATIN CAPITAL LETTER E;Cf;0;BN;;;;;N;;;;; -E0046;TAG LATIN CAPITAL LETTER F;Cf;0;BN;;;;;N;;;;; -E0047;TAG LATIN CAPITAL LETTER G;Cf;0;BN;;;;;N;;;;; -E0048;TAG LATIN CAPITAL LETTER H;Cf;0;BN;;;;;N;;;;; -E0049;TAG LATIN CAPITAL LETTER I;Cf;0;BN;;;;;N;;;;; -E004A;TAG LATIN CAPITAL LETTER J;Cf;0;BN;;;;;N;;;;; -E004B;TAG LATIN CAPITAL LETTER K;Cf;0;BN;;;;;N;;;;; -E004C;TAG LATIN CAPITAL LETTER L;Cf;0;BN;;;;;N;;;;; -E004D;TAG LATIN CAPITAL LETTER M;Cf;0;BN;;;;;N;;;;; -E004E;TAG LATIN CAPITAL LETTER N;Cf;0;BN;;;;;N;;;;; -E004F;TAG LATIN CAPITAL LETTER O;Cf;0;BN;;;;;N;;;;; -E0050;TAG LATIN CAPITAL LETTER P;Cf;0;BN;;;;;N;;;;; -E0051;TAG LATIN CAPITAL LETTER Q;Cf;0;BN;;;;;N;;;;; -E0052;TAG LATIN CAPITAL LETTER R;Cf;0;BN;;;;;N;;;;; -E0053;TAG LATIN CAPITAL LETTER S;Cf;0;BN;;;;;N;;;;; -E0054;TAG LATIN CAPITAL LETTER T;Cf;0;BN;;;;;N;;;;; -E0055;TAG LATIN CAPITAL LETTER U;Cf;0;BN;;;;;N;;;;; -E0056;TAG LATIN CAPITAL LETTER V;Cf;0;BN;;;;;N;;;;; -E0057;TAG LATIN CAPITAL LETTER W;Cf;0;BN;;;;;N;;;;; -E0058;TAG LATIN CAPITAL LETTER X;Cf;0;BN;;;;;N;;;;; -E0059;TAG LATIN CAPITAL LETTER Y;Cf;0;BN;;;;;N;;;;; -E005A;TAG LATIN CAPITAL LETTER Z;Cf;0;BN;;;;;N;;;;; -E005B;TAG LEFT SQUARE BRACKET;Cf;0;BN;;;;;N;;;;; -E005C;TAG REVERSE SOLIDUS;Cf;0;BN;;;;;N;;;;; -E005D;TAG RIGHT SQUARE BRACKET;Cf;0;BN;;;;;N;;;;; -E005E;TAG CIRCUMFLEX ACCENT;Cf;0;BN;;;;;N;;;;; -E005F;TAG LOW LINE;Cf;0;BN;;;;;N;;;;; -E0060;TAG GRAVE ACCENT;Cf;0;BN;;;;;N;;;;; -E0061;TAG LATIN SMALL LETTER A;Cf;0;BN;;;;;N;;;;; -E0062;TAG LATIN SMALL LETTER B;Cf;0;BN;;;;;N;;;;; -E0063;TAG LATIN SMALL LETTER C;Cf;0;BN;;;;;N;;;;; -E0064;TAG LATIN SMALL LETTER D;Cf;0;BN;;;;;N;;;;; -E0065;TAG LATIN SMALL LETTER E;Cf;0;BN;;;;;N;;;;; -E0066;TAG LATIN SMALL LETTER F;Cf;0;BN;;;;;N;;;;; -E0067;TAG LATIN SMALL LETTER G;Cf;0;BN;;;;;N;;;;; -E0068;TAG LATIN SMALL LETTER H;Cf;0;BN;;;;;N;;;;; -E0069;TAG LATIN SMALL LETTER I;Cf;0;BN;;;;;N;;;;; -E006A;TAG LATIN SMALL LETTER J;Cf;0;BN;;;;;N;;;;; -E006B;TAG LATIN SMALL LETTER K;Cf;0;BN;;;;;N;;;;; -E006C;TAG LATIN SMALL LETTER L;Cf;0;BN;;;;;N;;;;; -E006D;TAG LATIN SMALL LETTER M;Cf;0;BN;;;;;N;;;;; -E006E;TAG LATIN SMALL LETTER N;Cf;0;BN;;;;;N;;;;; -E006F;TAG LATIN SMALL LETTER O;Cf;0;BN;;;;;N;;;;; -E0070;TAG LATIN SMALL LETTER P;Cf;0;BN;;;;;N;;;;; -E0071;TAG LATIN SMALL LETTER Q;Cf;0;BN;;;;;N;;;;; -E0072;TAG LATIN SMALL LETTER R;Cf;0;BN;;;;;N;;;;; -E0073;TAG LATIN SMALL LETTER S;Cf;0;BN;;;;;N;;;;; -E0074;TAG LATIN SMALL LETTER T;Cf;0;BN;;;;;N;;;;; -E0075;TAG LATIN SMALL LETTER U;Cf;0;BN;;;;;N;;;;; -E0076;TAG LATIN SMALL LETTER V;Cf;0;BN;;;;;N;;;;; -E0077;TAG LATIN SMALL LETTER W;Cf;0;BN;;;;;N;;;;; -E0078;TAG LATIN SMALL LETTER X;Cf;0;BN;;;;;N;;;;; -E0079;TAG LATIN SMALL LETTER Y;Cf;0;BN;;;;;N;;;;; -E007A;TAG LATIN SMALL LETTER Z;Cf;0;BN;;;;;N;;;;; -E007B;TAG LEFT CURLY BRACKET;Cf;0;BN;;;;;N;;;;; -E007C;TAG VERTICAL LINE;Cf;0;BN;;;;;N;;;;; -E007D;TAG RIGHT CURLY BRACKET;Cf;0;BN;;;;;N;;;;; -E007E;TAG TILDE;Cf;0;BN;;;;;N;;;;; -E007F;CANCEL TAG;Cf;0;BN;;;;;N;;;;; -F0000;<Plane 15 Private Use, First>;Co;0;L;;;;;N;;;;; -FFFFD;<Plane 15 Private Use, Last>;Co;0;L;;;;;N;;;;; -100000;<Plane 16 Private Use, First>;Co;0;L;;;;;N;;;;; -10FFFD;<Plane 16 Private Use, Last>;Co;0;L;;;;;N;;;;; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate%NAME%.c.post --- a/webengine/wmlengine/src/Unicode/tools/Validate%NAME%.c.post Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - puts ("done!"); - return NW_TRUE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate%NAME%.c.pre --- a/webengine/wmlengine/src/Unicode/tools/Validate%NAME%.c.pre Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* ------------------------------------------------------------------------- * - Copyright 2000 - 2001 Nokia Corporation All rights reserved. - Nokia Americas - 6000 Connection Drive - Irving, Texas 75039 - - Restricted Rights: Use, duplication, or disclosure by the - U.S. Government is subject to restrictions as set forth in - subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR - 52.227-19, or in FAR 52.227-14 Alt. III, as applicable. - - This software is proprietary to and embodies the - confidential technology of Nokia Possession, use, or copying - of this software and media is authorized only pursuant to a - valid written license from Nokia or an authorized - sublicensor. - - Nokia - Wireless Software Solutions - * ------------------------------------------------------------------------- */ - -#include "Validate.h" -#include <stdio.h> - -/* ------------------------------------------------------------------------- */ -NW_Bool -Validate%NAME% (void) -{ - fputs ("Validating %NAME% ...", stdout); - fflush (stdout); - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate.c.post --- a/webengine/wmlengine/src/Unicode/tools/Validate.c.post Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - return NW_TRUE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate.c.pre --- a/webengine/wmlengine/src/Unicode/tools/Validate.c.pre Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* ------------------------------------------------------------------------- * - Copyright 2000 - 2001 Nokia Corporation All rights reserved. - Nokia Americas - 6000 Connection Drive - Irving, Texas 75039 - - Restricted Rights: Use, duplication, or disclosure by the - U.S. Government is subject to restrictions as set forth in - subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR - 52.227-19, or in FAR 52.227-14 Alt. III, as applicable. - - This software is proprietary to and embodies the - confidential technology of Nokia Possession, use, or copying - of this software and media is authorized only pursuant to a - valid written license from Nokia or an authorized - sublicensor. - - Nokia - Wireless Software Solutions - * ------------------------------------------------------------------------- */ - -#include "Validate.h" - -/* ------------------------------------------------------------------------- */ -NW_Bool -Validate (void) -{ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate.h.post --- a/webengine/wmlengine/src/Unicode/tools/Validate.h.post Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - -extern NW_Bool Validate (void); -extern NW_Bool ValidateCode (NW_Ucs4 code, - const NW_Object_Class_t* categoryClass); - - -#endif /* _Validate_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/Validate.h.pre --- a/webengine/wmlengine/src/Unicode/tools/Validate.h.pre Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* ------------------------------------------------------------------------- * - Copyright 2000 - 2001 Nokia Corporation All rights reserved. - Nokia Americas - 6000 Connection Drive - Irving, Texas 75039 - - Restricted Rights: Use, duplication, or disclosure by the - U.S. Government is subject to restrictions as set forth in - subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR - 52.227-19, or in FAR 52.227-14 Alt. III, as applicable. - - This software is proprietary to and embodies the - confidential technology of Nokia Possession, use, or copying - of this software and media is authorized only pursuant to a - valid written license from Nokia or an authorized - sublicensor. - - Nokia - Wireless Software Solutions - * ------------------------------------------------------------------------- */ - -#ifndef _Validate_h_ -#define _Validate_h_ - -/* ------------------------------------------------------------------------- */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/genRanges.cpp --- a/webengine/wmlengine/src/Unicode/tools/genRanges.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <stdlib.h> -#include <stdio.h> -#include <memory.h> - -void -emitRange (long value, - long& start, - long& previous, - long& increment) -{ - if (value != previous + increment) { - if (previous == start + increment) { - if (start != ~0) { - printf (" { 0x%08x, 0x%08x, 0x00 },\n", start, start); - start = previous; - } else { - start = value; - } - increment = value - start; - } else { - printf (" { 0x%08x, 0x%08x, 0x%02x },\n", start, previous, increment); - start = value; - increment = 0; - } - } - previous = value; -} - -int -main (int argc, - char* argv[]) -{ - long start = ~0; - long previous = ~0; - long increment = 0; - - while (!feof (stdin)) { - char buffer[80]; - long value; - char* endptr; - - (void) memset (buffer, 0, sizeof buffer); - fgets (buffer, 80, stdin); - value = strtol (buffer, &endptr, 16); - if (endptr == buffer) { - break; - } - - if (increment == 0 && start != ~0) { - increment = value - start; - } - - emitRange (value, start, previous, increment); - } - - do { - emitRange (~0, start, previous, increment); - } while (start != ~0); - - return EXIT_SUCCESS; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/Unicode/tools/genSource.sh --- a/webengine/wmlengine/src/Unicode/tools/genSource.sh Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -#!/bin/bash - -declare -a names -names=( LetterUppercase LetterLowercase LetterTitlecase LetterModifier \ - LetterOther MarkNonSpacing MarkSpacingCombining MarkEnclosing \ - NumberDecimalDigit NumberLetter NumberOther PunctuationConnector \ - PunctuationDash PunctuationOpen PunctuationClose PunctuationInitial \ - PunctuationFinal PunctuationOther SymbolMath SymbolCurrency \ - SymbolModifier SymbolOther SeparatorSpace SeparatorLine \ - SeparatorParagraph OtherControl OtherFormat OtherSurrogate \ - OtherPrivateUse OtherNotAssigned ) -declare -a codes -codes=( Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po Sm Sc Sk So Zs \ - Zl Zp Cc Cf Cs Co Cn ) - -cp Validate.h.pre ../test/Validate.h -cp Validate.c.pre ../test/Validate.c - -# code generation -for (( index=0; index < ${#codes[*]}; index=index + 1 )); do - echo ${names[$index]} - - space="`echo ${names[$index]}|sed -e 's/^.\{7,7\}//' -e 's/./ /g'`" - - sed >../src/NW_Unicode_${names[$index]}.c <NW_Unicode_%NAME%.c.pre \ - "s/%NAME%/${names[$index]}/g" - sed <UnicodeData.txt 's/^\([^;]*\);[^;]*;\([^;]*\);.*$/\2;\1/' | \ - sort | egrep "^${codes[$index]};" | sed 's/.*;//' | tee codes.${codes[$index]}.$$.bak | \ - ./genRanges.exe | tee ranges.${codes[$index]}.$$.bak | sort >>../src/NW_Unicode_${names[$index]}.c - sed >>../src/NW_Unicode_${names[$index]}.c <NW_Unicode_%NAME%.c.post \ - -e "s/%NAME%/${names[$index]}/g" -e "s/%SPACE%/${space}/g" - - numLines=`wc -l ranges.${codes[$index]}.$$.bak|sed 's/^ *\([0-9]*\).*$/\1/'` - if [ "${numLines}" == 0 ]; then - sed >../src/NW_Unicode_${names[$index]}.c <NW_Unicode_%EMPTY%.c \ - -e "s/%NAME%/${names[$index]}/g" -e "s/%SPACE%/${space}/g" - fi - - sed >../include/NW_Unicode_${names[$index]}.h <NW_Unicode_%NAME%.h \ - "s/%NAME%/${names[$index]}/g" - sed >../include/NW_Unicode_${names[$index]}I.h <NW_Unicode_%NAME%I.h \ - "s/%NAME%/${names[$index]}/g" - - sed >../test/Validate${names[$index]}.c <Validate%NAME%.c.pre "s/%NAME%/${names[$index]}/g" - (for code in `cat codes.${codes[$index]}.$$.bak`; do echo -e " if (!ValidateCode (0x${code}, &NW_Unicode_${names[$index]}_Class)) {\n return NW_FALSE;\n }"; done) >>../test/Validate${names[$index]}.c - sed >>../test/Validate${names[$index]}.c <Validate%NAME%.c.post "s/%NAME%/${names[$index]}/g" - - echo >>../test/Validate.h "#include \"NW_Unicode_${names[$index]}.h\"" - echo >>../test/Validate.h "extern NW_Bool Validate${names[$index]} (void);" - echo >>../test/Validate.h - - sleep 1 - echo -e >>../test/Validate.c " if (!Validate${names[$index]} ()) {\n return NW_FALSE;\n }" - - rm ranges.${codes[$index]}.$$.bak codes.${codes[$index]}.$$.bak -done - -cat Validate.h.post >>../test/Validate.h -cat Validate.c.post >>../test/Validate.c diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/NW_ADT_EXPORT.h --- a/webengine/wmlengine/src/adt/include/NW_ADT_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_ADT_EXPORT_h_ -#define _NW_ADT_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_ADT_EXPORT -#ifdef NW_IMPORT -#define NW_ADT_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_ADT_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_ADT_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_ADT_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_broadcaster.h --- a/webengine/wmlengine/src/adt/include/nw_adt_broadcaster.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_BROADCASTER_H -#define NW_ADT_BROADCASTER_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "NW_ADT_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Broadcaster_Class_s NW_ADT_Broadcaster_Class_t; -typedef struct NW_ADT_Broadcaster_s NW_ADT_Broadcaster_t; - -/* ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_ADT_Broadcaster_AddListener_t) (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener); - -typedef -TBrowserStatusCode -(*NW_ADT_Broadcaster_RemoveListener_t) (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Broadcaster_ClassPart_s { - NW_ADT_Broadcaster_AddListener_t addListener; - NW_ADT_Broadcaster_RemoveListener_t removeListener; -} NW_ADT_Broadcaster_ClassPart_t; - -struct NW_ADT_Broadcaster_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Broadcaster_ClassPart_t NW_ADT_Broadcaster; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_Broadcaster_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_DynamicVector_t *listeners; -}; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_Broadcaster_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_ADT_Broadcaster)) - -#define NW_ADT_BroadcasterOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_Broadcaster)) - -#define NW_ADT_Broadcaster_AddListener(_object, _Listener) \ - (NW_Object_Invoke (_object, NW_ADT_Broadcaster, addListener) \ - (NW_ADT_BroadcasterOf (_object), (_Listener))) - -#define NW_ADT_Broadcaster_RemoveListener(_object, _Listener) \ - (NW_Object_Invoke (_object, NW_ADT_Broadcaster, removeListener) \ - (NW_ADT_BroadcasterOf (_object), (_Listener))) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_Broadcaster_Class_t NW_ADT_Broadcaster_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_Broadcaster_t* -NW_ADT_Broadcaster_New (void); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_BROADCASTER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_broadcasteri.h --- a/webengine/wmlengine/src/adt/include/nw_adt_broadcasteri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_BROADCASTERI_H -#define NW_ADT_BROADCASTERI_H - -#include "nw_object_dynamici.h" -#include "nw_adt_broadcaster.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_Broadcaster_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_Broadcaster_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_Broadcaster_AddListener (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_Broadcaster_RemoveListener (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_BROADCASTERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_dynamicvector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_dynamicvector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_DYNAMICVECTOR_H -#define NW_ADT_DYNAMICVECTOR_H - -#include "nw_adt_vector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_DynamicVector_Class_s NW_ADT_DynamicVector_Class_t; -typedef struct NW_ADT_DynamicVector_s NW_ADT_DynamicVector_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_ADT_DynamicVector_ResizeCapacity_t) (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded); - -typedef -TBrowserStatusCode -(*NW_ADT_DynamicVector_MoveElements_t) (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex); - -typedef -TBrowserStatusCode -(*NW_ADT_DynamicVector_Clear_t) (NW_ADT_DynamicVector_t* dynamicVector); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_DynamicVector_ClassPart_s { - NW_ADT_DynamicVector_ResizeCapacity_t resizeCapacity; - NW_ADT_DynamicVector_MoveElements_t moveElements; - NW_ADT_DynamicVector_Clear_t clear; -} NW_ADT_DynamicVector_ClassPart_t; - -struct NW_ADT_DynamicVector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_DynamicVector_s { - NW_ADT_Vector_t super; - - /* member variables */ - NW_ADT_Vector_Metric_t elementSize; - NW_ADT_Vector_Metric_t capacity; - NW_ADT_Vector_Metric_t size; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_DynamicVector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_DynamicVector)) - -#define NW_ADT_DynamicVectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_DynamicVector)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_DynamicVector_Class_t NW_ADT_DynamicVector_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -void** -_NW_ADT_DynamicVector_ReplaceAt (NW_ADT_DynamicVector_t* dynamicVector, - void* element, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -void** -_NW_ADT_DynamicVector_InsertAt (NW_ADT_DynamicVector_t* dynamicVector, - void* element, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_RemoveAt (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_RemoveElement (NW_ADT_DynamicVector_t* dynamicVector, - void* element); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_InsertVectorAt (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t where); -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_DynamicVector_GetCapacity(_dynamicVector) \ - (NW_OBJECT_CONSTCAST(NW_ADT_Vector_Metric_t) NW_ADT_DynamicVectorOf (_dynamicVector)->capacity) - -#define NW_ADT_DynamicVector_Clear(_dynamicVector) \ - (NW_Object_Invoke(_dynamicVector, NW_ADT_DynamicVector, clear) \ - (_dynamicVector)) - -#define NW_ADT_DynamicVector_ReplaceAt(_dynamicVector, _element, _index) \ - (_NW_ADT_DynamicVector_ReplaceAt (NW_ADT_DynamicVectorOf (_dynamicVector), (_element), (_index))) - -#define NW_ADT_DynamicVector_InsertAt(_dynamicVector, _element, _index) \ - (_NW_ADT_DynamicVector_InsertAt (NW_ADT_DynamicVectorOf (_dynamicVector), (_element), (_index))) - -#define NW_ADT_DynamicVector_InsertVectorAt(_dynamicVector, _vector, _index) \ - (_NW_ADT_DynamicVector_InsertVectorAt (NW_ADT_DynamicVectorOf (_dynamicVector), NW_ADT_VectorOf (_vector), (_index))) - -#define NW_ADT_DynamicVector_RemoveAt(_dynamicVector, _index) \ - (_NW_ADT_DynamicVector_RemoveAt (NW_ADT_DynamicVectorOf (_dynamicVector), (_index))) - -#define NW_ADT_DynamicVector_RemoveElement(_dynamicVector, _element) \ - (_NW_ADT_DynamicVector_RemoveElement (NW_ADT_DynamicVectorOf (_dynamicVector), (_element))) - -#define NW_ADT_DynamicVector_Trim(_dynamicVector) \ - (_NW_ADT_DynamicVector_Trim (NW_ADT_DynamicVectorOf (_dynamicVector))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_DYNAMICVECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_dynamicvectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_dynamicvectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_DYNAMICVECTORI_H -#define NW_ADT_DYNAMICVECTORI_H - -#include "nw_adt_vectori.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_DynamicVector_ResizeCapacity(_dynamicVector, _capacityNeeded) \ - (NW_Object_Invoke(_dynamicVector, NW_ADT_DynamicVector, resizeCapacity) \ - ((_dynamicVector), (_capacityNeeded))) - -#define NW_ADT_DynamicVector_MoveElements(_dynamicVector, _srcIndex, _dstIndex) \ - (NW_Object_Invoke(_dynamicVector, NW_ADT_DynamicVector, moveElements) \ - ((_dynamicVector), (_srcIndex), (_dstIndex))) - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -NW_ADT_EXPORT -NW_ADT_Vector_Metric_t -_NW_ADT_DynamicVector_GetElementSize (const NW_ADT_Vector_t* vector); - -NW_ADT_EXPORT -NW_ADT_Vector_Metric_t -_NW_ADT_DynamicVector_GetSize (const NW_ADT_Vector_t* vector); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_DynamicVector_Clear (NW_ADT_DynamicVector_t* dynamicVector); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_DYNAMICVECTORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_fixedvector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_fixedvector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_FIXEDVECTOR_H -#define NW_ADT_FIXEDVECTOR_H - -#include "nw_adt_dynamicvector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_FixedVector_ClassPart_s { - void** unused; -} NW_ADT_FixedVector_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_FixedVector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; - NW_ADT_FixedVector_ClassPart_t NW_ADT_FixedVector; -} NW_ADT_FixedVector_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_FixedVector_s { - NW_ADT_DynamicVector_t super; -} NW_ADT_FixedVector_t; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_FixedVector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_FixedVector)) - -#define NW_ADT_FixedVectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_FixedVector)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_FixedVector_Class_t NW_ADT_FixedVector_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_FixedVector_t* -NW_ADT_FixedVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t capacity); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_FIXEDVECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_fixedvectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_fixedvectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_FIXEDVECTORI_H -#define NW_ADT_FIXEDVECTORI_H - -#include "nw_adt_dynamicvectori.h" -#include "nw_adt_fixedvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_FixedVector_Construct (NW_Object_t* object, - va_list* argp); - -NW_ADT_EXPORT -NW_Uint8* -_NW_ADT_FixedVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_FixedVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_FixedVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_FixedVector_Clear (NW_ADT_DynamicVector_t* dynamicVector); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_FIXEDVECTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_iterator.h --- a/webengine/wmlengine/src/adt/include/nw_adt_iterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_ITERATOR_H -#define NW_ADT_ITERATOR_H - -#include "nw_object_dynamic.h" -#include "NW_ADT_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Iterator_Class_s NW_ADT_Iterator_Class_t; -typedef struct NW_ADT_Iterator_s NW_ADT_Iterator_t; - -/* ------------------------------------------------------------------------- */ -typedef enum NW_ADT_IteratorDirection_e { - NW_ADT_IteratorDirection_Increment = 1, - NW_ADT_IteratorDirection_Decrement = -1 -} NW_ADT_IteratorDirection_t; - -/* ------------------------------------------------------------------------- */ -typedef -NW_Int32 -(*NW_ADT_Iterator_HasMoreElements_t) (const NW_ADT_Iterator_t* iterator); - -typedef -void** -(*NW_ADT_Iterator_NextElement_t) (NW_ADT_Iterator_t* iterator); - -typedef -NW_Uint32 -(*NW_ADT_Iterator_GetElementSize_t) (NW_ADT_Iterator_t* iterator); - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Iterator_ClassPart_s { - NW_ADT_Iterator_HasMoreElements_t hasMoreElements; - NW_ADT_Iterator_NextElement_t nextElement; - NW_ADT_Iterator_GetElementSize_t getElementSize; -} NW_ADT_Iterator_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_Iterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Iterator_ClassPart_t NW_ADT_Iterator; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_Iterator_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_Iterator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_Iterator)) - -#define NW_ADT_IteratorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_Iterator)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_Iterator_Class_t NW_ADT_Iterator_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Iterator_GetNextElement (NW_ADT_Iterator_t* iterator, - void* element); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_Iterator_HasMoreElements(_iterator) \ - (NW_Object_Invoke (_iterator, NW_ADT_Iterator, hasMoreElements) (\ - NW_ADT_IteratorOf (_iterator))) - -#define NW_ADT_Iterator_NextElement(_iterator) \ - (NW_Object_Invoke (_iterator, NW_ADT_Iterator, nextElement) (\ - NW_ADT_IteratorOf (_iterator))) - -#define NW_ADT_Iterator_GetElementSize(_iterator) \ - (NW_Object_Invoke (_iterator, NW_ADT_Iterator, getElementSize) (\ - NW_ADT_IteratorOf (_iterator))) - -#define NW_ADT_Iterator_GetNextElement(_iterator, _element) \ - (_NW_ADT_Iterator_GetNextElement (\ - NW_ADT_IteratorOf (_iterator), (_element))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_ITERATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_iteratori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_iteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_ITERATORI_H -#define NW_ADT_ITERATORI_H - -#include "nw_object_dynamici.h" -#include "nw_adt_iterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_ITERATORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_map.h --- a/webengine/wmlengine/src/adt/include/nw_adt_map.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_MAP_H -#define NW_ADT_MAP_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Map_Class_s NW_ADT_Map_Class_t; -typedef struct NW_ADT_Map_s NW_ADT_Map_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -NW_ADT_Vector_Metric_t -(*NW_ADT_Map_Lookup_t) (const NW_ADT_Map_t* thisObj, - const void* key); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Map_ClassPart_s { - NW_ADT_Map_Lookup_t lookup; -} NW_ADT_Map_ClassPart_t; - -struct NW_ADT_Map_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Map_ClassPart_t NW_ADT_Map; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_Map_s { - NW_Object_Dynamic_t super; - - /* member Map */ - NW_Uint32 keySize; - NW_Uint32 valueSize; - NW_ADT_DynamicVector_t* vector; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_Map_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_Map)) - -#define NW_ADT_MapOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_Map)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_Map_Class_t NW_ADT_Map_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_Map_GetKeySize(_map) \ - (NW_OBJECT_CONSTCAST(NW_Uint32) NW_ADT_MapOf (_map)->keySize) - -#define NW_ADT_Map_GetValueSize(_map) \ - (NW_OBJECT_CONSTCAST(NW_Uint32) NW_ADT_MapOf (_map)->valueSize) - -#define NW_ADT_Map_GetVector(_object) \ - (NW_OBJECT_CONSTCAST(NW_ADT_DynamicVector_t*) NW_ADT_MapOf (_object)->vector) - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_Map_Set (NW_ADT_Map_t* thisObj, - const void* key, - const void* value); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_Map_Get (const NW_ADT_Map_t* thisObj, - const void* key, - void* value); - -/* note that the pointer returned by this call may point to an odd or otherwise unaligned -** address. A memcopy must be used to move the contents pointed to into a new variable -*/ -NW_ADT_EXPORT -void** -NW_ADT_Map_GetUnsafe (const NW_ADT_Map_t* thisObj, - const void* key); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_Map_Remove (NW_ADT_Map_t* thisObj, - const void* key); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_Map_Copy (const NW_ADT_Map_t* thisObj, - NW_ADT_Map_t* dest); - - -TBrowserStatusCode -NW_ADT_Map_Clear (NW_ADT_Map_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_Map_t* -NW_ADT_Map_New (NW_Uint32 keySize, - NW_Uint32 valueSize, - NW_ADT_DynamicVector_t* dynamicVector); - -NW_ADT_EXPORT -NW_ADT_Map_t* -NW_ADT_FixedMap_New (NW_Uint32 keySize, - NW_Uint32 valueSize, - NW_ADT_Vector_Metric_t capacity); - -NW_ADT_EXPORT -NW_ADT_Map_t* -NW_ADT_ResizableMap_New (NW_Uint32 keySize, - NW_Uint32 valueSize, - NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement); - -NW_ADT_EXPORT -NW_ADT_Map_t* -NW_ADT_SegmentedMap_New (NW_Uint32 keySize, - NW_Uint32 valueSize, - NW_ADT_Vector_Metric_t segmentSize); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_MAP_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_mapi.h --- a/webengine/wmlengine/src/adt/include/nw_adt_mapi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_MAPI_H -#define NW_ADT_MAPI_H - -#include "nw_object_dynamici.h" -#include "nw_adt_map.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_Map_Lookup(_map, _key) \ - (NW_Object_Invoke (_map, NW_ADT_Map, lookup) \ - ((_map), (_key))) - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_Map_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_Map_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_ADT_EXPORT -NW_ADT_Vector_Metric_t -_NW_ADT_Map_Lookup (const NW_ADT_Map_t* thisObj, - const void* key); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_MAPI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_mapiterator.h --- a/webengine/wmlengine/src/adt/include/nw_adt_mapiterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_MAPITERATOR_H -#define NW_ADT_MAPITERATOR_H - -#include "nw_adt_vectoriterator.h" -#include "nw_adt_map.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_MapIterator_Class_s NW_ADT_MapIterator_Class_t; -typedef struct NW_ADT_MapIterator_s NW_ADT_MapIterator_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_MapIterator_ClassPart_s { - void** unused; -} NW_ADT_MapIterator_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_MapIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Iterator_ClassPart_t NW_ADT_Iterator; - NW_ADT_VectorIterator_ClassPart_t NW_ADT_VectorIterator; - NW_ADT_MapIterator_ClassPart_t NW_ADT_MapIterator; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_MapIterator_s { - NW_ADT_VectorIterator_t super; - - /* member variables */ - NW_ADT_Map_t* map; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_MapIterator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_MapIterator)) - -#define NW_ADT_MapIteratorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_MapIterator)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_MapIterator_Class_t NW_ADT_MapIterator_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_MapIterator_Initialize (NW_ADT_MapIterator_t* iterator, - const NW_ADT_Map_t* map); - -NW_ADT_EXPORT -NW_ADT_MapIterator_t* -NW_ADT_MapIterator_New (const NW_ADT_Map_t* map); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_MAPITERATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_mapiteratori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_mapiteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_MAPITERATORI_H -#define NW_ADT_MAPITERATORI_H - -#include "nw_adt_vectoriteratori.h" -#include "nw_adt_mapiterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_MapIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_Uint32 -_NW_ADT_MapIterator_GetElementSize (NW_ADT_Iterator_t* iterator); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_MAPITERATORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_propertylist.h --- a/webengine/wmlengine/src/adt/include/nw_adt_propertylist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_PROPERTYLIST_H -#define NW_ADT_PROPERTYLIST_H - -#include "nw_adt_valuelist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_PropertyList_Class_s NW_ADT_PropertyList_Class_t; -typedef struct NW_ADT_PropertyList_s NW_ADT_PropertyList_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef NW_Uint8 NW_ADT_PropertyName_t; -typedef NW_ADT_ValueType_t NW_ADT_PropertyType_t; -typedef NW_ADT_Token_t NW_ADT_PropertyValueToken_t; -typedef NW_ADT_ValueList_Entry_t NW_ADT_Property_t; -typedef NW_ADT_Value_t NW_ADT_PropertyValue_t; - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -enum { - NW_ADT_PropertyType_Token = NW_ADT_ValueType_Token, - NW_ADT_PropertyType_Integer = NW_ADT_ValueType_Integer, - NW_ADT_PropertyType_Decimal = NW_ADT_ValueType_Decimal, - NW_ADT_PropertyType_Pointer = NW_ADT_ValueType_Pointer, - NW_ADT_PropertyType_Object = NW_ADT_ValueType_Object, - NW_ADT_PropertyType_Text = NW_ADT_ValueType_Text, - NW_ADT_PropertyType_Percent = NW_ADT_ValueType_Percent, - NW_ADT_PropertyType_Em = NW_ADT_ValueType_Em, - NW_ADT_PropertyType_Ex = NW_ADT_ValueType_Ex -}; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_PropertyList_ClassPart_s { - void** unused; -} NW_ADT_PropertyList_ClassPart_t; - -struct NW_ADT_PropertyList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_ValueList_ClassPart_t NW_ADT_ValueList; - NW_ADT_PropertyList_ClassPart_t NW_ADT_PropertyList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_PropertyList_s { - NW_ADT_ValueList_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_PropertyList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_PropertyList)) - -#define NW_ADT_PropertyListOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_PropertyList)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_PropertyList_Class_t NW_ADT_PropertyList_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_PropertyList_Get (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name, - NW_ADT_Property_t* property); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_PropertyList_Set (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name, - const NW_ADT_Property_t* property); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_PropertyList_Remove (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_PropertyList_Copy (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyList_t* dest); - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_PropertyList_t* -NW_ADT_PropertyList_New (NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_PROPERTYLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_propertylisti.h --- a/webengine/wmlengine/src/adt/include/nw_adt_propertylisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_PROPERTYLISTI_H -#define NW_ADT_PROPERTYLISTI_H - -#include "nw_adt_valuelisti.h" -#include "nw_adt_propertylist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_PropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_PropertyList_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_PROPERTYLISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_resizableobjectvector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_resizableobjectvector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_RESIZABLEOBJECTVECTOR_H -#define NW_ADT_RESIZABLEOBJECTVECTOR_H - -#include "nw_adt_resizablevector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ResizableObjectVector_Class_s - NW_ADT_ResizableObjectVector_Class_t; -typedef struct NW_ADT_ResizableObjectVector_s - NW_ADT_ResizableObjectVector_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ResizableObjectVector_ClassPart_s { - void** unused; -} NW_ADT_ResizableObjectVector_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_ResizableObjectVector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; - NW_ADT_ResizableVector_ClassPart_t NW_ADT_ResizableVector; - NW_ADT_ResizableObjectVector_ClassPart_t NW_ADT_ResizableObjectVector; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_ResizableObjectVector_s { - NW_ADT_ResizableVector_t super; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_ResizableObjectVector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_ResizableObjectVector)) - -#define NW_ADT_ResizableObjectVectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_ResizableObjectVector)) - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const -NW_ADT_ResizableObjectVector_Class_t NW_ADT_ResizableObjectVector_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_ResizableObjectVector_t* -NW_ADT_ResizableObjectVector_New (NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_RESIZABLEOBJECTVECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_resizableobjectvectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_resizableobjectvectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_RESIZABLEOBJECTVECTORI_H -#define NW_ADT_RESIZABLEOBJECTVECTORI_H - -#include "nw_adt_resizablevectori.h" -#include "nw_adt_resizableobjectvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ResizableObjectVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_ResizableObjectVector_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ResizableObjectVector_ResizeCapacity ( - NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_RESIZABLEVECTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_resizablevector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_resizablevector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_RESIZABLEVECTOR_H -#define NW_ADT_RESIZABLEVECTOR_H - -#include "nw_adt_dynamicvector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ResizableVector_Class_s NW_ADT_ResizableVector_Class_t; -typedef struct NW_ADT_ResizableVector_s NW_ADT_ResizableVector_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ResizableVector_ClassPart_s { - void** unused; -} NW_ADT_ResizableVector_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_ResizableVector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; - NW_ADT_ResizableVector_ClassPart_t NW_ADT_ResizableVector; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_ResizableVector_s { - NW_ADT_DynamicVector_t super; - - /* member variables */ - NW_ADT_Vector_Metric_t increment; - NW_Uint8* array; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_ResizableVector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_ResizableVector)) - -#define NW_ADT_ResizableVectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_ResizableVector)) - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_ResizableVector_Class_t NW_ADT_ResizableVector_Class; - -/* ------------------------------------------------------------------------- * - publice methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_ResizableVector_GetIncrement(_object) \ - (NW_OBJECT_CONSTCAST(NW_ADT_Vector_Metric_t) NW_ADT_ResizableVectorOf (_object)->increment) -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_ResizableVector_t* -NW_ADT_ResizableVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_RESIZABLEVECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_resizablevectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_resizablevectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_RESIZABLEVECTORI_H -#define NW_ADT_RESIZABLEVECTORI_H - -#include "nw_adt_dynamicvectori.h" -#include "nw_adt_resizablevector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ResizableVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_ResizableVector_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ResizableVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded); - -NW_ADT_EXPORT -NW_Uint8* -_NW_ADT_ResizableVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ResizableVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_ResizableVector_GetArray(_resizableVector) \ - ((NW_Uint8* const) NW_ADT_ResizableVectorOf (_resizableVector)->array) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_RESIZABLEVECTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_segmentedvector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_segmentedvector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_SEGMENTEDVECTOR_H -#define NW_ADT_SEGMENTEDVECTOR_H - -#include "nw_adt_dynamicvector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_SegmentedVector_Class_s NW_ADT_SegmentedVector_Class_t; -typedef struct NW_ADT_SegmentedVector_s NW_ADT_SegmentedVector_t; - -/* ------------------------------------------------------------------------- */ -typedef -NW_Uint8* -(*NW_ADT_SegmentedVector_AllocateSegment_t) (NW_ADT_SegmentedVector_t* segmentedVector); - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_SegmentedVector_ClassPart_s { - NW_ADT_Vector_Metric_t segmentListIncrement; - NW_ADT_SegmentedVector_AllocateSegment_t allocateSegment; -} NW_ADT_SegmentedVector_ClassPart_t; - -/* ------------------------------------------------------------------------- */ - -struct NW_ADT_SegmentedVector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; - NW_ADT_SegmentedVector_ClassPart_t NW_ADT_SegmentedVector; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_SegmentedVector_s { - NW_ADT_DynamicVector_t super; - - NW_ADT_Vector_Metric_t segmentSize; - NW_Uint8** segmentList; - NW_ADT_Vector_Metric_t segmentListSize; - NW_ADT_Vector_Metric_t numSegments; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_SegmentedVector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_SegmentedVector)) - -#define NW_ADT_SegmentedVectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_SegmentedVector)) - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_SegmentedVector_Class_t NW_ADT_SegmentedVector_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_SegmentedVector_t* -NW_ADT_SegmentedVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t segmentSize); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_SEGMENTEDVECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_segmentedvectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_segmentedvectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_SEGMENTEDVECTORI_H -#define NW_ADT_SEGMENTEDVECTORI_H - -#include "nw_adt_dynamicvectori.h" -#include "nw_adt_segmentedvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_SegmentedVector_GetSegmentListIncrement(_vector) \ - (NW_ADT_SegmentedVector_GetClassPart(_vector).segmentListIncrement) - -#define NW_ADT_SegmentedVector_AllocateSegment(_segmentedVector) \ - (NW_Object_Invoke (_segmentedVector, NW_ADT_SegmentedVector, allocateSegment) \ - (_segmentedVector)) - -/* --------------------------------------------------------------------------*/ - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_SegmentedVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_SegmentedVector_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_SegmentedVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded); - -NW_ADT_EXPORT -NW_Uint8* -_NW_ADT_SegmentedVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_SegmentedVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex); - -NW_ADT_EXPORT -NW_Uint8* -_NW_ADT_SegmentedVector_AllocateSegment (NW_ADT_SegmentedVector_t* segmentedVector); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_SEGMENTEDVECTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_singleiterator.h --- a/webengine/wmlengine/src/adt/include/nw_adt_singleiterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_SINGLEITERATOR_H -#define NW_ADT_SINGLEITERATOR_H - -#include "nw_adt_iterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_SingleIterator_Class_s NW_ADT_SingleIterator_Class_t; -typedef struct NW_ADT_SingleIterator_s NW_ADT_SingleIterator_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_SingleIterator_ClassPart_s { - void** unused; -} NW_ADT_SingleIterator_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_SingleIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Iterator_ClassPart_t NW_ADT_Iterator; - NW_ADT_SingleIterator_ClassPart_t NW_ADT_SingleIterator; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_SingleIterator_s { - NW_ADT_Iterator_t super; - - /* member variables */ - void* element; - NW_Uint16 elementSize; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_SingleIterator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_SingleIterator)) - -#define NW_ADT_SingleIteratorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_SingleIterator)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_SingleIterator_Class_t NW_ADT_SingleIterator_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_SingleIterator_t* -NW_ADT_SingleIterator_New (void* element, - NW_Uint16 elementSize); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_SINGLEITERATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_singleiteratori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_singleiteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_SINGLEITERATORI_H -#define NW_ADT_SINGLEITERATORI_H - -#include "nw_adt_iteratori.h" -#include "nw_adt_singleiterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_SingleIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -NW_Int32 -_NW_ADT_SingleIterator_HasMoreElements (const NW_ADT_Iterator_t* iterator); - -NW_ADT_EXPORT -void** -_NW_ADT_SingleIterator_NextElement (NW_ADT_Iterator_t* iterator); - -NW_ADT_EXPORT -NW_Uint32 -_NW_ADT_SingleIterator_GetElementSize (NW_ADT_Iterator_t* iterator); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_SINGLEITERATORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_textmap.h --- a/webengine/wmlengine/src/adt/include/nw_adt_textmap.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_TEXTMAP_H -#define NW_ADT_TEXTMAP_H - -#include "nw_adt_map.h" -#include "nw_adt_dynamicvector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_TextMap_Class_s NW_ADT_TextMap_Class_t; -typedef struct NW_ADT_TextMap_s NW_ADT_TextMap_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_TextMap_ClassPart_s { - void** unused; -} NW_ADT_TextMap_ClassPart_t; - -struct NW_ADT_TextMap_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Map_ClassPart_t NW_ADT_Map; - NW_ADT_TextMap_ClassPart_t NW_ADT_TextMap; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_TextMap_s { - NW_ADT_Map_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_TextMap_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_TextMap)) - -#define NW_ADT_TextMapOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_TextMap)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_TextMap_Class_t NW_ADT_TextMap_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_TextMap_t* -NW_ADT_TextMap_New (NW_Uint32 valueSize, - NW_ADT_DynamicVector_t* dynamicVector); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_TEXTMAP_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_textmapi.h --- a/webengine/wmlengine/src/adt/include/nw_adt_textmapi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_TEXTMAPI_H -#define NW_ADT_TEXTMAPI_H - -#include "nw_adt_mapi.h" -#include "nw_adt_textmap.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_Vector_Metric_t -_NW_ADT_TextMap_Lookup (const NW_ADT_Map_t* thisObj, - const void* key); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_TEXTMAPI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_types.h --- a/webengine/wmlengine/src/adt/include/nw_adt_types.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_TYPE_H -#define NW_ADT_TYPE_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - * ------------------------------------------------------------------------- */ -typedef NW_Uint32 NW_ADT_Token_t; - -typedef NW_Uint8 NW_ADT_ValueType_t; -enum { - NW_ADT_ValueType_Integer = 0x01, - NW_ADT_ValueType_Decimal = 0x02, - NW_ADT_ValueType_Pointer = 0x03, - NW_ADT_ValueType_Object = 0x80 -}; - -typedef union NW_ADT_Value_u { - NW_Int32 integer; - NW_Float32 decimal; - void* pointer; - NW_Object_t* object; -} NW_ADT_Value_t; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_TYPE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_valuelist.h --- a/webengine/wmlengine/src/adt/include/nw_adt_valuelist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VALUELIST_H -#define NW_ADT_VALUELIST_H - -#include "nw_object_dynamic.h" -#include "nw_adt_map.h" -#include "nw_adt_iterator.h" -#include "nw_adt_types.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ValueList_Class_s NW_ADT_ValueList_Class_t; -typedef struct NW_ADT_ValueList_s NW_ADT_ValueList_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ValueList_Entry_s { - NW_ADT_Value_t value; - unsigned type : 4; - unsigned freeNeeded : 1; -} NW_ADT_ValueList_Entry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_ADT_ValueList_ClassPart_s { - void** unused; -} NW_ADT_ValueList_ClassPart_t; - -struct NW_ADT_ValueList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_ValueList_ClassPart_t NW_ADT_ValueList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_ADT_ValueList_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_Map_t* map; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_ADT_ValueList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_ValueList)) - -#define NW_ADT_ValueListOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_ValueList)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_ValueList_Class_t NW_ADT_ValueList_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_ValueList_GetSize(_propertyList) \ - (NW_ADT_Vector_GetSize (NW_ADT_VectorOf (NW_ADT_ValueListOf (_propertyList)->list))) - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_ValueList_Get (const NW_ADT_ValueList_t* thisObj, - void* key, - NW_ADT_ValueList_Entry_t* entry); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_ValueList_Set (NW_ADT_ValueList_t* thisObj, - void* key, - const NW_ADT_ValueList_Entry_t* entry); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_ValueList_Remove (const NW_ADT_ValueList_t* thisObj, - void* key); - -NW_ADT_EXPORT -TBrowserStatusCode -NW_ADT_ValueList_Copy (const NW_ADT_ValueList_t* thisObj, - NW_ADT_ValueList_t* dest); - -NW_ADT_EXPORT -NW_ADT_Iterator_t* -NW_ADT_ValueList_GetElements (NW_ADT_ValueList_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_ValueList_t* -NW_ADT_ValueList_New (NW_Uint32 keySize, - NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VALUELIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_valuelisti.h --- a/webengine/wmlengine/src/adt/include/nw_adt_valuelisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VALUELISTI_H -#define NW_ADT_VALUELISTI_H - -#include "nw_object_dynamici.h" -#include "nw_adt_valuelist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_ValueList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -void -_NW_ADT_ValueList_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VALUELISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_vector.h --- a/webengine/wmlengine/src/adt/include/nw_adt_vector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VECTOR_H -#define NW_ADT_VECTOR_H - -#include "nw_object_dynamic.h" -#include "NW_ADT_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - constants - * ------------------------------------------------------------------------- */ -#define NW_ADT_Vector_AtEnd ((NW_ADT_Vector_Metric_t) ~0) -#define NW_ADT_Vector_AtFront ((NW_ADT_Vector_Metric_t) 0) - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Vector_Class_s NW_ADT_Vector_Class_t; -typedef struct NW_ADT_Vector_s NW_ADT_Vector_t; - -/* ------------------------------------------------------------------------- */ -typedef NW_Uint16 NW_ADT_Vector_Metric_t; - -/* ------------------------------------------------------------------------- */ -typedef -NW_ADT_Vector_Metric_t -(*NW_ADT_Vector_GetElementSize_t) (const NW_ADT_Vector_t* vector); - -typedef -NW_ADT_Vector_Metric_t -(*NW_ADT_Vector_GetSize_t) (const NW_ADT_Vector_t* vector); - -typedef -NW_Uint8* -(*NW_ADT_Vector_AddressAt_t) (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index); - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_Vector_ClassPart_s { - NW_ADT_Vector_GetElementSize_t getElementSize; - NW_ADT_Vector_GetSize_t getSize; - NW_ADT_Vector_AddressAt_t addressAt; -} NW_ADT_Vector_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_Vector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_Vector_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_Vector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_Vector)) - -#define NW_ADT_VectorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_Vector)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_Vector_Class_t NW_ADT_Vector_Class; - -/* ------------------------------------------------------------------------- * - public methods prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -void** -_NW_ADT_Vector_ElementAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index); - -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_Vector_GetElementAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index, - void* element); - -NW_ADT_EXPORT -NW_ADT_Vector_Metric_t -_NW_ADT_Vector_GetElementIndex (const NW_ADT_Vector_t* vector, - void* target); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_Vector_GetElementSize(_vector) \ - (NW_Object_Invoke (_vector, NW_ADT_Vector, getElementSize) (\ - NW_ADT_VectorOf (_vector))) - -#define NW_ADT_Vector_GetSize(_vector) \ - (NW_Object_Invoke (_vector, NW_ADT_Vector, getSize) (\ - NW_ADT_VectorOf (_vector))) - -#define NW_ADT_Vector_ElementAt(_vector, _index) \ - (_NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (_vector), (_index))) - -#define NW_ADT_Vector_GetElementAt(_vector, _index, _element) \ - (_NW_ADT_Vector_GetElementAt (NW_ADT_VectorOf (_vector), (_index), (_element))) - -#define NW_ADT_Vector_GetElementIndex(_vector, _target) \ - (_NW_ADT_Vector_GetElementIndex (NW_ADT_VectorOf (_vector), (_target))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VECTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_vectori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_vectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VECTORI_H -#define NW_ADT_VECTORI_H - -#include "nw_object_dynamici.h" -#include "nw_adt_vector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method accessors - * ------------------------------------------------------------------------- */ -#define NW_ADT_Vector_AddressAt(_object, _index) \ - (NW_Object_Invoke (_object, NW_ADT_Vector, addressAt) \ - (NW_ADT_VectorOf (_object), (_index))) - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VECTORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_vectoriterator.h --- a/webengine/wmlengine/src/adt/include/nw_adt_vectoriterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VECTORITERATOR_H -#define NW_ADT_VECTORITERATOR_H - -#include "nw_adt_iterator.h" -#include "nw_adt_vector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_VectorIterator_Class_s NW_ADT_VectorIterator_Class_t; -typedef struct NW_ADT_VectorIterator_s NW_ADT_VectorIterator_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_ADT_VectorIterator_ClassPart_s { - void** unused; -} NW_ADT_VectorIterator_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_VectorIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Iterator_ClassPart_t NW_ADT_Iterator; - NW_ADT_VectorIterator_ClassPart_t NW_ADT_VectorIterator; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_ADT_VectorIterator_s { - NW_ADT_Iterator_t super; - - /* member variables */ - const NW_ADT_Vector_t* vector; - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t end; - NW_ADT_IteratorDirection_t direction; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_ADT_VectorIterator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_ADT_VectorIterator)) - -#define NW_ADT_VectorIteratorOf(_object) \ - (NW_Object_Cast (_object, NW_ADT_VectorIterator)) - -/* ------------------------------------------------------------------------- */ -NW_ADT_EXPORT const NW_ADT_VectorIterator_Class_t NW_ADT_VectorIterator_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_ADT_VectorIterator_GetIndex(_vectorIterator) \ - ((NW_ADT_Vector_Metric_t) \ - (NW_ADT_VectorIteratorOf (_vectorIterator)->index)) - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -NW_ADT_VectorIterator_t* -_NW_ADT_VectorIterator_Initialize (NW_ADT_VectorIterator_t* vectorIterator, - const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t start, - NW_ADT_Vector_Metric_t end, - NW_ADT_IteratorDirection_t direction); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -#define NW_ADT_VectorIterator_Initialize(_vectorIterator, _vector, _start, _end, _direction) \ - (_NW_ADT_VectorIterator_Initialize ((_vectorIterator), NW_ADT_VectorOf (_vector), (_start), (_end), (_direction))) - -#define NW_ADT_VectorIterator_New(_vector, _start, _end, _direction) \ - (_NW_ADT_VectorIterator_New (NW_ADT_VectorOf (_vector), (_start), (_end), (_direction))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VECTORITERATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/include/nw_adt_vectoriteratori.h --- a/webengine/wmlengine/src/adt/include/nw_adt_vectoriteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ADT_VECTORITERATORI_H -#define NW_ADT_VECTORITERATORI_H - -#include "nw_adt_iteratori.h" -#include "nw_adt_vectoriterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_ADT_EXPORT -TBrowserStatusCode -_NW_ADT_VectorIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_ADT_EXPORT -NW_Int32 -_NW_ADT_VectorIterator_HasMoreElements (const NW_ADT_Iterator_t* iterator); - -NW_ADT_EXPORT -void** -_NW_ADT_VectorIterator_NextElement (NW_ADT_Iterator_t* iterator); - -NW_ADT_EXPORT -NW_Uint32 -_NW_ADT_VectorIterator_GetElementSize (NW_ADT_Iterator_t* iterator); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ADT_VECTORITERATORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/Broadcaster.c --- a/webengine/wmlengine/src/adt/src/Broadcaster.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_broadcasteri.h" -#include "nw_adt_resizablevector.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public consts - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - internal methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_Broadcaster_Class_t NW_ADT_Broadcaster_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_Broadcaster_t), - /* construct */ _NW_ADT_Broadcaster_Construct, - /* destruct */ _NW_ADT_Broadcaster_Destruct - }, - { /* NW_ADT_Broadcaster */ - /* addListener */ _NW_ADT_Broadcaster_AddListener, - /* removeListener */ _NW_ADT_Broadcaster_RemoveListener, - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Broadcaster_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_Broadcaster_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (argp); - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_ADT_Broadcaster_Class)); - - /* for convenience */ - thisObj = NW_ADT_BroadcasterOf (dynamicObject); - - /* create the variable list */ - thisObj->listeners = (NW_ADT_DynamicVector_t *) (NW_ADT_ResizableVector_New ( - sizeof (NW_Object_Core_t*), 1, 1)); - - if (!thisObj->listeners) { - status = KBrsrOutOfMemory; - } - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_Broadcaster_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_Broadcaster_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_ADT_Broadcaster_Class)); - - /* for convenience */ - thisObj = NW_ADT_BroadcasterOf (dynamicObject); - - /* deallocate our dynamic data */ - NW_Object_Delete (thisObj->listeners); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Broadcaster_AddListener (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener) -{ - void** temp; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Broadcaster_Class)); - - /* add the listener */ - temp = NW_ADT_DynamicVector_InsertAt (thisObj->listeners, - (void *) &listener, NW_ADT_Vector_AtEnd); - - return (temp != NULL) ? KBrsrSuccess: KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Broadcaster_RemoveListener (NW_ADT_Broadcaster_t* thisObj, - const NW_Object_t* listener) -{ - TBrowserStatusCode status; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Broadcaster_Class)); - - /* add the listener */ - status = _NW_ADT_DynamicVector_RemoveElement (thisObj->listeners, - (void *) &listener); - - return status; -} - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Broadcaster_t* -NW_ADT_Broadcaster_New (void) -{ - return (NW_ADT_Broadcaster_t*) NW_Object_New (&NW_ADT_Broadcaster_Class); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/DynamicVector.c --- a/webengine/wmlengine/src/adt/src/DynamicVector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,330 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_dynamicvectori.h" -#include <nwx_assert.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_DynamicVector_Class_t NW_ADT_DynamicVector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_Vector_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_DynamicVector_t), - /* construct */ _NW_ADT_DynamicVector_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Vector */ - /* getElementSize */ _NW_ADT_DynamicVector_GetElementSize, - /* getSize */ _NW_ADT_DynamicVector_GetSize, - /* addressAt */ NULL - }, - { /* NW_ADT_DynamicVector */ - /* resizeCapacity */ NULL, - /* moveElements */ _NW_ADT_DynamicVector_MoveElements, - /* clear */ _NW_ADT_DynamicVector_Clear - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_DynamicVector_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_ADT_DynamicVector_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_ADT_DynamicVectorOf (dynamicObject); - - /* initialize the object */ - thisObj->elementSize = (NW_ADT_Vector_Metric_t )va_arg (*argp, NW_Uint32); - thisObj->capacity = (NW_ADT_Vector_Metric_t )va_arg (*argp, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -_NW_ADT_DynamicVector_GetElementSize (const NW_ADT_Vector_t* vector) -{ - return NW_ADT_DynamicVectorOf (vector)->elementSize; -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -_NW_ADT_DynamicVector_GetSize (const NW_ADT_Vector_t* vector) -{ - return NW_ADT_DynamicVectorOf (vector)->size; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex) -{ - TBrowserStatusCode status; - NW_Int32 sizeDelta; - - /* if the move needs a bigger array to complete, it is our duty to allocate - that block now */ - if (dstIndex > srcIndex) { - sizeDelta = dstIndex - srcIndex; - } else { - /*lint -e{650} Constant out of range for operator */ - sizeDelta = - NW_INT32_CAST(srcIndex - dstIndex); - } - if (dynamicVector->size + sizeDelta > dynamicVector->capacity) { - status = - NW_ADT_DynamicVector_ResizeCapacity (dynamicVector, - (NW_ADT_Vector_Metric_t) - (dynamicVector->size + sizeDelta)); - if (status != KBrsrSuccess) { - return status; - } - } - - /* move the data */ - (void) NW_Mem_memmove (NW_ADT_Vector_AddressAt (&dynamicVector->super, dstIndex), - NW_ADT_Vector_AddressAt (&dynamicVector->super, srcIndex), - (dynamicVector->size - srcIndex) - * dynamicVector->elementSize); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_Clear (NW_ADT_DynamicVector_t* dynamicVector) -{ - NW_Int32 index = dynamicVector->size; - - for (--index; index >= 0; index--) { - TBrowserStatusCode status; - - status = NW_ADT_DynamicVector_RemoveAt (dynamicVector, - (NW_ADT_Vector_Metric_t) index); - NW_ASSERT (status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void** -_NW_ADT_DynamicVector_ReplaceAt (NW_ADT_DynamicVector_t* dynamicVector, - void* element, - NW_ADT_Vector_Metric_t where) -{ - /* convert the where if NW_ADT_Vector_AtEnd is specified */ - if (where == NW_ADT_Vector_AtEnd) { - where = (NW_ADT_Vector_Metric_t) (dynamicVector->size - 1); - } - - /* make sure that the where index is not out of bounds */ - NW_ASSERT (where < dynamicVector->size); - - /* copy the element into vector */ - if (element != NULL) { - (void) NW_Mem_memcpy (NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - where), - element, dynamicVector->elementSize); - } - - /* successful completion */ - return (void**) - NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), where); -} - -/* ------------------------------------------------------------------------- */ -void** -_NW_ADT_DynamicVector_InsertAt (NW_ADT_DynamicVector_t* dynamicVector, - void* element, - NW_ADT_Vector_Metric_t where) -{ - TBrowserStatusCode status; - - /* convert the where if NW_ADT_Vector_AtEnd is specified */ - if (where == NW_ADT_Vector_AtEnd) { - where = dynamicVector->size; - } - - /* make sure that the where element is not out of bounds */ - NW_ASSERT (where <= dynamicVector->size); - - /* move all the elements up by one, if this fails we simply return - the error code passed to us */ - status = - NW_ADT_DynamicVector_MoveElements (dynamicVector, where, - (NW_ADT_Vector_Metric_t) (where + 1)); - if (status != KBrsrSuccess) { - return NULL; - } - - /* copy the element into vector */ - if (element != NULL) { - (void) NW_Mem_memcpy (NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - where), - element, dynamicVector->elementSize); - } else { - /* - * if element is NULL, then we need to zero out the memory block. This is necessary - * because later code which fills in the values for this newly allocated vector - * element may leave some bytes in the memory block un-assigned due to padding. - */ - NW_Mem_memset ( NW_ADT_Vector_AddressAt ( NW_ADT_VectorOf ( dynamicVector ) , where ) , - 0 , dynamicVector->elementSize ) ; - } - - /* increment the size count */ - dynamicVector->size += 1; - - /* successful completion */ - return (void**) - NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), where); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_RemoveAt (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t index) -{ - TBrowserStatusCode status; - - /* convert the index if NW_ADT_Vector_AtEnd is specified */ - if (index == NW_ADT_Vector_AtEnd) { - index = (NW_ADT_Vector_Metric_t) (dynamicVector->size - 1); - } - - /* make sure that the index element is not out of bounds */ - if (index >= dynamicVector->size) { - return KBrsrFailure; - } - - /* don't bother to move anything if the resultant size is zero */ - if (dynamicVector->size > 1) { - /* move all the elements down by one, if this fails we simply return - the error code passed to us */ - status = - NW_ADT_DynamicVector_MoveElements (dynamicVector, - (NW_ADT_Vector_Metric_t) (index + 1), - index); - if (status != KBrsrSuccess) { - return status; - } - } - - /* increment the size count */ - dynamicVector->size -= 1; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_RemoveElement (NW_ADT_DynamicVector_t* dynamicVector, - void* element) -{ - NW_ADT_Vector_Metric_t index; - - /* find the element in the vector */ - for (index = 0; index < dynamicVector->size; index++) { - if (NW_Mem_memcmp (NW_ADT_Vector_ElementAt (&dynamicVector->super, - index), - element, dynamicVector->elementSize) == 0) { - return NW_ADT_DynamicVector_RemoveAt (dynamicVector, index); - } - } - - /* unsuccessful completion */ - return KBrsrNotFound; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_DynamicVector_InsertVectorAt (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t where) -{ - TBrowserStatusCode status; - NW_Int32 index; - NW_ADT_Vector_Metric_t numElements; - - /* be optimistic, assume that we succeed */ - status = KBrsrSuccess; - - /* iterate through our source vector's elements appending them one by one to - our destination vector */ - numElements = NW_ADT_Vector_GetSize (vector); - for (index = numElements - 1; index >= 0; index--) { - void* element; - - element = - NW_ADT_Vector_ElementAt (vector, (NW_ADT_Vector_Metric_t) index); - if (element == NULL) { - status = KBrsrFailure; /* TODO: return a more descriptive error code */ - break; - } - - if (NW_ADT_DynamicVector_InsertAt (dynamicVector, element, where) == NULL) { - status = KBrsrOutOfMemory; - break; - } - } - - /* if a failure occurred, clean up after us */ - if (status != KBrsrSuccess) { - for (; index != 0; index--) { - NW_ADT_DynamicVector_RemoveAt (dynamicVector, where); - } -} - - /* successful completion */ - return status; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/FixedMap.c --- a/webengine/wmlengine/src/adt/src/FixedMap.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_map.h" -#include "nw_adt_fixedvector.h" - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Map_t* -NW_ADT_FixedMap_New (NW_Uint32 keySize, - NW_Uint32 elementSize, - NW_ADT_Vector_Metric_t capacity) -{ - NW_ADT_DynamicVector_t* vector; - NW_ADT_Map_t* map; - - /* parameter assertions */ - NW_ASSERT (keySize != 0); - NW_ASSERT (elementSize != 0); - NW_ASSERT (capacity != 0); - - /* create the vector */ - vector = (NW_ADT_DynamicVector_t*) - NW_ADT_FixedVector_New ((NW_ADT_Vector_Metric_t) (keySize + elementSize), - capacity); - if (vector == NULL) { - return NULL; - } - - /* create the map */ - map = NW_ADT_Map_New (keySize, elementSize, vector); - if (map == NULL) { - NW_Object_Delete (vector); - } - return map; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/FixedVector.c --- a/webengine/wmlengine/src/adt/src/FixedVector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_fixedvectori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_FixedVector_Class_t NW_ADT_FixedVector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_DynamicVector_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_FixedVector_t), - /* construct */ _NW_ADT_DynamicVector_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Vector */ - /* getElementSize */ _NW_ADT_DynamicVector_GetElementSize, - /* getSize */ _NW_ADT_DynamicVector_GetSize, - /* addressAt */ _NW_ADT_FixedVector_AddressAt - }, - { /* NW_ADT_DynamicVector */ - /* resizeCapacity */ _NW_ADT_FixedVector_ResizeCapacity, - /* moveElements */ _NW_ADT_DynamicVector_MoveElements, - /* clear */ _NW_ADT_FixedVector_Clear - }, - { /* NW_ADT_FixedVector */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Uint8* -_NW_ADT_FixedVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index) -{ - NW_ADT_FixedVector_t* thisObj; - - /* for convenience */ - thisObj = NW_ADT_FixedVectorOf (vector); - - /*lint -e{573} Signed-unsigned mix with divide */ - return (NW_Uint8*) thisObj - + index * thisObj->super.elementSize - + sizeof (NW_Int32) - * ((NW_Object_Dynamic_GetClassPart (thisObj).instanceSize - 1) - / sizeof (NW_Int32) + 1); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_FixedVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded) -{ - /* the FixedVector will never resize its capacity, so if the requested - capacity is greater than what we've got we must return an error */ - if (capacityNeeded > dynamicVector->capacity) { - return KBrsrFailure; /* TODO: return a more descriptive error code */ - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_FixedVector_Clear (NW_ADT_DynamicVector_t* dynamicVector) -{ - /* set the size to zero */ - dynamicVector->size = 0; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_FixedVector_t* -NW_ADT_FixedVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t capacity) -{ - NW_ADT_FixedVector_t* fixedVector; - TBrowserStatusCode status; - - /* allocate and initialize the object */ - /*lint -e{573} Signed-unsigned mix with divide */ - fixedVector = (NW_ADT_FixedVector_t*) - NW_Mem_Malloc (capacity * elementSize + sizeof (NW_Int32) * - ((NW_ADT_FixedVector_Class. - NW_Object_Dynamic.instanceSize - 1) - / sizeof (NW_Int32) + 1)); - if (fixedVector == NULL) { - return NULL; - } - status = NW_Object_Initialize (&NW_ADT_FixedVector_Class, fixedVector, - elementSize, capacity); - if (status != KBrsrSuccess) { - NW_Mem_Free (fixedVector); - return NULL; - } - - /* successful completion */ - return fixedVector; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/Iterator.c --- a/webengine/wmlengine/src/adt/src/Iterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_iteratori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_ADT_Iterator_Class_t NW_ADT_Iterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_Iterator_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_ADT_Iterator */ - /* hasMoreElements */ NULL, - /* nextElement */ NULL, - /* getElementSize */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Iterator_GetNextElement (NW_ADT_Iterator_t* iterator, - void* element) -{ - void* location; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_Iterator_Class)); - - /* get the location for the next element */ - location = NW_ADT_Iterator_NextElement (iterator); - if (location == NULL) { - return KBrsrNotFound; - } - - /* copy the contents into the supplied buffer */ - (void) NW_Mem_memcpy (element, location, - NW_ADT_Iterator_GetElementSize (iterator)); - - /* successful completion */ - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/MakeSrc --- a/webengine/wmlengine/src/adt/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_adt_src_lib.a - -SUBDIRS = - -SUBMAKES = - -SRCS = Broadcaster.c DynamicVector.c FixedMap.c FixedVector.c Iterator.c Map.c MapIterator.c \ - ResizableMap.c ResizableObjectVector.c ResizableVector.c SegmentedMap.c \ - SegmentedVector.c SingleIterator.c TextMap.c ValueList.c Vector.c \ - VectorIterator.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/Map.c --- a/webengine/wmlengine/src/adt/src/Map.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_mapi.h" -#include "nw_adt_mapiterator.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_Map_Class_t NW_ADT_Map_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_Map_t), - /* construct */ _NW_ADT_Map_Construct, - /* destruct */ _NW_ADT_Map_Destruct - }, - { /* NW_ADT_Map */ - /* lookup */ _NW_ADT_Map_Lookup - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Map_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_Map_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_ADT_Map_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_ADT_MapOf (dynamicObject); - - /* set the member variables */ - thisObj->keySize = va_arg (*argp, NW_Uint32); - thisObj->valueSize = va_arg (*argp, NW_Uint32); - thisObj->vector = va_arg (*argp, NW_ADT_DynamicVector_t*); - if (thisObj->vector == NULL) { - return KBrsrFailure; - } - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->vector, - &NW_ADT_DynamicVector_Class)); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_Map_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_Map_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_ADT_Map_Class)); - - /* for convenience */ - thisObj = NW_ADT_MapOf (dynamicObject); - - /* deallocate our dynamic data */ - NW_Object_Delete (thisObj->vector); -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -_NW_ADT_Map_Lookup (const NW_ADT_Map_t* thisObj, - const void* key) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t start; - NW_Int32 end; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - - /* look for the entry using a binary search algorithm */ - index = 0; - start = 0; - end = ((NW_Int32) NW_ADT_Vector_GetSize (NW_ADT_VectorOf (thisObj->vector))) - 1; - while (end >= start) { - void* entry; - NW_Int32 match; - - index = (NW_ADT_Vector_Metric_t) ((end + start) / 2); - - entry = NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (thisObj->vector), index); - match = NW_Mem_memcmp (entry, key, thisObj->keySize); - if (!match) { - return index; - } else if (match > 0) { - start = (NW_ADT_Vector_Metric_t) (index + 1); - } else if (match < 0) { - end = ((NW_Int32)index) - 1; - } - } - - /* we didn't find the entry we were looking for, but we return the index of - the position at which it would have been had it existed */ - if (start > index) { - return start; - } - return index; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_Map_Set (NW_ADT_Map_t* thisObj, - const void* key, - const void* value) -{ - NW_ADT_Vector_Metric_t index; - NW_Uint8* entry; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - NW_ASSERT (key != NULL); - NW_ASSERT (value != NULL); - - /* find the position in the vector where the key is located or should be - located */ - index = NW_ADT_Map_Lookup (thisObj, key); - - /* get a reference to the existing entry or create a new if it doesn't - exist */ - entry = (NW_Uint8*) - NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (thisObj->vector), index); - if (entry == NULL || NW_Mem_memcmp (entry, key, thisObj->keySize)) { - entry = (NW_Uint8*) NW_ADT_DynamicVector_InsertAt (thisObj->vector, NULL, index); - if (entry == NULL) { - return KBrsrOutOfMemory; - } - (void) NW_Mem_memcpy (entry, key, thisObj->keySize); - } - - /* copy the value into the vector */ - (void) NW_Mem_memcpy (entry + thisObj->keySize, value, thisObj->valueSize); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_Map_Get (const NW_ADT_Map_t* thisObj, - const void* key, - void* value) -{ - void** entry; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - NW_ASSERT (key != NULL); - - /* get the entry pointer for the key */ - entry = NW_ADT_Map_GetUnsafe (thisObj, key); - if (entry == NULL) { - return KBrsrNotFound; - } - - /* copy the contents into the supplied buffer */ - (void) NW_Mem_memcpy (value, entry, thisObj->valueSize); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void** -NW_ADT_Map_GetUnsafe (const NW_ADT_Map_t* thisObj, - const void* key) -{ - NW_ADT_Vector_Metric_t index; - NW_Uint8 *entry; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - NW_ASSERT (key != NULL); - - /* find the position in the vector where the key is located or should be - located */ - index = NW_ADT_Map_Lookup (thisObj, key); - - /* if there is no entry for the key we return NULL */ - entry = (NW_Uint8*) - NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (thisObj->vector), index); - if (entry == NULL || NW_Mem_memcmp (entry, key, thisObj->keySize)) { - return NULL; - } - - /* return the unaligned pointer to the value portion of the vector entry */ - return (void**) (entry + thisObj->keySize); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_Map_Remove (NW_ADT_Map_t* thisObj, - const void* key) -{ - NW_ADT_Vector_Metric_t index; - NW_Uint8 *entry; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - NW_ASSERT (key != NULL); - - /* find the position in the vector where the key is located or should be - located */ - index = NW_ADT_Map_Lookup (thisObj, key); - - /* we can't delete the entry if it doesn't exist */ - if (index == NW_ADT_Vector_AtEnd) { - return KBrsrFailure; - } - - /* if there is no entry for the key we return KBrsrFailure */ - entry = (NW_Uint8*) - NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (thisObj->vector), index); - if (entry == NULL || NW_Mem_memcmp (entry, key, thisObj->keySize)) { - return KBrsrFailure; - } - - /* delete the entry */ - return NW_ADT_DynamicVector_RemoveAt (thisObj->vector, index); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_Map_Copy (const NW_ADT_Map_t* thisObj, - NW_ADT_Map_t* dest) -{ - NW_ADT_MapIterator_t* iterator = NULL; - - NW_TRY (status) { - void** entry; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(dest != NULL); - - iterator = NW_ADT_MapIterator_New(thisObj); - if (iterator == NULL) { - return KBrsrOutOfMemory; - } - - /* Copy all elements */ - while ((entry = NW_ADT_Iterator_NextElement(NW_ADT_IteratorOf(iterator))) != NULL) { - status = NW_ADT_Map_Set(dest, (void*) entry, (char*) entry + thisObj->keySize); - _NW_THROW_ON_ERROR(status); - } - - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Delete (iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_Map_Clear (NW_ADT_Map_t* thisObj) -{ - /* parameter assertion */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_Map_Class)); - - return NW_ADT_DynamicVector_Clear (thisObj->vector); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Map_t* -NW_ADT_Map_New (NW_Uint32 keySize, - NW_Uint32 elementSize, - NW_ADT_DynamicVector_t* dynamicVector) -{ - return (NW_ADT_Map_t*) - NW_Object_New (&NW_ADT_Map_Class, keySize, elementSize, dynamicVector); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/MapIterator.c --- a/webengine/wmlengine/src/adt/src/MapIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_mapiteratori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_MapIterator_Class_t NW_ADT_MapIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_VectorIterator_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_MapIterator_t), - /* construct */ _NW_ADT_MapIterator_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Iterator */ - /* hasMoreElements */ _NW_ADT_VectorIterator_HasMoreElements, - /* nextElement */ _NW_ADT_VectorIterator_NextElement, - /* getElementSize */ _NW_ADT_MapIterator_GetElementSize - }, - { /* NW_ADT_VectorIterator */ - /* unused */ NW_Object_Unused - }, - { /* NW_ADT_MapIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_ADT_MapIterator methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_MapIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_ADT_MapIterator_t* thisObj; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_ADT_MapIterator_Class)); - - /* call out superclass method */ - status = NW_ADT_VectorIterator_Class.NW_Object_Dynamic. - construct (dynamicObject, argList); - if (status != KBrsrSuccess) { - return status; - } - - /* for convenience */ - thisObj = NW_ADT_MapIteratorOf (dynamicObject); - - /* initialize our member variables */ - thisObj->map = va_arg (*argList, NW_ADT_Map_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_ADT_MapIterator_GetElementSize (NW_ADT_Iterator_t* iterator) -{ - NW_ADT_MapIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_MapIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_MapIteratorOf (iterator); - - return NW_ADT_Map_GetKeySize (thisObj->map); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_MapIterator_Initialize (NW_ADT_MapIterator_t* iterator, - const NW_ADT_Map_t* map) -{ - return - NW_Object_Initialize (&NW_ADT_MapIterator_Class, iterator, map->vector, 0, - NW_ADT_Vector_AtEnd, - NW_ADT_IteratorDirection_Increment, map); -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_MapIterator_t* -NW_ADT_MapIterator_New (const NW_ADT_Map_t* map) -{ - return (NW_ADT_MapIterator_t*) - NW_Object_New (&NW_ADT_MapIterator_Class, map->vector, 0, - NW_ADT_Vector_AtEnd, NW_ADT_IteratorDirection_Increment, - map); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/PropertyList.c --- a/webengine/wmlengine/src/adt/src/PropertyList.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_propertylisti.h" - -#include "nw_adt_mapiterator.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_PropertyList_Class_t NW_ADT_PropertyList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_ValueList_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_PropertyList_t), - /* construct */ _NW_ADT_ValueList_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_ValueList */ - /* unused */ NW_Object_Unused - }, - { /* NW_ADT_PropertyList */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_PropertyList_Get (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name, - NW_ADT_Property_t* property) -{ - return NW_ADT_ValueList_Get (NW_ADT_ValueListOf (thisObj), &name, property); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_PropertyList_Set (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name, - const NW_ADT_Property_t* property) -{ - return NW_ADT_ValueList_Set (NW_ADT_ValueListOf (thisObj), &name, property); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_PropertyList_Remove (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyName_t name) -{ - return NW_ADT_ValueList_Remove (NW_ADT_ValueListOf (thisObj), &name); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_PropertyList_Copy (const NW_ADT_PropertyList_t* thisObj, - NW_ADT_PropertyList_t* dest) -{ - return NW_ADT_ValueList_Copy (NW_ADT_ValueListOf (thisObj), NW_ADT_ValueListOf (dest)); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_PropertyList_t* -NW_ADT_PropertyList_New (NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment) -{ - return (NW_ADT_PropertyList_t*) - NW_Object_New (&NW_ADT_PropertyList_Class, sizeof (NW_ADT_PropertyName_t), - capacity, increment); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/ResizableMap.c --- a/webengine/wmlengine/src/adt/src/ResizableMap.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_map.h" -#include "nw_adt_resizablevector.h" - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Map_t* -NW_ADT_ResizableMap_New (NW_Uint32 keySize, - NW_Uint32 elementSize, - NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement) -{ - NW_ADT_DynamicVector_t* vector; - NW_ADT_Map_t* map; - - /* parameter assertions */ - NW_ASSERT (keySize != 0); - NW_ASSERT (elementSize != 0); - NW_ASSERT (initialCapacity != 0); - NW_ASSERT (capacityIncrement != 0); - - /* create the vector */ - vector = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New ((NW_ADT_Vector_Metric_t) (keySize + elementSize), - initialCapacity, capacityIncrement); - if (vector == NULL) { - return NULL; - } - - /* create the map */ - map = NW_ADT_Map_New (keySize, elementSize, vector); - if (map == NULL) { - NW_Object_Delete (vector); - } - return map; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/ResizableObjectVector.c --- a/webengine/wmlengine/src/adt/src/ResizableObjectVector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_resizableobjectvectori.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_ResizableObjectVector_Class_t NW_ADT_ResizableObjectVector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_ResizableVector_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_ResizableVector_t), - /* construct */ _NW_ADT_ResizableVector_Construct, - /* destruct */ _NW_ADT_ResizableObjectVector_Destruct - }, - { /* NW_ADT_Vector */ - /* getElementSize */ _NW_ADT_DynamicVector_GetElementSize, - /* getSize */ _NW_ADT_DynamicVector_GetSize, - /* addressAt */ _NW_ADT_ResizableVector_AddressAt - }, - { /* NW_ADT_DynamicVector */ - /* resizeCapacity */ _NW_ADT_ResizableVector_ResizeCapacity, - /* moveElements */ _NW_ADT_DynamicVector_MoveElements, - /* clear */ _NW_ADT_DynamicVector_Clear - }, - { /* NW_ADT_ResizableVector */ - /* unused */ NW_Object_Unused - }, - { /* NW_ADT_ResizableObjectVector */ - /* unused */ NW_Object_Unused - }, -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_ResizableObjectVector_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_ResizableObjectVector_t* thisObj; - NW_ADT_Vector_Metric_t index; - - /* for convenience */ - thisObj = NW_ADT_ResizableObjectVectorOf (dynamicObject); - - /* release the dynamic objects pointed by the object array */ - for (index = 0; index < NW_ADT_Vector_GetSize (thisObj); index++) { - NW_Object_t* object; - - object = *(NW_Object_t**) NW_ADT_Vector_ElementAt (thisObj, index); - NW_Object_Delete (object); - } -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_ResizableObjectVector_t* -NW_ADT_ResizableObjectVector_New (NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement) -{ - /* make the vector such that it holds pointers to NW_Object_t */ - return (NW_ADT_ResizableObjectVector_t*) - NW_Object_New (&NW_ADT_ResizableObjectVector_Class, sizeof (NW_Object_t*), - initialCapacity, capacityIncrement); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/ResizableVector.c --- a/webengine/wmlengine/src/adt/src/ResizableVector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_resizablevectori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_ResizableVector_Class_t NW_ADT_ResizableVector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_DynamicVector_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_ResizableVector_t), - /* construct */ _NW_ADT_ResizableVector_Construct, - /* destruct */ _NW_ADT_ResizableVector_Destruct - }, - { /* NW_ADT_Vector */ - /* getElementSize */ _NW_ADT_DynamicVector_GetElementSize, - /* getSize */ _NW_ADT_DynamicVector_GetSize, - /* addressAt */ _NW_ADT_ResizableVector_AddressAt - }, - { /* NW_ADT_DynamicVector */ - /* resizeCapacity */ _NW_ADT_ResizableVector_ResizeCapacity, - /* moveElements */ _NW_ADT_DynamicVector_MoveElements, - /* clear */ _NW_ADT_DynamicVector_Clear - }, - { /* NW_ADT_ResizableVector */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_ResizableVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_ResizableVector_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_ADT_ResizableVectorOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_ADT_DynamicVector_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the object */ - thisObj->increment = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - thisObj->array = NULL; - if (thisObj->super.capacity) { - thisObj->array = (NW_Uint8*) NW_Mem_Malloc (thisObj->super.capacity * thisObj->super.elementSize); - if (thisObj->array == NULL) { - return KBrsrOutOfMemory; - } - } - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_ResizableVector_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_ResizableVector_t* thisObj; - - /* for convenience */ - thisObj = NW_ADT_ResizableVectorOf (dynamicObject); - - /* release our resources */ - NW_Mem_Free (thisObj->array); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_ResizableVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded) -{ - NW_ADT_ResizableVector_t* thisObj; - NW_ADT_Vector_Metric_t newCapacity; - void* newArray; - - - /* for convenience */ - thisObj = NW_ADT_ResizableVectorOf (dynamicVector); - - /* CEI - This protects against underflow. - We don't currently support shrinking the array. */ - /* TODO: support shrinking ? */ - if (capacityNeeded <= thisObj->super.capacity) { - return KBrsrSuccess; - } - - /* Note: This calculation could leave super.capacity out, if what we want is - to maintain capacity as an even multiple of increment, as it appears. */ - - /* calculate the size of the new array and allocate it */ - newCapacity = (NW_ADT_Vector_Metric_t) - (((capacityNeeded - thisObj->super.capacity - 1) / thisObj->increment + 1) - * thisObj->increment + thisObj->super.capacity); - newArray = - NW_Mem_Malloc (newCapacity * dynamicVector->elementSize); - if (newArray == NULL) { - return KBrsrOutOfMemory; - } - - if (thisObj->array) { - /* copy the contents of the old array into the new */ - (void) NW_Mem_memmove (newArray, thisObj->array, - dynamicVector->size * dynamicVector->elementSize); - } - - /* free the old array and set the member variables */ - NW_Mem_Free (thisObj->array); - thisObj->array = (NW_Uint8*) newArray; - thisObj->super.capacity = newCapacity; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8* -_NW_ADT_ResizableVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index) -{ - NW_ADT_ResizableVector_t* thisObj; - - /* for convenience */ - thisObj = NW_ADT_ResizableVectorOf (vector); - - /* return the trivial calculation */ - return &thisObj->array[index * thisObj->super.elementSize]; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_ResizableVector_t* -NW_ADT_ResizableVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement) -{ - return (NW_ADT_ResizableVector_t*) - NW_Object_New (&NW_ADT_ResizableVector_Class, (NW_Uint32) elementSize, - (NW_Uint32) initialCapacity, (NW_Uint32) capacityIncrement); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/SegmentedMap.c --- a/webengine/wmlengine/src/adt/src/SegmentedMap.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_map.h" -#include "nw_adt_segmentedvector.h" - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Map_t* -NW_ADT_SegmentedMap_New (NW_Uint32 keySize, - NW_Uint32 elementSize, - NW_ADT_Vector_Metric_t segmentSize) -{ - NW_ADT_DynamicVector_t* vector; - NW_ADT_Map_t* map; - - /* parameter assertions */ - NW_ASSERT (keySize != 0); - NW_ASSERT (elementSize != 0); - NW_ASSERT (segmentSize != 0); - - /* create the vector */ - vector = (NW_ADT_DynamicVector_t*) - NW_ADT_SegmentedVector_New ((NW_ADT_Vector_Metric_t) (keySize + elementSize), - segmentSize); - if (vector == NULL) { - return NULL; - } - - /* create the map */ - map = NW_ADT_Map_New (keySize, elementSize, vector); - if (map == NULL) { - NW_Object_Delete (vector); - } - return map; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/SegmentedVector.c --- a/webengine/wmlengine/src/adt/src/SegmentedVector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,263 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_segmentedvectori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_SegmentedVector_Class_t NW_ADT_SegmentedVector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_DynamicVector_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_SegmentedVector_t), - /* construct */ _NW_ADT_SegmentedVector_Construct, - /* destruct */ _NW_ADT_SegmentedVector_Destruct - }, - { /* NW_ADT_Vector */ - /* getElementSize */ _NW_ADT_DynamicVector_GetElementSize, - /* getSize */ _NW_ADT_DynamicVector_GetSize, - /* addressAt */ _NW_ADT_SegmentedVector_AddressAt - }, - { /* NW_ADT_DynamicVector */ - /* resizeCapacity */ _NW_ADT_SegmentedVector_ResizeCapacity, - /* moveElements */ _NW_ADT_SegmentedVector_MoveElements, - /* clear */ _NW_ADT_DynamicVector_Clear - }, - { /* NW_ADT_SegmentedVector */ - /* segmentListIncrement */ 4, - /* allocateSegment */ _NW_ADT_SegmentedVector_AllocateSegment - }, -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_SegmentedVector_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_SegmentedVector_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_ADT_SegmentedVectorOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_ADT_DynamicVector_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the object */ - thisObj->segmentSize = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - thisObj->segmentListSize = - NW_ADT_SegmentedVector_GetSegmentListIncrement (thisObj); - thisObj->segmentList = (NW_Uint8**) - NW_Mem_Malloc (thisObj->segmentListSize * sizeof (*thisObj->segmentList)); - if (thisObj->segmentList == NULL) { - return KBrsrOutOfMemory; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_SegmentedVector_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_SegmentedVector_t* thisObj; - NW_ADT_Vector_Metric_t index; - - /* for convenience */ - thisObj = NW_ADT_SegmentedVectorOf (dynamicObject); - - /* release our resources */ - for (index = 0; index < thisObj->numSegments; index++) { - NW_Mem_Free (thisObj->segmentList[index]); - } - NW_Mem_Free (thisObj->segmentList); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_SegmentedVector_ResizeCapacity (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t capacityNeeded) -{ - NW_ADT_SegmentedVector_t* thisObj; - NW_ADT_Vector_Metric_t newNumSegments; - NW_ADT_Vector_Metric_t newSegmentListSize; - NW_ADT_Vector_Metric_t segmentListIncrement; - NW_Uint8** newSegmentList; - - /* for convenience */ - thisObj = NW_ADT_SegmentedVectorOf (dynamicVector); - - /* calculate the new segmentList size */ - newNumSegments = - (NW_ADT_Vector_Metric_t) ((capacityNeeded - 1) / thisObj->segmentSize + 1); - segmentListIncrement = NW_ADT_SegmentedVector_GetSegmentListIncrement (thisObj); - newSegmentListSize = (NW_ADT_Vector_Metric_t) - (((newNumSegments - 1) / segmentListIncrement + 1) * segmentListIncrement); - - /* if we are shrinking the array, we must first deallocate all the segments - that will be obsolete */ - while (thisObj->numSegments > newNumSegments) { - NW_Mem_Free (thisObj->segmentList[--thisObj->numSegments]); - } - dynamicVector->capacity = - (NW_ADT_Vector_Metric_t) (thisObj->numSegments * thisObj->segmentSize); - - /* allocate the new segmentList and copy the old segmentList entries into the - new */ - newSegmentList = - (NW_Uint8**) NW_Mem_Malloc (newSegmentListSize * sizeof (*newSegmentList)); - if (newSegmentList == NULL) { - return KBrsrOutOfMemory; - } - (void) NW_Mem_memcpy (newSegmentList, thisObj->segmentList, - thisObj->numSegments * sizeof (*newSegmentList)); - - /* free the old segmentList and install the new */ - NW_Mem_Free (thisObj->segmentList); - thisObj->segmentList = newSegmentList; - thisObj->segmentListSize = newSegmentListSize; - - /* if we are growing the array we need to allocate the new segments */ - while (thisObj->numSegments < newNumSegments) { - thisObj->segmentList[thisObj->numSegments] = - NW_ADT_SegmentedVector_AllocateSegment(thisObj); - if (thisObj->segmentList[thisObj->numSegments++] == NULL) { - thisObj->numSegments -= 1; - return KBrsrFailure; /* TODO: return more descriptive error */ - } - } - dynamicVector->capacity = - (NW_ADT_Vector_Metric_t) (thisObj->numSegments * thisObj->segmentSize); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8* -_NW_ADT_SegmentedVector_AddressAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index) -{ - NW_ADT_SegmentedVector_t* thisObj; - NW_ADT_Vector_Metric_t segmentIndex; - - /* cast the object into our class */ - thisObj = (NW_ADT_SegmentedVector_t*) vector; - - /* determine the segment index and return the offset into that segment */ - segmentIndex = - (NW_ADT_Vector_Metric_t) (index / thisObj->segmentSize); - return - (NW_Uint8*) thisObj->segmentList[segmentIndex] - + (index % thisObj->segmentSize) - * NW_ADT_DynamicVectorOf (vector)->elementSize; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_SegmentedVector_MoveElements (NW_ADT_DynamicVector_t* dynamicVector, - NW_ADT_Vector_Metric_t srcIndex, - NW_ADT_Vector_Metric_t dstIndex) -{ - NW_Int32 sizeDelta; - NW_ADT_Vector_Metric_t numElements; - NW_Int32 index; - - /* */ - if (dstIndex > srcIndex) { - sizeDelta = dstIndex - srcIndex; - } else { - sizeDelta = - (NW_Int32) (srcIndex - dstIndex); - } - - if (dynamicVector->size + sizeDelta > dynamicVector->capacity) { - TBrowserStatusCode status; - - status = - NW_ADT_DynamicVector_ResizeCapacity (dynamicVector, - (NW_ADT_Vector_Metric_t) - (dynamicVector->size + sizeDelta)); - if (status != KBrsrSuccess) { - return status; - } - } - - /* now do the actual move */ - /* TODO: this is a very inefficient way of moving the data, we will probably - need to implement a block move capability */ - numElements = (NW_ADT_Vector_Metric_t) (dynamicVector->size - srcIndex); - if (srcIndex > dstIndex) { - for (index = 0; index < numElements; index++) { - (void) NW_Mem_memcpy (NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - (NW_ADT_Vector_Metric_t) (dstIndex + index)), - NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - (NW_ADT_Vector_Metric_t) (srcIndex + index)), - dynamicVector->elementSize); - } - } else { - for (index = numElements - 1; index >= 0; index--) { - (void) NW_Mem_memcpy (NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - (NW_ADT_Vector_Metric_t) (dstIndex + index)), - NW_ADT_Vector_AddressAt (NW_ADT_VectorOf (dynamicVector), - (NW_ADT_Vector_Metric_t) (srcIndex + index)), - dynamicVector->elementSize); - } - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8* -_NW_ADT_SegmentedVector_AllocateSegment (NW_ADT_SegmentedVector_t* thisObj) -{ - return (NW_Uint8*) NW_Mem_Malloc (thisObj->segmentSize * thisObj->super.elementSize); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_SegmentedVector_t* -NW_ADT_SegmentedVector_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t segmentSize) -{ - return (NW_ADT_SegmentedVector_t*) - NW_Object_New (&NW_ADT_SegmentedVector_Class, (NW_Uint32) elementSize, (NW_Uint32)0, - (NW_Uint32)segmentSize); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/SingleIterator.c --- a/webengine/wmlengine/src/adt/src/SingleIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_singleiteratori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_SingleIterator_Class_t NW_ADT_SingleIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_Iterator_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_SingleIterator_t), - /* construct */ _NW_ADT_SingleIterator_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Iterator */ - /* hasMoreElements */ _NW_ADT_SingleIterator_HasMoreElements, - /* nextElement */ _NW_ADT_SingleIterator_NextElement, - /* getElementSize */ _NW_ADT_SingleIterator_GetElementSize - }, - { /* NW_ADT_SingleIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_SingleIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_SingleIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_ADT_SingleIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_SingleIteratorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->element = va_arg (*argp, void*); - NW_ASSERT (thisObj->element != NULL); - thisObj->elementSize = (NW_Uint16) va_arg (*argp, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_ADT_SingleIterator_HasMoreElements (const NW_ADT_Iterator_t* iterator) -{ - NW_ADT_SingleIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_SingleIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_SingleIteratorOf (iterator); - - /* is the current index not equal to the 'end' index? */ - return thisObj->element != NULL; -} - -/* ------------------------------------------------------------------------- */ -void** -_NW_ADT_SingleIterator_NextElement (NW_ADT_Iterator_t* iterator) -{ - NW_ADT_SingleIterator_t* thisObj; - void** element; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_SingleIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_SingleIteratorOf (iterator); - - /* if there are no more elements to return, we must return NULL */ - if (!NW_ADT_Iterator_HasMoreElements (iterator)) { - return NULL; - } - - /* get the element pointer */ - element = (void**) thisObj->element; - thisObj->element = NULL; - - /* return the element */ - return element; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_ADT_SingleIterator_GetElementSize (NW_ADT_Iterator_t* iterator) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_SingleIterator_Class)); - - /* return the stored element size */ - return NW_ADT_SingleIteratorOf (iterator)->elementSize; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_SingleIterator_t* -NW_ADT_SingleIterator_New (void* element, - NW_Uint16 elementSize) -{ - return (NW_ADT_SingleIterator_t*) - NW_Object_New (&NW_ADT_SingleIterator_Class, element, (NW_Uint32) elementSize); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/TextMap.c --- a/webengine/wmlengine/src/adt/src/TextMap.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_textmapi.h" - -#include "nw_text_ucs2.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_TextMap_Class_t NW_ADT_TextMap_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_TextMap_t), - /* construct */ _NW_ADT_Map_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Map */ - /* lookup */ _NW_ADT_TextMap_Lookup - }, - { /* NW_ADT_TextMap */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -_NW_ADT_TextMap_Lookup (const NW_ADT_Map_t* map, - const void* key) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t start; - NW_Int32 end; - const NW_Ucs2* keyStorage; - NW_Bool keyFreeNeeded; - const NW_Ucs2* entryStorage; - NW_Bool entryFreeNeeded; - - /* parameter assertions */ - NW_ASSERT (map != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (map, &NW_ADT_TextMap_Class)); - - /* initialize the 'freeNeeded' flags */ - keyFreeNeeded = NW_FALSE; - keyStorage = NULL; - entryFreeNeeded = NW_FALSE; - entryStorage = NULL; - - /* look for the entry using a binary search algorithm */ - index = 0; - start = 0; - end = NW_ADT_Vector_GetSize (NW_ADT_VectorOf (map->vector)) - 1; - while (end >= start) { - void* entry; - NW_Text_Length_t keyLength; - NW_Text_Length_t entryLength; - NW_Int32 match; - - /* get the entry from the vector */ - index = (NW_ADT_Vector_Metric_t) ((end + start) / 2); - entry = NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (map->vector), index); - - /* normalize the stored entry and the provided key to Unicode Text objects - before comparing */ - keyStorage = NW_Text_GetUCS2Buffer (key, 0, &keyLength, &keyFreeNeeded); - entryStorage = NW_Text_GetUCS2Buffer (*(NW_Text_t**) entry, 0, &entryLength, - &entryFreeNeeded); - - /* there is no need to compare the strings if the lengths are not equal */ - match = keyLength - entryLength; - if (match == 0) { - match = NW_Mem_memcmp (keyStorage, entryStorage, keyLength * sizeof (NW_Ucs2)); - } - if (!match) { - break; - } else if (match > 0) { - start = (NW_ADT_Vector_Metric_t) (index + 1); - } else if (match < 0) { - end = index - 1; - } - } - - /* free the storage if necessary */ - if (keyFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) keyStorage); - } - if (entryFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) entryStorage); - } - - /* we didn't find the entry we were looking for, but we return the index of - the position at which it would have been had it existed */ - if (start > index) { - return start; - } - return index; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_TextMap_t* -NW_ADT_TextMap_New (NW_Uint32 elementSize, - NW_ADT_DynamicVector_t* dynamicVector) -{ - return (NW_ADT_TextMap_t*) - NW_Object_New (&NW_ADT_TextMap_Class, sizeof (NW_Text_t*), elementSize, - dynamicVector); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/ValueList.c --- a/webengine/wmlengine/src/adt/src/ValueList.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,262 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_valuelisti.h" - -#include "nw_adt_mapiterator.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public/protected global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_ValueList_Class_t NW_ADT_ValueList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_ValueList_t), - /* construct */ _NW_ADT_ValueList_Construct, - /* destruct */ _NW_ADT_ValueList_Destruct - }, - { /* NW_ADT_ValueList */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_ValueList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_ValueList_t* thisObj; - NW_Uint32 keySize; - NW_ADT_Vector_Metric_t capacity; - NW_ADT_Vector_Metric_t increment; - - /* for convenience */ - thisObj = NW_ADT_ValueListOf (dynamicObject); - - /* initialize the object */ - keySize = va_arg (*argp, NW_Uint32); - capacity = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - increment = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - - /* map holds entry objects (not pointers) */ - thisObj->map = - NW_ADT_ResizableMap_New (keySize, sizeof (NW_ADT_ValueList_Entry_t), - capacity, increment); - if (thisObj->map == NULL) { - return KBrsrOutOfMemory; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_ADT_ValueList_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_ADT_ValueList_t* thisObj; - NW_ADT_Iterator_t* iterator; - - /* for convenience */ - thisObj = NW_ADT_ValueListOf (dynamicObject); - - /* first we need to iterate through the map deallocating the properties that - need to be freed */ - iterator = (NW_ADT_Iterator_t*) NW_ADT_MapIterator_New (thisObj->map); - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - void* key; - NW_ADT_ValueList_Entry_t entry; - TBrowserStatusCode status; - - key = NW_ADT_Iterator_NextElement (iterator); - status = NW_ADT_ValueList_Get (thisObj, key, &entry); - NW_ASSERT (status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - - if (entry.freeNeeded) { - if (entry.type == NW_ADT_ValueType_Pointer) { - NW_Mem_Free (entry.value.pointer); - } else if (entry.type & NW_ADT_ValueType_Object) { - if (entry.value.object != NULL) { - NW_Object_Delete (entry.value.object); - entry.value.object = NULL; - } - } - } - } - - /* delete the iterator */ - NW_Object_Delete (iterator); - - /* free the map itself */ - NW_Object_Delete (thisObj->map); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_ValueList_Get (const NW_ADT_ValueList_t* thisObj, - void* key, - NW_ADT_ValueList_Entry_t* entry) -{ - NW_ADT_ValueList_Entry_t* element; - - /* parameter assertion block */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_ValueList_Class)); - - /* fetch a pointer to the value from the map */ - element = (NW_ADT_ValueList_Entry_t*) NW_ADT_Map_GetUnsafe (thisObj->map, key); - if (element == NULL) { - return KBrsrNotFound; - } - - /* use byte-wise copy to get the unaligned data into the client's variable */ - if (entry != NULL) { - (void) NW_Mem_memcpy (entry, element, sizeof *entry); - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_ValueList_Set (NW_ADT_ValueList_t* thisObj, - void* key, - const NW_ADT_ValueList_Entry_t* entry) -{ - NW_ADT_ValueList_Entry_t oldEntry; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_ValueList_Class)); - NW_ASSERT (entry != NULL); - NW_ASSERT (entry->type != 0); - - /* If the entry already exists, delete it */ - status = NW_ADT_ValueList_Get (thisObj, key, &oldEntry); - if (status == KBrsrSuccess) { - if (oldEntry.freeNeeded) { - if (oldEntry.type == NW_ADT_ValueType_Pointer) { - NW_Mem_Free (oldEntry.value.pointer); - oldEntry.value.pointer = NULL; - } else if (oldEntry.type & NW_ADT_ValueType_Object) { - if (oldEntry.value.object != NULL) { - NW_Object_Delete (oldEntry.value.object); - oldEntry.value.object = NULL; - } - } - } - } - - /* set the entry in the map and return the result of the operation */ - return NW_ADT_Map_Set (thisObj->map, key, entry); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_ValueList_Remove (const NW_ADT_ValueList_t* thisObj, - void* key) -{ - NW_ADT_ValueList_Entry_t oldEntry; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_ADT_ValueList_Class)); - - /* If the entry already exists, delete it */ - status = NW_ADT_ValueList_Get (thisObj, key, &oldEntry); - if (status == KBrsrSuccess) { - - if (oldEntry.type == NW_ADT_ValueType_Pointer) { - NW_Mem_Free (oldEntry.value.pointer); - oldEntry.value.pointer = NULL; - } else if ((oldEntry.type & NW_ADT_ValueType_Object) && - oldEntry.freeNeeded) { - if (oldEntry.value.object != NULL) { - NW_Object_Delete (oldEntry.value.object); - oldEntry.value.object = NULL; - } - } - - /* remove the entry */ - return NW_ADT_Map_Remove (thisObj->map, key); - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_ADT_ValueList_Copy (const NW_ADT_ValueList_t* thisObj, - NW_ADT_ValueList_t* dest) -{ - NW_ADT_Iterator_t* iterator; - TBrowserStatusCode status = KBrsrSuccess; - - iterator = (NW_ADT_Iterator_t*) NW_ADT_MapIterator_New (thisObj->map); - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - void* key; - NW_ADT_ValueList_Entry_t entry, newEntry; - - key = NW_ADT_Iterator_NextElement (iterator); - status = NW_ADT_ValueList_Get (thisObj, key, &entry); - NW_ASSERT (status == KBrsrSuccess); - - newEntry = entry; - newEntry.freeNeeded = NW_FALSE; - - status = NW_ADT_ValueList_Set (dest, key, &newEntry); - } - - /* delete the iterator */ - NW_Object_Delete (iterator); - - return status; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_ValueList_t* -NW_ADT_ValueList_New (NW_Uint32 keySize, - NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment) -{ - return (NW_ADT_ValueList_t*) - NW_Object_New (&NW_ADT_ValueList_Class, keySize, (NW_Uint32) capacity, (NW_Uint32)increment); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/Vector.c --- a/webengine/wmlengine/src/adt/src/Vector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_vectori.h" - -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_ADT_Vector_Class_t NW_ADT_Vector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_Vector_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_ADT_Vector */ - /* getElementSize */ NULL, - /* getSize */ NULL, - /* addressAt */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void** -_NW_ADT_Vector_ElementAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index) -{ - if (index >= NW_ADT_Vector_GetSize (vector)) { - return NULL; - } - return (void**) NW_ADT_Vector_AddressAt (vector, index); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_Vector_GetElementAt (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t index, - void* element) -{ - void* location; - - location = NW_ADT_Vector_ElementAt (vector, index); - if (location == NULL) { - return KBrsrNotFound; - } - (void) NW_Mem_memcpy (element, location, - NW_ADT_Vector_GetElementSize (vector)); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -_NW_ADT_Vector_GetElementIndex (const NW_ADT_Vector_t* vector, - void* target) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t elementSize; - NW_ADT_Vector_Metric_t numElements; - - /* cache the elementSize for efficiency */ - elementSize = NW_ADT_Vector_GetElementSize (vector); - - /* iterate throught the vector one by one */ - numElements = NW_ADT_Vector_GetSize (vector); - for (index = 0; index < numElements; index++) { - void* element; - - /* get and compare the element */ - element = NW_ADT_Vector_ElementAt (vector, index); - if (NW_Mem_memcmp (target, element, elementSize) == 0) { - return index; - } - } - - /* no match found, return NW_ADT_Vector_AtEnd */ - return NW_ADT_Vector_AtEnd; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/adt/src/VectorIterator.c --- a/webengine/wmlengine/src/adt/src/VectorIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_adt_vectoriteratori.h" - -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_ADT_VectorIterator_Class_t NW_ADT_VectorIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_Iterator_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_ADT_VectorIterator_t), - /* construct */ _NW_ADT_VectorIterator_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Iterator */ - /* hasMoreElements */ _NW_ADT_VectorIterator_HasMoreElements, - /* nextElement */ _NW_ADT_VectorIterator_NextElement, - /* getElementSize */ _NW_ADT_VectorIterator_GetElementSize - }, - { /* NW_ADT_VectorIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_ADT_VectorIterator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_ADT_VectorIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_ADT_VectorIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_VectorIteratorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->vector = va_arg (*argp, const NW_ADT_Vector_t*); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->vector, &NW_ADT_Vector_Class)); - - thisObj->index = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - if (thisObj->index == NW_ADT_Vector_AtEnd) { - thisObj->index = NW_ADT_Vector_GetSize (thisObj->vector); - } - NW_ASSERT (thisObj->index <= NW_ADT_Vector_GetSize (thisObj->vector)); - - thisObj->end = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - if (thisObj->end == NW_ADT_Vector_AtEnd) { - thisObj->end = NW_ADT_Vector_GetSize (thisObj->vector); - } - NW_ASSERT (thisObj->end <= NW_ADT_Vector_GetSize (thisObj->vector)); - - thisObj->direction = va_arg (*argp, NW_ADT_IteratorDirection_t); - NW_ASSERT ( (thisObj->direction == NW_ADT_IteratorDirection_Increment && - thisObj->index <= thisObj->end) || - (thisObj->direction == NW_ADT_IteratorDirection_Decrement && - thisObj->index >= thisObj->end) ); - - /* - ** TODO Warning! NW_ADT_IteratorDirection_Decrement doesn't work. There are - ** are bugs in the edge cases for Vector and NW_ADT_VectorIterator_HasMoreElements - ** do not work correctly when iterating backwards. - */ - NW_ASSERT (thisObj->direction != NW_ADT_IteratorDirection_Decrement); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_ADT_VectorIterator_HasMoreElements (const NW_ADT_Iterator_t* iterator) -{ - NW_ADT_VectorIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_VectorIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_VectorIteratorOf (iterator); - - /* is the current index not equal to the 'end' index? */ - return thisObj->index != thisObj->end; -} - -/* ------------------------------------------------------------------------- */ -void** -_NW_ADT_VectorIterator_NextElement (NW_ADT_Iterator_t* iterator) -{ - NW_ADT_VectorIterator_t* thisObj; - void** element; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_VectorIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_VectorIteratorOf (iterator); - - /* if there are no more elements to return, we must return NULL */ - if (!NW_ADT_Iterator_HasMoreElements (iterator)) { - return NULL; - } - - /* get the element pointer */ - element = NW_ADT_Vector_ElementAt (thisObj->vector, thisObj->index); - - /* advance the index by the direction delta */ - thisObj->index = (NW_ADT_Vector_Metric_t) (thisObj->index + thisObj->direction); - - /* return the element */ - return element; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_ADT_VectorIterator_GetElementSize (NW_ADT_Iterator_t* iterator) -{ - NW_ADT_VectorIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_ADT_VectorIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_VectorIteratorOf (iterator); - - return NW_ADT_Vector_GetElementSize (thisObj->vector); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_ADT_VectorIterator_t* -_NW_ADT_VectorIterator_Initialize (NW_ADT_VectorIterator_t* vectorIterator, - const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t start, - NW_ADT_Vector_Metric_t end, - NW_ADT_IteratorDirection_t direction) -{ - return (NW_ADT_VectorIterator_t*) - NW_Object_Initialize (&NW_ADT_VectorIterator_Class, vectorIterator, - vector, start, end, direction); -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_VectorIterator_t* -_NW_ADT_VectorIterator_New (const NW_ADT_Vector_t* vector, - NW_ADT_Vector_Metric_t start, - NW_ADT_Vector_Metric_t end, - NW_ADT_IteratorDirection_t direction) -{ - return (NW_ADT_VectorIterator_t*) - NW_Object_New (&NW_ADT_VectorIterator_Class, vector, (NW_Uint32)start, (NW_Uint32)end, - direction); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/include/nw_browser_browserimages.h --- a/webengine/wmlengine/src/browser/include/nw_browser_browserimages.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef __NW_BROWSER_BROWSERIMAGES_H -#define __NW_BROWSER_BROWSERIMAGES_H - -#include <bldvariant.hrh> -#include <data_caging_path_literals.hrh> - -_LIT( KBrowserBitmapsName,"browserbitmaps.mbm" ); - - -const TUint qgn_prop_wml_square = 0; -const TUint qgn_prop_wml_disc = 1; -const TUint qgn_prop_wml_circle = 2; -const TUint qgn_prop_wml_image_not_shown = 3; -const TUint qgn_prop_wml_selectarrow = 4; -const TUint qgn_prop_wml_object = 5; -const TUint qgn_prop_wml_radiobutt_off = 6; -const TUint qgn_prop_wml_radiobutt_on = 7; -const TUint qgn_prop_wml_radiobutt_on_sel = 8; -const TUint qgn_prop_wml_radiobutt_off_sel = 9; -const TUint qgn_prop_wml_checkbox_off = 10; -const TUint qgn_prop_wml_checkbox_on = 11; -const TUint qgn_prop_wml_checkbox_on_sel = 12; -const TUint qgn_prop_wml_checkbox_off_sel = 13; -const TUint qgn_prop_wml_selectfile = 14; -const TUint qgn_prop_wml_image_map = 15; -// Masks -const TUint qgn_prop_wml_square_mask = 16; -const TUint qgn_prop_wml_disc_mask = 17; -const TUint qgn_prop_wml_circle_mask = 18; -const TUint qgn_prop_wml_image_not_shown_mask = 19; -const TUint qgn_prop_wml_selectarrow_mask = 20; -const TUint qgn_prop_wml_object_mask = 21; -const TUint qgn_prop_wml_radiobutt_off_mask = 22; -const TUint qgn_prop_wml_radiobutt_on_mask = 23; -const TUint qgn_prop_wml_radiobutt_on_sel_mask = 24; -const TUint qgn_prop_wml_radiobutt_off_sel_mask = 25; -const TUint qgn_prop_wml_checkbox_off_mask = 26; -const TUint qgn_prop_wml_checkbox_on_mask = 27; -const TUint qgn_prop_wml_checkbox_on_sel_mask = 28; -const TUint qgn_prop_wml_checkbox_off_sel_mask = 29; -const TUint qgn_prop_wml_selectfile_mask = 30; -const TUint qgn_prop_wml_image_map_mask = 31; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/include/nw_browser_browsermimetable.h --- a/webengine/wmlengine/src/browser/include/nw_browser_browsermimetable.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BROWSER_BROWSERMIMETABLE_H -#define NW_BROWSER_BROWSERMIMETABLE_H - -#include "nw_hed_mimetable.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Browser_MimeTable_Class_s NW_Browser_MimeTable_Class_t; -typedef struct NW_Browser_MimeTable_s NW_Browser_MimeTable_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Browser_MimeTable_ClassPart_s { - void** unused; -} NW_Browser_MimeTable_ClassPart_t; - -struct NW_Browser_MimeTable_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_HED_MimeTable_ClassPart_t NW_HED_MimeTable; - NW_Browser_MimeTable_ClassPart_t NW_Browser_MimeTable; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Browser_MimeTable_s { - NW_HED_MimeTable_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Browser_MimeTable_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Browser_MimeTable)) - -#define NW_Browser_MimeTableOf(_object) \ - (NW_Object_Cast (_object, NW_Browser_MimeTable)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Browser_MimeTable_Class_t NW_Browser_MimeTable_Class; -extern const NW_Browser_MimeTable_t NW_Browser_MimeTable; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BROWSER_BROWSERMIMETABLEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/include/nw_browser_browsermimetablei.h --- a/webengine/wmlengine/src/browser/include/nw_browser_browsermimetablei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef NW_BROWSER_BROWSERMIMETABLEI_H -#define NW_BROWSER_BROWSERMIMETABLEI_H - -#include "nw_hed_mimetablei.h" -#include "nw_browser_browsermimetable.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BROWSER_BROWSERMIMETABLE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/include/nw_browser_loadmgr.h --- a/webengine/wmlengine/src/browser/include/nw_browser_loadmgr.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BROWSER_LOADMGR_H -#define NW_BROWSER_LOADMGR_H - -#include <ooc.h> -#include "nw_object_dynamic.h" -#include "nw_mvc_iloadlistener.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -typedef struct NW_Browser_LoadMgr_Class_s NW_Browser_LoadMgr_Class_t; -typedef struct NW_Browser_LoadMgr_s NW_Browser_LoadMgr_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_Browser_LoadMgr_ClassPart_s { - void** unused; -} NW_Browser_LoadMgr_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_Browser_LoadMgr_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Browser_LoadMgr_ClassPart_t NW_Browser_LoadMgr; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_Browser_LoadMgr_s { - NW_Object_Dynamic_t super; - - /* interfaces */ - NW_MVC_ILoadListener_t NW_MVC_ILoadListener; - - /* member variables */ - objectData* isaObject; - void* context; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_Browser_LoadMgr_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Browser_LoadMgr)) - -#define NW_Browser_LoadMgrOf(_object) \ - (NW_Object_Cast (_object, NW_Browser_LoadMgr)) - -/* ------------------------------------------------------------------------- */ -extern const NW_Browser_LoadMgr_Class_t NW_Browser_LoadMgr_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -extern -NW_Browser_LoadMgr_t* -NW_Browser_LoadMgr_New (const objectData* isaObject, void* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BROWSER_LOADMGR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/include/nw_browser_loadmgri.h --- a/webengine/wmlengine/src/browser/include/nw_browser_loadmgri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BROWSER_LOADMGRI_H -#define NW_BROWSER_LOADMGRI_H - -#include "nw_object_dynamici.h" -#include "nw_mvc_iloadlisteneri.h" -#include "nw_object_interface.h" -#include "nw_browser_loadmgr.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -extern const NW_Object_Class_t* const _NW_Browser_LoadMgr_SecondaryList[]; -extern const NW_MVC_ILoadListener_Class_t NW_Browser_LoadMgr_ILoadListener_Class; - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_Browser_LoadMgr_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -extern -void -_NW_Browser_LoadMgr_ILoadListener_LoadComplete (NW_MVC_ILoadListener_t* loadListener, - NW_Bool success); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BROWSER_LOADMGRI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/src/BROWSEREpoc32MimeTable.cpp --- a/webengine/wmlengine/src/browser/src/BROWSEREpoc32MimeTable.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_browser_browsermimetablei.h" - -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_xhtml_epoc32contenthandler.h" -#include <nw_wml_core.h> /* needed for the wml content handler */ -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "nw_wml1x_epoc32contenthandler.h" -#include "nwx_http_defs.h" - -#ifdef __TEST_TESTHARNESS_ENABLED -#include "nw_bth_testharnesscontenthandler.h" -#endif - -/* ------------------------------------------------------------------------- */ -static -const NW_HED_MimeTable_Entry_t _NW_Browser_MimeTable_Array[] = { - { HTTP_image_vnd_wap_wbmp_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_image_gif_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_image_jpeg_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_image_tiff_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_image_png_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_image_bmp_string, - (NW_HED_ContentHandler_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, NW_FALSE }, - { HTTP_application_wml_xml_string, /* WML 2.0 */ - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_application_vnd_wap_wml_plus_xml_string, - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_application_xhtml_xml_string, /* XHTML */ - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - /* TODO: remove when xhtml is no longer handled via server wbxml encoding */ - { HTTP_application_vnd_wap_xhtml_xml_string, /* XHTML - MP*/ - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_application_vnd_wap_wbxml_string, - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - /* TODO: remove text_html when content delivered as above types */ - { HTTP_text_html_string, - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_text_vnd_wap_wml_string, - (NW_HED_ContentHandler_Class_t*) &NW_Wml1x_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_application_vnd_wap_wmlc_string, - (NW_HED_ContentHandler_Class_t*) &NW_Wml1x_Epoc32ContentHandler_Class, NW_TRUE }, -/*//R - { HTTP_application_x_javascript_string, - (NW_HED_ContentHandler_Class_t*) &NW_Ecma_ContentHandler_Class, NW_FALSE }, - { HTTP_text_javascript_string, - (NW_HED_ContentHandler_Class_t*) &NW_Ecma_ContentHandler_Class, NW_FALSE }, - { HTTP_text_ecmascript_string, - (NW_HED_ContentHandler_Class_t*) &NW_Ecma_ContentHandler_Class, NW_FALSE }, -*/ - { HTTP_application_xhtml_xml_saved_string, - (NW_HED_ContentHandler_Class_t*) &NW_XHTML_Epoc32ContentHandler_Class, NW_TRUE }, - { HTTP_application_wmlc_saved_string, - (NW_HED_ContentHandler_Class_t*) &NW_Wml1x_Epoc32ContentHandler_Class, NW_TRUE }, -#ifdef __TEST_TESTHARNESS_ENABLED - { HTTP_text_plain_string, - (NW_HED_ContentHandler_Class_t*) &NW_BTH_TestHarness_ContentHandler_Class, NW_TRUE }, - { HTTP_application_x_nokia_test_harness_string, - (NW_HED_ContentHandler_Class_t*) &NW_BTH_TestHarness_ContentHandler_Class, NW_TRUE }, -#endif - { HTTP_application_vnd_wap_wmlscriptc_string, - (NW_HED_ContentHandler_Class_t*) &NW_WmlScript_ContentHandler_Class, NW_TRUE }, -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Browser_MimeTable_Class_t NW_Browser_MimeTable_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_HED_MimeTable_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_HED_MimeTable */ - /* numEntries */ sizeof (_NW_Browser_MimeTable_Array) - / sizeof (_NW_Browser_MimeTable_Array[0]), - /* entries */ &_NW_Browser_MimeTable_Array[0], - /* createContentHandler */ _NW_HED_MimeTable_CreateContentHandler - }, - { /* NW_Browser_MimeTable */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Browser_MimeTable_t NW_Browser_MimeTable = { - { { &NW_Browser_MimeTable_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/src/wml_1_3_dict.c --- a/webengine/wmlengine/src/browser/src/wml_1_3_dict.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,641 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Wed Apr 24 14:59:12 2002 -** (coordinated universal time) -** -** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h -*/ -/* -** This file is generated by the dictionary creator and includes some hand-edits. -** If you need any help to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli. -*/ - -/* - * Dictionary = Wml_1_3 - * Public id = 0x0A - * Doc Type = -//WAPFORUM//DTD WML 1.3//EN - */ - -#include "nwx_defs.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" - - -static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_td[] = {'t','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_tr[] = {'t','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_table[] = {'t','a','b','l','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_p[] = {'p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_postfield[] = {'p','o','s','t','f','i','e','l','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_anchor[] = {'a','n','c','h','o','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_access[] = {'a','c','c','e','s','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_b[] = {'b','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_big[] = {'b','i','g','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_br[] = {'b','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_card[] = {'c','a','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_do[] = {'d','o','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_em[] = {'e','m','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_fieldset[] = {'f','i','e','l','d','s','e','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_go[] = {'g','o','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_head[] = {'h','e','a','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_i[] = {'i','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_img[] = {'i','m','g','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_input[] = {'i','n','p','u','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_meta[] = {'m','e','t','a','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_noop[] = {'n','o','o','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_prev[] = {'p','r','e','v','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_onevent[] = {'o','n','e','v','e','n','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_optgroup[] = {'o','p','t','g','r','o','u','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_option[] = {'o','p','t','i','o','n','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_refresh[] = {'r','e','f','r','e','s','h','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_select[] = {'s','e','l','e','c','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_small[] = {'s','m','a','l','l','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_strong[] = {'s','t','r','o','n','g','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_template[] = {'t','e','m','p','l','a','t','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_timer[] = {'t','i','m','e','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_u[] = {'u','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_setvar[] = {'s','e','t','v','a','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_ElementTag_wml[] = {'w','m','l','\0'}; - -/* - * tag entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_0[36] = { - {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_pre}, - {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_a}, - {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_td}, - {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_tr}, - {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_table}, - {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_p}, - {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_postfield}, - {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_anchor}, - {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_access}, - {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_b}, - {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_big}, - {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_br}, - {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_card}, - {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_do}, - {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_em}, - {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_fieldset}, - {0x2b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_go}, - {0x2c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_head}, - {0x2d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_i}, - {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_img}, - {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_input}, - {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_meta}, - {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_noop}, - {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_prev}, - {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_onevent}, - {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_optgroup}, - {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_option}, - {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_refresh}, - {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_select}, - {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_small}, - {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_strong}, - {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_template}, - {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_timer}, - {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_u}, - {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_setvar}, - {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_wml} -}; - -/* - * tag entries - sorted by name - */ -static const -NW_Uint8 NW_Wml_1_3_tag_name_0[36] = { - 1, - 8, - 7, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 24, - 25, - 26, - 5, - 6, - 0, - 23, - 27, - 28, - 34, - 29, - 30, - 4, - 2, - 31, - 32, - 3, - 33, - 35, -}; - -static const NW_Ucs2 NW_Wml_1_3_ElementTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'}; - -/* - * tag entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t NW_Wml_1_3_tag_token_1[1] = { - {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_ElementTag_zzzunknown} -}; - -/* - * tag entries - sorted by name - */ -static const -NW_Uint8 NW_Wml_1_3_tag_name_1[1] = { - 0, -}; - -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept_charset[] = {'a','c','c','e','p','t','-','c','h','a','r','s','e','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_bottom[] = {'a','l','i','g','n','=','b','o','t','t','o','m','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_center[] = {'a','l','i','g','n','=','c','e','n','t','e','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_left[] = {'a','l','i','g','n','=','l','e','f','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_middle[] = {'a','l','i','g','n','=','m','i','d','d','l','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_right[] = {'a','l','i','g','n','=','r','i','g','h','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align_top[] = {'a','l','i','g','n','=','t','o','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_alt[] = {'a','l','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content[] = {'c','o','n','t','e','n','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_domain[] = {'d','o','m','a','i','n','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_false[] = {'e','m','p','t','y','o','k','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok_true[] = {'e','m','p','t','y','o','k','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_format[] = {'f','o','r','m','a','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_height[] = {'h','e','i','g','h','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_hspace[] = {'h','s','p','a','c','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ivalue[] = {'i','v','a','l','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_iname[] = {'i','n','a','m','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_label[] = {'l','a','b','e','l','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_localsrc[] = {'l','o','c','a','l','s','r','c','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_maxlength[] = {'m','a','x','l','e','n','g','t','h','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_get[] = {'m','e','t','h','o','d','=','g','e','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method_post[] = {'m','e','t','h','o','d','=','p','o','s','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_nowrap[] = {'m','o','d','e','=','n','o','w','r','a','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode_wrap[] = {'m','o','d','e','=','w','r','a','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_false[] = {'m','u','l','t','i','p','l','e','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple_true[] = {'m','u','l','t','i','p','l','e','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_name[] = {'n','a','m','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_false[] = {'n','e','w','c','o','n','t','e','x','t','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext_true[] = {'n','e','w','c','o','n','t','e','x','t','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onpick[] = {'o','n','p','i','c','k','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterbackward[] = {'o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_onenterforward[] = {'o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ontimer[] = {'o','n','t','i','m','e','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_false[] = {'o','p','t','i','o','n','a','l','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional_true[] = {'o','p','t','i','o','n','a','l','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_path[] = {'p','a','t','h','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_scheme[] = {'s','c','h','e','m','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_false[] = {'s','e','n','d','r','e','f','e','r','e','r','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer_true[] = {'s','e','n','d','r','e','f','e','r','e','r','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_size[] = {'s','i','z','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src[] = {'s','r','c','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_true[] = {'o','r','d','e','r','e','d','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered_false[] = {'o','r','d','e','r','e','d','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_tabindex[] = {'t','a','b','i','n','d','e','x','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_title[] = {'t','i','t','l','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type[] = {'t','y','p','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_accept[] = {'t','y','p','e','=','a','c','c','e','p','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_delete[] = {'t','y','p','e','=','d','e','l','e','t','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_help[] = {'t','y','p','e','=','h','e','l','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_password[] = {'t','y','p','e','=','p','a','s','s','w','o','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onpick[] = {'t','y','p','e','=','o','n','p','i','c','k','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterbackward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','b','a','c','k','w','a','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_onenterforward[] = {'t','y','p','e','=','o','n','e','n','t','e','r','f','o','r','w','a','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_ontimer[] = {'t','y','p','e','=','o','n','t','i','m','e','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_options[] = {'t','y','p','e','=','o','p','t','i','o','n','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_prev[] = {'t','y','p','e','=','p','r','e','v','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_reset[] = {'t','y','p','e','=','r','e','s','e','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_text[] = {'t','y','p','e','=','t','e','x','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_type_vnd_[] = {'t','y','p','e','=','v','n','d','.','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href[] = {'h','r','e','f','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_http___[] = {'h','r','e','f','=','h','t','t','p',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_href_https___[] = {'h','r','e','f','=','h','t','t','p','s',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_value[] = {'v','a','l','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_vspace[] = {'v','s','p','a','c','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_width[] = {'w','i','d','t','h','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_lang[] = {'x','m','l',':','l','a','n','g','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_align[] = {'a','l','i','g','n','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_columns[] = {'c','o','l','u','m','n','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_class[] = {'c','l','a','s','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_id[] = {'i','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_false[] = {'f','o','r','u','a','=','f','a','l','s','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua_true[] = {'f','o','r','u','a','=','t','r','u','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_http___[] = {'s','r','c','=','h','t','t','p',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_src_https___[] = {'s','r','c','=','h','t','t','p','s',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv[] = {'h','t','t','p','-','e','q','u','i','v','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Content_Type[] = {'h','t','t','p','-','e','q','u','i','v','=','C','o','n','t','e','n','t','-','T','y','p','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_[] = {'c','o','n','t','e','n','t','=','a','p','p','l','i','c','a','t','i','o','n','/','v','n','d','.','w','a','p','.','w','m','l','c',';','c','h','a','r','s','e','t','=','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http_equiv_Expires[] = {'h','t','t','p','-','e','q','u','i','v','=','E','x','p','i','r','e','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accesskey[] = {'a','c','c','e','s','s','k','e','y','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype[] = {'e','n','c','t','y','p','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded[] = {'e','n','c','t','y','p','e','=','a','p','p','l','i','c','a','t','i','o','n','/','x','-','w','w','w','-','f','o','r','m','-','u','r','l','e','n','c','o','d','e','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_enctype_multipart_form_data[] = {'e','n','c','t','y','p','e','=','m','u','l','t','i','p','a','r','t','/','f','o','r','m','-','d','a','t','a','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_preserve[] = {'x','m','l',':','s','p','a','c','e','=','p','r','e','s','e','r','v','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space_default[] = {'x','m','l',':','s','p','a','c','e','=','d','e','f','a','u','l','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control_no_cache[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','=','n','o','-','c','a','c','h','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_cache_control[] = {'c','a','c','h','e','-','c','o','n','t','r','o','l','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_emptyok[] = {'e','m','p','t','y','o','k','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_forua[] = {'f','o','r','u','a','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_method[] = {'m','e','t','h','o','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_mode[] = {'m','o','d','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_multiple[] = {'m','u','l','t','i','p','l','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_optional[] = {'o','p','t','i','o','n','a','l','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_newcontext[] = {'n','e','w','c','o','n','t','e','x','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_ordered[] = {'o','r','d','e','r','e','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_sendreferer[] = {'s','e','n','d','r','e','f','e','r','e','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_xml_space[] = {'x','m','l',':','s','p','a','c','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag__com_[] = {'.','c','o','m','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag__edu_[] = {'.','e','d','u','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag__net_[] = {'.','n','e','t','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag__org_[] = {'.','o','r','g','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_accept[] = {'a','c','c','e','p','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_bottom[] = {'b','o','t','t','o','m','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_clear[] = {'c','l','e','a','r','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_delete[] = {'d','e','l','e','t','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_help[] = {'h','e','l','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___[] = {'h','t','t','p',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_http___www_[] = {'h','t','t','p',':','/','/','w','w','w','.','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___[] = {'h','t','t','p','s',':','/','/','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_https___www_[] = {'h','t','t','p','s',':','/','/','w','w','w','.','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_middle[] = {'m','i','d','d','l','e','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_nowrap[] = {'n','o','w','r','a','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_options[] = {'o','p','t','i','o','n','s','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_password[] = {'p','a','s','s','w','o','r','d','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_reset[] = {'r','e','s','e','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_text[] = {'t','e','x','t','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_top[] = {'t','o','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_unknown[] = {'u','n','k','n','o','w','n','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_wrap[] = {'w','r','a','p','\0'}; -static const NW_Ucs2 NW_Wml_1_3_AttributeTag_www_[] = {'w','w','w','.','\0'}; -/* -** The following 4 definisions are to handle duplicated tag names. -** This duplication is due to having the same "tag name" for attribute name and value. -*/ - -#define NW_Wml_1_3_AttributeValueTag_onpick NW_Wml_1_3_AttributeTag_onpick -#define NW_Wml_1_3_AttributeValueTag_onenterbackward NW_Wml_1_3_AttributeTag_onenterbackward -#define NW_Wml_1_3_AttributeValueTag_onenterforward NW_Wml_1_3_AttributeTag_onenterforward -#define NW_Wml_1_3_AttributeValueTag_ontimer NW_Wml_1_3_AttributeTag_ontimer - -/* - * attribute entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t NW_Wml_1_3_attribute_token_0[124] = { - {0x05, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept_charset}, - {0x06, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_bottom}, - {0x07, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_center}, - {0x08, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_left}, - {0x09, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_middle}, - {0x0a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_right}, - {0x0b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align_top}, - {0x0c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_alt}, - {0x0d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content}, - {0x0f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_domain}, - {0x10, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_false}, - {0x11, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok_true}, - {0x12, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_format}, - {0x13, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_height}, - {0x14, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_hspace}, - {0x15, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ivalue}, - {0x16, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_iname}, - {0x18, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_label}, - {0x19, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_localsrc}, - {0x1a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_maxlength}, - {0x1b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_get}, - {0x1c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method_post}, - {0x1d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_nowrap}, - {0x1e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode_wrap}, - {0x1f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_false}, - {0x20, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple_true}, - {0x21, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_name}, - {0x22, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_false}, - {0x23, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext_true}, - {0x24, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onpick}, - {0x25, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterbackward}, - {0x26, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_onenterforward}, - {0x27, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ontimer}, - {0x28, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_false}, - {0x29, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional_true}, - {0x2a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_path}, - {0x2e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_scheme}, - {0x2f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_false}, - {0x30, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer_true}, - {0x31, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_size}, - {0x32, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src}, - {0x33, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_true}, - {0x34, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered_false}, - {0x35, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_tabindex}, - {0x36, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_title}, - {0x37, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type}, - {0x38, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_accept}, - {0x39, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_delete}, - {0x3a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_help}, - {0x3b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_password}, - {0x3c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onpick}, - {0x3d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterbackward}, - {0x3e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_onenterforward}, - {0x3f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_ontimer}, - {0x40, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_zzzunknown}, - {0x45, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_options}, - {0x46, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_prev}, - {0x47, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_reset}, - {0x48, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_text}, - {0x49, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_type_vnd_}, - {0x4a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href}, - {0x4b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_http___}, - {0x4c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_href_https___}, - {0x4d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_value}, - {0x4e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_vspace}, - {0x4f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_width}, - {0x50, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_lang}, - {0x52, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_align}, - {0x53, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_columns}, - {0x54, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_class}, - {0x55, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_id}, - {0x56, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_false}, - {0x57, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua_true}, - {0x58, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_http___}, - {0x59, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_src_https___}, - {0x5a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv}, - {0x5b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Content_Type}, - {0x5c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_content_application_vnd_wap_wmlc_charset_}, - {0x5d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http_equiv_Expires}, - {0x5e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accesskey}, - {0x5f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype}, - {0x60, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_application_x_www_form_urlencoded}, - {0x61, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_enctype_multipart_form_data}, - {0x62, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_preserve}, - {0x63, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space_default}, - {0x64, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control_no_cache}, - {0x65, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_cache_control}, - {0x66, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_emptyok}, - {0x67, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_forua}, - {0x68, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_method}, - {0x69, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_mode}, - {0x6a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_multiple}, - {0x6b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_optional}, - {0x6c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_newcontext}, - {0x6d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_ordered}, - {0x6e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_sendreferer}, - {0x6f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_xml_space}, - {0x85, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__com_}, - {0x86, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__edu_}, - {0x87, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__net_}, - {0x88, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag__org_}, - {0x89, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_accept}, - {0x8a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_bottom}, - {0x8b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_clear}, - {0x8c, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_delete}, - {0x8d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_help}, - {0x8e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___}, - {0x8f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_http___www_}, - {0x90, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___}, - {0x91, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_https___www_}, - {0x93, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_middle}, - {0x94, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_nowrap}, - {0x95, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onpick}, - {0x96, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterbackward}, - {0x97, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_onenterforward}, - {0x98, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeValueTag_ontimer}, - {0x99, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_options}, - {0x9a, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_password}, - {0x9b, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_reset}, - {0x9d, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_text}, - {0x9e, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_top}, - {0x9f, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_unknown}, - {0xa0, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_wrap}, - {0xa1, (NW_String_UCS2Buff_t *) NW_Wml_1_3_AttributeTag_www_} -}; - -/* - * attribute entries - sorted by name - */ -static const -NW_Uint8 NW_Wml_1_3_attribute_name_0[124] = { - 97, - 98, - 99, - 100, - 101, - 0, - 79, - 67, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 102, - 86, - 85, - 69, - 103, - 68, - 8, - 77, - 104, - 9, - 87, - 10, - 11, - 80, - 81, - 82, - 12, - 88, - 71, - 72, - 13, - 105, - 60, - 61, - 62, - 14, - 75, - 76, - 78, - 106, - 107, - 108, - 109, - 70, - 16, - 15, - 17, - 18, - 19, - 89, - 20, - 21, - 110, - 90, - 22, - 23, - 91, - 24, - 25, - 26, - 93, - 27, - 28, - 111, - 30, - 113, - 31, - 114, - 29, - 112, - 32, - 115, - 92, - 33, - 34, - 116, - 94, - 42, - 41, - 117, - 35, - 118, - 36, - 95, - 37, - 38, - 39, - 40, - 73, - 74, - 43, - 119, - 44, - 120, - 45, - 46, - 47, - 48, - 51, - 52, - 50, - 53, - 55, - 49, - 56, - 57, - 58, - 59, - 121, - 63, - 64, - 65, - 122, - 123, - 66, - 96, - 84, - 83, - 54, -}; -/* - * Tag codepage table - */ -static const -NW_WBXML_Codepage_t NW_Wml_1_3_tag_codepages[2] = { - {36, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_0[0], (NW_Byte *)&NW_Wml_1_3_tag_name_0[0]}, - {1, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_tag_token_1[0], (NW_Byte *)&NW_Wml_1_3_tag_name_1[0]}, -}; - -/* - * Attribute codepage table - */ -static const -NW_WBXML_Codepage_t NW_Wml_1_3_attribute_codepages[1] = { - {124, (NW_WBXML_DictEntry_t*)&NW_Wml_1_3_attribute_token_0[0], (NW_Byte *)&NW_Wml_1_3_attribute_name_0[0]}, -}; - -static const NW_Ucs2 NW_Wml_1_0_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','0','/','/','E','N','\0'}; -static const NW_Ucs2 NW_Wml_1_1_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','1','/','/','E','N','\0'}; -static const NW_Ucs2 NW_Wml_1_2_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','2','/','/','E','N','\0'}; -static const NW_Ucs2 NW_Wml_1_3_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','1','.','3','/','/','E','N','\0'}; - -/* - * Dictionaries - */ -const NW_WBXML_Dictionary_t NW_Wml_1_0_WBXMLDictionary = { - NW_Wml_1_0_PublicId, - (NW_Ucs2 *)NW_Wml_1_0_docType, - 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0], - 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0], -}; - -const NW_WBXML_Dictionary_t NW_Wml_1_1_WBXMLDictionary = { - NW_Wml_1_1_PublicId, - (NW_Ucs2 *)NW_Wml_1_1_docType, - 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0], - 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0], -}; - -const NW_WBXML_Dictionary_t NW_Wml_1_2_WBXMLDictionary = { - NW_Wml_1_2_PublicId, - (NW_Ucs2 *)NW_Wml_1_2_docType, - 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0], - 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0], -}; - -const NW_WBXML_Dictionary_t NW_Wml_1_3_WBXMLDictionary = { - NW_Wml_1_3_PublicId, - (NW_Ucs2 *)NW_Wml_1_3_docType, - 2, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_tag_codepages[0], - 1, (NW_WBXML_Codepage_t*)&NW_Wml_1_3_attribute_codepages[0], -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Wed Apr 24 14:59:12 2002 -** (coordinated universal time) -** -** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/browser/src/xhtml_1_0_dict.c --- a/webengine/wmlengine/src/browser/src/xhtml_1_0_dict.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1000 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * Dictionary = XHTML_1_0 - * Public id = 4 - * Doc Type = -//WAPFORUM//DTD WML 2.0//EN - */ -#include "nwx_defs.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_wbxml_dictionary.h" - - -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_body[] = {'b','o','d','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_head[] = {'h','e','a','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_html[] = {'h','t','m','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_title[] = {'t','i','t','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_frameset[] = {'f','r','a','m','e','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_noframes[] = {'n','o','f','r','a','m','e','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_noembed[] = {'n','o','e','m','b','e','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_script[] = {'s','c','r','i','p','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_noscript[] = {'n','o','s','c','r','i','p','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_caption[] = {'c','a','p','t','i','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_table[] = {'t','a','b','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_td[] = {'t','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_th[] = {'t','h','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tr[] = {'t','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tbody[] = {'t','b','o','d','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_thead[] = {'t','h','e','a','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tfoot[] = {'t','f','o','o','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_form[] = {'f','o','r','m','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_input[] = {'i','n','p','u','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_label[] = {'l','a','b','e','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_select[] = {'s','e','l','e','c','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_option[] = {'o','p','t','i','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_optgroup[] = {'o','p','t','g','r','o','u','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_button[] = {'b','u','t','t','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_textarea[] = {'t','e','x','t','a','r','e','a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_frame[] = {'f','r','a','m','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_style[] = {'s','t','y','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_object[] = {'o','b','j','e','c','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_embed[] = {'e','m','b','e','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_meta[] = {'m','e','t','a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_link[] = {'l','i','n','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_img[] = {'i','m','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_map[] = {'m','a','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_area[] = {'a','r','e','a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_a[] = {'a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_base[] = {'b','a','s','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_div[] = {'d','i','v','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_font[] = {'f','o','n','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h1[] = {'h','1','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h2[] = {'h','2','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h3[] = {'h','3','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h4[] = {'h','4','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h5[] = {'h','5','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_hr[] = {'h','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_b[] = {'b','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_big[] = {'b','i','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_i[] = {'i','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_menu[] = {'m','e','n','u','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_span[] = {'s','p','a','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_p[] = {'p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_center[] = {'c','e','n','t','e','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dl[] = {'d','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dt[] = {'d','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dd[] = {'d','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_ul[] = {'u','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_ol[] = {'o','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_li[] = {'l','i','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_br[] = {'b','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_nobr[] = {'n','o','b','r','\0'}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * tag entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t XHTML_1_0_tag_token_0[59] = { - {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_body}, - {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_head}, - {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_html}, - {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_title}, - {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_frameset}, - {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_noframes}, - {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_noembed}, - {0x0c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_script}, - {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_noscript}, - {0x0e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_caption}, - {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_table}, - {0x10, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_td}, - {0x11, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_th}, - {0x12, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tr}, - {0x13, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tbody}, - {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_thead}, - {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tfoot}, - {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_form}, - {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_input}, - {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_label}, - {0x19, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_select}, - {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_option}, - {0x1b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_optgroup}, - {0x1c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_button}, - {0x1d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_textarea}, - {0x1e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_frame}, - {0x1f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_style}, - {0x20, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_object}, - {0x21, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_embed}, - {0x22, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_meta}, - {0x23, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_link}, - {0x24, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_img}, - {0x25, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_map}, - {0x26, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_area}, - {0x27, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_a}, - {0x28, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_base}, - {0x29, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_div}, - {0x2a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_font}, - {0x2b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h1}, - {0x2c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h2}, - {0x2d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h3}, - {0x2e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h4}, - {0x2f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h5}, - {0x30, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_hr}, - {0x31, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_b}, - {0x32, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_big}, - {0x33, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_i}, - {0x34, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_menu}, - {0x35, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_span}, - {0x36, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_p}, - {0x37, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_center}, - {0x38, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dl}, - {0x39, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dt}, - {0x3a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dd}, - {0x3b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_ul}, - {0x3c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_ol}, - {0x3d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_li}, - {0x3e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_br}, - {0x3f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_nobr} -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * tag entries - sorted by name - */ -static const -NW_Byte XHTML_1_0_tag_name_0[59] = { -34, - 33, - 44, - 35, - 45, - 0, - 57, - 23, - 9, - 50, - 53, - 36, - 51, - 52, - 28, - 37, - 17, - 25, - 4, - 38, - 39, - 40, - 41, - 42, - 1, - 43, - 2, - 46, - 31, - 18, - 19, - 56, - 30, - 32, - 47, - 29, - 58, - 6, - 5, - 8, - 27, - 55, - 22, - 21, - 49, - 7, - 20, - 48, - 26, - 10, - 14, - 11, - 24, - 16, - 12, - 15, - 3, - 13, - 54, -}; - -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_h6[] = {'h','6','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_em[] = {'e','m','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_fieldset[] = {'f','i','e','l','d','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_marquee[] = {'m','a','r','q','u','e','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dir[] = {'d','i','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_small[] = {'s','m','a','l','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_plaintext[] = {'p','l','a','i','n','t','e','x','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_pre[] = {'p','r','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_abbr[] = {'a','b','b','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_acronym[] = {'a','c','r','o','n','y','m','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_address[] = {'a','d','d','r','e','s','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_blockquote[] = {'b','l','o','c','k','q','u','o','t','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_blink[] = {'b','l','i','n','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_cite[] = {'c','i','t','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_code[] = {'c','o','d','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_dfn[] = {'d','f','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_u[] = {'u','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_kbd[] = {'k','b','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_q[] = {'q','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_samp[] = {'s','a','m','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_strong[] = {'s','t','r','o','n','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_var[] = {'v','a','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_tt[] = {'t','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_sub[] = {'s','u','b','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_sup[] = {'s','u','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_ins[] = {'i','n','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_del[] = {'d','e','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_strike[] = {'s','t','r','i','k','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_s[] = {'s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_param[] = {'p','a','r','a','m','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_bgsound[] = {'b','g','s','o','u','n','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_ElementTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * tag entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t XHTML_1_0_tag_token_1[32] = { - {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_h6}, - {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_em}, - {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_fieldset}, - {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_marquee}, - {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dir}, - {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_small}, - {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_plaintext}, - {0x0c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_pre}, - {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_abbr}, - {0x0e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_acronym}, - {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_address}, - {0x10, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_blockquote}, - {0x11, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_blink}, - {0x12, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_cite}, - {0x13, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_code}, - {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_dfn}, - {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_u}, - {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_kbd}, - {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_q}, - {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_samp}, - {0x19, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_strong}, - {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_var}, - {0x1b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_tt}, - {0x1c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_sub}, - {0x1d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_sup}, - {0x1e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_ins}, - {0x1f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_del}, - {0x20, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_strike}, - {0x21, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_s}, - {0x22, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_param}, - {0x23, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_bgsound}, - {0x24, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_ElementTag_zzzunknown} -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * tag entries - sorted by name - */ -static const -NW_Byte XHTML_1_0_tag_name_1[32] = { - 8, - 9, - 10, - 30, - 12, - 11, - 13, - 14, - 26, - 15, - 4, - 1, - 2, - 0, - 25, - 17, - 3, - 29, - 6, - 7, - 18, - 28, - 19, - 5, - 27, - 20, - 23, - 24, - 22, - 16, - 21, - 31, -}; - -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_abbr[] = {'a','b','b','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accept_charset[] = {'a','c','c','e','p','t','-','c','h','a','r','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accept[] = {'a','c','c','e','p','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_accesskey[] = {'a','c','c','e','s','s','k','e','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_action[] = {'a','c','t','i','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_align[] = {'a','l','i','g','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alink[] = {'a','l','i','n','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alt[] = {'a','l','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_archive[] = {'a','r','c','h','i','v','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_axis[] = {'a','x','i','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_background[] = {'b','a','c','k','g','r','o','u','n','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bgcolor[] = {'b','g','c','o','l','o','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_border[] = {'b','o','r','d','e','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cellpadding[] = {'c','e','l','l','p','a','d','d','i','n','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_char[] = {'c','h','a','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_charoff[] = {'c','h','a','r','o','f','f','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_charset[] = {'c','h','a','r','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_checked[] = {'c','h','e','c','k','e','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cite[] = {'c','i','t','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_class[] = {'c','l','a','s','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_classid[] = {'c','l','a','s','s','i','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_clear[] = {'c','l','e','a','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_code[] = {'c','o','d','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_codebase[] = {'c','o','d','e','b','a','s','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_codetype[] = {'c','o','d','e','t','y','p','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_color[] = {'c','o','l','o','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cols[] = {'c','o','l','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_colspan[] = {'c','o','l','s','p','a','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_content[] = {'c','o','n','t','e','n','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_coords[] = {'c','o','o','r','d','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_data[] = {'d','a','t','a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_declare[] = {'d','e','c','l','a','r','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_dir[] = {'d','i','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_disabled[] = {'d','i','s','a','b','l','e','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_enctype[] = {'e','n','c','t','y','p','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_encoding[] = {'e','n','c','o','d','i','n','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_frameborder[] = {'f','r','a','m','e','b','o','r','d','e','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_height[] = {'h','e','i','g','h','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_href[] = {'h','r','e','f','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_hspace[] = {'h','s','p','a','c','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_http_equiv[] = {'h','t','t','p','-','e','q','u','i','v','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_id[] = {'i','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_ismap[] = {'i','s','m','a','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_label[] = {'l','a','b','e','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_language[] = {'l','a','n','g','u','a','g','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_link[] = {'l','i','n','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_marginheight[] = {'m','a','r','g','i','n','h','e','i','g','h','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_marginwidth[] = {'m','a','r','g','i','n','w','i','d','t','h','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_maxlength[] = {'m','a','x','l','e','n','g','t','h','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_media[] = {'m','e','d','i','a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_method[] = {'m','e','t','h','o','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_multiple[] = {'m','u','l','t','i','p','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_name[] = {'n','a','m','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_nohref[] = {'n','o','h','r','e','f','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_noresize[] = {'n','o','r','e','s','i','z','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_noshade[] = {'n','o','s','h','a','d','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_nowrap[] = {'n','o','w','r','a','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onblur[] = {'o','n','b','l','u','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onchange[] = {'o','n','c','h','a','n','g','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onclick[] = {'o','n','c','l','i','c','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onfocus[] = {'o','n','f','o','c','u','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onload[] = {'o','n','l','o','a','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onreset[] = {'o','n','r','e','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onsubmit[] = {'o','n','s','u','b','m','i','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_onunload[] = {'o','n','u','n','l','o','a','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_readonly[] = {'r','e','a','d','o','n','l','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rel[] = {'r','e','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rev[] = {'r','e','v','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rows[] = {'r','o','w','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rowspan[] = {'r','o','w','s','p','a','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scheme[] = {'s','c','h','e','m','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scrolling[] = {'s','c','r','o','l','l','i','n','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_selected[] = {'s','e','l','e','c','t','e','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_shape[] = {'s','h','a','p','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_size[] = {'s','i','z','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_src[] = {'s','r','c','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_standby[] = {'s','t','a','n','d','b','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_start[] = {'s','t','a','r','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_style[] = {'s','t','y','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_tabindex[] = {'t','a','b','i','n','d','e','x','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_target[] = {'t','a','r','g','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_title[] = {'t','i','t','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_type[] = {'t','y','p','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_usemap[] = {'u','s','e','m','a','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_valign[] = {'v','a','l','i','g','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_value[] = {'v','a','l','u','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_version[] = {'v','e','r','s','i','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_vspace[] = {'v','s','p','a','c','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_width[] = {'w','i','d','t','h','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_none[] = {'n','o','n','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_left[] = {'l','e','f','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_right[] = {'r','i','g','h','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_normal[] = {'n','o','r','m','a','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_italic[] = {'i','t','a','l','i','c','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bold[] = {'b','o','l','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_circle[] = {'c','i','r','c','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_disc[] = {'d','i','s','c','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_square[] = {'s','q','u','a','r','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_always[] = {'a','l','w','a','y','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_avoid[] = {'a','v','o','i','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_center[] = {'c','e','n','t','e','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_justify[] = {'j','u','s','t','i','f','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_underline[] = {'u','n','d','e','r','l','i','n','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_blink[] = {'b','l','i','n','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_marquee[] = {'m','a','r','q','u','e','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_top[] = {'t','o','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_middle[] = {'m','i','d','d','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bottom[] = {'b','o','t','t','o','m','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_baseline[] = {'b','a','s','e','l','i','n','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_get[] = {'g','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_post[] = {'p','o','s','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_ltr[] = {'l','t','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_rtl[] = {'r','t','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_yes[] = {'y','e','s','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_no[] = {'n','o','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_auto[] = {'a','u','t','o','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_button[] = {'b','u','t','t','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_submit[] = {'s','u','b','m','i','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_reset[] = {'r','e','s','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag__1[] = {'1','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_all[] = {'a','l','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_password[] = {'p','a','s','s','w','o','r','d','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_checkbox[] = {'c','h','e','c','k','b','o','x','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_radio[] = {'r','a','d','i','o','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_hidden[] = {'h','i','d','d','e','n','\0'}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_0[125] = { - {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_abbr}, - {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accept_charset}, - {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accept}, - {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_accesskey}, - {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_action}, - {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_align}, - {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alink}, - {0x0c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alt}, - {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_archive}, - {0x0e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_axis}, - {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_background}, - {0x10, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bgcolor}, - {0x11, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_border}, - {0x12, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cellpadding}, - {0x13, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_char}, - {0x14, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_charoff}, - {0x15, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_charset}, - {0x16, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_checked}, - {0x17, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cite}, - {0x18, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_class}, - {0x19, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_classid}, - {0x1a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_clear}, - {0x1b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_code}, - {0x1c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_codebase}, - {0x1d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_codetype}, - {0x1e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_color}, - {0x1f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cols}, - {0x20, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_colspan}, - {0x22, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_content}, - {0x23, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_coords}, - {0x24, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_data}, - {0x26, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_declare}, - {0x28, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_dir}, - {0x29, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_disabled}, - {0x2a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_enctype}, - {0x2b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_encoding}, - {0x2e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_frameborder}, - {0x30, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_height}, - {0x31, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_href}, - {0x33, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_hspace}, - {0x34, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_http_equiv}, - {0x35, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_id}, - {0x36, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_ismap}, - {0x37, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_label}, - {0x39, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_language}, - {0x3a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_link}, - {0x3c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_marginheight}, - {0x3d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_marginwidth}, - {0x3e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_maxlength}, - {0x3f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_media}, - {0x45, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_method}, - {0x46, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_multiple}, - {0x47, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_name}, - {0x48, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_nohref}, - {0x49, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_noresize}, - {0x4a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_noshade}, - {0x4b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_nowrap}, - {0x4d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onblur}, - {0x4e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onchange}, - {0x4f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onclick}, - {0x51, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onfocus}, - {0x55, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onload}, - {0x5b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onreset}, - {0x5d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onsubmit}, - {0x5e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_onunload}, - {0x61, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_readonly}, - {0x62, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rel}, - {0x63, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rev}, - {0x64, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rows}, - {0x65, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rowspan}, - {0x67, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scheme}, - {0x69, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scrolling}, - {0x6a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_selected}, - {0x6b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_shape}, - {0x6c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_size}, - {0x6e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_src}, - {0x6f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_standby}, - {0x70, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_start}, - {0x71, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_style}, - {0x73, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_tabindex}, - {0x74, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_target}, - {0x76, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_title}, - {0x77, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_type}, - {0x78, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_usemap}, - {0x79, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_valign}, - {0x7a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_value}, - {0x7c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_version}, - {0x7e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_vspace}, - {0x7f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_width}, - {0x85, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_none}, - {0x86, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_left}, - {0x87, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_right}, - {0x88, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_normal}, - {0x89, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_italic}, - {0x8a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bold}, - {0x8b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_circle}, - {0x8c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_disc}, - {0x8d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_square}, - {0x8e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_always}, - {0x8f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_avoid}, - {0x90, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_center}, - {0x91, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_justify}, - {0x92, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_underline}, - {0x93, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_blink}, - {0x94, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_marquee}, - {0x95, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_top}, - {0x96, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_middle}, - {0x97, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bottom}, - {0x98, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_baseline}, - {0x9a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_get}, - {0x9b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_post}, - {0x9d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_ltr}, - {0x9e, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_rtl}, - {0xa0, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_yes}, - {0xa1, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_no}, - {0xa2, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_auto}, - {0xa3, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_button}, - {0xa4, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_submit}, - {0xa5, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_reset}, - {0xae, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag__1}, - {0xb3, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_all}, - {0xb9, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_password}, - {0xba, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_checkbox}, - {0xbb, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_radio}, - {0xbc, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_hidden} -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by name - */ -static const -NW_Byte XHTML_1_0_attribute_name_0[125] = { - 119, - 0, - 2, - 1, - 3, - 4, - 5, - 6, - 120, - 7, - 98, - 8, - 115, - 99, - 9, - 10, - 108, - 11, - 103, - 94, - 12, - 107, - 116, - 13, - 100, - 14, - 15, - 16, - 122, - 17, - 95, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 96, - 35, - 34, - 36, - 109, - 37, - 124, - 38, - 39, - 40, - 41, - 42, - 93, - 101, - 43, - 44, - 90, - 45, - 111, - 46, - 47, - 104, - 48, - 49, - 50, - 106, - 51, - 52, - 114, - 53, - 89, - 54, - 92, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 121, - 110, - 123, - 65, - 66, - 118, - 67, - 91, - 68, - 69, - 112, - 70, - 71, - 72, - 73, - 74, - 97, - 75, - 76, - 77, - 78, - 117, - 79, - 80, - 81, - 105, - 82, - 102, - 83, - 84, - 85, - 86, - 87, - 88, - 113, -}; - -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_xml_stylesheet[] = {'x','m','l','-','s','t','y','l','e','s','h','e','e','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cellspacing[] = {'c','e','l','l','s','p','a','c','i','n','g','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_text[] = {'t','e','x','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bgproperties[] = {'b','g','p','r','o','p','e','r','t','i','e','s','\0'}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_1[5] = { - {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_zzzunknown}, - {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_xml_stylesheet}, - {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cellspacing}, - {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_text}, - {0x0a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bgproperties} -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by name - */ -static const -NW_Byte XHTML_1_0_attribute_name_1[5] = { - 4, - 2, - 3, - 1, - 0, -}; - -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_behavior[] = {'b','e','h','a','v','i','o','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_direction[] = {'d','i','r','e','c','t','i','o','n','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_loop[] = {'l','o','o','p','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scrollamount[] = {'s','c','r','o','l','l','a','m','o','u','n','t','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scrolldelay[] = {'s','c','r','o','l','l','d','e','l','a','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_cti[] = {'c','t','i','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_telbook[] = {'t','e','l','b','o','o','k','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_email[] = {'e','m','a','i','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_directkey[] = {'d','i','r','e','c','t','k','e','y','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_memoryname[] = {'m','e','m','o','r','y','n','a','m','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_istyle[] = {'i','s','t','y','l','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_mode[] = {'m','o','d','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_bordercolor[] = {'b','o','r','d','e','r','c','o','l','o','r','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_A[] = {'A','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_a[] = {'a','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_I[] = {'I','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_i[] = {'i','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_scroll[] = {'s','c','r','o','l','l','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_slide[] = {'s','l','i','d','e','\0'}; -static const NW_Ucs2 NW_XHTML_1_0_AttributeTag_alternate[] = {'a','l','t','e','r','n','a','t','e','\0'}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by token - */ -static const -NW_WBXML_DictEntry_t XHTML_1_0_attribute_token_2[20] = { - {0x05, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_behavior}, - {0x06, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_direction}, - {0x07, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_loop}, - {0x08, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scrollamount}, - {0x09, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scrolldelay}, - {0x0b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_cti}, - {0x0d, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_telbook}, - {0x0f, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_email}, - {0x21, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_directkey}, - {0x22, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_memoryname}, - {0x23, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_istyle}, - {0x24, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_mode}, - {0x25, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_bordercolor}, - {0x86, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_A}, - {0x87, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_a}, - {0x88, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_I}, - {0x89, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_i}, - {0x8a, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_scroll}, - {0x8b, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_slide}, - {0x8c, (NW_String_UCS2Buff_t *) NW_XHTML_1_0_AttributeTag_alternate} - }; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -/* - * attribute entries - sorted by name - */ -static const -NW_Byte XHTML_1_0_attribute_name_2[20] = { - 13, - 15, - 14, - 19, - 0, - 12, - 5, - 1, - 8, - 7, - 16, - 10, - 2, - 9, - 11, - 17, - 3, - 4, - 18, - 6, -}; - -/* - * Tag codepage table - */ -static const -NW_WBXML_Codepage_t XHTML_1_0_tag_codepages[2] = { - {59, (NW_WBXML_DictEntry_t*)&XHTML_1_0_tag_token_0[0], (NW_Byte *)&XHTML_1_0_tag_name_0[0]}, - {32, (NW_WBXML_DictEntry_t*)&XHTML_1_0_tag_token_1[0], (NW_Byte *)&XHTML_1_0_tag_name_1[0]}, -}; - -/* - * Attribute codepage table - */ -static const -NW_WBXML_Codepage_t XHTML_1_0_attribute_codepages[3] = { - {125, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_0[0], (NW_Byte *)&XHTML_1_0_attribute_name_0[0]}, - {5, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_1[0], (NW_Byte *)&XHTML_1_0_attribute_name_1[0]}, - {20, (NW_WBXML_DictEntry_t*)&XHTML_1_0_attribute_token_2[0], (NW_Byte *)&XHTML_1_0_attribute_name_2[0]}, -}; - -static const NW_Ucs2 NW_XHTML_1_0_docType[] = {'-','/','/','W','A','P','F','O','R','U','M','/','/','D','T','D',' ','W','M','L',' ','2','.','0','/','/','E','N','\0'}; - -/* - * Dictionary - */ -const NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary = { - NW_xhtml_1_0_PublicId, - (NW_Ucs2 *)NW_XHTML_1_0_docType, - 2, (NW_WBXML_Codepage_t*)&XHTML_1_0_tag_codepages[0], - 3, (NW_WBXML_Codepage_t*)&XHTML_1_0_attribute_codepages[0], -}; - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Thu Jul 08 15:57:46 2004 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSBufferList.h --- a/webengine/wmlengine/src/css/include/CSSBufferList.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,224 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different CSS stylesheets that are applied to document -* -*/ - - -#ifndef CCSSBufferList_H -#define CCSSBufferList_H - -// INCLUDES -#include "CSSParser.h" -#include "nwx_osu_file.h" -#include "BrsrStatusCodes.h" - -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* buffer list entry represents a style sheet -* @lib css.lib -* @since 2.1 -*/ -class CCSSBufferEntry : public CBase -{ -public: - // constructor - CCSSBufferEntry(TText8* aData, TUint32 aLength, TUint32 aEncoding, - TBool aInternalStyle) - { - iData = aData; - iLength = aLength; - iEncoding = aEncoding; - iInternalStyle = aInternalStyle; - iPriority = 0; - iUrl = NULL; - } - // destructor - virtual ~CCSSBufferEntry() - { - if ((!iInternalStyle) && (iData != NULL)) - { - NW_Mem_Free(iData); - } - NW_Mem_Free(iUrl); - } - static CCSSBufferEntry* NewL(TText8* aData, TUint32 aLength, TUint32 aEncoding, - TBool aInternalStyle, const TText16* aUrl); - // buffer data - TText8* iData; - // buffer data length - TUint32 iLength; - // buffer data encoding - TUint32 iEncoding; - // indicates if it is external Stylesheet - TBool iInternalStyle; - // stylesheet priority - TInt iPriority; - // url of stylesheet - TText16* iUrl; -}; - -// CLASS DECLARATION - -/** -* This class Hold different CSS stylesheets that are applied to document -* @lib css.lib -* @since 2.1 -*/ -class CCSSBufferList : public CBase -{ - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @return CCSSHandler* - */ - static CCSSBufferList* NewL(); - - /** - * Destructor. - */ - virtual ~CCSSBufferList(); - - public: // New functions - - /** - * This method adds a CSS buffer to the list - * @since 2.1 - * @param aBuffer: CSS data - * @param aLength: length of CSS data - * @param aEncoding: encoding of CSS data - * @param aInternalStyle: if it is associated with <style> or <link> - * @param aUrl: url of the buffer - * @return void - */ - void AddL(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding, - TBool aInternalStyle, TText16* aUrl); - - /** - * This method initializes the parser with the data associated with indexed buffer - * @since 2.1 - * @param aParser: parser - * @param aIndex: index of CSS data - * @return void - */ - void InitializeParser(TCSSParser* aParser, TInt aIndex); - - /** - * This method is Invoked when a load respose comes back for a CSS - * @since 2.1 - * @param aData: CSS data - * @param aLength: length of CSS data - * @param aEncoding: encoding of CSS data - * @param aIndex: index of CSS data to be updated - * @return void - */ - void UpdateEntry(TText8* aData, TUint32 aLength, TUint32 aEncoding, TInt aIndex); - - /** - * This method is Invoked after adding a buffer for an @import request - * @since 2.1 - * @param aRefIndex: index of CSS data to be updated - * @return void - */ - void UpdatePriority(TInt aRefIndex); - - /** - * This method is Invoked after adding a buffer for an @import request - * @since 2.1 - * @param aIndex: index of CSS data - * @return priority of the CSS in aIndex - */ - TInt GetPriority(TInt aIndex); - - /** - * This method returns encoding of the CSS in aIndex - * @since 2.1 - * @param aIndex: index of CSS data - * @return encoding of the CSS in aIndex - */ - TUint32 GetEncoding(TInt aIndex); - - /** - * This method Returns number of CSS objects - * @since 2.1 - * @return number of CSS stylesheets - */ - TInt GetSize(); - - /** - * This method is Returns number of externally loaded CSS objects - * @since 2.1 - * @return number of externally loaded CSS stylesheets - */ - TInt GetExternalSize(); - - /** - * This method Write CSS components to a file in the form of multipart segments. - * Each segment consists of: - * header length (including content type length) - * image data length - * content type (including character encoding) - * headers - * image - * @since 2.1 - * @param aFh: file name - * @return KBrsrSuccess, KBrsrOutOfMemory, KBrsrFailure, or KBrsrSavedPageFailed - */ - TBrowserStatusCode WriteMultipartSegments(NW_Osu_File_t aFh); - - /** - * Return the number of entries in the buffer - */ - TInt Count() {return iBufferList->Count();} - - /** - * - */ - NW_Ucs2* EntryUrl(TInt aIndex) - { - if (aIndex >= 0 && aIndex < Count()) - { - CCSSBufferEntry* entry = iBufferList->At(aIndex); - return entry->iUrl; - } - return NULL; - } - private: // New functions - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - typedef CArrayPtrFlat<CCSSBufferEntry> CBufferListArray; - - private: // Data - - // vector containing the buffer list - CBufferListArray* iBufferList; -}; - -#endif /* CCSSBufferList_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSDeclListHandle.h --- a/webengine/wmlengine/src/css/include/CSSDeclListHandle.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS property -* -*/ - - -#ifndef TCSSDECLLISTHANDLE_H -#define TCSSDECLLISTHANDLE_H - -// INCLUDES - -#include "nw_lmgr_propertylist.h" -#include "CSSParser.h" -#include "CSSPropertyTable.h" -#include "nw_dom_element.h" -#include "nw_css_processor.h" - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class applies the CSS property for a declaration list -* For e.g {color:blue, text-decoration: underline} is a declaration list -* -* @lib css.lib -* @since 2.1 -*/ -class TCSSDeclListHandle - { - public: - - /* Also invoked by NW_CSS_DefaultStyleSheet */ - static void ApplyPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - - /* invoked by - NW_CSS_RuleList_ApplyStyles or NW_XHTML_ElementHandler_ApplyStyles - This method goes through a declaration list (e.g {color:blue;margin:1px}) - and applies the styles to the propList - */ - static void ApplyStylesL(NW_LMgr_Box_t* aBox, - TCSSParser* aParser, - NW_CSS_Processor_t* aProcessor, - TInt aBufferIndex); - private: - - static void ApplyBorderPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aPropertyVals, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool DefaultStyle); - - static void ApplyBoxModelPropertyL(NW_LMgr_PropertyName_t aPropName, - const NW_LMgr_PropertyName_t *aProps, - NW_LMgr_Property_t *aPropertyVals, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - - static void ApplyCommonPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProperty, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - - static TBool ConvertValueL(NW_LMgr_PropertyName_t aPropName, - TCSSPropertyVal *aInValue, - NW_LMgr_Property_t *aOutProp, - TCSSParser* aParser, - NW_CSS_Processor_t* aProcessor, - NW_LMgr_Box_t *aBox, - TInt aBufferIndex); - - static void ApplyFontPropertyL(NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - - static void ApplyListStylePropertyL(NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - - static void ApplyBackgroundPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle); - -}; - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSEventListener.h --- a/webengine/wmlengine/src/css/include/CSSEventListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Listens to callback events from CSS parser -* -*/ - - - -#ifndef MCSSEVENTLISTENER_H -#define MCSSEVENTLISTENER_H - -// INCLUDES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "CSSReader.h" - -struct TCSSSimpleSelector -{ - TCSSReaderUnit nameSpace; - TCSSReaderUnit elementName; - TUint32 specificity; - TText8* conditionListHandle; -}; - -struct TCSSPropertyVal -{ - TCSSReaderUnit val; - TInt8 type; - TText8* next; -}; - -// CLASS DECLARATION - -/** -* Interface for callback events from CSS parser -* -* @lib css.lib -* @since 2.1 -*/ -class MCSSEventListener -{ - public: // New functions - - /** - * Called when the CSS parser begins parsing the stylesheet - * @since 2.1 - * @param aStorage: Pointer to stylesheet - * @return void - */ - virtual void StartDocumentL(TText8* aStorage) = 0; - - /** - * Called when the CSS parser ends parsing the stylesheet - * @since 2.1 - * @param aStorage: Pointer to stylesheet - * @return void - */ - virtual void EndDocumentL(TText8* aStorage) = 0; - - /** - * Called when the CSS parser finishes parsing the selector - * @since 2.1 - * @param aSelector: Pointer to beginning of selector - * @param aTargetElement: target element to which this selector is applied - * @param aSpecificity: specificity of selector - * @return void - */ - virtual void SelectorL(TText8* aSelector, - TCSSReaderUnit *aTargetElement, - TUint32 aSpecificity) = 0; - - /** - * Called when the CSS parser begins parsing the simple selector - * @since 2.1 - * @param aTargetElement: target element to which this simple selector is applied - * @return void - */ - virtual void SimpleSelectorStartL(TCSSReaderUnit *aTargetElement) = 0; - - /** - * Called when the CSS parser ends parsing the simple selector - * @since 2.1 - * @param aSimpleSelector: data of this simple selector - * @param aFailed: ETrue is there was problem parsing the simpleselector - * @return void - */ - virtual void SimpleSelectorEndL(TCSSSimpleSelector* aSimpleSelector, TBool aFailed) = 0; - - /** - * Called when the CSS parser ends parsing the condition - * @since 2.1 - * @param aValue1: value of condition - * @param aValue2: name of condition - * @return void - */ - virtual void ConditionL(TUint8 aConditionType, - TCSSReaderUnit *aValue1, - TCSSReaderUnit *aValue2) = 0; - - /** - * Called when the CSS parser ends parsing the property - * @since 2.1 - * @param aName: name of property - * @param aPropertyVal: value of property - * @param aImportant: flag indicating if this property is important or not - * @return void - */ - virtual void PropertyL(TCSSReaderUnit* aName, - TCSSPropertyVal* aPropertyVal, - TBool aImportant) = 0; - - /** - * Called when the CSS parser ends parsing the import url - * @since 2.1 - * @param aUrl: url to be imported - * @return KBrsrSuccess or KBrsrFailure - */ - virtual TBrowserStatusCode Import(TCSSReaderUnit* aUrl) = 0; - - /** - * Returns the encoding of the document being parsed - * @since 2.1 - * @return encoding of the document being parsed - */ - virtual TUint32 GetCurrentEncoding() = 0; - - /** - * Sets the encoding of the document being parsed - * @since 2.1 - * @param aEncoding: encoding of the document being parsed - */ - virtual void SetCurrentEncoding(TUint32 aEncoding) = 0; - }; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSHandler.h --- a/webengine/wmlengine/src/css/include/CSSHandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS for the box tree -* -*/ - - - -#ifndef CCSSHANDLER_H -#define CCSSHANDLER_H - -// INCLUDES -#include <e32base.h> -#include "nw_css_processor.h" -#include "nw_lmgr_boxvisitor.h" - - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class applies the CSS styles to the box tree. -* It breaks each box ApplyStyle into separate RunL -* -* @lib css.lib -* @since 2.1 -*/ -class CCSSHandler : public CActive - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aProcessor A pointer to processor object that owns this object - * @return CCSSHandler* - */ - static CCSSHandler* NewL(NW_CSS_Processor_t* aProcessor); - - /** - * Destructor. - */ - virtual ~CCSSHandler(); - - - public: // New functions - - /** - * This is called from the processor when a new stylesheet needs to be applied - * @since 2.1 - * @return void - */ - void ApplyStylesL(); - - public: // Functions from base classes - - /** - * From CActive - * @since 2.1 - * @param - * @return void - */ - void RunL(); - - private: - - /** - * From CActive Noop. - * @since 2.1 - * @param - * @return void - */ - void DoCancel(); - - /** - * C++ default constructor. - * @param aProcessor A pointer to processor object that owns this object - * @return CCSSHandler* - */ - CCSSHandler(NW_CSS_Processor_t* aProcessor); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * This method applies styles to each box in the box tree and stores it as backup. - * It is called from the RunL method. - * @since 2.1 - * @return ETrue if styles have been applied to all the boxes, otherwise EFalse - */ - TBool ApplyBoxStylesL(); - - /** - * After the styles have been applied, this method replace the property list of all boxes - * with the box backup property list, reformats the box tree and redraws it. Called from RunL - * @since 2.1 - * @return void - */ - void ApplyStylesCompleteL(); - - /** - * This method swaps the property list of all boxes with the box backup property list - * @since 2.1 - * @return void - */ - void SwapPropListL(); - - /** - * Gets the next box (using box visitor) which has the element node set up - * @since 2.1 - * @param (OUT) element node which has been set on the box - * @return pointer to the next box - */ - NW_LMgr_Box_t* GetNextBox(NW_DOM_ElementNode_t** node); - - private: // Data - - // box visitor to visit each box of the box tree to which styles are applied - NW_LMgr_BoxVisitor_t iBoxVisitor; - // processor whose styles need to be applied - NW_CSS_Processor_t* iProcessor; - }; - -#endif // CCSSHandler - -// End of CSS diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSImageList.h --- a/webengine/wmlengine/src/css/include/CSSImageList.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,417 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different CSS images -* -*/ - - -#ifndef CCSSImageList_H -#define CCSSImageList_H - -// INCLUDES -#include "BrsrStatusCodes.h" -#include "nw_text_ucs2.h" -#include "nw_image_abstractimage.h" -#include "nw_image_virtualimage.h" -#include "nw_image_epoc32simpleimage.h" -#include <nwx_http_header.h> -#include "nw_css_processor.h" -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES -class CVirtualNodeImageEntry; - -typedef CArrayPtrFlat<CVirtualNodeImageEntry> CVirtualNodeImageList; - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class contains information about virtual node-image pairs associated -* with an image list entry -* @lib css.lib -* @since 2.1 -*/ -class CVirtualNodeImageEntry : public CBase - { - public: - - /** - * Two-phased constructor. - * @return CVirtualNodeImageEntry* - */ - static CVirtualNodeImageEntry* NewL(); - - /** - * Two-phased constructor. - * @return CVirtualNodeImageEntry* - */ - static CVirtualNodeImageEntry* NewLC(); - - /** - * Destructor. - */ - virtual ~CVirtualNodeImageEntry(); - - /** - * This method add a new virtual image - * @since 2.1 - * @param aVirtualImage: virtual image - * @return void - */ - void AddVirtualImage( NW_Image_Virtual_t* aVirtualImage ) { iVirtualImage = aVirtualImage; } - - /** - * This method add a new virtual node - * @since 2.1 - * @param aVirtualNode: virtual node associated with a virtual image - * @return void - */ - void AddVirtualNode( NW_DOM_ElementNode_t* aVirtualNode ) { iVirtualNode = aVirtualNode; } - - /** - * This method sets the ownership of the virtual image - * @since 2.1 - * @return void - */ - void TakeVirtualImageOwnership( void ) { iImageOwnership = ETrue; } - - /** - * This method removes the ownership of the virtual image - * @since 2.1 - * @param aUrl: url of the image - * @return void - */ - void RemoveVirtualImageOwnership( void ) { iImageOwnership = EFalse; } - - /** - * This method returns the virtual image - * @since 2.1 - * @return NW_Image_Virtual_t* virtual image - */ - NW_Image_Virtual_t* VirtualImage( void ) { return iVirtualImage; } - - /** - * This method returns with virtual node - * @since 2.1 - * @return NW_DOM_ElementNode_t* virtual node - */ - NW_DOM_ElementNode_t* VirtulaNode( void ) { return iVirtualNode; } - - /** - * This method returns the value of the ownership - * @since 2.1 - * @return TBool: ETrue if the image is owned by the entry - */ - TBool VirtualImageOwnership( void ) { return iImageOwnership; } - - private: // New functions - - /** - * C++ default constructor. - */ - CVirtualNodeImageEntry(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: - // associated virtual image. - // "ownership" member indicates - // the imageOwnership of the image - NW_Image_Virtual_t* iVirtualImage; - // associated virtual DOM node. - // not owned - NW_DOM_ElementNode_t* iVirtualNode; - TBool iImageOwnership; - }; - - -/** -* This class contains information about an image entry in the list -* @lib css.lib -* @since 2.1 -*/ -class CCSSImageListEntry : public CBase -{ -public: - - /** - * Two-phased constructor. - * @return CCSSImageListEntry* - */ - static CCSSImageListEntry* NewL( NW_Text_t* aUrl, TBool aListItem ); - - /** - * Two-phased constructor. - * @return CCSSImageListEntry* - */ - static CCSSImageListEntry* NewLC( NW_Text_t* aUrl, TBool aListItem ); - - /** - * Destructor. - */ - virtual ~CCSSImageListEntry(); - - public: // set-get functions - - /** - * This method sets the image and its content type - * @since 2.1 - * @param aImage: image object - * @param aContentType: content type string - * @return void - */ - void SetAbstractImage( NW_Image_AbstractImage_t* aImage, NW_Http_ContentTypeString_t aContentType ); - - /** - * This method returns the listItem member variable - * @since 2.1 - * @return TBool EFalse if the image is background image - */ - TBool ListItem( ) { return iListItem; } - - /** - * This method returns the "main" image which is the base of every - * virtual images in the list - * @since 2.1 - * @return NW_Image_AbstractImage_t* main image - */ - NW_Image_AbstractImage_t* AbstractImage( ) { return iImage; } - - /** - * This method returns the URL of the image. It is also the ID of the list. - * @since 2.1 - * @return NW_Text_t* url - */ - NW_Text_t* ImageUrl( ) { return iUrl; } - - /** - * This method returns the content type of the image - * @since 2.1 - * @return NW_Http_ContentTypeString_t content type - */ - NW_Http_ContentTypeString_t ImageContentType( ) { return iContentTypeString; } - - /** - * This method returns the virtual node-image list associated with this entry - * @since 2.1 - * @return CVirtualNodeImageList* virtual node-image pair list - */ - CVirtualNodeImageList* VirtualNodeImageList() { return iVirtualNodeImageList; } - - /** - * This method appends a new virtual-node pair to the list - * @since 2.1 - * @param aVirtualImageNodeEntry: virtual image-node pair entry - * @return void - */ - void AddVirtualImageNodeEntryL( CVirtualNodeImageEntry* aVirtualImageNodeEntry ) - { iVirtualNodeImageList->AppendL( aVirtualImageNodeEntry ); } - - private: // New functions - - /** - * C++ default constructor. - */ - CCSSImageListEntry( NW_Text_t* aUrl, TBool aListItem ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: // members - - // url of Image. owned - NW_Text_t* iUrl; - // content type of image. owned - NW_Http_ContentTypeString_t iContentTypeString; - // either background or list image - TBool iListItem; - // "main" image. owned - NW_Image_AbstractImage_t* iImage; - // list of virtual node-image pairs - CVirtualNodeImageList* iVirtualNodeImageList; -}; -// CLASS DECLARATION - -/** -* This class has different CSS images that can be used by the document -* @lib css.lib -* @since 2.1 -*/ -class CCSSImageList : public CBase -{ - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @return CCSSHandler* - */ - static CCSSImageList* NewL( NW_CSS_Processor_t& aProcessor ); - - /** - * Destructor. - */ - virtual ~CCSSImageList(); - - public: // New functions - - /** - * This method creates a new image entry for a given URL - * @since 2.1 - * @param aUrl: url of the image - * @param aImageNode: associated DOM node - * @param aListItem: image can be either list item or background image - * @return void - */ - void CreateImageEntryL( NW_Text_t* aUrl, NW_DOM_ElementNode_t* aImageNode, TBool aListItem ); - - /** - * This method add a new virtual node for a given URL - * @since 2.1 - * @param aUrl: url of the image - * @param aVirtualImageNode: virtual node - * @return void - */ - NW_Image_AbstractImage_t* AddVirtualNodeToImageEntryL( NW_Text_t* aUrl, NW_DOM_ElementNode_t* aVirtualImageNode ); - - /** - * This method sets the image for a given URL - * @since 2.1 - * @param aUrl: url of the image - * @param aData: image data - * @param aLength: image length - * @param aContentTypeString: content type of image - * @return image object - */ - NW_Image_AbstractImage_t* SetImageL(NW_Text_t* aUrl, NW_Byte* aData, NW_Uint32 aLength, - NW_Http_ContentTypeString_t aContentTypeString ); - - /** - * This method returns the image corresponding to a given URL - * @since 2.1 - * @param aUrl: url of the image - * @param aFound: denotes if entry exists - * @return corresponding image - */ - NW_Image_AbstractImage_t* GetImageL( NW_Text_t* aUrl, TBool& aFound ); - - /** - * This method returns the image list entry corresponding to a given virtual image - * @since 2.1 - * @param aVirtualImage: image - * @param aImageNode: corresponding node - * @return CCSSImageListEntry* corresponding image list entry - */ - CCSSImageListEntry* EntryByVirtualImage( NW_Image_AbstractImage_t* aVirtualImage, - NW_DOM_ElementNode_t** aImageNode ); - /** - * This method removes the virtual image ownership. - * @since 2.1 - * @param aImageEnrty: image enrty that holds the virtual image - * @param aVirtualImage: image to be removed - * @return void - */ - void RemoveVirtualImageOwnership( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage ); - - /** - * This method removes the virtual image. - * @since 2.1 - * @param aImageEnrty: image enrty that holds the virtual image - * @param aVirtualImage: image to be removed - * @return void - */ - void VirtualImageDestroyed( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage ); - - /** - * This method Write CSS image components to a file in the form of multipart segments. - * Each segment consists of: - * header length (including content type length) - * image data length - * content type (including character encoding) - * headers - * image - * @since 2.1 - * @param aFh: file name - * @return KBrsrSuccess, KBrsrOutOfMemory, KBrsrFailure, or KBrsrSavedPageFailed - */ - TBrowserStatusCode WriteMultipartSegments(NW_Osu_File_t aFh); - - /** - * This method returns the size of the imagelist - * @since 2.1 - * @return size of the imageList - */ - TInt GetNumImages(); - - /** - * This method issues load request for urls which don't have image - * @since 2.1 - * @return KBrsrSuccess or KBrsrOutOfMemory - */ - TBrowserStatusCode ShowImages(); - - private: // New functions - - /** - * C++ default constructor. - */ - CCSSImageList( NW_CSS_Processor_t& aProcessor ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * This method gets CSS image for a given URL - * @since 2.1 - * @param aUrl: url of the image to be fetched - * @param aRetEntry: image - * @return KBrsrSuccess, KBrsrOutOfMemory, KBrsrNotFound - */ - TBool QueryEntryL (NW_Text_t* aUrl, CCSSImageListEntry*& aRetEntry); - - /** - * This method changes the ownership status of a virtual image. - * @since 2.1 - * @param aImageEnrty: image enrty that holds the virtual image - * @param aVirtualImage: image to be removed - * @param aDestroyed: ETrue if the image was destroyed - * @return void - */ - void VirtualImageOwnershipChanged( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage, - TBool aDestroyed ); - - - typedef CArrayPtrFlat<CCSSImageListEntry> CImageListArray; - - private: // Data - - // vector containing the images. owned - CImageListArray* iImageList; - // CSS processor. not owned - NW_CSS_Processor_t* iProcessor; -}; - -#endif /* CCSSImageList_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSParser.h --- a/webengine/wmlengine/src/css/include/CSSParser.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Parses CSS styles -* -*/ - - -#ifndef TCSSParser_H -#define TCSSParser_H - -// INCLUDES -#include "nw_object_dynamic.h" -#include "NW_CSS_EXPORT.h" -#include "CSSEventListener.h" -#include "CSSReader.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -enum TCSSConditionType -{ - ID_CONDITION = 1, - CLASS_CONDITION, - ATTRIBUTE_CONDITION, - ACTIVE_CONDITION, - LINK_CONDITION, - VISITED_CONDITION, - FOCUS_CONDITION -}; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class is the parser for CSS -* @lib css.lib -* @since 2.1 -*/ -class TCSSParser -{ - public: - // constructor - TCSSParser(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding) - { - iReader.Init(aBuffer, aLength, aEncoding); - iEventListener = NULL; - } - - TCSSParser() - { - iEventListener = NULL; - } - - void Init(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding) - { - iReader.Init(aBuffer, aLength, aEncoding); - iEventListener = NULL; - } - - public: // New functions - - TBrowserStatusCode ParseStyleSheet(MCSSEventListener* aEventListener); - - TBrowserStatusCode SimpleSelectorListIterate(TCSSSimpleSelector* aSimpleSelector); - - TBrowserStatusCode ConditionListIterate(TText8* aConditionType, - TCSSReaderUnit *aValue1, - TCSSReaderUnit *aValue2); - - TBrowserStatusCode DeclarationListIterate(TCSSReaderUnit* aProperty, - TCSSPropertyVal* aPropertyVal, - TUint8 *aNumVals, - TUint8 maxVals, - TBool* aImportant); - - - TBrowserStatusCode ParserRGB(TCSSPropertyVal* aRVal, - TCSSPropertyVal* aGVal, - TCSSPropertyVal* aBVal); - - - TUint32 ParseCharset(); - - void SetPosition(TText8* aPosition); - - inline TUint32 GetEncoding(){return iReader.GetEncoding();} - - inline TCSSReader* GetReader() {return &iReader;} - - inline TText8* GetPosition(){ return iReader.GetBufferPointer();} - - private: //methods - - TBool ParseElementName(TCSSReaderUnit* aNameSpace, TCSSReaderUnit* aElementName); - - TBrowserStatusCode SelectorListIterate(TCSSReaderUnit* aTargetElement, - TUint32 *aSpecificity); - - TBrowserStatusCode ParseRule(); - - TBool HasValidMedia(); - - TBrowserStatusCode ParseImportRule(); - - TBrowserStatusCode ParseMediaRule(); - - TBrowserStatusCode ParseStyleRules(); - - TBrowserStatusCode ParseHeader(); - - TBrowserStatusCode ParserPropertyVal(TCSSPropertyVal* aPropertyVal); - - private: // Data - - // lexer - TCSSReader iReader; - // event listener to get the CSS events like start Selector - MCSSEventListener* iEventListener; -}; -#endif /* TCSSParser_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSPatternMatcher.h --- a/webengine/wmlengine/src/css/include/CSSPatternMatcher.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,256 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Matches CSS patterns -* -*/ - - -#ifndef CCSSPatternMatcher_H -#define CCSSPatternMatcher_H - -// INCLUDES -#include "CSSParser.h" -#include "CSSSelector.h" -#include "nw_dom_element.h" -#include "nw_wbxml_dictionary.h" -#include "nw_evt_event.h" -#include "nw_hed_documentnode.h" -#include "nw_hed_domhelper.h" - -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class contains information about the node -* @lib css.lib -* @since 2.1 -*/ -class CCSSNodeData : public CBase -{ -public: - // class Value of node - NW_Ucs2* classVal; - // idValue of node - NW_Ucs2* idVal; - // if node is link - TBool isLink; - // if associated url os visited - TBool isVisited; - // if url is cached - TBool isCached; - // associated url; - NW_Text_t* elementUrl; - - // constructor - CCSSNodeData() - { - classVal = NULL; - idVal = NULL; - elementUrl = NULL; - isCached = EFalse; - isLink = EFalse; - isVisited = EFalse; - } - // destructor - virtual ~CCSSNodeData() - { - if (classVal) - { - NW_Mem_Free(classVal); - } - if (idVal) - { - NW_Mem_Free(idVal); - } - if (elementUrl) - { - NW_Object_Delete(elementUrl); - } - } - -}; - -// CLASS DECLARATION - -/** -* This class matches patterns -* -* @lib css.lib -* @since 2.1 -*/ -class CCSSPatternMatcher : public CBase -{ - public: // Constructors and destructor - - /** - * Destructor. - */ - virtual ~CCSSPatternMatcher(){}; - - CCSSPatternMatcher(NW_WBXML_Dictionary_t* aDictionary, - NW_HED_DocumentNode_t* aOwner, - NW_HED_DomHelper_t* aDomHelper) - { - iDictionary = aDictionary; - iOwner = aOwner; - iDomHelper = aDomHelper; - } - - - public: // New functions - - /** - * This function matches selector pattern to element node using lazy parsing - * @since 2.1 - * @param aElementNode: element node for which pattern needs to be matched - * @param aParser: parser initialized to beginning of selector - * @param aSelector: selector to be matched - * @param aEvent: event - * @param aNodeData: node specific data containing class, id information - * @return NW_FALSE if pattern not matched or NW_TRUE if pattern matches - */ - TBool MatchPatternLazyL(NW_DOM_ElementNode_t* aElementNode, - TCSSParser* aParser, - NW_Byte* aSelector, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData); - /** - * This function matches selector pattern to element node - * @since 2.1 - * @param aElementNode: element node for which pattern needs to be matched - * @param aParser: parser initialized to beginning of selector - * @param aSelector: selector to be matched - * @param aEvent: event - * @param aNodeData: node specific data containing class, id information - * @return NW_FALSE if pattern not matched or NW_TRUE if pattern matches - */ - TBool MatchPatternL(NW_DOM_ElementNode_t* aElementNode, - CCSSSelector* aSelector, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData); - - private: // New functions - - // data associated with a simple selector - struct TSimpleSelectorData - { - TCSSReaderUnit nameSpace; - TUint16 elementToken; - TText8* conditionListHandle; - TUint16 simpleSelectorNum; - }; - - /** - * This function matches selector pattern to element node - * using lazy parsing - * @since 2.1 - * @param aElementNode: element node for which pattern needs to be matched - * @param aParser: parser initialized to beginning of selector - * @param aEvent: event - * @param aNodeData: node specific data containing class, id information - * @param aConditionListHandle pointer to beginning of conditions - * @return NW_FALSE if conditions not matched or NW_TRUE if conditions matches - */ - TBool MatchConditionLazyL(NW_DOM_ElementNode_t* aElementNode, - NW_Byte* aConditionListHandle, - TCSSParser* aParser, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData); - - /** - * This function matches selector pattern to element node - * @since 2.1 - * @param aElementNode: element node for which pattern needs to be matched - * @param aParser: parser initialized to beginning of selector - * @param aEvent: event - * @param aNodeData: node specific data containing class, id information - * @param aConditionList: list of conditions - * @return NW_FALSE if conditions not matched or NW_TRUE if conditions matches - */ - TBool MatchConditionL(NW_DOM_ElementNode_t* aElementNode, - CCSSConditionList* aConditionList, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData); - - /** - * This function gets the data associated with a simple selector (iterator method) - * @since 2.1 - * @param aParser: parser to parse selector - * @param aSelector: selector to be matched - * @param aEvent: event - * @param aNodeData(OUT): node specific data containing class, id information - * @return KBrsrIterateDone (if all simple selectors are parsed) - * KBrsrIterateMore (if more simple selectors need to be parsed) - */ - TBrowserStatusCode GetNextSimpleSelectorL(TCSSParser* aParser, - NW_Byte* aSelector, - TSimpleSelectorData& aData); - - - /** - * This function matches selector pattern to element node - * @since 2.1 - * @param aElementNode: element node whose url is to be matched - * @return url associated with href - */ - NW_Text_t* GetElementURLL(NW_DOM_ElementNode_t* aElementNode); - - /** - * This function returns true if url is in history stack - * @since 2.1 - * @param aElementNode: element node whose url is to be searched - * @return true (if url is in history stack), otherwise false - */ - TBool UrlInHistory(NW_DOM_ElementNode_t* aElementNode); - - /** - * This function returns true if url is in cache - * @since 2.1 - * @param aElementNode: element node whose url is to be searched - * @return true (if url is in cache), otherwise false - */ - TBool UrlInCache(NW_DOM_ElementNode_t* aElementNode); - - /** - * This function returns true if url is in cache - * @since 2.1 - * @param aParser: parser to parse selector - * @param aSelector: selector to be matched - * @param aData: simpleselector data - * @return KBrsrSuccess or KBrsrFailure - */ - TBrowserStatusCode InitSimpleSelectorData(TCSSParser* aParser, NW_Byte* aSelector, TSimpleSelectorData& aData); - - private: // Data - - // dictionary for document - NW_WBXML_Dictionary_t* iDictionary; - - // document - NW_HED_DocumentNode_t* iOwner; - - // domHelper for resolving entities - NW_HED_DomHelper_t* iDomHelper; -}; - -#endif /* CCSSPatternMatcher_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSPropVal.h --- a/webengine/wmlengine/src/css/include/CSSPropVal.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS property values -* -*/ - - -#ifndef TCSSPROPVAL_H -#define TCSSPROPVAL_H - -// INCLUDES - -#include "CSSPropertyTable.h" -#include "nw_css_processor.h" -#include "nw_lmgr_box.h" -#include "CSSParser.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class applies the CSS property values -* -* @lib css.lib -* @since 2.1 -*/ -class TCSSPropVal - { - public: - - static TBool SetColorL(TCSSParser* aParser, - NW_LMgr_Property_t *aBoxVal, - TCSSPropertyVal* aPropertyVal, - TText16* aValStorage); - - static TBool SetNumberPropVal(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProp, - TUint8 aValueType, - NW_Float32 aValue); - - static TBool SetImageValL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aVal, - TText16* aValStorage, - NW_CSS_Processor_t* aProcessor, - NW_LMgr_Box_t *box, - TInt aBufferIndex); - - static TBool SetTokenVal(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProp, - TUint32 aToken, - NW_LMgr_Box_t* aBox); - - private: - - static TBool GetRGBValL(TCSSParser* aParser, - TCSSReaderUnit* aPropertyVal, - TInt8 aType, - TUint8* aVal); - - static TBool SetRGBColorL(TCSSParser* aParser, - NW_LMgr_Property_t *aProp, - TCSSPropertyVal* aPropertyVal); - - static TBool SetHexColor(NW_LMgr_Property_t *aProp, const TText16* aStorage); - -}; - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSPropertyTable.h --- a/webengine/wmlengine/src/css/include/CSSPropertyTable.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains mapping of string values to internal tokens -* -*/ - - -#ifndef TCSSPROPERTYTABLE_H -#define TCSSPROPERTYTABLE_H - -// INCLUDES -#include <e32std.h> -#include "nw_lmgr_propertylist.h" - -// CONSTANTS - -// MACROS -struct TCSSPropertyTablePropEntry -{ - const TText16* strName; - NW_LMgr_PropertyName_t tokenName; - TUint32 type; -}; - -struct TCSSPropertyTablePropValEntry -{ - const TText16 *strVal; - NW_LMgr_PropertyValueToken_t tokenVal; -}; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class Contains mapping of string values to internal tokens -* -* @lib css.lib -* @since 2.1 -*/ -class TCSSPropertyTable - { - public: - - static const TCSSPropertyTablePropEntry* GetPropertyEntry(const TText16* aStrName); - - static TBool GetPropertyValToken(const TText16* aVal, NW_LMgr_PropertyValueToken_t *aToken); - - static const TCSSPropertyTablePropEntry* GetPropEntryByToken (NW_LMgr_PropertyName_t aTokenName); - - static const TCSSPropertyTablePropValEntry* GetPropValEntryByToken (NW_LMgr_PropertyValueToken_t aTokenVal); - - static const TText16* GetPropValType(TUint8 aValueType); - - private: - - -}; - -#endif /* TCSSPROPERTYTABLE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSReader.h --- a/webengine/wmlengine/src/css/include/CSSReader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,303 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CSS Lexer -* -*/ - - -#ifndef TCSSReader_H -#define TCSSReader_H - -// INCLUDES -#include "nwx_defs.h" -#include "nw_string_string.h" -#include <e32std.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES - -enum TCSSReaderTokenType{ - SPACE = 1, - ATKEYWORD, - HASH, - ASTERISK, - COMMA, - DOT, - COLON, - HYPHEN, - SEMI_COLON, - LEFT_BRACE, - RIGHT_BRACE, - LEFT_BRACKET, - RIGHT_BRACKET, - EQUALS, - CHARSET_RULE, - IMPORT_RULE, - MEDIA_RULE, - LINK_PSEUDO_CLASS, - VISITED_PSEUDO_CLASS, - FOCUS_PSEUDO_CLASS, - ACTIVE_PSEUDO_CLASS, - CACHED_PSEUDO_CLASS, - IMPORTANT, - VERTICAL_LINE, - CDO, - CDC, - BUFFER_END, - IDENTIFIER, - EMS, - EXS, - PXS, - INS, - CMS, - MMS, - PTS, - PERCENTAGE, - PCS, - NUMBER, - URI, - RGB, - STRING, - RIGHT_PARENTHESIS, - DIGIT, - ALPHA, - INVALID -}; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class is a unit of text -* @lib css.lib -* @since 2.1 -*/ -class TCSSReaderUnit -{ - public: - // constructor - TCSSReaderUnit(TText8* aStorage, TUint32 aLength, TUint32 aNumChars) - { - iStorage = aStorage; - iLength = aLength; - iNumChars = aNumChars; - } - - TCSSReaderUnit() - { - iStorage = NULL; - iLength = 0; - iNumChars = 0; - } - - void Init(TText8* aStorage, TUint32 aLength, TUint32 aNumChars) - { - iStorage = aStorage; - iLength = aLength; - iNumChars = aNumChars; - } - /** - * Converts the text to unicode - * @since 2.1 - * @param aEncoding: encoding of the document being parsed - * return unicode String - */ - TText16* GetUnicodeL(TUint32 aEncoding); - TText16* GetUnicode(TUint32 aEncoding); - - public: //data - // pointer to beginning of text - TText8* iStorage; - // length of storage - TUint32 iLength; - // number of character - TUint32 iNumChars; -}; -// CLASS DECLARATION - -/** -* This class is the lexer for CSS syntax -* @lib css.lib -* @since 2.1 -*/ -class TCSSReader -{ - public: - // constructor - TCSSReader(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding) - { - iBuffer = aBuffer; - iLength = aLength; - iEncoding = aEncoding; - iPosition = 0; - } - - TCSSReader() - { - iBuffer = NULL; - iLength = 0; - iEncoding = 0; - iPosition = 0; - } - - void Init(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding) - { - iBuffer = aBuffer; - iLength = aLength; - iEncoding = aEncoding; - iPosition = 0; - } - - /** - * Skips white space as defined by CSS2 Spec - * @since 2.1 - * return void - */ - void SkipWhiteSpaces(); - - /** - * Finds if the media type is valid (all or handheld) - * @since 2.1 - * @param aMedia: media to be evaluated - * return ETrue if media is valid else EFalse - */ - TBool IsValidMedia(TCSSReaderUnit* aMedia); - - TInt8 ReadNextToken(TCSSReaderUnit* aStr); - - TInt8 GetPseudoClass(); - - TInt8 ReadNumberToken(TCSSReaderUnit* aStr); - - TBool ReadIdentifier(TCSSReaderUnit* aStr); - - TBool ReadString(TCSSReaderUnit* aStr); - - TBool ReadName(TCSSReaderUnit* aStr); - - TBool ReadURI(TCSSReaderUnit* aStr); - - TBool ReadCharset(); - - TBrowserStatusCode GoToToken(TUint8 aTokenType, TText8** aPosition); - - /** - * Ignores the At-rule of CSS starting at given position - * @since 2.1 - * @param aPosition - starting of At-Rule - * return void - */ - TBool IgnoreAtRule(TUint32 aPosition); - - /** - * Sets position of the reader - * @since 2.1 - * @param aPosition - position of reader - * return void - */ - inline void SetPosition(TUint32 aPosition){iPosition = aPosition;} - - /** - * Returns pointer to the buffer - * @since 2.1 - * return pointer to the buffer - */ - inline TText8* GetBuffer(){return iBuffer;} - - /** - * Returns length of buffer - * @since 2.1 - * return length of buffer - */ - inline TUint32 GetLength(){return iLength;} - - /** - * Returns current position of reader - * @since 2.1 - * return current position of reader - */ - inline TUint32 GetPosition(){return iPosition;} - - /** - * Returns encoding of buffer - * @since 2.1 - * return encoding of buffer - */ - inline TUint32 GetEncoding(){return iEncoding;} - - /** - * Advances the buffer by certain number of bytes - * @since 2.1 - * @param aNumBytes - number of bytes to advance - * return void - */ - TBool Advance(TUint32 aNumBytes); - - /** - * Sets encoding of the document - * @since 2.1 - * @param aEncoding - encoding of buffer - * return void - */ - inline void SetEncoding(TUint32 aEncoding){iEncoding = aEncoding;} - - /** - * Returns pointer to the buffer storage where reader is positioned - * @since 2.1 - * return pointer to the buffer storage where reader is positioned - */ - inline TText8* GetBufferPointer(){return (iBuffer+iPosition);} - - /** - * Gets the encoding associated with the text - * @since 2.1 - * return encoding of the document being parsed - */ - TUint32 GetCharsetVal(); - - /** - * Reads a character - * @since 2.1 - * return encoding of the document being parsed - */ - TInt32 ReadChar(TText16* aChar); - - TUint16 ReadEscape(TText16* aOutChar); - - private: // Functions - - TBool Equals(const TText16* aStr, TBool aCaseInsensitive); - - TBool ReadBlock(TText16 aClosingChar); - - private: // Data - - // pointer to the CSS buffer - TText8* iBuffer; - // length of buffer - TUint32 iLength; - // encoding of buffer - TUint32 iEncoding; - // position in the buffer - TUint32 iPosition; -}; - -#endif /* TCSSReader_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSRuleList.h --- a/webengine/wmlengine/src/css/include/CSSRuleList.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,347 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Map containing the CSS rules -* -*/ - - -#ifndef CCSSRuleList_H -#define CCSSRuleList_H - -// INCLUDES -#include "CSSEventListener.h" -#include "CSSBufferList.h" -#include "nw_wbxml_dictionary.h" -#include "nw_css_processori.h" -#include "CSSPatternMatcher.h" -#include "CSSSelector.h" - -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION - -// CLASS DECLARATION - -typedef CArrayPtrFlat<CCSSSelector> CCSSRules; - -/** -* This class contains information about an element entry in the CSSRuleList (iElementList) -* @lib css.lib -* @since 2.1 -*/ -class CCSSRuleListElementEntry : public CBase -{ -public: - // constructor - CCSSRuleListElementEntry(TUint16 aElementToken) - { - iElementToken = aElementToken; - iRules = NULL; - } - - // destructor - virtual ~CCSSRuleListElementEntry() - { - if (iRules) - { - iRules->ResetAndDestroy(); - delete iRules; - } - } - - // element token - TUint16 iElementToken; - - // array of rules that apply to element represented by iElementToken - CCSSRules* iRules; -}; - - - - -// CLASS DECLARATION - -/** -* This class contains the CSS Rules -* -* @lib css.lib -* @since 2.1 -*/ -class CCSSRuleList : public CBase, public MCSSEventListener -{ - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aProcessor A pointer to processor object that owns this object - * @return CCSSHandler* - */ - static CCSSRuleList* NewL(NW_CSS_Processor_t* aProcessor); - - /** - * Destructor. - */ - virtual ~CCSSRuleList(); - - public: // New functions - - /** - * This function parses a stylesheet - * @since 2.1 - * @param aData: Pointer to stylesheet - * @param aLength: Length of stylesheet - * @param aEncoding: encoding of stylesheet - * @param aDoNotDelete: flag indicating if stylesheet shoud be deleted - * @return KBrsrSuccess or KBrsrFailure - */ - TBrowserStatusCode ProcessBuffer(TText8* aData, - TUint32 aLength, - TUint32 aEncoding, - TBool aDoNotDelete); - - /** - * Returns the buffer list containing different stylesheets - * @since 2.1 - * @return the buffer list - */ - CCSSBufferList* GetBufferList(); - - /** - * Returns the size of the rules list. This corresponds to the number of - * element entries in the iElementList - * @since 2.1 - * @return the style list - */ - TInt GetSize(); - - /** - * Returns the index of the buffer being parsed - * @since 2.1 - * @return -1 in case of error otherwise index of stylesheet - */ - TInt GetCurrentBufferIndex(); - - /** - * Returns dictionary - * @since 2.1 - * @return the dictionary - */ - NW_WBXML_Dictionary_t* GetDictionary(); - - /** - * Sets the index of the buffer being parsed - * @since 2.1 - * @param aIndex - index of stylesheet - */ - void SetCurrentBufferIndex(TInt aIndex); - - /** - * Sets the dictionary - * @since 2.1 - * @param aDictionary - dictionary - */ - void SetDictionary(NW_WBXML_Dictionary_t* aDictionary); - - public: // Functions from base classes - - /** - * Called when the CSS parser begins parsing the stylesheet - * @since 2.1 - * @param aStorage: Pointer to stylesheet - * @return void - */ - void StartDocumentL(TText8* aStorage); - - /** - * Called when the CSS parser ends parsing the stylesheet - * @since 2.1 - * @param aStorage: Pointer to stylesheet - * @return void - */ - void EndDocumentL(TText8* aStorage); - - /** - * This function parses a stylesheet - * @since 2.1 - * @param aData: Pointer to stylesheet - * @param aLength: Length of stylesheet - * @param aEncoding: encoding of stylesheet - * @param aDoNotDelete: flag indicating if stylesheet shoud be deleted - * @return void - */ - void SelectorL(TText8* aSelector, - TCSSReaderUnit *aTargetElement, - TUint32 aSpecificity); - - /** - * Called when the CSS parser begins parsing the simple selector - * @since 2.1 - * @param aTargetElement: target element to which this simple selector is applied - * @return void - */ - void SimpleSelectorStartL(TCSSReaderUnit *aTargetElement); - - /** - * Called when the CSS parser ends parsing the simple selector - * @since 2.1 - * @param aSimpleSelector: data of this simple selector - * @param aFailed: ETrue is there was problem parsing the simpleselector - * @return void - */ - void SimpleSelectorEndL(TCSSSimpleSelector* aSimpleSelector, TBool aFailed); - - /** - * Called when the CSS parser ends parsing the condition - * @since 2.1 - * @param aValue1: value of condition - * @param aValue2: name of condition - * @return void - */ - void ConditionL(TUint8 aConditionType, - TCSSReaderUnit *aValue1, - TCSSReaderUnit *aValue2); - - /** - * Called when the CSS parser ends parsing the property - * @since 2.1 - * @param aName: name of property - * @param aPropertyVal: value of property - * @param aImportant: flag indicating if this property is important or not - * @return void - */ - void PropertyL(TCSSReaderUnit* aName, - TCSSPropertyVal* aPropertyVal, - TBool aImportant); - - /** - * Called when the CSS parser ends parsing the import url - * @since 2.1 - * @param aUrl: url to be imported - * @return KBrsrSuccess or KBrsrFailure - */ - TBrowserStatusCode Import(TCSSReaderUnit* url); - - /** - * Returns the encoding of the document being parsed - * @since 2.1 - * @return encoding of the document being parsed - */ - TUint32 GetCurrentEncoding(); - - /** - * Sets the encoding of the document being parsed - * @since 2.1 - * @param aEncoding: encoding of the document being parsed - */ - void SetCurrentEncoding(TUint32 aEncoding); - - /** - * Applies styles for a given element node in the document after - * pattern matching - * @since 2.1 - * @param aElementNode: element node for which pattern matching needs to be done - * @param aBox: box to which CSS is applied - * @param aEvent: event resulting in style application (for e.g. focus) - * This is mostly NULL - * @param aDomHelper: for resolving entities - * @return KBrsrSuccess or KBrsrOutOfMemory - */ - void ApplyStylesL(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, - const NW_Evt_Event_t* aEvent, - NW_HED_DomHelper_t* aDomHelper); - private: - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(NW_CSS_Processor_t* aProcessor); - - /** - * Returns the set of rules that applies to a given element - * @since 2.1 - * @param aToken: token of an element - * @return the set of rules that applies to a given element - */ - CCSSRules* GetElementRules(TUint16 aToken); - - /** - * Returns the rule list in the array based on the index. If the index is - * no longer valid (i.e. no more entries in the list) a NULL value is returned. - * @param aIndex Index into array of rule lists. - * @since 2.7 - * @return next rule list - */ - CCSSRuleListElementEntry* GetElementRulesByIndex(TInt aIndex); - - /** - * Applies styles for a given rule list entry after pattern matching - * @since 2.1 - * @param aElementNode: element node for which pattern matching needs to be done - * @param aEntry: rule list entry to be evaluated - * @param aBox: box to which CSS is applied - * @param aEvent: event resulting in style application (for e.g. focus) - * This is mostly NULL - * @param aDomHelper: for resolving entities - * @param aNodeData: contains class and id value for a given node - * @return KBrsrSuccess or KBrsrOutOfMemory - */ - void ApplyEntryStylesL(NW_DOM_ElementNode_t* aElementNode, - CCSSSelector* aEntry, - NW_LMgr_Box_t* aBox, - const NW_Evt_Event_t* aEvent, - NW_HED_DomHelper_t* aDomHelper, - CCSSNodeData* aNodeData); - - typedef CArrayPtrFlat<CCSSRuleListElementEntry> CCSSElementList; - - private: // Data - - // element list of all styles - CCSSElementList* iElementList; - - // buffer list containing different stylesheets - CCSSBufferList* iBufferList; - - // document dictionary - NW_WBXML_Dictionary_t* iDictionary; - - // index in the buffer list of the document being parsed - TInt iCurrentBufferIndex; - - // encoding of the document being parsed - TUint32 iCurrentEncoding; - - // processor whose styles need to be applied - NW_CSS_Processor_t* iProcessor; - - // represents the current selector being parsed - CCSSSelector* iSelector; - - //Allow friend class access to private data and methods - friend class CCSSVariableStyleSheet; -}; - -#endif /* CCSSRuleList_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSSelector.h --- a/webengine/wmlengine/src/css/include/CSSSelector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represent the CSS Selector -* -*/ - - -#ifndef CCSSSelector_H -#define CCSSSelector_H - -// INCLUDES -//#include "CSSEventListener.h" -//#include "CSSBufferList.h" -//#include "nw_wbxml_dictionary.h" -//#include "nw_css_processori.h" -//#include "CSSPatternMatcher.h" - -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION - -// CLASS DECLARATION - - -/** -* This class represents the CSS Condition -* @lib css.lib -* @since 2.1 -*/ -class CCSSCondition : public CBase -{ -public: - // constructor - CCSSCondition(TUint8 aConditionType) - { - iConditionType = aConditionType; - iValue1 = NULL; - iValue2 = NULL; - } - - // destructor - virtual ~CCSSCondition() - { - if (iValue1) - { - NW_Mem_Free(iValue1); - } - if (iValue2) - { - NW_Mem_Free(iValue2); - } - } - public: // New functions - - public: - - // condition type - NW_Uint8 iConditionType; - - // value1 - in case of class and id it is the value of attribute - // in case of attribute selector, it is attribute name - NW_Ucs2 *iValue1; - - // NULL in case of id and class selectors, in case of attribute selector - // it is the value of the attribute - NW_Ucs2 *iValue2; -}; - -typedef CArrayPtrFlat<CCSSCondition> CCSSConditionList; - -/** -* This class represents the CSS Simple Selector -* @lib css.lib -* @since 2.1 -*/ -class CCSSSimpleSelector : public CBase -{ -public: - // constructor - CCSSSimpleSelector(TUint16 aElementToken) - { - iElementToken = aElementToken; - iConditionList = NULL; - } - - // destructor - virtual ~CCSSSimpleSelector() - { - if (iConditionList) - { - iConditionList->ResetAndDestroy(); - delete iConditionList; - } - } - public: // New functions - - public: - - // element token - TUint16 iElementToken; - // array of rules that apply to element represented by iElementToken - CCSSConditionList* iConditionList; -}; - -typedef CArrayPtrFlat<CCSSSimpleSelector> CCSSSimpleSelectorList; - -// CLASS DECLARATION - -/** -* This class represents the CSS Selector -* -* @lib css.lib -* @since 2.1 -*/ -class CCSSSelector : public CBase -{ - public: // Constructors and destructor - - // constructor - CCSSSelector(TText8* aSelector, TUint16 aSpecificity, TInt aBufferIndex) - { - iSelector = aSelector; - iSpecificity = aSpecificity; - iBufferIndex = aBufferIndex; - iSimpleSelectorList = NULL; - } - - // constructor - CCSSSelector() - { - iSelector = NULL; - iSpecificity = 0; - iBufferIndex = 0; - iSimpleSelectorList = NULL; - } - - - /** - * Destructor. - */ - virtual ~CCSSSelector() - { - if (iSimpleSelectorList) - { - iSimpleSelectorList->ResetAndDestroy(); - delete iSimpleSelectorList; - } - } - - public: // New functions - - // constructor - void Init(TText8* aSelector, TUint16 aSpecificity, TInt aBufferIndex) - { - iSelector = aSelector; - iSpecificity = aSpecificity; - iBufferIndex = aBufferIndex; - } - - private: - - public: // Data - - // pointer to selector start in the CSS buffer. This is not owned by this class - TText8* iSelector; - - // selector specoficity - TUint16 iSpecificity; - - // index of the CSS buffer in the buffer lits - TInt iBufferIndex; - - // simple selector list in the selector - CCSSSimpleSelectorList* iSimpleSelectorList; -}; - -#endif /* CCSSRule_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/CSSVariableStyleSheet.h --- a/webengine/wmlengine/src/css/include/CSSVariableStyleSheet.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,326 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Map containing the Variable CSS style rules -* -*/ - - -#ifndef CCSSVariableStyleSheet_H -#define CCSSVariableStyleSheet_H - -// INCLUDES -#include <e32base.h> -#include "nw_css_defaultstylesheeti.h" -#include "CSSRuleList.h" - -// CONSTANTS - -// MACROS - -// FUNCTION PROTOTYPES -class TCSSParser; -struct TCSSPropertyTablePropEntry; - -// CLASS DECLARATION - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - extern NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - - - -/** ***************************************************************** - * These structs are simple wrappers for the css property and string - * entries. They wrap the same structures found in the default style - * sheets. Note that a flag indicates whether they entry is a static - * referring to the fixed table or a dynamic one referring to the - * dynamic one. The dynamic (e.g. variable) entry is heap allocated and - * as such it and its components should be deallocated. - * - * @lib css.lib - * @since 2.7 - ******************************************************************* */ - -typedef struct _TCSSStringEntry{ - TBool variableEntry; - NW_Ucs2* entry; -}TCSSStringEntry; - - -typedef struct _TCSSPropEntry{ - TInt key; // MUST BE FIRST - TBool variableEntry; - NW_CSS_DefaultStyleSheet_PropEntry_s* entry; -}TCSSPropEntry; - -// DATA TYPES -typedef RArray<TCSSStringEntry> CCSSStringEntryList; -typedef RArray<TCSSPropEntry> CCSSPropEntryList; - -/** ***************************************************************** - * The CCSSVariableStyleSheet is a repository for the default and - * variable style sheet entries. If no entries variable entries are - * found (i.e. file not found or corrupt) then only the default entries - * will be used to populate the structure. - * - * @lib css.lib - * @since 2.7 - ******************************************************************* */ -class CCSSVariableStyleSheet : public CBase -{ - - -public: // Constructors and destructor - - /** - * Two-phased constructor. It is private because it is created as a - * singleton and shared. - * @return CCSSVariableStyleSheet* - */ - static CCSSVariableStyleSheet* NewL(); - - /** - * Creates the CCSSVariableStyleSheet singleton. - * @since 2.7 - * @return style sheet. - */ - static CCSSVariableStyleSheet* CreateSingleton(); - - /** - * Deletes the CCSSVariableStyleSheet singleton. - * @since 2.7 - * @return void. - */ - static void DeleteSingleton(); - - /** - * Get the CCSSVariableStyleSheet singleton. If it doesn't exist - * then return NULL. - * @since 2.7 - * @return a pointer to CCSSVariableStyleSheet - */ - static CCSSVariableStyleSheet* GetSingleton(); - -/** - * Applies the combined variable and default styles to the element node - * in the document after pattern matching. This is called frequently by - * XHTMLElementHandler. Duplicates have already been removed so that the - * default and variable styles do not need to be treated differently or - * applied separately. - * - * @param elementNode Element node for which pattern matching needs to be done - * @param box Box to which CSS is applied - * @param dictionary - * @param event event resulting in style application (for e.g. focus) - * This is usually NULL. - * @param documentNode - * @param domHelper for resolving entities - * @since 2.7 - * @return KBrsrSuccess or KBrsrOutOfMemory - */ -TBrowserStatusCode ApplyStyles(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, - NW_WBXML_Dictionary_t* aDictionary, - const NW_Evt_Event_t* aEvent, - NW_HED_DocumentNode_t* aDocumentNode, - NW_HED_DomHelper_t* aDomHelper); - -/** - * Parses the loaded variable CSS buffer stores entries in the tables. - * @param buffer data to parse. Stored as text - * @param length size of buffer in bytes. Does not include a null terminator - * @return ETrue if parsed. - */ -TBool ProcessBuffer(const TUint8* aBuffer, TUint32 aLength); - -/** - * Accessor for the state of the default property sheet. It is true if - * the values were successfully loaded. - * @return ETrue if loaded - */ -TBool IsStaticCSSLoaded(){ - return iStaticCSSLoaded; -} - - -/** - * Accessor for the state of the variable property sheet. It is true if - * the values were successfully loaded. - * @return ETrue if loaded - */ -TBool IsVariableCSSLoaded(){ - return iVariableCSSLoaded; -} - -private: // Data - - TBool iStaticCSSLoaded; - TBool iVariableCSSLoaded; - CCSSPropEntryList* iPropList; - CCSSStringEntryList* iStringList; - -private: - -/** - * C++ default constructor. - */ - - /** - * By default Symbian 2nd phase constructor is private. - */ -void ConstructL(); - - -/** - * Destructor. It is private because it is created as a singleton. - */ - virtual ~CCSSVariableStyleSheet(); - - -/** - * Assignment operator. It is private because it should not be called. - */ -void operator=(const CCSSVariableStyleSheet& obj); - - -/** - * Loads a file into the buffer. Looks first in on the C drive and then - * if not found looks on the Z drive. - * @return Pointer to buffer containing loaded file contents. - * Otherwise returns NULL. - */ - HBufC8* ReadVariableCSSFile(); - - -/** - * Loads a file into the buffer. This is a generic utility. - * @return Pointer to buffer containing loaded file contents. - * Otherwise returns NULL. - */ - HBufC8* ReadFile(const TDesC& aFile); - - -/** - * Parses the css file that has been loaded. The results are stored into - * the variable style sheet list. Duplicates are ignored. That is, the - * first entry is added and subsequent duplicates are ignored. This list - * is added before the lower priority default list so if a duplicate is - * found it is assumed to be equal or higher priority. - * @param buffer The buffer contains the css variable file. - * @return ETrue if successfully parsed. Otherwise it returns EFalse - */ - TBool AddVariableStyles(HBufC8* aBuffer); - - -/** - * Loads the CSS strings from the default tables. These are placed in a - * string table. - */ - void AddDefaultStyleStrings(); - - -/** - * Loads the default css styles. They are merged with the previously - * loaded variable styles. That is, if a style is not found in the list - * it is added. If it is already present the default value is - * ignored. Duplicates are not allowed. Note that if duplicates exist in - * this default list, only the first entry is applied. - */ - void AddDefaultStyleProperties(); - - -/** - * Initializes the property using the entry loaded from the variable table. - * @param propEntry Default/variable entry to be applied. - * @param prop Property that is being initialized. - * @param box Box to which CSS is applied - * @param val Value to apply. Requires valType for interpretation. - * @param valType Data type - * @return KBrsrSuccess if operation successful. Otherwise KBrsrFailure. - */ -TBrowserStatusCode InitProperty(const TCSSPropertyTablePropEntry* aPropEntry, - NW_LMgr_Property_t* aProp, - NW_LMgr_Box_t* aBox, - NW_Float32 aVal, - NW_Uint8 aValType); - - -/** - * Adds the styles for the element to the list. - * @param aParser loaded parser for the style sheet - * @param aRuleList list for this element token - * @param aElementToken - * @return KBrsrSuccess if operation successful. Otherwise KBrsrFailure. - */ -TBrowserStatusCode UpdateList(TCSSParser* aParser, - CCSSRules* aRuleList, - NW_Uint16 aElementToken); - -/** - * Updates one entry in the list. - * @param aParser The parser - * @param aElementToken The token to add - * @param aAsciiPatternStr Optional pattern to include with token. - * @return Status of operation - */ -TBrowserStatusCode UpdateEntry(TCSSParser* aParser, - TUint16 aElementToken, - char* aAsciiPatternStr); - - -/** - * Wrapper method to call the correct setting method. - * @param aParser The parser. - * @param aVal The property value type - * @param aPropertyValue The actual value. - * @param aValStorage The text value - * @return Property type - */ -NW_LMgr_PropertyValueType_t SetPropertyVal(TCSSParser* aParser, - const TCSSPropertyTablePropEntry* aPropEntry, - NW_LMgr_PropertyValue_t* aVal, - TCSSPropertyVal* aPropertyVal, - TText16* aValStorage); - -/** - * Inserts a value into the list. If there is an error or a duplicate - * the value is not entered. - * @param aPropEntry Value to enter into the list. - * @return index of inserted value or -1 if error - */ -TInt InsertProperty(TCSSPropEntry aPropEntry); - - -/** - * Dumps the contents of the style sheet to the log. - */ -TBrowserStatusCode DumpVariableStyleSheet(); - -void ConstructCSSFileName(); - -TFileName CSS_USER_SUPPLIED_FILE; -TFileName CSS_OPERATOR_SUPPLIED_FILE; - - - -}; - - -#endif /* CCSSVariableStyleSheet_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/NW_CSS_EXPORT.h --- a/webengine/wmlengine/src/css/include/NW_CSS_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_CSS_EXPORT_h_ -#define _NW_CSS_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_CSS_EXPORT -#ifdef NW_IMPORT -#define NW_CSS_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_CSS_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_CSS_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_CSS_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_defaultstylesheet.h --- a/webengine/wmlengine/src/css/include/nw_css_defaultstylesheet.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_DEFAULTSTYLESHEET_H -#define NW_CSS_DEFAULTSTYLESHEET_H - -#include "nw_object_base.h" -#include "nw_lmgr_propertylist.h" -#include "nw_dom_element.h" -#include "nw_wbxml_dictionary.h" -#include "nw_evt_event.h" -#include "nw_lmgr_box.h" -#include "nw_hed_documentnode.h" -#include "nw_hed_domhelper.h" -#include "NW_CSS_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ - -typedef struct NW_CSS_DefaultStyleSheet_Class_s NW_CSS_DefaultStyleSheet_Class_t; -typedef struct NW_CSS_DefaultStyleSheet_s NW_CSS_DefaultStyleSheet_t; - -typedef struct NW_CSS_DefaultStyleSheet_PropEntry_s NW_CSS_DefaultStyleSheet_PropEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_CSS_DefaultStyleSheet_ClassPart_s { - NW_Uint32 numPropertyVals; - const NW_CSS_DefaultStyleSheet_PropEntry_t* propertyVals; - NW_Uint32 numStringVals; - const NW_Ucs2* const * stringVals; -} NW_CSS_DefaultStyleSheet_ClassPart_t; - -struct NW_CSS_DefaultStyleSheet_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_CSS_DefaultStyleSheet_ClassPart_t NW_CSS_DefaultStyleSheet; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_CSS_DefaultStyleSheet_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_CSS_DefaultStyleSheet_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_CSS_DefaultStyleSheet)) - - -#define NW_CSS_DefaultStyleSheetOf(_object) \ - (NW_Object_Cast (_object, NW_CSS_DefaultStyleSheet)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_CSS_EXPORT const NW_CSS_DefaultStyleSheet_Class_t NW_CSS_DefaultStyleSheet_Class; -NW_CSS_EXPORT const NW_CSS_DefaultStyleSheet_t NW_CSS_DefaultStyleSheet; - -/* -------------------------------------------------------------------------- * - final methods - * ---------------------------------------------------------------------------*/ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_DEFAULTSTYLESHEET_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_defaultstylesheeti.h --- a/webengine/wmlengine/src/css/include/nw_css_defaultstylesheeti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_DEFAULTSTYLESHEETI_H -#define NW_CSS_DEFAULTSTYLESHEETI_H - -#include "nw_object_basei.h" -#include "nw_css_defaultstylesheet.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ - -struct NW_CSS_DefaultStyleSheet_PropEntry_s -{ - NW_Uint16 elementToken; - NW_LMgr_PropertyName_t name; - NW_Float32 val; - NW_LMgr_PropertyValueType_t valType; - NW_Byte* pattern; -}; - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_DEFAULTSTYLESHEETI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_processor.h --- a/webengine/wmlengine/src/css/include/nw_css_processor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_PROCESSOR_H -#define NW_CSS_PROCESSOR_H - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "nw_object_dynamic.h" -#include "nw_hed_documentnode.h" -#include "nw_hed_domhelper.h" -#include "nw_text_ucs2.h" -#include "nw_dom_element.h" -#include "nw_lmgr_box.h" -#include "nw_hed_iloadrecipient.h" -#include "nw_image_iimageobserver.h" - -#include "NW_CSS_EXPORT.h" -#include "nw_image_abstractimage.h" -#include "nwx_osu_file.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_CSS_Processor_Class_s NW_CSS_Processor_Class_t; -typedef struct NW_CSS_Processor_s NW_CSS_Processor_t; - - -typedef -TBrowserStatusCode -(*NW_CSS_Processor_ApplyCSSCallbk_t)(void* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box); - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_CSS_Processor_ClassPart_s { - void** unused; -} NW_CSS_Processor_ClassPart_t; - -struct NW_CSS_Processor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_CSS_Processor_ClassPart_t NW_CSS_Processor; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_CSS_Processor_s -{ - NW_Object_Dynamic_t super; - - /* interface implementations */ - NW_HED_ILoadRecipient_t NW_HED_ILoadRecipient; - NW_Image_IImageObserver_t NW_Image_IImageObserver; - - /* member variables */ - NW_HED_DocumentNode_t* owner; - void* imageList; - void* iLoadList; - NW_CSS_Processor_ApplyCSSCallbk_t applyCSSCallback; - void* cssHandler; - NW_ADT_DynamicVector_t* pendingLoads; - NW_Bool isSavedDeck; - NW_Bool isHistLoad; - NW_Bool isReLoad; - void* ruleList; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_CSS_Processor_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_CSS_Processor)) - - -#define NW_CSS_ProcessorOf(_object) \ - (NW_Object_Cast (_object, NW_CSS_Processor)) - - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_CSS_EXPORT const NW_CSS_Processor_Class_t NW_CSS_Processor_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_CSS_Processor_SetOwner(_object, _owner) \ - ((NW_CSS_ProcessorOf(_object))->owner = (_owner)) - -#define NW_CSS_Processor_SetApplyCSSCallback(_object, _applyCSSCallback) \ - ((NW_CSS_ProcessorOf(_object))->applyCSSCallback = (_applyCSSCallback)) - -#define NW_CSS_Processor_GetApplyCSSCallback(_object) \ - ((NW_CSS_ProcessorOf(_object))->applyCSSCallback) - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* called by linkElementHandler or PiHandler to load external stylesheet - the encoding will be NULL, if there was not charset attribute found - */ -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_Load(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Text_t* encoding, - NW_Bool isSavedDeck, - NW_Bool isHistLoad, - NW_Bool isReLoad); - -/** Get images according to the CSS image list, mainly used to show image when user setting has - * auto image load disabled. - * Called by Epoc32ContentHandler_ImageViewer_load. - */ -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_ShowImages(NW_CSS_Processor_t* thisObj); - -/* called by NW_XHTML_ElementHandler_ApplyStyles - now */ -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_ApplyStyles(NW_CSS_Processor_t* thisObj, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - const NW_Evt_Event_t* event, - NW_HED_DomHelper_t* domHelper); - - -TBrowserStatusCode -NW_CSS_Processor_ResolveURL (NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Text_t** retUrl, - TInt aBufferIndex); - -/* called by NW_CSS_DeclarationListHandle_ApplyStyles */ -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_GetImage(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propName, - NW_Image_AbstractImage_t** image, - TInt aBufferIndex); - -/* invoked by styleElementHandler */ -TBrowserStatusCode NW_CSS_Processor_ProcessBuffer(NW_CSS_Processor_t* thisObj, - NW_Byte* data, NW_Uint32 length, NW_Uint32 encoding, NW_Bool doNotDelete); - -TBrowserStatusCode -NW_CSS_Processor_SetImage(NW_CSS_Processor_t* thisObj, - NW_Byte* data, - NW_Uint32 length, - NW_Http_ContentTypeString_t contentTypeString, - NW_Text_t* url); - -TBrowserStatusCode -NW_CSS_Processor_ProcessLoadRequest(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Uint8 loadType, - NW_Bool isSavedDeck, - NW_Bool isHistLoad, - NW_Bool isReLoad, - TInt aCssBufferIndex); - -/* invoked after the XHTML document has been displayed */ -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_ApplyStyleSheet(NW_CSS_Processor_t* thisObj); - -/* invoked after the XHTML contenthandler suspend */ -NW_CSS_EXPORT -void -NW_CSS_Processor_Suspend(NW_CSS_Processor_t* thisObj); - -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_ApplyStyleAttribute(NW_CSS_Processor_t* thisObj, NW_Text_t* styleVal, NW_LMgr_Box_t* box); - -NW_CSS_EXPORT -NW_Uint32 -NW_CSS_Processor_GetNumCSSImages(NW_CSS_Processor_t* thisObj); - -NW_CSS_EXPORT -NW_Uint32 -NW_CSS_Processor_GetNumStyleSheets(NW_CSS_Processor_t* thisObj); - -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_ProcessPendingLoads(NW_CSS_Processor_t* thisObj); - -NW_CSS_EXPORT -TBrowserStatusCode -NW_CSS_Processor_WriteMultipartSegment(NW_CSS_Processor_t* thisObj, - NW_Osu_File_t fh, - NW_Uint32 numCSSImages, - NW_Uint32 numStyleSheets); - -NW_CSS_EXPORT -void -NW_CSS_Processor_SetDictionary(NW_CSS_Processor_t* thisObj, NW_WBXML_Dictionary_t* dictionary); - -#ifdef _BROWSER_ENG_DEBUG - -NW_CSS_EXPORT -void NW_CSS_Processor_PrintProperties(NW_LMgr_Box_t* box); - -#endif /* _BROWSER_ENG_DEBUG */ - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_CSS_EXPORT -NW_CSS_Processor_t* -NW_CSS_Processor_New(); - -/* Based on the displayVal, replaces the box type */ -TBrowserStatusCode -NW_CSS_Processor_HandleDisplayVal (NW_LMgr_Box_t** box, NW_LMgr_PropertyValue_t *displayVal); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_PROCESSOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_processori.h --- a/webengine/wmlengine/src/css/include/nw_css_processori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_PROCESSORI_H -#define NW_CSS_PROCESSORI_H - -#include "nw_object_dynamici.h" -#include "nw_css_processor.h" -#include "nw_image_iimageobserveri.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ - -/* Note: use "volatile" keyword to suppress compiler optimizer bug */ -/* which changes store/load operation into a data-type cast */ -typedef volatile union NW_CSS_Processor_LoadData_u{ - TInt bufferIndex; - NW_Text_t* url; -}NW_CSS_Processor_LoadData_t; - -typedef struct NW_CSS_Processor_PendingLoad_s { - NW_Bool isSavedDeck; - NW_Bool isHistLoad; - NW_Bool isReLoad; - NW_Text_t* url; - TInt cssBufferIndex; -} NW_CSS_Processor_PendingLoad_t; - -typedef struct NW_CSS_Processor_LoadContext_s{ - NW_Uint8 loadType; - NW_Int32 bufferIndex; -}NW_CSS_Processor_LoadContext_t; - -enum NW_CSS_Processor_Type_e{ - NW_CSS_Processor_LoadImage = 1, - NW_CSS_Processor_LoadCSS -}; - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -NW_CSS_EXPORT const NW_HED_ILoadRecipient_Class_t NW_CSS_Processor_ILoadRecipient_Class; -NW_CSS_EXPORT const NW_Image_IImageObserver_Class_t NW_CSS_Processor_IImageObserver_Class; -NW_CSS_EXPORT const NW_Object_Class_t* const NW_CSS_Processor_InterfaceList[]; - -/* ------------------------------------------------------------------------- * - virtual methods implementation declaration - * ------------------------------------------------------------------------- */ - -NW_CSS_EXPORT -TBrowserStatusCode -_NW_CSS_Processor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_CSS_EXPORT -void -_NW_CSS_Processor_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_CSS_EXPORT -TBrowserStatusCode -_NW_CSS_Processor_ILoadRecipient_ProcessPartialLoad(NW_HED_ILoadRecipient_t* loadListener, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData); -extern -void -_NW_CSS_Processor_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ); - -extern -void -_NW_CSS_Processor_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -extern -void -_NW_CSS_Processor_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -extern -void -_NW_CSS_Processor_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed); - -extern -void -_NW_CSS_Processor_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - - -NW_Bool -_NW_CSS_Processor_IImageObserver_IsVisible(NW_Image_IImageObserver_t* aImageObserver); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_PROCESSORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_tokentoint.h --- a/webengine/wmlengine/src/css/include/nw_css_tokentoint.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_TOKENTOINT_H -#define NW_CSS_TOKENTOINT_H - -#include "NW_CSS_EXPORT.h" -#include "nw_object_base.h" -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ - -typedef struct NW_CSS_TokenToInt_Class_s NW_CSS_TokenToInt_Class_t; -typedef struct NW_CSS_TokenToInt_s NW_CSS_TokenToInt_t; - -typedef struct NW_CSS_TokenToInt_Entry_s -{ - NW_LMgr_PropertyValueToken_t token; - NW_Uint32 val; -}NW_CSS_TokenToInt_Entry_t; - -typedef struct NW_CSS_TokenToDec_Entry_s -{ - NW_LMgr_PropertyValueToken_t token; - NW_Float32 val; -}NW_CSS_TokenToDec_Entry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_CSS_TokenToInt_ClassPart_s { - NW_Uint32 numFontSizeVals; - const NW_CSS_TokenToDec_Entry_t* fontSizeList; - NW_Uint32 numBorderWidthVals; - const NW_CSS_TokenToInt_Entry_t* borderWidthList; -} NW_CSS_TokenToInt_ClassPart_t; - -struct NW_CSS_TokenToInt_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_CSS_TokenToInt_ClassPart_t NW_CSS_TokenToInt; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_CSS_TokenToInt_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_CSS_TokenToInt_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_CSS_TokenToInt)) - -#define NW_CSS_TokenToIntOf(_object) \ - (NW_Object_Cast (_object, NW_CSS_TokenToInt)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_CSS_EXPORT const NW_CSS_TokenToInt_Class_t NW_CSS_TokenToInt_Class; -NW_CSS_EXPORT const NW_CSS_TokenToInt_t NW_CSS_TokenToInt; - -/* -------------------------------------------------------------------------- * - final methods - * ---------------------------------------------------------------------------*/ - -NW_CSS_EXPORT -NW_Bool -NW_CSS_TokenToInt_GetFontSize(NW_CSS_TokenToInt_t* tokenToInt, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box, - NW_Float32* value); - -NW_CSS_EXPORT -NW_Int32 -NW_CSS_TokenToInt_GetFontWeight(NW_CSS_TokenToInt_t* thisObj, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box); - -NW_CSS_EXPORT -NW_Int32 -NW_CSS_TokenToInt_GetBorderWidth(NW_CSS_TokenToInt_t* tokenToInt, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box); - -NW_CSS_EXPORT -NW_Int32 -NW_CSS_TokenToInt_GetColorVal(NW_CSS_TokenToInt_t* thisObj, - NW_Bool transparentAllowed, - NW_LMgr_PropertyValueToken_t token); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_TOKENTOINT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/include/nw_css_tokentointi.h --- a/webengine/wmlengine/src/css/include/nw_css_tokentointi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSS_TOKENTOINTI_H -#define NW_CSS_TOKENTOINTI_H - -#include "nw_object_basei.h" -#include "nw_css_tokentoint.h" -#include "nw_lmgr_cssproperties.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSS_TOKENTOINTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSBufferList.cpp --- a/webengine/wmlengine/src/css/src/CSSBufferList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different CSS stylesheets that are applied to document -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "CSSBufferList.h" -#include <nwx_assert.h> -#include "nwx_multipart_generator.h" -#include "nwx_string.h" -#include "nwx_http_defs.h" -#include "nwx_settings.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// CCSSBufferEntry::NewL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -CCSSBufferEntry* CCSSBufferEntry::NewL(TText8* aData, TUint32 aLength, TUint32 aEncoding, - TBool aInternalStyle, const TText16* aUrl) - { - CCSSBufferEntry* self = new(ELeave)CCSSBufferEntry(aData, aLength, aEncoding, aInternalStyle); - CleanupStack::PushL(self); - if (aUrl != NULL) - { - self->iUrl = NW_Str_Newcpy(aUrl); - if (self->iUrl == NULL) - { - User::Leave(KErrNoMemory); - } - } - CleanupStack::Pop(); // self - return self; - } - -// ----------------------------------------------------------------------------- -// CCSSBufferList::CCSSBufferList -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCSSBufferList::ConstructL() - { - // initialize the bufferList - iBufferList = new (ELeave) CBufferListArray(2); - } - -// ----------------------------------------------------------------------------- -// CCSSBufferList::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSBufferList* CCSSBufferList::NewL() - { - CCSSBufferList* self = new( ELeave ) CCSSBufferList(); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// Destructor -CCSSBufferList::~CCSSBufferList() -{ - if(iBufferList) - { - iBufferList->ResetAndDestroy(); - } - delete iBufferList; -} - - -// ----------------------------------------------------------------------------- -// CCSSBufferList::AddL -// adds CSS stylesheet to list -// ----------------------------------------------------------------------------- -// -void -CCSSBufferList::AddL(TText8* aBuffer, TUint32 aLength, TUint32 aEncoding, - TBool aInternalStyle, TText16* aUrl) -{ - // entry to be inserted - CCSSBufferEntry* tempEntry = CCSSBufferEntry::NewL(aBuffer, aLength, aEncoding, aInternalStyle, aUrl); - CleanupStack::PushL( tempEntry ); - TInt size = iBufferList->Count(); - tempEntry->iPriority = size; - - // create a new entry and initialize it */ - iBufferList->AppendL(tempEntry); - - CleanupStack::Pop(); // tempEntry -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::InitializeParser -// adds CSS stylesheet to list -// ----------------------------------------------------------------------------- -// -void -CCSSBufferList::InitializeParser(TCSSParser* aParser, TInt aIndex) -{ - CCSSBufferEntry* entry = iBufferList->At(aIndex); - NW_ASSERT(entry->iData); - aParser->Init(entry->iData, entry->iLength, entry->iEncoding); -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::UpdateEntry -// This method is Invoked when a load respose comes back for a CSS -// ----------------------------------------------------------------------------- -// -void -CCSSBufferList::UpdateEntry(TText8* aData, TUint32 aLength, TUint32 aEncoding, TInt aIndex) -{ - CCSSBufferEntry* entry = iBufferList->At(aIndex); - entry->iData = aData; - entry->iLength = aLength; - entry->iEncoding = aEncoding; -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::GetEncoding -// returns encoding of the CSS in aIndex -// ----------------------------------------------------------------------------- -// -TUint32 -CCSSBufferList::GetEncoding(TInt aIndex) -{ - CCSSBufferEntry* entry = iBufferList->At(aIndex); - return entry->iEncoding; -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::GetSize -// Returns number of CSS objects -// ----------------------------------------------------------------------------- -// -TInt CCSSBufferList::GetSize() -{ - return iBufferList->Count(); -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::GetExternalSize -// Returns number of externally loaded CSS objects -// ----------------------------------------------------------------------------- -// -TInt CCSSBufferList::GetExternalSize() -{ - TInt externalSize = 0; - TInt size = GetSize(); - - /* for convenience */ - for (TInt index = 0; index < size; index++) - { - CCSSBufferEntry* entry = iBufferList->At(index); - - /* If it was loaded externally, the url will be set */ - if (entry->iUrl != NULL) - { - externalSize++; - } - } - return externalSize; -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::WriteMultipartSegments -// Write CSS components to a file in the form of multipart segments. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CCSSBufferList::WriteMultipartSegments(NW_Osu_File_t aFh) -{ - TUint originalEncoding = NW_Settings_GetOriginalEncoding(); - - TBrowserStatusCode retStatus = KBrsrSuccess; - - TInt size = GetSize(); - for (TInt index = 0; index < size; index++) - { - TText8* segment = NULL; - TUint32 segmentLen = 0; - - CCSSBufferEntry* entry = iBufferList->At(index); - - /* If it was loaded externally, the url will be set */ - if (entry->iUrl != NULL) - { - - char* url = NW_Str_CvtToAscii(entry->iUrl); - if (url == NULL) - { - return KBrsrOutOfMemory; - } - else - { - retStatus = NW_CreateMultipartSegment - ( - entry->iEncoding, - originalEncoding, //this parameter is used by saved deck, it doesn't matter here. - (NW_Http_ContentTypeString_t)HTTP_text_css_string, - url, - entry->iData, - entry->iLength, - &segment, - &segmentLen - ); - NW_Mem_Free(url); - url = NULL; - } - if (retStatus != KBrsrSuccess) - return retStatus; - - retStatus = NW_Osu_WriteFile(aFh, segment, segmentLen); - NW_Mem_Free(segment); - if (retStatus != KBrsrSuccess) - return retStatus; - } - } - return retStatus; -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::UpdatePriority -// This method is Invoked after adding a buffer for an @import request -// ----------------------------------------------------------------------------- -// -void -CCSSBufferList::UpdatePriority(TInt aRefIndex) -{ - CCSSBufferEntry* entry1 = iBufferList->At(aRefIndex); - TInt refPriority = entry1->iPriority; - - TInt size = GetSize(); - CCSSBufferEntry* entry2 = iBufferList->At(size-1); - entry2->iPriority = refPriority; - iBufferList->At(size-1) = entry2; - - for (TInt index = 0; index < (size-1); index++) - { - CCSSBufferEntry* entry = iBufferList->At(index); - if (entry->iPriority >= refPriority) - { - entry->iPriority++; - iBufferList->At(index) = entry; - } - } -} - -// ----------------------------------------------------------------------------- -// CCSSBufferList::GetPriority -// Returns priority of stylesheet -// ----------------------------------------------------------------------------- -// -TInt -CCSSBufferList::GetPriority(TInt aIndex) -{ - CCSSBufferEntry* entry = iBufferList->At(aIndex); - return entry->iPriority; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSDeclListHandle.cpp --- a/webengine/wmlengine/src/css/src/CSSDeclListHandle.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1130 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS property -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include <e32base.h> -#include <nwx_assert.h> -#include "CSSDeclListHandle.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_rootbox.h" -#include "CSSPropVal.h" -#include "nwx_math.h" -#include <nwx_string.h> -#include "CSSReader.h" -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -#define TCSSDeclListHandleMaxVals 6 - -enum TCSSDeclListHandleBoxModelSides -{ - SHORTHAND, - TOP, - BOTTOM, - LEFT, - RIGHT -}; - -static const NW_LMgr_PropertyName_t borderProps[] = -{ - NW_CSS_Prop_border, - NW_CSS_Prop_borderTop, - NW_CSS_Prop_borderBottom, - NW_CSS_Prop_borderLeft, - NW_CSS_Prop_borderRight, -}; - -static const NW_LMgr_PropertyName_t borderWidthProps[] = -{ - NW_CSS_Prop_borderWidth, - NW_CSS_Prop_topBorderWidth, - NW_CSS_Prop_bottomBorderWidth, - NW_CSS_Prop_leftBorderWidth, - NW_CSS_Prop_rightBorderWidth, -}; - -static const NW_LMgr_PropertyName_t borderStyleProps[] = -{ - NW_CSS_Prop_borderStyle, - NW_CSS_Prop_topBorderStyle, - NW_CSS_Prop_bottomBorderStyle, - NW_CSS_Prop_leftBorderStyle, - NW_CSS_Prop_rightBorderStyle, -}; - -static const NW_LMgr_PropertyName_t borderColorProps[] = -{ - NW_CSS_Prop_borderColor, - NW_CSS_Prop_topBorderColor, - NW_CSS_Prop_bottomBorderColor, - NW_CSS_Prop_leftBorderColor, - NW_CSS_Prop_rightBorderColor, -}; - -static const NW_LMgr_PropertyName_t paddingProps[] = -{ - NW_CSS_Prop_padding, - NW_CSS_Prop_topPadding, - NW_CSS_Prop_bottomPadding, - NW_CSS_Prop_leftPadding, - NW_CSS_Prop_rightPadding, -}; - -static const NW_LMgr_PropertyName_t marginProps[] = -{ - NW_CSS_Prop_margin, - NW_CSS_Prop_topMargin, - NW_CSS_Prop_bottomMargin, - NW_CSS_Prop_leftMargin, - NW_CSS_Prop_rightMargin -}; - -static const NW_LMgr_PropertyName_t* const boxModelProps[] = -{ - borderProps, - borderWidthProps, - borderStyleProps, - borderColorProps, - paddingProps, - marginProps -}; - -// MODULE DATA STRUCTURES - -// FORWARD DECLARATIONS - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -TBool TCSSDeclListHandle::ConvertValueL(NW_LMgr_PropertyName_t aPropName, - TCSSPropertyVal *aInValue, - NW_LMgr_Property_t *aOutProp, - TCSSParser* aParser, - NW_CSS_Processor_t* aProcessor, - NW_LMgr_Box_t *aBox, - TInt aBufferIndex) -{ - NW_LMgr_PropertyValueToken_t token; - TBool status = EFalse; - TInt err; - - /* Find where the value is located */ - TUint32 encoding = aParser->GetEncoding(); - TText16* valStorage = aInValue->val.GetUnicodeL(encoding); - - if (valStorage != NULL) - { - switch (aInValue->type) - { - case URI: - /* URIs are only used to load images */ - TRAP(err, status = TCSSPropVal::SetImageValL(aPropName, aOutProp, valStorage, aProcessor, aBox, aBufferIndex )); - if (err != KErrNone) - { - NW_Mem_Free(valStorage); - User::Leave(err); - } - break; - - case RGB: - case HASH: - TRAP(err, status = TCSSPropVal::SetColorL(aParser, aOutProp, aInValue, valStorage)); - if (err != KErrNone) - { - NW_Mem_Free(valStorage); - User::Leave(err); - } - break; - - case IDENTIFIER: - { - TBool tokenFound = TCSSPropertyTable::GetPropertyValToken(valStorage, &token); - if (tokenFound) - { - status = TCSSPropVal::SetTokenVal(aPropName, aOutProp, token, aBox); - break; - } - } - - /* FALL THROUGH! */ - /*lint -fallthrough*/ - /* If the identifier is not recognized as a token, we interpret is - as a string */ - - case STRING: - aOutProp->value.object = - NW_Text_UCS2_New (valStorage, (TUint16)NW_Str_Strlen (valStorage), - NW_Text_Flags_TakeOwnership); - aOutProp->type = NW_CSS_ValueType_Text; - if (aOutProp->value.object == NULL) - { - NW_Mem_Free(valStorage); - User::Leave(KErrNoMemory); - } - status = ETrue; - break; - - default: - { - /* In all other cases, we assume that we are dealing with a numeric value */ - TText16* endPtr = NULL; - NW_Float32 v; - - /* TODO valStorage could be a real number not just an integer */ - TBrowserStatusCode cnvt = NW_Str_CvtToFloat32(valStorage, &endPtr, &v); - if (cnvt == KBrsrSuccess) - { - status = TCSSPropVal::SetNumberPropVal(aPropName, aOutProp, aInValue->type, v); - } - break; - } - } - - if ((aOutProp->type != NW_CSS_ValueType_Text) || (!status)) - { - NW_Mem_Free(valStorage); - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -void -TCSSDeclListHandle::ApplyCommonPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProperty, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - NW_LMgr_Property_t prop; - TUint32 typeMask; - - /* Get the property entry */ - const TCSSPropertyTablePropEntry* propEntry = TCSSPropertyTable::GetPropEntryByToken(aPropName); - - /* - Since rules are arranged by decreasing specificity, if a property is - already present, it can be replaced only if the other property is - marked important. However, if the property has been applied within the - current declaration list, it SHOULD be overwritten. - */ - TBrowserStatusCode status = NW_LMgr_Box_GetRawProperty(aBox, aPropName, &prop); - if ((status == KBrsrSuccess) && (!aImportant)) - { - /* This here for DefaultStyleSheet */ - if (aAppliedList == NULL) - { - return; - } - - status = NW_LMgr_PropertyList_Get(aAppliedList, aPropName, &prop); - if (status != KBrsrSuccess) - {//same property is not present in the current declaration list - // but it was there on the box - so don't set it again - return; - } - } - - /* If the property value is of an allowed type, set the property */ - typeMask = 1 << aProperty->type; - - if ( ((typeMask & propEntry->type) != 0) || - ((aProperty->type == NW_CSS_ValueType_Token) && - (aProperty->value.integer == NW_CSS_PropValue_inherit))) - { - if (aDefaultStyle) - { - aProperty->type = (NW_LMgr_PropertyValueType_t) - (aProperty->type | NW_CSS_ValueType_DefaultStyle); - } - status = NW_LMgr_Box_SetProperty(aBox, aPropName, aProperty); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - /* Now zero the object, so it does not get deleted by us */ - if ((aProperty->type == NW_CSS_ValueType_Text) || - (aProperty->type == NW_CSS_ValueType_Image)) - { - aProperty->value.object = NULL; - } - - /* Add the property to the appliedList list */ - if (aAppliedList != NULL) - { - prop = *aProperty; - prop.type = (NW_LMgr_PropertyValueType_t)(prop.type | NW_CSS_ValueType_Copy); - if (aDefaultStyle) - { - prop.type = (NW_LMgr_PropertyValueType_t) - (prop.type | NW_CSS_ValueType_DefaultStyle); - } - status = NW_LMgr_PropertyList_Set(aAppliedList, aPropName, &prop); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - } - } - else - { - /* Here we cut people some slack: if the property expects a length, - and the value was specified without a unit, we assume it is a - pixel value. */ - if ( (aProperty->type == NW_CSS_ValueType_Number) && - (propEntry->type & (1 << NW_CSS_ValueType_Px)) ) - { - aProperty->value.integer = (TInt32)aProperty->value.decimal; - aProperty->type = NW_CSS_ValueType_Px; - - if (aDefaultStyle) - { - aProperty->type = (NW_LMgr_PropertyValueType_t) - (aProperty->type | NW_CSS_ValueType_DefaultStyle); - } - - status = NW_LMgr_Box_SetProperty(aBox, aPropName, aProperty); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - /* Add the property to the appliedList */ - if (aAppliedList != NULL) - { - prop = *aProperty; - prop.type = (NW_LMgr_PropertyValueType_t)(prop.type | NW_CSS_ValueType_Copy); - - if (aDefaultStyle) - { - prop.type = (NW_LMgr_PropertyValueType_t)(prop.type | NW_CSS_ValueType_DefaultStyle); - } - status = NW_LMgr_PropertyList_Set(aAppliedList, aPropName, &prop); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - }//if (aAppliedList != NULL) - } - }//else -} - -/* ------------------------------------------------------------------------- */ -void -TCSSDeclListHandle::ApplyBoxModelPropertyL(NW_LMgr_PropertyName_t aPropName, - const NW_LMgr_PropertyName_t *aProps, - NW_LMgr_Property_t *aPropertyVals, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - TBool mustExpand = NW_FALSE; - NW_LMgr_Property_t topValue, bottomValue, leftValue, rightValue; - TCSSDeclListHandleBoxModelSides side; - NW_LMgr_Property_t p, pCopy; - TUint8 index; - TBool isLocal = NW_FALSE; - TBrowserStatusCode status; - - if ((aPropName == aProps[SHORTHAND]) && (aNumVals == 1)) - { - side = TOP; - while (side <= RIGHT) - { - status = NW_LMgr_Box_GetPropertyFromList(aBox, aProps[side], &p); - if (status == KBrsrSuccess) - { - mustExpand = NW_TRUE; - break; - } - side = (TCSSDeclListHandleBoxModelSides)(side + 1); - } - - if (!mustExpand) - { - TCSSDeclListHandle::ApplyCommonPropertyL(aProps[SHORTHAND], - &(aPropertyVals[0]), aImportant, aAppliedList, aBox, aDefaultStyle); - return; - } - } - - /* First check whether the shorthand property is already set */ - status = NW_LMgr_Box_GetPropertyFromList(aBox, aProps[SHORTHAND], &p); - if (status == KBrsrSuccess) - { - if (aAppliedList != NULL) - { - status = NW_LMgr_PropertyList_Get(aAppliedList, aProps[SHORTHAND], &p); - if (status == KBrsrSuccess) - { - isLocal = NW_TRUE; - } - } - if (aImportant || isLocal) - { - (void)NW_LMgr_Box_RemoveProperty(aBox, aProps[SHORTHAND]); - - if (isLocal) - { - (void)NW_LMgr_PropertyList_Remove(aAppliedList, aProps[SHORTHAND]); - } - pCopy = p; - pCopy.type = (NW_LMgr_PropertyValueType_t)(p.type | NW_CSS_ValueType_Copy); - side = TOP; - while (side <= RIGHT) - { - status = NW_LMgr_Box_SetProperty(aBox, aProps[side], &p); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - if (isLocal) - { - status = NW_LMgr_PropertyList_Set(aAppliedList, aProps[side], &pCopy); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - } - side = (TCSSDeclListHandleBoxModelSides)(side + 1); - } - }// if (important || isLocal) - else - { - /* Delete all the values */ - for (index = 0; index < aNumVals; index++) - { - if (aPropertyVals[index].type == NW_CSS_ValueType_Text) - { - NW_Object_Delete(aPropertyVals[index].value.object); - } - } - return; - } - } - - /* Now set the appropriate values */ - if (aPropName == aProps[SHORTHAND]) - { - switch (aNumVals) - { - case 1: - topValue = aPropertyVals[0]; - bottomValue = aPropertyVals[0]; - leftValue = aPropertyVals[0]; - rightValue = aPropertyVals[0]; - break; - - case 2: - topValue = aPropertyVals[0]; - bottomValue = aPropertyVals[0]; - leftValue = aPropertyVals[1]; - rightValue = aPropertyVals[1]; - break; - - case 3: - topValue = aPropertyVals[0]; - bottomValue = aPropertyVals[2]; - leftValue = aPropertyVals[1]; - rightValue = aPropertyVals[1]; - break; - - default: - topValue = aPropertyVals[0]; - bottomValue = aPropertyVals[2]; - leftValue = aPropertyVals[3]; - rightValue = aPropertyVals[1]; - break; - } - - /* Finally, apply the properties */ - - TCSSDeclListHandle::ApplyCommonPropertyL(aProps[TOP], &topValue, aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(aProps[BOTTOM], &bottomValue, aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(aProps[LEFT], &leftValue, aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(aProps[RIGHT], &rightValue, aImportant, aAppliedList, aBox, aDefaultStyle); - } - else - { - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aPropertyVals[0]), aImportant, aAppliedList, aBox, aDefaultStyle); - } -} - -/* ------------------------------------------------------------------------- */ -void -TCSSDeclListHandle::ApplyBorderPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aPropertyVals, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - //lint --e{661} Warning -- Possible access of out-of-bounds pointer, borderColorProps[boxSide] - - TUint8 boxSide; - /* find box model property type */ - for (boxSide = SHORTHAND; boxSide <= RIGHT; boxSide ++) - { - if (borderProps[boxSide] == aPropName) - { - break; - } - } - - /* Go through the values and apply them */ - for (TUint8 index = 0; index < aNumVals && index < 3; index ++) - { - - switch (aPropertyVals[index].type) - { - case NW_CSS_ValueType_Color: - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderColorProps[boxSide], - borderColorProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_ValueType_Token: - if (aPropertyVals[index].value.token == NW_CSS_PropValue_inherit) - { - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderWidthProps[boxSide], - borderWidthProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderStyleProps[boxSide], - borderStyleProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderColorProps[boxSide], - borderColorProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - } - else - { - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderStyleProps[boxSide], - borderStyleProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - } - break; - - default: - TCSSDeclListHandle::ApplyBoxModelPropertyL(borderWidthProps[boxSide], - borderWidthProps, - &(aPropertyVals[index]), 1, - aImportant, aAppliedList, aBox, aDefaultStyle); - break; - } - } -} - -/* ------------------------------------------------------------------------- */ -void TCSSDeclListHandle::ApplyFontPropertyL(NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - NW_LMgr_PropertyName_t propName; - - /* Go through the values and apply them */ - for (TUint8 index = 0; index < aNumVals && index < 3; index ++) - { - switch (aProps[index].type) - { - - case NW_CSS_ValueType_Text: - propName = NW_CSS_Prop_fontFamily; - break; - - case NW_CSS_ValueType_Integer: - propName = NW_CSS_Prop_fontWeight; - break; - - case NW_CSS_ValueType_Token: - - switch (aProps[index].value.integer) - { - - case NW_CSS_PropValue_normal: - case NW_CSS_PropValue_smallcaps: - propName = NW_CSS_Prop_fontVariant; - break; - - case NW_CSS_PropValue_inherit: - - TCSSDeclListHandle::ApplyCommonPropertyL(NW_CSS_Prop_fontFamily, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(NW_CSS_Prop_fontSize, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(NW_CSS_Prop_fontWeight, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(NW_CSS_Prop_fontVariant, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - - TCSSDeclListHandle::ApplyCommonPropertyL(NW_CSS_Prop_fontStyle, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - - /* - ** TODO: This break should be here, but if it is simply added then propName will not - ** be set for the call to ApplyCommonPropertyL, below. Falling through is - ** benign because propName ends up with a value of "NW_CSS_Prop_fontStyle" - ** which was just called above. - */ - /* break; */ - /*lint -fallthrough*/ - - default: - propName = NW_CSS_Prop_fontStyle; - break; - } - break; - - default: - /* If an illegal value type sneaks in, it will be removed by ApplyProperty */ - propName = NW_CSS_Prop_fontSize; - break; - } - - TCSSDeclListHandle::ApplyCommonPropertyL(propName, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - } -} - -/* ------------------------------------------------------------------------- */ -void TCSSDeclListHandle::ApplyListStylePropertyL(NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - /* Go through the values and apply them */ - for (TUint8 index = 0; index < aNumVals && index < 3; index ++) - { - NW_LMgr_PropertyName_t propName; - - switch (aProps[index].type) - { - - case NW_CSS_ValueType_Image: - propName = NW_CSS_Prop_listStyleImage; - break; - - case NW_CSS_ValueType_Token: - - switch (aProps[index].value.integer) - { - case NW_CSS_PropValue_inside: - case NW_CSS_PropValue_outside: - propName = NW_CSS_Prop_listStylePosition; - break; - - default: - propName = NW_CSS_Prop_listStyleType; - break; - } - break; - - default: - /* If an illegal value type sneaks in, it will be removed by ApplyProperty */ - propName = NW_CSS_Prop_listStyleType; - break; - } - - TCSSDeclListHandle::ApplyCommonPropertyL(propName, &(aProps[index]), - aImportant, aAppliedList, aBox, aDefaultStyle); - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_CSS_DeclarationListHandle_ApplyBackgroundProperty - * - * Description: Handles background and backgroud-position properites, - * analyze the compound property values for them. - * Example: - * background: white repeat-x url("foo.gif"); - * background-position: center top - * To define position of the image we need only 2 values/tokens - * Algorithm can handle when accidentally somebody will write more than 2. - * Examples - * "0px, 0px" or " 0% 0%" - top left coner ; - * "left, top " or "top left" - top left coner ; - * "0px left" or "left 0" top left coner ; - * "0 center" means X=0 Y= 1/2 height of the box etc. - * - * Param@ thisObj -- DeclarationListHandle object - * Param@ propName -- Property Name eg. NW_CSS_Prop_Background - * Param@ props -- list of properties - * Param@ numVals -- number of properties in the list - * Param@ important -- is important or not - * Param@ appliedList -- the applied property list - * Param@ box -- the target box to apply properties - * Param@ defaultStyle -- whether this is default style - */ - - -void -TCSSDeclListHandle::ApplyBackgroundPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - TBool attachXDefined = EFalse; - TBool attachYDefined = EFalse; - TBool centerDefined = EFalse; - NW_LMgr_Property_t centerProp; - TUint8 origPropNumVals = aNumVals; - const TUint8 KMaxNumCoord = 2; //To define position of the image we need only 2 values/tokens which define X and Y coordinates. - TUint8 indexCenter = 0xFF;// if token "center" is found, indexCenter is its index in the array - // of tokens, values (indexCenter initialized to 0xFF to prevent compiler warning. - TUint8 numTokens = 0; - if (aPropName == NW_CSS_Prop_backgroundPosition) - { - // most common case 2 values at the beginning - - if(((aNumVals>=2) && NW_CSS_ValueType_Token != aProps[0].type) && (NW_CSS_ValueType_Token != aProps[1].type)) - { - - aPropName = NW_CSS_Prop_backgroundPosition_x; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[0]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachXDefined = NW_TRUE; - - aPropName = NW_CSS_Prop_backgroundPosition_y; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[1]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachYDefined = NW_TRUE; - } - else // tokens possibly present or we have only one entry (aNumVals = 1) - { - while (aNumVals--) // Check for tokens first, because only when we have information - // about tokens we know how to handle values. - { - if(NW_CSS_ValueType_Token == aProps[aNumVals].type) - { - if (aProps[aNumVals].value.token == NW_CSS_PropValue_top || - aProps[aNumVals].value.token == NW_CSS_PropValue_bottom) - { - if(!attachYDefined) - { - aPropName = NW_CSS_Prop_backgroundPosition_y; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[aNumVals]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachYDefined = NW_TRUE; - numTokens++; - } - } - else if (aProps[aNumVals].value.token == NW_CSS_PropValue_left || - aProps[aNumVals].value.token == NW_CSS_PropValue_right) - { - if(!attachXDefined) - { - aPropName = NW_CSS_Prop_backgroundPosition_x; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[aNumVals]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachXDefined = NW_TRUE; - numTokens++; - } - } - else if (aProps[aNumVals].value.token == NW_CSS_PropValue_center) - { - centerDefined = NW_TRUE; - numTokens++; - indexCenter = aNumVals; - } - } - }// end while - - - // If we have encountered any tokens, we already applied properties - - if((numTokens < KMaxNumCoord) && (origPropNumVals > numTokens)) - { - // Value has to be accepted as X, if we have not encountered "left" or 'right" - // otherwise it will be accepted as Y - // If we have found "top" or "bottom" value has to be accepted as X - // Later missing X or Y will be defaulted to Center. - // In case " center value" Center will define X, value will define Y - // Examples for values 2px, 30%, 45 (default unit is px) etc.. - - for (TUint8 i=0; i< origPropNumVals; i++) - { - if(NW_CSS_ValueType_Token != aProps[i].type) - { - if(!attachXDefined && !(centerDefined && (indexCenter <i))) - { - aPropName = NW_CSS_Prop_backgroundPosition_x; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[i]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachXDefined = NW_TRUE; - - } - else - { - if(!attachYDefined) - { - aPropName = NW_CSS_Prop_backgroundPosition_y; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[i]), aImportant, - aAppliedList, aBox, aDefaultStyle); - attachYDefined = NW_TRUE; - } - } - } - }//end for - - }//endif - }//endif combination of tokens / values - - } - else if (aPropName == NW_CSS_Prop_background) - { - while (aNumVals--) - { - switch(aProps[aNumVals].value.token) - { - case NW_CSS_PropValue_top: - case NW_CSS_PropValue_bottom: - aPropName = NW_CSS_Prop_backgroundPosition_y; - attachYDefined = NW_TRUE; - break; - - case NW_CSS_PropValue_left: - case NW_CSS_PropValue_right: - aPropName = NW_CSS_Prop_backgroundPosition_x; - attachXDefined = NW_TRUE; - break; - - case NW_CSS_PropValue_center: - centerDefined = NW_TRUE; - break; - - case NW_CSS_PropValue_scroll: - case NW_CSS_PropValue_background_fixed: - aPropName = NW_CSS_Prop_backgroundAttachment; - break; - - case NW_CSS_PropValue_background_repeat: - case NW_CSS_PropValue_background_repeat_x: - case NW_CSS_PropValue_background_repeat_y: - case NW_CSS_PropValue_background_norepeat: - aPropName = NW_CSS_Prop_backgroundRepeat; - break; - - default: - switch (aProps[aNumVals].type) - { - case NW_CSS_ValueType_Color: - aPropName = NW_CSS_Prop_backgroundColor; - break; - - case NW_CSS_ValueType_Image: - aPropName = NW_CSS_Prop_backgroundImage; - break; - - default: - break; - } - break; - } - if ((aProps[aNumVals].value.token != NW_CSS_PropValue_center) || !centerDefined) - { - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[aNumVals]), aImportant, - aAppliedList, aBox, aDefaultStyle); - } - } - } - if (centerDefined) - { - centerProp.type = NW_CSS_ValueType_Token; - centerProp.value.token = NW_CSS_PropValue_center; - if (!attachXDefined) - { - aPropName = NW_CSS_Prop_backgroundPosition_x; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, ¢erProp, aImportant, - aAppliedList, aBox, aDefaultStyle); - } - if (!attachYDefined) - { - aPropName = NW_CSS_Prop_backgroundPosition_y; - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, ¢erProp, aImportant, - aAppliedList, aBox, aDefaultStyle); - } - } -} - - - - -/* ------------------------------------------------------------------------- - public methods - ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -TCSSDeclListHandle::ApplyPropertyL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProps, - TUint8 aNumVals, - TBool aImportant, - NW_LMgr_PropertyList_t* aAppliedList, - NW_LMgr_Box_t* aBox, - TBool aDefaultStyle) -{ - NW_ASSERT(aNumVals <= TCSSDeclListHandleMaxVals); - - /* The box model properties (border, padding and margin) need special attention. - * As an optimization, we keep the shorthand property around as long as we can. - */ - switch (aPropName) - { - - case NW_CSS_Prop_border: - case NW_CSS_Prop_borderTop: - case NW_CSS_Prop_borderBottom: - case NW_CSS_Prop_borderLeft: - case NW_CSS_Prop_borderRight: - - TCSSDeclListHandle::ApplyBorderPropertyL(aPropName,aProps, aNumVals, - aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_borderWidth: - case NW_CSS_Prop_topBorderWidth: - case NW_CSS_Prop_bottomBorderWidth: - case NW_CSS_Prop_leftBorderWidth: - case NW_CSS_Prop_rightBorderWidth: - - TCSSDeclListHandle::ApplyBoxModelPropertyL(aPropName, boxModelProps[1], aProps, - aNumVals, aImportant, aAppliedList, aBox, aDefaultStyle); - - break; - - case NW_CSS_Prop_borderStyle: - case NW_CSS_Prop_topBorderStyle: - case NW_CSS_Prop_bottomBorderStyle: - case NW_CSS_Prop_leftBorderStyle: - case NW_CSS_Prop_rightBorderStyle: - - TCSSDeclListHandle::ApplyBoxModelPropertyL(aPropName, boxModelProps[2], aProps, - aNumVals, aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_borderColor: - case NW_CSS_Prop_topBorderColor: - case NW_CSS_Prop_bottomBorderColor: - case NW_CSS_Prop_leftBorderColor: - case NW_CSS_Prop_rightBorderColor: - - TCSSDeclListHandle::ApplyBoxModelPropertyL(aPropName, boxModelProps[3], aProps, - aNumVals, aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_padding: - case NW_CSS_Prop_topPadding: - case NW_CSS_Prop_bottomPadding: - case NW_CSS_Prop_leftPadding: - case NW_CSS_Prop_rightPadding: - - TCSSDeclListHandle::ApplyBoxModelPropertyL(aPropName, boxModelProps[4], aProps, - aNumVals, aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_margin: - case NW_CSS_Prop_topMargin: - case NW_CSS_Prop_bottomMargin: - case NW_CSS_Prop_leftMargin: - case NW_CSS_Prop_rightMargin: - - TCSSDeclListHandle::ApplyBoxModelPropertyL(aPropName, boxModelProps[5], aProps, - aNumVals, aImportant, aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_font: - - TCSSDeclListHandle::ApplyFontPropertyL(aProps, aNumVals, aImportant, - aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_listStyle: - - TCSSDeclListHandle::ApplyListStylePropertyL(aProps, aNumVals, aImportant, - aAppliedList, aBox, aDefaultStyle); - break; - - case NW_CSS_Prop_background: - case NW_CSS_Prop_backgroundPosition: - TCSSDeclListHandle::ApplyBackgroundPropertyL(aPropName, aProps, aNumVals, aImportant, - aAppliedList, aBox, aDefaultStyle); - break; - - default: - if ((aPropName == NW_CSS_Prop_textDecoration) && (aNumVals == 2)) - { - if (((aProps[0].value.token == NW_CSS_PropValue_underline) && - (aProps[1].value.token == NW_CSS_PropValue_blink)) || - ((aProps[0].value.token == NW_CSS_PropValue_blink) && - (aProps[1].value.token == NW_CSS_PropValue_underline)) ) - { - aProps[0].value.token = NW_CSS_PropValue_blinkUnderline; - } - } - - TCSSDeclListHandle::ApplyCommonPropertyL(aPropName, &(aProps[0]), aImportant, - aAppliedList, aBox, aDefaultStyle); - break; - } -} - -void DeletePropList(NW_LMgr_PropertyList_t* appliedList) -{ - if (appliedList != NULL) - { - (void) NW_LMgr_PropertyList_Clear(appliedList); - NW_Object_Delete(appliedList); - } -} - -void DeleteOutProps(NW_LMgr_Property_t* outProps, TInt numVals) -{ - for (TInt index = 0; index < numVals; index++) - { - NW_LMgr_Property_t *property = &(outProps[index]); - if (property->type == NW_CSS_ValueType_Text || - property->type == NW_CSS_ValueType_Image) - { - NW_Object_Delete(property->value.object); - } - } -} - -/*------------------------------------------------------------------------*/ -void -TCSSDeclListHandle::ApplyStylesL(NW_LMgr_Box_t* aBox, - TCSSParser* aParser, - NW_CSS_Processor_t* aProcessor, - TInt aBufferIndex) -{ - TCSSReaderUnit propertyName; - TBool important; - TCSSPropertyVal propertyVals[TCSSDeclListHandleMaxVals]; - NW_LMgr_PropertyList_t *appliedList; - TUint8 numVals; - NW_LMgr_Property_t outProps[TCSSDeclListHandleMaxVals]; - - /* Create a vector for the appliedList properties */ - appliedList = (NW_LMgr_PropertyList_t*) NW_LMgr_SimplePropertyList_New (2, 2); - if (appliedList == NULL) - { - User::Leave(KErrNoMemory); - } - - while (aParser->DeclarationListIterate(&propertyName, propertyVals, &numVals, - TCSSDeclListHandleMaxVals, &important) == KBrsrIterateMore) - { - TText16* ucs2Str = NULL; - - if (propertyName.iLength == 0) - continue; - - TRAPD(ret, ucs2Str = propertyName.GetUnicodeL(aParser->GetEncoding())); - if (ret == KErrNoMemory) - { - DeletePropList(appliedList); - User::Leave(KErrNoMemory); - } - if (ucs2Str == NULL) - continue; - - // Get corresponding property entry - const TCSSPropertyTablePropEntry* propEntry = TCSSPropertyTable::GetPropertyEntry(ucs2Str); - - NW_Mem_Free(ucs2Str); - - if (propEntry == NULL) - continue; - - /* Convert the raw CSS values */ - for (TInt index = 0; index < numVals; index++) - { - TBool converted = EFalse; - TRAPD(ret1, converted = TCSSDeclListHandle::ConvertValueL(propEntry->tokenName, - &(propertyVals[index]),&(outProps[index]), aParser, aProcessor, aBox, aBufferIndex)); - if (!converted) - { - DeleteOutProps(outProps, index); - DeletePropList(appliedList); - if (ret1 == KErrNoMemory) - { - User::Leave(KErrNoMemory); - } - return; - } - } - - /* Apply the property */ - TRAPD(ret2, TCSSDeclListHandle::ApplyPropertyL(propEntry->tokenName, outProps, numVals, - important, appliedList, aBox, EFalse)); - - /* First we delete, then we check status. This avoids leakage in case of failure. */ - DeleteOutProps(outProps, numVals); - if (ret2 == KErrNoMemory) - { - DeletePropList(appliedList); - User::Leave(KErrNoMemory); - } - }//while - DeletePropList(appliedList); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSDefaultStyleSheet.cpp --- a/webengine/wmlengine/src/css/src/CSSDefaultStyleSheet.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,367 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "nw_css_defaultstylesheeti.h" - -#include "nw_text_ucs2.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_string_char.h" -#include "nw_lmgr_rootbox.h" -#include "CSSPropVal.h" -#include <nwx_string.h> -#include "CSSPropertyTable.h" -#include "CSSDeclListHandle.h" -#include "CSSPatternMatcher.h" -#include "BrsrStatusCodes.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" - -/* ------------------------------------------------------------------------- * - MACRO - These make the tables more readable and easier to edit - * ------------------------------------------------------------------------- */ -#define _ELEM(tok) NW_XHTML_ElementToken_##tok -#define _PROP(tok) NW_CSS_Prop_##tok -#define _VAL(tok) NW_CSS_PropValue_##tok -#define _TYPE(tok) NW_CSS_ValueType_##tok - -/* ------------------------------------------------------------------------- * - private types - * ------------------------------------------------------------------------- */ -static const NW_Ucs2 monospace[] = {'m', 'o', 'n', 'o', 's', 'p', 'a', 'c', 'e', '\0'}; -static const NW_Ucs2 quotes_level1[] = { '\"', '\"', '\0' }; -static const NW_Ucs2 quotes_level2[] = { '\'', '\'', '\0' }; - -/* ------------------------------------------------------------------------- */ -static const -NW_Ucs2* const _NW_CSS_DefaultStyleSheet_StringVals[] = { - monospace, - quotes_level1, - quotes_level2 -}; - -/* ------------------------------------------------------------------------- */ -/* tag ids are defined in nw_xhtml_xhtml_1_0_tokens.h */ -/* property names are defined in nw_lmgr_cssproperties.h */ -/* property values are defined in nw_lmgr_cssproperties.h */ - - -static const -NW_CSS_DefaultStyleSheet_PropEntry_t _NW_CSS_DefaultStyleSheet_PropVals[] = { - {_ELEM(a), _PROP(color), 0x800080, _TYPE(Color), (NW_Byte*)"a:visited{}" }, -/* default color for a elements applied in aElementHandler - addActiveTextDecoration so non-link or invalid href anchors are not - colored. */ -{_ELEM(acronym), _PROP(textTransform), _VAL(uppercase), _TYPE(Token), NULL }, -{_ELEM(address), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(address), _PROP(leftMargin), 10, _TYPE(Percentage), NULL }, -{_ELEM(address), _PROP(topMargin), 8, _TYPE(Px), NULL }, -{_ELEM(address), _PROP(bottomMargin), 8, _TYPE(Px), NULL }, -{_ELEM(address), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{_ELEM(area), _PROP(color), 0x800080, _TYPE(Color), (NW_Byte*)"area:visited{}" }, -{_ELEM(b), _PROP(fontWeight), 900, _TYPE(Integer), NULL }, -{_ELEM(big), _PROP(fontSize), 12, _TYPE(Pt), NULL }, -{_ELEM(blink), _PROP(textDecoration), _VAL(blink), _TYPE(Token), NULL }, -{_ELEM(blockquote),_PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(blockquote),_PROP(topMargin), 2, _TYPE(Px), NULL }, -{_ELEM(blockquote),_PROP(bottomMargin), 2, _TYPE(Px), NULL }, -{_ELEM(blockquote),_PROP(leftMargin), 17, _TYPE(Px), NULL }, -{_ELEM(body), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(body), _PROP(fontWeight), 400, _TYPE(Integer), NULL }, -{_ELEM(body), _PROP(topMargin), 2, _TYPE(Px), NULL }, -{_ELEM(body), _PROP(leftMargin), 2, _TYPE(Px), NULL }, -{_ELEM(body), _PROP(padding), 2, _TYPE(Px), NULL }, -{_ELEM(body), _PROP(fontSize), 7, _TYPE(Pt), NULL }, -{_ELEM(button), _PROP(margin), 1, _TYPE(Px), NULL }, -{_ELEM(button), _PROP(borderStyle), _VAL(solid), _TYPE(Token), NULL }, -{_ELEM(button), _PROP(borderWidth), 1, _TYPE(Px), NULL }, -{_ELEM(button), _PROP(backgroundColor), 0xcccccc, _TYPE(Color), NULL }, -{_ELEM(caption), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(caption), _PROP(textAlign), _VAL(center), _TYPE(Token), NULL }, -{_ELEM(caption), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{_ELEM(center), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(center), _PROP(textAlign), _VAL(center), _TYPE(Token), NULL }, -{_ELEM(cite), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{_ELEM(code), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(dd), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(dd), _PROP(leftMargin), 17, _TYPE(Px), NULL }, -{_ELEM(del), _PROP(textDecoration), _VAL(strikeout), _TYPE(Token), NULL }, -{_ELEM(dfn), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{_ELEM(dir), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(dir), _PROP(listStyleType), _VAL(square), _TYPE(Token), (NW_Byte*)"dir dir dir{}" }, -{_ELEM(dir), _PROP(listStyleType), _VAL(circle), _TYPE(Token), (NW_Byte*)"dir dir{}" }, -{_ELEM(dir), _PROP(listStyleType), _VAL(disc), _TYPE(Token), NULL }, -{_ELEM(dir), _PROP(leftMargin), 17, _TYPE(Px), NULL }, -{_ELEM(dir), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(dir), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(div), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(dl), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(dl), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(dl), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(dt), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(em), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{_ELEM(fieldset), _PROP(topMargin), 5, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(bottomMargin), 5, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(leftMargin), 3, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(rightMargin), 3, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(padding), 3, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(fieldset), _PROP(borderStyle), _VAL(solid), _TYPE(Token), NULL }, -{_ELEM(fieldset), _PROP(borderWidth), 1, _TYPE(Px), NULL }, -{_ELEM(fieldset), _PROP(borderColor), 0x000000, _TYPE(Color), NULL }, -{_ELEM(form), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(frameset), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(frameset), _PROP(fontWeight), 400, _TYPE(Integer), NULL }, -{_ELEM(frameset), _PROP(topMargin), 2, _TYPE(Px), NULL }, -{_ELEM(frameset), _PROP(leftMargin), 2, _TYPE(Px), NULL }, -{_ELEM(frameset), _PROP(padding), 2, _TYPE(Px), NULL }, -{_ELEM(frameset), _PROP(fontSize), 7, _TYPE(Pt), NULL }, -{_ELEM(h1), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h1), _PROP(fontSize), 14, _TYPE(Pt), NULL }, -{_ELEM(h1), _PROP(fontWeight), 900, _TYPE(Integer), NULL }, -{_ELEM(h1), _PROP(bottomMargin), 17, _TYPE(Px), NULL }, -{_ELEM(h1), _PROP(topMargin), 17, _TYPE(Px), NULL }, -{_ELEM(h2), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h2), _PROP(fontSize), 13, _TYPE(Pt), NULL }, -{_ELEM(h2), _PROP(fontWeight), 400, _TYPE(Integer), NULL }, -{_ELEM(h2), _PROP(bottomMargin), 15, _TYPE(Px), NULL }, -{_ELEM(h2), _PROP(topMargin), 15, _TYPE(Px), NULL }, -{_ELEM(h3), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h3), _PROP(fontSize), 12, _TYPE(Pt), NULL }, -{_ELEM(h3), _PROP(fontWeight), 900, _TYPE(Integer), NULL }, -{_ELEM(h3), _PROP(bottomMargin), 13, _TYPE(Px), NULL }, -{_ELEM(h3), _PROP(topMargin), 13, _TYPE(Px), NULL }, -{_ELEM(h4), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h4), _PROP(fontSize), 11, _TYPE(Pt), NULL }, -{_ELEM(h4), _PROP(fontWeight), 400, _TYPE(Integer), NULL }, -{_ELEM(h4), _PROP(bottomMargin), 13, _TYPE(Px), NULL }, -{_ELEM(h4), _PROP(topMargin), 13, _TYPE(Px), NULL }, -{_ELEM(h5), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h5), _PROP(fontSize), 10, _TYPE(Pt), NULL }, -{_ELEM(h5), _PROP(fontWeight), 900, _TYPE(Integer), NULL }, -{_ELEM(h5), _PROP(bottomMargin), 12, _TYPE(Px), NULL }, -{_ELEM(h5), _PROP(topMargin), 12, _TYPE(Px), NULL }, -{_ELEM(h6), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(h6), _PROP(fontSize), 9, _TYPE(Pt), NULL }, -{_ELEM(h6), _PROP(fontWeight), 400, _TYPE(Integer), NULL }, -{_ELEM(h6), _PROP(bottomMargin), 11, _TYPE(Px), NULL }, -{_ELEM(h6), _PROP(topMargin), 11, _TYPE(Px), NULL }, -{_ELEM(head), _PROP(display), _VAL(none), _TYPE(Token), NULL }, -{_ELEM(hr), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(hr), _PROP(height), 2, _TYPE(Px), NULL }, -{_ELEM(hr), _PROP(textAlign), _VAL(center), _TYPE(Token), NULL }, -{_ELEM(hr), _PROP(topMargin), 4, _TYPE(Px), NULL }, -{_ELEM(hr), _PROP(bottomMargin), 4, _TYPE(Px), NULL }, -{_ELEM(html), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(i), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, - -{_ELEM(input), _PROP(backgroundColor), 0xefefef, _TYPE(Color), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(borderColor), 0x949694, _TYPE(Color), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(margin), 2, _TYPE(Px), (NW_Byte*)"input[type=submit]{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input[type=submit]{}" }, - -{_ELEM(input), _PROP(backgroundColor), 0xefefef, _TYPE(Color), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(borderColor), 0x949694, _TYPE(Color), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(margin), 2, _TYPE(Px), (NW_Byte*)"input[type=reset]{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input[type=reset]{}" }, - -{_ELEM(input), _PROP(backgroundColor), 0xefefef, _TYPE(Color), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(borderColor), 0x949694, _TYPE(Color), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(margin), 1, _TYPE(Px), (NW_Byte*)"input[type=button]{}" }, -{_ELEM(input), _PROP(padding), 1, _TYPE(Px), (NW_Byte*)"input[type=button]{}" }, - -{_ELEM(input), _PROP(backgroundColor), 0xffffff, _TYPE(Color), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(margin), 0, _TYPE(Px), (NW_Byte*)"input[type=password]{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input[type=password]{}" }, - -{_ELEM(input), _PROP(backgroundColor), 0xffffff, _TYPE(Color), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(hidden), _TYPE(Token), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(borderWidth), 0, _TYPE(Px), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(margin), 0, _TYPE(Px), (NW_Byte*)"input[type=hidden]{}" }, -{_ELEM(input), _PROP(padding), 0, _TYPE(Px), (NW_Byte*)"input[type=hidden]{}" }, - -{_ELEM(input), _PROP(backgroundColor), _VAL(transparent), _TYPE(Token), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(borderWidth), 0, _TYPE(Px), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(margin), 1, _TYPE(Px), (NW_Byte*)"input[type=image]{}" }, -{_ELEM(input), _PROP(padding), 1, _TYPE(Px), (NW_Byte*)"input[type=image]{}" }, - -{_ELEM(input), _PROP(backgroundColor), _VAL(transparent), _TYPE(Token), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(borderStyle), 0, _TYPE(Token), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(margin), 1, _TYPE(Px), (NW_Byte*)"input[type=checkbox]{}" }, -{_ELEM(input), _PROP(padding), 1, _TYPE(Px), (NW_Byte*)"input[type=checkbox]{}" }, - -{_ELEM(input), _PROP(backgroundColor), _VAL(transparent), _TYPE(Token), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(borderStyle), 0, _TYPE(Token), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(focusBehavior), 0, _TYPE(Token), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(margin), 1, _TYPE(Px), (NW_Byte*)"input[type=radio]{}" }, -{_ELEM(input), _PROP(padding), 1, _TYPE(Px), (NW_Byte*)"input[type=radio]{}" }, - -{_ELEM(input), _PROP(backgroundColor), 0xefefef, _TYPE(Color), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(margin), 0, _TYPE(Px), (NW_Byte*)"input[type=file]{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input[type=file]{}" }, - -// Keep input-type-text and default input-type (below) in synch. -{_ELEM(input), _PROP(backgroundColor), 0xffffff, _TYPE(Color), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(margin), 0, _TYPE(Px), (NW_Byte*)"input[type=text]{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input[type=text]{}" }, -// When no type specified, the default type is text; therefore, the values need to be the same as for 'type=text' above. -// Table order is important. These default 'input' entries must occur after all other 'input' entries. Also note, any -// additions to the default input will affect all other input elements that do not already have a table entry for -// that property; therefore, the corresponding entry may need to be added for other input types. -{_ELEM(input), _PROP(backgroundColor), 0xffffff, _TYPE(Color), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(borderColor), 0x000000, _TYPE(Color), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(borderStyle), _VAL(solid), _TYPE(Token), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(borderWidth), 1, _TYPE(Px), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(margin), 0, _TYPE(Px), (NW_Byte*)"input{}" }, -{_ELEM(input), _PROP(padding), 2, _TYPE(Px), (NW_Byte*)"input{}" }, - -{_ELEM(ins), _PROP(textDecoration), _VAL(underline), _TYPE(Token), NULL }, -{_ELEM(kbd), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(kbd), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(li), _PROP(display), _VAL(display_listItem),_TYPE(Token), NULL }, -{_ELEM(li), _PROP(topMargin), 2, _TYPE(Px), NULL }, -{_ELEM(li), _PROP(bottomMargin), 2, _TYPE(Px), NULL }, -{_ELEM(map), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(marquee), _PROP(display), _VAL(display_marquee), _TYPE(Token), NULL }, -{_ELEM(marquee), _PROP(topMargin), 2, _TYPE(Px), NULL }, -{_ELEM(marquee), _PROP(bottomMargin), 2, _TYPE(Px), NULL }, -{_ELEM(menu), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(menu), _PROP(listStyleType), _VAL(square), _TYPE(Token), (NW_Byte*)"menu menu menu{}" }, -{_ELEM(menu), _PROP(listStyleType), _VAL(circle), _TYPE(Token), (NW_Byte*)"menu menu{}" }, -{_ELEM(menu), _PROP(listStyleType), _VAL(disc), _TYPE(Token), NULL }, -{_ELEM(menu), _PROP(leftMargin), 17, _TYPE(Px), NULL }, -{_ELEM(menu), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(menu), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(nobr), _PROP(whitespace), _VAL(nowrap), _TYPE(Token), NULL }, -{_ELEM(noscript), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(ol), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(ol), _PROP(listStyleType), _VAL(decimal), _TYPE(Token), NULL }, -{_ELEM(ol), _PROP(listMargin), 20, _TYPE(Px), NULL }, -{_ELEM(ol), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(ol), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(p), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(p), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(p), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(plaintext), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(plaintext), _PROP(whitespace), _VAL(pre), _TYPE(Token), NULL }, -{_ELEM(plaintext), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(pre), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(pre), _PROP(whitespace), _VAL(pre), _TYPE(Token), NULL }, -{_ELEM(pre), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(q), _PROP(imodeQuotes), 2, _TYPE(Text), (NW_Byte*)"q q{}" }, -{_ELEM(q), _PROP(imodeQuotes), 1, _TYPE(Text), NULL }, -{_ELEM(s), _PROP(textDecoration), _VAL(strikeout), _TYPE(Token), NULL }, -{_ELEM(samp), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(select), _PROP(borderStyle), _VAL(solid), _TYPE(Token), NULL }, -{_ELEM(select), _PROP(borderColor), 0x000000, _TYPE(Color), NULL }, -{_ELEM(select), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), NULL }, -{_ELEM(select), _PROP(borderWidth), 1, _TYPE(Px), NULL }, -{_ELEM(select), _PROP(padding), 2, _TYPE(Px), NULL }, -{_ELEM(select), _PROP(backgroundColor), 0xffffff, _TYPE(Color), NULL }, -{_ELEM(small), _PROP(fontSize), 6, _TYPE(Pt), NULL }, -{_ELEM(strike), _PROP(textDecoration), _VAL(strikeout), _TYPE(Token), NULL }, -{_ELEM(strong), _PROP(fontWeight), 900, _TYPE(Integer), NULL }, -{_ELEM(table), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(td), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(td), _PROP(verticalAlign), _VAL(top), _TYPE(Token), NULL }, -{_ELEM(td), _PROP(borderWidth), _VAL(medium), _TYPE(Token), NULL }, -{_ELEM(td), _PROP(borderColor), 0x000000, _TYPE(Color), NULL }, -{_ELEM(td), _PROP(overflow), _VAL(hidden), _TYPE(Token), NULL }, -{_ELEM(textarea), _PROP(focusBehavior), _VAL(growBorder), _TYPE(Token), NULL }, -{_ELEM(textarea), _PROP(padding), 2, _TYPE(Px), NULL }, -{_ELEM(textarea), _PROP(borderWidth), 1, _TYPE(Px), NULL }, -{_ELEM(textarea), _PROP(borderStyle), _VAL(solid), _TYPE(Token), NULL }, -{_ELEM(textarea), _PROP(borderColor), 0x000000, _TYPE(Color), NULL }, -{_ELEM(th), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(th), _PROP(textAlign), _VAL(center), _TYPE(Token), NULL }, -{_ELEM(th), _PROP(verticalAlign), _VAL(middle), _TYPE(Token), NULL }, -{_ELEM(th), _PROP(borderWidth), 1, _TYPE(Px), NULL }, -{_ELEM(th), _PROP(borderStyle), _VAL(none), _TYPE(Token), NULL }, -{_ELEM(th), _PROP(borderColor), 0x000000, _TYPE(Color), NULL }, -{_ELEM(th), _PROP(fontWeight), 700, _TYPE(Integer), NULL }, -{_ELEM(th), _PROP(overflow), _VAL(hidden), _TYPE(Token), NULL }, -{_ELEM(tr), _PROP(fontSize), 7, _TYPE(Pt), NULL }, -{_ELEM(tt), _PROP(fontFamily), 0, _TYPE(Text), NULL }, -{_ELEM(u), _PROP(textDecoration), _VAL(underline), _TYPE(Token), NULL }, -{_ELEM(ul), _PROP(display), _VAL(display_block), _TYPE(Token), NULL }, -{_ELEM(ul), _PROP(listStyleType), _VAL(square), _TYPE(Token), (NW_Byte*)"ul ul ul{}" }, -{_ELEM(ul), _PROP(listStyleType), _VAL(circle), _TYPE(Token), (NW_Byte*)"ul ul{}" }, -{_ELEM(ul), _PROP(listStyleType), _VAL(disc), _TYPE(Token), NULL }, -{_ELEM(ul), _PROP(listMargin), 20, _TYPE(Px), NULL }, -{_ELEM(ul), _PROP(topMargin), 10, _TYPE(Px), NULL }, -{_ELEM(ul), _PROP(bottomMargin), 10, _TYPE(Px), NULL }, -{_ELEM(var), _PROP(fontStyle), _VAL(italic), _TYPE(Token), NULL }, -{0xFFFF, _PROP(fontFamily), 0, _TYPE(Text), NULL }, -}; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_CSS_DefaultStyleSheet_Class_t NW_CSS_DefaultStyleSheet_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_CSS_DefaultStyleSheet */ - /* numPropertyVals */ sizeof (_NW_CSS_DefaultStyleSheet_PropVals) - / sizeof (NW_CSS_DefaultStyleSheet_PropEntry_t), - /* propertyVals */ _NW_CSS_DefaultStyleSheet_PropVals, - /* numStringVals */ 3, - /* stringVals */ _NW_CSS_DefaultStyleSheet_StringVals - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_CSS_DefaultStyleSheet_t NW_CSS_DefaultStyleSheet = { - { &NW_CSS_DefaultStyleSheet_Class } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSHandler.cpp --- a/webengine/wmlengine/src/css/src/CSSHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,420 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler for appling styles -* -*/ - - - -// INCLUDE FILES -#include "CSSHandler.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_compositecontenthandler.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_fbox_inputbox.h" -#include "HEDDocumentListener.h" -#include "nw_lmgr_rootbox.h" -#include "nw_basicforms_inputelementhandler.h" -#include "nwx_logger.h" -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CCCSSHandler::CCCSSHandler -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CCSSHandler::CCSSHandler(NW_CSS_Processor_t* aProcessor) : - CActive( CActive::EPriorityLow + 1 ) - { - iProcessor = aProcessor; - } - -// ----------------------------------------------------------------------------- -// CCSSHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCSSHandler::ConstructL() - { - CActiveScheduler::Add(this); - } - -// ----------------------------------------------------------------------------- -// CCSSHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSHandler* CCSSHandler::NewL(NW_CSS_Processor_t* aProcessor) - { - CCSSHandler* self = new( ELeave ) CCSSHandler(aProcessor); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// Destructor -CCSSHandler::~CCSSHandler() - { - Cancel(); - } - - -// ----------------------------------------------------------------------------- -// CCSSHandler::RunL -// Applies styles to each box of the box tree -// ----------------------------------------------------------------------------- -// -void CCSSHandler::RunL() - { - // Each time RunL() gets called we need to - // 1. Apply styles to the next box - // 2. Find out if the styles have been applied - // to the entire box tree - // - // - If it has completed, tell the owner to collapse - // the box tree and update display - // - // - If it hasn't completed, simulate a request - // completion, so that this RunL() will get - // called again by the active scheduler. - // - TBool completed = EFalse; - TRAPD(ret, completed = ApplyBoxStylesL()); - if (ret == KErrNone) - { - if (!completed) - { - // Before simulating a request completion we need to - // set this active object as active. - SetActive(); - // The following two lines simulate a request completion - // as if it were generated by a server. This completion will - // be processed by the active scheduler. If other events have - // completed belonging to higher-priority active objects, those - // will get processed first. Otherwise, our RunL() function - // will get called, allowing us to apply styles to next box - // User::RequestComplete() takes two parameters: the address - // of the status variable for the active object whose event - // has completed (in this case, *this* active object), and - // an error code to write to this address - KErrNone in this case. - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); - } - - else - { - // call the function to update display - TInt ret1; - TRAP(ret1, ApplyStylesCompleteL()); - } - } -} - -// ----------------------------------------------------------------------------- -// CCCSSHandler::DoCancel -// ----------------------------------------------------------------------------- -// -void CCSSHandler::DoCancel() -{ -} - -// ----------------------------------------------------------------------------- -// CCCSSHandler::ApplyStylesCompleteL -// collapse the box tree, swaps property list and then formats and redraws -// the updated tree -// ----------------------------------------------------------------------------- -// -void CCSSHandler::ApplyStylesCompleteL() -{ - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:ApplyStylesCompleteL Begin]"); - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (iProcessor->owner); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(docRoot); - - // collapse the box tree - TBrowserStatusCode status = rootBox->boxTreeListener->Collapse (NULL, NW_TRUE); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - else if (status != KBrsrSuccess) - { - User::Leave(KErrAbort); - } - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:Collapse tree finished]"); - - // swap the property list - SwapPropListL(); - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:Swap prop list finished]"); - - // format the box tree - status = rootBox->boxTreeListener->FormatBoxTree (NW_TRUE); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - else if (status != KBrsrSuccess) - { - User::Leave(KErrAbort); - } - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:format tree finished]"); - - // draw - status = rootBox->boxTreeListener->RedrawDisplay (NW_FALSE); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - else if (status != KBrsrSuccess) - { - User::Leave(KErrAbort); - } - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:ApplyStylesCompleteL finished]"); -} - -// ----------------------------------------------------------------------------- -// CCCSSHandler::ApplyStylesCompleteL -// swaps the property list of the boxes -// ----------------------------------------------------------------------------- -// -void -CCSSHandler::SwapPropListL() - { - NW_LMgr_Box_t* box = NULL; - NW_Bool skipChildren = NW_FALSE; - NW_HED_ContentHandler_t* contentHandler = (NW_HED_ContentHandler_t*)(iProcessor->owner); - NW_LMgr_PropertyValue_t displayVal; - - // Initialize the box visitor - NW_LMgr_BoxVisitor_Initialize(&iBoxVisitor, contentHandler->boxTree); - - box = NW_LMgr_BoxVisitor_NextBox(&iBoxVisitor,&skipChildren); - // swap the propery lists - // Look for the next box with Simple property list set - while (box != NULL) - { - - displayVal.token = NW_CSS_PropValue_display_inline; - // we want to look at simple prop list since we don't want to look at split boxes - if (box->propList && NW_Object_IsClass(box->propList, &NW_LMgr_SimplePropertyList_Class)) - { - NW_LMgr_SimplePropertyList_t* simplePropList = (NW_LMgr_SimplePropertyList_t*)box->propList; - if (simplePropList->backupPropList) - { - box->propList = simplePropList->backupPropList; - simplePropList->backupPropList = NULL; - NW_Object_Delete(simplePropList); - - // we need to do this so that context can again calculate the border info - if (NW_Object_IsClass(box, &NW_LMgr_StaticTableBox_Class)) - { - NW_LMgr_StaticTableBox_t* tableBox = (NW_LMgr_StaticTableBox_t*)box; - NW_Object_Delete(tableBox->ctx); - tableBox->ctx = NULL; - } - - if (NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class)) - { - TBrowserStatusCode status = NW_XHTML_inputElementHandler_HandleValidation(NW_FBox_InputBoxOf(box), - NW_FBox_FormBoxOf(box)->formLiaison); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - } - - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_display, NW_CSS_ValueType_Token, &displayVal); - - if (displayVal.token != NW_CSS_PropValue_none) - { - // Check display Val and replace box is necessary - TBrowserStatusCode status = NW_CSS_Processor_HandleDisplayVal(&box, &displayVal); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - else if (status != KBrsrSuccess) - { - User::Leave(KErrAbort); - } - iBoxVisitor.currentBox = box; - } - } - }// end if - - // handle display none - if (displayVal.token == NW_CSS_PropValue_none) - { - skipChildren = NW_TRUE; - } - // Algorithm was changed here. We do not remove boxes with NW_CSS_PropValue_none any more at this point. - - box = NW_LMgr_BoxVisitor_NextBox(&iBoxVisitor,&skipChildren); - - - }// end while - } - -// ----------------------------------------------------------------------------- -// CCCSSHandler::ApplyBoxStylesL -// Applies styles to each box and stores it as backup property list -// ----------------------------------------------------------------------------- -// -TBool CCSSHandler::ApplyBoxStylesL() -{ - NW_DOM_ElementNode_t* elementNode = NULL; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_SimplePropertyList_t* oldPropList = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - // Look for the next box with DOM node set - box = GetNextBox(&elementNode); - - // we have element node and proplist - if (box != NULL) - { - oldPropList = (NW_LMgr_SimplePropertyList_t*)(box->propList); - // set propList as NULL to get new prop list - box->propList = NULL; - - if (oldPropList->backupPropList) - { - NW_Object_Delete(oldPropList->backupPropList); - oldPropList->backupPropList = NULL; - } - - // get new styles - status = iProcessor->applyCSSCallback((void *)(iProcessor->owner), elementNode, &box); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - // box was deleted either because of error - if (box == NULL) - { - NW_Object_Delete(oldPropList); - User::Leave(KErrAbort); - } - - // save the box proplist as backup prop list - oldPropList->backupPropList = box->propList; - box->propList = (NW_LMgr_PropertyList_t*)oldPropList; - } - return (box == NULL); -} - -// ----------------------------------------------------------------------------- -// CCCSSHandler::GetNextBox -// Get next box with DOM node - these are the boxes we need to apply styles again -// ----------------------------------------------------------------------------- -// -NW_LMgr_Box_t* -CCSSHandler::GetNextBox(NW_DOM_ElementNode_t** node) -{ - NW_LMgr_Box_t* box = NULL; - NW_DOM_ElementNode_t* elementNode = NULL; - - // Look for the next box with DOM node set - while ((box = NW_LMgr_BoxVisitor_NextBox(&iBoxVisitor,0)) != NULL) - { - NW_LMgr_PropertyValue_t value; - NW_LMgr_PropertyList_t* propList = box->propList; - - // we want to look at simple prop list since we don't want to loook at split boxes - if (propList && NW_Object_IsClass(propList, &NW_LMgr_SimplePropertyList_Class)) - { - value.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - if (value.object == NULL) - continue; - - elementNode = (NW_DOM_ElementNode_t*)value.object; - if (elementNode) - { - break; - } - } - } - *node = elementNode; - return box; -} - -// ----------------------------------------------------------------------------- -// CCCSSHandler::ApplyStylesL -// This is called from the processor when a new stylesheet needs to be applied -// ----------------------------------------------------------------------------- -// -void CCSSHandler::ApplyStylesL() -{ - NW_LOG0(NW_LOG_LEVEL4, "[CCSSHandler:ApplyStylesL Begin]"); - // cancel the active object - // we need to stop applying styles as a new CSS has arrived which will resolve to - // new CSS properties - Cancel(); - - // This function is called by client code (processor) to start the long - // running css apply styles. - - // we want to apply styles to the box tree associated with the owner - NW_HED_ContentHandler_t* contentHandler = (NW_HED_ContentHandler_t*)(iProcessor->owner); - - // Initialize the box visitor - NW_LMgr_BoxVisitor_Initialize(&iBoxVisitor, contentHandler->boxTree); - - // Call SetActive() so that this active object gets notified of completed requests. - SetActive(); - - // The following two lines simulate a request completion - // as if it were generated by a server. This completion will - // be processed by the active scheduler. If other events have - // completed belonging to higher-priority active objects, those - // will get processed first. Otherwise, our RunL() function - // will get called, allowing us to apply styles to next box - // User::RequestComplete() takes two parameters: the address - // of the status variable for the active object whose event - // has completed (in this case, *this* active object), and - // an error code to write to this address - KErrNone in this case. - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); -} - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSImageList.cpp --- a/webengine/wmlengine/src/css/src/CSSImageList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,708 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different CSS images that are applied to document -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "BrsrStatusCodes.h" -#include "CSSImageList.h" -#include "nw_text_ucs2.h" -#include "nw_image_virtualimage.h" -#include "Epoc32ImageDecoder.h" -#include "nwx_multipart_generator.h" -#include "nwx_string.h" -#include "nwx_http_defs.h" -#include "nw_css_processori.h" -#include "nwx_settings.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KCSSImageListArrayGranularity = 2; - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CVirtualNodeImageEntry::CVirtualNodeImageEntry -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CVirtualNodeImageEntry::CVirtualNodeImageEntry( ) - { - } - -// ----------------------------------------------------------------------------- -// CVirtualNodeImageEntry::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CVirtualNodeImageEntry::ConstructL( ) - { - } - -// ----------------------------------------------------------------------------- -// CVirtualNodeImageEntry::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CVirtualNodeImageEntry* CVirtualNodeImageEntry::NewL() - { - CVirtualNodeImageEntry* self = new( ELeave )CVirtualNodeImageEntry(); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CVirtualNodeImageEntry::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CVirtualNodeImageEntry* CVirtualNodeImageEntry::NewLC() - { - CVirtualNodeImageEntry* self = CVirtualNodeImageEntry::NewL(); - CleanupStack::PushL( self ); - - return self; - } - -// ----------------------------------------------------------------------------- -// CVirtualNodeImageEntry::~CVirtualNodeImageEntry -// destructor. -// ----------------------------------------------------------------------------- -// -CVirtualNodeImageEntry::~CVirtualNodeImageEntry() - { - if( iImageOwnership ) - { - // delete the image - NW_Object_Delete( iVirtualImage ); - } - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::CCSSImageListEntry -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CCSSImageListEntry::CCSSImageListEntry( NW_Text_t* aUrl, TBool aListItem ) - : iUrl( aUrl ), iListItem( aListItem ) - { - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCSSImageListEntry::ConstructL( ) - { - // initialize the virtual node-image pair list - iVirtualNodeImageList = new (ELeave) CVirtualNodeImageList( KCSSImageListArrayGranularity ); - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSImageListEntry* CCSSImageListEntry::NewL( NW_Text_t* aUrl, TBool aListItem ) - { - CCSSImageListEntry* self = new( ELeave ) CCSSImageListEntry( aUrl, aListItem ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSImageListEntry* CCSSImageListEntry::NewLC( NW_Text_t* aUrl, TBool aListItem ) - { - CCSSImageListEntry* self = CCSSImageListEntry::NewL( aUrl, aListItem ); - CleanupStack::PushL( self ); - - return self; - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::~CCSSImageListEntry -// Destructor. -// ----------------------------------------------------------------------------- -CCSSImageListEntry::~CCSSImageListEntry() - { - NW_Object_Delete( iUrl ); - - NW_Mem_Free( iContentTypeString ); - // free virtual images - if(iVirtualNodeImageList) - { - iVirtualNodeImageList->ResetAndDestroy(); - } - delete iVirtualNodeImageList; - iVirtualNodeImageList = NULL; - - // it's important to release virtual images first - // as they might be observing this image - // we are not observing the "main image" - NW_Object_Delete( iImage ); - } - -// ----------------------------------------------------------------------------- -// CCSSImageListEntry::SetAbstractImage -// Sets the image and its content type -// ----------------------------------------------------------------------------- -// -void CCSSImageListEntry::SetAbstractImage( NW_Image_AbstractImage_t* aImage, NW_Http_ContentTypeString_t aContentType ) - { - iImage = aImage; - iContentTypeString = aContentType; - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::QueryEntry -// Gets CSS image for a given URL -// ----------------------------------------------------------------------------- -// -TBool CCSSImageList::QueryEntryL (NW_Text_t* aUrl, CCSSImageListEntry*& aRetEntry ) -{ - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - TBool found( EFalse ); - - /* convert the url to Unicode and get the storage */ - NW_Ucs2* storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (aUrl, 0, &length, &freeNeeded); - User::LeaveIfNull( storage ); - - TInt size = iImageList->Count(); - for (TInt index = 0; index < size; index++) - { - CCSSImageListEntry* entry = iImageList->At( index ); - - NW_Text_Length_t len = 0; - NW_Text_t* imageUrl = entry->ImageUrl(); - - const void* urlStorage = NW_Text_GetUCS2Buffer( imageUrl, 0, &len, NULL ); - - if (!(NW_Mem_memcmp (urlStorage, storage, (length+1) *sizeof (NW_Ucs2)))) - { - found = ETrue; - aRetEntry = entry; - break; - } - } /* end for */ - - if (freeNeeded) - { - NW_Mem_Free ((NW_Ucs2*)storage); - } - return found; -} - -// ----------------------------------------------------------------------------- -// CCSSImageList::CCSSImageList -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CCSSImageList::CCSSImageList( NW_CSS_Processor_t& aProcessor ) : iProcessor( &aProcessor ) - { - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCSSImageList::ConstructL() - { - // initialize the imageList - iImageList = new( ELeave )CImageListArray( KCSSImageListArrayGranularity ); - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSImageList* CCSSImageList::NewL( NW_CSS_Processor_t& aProcessor ) - { - CCSSImageList* self = new( ELeave )CCSSImageList( aProcessor ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::~CCSSImageList -// Destructor. -// ----------------------------------------------------------------------------- -// -CCSSImageList::~CCSSImageList() -{ - // first remove observers - TInt size = 0; - if(iImageList) - { - size = iImageList->Count(); - } - - for( TInt index = 0; index < size; index++ ) - { - CCSSImageListEntry* entry = iImageList->At( index ); - // check the virtual images list - CVirtualNodeImageList* virtualImageList = entry->VirtualNodeImageList(); - TInt virtualImageCount = virtualImageList->Count(); - - for( TInt i = 0; i < virtualImageCount; i++ ) - { - NW_Image_Virtual_t* virtualImage; - CVirtualNodeImageEntry* virtualImageEntry = virtualImageList->At( i ); - - if( virtualImageEntry && ( virtualImage = virtualImageEntry->VirtualImage() ) != NULL ) - { - // remove observer - (void) NW_Image_AbstractImage_RemoveImageObserver( (NW_Image_AbstractImage_t*) virtualImage, - &iProcessor->NW_Image_IImageObserver ); - } - } - } - // destroy image list - if(iImageList) - { - iImageList->ResetAndDestroy(); - } - delete iImageList; -} - -// ----------------------------------------------------------------------------- -// CCSSImageList::CreateImageEntryL -// Creates a new entry to the image list where the URL is the ID -// ----------------------------------------------------------------------------- -// -void CCSSImageList::CreateImageEntryL( NW_Text_t* aUrl, NW_DOM_ElementNode_t* aImageNode, TBool aListItem ) -{ - // create and empty image entry - CCSSImageListEntry* newCSSImageEntry = CCSSImageListEntry::NewLC( aUrl, aListItem ); - - // Virtual image list includes both the node and - // the image itself - CVirtualNodeImageEntry* newVirtualNodeImageListEntry = CVirtualNodeImageEntry::NewLC(); - - newVirtualNodeImageListEntry->AddVirtualNode( aImageNode ); - // no image yet - newVirtualNodeImageListEntry->AddVirtualImage( NULL ); - // no ownership - newVirtualNodeImageListEntry->RemoveVirtualImageOwnership(); - - // take image list onwership - newCSSImageEntry->AddVirtualImageNodeEntryL( newVirtualNodeImageListEntry ); - CleanupStack::Pop(); // newVirtualNodeImageListEntry - - // and append to the list. take ownership - iImageList->AppendL( newCSSImageEntry ); - CleanupStack::Pop(); // newCSSImageEntry - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::AddVirtualNodeToImageEntryL -// adds a new virtual node for a given URL to the image entry list -// ----------------------------------------------------------------------------- -// -NW_Image_AbstractImage_t* -CCSSImageList::AddVirtualNodeToImageEntryL( NW_Text_t* aUrl, NW_DOM_ElementNode_t* aVirtualImageNode ) - { - NW_Image_AbstractImage_t* image = NULL; - - CCSSImageListEntry *entry = NULL; - if( QueryEntryL( aUrl, entry ) ) - { - CVirtualNodeImageEntry* newVirtualNodeImageEntry = CVirtualNodeImageEntry::NewLC(); - // add the virtual node first - newVirtualNodeImageEntry->AddVirtualNode( aVirtualImageNode ); - NW_Image_Virtual_t* virtualImage = NULL; - - // if the (main)image has not been loaded yet, - // then entry->iImage is NULL. - if( entry->AbstractImage() ) - { - virtualImage = NW_Image_Virtual_New( entry->AbstractImage() ); - User::LeaveIfNull( virtualImage ); - - // take the image ownership - newVirtualNodeImageEntry->TakeVirtualImageOwnership(); - - image = NW_Image_AbstractImageOf( virtualImage ); - - // and set processor as observer - (void) NW_Image_AbstractImage_SetImageObserver( image, - &iProcessor->NW_Image_IImageObserver ); - } - else - { - // create the virtual image entry when the abstract comes in - // for the time being, add NULL pointer to the list - // no ownership - newVirtualNodeImageEntry->RemoveVirtualImageOwnership(); - } - newVirtualNodeImageEntry->AddVirtualImage( virtualImage ); - // add to the list. take ownership - entry->AddVirtualImageNodeEntryL( newVirtualNodeImageEntry ); - CleanupStack::Pop(); // newVirtualNodeImageEntry - } - return image; - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::SetImageL -// sets the image for a given URL. It also checks the virtual node list. -// ----------------------------------------------------------------------------- -NW_Image_AbstractImage_t* -CCSSImageList::SetImageL(NW_Text_t* aUrl, NW_Byte* aData, NW_Uint32 aLength, - NW_Http_ContentTypeString_t aContentTypeString) - { - NW_Image_AbstractImage_t* image = NULL; - CCSSImageListEntry *entry = NULL; - - if (QueryEntryL(aUrl, entry)) - { - NW_GDI_Dimension3D_t size = {0, 0, 0}; - - // Do we have an image content-type that Symbian won't recognize, - // but the browser supports. - TImageType imageType = GetRecognizedImageType((const char*)aContentTypeString); - - // make a copy of content type string as the caller - // (_NW_CSS_Processor_ILoadRecipient_ProcessLoad) deletes it. - TInt contentTypeLength = NW_Asc_strlen((char*)aContentTypeString); - NW_Http_ContentTypeString_t contentTypeString = - (NW_Http_ContentTypeString_t)NW_Asc_New(contentTypeLength + 1); - User::LeaveIfNull(contentTypeString); - - NW_Asc_strcpy((char*)contentTypeString, (char*)aContentTypeString); - contentTypeString[contentTypeLength] = '\0'; - - // create the abstract image - image = (NW_Image_AbstractImage_t*)NW_Image_Epoc32Simple_New(size, NULL, NULL, - NW_FALSE, NW_FALSE, imageType, - aData, aLength, - iProcessor->owner); - User::LeaveIfNull(image); - - // set to the list - entry->SetAbstractImage(image, contentTypeString); - - // check if there is a virtual image which is waiting for to be - // updated. - create as many new virtual images out of entry->iImage as - // virtual nodes we have - // note: one virtual image must be created here for the main node - // as the main box -which is not the virtual one- musn't own - // simple image. - // this "extra" virtual node is appended to the list at - // CreateImageEntryL() - CVirtualNodeImageList* virtualNodeImageList = entry->VirtualNodeImageList(); - TInt virtualImageCount = virtualNodeImageList->Count(); - for (TInt i = 0; i < virtualImageCount; i++) - { - CVirtualNodeImageEntry* virtualNodeImageEntry = virtualNodeImageList->At(i); - if (!virtualNodeImageEntry->VirtualImage()) - { - // create virtual image - NW_Image_Virtual_t* virtualImage = NW_Image_Virtual_New(entry->AbstractImage()); - User::LeaveIfNull(virtualImage); - // update the entry - virtualNodeImageEntry->AddVirtualImage(virtualImage); - virtualNodeImageEntry->TakeVirtualImageOwnership(); - - // and set processor as observer - (void)NW_Image_AbstractImage_SetImageObserver((NW_Image_AbstractImage_t*)virtualImage, - &iProcessor->NW_Image_IImageObserver); - // and update the list - virtualNodeImageList->At(i) = virtualNodeImageEntry; - } - } -#ifdef INCREMENTAL_IMAGE_ON - NW_Image_Epoc32Simple_Initialize((NW_Image_Epoc32Simple_t*)image); - // start opening the image - ((CEpoc32ImageDecoder*)((NW_Image_Epoc32Simple_t*)image)->decoder)->Open(); -#else - NW_Image_Epoc32Simple_Initialize((NW_Image_Epoc32Simple_t*)image); - -#endif // INCREMENTAL_IMAGE_ON - } // end of if (QueryEntry... - - return image; - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::GetImageL -// gets the image for a given URL -// ----------------------------------------------------------------------------- -// -NW_Image_AbstractImage_t* -CCSSImageList::GetImageL( NW_Text_t* aUrl, TBool& aFound ) -{ - CCSSImageListEntry* entry = NULL; - NW_Image_AbstractImage_t* image = NULL; - - aFound = QueryEntryL( aUrl, entry ); - - if( aFound && entry != NULL ) - { - image = entry->AbstractImage(); - } - return image; -} - -// ----------------------------------------------------------------------------- -// CCSSImageList::EntryByVirtualImage -// gets both the image entry and the node for a given virtual image -// ----------------------------------------------------------------------------- -// -CCSSImageListEntry* CCSSImageList::EntryByVirtualImage( NW_Image_AbstractImage_t* aVirtualImage, - NW_DOM_ElementNode_t** aImageNode ) - { - TInt size = iImageList->Count(); - // lookup the virtual node-image list - for( TInt index = 0; index < size; index++ ) - { - CCSSImageListEntry* entry = iImageList->At( index ); - // check the virtual images list - CVirtualNodeImageList* virtualNodeImageList = entry->VirtualNodeImageList(); - TInt virtualNodeImageCount = virtualNodeImageList->Count(); - for( TInt i = 0; i < virtualNodeImageCount; i++ ) - { - NW_Image_Virtual_t* virtualImage; - CVirtualNodeImageEntry* virtualNodeImageEntry = virtualNodeImageList->At( i ); - - if( virtualNodeImageEntry && ( virtualImage = virtualNodeImageEntry->VirtualImage() ) != NULL ) - { - if( NW_Image_AbstractImageOf( virtualImage ) == aVirtualImage ) - { - // set image node. note that NULL can be passed if - // the caller is not interested in the node value - if( aImageNode != NULL ) - { - *aImageNode = virtualNodeImageEntry->VirtulaNode(); - } - return entry; - } - } - } - } - return NULL; - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::RemoveVirtualImageOwnership -// remove virtual image ownership -// ----------------------------------------------------------------------------- -// -void CCSSImageList::RemoveVirtualImageOwnership( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage ) - { - VirtualImageOwnershipChanged( aImageEnrty, aVirtualImage, EFalse ); - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::VirtualImageDestroyed -// set virtual image to NULL -// ----------------------------------------------------------------------------- -// -void CCSSImageList::VirtualImageDestroyed( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage ) - { - VirtualImageOwnershipChanged( aImageEnrty, aVirtualImage, ETrue ); - } - -// ----------------------------------------------------------------------------- -// CCSSImageList::VirtualImageOwnershipChanged -// it changes the ownership of the virtual image -// ----------------------------------------------------------------------------- -// -void CCSSImageList::VirtualImageOwnershipChanged( CCSSImageListEntry& aImageEnrty, NW_Image_AbstractImage_t* aVirtualImage, - TBool aDestroyed ) - { - // go through the virtual list to find "aVirtualImage" and remove the ownership - // by setting iImageOwnership to EFalse - CVirtualNodeImageList* virtualNodeImageList = aImageEnrty.VirtualNodeImageList(); - if( virtualNodeImageList ) - { - TInt virtualImageCount = virtualNodeImageList->Count(); - - for( TInt i = 0; i < virtualImageCount; i++ ) - { - NW_Image_Virtual_t* virtualImage; - CVirtualNodeImageEntry* virtualNodeImageEntry = virtualNodeImageList->At( i ); - // check if entry has the ownership - if( virtualNodeImageEntry && ( virtualImage = virtualNodeImageEntry->VirtualImage() ) != NULL ) - { - if( NW_Image_AbstractImageOf( virtualImage ) == aVirtualImage ) - { - // remove ownership - virtualNodeImageEntry->RemoveVirtualImageOwnership(); - // set image to NULL - if( aDestroyed ) - { - virtualNodeImageEntry->AddVirtualImage( NULL ); - } - virtualNodeImageList->At( i ) = virtualNodeImageEntry; - return; - } - } - } - } -} - - -// ----------------------------------------------------------------------------- -// CCSSImageList::WriteMultipartSegments -// Write CSS images to a file in the form of multipart segments. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CCSSImageList::WriteMultipartSegments(NW_Osu_File_t aFh) -{ - const NW_Byte* data = NULL; - NW_Uint32 dataLen = 0; - const NW_Ucs2* storage = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - char* urlAscii = NULL; - TBrowserStatusCode retStatus = KBrsrSuccess; - NW_Image_Epoc32Simple_t* image = NULL; - - TUint originalEncoding = NW_Settings_GetOriginalEncoding(); - - TInt size = iImageList->Count(); - for (TInt index = 0; index < size; index++) - { - NW_Byte* segment; - NW_Uint32 segmentLen; - - CCSSImageListEntry* entry = iImageList->At(index); - image = (NW_Image_Epoc32Simple_t*) entry->AbstractImage(); - - if (image != NULL) - { - data = (const NW_Byte*)image->rawData; - dataLen = image->rawDataLength; - } - - /* Get the URL. If urlAscii is NULL, it will continue to create - * segment - this is OK. */ - NW_Text_t* imageUrl = entry->ImageUrl(); - storage = NW_Text_GetUCS2Buffer (imageUrl, 0, &length, &freeNeeded); - if (storage != NULL) - { - urlAscii = NW_Str_CvtToAscii(storage); - if (freeNeeded) - NW_Mem_Free ((NW_Ucs2*) storage); - } - - /* The encoding type doesn't seem to matter here. */ - retStatus = NW_CreateMultipartSegment - ( - HTTP_iso_8859_1, - originalEncoding, - entry->ImageContentType(), - urlAscii, - data, - dataLen, - &segment, - &segmentLen - ); - NW_Mem_Free(urlAscii); - if (retStatus != KBrsrSuccess) - return retStatus; - - retStatus = NW_Osu_WriteFile(aFh, segment, segmentLen); - NW_Mem_Free(segment); - if (retStatus != KBrsrSuccess) - return retStatus; - } - return retStatus; -} - -// ----------------------------------------------------------------------------- -// CCSSImageList::GetNumImages -// returns the size of the imagelist -// ----------------------------------------------------------------------------- -// -TInt CCSSImageList::GetNumImages() -{ - return iImageList->Count(); -} - -// ----------------------------------------------------------------------------- -// CCSSImageList::ShowImagesL -// issues load request for urls which don't have image -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CCSSImageList::ShowImages() - { - TBrowserStatusCode status = KBrsrSuccess; - - TInt numImages = GetNumImages() ; - for (TInt index = 0; index < numImages; index++) - { - CCSSImageListEntry* entry = iImageList->At( index ); - - if( entry->ImageUrl() != NULL && entry->AbstractImage() == NULL ) - { - status = NW_CSS_Processor_ProcessLoadRequest( iProcessor, - entry->ImageUrl(), - NW_CSS_Processor_LoadImage, - iProcessor->isSavedDeck, - iProcessor->isHistLoad, - iProcessor->isReLoad, - 0); - - if( status == KBrsrOutOfMemory ) - { - break; - } - } - } - return status; - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSParser.cpp --- a/webengine/wmlengine/src/css/src/CSSParser.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,906 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Parser for CSS -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "CSSParser.h" -#include "nw_string_string.h" -#include <nwx_assert.h> -#include "nwx_http_defs.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// FORWARD DECLARATIONS - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -/* ------------------------------------------------------------------------- */ -TBool TCSSParser::ParseElementName(TCSSReaderUnit* aNameSpace, TCSSReaderUnit* aElementName) -{ - TInt8 tokenType; - TCSSReaderUnit token; - - switch(tokenType = iReader.ReadNextToken(&token)) - { - case ALPHA: - if (!iReader.ReadIdentifier(aElementName)) - { - return EFalse; - } - tokenType = iReader.ReadNextToken(&token); - break; - case ASTERISK: - tokenType = iReader.ReadNextToken(&token); - break; - case VERTICAL_LINE: - break; - default: - SetPosition(token.iStorage); - return ETrue; - } - if ((tokenType != VERTICAL_LINE) && (tokenType != -1)) - { - SetPosition(token.iStorage); - return ETrue; - } - /* There is a VERTICAL_LINE token - implies nameSpace present */ - aNameSpace->Init(aElementName->iStorage, aElementName->iLength, aElementName->iNumChars); - aElementName->Init(NULL, 0, 0); - - switch(iReader.ReadNextToken(&token)) - { - case ALPHA: - return iReader.ReadIdentifier(aElementName); - case ASTERISK: - return ETrue; - default: - SetPosition(token.iStorage); - return ETrue; - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSParser::SelectorListIterate(TCSSReaderUnit* aTargetElement, - TUint32 *aSpecificity) -{ - TBrowserStatusCode status; - TCSSReaderUnit token; - TCSSSimpleSelector simpleSelector; - TUint8 numSimpleSelectors; - - *aSpecificity = 0; - numSimpleSelectors = 0; - while ((status = SimpleSelectorListIterate(&simpleSelector)) == KBrsrIterateMore) - { - *aSpecificity += simpleSelector.specificity; - numSimpleSelectors++; - } - /* Error in parsing selector means that ignore this rule */ - if ((status != KBrsrIterateDone) || (numSimpleSelectors == 0)){ - return KBrsrFailure; - } - /* status is KBrsrIterateDone */ - aTargetElement->iStorage = simpleSelector.elementName.iStorage; - aTargetElement->iLength = simpleSelector.elementName.iLength; - aTargetElement->iNumChars = simpleSelector.elementName.iNumChars; - - switch(iReader.ReadNextToken(&token)) - { - case COMMA: - return KBrsrIterateMore; - case LEFT_BRACE: - return KBrsrIterateDone; - default: - return KBrsrFailure; - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSParser::ParseRule() -{ - TBrowserStatusCode status; - TCSSReaderUnit targetElement; - TUint32 specificity = 0; - - /* parse selector */ - do - { - TText8* bufferPtr; - - iReader.SkipWhiteSpaces(); - bufferPtr = iReader.GetBufferPointer(); - status = SelectorListIterate(&targetElement, &specificity); - if (iEventListener != NULL) - { - TRAPD(ret, iEventListener->SelectorL(bufferPtr, &targetElement, specificity)); - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - } - }while (status == KBrsrIterateMore); - - /* parse declaration list */ - do - { - TCSSReaderUnit property; - TCSSPropertyVal propertyVal; - TBool important; - TUint8 numVals; - - status = DeclarationListIterate(&property, &propertyVal, &numVals, 1, &important); - - }while (status == KBrsrIterateMore); - - if (status != KBrsrIterateDone) - { - TText8 *position; - return iReader.GoToToken(RIGHT_BRACE, &position); - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -/* parse comma separated list of media */ -TBool TCSSParser::HasValidMedia() -{ - TCSSReaderUnit medium; - TInt8 tokenType; - TCSSReaderUnit unit; - TBool applies; - - applies = EFalse; - - do - { - iReader.SkipWhiteSpaces(); - /* Read medium */ - if (!iReader.ReadIdentifier(&medium)) - { - return EFalse; - } - if (!applies) - {/* Is handleheld mentioned ? */ - applies = iReader.IsValidMedia(&medium); - } - iReader.SkipWhiteSpaces(); - tokenType = iReader.ReadNextToken(&unit); - if ((tokenType == SEMI_COLON) || (tokenType == LEFT_BRACE)) - { - SetPosition(unit.iStorage); - return applies; - } - }while (tokenType == COMMA); - - return EFalse; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSParser::ParseImportRule() -{ - TCSSReaderUnit uri; - TCSSReaderUnit unit; - TBool applies; - TInt8 tokenType; - - /* Skip any spaces */ - iReader.SkipWhiteSpaces(); - tokenType = iReader.ReadNextToken(&uri); - if (tokenType == URI) - { - if (!iReader.ReadURI(&uri)) - { - return KBrsrFailure; - } - } - if ((tokenType != URI) && (tokenType != STRING)) - { - return KBrsrFailure; - } - - iReader.SkipWhiteSpaces(); - switch(iReader.ReadNextToken(&unit)) - { - case SEMI_COLON: - break; - case ALPHA: - applies = HasValidMedia(); - if (iReader.ReadNextToken(&unit) != SEMI_COLON) - { - return KBrsrFailure; - } - if (!applies) - { - return KBrsrSuccess; - } - break; - default: - /* return advance to semi-colon */ - return KBrsrFailure; - } - if (iEventListener) - { - return iEventListener->Import(&uri); - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSParser::ParseMediaRule() -{ - TCSSReaderUnit unit; - - if (!HasValidMedia()){ - return KBrsrFailure; - } - if (iReader.ReadNextToken(&unit) != LEFT_BRACE) - { - return KBrsrFailure; - } - while(iReader.ReadNextToken(&unit) != RIGHT_BRACE) - { - SetPosition(unit.iStorage); - if (ParseRule() != KBrsrSuccess) - { - return KBrsrFailure; - } - iReader.SkipWhiteSpaces(); - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -/* parse the header which can be comments, whitespaces, or import rules - * [S|CDO|CDC]* [import [S|CDO|CDC]* ]* - */ -TBrowserStatusCode TCSSParser::ParseStyleRules() -{ - TBrowserStatusCode status; - TCSSReaderUnit token; - TUint32 readerPosition; - TText8 *position; - TBool atRuleParsed = EFalse; - - status = KBrsrSuccess; - iReader.SkipWhiteSpaces(); - while(status == KBrsrSuccess) - { - switch(iReader.ReadNextToken(&token)) - { - case -1: - case BUFFER_END: - return KBrsrBufferEnd; - case CDO: - /* Skip SGML comments */ - break; - case CDC: - /* Skip SGML comments */ - break; - case ATKEYWORD: - case CHARSET_RULE: - readerPosition = iReader.GetPosition(); - atRuleParsed = iReader.IgnoreAtRule(readerPosition); - if (!atRuleParsed) - { - status = KBrsrFailure; - } - break; - case IMPORT_RULE: - readerPosition = iReader.GetPosition(); - if (ParseImportRule() != KBrsrSuccess) - { - atRuleParsed = iReader.IgnoreAtRule(readerPosition); - if (!atRuleParsed) - { - status = KBrsrFailure; - } - } - break; - case MEDIA_RULE: - readerPosition = iReader.GetPosition(); - if (ParseMediaRule() != KBrsrSuccess) - { - atRuleParsed = iReader.IgnoreAtRule(readerPosition); - if (!atRuleParsed) - { - status = KBrsrFailure; - } - } - break; - default: - SetPosition(token.iStorage); - if (ParseRule() != KBrsrSuccess) - { - status = iReader.GoToToken( RIGHT_BRACE, &position); - } - break; - } - iReader.SkipWhiteSpaces(); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSParser::ParseHeader() -{ - TBrowserStatusCode status; - TText8 *position; - TCSSReaderUnit token; - TUint32 thisPosition; - - // read the next token for @charset rule - TInt tok = iReader.ReadNextToken(&token) ; - thisPosition = iReader.GetPosition(); - - if(tok == -1 ) - { - // various failures in read token return -1 - return KBrsrFailure; - } - if (tok == CHARSET_RULE) - { - if (iReader.GoToToken(SEMI_COLON, &position) != KBrsrSuccess) - { - return KBrsrFailure; - } - } - - //If it is comment in the begginning then continue to read. Do not set - //position again. Otherwise in the embedded style sheet, <style> element - //is skipped. - - if(tok != CDO) - { - iReader.SetPosition(thisPosition - token.iLength); - } - - /* parse the header which can be comments, whitespaces, or import rules - * [S|CDO|CDC]* [import [S|CDO|CDC]* ]* - */ - status = KBrsrSuccess; - while (status == KBrsrSuccess) - { - switch(iReader.ReadNextToken(&token)) - { - case -1: - case BUFFER_END: - - - return KBrsrBufferEnd; - case SPACE: - break; - case CDO: - /* Skip SGML comments */ - break; - case CDC: - /* Skip SGML comments */ - break; - case IMPORT_RULE: - if (ParseImportRule() != KBrsrSuccess){ - status = iReader.GoToToken(SEMI_COLON, &position); - } - break; - default: - SetPosition(token.iStorage); - return KBrsrSuccess; - } - } - return status; -} - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode TCSSParser::ParserPropertyVal(TCSSPropertyVal* aPropertyVal) -{ - TCSSReaderUnit token; - TUint32 thisPosition; - - NW_ASSERT(aPropertyVal); - - aPropertyVal->next = NULL; - - iReader.SkipWhiteSpaces(); - aPropertyVal->val.Init(NULL, 0, 0); - thisPosition = iReader.GetPosition(); - switch (aPropertyVal->type = iReader.ReadNextToken(&aPropertyVal->val)) - { - case URI: - if (!iReader.ReadURI(&aPropertyVal->val)) - { - if (!iReader.ReadIdentifier(&aPropertyVal->val)) - { - return KBrsrFailure; - } - aPropertyVal->type = IDENTIFIER; - } - break; - case STRING: - break; - case HASH: - if (!iReader.ReadName(&aPropertyVal->val)) - { - return KBrsrFailure; - } - aPropertyVal->type = HASH; - break; - case ALPHA: - if (!iReader.ReadIdentifier(&aPropertyVal->val)) - { - return KBrsrFailure; - } - aPropertyVal->type = IDENTIFIER; - break; - case HYPHEN: - { - thisPosition = iReader.GetPosition(); - aPropertyVal->type = iReader.ReadNumberToken(&aPropertyVal->val); - if (aPropertyVal->type == -1) - { - iReader.SetPosition(thisPosition); - if (!iReader.ReadIdentifier(&aPropertyVal->val)) - { - return KBrsrFailure; - } - aPropertyVal->type = IDENTIFIER; - } - break; - } - case RGB: - { - TCSSPropertyVal rVal; - TCSSPropertyVal gVal; - TCSSPropertyVal bVal; - aPropertyVal->val.iStorage = GetPosition(); - if (ParserRGB(&rVal, &gVal, &bVal) != KBrsrSuccess) - { - return KBrsrFailure; - } - } - break; - case DOT: - iReader.SetPosition(thisPosition); - //Fall through to the default and read the number now - /*lint -fallthrough */ - - default: - aPropertyVal->type = iReader.ReadNumberToken(&aPropertyVal->val); - if (aPropertyVal->type == -1) - { - return KBrsrFailure; - } - break; - } - - iReader.SkipWhiteSpaces(); - thisPosition = iReader.GetPosition(); - switch(iReader.ReadNextToken(&token)) - { - case IMPORTANT: - case RIGHT_BRACE: - case SEMI_COLON: - case BUFFER_END: - SetPosition(token.iStorage); - return KBrsrSuccess; - case URI: - iReader.SetPosition(thisPosition); - aPropertyVal->next = iReader.GetBufferPointer(); - return KBrsrSuccess; - default: - SetPosition(token.iStorage); - aPropertyVal->next = iReader.GetBufferPointer(); - return KBrsrSuccess; - } -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode TCSSParser::ParserRGB(TCSSPropertyVal* aRVal, - TCSSPropertyVal* aGVal, - TCSSPropertyVal* aBVal) -{ - TCSSReaderUnit token; - - NW_ASSERT(aRVal); - NW_ASSERT(aGVal); - NW_ASSERT(aBVal); - - iReader.SkipWhiteSpaces(); - aRVal->type = iReader.ReadNumberToken(&aRVal->val); - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != COMMA) - { - return KBrsrFailure; - } - - iReader.SkipWhiteSpaces(); - aGVal->type = iReader.ReadNumberToken(&aGVal->val); - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != COMMA) - { - return KBrsrFailure; - } - - iReader.SkipWhiteSpaces(); - aBVal->type = iReader.ReadNumberToken(&aBVal->val); - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != RIGHT_PARENTHESIS) - { - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/* ----------------------------------------------------------------------- */ -/* declaration := property ':' S* expr prio? - property := IDENT S* - prio: ! S* important S* - */ -TBrowserStatusCode -TCSSParser::DeclarationListIterate(TCSSReaderUnit* aProperty, - TCSSPropertyVal* aPropertyVal, - TUint8 *aNumVals, - TUint8 aMaxVals, - TBool* aImportant) -{ - TBrowserStatusCode status; - TInt8 tokenType; - TUint8 valIndex = 0; - TCSSReaderUnit token; - TCSSPropertyVal tempVal; - - *aImportant = NW_FALSE; - *aNumVals = 0; - iReader.SkipWhiteSpaces(); - - switch(iReader.ReadNextToken(&token)) - { - case RIGHT_BRACE: - case BUFFER_END: - return KBrsrIterateDone; - case ALPHA: - case HYPHEN: - if (!iReader.ReadIdentifier(aProperty)) - { - return KBrsrFailure; - } - break; - default: - return KBrsrFailure; - } - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != COLON) - { - return KBrsrFailure; - } - - /* Read property value */ - status = ParserPropertyVal(&tempVal); - if (status != KBrsrSuccess) - { - return status; - } - - if (valIndex < aMaxVals) - { - aPropertyVal[valIndex++] = tempVal; - (*aNumVals)++; - } - - /* if there is more than one value read the others e.g. fontborder */ - while (tempVal.next != NULL) - { - /* if need be skip over the comma delimiter */ - tokenType = iReader.ReadNextToken(&token); - if (tokenType != COMMA) - { - /* "undo" ReadNextToken */ - SetPosition(token.iStorage); - } - - status = ParserPropertyVal(&tempVal); - if (status != KBrsrSuccess) - { - return status; - } - - if (valIndex < aMaxVals) - { - aPropertyVal[valIndex++] = tempVal; - (*aNumVals)++; - } - } - tokenType = iReader.ReadNextToken(&token) ; - - if (tokenType == IMPORTANT) - { - *aImportant = NW_TRUE; - iReader.SkipWhiteSpaces(); - tokenType = iReader.ReadNextToken(&token); - } - /* Consume semi-colons (there might be more than one (not in spec)*/ - if (tokenType == SEMI_COLON) - { - do - { - iReader.SkipWhiteSpaces(); - }while(iReader.ReadNextToken(&token) == SEMI_COLON); - } - SetPosition(token.iStorage); - return KBrsrIterateMore; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -TCSSParser::ConditionListIterate(TText8* aConditionType, - TCSSReaderUnit *aValue1, - TCSSReaderUnit *aValue2) -{ - TCSSReaderUnit token; - TInt8 tokenType; - TUint32 readerPosition; - - NW_ASSERT(aValue1); - NW_ASSERT(aValue2); - NW_ASSERT(aConditionType); - - aValue1->Init(NULL, 0, 0); - aValue2->Init(NULL, 0, 0); - *aConditionType = 0; - - switch(tokenType = iReader.ReadNextToken(&token)) - { - case SPACE: - case COMMA: - case LEFT_BRACE: - SetPosition(token.iStorage); - return KBrsrIterateDone; - case -1: - return KBrsrBufferEnd; - case DOT: - if (!iReader.ReadIdentifier(aValue1)) - { - return KBrsrFailure; - } - *aConditionType = CLASS_CONDITION; - break; - case HASH: - *aConditionType = ID_CONDITION; - if (!iReader.ReadName(aValue1)) - { - return KBrsrFailure; - } - break; - case COLON: - if ((tokenType = iReader.GetPseudoClass()) == -1) - { - return KBrsrFailure; - } - *aConditionType = tokenType; - break; - case LEFT_BRACKET: - if (!iReader.ReadIdentifier(aValue1)) - { - return KBrsrFailure; - } - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != EQUALS) - { - return KBrsrFailure; - } - iReader.SkipWhiteSpaces(); - readerPosition = iReader.GetPosition(); - if (iReader.ReadNextToken(&token) == STRING) - { - iReader.SetPosition(readerPosition); - if (!iReader.ReadString(aValue2)) - { - return KBrsrFailure; - } - } - else - { - if (!iReader.ReadName(aValue2)) - { - return KBrsrFailure; - } - } - iReader.SkipWhiteSpaces(); - if (iReader.ReadNextToken(&token) != RIGHT_BRACKET) - { - return KBrsrFailure; - } - *aConditionType = ATTRIBUTE_CONDITION; - break; - - default: - return KBrsrFailure; - } - if (iEventListener) - { - TRAPD(ret, iEventListener->ConditionL(*aConditionType, aValue1, aValue2)); - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - - } - return KBrsrIterateMore; -} - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode -TCSSParser::SimpleSelectorListIterate(TCSSSimpleSelector* aSimpleSelector) -{ - TBrowserStatusCode status; - TCSSReaderUnit token; - TCSSReaderUnit value1, value2; - TUint8 conditionType = 0; - - NW_ASSERT(aSimpleSelector); - - iReader.SkipWhiteSpaces(); - - switch(iReader.ReadNextToken( &token)) - { - case LEFT_BRACE: - case COMMA: - SetPosition(token.iStorage); - return KBrsrIterateDone; - case -1: - return KBrsrBufferEnd; - default: - SetPosition(token.iStorage); - break; - } - - /* initialize simple selector */ - aSimpleSelector->nameSpace.Init(NULL, 0, 0); - aSimpleSelector->elementName.Init(NULL, 0, 0); - aSimpleSelector->conditionListHandle = NULL; - aSimpleSelector->specificity = 0; - - /* Get namespace and elementName */ - TBool parsed = ParseElementName(&aSimpleSelector->nameSpace, &aSimpleSelector->elementName); - if (!parsed) - { - return KBrsrFailure; - } - if (iEventListener) - { - TRAPD(ret, iEventListener->SimpleSelectorStartL(&aSimpleSelector->elementName)); - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - } - - if (aSimpleSelector->elementName.iLength != 0) - { - aSimpleSelector->specificity = 1; - } - /* parse conditions */ - aSimpleSelector->conditionListHandle = iReader.GetBufferPointer(); - status = ConditionListIterate(&conditionType, &value1, &value2); - - if (status == KBrsrIterateDone) - { - aSimpleSelector->conditionListHandle = NULL; - } - - while (status == KBrsrIterateMore) - { - if (conditionType) - { - if (conditionType == ID_CONDITION) - { - aSimpleSelector->specificity += 100; - } - else - { - aSimpleSelector->specificity += 10; - } - } - status = ConditionListIterate(&conditionType, &value1, &value2); - } - if (iEventListener) - { - TBool failed = (status != KBrsrIterateDone)? ETrue:EFalse; - TRAPD(ret, iEventListener->SimpleSelectorEndL(aSimpleSelector, failed)); - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - } - if (status != KBrsrIterateDone) - { - return status; - } - return KBrsrIterateMore; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -TCSSParser::ParseStyleSheet(MCSSEventListener* aEventListener) -{ - TBrowserStatusCode status; - - if (aEventListener != NULL) - { - iEventListener = aEventListener; - iEventListener->SetCurrentEncoding(iReader.GetEncoding()); - } - status = ParseHeader(); - if (status == KBrsrBufferEnd) - { - return KBrsrSuccess; - } - if (status != KBrsrSuccess) - { - return status; - } - /* Parse style rules - * [ruleset | media | [S|CDO|CDC]* ]* - */ - status = ParseStyleRules(); - if (status == KBrsrBufferEnd) - { - return KBrsrSuccess; - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TUint32 TCSSParser::ParseCharset() -{ - TUint32 prevEncoding = GetEncoding(); - if (iReader.ReadCharset() != KBrsrSuccess) - { - return prevEncoding; - } - return GetEncoding(); -} - -/* ------------------------------------------------------------------------- */ -void TCSSParser::SetPosition(TText8* aPosition) -{ - iReader.SetPosition(aPosition - iReader.GetBuffer()); -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSPatternMatcher.cpp --- a/webengine/wmlengine/src/css/src/CSSPatternMatcher.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,882 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Matches CSS Pattern -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "CSSPatternMatcher.h" -#include "nw_dom_document.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_focusevent.h" -#include <nwx_assert.h> -#include "nwx_string.h" - -#include "nw_hed_contenthandler.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_historyvisitor.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::GetNextSimpleSelectorL -// This function gets the data associated with a simple selector (iterator method) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CCSSPatternMatcher::GetNextSimpleSelectorL(TCSSParser* aParser, - NW_Byte* aSelector, - TSimpleSelectorData& aData) -{ - TCSSSimpleSelector simpleSelector; - NW_Uint32 index; - - NW_ASSERT(aParser != NULL); - NW_ASSERT(aSelector != NULL); - - if (aData.simpleSelectorNum == 0) - { - return KBrsrIterateDone; - } - index = 0; - aParser->SetPosition(aSelector); - while (aParser->SimpleSelectorListIterate(&simpleSelector) == KBrsrIterateMore) - { - index++; - if (index == aData.simpleSelectorNum) - break; - } - aData.elementToken = 0; - aData.simpleSelectorNum--; - /*nameSpace = simpleSelector.nameSpace; - deal later */ - aData.conditionListHandle = simpleSelector.conditionListHandle; - if (simpleSelector.elementName.iLength != 0) - { - NW_Ucs2* ucs2Str = simpleSelector.elementName.GetUnicodeL(aParser->GetEncoding()); - aData.elementToken = (NW_Uint16)NW_WBXML_Dictionary_getTagToken(iDictionary,(NW_String_UCS2Buff_t *)ucs2Str, NW_FALSE); - - NW_Mem_Free(ucs2Str); - } - return KBrsrIterateMore; -} - - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::GetElementURLL -// This function gets the url associated with the element node -// ----------------------------------------------------------------------------- -// -NW_Text_t* -CCSSPatternMatcher::GetElementURLL(NW_DOM_ElementNode_t* aElementNode) -{ - NW_String_t attrVal; - NW_Text_t *retUrl = NULL; - - NW_ASSERT(aElementNode != NULL); - - /* Dom Helper always returns attribute as ucs2 */ - TBrowserStatusCode status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, aElementNode, NW_XHTML_AttributeToken_href, &attrVal); - - if (status == KBrsrSuccess) - { - /* Attribute storage is handed off to url text */ - NW_Text_t *url = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2*)attrVal.storage, - NW_Str_Strlen((NW_Ucs2*)attrVal.storage), NW_TRUE); - - if (!url) - { - User::Leave(KErrNoMemory); - } - - /* resolve the URL object */ - status = NW_HED_ContentHandler_ResolveURL (iOwner, url, &retUrl); - if (status != KBrsrSuccess) - { - NW_Object_Delete(url); - return NULL; - } - return retUrl; - } - return NULL; -} - - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::UrlInCache -// This function checks if url is in cache -// ----------------------------------------------------------------------------- -// -TBool -CCSSPatternMatcher::UrlInCache(NW_DOM_ElementNode_t* aElementNode) -{ - NW_Text_t *url; - TBool inCache = EFalse; - - NW_ASSERT(aElementNode != NULL); - - url = GetElementURLL(aElementNode); - if (url) - { - NW_Bool freeNeeded; - NW_Ucs2* ucs2AttrVal1 = NULL; - - ucs2AttrVal1 = NW_Text_GetUCS2Buffer(url, - NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated, - NULL, - &freeNeeded); - if (ucs2AttrVal1 != NULL) - { -//R->ul inCache = UrlLoader_IsUrlInCache(ucs2AttrVal1); - } - - if (freeNeeded) - { - NW_Mem_Free(ucs2AttrVal1); - } - NW_Object_Delete(url); - } - - return inCache; -} - - -/* Match a list words (separated by space) against a pattern */ -static -NW_Bool -NW_CSS_PatternMatcher_MatchWords(NW_Ucs2 * words, NW_Ucs2* pattern) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pSpace = NULL; - - NW_ASSERT(words != NULL); - NW_ASSERT(pattern != NULL); - - NW_Bool retVal = NW_TRUE; - pStart = words; - - pSpace = NW_Str_Strchr(pStart, WAE_ASCII_SPACE); - - if (pSpace != NULL) { - NW_Ucs2 *pParttern = NW_Str_Substr(pStart, 0, pSpace - pStart); - if (!NW_Str_Stricmp(pattern, pParttern)) - { - retVal = NW_TRUE; - } - else - { - retVal = NW_CSS_PatternMatcher_MatchWords((NW_Ucs2*)pSpace + 1, pattern); - } - NW_Mem_Free (pParttern); - return retVal; - } - else { - if (!NW_Str_Stricmp(pattern, words)) - return NW_TRUE; - } - return NW_FALSE; -} - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::MatchConditionL -// This function matches condition list -// ----------------------------------------------------------------------------- -// -TBool -CCSSPatternMatcher::MatchConditionLazyL(NW_DOM_ElementNode_t* aElementNode, - NW_Byte* aConditionListHandle, - TCSSParser* aParser, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData) -{ - TBrowserStatusCode status; - NW_Uint8 conditionType; - TCSSReaderUnit value1; - TCSSReaderUnit value2; - NW_String_t str; - NW_String_t attrVal; - NW_Uint16 attributeToken; - NW_Ucs2* ucs2AttrVal1 = NULL; - NW_Ucs2* ucs2AttrVal2 = NULL; - NW_Ucs2* ucs2AttrName = NULL; - TBool equals = NW_FALSE; - - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aConditionListHandle != NULL); - NW_ASSERT(aParser != NULL); - - aParser->SetPosition(aConditionListHandle); - while (aParser->ConditionListIterate(&conditionType, &value1, &value2) == KBrsrIterateMore) - { - attributeToken = 0; - equals = EFalse; - - switch(conditionType) - { - case CLASS_CONDITION: - { - if ((aNodeData == NULL) || aNodeData->classVal == NULL) - { - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - NW_XHTML_AttributeToken_class, - &attrVal); - if (status != KBrsrSuccess) - { - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - if (aNodeData) - { - aNodeData->classVal = ucs2AttrVal1; - } - } - else - { - ucs2AttrVal1 = aNodeData->classVal; - } - ucs2AttrVal2 = value1.GetUnicodeL(aParser->GetEncoding()); - - if (NULL != NW_CSS_PatternMatcher_MatchWords(ucs2AttrVal1, ucs2AttrVal2)) - { - equals = ETrue; - } - - NW_Mem_Free(ucs2AttrVal2); - break; - } - - case ID_CONDITION: - - if ((aNodeData == NULL) || aNodeData->idVal == NULL) - { - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - NW_XHTML_AttributeToken_id, - &attrVal); - if (status != KBrsrSuccess){ - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - if (aNodeData) - { - aNodeData->idVal = ucs2AttrVal1; - } - } - else - { - ucs2AttrVal1 = aNodeData->idVal; - } - ucs2AttrVal2 = value1.GetUnicodeL(aParser->GetEncoding()); - - /* Compare the strings */ - if ( (NW_Str_Strlen(ucs2AttrVal1) == NW_Str_Strlen(ucs2AttrVal2)) && - (!NW_Mem_memcmp(ucs2AttrVal1, ucs2AttrVal2, NW_Str_Strlen(ucs2AttrVal1)*2)) ) - { - equals = ETrue; - } - - NW_Mem_Free(ucs2AttrVal2); - break; - - case ATTRIBUTE_CONDITION: - ucs2AttrName = value1.GetUnicodeL(aParser->GetEncoding()); - if (ucs2AttrName == NULL) - { - return NW_FALSE; - } - str.storage = (NW_Byte*)ucs2AttrName; - str.length = NW_Str_Strlen(ucs2AttrName); - attributeToken = (NW_Uint16)NW_WBXML_Dictionary_getAttributeToken(iDictionary, &str, HTTP_iso_10646_ucs_2, NW_FALSE); - - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - attributeToken, - &attrVal); - if (status != KBrsrSuccess) - { - NW_Str_Delete(ucs2AttrName); - NW_String_deleteStorage(&attrVal); - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - CleanupStack::PushL(ucs2AttrName); - ucs2AttrVal2 = value2.GetUnicodeL(aParser->GetEncoding()); - CleanupStack::Pop(ucs2AttrName); - - /* Compare the strings */ - if ( (NW_Str_Strlen(ucs2AttrVal1) == NW_Str_Strlen(ucs2AttrVal2)) && - !NW_Str_Stricmp(ucs2AttrVal1, ucs2AttrVal2) ) - { - equals = ETrue; - } - - NW_String_deleteStorage(&attrVal); - NW_Mem_Free(ucs2AttrVal2); - NW_Mem_Free(ucs2AttrName); - break; - - case ACTIVE_PSEUDO_CLASS: - if (!NW_Object_IsInstanceOf(aEvent, &NW_Evt_ActivateEvent_Class)){ - return NW_FALSE; - } - return EFalse; - - case FOCUS_PSEUDO_CLASS: - if (NW_Object_IsInstanceOf(aEvent, &NW_Evt_FocusEvent_Class)){ - if (NW_Evt_FocusEvent_GetHasFocus(aEvent)){ - return ETrue; - } - return EFalse; - } - return EFalse; - - case LINK_PSEUDO_CLASS: - { - TBool isVisited = NW_FALSE; - NW_Text_t* elementUrl = NULL; - - if (aNodeData) - { - if (aNodeData->elementUrl == NULL) - aNodeData->elementUrl = GetElementURLL(aElementNode); - elementUrl = aNodeData->elementUrl; - } - else - elementUrl = GetElementURLL(aElementNode); - - if (elementUrl == NULL) - return EFalse; - - if (aNodeData) - { - if (aNodeData->isVisited) - return NW_FALSE; - if (aNodeData->isLink) - return ETrue; - } - - /* - Check if url has been visited - if yes return FALSE else return TRUE - "Visited" means that the link is either in the cache or in the history list - */ - /* In the cache? */ - isVisited = UrlInCache(aElementNode); - if (aNodeData) - { - aNodeData->isVisited = isVisited; - aNodeData->isCached = aNodeData->isVisited; - if (!aNodeData->isVisited) - aNodeData->isLink = ETrue; - return aNodeData->isLink; - } - if (isVisited) - return EFalse; - else - return ETrue; - } - - case VISITED_PSEUDO_CLASS: - { - TBool isVisited = NW_FALSE; - - if (aNodeData) - { - if (aNodeData->isLink) - return EFalse; - if (aNodeData->isVisited) - return ETrue; - } - - isVisited = UrlInCache(aElementNode); - if (aNodeData) - { - aNodeData->isVisited = isVisited; - aNodeData->isCached = aNodeData->isVisited; - if (!aNodeData->isVisited) - aNodeData->isLink = ETrue; - return aNodeData->isVisited; - } - return isVisited; - } - - case CACHED_PSEUDO_CLASS: - { - return UrlInCache(aElementNode); - } - - default: - return NW_FALSE; - } - - if (!equals) { - break; - } - } - - return equals; -} - -// ----------------------------------------------------------------------------- -// InitSimpleSelectorData -// Initializes SimpleSelectorData -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CCSSPatternMatcher::InitSimpleSelectorData(TCSSParser* aParser, NW_Byte* aSelector, TSimpleSelectorData& aData) -{ - TCSSSimpleSelector simpleSelector; - TBrowserStatusCode status; - - NW_ASSERT(aParser != NULL); - NW_ASSERT(aSelector != NULL); - - aData.simpleSelectorNum = 0; - aData.conditionListHandle = NULL; - aData.elementToken = 0; - aData.nameSpace.Init(NULL, 0, 0); - - aParser->SetPosition(aSelector); - while ((status = aParser->SimpleSelectorListIterate(&simpleSelector)) - == KBrsrIterateMore) - { - aData.simpleSelectorNum++; - } - if (status != KBrsrIterateDone){ - return KBrsrFailure; - } - return KBrsrSuccess; -} - - - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::MatchPatternL -// This function matches pattern -// ----------------------------------------------------------------------------- -// -TBool -CCSSPatternMatcher::MatchPatternLazyL(NW_DOM_ElementNode_t* aElementNode, - TCSSParser* aParser, - NW_Byte* aSelector, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData) -{ - TBrowserStatusCode status; - TSimpleSelectorData data; - - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aParser != NULL); - NW_ASSERT(aSelector != NULL); - - status = InitSimpleSelectorData(aParser, aSelector, data); - if (status!= KBrsrSuccess){ - return EFalse; - } - - status = GetNextSimpleSelectorL(aParser, aSelector, data); - if (data.conditionListHandle != NULL) - { - TBool matched = MatchConditionLazyL(aElementNode, data.conditionListHandle, aParser, aEvent, aNodeData); - if (!matched) - { - return EFalse; - } - } - while ((status = GetNextSimpleSelectorL(aParser, aSelector, data)) == KBrsrIterateMore) - { - NW_Uint16 elementToken; - - if (data.elementToken != 0) - { /* match ancestor */ - do - { - aElementNode = NW_DOM_Node_getParentNode(aElementNode); - if (aElementNode == NULL) - { - return EFalse; - } - elementToken = NW_DOM_ElementNode_getTagToken(aElementNode); - }while (data.elementToken != elementToken); - } - /* empty data == wildcard selector. Go up a generation before starting the - ancestor match */ - else - { - aElementNode = NW_DOM_Node_getParentNode(aElementNode); - if (aElementNode == NULL) - { - return EFalse; - } - } - - if (data.conditionListHandle != NULL) - { - TBool matched = MatchConditionLazyL(aElementNode, data.conditionListHandle, aParser, aEvent, NULL); - if (!matched) - { - return EFalse; - } - } - } - if (status != KBrsrIterateDone){ - return EFalse; - } - return ETrue; -} - - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::MatchPatternL -// This function matches pattern -// ----------------------------------------------------------------------------- -// -TBool -CCSSPatternMatcher::MatchPatternL(NW_DOM_ElementNode_t* aElementNode, - CCSSSelector* aSelector, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData) -{ - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aSelector != NULL); - - TInt size = aSelector->iSimpleSelectorList->Count(); - TInt index = size-1; - CCSSSimpleSelector* simpleSelector = aSelector->iSimpleSelectorList->At(index); - - if (simpleSelector->iConditionList != NULL) - { - TBool matched = MatchConditionL(aElementNode, simpleSelector->iConditionList, - aEvent, aNodeData); - if (!matched) - { - return EFalse; - } - } - while (index > 0) - { - index--; - simpleSelector = aSelector->iSimpleSelectorList->At(index); - TUint16 elementToken = 0; - - if (simpleSelector->iElementToken != 0) - { /* match ancestor */ - do - { - aElementNode = NW_DOM_Node_getParentNode(aElementNode); - if (aElementNode == NULL) - { - return EFalse; - } - elementToken = NW_DOM_ElementNode_getTagToken(aElementNode); - }while (simpleSelector->iElementToken != elementToken); - } - /* empty data == wildcard selector. Go up a generation before starting the - ancestor match */ - else - { - aElementNode = NW_DOM_Node_getParentNode(aElementNode); - if (aElementNode == NULL) - { - return EFalse; - } - } - - if (simpleSelector->iConditionList != NULL) - { - TBool matched = MatchConditionL(aElementNode, simpleSelector->iConditionList, - aEvent, NULL); - if (!matched) - { - return EFalse; - } - } - } - if (index != 0){ - return EFalse; - } - return ETrue; -} - -// ----------------------------------------------------------------------------- -// CCSSPatternMatcher::MatchConditionL -// This function matches condition list -// ----------------------------------------------------------------------------- -// -TBool -CCSSPatternMatcher::MatchConditionL(NW_DOM_ElementNode_t* aElementNode, - CCSSConditionList* aConditionList, - const NW_Evt_Event_t* aEvent, - CCSSNodeData* aNodeData) -{ - TBrowserStatusCode status; - NW_String_t str; - NW_String_t attrVal; - NW_Uint16 attributeToken; - NW_Ucs2* ucs2AttrVal1 = NULL; - TBool equals = NW_FALSE; - TInt index = 0; - TInt numConditions; - - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aConditionList != NULL); - - numConditions = aConditionList->Count(); - - while (index < numConditions) - { - CCSSCondition* condition = aConditionList->At(index); - - index++; - attributeToken = 0; - equals = EFalse; - - switch(condition->iConditionType) - { - case CLASS_CONDITION: - { - if ((aNodeData == NULL) || aNodeData->classVal == NULL) - { - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - NW_XHTML_AttributeToken_class, - &attrVal); - if (status != KBrsrSuccess) - { - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - if (aNodeData) - { - aNodeData->classVal = ucs2AttrVal1; - } - } - else - { - ucs2AttrVal1 = aNodeData->classVal; - } - - if (NULL != NW_CSS_PatternMatcher_MatchWords(ucs2AttrVal1, condition->iValue1)) - { - equals = ETrue; - } - - // Free ucs2AttrVal1 if it wasn't adopted by aNodeData - if ((aNodeData == NULL) || (ucs2AttrVal1 != aNodeData->classVal)) - { - NW_Mem_Free(ucs2AttrVal1); - ucs2AttrVal1 = NULL; - } - break; - } - - case ID_CONDITION: - - if ((aNodeData == NULL) || aNodeData->idVal == NULL) - { - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - NW_XHTML_AttributeToken_id, - &attrVal); - if (status != KBrsrSuccess){ - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - if (aNodeData) - { - aNodeData->idVal = ucs2AttrVal1; - } - } - else - { - ucs2AttrVal1 = aNodeData->idVal; - } - - /* Compare the strings */ - if ( (NW_Str_Strlen(ucs2AttrVal1) == NW_Str_Strlen(condition->iValue1)) && - (!NW_Mem_memcmp(ucs2AttrVal1, condition->iValue1, NW_Str_Strlen(ucs2AttrVal1)*2)) ) - { - equals = ETrue; - } - - // Free ucs2AttrVal1 if it wasn't adopted by aNodeData - if ((aNodeData == NULL) || (ucs2AttrVal1 != aNodeData->idVal)) - { - NW_Mem_Free(ucs2AttrVal1); - ucs2AttrVal1 = NULL; - } - break; - - case ATTRIBUTE_CONDITION: - if (condition->iValue1 == NULL) { - return EFalse; - } - str.storage = (NW_Byte*)condition->iValue1; - str.length = NW_Str_Strlen(condition->iValue1); - attributeToken = (NW_Uint16)NW_WBXML_Dictionary_getAttributeToken(iDictionary, &str, HTTP_iso_10646_ucs_2, NW_FALSE); - - /* Get the attribute from the dom. Dom helper always converts attribute to ucs2 */ - status = NW_HED_DomHelper_GetHTMLAttributeValue (iDomHelper, - aElementNode, - attributeToken, - &attrVal); - if (status != KBrsrSuccess) - { - NW_String_deleteStorage(&attrVal); - return EFalse; - } - - ucs2AttrVal1 = (NW_Ucs2 *)attrVal.storage; - /* Compare the strings */ - if ( (condition->iValue2) && - (NW_Str_Strlen(ucs2AttrVal1) == NW_Str_Strlen(condition->iValue2)) && - !NW_Str_Stricmp(ucs2AttrVal1, condition->iValue2) ) - { - equals = ETrue; - } - - NW_String_deleteStorage(&attrVal); - break; - - case ACTIVE_PSEUDO_CLASS: - return EFalse; - - case FOCUS_PSEUDO_CLASS: - if (NW_Object_IsInstanceOf(aEvent, &NW_Evt_FocusEvent_Class)){ - if (NW_Evt_FocusEvent_GetHasFocus(NW_Evt_FocusEventOf(aEvent))){ - return ETrue; - } - } - return EFalse; - - case LINK_PSEUDO_CLASS: - { - TBool isVisited = NW_FALSE; - NW_Text_t* elementUrl = NULL; - - if (aNodeData) - { - if (aNodeData->elementUrl == NULL) - aNodeData->elementUrl = GetElementURLL(aElementNode); - elementUrl = aNodeData->elementUrl; - } - else - elementUrl = GetElementURLL(aElementNode); - - if (elementUrl == NULL) - return EFalse; - - if (aNodeData) - { - if (aNodeData->isVisited) - return NW_FALSE; - if (aNodeData->isLink) - return ETrue; - } - - /* - Check if url has been visited - if yes return FALSE else return TRUE - "Visited" means that the link is either in the cache or in the history list - */ - /* In the cache? */ - isVisited = UrlInCache(aElementNode); - if (aNodeData) - { - aNodeData->isVisited = isVisited; - aNodeData->isCached = aNodeData->isVisited; - if (!aNodeData->isVisited) - aNodeData->isLink = ETrue; - return aNodeData->isLink; - } - if (isVisited) - return EFalse; - else - return ETrue; - } - - case VISITED_PSEUDO_CLASS: - { - TBool isVisited = NW_FALSE; - - if (aNodeData) - { - if (aNodeData->isLink) - return EFalse; - if (aNodeData->isVisited) - return ETrue; - } - - isVisited = UrlInCache(aElementNode); - if (aNodeData) - { - aNodeData->isVisited = isVisited; - aNodeData->isCached = aNodeData->isVisited; - if (!aNodeData->isVisited) - aNodeData->isLink = ETrue; - return aNodeData->isVisited; - } - return isVisited; - } - - case CACHED_PSEUDO_CLASS: - { - return UrlInCache(aElementNode); - } - - default: - return NW_FALSE; - } - - if (!equals) { - break; - } - } - - return equals; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSProcessor.cpp --- a/webengine/wmlengine/src/css/src/CSSProcessor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2135 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <stddef.h> -#include <nwx_assert.h> -#include <nwx_string.h> -#include <nwx_logger.h> -#include "BrsrStatusCodes.h" -#include "CSSDeclListHandle.h" -#include "CSSHandler.h" -#include "CSSRuleList.h" -#include "CSSImageList.h" -#include "LMgrBoxTreeListener.h" -#include "TKeyArrayPtr.h" -#include "urlloader_urlresponse.h" -#include "nw_css_processori.h" -#include "HEDDocumentListener.h" -#include "nw_hed_contenthandler.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_iloadrecipienti.h" -#include "nw_hed_loader.h" -#include "nw_adt_resizablevector.h" -#include "nw_text_ucs2.h" -#include "nw_gdi_utils.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nwx_settings.h" -#include "nwx_http_defs.h" -#include "GDIDevicecontext.h" -#include "bodypart.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "MVCShell.h" -//#include "BrCtl.h" - -struct TLoadListEntry -{ - NW_Uint16 iTransactionId; - NW_Uint8 iLoadType; - NW_Buffer_t* iPartialChunkBuffer; // owns -}; -typedef CArrayPtrFlat<TLoadListEntry> CCSSLoadList; -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -/* ------------------------------------------------------------------------- */ -static NW_LMgr_Box_t* -NW_CSS_Processor_BoxLookupByNode( NW_CSS_Processor_t* thisObj, NW_DOM_ElementNode_t* imageNode ) - { - //lint -esym(550, status) Symbol not accessed - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( imageNode != NULL ); - - NW_LMgr_Box_t* imageBox = NULL; - - NW_TRY( status ) - { - NW_LMgr_Box_t* box = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( documentRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - // create a box visitor to travel through the tree - if( NW_LMgr_BoxVisitor_Initialize( &boxVisitor, NW_LMgr_BoxOf( rootBox ) ) == KBrsrSuccess ) - { - while( ( box = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, 0 ) ) != NULL ) - { - NW_LMgr_PropertyList_t* boxPropList; - - boxPropList = NW_LMgr_Box_PropListGet( box ); - // It must be simple property - if( boxPropList && NW_Object_IsInstanceOf( boxPropList, &NW_LMgr_SimplePropertyList_Class ) == NW_TRUE ) - { - // check if this is the node that we are looking for - if( (NW_DOM_ElementNode_t*)NW_LMgr_SimplePropertyListOf( boxPropList )->domNode == imageNode ) - { - // return - imageBox = box; - break; - } - } - } - } - } - NW_CATCH( status ) - { - imageBox = NULL; - } - NW_FINALLY - { - return imageBox; - } - NW_END_TRY - } - -static TBrowserStatusCode -NW_CSS_Processor_HandleCSSFetchDisabled( NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Bool isSavedDeck, - NW_Bool isHistLoad, - NW_Bool isReLoad, - TInt cssBufferIndex) -{ - NW_CSS_Processor_PendingLoad_t* pendingLoad = NULL; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (url != NULL); - - NW_TRY (status) { - void* dynEntry; - - pendingLoad = (NW_CSS_Processor_PendingLoad_t*) NW_Mem_Malloc(sizeof *pendingLoad); - NW_THROW_OOM_ON_NULL (pendingLoad, status); - - pendingLoad->isSavedDeck = isSavedDeck; - pendingLoad->isHistLoad = isHistLoad; - pendingLoad->isReLoad = isReLoad; - pendingLoad->url = NW_Text_Copy(url, NW_TRUE); - pendingLoad->cssBufferIndex = cssBufferIndex; - - if(thisObj->pendingLoads == NULL) - { - thisObj->pendingLoads = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_CSS_Processor_PendingLoad_t*), 5, 10); - NW_THROW_OOM_ON_NULL (thisObj->pendingLoads, status); - } - dynEntry = NW_ADT_DynamicVector_InsertAt (thisObj->pendingLoads, &pendingLoad, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL (dynEntry, status); - } - - NW_CATCH (status) { - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t index; - - NW_Object_Delete(pendingLoad->url); - NW_Mem_Free (pendingLoad); - size = NW_ADT_Vector_GetSize(thisObj->pendingLoads); - for (index =0; index <size; index++) - { - NW_CSS_Processor_PendingLoad_t* load; - - load = *(NW_CSS_Processor_PendingLoad_t**) - NW_ADT_Vector_ElementAt (thisObj->pendingLoads, index); - NW_Object_Delete(load->url); - NW_Mem_Free(load); - } - - NW_Object_Delete(thisObj->pendingLoads); - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* -------------------------------------------------------------------------*/ -static -NW_Cache_Mode_t NW_CSS_Processor_GetCacheMode(NW_Bool isSavedDeck, NW_Bool isHistLoad, NW_Bool isReLoad) -{ - if (isSavedDeck) - return NW_CACHE_ONLYCACHE; - else if(isHistLoad) - return NW_CACHE_HISTPREV; - else if (isReLoad) - return NW_CACHE_NOCACHE; - return NW_CACHE_NORMAL; - -} - - -/* -------------------------------------------------------------------------*/ -static -NW_Uint32 -NW_CSS_Processor_ComputeEncoding(NW_Byte* data, - NW_Uint32 length, - NW_Uint32 encoding) -{ - /* - The goal here is to permit the content author to do something - which is within current specifications and can be depended on to - work. - - If the server and loader can identify the charset as something - other than Latin-1 then that charset is accepted as accurate. - - If the charset is Latin-1 (ISO-8859-1) then this either means that - the server and loader accurately communicated the charset as - Latin-1 or they did not communicate and the charset defaulted to - Latin-1. Thus, Latin-1 cannot be relied on to be accurate. So - for Latin-1 we apply the following constraint to determine the - charset: - - Content authors must place a byte order mark (BOM) at the - beginning of the document only if the encoding is UCS-2 or UTF-8. - - If the first bytes are: - - 0xFE 0xFF ## ## where the two ## bytes are not both zero then the - encoding is UCS-2 (UCS-2 is roughly a subset of UTF-16 in our use) - - 0xEF 0xBB 0xBF then the encoding is UTF-8 - - otherwise the encoding is left as Latin-1. - - Differentiating ASCII from Latin-1 is never an issue because it is - a subset of Latin-1 which is the default. - - You can find a discussion of this type of encoding detection at - http://www.w3.org/TR/2000/REC-xml-20001006#sec-guessing - */ - if ((encoding != HTTP_iso_8859_1) || (data == NULL)) - { - return encoding; - } - if (length >= 3) { - if ((data[0] == 0xef) && (data[1] == 0xbb) && (data[2] == 0xbf)) { - return HTTP_utf_8; - } - } - if (length >= 4) { - if (((data[0] == 0xfe) && (data[1] == 0xff)) - && ((data[2] != 0x00) || (data[3] != 0x00))) { - return HTTP_iso_10646_ucs_2; - } - } - return encoding; -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_CSS_Processor_ProcessExternalBuffer(NW_CSS_Processor_t* thisObj, - NW_Byte* data, - NW_Uint32 length, - NW_Uint32 charset, - TInt bufferIndex) -{ - CCSSBufferList* bufferList; - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (data != NULL); - - NW_TRY(status) - { - /* for convenience */ - bufferList = ruleList->GetBufferList(); - - if (charset == 0) - {/* implies - value not found in header */ - charset = bufferList->GetEncoding(bufferIndex); - if (charset ==0){/* default to Latin1 */ - charset = HTTP_iso_8859_1; - } - } - charset = NW_CSS_Processor_ComputeEncoding(data, length, charset); - ruleList->SetCurrentBufferIndex(bufferIndex); - - TCSSParser parser(data, length, charset); - charset = parser.ParseCharset(); - - bufferList->UpdateEntry(data, length, charset, bufferIndex); - - // Parse the complete style sheet -- ignore all problems except - // out of memory. This allows it to apply at least some of the - // style. - status = parser.ParseStyleSheet((MCSSEventListener*)(ruleList)); - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* finally apply stylesheet */ - status = NW_CSS_Processor_ApplyStyleSheet(thisObj); - } - NW_CATCH (status) - {} - NW_FINALLY - { - ruleList->SetCurrentBufferIndex(-1); - return status; - } - NW_END_TRY -} - -/* -------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_CSS_Processor_HandleCSSLoadComplete( NW_CSS_Processor_t* thisObj, NW_Uint16 transactionId, - NW_Url_Resp_t* response, void* clientData ) - { - TLoadListEntry* findEntry = NULL; - - NW_ASSERT( thisObj != NULL ); - - NW_TRY( status ) - { - CCSSLoadList* loadList = (CCSSLoadList*)(thisObj->iLoadList); - TInt index = 0; - - NW_ASSERT( response != NULL ); - - findEntry = (TLoadListEntry*)NW_Mem_Malloc( sizeof( TLoadListEntry ) ); - NW_THROW_OOM_ON_NULL( findEntry, status ); - - findEntry->iTransactionId = transactionId; - TNumKeyArrayPtr matchkey( _FOFF( TLoadListEntry, iTransactionId ), ECmpTUint16 ); - NW_CSS_Processor_LoadContext_t* loadContext = (NW_CSS_Processor_LoadContext_t*) clientData; - - // if found the element remove it - if( loadList->FindIsq( findEntry, matchkey, index ) == 0 ) - { - TLoadListEntry* tempEntry = loadList->At( index ); - - // If the image has not loaded the PartialChunkBuffer will be - // null. Rather than crash we should handle it. - NW_Byte* data; - NW_Uint32 length; - if (tempEntry->iPartialChunkBuffer) - { - data = tempEntry->iPartialChunkBuffer->data; - length = tempEntry->iPartialChunkBuffer->length; - } - else - { - data = NULL; - length = 0; - } - - // css markup itself - if( tempEntry->iLoadType == NW_CSS_Processor_LoadCSS ) - { - NW_Http_CharSet_t charset = response->charset; - // find out if the server response contained any charset - // This gets the highest priority - if( NW_Settings_GetEncoding() == EAutomatic ) - { - charset = response->charset; - } - if (data) - { - status = NW_CSS_Processor_ProcessExternalBuffer( thisObj, data, length, - charset, loadContext->bufferIndex ); - NW_ASSERT( status == KBrsrSuccess ); - // NW_CSS_Processor_ProcessExternalBuffer takes data ownership - if( status == KBrsrSuccess ) - { - tempEntry->iPartialChunkBuffer->data = NULL; - tempEntry->iPartialChunkBuffer->length = 0; - } - } - } - // it is an image - else if( tempEntry->iLoadType == NW_CSS_Processor_LoadImage ) - { - NW_Text_UCS2_t* url; - - url = - NW_Text_UCS2_New( response->uri, 0, NW_Text_Flags_TakeOwnership ); - if( url == NULL ) - { - NW_Mem_Free( data ); - status = KBrsrOutOfMemory; - } - else - { - // make a deep copy of the data - NW_Byte* retData = (NW_Byte*) NW_Mem_Malloc( length ); - if (retData == NULL) - { - NW_Mem_Free( data ); - status = KBrsrOutOfMemory; - } - NW_Mem_memcpy( retData, data, length ); - - status = NW_CSS_Processor_SetImage( thisObj, retData, length, - response->contentTypeString, NW_TextOf( url ) ); - response->uri = NULL; - if( status != KBrsrSuccess ) - { - NW_Mem_Free( data ); - } - NW_Object_Delete( url ); - } - } - else - { - NW_Mem_Free( data ); - } - loadList->Delete( index ); - NW_Buffer_Free(tempEntry->iPartialChunkBuffer); - NW_Mem_Free( tempEntry ); - loadList->Compress(); - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Mem_Free( findEntry ); - - // free response - UrlLoader_UrlResponseDelete( response ); - return status; - } - NW_END_TRY - } - -/* -------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_CSS_Processor_BufferPartialChunk( NW_CSS_Processor_t* thisObj, NW_Uint16 transactionId, - NW_Int32 chunkIndex, NW_Url_Resp_t* response ) - { - TLoadListEntry* findEntry = NULL; - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( response != NULL ); - - NW_TRY( status ) - { - CCSSLoadList* loadList = (CCSSLoadList*)( thisObj->iLoadList ); - - if( response->body != NULL ) - { - TInt index = 0; - - findEntry = (TLoadListEntry*)NW_Mem_Malloc( sizeof( TLoadListEntry ) ); - NW_THROW_OOM_ON_NULL( findEntry, status ); - - findEntry->iTransactionId = transactionId; - // look-up the element in the load list - TNumKeyArrayPtr matchkey( _FOFF( TLoadListEntry, iTransactionId ), ECmpTUint16 ); - if( loadList->FindIsq( findEntry, matchkey, index ) == 0 ) - { - TLoadListEntry* tempEntry = loadList->At( index ); - // first chunk - if( chunkIndex == 0 ) - { - // pass response body ownership - tempEntry->iPartialChunkBuffer = response->body; - response->body = NULL; - loadList->At( index ) = tempEntry; - } - else if( chunkIndex != -1 ) - { - // append body to the buffer - status = NW_Buffer_AppendBuffers( tempEntry->iPartialChunkBuffer, response->body ); - _NW_THROW_ON_ERROR( status ); - } - else - { - // last partial response has no body. should not reach this code - NW_ASSERT( NW_TRUE ); - } - } - else - { - // must find an item in the list - NW_ASSERT( NW_TRUE ); - } - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Mem_Free( findEntry ); - - // free response - UrlLoader_UrlResponseDelete( response ); - return status; - } - NW_END_TRY - } - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_CSS_Processor_ProcessLoadRequest(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Uint8 loadType, - NW_Bool isSavedDeck, - NW_Bool isHistLoad, - NW_Bool isReLoad, - TInt cssBufferIndex) -{ - NW_CSS_Processor_LoadContext_t* loadContext = NULL; - NW_Uint16 transactionId = 0; - NW_Bool deleteLoadOnFailure = NW_FALSE; - NW_HED_Loader_t *loader = NULL; - NW_Ucs2* urlUcs2 = NULL; - CBodyPart* bodyPart = NULL; - TBool isUrlInMultipart = EFalse; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (url != NULL); - - NW_TRY (status) - { - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) - && !NW_Settings_GetCSSFetchEnabled() && loadType == NW_CSS_Processor_LoadCSS) - { - return NW_CSS_Processor_HandleCSSFetchDisabled(thisObj, url, isSavedDeck, isHistLoad, isReLoad, cssBufferIndex); - } - - NW_HED_DocumentRoot_t *documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj->owner); - loader = NW_HED_DocumentRoot_GetLoader (documentRoot); - NW_ASSERT (loader != NULL); - - /* allocate and initialize the LoadContext */ - loadContext = (NW_CSS_Processor_LoadContext_t*)NW_Mem_Malloc (sizeof *loadContext); - NW_THROW_OOM_ON_NULL (loadContext, status); - loadContext->loadType = loadType; - - if (loadType == NW_CSS_Processor_LoadCSS) - { - loadContext->bufferIndex = cssBufferIndex; - } - - NW_HED_ILoadRecipient_t *loadRecipient = (NW_HED_ILoadRecipient_t*) - NW_Object_QueryInterface (thisObj, &NW_HED_ILoadRecipient_Class); - NW_ASSERT (loadRecipient != NULL); - - if( NW_Object_IsInstanceOf (documentRoot->childNode, &NW_XHTML_ContentHandler_Class) ) - { - // compare url with body part - NW_Uint8 freeNeeded; - urlUcs2 = NW_Text_GetUCS2Buffer( url, NULL, NULL, &freeNeeded); - NW_XHTML_ContentHandler_t* xhtmlCH = (NW_XHTML_ContentHandler_t*) documentRoot->childNode; - isUrlInMultipart = _NW_HED_CompositeContentHandler_IsUrlInMultipart( - NW_HED_CompositeContentHandlerOf(xhtmlCH), - urlUcs2, &bodyPart ); - if( freeNeeded ) - { - NW_Mem_Free( urlUcs2 ); - } - } - - if( isUrlInMultipart ) - { - TDataType dataType( bodyPart->ContentType() ); - - TUint8* charset = (TUint8*) bodyPart->Charset().Ptr(); - TInt lenCh = bodyPart->Charset().Length(); - //R - /*CShell* shell = REINTERPRET_CAST(CShell*, NW_Ctx_Get(NW_CTX_BROWSER_APP, 0)); - NW_ASSERT(shell); - TInt32 uidInt = shell->GetUidFromCharset( charset, lenCh ); - TUid uid = TUid::Uid( uidInt ); - - CBrCtl* brCtl = shell->BrCtl(); - - brCtl->LoadDataL( bodyPart->Url(), bodyPart->Body(), dataType, uid, - NULL, loadContext, loadRecipient, &transactionId, - (NW_Uint8) (loadType == NW_CSS_Processor_LoadCSS ? NW_UrlRequest_Type_Css: NW_UrlRequest_Type_Image), - 0); - */ - } - else - { - /* submit the load request */ - status = NW_HED_Loader_StartLoad (loader, url, - NW_HED_UrlRequest_Reason_DocLoadChild, - loadRecipient, loadContext, - &transactionId, - (NW_Uint8) (loadType == NW_CSS_Processor_LoadCSS ? NW_UrlRequest_Type_Css: NW_UrlRequest_Type_Image), - NW_CSS_Processor_GetCacheMode(isSavedDeck, isHistLoad, isReLoad)); - NW_THROW_ON_ERROR (status); - } - deleteLoadOnFailure = NW_TRUE; - - /* store the transaction id in the load list */ - CCSSLoadList* loadList = (CCSSLoadList*)(thisObj->iLoadList); - - TLoadListEntry* entry = (TLoadListEntry*)NW_Mem_Malloc( sizeof( TLoadListEntry ) ); - NW_THROW_OOM_ON_NULL (entry, status); - - entry->iTransactionId = transactionId; - entry->iLoadType = loadType; - entry->iPartialChunkBuffer = NULL; - - TNumKeyArrayPtr matchkey(_FOFF(TLoadListEntry, iTransactionId), ECmpTUint16); - TRAPD(ret, loadList->InsertIsqL(entry, matchkey)); - if (ret == KErrNoMemory) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - } - - NW_CATCH (status) { - if (deleteLoadOnFailure == NW_TRUE) - { - (void) NW_HED_Loader_DeleteLoad (loader, transactionId, NULL); - } - - NW_Mem_Free (loadContext); - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_ProcessPendingLoads(NW_CSS_Processor_t* thisObj) -{ - NW_ADT_Vector_Metric_t numPending; - NW_ADT_Vector_Metric_t index; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - - if(thisObj->pendingLoads == NULL) - return status; - - numPending = NW_ADT_Vector_GetSize (thisObj->pendingLoads); - - for( index = 0; index < numPending; index++) - { - NW_CSS_Processor_PendingLoad_t* load; - load = *(NW_CSS_Processor_PendingLoad_t**)NW_ADT_Vector_ElementAt(thisObj->pendingLoads, index); - status = NW_CSS_Processor_ProcessLoadRequest(thisObj, - load->url, - NW_CSS_Processor_LoadCSS, - load->isSavedDeck, - load->isHistLoad, - load->isReLoad, - load->cssBufferIndex); - NW_Object_Delete(load->url); - NW_Mem_Free(load); - if(status == KBrsrOutOfMemory) - { - NW_Object_Delete(thisObj->pendingLoads); - thisObj->pendingLoads = NULL; - return status; - } - } - NW_Object_Delete(thisObj->pendingLoads); - thisObj->pendingLoads = NULL; - return status; -} - -NW_Bool -_NW_CSS_Processor_IImageObserver_IsVisible(NW_Image_IImageObserver_t* aImageObserver) - { - NW_REQUIRED_PARAM(aImageObserver); - return NW_FALSE; - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_CSS_Processor_Class_t NW_CSS_Processor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface, - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_CSS_Processor_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_CSS_Processor_t), - /* construct */ _NW_CSS_Processor_Construct, - /* destruct */ _NW_CSS_Processor_Destruct - }, - { /* NW_CSS_Processor */ - /* unused */ NULL - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const NW_CSS_Processor_InterfaceList[] = { - &NW_CSS_Processor_ILoadRecipient_Class, - &NW_CSS_Processor_IImageObserver_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ILoadRecipient_Class_t NW_CSS_Processor_ILoadRecipient_Class = { - { /* NW_Object_Base */ - /* super */ &NW_HED_ILoadRecipient_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface, - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_CSS_Processor_t, NW_HED_ILoadRecipient) - }, - { /* NW_HED_LoadRecipient */ - /* processPartialLoad */ _NW_CSS_Processor_ILoadRecipient_ProcessPartialLoad - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Image_IImageObserver_Class_t NW_CSS_Processor_IImageObserver_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_IImageObserver_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof( NW_CSS_Processor_t, NW_Image_IImageObserver ) - }, - { /* NW_Image_IImageObserver */ - /* imageOpened */ _NW_CSS_Processor_IImageObserver_ImageOpened, - /* sizeChanged */ _NW_CSS_Processor_IImageObserver_SizeChanged, - /* imageOpeningStarted */ _NW_CSS_Processor_IImageObserver_ImageOpeningStarted, - /* imageDecoded */ _NW_CSS_Processor_IImageObserver_ImageDecoded, - /* imageDestroyed */ _NW_CSS_Processor_IImageObserver_ImageDestroyed, - /* isVisible */ _NW_CSS_Processor_IImageObserver_IsVisible - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_CSS_Processor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_CSS_Processor_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_CSS_Processor_Class)); - NW_ASSERT (argp != NULL); - - NW_REQUIRED_PARAM(argp); - - /* for convenience */ - thisObj = NW_CSS_ProcessorOf (dynamicObject); - - /* initialize member variables */ - thisObj->imageList = NULL; - - TRAPD(ret1, thisObj->iLoadList = new (ELeave)CCSSLoadList(1)); - if (ret1 == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - thisObj->isSavedDeck = NW_FALSE; - thisObj->isHistLoad = NW_FALSE; - thisObj->isReLoad = NW_FALSE; - TRAPD(ret2, thisObj->ruleList = CCSSRuleList::NewL(thisObj)); - if (ret2 == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* -------------------------------------------------------------------------*/ -void -_NW_CSS_Processor_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - // for convenience - NW_CSS_Processor_t* thisObj = NW_CSS_ProcessorOf (dynamicObject); - - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj->owner); - NW_HED_Loader_t* loader = NW_HED_DocumentRoot_GetLoader (documentRoot); - NW_ASSERT (loader != NULL); - - CCSSLoadList* loadList = (CCSSLoadList*)(thisObj->iLoadList); - TInt index = loadList->Count(); - while (index-- > 0) - { - NW_CSS_Processor_LoadContext_t* loadContext = NULL; - - TLoadListEntry* entry = loadList->At(index); - if (NW_HED_Loader_DeleteLoad (loader, entry->iTransactionId, &loadContext)== KBrsrSuccess) - { - NW_Mem_Free (loadContext); - } - // release partial chunk buffer - if( entry->iPartialChunkBuffer != NULL ) - { - NW_Buffer_Free( entry->iPartialChunkBuffer ); - } - NW_Mem_Free (entry); - } - - if(thisObj->pendingLoads != NULL) - { - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t i; - - size = NW_ADT_Vector_GetSize(thisObj->pendingLoads); - for (i =0; i <size; i++) - { - NW_CSS_Processor_PendingLoad_t* load; - - load = *(NW_CSS_Processor_PendingLoad_t**) - NW_ADT_Vector_ElementAt (thisObj->pendingLoads, i); - NW_Object_Delete(load->url); - NW_Mem_Free(load); - } - NW_Object_Delete(thisObj->pendingLoads); - } - - if (loadList != NULL) - delete ((CCSSLoadList*)loadList); - if (thisObj->imageList != NULL) - delete ((CCSSImageList*)thisObj->imageList); - if (thisObj->cssHandler != NULL) - delete ((CCSSHandler*)thisObj->cssHandler); - if (thisObj->ruleList != NULL) - delete ((CCSSRuleList*)thisObj->ruleList); -} - -/* -------------------------------------------------------------------------* - NW_CSS_Processor methods - * -------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_CSS_Processor_ILoadRecipient_ProcessPartialLoad(NW_HED_ILoadRecipient_t* loadListener, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData) - { - NW_CSS_Processor_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (loadListener != NULL); - NW_ASSERT (urlRequest != NULL); - - // avoid 'unrefereced formal parameter' warnings - NW_REQUIRED_PARAM (transactionId); - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (loadListener, - &NW_CSS_Processor_ILoadRecipient_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - // get the implementer - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer (loadListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_CSS_Processor_Class)); - - if( chunkIndex >= 0 ) - { - status = NW_CSS_Processor_BufferPartialChunk( thisObj, transactionId, chunkIndex, response ); - } - // last chunk - else - { - if( loadStatus == KBrsrSuccess ) - { - status = NW_CSS_Processor_HandleCSSLoadComplete( thisObj, transactionId, response, clientData ); - } - // free request on last chunk - NW_Object_Delete( urlRequest ); - // free the clientData - NW_Mem_Free (clientData); - } - return status; - } - -/* ------------------------------------------------------------------------- * - NW_CSS_Processor_IImageObserver_Class implementation - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_CSS_Processor_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ) - { - NW_TRY( status ) - { - NW_CSS_Processor_t* thisObj; - - NW_REQUIRED_PARAM( suppressDupReformats ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, - &NW_Image_Virtual_Class )); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &NW_CSS_Processor_IImageObserver_Class )); - - // obtain the implementer - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_CSS_Processor_Class ) ); - NW_ASSERT( thisObj->imageList ); - - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - // replace corresponding images on boxproperty. - // we need to look up the node first so that we can get the box based - // on the node information - - if( failed == NW_FALSE ) - { - CCSSImageList* imageList = (CCSSImageList*)(thisObj->imageList); - NW_DOM_ElementNode_t* imageNode = NULL; - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( abstractImage, &imageNode ); - - if( imageEntry ) - { - NW_LMgr_PropertyName_t imagePropertyName = (NW_LMgr_PropertyName_t) - ( imageEntry->ListItem() ? NW_CSS_Prop_listStyleImage : NW_CSS_Prop_backgroundImage ); - - // get the corresponding box - NW_LMgr_Box_t* imageBox = NW_CSS_Processor_BoxLookupByNode( - thisObj, imageNode ); - NW_THROW_ON_NULL( imageBox, status, KBrsrFailure ); - - NW_LMgr_Property_t imageProperty; - // this box has the image. let's replace the image on it. - if( NW_LMgr_Box_GetProperty( imageBox, imagePropertyName, &imageProperty ) == KBrsrSuccess ) - { - if(imageProperty.value.object != abstractImage) - { - // replace the image on the box. the old image is freed by NW_LMgr_Box_SetProperty - imageProperty.value.object = (NW_Object_t*)abstractImage; - NW_LMgr_Box_SetProperty( imageBox, imagePropertyName, &imageProperty ); - } - // and remove the ownership from the image list - imageList->RemoveVirtualImageOwnership( *imageEntry, abstractImage ); - } - - // and finally call decode or relayout based on the image type - if( imageEntry->ListItem() ) - { - // list item - // relayout is needed - NW_Image_IImageObserver_SizeChanged( imageObserver, abstractImage ); - } - else - { - // background image - // decode it unless it is not in the view - - NW_GDI_Rectangle_t imageRect; - - if( NW_LMgr_Box_GetVisibleBounds( imageBox, &imageRect ) == NW_TRUE ) - { - // we need the rootbox to get the device context which then gives us the - // current view coordinates - CGDIDeviceContext* deviceContext = - NW_LMgr_RootBox_GetDeviceContext( rootBox ); - NW_THROW_ON_NULL( deviceContext, status, KBrsrFailure ); - - NW_GDI_Rectangle_t viewRect = deviceContext->ClipRect(); - - if( NW_GDI_Rectangle_Cross( &imageRect, &viewRect, NULL ) ) - { - // force decode - (void)NW_Image_AbstractImage_ForceImageDecode( abstractImage ); - } - } - } - } - } - // removed from the queue - NW_LMgr_RootBox_ImageOpened( rootBox ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_CSS_Processor_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_TRY( status ) - { - NW_CSS_Processor_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, - &NW_Image_Virtual_Class )); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &NW_CSS_Processor_IImageObserver_Class )); - - // obtain the implementer - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( thisObj->owner != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_CSS_Processor_Class ) ); - - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - // get image box - CCSSImageList* imageList = (CCSSImageList*)(thisObj->imageList); - NW_DOM_ElementNode_t* imageNode = NULL; - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( abstractImage, &imageNode ); - - if( imageEntry ) - { - // get the corresponding box - NW_LMgr_Box_t* box = NW_CSS_Processor_BoxLookupByNode( - thisObj, imageNode ); - - NW_THROW_ON_NULL( box, status, KBrsrFailure ); - // table performance: to prevent additional relayouts on the entire page (max pass of the automatic - // table algorithm), images update parent table size by setting a flag on the table. the actual resize - // happens when a relayout event is generated. - while( box->parent != NULL ) - { - // find the parent table. - if( NW_Object_IsClass( box->parent, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - NW_LMgr_StaticTableBox_TableSizeChanged( NW_LMgr_StaticTableBoxOf( box->parent ) ); - break; - } - box = NW_LMgr_BoxOf( box->parent ); - } - } - NW_LMgr_RootBox_SetNeedsRelayout( rootBox ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -void -_NW_CSS_Processor_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_TRY( status ) - { - NW_CSS_Processor_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - /* parameter assertion block */ - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, - &NW_Image_Virtual_Class )); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &NW_CSS_Processor_IImageObserver_Class )); - - /* obtain the implementer */ - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT (NW_Object_IsInstanceOf( thisObj, &NW_CSS_Processor_Class ) ); - - NW_HED_DocumentRoot_t* docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( docRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - NW_LMgr_RootBox_ImageOpeningStarted( rootBox ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_CSS_Processor_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed) - { - NW_REQUIRED_PARAM(failed); - - NW_TRY( status ) - { - NW_CSS_Processor_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, - &NW_Image_Virtual_Class )); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &NW_CSS_Processor_IImageObserver_Class )); - - /* obtain the implementer */ - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_CSS_Processor_Class ) ); - NW_ASSERT( thisObj->owner != NULL ); - NW_ASSERT( thisObj->imageList != NULL ); - - // refresh corresponding image box. - - // first get the image list entry - CCSSImageList* imageList = (CCSSImageList*)(thisObj->imageList); - NW_DOM_ElementNode_t* imageNode; - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( abstractImage, &imageNode ); - - if( imageEntry ) - { - NW_LMgr_Box_t* imageBox = NW_CSS_Processor_BoxLookupByNode( thisObj, imageNode ); - NW_THROW_ON_NULL( imageBox, status, KBrsrFailure ); - - NW_LMgr_Box_Refresh( imageBox ); - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_CSS_Processor_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_CSS_Processor_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, - &NW_Image_Virtual_Class )); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &NW_CSS_Processor_IImageObserver_Class )); - - /* obtain the implementer */ - thisObj = (NW_CSS_Processor_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_CSS_Processor_Class ) ); - NW_ASSERT( thisObj->imageList != NULL ); - - CCSSImageList* imageList = (CCSSImageList*)(thisObj->imageList); - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( abstractImage, NULL ); - - if( imageEntry ) - { - imageList->VirtualImageDestroyed( *imageEntry, abstractImage ); - } - } - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* Add an entry for the buffer to be received. This will be called when LINK - * or import statement is encountered. This is so because, we issue a load request - * and then wait for the response to come. But since in CSS the order of - * statements matter, we want to save an entry - */ -TBrowserStatusCode -NW_CSS_Processor_Load(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_Text_t* encoding, - NW_Bool isSavedDeck, - NW_Bool isHistLoad, - NW_Bool isReLoad) -{ - NW_Uint32 charset; - CCSSBufferList* bufferList; - NW_Ucs2* urlStr = NULL; - NW_Text_Length_t urlLen; - NW_Bool freeNeeded = NW_FALSE; - TInt cssBufferIndex = 0; - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - - NW_ASSERT(thisObj); - if (url == NULL){ - return KBrsrSuccess; - } - charset = 0; - if (encoding != NULL){ - const NW_Ucs2* storage; - NW_Text_Length_t length; - - storage = NW_Text_GetUCS2Buffer (encoding, 0, &length, NULL); - /* find integer representation for charset string */ - TCSSReader reader((TText8*)storage, (length+1)*2, HTTP_iso_10646_ucs_2); - - charset = reader.GetCharsetVal(); - NW_Object_Delete(encoding); - } - - bufferList = ruleList->GetBufferList(); - - urlStr = NW_Text_GetUCS2Buffer (url, 0, &urlLen, &freeNeeded); - - TRAPD(ret, bufferList->AddL(NULL, 0, charset, NW_FALSE, urlStr)); - cssBufferIndex = bufferList->GetSize() - 1; - if (freeNeeded) - { - NW_Str_Delete(urlStr); - } - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - - return NW_CSS_Processor_ProcessLoadRequest(thisObj, - NW_TextOf(url), - NW_CSS_Processor_LoadCSS, - isSavedDeck, - isHistLoad, - isReLoad, - cssBufferIndex); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_ApplyStyles(NW_CSS_Processor_t* thisObj, - NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, - const NW_Evt_Event_t* aEvent, - NW_HED_DomHelper_t* aDomHelper) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (aElementNode != NULL); - NW_ASSERT (aBox != NULL); - NW_ASSERT (aDomHelper != NULL); - - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - - TRAPD(ret, ruleList->ApplyStylesL(aElementNode, aBox, aEvent, aDomHelper)); - return (ret==KErrNoMemory ? KBrsrOutOfMemory : KBrsrSuccess); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_ResolveURL (NW_CSS_Processor_t* thisObj, NW_Text_t* url, NW_Text_t** retUrl, - TInt aBufferIndex) - { - if (aBufferIndex == -1) - { - // inline style does not have a buffer index. Resolve the url with the markup url - *retUrl = NULL; - return KBrsrSuccess; - } - // CSS2 spec at http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#value-def-uri - // chapter 4.3.4 specifies that relative url of a background image has to be resolved - // against the absolute url of the css and not the html - - NW_Uint8 freeLoadUrl = NW_FALSE; - CCSSBufferList* bufferList; - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - bufferList = ruleList->GetBufferList(); - - TInt count = bufferList->Count(); - - if (count <= aBufferIndex) - { - // Cannot find the entry in the load list - NW_ASSERT(0); - *retUrl = NULL; - return KBrsrSuccess; - } - - const NW_Ucs2* docUrl = bufferList->EntryUrl(aBufferIndex); - if (docUrl == NULL) - { - // Cannot find the entry in the load list - *retUrl = NULL; - return KBrsrSuccess; - } - - const NW_Ucs2* loadUrl = NULL; - NW_Text_UCS2_t* absUrlText = NULL; - NW_Ucs2* absUrl = NULL; - NW_Bool isRelative; - - NW_TRY(status) - { - /* get the url as a ucs2 char string */ - loadUrl = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, NULL, &freeLoadUrl); - NW_THROW_OOM_ON_NULL((void*)loadUrl, status); - - if(!NW_Text_GetCharCount(url)) - { - isRelative = NW_TRUE; - } - else - { - /* if the supplied URL is absolute we simply return that */ - status = NW_Url_IsRelative (loadUrl, &isRelative); - NW_THROW_ON_ERROR (status); - } - if ( isRelative == NW_FALSE) - { - if (freeLoadUrl) - { - NW_Mem_Free ((NW_Ucs2*) loadUrl); - } - /*make a deep copy of the text */ - *retUrl = NW_Text_Copy(url, NW_TRUE); - NW_THROW_OOM_ON_NULL(*retUrl, status); - return KBrsrSuccess; - } - - if(!NW_Str_Strlen(loadUrl)) - { - absUrl = NW_Str_Newcpy(docUrl); - NW_THROW_OOM_ON_NULL(absUrl, status); - } - else - { - /* construct the absolute URL */ - status = NW_Url_RelToAbs (docUrl, loadUrl, &absUrl); - NW_THROW_ON_ERROR (status); - } - - absUrlText = NW_Text_UCS2_New (absUrl, 0, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL(absUrlText, status); - absUrl = NULL; - - /* fall through */ - - } - - NW_CATCH (status) - { /* empty */ - } - - NW_FINALLY { - - if (freeLoadUrl == NW_TRUE) - { - NW_Mem_Free ((NW_Ucs2*) loadUrl); - } - - NW_Mem_Free (absUrl); - - *retUrl = (NW_Text_t*) absUrlText; - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_GetImage(NW_CSS_Processor_t* thisObj, - NW_Text_t* url, - NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propName, - NW_Image_AbstractImage_t** image, - TInt aBufferIndex) - { - NW_Text_t* retUrl = NULL; - TBrowserStatusCode status = KBrsrSuccess; - CCSSImageList* imageList = NULL; - TBool found = EFalse; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (url != NULL); - NW_ASSERT (image != NULL); - - *image = NULL; - status = NW_CSS_Processor_ResolveURL (thisObj, url, &retUrl, aBufferIndex); - if (status == KBrsrSuccess) - { - if (retUrl == NULL) - { - // inline style - status = NW_HED_ContentHandler_ResolveURL (thisObj->owner, url, &retUrl); - } - else - { - NW_Object_Delete(url); - } - } - - if (status != KBrsrSuccess) - { - NW_Object_Delete(url); - return status; - } - // give ownership to url - url = retUrl; - retUrl = NULL; - - if (thisObj->imageList == NULL) - { - // create the imageList - TRAPD(ret, thisObj->imageList = CCSSImageList::NewL( *thisObj )); - if (ret == KErrNoMemory) - { - //RETURN OOM - // TODO: Should OOM be returned here? - vishy 8/13/2002 - NW_Object_Delete(url); - return KBrsrOutOfMemory; - } - } - imageList = (CCSSImageList*)(thisObj->imageList); - - TRAPD( ret, *image = imageList->GetImageL( url, found ) ); - if( ret == KErrNone) - { - // first check which node has this box - NW_ASSERT( box != NULL ); - // lookup the dom node which is associated with the image - NW_DOM_ElementNode_t* imageNode; - NW_LMgr_PropertyList_t* boxPropList; - - boxPropList = NW_LMgr_Box_PropListGet( box ); - NW_ASSERT( boxPropList != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( boxPropList, &NW_LMgr_SimplePropertyList_Class ) ); - - imageNode = (NW_DOM_ElementNode_t*)NW_LMgr_SimplePropertyListOf( boxPropList )->domNode; - NW_ASSERT( imageNode != NULL ); - - if( !found ) - { - // no load has been requested on this image - // let's create an entry in the image list and - // issue the load - - // list item can be declared either as NW_CSS_Prop_listStyleImage or - // NW_CSS_Prop_listStyle. NW_CSS_Prop_listStyle is the shortcut version - // of NW_CSS_Prop_listStyleImage - TBool listItem( propName == NW_CSS_Prop_listStyleImage || - propName == NW_CSS_Prop_listStyle ); - - // and create an image entry - TRAPD(ret, imageList->CreateImageEntryL( url, imageNode, listItem ) ); - if( ret != KErrNone ) - { - // unable to create an image entry - // what to do? - // return NULL; ??? - } - // Load url - if( NW_Settings_GetImagesEnabled() ) - { - status = NW_CSS_Processor_ProcessLoadRequest(thisObj, - NW_TextOf(url), - NW_CSS_Processor_LoadImage, - thisObj->isSavedDeck, - thisObj->isHistLoad, - thisObj->isReLoad, - 0); - } - } - else - { - // image is either being loaded or has already been loaded. - // let's create a virtual image - TInt ret; - TRAP( ret, *image = imageList->AddVirtualNodeToImageEntryL( url, imageNode ) ); - NW_Object_Delete (url); - } - } - else - { - NW_Object_Delete (url); - } - // KErrNoMemory to be handled - - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - return status; - } - -/*-------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_CSS_Processor_SetImage(NW_CSS_Processor_t* thisObj, - NW_Byte* data, - NW_Uint32 length, - NW_Http_ContentTypeString_t contentTypeString, - NW_Text_t* url) -{ - CCSSImageList* imageList = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (url != NULL); - - if (data == NULL) - { - //No image data - return status; - } - - - if (thisObj->imageList == NULL) - { - TRAPD(ret, thisObj->imageList = CCSSImageList::NewL( *thisObj )); - if (ret == KErrNoMemory) - { - status = KBrsrOutOfMemory; - } - } - if (thisObj->imageList) - { - imageList = (CCSSImageList*)(thisObj->imageList); - TRAPD(ret, imageList->SetImageL(url, data, length, contentTypeString )); - if (ret == KErrNoMemory) - { - status = KBrsrOutOfMemory; - } - } - return status; -} - -/*-------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_CSS_Processor_ShowImages(NW_CSS_Processor_t* thisObj) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - - if (thisObj->imageList != NULL) - { - CCSSImageList* imageList = (CCSSImageList*)thisObj->imageList; - status = imageList->ShowImages(); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_ApplyStyleSheet(NW_CSS_Processor_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - NW_HED_ContentHandler_t* contentHandler = (NW_HED_ContentHandler_t*)(thisObj->owner); - - NW_TRY(status) - { - CCSSHandler* cssHandler = NULL; - - /* we don't want to reapply styles if there is no stylesheet */ - if ((ruleList->GetSize() ==0) || (contentHandler->boxTree == NULL)) - { - NW_THROW_SUCCESS(status); - } - - if (thisObj->cssHandler == NULL) - { - TRAPD(ret, thisObj->cssHandler = CCSSHandler::NewL(thisObj)); - if (ret != KErrNone) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - // let the view know about the css apply so that any outstanding format can - // be cancelled - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj->owner ); - NW_THROW_ON_NULL( documentRoot, status, KBrsrFailure ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - rootBox->boxTreeListener->StartCSSApply (); - - cssHandler = (CCSSHandler*)thisObj->cssHandler; - TRAPD(ret, cssHandler->ApplyStylesL()); - if (ret == KErrNoMemory) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - else if (ret != KErrNone) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - NW_CATCH( status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -NW_CSS_Processor_Suspend(NW_CSS_Processor_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - if (thisObj->cssHandler) - { - CCSSHandler* cssHandler = (CCSSHandler*)thisObj->cssHandler; - cssHandler->Cancel(); - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_ApplyStyleAttribute(NW_CSS_Processor_t* thisObj, NW_Text_t* styleVal, NW_LMgr_Box_t* box) -{ - NW_Ucs2* storage; - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (styleVal != NULL); - NW_ASSERT (box != NULL); - - NW_TRY (status) - { - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (styleVal, NW_Text_Flags_Aligned, &length, - &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - TCSSParser parser((NW_Byte *)(storage), (length+1)*2, HTTP_iso_10646_ucs_2); - - TRAPD(ret, TCSSDeclListHandle::ApplyStylesL(box, &parser, thisObj, - /* inline style does not have a buffer index */-1)); - if (freeNeeded) - { - NW_Mem_Free((NW_Ucs2*)storage); - } - if (ret == KErrNoMemory) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -NW_CSS_Processor_GetNumCSSImages(NW_CSS_Processor_t* thisObj) -{ - TInt numImages = 0; - - NW_ASSERT (thisObj != NULL); - - if (thisObj->imageList) - { - CCSSImageList* imageList = (CCSSImageList*)thisObj->imageList; - numImages = imageList->GetNumImages(); - } - return (NW_Uint32)numImages; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -NW_CSS_Processor_GetNumStyleSheets(NW_CSS_Processor_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - TInt numStyleSheets = 0; - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - CCSSBufferList* bufferList = ruleList->GetBufferList(); - if (bufferList) - { - numStyleSheets = bufferList->GetExternalSize(); - } - return (NW_Uint32)numStyleSheets; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_CSS_Processor_WriteMultipartSegment(NW_CSS_Processor_t* thisObj, - NW_Osu_File_t fh, - NW_Uint32 numCSSImages, - NW_Uint32 numStyleSheets) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - - if (numStyleSheets > 0) - { - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - CCSSBufferList* bufferList = ruleList->GetBufferList(); - - status = bufferList->WriteMultipartSegments(fh); - if (status == KBrsrOutOfMemory) - return status; - } - if (numCSSImages > 0) - { - CCSSImageList* imageList = (CCSSImageList*)thisObj->imageList; - status = imageList->WriteMultipartSegments(fh); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_CSS_Processor_ProcessBuffer(NW_CSS_Processor_t* thisObj, - NW_Byte* data, NW_Uint32 length, NW_Uint32 encoding, NW_Bool doNotDelete) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (data != NULL); - - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - - return ruleList->ProcessBuffer(data, length, encoding, doNotDelete); -} - -/* ------------------------------------------------------------------------- */ -void -NW_CSS_Processor_SetDictionary(NW_CSS_Processor_t* thisObj, NW_WBXML_Dictionary_t* dictionary) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (dictionary != NULL); - - CCSSRuleList* ruleList = (CCSSRuleList*)thisObj->ruleList; - ruleList->SetDictionary(dictionary); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_CSS_Processor_t* -NW_CSS_Processor_New() -{ - return (NW_CSS_Processor_t *) - (NW_Object_New (&NW_CSS_Processor_Class)); -} - -/* -------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_CSS_Processor_ReplaceBox (NW_LMgr_Box_t** box, - NW_LMgr_PropertyValue_t *displayVal) -{ - NW_ASSERT (box != NULL); - NW_ASSERT (displayVal != NULL); - - NW_LMgr_Box_t* containerBox = *box; - NW_LMgr_ContainerBox_t* parentBox = containerBox->parent; - NW_LMgr_Box_t* replacement = NULL; - - NW_TRY(status) - { - NW_LMgr_Property_t prop; - NW_ADT_Vector_Metric_t childCount = 0; - NW_ADT_Vector_Metric_t index = 0; - NW_ADT_DynamicVector_t* children = NULL; - - if (displayVal->token == NW_CSS_PropValue_display_inline) - { - replacement = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - } - else - { - replacement = (NW_LMgr_Box_t*)NW_LMgr_BidiFlowBox_New(0); - } - NW_THROW_OOM_ON_NULL (replacement, status); - - /* Take over the property list from the container box */ - if (replacement->propList != NULL) - { - NW_Object_Delete(replacement->propList); - } - replacement->propList = containerBox->propList; - containerBox->propList = NULL; - - /* replace the old box with the new - first detach children as we need to - transfer them later */ - children = NW_LMgr_ContainerBoxOf(containerBox)->children; - NW_LMgr_ContainerBoxOf(containerBox)->children = NULL; - status = NW_LMgr_ContainerBox_ReplaceChild(parentBox, containerBox, replacement); - _NW_THROW_ON_ERROR (status); - NW_Object_Delete(containerBox); - containerBox = replacement; - replacement = NULL; - - if (displayVal->token == NW_CSS_PropValue_display_marquee) - { - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_hidden; - status = NW_LMgr_Box_SetProperty(containerBox, NW_CSS_Prop_overflow, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(containerBox, NW_CSS_Prop_display, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - replacement = (NW_LMgr_Box_t*)NW_LMgr_MarqueeBox_New(0); - NW_THROW_OOM_ON_NULL (replacement, status); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(replacement, NW_CSS_Prop_display, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_nowrap; - status = NW_LMgr_Box_SetProperty(replacement, NW_CSS_Prop_whitespace, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - prop.type = NW_CSS_ValueType_Px; - prop.value.token = 0; - status = NW_LMgr_Box_SetProperty(replacement, NW_CSS_Prop_borderWidth, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - prop.type = NW_CSS_ValueType_Px; - prop.value.token = 0; - status = NW_LMgr_Box_SetProperty(replacement, NW_CSS_Prop_padding, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(containerBox), replacement); - if (status != KBrsrSuccess) - { - NW_Object_Delete(replacement); - } - else - { - containerBox = replacement; - } - } - /* Transfer the children of the old box to the new replacement box */ - NW_Object_Delete (NW_LMgr_ContainerBoxOf(containerBox)->children); - NW_LMgr_ContainerBoxOf(containerBox)->children = children; - childCount = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(containerBox)); - - /* update the parent pointer for all the children */ - for (index = 0; index < childCount; index++) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(containerBox), index); - if (child) - child->parent = NW_LMgr_ContainerBoxOf(containerBox); - } - - } - NW_CATCH (status) - { - *box = NULL; - if(containerBox) - { - NW_Object_Delete(containerBox); - } - if (replacement) - { - NW_Object_Delete (replacement); - } - } - NW_FINALLY - { - *box = containerBox; - return status; - } NW_END_TRY -} - -/* -------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_CSS_Processor_HandleListItemImage (NW_LMgr_Box_t** box) -{ - NW_ASSERT (box != NULL); - - NW_LMgr_ContainerBox_t* parentBox = (*box)->parent; - NW_LMgr_BidiFlowBox_t* flowBox = NULL; - - NW_TRY(status) - { - flowBox = NW_LMgr_BidiFlowBox_New(0); - NW_THROW_OOM_ON_NULL (flowBox, status); - - // Add Image or ImgContainer to the flowBox - this will take care of removing it - // from the parentbox - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(flowBox), *box); - _NW_THROW_ON_ERROR (status); - - NW_LMgr_BoxOf(flowBox)->propList = (*box)->propList; - (*box)->propList = NULL; - *box = NW_LMgr_BoxOf(flowBox); - status = NW_LMgr_ContainerBox_AddChild(parentBox, *box); - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) - { - if (flowBox) - { - NW_Object_Delete(flowBox); - *box = NULL; - } - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* -------------------------------------------------------------------------*/ -// Check display Val and replace box is necessary -TBrowserStatusCode -NW_CSS_Processor_HandleDisplayVal (NW_LMgr_Box_t** box, NW_LMgr_PropertyValue_t *displayVal) -{ - NW_ASSERT (box != NULL); - NW_ASSERT (displayVal != NULL); - - NW_TRY (status) - { - // If box is image box, check the display and see if we need to replace it - if( NW_Object_IsInstanceOf( *box, &NW_LMgr_ImgContainerBox_Class ) ) - { - if (displayVal->token == NW_CSS_PropValue_display_listItem) - { - status = NW_CSS_Processor_HandleListItemImage(box); - } - } - // If box is container box, check the display and see if we need to replace it - else if (NW_Object_IsClass(*box, &NW_LMgr_ContainerBox_Class)) - { - // if the display is block or list-item, or marquee, create a BidiFlowBox to replace the container box - if (displayVal->token != NW_CSS_PropValue_display_inline) - { - // we need to replace the container box - status = NW_CSS_Processor_ReplaceBox (box, displayVal); - } - } - // If box is bidiflow box, check the display and see if we need to replace it - else if (NW_Object_IsClass(*box, &NW_LMgr_BidiFlowBox_Class)) - { - // if the display inline, create a ContainerBox to replace the BiDiFlow box - if (displayVal->token == NW_CSS_PropValue_display_inline) - { - // we need to replace the container box - status = NW_CSS_Processor_ReplaceBox (box, displayVal); - } - else if (displayVal->token == NW_CSS_PropValue_display_marquee) - { - status = NW_CSS_Processor_ReplaceBox (box, displayVal); - } - } - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) - { - *box = NULL; - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - - -#ifdef _BROWSER_ENG_DEBUG -#pragma message ("Browser eng debug is defined") - -void NW_CSS_PropertyList_Dump (const NW_LMgr_SimplePropertyList_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - if (thisObj->map != NULL) - { - TBrowserStatusCode status; - NW_Ucs2 nullProp[] = {'N', 'o', '-', 'n', 'a', 'm', 'e', '\0'}; - - /* Iterate through the map to find all of the properties */ - TInt count = NW_LMgr_SimplePropertyList_Count(thisObj); - for (TInt i = 0; i < count; i++) - { - const TCSSPropertyTablePropEntry* propEntry; - NW_LMgr_PropertyName_t key; - NW_LMgr_PropertyList_Entry_t entry; - NW_Text_t* propval; - - status = NW_LMgr_SimplePropertyList_GetNameAt(thisObj, i, &key); - if (status != KBrsrSuccess) - { - NW_LOG1(NW_LOG_LEVEL3, "%s", "Error. Could not retrieve property list entry."); - continue; - } - - /* get the text property name */ - propEntry = TCSSPropertyTable::GetPropEntryByToken(key); - - status = NW_LMgr_PropertyList_Get (thisObj, key, &entry); - /* Only print property if status == success */ - if (status == KBrsrSuccess) - { - const NW_Ucs2* nameProp = nullProp; - if (propEntry) - { - nameProp = propEntry->strName; - } - - /* Display the appropriate representation of the property */ - switch (entry.type) - { - case NW_CSS_ValueType_Integer: - case NW_CSS_ValueType_Px: - case NW_CSS_ValueType_Token: - /* print the integer name and value */ - NW_LOG2(NW_LOG_LEVEL3, "%s:%d; ", - nameProp, - entry.value.integer); - break; - case NW_CSS_ValueType_Color: - /* print the color name and value in hex */ - NW_LOG2(NW_LOG_LEVEL3, "%s:#%06x; ", - nameProp, - entry.value.integer); - break; - case NW_CSS_ValueType_Number: - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_Ex: - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pt: - case NW_CSS_ValueType_Pc: - case NW_CSS_ValueType_Percentage: - /* print the floating point property name and value */ - NW_LOG2(NW_LOG_LEVEL3, "%s:%f; ", - nameProp, - entry.value.decimal); - break; - case NW_CSS_ValueType_Text: - propval = (NW_Text_t*)entry.value.object; - /* print the text property name and value */ - NW_LOG2(NW_LOG_LEVEL3, "%s:%s; ", - nameProp, - propval->storage); - break; - case NW_CSS_ValueType_Object: - case NW_CSS_ValueType_Image: - case NW_CSS_ValueType_Font: - default: - /* print the property name, but not its explicit value: just report "OBJECT" instead */ - NW_LOG1(NW_LOG_LEVEL3, "%s:<OBJECT>; ", - nameProp); - } - } - else - { - /* print the property name, reporting the error */ - NW_LOG1(NW_LOG_LEVEL3, "%s:<ERROR>; ", - (propEntry==NULL?nullProp:propEntry->strName)); - } - } - } -} - - -/* ------------------------------------------------------------------------- */ -void -NW_CSS_Processor_PrintProperties (NW_LMgr_Box_t *box) -{ - NW_Ucs2 typeBuf[128]; - - NW_ASSERT (box != NULL); - - NW_Str_StrcpyConst(typeBuf, (const char* const)NW_LMgr_Box_GetBoxType(box)); - NW_LOG2(NW_LOG_LEVEL3, "PROPERTIES FOR: %s [%X]", typeBuf, box); - - if (NW_Object_IsInstanceOf(box->propList, &NW_LMgr_SimplePropertyList_Class)) - { - NW_LMgr_SimplePropertyList_t* spropList; - - spropList = NW_LMgr_SimplePropertyListOf (box->propList); - - if (spropList != NULL) - { - NW_CSS_PropertyList_Dump(spropList); - } - } -} -#endif /* _BROWSER_ENG_DEBUG*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSPropVal.cpp --- a/webengine/wmlengine/src/css/src/CSSPropVal.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,401 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS property values -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "CSSPropVal.h" -#include "CSSImageList.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_rootbox.h" -#include "nw_css_tokentoint.h" -#include "nw_lmgr_propertylist.h" -#include "nwx_math.h" -#include <nwx_string.h> -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -/*struct TCSSPropValColorEntry -{ - const TText16 *strVal; - TUint32 color; -};*/ - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -TBool TCSSPropVal::GetRGBValL(TCSSParser* aParser, - TCSSReaderUnit* aPropertyVal, - TInt8 aType, - TUint8* aVal) -{ - if ((aType == NUMBER) || (aType == PERCENTAGE)) - { - TText16 *endPtr = NULL; - TInt32 number = 0; - - TText16* ucs2Str = aPropertyVal->GetUnicodeL(aParser->GetEncoding()); - number = NW_Str_Strtol (ucs2Str, &endPtr, 10 ); - NW_Mem_Free(ucs2Str); - - if (aType == NUMBER) - { - if (number > 255) - { - number = 255; - } - } - else //type == PERCENTAGE - { - if (number > 100) - { - number = 100; - } - number = (TInt32)(number*255/100); - } - *aVal = (TUint8)number; - return ETrue; - } - return EFalse; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSPropVal::SetRGBColorL(TCSSParser* aParser, - NW_LMgr_Property_t *aProp, - TCSSPropertyVal* aPropertyVal) -{ - TUint32 color = 0; - TUint8 val = 0; - - TCSSPropertyVal rVal; - TCSSPropertyVal gVal; - TCSSPropertyVal bVal; - - NW_ASSERT(aProp); - - TText8* savedPosition = aParser->GetPosition(); - - aParser->SetPosition(aPropertyVal->val.iStorage); - if (aParser->ParserRGB(&rVal, &gVal, &bVal) != KBrsrSuccess) - { - aParser->SetPosition(savedPosition); - return EFalse; - } - aParser->SetPosition(savedPosition); - - if (!GetRGBValL(aParser, &rVal.val, rVal.type, &val)) - { - return EFalse; - } - color = color | val; - if (!GetRGBValL(aParser, &gVal.val, gVal.type,&val)) - { - return EFalse; - } - color = (color << 8)| val; - if (!GetRGBValL(aParser, &bVal.val, bVal.type,&val)) - { - return EFalse; - } - color = (color << 8)| val; - aProp->value.integer = color; - aProp->type = NW_CSS_ValueType_Color; - - return ETrue; -} - -/* -------------------------------------------------------------------------*/ -TBool TCSSPropVal::SetHexColor(NW_LMgr_Property_t *aProp, const TText16* aStorage) -{ - TUint8 v = 0; - TUint32 color = 0; - TText16 ch = 0; - - TUint32 length = NW_Str_Strlen(aStorage); - if ((length != 3) && (length != 6)) - { - return EFalse; - } - for (TUint8 index = 0; index <length; index++) - { - ch = *(aStorage+index); - - if (NW_Str_Isdigit(ch)) - { - v = (TUint8)(ch - '0'); - } - else if ((ch >= 'A') && (ch <= 'F')) - { - v = (TUint8)(10 + (ch - 'A')); - }else if ((ch >= 'a') && (ch <= 'f')) - { - v = (TUint8)(10 + (ch - 'a')); - }else - { - return EFalse; - } - if (index == 0) - { - color = color | v; - } - else - { - color = (color << 4) | v; - } - if (length == 3) - { - color = (color << 4) | v; - } - } - aProp->value.integer = color; - aProp->type = NW_CSS_ValueType_Color; - return ETrue; -} - - -/* -------------------------------------------------------------------------*/ -TBool TCSSPropVal::SetColorL(TCSSParser* aParser, - NW_LMgr_Property_t *aBoxVal, - TCSSPropertyVal* aPropertyVal, - TText16* aValStorage) -{ - switch(aPropertyVal->type) - { - case HASH: - return TCSSPropVal::SetHexColor(aBoxVal, aValStorage); - case RGB: - return TCSSPropVal::SetRGBColorL(aParser, aBoxVal, aPropertyVal); - default: - return EFalse; - } -} - -/* ------------------------------------------------------------------------- */ -TBool -TCSSPropVal::SetNumberPropVal(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProp, - TUint8 aValueType, - NW_Float32 aValue) -{ - aProp->value.integer = 0; - switch(aValueType) - { - case NUMBER: - switch (aPropName) { - case NW_CSS_Prop_font: - case NW_CSS_Prop_fontWeight: - case NW_CSS_Prop_marqueeSpeed: - case NW_CSS_Prop_marqueeLoop: - aProp->value.integer = (TInt32)aValue; - aProp->type = NW_CSS_ValueType_Integer; - break; - - default: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Number; - break; - } - break; - - case PXS: - aProp->value.integer = (TInt32)aValue; - aProp->type = NW_CSS_ValueType_Px; - break; - - case EMS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Em; - break; - - case EXS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Ex; - break; - - case INS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_In; - break; - - case CMS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Cm; - break; - - case MMS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Mm; - break; - - case PCS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Pc; - break; - - case PTS: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Pt; - break; - - case PERCENTAGE: - aProp->value.decimal = aValue; - aProp->type = NW_CSS_ValueType_Percentage; - break; - - default: - return EFalse; - } - return ETrue; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSPropVal::SetImageValL(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aVal, - TText16* aValStorage, - NW_CSS_Processor_t* aProcessor, - NW_LMgr_Box_t *box, - TInt aBufferIndex) -{ - NW_Image_AbstractImage_t* image = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_REQUIRED_PARAM(aVal); - NW_REQUIRED_PARAM(aPropName); - - if (aValStorage == NULL) - { - return EFalse; - } - NW_Text_UCS2_t* textVal = - NW_Text_UCS2_New(aValStorage, NW_Str_Strlen(aValStorage), NW_Text_Flags_Copy ); - if (textVal == NULL) - { - User::Leave(KErrNoMemory); - } - - /* loads an image only in the case of list-style-image property, later - we might want to load background-image. Note that the url text gets - deleted inside the processor. */ - status = - NW_CSS_Processor_GetImage(aProcessor, NW_TextOf (textVal), box, aPropName, &image , aBufferIndex); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - /* Remove ownership of the entry. It has been handed off to the simple - property list which will handle deletion.*/ - if (image) - { - CCSSImageList* imageList = (CCSSImageList*)(aProcessor->imageList); - NW_DOM_ElementNode_t* imageNode = NULL; - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( image, &imageNode ); - if (imageEntry) - { - imageList->RemoveVirtualImageOwnership( *imageEntry, image ); - } - } - - - /* Note that val can be zero */ - aVal->value.object = (NW_Object_t*)image; - aVal->type = NW_CSS_ValueType_Image; - - return ETrue; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSPropVal::SetTokenVal(NW_LMgr_PropertyName_t aPropName, - NW_LMgr_Property_t *aProp, - TUint32 aToken, - NW_LMgr_Box_t* aBox) -{ - TInt32 color, fontWeight, borderWidth; - NW_Float32 fontSize; - NW_CSS_TokenToInt_t* tokenToInt = (NW_CSS_TokenToInt_t *)(&NW_CSS_TokenToInt); - - if (aPropName == NW_CSS_Prop_fontSize || aPropName == NW_CSS_Prop_font) - { - if (NW_CSS_TokenToInt_GetFontSize(tokenToInt, aToken, aBox, &fontSize)) - { - aProp->value.decimal = fontSize; - aProp->type = NW_CSS_ValueType_Pt; - return ETrue; - } - } - - if (aPropName == NW_CSS_Prop_fontWeight || aPropName == NW_CSS_Prop_font) - { - fontWeight = NW_CSS_TokenToInt_GetFontWeight(tokenToInt, aToken, aBox); - if (fontWeight != -1) - { - aProp->value.integer = fontWeight; - aProp->type = NW_CSS_ValueType_Integer; - return ETrue; - } - } - - if (aPropName == NW_CSS_Prop_border || aPropName == NW_CSS_Prop_borderColor || - aPropName == NW_CSS_Prop_borderTop || aPropName == NW_CSS_Prop_topBorderColor || - aPropName == NW_CSS_Prop_borderBottom || aPropName == NW_CSS_Prop_bottomBorderColor || - aPropName == NW_CSS_Prop_borderLeft || aPropName == NW_CSS_Prop_leftBorderColor || - aPropName == NW_CSS_Prop_borderRight || aPropName == NW_CSS_Prop_rightBorderColor) { - color = NW_CSS_TokenToInt_GetColorVal(tokenToInt, NW_TRUE, aToken); - } else { - color = NW_CSS_TokenToInt_GetColorVal(tokenToInt, NW_FALSE, aToken); - } - - if (color != -1) - { - aProp->value.integer = (TUint32)color; - aProp->type = NW_CSS_ValueType_Color; - return ETrue; - } - - borderWidth = NW_CSS_TokenToInt_GetBorderWidth(tokenToInt, aToken, aBox); - if (borderWidth != -1) - { - aProp->value.integer = borderWidth; - aProp->type = NW_CSS_ValueType_Px; - return ETrue; - } - /* Otherwise just leave the aToken as is */ - aProp->value.token = aToken; - aProp->type = NW_CSS_ValueType_Token; - - return ETrue; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSPropertyTable.cpp --- a/webengine/wmlengine/src/css/src/CSSPropertyTable.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,666 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Applies CSS property -* -*/ - - - -// INCLUDE FILES -#include "CSSPropertyTable.h" - -#include "nw_text_ascii.h" -#include "nw_image_virtualimage.h" -#include <nwx_string.h> - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -#define INTEGER_MASK ((TUint32)(1<<NW_CSS_ValueType_Integer)) -#define NUMBER_MASK ((TUint32)(1<<NW_CSS_ValueType_Number)) -#define PX_MASK ((TUint32)(1<<NW_CSS_ValueType_Px)) -#define EM_MASK ((TUint32)(1<<NW_CSS_ValueType_Em)) -#define EX_MASK ((TUint32)(1<<NW_CSS_ValueType_Ex)) -#define IN_MASK ((TUint32)(1<<NW_CSS_ValueType_In)) -#define CM_MASK ((TUint32)(1<<NW_CSS_ValueType_Cm)) -#define MM_MASK ((TUint32)(1<<NW_CSS_ValueType_Mm)) -#define PT_MASK ((TUint32)(1<<NW_CSS_ValueType_Pt)) -#define PC_MASK ((TUint32)(1<<NW_CSS_ValueType_Pc)) -#define LENGTH_MASK ((TUint32)(PX_MASK | EM_MASK | EX_MASK | IN_MASK | CM_MASK | MM_MASK | PT_MASK | PC_MASK)) -#define PERCENTAGE_MASK ((TUint32)(1<<NW_CSS_ValueType_Percentage)) -#define COLOR_MASK ((TUint32)(1<<NW_CSS_ValueType_Color)) -#define TOKEN_MASK ((TUint32)(1<<NW_CSS_ValueType_Token)) -#define TEXT_MASK ((TUint32)(1<<NW_CSS_ValueType_Text)) -#define IMAGE_MASK ((TUint32)(1<<NW_CSS_ValueType_Image)) -#define OBJECT_MASK ((TUint32)(1<<NW_CSS_ValueType_Object)) - - -static const TText16 PropName_background[] = {'b','a','c','k','g','r','o','u','n','d','\0'}; - -static const TText16 PropName_border[] = {'b','o','r','d','e','r','\0'}; - -static const TText16 PropName_border_top[] = {'b','o','r','d','e','r','-','t','o','p','\0'}; -static const TText16 PropName_border_right[] = {'b','o','r','d','e','r','-','r','i','g','h','t','\0'}; -static const TText16 PropName_border_bottom[] = {'b','o','r','d','e','r','-','b','o','t','t','o','m','\0'}; -static const TText16 PropName_border_left[] = {'b','o','r','d','e','r','-','l','e','f','t','\0'}; - -static const TText16 PropName_border_width[] = {'b','o','r','d','e','r','-','w','i','d','t','h','\0'}; -static const TText16 PropName_border_left_width[] = {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h','\0'}; -static const TText16 PropName_border_right_width[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h','\0'}; -static const TText16 PropName_border_top_width[] = {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h','\0'}; -static const TText16 PropName_border_bottom_width[] = {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h','\0'}; - -static const TText16 PropName_border_color[] = {'b','o','r','d','e','r','-','c','o','l','o','r','\0'}; -static const TText16 PropName_border_left_color[] = {'b','o','r','d','e','r','-','l','e','f','t','-','c','o','l','o','r','\0'}; -static const TText16 PropName_border_right_color[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r','\0'}; -static const TText16 PropName_border_top_color[] = {'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r','\0'}; -static const TText16 PropName_border_bottom_color[] = {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r','\0'}; - -static const TText16 PropName_border_style[] = {'b','o','r','d','e','r','-','s','t','y','l','e','\0'}; -static const TText16 PropName_border_left_style[] = {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e','\0'}; -static const TText16 PropName_border_right_style[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e','\0'}; -static const TText16 PropName_border_top_style[] = {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e','\0'}; -static const TText16 PropName_border_bottom_style[] = {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e','\0'}; - -static const TText16 PropName_color[] = {'c','o','l','o','r','\0'}; -static const TText16 PropName_display[] = {'d','i','s','p','l','a','y','\0'}; -static const TText16 PropName_float[] = {'f','l','o','a','t','\0'}; -static const TText16 PropName_font[] = {'f','o','n','t','\0'}; -static const TText16 PropName_font_family[] = {'f','o','n','t','-','f','a','m','i','l','y','\0'}; -static const TText16 PropName_font_size[] = {'f','o','n','t','-','s','i','z','e','\0'}; -static const TText16 PropName_font_style[] = {'f','o','n','t','-','s','t','y','l','e','\0'}; -static const TText16 PropName_font_weight[] = {'f','o','n','t','-','w','e','i','g','h','t','\0'}; -static const TText16 PropName_font_variant[] = {'f','o','n','t','-','v','a','r','i','a','n','t','\0'}; - -static const TText16 PropName_list_style[] = {'l','i','s','t','-','s','t','y','l','e','\0'}; -static const TText16 PropName_list_style_image[] = {'l','i','s','t','-','s','t','y','l','e','-','i','m','a','g','e','\0'}; -static const TText16 PropName_list_style_type[] = {'l','i','s','t','-','s','t','y','l','e','-','t','y','p','e','\0'}; -static const TText16 PropName_list_style_position[] = {'l','i','s','t','-','s','t','y','l','e','-','p','o','s','i','t','i','o','n','\0'}; -static const TText16 PropName_list_margin[] = {'l','i','s','t','-','m','a','r','g','i','n','\0'}; - -static const TText16 PropName_padding[] = {'p','a','d','d','i','n','g','\0'}; -static const TText16 PropName_page_break_after[] = {'p','a','g','e','-','b','r','e','a','k','-','a','f','t','e','r','\0'}; -static const TText16 PropName_text_align[] = {'t','e','x','t','-','a','l','i','g','n','\0'}; -static const TText16 PropName_text_decoration[] = {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n','\0'}; -static const TText16 PropName_text_indent[] = {'t','e','x','t','-','i','n','d','e','n','t','\0'}; -static const TText16 PropName_margin[] = {'m','a','r','g','i','n','\0'}; -static const TText16 PropName_padding_left[] = {'p','a','d','d','i','n','g','-','l','e','f','t','\0'}; -static const TText16 PropName_padding_right[] = {'p','a','d','d','i','n','g','-','r','i','g','h','t','\0'}; -static const TText16 PropName_padding_top[] = {'p','a','d','d','i','n','g','-','t','o','p','\0'}; -static const TText16 PropName_padding_bottom[] = {'p','a','d','d','i','n','g','-','b','o','t','t','o','m','\0'}; -static const TText16 PropName_margin_left[] = {'m','a','r','g','i','n','-','l','e','f','t','\0'}; -static const TText16 PropName_margin_right[] = {'m','a','r','g','i','n','-','r','i','g','h','t','\0'}; -static const TText16 PropName_margin_top[] = {'m','a','r','g','i','n','-','t','o','p','\0'}; -static const TText16 PropName_margin_bottom[] = {'m','a','r','g','i','n','-','b','o','t','t','o','m','\0'}; -static const TText16 PropName_vertical_align[] = {'v','e','r','t','i','c','a','l','-','a','l','i','g','n','\0'}; -static const TText16 PropName_height[] = {'h','e','i','g','h','t','\0'}; -static const TText16 PropName_width[] = {'w','i','d','t','h','\0'}; -static const TText16 PropName_text_transform[] = {'t','e','x','t','-','t','r','a','n','s','f','o','r','m','\0'}; -static const TText16 PropName_white_space[] = {'w','h','i','t','e','-','s','p','a','c','e','\0'}; -static const TText16 PropName_background_color[] = {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r','\0'}; -static const TText16 PropName_background_image[] = {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e','\0'}; -static const TText16 PropName_background_repeat[] = {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t','\0'}; -static const TText16 PropName_background_position[] = {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','\0'}; -static const TText16 PropName_background_attachment[] = {'b','a','c','k','g','r','o','u','n','d','-','a','t','t','a','c','h','m','e','n','t','\0'}; -static const TText16 PropName_background_position_x[] = {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x','\0'}; -static const TText16 PropName_background_position_y[] = {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y','\0'}; -static const TText16 PropName_clear[] = {'c','l','e','a','r','\0'}; -static const TText16 PropName_visibility[] = {'v','i','s','i','b','i','l','i','t','y','\0'}; -static const TText16 PropName_caption_side[] = {'c','a','p','t','i','o','n','-','s','i','d','e','\0'}; -static const TText16 PropName_line_height[] = {'l','i','n','e','-','h','e','i','g','h','t','\0'}; -static const TText16 PropName_overflow[] = {'o','v','e','r','f','l','o','w','\0'}; -static const TText16 PropName_accesskey[] = {'-','w','a','p','-','a','c','c','e','s','s','k','e','y','\0'}; -static const TText16 PropName_marquee_style[] = {'-','w','a','p','-','m','a','r','q','u','e','e','-','s','t','y','l','e','\0'}; -static const TText16 PropName_marquee_loop[] = {'-','w','a','p','-','m','a','r','q','u','e','e','-','l','o','o','p','\0'}; -static const TText16 PropName_marquee_dir[] = {'-','w','a','p','-','m','a','r','q','u','e','e','-','d','i','r','\0'}; -static const TText16 PropName_marquee_speed[] = {'-','w','a','p','-','m','a','r','q','u','e','e','-','s','p','e','e','d','\0'}; -static const TText16 PropName_marquee_amount[] = {'-','x','y','z','-','m','a','r','q','u','e','e','-','a','m','o','u','n','t','\0'}; -static const TText16 PropName_focus_behavior[] = {'-','x','y','z','-','f','o','c','u','s','-','b','e','h','a','v','i','o','r','\0'}; -static const TText16 PropName_input_format[] = {'-','w','a','p','-','i','n','p','u','t','-','f','o','r','m','a','t','\0'}; -static const TText16 PropName_input_required[] = {'-','w','a','p','-','i','n','p','u','t','-','r','e','q','u','i','r','e','d','\0'}; -static const TText16 PropName_imode_quotes[] = {'-','x','y','z','-','i','m','o','d','e','-','q','u','o','t','e','s','\0'}; -static const TText16 PropName_table_align[] = {'-','x','y','z','-','t','a','b','l','e','-','a','l','i','g','n','\0'}; -static const TText16 PropName_noshade[] = {'-','x','y','z','-','n','o','s','h','a','d','e','\0'}; -static const TText16 PropName_text_dir[] = {'d','i','r','e','c','t','i','o','n','\0'}; - -/* ------------------------------------------------------------------------- */ -static const -TCSSPropertyTablePropEntry TCSSPropertyTablePropEntries[] = -{ - {PropName_display, NW_CSS_Prop_display, TOKEN_MASK}, - {PropName_border, NW_CSS_Prop_border, LENGTH_MASK | PERCENTAGE_MASK | COLOR_MASK | TOKEN_MASK }, - {PropName_border_top, NW_CSS_Prop_borderTop, LENGTH_MASK | PERCENTAGE_MASK | COLOR_MASK | TOKEN_MASK }, - {PropName_border_right, NW_CSS_Prop_borderRight, LENGTH_MASK | PERCENTAGE_MASK | COLOR_MASK | TOKEN_MASK }, - {PropName_border_bottom, NW_CSS_Prop_borderBottom, LENGTH_MASK | PERCENTAGE_MASK | COLOR_MASK | TOKEN_MASK }, - {PropName_border_left, NW_CSS_Prop_borderLeft, LENGTH_MASK | PERCENTAGE_MASK | COLOR_MASK | TOKEN_MASK }, - {PropName_border_width, NW_CSS_Prop_borderWidth, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_border_left_width, NW_CSS_Prop_leftBorderWidth, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_border_right_width, NW_CSS_Prop_rightBorderWidth, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_border_top_width, NW_CSS_Prop_topBorderWidth, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_border_bottom_width, NW_CSS_Prop_bottomBorderWidth, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_border_style, NW_CSS_Prop_borderStyle, TOKEN_MASK }, - {PropName_border_left_style, NW_CSS_Prop_leftBorderStyle, TOKEN_MASK }, - {PropName_border_right_style, NW_CSS_Prop_rightBorderStyle, TOKEN_MASK }, - {PropName_border_top_style, NW_CSS_Prop_topBorderStyle, TOKEN_MASK }, - {PropName_border_bottom_style, NW_CSS_Prop_bottomBorderStyle, TOKEN_MASK }, - {PropName_border_color, NW_CSS_Prop_borderColor, COLOR_MASK | TOKEN_MASK }, - {PropName_border_left_color, NW_CSS_Prop_leftBorderColor, COLOR_MASK | TOKEN_MASK }, - {PropName_border_right_color, NW_CSS_Prop_rightBorderColor, COLOR_MASK | TOKEN_MASK }, - {PropName_border_top_color, NW_CSS_Prop_topBorderColor, COLOR_MASK | TOKEN_MASK }, - {PropName_border_bottom_color, NW_CSS_Prop_bottomBorderColor, COLOR_MASK | TOKEN_MASK }, - {PropName_float, NW_CSS_Prop_float, TOKEN_MASK}, - {PropName_font, NW_CSS_Prop_font, TOKEN_MASK | LENGTH_MASK | TEXT_MASK | PERCENTAGE_MASK}, - {PropName_font_family, NW_CSS_Prop_fontFamily, TEXT_MASK}, - {PropName_font_style, NW_CSS_Prop_fontStyle, TOKEN_MASK}, - {PropName_font_variant, NW_CSS_Prop_fontVariant, TOKEN_MASK}, - {PropName_font_size, NW_CSS_Prop_fontSize, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_font_weight, NW_CSS_Prop_fontWeight, INTEGER_MASK }, - {PropName_list_style, NW_CSS_Prop_listStyle, TOKEN_MASK | IMAGE_MASK }, - {PropName_list_style_type, NW_CSS_Prop_listStyleType, TOKEN_MASK }, - {PropName_list_style_image, NW_CSS_Prop_listStyleImage, TOKEN_MASK | IMAGE_MASK }, - {PropName_list_margin, NW_CSS_Prop_listMargin, LENGTH_MASK | PERCENTAGE_MASK | TOKEN_MASK }, - {PropName_noshade, NW_CSS_Prop_noshade, TOKEN_MASK }, - {PropName_padding, NW_CSS_Prop_padding, LENGTH_MASK | PERCENTAGE_MASK }, - {PropName_padding_left, NW_CSS_Prop_leftPadding, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_padding_right, NW_CSS_Prop_rightPadding, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_padding_top, NW_CSS_Prop_topPadding, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_padding_bottom, NW_CSS_Prop_bottomPadding, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_margin, NW_CSS_Prop_margin, LENGTH_MASK | PERCENTAGE_MASK | TOKEN_MASK }, - {PropName_margin_left, NW_CSS_Prop_leftMargin, LENGTH_MASK | PERCENTAGE_MASK | TOKEN_MASK }, - {PropName_margin_right, NW_CSS_Prop_rightMargin, LENGTH_MASK | PERCENTAGE_MASK | TOKEN_MASK }, - {PropName_margin_top, NW_CSS_Prop_topMargin, LENGTH_MASK | PERCENTAGE_MASK | TOKEN_MASK }, - {PropName_margin_bottom, NW_CSS_Prop_bottomMargin, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_page_break_after, NW_CSS_Prop_pageBreakAfter, TOKEN_MASK}, - {PropName_text_align, NW_CSS_Prop_textAlign, TOKEN_MASK}, - {PropName_text_decoration, NW_CSS_Prop_textDecoration, TOKEN_MASK}, - {PropName_text_indent, NW_CSS_Prop_textIndent, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_text_transform, NW_CSS_Prop_textTransform, TOKEN_MASK}, - {PropName_white_space, NW_CSS_Prop_whitespace, TOKEN_MASK}, - {PropName_vertical_align, NW_CSS_Prop_verticalAlign, TOKEN_MASK | LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_height, NW_CSS_Prop_height, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_width, NW_CSS_Prop_width, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_color, NW_CSS_Prop_color, COLOR_MASK}, - {PropName_background, NW_CSS_Prop_background, COLOR_MASK | IMAGE_MASK}, - {PropName_background_color, NW_CSS_Prop_backgroundColor, TOKEN_MASK | COLOR_MASK}, - {PropName_background_image, NW_CSS_Prop_backgroundImage, TOKEN_MASK | IMAGE_MASK }, - {PropName_background_repeat, NW_CSS_Prop_backgroundRepeat, TOKEN_MASK }, - {PropName_background_attachment, NW_CSS_Prop_backgroundAttachment, TOKEN_MASK }, - {PropName_background_position, NW_CSS_Prop_backgroundPosition, TOKEN_MASK | NUMBER_MASK | LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_background_position_x, NW_CSS_Prop_backgroundPosition_x, TOKEN_MASK | NUMBER_MASK | LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_background_position_y, NW_CSS_Prop_backgroundPosition_y, TOKEN_MASK | NUMBER_MASK | LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_clear, NW_CSS_Prop_clear, TOKEN_MASK}, - {PropName_visibility, NW_CSS_Prop_visibility, TOKEN_MASK}, - {PropName_list_style_position, NW_CSS_Prop_listStylePosition, TOKEN_MASK}, - {PropName_caption_side, NW_CSS_Prop_captionSide, TOKEN_MASK}, - {PropName_line_height, NW_CSS_Prop_lineHeight, TOKEN_MASK | NUMBER_MASK | LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_overflow, NW_CSS_Prop_overflow, TOKEN_MASK}, - {PropName_accesskey, NW_CSS_Prop_accesskey, OBJECT_MASK}, - {PropName_marquee_style, NW_CSS_Prop_marqueeStyle, TOKEN_MASK}, - {PropName_marquee_loop, NW_CSS_Prop_marqueeLoop, INTEGER_MASK | TOKEN_MASK}, - {PropName_marquee_dir, NW_CSS_Prop_marqueeDir, TOKEN_MASK}, - {PropName_marquee_speed, NW_CSS_Prop_marqueeSpeed, TOKEN_MASK | INTEGER_MASK}, - {PropName_marquee_amount, NW_CSS_Prop_marqueeAmount, LENGTH_MASK | PERCENTAGE_MASK}, - {PropName_focus_behavior, NW_CSS_Prop_focusBehavior, TOKEN_MASK}, - {PropName_input_format, NW_CSS_Prop_inputFormat, TEXT_MASK}, - {PropName_input_required, NW_CSS_Prop_inputRequired, TOKEN_MASK}, - {PropName_imode_quotes, NW_CSS_Prop_imodeQuotes, TEXT_MASK}, - {PropName_table_align, NW_CSS_Prop_tableAlign, TOKEN_MASK}, - {PropName_text_dir, NW_CSS_Prop_textDirection, TOKEN_MASK} -}; - -/* ------------------------------------------------------------------------- */ -static const TText16 PropVal_none[] = {'n','o','n','e','\0'}; -static const TText16 PropVal_left[] = {'l','e','f','t','\0'}; -static const TText16 PropVal_right[] = {'r','i','g','h','t','\0'}; -static const TText16 PropVal_normal[] = {'n','o','r','m','a','l','\0'}; - -static const TText16 PropVal_always[] = {'a','l','w','a','y','s','\0'}; -static const TText16 PropVal_avoid[] = {'a','v','o','i','d','\0'}; -static const TText16 PropVal_center[] = {'c','e','n','t','e','r','\0'}; -static const TText16 PropVal_justify[] = {'j','u','s','t','i','f','y','\0'}; -static const TText16 PropVal_underline[] = {'u','n','d','e','r','l','i','n','e','\0'}; -static const TText16 PropVal_blink[] = {'b','l','i','n','k','\0'}; - -static const TText16 PropVal_top[] = {'t','o','p','\0'}; -static const TText16 PropVal_bottom[] = {'b','o','t','t','o','m','\0'}; -static const TText16 PropVal_baseline[] = {'b','a','s','e','l','i','n','e','\0'}; -static const TText16 PropVal_sub[] = {'s','u','b','\0'}; -static const TText16 PropVal_super[] = {'s','u','p','e','r','\0'}; -static const TText16 PropVal_middle[] = {'m','i','d','d','l','e','\0'}; - -/* list-style-type properties */ -static const TText16 PropVal_disc[] = {'d','i','s','c','\0'}; -static const TText16 PropVal_circle[] = {'c','i','r','c','l','e','\0'}; -static const TText16 PropVal_square[] = {'s','q','u','a','r','e','\0'}; -static const TText16 PropVal_decimal[] = {'d','e','c','i','m','a','l','\0'}; -static const TText16 PropVal_lowerRoman[] = {'l','o','w','e','r','-','r','o','m','a','n','\0'}; -static const TText16 PropVal_upperRoman[] = {'u','p','p','e','r','-','r','o','m','a','n','\0'}; -static const TText16 PropVal_lowerAlpha[] = {'l','o','w','e','r','-','a','l','p','h','a','\0'}; -static const TText16 PropVal_upperAlpha[] = {'u','p','p','e','r','-','a','l','p','h','a','\0'}; - -/* additional prop vals */ -static const TText16 PropVal_inherit[] = {'i','n','h','e','r','i','t','\0'}; -static const TText16 PropVal_auto[] = {'a','u','t','o','\0'}; -static const TText16 PropVal_both[] = {'b','o','t','h','\0'}; - -/* visibility prop vals */ -static const TText16 PropVal_visible[] = {'v','i','s','i','b','l','e','\0'}; -static const TText16 PropVal_hidden[] = {'h','i','d','d','e','n','\0'}; -static const TText16 PropVal_collapse[] = {'c','o','l','l','a','p','s','e','\0'}; - -/* white-space prop vals */ -static const TText16 PropVal_pre[] = {'p','r','e','\0'}; -static const TText16 PropVal_nowrap[] = {'n','o','w','r','a','p','\0'}; - -/* text-transform prop vals */ -static const TText16 PropVal_capitalize[] = {'c','a','p','i','t','a','l','i','z','e','\0'}; -static const TText16 PropVal_uppercase[] = {'u','p','p','e','r','c','a','s','e','\0'}; -static const TText16 PropVal_lowercase[] = {'l','o','w','e','r','c','a','s','e','\0'}; - -/* border-style vals */ -static const TText16 PropVal_double[] = {'d','o','u','b','l','e','\0'}; -static const TText16 PropVal_solid[] = {'s','o','l','i','d','\0'}; -static const TText16 PropVal_dashed[] = {'d','a','s','h','e','d','\0'}; -static const TText16 PropVal_dotted[] = {'d','o','t','t','e','d','\0'}; -static const TText16 PropVal_ridge[] = {'r','i','d','g','e','\0'}; -static const TText16 PropVal_groove[] = {'g','r','o','o','v','e','\0'}; -static const TText16 PropVal_inset[] = {'i','n','s','e','t','\0'}; -static const TText16 PropVal_outset[] = {'o','u','t','s','e','t','\0'}; - -/* border-width vals */ -static const TText16 PropVal_thin[] = {'t','h','i','n','\0'}; -static const TText16 PropVal_thick[] = {'t','h','i','c','k','\0'}; - -/* list position values */ -static const TText16 PropVal_inside[] = {'i','n','s','i','d','e','\0'}; -static const TText16 PropVal_outside[] = {'o','u','t','s','i','d','e','\0'}; - -/* background-color vals */ -static const TText16 PropVal_transparent[] = {'t','r','a','n','s','p','a','r','e','n','t','\0'}; - -/* font-size prop vals */ -const TText16 PropVal_xxSmall[] = {'x','x','-','s','m','a','l','l','\0'}; -const TText16 PropVal_xSmall[] = {'x','-','s','m','a','l','l','\0'}; -const TText16 PropVal_small[] = {'s','m','a','l','l','\0'}; -const TText16 PropVal_xxLarge[] = {'x','x','-','l','a','r','g','e','\0'}; -const TText16 PropVal_xLarge[] = {'x','-','l','a','r','g','e','\0'}; -const TText16 PropVal_large[] = {'l','a','r','g','e','\0'}; -const TText16 PropVal_smaller[] = {'s','m','a','l','l','e','r','\0'}; -const TText16 PropVal_larger[] = {'l','a','r','g','e','r','\0'}; -const TText16 PropVal_medium[] = {'m','e','d','i','u','m','\0'}; - -/* font-style prop vals */ -static const TText16 PropVal_italic[] = {'i','t','a','l','i','c','\0'}; -static const TText16 PropVal_oblique[] = {'o','b','l','i','q','u','e','\0'}; - -/* font-weight prop vals */ -static const TText16 PropVal_bold[] = {'b','o','l','d','\0'}; -static const TText16 PropVal_bolder[] = {'b','o','l','d','e','r','\0'}; -static const TText16 PropVal_lighter[] = {'l','i','g','h','t','e','r','\0'}; - -/* font-variant prop vals */ -static const TText16 PropVal_smallcaps[] = {'s','m','a','l','l','-','c','a','p','s','\0'}; - -/* color vals */ -static const TText16 PropVal_aqua[] = {'a','q','u','a','\0'}; -static const TText16 PropVal_black[] = {'b','l','a','c','k','\0'}; -static const TText16 PropVal_blue[] = {'b','l','u','e','\0'}; -static const TText16 PropVal_cyan[] = {'c','y','a','n','\0'}; -static const TText16 PropVal_fuchsia[] = {'f','u','c','h','s','i','a','\0'}; -static const TText16 PropVal_gray[] = {'g','r','a','y','\0'}; -static const TText16 PropVal_green[] = {'g','r','e','e','n','\0'}; -static const TText16 PropVal_lime[] = {'l','i','m','e','\0'}; -static const TText16 PropVal_maroon[] = {'m','a','r','o','o','n','\0'}; -static const TText16 PropVal_navy[] = {'n','a','v','y','\0'}; -static const TText16 PropVal_olive[] = {'o','l','i','v','e','\0'}; -static const TText16 PropVal_pink[] = {'p','i','n','k','\0'}; -static const TText16 PropVal_purple[] = {'p','u','r','p','l','e','\0'}; -static const TText16 PropVal_red[] = {'r','e','d','\0'}; -static const TText16 PropVal_silver[] = {'s','i','l','v','e','r','\0'}; -static const TText16 PropVal_teal[] = {'t','e','a','l','\0'}; -static const TText16 PropVal_white[] = {'w','h','i','t','e','\0'}; -static const TText16 PropVal_yellow[] = {'y','e','l','l','o','w','\0'}; - -/* marquee vals */ -static const TText16 PropVal_scroll[] = {'s','c','r','o','l','l','\0'}; -static const TText16 PropVal_slide[] = {'s','l','i','d','e','\0'}; -static const TText16 PropVal_alternate[] = {'a','l','t','e','r','n','a','t','e','\0'}; -static const TText16 PropVal_infinite[] = {'i','n','f','i','n','i','t','e','\0'}; -static const TText16 PropVal_ltr[] = {'l','t','r','\0'}; -static const TText16 PropVal_rtl[] = {'r','t','l','\0'}; -static const TText16 PropVal_slow[] = {'s','l','o','w','\0'}; -static const TText16 PropVal_fast[] = {'f','a','s','t','\0'}; - -/* display vals */ -static const TText16 PropVal_inline[] = {'i','n','l','i','n','e','\0'}; -static const TText16 PropVal_block[] = {'b','l','o','c','k','\0'}; -static const TText16 PropVal_listItem[] = {'l','i','s','t','-','i','t','e','m','\0'}; -static const TText16 PropVal_marquee[] = {'-','w','a','p','-','m','a','r','q','u','e','e','\0'}; - -/* Boolean values */ -static const TText16 PropVal_true[] = {'t','r','u','e','\0'}; -static const TText16 PropVal_false[] = {'f','a','l','s','e','\0'}; - -/* background-repeat values */ -static const TText16 PropVal_background_repeat[] = {'r','e','p','e','a','t','\0'}; -static const TText16 PropVal_background_repeat_x[] = {'r','e','p','e','a','t','-','x','\0'}; -static const TText16 PropVal_background_repeat_y[] = {'r','e','p','e','a','t','-','y','\0'}; -static const TText16 PropVal_background_norepeat[] = {'n','o','-','r','e','p','e','a','t','\0'}; - -/* background-attachment values */ -static const TText16 PropVal_background_fixed[] = {'f','i','x','e','d','\0'}; - -/* ------------------------------------------------------------------------- */ -static const -TCSSPropertyTablePropValEntry TCSSPropertyTablePropValEntries[] = -{ - {PropVal_none, NW_CSS_PropValue_none}, - {PropVal_left, NW_CSS_PropValue_left}, - {PropVal_right, NW_CSS_PropValue_right}, - {PropVal_normal, NW_CSS_PropValue_normal}, - {PropVal_disc, NW_CSS_PropValue_disc}, - {PropVal_circle, NW_CSS_PropValue_circle}, - {PropVal_square, NW_CSS_PropValue_square}, - {PropVal_decimal, NW_CSS_PropValue_decimal}, - {PropVal_lowerRoman, NW_CSS_PropValue_lowerRoman}, - {PropVal_upperRoman, NW_CSS_PropValue_upperRoman}, - {PropVal_lowerAlpha, NW_CSS_PropValue_lowerAlpha}, - {PropVal_upperAlpha, NW_CSS_PropValue_upperAlpha}, - {PropVal_always, NW_CSS_PropValue_always}, - {PropVal_avoid, NW_CSS_PropValue_avoid}, - {PropVal_center, NW_CSS_PropValue_center}, - {PropVal_justify, NW_CSS_PropValue_justify}, - {PropVal_underline, NW_CSS_PropValue_underline}, - {PropVal_blink, NW_CSS_PropValue_blink}, - {PropVal_top, NW_CSS_PropValue_top}, - {PropVal_bottom, NW_CSS_PropValue_bottom}, - {PropVal_sub, NW_CSS_PropValue_sub}, - {PropVal_super, NW_CSS_PropValue_super}, - {PropVal_baseline, NW_CSS_PropValue_baseline}, - {PropVal_middle, NW_CSS_PropValue_middle}, - {PropVal_inherit, NW_CSS_PropValue_inherit}, - {PropVal_auto, NW_CSS_PropValue_auto}, - {PropVal_both, NW_CSS_PropValue_both}, - {PropVal_visible, NW_CSS_PropValue_visible}, - {PropVal_hidden, NW_CSS_PropValue_hidden}, - {PropVal_collapse, NW_CSS_PropValue_collapse}, - {PropVal_pre, NW_CSS_PropValue_pre}, - {PropVal_nowrap, NW_CSS_PropValue_nowrap}, - {PropVal_capitalize, NW_CSS_PropValue_capitalize}, - {PropVal_uppercase, NW_CSS_PropValue_uppercase}, - {PropVal_lowercase, NW_CSS_PropValue_lowercase}, - {PropVal_solid, NW_CSS_PropValue_solid}, - {PropVal_double, NW_CSS_PropValue_solid}, /* Not supported */ - {PropVal_dashed, NW_CSS_PropValue_dashed}, - {PropVal_dotted, NW_CSS_PropValue_dotted}, - {PropVal_ridge, NW_CSS_PropValue_solid}, /* Not supported */ - {PropVal_groove, NW_CSS_PropValue_solid}, /* Not supported */ - {PropVal_inset, NW_CSS_PropValue_solid}, /* Not supported */ - {PropVal_outset, NW_CSS_PropValue_solid}, /* Not supported */ - {PropVal_xxSmall, NW_CSS_PropValue_xxSmall}, - {PropVal_xSmall, NW_CSS_PropValue_xSmall}, - {PropVal_small, NW_CSS_PropValue_small}, - {PropVal_xxLarge, NW_CSS_PropValue_xxLarge}, - {PropVal_xLarge, NW_CSS_PropValue_xLarge}, - {PropVal_large, NW_CSS_PropValue_large}, - {PropVal_smaller, NW_CSS_PropValue_smaller}, - {PropVal_larger, NW_CSS_PropValue_larger}, - {PropVal_medium, NW_CSS_PropValue_medium}, - {PropVal_thin, NW_CSS_PropValue_thin}, - {PropVal_thick, NW_CSS_PropValue_thick}, - {PropVal_bold, NW_CSS_PropValue_bold}, - {PropVal_bolder, NW_CSS_PropValue_bolder}, - {PropVal_lighter, NW_CSS_PropValue_lighter}, - {PropVal_italic, NW_CSS_PropValue_italic}, - {PropVal_oblique, NW_CSS_PropValue_oblique}, - {PropVal_smallcaps, NW_CSS_PropValue_smallcaps}, - {PropVal_inside, NW_CSS_PropValue_inside}, - {PropVal_outside, NW_CSS_PropValue_outside}, - {PropVal_transparent, NW_CSS_PropValue_transparent}, - {PropVal_aqua, NW_CSS_PropValue_aqua}, - {PropVal_black, NW_CSS_PropValue_black}, - {PropVal_blue, NW_CSS_PropValue_blue}, - {PropVal_cyan, NW_CSS_PropValue_cyan}, - {PropVal_fuchsia, NW_CSS_PropValue_fuchsia}, - {PropVal_gray, NW_CSS_PropValue_gray}, - {PropVal_green, NW_CSS_PropValue_green}, - {PropVal_lime, NW_CSS_PropValue_lime}, - {PropVal_maroon, NW_CSS_PropValue_maroon}, - {PropVal_navy, NW_CSS_PropValue_navy}, - {PropVal_olive, NW_CSS_PropValue_olive}, - {PropVal_pink, NW_CSS_PropValue_pink}, - {PropVal_purple, NW_CSS_PropValue_purple}, - {PropVal_red, NW_CSS_PropValue_red}, - {PropVal_silver, NW_CSS_PropValue_silver}, - {PropVal_teal, NW_CSS_PropValue_teal}, - {PropVal_white, NW_CSS_PropValue_white}, - {PropVal_yellow, NW_CSS_PropValue_yellow}, - {PropVal_scroll, NW_CSS_PropValue_scroll}, - {PropVal_slide, NW_CSS_PropValue_slide}, - {PropVal_alternate, NW_CSS_PropValue_alternate}, - {PropVal_infinite, NW_CSS_PropValue_infinite}, - {PropVal_ltr, NW_CSS_PropValue_ltr}, - {PropVal_rtl, NW_CSS_PropValue_rtl}, - {PropVal_slow, NW_CSS_PropValue_slow}, - {PropVal_fast, NW_CSS_PropValue_fast}, - {PropVal_inline, NW_CSS_PropValue_display_inline}, - {PropVal_block, NW_CSS_PropValue_display_block}, - {PropVal_listItem, NW_CSS_PropValue_display_listItem}, - {PropVal_marquee, NW_CSS_PropValue_display_marquee}, - {PropVal_background_repeat, NW_CSS_PropValue_background_repeat}, - {PropVal_background_repeat_x, NW_CSS_PropValue_background_repeat_x}, - {PropVal_background_repeat_y, NW_CSS_PropValue_background_repeat_y}, - {PropVal_background_norepeat, NW_CSS_PropValue_background_norepeat}, - {PropVal_background_fixed, NW_CSS_PropValue_background_fixed }, - {PropVal_true, NW_CSS_PropValue_true}, - {PropVal_false, NW_CSS_PropValue_false} -}; - -/* ------------------------------------------------------------------------- */ -/* -These values are used to create value type strings for debug purposes. If it is -obvious from the context( e.g. color) a null string will b used -*/ -static const TText16 ValueType_Integer[] = {'\0'}; -static const TText16 ValueType_Number[] = {'(','n','u','m','b','e','r',')','\0'}; -static const TText16 ValueType_Px[] = {'p','x','\0'}; -static const TText16 ValueType_Em[] = {'e','m','\0'}; -static const TText16 ValueType_Ex[] = {'e','x','\0'}; -static const TText16 ValueType_In[] = {'i','n','\0'}; -static const TText16 ValueType_Cm[] = {'c','m','\0'}; -static const TText16 ValueType_Mm[] = {'m','m','\0'}; -static const TText16 ValueType_Pt[] = {'p','t','\0'}; -static const TText16 ValueType_Pc[] = {'p','c','\0'}; -static const TText16 ValueType_Percentage[] = {'%','\0'}; -static const TText16 ValueType_Token[] = {'\0'}; -static const TText16 ValueType_Color[] = {'\0'}; -static const TText16 ValueType_Object[] = {'(','o','b','j','e','c','t',')','\0'}; -static const TText16 ValueType_Text[] = {'\0'}; -static const TText16 ValueType_Image[] = {'(','i','m','a','g','e',')','\0'}; -static const TText16 ValueType_Font[] = {'(','f','o','n','t',')','\0'}; -static const TText16 ValueType_Copy[] = {'(','c','o','p','y',')','\0'}; -static const TText16 ValueType_DefaultStyle[] = {'(','d','e','f','a','u','l','t','S','t','y','l','e',')','\0'}; -static const TText16 ValueType_Mask[] = {'(','m','a','s','k',')','\0'}; - -// MODULE DATA STRUCTURES - -// FORWARD DECLARATIONS - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -const TCSSPropertyTablePropEntry* -TCSSPropertyTable::GetPropertyEntry(const TText16* aStrName) -{ - TUint32 numPropertyNames = sizeof(TCSSPropertyTablePropEntries)/sizeof(TCSSPropertyTablePropEntry); - const TCSSPropertyTablePropEntry* propertyNames = TCSSPropertyTablePropEntries; - - TUint32 length = (NW_Str_Strlen(aStrName)+1)*2; - - /* traverse our list of token entries looking for a match for our token */ - for (TUint32 index = 0; index < numPropertyNames; index++) - { - if(!NW_Str_Strnicmp(aStrName, propertyNames[index].strName, length)) - { - return &(propertyNames[index]); - } - } - /* if no token entry is found we must return 0 */ - return NULL; -} - -/* ------------------------------------------------------------------------- */ -TBool -TCSSPropertyTable::GetPropertyValToken(const TText16* aVal, - NW_LMgr_PropertyValueToken_t *aToken) -{ - TUint32 numPropertyVals = sizeof(TCSSPropertyTablePropValEntries)/sizeof(TCSSPropertyTablePropValEntry); - const TCSSPropertyTablePropValEntry* propertyVals = TCSSPropertyTablePropValEntries; - - TUint32 length = (NW_Str_Strlen(aVal)+1)*2; - - /* traverse our list of token entries looking for a match for our token */ - for (TUint32 index = 0; index < numPropertyVals; index++) - { - if(!NW_Str_Strnicmp(aVal, propertyVals[index].strVal, length)) - { - *aToken = propertyVals[index].tokenVal; - return ETrue; - } - } - /* if no token entry is found we must return NOT_FOUND */ - return EFalse; -} - -/* ------------------------------------------------------------------------- */ -const TCSSPropertyTablePropEntry* -TCSSPropertyTable::GetPropEntryByToken(NW_LMgr_PropertyName_t aTokenName) -{ - TUint32 numPropertyNames = sizeof(TCSSPropertyTablePropEntries)/sizeof(TCSSPropertyTablePropEntry); - const TCSSPropertyTablePropEntry* propertyNames = TCSSPropertyTablePropEntries; - - /* traverse our list of token entries looking for a match for our token */ - for (TUint32 index = 0; index < numPropertyNames; index++) - { - if (propertyNames[index].tokenName == aTokenName) - { - return &(propertyNames[index]); - } - } - /* if no token entry is found we must return 0 */ - return NULL; -} - -/* ------------------------------------------------------------------------- */ -const TCSSPropertyTablePropValEntry* -TCSSPropertyTable::GetPropValEntryByToken(NW_LMgr_PropertyValueToken_t aTokenVal) -{ - TUint32 numValueNames = sizeof(TCSSPropertyTablePropValEntries)/sizeof(TCSSPropertyTablePropValEntry); - const TCSSPropertyTablePropValEntry* valueNames = TCSSPropertyTablePropValEntries; - - /* traverse our list of token entries looking for a match for our token */ - for (TUint32 index = 0; index < numValueNames; index++) - { - if (valueNames[index].tokenVal == aTokenVal) - { - return &(valueNames[index]); - } - } - /* if no token entry is found we must return 0 */ - return NULL; -} - - -/* ------------------------------------------------------------------------- */ -const TText16* -TCSSPropertyTable::GetPropValType(TUint8 aValueType) -{ - switch (aValueType){ - - case NW_CSS_ValueType_Integer: // integer - return ValueType_Integer; - case NW_CSS_ValueType_Number: // decimal - return ValueType_Number; - case NW_CSS_ValueType_Px: // integer - return ValueType_Px; - case NW_CSS_ValueType_Em: // decimal - return ValueType_Em; - case NW_CSS_ValueType_Ex: // decimal - return ValueType_Ex; - case NW_CSS_ValueType_In: // decimal - return ValueType_In; - case NW_CSS_ValueType_Cm: // decimal - return ValueType_Cm; - case NW_CSS_ValueType_Mm: // decimal - return ValueType_Mm; - case NW_CSS_ValueType_Pt: // decimal - return ValueType_Pt; - case NW_CSS_ValueType_Pc: // decimal - return ValueType_Pc; - case NW_CSS_ValueType_Percentage: // decimal - return ValueType_Percentage; - case NW_CSS_ValueType_Token: // integer - return ValueType_Token; - case NW_CSS_ValueType_Color: // integer - return ValueType_Color; - case NW_CSS_ValueType_Object: // object - return ValueType_Object; - case NW_CSS_ValueType_Text: // object - return ValueType_Text; - case NW_CSS_ValueType_Image: // object - return ValueType_Image; - case NW_CSS_ValueType_Font: // object - return ValueType_Font; - case NW_CSS_ValueType_Copy: // N/A - return ValueType_Copy; - case NW_CSS_ValueType_DefaultStyle://N/A - return ValueType_DefaultStyle; - case NW_CSS_ValueType_Mask: // N/A - return ValueType_Mask; - default: // invalid entry - return NULL; - } -} - - - - -#undef PX_MASK -#undef EM_MASK -#undef EX_MASK -#undef IN_MASK -#undef CM_MASK -#undef MM_MASK -#undef PT_MASK -#undef PC_MASK -#undef LENGTH_MASK -#undef PERCENTAGE_MASK -#undef COLOR_MASK -#undef TOKEN_MASK -#undef TEXT_MASK -#undef IMAGE_MASK - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSReader.cpp --- a/webengine/wmlengine/src/css/src/CSSReader.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1134 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Lexer for CSS -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nwx_defs.h" - -#include "CSSReader.h" -#include "nw_text_ucs2.h" -#include <nwx_assert.h> -#include "nwx_http_defs.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -#define ASCII_NULL 0x00 -#define ASCII_EXCLAMATION_MARK '!' -#define ASCII_QUOTATION_MARK '"' -#define ASCII_HASH '#' -/*#define ASCII_PERCENT '%'*/ -#define ASCII_APOSTROPHE '\'' -#define ASCII_LEFT_PARENTHESIS '(' -#define ASCII_RIGHT_PARENTHESIS ')' -#define ASCII_ASTERISK '*' -#define ASCII_EQUALS '=' -#define ASCII_COMMA ',' -#define ASCII_HYPHEN '-' -#define ASCII_UNDERSCORE '_' -#define ASCII_DOT '.' -#define ASCII_SLASH '/' -#define ASCII_BACKSLASH '\\' -#define ASCII_COLON ':' -#define ASCII_SEMI_COLON ';' -#define ASCII_LESS_THAN '<' -/*#define ASCII_GREATER_THAN '>'*/ -#define ASCII_AT '@' -#define ASCII_LEFT_BRACE '{' -#define ASCII_VERTICAL_LINE '|' -#define ASCII_RIGHT_BRACE '}' -#define ASCII_LEFT_BRACKET '[' -#define ASCII_RIGHT_BRACKET ']' - -#define ASCII_LOWER_R 'r' -#define ASCII_LOWER_U 'u' - -static const TText16 importRule[] = {'i','m','p','o','r','t','\0'}; -static const TText16 mediaRule[] = {'m','e','d','i','a','\0'}; -static const TText16 charsetRule[] = {'@','c','h','a','r','s','e','t','\0'}; -static const TText16 activeClass[] = {'a','c','t','i','v','e','\0'}; -static const TText16 focusClass[] = {'f','o','c','u','s','\0'}; -static const TText16 linkClass[] = {'l','i','n','k','\0'}; -static const TText16 visitedClass[] = {'v','i','s','i','t','e','d','\0'}; -static const TText16 cachedClass[] = {'c','a','c','h','e','d','\0'}; -static const TText16 important[] = {'i','m','p','o','r','t','a','n','t','\0'}; - -static const TText16 all[] = {'a','l','l','\0'}; -/*static const TText16 screen[] = {'s','c','r','e','e','n','\0'};*/ -static const TText16 handheld[] = {'h','a','n','d','h','e','l','d','\0'}; - -static const TText16 cdo[] = { '<', '!', '-', '-','\0' }; -static const TText16 cdc[] = { '-', '-','>','\0' }; -static const TText16 em[] = { 'e','m','\0' }; -static const TText16 ex[] = { 'e','x','\0' }; -static const TText16 px[] = { 'p','x','\0' }; -static const TText16 in[] = { 'i','n','\0' }; -static const TText16 cm[] = { 'c','m','\0' }; -static const TText16 mm[] = { 'm','m','\0' }; -static const TText16 pt[] = { 'p','t','\0' }; -static const TText16 pc[] = { 'p','c','\0' }; -static const TText16 percent[] = {'%','\0'}; -static const TText16 rgb[] = {'r','g','b','(','\0'}; - -/* following strings need to be changed */ -static const TText16 latin1[] = {'i','s','o','-','8','8','5','9','-','1','\0'}; -static const TText16 ucs2[]= {'i','s','o','-','1','0','6','4','6','-','u','c','s','-','2','\0'}; -static const TText16 utf8[]= {'u','t','f','-','8','\0'}; -static const TText16 usAscii[]= {'u','s','-','a','s','c','i','i','\0'}; - - -// MODULE DATA STRUCTURES - -struct TCSSKeyword -{ - const TText16* name; - TUint16 tokenType; -}; - -// Array of charsets -static const TCSSKeyword TCSSReaderCharsets[] = -{ - {latin1, HTTP_iso_8859_1}, - {ucs2, HTTP_iso_10646_ucs_2}, - {utf8, HTTP_utf_8}, - {usAscii, HTTP_us_ascii} -}; - -// Array of at-rules -static const TCSSKeyword TCSSReaderAtRuleKeywords[] = -{ - {importRule, IMPORT_RULE}, - {mediaRule, MEDIA_RULE}, - {charsetRule, CHARSET_RULE}, -}; - -// Array of pseudo-class keywords -static const TCSSKeyword TCSSPseudoClassKeywords[] = -{ - {activeClass, ACTIVE_PSEUDO_CLASS}, - {linkClass, LINK_PSEUDO_CLASS}, - {visitedClass, VISITED_PSEUDO_CLASS}, - {focusClass, FOCUS_PSEUDO_CLASS}, - {cachedClass, CACHED_PSEUDO_CLASS} -}; - -// Array of units -static const TCSSKeyword TCSSUnitKeywords[] = -{ - {em, EMS}, - {ex, EXS}, - {px, PXS}, - {in, INS}, - {cm, CMS}, - {mm, MMS}, - {pt, PTS}, - {pc, PCS}, - {percent, PERCENTAGE} -}; - -// FORWARD DECLARATIONS - -// LOCAL FUNCTION PROTOTYPES - -/* -------------------------------------------------------------------------*/ -static void NW_CSS_Reader_Ucs2_ntoh(NW_Byte* pBuf, TUint32 byteCount) -{ - TUint32 i; - NW_Uint16 c_ucs2 = 1; - - if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */ - for (i = 0; i < byteCount; i += 2) - { - (void)NW_Mem_memcpy(&c_ucs2, pBuf + i, sizeof(TUint16)); - pBuf[i] = (TUint8)((c_ucs2 >> 8) & 0xff); - pBuf[i+1] = (TUint8)(c_ucs2 & 0xff); - } - } - -} - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TCSSReader::ReadCharL -// Reads a character as a unicode character -// ----------------------------------------------------------------------------- -// -TInt32 TCSSReader::ReadChar(TText16* c) -{ - TInt32 byteCnt; - - *c = 0; - if (iPosition == iLength) - { - return -1; - } - if ((byteCnt = NW_String_readChar(iBuffer+iPosition, c, iEncoding)) == -1) - { - *c = 0; - return -1; - } - if (!Advance(byteCnt)) - { - *c = 0; - return -1; - } - return byteCnt; -} - - -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::Equals(const TText16* aStr, TBool aCaseInsensitive) -{ - TUint32 position; - TUint32 len; - - position = iPosition; - len = NW_Str_Strlen(aStr); - for (TUint32 index=0; index < len; index++) - { - TText16 strCh; - TText16 c; - - if (ReadChar(&c) == -1) - { - SetPosition(position); - return EFalse; - } - if (aCaseInsensitive) - { - strCh = NW_Str_ToLower(*aStr); - c = NW_Str_ToLower(c); - } - else - { - strCh = *aStr; - } - if (c != strCh) - { - SetPosition(position); - return EFalse; - } - aStr++; - } - return ETrue; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::ReadString(TCSSReaderUnit *aStr) -{ - TText16 c; - TText16 strStartChar; - TText16 previousChar; - TInt32 byteCnt; - TInt32 escLen; - - byteCnt = ReadChar(&c); - if ((c != ASCII_QUOTATION_MARK) && (c != ASCII_APOSTROPHE)) - { - return EFalse; - } - strStartChar = previousChar = c; - aStr->Init(iBuffer + iPosition, 0, 0); - - while ((byteCnt = ReadChar(&c)) != -1) - { - /* check for escape character */ - if (c == strStartChar) - { - if (previousChar != ASCII_BACKSLASH) - { - return ETrue; - } - } - else if (c == ASCII_BACKSLASH) - { - escLen = ReadEscape(&c); - if (escLen == -1) - { - return EFalse; - } - byteCnt += escLen; - previousChar = ' '; - } - else - { - previousChar = c; - } - aStr->iLength += byteCnt; - aStr->iNumChars ++; - } - return EFalse; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::ReadURI(TCSSReaderUnit *aStr) -{ - static const TText16 url[] = { 'u','r','l','(','\0' }; - TInt32 byteCnt; - TText16 c; - TUint32 position; - - NW_ASSERT(aStr); - - if (!Equals((TText16*)url, EFalse)) - { - return EFalse; - } - SkipWhiteSpaces(); - - position = iPosition; - if (ReadString(aStr)) - { - SkipWhiteSpaces(); - ReadChar(&c); - if (c == ASCII_RIGHT_PARENTHESIS) - { - return ETrue; - } - return EFalse; - } - SetPosition(position); - aStr->Init(iBuffer+iPosition, 0,0); - /* read url */ - while ((byteCnt = ReadChar(&c)) != -1) - { - if (c == ASCII_RIGHT_PARENTHESIS) - { - return ETrue; - } - aStr->iLength += byteCnt; - aStr->iNumChars++; - } - return EFalse; -} - -/* -------------------------------------------------------------------------*/ -TBool TCSSReader::ReadBlock(TText16 aClosingChar) -{ - TInt32 byteCnt; - TText16 c; - TCSSReaderUnit unit; - TBool status = ETrue; - - status = ETrue; - while ((byteCnt = ReadChar(&c)) != -1) - { - if (c == aClosingChar) - { - return ETrue; - } - switch(c) - { - case ASCII_LEFT_BRACE: - status = ReadBlock(ASCII_RIGHT_BRACE); - break; - case ASCII_LEFT_PARENTHESIS: - status = ReadBlock(ASCII_RIGHT_PARENTHESIS); - break; - case ASCII_LEFT_BRACKET: - status = ReadBlock(ASCII_RIGHT_BRACKET); - break; - case ASCII_APOSTROPHE: - case ASCII_QUOTATION_MARK: - SetPosition(iPosition - byteCnt); - status = ReadString(&unit); - break; - default: - break; - } - if (!status) - { - return EFalse; - } - } - return EFalse; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::IsValidMedia(TCSSReaderUnit *aStr) -{ - TCSSReader r(aStr->iStorage, aStr->iLength, iEncoding); - - return (r.Equals((TText16 *)all, EFalse) || r.Equals((TText16 *)handheld, EFalse)); -} - -/* ------------------------------------------------------------------------- */ -TInt8 TCSSReader::ReadNextToken(TCSSReaderUnit* aToken) -{ - TText16 c; - TInt32 byteCnt; - TCSSReaderUnit str; - TUint32 thisPosition; - - NW_ASSERT(aToken); - - if (iPosition == iLength) - { - return -1; - } - thisPosition = iPosition; - - aToken->Init(iBuffer+iPosition, 0,0); - - if ((byteCnt = ReadChar(&c)) == -1) - { - return -1; - } - if (c == ASCII_BACKSLASH) - { - byteCnt = ReadEscape(&c); - } - - aToken->iLength = byteCnt; - aToken->iNumChars++; - - if (NW_Str_Isspace(c)) - { - return SPACE; - } - - if (NW_Str_Isdigit(c)) - { - SetPosition(iPosition - byteCnt); - return DIGIT; - } - - switch(c) - { - case ASCII_NULL: - return BUFFER_END; - - case ASCII_LEFT_BRACE: - return LEFT_BRACE; - - case ASCII_RIGHT_BRACE: - return RIGHT_BRACE; - - case ASCII_LEFT_BRACKET: - return LEFT_BRACKET; - - case ASCII_RIGHT_BRACKET: - return RIGHT_BRACKET; - - case ASCII_DOT: - return DOT; - - case ASCII_COMMA: - return COMMA; - - case ASCII_SEMI_COLON: - return SEMI_COLON; - - case ASCII_ASTERISK: - return ASTERISK; - - case ASCII_EQUALS: - return EQUALS; - - case ASCII_VERTICAL_LINE: - return VERTICAL_LINE; - - case ASCII_RIGHT_PARENTHESIS: - return RIGHT_PARENTHESIS; - - case ASCII_HASH: - return HASH; - - case ASCII_SLASH: - return 0; - - case ASCII_LESS_THAN: - SetPosition(thisPosition); - if (Equals((TText16 *)cdo, EFalse)) - { - aToken->iLength += NW_Str_Strlen((TText16 *)cdo) -1 ; - return CDO; - } - return -1; - - case ASCII_HYPHEN: - SetPosition(thisPosition); - if (Equals((TText16 *)cdc, EFalse)) - { - return CDC; - } - SetPosition(thisPosition); - return HYPHEN; - - case ASCII_APOSTROPHE: - case ASCII_QUOTATION_MARK: - SetPosition(thisPosition); - if (ReadString(aToken)) - { - return STRING; - } - return -1; - - case ASCII_AT: - { - TUint32 index = 0; - while (index < sizeof(TCSSReaderAtRuleKeywords)/sizeof(TCSSKeyword)) - { - if (Equals(TCSSReaderAtRuleKeywords[index].name, EFalse)) - { - TUint32 length = NW_Str_Strlen(TCSSReaderAtRuleKeywords[index].name); - if (iEncoding == HTTP_iso_10646_ucs_2) - { - // Ucs2 chars are 2 bytes. - aToken->iLength += (2 * length); - } - else - { - aToken->iLength += length; - } - return (TInt8)TCSSReaderAtRuleKeywords[index].tokenType; - } - index++; - } - if (ReadIdentifier(&str)) - { - aToken->iLength += str.iNumChars; - return ATKEYWORD; - } - return -1; - } - - case ASCII_COLON: - return COLON; - - case ASCII_EXCLAMATION_MARK: - SkipWhiteSpaces(); - if (Equals((TText16 *)important, EFalse)) - { - aToken->iLength += iPosition - thisPosition; - return IMPORTANT; - } - return -1; - - case ASCII_LOWER_R: - SetPosition(thisPosition); - if (Equals((TText16 *)rgb, EFalse)) - { - aToken->iLength += iPosition - thisPosition; - return RGB; - } - break; - - case ASCII_LOWER_U: - if (iEncoding == HTTP_iso_10646_ucs_2) - { - static const NW_Ucs2 url[] = { 'u','r','l','(','\0' }; - if (NW_Byte_Strnicmp((const NW_Byte*)(iBuffer+thisPosition), (const NW_Byte*)url, NW_Str_Strlen(url)*sizeof(NW_Ucs2)) != 0) - { - aToken->iLength = 8; - aToken->iNumChars = 4; - break; - } - } - else - { - if (NW_Asc_strnicmp((char *)(iBuffer+thisPosition), "url(",4) !=0) - { - aToken->iLength = 4; - aToken->iNumChars = 4; - break; - } - } - SetPosition(thisPosition); - return URI; - default: - break; - } - - if (NW_Str_Isalpha(c)) - { - SetPosition(thisPosition); - aToken->iLength = 0; - return ALPHA; - } - SetPosition(thisPosition); - aToken->iLength = 0; - return 0; -} - -/* ------------------------------------------------------------------------- */ -TInt8 TCSSReader::ReadNumberToken(TCSSReaderUnit *aStr) -{ - TText16 c; - TInt32 byteCnt; - TUint32 index; - TUint32 startPosition; - - startPosition = iPosition; - aStr->Init(GetBufferPointer(), 0,0); - - byteCnt = ReadChar(&c); - if ((c == '-') || (c == '+')) - { - aStr->iNumChars++; - byteCnt = ReadChar(&c); - } - if (!NW_Str_Isdigit(c) && (c!= ASCII_DOT)) - { - return -1; - } - while ((NW_Str_Isdigit(c)) && (byteCnt != -1)) - { - aStr->iNumChars++; - byteCnt = ReadChar(&c); - } - if (c == ASCII_DOT) - { - aStr->iNumChars++; - byteCnt = ReadChar(&c); - if (!NW_Str_Isdigit(c)) - { - return -1; - } - while ((NW_Str_Isdigit(c)) && (byteCnt != -1)) - { - aStr->iNumChars++; - byteCnt = ReadChar(&c); - } - } - if (byteCnt == -1) - { - return -1; - } - SetPosition(iPosition-byteCnt); - aStr->iLength = iPosition - startPosition; - - SkipWhiteSpaces(); - for (index = 0;index < sizeof(TCSSUnitKeywords)/sizeof(TCSSKeyword); index++) - { - if (Equals(TCSSUnitKeywords[index].name, EFalse)) - { - return (NW_Int8)TCSSUnitKeywords[index].tokenType; - } - } - return NUMBER; -} - -/* ------------------------------------------------------------------------- */ -TInt8 TCSSReader::GetPseudoClass() -{ - TUint32 index = 0; - - while (index < sizeof(TCSSPseudoClassKeywords)/sizeof(TCSSKeyword)) - { - if (Equals(TCSSPseudoClassKeywords[index].name, EFalse)) - { - return (NW_Int8)TCSSPseudoClassKeywords[index].tokenType; - } - index++; - } - return -1; -} - -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::ReadIdentifier(TCSSReaderUnit *aStr) -{ - TText16 c; - TInt32 byteCnt; - TUint32 thisPosition; - TCSSReaderUnit name; - - NW_ASSERT(aStr); - thisPosition = iPosition; - - aStr->Init(GetBufferPointer(), 0,0); - - byteCnt = ReadChar(&c); - - if (c == ASCII_BACKSLASH) - { - byteCnt = ReadEscape(&c); - } - - if ((!NW_Str_Isalpha(c)) && (c != ASCII_HYPHEN)) - { - SetPosition(thisPosition); - return EFalse; - } - - aStr->iLength = byteCnt; - aStr->iNumChars =1; - thisPosition = iPosition; - - if (ReadName(&name)) - { - aStr->iLength += name.iLength; - aStr->iNumChars += name.iNumChars; - } - else - { - SetPosition(thisPosition); - } - return ETrue; -} - -TUint16 TCSSReader::ReadEscape(TText16* outChar) -{ - TInt32 tempLen = 0; - TInt32 size = 0; - TText16 hex; - TText16 c; - TUint16 hexIndex = 0; - TUint16 escLen = 0; - - - TUint32 prevPosition = iPosition; - size = ReadChar(&c); // ReadChar returns TInt32-sized byteLen read - if (size < 0) - { - return 0; - } - tempLen = size; - - switch (c) - { - case '\n': - *outChar = 0; - break; - default: - if ((c >= '0' && c <= '9') || - (c >= 'a' && c <= 'f') || - (c >= 'A' && c <= 'F')) - { - hex = 0; - hexIndex = 0; - do { - if (c >= '0' && c <= '9') { - hex = (TText16)((hex << 4) + (c - '0')); - } - else if (c >= 'a' && c <= 'f') { - hex = (TText16)((hex << 4) + (c - 'a' + 10)); - } - else if (c >= 'A' && c <= 'F') { - hex = (TText16)((hex << 4) + (c - 'A' + 10)); - } - else { - break; - } - prevPosition = iPosition; - if ((size = ReadChar(&c)) < 0) - { - return 0; - } - hexIndex ++; - tempLen = tempLen + size; - } while (hexIndex < 6); - if (!NW_Str_Isspace(c)) - { - SetPosition(prevPosition); - tempLen -= size; - } - *outChar = (TText16)hex; - } - else { - *outChar = c; - } - break; - } - - escLen = (TUint16) tempLen; - return escLen; -} -/* ------------------------------------------------------------------------- */ -TBool TCSSReader::ReadName(TCSSReaderUnit *aStr) -{ - TText16 c; - TInt32 byteCnt; - TUint32 startPosition; - - aStr->Init(GetBufferPointer(), 0, 0); - startPosition = iPosition; - - byteCnt = ReadChar(&c); - - while (((NW_Str_Isalpha(c) || NW_Str_Isdigit(c) || - (c >= 0x80 && c <= 0xff) || - (c == ASCII_HYPHEN) || - (c == ASCII_BACKSLASH) || - (c == ASCII_UNDERSCORE))) && - (byteCnt != -1)) - { - if (c == ASCII_BACKSLASH) - { - ReadEscape(&c); - } - aStr->iNumChars++; - byteCnt = ReadChar(&c); - } - if (byteCnt == -1) - { - return EFalse; - } - - aStr->iLength = iPosition - startPosition; - - SetPosition(iPosition - byteCnt); - return ETrue; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode TCSSReader::GoToToken(NW_Uint8 aTokenType, TText8** aPosition) -{ - NW_Int8 tok; - TCSSReaderUnit token; - - *aPosition = NULL; - while ((tok = ReadNextToken(&token)) != aTokenType) - { - TText16 c; - - if (tok == -1) - { - return KBrsrBufferEnd; - } - if (tok == URI) - { - Advance(token.iLength); - } - else if ((tok == 0) || (tok == ALPHA) || (tok == DIGIT) || (tok == HYPHEN)) - { - if (ReadChar(&c) == -1) - { - return KBrsrFailure; - } - } - } - *aPosition = GetBufferPointer(); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void TCSSReader::SkipWhiteSpaces() -{ - TInt32 numBytes; - TText16 c; - - do - { - numBytes = ReadChar (&c); - while (c == ASCII_SLASH) - { - /* process the trailing '*' */ - numBytes = ReadChar (&c); - if (numBytes == -1 || c != ASCII_ASTERISK) - { - SetPosition (iPosition - numBytes); - c = ASCII_SLASH; - break; - } - - /* process all characters up to the next '*' */ - while ((numBytes = ReadChar (&c)) != -1) - { - if (c == ASCII_ASTERISK) - { /* look for comment end */ - if (ReadChar (&c) != -1 && c == ASCII_SLASH) - { - numBytes = ReadChar (&c); - break; - } - } - } - - if (numBytes == -1) { - return; - } - } - }while (NW_Str_Isspace(c)); - SetPosition (iPosition - numBytes); -} - -/* -------------------------------------------------------------------------*/ -TBool TCSSReader::IgnoreAtRule(TUint32 aPosition) -{ - TText16 c; - - SetPosition(aPosition); - while (ReadChar(&c) != -1) - { - if (c == ASCII_SEMI_COLON) - { - return ETrue; - } - if (c == ASCII_LEFT_BRACE) - break; - } - return ReadBlock(ASCII_RIGHT_BRACE); -} - -/* -------------------------------------------------------------------------*/ -TBool TCSSReader::ReadCharset() -{ - TText16 c; - TCSSReaderUnit unit; - NW_Byte* data = iBuffer; - - if (iEncoding == HTTP_utf_8) - { - /* look for BOM and remove if found */ - if (iLength >= 3) - { - if ((data[0] == 0xef) - && (data[1] == 0xbb) - && (data[2] == 0xbf)) - { - Advance(3); - } - } - } - if (iEncoding == HTTP_iso_10646_ucs_2) - { - /* WARNING: we are assuming network byte order (i.e., big) for - the input document */ - - /* verify the doc has an even number of bytes, check LSB != 1 */ - if ((iLength & 1) == 1) - { - return EFalse; - } - - /* WARNING skip next call in debug if the server doesn't understand - serving UCS2 and doesn't change byte order to big endian */ - /* make a pass over the doc, forcing byte order to native byte order */ - NW_CSS_Reader_Ucs2_ntoh(iBuffer, iLength); - - /* now look for BOM and remove if found */ - if (iLength >= 2) - { - if (((data[0] == 0xfe) && (data[1] == 0xff)) - || ((data[0] == 0xff) && (data[1] == 0xfe))) - { - Advance(2); - } - } - } - - if (Equals(charsetRule, EFalse)) - { - (void) ReadChar(&c); - if (!NW_Str_Isspace(c)) - { - return EFalse; - } - SkipWhiteSpaces(); - if (!ReadString(&unit)) - { - return EFalse; - } - } - else - { - return EFalse; - } - TCSSReader reader(unit.iStorage, unit.iLength, iEncoding); - iEncoding = reader.GetCharsetVal(); - SkipWhiteSpaces(); - - if (ReadNextToken(&unit) != SEMI_COLON) - { - return EFalse; - } - return ETrue; -} - - - - -// ----------------------------------------------------------------------------- -// TCSSReader::Advance: -// Sets encoding -// ----------------------------------------------------------------------------- -// -TBool TCSSReader::Advance(TUint32 aNumBytes) -{ - if ((iPosition+aNumBytes) > iLength) - { - return EFalse; - } - SetPosition(iPosition+aNumBytes); - return ETrue; -} - -// ----------------------------------------------------------------------------- -// TCSSReader::GetCharsetVal -// Gets Encoding of document -// ----------------------------------------------------------------------------- -// -TUint32 TCSSReader::GetCharsetVal() -{ - TUint32 index = 0; - - while (index < sizeof(TCSSReaderCharsets)/sizeof(TCSSKeyword)) - { - if (Equals(TCSSReaderCharsets[index].name, ETrue)) - { - return TCSSReaderCharsets[index].tokenType; - } - index++; - } - return 0; - -} - -// ----------------------------------------------------------------------------- -// TCSSReaderUnit::GetUnicode -// Converts to unicode -// ----------------------------------------------------------------------------- -// -TText16* -TCSSReaderUnit::GetUnicodeL(TUint32 aEncoding) -{ - TText16* ucs2Str = NULL; - TText16* outStr; - TText16 c; - TUint32 escLen; - - if ((iLength != 0) && (iStorage != NULL)) - { - TCSSReader reader(iStorage, iLength, aEncoding); - if (iNumChars == 0) - { - while (reader.ReadChar(&c) != -1) - { - iNumChars++; - } - reader.Init(iStorage, iLength, aEncoding); - } - ucs2Str = (TText16 *)NW_Mem_Malloc((iNumChars+1)*sizeof(TText16)); - if (ucs2Str == NULL) - { - User::Leave(KErrNoMemory); - } - outStr = ucs2Str; - c = 0; - for (TUint32 index = 0; index < iNumChars; index++) - { - if (reader.ReadChar(&c) < 0) - { - NW_Mem_Free(ucs2Str); - return NULL; - } - if (c == '\\') - { - escLen = reader.ReadEscape(&c); - if (escLen == 0) - { - NW_Mem_Free(ucs2Str); - return NULL; - } - if (c != 0) - { - *outStr++ = c; - } - } - else - { - *outStr++ = c; - } - } - *outStr = 0; - } - return (TText16 *)ucs2Str; -} - - //This method is identical to the above one except it does not throw - //an exception (e.g. Leave). This is faster and routines that call - //this need to handle NULL anyway. As it turns out they DON'T. When - //all that code is finally fixed the above method should be removed. - -TText16* -TCSSReaderUnit::GetUnicode(TUint32 aEncoding) -{ - TText16* ucs2Str = NULL; - TText16* outStr; - TText16 c; - TUint32 escLen; - - if ((iLength != 0) && (iStorage != NULL)) - { - TCSSReader reader(iStorage, iLength, aEncoding); - if (iNumChars == 0) - { - while (reader.ReadChar(&c) != -1) - { - iNumChars++; - } - reader.Init(iStorage, iLength, aEncoding); - } - ucs2Str = (TText16 *)NW_Mem_Malloc((iNumChars+1)*sizeof(TText16)); - if (ucs2Str == NULL) - { - return NULL; - } - outStr = ucs2Str; - c = 0; - for (TUint32 index = 0; index < iNumChars; index++) - { - if (reader.ReadChar(&c) < 0) - { - NW_Mem_Free(ucs2Str); - return NULL; - } - if (c == '\\') - { - escLen = reader.ReadEscape(&c); - if (escLen == 0) - { - NW_Mem_Free(ucs2Str); - return NULL; - } - if (c != 0) - { - *outStr++ = c; - } - } - else - { - *outStr++ = c; - } - } - *outStr = 0; - } - return (TText16 *)ucs2Str; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSRuleList.cpp --- a/webengine/wmlengine/src/css/src/CSSRuleList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,655 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains all CSS styles -* -*/ - - - -// INCLUDE FILES -#include "CSSRuleList.h" -#include <nwx_assert.h> -#include "BrsrStatusCodes.h" -#include "nwx_settings.h" - -#include "CSSParser.h" -#include "nw_text_ucs2.h" -#include <nwx_string.h> -#include "nw_hed_contenthandler.h" -#include "CSSDeclListHandle.h" -#include "TKeyArrayPtr.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CCSSRuleList::CCSSRuleList -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::ConstructL(NW_CSS_Processor_t* aProcessor) - { - /* initialize the element map */ - iElementList = new (ELeave) CCSSElementList(2); - /* initialize the bufferList */ - iBufferList = CCSSBufferList::NewL(); - iCurrentBufferIndex = -1; - iProcessor = aProcessor; - } - -// ----------------------------------------------------------------------------- -// CCSSRuleList::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCSSRuleList* CCSSRuleList::NewL(NW_CSS_Processor_t* aProcessor) - { - CCSSRuleList* self = new( ELeave ) CCSSRuleList(); - - CleanupStack::PushL( self ); - self->ConstructL(aProcessor); - CleanupStack::Pop(); - - return self; - } - - -// Destructor -CCSSRuleList::~CCSSRuleList() - { - if (iElementList != NULL) - { - iElementList->ResetAndDestroy(); - delete iElementList; - } - - if (iBufferList != NULL) - delete iBufferList; - - if (iSelector != NULL) - delete iSelector; - } - -// ----------------------------------------------------------------------------- -// CCSSRuleList::ProcessBuffer -// parses a stylesheet -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CCSSRuleList::ProcessBuffer(TText8* aData, TUint32 aLength, TUint32 aEncoding, TBool aDoNotDelete) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(aData != NULL); - - TRAPD(ret, iBufferList->AddL(aData, aLength, aEncoding, aDoNotDelete, NULL)); - if (ret == KErrNoMemory) - { - status = KBrsrOutOfMemory; - } - if (status == KBrsrSuccess) - { - iCurrentBufferIndex = iBufferList->GetSize() - 1; - TCSSParser parser(aData, aLength, aEncoding); - status = parser.ParseStyleSheet((MCSSEventListener*)(this)); - iCurrentBufferIndex = -1; - } - return status; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetElementRules -// Returns ruleList (a dynamic vector sorted by precedence) for a given element -// ----------------------------------------------------------------------------- -// -CCSSRules* -CCSSRuleList::GetElementRules(TUint16 aToken) -{ - CCSSRules* rules = NULL; - TInt index = 0; - CCSSRuleListElementEntry* tempEntry = NULL; - TRAPD( status, tempEntry = new(ELeave)CCSSRuleListElementEntry(aToken) ); - - if( status == KErrNone ) - { - TNumKeyArrayPtr matchkey(_FOFF(CCSSRuleListElementEntry, iElementToken), ECmpTUint16); - if (iElementList->FindIsq( tempEntry, matchkey, index) == 0) - { - CCSSRuleListElementEntry* entry = iElementList->At(index); - rules = entry->iRules; - } - delete tempEntry; - } - return rules; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetNextRule -// Returns rule in the list referenced by aIndex. Returns NULL if not valid. -// ----------------------------------------------------------------------------- -// -CCSSRuleListElementEntry* -CCSSRuleList::GetElementRulesByIndex(TInt aIndex) -{ - if (aIndex >= iElementList->Count()) - return NULL; - - CCSSRuleListElementEntry* entry = iElementList->At(aIndex); - return entry; -} - - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetDictionary -// Returns dictionary -// ----------------------------------------------------------------------------- -// -NW_WBXML_Dictionary_t* -CCSSRuleList::GetDictionary() -{ - return iDictionary; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetBufferList -// Returns the buffer list -// ----------------------------------------------------------------------------- -// -CCSSBufferList* CCSSRuleList::GetBufferList() -{ - return iBufferList; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::SetCurrentBufferIndex -// Sets the index of the buffer being parsed -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SetCurrentBufferIndex(TInt aIndex) -{ - iCurrentBufferIndex = aIndex; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetSize -// Returns the size of the rules list. This corresponds to the number of -// element entries in the iElementList -// ----------------------------------------------------------------------------- -// -TInt CCSSRuleList::GetSize() -{ - return iElementList->Count(); -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::SetDictionary -// Set dictionary -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SetDictionary(NW_WBXML_Dictionary_t* aDictionary) -{ - iDictionary = aDictionary; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::StartDocument -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::StartDocumentL(TText8*) -{ -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::EndDocument -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::EndDocumentL(TText8*) -{ -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::Selector -// Creates a new rule entry for each selector -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SelectorL(TText8* aSelector, - TCSSReaderUnit* aTargetElement, - TUint32 aSpecificity) -{ - TInt currentBufferPriority = iBufferList->GetPriority(iCurrentBufferIndex); - - NW_REQUIRED_PARAM( aTargetElement ); - - NW_ASSERT(aSelector != NULL); - NW_ASSERT(aTargetElement != NULL); - - if (iSelector) - { - // last simpleSelector will tell us the target token - TInt numSimpleSelectors = iSelector->iSimpleSelectorList->Count(); - CCSSSimpleSelector* simpleSelector = iSelector->iSimpleSelectorList->At(numSimpleSelectors-1); - TUint16 elementToken = simpleSelector->iElementToken; - - // we need to know where to insert this selector - CCSSRules* elementRules = GetElementRules(elementToken); - if (elementRules == NULL) - { - CCSSRuleListElementEntry* tempElementEntry - = new(ELeave)CCSSRuleListElementEntry(elementToken); - CleanupStack::PushL( tempElementEntry ); - - tempElementEntry->iRules = new (ELeave) CCSSRules(2); - - // we want to insert the element entry in key order - TNumKeyArrayPtr matchkey(_FOFF(CCSSRuleListElementEntry, iElementToken), ECmpTUint16); - /* set the entry in the map */ - iElementList->InsertIsqL(tempElementEntry, matchkey); - - CleanupStack::Pop(); // tempElementEntry & tempElementEntry->iRules - elementRules = tempElementEntry->iRules; - } - - /* Insert the element into Vector according to the specificity */ - /* First find the index */ - TInt size = elementRules->Count(); - TInt index =0; - for(index =0; index < size; index++) - { - CCSSSelector *selector = elementRules->At(index); - - TInt selectorBufferPriority = iBufferList->GetPriority(selector->iBufferIndex); - - /* Found the index to insert the new rule */ - /* if there are 2 rules with same specificity, then the rule from the - latter buffer gets precedence */ - if ((aSpecificity > selector->iSpecificity) || - ((aSpecificity == selector->iSpecificity) && - (selectorBufferPriority <= currentBufferPriority))) - break; - } - - /* create a new entry for selector and initialize it */ - iSelector->Init(aSelector, (TUint16)aSpecificity, iCurrentBufferIndex); - CCSSSelector* tempSelector = iSelector; - iSelector = NULL; - elementRules->InsertL(index, tempSelector); - } -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::SimpleSelector -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SimpleSelectorEndL(TCSSSimpleSelector* , TBool aFailed) -{ - NW_ASSERT(iSelector != NULL); - - if (aFailed) - { - // there was and error removed last simple selector - TInt numSimpleSelectors = iSelector->iSimpleSelectorList->Count(); - - // removed last simple selector - if (numSimpleSelectors > 0 ) - { - CCSSSimpleSelector* simpleSelector = iSelector->iSimpleSelectorList->At(numSimpleSelectors-1); - iSelector->iSimpleSelectorList->Delete(numSimpleSelectors-1); - delete simpleSelector; - } - if (iSelector->iSimpleSelectorList->Count() == 0) - { - delete iSelector; - iSelector = NULL; - } - - } -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::SimpleSelectorStart -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SimpleSelectorStartL(TCSSReaderUnit *aTargetElement) -{ - TUint16 elementToken = 0; - - NW_ASSERT(aTargetElement != NULL); - - // get element token - if (aTargetElement->iLength != 0) - { - TText16* ucs2Str = aTargetElement->GetUnicodeL(iCurrentEncoding); - User::LeaveIfNull(ucs2Str); - - elementToken = - (NW_Uint16)NW_WBXML_Dictionary_getTagToken(iDictionary, (NW_String_UCS2Buff_t *)ucs2Str, NW_FALSE); - NW_Mem_Free(ucs2Str); - } - if (iSelector == NULL) - { - iSelector = new (ELeave) CCSSSelector(); - iSelector->iSimpleSelectorList = new (ELeave) CCSSSimpleSelectorList(1); - } - // create new Simple Selector entry - CCSSSimpleSelector* simpleSelector = new (ELeave) CCSSSimpleSelector(elementToken); - CleanupStack::PushL(simpleSelector); - - iSelector->iSimpleSelectorList->AppendL(simpleSelector); - CleanupStack::Pop();// pop simpleselector -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::Condition -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::ConditionL(TUint8 aConditionType, - TCSSReaderUnit *aValue1, - TCSSReaderUnit *aValue2) -{ - TInt numSimpleSelectors = iSelector->iSimpleSelectorList->Count(); - - // get last simple selector - CCSSSimpleSelector* simpleSelector = - iSelector->iSimpleSelectorList->At(numSimpleSelectors-1); - - if (simpleSelector->iConditionList == NULL) - { - simpleSelector->iConditionList = new (ELeave) CCSSConditionList(1); - } - // create a new condition entry - CCSSCondition* condition = new (ELeave) CCSSCondition(aConditionType); - CleanupStack::PushL(condition); - - // in case of CLASS or ID condition value1 is the value of attribute - // in case of attribute condition - it is the name of the attribute - if ((aConditionType == CLASS_CONDITION) || - (aConditionType == ID_CONDITION) || - (aConditionType == ATTRIBUTE_CONDITION)) - { - if (aValue1) - { - condition->iValue1 = aValue1->GetUnicodeL(iCurrentEncoding); - } - else - { - delete condition;// no point of adding condition if it's not proper structure - condition = NULL; - } - } - if (aValue1 && aValue2 && (aConditionType == ATTRIBUTE_CONDITION)) - { - //lint -e{644} Variable may not have been initialized - condition->iValue2 = aValue2->GetUnicodeL(iCurrentEncoding); - } - // add it to simple selector list - if (condition) - { - simpleSelector->iConditionList->AppendL(condition); - } - - // Pop condition - CleanupStack::Pop(); -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::Property -// -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::PropertyL(TCSSReaderUnit* aName, - TCSSPropertyVal* aPropertyVal, - TBool aImportant) -{ - NW_REQUIRED_PARAM(aName); - NW_REQUIRED_PARAM(aPropertyVal); - NW_REQUIRED_PARAM(aImportant); -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::Import -// Issues load request for stylesheet pointed by aUrl -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CCSSRuleList::Import(TCSSReaderUnit* aUrl) -{ - TText16* ucs2Str; - NW_Text_t* url; - NW_Text_UCS2_t* tempUrl; - TBrowserStatusCode status; - TText16* urlStr = NULL; - NW_Text_Length_t urlLen; - NW_Bool freeNeeded; - TInt cssBufferIndex = 0; - - NW_ASSERT(aUrl != NULL); - - if (aUrl == NULL){ - return KBrsrSuccess; - } - - ucs2Str = aUrl->GetUnicodeL(iCurrentEncoding); - if (ucs2Str == NULL) - { - return KBrsrFailure; - } - tempUrl = NW_Text_UCS2_New (ucs2Str, (TUint16)NW_Str_Strlen(ucs2Str), - NW_Text_Flags_TakeOwnership); - if (tempUrl == NULL) - { - return KBrsrOutOfMemory; /* NW_Text_UCS2_New() takes care of deleting string when fails */ - } - /* find url to import */ - /* NOTE: if ResolveURL() returns a non-NULL pointer then the text object - * passed in is not leaked; if it returns a NULL pointer then the passed - * text object must be freed by the caller - */ - status = - NW_HED_ContentHandler_ResolveURL (iProcessor->owner, - NW_TextOf (tempUrl), &url); - if (status != KBrsrSuccess) - { - NW_Object_Delete(tempUrl); - return KBrsrSuccess; /* ignore import */ - } - NW_ASSERT(iCurrentBufferIndex >= 0); - - /* Get a string for the resolved url. If the creation fails, it will still be - * NULL, which won't cause any major problems. */ - urlStr = NW_Text_GetUCS2Buffer (url, 0, &urlLen, &freeNeeded); - - /* add a new entry to the bufferList */ - TRAPD(ret, iBufferList->AddL(NULL, 0, iCurrentEncoding, NW_FALSE, urlStr)); - cssBufferIndex = iBufferList->GetSize() - 1; - if (ret == KErrNoMemory) - { - status = KBrsrOutOfMemory; - } - if (freeNeeded) - { - NW_Str_Delete(urlStr); - } - if (status == KBrsrSuccess) - { - iBufferList->UpdatePriority(iCurrentBufferIndex); - /* finally load the url */ - status = NW_CSS_Processor_ProcessLoadRequest( iProcessor, - NW_TextOf(url), - NW_CSS_Processor_LoadCSS, - iProcessor->isSavedDeck, - iProcessor->isHistLoad, - iProcessor->isReLoad, - cssBufferIndex); - } - else - { - status = KBrsrSuccess; /* ignore import */ - } - - NW_Object_Delete(url); - url = NULL; - - return status; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::GetCurrentEncoding -// Returns Returns the encoding of the document being parsed -// ----------------------------------------------------------------------------- -// -TUint32 CCSSRuleList::GetCurrentEncoding() -{ - return iCurrentEncoding; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::SetCurrentEncoding -// Sets the encoding of the document being parsed -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::SetCurrentEncoding(TUint32 aEncoding) -{ - iCurrentEncoding = aEncoding; -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::ApplyStyles -// Applies styles for a given element node in the document after pattern matching -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::ApplyStylesL(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, - const NW_Evt_Event_t* aEvent, - NW_HED_DomHelper_t* aDomHelper) -{ - TInt univRuleIndex = 0; - CCSSNodeData nodeData; - - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aBox != NULL); - NW_ASSERT(aDomHelper != NULL); - - TUint16 elementToken = NW_DOM_ElementNode_getTagToken(aElementNode); - - /* apply styles for the given elementToken */ - CCSSRules* elementRules = GetElementRules(elementToken); - CCSSRules* universalRules = GetElementRules(0); - - if (elementRules!= NULL) - { - TInt elementRulesSize = elementRules->Count(); - - for(TInt index =0;index < elementRulesSize;index++) - { - CCSSSelector* entry1 = elementRules->At(index); - - TInt priority1 = iBufferList->GetPriority(entry1->iBufferIndex); - - if (universalRules) - { - /* first apply any universal rule which has a higher weight than this rule */ - TInt universalRulesSize = universalRules->Count(); - while (univRuleIndex < universalRulesSize) - { - CCSSSelector *entry2 = universalRules->At(univRuleIndex); - TInt priority2 = iBufferList->GetPriority(entry2->iBufferIndex); - - if ((entry2->iSpecificity < entry1->iSpecificity) || - ((entry2->iSpecificity == entry1->iSpecificity) && (priority2 < priority1))) - break; - - ApplyEntryStylesL(aElementNode, entry2, aBox, aEvent, aDomHelper, &nodeData); - - univRuleIndex++; - } // while - }// if - ApplyEntryStylesL(aElementNode, entry1, aBox, aEvent, aDomHelper, &nodeData); - - }// for - }// if (elementRules!= NULL) - - /* apply any remaining universal rules */ - if (universalRules) - { - TInt universalRulesSize = universalRules->Count(); - while(univRuleIndex < universalRulesSize) - { - CCSSSelector *entry = universalRules->At(univRuleIndex); - ApplyEntryStylesL(aElementNode, entry, aBox, aEvent, aDomHelper, &nodeData); - univRuleIndex++; - }// while - }// if -} - -// ----------------------------------------------------------------------------- -// CCSSRuleList::ApplyEntryStyles -// Applies styles for a given rule list entry after pattern matching -// ----------------------------------------------------------------------------- -// -void CCSSRuleList::ApplyEntryStylesL(NW_DOM_ElementNode_t* aElementNode, - CCSSSelector* aEntry, - NW_LMgr_Box_t* aBox, - const NW_Evt_Event_t* aEvent, - NW_HED_DomHelper_t* aDomHelper, - CCSSNodeData* aNodeData) -{ - TText8* declarationList; - TCSSParser parser; - - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aEntry != NULL); - NW_ASSERT(aBox != NULL); - NW_ASSERT(aDomHelper != NULL); - - /* first match pattern */ - iBufferList->InitializeParser(&parser, aEntry->iBufferIndex); - CCSSPatternMatcher patternMatcher(iDictionary, iProcessor->owner, aDomHelper); - - TBool matched = patternMatcher.MatchPatternL(aElementNode, aEntry, aEvent, aNodeData); - if (matched) - { - // initialize the parser to beginning of selector - parser.SetPosition(aEntry->iSelector); - - TCSSReader* reader = parser.GetReader(); - // go to beginning of declaration list - reader->GoToToken(LEFT_BRACE, &declarationList); - - /* pattern matches - apply styles */ - TCSSDeclListHandle::ApplyStylesL(aBox, &parser, iProcessor, aEntry->iBufferIndex ); - } -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSTokenToInt.cpp --- a/webengine/wmlengine/src/css/src/CSSTokenToInt.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,324 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). - -#include "nw_css_tokentointi.h" - -#include "nw_lmgr_cssproperties.h" -#include "nw_text_ucs2.h" -#include <nwx_string.h> -#include <nwx_math.h> -#include "BrsrStatusCodes.h" -#include "AknUtils.h" - -/* ------------------------------------------------------------------------- * - private data type - * ------------------------------------------------------------------------- */ -static const -NW_CSS_TokenToInt_Entry_t _NW_CSS_TokenToInt_ColorVals[] = -{ - {NW_CSS_PropValue_aqua, 0x00ffff}, - {NW_CSS_PropValue_black, 0x000000}, - {NW_CSS_PropValue_blue, 0x0000ff}, - {NW_CSS_PropValue_cyan, 0x00ffff}, - {NW_CSS_PropValue_fuchsia, 0xff00ff}, - {NW_CSS_PropValue_gray, 0x808080}, - {NW_CSS_PropValue_green, 0x008000}, - {NW_CSS_PropValue_lime, 0x00ff00}, - {NW_CSS_PropValue_maroon, 0x800000}, - {NW_CSS_PropValue_navy, 0x000080}, - {NW_CSS_PropValue_olive, 0x808000}, - {NW_CSS_PropValue_pink, 0xffc0cb}, - {NW_CSS_PropValue_purple, 0x800080}, - {NW_CSS_PropValue_red, 0xff0000}, - {NW_CSS_PropValue_silver, 0xc0c0c0}, - {NW_CSS_PropValue_teal, 0x008080}, - {NW_CSS_PropValue_white, 0xffffff}, - {NW_CSS_PropValue_yellow, 0xffff00} -}; - -/* ------------------------------------------------------------------------- */ -// Font size in points -static const -NW_CSS_TokenToDec_Entry_t _NW_CSS_PropVal_FontSizeVals[] = -{ - {NW_CSS_PropValue_xxSmall, 5.0F}, - {NW_CSS_PropValue_xSmall, 5.5F}, - {NW_CSS_PropValue_small, 6.0F}, - {NW_CSS_PropValue_medium, 7.0F}, - {NW_CSS_PropValue_large, 10.0F}, - {NW_CSS_PropValue_xLarge, 12.0F}, - {NW_CSS_PropValue_xxLarge, 14.0F}, -}; - -/* ------------------------------------------------------------------------- */ -static const -NW_CSS_TokenToInt_Entry_t _NW_CSS_PropVal_BorderWidthVals[] = -{ - {NW_CSS_PropValue_thin, NW_LMgr_Box_MinBorderWidth}, - {NW_CSS_PropValue_medium, NW_LMgr_Box_MediumBorderWidth}, - {NW_CSS_PropValue_thick, NW_LMgr_Box_MaxBorderWidth} -}; - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_CSS_TokenToInt_Class_t NW_CSS_TokenToInt_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Base_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_CSS_TokenToInt */ - /* numFontSizeVals */ sizeof(_NW_CSS_PropVal_FontSizeVals)/sizeof(NW_CSS_TokenToDec_Entry_t), - /* fontSizeList */ _NW_CSS_PropVal_FontSizeVals, - /* numBorderWidthVals */ sizeof(_NW_CSS_PropVal_BorderWidthVals)/sizeof(NW_CSS_TokenToInt_Entry_t), - /* borderWidthList */ _NW_CSS_PropVal_BorderWidthVals - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_CSS_TokenToInt_t NW_CSS_TokenToInt = { - {&NW_CSS_TokenToInt_Class}, -}; - -/* -------------------------------------------------------------------------- * - final methods - * ---------------------------------------------------------------------------*/ -/* ------------------------------------------------------------------------- */ -NW_Int32 -NW_CSS_TokenToInt_GetColorVal(NW_CSS_TokenToInt_t* thisObj, - NW_Bool transparentAllowed, - NW_LMgr_PropertyValueToken_t token) -{ - NW_Uint32 numColorVals; - const NW_CSS_TokenToInt_Entry_t* colorVals; - NW_Uint32 index; - - NW_REQUIRED_PARAM(thisObj); - - /* If transparent is an allowed color, look for transparent token */ - if (transparentAllowed && (token == NW_CSS_PropValue_transparent)) { - return NW_GDI_Color_Transparent; - } - - numColorVals = sizeof(_NW_CSS_TokenToInt_ColorVals)/sizeof(NW_CSS_TokenToInt_Entry_t); - colorVals = _NW_CSS_TokenToInt_ColorVals; - - /* traverse our list of token entries looking for a match for our token */ - for (index = 0; index < numColorVals; index++) { - if (colorVals[index].token == token) { - return colorVals[index].val; - } - } - - /* if no token entry is found we must return -1 */ - return -1; -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -NW_CSS_TokenToInt_GetFontWeight(NW_CSS_TokenToInt_t* thisObj, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box) -{ - NW_LMgr_ContainerBox_t* parentBox; - NW_LMgr_Property_t prop; - - (void)thisObj; - switch (token) - { - case NW_CSS_PropValue_bold: - return 700; - - case NW_CSS_PropValue_normal: - return 400; - - case NW_CSS_PropValue_bolder: - case NW_CSS_PropValue_lighter: - - /* Get the parent */ - parentBox = NW_LMgr_Box_GetParent(box); - - /* Get the parent font weight */ - prop.type = NW_CSS_ValueType_Integer; - prop.value.integer = 400; - (void) NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(parentBox), - NW_CSS_Prop_fontWeight, &prop); - - if (prop.type != NW_CSS_ValueType_Integer){ - return 0; - } - if (token == NW_CSS_PropValue_bolder){ - if (prop.value.integer >= 900){ - return 900; - } - return (prop.value.integer + 100); - } - /* return lighter val */ - if (prop.value.integer <= 100){ - return 100; - } - return (prop.value.integer - 100); - - default: - return -1; - } -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_CSS_TokenToInt_GetFontSize(NW_CSS_TokenToInt_t* tokenToInt, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box, - NW_Float32* value) - { - NW_Int32 numVals; - const NW_CSS_TokenToDec_Entry_t* fontSizeList; - NW_Int32 index; - NW_LMgr_Property_t prop; - - // Look for the list of conversion values - fontSizeList = NW_CSS_TokenToInt_GetClassPart(tokenToInt).fontSizeList; - if (fontSizeList == NULL) - { - return NW_FALSE; - } - - // Look for the number of conversion values - numVals = NW_CSS_TokenToInt_GetClassPart(tokenToInt).numFontSizeVals; - if (numVals <= 0) - { - return NW_FALSE; - } - - // Try to match "xx-small", "x-small", "medium" etc. - for (index = 0; index < numVals; index++) - { - if (fontSizeList[index].token == token) - { - *value = fontSizeList[index].val; - return NW_TRUE; - } - } - - // deal with "larger" and "smaller" - if ((token == NW_CSS_PropValue_larger) || (token == NW_CSS_PropValue_smaller)) - { - NW_Uint32 currentFontSizePx; - NW_Float32 currentFontSizePt; - NW_Int32 twips; - NW_Float32 closestFit; - NW_Int32 closestFitIndex; - - // initialize the font size - prop.type = NW_CSS_ValueType_Pt; - prop.value.decimal = fontSizeList[3].val; /* Default to medium */ - - (void)NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_fontSize, &prop); - - // convert the font size in pixels to font size in points - currentFontSizePx = prop.value.integer; - - // first convert from pixels to twips - CEikonEnv* eikEnv = CEikonEnv::Static(); - CWsScreenDevice& screenDev = *eikEnv->ScreenDevice(); - - CFbsScreenDevice* fbsScrDev = CFbsScreenDevice::NewL(_L("Dummy"), screenDev.DisplayMode()); - - twips = fbsScrDev->VerticalPixelsToTwips(currentFontSizePx); - - // convert from twips to points - currentFontSizePt = (NW_Float32)FontUtils::PointsFromTwips(twips); - - closestFit = NW_Math_fabs(currentFontSizePt - fontSizeList[0].val); - closestFitIndex = 0; - - for (index = 1; index < numVals; index++) - { - if (NW_Math_fabs(currentFontSizePt - fontSizeList[index].val) < closestFit) - { - closestFit = NW_Math_fabs(currentFontSizePt - fontSizeList[index].val); - closestFitIndex = index; - } - } - - // adjust up or down by one font-size token - if (token == NW_CSS_PropValue_larger) - { - if (closestFitIndex < (numVals - 1)) - { - closestFitIndex++; - } - } - else if (token == NW_CSS_PropValue_smaller) - { - if (closestFitIndex > 0) - { - closestFitIndex--; - } - } - - *value = fontSizeList[closestFitIndex].val; - - if (fbsScrDev) - { - delete fbsScrDev; - } - - return NW_TRUE; - } - - // Otherwise return NW_FALSE: no match was found - return NW_FALSE; - } - -/* -------------------------------------------------------------------------*/ -NW_Int32 -NW_CSS_TokenToInt_GetBorderWidth(NW_CSS_TokenToInt_t* tokenToInt, - NW_LMgr_PropertyValueToken_t token, - NW_LMgr_Box_t* box) -{ - NW_Uint32 numVals; - const NW_CSS_TokenToInt_Entry_t* borderWidthList; - NW_Uint32 index; - - NW_REQUIRED_PARAM(box); - - /* Look for the list of conversion values */ - borderWidthList = NW_CSS_TokenToInt_GetClassPart(tokenToInt).borderWidthList; - if (borderWidthList == NULL){ - return 0; - } - numVals = NW_CSS_TokenToInt_GetClassPart(tokenToInt).numBorderWidthVals; - - /* Look for a match */ - for (index = 0; index < numVals; index++) - { - if (borderWidthList[index].token == token){ - return borderWidthList[index].val; - } - } - - /* No match was found */ - return -1; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/css/src/CSSVariableStyleSheet.cpp --- a/webengine/wmlengine/src/css/src/CSSVariableStyleSheet.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1074 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains all CSS styles -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include <f32file.h> -#include "nw_css_defaultstylesheet.h" -#include <nwx_assert.h> -#include "nwx_settings.h" -#include "nwx_ctx.h" -#include "nwx_logger.h" -#include "CSSReader.h" -#include "CSSPropVal.h" -#include "CSSDeclListHandle.h" -#include "CSSVariableStyleSheet.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" - -#include <bldvariant.hrh> -#include <data_caging_path_literals.hrh> - -// ================================= CONSTANTS ==================================== - -#define ASCII_LEFT_BRACE '{' -#define ASCII_RIGHT_BRACE '}' -#define ASCII_NULL '\0' - -static const NW_Ucs2 CSS_CURLY_BRACES[] = {ASCII_LEFT_BRACE, ASCII_RIGHT_BRACE, ASCII_NULL}; - -/* User Supplied Style Sheet - * The user can provide a style sheet that will override the operator - * provided one. - * The user provided sheet is stored in the emulator at: - * K:\epoc32\wins\c\System\data - * The operator provided sheet is stored in the emulator at: - * K:\epoc32\release\wins\udeb\z\system\data - * - * Note that since 3.0, these location will change as defined in - * data_caging_path_literals.hrh - */ -void CCSSVariableStyleSheet::ConstructCSSFileName() -{ - // Literals for files ( drive, directory, filename(s) ) - _LIT(KZDrive,"z:"); - _LIT(KCDrive,"c:"); - - // _LIT(KDC_APP_RESOURCE_DIR,"\\resource\\apps\\uiresourcefiles\\"); // Application resource (.rsc) - // _LIT(KDC_RESOURCE_FILES_DIR,"\\resource\\"); // Other resource files - - _LIT(KFileName,"oem.css"); - - CSS_USER_SUPPLIED_FILE.Zero(); - CSS_USER_SUPPLIED_FILE += KCDrive; - CSS_USER_SUPPLIED_FILE += KDC_RESOURCE_FILES_DIR; - CSS_USER_SUPPLIED_FILE += KFileName; - CSS_USER_SUPPLIED_FILE.ZeroTerminate(); - - CSS_OPERATOR_SUPPLIED_FILE.Zero(); - CSS_OPERATOR_SUPPLIED_FILE += KZDrive; - CSS_OPERATOR_SUPPLIED_FILE += KDC_RESOURCE_FILES_DIR; - CSS_OPERATOR_SUPPLIED_FILE += KFileName; - CSS_OPERATOR_SUPPLIED_FILE.ZeroTerminate(); -} - -#ifdef _DEBUG -static const NW_Ucs2 CSS_INVALID_TOKEN[] = {'*','E','R','R','O','R','*','\0'}; -static const NW_Ucs2 CSS_VARIABLE[] = {'v','a','r','\0'}; -static const NW_Ucs2 CSS_DEFAULT[] = {'d','e','f','\0'}; -static const NW_Ucs2 CSS_HEX_FORMAT[] = {'0','x','%','6','.','6','X','\0'}; -static const NW_Ucs2 CSS_FLOAT_FORMAT[] = {'%','1','0','f','\0'}; - -#define NW_XHTML_1_0_INDEX 1 -#endif /* _DEBUG */ - -// ============================ CONSTRUCTOR/DESTRUCTOR =============================== - -void CCSSVariableStyleSheet::operator=(const CCSSVariableStyleSheet& aObj){ -NW_REQUIRED_PARAM( &aObj ); -} - -// ----------------------------------------------------------------------------- -// Symbian two phase constructor. -// ----------------------------------------------------------------------------- - -void CCSSVariableStyleSheet::ConstructL() -{ - HBufC8* buffer = NULL; - - //Initially nothing is loaded. - iStaticCSSLoaded = EFalse; - iVariableCSSLoaded = EFalse; - - //Create the lists. Pick a course granularity, they will be compressed - //after completion. Minimize churning as we add components. - iPropList = new (ELeave) CCSSPropEntryList(10); - iStringList = new (ELeave) CCSSStringEntryList(5); - ConstructCSSFileName(); - - buffer = ReadVariableCSSFile(); - AddDefaultStyleStrings(); - AddVariableStyles(buffer); - AddDefaultStyleProperties(); - delete buffer; -#ifdef _DEBUG - DumpVariableStyleSheet(); -#endif /* _DEBUG */ -} - -CCSSVariableStyleSheet* CCSSVariableStyleSheet::NewL() - { - CCSSVariableStyleSheet* self = new( ELeave ) CCSSVariableStyleSheet(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - - -// ----------------------------------------------------------------------------- -// Destructor. -// Close and delete the lists. The destructors of each of the objects -// will be called implicitly as a result. -// ----------------------------------------------------------------------------- - -CCSSVariableStyleSheet::~CCSSVariableStyleSheet() -{ - TInt count; - TInt index; - - //Walk through the RArray. For each entry, if it references a dynamic - //entry (e.g. variable) delete the referenced object. Otherwise don't - //do anything with the entry itself. Then close and delete the array. - if (iPropList != NULL){ - count = iPropList->Count(); - for(index=0; index<count; index++){ - TCSSPropEntry& propEntry = iPropList->operator[](index); - if (propEntry.variableEntry == TRUE){ - delete propEntry.entry->pattern; - delete propEntry.entry; - } - } - iPropList->Close(); - delete iPropList; - } - - if (iStringList != NULL){ - count = iStringList->Count(); - for(index=0; index<count; index++){ - TCSSStringEntry& stringEntry = iStringList->operator[](index); - if (stringEntry.variableEntry == TRUE){ - delete stringEntry.entry; - } - } - iStringList->Close(); - delete iStringList; - } -} - - -// ============================ PUBLIC METHODS =============================== - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::CreateSingleton -// -// Creates the CCSSVariableStyleSheet singleton. -// ----------------------------------------------------------------------------- - -CCSSVariableStyleSheet* CCSSVariableStyleSheet::CreateSingleton() -{ - CCSSVariableStyleSheet* thisObj = CCSSVariableStyleSheet::GetSingleton(); - if (thisObj == NULL){ - TRAPD(ret, thisObj = CCSSVariableStyleSheet::NewL()); - if (ret != KErrNone) - return NULL; - TRAP(ret, NW_Ctx_Set(NW_CTX_VARIABLE_CSS, 0, (void*)thisObj)); - if (ret != KErrNone) - return NULL; - } - return thisObj; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::DeleteSingleton -// -// Deletes the CCSSVariableStyleSheet singleton. -// ----------------------------------------------------------------------------- - -void CCSSVariableStyleSheet::DeleteSingleton() -{ - CCSSVariableStyleSheet* thisObj = CCSSVariableStyleSheet::GetSingleton(); - if (thisObj != NULL){ - delete thisObj; - NW_Ctx_Set(NW_CTX_VARIABLE_CSS, 0, NULL); - } -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::GetSingleton -// -// Get the CCSSVariableStyleSheet singleton. If it doesn't already exist then returns null. -// ----------------------------------------------------------------------------- - -CCSSVariableStyleSheet* CCSSVariableStyleSheet::GetSingleton() -{ - CCSSVariableStyleSheet* thisObj = (CCSSVariableStyleSheet*) NW_Ctx_Get(NW_CTX_VARIABLE_CSS, 0); - return thisObj; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::ApplyStyles -// -// Applies the combined default and variable styles. -// ----------------------------------------------------------------------------- - -TBrowserStatusCode - CCSSVariableStyleSheet::ApplyStyles(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, - NW_WBXML_Dictionary_t* aDictionary, - const NW_Evt_Event_t* aEvent, - NW_HED_DocumentNode_t* aDocNode, - NW_HED_DomHelper_t* aDomHelper) -{ - const NW_CSS_DefaultStyleSheet_PropEntry_t* propertyVal; - TInt index, numPropertyVals; - NW_Uint16 tagToken; - const TCSSPropertyTablePropEntry* propEntry; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Property_t prop; - CCSSNodeData nodeData; - TCSSPropEntry startEntry; - - tagToken = NW_DOM_ElementNode_getTagToken(aElementNode); - numPropertyVals = iPropList->Count(); - - //The entries are in order based on a key comprised of the element token - //and the element name. The old algorithm searched through the array - //until it found the first element token that matched. This algorithm lets - //the binary search algorithm of the array do the work of finding the first - //element that matches, or at least where to start looking. The looking stops - //when a key is found that is greater than the token OR the end of the array - //is reached. - - //Create a dummy entry with a search key that starts with the first - //entry (if it exists) for this token and a default name of 0. If no - //entry exists we will start at the place it WOULD exist. The search - //will fail quickly in that case. - - startEntry.key = (tagToken << 16) | 0; - iPropList->FindInUnsignedKeyOrder(startEntry, index); - - for(; index < numPropertyVals; index++){ - NW_Byte *pattern; - propertyVal = iPropList->operator[](index).entry; - - if (propertyVal->elementToken < tagToken) - continue; - - if (propertyVal->elementToken > tagToken) - return KBrsrSuccess; - - /* match pattern - if pattern matches apply style */ - pattern = propertyVal->pattern; - if (pattern != NULL){ - NW_Uint32 numBytes; - CCSSPatternMatcher patternMatcher(aDictionary, aDocNode, aDomHelper); - TBool matched = EFalse; - - (void) NW_String_charBuffGetLength(pattern, HTTP_us_ascii, &numBytes); - TCSSParser parser(pattern, numBytes, HTTP_us_ascii); - - TRAPD(ret, matched = patternMatcher.MatchPatternLazyL(aElementNode, &parser, pattern, aEvent, &nodeData)); - if (ret == KErrNoMemory) - return KBrsrOutOfMemory; - - if (!matched) - continue; - } - - propEntry = TCSSPropertyTable::GetPropEntryByToken(propertyVal->name); - if (propEntry == NULL) - continue; - - status = InitProperty(propEntry, &prop, aBox, propertyVal->val, propertyVal->valType); - if (status == KBrsrOutOfMemory) - return status; - if (status != KBrsrSuccess) - continue; - - /* - Rules are arranged by decreasing specificity. If a property is - already present, it can be replaced only if the other property is - marked important. All defaults are NOT important. - */ - TInt ret; - TRAP(ret, TCSSDeclListHandle::ApplyPropertyL(propEntry->tokenName, &prop, 1, - EFalse, NULL, aBox, ETrue)); - - if ((prop.type == NW_CSS_ValueType_Text) ||(prop.type == NW_CSS_ValueType_Image)){ - NW_Object_Delete(prop.value.object); - } - } - return status; -} - - -// ============================ PRIVATE METHODS =============================== - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::ReadVariableCSSFile -// -// Loads the file into a buffer. -// ----------------------------------------------------------------------------- - -HBufC8* -CCSSVariableStyleSheet::ReadVariableCSSFile() -{ - HBufC8* buffer = NULL; - - if ((buffer = ReadFile(CSS_USER_SUPPLIED_FILE)) == NULL) - { - buffer = ReadFile(CSS_OPERATOR_SUPPLIED_FILE); - } - - return buffer; -} - - -//Returns a HBufC8 with the contents of aFile -HBufC8* -CCSSVariableStyleSheet::ReadFile(const TDesC& aFile) -{ - RFs fs; - RFile file; - TInt size = 0; - HBufC8* contents = NULL; - - if (fs.Connect() != KErrNone ) - return contents; - - if (file.Open(fs, aFile, EFileShareAny | EFileRead) != KErrNone ) - { - fs.Close(); - return contents; - } - - //The file exists, allocate enough space for the NULL termination later. - file.Size(size); - if ((size != 0) && ((contents = HBufC8::New(size + 4)) != NULL)) - { - //We have opened the file and it has a non-zero size and we have allocated memory - TPtr8 contentsPtr(contents->Des()); - if (file.Read(contentsPtr, size)!= KErrNone) - { - delete contents; - contents = NULL; - } - } - - file.Close(); - fs.Close(); - return contents; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::AddVariableStyles -// -// Adds the variable styles to the default list. -// ----------------------------------------------------------------------------- - -TBool CCSSVariableStyleSheet::AddVariableStyles(HBufC8* aBuffer) -{ - iVariableCSSLoaded = EFalse; - if (aBuffer != NULL) - { - iVariableCSSLoaded = ProcessBuffer(aBuffer->Ptr(), aBuffer->Length()); - } - else - { - iVariableCSSLoaded = EFalse; - } - return iVariableCSSLoaded; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::ProcessBuffer -// -// Adds the variable styles to the default list. -// ----------------------------------------------------------------------------- -TBool CCSSVariableStyleSheet::ProcessBuffer(const TUint8* aBuffer, TUint32 aLength) -{ - TInt index = 0; - TInt size = 0; - TUint32 charset = HTTP_us_ascii; - CCSSRuleList* ruleList = NULL; - CCSSRuleListElementEntry* entry = NULL; - - TCSSParser parser((TUint8*)aBuffer, aLength, charset) ; - - TRAPD(ret, ruleList = CCSSRuleList::NewL(NULL)); - if (ret != KErrNone) - return EFalse; - - ruleList->SetDictionary((NW_WBXML_Dictionary_t *) &NW_XHTML_WBXMLDictionary); - - ruleList->ProcessBuffer((TText8*)aBuffer, aLength, charset, ETrue); // delete buffer with ruleList - size = ruleList->GetSize(); - - for (index = 0; index < size; index++) - { - entry = ruleList->GetElementRulesByIndex(index); - if (entry != NULL) - { - UpdateList(&parser, entry->iRules, entry->iElementToken); - } - } - delete ruleList; - return ETrue; -} - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::AddDefaultStyleStrings -// -// Adds the default style string to the default list. -// ----------------------------------------------------------------------------- - -void CCSSVariableStyleSheet::AddDefaultStyleStrings() -{ - NW_Uint32 numVals; - NW_Ucs2** stringVals; - const NW_CSS_DefaultStyleSheet_t* defaultCSS; - NW_Uint32 index; - TCSSStringEntry stringEntry; - NW_Ucs2* stringVal; - - defaultCSS = &NW_CSS_DefaultStyleSheet; - numVals = NW_CSS_DefaultStyleSheet_GetClassPart(defaultCSS).numStringVals; - stringVals = (NW_Ucs2**)(NW_CSS_DefaultStyleSheet_GetClassPart(defaultCSS).stringVals); - - for(index = 0; index < numVals; index++) - { - // Decode all the data in this structure and add to the array. No - // duplicates are allowed. The variable stuff was already added so - // this is a lower priority. - stringEntry.variableEntry = EFalse; - stringVal = stringVals[index]; - stringEntry.entry = stringVal; - iStringList->Append(stringEntry); - } - - iStaticCSSLoaded = ETrue; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::AddDefaultStyleProps -// -// Adds the default style properties to the default list. -// ----------------------------------------------------------------------------- - -void CCSSVariableStyleSheet::AddDefaultStyleProperties() -{ - NW_Uint32 numVals; - NW_CSS_DefaultStyleSheet_PropEntry_s* propertyVals; - const NW_CSS_DefaultStyleSheet_t* defaultCSS; - NW_Uint32 index; - TCSSPropEntry propEntry; - - defaultCSS = &NW_CSS_DefaultStyleSheet; - numVals = NW_CSS_DefaultStyleSheet_GetClassPart(defaultCSS).numPropertyVals; - propertyVals = (NW_CSS_DefaultStyleSheet_PropEntry_s*)(NW_CSS_DefaultStyleSheet_GetClassPart(defaultCSS).propertyVals); - - for(index = 0; index < numVals; index++) - { - // Decode all the data in this structure and add to the array. No - // duplicates are allowed. The variable stuff was already added so - // this is a lower priority. - - propEntry.key = (propertyVals[index].elementToken <<16) | (propertyVals[index].name); - propEntry.variableEntry = EFalse; - propEntry.entry = &(propertyVals[index]); - - //Insert the property. If this was a duplicate we ignore it. Ignore return value - InsertProperty(propEntry); - } - iStaticCSSLoaded = ETrue; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::InsertProperty -// -// Applies the styles to the property. -// ----------------------------------------------------------------------------- -TInt CCSSVariableStyleSheet::InsertProperty(TCSSPropEntry aPropEntry) -{ - TCSSPropEntry compareEntry; - TInt searchIndex; - if (iPropList->FindInUnsignedKeyOrder(aPropEntry, searchIndex) == KErrNone){ - //A duplicate primary key was found. Check secondary key - //(e.g. pattern) to see if this is really a duplicate. Only insert - //if the pattern specified matches none of the existing ones. - - //Multiple entries with the same key exist. Walk back until we find - //the first one. The binary search that returned this index doesn't - //always return the first entry in the list of duplicate keys. - while (searchIndex >= 0){ - compareEntry = iPropList->operator[](searchIndex); - if (compareEntry.key != aPropEntry.key){ - searchIndex++; - break; - } - if (searchIndex == 0){ - break; - } - searchIndex--; - } - - //Search until primary keys no longer match. - while (searchIndex < iPropList->Count()){ - compareEntry = iPropList->operator[](searchIndex); - if (compareEntry.key != aPropEntry.key){ - //duplicate not found in primary key so no more duplicates. - //Add to list. - break; - } - - //We have matching primary keys. Check secondary. Watch out for nulls. - //This messy because NW_Asc_strcmp doesn't handle nulls. - if ((compareEntry.entry->pattern == NULL)&&(aPropEntry.entry->pattern == NULL) || - (compareEntry.entry->pattern != NULL)&&(aPropEntry.entry->pattern != NULL) ){ - //Either both or neither null - if ((compareEntry.entry->pattern == aPropEntry.entry->pattern) || - !NW_Asc_strcmp((char*)(compareEntry.entry->pattern), (char*)(aPropEntry.entry->pattern))){ - //Secondary match found. Either both pointers are null or the - //strings are the same. This is really a duplicate. - //Don't add to list. - searchIndex = -1; - break; - } - } - //If you got here than primary keys matched but pattern didn't match. - //Keep checking. - searchIndex++; - } - //If you got here then you hit the end of the list while primary - //keys matched but pattern didn't. Add it at the end which is - //where the index should be pointing. - } - - //Insert at the calculated index if a valid index. This is not a duplicate. - if (searchIndex != -1){ - iPropList->Insert(aPropEntry, searchIndex); - } - return searchIndex; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::InitProperty -// -// Applies the styles to the property. -// ----------------------------------------------------------------------------- - -TBrowserStatusCode -CCSSVariableStyleSheet::InitProperty(const TCSSPropertyTablePropEntry* aPropEntry, - NW_LMgr_Property_t* aProp, - NW_LMgr_Box_t* aBox, - NW_Float32 aVal, - NW_Uint8 aValType) -{ - aProp->type = aValType; - - switch(aValType) - { - case NW_CSS_ValueType_Integer: - case NW_CSS_ValueType_Px: - case NW_CSS_ValueType_Color: - aProp->value.integer = (NW_Int32)aVal; - break; - case NW_CSS_ValueType_Number: - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pt: - case NW_CSS_ValueType_Pc: - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_Ex: - case NW_CSS_ValueType_Percentage: - aProp->value.decimal = aVal; - break; - case NW_CSS_ValueType_Token: - { - TBool set = TCSSPropVal::SetTokenVal( aPropEntry->tokenName, aProp, (NW_Uint32) (NW_Int32) aVal, aBox); - return set? KBrsrSuccess:KBrsrFailure; - } - case NW_CSS_ValueType_Text: - { - const NW_Ucs2* ucs2Str; - NW_Text_Length_t length; - - if (aVal >= iStringList->Count()) - return KBrsrFailure; - - ucs2Str = iStringList->operator[]((NW_Int32)aVal).entry; - length = (NW_Text_Length_t)(NW_Str_Strlen(ucs2Str)); - - aProp->value.object = NW_Text_UCS2_New ((NW_Ucs2*) ucs2Str, length, 0); - if (aProp->value.object == NULL) - return KBrsrOutOfMemory; - - break; - } - default: - return KBrsrFailure; - } - - return KBrsrSuccess; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::UpdateList -// -// -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CCSSVariableStyleSheet::UpdateList(TCSSParser* aParser, - CCSSRules* aRuleList, - TUint16 aElementToken) -{ - TInt index; - TInt size; - TBrowserStatusCode status; - - size = aRuleList->Count(); - for (index = 0; index < size; index++) - { - CCSSSelector* entry; - TUint32 specificity; - TText16* patternStr; - char* asciiPatternStr; - TText8* selectorEndPosition; - TCSSSimpleSelector simpleSelector; - TCSSReaderUnit unit; - TText8* declarationList; - - entry = aRuleList->At(index); - aParser->SetPosition(entry->iSelector); - specificity = 0; - patternStr = NULL; - asciiPatternStr = NULL; - simpleSelector.specificity = 0; - - do{ - specificity += simpleSelector.specificity; - status = aParser->SimpleSelectorListIterate(&simpleSelector); - }while (status == KBrsrIterateMore); - - if (status != KBrsrIterateDone) - continue; - - selectorEndPosition = aParser->GetPosition(); - if (specificity > 1) - { - unit.Init(entry->iSelector, selectorEndPosition - entry->iSelector, 0); - patternStr = unit.GetUnicode(aParser->GetEncoding()); - - if (patternStr != NULL) - { - //Add the curly braces back into the pattern. These are - //required for parsing later on. Revove whitespace before adding curly - //braces. If you decide to remove leading whitespace then save the - //pointer so you can delete it later. - NW_Str_TrimInPlace(patternStr, NW_Str_End); - TText16* tempStr = NW_Str_Newcat(patternStr, CSS_CURLY_BRACES); - if (tempStr != NULL) - { - asciiPatternStr = NW_Str_CvtToAscii(tempStr); - delete tempStr; - } - delete patternStr; - } - } - - (aParser->GetReader())->GoToToken(LEFT_BRACE, &declarationList); - NW_ASSERT(declarationList); - UpdateEntry(aParser, aElementToken, asciiPatternStr); - } - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::UpdateEntry -// -// -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CCSSVariableStyleSheet::UpdateEntry(TCSSParser* aParser, - TUint16 aElementToken, - char* aAsciiPatternStr) -{ - TBool important; - TCSSReaderUnit propertyName; - TCSSPropertyVal propertyVal; - TUint8 numVals; - TCSSPropEntry entryWrapper; - TCSSStringEntry stringWrapper; - NW_CSS_DefaultStyleSheet_PropEntry_s* entry; - const TCSSPropertyTablePropEntry* propEntry; - NW_LMgr_PropertyValue_t val; - NW_LMgr_PropertyValueType_t valType; - TText16* ucs2Str = NULL; - TText16* valStorage = NULL; - TUint32 encoding; - - while (aParser->DeclarationListIterate(&propertyName, &propertyVal, &numVals, 1, &important) - == KBrsrIterateMore) - { - if (propertyName.iLength == 0) - continue; - - encoding = aParser->GetEncoding(); - ucs2Str = propertyName.GetUnicode(encoding); - if ((ucs2Str == NULL) || (propertyVal.type == -1)) - continue; - - propEntry = TCSSPropertyTable::GetPropertyEntry(ucs2Str); - delete(ucs2Str); - if (propEntry == NULL) - continue; - - valStorage = propertyVal.val.GetUnicode(encoding); - if (valStorage == NULL) - continue; - - valType = SetPropertyVal(aParser, propEntry, &val, &propertyVal, valStorage); - if (valType == 0) - continue; - - /* create a new entry to and initialize it */ - entry = new NW_CSS_DefaultStyleSheet_PropEntry_s; - entryWrapper.variableEntry = ETrue; - entryWrapper.entry = entry; - entryWrapper.key = (aElementToken <<16) | propEntry->tokenName; - - entry->elementToken = aElementToken; - entry->pattern = (unsigned char *)aAsciiPatternStr; - entry->name = propEntry->tokenName; - entry->valType = valType; - switch (valType) - { - case NW_CSS_ValueType_Percentage: - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pt: - case NW_CSS_ValueType_Pc: - entry->val = (NW_Float32)val.decimal; - break; - case NW_CSS_ValueType_Token: - entry->val = (NW_Float32)val.token; - break; - case NW_CSS_ValueType_Px: - case NW_CSS_ValueType_Integer: - case NW_CSS_ValueType_Ex: - case NW_CSS_ValueType_Color: - entry->val = (NW_Float32)val.integer; - break; - case NW_CSS_ValueType_Text: - { - stringWrapper.variableEntry = ETrue; - stringWrapper.entry = valStorage; - valStorage = NULL; - iStringList->Append(stringWrapper); - //Index of this entry is count - 1 - entry->val = (NW_Float32)(iStringList->Count() - 1); - break; - } - default: - entry->val = (NW_Float32)val.integer; - break; - } - delete valStorage; - - if (InsertProperty(entryWrapper) == -1) - { - //This was a duplicate. It wasn't added to list. Free memory. - delete entry->pattern; - delete entry; - } - } - - - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::SetPropertyVal -// - -NW_LMgr_PropertyValueType_t -CCSSVariableStyleSheet::SetPropertyVal(TCSSParser* aParser, - const TCSSPropertyTablePropEntry* aPropEntry, - NW_LMgr_PropertyValue_t* aVal, - TCSSPropertyVal* aPropertyVal, - TText16* aValStorage) -{ - NW_LMgr_PropertyValueToken_t token; - TBool result = EFalse; - NW_Float32 v; - TText16* endPtr = NULL; - - - if ((aPropertyVal->type == RGB) || (aPropertyVal->type == HASH)){ - //COLOR - NW_LMgr_Property_t tmpVal; - tmpVal.value.integer = 0; //remove warning - tmpVal.type = 0; - - TRAPD( err, result = TCSSPropVal::SetColorL( aParser, &tmpVal, aPropertyVal, aValStorage)); - if ((err != KErrNone) || !result) - return 0; - - aVal->integer = tmpVal.value.integer; - return NW_CSS_ValueType_Color; - } - - if (aPropertyVal->type == IDENTIFIER){ - //TOKEN - if(aPropEntry->tokenName != NW_CSS_Prop_fontFamily) { - if (TCSSPropertyTable::GetPropertyValToken(aValStorage, &token)){ - aVal->token = token; - return NW_CSS_ValueType_Token; - } - } - } - - if ((aPropertyVal->type == IDENTIFIER) || (aPropertyVal->type == STRING)){ - //TEXT - /* If the identifier is not recognized as a token OR it is a real - string interpret is as a string */ - return NW_CSS_ValueType_Text; - } - - //NUMBER - If not one of the above it must be a number. - - if ( NW_Str_CvtToFloat32(aValStorage, &endPtr, &v) != KBrsrSuccess) - return 0; - - switch (aPropertyVal->type) - { - case NUMBER: - /* This code is the point that default units of measure are - applied. This is a convenience. According to the spec. only the - value zero can omit the units. However, defaults are usually - inserted. */ - switch (aPropEntry->tokenName) - { - // PIXEL Defaults - case NW_CSS_Prop_borderWidth: - case NW_CSS_Prop_topBorderWidth: - case NW_CSS_Prop_bottomBorderWidth: - case NW_CSS_Prop_leftBorderWidth: - case NW_CSS_Prop_rightBorderWidth: - - case NW_CSS_Prop_padding: - case NW_CSS_Prop_topPadding: - case NW_CSS_Prop_bottomPadding: - case NW_CSS_Prop_leftPadding: - case NW_CSS_Prop_rightPadding: - - case NW_CSS_Prop_margin: - case NW_CSS_Prop_topMargin: - case NW_CSS_Prop_bottomMargin: - case NW_CSS_Prop_leftMargin: - case NW_CSS_Prop_rightMargin: - aVal->integer = (TInt32)v; - return NW_CSS_ValueType_Px; - - //INTEGER defaults - case NW_CSS_Prop_font: - case NW_CSS_Prop_fontSize: - case NW_CSS_Prop_fontWeight: - case NW_CSS_Prop_marqueeSpeed: - case NW_CSS_Prop_marqueeLoop: - default: - aVal->integer = (TInt32)v; - return NW_CSS_ValueType_Integer; - } - - case PERCENTAGE: - aVal->decimal = v; - return NW_CSS_ValueType_Percentage; - - case EMS: - aVal->decimal = v; - return NW_CSS_ValueType_Em; - - case EXS: - aVal->decimal = v; - return NW_CSS_ValueType_Ex; - - case PXS: - aVal->integer =(TInt32)v; - return NW_CSS_ValueType_Px; - - case INS: - aVal->decimal = v; - return NW_CSS_ValueType_In; - - case CMS: - aVal->decimal = v; - return NW_CSS_ValueType_Cm; - - case MMS: - aVal->decimal = v; - return NW_CSS_ValueType_Mm; - - case PCS: - aVal->decimal = v; - return NW_CSS_ValueType_Pc; - - case PTS: - aVal->decimal = v; - return NW_CSS_ValueType_Pt; - - //default: - //return 0; - } - return 0; -} - - -// ----------------------------------------------------------------------------- -// CCSSVariableStyleSheet::DumpVariableStyleSheet -// -// ----------------------------------------------------------------------------- -#ifdef _DEBUG - -TBrowserStatusCode -CCSSVariableStyleSheet::DumpVariableStyleSheet() -{ - TInt count; - TInt index; - - NW_LOG0(NW_LOG_LEVEL3, "*** Printing Variable Style Sheet ****"); - //Walk through the RArray. For each entry, if it references a dynamic - //entry (e.g. variable) delete the referenced object. Otherwise don't - //do anything with the entry itself. Then close and delete the array. - - if (iPropList != NULL){ - NW_Ucs2 tmpString[40]; - NW_Ucs2* valString; - NW_Ucs2* elementString; - NW_Ucs2* patternString; - NW_Int32 tmpInt; - - count = iPropList->Count(); - NW_LOG1(NW_LOG_LEVEL3, "CSS Property List - %d entries", count); - for(index=0; index<count; index++){ - TCSSPropEntry& propEntry = iPropList->operator[](index); - - const TCSSPropertyTablePropEntry* propTableEntry = - TCSSPropertyTable::GetPropEntryByToken(propEntry.entry->name); - - switch(propEntry.entry->valType){ - case NW_CSS_ValueType_Color: - tmpInt = (NW_Int32)(propEntry.entry->val); - NW_Str_Sprintf(tmpString, CSS_HEX_FORMAT, tmpInt); - valString = tmpString; - break; - case NW_CSS_ValueType_Token: - { - tmpInt = (NW_Int32)(propEntry.entry->val); - const TCSSPropertyTablePropValEntry* valTableEntry = - TCSSPropertyTable::GetPropValEntryByToken ((NW_LMgr_PropertyValueToken_t)tmpInt); - valString = valTableEntry == NULL ? (NW_Ucs2*)CSS_INVALID_TOKEN : (NW_Ucs2*)valTableEntry->strVal; - } - break; - case NW_CSS_ValueType_Text: - if (propEntry.entry->val < iStringList->Count()){ - tmpInt = (NW_Int32)(propEntry.entry->val); - TCSSStringEntry& stringEntry = iStringList->operator[](tmpInt); - valString = stringEntry.entry; - }else{ - valString = (NW_Ucs2*)CSS_INVALID_TOKEN; - } - break; - - case NW_CSS_ValueType_Number: - case NW_CSS_ValueType_Percentage: - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_Ex: - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pc: - case NW_CSS_ValueType_Pt: - NW_Str_Sprintf(tmpString, CSS_FLOAT_FORMAT, propEntry.entry->val); - valString = tmpString; - break; - case NW_CSS_ValueType_Integer: - case NW_CSS_ValueType_Px: - default: - tmpInt = (NW_Int32)(propEntry.entry->val); - NW_Str_Itoa(tmpInt, tmpString); - valString = tmpString; - } - - // Pattern string contains the element name. It it exists show it. Otherwise show element name - elementString = (NW_Ucs2*)NW_WBXML_Dictionary_getTagByFqToken((NW_XHTML_1_0_INDEX << 16) | propEntry.entry->elementToken); - if (elementString == NULL) { - elementString = (NW_Ucs2*)CSS_INVALID_TOKEN; - } - - if (propEntry.entry->pattern == NULL){ - patternString = NULL; - }else { - patternString = NW_Str_CvtFromAscii((const char*)(propEntry.entry->pattern)); - NW_Str_Strcharreplace(patternString, ASCII_LEFT_BRACE, ASCII_NULL); - } - - NW_LOG7(NW_LOG_LEVEL3, - "%3d %s key: 0x%06X %s{ %s: %s%s }", - //Wrapper - index, - propEntry.variableEntry == TRUE ? (NW_Ucs2*)CSS_VARIABLE:(NW_Ucs2*)CSS_DEFAULT, - propEntry.key, - //Entry - patternString == NULL ? elementString : patternString, - propTableEntry->strName, - valString, - TCSSPropertyTable::GetPropValType(propEntry.entry->valType)); - - delete patternString; - } - } - - if (iStringList != NULL){ - count = iStringList->Count(); - NW_LOG1(NW_LOG_LEVEL3, "CSS String List - %d entries", count); - for(index=0; index<count; index++){ - TCSSStringEntry& stringEntry = iStringList->operator[](index); - NW_LOG3(NW_LOG_LEVEL3, "%2d %s %s", - index, - stringEntry.variableEntry == TRUE ? (NW_Ucs2*)CSS_VARIABLE : (NW_Ucs2*)CSS_DEFAULT, - stringEntry.entry); - } - } - return KErrNone; -} -#endif /* _DEBUG */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/NW_FBox_EXPORT.h --- a/webengine/wmlengine/src/fbox/include/NW_FBox_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_FBox_EXPORT_h_ -#define _NW_FBox_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_FBOX_EXPORT -#ifdef NW_IMPORT -#define NW_FBOX_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_FBOX_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_FBOX_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_FBox_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/NW_FBox_Validator.h --- a/webengine/wmlengine/src/fbox/include/NW_FBox_Validator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBox_Validator_h -#define NW_FBox_Validator_h - -#include "nw_object_dynamic.h" -#include "nw_lmgr_box.h" -#include "NW_Text_Abstract.h" -#include "NW_FBox_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ -typedef enum NW_FBox_Validator_EmptyOk_e { - NW_FBox_Validator_EmptyOk_None, - NW_FBox_Validator_EmptyOk_True, - NW_FBox_Validator_EmptyOk_False -} NW_FBox_Validator_EmptyOk_t; - -typedef enum NW_FBox_Validator_Mode_e { - NW_FBox_Validator_Mode_None, - NW_FBox_Validator_Mode_Hiragana, - NW_FBox_Validator_Mode_Katakana, - NW_FBox_Validator_Mode_Hankakukana, - NW_FBox_Validator_Mode_Alphabet, - NW_FBox_Validator_Mode_Numeric -} NW_FBox_Validator_Mode_t; - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Validator_Class_s NW_FBox_Validator_Class_t; -typedef struct NW_FBox_Validator_s NW_FBox_Validator_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_FBox_Validator_Validate_t) (NW_FBox_Validator_t* validator, - const NW_Text_t* string); - -typedef -TBrowserStatusCode -(*NW_FBox_Validator_GetFormat_t) (NW_FBox_Validator_t* validator, - const NW_Ucs2** format, - NW_FBox_Validator_Mode_t* mode, - NW_FBox_Validator_EmptyOk_t* emptyOk); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Validator_ClassPart_s { - NW_FBox_Validator_Validate_t validate; - NW_FBox_Validator_GetFormat_t getFormat; -} NW_FBox_Validator_ClassPart_t; - -struct NW_FBox_Validator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Validator_ClassPart_t NW_FBox_Validator; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_Validator_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Validator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Validator)) - -#define NW_FBox_ValidatorOf(object) \ - (NW_Object_Cast (object, NW_FBox_Validator)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Validator_Class_t NW_FBox_Validator_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_FBox_Validator_Validate(_validator, _string) \ - (NW_Object_Invoke (_validator, NW_FBox_Validator, validate) \ - ((_validator), (_string))) - -#define NW_FBox_Validator_GetFormat(_validator, _format, _mode, _emptyok) \ - (NW_Object_Invoke (_validator, NW_FBox_Validator, getFormat) \ - ((_validator), (_format), (_mode), (_emptyok))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_FBox_FBoxValidator_h */ - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/NW_FBox_ValidatorI.h --- a/webengine/wmlengine/src/fbox/include/NW_FBox_ValidatorI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBox_ValidatorI_h -#define NW_FBox_ValidatorI_h - -#include "nw_object_dynamici.h" -#include "NW_FBox_Validator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBox_ValidatorI_h */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/WmlInputElement.h --- a/webengine/wmlengine/src/fbox/include/WmlInputElement.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,319 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef CWMLINPUTELEMENT_H -#define CWMLINPUTELEMENT_H - -// INCLUDES - -//#include "WmlRenderingElement.h" -#include "WmlReSizableEditor.h" -#include "WmlFormattedEditor.h" -#include <E32DEF.H> -#include <coemain.h> -#include <eikedwob.h> - -#include <coeinput.h> -#include <frmtview.h> -#include <fepbase.h> -#include <eikrted.h> - -// MACROS - -//#define OOM_TEST_IN_CONSTRUCTL -//#define OOM_TEST_IN_HANDLEEDWINEVENTL -//#define OOM_TEST_IN_OFFERKEYEVENTL -//#define OOM_TEST_IN_HANDLECOMMANDL -//#define OOM_TEST_IN_REFRESHL -//#define OOM_TEST_IN_INITVALUESL - -// CONSTANTS - -const TInt KWmlInputMinimalWidth = 50; // minimal width of input's editor - -// FORWARD DECLARATIONS - -class CEikRichTextEditor; -class CMyFepContainer; -class CGraphicsContext; -class MGraphicsDeviceMap; -class CWmlFormatHandler; -class CIdle; -class CParaFormatLayer; -class CCharFormatLayer; -class CRenderingNode; - -//typedef CWmlFormattedEditor<CWmlReSizableEditor<CEikRichTextEditor> > -//CWmlFormattedResizeableEditor; - -typedef CWmlFormattedEditor CWmlFormattedResizeableEditor; - - -// CLASS DECLARATION - -/** -* CWmlInputElement implements the functionality -* of the WML input element. -*/ -class CWmlInputElement : public MEikEdwinObserver, CBase -{ -protected: // Constructors and destructor - - /* - * C++ default constructor. - * @param aNode The parent node. - */ - CWmlInputElement(); - - /* - * Second-phase constructor. Leaves on failure. - * @param aParent Parent control. - * @param aPopup this control is used as popup or not - */ - void ConstructL(CCoeControl*); - -public: // Constructors and destructor - /* - * Two-phased constructor. - * It leaves a pointer on the cleanup stack. - * @param aNode The parent node. - */ - static CWmlInputElement* NewLC(CCoeControl*); - - /* - * Two-phased constructor. - * @param aNode The parent node. - */ - static CWmlInputElement* NewL(CCoeControl*); - - /* - * Destructor. - */ - virtual ~CWmlInputElement(); - -private: // New functions - - enum TWmlCursorHandling - { - EWmlMoveCursor, - EWmlScrollDisplay - }; - - /** - * Makes the cursor visible by moving it to the last visible position, - * or by scrolling the display depending on the aMode parameter. - * @param aMode Mode. - */ - void ShowCursorL( TWmlCursorHandling aMode = EWmlMoveCursor ); - - /** - * Handles key events in non-editing state. - * @param aKeyEvent Key event. - * @param aType Type. - * @return Response. - */ - TKeyResponse NavigateL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * Handles key events in editing state - * @param aKeyEvent Key event. - * @param aType Type. - * @return Response. - */ - TKeyResponse EditL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * This callback stores editor content in browser core. - * @param aElement Input element. - * @return EFalse - */ - static TInt StoreTextL( TAny* aElement ); - - /** - * This callback simulates and invalidates cached key event if any. - * @param aElement Input element. - * @return EFalse - */ - static TInt SimulateKeyEventL( TAny* aElement ); - -public: // From MEikEdwinObserver - - /** - * Handles edwin events. - * @param aEdwin Source of event. - * @param aEventType Type of event. - */ - void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); - -public: // from MFocusable - - /** - * Handles key events. - * @param aKeyEvent Key event. - * @param aType Type. - * @return Response. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * Handles menu events. - * @param aCommand Menu event. - */ - void HandleCommandL( TInt aCommand ); - - /** - * At least one line must be visible. - * @param aScrollDirection Scrolling direction. - * @return Minimum height. - */ - TInt HeightToBeVisible - ( TCursorPosition::TMovementType aScrollDirection ) const; - - TInt CommandSetResourceIdL(); - - /** - * Cancels active element (input element currently) - */ - void DeactivateElement(); - -public: // from CWmlRenderingElement - - /** - * Handles font size settings change. - * @return -. - */ - void NotifyVisualChangesL(); - - /** - * Querries all of the data from the core. - */ - void RefreshL(); - - /** - * Initalize members with default values. - */ - void InitValuesL(CCoeControl*); - - /** - * Draws the inputbox to the given gc - * @param aGc Graphic context. - * @param aTopLeft The topleft point of the drawing rectangle. - * @param aClipRect The clipping rectangle. - * @param aMap The device map (not used). - */ - void DrawInnerRectL( CGraphicsContext& aGc, - const TPoint& aTopLeft, - const TRect& aClipRect, - MGraphicsDeviceMap* aMap ) const; - /** - * Border is needed? - * @return The answer. - */ - virtual TBool BorderIsNeeded() const; - - /** - * Put on, or take off the focus. - * @param aItemFocused The direction of the operation. True means putting on. - * @return True means that the operation was successful. - */ - virtual TBool SetFocusBeforeDrawBorderL( - TBool aItemFocused, TCursorPosition::TMovementType aScrollDirection ); - - - CCoeControl* ComponentControl( TInt aIndex ); - - -// ---------------------------------------------GSZ from RenderingElement - /* - *Draws the specified parts of the rendering element - *it calls the leaving version ( DrawL() ) - *@param aGc the graphics context to draw to - *@param aTopLeft the topleft coordinate of the element on the passed GC - *@param aClipRect is the rectangle to draw - *@param aMap is the device map between the phisical and logical representation of the element - */ - void Draw( CGraphicsContext& aGc, - const TPoint& aTopLeft, - const TRect& aClipRect, - MGraphicsDeviceMap* aMap ) const; - - /** - * Leaving version of Draw. - * @see Draw - */ - void DrawL( CGraphicsContext& aGc, - const TPoint& aTopLeft, - const TRect& aClipRect, - MGraphicsDeviceMap* aMap ) const; -// ---------------------------------------------GSZ from RenderingElement - -private: - - /** - * By default EPOC constructor is private. - */ - void ConstructL(); - - /** - * Shows general note. Shows plural text if aDynamic > 1, singular otherwise. - */ - void NoteTooFewCharacterL( TInt aDynamic = 0 ); - - /** - * Opens or closes editor. - * @param aOn True means enabling. - */ - void AllowEditingL( TBool aOn = ETrue ); - - /** - * Updates character counter on navipane. - * @param aVisible EFalse hides counter. - */ - void UpdateTextCounterL( TBool aVisible = ETrue ); - - /** - * Resizes editor, sets cursor, and relayouts card if necessary. - */ - void HandleTextChangeL(); - -private: // Data - - CWmlFormattedResizeableEditor* iEditor; - TBool iOpened; - TInt iPrevCurPos; - TInt iMaxLength; - TBool iEmptyOk; - CWmlFormatHandler* iHandler; - CIdle* iAsyncCallBack; - TBool iConfirmed; - TKeyEvent iCachedKeyEvent; - TBool iCacheIsValid; - CParaFormatLayer* iGlobalParaLayer; - CCharFormatLayer* iGlobalCharLayer; - -// ---- GSZ from RenderingElement - TSize iSizeInTwipsWithoutBorder; - TGulBorder iBorder; - -// ---- GSZ as iNode->ApiProvider().Parent() - CCoeControl* iParent; - -}; -#endif - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_CEpoc32InputBox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_CEpoc32InputBox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,394 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef CEPOC32INPUTBOX_H -#define CEPOC32INPUTBOX_H - -// INCLUDES -#include <e32def.h> -#include <coemain.h> -#include <eikedwob.h> -#include <coeinput.h> -#include <frmtview.h> -#include <fepbase.h> -#include <eikrted.h> -#include <eikseced.h> -#include "NW_FBox_Validator.h" - -#include <fepbase.h> -#include <aknedsts.h> -#include <fepipext.h> - -// CONSTANTS -const TInt KBufLength = 512; -#define KFepUid 0x100056de -#define KLineEnterChar 0x21b2 - -// FORWARD DECLARATIONS - -class CEikSecretEditor; -//class CEikRichTextEditor; -class CMyFepContainer; -class CWmlFormatHandler; -class CWmlFormattedEditor; -class CIdle; -class CParaFormatLayer; -class CCharFormatLayer; -class CSharedDataI; -class CSharedDataInteger; - - -// CLASS DECLARATION - -/** -* CEpoc32InputBox implements the functionality -* of the WML input element. -*/ -class CEpoc32InputBox : public CEikBorderedControl, public MEikEdwinObserver, public MCoeFepObserver, -public MCoeFocusObserver, -public MCoeFepAwareTextEditor, public MCoeCaptionRetrieverForFep, -public TCoeInputCapabilities::MCoeFepSpecificExtensions, -private MCoeFepAwareTextEditor_Extension1 - { - protected: // Constructors and destructor - /* - * C++ default constructor. - * @param aNode The parent node. - */ - CEpoc32InputBox( CCoeControl* aParent, - void* aOocInputSkin, - const TInt aInitialWrapWidth, - const TInt aMaxLength, - const CFont& aFont, - const TInt aLayoutMode); - - /* - * Second-phase constructor. Leaves on failure. - * @param aParent Parent control. - * @param aPopup this control is used as popup or not - */ - void ConstructL( const TRect& aInitialRectangle, - const TMargins8& aMargins, - const TDesC& aInitialText, - const TDesC& aFormat, - const NW_FBox_Validator_Mode_t aMode, - const TBool aIsSecret, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId, - const TInt aMaxLength ); - - public: // Constructors and destructor - - /* - * Two-phased constructor. - * @param aNode The parent node. - */ - static CEpoc32InputBox* NewL( CCoeControl* aParent, - void* aOocInputSkin, - const TRect& aInitialRectangle, - const TMargins8& aMargins, - const TInt aInitialWrapWidth, - const TDesC& aInitialText, - const TDesC& aFormat, - const NW_FBox_Validator_Mode_t aMode, - const TBool aIsSecret, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId, - const TInt aMaxLength, - const CFont& aFont, - const TInt aLayoutMode); - - /* - * Destructor. - */ - virtual ~CEpoc32InputBox(); - - public: - /** - * Refreshes the display content - */ - static TInt RefreshContents(TAny* aParam); - - - /** - * Creates and initializes RichText object for the FormattedEditor - */ - void SetInitialTextL( const TDesC& aInitialText ); - - - /** - * Return last known cursor position - */ - TUint32 TextLength(); - - /** - * Return ETRUE if format has static character - special handling - * required for "cancel" processing - see Epoc32Inputskin.cpp. - */ - TBool IsStaticCharInvolved(); - - /** - * Return last cursor position - */ - TUint32 CurPos() const; - - /** - * Returns current input or NULL in OOM situation - */ - HBufC* ReadableText(); - - /** - * Returns current input or NULL in OOM situation, may leave on OOM - */ - HBufC* ReadableTextL(); - - /** - * Verifies whether current input is conformant to the format - * If there are less characters in the input than minimum amout - * allowed - displays a note to the user - */ - TBool OkToExit(); // error is trapped - TBool OkToExitL(); // will leave on error - - /** - * Sets new rectangle a a wrap width - * @param aRect Size of the rectanle for input box - * @param aWrapWidth WrapWidth - */ - void SetRectAndWrap(const TRect& aRect, TInt aWrapWidth); - - /** - * Returns input capabilities. - * @return TCoeInputCapabilities - */ - TCoeInputCapabilities InputCapabilities() const; - - private: // New functions - - enum TWmlCursorHandling - { - EWmlMoveCursor, - EWmlScrollDisplay, - EWmlNoCursor - }; - - /** - * Makes the cursor visible by moving it to the last visible position, - * or by scrolling the display depending on the aMode parameter. - * @param aMode Mode. - */ - void ShowCursorL( TWmlCursorHandling aMode = EWmlMoveCursor ); - - /** - * Makes the cursor visible depending upon the setting of iEditor->IsSecret, - * that is, if the input box for a password field, then there is no cursor - * pursuant to the Editing specification - */ - void DisplayCursorL(); - - /** - * notify fep when cursor changes - */ - void HandleUpdateCursor(); - - - public: // From MEikEdwinObserver - - /** - * Handles edwin events. - * @param aEdwin Source of event. - * @param aEventType Type of event. - */ - void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); - - - public: // from CCoeControl - virtual void HandleCompletionOfTransactionL(); - virtual void HandleStartOfTransactionL() ; - virtual void HandlePointerEventL(const TPointerEvent &aPointerEvent); - - /** - * Handles key events. - * @param aKeyEvent Key event. - * @param aType Type. - * @return Response. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ); - - TInt CountComponentControls() const; - - CCoeControl* ComponentControl( TInt aIndex ) const; - - public: // from MCoeFepObserver - virtual void HandleChangeInFocus(); - virtual void HandleDestructionOfFocusedItem(); - virtual void FocusChanged(TDrawNow aDrawNow); - - - protected: // from CCoeControl - - void SizeChanged(); - - private: - - virtual void MCoeFepObserver_Reserved_1(); - virtual void MCoeFepObserver_Reserved_2(); - /** - * By default EPOC constructor is private. - */ - void ConstructL(); - - /** - * Helper function for ConstructL. - * Analyzes the format and initalizes format handler, if necessary. - */ - void InitFormatHandlerL( const TDesC& aFormat, - const TBool aIsSecret, - TBool& aT9Allowed, - TInt& aMaxLength, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId ); - - /** - * Shows general note. Shows plural text if aDynamic > 1, - * singular otherwise. - */ - void NoteTooFewCharacterL( TInt aDynamic = 0 ); - - /** - * Opens or closes editor. - * @param aOn True means enabling. - */ - void AllowEditingL( TBool aOn = ETrue ); - - /** - * Updates character counter on navipane. - * @param aVisible EFalse hides counter. - */ - void UpdateTextCounterL( TBool aVisible = ETrue ); - - /** - * Resizes editor, sets cursor, and relayouts card if necessary. - */ - void HandleTextChangeL(); - - /** - * Retrieves text entered for password from CEikSecretEditor. - */ - void GetSecretText(TDes& aText); - - /** - * Retrieves text entered for password from CEikSecretEditor in - * HBufC format. - */ - HBufC* ReadableSecretTextL(); - - TBool IsExitRequest(TUint aKeyCode); - - /** - * Callback that is called when predictive setting is changed - * in general settings. - * @param aObj Points to the container object - */ - static TInt PredictiveTextOnOffGSNotifiaction( TAny* aObj ); - -public: - // from MCoeFepAwareTextEditor - virtual void StartFepInlineEditL(const TDesC& aInitialInlineText, TInt aPositionOfInsertionPointInInlineText, TBool aCursorVisibility, const MFormCustomDraw* aCustomDraw, MFepInlineTextFormatRetriever& aInlineTextFormatRetriever, MFepPointerEventHandlerDuringInlineEdit& aPointerEventHandlerDuringInlineEdit); - virtual void UpdateFepInlineTextL(const TDesC& aNewInlineText, TInt aPositionOfInsertionPointInInlineText); - virtual void SetInlineEditingCursorVisibilityL(TBool aCursorVisibility); - virtual void CancelFepInlineEdit(); - virtual TInt DocumentLengthForFep() const; - virtual TInt DocumentMaximumLengthForFep() const; - virtual void SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection); - virtual void GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const; - virtual void GetEditorContentForFep(TDes& aEditorContent, TInt aDocumentPosition, TInt aLengthToRetrieve) const; // must cope with aDocumentPosition being outside the range 0 to DocumentLengthForFep() - virtual void GetFormatForFep(TCharFormat& aFormat, TInt aDocumentPosition) const; - virtual void GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, TInt& aAscent, TInt aDocumentPosition) const; - virtual void DoCommitFepInlineEditL(); - virtual MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); - virtual void MCoeFepAwareTextEditor_Reserved_2(); - -public: - virtual void GetCaptionForFep(TDes& aCaption) const; - -public: - // from MCoeFepAwareTextEditor_Extension1 - void SetStateTransferingOwnershipL(CState* aState, TUid aTypeSafetyUid); - CState* State(TUid aTypeSafetyUid); // this function does *not* transfer ownership - - public: - //activate the virtual keyboard - void ActivateVKB(); - - private: - - // for virtual keyboard - void UpdateInlineTextL(const TDesC& aText); - void ClearInlineText(); - - private: - - virtual TBool IsValidCharacter(TInt aChar); - virtual void MCoeFepSpecificExtensions_Reserved_1(){}; - virtual void MCoeFepSpecificExtensions_Reserved_2(){}; - - private: // Data - - void* iOocInputSkin; // NW_FBox_Epoc32InputSkin_t*, NOT OWNED - const CFont& iFont; // font for the editor, NOT OWNED - - CWmlFormattedEditor* iEditor; - CWmlFormatHandler* iHandler; - CEikSecretEditor* iContainer; - - TInt iPrevCurPos; - TInt iLastCurPos; - TInt iMaxLength; - TBool iEmptyOk; - TBool iConfirmed; - TBool iOkToExitThreadSafety; // prevent re-entering OkToExitL() while dialog is up - - CParaFormatLayer* iGlobalParaLayer; - CCharFormatLayer* iGlobalCharLayer; - - CCoeControl* iParent; - - TInt iPredictiveTextOn; - - TInt iWrapWidth; - TBool iEditCommitFlag ; // Used by "OkToExit" to determine if call to "CommitFepInlineEdit" is proper. - TBool iFocusObserverAdded; - - CActiveSchedulerWait iActiveSchedulerWait;// Used to update the contents when the control loses the focus and gains focus - TInt iLayoutMode; - TRect iRect; - - CState* iState; - HBufC* iDocumentText; - HBufC* iInlineEditText; - TInt iUncommittedOffset; // for VKB cursor adjustment - TBool iPenEnabled; - - TBool m_cancelFepInlineEditInProgress; - }; - -#endif // CEPOC32INPUTBOX_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_buttonbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_buttonbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_BUTTONBOX_H -#define NW_FBOX_BUTTONBOX_H - -#include "nw_fbox_formbox.h" -#include "nw_text_ucs2.h" -#include "nw_image_abstractimage.h" -#include "nw_hed_appservices.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -typedef enum NW_FBox_ButtonBox_Type_e{ - NW_FBox_ButtonBox_Submit = 1, - NW_FBox_ButtonBox_Reset, - NW_FBox_ButtonBox_Button -}NW_FBox_ButtonBox_Type_t; - -/* ------------------------------------------------------------------------ * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ButtonBox_Class_s NW_FBox_ButtonBox_Class_t; -typedef struct NW_FBox_ButtonBox_s NW_FBox_ButtonBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ButtonBox_ClassPart_s { - void** unused; -} NW_FBox_ButtonBox_ClassPart_t; - -struct NW_FBox_ButtonBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_ButtonBox_ClassPart_t NW_FBox_ButtonBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_ButtonBox_s { - NW_FBox_FormBox_t super; - - /* member variables */ - NW_FBox_ButtonBox_Type_t buttonType; - NW_Text_t* value; - NW_HED_AppServices_t* appServices; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_ButtonBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_ButtonBox)) - -#define NW_FBox_ButtonBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_ButtonBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_ButtonBox_Class_t NW_FBox_ButtonBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_ButtonBox_GetValue(_buttonBox) \ - (NW_FBox_ButtonBoxOf(_buttonBox)->value) - -#define NW_FBox_ButtonBox_GetButtonType(_buttonBox) \ - (NW_FBox_ButtonBoxOf(_buttonBox)->buttonType) - -#define NW_FBox_ButtonBox_SetValue(_buttonBox, _value) \ - (NW_FBox_ButtonBoxOf(_buttonBox)->value = (_value)) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_ButtonBox_t* -NW_FBox_ButtonBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_FBox_ButtonBox_Type_t buttonType, - NW_Text_t* value, - NW_Image_AbstractImage_t* image, - NW_HED_AppServices_t* appServices); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_BUTTONBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_BUTTONBOXI_H -#define NW_FBOX_BUTTONBOXI_H - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_buttonbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ButtonBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_ButtonBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_ButtonBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_ButtonBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_LMgr_ButtonBox_GetBaseline (NW_LMgr_Box_t* box); - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_ButtonBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ButtonBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_BUTTONBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_BUTTONBOXSKIN_H -#define NW_FBOX_BUTTONBOXSKIN_H - -#include "nw_fbox_skin.h" -#include "nw_fbox_formbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ButtonBoxSkin_Class_s NW_FBox_ButtonBoxSkin_Class_t; -typedef struct NW_FBox_ButtonBoxSkin_s NW_FBox_ButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_FBox_ButtonBoxSkin_DrawContent_t) (NW_FBox_ButtonBoxSkin_t* thisObj, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ButtonBoxSkin_ClassPart_s { - NW_FBox_ButtonBoxSkin_DrawContent_t drawContent; -} NW_FBox_ButtonBoxSkin_ClassPart_t; - -struct NW_FBox_ButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ButtonBoxSkin_ClassPart_t NW_FBox_ButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_ButtonBoxSkin_s { - NW_FBox_Skin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_ButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_ButtonBoxSkin)) - -#define NW_FBox_ButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_ButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_ButtonBoxSkin_Class_t NW_FBox_ButtonBoxSkin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_ButtonBoxSkin_DrawContent(_object, _box, _deviceContext, _hasFocus) \ - (NW_Object_Invoke (_object, NW_FBox_ButtonBoxSkin, drawContent) \ - ((_object), (_box), (_deviceContext), (_hasFocus))) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_ButtonBoxSkin_t* -NW_FBox_ButtonBoxSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_buttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_BUTTONBOXSKINI_H -#define NW_FBOX_BUTTONBOXSKINI_H - -#include "nw_fbox_skini.h" -#include "nw_fbox_buttonboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_DrawContent(NW_FBox_ButtonBoxSkin_t* thisObj, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - - /* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_BUTTONBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_checkbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_checkbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CHECKBOX_H -#define NW_FBOX_CHECKBOX_H - -#include "nw_fbox_formbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_CheckBox_Class_s NW_FBox_CheckBox_Class_t; -typedef struct NW_FBox_CheckBox_s NW_FBox_CheckBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_CheckBox_ClassPart_s { - void** unused; -} NW_FBox_CheckBox_ClassPart_t; - -struct NW_FBox_CheckBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_CheckBox_ClassPart_t NW_FBox_CheckBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_CheckBox_s { - NW_FBox_FormBox_t super; - NW_Bool focus; - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_CheckBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_CheckBox)) - -#define NW_FBox_CheckBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_CheckBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_FBox_CheckBox_Class_t NW_FBox_CheckBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#if 0 /* TODO: remove old code */ -#define NW_FBox_CheckBox_ChangeState(_checkBox) \ - (NW_FBox_CheckBoxOf(_checkBox)->state = (NW_Bool)(!(NW_FBox_CheckBoxOf(_checkBox)->state))) - -#define NW_FBox_CheckBox_GetState(_checkBox) \ - (NW_FBox_CheckBoxOf(_checkBox)->state) -#endif -NW_Bool -NW_FBox_CheckBox_GetState(NW_FBox_CheckBox_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_CheckBox_t* -NW_FBox_CheckBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_CHECKBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_checkboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_checkboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CHECKBOXI_H -#define NW_FBOX_CHECKBOXI_H - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_checkbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_CheckBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_CheckBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_CheckBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_CheckBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_CHECKBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_checkboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_checkboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CHECKBOXSKIN_H -#define NW_FBOX_CHECKBOXSKIN_H - -#include "nw_fbox_skin.h" -#include "nw_fbox_formbox.h" - -#ifdef __cplusplus -NW_FBOX_EXPORT "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_CheckBoxSkin_Class_s NW_FBox_CheckBoxSkin_Class_t; -typedef struct NW_FBox_CheckBoxSkin_s NW_FBox_CheckBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_CheckBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_CheckBoxSkin_ClassPart_t; - -struct NW_FBox_CheckBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_CheckBoxSkin_ClassPart_t NW_FBox_CheckBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_CheckBoxSkin_s { - NW_FBox_Skin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_CheckBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_CheckBoxSkin)) - -#define NW_FBox_CheckBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_CheckBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_CheckBoxSkin_Class_t NW_FBox_CheckBoxSkin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_CheckBoxSkin_t* -NW_FBox_CheckBoxSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // NW_FBOX_EXPORT "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_checkboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_checkboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CHECKBOXSKINI_H -#define NW_FBOX_CHECKBOXSKINI_H - -#include "nw_fbox_skini.h" -#include "nw_fbox_checkboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_CHECKBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_clearaction.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_clearaction.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CLEARACTION_H -#define NW_FBOX_CLEARACTION_H - -#include "nw_lmgr_action.h" -#include "nw_text_ucs2.h" -#include "NW_FBox_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ClearAction_Class_s NW_FBox_ClearAction_Class_t; -typedef struct NW_FBox_ClearAction_s NW_FBox_ClearAction_t; - -typedef struct NW_FBox_InputBox_s NW_FBox_InputBox_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ClearAction_ClassPart_s { - void** unused; -} NW_FBox_ClearAction_ClassPart_t; - -struct NW_FBox_ClearAction_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Action_ClassPart_t NW_LMgr_Action; - NW_FBox_ClearAction_ClassPart_t NW_FBox_ClearAction; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_ClearAction_s { - NW_LMgr_Action_t super; - - NW_Text_UCS2_t* label; - const NW_FBox_InputBox_t* ownerBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_ClearAction_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_ClearAction)) - -#define NW_FBox_ClearActionOf(_object) \ - (NW_Object_Cast (_object, NW_FBox_ClearAction)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_ClearAction_Class_t NW_FBox_ClearAction_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_FBox_ClearAction_t* -NW_FBox_ClearAction_New (NW_FBox_InputBox_t* inputBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_FBox_Action_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_clearactioni.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_clearactioni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_CLEARACTIONI_H -#define NW_FBOX_CLEARACTIONI_H - -#include "nw_lmgr_actioni.h" -#include "nw_fbox_clearaction.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ClearAction_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_ClearAction_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -void -_NW_FBox_ClearAction_Invoke(NW_LMgr_Action_t* Action); - -NW_FBOX_EXPORT -const NW_Text_t* -_NW_FBox_ClearAction_GetLabel(NW_LMgr_Action_t* Action); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_CLEARACTIONI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_dummykeymapper.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_dummykeymapper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_DUMMYKEYMAPPER_H -#define NW_FBOX_DUMMYKEYMAPPER_H - -#include "nw_fbox_keymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_DummyKeyMapper_Class_s NW_FBox_DummyKeyMapper_Class_t; -typedef const NW_Object_Base_t NW_FBox_DummyKeyMapper_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_DummyKeyMapper_ClassPart_s { - void** unused; -} NW_FBox_DummyKeyMapper_ClassPart_t; - -struct NW_FBox_DummyKeyMapper_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_FBox_KeyMapper_ClassPart_t NW_FBox_KeyMapper; - NW_FBox_DummyKeyMapper_ClassPart_t NW_FBox_DummyKeyMapper; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_DummyKeyMapper_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_DummyKeyMapper)) - -#define NW_FBox_DummyKeyMapperOf(object) \ - (NW_Object_Cast (object, NW_FBox_DummyKeyMapper)) - - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_DummyKeyMapper_Class_t NW_FBox_DummyKeyMapper_Class; -NW_FBOX_EXPORT NW_FBox_DummyKeyMapper_t NW_FBox_DummyKeyMapper; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_DUMMYKEYMAPPER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_dummykeymapperi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_dummykeymapperi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_DUMMYKEYMAPPERI_H -#define NW_FBOX_DUMMYKEYMAPPERI_H - -#include "nw_fbox_keymapperi.h" -#include "nw_fbox_dummykeymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_Ucs2 -_NW_FBox_DummyKeyMapper_MapKey (NW_FBox_KeyMapper_t* thisObj, - NW_FBox_KeyMapper_Mode_t* mode, - NW_Ucs2 key, - NW_Uint8 *repeated); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_DUMMYKEYMAPPERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_editablestring.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_editablestring.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EDITABLESTRING_H -#define NW_FBOX_EDITABLESTRING_H - -#include "nw_adt_resizablevector.h" -#include "nw_text_ucs2.h" -#include "NW_FBox_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -typedef struct NW_FBox_EditableString_Class_s NW_FBox_EditableString_Class_t; -typedef struct NW_FBox_EditableString_s NW_FBox_EditableString_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_FBox_EditableString_ClassPart_s { - void** unused; -} NW_FBox_EditableString_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_FBox_EditableString_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Vector_ClassPart_t NW_ADT_Vector; - NW_ADT_DynamicVector_ClassPart_t NW_ADT_DynamicVector; - NW_ADT_ResizableVector_ClassPart_t NW_ADT_ResizableVector; - NW_FBox_EditableString_ClassPart_t NW_FBox_EditableString; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_FBox_EditableString_s { - NW_ADT_ResizableVector_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- */ -#define NW_FBox_EditableString_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_EditableString)) - -#define NW_FBox_EditableStringOf(_object) \ - (NW_Object_Cast (_object, NW_FBox_EditableString)) - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_EditableString_Class_t NW_FBox_EditableString_Class; - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -NW_Ucs2* -NW_FBox_EditableString_GetString (NW_FBox_EditableString_t* editableString, - NW_ADT_Vector_Metric_t index, - NW_Text_Length_t* length); - -NW_FBOX_EXPORT -NW_Text_UCS2_t* -NW_FBox_EditableString_GetText (NW_FBox_EditableString_t* editableString, - NW_ADT_Vector_Metric_t index); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_EditableString_SetInitialString (NW_FBox_EditableString_t* thisObj, - const NW_Ucs2* string, - NW_Text_Length_t length); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_EditableString_SetInitialText (NW_FBox_EditableString_t* editableString, - const NW_Text_t* text); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_EditableString_InsertChar (NW_FBox_EditableString_t* editableString, - NW_Ucs2 character, - NW_ADT_Vector_Metric_t position); -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_EditableString_ReplaceChar (NW_FBox_EditableString_t* editableString, - NW_Ucs2 character, - NW_ADT_Vector_Metric_t position); -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_EditableString_ClearChar (NW_FBox_EditableString_t* editableString, - NW_ADT_Vector_Metric_t position); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_EditableString_t* -NW_FBox_EditableString_New (NW_ADT_Vector_Metric_t elementSize, - NW_ADT_Vector_Metric_t initialCapacity, - NW_ADT_Vector_Metric_t capacityIncrement); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EDITABLESTRING_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_editablestringi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_editablestringi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EDITABLESTRINGI_H -#define NW_FBOX_EDITABLESTRINGI_H - -#include "nw_adt_resizablevectori.h" -#include "nw_fbox_editablestring.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_EditableString_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_EditableString_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EDITABLESTRINGI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32buttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32buttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_Epoc32ButtonBoxSKIN_H -#define NW_FBOX_Epoc32ButtonBoxSKIN_H - -#include "nw_fbox_buttonboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32ButtonBoxSkin_Class_s NW_FBox_Epoc32ButtonBoxSkin_Class_t; -typedef struct NW_FBox_Epoc32ButtonBoxSkin_s NW_FBox_Epoc32ButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32ButtonBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_Epoc32ButtonBoxSkin_ClassPart_t; - -struct NW_FBox_Epoc32ButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ButtonBoxSkin_ClassPart_t NW_FBox_ButtonBoxSkin; - NW_FBox_Epoc32ButtonBoxSkin_ClassPart_t NW_FBox_Epoc32ButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32ButtonBoxSkin_s { - NW_FBox_ButtonBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32ButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32ButtonBoxSkin)) - -#define NW_FBox_Epoc32ButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32ButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32ButtonBoxSkin_Class_t NW_FBox_Epoc32ButtonBoxSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_Epoc32ButtonBoxSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32buttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32buttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_Epoc32ButtonBoxSkinI_H -#define NW_FBOX_Epoc32ButtonBoxSkinI_H - -#include "nw_fbox_buttonboxskini.h" -#include "nw_fbox_epoc32buttonboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32ButtonBoxSkin_DrawContent(NW_FBox_ButtonBoxSkin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_Epoc32ButtonBoxSkinI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32formimages.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32formimages.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32FORMIMAGES_H -#define NW_FBOX_EPOC32FORMIMAGES_H - -#include "nw_object_base.h" -#include "nw_fbox_formbox.h" -#include "nw_image_abstractimage.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormImages_Class_s NW_FBox_FormImages_Class_t; -typedef struct NW_FBox_FormImages_s NW_FBox_FormImages_t; - -typedef struct NW_FBox_FormImages_Entry_s NW_FBox_FormImages_Entry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormImages_ClassPart_s { - NW_Uint8 numCheckBoxEntries; - const NW_FBox_FormImages_Entry_t* checkBoxEntries; - NW_Uint8 numRadioBoxEntries; - const NW_FBox_FormImages_Entry_t* radioBoxEntries; -} NW_FBox_FormImages_ClassPart_t; - -struct NW_FBox_FormImages_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_FBox_FormImages_ClassPart_t NW_FBox_FormImages; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_FormImages_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_FormImages_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_FBox_FormImages)) - -#define NW_FBox_FormImagesOf(_object) \ - (NW_Object_Cast ((_object), NW_FBox_FormImages)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_FormImages_Class_t NW_FBox_FormImages_Class; -NW_FBOX_EXPORT const NW_FBox_FormImages_t NW_FBox_FormImages; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -const NW_Image_AbstractImage_t* -NW_FBox_FormImages_GetImage (NW_FBox_FormImages_t* thisObj, - NW_Bool hasFocus, - NW_Bool state, - NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32FORMIMAGES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32formimagesi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32formimagesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32FORMIMAGESI_H -#define NW_FBOX_EPOC32FORMIMAGESI_H - -#include "nw_object_basei.h" -#include "nw_fbox_epoc32formimages.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_FBox_FormImages_Entry_s { - NW_Bool focus; - NW_Bool state; - NW_Uint16 imageId; - NW_Uint16 maskId; -}; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32FORMIMAGESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32imagebuttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32imagebuttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_Epoc32ImageButtonBoxSKIN_H -#define NW_FBOX_Epoc32ImageButtonBoxSKIN_H - -#include "nw_fbox_imagebuttonboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32ImageButtonBoxSkin_Class_s NW_FBox_Epoc32ImageButtonBoxSkin_Class_t; -typedef struct NW_FBox_Epoc32ImageButtonBoxSkin_s NW_FBox_Epoc32ImageButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32ImageButtonBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_Epoc32ImageButtonBoxSkin_ClassPart_t; - -struct NW_FBox_Epoc32ImageButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ImageButtonBoxSkin_ClassPart_t NW_FBox_ImageButtonBoxSkin; - NW_FBox_Epoc32ImageButtonBoxSkin_ClassPart_t NW_FBox_Epoc32ImageButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32ImageButtonBoxSkin_s { - NW_FBox_ImageButtonBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32ImageButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32ImageButtonBoxSkin)) - -#define NW_FBox_Epoc32ImageButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32ImageButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32ImageButtonBoxSkin_Class_t NW_FBox_Epoc32ImageButtonBoxSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_Epoc32ImageButtonBoxSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32imagebuttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32imagebuttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_Epoc32ImageButtonBoxSkinI_H -#define NW_FBOX_Epoc32ImageButtonBoxSkinI_H - -#include "nw_fbox_imagebuttonboxskini.h" -#include "nw_fbox_epoc32imagebuttonboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32ImageButtonBoxSkin_DrawContent(NW_FBox_ImageButtonBoxSkin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_Epoc32ImageButtonBoxSkinI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inlineformimages.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inlineformimages.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INLINEFORMIMAGES_H -#define NW_FBOX_EPOC32INLINEFORMIMAGES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_fbox_epoc32formimages.h" - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineFormImages_Class_s NW_FBox_InlineFormImages_Class_t; -typedef struct NW_FBox_InlineFormImages_s NW_FBox_InlineFormImages_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineFormImages_ClassPart_s { - void** unused; -} NW_FBox_InlineFormImages_ClassPart_t; - -struct NW_FBox_InlineFormImages_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_FBox_FormImages_ClassPart_t NW_FBox_FormImages; - NW_FBox_InlineFormImages_ClassPart_t NW_FBox_InlineFormImages; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineFormImages_s { - NW_FBox_FormImages_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineFormImages_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_FBox_FormImages)) - -#define NW_FBox_InlineFormImagesOf(_object) \ - (NW_Object_Cast ((_object), NW_FBox_FormImages)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_FBox_InlineFormImages_Class_t NW_FBox_InlineFormImages_Class; -extern const NW_FBox_InlineFormImages_t NW_FBox_InlineFormImages; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_FBOX_EPOC32FORMIMAGES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inlineformimagesi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inlineformimagesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INLINEFORMIMAGESI_H -#define NW_FBOX_EPOC32INLINEFORMIMAGESI_H - -#include "nw_fbox_epoc32formimagesi.h" -#include "nw_fbox_epoc32inlineformimages.h" - - -#endif /* NW_FBOX_EPOC32FORMIMAGESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputinteractor.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputinteractor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INPUTINTERACTOR_H -#define NW_FBOX_EPOC32INPUTINTERACTOR_H - -#include "nw_fbox_inputinteractor.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_keymapper.h" -#include "nw_evt_keyevent.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32InputInteractor_Class_s NW_FBox_Epoc32InputInteractor_Class_t; -typedef struct NW_FBox_Epoc32InputInteractor_s NW_FBox_Epoc32InputInteractor_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32InputInteractor_ClassPart_s { - void** unused; -} NW_FBox_Epoc32InputInteractor_ClassPart_t; - -struct NW_FBox_Epoc32InputInteractor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Interactor_ClassPart_t NW_FBox_Interactor; - NW_FBox_InputInteractor_ClassPart_t NW_FBox_InputInteractor; - NW_FBox_Epoc32InputInteractor_ClassPart_t NW_FBox_Epoc32InputInteractor; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32InputInteractor_s { - NW_FBox_InputInteractor_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32InputInteractor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32InputInteractor)) - -#define NW_FBox_Epoc32InputInteractorOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32InputInteractor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32InputInteractor_Class_t NW_FBox_Epoc32InputInteractor_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32INPUTINTERACTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputinteractori.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputinteractori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INPUTINTERACTORI_H -#define NW_FBOX_EPOC32INPUTINTERACTORI_H - -#include "nw_fbox_inputinteractori.h" -#include "nw_fbox_epoc32inputinteractor.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_Epoc32InputInteractor_ProcessEvent( - NW_FBox_Interactor_t* interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32INPUTINTERACTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INPUTSKIN_H -#define NW_FBOX_EPOC32INPUTSKIN_H - -#include "nw_fbox_inputskin.h" -#include "nw_fbox_formbox.h" -#include "nw_system_timer.h" - -#include "nw_fbox_CEpoc32InputBox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define NW_FBOX_INPUTBOX_LINE_SPACING_IN_TWIPS 0x32 -#define NW_FBOX_INPUTBOX_LINE_SPACING_IN_PIXELS 0x01 - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32InputSkin_Class_s NW_FBox_Epoc32InputSkin_Class_t; -typedef struct NW_FBox_Epoc32InputSkin_s NW_FBox_Epoc32InputSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32InputSkin_ClassPart_s { - void** unused; -} NW_FBox_Epoc32InputSkin_ClassPart_t; - -struct NW_FBox_Epoc32InputSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_InputSkin_ClassPart_t NW_FBox_InputSkin; - NW_FBox_Epoc32InputSkin_ClassPart_t NW_FBox_Epoc32InputSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32InputSkin_s { - NW_FBox_InputSkin_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* textList; - CEpoc32InputBox* cppEpoc32InputBox; - CActiveSchedulerWait activeSchedulerWait; - NW_Uint32 posCursorValue; /* current cursor position for this input element */ - NW_Uint32 prevCursorValue; /*previous cursor position - in case we cancel */ - NW_Bool reallyEdited; /* legal to use cursor position zero if already edited */ - NW_System_Timer_t* vkbTimer; /* delay launching of VKB */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32InputSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32InputSkin)) - -#define NW_FBox_Epoc32InputSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32InputSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32InputSkin_Class_t NW_FBox_Epoc32InputSkin_Class; - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -void -NW_FBox_Epoc32InputSkin_Scroll( NW_FBox_Epoc32InputSkin_t* thisObj, - TInt deltaY ); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_GetViewRect(NW_FBox_Epoc32InputSkin_t* thisObj, - TRect& viewRect); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkin_t* thisObj, - NW_Bool saveText); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_ReformatBox(NW_FBox_Epoc32InputSkin_t* inputSkin); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_Redraw(NW_FBox_Epoc32InputSkin_t* inputSkin); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_RedrawScreen(NW_FBox_Epoc32InputSkin_t* thisObj); - -NW_Bool -NW_FBox_Epoc32InputSkin_TextChanged(NW_FBox_Epoc32InputSkin_t* inputSkin, - const NW_Ucs2* string); - -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_SetValue(NW_FBox_Epoc32InputSkin_t* inputSkin, - const NW_Ucs2* string, - NW_Text_Length_t length); - - -void -NW_FBox_Epoc32InputSkin_ClearTextList(NW_FBox_Epoc32InputSkin_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_Epoc32INPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32inputskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32INPUTSKINI_H -#define NW_FBOX_EPOC32INPUTSKINI_H - -#include "nw_fbox_inputskini.h" -#include "nw_fbox_epoc32inputskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_Epoc32InputSkin_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_DrawText(NW_FBox_InputSkin_t* skin, - CGDIDeviceContext* deviceContext); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetDisplayText(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetActive(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetFocus( - NW_FBox_InputSkin_t* thisObj, NW_Bool focus ); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_DetailsDialog(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_Split(NW_FBox_InputSkin_t* thisObj, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetVKB(NW_FBox_InputSkin_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32INPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optgrpskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optgrpskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32OPTGRPSKIN_H -#define NW_FBOX_EPOC32OPTGRPSKIN_H - -#include "nw_fbox_optgrpskin.h" -#include "nw_fbox_formbox.h" -#include "nw_hed_appservices.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32OptGrpSkin_Class_s NW_FBox_Epoc32OptGrpSkin_Class_t; -typedef struct NW_FBox_Epoc32OptGrpSkin_s NW_FBox_Epoc32OptGrpSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32OptGrpSkin_ClassPart_s { - void** unused; -} NW_FBox_Epoc32OptGrpSkin_ClassPart_t; - -struct NW_FBox_Epoc32OptGrpSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptGrpSkin_ClassPart_t NW_FBox_OptGrpSkin; - NW_FBox_Epoc32OptGrpSkin_ClassPart_t NW_FBox_Epoc32OptGrpSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32OptGrpSkin_s { - NW_FBox_OptGrpSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32OptGrpSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32OptGrpSkin)) - -#define NW_FBox_Epoc32OptGrpSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32OptGrpSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32OptGrpSkin_Class_t NW_FBox_Epoc32OptGrpSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32OPTGRPSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optgrpskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optgrpskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32OPTGRPSKINI_H -#define NW_FBOX_EPOC32OPTGRPSKINI_H - -#include "nw_fbox_optgrpskini.h" -#include "nw_fbox_epoc32optgrpskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32OptGrpSkin_AddOption(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptionBox_t* optionBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32OptGrpSkin_AddOptGrp(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptGrpBox_t* optGrpBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32OPTGRPSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optionskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optionskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32OPTIONSKIN_H -#define NW_FBOX_EPOC32OPTIONSKIN_H - -#include "nw_fbox_optionboxskin.h" -#include "nw_fbox_formbox.h" -#include "nw_hed_appservices.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32OptionSkin_Class_s NW_FBox_Epoc32OptionSkin_Class_t; -typedef struct NW_FBox_Epoc32OptionSkin_s NW_FBox_Epoc32OptionSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32OptionSkin_ClassPart_s { - void** unused; -} NW_FBox_Epoc32OptionSkin_ClassPart_t; - -struct NW_FBox_Epoc32OptionSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptionBoxSkin_ClassPart_t NW_FBox_OptionBoxSkin; - NW_FBox_Epoc32OptionSkin_ClassPart_t NW_FBox_Epoc32OptionSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32OptionSkin_s { - NW_FBox_OptionBoxSkin_t super; - - /* member variables */ - NW_GenDlgApi_t dlgApi; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32OptionSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32OptionSkin)) - -#define NW_FBox_Epoc32OptionSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32OptionSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32OptionSkin_Class_t NW_FBox_Epoc32OptionSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32OPTIONSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optionskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32optionskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32OPTIONSKINI_H -#define NW_FBOX_EPOC32OPTIONSKINI_H - -#include "nw_fbox_optionboxskini.h" -#include "nw_fbox_epoc32optionskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32OPTIONSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32selectskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32selectskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32SELECTSKIN_H -#define NW_FBOX_EPOC32SELECTSKIN_H - -#include "nw_fbox_buttonboxskin.h" -#include "nw_fbox_formbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define NW_FBOX_SELECTBOX_LINE_SPACING_IN_PIXELS 0x02 - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32SelectSkin_Class_s NW_FBox_Epoc32SelectSkin_Class_t; -typedef struct NW_FBox_Epoc32SelectSkin_s NW_FBox_Epoc32SelectSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_GDI_Metric_t -( *NW_FBox_Epoc32SelectSkin_GetBaseline_t ) ( - NW_FBox_Epoc32SelectSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox ); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Epoc32SelectSkin_ClassPart_s { - NW_FBox_Epoc32SelectSkin_GetBaseline_t getBaseline; -} NW_FBox_Epoc32SelectSkin_ClassPart_t; - -struct NW_FBox_Epoc32SelectSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_SelectSkin_ClassPart_t NW_FBox_SelectSkin; - NW_FBox_Epoc32SelectSkin_ClassPart_t NW_FBox_Epoc32SelectSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Epoc32SelectSkin_s { - NW_FBox_SelectSkin_t super; - - /* member variables */ - NW_Text_UCS2_t* value; - - NW_Text_UCS2_t* displayText; - NW_ADT_DynamicVector_t* optionsList; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Epoc32SelectSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Epoc32SelectSkin)) - -#define NW_FBox_Epoc32SelectSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Epoc32SelectSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Epoc32SelectSkin_Class_t NW_FBox_Epoc32SelectSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -// Documented in nw_fbox_epoc32selectskini.h. -#define NW_FBox_Epoc32SelectSkin_GetBaseline(_object, _box) \ - (NW_Object_Invoke (_object, NW_FBox_Epoc32SelectSkin, getBaseline) \ - ((_object), (_box))) - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetValue(NW_FBox_Epoc32SelectSkin_t *skin, - NW_Ucs2** newStr); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_UpdateSelection(NW_FBox_Epoc32SelectSkin_t* skin, - NW_Ucs2* selectedText, - NW_Bool* selectUpdated); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32INPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_epoc32selectskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_epoc32selectskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_EPOC32SELECTSKINI_H -#define NW_FBOX_EPOC32SELECTSKINI_H - -#include "nw_fbox_selectskini.h" -#include "nw_fbox_epoc32selectskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_Epoc32SelectSkin_Destruct(NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_SetActive(NW_FBox_SelectSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -/** -* Gets the baseline for the content of this box. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aLmgrBox Ptr to the box to which this skin belongs. -* @return Baseline value. -*/ -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_Epoc32SelectSkin_GetBaseline( - NW_FBox_Epoc32SelectSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox ); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_DrawBorder(NW_FBox_ButtonBoxSkin_t* thisObj, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_AddOption(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** styleBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_AddOptGrp(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptGrpBox_t* optgrpBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_DetailsDialog(NW_FBox_SelectSkin_t* skin); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_RefreshText(NW_FBox_SelectSkin_t* skin); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Split(NW_FBox_SelectSkin_t* selectSkin, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_EPOC32INPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines OOC class structures and public method prototypes. -* -*/ - - -#ifndef NW_FBOX_FILESELECTIONBOX_H -#define NW_FBOX_FILESELECTIONBOX_H - -// INCLUDES -#include "nw_fbox_formbox.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -typedef struct NW_FBox_FileSelectionBox_Class_s NW_FBox_FileSelectionBox_Class_t; -typedef struct NW_FBox_FileSelectionBox_s NW_FBox_FileSelectionBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - OOC class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FileSelectionBox_ClassPart_s - { - void** unused; - } NW_FBox_FileSelectionBox_ClassPart_t; - -struct NW_FBox_FileSelectionBox_Class_s - { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_FileSelectionBox_ClassPart_t NW_FBox_FileSelectionBox; - }; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_FileSelectionBox_s - { - NW_FBox_FormBox_t super; - - // protected: // Data - NW_Uint16 iDesiredTextAreaWidthInChars; - }; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_FileSelectionBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_FileSelectionBox)) - -#define NW_FBox_FileSelectionBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_FileSelectionBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_FileSelectionBox_Class_t NW_FBox_FileSelectionBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/** -* Gets the desired width of the file-selection text area. -* @since 2.6 -* @param aFileSelectionBox Box class from which to get the text-area width. -* @return Text-area width in pixels. -*/ -#define NW_FBox_FileSelectionBox_GetDesiredTextAreaWidthInChars(_fileSelectionBox) \ - (NW_FBox_FileSelectionBoxOf(_fileSelectionBox)->iDesiredTextAreaWidthInChars) - -/** -* Determines whether or not the box has content. -* @since 2.6 -* @param aFileSelectionBox Box class from which to check for content. -* @return Boolean ETrue if box has content; else, EFalse. -*/ -TBool -NW_FBox_FileSelectionBox_HasContent( NW_FBox_FileSelectionBox_t* aThisObj ); - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/** -* Creates a new file selection box. -* @since 2.6 -* @param aNumProperties ?description -* @param aEventHandler Event handler for this box. -* @param aFormCntrlId Control ID for this box. -* @param aFormLiaison Form liaison that owns this box. -* @param aSize Desired size of the input control; specified in # of chars. -* @param aAppServices Not used. -* @return Pointer to new file selection box structure or null if failure. -* Caller assumes ownership of memory and must deallocate but not until -* after calling the OOC destructor. -*/ -NW_FBOX_EXPORT -NW_FBox_FileSelectionBox_t* -NW_FBox_FileSelectionBox_New( - NW_ADT_Vector_Metric_t aNumProperties, - NW_LMgr_EventHandler_t* aEventHandler, - void* aFormCntrlId, - NW_FBox_FormLiaison_t* aFormLiaison, - NW_Uint16 aSize, - NW_HED_AppServices_t* aAppServices ); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines virtual method implementation prototypes. -* -*/ - - -#ifndef NW_FBOX_FILESELECTIONBOXI_H -#define NW_FBOX_FILESELECTIONBOXI_H - -// INCLUDES -#include "nw_fbox_formboxi.h" -#include "nw_fbox_fileselectionbox.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/** -* OOC constructor. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Construct( - NW_Object_Dynamic_t* aDynamicObject, - va_list* aArgp ); - -/** -* Destructor. -*/ -NW_FBOX_EXPORT -void -_NW_FBox_FileSelectionBox_Destruct( NW_Object_Dynamic_t* aDynamicObject ); - -/** -* Gets the baseline for the content of this box. -* @since 2.6 -* @param aLmgrBox Ptr to the parent LMgr OOC box class for this box object. -* @return Value of baseline. -*/ -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_FileSelectionBox_GetBaseline( NW_LMgr_Box_t* aLmgrBox ); - -/** -* Creates and initializes the interactor for this box. -* @since 2.6 -* @param aFormBox Ptr to the parent Form OOC box class for this box object. -* @return Pointer to the newly created interactor object. -*/ -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_FileSelectionBox_InitInteractor( NW_FBox_FormBox_t* aFormBox ); - -/** -* Creates and initializes the skin class for this box. -* @since 2.6 -* @param aFormBox Ptr to the parent Form OOC box class for this box object. -* @return Pointer to the newly created skin object. -*/ -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_FileSelectionBox_InitSkin( NW_FBox_FormBox_t* aFormBox ); - -/** -* Resets this box; i.e., resets the value of the filename to an empty string. -* @since 2.6 -* @param aFormBox Ptr to the parent Form OOC box class for this box object. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Reset( NW_FBox_FormBox_t* aFormBox ); - -/** -* Checks to see if this box needs to be split and if so, "splits" it; however, -* this box cannot be split. It is moved to a new line if not already on one. -* That is the best that can be done to split this box. -* @since 2.6 -* @param aLmgrBox Ptr to the parent LMgr OOC box class for this box object. -* @param aSpace Available space -- the width in pixels. -* @param aSplitBox Ptr to returned split box, which is always set to NULL since -* this box cannot be split.. -* @param aFlags Split flags (such as whether or not already at a new line), -* possible values are defined by the enum NW_LMgr_Box_SplitFlags_e. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Split( - NW_LMgr_Box_t* aLmgrBox, - NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, - NW_Uint8 aFlags ); - -/** -* Process events for this box: set-active, clear-field, gain/lose focus, etc. -* @since 2.6 -* @param aEventListener Layout manager event listener, which will be called -* to handle the event as a default if this method doesn't handle the -* event directly. -* @param aEvent Event to process. -* @return Whether or not the event was handled. Possible values: -* NW_LMgr_EventAbsorbed or NW_LMgr_EventNotAbsorbed. -*/ -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_FileSelectionBox_IEventListener_ProcessEvent( - NW_LMgr_IEventListener_t* aEventListener, - NW_Evt_Event_t* aEvent ); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines OOC class structures and public method prototypes. -* -*/ - - -#ifndef NW_FBOX_FILESELECTIONBOXSKIN_H -#define NW_FBOX_FILESELECTIONBOXSKIN_H - -// INCLUDES -#include <e32std.h> - -#include "BrsrStatusCodes.h" -#include "nw_fbox_skin.h" -#include "nw_fbox_formbox.h" - - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -typedef struct NW_FBox_FileSelectionBoxSkin_Class_s NW_FBox_FileSelectionBoxSkin_Class_t; -typedef struct NW_FBox_FileSelectionBoxSkin_s NW_FBox_FileSelectionBoxSkin_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -typedef -NW_GDI_Metric_t -( *NW_FBox_FileSelectionBoxSkin_GetBaseline_t ) ( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox ); - -typedef -TBrowserStatusCode -( *NW_FBox_FileSelectionBoxSkin_Reset_t ) ( NW_FBox_FileSelectionBoxSkin_t* aThisObj ); - -typedef -TBrowserStatusCode -( *NW_FBox_FileSelectionBoxSkin_SetActive_t ) ( NW_FBox_FileSelectionBoxSkin_t* aThisObj ); - -typedef -TBrowserStatusCode -( *NW_FBox_FileSelectionBoxSkin_Split_t ) ( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, - NW_Uint8 aFlags ); - -/* ------------------------------------------------------------------------- * - OOC class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FileSelectionBoxSkin_ClassPart_s - { - NW_FBox_FileSelectionBoxSkin_GetBaseline_t getBaseline; - NW_FBox_FileSelectionBoxSkin_Reset_t reset; - NW_FBox_FileSelectionBoxSkin_SetActive_t setActive; - NW_FBox_FileSelectionBoxSkin_Split_t split; - } NW_FBox_FileSelectionBoxSkin_ClassPart_t; - -struct NW_FBox_FileSelectionBoxSkin_Class_s - { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_FileSelectionBoxSkin_ClassPart_t NW_FBox_FileSelectionBoxSkin; - }; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_FileSelectionBoxSkin_s - { - NW_FBox_Skin_t super; - - // Member variables. - HBufC* iFullFileName; // fully-qualified file name - TPtrC iFileNameAndExt; // ptr into above at name.ext only - }; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_FileSelectionBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_FileSelectionBoxSkin)) - -#define NW_FBox_FileSelectionBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_FileSelectionBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_FileSelectionBoxSkin_Class_t NW_FBox_FileSelectionBoxSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -// Documented in nw_fbox_fileselectionboxskini.h. -#define NW_FBox_FileSelectionBoxSkin_GetBaseline(_object, _box) \ - (NW_Object_Invoke (_object, NW_FBox_FileSelectionBoxSkin, getBaseline) \ - ((_object), (_box))) - -// Documented in nw_fbox_fileselectionboxskini.h. -#define NW_FBox_FileSelectionBoxSkin_Reset(_object) \ - (NW_Object_Invoke (_object, NW_FBox_FileSelectionBoxSkin, reset) \ - ((_object))) - -// Documented in nw_fbox_fileselectionboxskini.h. -#define NW_FBox_FileSelectionBoxSkin_SetActive(_object) \ - (NW_Object_Invoke (_object, NW_FBox_FileSelectionBoxSkin, setActive) \ - ((_object))) - -// Documented in nw_fbox_fileselectionboxskini.h. -#define NW_FBox_FileSelectionBoxSkin_Split(_object, _space, _splitBox, _flags) \ - (NW_Object_Invoke (_object, NW_FBox_FileSelectionBoxSkin, split) \ - ((_object), (_space), (_splitBox), (_flags))) - -/** -* Gets the desired width of the file-selection text area. -* @since 2.6 -* @param _object Ptr to the OOC class structure for this class. -* @return Text-area width in pixels. -*/ -#define NW_FBox_FileSelectionBoxSkin_HasContent(_object) \ -(((_object->iFullFileName) && (_object->iFileNameAndExt.Length())) ? ETrue : EFalse ) - - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -/** -* Creates a new instance of this box skin class. -* @since 2.6 -* @param aFormBox Form box to which the new skin class will belong. -* @return Pointer to new instance of this box. -*/ -NW_FBOX_EXPORT -NW_FBox_FileSelectionBoxSkin_t* -NW_FBox_FileSelectionBoxSkin_New( NW_FBox_FormBox_t* aFormBox ); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_fileselectionboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines virtual method implementation prototypes. -* -*/ - - -#ifndef NW_FBOX_FILESELECTIONBOXSKINI_H -#define NW_FBOX_FILESELECTIONBOXSKINI_H - -#include "BrsrStatusCodes.h" -#include "nw_fbox_fileselectionboxskin.h" - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -// Constructor for this OOC object. -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Construct( - NW_Object_Dynamic_t* aDynamicObject, - va_list* aArgp ); - -// Destructor. -NW_FBOX_EXPORT -void -_NW_FBox_FileSelectionBoxSkin_Destruct( NW_Object_Dynamic_t* aDynamicObject ); - -/** -* Draws the skin -- the box and its contents. -* @since 2.6 -* @param aSkin Ptr to this OOC object. -* @param aLmgrBox Ptr to the box to which this skin belongs. -* @param aDeviceContext GDI device context. -* @param aHasFocus Flag indicating whether or not box has focus. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Draw( - NW_FBox_Skin_t* aSkin, - NW_LMgr_Box_t* aLmgrBox, - CGDIDeviceContext* aDeviceContext, - NW_Uint8 aHasFocus ); - -/** -* Gets the baseline for the content of this box. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aLmgrBox Ptr to the box to which this skin belongs. -* @return Baseline value. -*/ -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_FileSelectionBoxSkin_GetBaseline( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox ); - -/** -* Gets the size (width & height) needed for the content. The returned width -* is bounded by the display width. -* @since 2.6 -* @param aSkin Ptr to the parent OOC skin class for this skin object. -* @param aLmgrBox Ptr to the box to which this skin belongs. -* @param aSize Ptr at which to the size is returned. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_GetSize( - NW_FBox_Skin_t* aSkin, - NW_LMgr_Box_t* aLmgrBox, - NW_GDI_Dimension3D_t* aSize ); - -/** -* Resets this box; i.e., resets the value of the filename to an empty string. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Reset( NW_FBox_FileSelectionBoxSkin_t* aThisObj ); - -/** -* Sets this box to be the active box, which launches the file-selection dialogs. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @return Browser status code, indicating status of operation. -*/ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_SetActive( NW_FBox_FileSelectionBoxSkin_t* aThisObj ); - -/** -* Checks to see if this box needs to be split and if so, "splits" it; however, -* this box cannot be split. It is moved to a new line if not already on one. -* That is the best that can be done to split this box. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aSpace Available space -- the width in pixels. -* @param aSplitBox Ptr to returned split box, which is always set to NULL since -* this box cannot be split.. -* @param aFlags Split flags (such as whether or not already at a new line), -* possible values are defined by the enum NW_LMgr_Box_SplitFlags_e. -* @return Browser status code, indicating status of operation. -*/ -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Split( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, - NW_Uint8 aFlags ); - - -/* ------------------------------------------------------------------------- * - protected methods -* ------------------------------------------------------------------------- */ - -#define NW_FBox_FileSelectionBoxSkin_GetFileSelectionBox(_skin) \ - (NW_FBox_FileSelectionBoxOf(NW_FBox_Skin_GetFormBox(_skin))) - - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_formbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_formbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_FORMBOX_H -#define NW_FBOX_FORMBOX_H - -#include "nw_lmgr_activebox.h" -#include "nw_fbox_skin.h" -#include "nw_fbox_interactor.h" -#include "nw_fbox_formliaison.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormBox_Class_s NW_FBox_FormBox_Class_t; -typedef struct NW_FBox_FormBox_s NW_FBox_FormBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -typedef -NW_FBox_Skin_t* -(*NW_FBox_FormBox_InitSkin_t) (NW_FBox_FormBox_t* thisObj); - -typedef -NW_FBox_Interactor_t* -(*NW_FBox_FormBox_InitInteractor_t) (NW_FBox_FormBox_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_FormBox_Reset_t) (NW_FBox_FormBox_t* thisObj); - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormBox_ClassPart_s { - NW_FBox_FormBox_InitSkin_t initSkin; - NW_FBox_FormBox_InitInteractor_t initInteractor; - NW_FBox_FormBox_Reset_t reset; -} NW_FBox_FormBox_ClassPart_t; - -struct NW_FBox_FormBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_FormBox_s { - NW_LMgr_ActiveBox_t super; - - /* member variables */ - void* formCntrlId; - NW_FBox_FormLiaison_t* formLiaison; - NW_FBox_Skin_t* skin; - NW_FBox_Interactor_t* interactor; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_FormBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_FormBox)) - -#define NW_FBox_FormBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_FormBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_FormBox_Class_t NW_FBox_FormBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_FormBox_GetSkin(_box) \ - (NW_FBox_FormBoxOf(_box)->skin) - -#define NW_FBox_FormBox_GetInteractor(_box) \ - (NW_FBox_FormBoxOf(_box)->interactor) - -#define NW_FBox_FormBox_GetFormCntrlID(_box) \ - (NW_FBox_FormBoxOf(_box)->formCntrlId) - -#define NW_FBox_FormBox_SetFormCntrlID(_box, _formCntrlId) \ - (NW_FBox_FormBoxOf(_box)->formCntrlId = _formCntrlId) - -#define NW_FBox_FormBox_GetFormLiaison(_box) \ - (NW_FBox_FormBoxOf(_box)->formLiaison) - -#define NW_FBox_FormBox_InitSkin(_object) \ - (NW_Object_Invoke (_object, NW_FBox_FormBox, initSkin) \ - ((_object))) - -#define NW_FBox_FormBox_InitInteractor(_object) \ - (NW_Object_Invoke (_object, NW_FBox_FormBox, initInteractor) \ - ((_object))) - -#define NW_FBox_FormBox_Reset(_object) \ - (NW_Object_Invoke (_object, NW_FBox_FormBox, reset) \ - ((_object))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_formboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_formboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_FORMBOXI_H -#define NW_FBOX_FORMBOXI_H - -#include "nw_lmgr_activeboxi.h" -#include "nw_fbox_formbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FormBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_FormBox_Destruct(NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FormBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FormBox_Resize (NW_LMgr_Box_t* box,NW_LMgr_FormatContext_t* context); - -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_FormBox_GetBaseline (NW_LMgr_Box_t* box); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FormBox_GetMinimumContentSize (NW_LMgr_Box_t* box, NW_GDI_Dimension2D_t* constraint); - -NW_FBOX_EXPORT -NW_Bool -_NW_FBox_FormBox_HasFixedContentSize(NW_LMgr_Box_t *box); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_FormBox_Reset (NW_FBox_FormBox_t* box); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_FORMBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_formboxutils.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_formboxutils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_FORMBOXUTILS_H -#define NW_FBOX_FORMBOXUTILS_H - -#include "nw_text_ucs2.h" -#include "nw_hed_documentroot.h" -#include "nw_lmgr_box.h" -#include "BrsrTypes.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern const NW_Ucs2 NW_FBox_FormBoxUtils_Truncate[]; -extern const NW_Ucs2 NW_FBox_FormBoxUtils_TrueStr[]; -extern const NW_Ucs2 NW_FBox_FormBoxUtils_FalseStr[]; - -#define NW_FBox_FormBoxUtils_Truncate_len 3 - -TBrowserStatusCode -NW_FBox_FormBoxUtils_GetDisplayLength(CGDIDeviceContext* deviceContext, - NW_Text_t* text, - CGDIFont* font, - NW_Text_Length_t totalLength, - NW_Uint16 width, - NW_Text_Length_t* displayLength, - NW_Bool isNumber); - -NW_HED_DocumentRoot_t * -NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_Box_t* box); - -NW_Uint16 -NW_FBox_FormBoxUtils_GetNumEscapeChars(const NW_Ucs2* format); - -void -NW_FBox_FormBoxUtils_FillEscapeChars(const NW_Ucs2* format, NW_Ucs2 *input, - NW_Ucs2 *retValue, NW_Uint16 length); - - -void -NW_FBox_FormBoxUtils_StripEscapeChars(const NW_Ucs2* format, NW_Ucs2 *input, - NW_Ucs2 *retValue, NW_Uint16 retValueLen); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_FORMBOXUTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_formliaison.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_formliaison.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,367 +0,0 @@ -/* -* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBox_FormLiaison_h -#define NW_FBox_FormLiaison_h - -#include <e32std.h> - -#include "nw_object_dynamic.h" -#include "nw_evt_ecmaevent.h" -#include "nw_lmgr_box.h" -#include "NW_FBox_EXPORT.h" -#include "nw_hed_documentroot.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormLiaison_Class_s NW_FBox_FormLiaison_Class_t; -typedef struct NW_FBox_FormLiaison_s NW_FBox_FormLiaison_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetWBXMLVersion_t) (NW_FBox_FormLiaison_t* formLiaison, - NW_Uint32* version); - - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_AddControl_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_SetInitialStringValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Text_Length_t maxChars); -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_SetStringValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Text_t* value); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_ValidateStringValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - const NW_Text_t* value); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetStringValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Text_t** valueOut, - NW_Bool* initialValueUsed); - - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetStringName_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Ucs2** nameOut); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetStringTitle_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Ucs2** titleOut); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_SetBoolValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Bool *value); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_ResetRadioValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Bool *value); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_ToggleBoolValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetBoolValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_Bool* valueOut); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_Reset_t) (NW_FBox_FormLiaison_t* formLiaison, - void* _controlId); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_Submit_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -TBrowserStatusCode -( *NW_FBox_FormLiaison_Focus_t ) ( NW_FBox_FormLiaison_t* formLiaison, - void* controlId ); - -typedef -NW_Bool -(*NW_FBox_FormLiaison_IsOptionMultiple_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -NW_Bool -(*NW_FBox_FormLiaison_IsOptionSelected_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -NW_Bool -(*NW_FBox_FormLiaison_OptionHasOnPick_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -NW_Bool -(*NW_FBox_FormLiaison_IsLocalNavOnPick_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -NW_Bool -(*NW_FBox_FormLiaison_GetInitialValue_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_GetDocRoot_t) (NW_FBox_FormLiaison_t* formLiaison, - NW_HED_DocumentRoot_t** contentHandler); - -typedef -TBrowserStatusCode -(*NW_FBox_FormLiaison_DelegateEcmaEvnt_t) (NW_FBox_FormLiaison_t* formLiaison, - void* controlId, - NW_ECMA_Evt_Type_t ecmaEvent); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_FormLiaison_ClassPart_s { - NW_FBox_FormLiaison_GetWBXMLVersion_t getWBXMLVersion; - NW_FBox_FormLiaison_AddControl_t addControl; - NW_FBox_FormLiaison_SetInitialStringValue_t setInitialStringValue; - NW_FBox_FormLiaison_SetStringValue_t setStringValue; - NW_FBox_FormLiaison_ValidateStringValue_t validateStringValue; - NW_FBox_FormLiaison_GetStringValue_t getStringValue; - NW_FBox_FormLiaison_GetStringName_t getStringName; - NW_FBox_FormLiaison_GetStringTitle_t getStringTitle; - NW_FBox_FormLiaison_SetBoolValue_t setBoolValue; - NW_FBox_FormLiaison_ResetRadioValue_t resetRadioValue; - NW_FBox_FormLiaison_ToggleBoolValue_t toggleBoolValue; - NW_FBox_FormLiaison_GetBoolValue_t getBoolValue; - NW_FBox_FormLiaison_Reset_t reset; - NW_FBox_FormLiaison_Submit_t submit; - NW_FBox_FormLiaison_Focus_t focus; - NW_FBox_FormLiaison_IsOptionMultiple_t isOptionMultiple; - NW_FBox_FormLiaison_IsOptionSelected_t isOptionSelected; - NW_FBox_FormLiaison_OptionHasOnPick_t optionHasOnPick; - NW_FBox_FormLiaison_IsLocalNavOnPick_t isLocalNavOnPick; - NW_FBox_FormLiaison_GetInitialValue_t getInitialValue; - NW_FBox_FormLiaison_GetDocRoot_t getDocRoot; - NW_FBox_FormLiaison_DelegateEcmaEvnt_t delegateEcmaEvent; -} NW_FBox_FormLiaison_ClassPart_t; - -struct NW_FBox_FormLiaison_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_FormLiaison_ClassPart_t NW_FBox_FormLiaison; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_FormLiaison_s { - NW_Object_Dynamic_t super; - - /* member variables */ - HBufC* iMostRecentFileSelectionPath; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_FormLiaison_GetClassPart(_formLiaison) \ - (NW_Object_GetClassPart(_formLiaison, NW_FBox_FormLiaison)) - -#define NW_FBox_FormLiaisonOf(object) \ - (NW_Object_Cast (object, NW_FBox_FormLiaison)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_FormLiaison_Class_t NW_FBox_FormLiaison_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_FormLiaison_GetWBXMLVersion(_formLiaison, _version) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getWBXMLVersion) \ - ((_formLiaison), (_version))) - -#define NW_FBox_FormLiaison_SetBoxTree(_formLiaison, _boxTree) \ - (NW_FBox_FormLiaisonOf (_formLiaison)->formBoxTree = NW_LMgr_BoxOf (_boxTree), KBrsrSuccess) - -#define NW_FBox_FormLiaison_GetBoxTree(_formLiaison) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_Box_t*) NW_FBox_FormLiaisonOf (_formLiaison)->formBoxTree) - -#define NW_FBox_FormLiaison_AddControl(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, addControl) \ - ((_formLiaison), (_controlId))) - -#define NW_FBox_FormLiaison_SetInitialStringValue(_formLiaison, _controlId, _maxChars) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, setInitialStringValue) \ - ((_formLiaison), (_controlId), (_maxChars))) - -#define NW_FBox_FormLiaison_SetStringValue(_formLiaison, _controlId, _value) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, setStringValue) \ - ((_formLiaison), (_controlId), (_value))) - -#define NW_FBox_FormLiaison_ValidateStringValue(_formLiaison, _controlId, _value) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, validateStringValue) \ - ((_formLiaison), (_controlId), (_value))) - -#define NW_FBox_FormLiaison_GetStringValue(_formLiaison, _controlId, _valueOut, _valueUsedOut) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getStringValue) \ - ((_formLiaison), (_controlId), (_valueOut), (_valueUsedOut))) - -#define NW_FBox_FormLiaison_GetStringName(_formLiaison, _controlId, _nameOut) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getStringName) \ - ((_formLiaison), (_controlId), (_nameOut))) - -#define NW_FBox_FormLiaison_GetStringTitle(_formLiaison, _controlId, _titleOut) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getStringTitle) \ - ((_formLiaison), (_controlId), (_titleOut))) - -#define NW_FBox_FormLiaison_SetBoolValue(_formLiaison, _controlId, _value) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, setBoolValue) \ - ((_formLiaison), (_controlId), (_value))) - -#define NW_FBox_FormLiaison_ResetRadioValue(_formLiaison, _controlId, _value) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, resetRadioValue) \ - ((_formLiaison), (_controlId), (_value))) - -#define NW_FBox_FormLiaison_ToggleBoolValue(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, toggleBoolValue) \ - ((_formLiaison), (_controlId))) - -#define NW_FBox_FormLiaison_GetBoolValue(_formLiaison, _controlId, _valueOut) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getBoolValue) \ - ((_formLiaison), (_controlId), (_valueOut))) - -#define NW_FBox_FormLiaison_Reset(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, reset) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_Submit(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, submit) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_Focus( _formLiaison, _controlId ) \ - ( NW_Object_Invoke ( _formLiaison, NW_FBox_FormLiaison, focus ) \ - ( ( _formLiaison ), ( _controlId ) ) ) - -#define NW_FBox_FormLiaison_IsOptionMultiple(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, isOptionMultiple) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_IsOptionSelected(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, isOptionSelected) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_OptionHasOnPick(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, optionHasOnPick) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_IsLocalNavOnPick(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, isLocalNavOnPick) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_GetInitialValue(_formLiaison, _controlId) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getInitialValue) \ - ((_formLiaison), (_controlId) )) - -#define NW_FBox_FormLiaison_GetDocRoot(_formLiaison, _docRoot) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, getDocRoot) \ - ((_formLiaison), (_docRoot) )) - -#define NW_FBox_FormLiaison_DelegateEcmaEvent(_formLiaison, _controlId, _ecmaEvent) \ - (NW_Object_Invoke (_formLiaison, NW_FBox_FormLiaison, delegateEcmaEvent) \ - ((_formLiaison), (_controlId), (_ecmaEvent) )) - - -/* -------------------------------------------------------------------------- * - final methods - * ---------------------------------------------------------------------------*/ - -/** -* Gets the most-recent-file-selection-path. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aPath Ptr into which the most-recent-file-selection-path is returned. -* @return Browser status code, indicating status of operation: -* KBrsrSuccess -*/ -extern -TBrowserStatusCode -NW_FBox_FormLiaison_GetMostRecentFileSelectionPath( - NW_FBox_FormLiaison_t* aThisObj, TPtrC& aPath ); - -/** -* Sets the most-recent-file-selection-path. -* @since 2.6 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aPath Ptr to the most-recent-file-selection-path. -* @return Browser status code, indicating status of operation: -* KBrsrSuccess -* KBrsrOutOfMemory -*/ -extern -TBrowserStatusCode -NW_FBox_FormLiaison_SetMostRecentFileSelectionPath( - NW_FBox_FormLiaison_t* aThisObj, TPtrC& aPath ); - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_FBox_FBoxFormLiaison_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_formliaisoni.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_formliaisoni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBox_FormLiaisonI_h -#define NW_FBox_FormLiaisonI_h - -#include "nw_object_dynamici.h" -#include "nw_fbox_formliaison.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -void -_NW_FBox_FormLiaison_Destruct( NW_Object_Dynamic_t* dynamicObject ); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBox_FormLiaisonI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_hiddenbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_hiddenbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_HIDDENBOX_H -#define NW_FBOX_HIDDENBOX_H - -#include "nw_fbox_inputbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_HiddenBox_Class_s NW_FBox_HiddenBox_Class_t; -typedef struct NW_FBox_HiddenBox_s NW_FBox_HiddenBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_HiddenBox_ClassPart_s { - void** unused; -} NW_FBox_HiddenBox_ClassPart_t; - -struct NW_FBox_HiddenBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_InputBox_ClassPart_t NW_FBox_InputBox; - NW_FBox_HiddenBox_ClassPart_t NW_FBox_HiddenBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_HiddenBox_s { - NW_FBox_InputBox_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_HiddenBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_HiddenBox)) - -#define NW_FBox_HiddenBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_HiddenBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_HiddenBox_Class_t NW_FBox_HiddenBox_Class; - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_HiddenBox_t* -NW_FBox_HiddenBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_HED_AppServices_t* appServices); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_hiddenboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_hiddenboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_HIDDENBOXI_H -#define NW_FBOX_HIDEENBOXI_H - -#include "nw_fbox_inputboxi.h" -#include "nw_fbox_hiddenbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_HIDDENBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_ImageButtonBox_H -#define NW_FBOX_ImageButtonBox_H - -#include "nw_fbox_formbox.h" -#include "nw_lmgr_animatedimageaggregate.h" -#include "nw_text_ucs2.h" -#include "nw_image_abstractimage.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ImageButtonBox_Class_s NW_FBox_ImageButtonBox_Class_t; -typedef struct NW_FBox_ImageButtonBox_s NW_FBox_ImageButtonBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ImageButtonBox_ClassPart_s { - void** unused; -} NW_FBox_ImageButtonBox_ClassPart_t; - -struct NW_FBox_ImageButtonBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_ImageButtonBox_ClassPart_t NW_FBox_ImageButtonBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_ImageButtonBox_s { - NW_FBox_FormBox_t super; - - /* implemented aggregate */ - NW_LMgr_AnimatedImageAggregate_t NW_LMgr_AnimatedImageAggregate; - - /* member variables */ - NW_Text_t* value; - NW_Image_AbstractImage_t* image; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_ImageButtonBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_ImageButtonBox)) - -#define NW_FBox_ImageButtonBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_ImageButtonBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_ImageButtonBox_Class_t NW_FBox_ImageButtonBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -#define NW_FBox_ImageButtonBox_GetValue(_buttonBox) \ - (NW_FBox_ImageButtonBoxOf(_buttonBox)->value) - -#define NW_FBox_ImageButtonBox_SetValue(_buttonBox, _value) \ - (NW_FBox_ImageButtonBoxOf(_buttonBox)->value = (_value)) - - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -void -NW_LMgr_ImageButtonBox_ReplaceBrokenImage( NW_LMgr_Box_t* box, NW_Image_AbstractImage_t* image ); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_ImageButtonBox_t* -NW_FBox_ImageButtonBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* value, - NW_Image_AbstractImage_t* image); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_ImageButtonBox_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_ImageButtonBoxI_H -#define NW_FBOX_ImageButtonBoxI_H - -#include "nw_fbox_formboxi.h" -#include "nw_lmgr_animatedimageaggregatei.h" -#include "nw_fbox_imagebuttonbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_LMgr_IEventListener_Class_t _NW_FBox_ImageButtonBox_IEventListener_Class; -NW_FBOX_EXPORT const NW_LMgr_AnimatedImageAggregate_Class_t _NW_LMgr_AnimatedImageButtonBoxAggregate_Class; -NW_FBOX_EXPORT const NW_Object_Class_t* const _NW_FBox_ImageButtonBox_SecondaryList[]; - - -/* ------------------------------------------------------------------------- * - protected method prototype(s) - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_ImageButtonBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_ImageButtonBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_ImageButtonBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_ImageButtonBox_GetBaseline (NW_LMgr_Box_t* box); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - - /* Event Listener Interface */ -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_ImageButtonBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); -/* Animation aggregate */ -NW_FBOX_EXPORT -NW_Image_AbstractImage_t* -_NW_FBox_ImageButtonBox_AnimatedImageAggregate_GetImage (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_ImageButtonBoxI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_ImageButtonBoxSkin_H -#define NW_FBOX_ImageButtonBoxSkin_H - -#include "nw_fbox_skin.h" -#include "nw_fbox_formbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ImageButtonBoxSkin_Class_s NW_FBox_ImageButtonBoxSkin_Class_t; -typedef struct NW_FBox_ImageButtonBoxSkin_s NW_FBox_ImageButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_FBox_ImageButtonBoxSkin_DrawContent_t) (NW_FBox_ImageButtonBoxSkin_t* thisObj, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_ImageButtonBoxSkin_ClassPart_s { - NW_FBox_ImageButtonBoxSkin_DrawContent_t drawContent; -} NW_FBox_ImageButtonBoxSkin_ClassPart_t; - -struct NW_FBox_ImageButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ImageButtonBoxSkin_ClassPart_t NW_FBox_ImageButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_ImageButtonBoxSkin_s { - NW_FBox_Skin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_ImageButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_ImageButtonBoxSkin)) - -#define NW_FBox_ImageButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_ImageButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_ImageButtonBoxSkin_Class_t NW_FBox_ImageButtonBoxSkin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_ImageButtonBoxSkin_DrawContent(_object, _box, _deviceContext, _hasFocus) \ - (NW_Object_Invoke (_object, NW_FBox_ImageButtonBoxSkin, drawContent) \ - ((_object), (_box), (_deviceContext), (_hasFocus))) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_ImageButtonBoxSkin_t* -NW_FBox_ImageButtonBoxSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_imagebuttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_ImageButtonBoxSkinI_H -#define NW_FBOX_ImageButtonBoxSkinI_H - -#include "nw_fbox_skini.h" -#include "nw_fbox_imagebuttonboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_ImageButtonBoxSkin_DrawContent(NW_FBox_ImageButtonBoxSkin_t* thisObj, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - - /* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_ImageButtonBoxSkinI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinebuttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinebuttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEBUTTONBOXSKIN_H -#define NW_FBOX_INLINEBUTTONBOXSKIN_H - -#include "nw_fbox_buttonboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineButtonBoxSkin_Class_s NW_FBox_InlineButtonBoxSkin_Class_t; -typedef struct NW_FBox_InlineButtonBoxSkin_s NW_FBox_InlineButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineButtonBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineButtonBoxSkin_ClassPart_t; - -struct NW_FBox_InlineButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ButtonBoxSkin_ClassPart_t NW_FBox_ButtonBoxSkin; - NW_FBox_InlineButtonBoxSkin_ClassPart_t NW_FBox_InlineButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineButtonBoxSkin_s { - NW_FBox_ButtonBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineButtonBoxSkin)) - -#define NW_FBox_InlineButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineButtonBoxSkin_Class_t NW_FBox_InlineButtonBoxSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEBUTTONBOXSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinebuttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinebuttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEBUTTONBOXSKINI_H -#define NW_FBOX_INLINEBUTTONBOXSKINI_H - -#include "nw_fbox_buttonboxskini.h" -#include "nw_fbox_inlinebuttonboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineButtonBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineButtonBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEBUTTONBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinecheckboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinecheckboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINECHECKBOXSKIN_H -#define NW_FBOX_INLINECHECKBOXSKIN_H - -#include "nw_fbox_checkboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineCheckBoxSkin_Class_s NW_FBox_InlineCheckBoxSkin_Class_t; -typedef struct NW_FBox_InlineCheckBoxSkin_s NW_FBox_InlineCheckBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineCheckBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineCheckBoxSkin_ClassPart_t; - -struct NW_FBox_InlineCheckBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_CheckBoxSkin_ClassPart_t NW_FBox_CheckBoxSkin; - NW_FBox_InlineCheckBoxSkin_ClassPart_t NW_FBox_InlineCheckBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineCheckBoxSkin_s { - NW_FBox_CheckBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineCheckBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineCheckBoxSkin)) - -#define NW_FBox_InlineCheckBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineCheckBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineCheckBoxSkin_Class_t NW_FBox_InlineCheckBoxSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinecheckboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinecheckboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINECHECKBOXSKINI_H -#define NW_FBOX_INLINECHECKBOXSKINI_H - -#include "nw_fbox_checkboxskini.h" -#include "nw_fbox_inlinecheckboxskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InlineCheckBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InlineCheckBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINECHECKBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineformimages.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineformimages.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEFORMIMAGES_H -#define NW_FBOX_INLINEFORMIMAGES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_fbox_epoc32formimages.h" - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineFormImages_Class_s NW_FBox_InlineFormImages_Class_t; -typedef struct NW_FBox_InlineFormImages_s NW_FBox_InlineFormImages_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineFormImages_ClassPart_s { - void** unused; -} NW_FBox_InlineFormImages_ClassPart_t; - -struct NW_FBox_InlineFormImages_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_FBox_FormImages_ClassPart_t NW_FBox_FormImages; - NW_FBox_InlineFormImages_ClassPart_t NW_FBox_InlineFormImages; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineFormImages_s { - NW_FBox_FormImages_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineFormImages_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_FBox_FormImages)) - -#define NW_FBox_InlineFormImagesOf(_object) \ - (NW_Object_Cast ((_object), NW_FBox_FormImages)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_FBox_InlineFormImages_Class_t NW_FBox_InlineFormImages_Class; -extern const NW_FBox_InlineFormImages_t NW_FBox_InlineFormImages; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_FBOX_FORMIMAGES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineformimagesi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineformimagesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEFORMIMAGESI_H -#define NW_FBOX_INLINEFORMIMAGESI_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_fbox_formimagesi.h" -#include "nw_fbox_inlineformimages.h" - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_FBOX_FORMIMAGESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineimagebuttonboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineimagebuttonboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_InlineImageButtonBoxSkin_H -#define NW_FBOX_InlineImageButtonBoxSkin_H - -#include "nw_fbox_imagebuttonboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineImageButtonBoxSkin_Class_s NW_FBox_InlineImageButtonBoxSkin_Class_t; -typedef struct NW_FBox_InlineImageButtonBoxSkin_s NW_FBox_InlineImageButtonBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineImageButtonBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineImageButtonBoxSkin_ClassPart_t; - -struct NW_FBox_InlineImageButtonBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_ImageButtonBoxSkin_ClassPart_t NW_FBox_ImageButtonBoxSkin; - NW_FBox_InlineImageButtonBoxSkin_ClassPart_t NW_FBox_InlineImageButtonBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineImageButtonBoxSkin_s { - NW_FBox_ImageButtonBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineImageButtonBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineImageButtonBoxSkin)) - -#define NW_FBox_InlineImageButtonBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineImageButtonBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineImageButtonBoxSkin_Class_t NW_FBox_InlineImageButtonBoxSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineImageButtonBoxSkin_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineimagebuttonboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineimagebuttonboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_InlineImageButtonBoxSkinI_H -#define NW_FBOX_InlineImageButtonBoxSkinI_H - -#include "nw_fbox_imagebuttonboxskini.h" -#include "nw_fbox_inlineimagebuttonboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineImageButtonBoxSkinI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputinteractor.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputinteractor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEINPUTINTERACTOR_H -#define NW_FBOX_INLINEINPUTINTERACTOR_H - -#include "nw_fbox_inputinteractor.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_keymapper.h" -#include "nw_evt_keyevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineInputInteractor_Class_s NW_FBox_InlineInputInteractor_Class_t; -typedef struct NW_FBox_InlineInputInteractor_s NW_FBox_InlineInputInteractor_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineInputInteractor_ClassPart_s { - void** unused; -} NW_FBox_InlineInputInteractor_ClassPart_t; - -struct NW_FBox_InlineInputInteractor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Interactor_ClassPart_t NW_FBox_Interactor; - NW_FBox_InputInteractor_ClassPart_t NW_FBox_InputInteractor; - NW_FBox_InlineInputInteractor_ClassPart_t NW_FBox_InlineInputInteractor; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineInputInteractor_s { - NW_FBox_InputInteractor_t super; - - /* member variables */ - NW_Uint32 lastKeyEventTime; - NW_Ucs2 lastKeyType; - NW_Uint8 repeated; - NW_FBox_KeyMapper_Mode_t previousMode; - NW_Bool doubleHash; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineInputInteractor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineInputInteractor)) - -#define NW_FBox_InlineInputInteractorOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineInputInteractor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineInputInteractor_Class_t NW_FBox_InlineInputInteractor_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputinteractori.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputinteractori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEINPUTINTERACTORI_H -#define NW_FBOX_INLINEINPUTINTERACTORI_H - -#include "nw_fbox_inputinteractori.h" -#include "nw_fbox_inlineinputinteractor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputInteractor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_InlineInputInteractor_ProcessEvent( - NW_FBox_Interactor_t* interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEINPUTINTERACTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEINPUTSKIN_H -#define NW_FBOX_INLINEINPUTSKIN_H - -#include "nw_fbox_inputskin.h" -#include "nw_fbox_formbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineInputSkin_Class_s NW_FBox_InlineInputSkin_Class_t; -typedef struct NW_FBox_InlineInputSkin_s NW_FBox_InlineInputSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineInputSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineInputSkin_ClassPart_t; - -struct NW_FBox_InlineInputSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_InputSkin_ClassPart_t NW_FBox_InputSkin; - NW_FBox_InlineInputSkin_ClassPart_t NW_FBox_InlineInputSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineInputSkin_s { - NW_FBox_InputSkin_t super; - - /* member variables */ - NW_Text_Length_t displayIndex; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineInputSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineInputSkin)) - -#define NW_FBox_InlineInputSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineInputSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineInputSkin_Class_t NW_FBox_InlineInputSkin_Class; - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEINPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineinputskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEINPUTSKINI_H -#define NW_FBOX_INLINEINPUTSKINI_H - -#include "nw_fbox_inputskini.h" -#include "nw_fbox_inlineinputskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_DrawText(NW_FBox_InputSkin_t* skin, - CGDIDeviceContext* deviceContext); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_MoveCursorRight(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_MoveCursorLeft(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_ClearLastChar(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_SetDisplayText(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_SetActive(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineInputSkin_DetailsDialog(NW_FBox_InputSkin_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEINPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinekeymapper.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinekeymapper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEKEYMAPPER_H -#define NW_FBOX_INLINEKEYMAPPER_H - -#include "nw_fbox_tablekeymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineKeyMapper_Class_s NW_FBox_InlineKeyMapper_Class_t; -typedef const NW_Object_Base_t NW_FBox_InlineKeyMapper_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineKeyMapper_ClassPart_s { - void** unused; -} NW_FBox_InlineKeyMapper_ClassPart_t; - -struct NW_FBox_InlineKeyMapper_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_FBox_KeyMapper_ClassPart_t NW_FBox_KeyMapper; - NW_FBox_TableKeyMapper_ClassPart_t NW_FBox_TableKeyMapper; - NW_FBox_InlineKeyMapper_ClassPart_t NW_FBox_InlineKeyMapper; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineKeyMapper_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineKeyMapper)) - -#define NW_FBox_InlineKeyMapperOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineKeyMapper)) - - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineKeyMapper_Class_t NW_FBox_InlineKeyMapper_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEKEYMAPPER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinekeymapperi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinekeymapperi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEKEYMAPPERI_H -#define NW_FBOX_INLINEKEYMAPPERI_H - -#include "nw_fbox_tablekeymapperi.h" -#include "nw_fbox_inlinekeymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEKEYMAPPERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptgrpskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptgrpskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEOPTGRPSKIN_H -#define NW_FBOX_INLINEOPTGRPSKIN_H - -#include "nw_fbox_optgrpskin.h" -#include "nw_fbox_formbox.h" -#include "nw_lmgr_bidiflowbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineOptGrpSkin_Class_s NW_FBox_InlineOptGrpSkin_Class_t; -typedef struct NW_FBox_InlineOptGrpSkin_s NW_FBox_InlineOptGrpSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineOptGrpSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineOptGrpSkin_ClassPart_t; - -struct NW_FBox_InlineOptGrpSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptGrpSkin_ClassPart_t NW_FBox_OptGrpSkin; - NW_FBox_InlineOptGrpSkin_ClassPart_t NW_FBox_InlineOptGrpSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineOptGrpSkin_s { - NW_FBox_OptGrpSkin_t super; - - /* member variables */ - NW_LMgr_BidiFlowBox_t* bidiFlowBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineOptGrpSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineOptGrpSkin)) - -#define NW_FBox_InlineOptGrpSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineOptGrpSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineOptGrpSkin_Class_t NW_FBox_InlineOptGrpSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_InlineOptGrpSkin_GetBidiFlowBox(_object)\ - (NW_FBox_InlineOptGrpSkinOf(_object)->bidiFlowBox) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineOPTGRPSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptgrpskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptgrpskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEOPTGRPSKINI_H -#define NW_FBOX_INLINEOPTGRPSKINI_H - -#include "nw_fbox_optgrpskini.h" -#include "nw_fbox_inlineoptgrpskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineOptGrpSkin_Construct(NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineOptGrpSkin_AddOption(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptionBox_t* optionBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineOptGrpSkin_AddOptGrp(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptGrpBox_t* optGrpBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINEOPTGRPSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptionskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptionskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEOPTIONSKIN_H -#define NW_FBOX_INLINEOPTIONSKIN_H - -#include "nw_fbox_optionboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineOptionSkin_Class_s NW_FBox_InlineOptionSkin_Class_t; -typedef struct NW_FBox_InlineOptionSkin_s NW_FBox_InlineOptionSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineOptionSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineOptionSkin_ClassPart_t; - -struct NW_FBox_InlineOptionSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptionBoxSkin_ClassPart_t NW_FBox_OptionBoxSkin; - NW_FBox_InlineOptionSkin_ClassPart_t NW_FBox_InlineOptionSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineOptionSkin_s { - NW_FBox_OptionBoxSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineOptionSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineOptionSkin)) - -#define NW_FBox_InlineOptionSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineOptionSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineOptionSkin_Class_t NW_FBox_InlineOptionSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineOPTIONSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptionskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineoptionskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINEOPTIONSKINI_H -#define NW_FBOX_INLINEOPTIONSKINI_H - -#include "nw_fbox_optionboxskini.h" -#include "nw_fbox_inlineoptionskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineOptionSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineOptionSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_ISAOPTIONSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineselectskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineselectskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINESELECTSKIN_H -#define NW_FBOX_INLINESELECTSKIN_H - -#include "nw_fbox_buttonboxskin.h" -#include "nw_fbox_formbox.h" -#include "nw_lmgr_bidiflowbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineSelectSkin_Class_s NW_FBox_InlineSelectSkin_Class_t; -typedef struct NW_FBox_InlineSelectSkin_s NW_FBox_InlineSelectSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineSelectSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineSelectSkin_ClassPart_t; - -struct NW_FBox_InlineSelectSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_SelectSkin_ClassPart_t NW_FBox_SelectSkin; - NW_FBox_InlineSelectSkin_ClassPart_t NW_FBox_InlineSelectSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineSelectSkin_s { - NW_FBox_SelectSkin_t super; - - /* member variables */ - NW_LMgr_BidiFlowBox_t* bidiFlowBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineSelectSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineSelectSkin)) - -#define NW_FBox_InlineSelectSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineSelectSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineSelectSkin_Class_t NW_FBox_InlineSelectSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineINPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlineselectskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlineselectskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINESELECTSKINI_H -#define NW_FBOX_INLINESELECTSKINI_H - -#include "nw_fbox_selectskini.h" -#include "nw_fbox_inlineselectskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_InlineSelectSkin_Destruct(NW_Object_Dynamic_t* dynamicObject); - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_SetActive(NW_FBox_SelectSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_DrawBorder(NW_FBox_ButtonBoxSkin_t* thisObj, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_AddOption(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** stylebox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_AddOptGrp(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptGrpBox_t* optGrpBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_DetailsDialog(NW_FBox_SelectSkin_t* skin); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineSelectSkin_RefreshText(NW_FBox_SelectSkin_t* skin); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_InlineINPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinetextareaskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinetextareaskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINETEXTAREASKIN_H -#define NW_FBOX_INLINETEXTAREASKIN_H - -#include "nw_fbox_textareaskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineTextAreaSkin_Class_s NW_FBox_InlineTextAreaSkin_Class_t; -typedef struct NW_FBox_InlineTextAreaSkin_s NW_FBox_InlineTextAreaSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InlineTextAreaSkin_ClassPart_s { - void** unused; -} NW_FBox_InlineTextAreaSkin_ClassPart_t; - -struct NW_FBox_InlineTextAreaSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_InputSkin_ClassPart_t NW_FBox_InputSkin; - NW_FBox_TextAreaSkin_ClassPart_t NW_FBox_TextAreaSkin; - NW_FBox_InlineTextAreaSkin_ClassPart_t NW_FBox_InlineTextAreaSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InlineTextAreaSkin_s { - NW_FBox_InputSkin_t super; - - /* member variables */ - NW_Uint16 displayRowOffset; - NW_ADT_DynamicVector_t* textList; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InlineTextAreaSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InlineTextAreaSkin)) - -#define NW_FBox_InlineTextAreaSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InlineTextAreaSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InlineTextAreaSkin_Class_t NW_FBox_InlineTextAreaSkin_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINETEXTAREASKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inlinetextareaskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inlinetextareaskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INLINETEXTAREASKINI_H -#define NW_FBOX_INLINETEXTAREASKINI_H - -#include "nw_fbox_textareaskini.h" -#include "nw_fbox_inlinetextareaskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_InlineTextAreaSkin_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_DrawText(NW_FBox_InputSkin_t* thisObj, - CGDIDeviceContext* deviceContext); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_MoveCursorRight(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_MoveCursorLeft(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_ClearLastChar(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_SetDisplayText(NW_FBox_InputSkin_t* thisObj); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_SetActive(NW_FBox_InputSkin_t* skin); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InlineTextAreaSkin_DetailsDialog(NW_FBox_InputSkin_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INLINETEXTAREASKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,259 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTBOX_H -#define NW_FBOX_INPUTBOX_H - -#include "nw_fbox_formbox.h" -#include "nw_text_ucs2.h" -#include "nw_fbox_keymapper.h" -#include "nw_fbox_editablestring.h" -#include "nw_fbox_clearaction.h" -#include "nw_fbox_okaction.h" -#include "nw_hed_appservices.h" -#include "NW_FBox_Validator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - constants - * ------------------------------------------------------------------------- */ -#define NW_FBox_InputBox_MaxCharacters (NW_Text_Length_t)0x00ffffff - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputBox_Class_s NW_FBox_InputBox_Class_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -typedef -NW_Uint16 -(*NW_FBox_InputBox_GetHeight_t) (NW_FBox_InputBox_t* thisObj); - -typedef -void -(*NW_FBox_InputBox_SetHeight_t) (NW_FBox_InputBox_t* thisObj, NW_Uint16 height); - -typedef -TBrowserStatusCode -(*NW_FBox_InputBox_SetDisplayText_t)(NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn); - -typedef -TBrowserStatusCode -(*NW_FBox_InputBox_ModifyBuffer_t)(NW_FBox_InputBox_t* inputBox, - NW_Ucs2 c, - NW_Uint32 repeated); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputBox_ClassPart_s { - NW_FBox_InputBox_GetHeight_t getHeight; - NW_FBox_InputBox_SetHeight_t setHeight; - NW_FBox_InputBox_SetDisplayText_t setDisplayText; - NW_FBox_InputBox_ModifyBuffer_t modifyBuffer; -} NW_FBox_InputBox_ClassPart_t; - -struct NW_FBox_InputBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_InputBox_ClassPart_t NW_FBox_InputBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InputBox_s { - NW_FBox_FormBox_t super; - - /* member variables */ - NW_Text_Length_t cursorPosition; - NW_Text_Length_t maxChars; - NW_Text_Length_t width; - NW_Bool active; - NW_Bool focus; - NW_Bool readonly; - NW_Bool disabled; - NW_Bool IsMaxlength; - NW_FBox_KeyMapper_Mode_t mode; - NW_Ucs2* title; - NW_FBox_Validator_t* validator; - NW_FBox_EditableString_t* editableString; - NW_FBox_OkAction_t* okAction; - NW_FBox_ClearAction_t* clearAction; - NW_Text_t* value; - NW_HED_AppServices_t* appServices; - NW_Bool initialValueUsed; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InputBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InputBox)) - -#define NW_FBox_InputBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_InputBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InputBox_Class_t NW_FBox_InputBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_InputBox_GetMaxChars(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->maxChars) - -#define NW_FBox_InputBox_GetMode(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->mode) - -#define NW_FBox_InputBox_SetMode(_inputBox, _mode) \ - (NW_FBox_InputBoxOf(_inputBox)->mode = _mode) - -#define NW_FBox_InputBox_GetValidator(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->validator) - -#define NW_FBox_InputBox_SetValidator(_inputBox, _validator) \ - (NW_FBox_InputBoxOf(_inputBox)->validator = (_validator)) - -#define NW_FBox_InputBox_GetTitle(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->title) - -#define NW_FBox_InputBox_SetTitle(_inputBox, _title) \ - (NW_FBox_InputBoxOf(_inputBox)->title = _title) - -#define NW_FBox_InputBox_IsActive(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->active) - -#define NW_FBox_InputBox_IsFocus( _inputBox ) \ - ( NW_FBox_InputBoxOf( _inputBox )->focus ) - -#define NW_FBox_InputBox_SetMaxChars(_inputBox, _maxChars) \ - (NW_FBox_InputBoxOf(_inputBox)->maxChars = _maxChars) - -#define NW_FBox_InputBox_SetIsMaxlength(_inputBox, _val) \ - (NW_FBox_InputBoxOf(_inputBox)->IsMaxlength = _val) - -#define NW_FBox_InputBox_GetIsMaxlength(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->IsMaxlength) - -#define NW_FBox_InputBox_GetWidth(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->width) - -#define NW_FBox_InputBox_SetWidth(_inputBox, _width) \ - (NW_FBox_InputBoxOf(_inputBox)->width = _width) - -#define NW_FBox_InputBox_GetCursorPosition(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->cursorPosition) - -#define NW_FBox_InputBox_GetEditableString(_inputBox) \ - (NW_FBox_InputBoxOf(_inputBox)->editableString) - -#define NW_FBox_InputBox_SetCursorPosition(_inputBox, _cursorPosition) \ - (NW_FBox_InputBoxOf(_inputBox)->cursorPosition = _cursorPosition) - -#define NW_FBox_InputBox_GetHeight(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputBox, getHeight) \ - ((_object))) - -#define NW_FBox_InputBox_SetHeight(_object, _height) \ - (NW_Object_Invoke (_object, NW_FBox_InputBox, setHeight) \ - ((_object), (_height))) - -#define NW_FBox_InputBox_SetDisplayText(_object, _bufferModificationOn) \ - (NW_Object_Invoke (_object, NW_FBox_InputBox, setDisplayText) \ - ((_object), (_bufferModificationOn))) - -#define NW_FBox_InputBox_ModifyBuffer(_object, _c, _repeated) \ - (NW_Object_Invoke (_object, NW_FBox_InputBox, modifyBuffer) \ - ((_object), (_c), (_repeated))) - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputBox_AppendBuffer(NW_FBox_InputBox_t* inputBox, - NW_Ucs2 c, - NW_Uint32 repeated); - -NW_FBOX_EXPORT -NW_Text_Length_t -NW_FBox_InputBox_GetBufferLength(NW_FBox_InputBox_t* inputBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputBox_CheckFormLiaisonVal(NW_FBox_InputBox_t* inputBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputBox_SetFormLiaisonVal(NW_FBox_InputBox_t* inputBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputBox_SetDefaultVal(NW_FBox_InputBox_t* inputBox, - NW_Text_t* defaultVal); - -NW_FBOX_EXPORT -void -NW_FBox_InputBox_SetActive(NW_FBox_InputBox_t* inputBox, NW_Bool active); - -NW_FBOX_EXPORT -void -NW_FBox_InputBox_SetFocus( NW_FBox_InputBox_t* inputBox, NW_Bool active ); - -NW_FBOX_EXPORT -void -NW_FBox_InputBox_SetVKB( NW_FBox_InputBox_t* inputBox); - - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputBox_GetFormat(NW_FBox_InputBox_t* thisObj, - const NW_Text_t** format, - NW_FBox_Validator_Mode_t* mode, - NW_FBox_Validator_EmptyOk_t* emptyOk); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_InputBox_t* -NW_FBox_InputBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 columns, - NW_HED_AppServices_t* appServices); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTBOXI_H -#define NW_FBOX_INPUTBOXI_H - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_inputbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_InputBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_Uint16 -_NW_FBox_InputBox_GetHeight(NW_FBox_InputBox_t* box); - -NW_FBOX_EXPORT -void -_NW_FBox_InputBox_SetHeight(NW_FBox_InputBox_t* box, NW_Uint16 height); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputBox_SetDisplayText(NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_InputBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_InputBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputBox_Reset (NW_FBox_FormBox_t* box); - -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_InputBox_GetBaseline (NW_LMgr_Box_t* box); - -extern -TBrowserStatusCode -_NW_FBox_InputBox_ModifyBuffer(NW_FBox_InputBox_t* inputBox, - NW_Ucs2 c, - NW_Uint32 repeated); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputBox_Split(NW_LMgr_Box_t* thisObj, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_InputBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputinteractor.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputinteractor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTINTERACTOR_H -#define NW_FBOX_INPUTINTERACTOR_H - -#include "nw_fbox_interactor.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_keymapper.h" -#include "nw_evt_keyevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputInteractor_Class_s NW_FBox_InputInteractor_Class_t; -typedef struct NW_FBox_InputInteractor_s NW_FBox_InputInteractor_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputInteractor_ClassPart_s { - void** unused; -} NW_FBox_InputInteractor_ClassPart_t; - -struct NW_FBox_InputInteractor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Interactor_ClassPart_t NW_FBox_Interactor; - NW_FBox_InputInteractor_ClassPart_t NW_FBox_InputInteractor; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InputInteractor_s { - NW_FBox_Interactor_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InputInteractor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InputInteractor)) - -#define NW_FBox_InputInteractorOf(object) \ - (NW_Object_Cast (object, NW_FBox_InputInteractor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InputInteractor_Class_t NW_FBox_InputInteractor_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_InputInteractor_t* -NW_FBox_InputInteractor_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTINTERACTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputinteractori.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputinteractori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTINTERACTORI_H -#define NW_FBOX_INPUTINTERACTORI_H - -#include "nw_fbox_interactori.h" -#include "nw_fbox_inputinteractor.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_InputInteractor_ProcessEvent( - NW_FBox_Interactor_t* interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTINTERACTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTSKIN_H -#define NW_FBOX_INPUTSKIN_H - -#include "nw_fbox_buttonboxskin.h" -#include "nw_fbox_inputbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputSkin_Class_s NW_FBox_InputSkin_Class_t; -typedef struct NW_FBox_InputSkin_s NW_FBox_InputSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_DrawText_t)(NW_FBox_InputSkin_t* thisObj, - CGDIDeviceContext* deviceContext); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_DrawCursor_t)(NW_FBox_InputSkin_t* thisObj, - CGDIDeviceContext* deviceContext, - NW_GDI_Point2D_t *start); -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_MoveCursorLeft_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_MoveCursorRight_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_ClearLastChar_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_SetDisplayText_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_SetDefaultVal_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_SetActive_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -( *NW_FBox_InputSkin_SetFocus_t )( NW_FBox_InputSkin_t* thisObj, NW_Bool focus ); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_DetailsDialog_t)(NW_FBox_InputSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_Split_t)(NW_FBox_InputSkin_t* thisObj, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - -typedef -TBrowserStatusCode -(*NW_FBox_InputSkin_SetVKB_t)(NW_FBox_InputSkin_t* thisObj); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_InputSkin_ClassPart_s { - NW_FBox_InputSkin_DrawText_t drawText; - NW_FBox_InputSkin_MoveCursorLeft_t moveCursorLeft; - NW_FBox_InputSkin_MoveCursorRight_t moveCursorRight; - NW_FBox_InputSkin_ClearLastChar_t clearLastChar; - NW_FBox_InputSkin_SetDisplayText_t setDisplayText; - NW_FBox_InputSkin_SetActive_t setActive; - NW_FBox_InputSkin_SetFocus_t setFocus; - NW_FBox_InputSkin_DetailsDialog_t detailsDialog; - NW_FBox_InputSkin_Split_t split; - NW_FBox_InputSkin_SetVKB_t setVKB; -} NW_FBox_InputSkin_ClassPart_t; - -struct NW_FBox_InputSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_InputSkin_ClassPart_t NW_FBox_InputSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_InputSkin_s { - NW_FBox_ButtonBoxSkin_t super; - - /* member variables */ - NW_Text_t* displayText; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_InputSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_InputSkin)) - -#define NW_FBox_InputSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_InputSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_InputSkin_Class_t NW_FBox_InputSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_InputSkin_DrawText(_object, _deviceContext) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, drawText) \ - ((_object), (_deviceContext))) - -#define NW_FBox_InputSkin_DrawCursor(_object, _deviceContext, _start) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, drawCursor) \ - ((_object), (_deviceContext), (_start))) - -#define NW_FBox_InputSkin_MoveCursorLeft(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, moveCursorLeft) \ - ((_object))) - -#define NW_FBox_InputSkin_MoveCursorRight(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, moveCursorRight) \ - ((_object))) - -#define NW_FBox_InputSkin_ClearLastChar(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, clearLastChar) \ - ((_object))) - -#define NW_FBox_InputSkin_SetDisplayText(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, setDisplayText) \ - ((_object))) - -#define NW_FBox_InputSkin_SetActive(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, setActive) \ - ((_object))) - -#define NW_FBox_InputSkin_SetFocus( _object, _focus ) \ - ( NW_Object_Invoke( _object, NW_FBox_InputSkin, setFocus ) \ - ( ( _object ), ( _focus ) ) ) - -#define NW_FBox_InputSkin_DetailsDialog(_object) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, detailsDialog) \ - ((_object))) - -#define NW_FBox_InputSkin_Split(_object, _space, _splitBox, _flags) \ - (NW_Object_Invoke (_object, NW_FBox_InputSkin, split) \ - ((_object), (_space), (_splitBox), (_flags))) - -#define NW_FBox_InputSkin_SetVKB( _object) \ - ( NW_Object_Invoke( _object, NW_FBox_InputSkin, setVKB) \ - ( ( _object )) ) - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_InputSkin_GetMCharExtent(NW_FBox_InputSkin_t* skin, - NW_GDI_Dimension2D_t *charExtent); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_InputSkin_t* -NW_FBox_InputSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_inputskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_inputskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INPUTSKINI_H -#define NW_FBOX_INPUTSKINI_H - -#include "nw_fbox_buttonboxskini.h" -#include "nw_fbox_inputskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_InputSkin_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_DrawText(NW_FBox_InputSkin_t* thisObj, - CGDIDeviceContext* deviceContext); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_SetActive (NW_FBox_InputSkin_t* skin); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_InputSkin_SetFocus( NW_FBox_InputSkin_t* skin, NW_Bool focus ); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_InputSkin_GetInputBox(_skin) \ - (NW_FBox_InputBoxOf(NW_FBox_Skin_GetFormBox(_skin))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_interactor.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_interactor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INTERACTOR_H -#define NW_FBOX_INTERACTOR_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_activebox.h" -#include "nw_evt_event.h" -#include "NW_FBox_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Interactor_Class_s NW_FBox_Interactor_Class_t; -typedef struct NW_FBox_Interactor_s NW_FBox_Interactor_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -NW_Uint8 -(*NW_FBox_Interactor_ProcessEvent_t) (NW_FBox_Interactor_t* Interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event); - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Interactor_ClassPart_s { - NW_FBox_Interactor_ProcessEvent_t processEvent; -} NW_FBox_Interactor_ClassPart_t; - -struct NW_FBox_Interactor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Interactor_ClassPart_t NW_FBox_Interactor; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Interactor_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_LMgr_Box_t* formBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Interactor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Interactor)) - -#define NW_FBox_InteractorOf(object) \ - (NW_Object_Cast (object, NW_FBox_Interactor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Interactor_Class_t NW_FBox_Interactor_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_Interactor_GetFormBox(_object)\ - (NW_FBox_InteractorOf(_object)->formBox) - -#define NW_FBox_Interactor_ProcessEvent(_object, _box, _event) \ - (NW_Object_Invoke (_object, NW_FBox_Interactor, processEvent) \ - ((_object), (_box), (_event))) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INTERACTOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_interactori.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_interactori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_INTERACTORI_H -#define NW_FBOX_INTERACTORI_H - -#include "nw_object_dynamici.h" -#include "nw_fbox_interactor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_Interactor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INTERACTORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_keyboardevent.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_keyboardevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_KEYBOARDEVENT_H -#define NW_FBOX_KEYBOARDEVENT_H - -#include "nw_evt_event.h" -#include "NW_FBox_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_KeyBoardEvent_Class_s NW_FBox_KeyBoardEvent_Class_t; -typedef struct NW_FBox_KeyBoardEvent_s NW_FBox_KeyBoardEvent_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_FBox_KeyBoardEvent_KeyType_e { - NW_FBox_KeyBoardEvent_KeyType_CharKeySet, - NW_FBox_KeyBoardEvent_KeyType_ExtendedKeySet -}NW_FBox_KeyBoardEvent_KeyType_t; - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_KeyBoardEvent_ClassPart_s { - void** unused; -} NW_FBox_KeyBoardEvent_ClassPart_t; - -struct NW_FBox_KeyBoardEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_FBox_KeyBoardEvent_ClassPart_t NW_FBox_KeyBoardEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_FBox_KeyBoardEvent_s { - NW_Evt_Event_t super; - - /* member variables */ - NW_Ucs2 c; - NW_FBox_KeyBoardEvent_KeyType_t keyType; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_KeyBoardEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_KeyBoardEvent)) - -#define NW_FBox_KeyBoardEventOf(_object) \ - (NW_Object_Cast (_object, NW_FBox_KeyBoardEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_KeyBoardEvent_Class_t NW_FBox_KeyBoardEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_FBox_KeyBoardEvent_GetChar(_object) \ - (NW_FBox_KeyBoardEventOf (_object)->c) - -#define NW_FBox_KeyBoardEvent_GetKeyType(_object) \ - ((const NW_FBox_KeyBoardEvent_KeyType_t) NW_FBox_KeyBoardEventOf (_object)->keyType) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_KeyBoardEvent_Initialize (NW_FBox_KeyBoardEvent_t* event, - NW_Ucs2 c, NW_FBox_KeyBoardEvent_KeyType_t keyType); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_KEYBOARDEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_keyboardeventi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_keyboardeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_KEYBOARDEVENTI_H -#define NW_LMGR_KEYBOARDEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_fbox_keyboardevent.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_KeyBoardEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_KEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_keymapper.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_keymapper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_KEYMAPPER_H -#define NW_FBOX_KEYMAPPER_H - -#include "nw_object_base.h" -#include "nw_evt_keyevent.h" -#include "NW_FBox_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_KeyMapper_Class_s NW_FBox_KeyMapper_Class_t; -typedef const NW_Object_Base_t NW_FBox_KeyMapper_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_FBox_KeyMapper_Mode_e { - NW_FBox_KeyMapper_Mode_Lowercase, - NW_FBox_KeyMapper_Mode_Uppercase, - NW_FBox_KeyMapper_Mode_Numeric, - NW_FBox_KeyMapper_Mode_Locked = 0x80 -} NW_FBox_KeyMapper_Mode_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Ucs2 -(*NW_FBox_KeyMapper_MapKey_t) (NW_FBox_KeyMapper_t* thisObj, - NW_FBox_KeyMapper_Mode_t* mode, - NW_Ucs2 key, - NW_Uint8 *repeated); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_KeyMapper_ClassPart_s { - NW_FBox_KeyMapper_MapKey_t mapKey; -} NW_FBox_KeyMapper_ClassPart_t; - -struct NW_FBox_KeyMapper_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_FBox_KeyMapper_ClassPart_t NW_FBox_KeyMapper; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_KeyMapper_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_KeyMapper)) - -#define NW_FBox_KeyMapperOf(object) \ - (NW_Object_Cast (object, NW_FBox_KeyMapper)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_KeyMapper_Class_t NW_FBox_KeyMapper_Class; -NW_FBOX_EXPORT NW_FBox_KeyMapper_t NW_FBox_KeyMapper; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_KeyMapper_MapKey(_object, _mode, _key, _repeated) \ - (NW_Object_Invoke (_object, NW_FBox_KeyMapper, mapKey) \ - ((_object), (_mode), (_key), (_repeated))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_KEYMAPPER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_keymapperi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_keymapperi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_KEYMAPPERI_H -#define NW_FBOX_KEYMAPPERI_H - -#include "nw_object_basei.h" -#include "nw_fbox_keymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_Input_KeyMapperI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_okaction.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_okaction.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OKACTION_H -#define NW_FBOX_OKACTION_H - -#include "nw_lmgr_action.h" -#include "nw_fbox_clearaction.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OkAction_Class_s NW_FBox_OkAction_Class_t; -typedef struct NW_FBox_OkAction_s NW_FBox_OkAction_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OkAction_ClassPart_s { - void** unused; -} NW_FBox_OkAction_ClassPart_t; - -struct NW_FBox_OkAction_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Action_ClassPart_t NW_LMgr_Action; - NW_FBox_OkAction_ClassPart_t NW_FBox_OkAction; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ - -struct NW_FBox_OkAction_s { - NW_LMgr_Action_t super; - - NW_Text_UCS2_t* label; - const NW_FBox_InputBox_t* ownerBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_OkAction_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_OkAction)) - -#define NW_FBox_OkActionOf(_object) \ - (NW_Object_Cast (_object, NW_FBox_OkAction)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_OkAction_Class_t NW_FBox_OkAction_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_FBox_OkAction_t* -NW_FBox_OkAction_New (NW_FBox_InputBox_t* inputBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_FBox_Action_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_okactioni.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_okactioni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OKACTIONI_H -#define NW_FBOX_OKACTIONI_H - -#include "nw_lmgr_actioni.h" -#include "nw_fbox_okaction.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_OkAction_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_OkAction_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -void -_NW_FBox_OkAction_Invoke(NW_LMgr_Action_t* Action); - -NW_FBOX_EXPORT -const NW_Text_t* -_NW_FBox_OkAction_GetLabel(NW_LMgr_Action_t* Action); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OKACTIONI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optgrpbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optgrpbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTGRPBOX_H -#define NW_FBOX_OPTGRPBOX_H - -#include "nw_fbox_formbox.h" -#include "nw_fbox_optionbox.h" -#include "nw_adt_dynamicvector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptGrpBox_Class_s NW_FBox_OptGrpBox_Class_t; -typedef struct NW_FBox_OptGrpBox_s NW_FBox_OptGrpBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptGrpBox_ClassPart_s { - void** unused; -} NW_FBox_OptGrpBox_ClassPart_t; - -struct NW_FBox_OptGrpBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_OptGrpBox_ClassPart_t NW_FBox_OptGrpBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_OptGrpBox_s { - NW_FBox_FormBox_t super; - - /* member variables */ - NW_Text_t* text; - NW_ADT_DynamicVector_t* children; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_OptGrpBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_OptGrpBox)) - -#define NW_FBox_OptGrpBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_OptGrpBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_OptGrpBox_Class_t NW_FBox_OptGrpBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_OptGrpBox_GetText(_optGrpBox) \ - (NW_FBox_OptGrpBoxOf(_optGrpBox)->text) - -NW_FBOX_EXPORT -void -NW_FBox_OptGrpBox_AddOption(NW_FBox_OptGrpBox_t* optGrpBox, - NW_FBox_OptionBox_t* optionBox); - -NW_FBOX_EXPORT -void -NW_FBox_OptGrpBox_AddOptGrp(NW_FBox_OptGrpBox_t* optGrpBox, - NW_FBox_OptGrpBox_t* childOptGrpBox); - -NW_FBOX_EXPORT -NW_ADT_Vector_Metric_t -NW_FBox_OptGrpBox_GetNumOptions(NW_FBox_OptGrpBox_t* optGrpBox); - -NW_FBOX_EXPORT -NW_FBox_OptionBox_t* -NW_FBox_OptGrpBox_GetOption(NW_FBox_OptGrpBox_t* optGrpBox, - NW_ADT_Vector_Metric_t index); - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_OptGrpBox_t* -NW_FBox_OptGrpBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* text); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OPTGRPBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optgrpboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optgrpboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTGRPBOXI_H -#define NW_FBOX_OPTGRPBOXI_H - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_optgrpbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_OptGrpBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_OptGrpBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_OptGrpBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_OptGrpBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_OptGrpBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OPTGRPI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optgrpskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optgrpskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTGRPSKIN_H -#define NW_FBOX_OPTGRPSKIN_H - -#include "nw_fbox_skin.h" -#include "nw_fbox_optgrpbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptGrpSkin_Class_s NW_FBox_OptGrpSkin_Class_t; -typedef struct NW_FBox_OptGrpSkin_s NW_FBox_OptGrpSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_FBox_OptGrpSkin_AddOption_t)(NW_FBox_OptGrpSkin_t* thisObj, - NW_FBox_OptionBox_t* optionBox); - -typedef -TBrowserStatusCode -(*NW_FBox_OptGrpSkin_AddOptGrp_t)(NW_FBox_OptGrpSkin_t* thisObj, - NW_FBox_OptGrpBox_t* optGrpBox); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptGrpSkin_ClassPart_s { - NW_FBox_OptGrpSkin_AddOption_t addOption; - NW_FBox_OptGrpSkin_AddOptGrp_t addOptGrp; -} NW_FBox_OptGrpSkin_ClassPart_t; - -struct NW_FBox_OptGrpSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptGrpSkin_ClassPart_t NW_FBox_OptGrpSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_OptGrpSkin_s { - NW_FBox_Skin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_OptGrpSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_OptGrpSkin)) - -#define NW_FBox_OptGrpSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_OptGrpSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_OptGrpSkin_Class_t NW_FBox_OptGrpSkin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_OptGrpSkin_AddOption(_object, _optionBox) \ - (NW_Object_Invoke (_object, NW_FBox_OptGrpSkin, addOption) \ - ((_object), (_optionBox))) - -#define NW_FBox_OptGrpSkin_AddOptGrp(_object, _optGrpBox) \ - (NW_Object_Invoke (_object, NW_FBox_OptGrpSkin, addOptGrp) \ - ((_object), (_optGrpBox))) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_OptGrpSkin_t* -NW_FBox_OptGrpSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optgrpskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optgrpskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTGRPSKINI_H -#define NW_FBOX_OPTGRPSKINI_H - -#include "nw_fbox_skini.h" -#include "nw_fbox_optgrpskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OPTIONBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optionbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optionbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTIONBOX_H -#define NW_FBOX_OPTIONBOX_H - -#include "nw_fbox_checkbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptionBox_Class_s NW_FBox_OptionBox_Class_t; -typedef struct NW_FBox_OptionBox_s NW_FBox_OptionBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptionBox_ClassPart_s { - void** unused; -} NW_FBox_OptionBox_ClassPart_t; - -struct NW_FBox_OptionBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_CheckBox_ClassPart_t NW_FBox_CheckBox; - NW_FBox_OptionBox_ClassPart_t NW_FBox_OptionBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_OptionBox_s { - NW_FBox_CheckBox_t super; - - /* member variables */ - NW_Text_t* text; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_OptionBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_OptionBox)) - -#define NW_FBox_OptionBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_OptionBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_OptionBox_Class_t NW_FBox_OptionBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_OptionBox_GetText(_optionBox) \ - (NW_FBox_OptionBoxOf(_optionBox)->text) - -NW_FBOX_EXPORT -NW_Bool -NW_FBox_OptionBox_IsMultiple(NW_FBox_OptionBox_t* optionBox); - -NW_FBOX_EXPORT -NW_Bool -NW_FBox_OptionBox_IsSelected(NW_FBox_OptionBox_t* optionBox); - -NW_Bool -NW_FBox_OptionBox_HasOnPick(NW_FBox_OptionBox_t* optionBox); - -NW_Bool -NW_FBox_OptionBox_IsLocalNavOnPick(NW_FBox_OptionBox_t* optionBox); - -NW_FBOX_EXPORT -void -NW_FBox_OptionBox_ChangeState(NW_FBox_OptionBox_t* optionBox); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_OptionBox_t* -NW_FBox_OptionBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* text); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_CHECKBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optionboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optionboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTIONBOXI_H -#define NW_FBOX_OPTIONBOXI_H - -#include "nw_fbox_checkboxi.h" -#include "nw_fbox_optionbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_OptionBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_OptionBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_OptionBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_OptionBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_OptionBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OPTIONBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optionboxskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optionboxskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTIONBOXSKIN_H -#define NW_FBOX_OPTIONBOXSKIN_H - -#include "nw_fbox_skin.h" -#include "nw_fbox_formbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptionBoxSkin_Class_s NW_FBox_OptionBoxSkin_Class_t; -typedef struct NW_FBox_OptionBoxSkin_s NW_FBox_OptionBoxSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_OptionBoxSkin_ClassPart_s { - void** unused; -} NW_FBox_OptionBoxSkin_ClassPart_t; - -struct NW_FBox_OptionBoxSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_OptionBoxSkin_ClassPart_t NW_FBox_OptionBoxSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_OptionBoxSkin_s { - NW_FBox_Skin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_OptionBoxSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_OptionBoxSkin)) - -#define NW_FBox_OptionBoxSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_OptionBoxSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_OptionBoxSkin_Class_t NW_FBox_OptionBoxSkin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_OptionBoxSkin_t* -NW_FBox_OptionBoxSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_optionboxskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_optionboxskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_OPTIONBOXSKINI_H -#define NW_FBOX_OPTIONBOXSKINI_H - -#include "nw_fbox_skini.h" -#include "nw_fbox_optionboxskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_OPTIONBOXSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_passwordbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_passwordbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_PASSWORDBOX_H -#define NW_FBOX_PASSWORDBOX_H - -#include "nw_fbox_inputbox.h" -#include "nw_system_timer.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_PasswordBox_Class_s NW_FBox_PasswordBox_Class_t; -typedef struct NW_FBox_PasswordBox_s NW_FBox_PasswordBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_PasswordBox_ClassPart_s { - void** unused; -} NW_FBox_PasswordBox_ClassPart_t; - -struct NW_FBox_PasswordBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_InputBox_ClassPart_t NW_FBox_InputBox; - NW_FBox_PasswordBox_ClassPart_t NW_FBox_PasswordBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_PasswordBox_s { - NW_FBox_InputBox_t super; - - /* member variables */ - /* Kimono doesn't need timer */ - /*NW_System_Timer_t* timer;*/ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_PasswordBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_PasswordBox)) - -#define NW_FBox_PasswordBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_PasswordBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_PasswordBox_Class_t NW_FBox_PasswordBox_Class; - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_PasswordBox_t* -NW_FBox_PasswordBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 columns, - NW_HED_AppServices_t* appServices); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_passwordboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_passwordboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_PASSWORDBOXI_H -#define NW_FBOX_PASSWORDBOXI_H - -#include "nw_fbox_inputboxi.h" -#include "nw_fbox_passwordbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -TBrowserStatusCode -_NW_FBox_PasswordBox_SetObscureDisplayText (NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn); - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -void -_NW_FBox_PasswordBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_PasswordBox_SetDisplayText(NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_PasswordBox_ModifyBuffer(NW_FBox_InputBox_t* thisObj, - NW_Ucs2 c, - NW_Uint32 repeated); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_PASSWORDBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_radiobox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_radiobox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_RADIOBOX_H -#define NW_FBOX_RADIOBOX_H - -#include "nw_fbox_checkbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_RadioBox_Class_s NW_FBox_RadioBox_Class_t; -typedef struct NW_FBox_RadioBox_s NW_FBox_RadioBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_RadioBox_ClassPart_s { - void** unused; -} NW_FBox_RadioBox_ClassPart_t; - -struct NW_FBox_RadioBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_CheckBox_ClassPart_t NW_FBox_CheckBox; - NW_FBox_RadioBox_ClassPart_t NW_FBox_RadioBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_RadioBox_s { - NW_FBox_CheckBox_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_RadioBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_RadioBox)) - -#define NW_FBox_RadioBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_RadioBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_RadioBox_Class_t NW_FBox_RadioBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_RadioBox_t* -NW_FBox_RadioBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_radioboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_radioboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_RADIOBOXI_H -#define NW_FBOX_RADIOBOXI_H - -#include "nw_fbox_checkboxi.h" -#include "nw_fbox_radiobox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_RADIOBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_selectbox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_selectbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SELECTBOX_H -#define NW_FBOX_SELECTBOX_H - -#include "nw_fbox_formbox.h" -#include "nw_text_ucs2.h" -#include "nw_hed_appservices.h" -#include "nw_fbox_optionbox.h" -#include "nw_fbox_optgrpbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_SelectBox_Class_s NW_FBox_SelectBox_Class_t; -typedef struct NW_FBox_SelectBox_s NW_FBox_SelectBox_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_SelectBox_ClassPart_s { - void** unused; -} NW_FBox_SelectBox_ClassPart_t; - -struct NW_FBox_SelectBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_SelectBox_ClassPart_t NW_FBox_SelectBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_SelectBox_s { - NW_FBox_FormBox_t super; - - /* member variables */ - NW_Text_t* name; - NW_Text_t* title; - NW_ADT_DynamicVector_t* children; - NW_HED_AppServices_t* appServices; - NW_Bool active; - NW_Bool multiple; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_SelectBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_SelectBox)) - -#define NW_FBox_SelectBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_SelectBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_SelectBox_Class_t NW_FBox_SelectBox_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_SelectBox_SetFormLiaisonVal(NW_FBox_SelectBox_t* selectBox); - -void -NW_FBox_SelectBox_SetActive(NW_FBox_SelectBox_t* selectBox, NW_Bool active); - -void -NW_FBox_SelectBox_AddOption(NW_FBox_SelectBox_t* selectBox, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** styleBox); - -void -NW_FBox_SelectBox_AddOptGrp(NW_FBox_SelectBox_t* selectBox, - NW_FBox_OptGrpBox_t* optGrpBox); - -#define NW_FBox_SelectBox_IsMultiple(_selectBox) \ - (NW_FBox_SelectBoxOf(_selectBox)->multiple) - -#define NW_FBox_SelectBox_GetName(_selectBox) \ - (NW_FBox_SelectBoxOf(_selectBox)->name) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_SelectBox_t* -NW_FBox_SelectBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_HED_AppServices_t* appServices, - NW_Bool multiple, - NW_Text_t* name, - NW_Text_t* title); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_selectboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_selectboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SELECTBOXI_H -#define NW_FBOX_SELECTBOXI_H - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_selectbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_SelectBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_FBOX_EXPORT -NW_Uint16 -_NW_FBox_SelectBox_GetHeight(NW_FBox_SelectBox_t* box); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectBox_SetDisplayText(NW_FBox_SelectBox_t* thisObj, - NW_Bool bufferModificationOn); - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_SelectBox_InitSkin(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -NW_FBox_Interactor_t* -_NW_FBox_SelectBox_InitInteractor(NW_FBox_FormBox_t* formBox); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectBox_Reset (NW_FBox_FormBox_t* box); - -NW_FBOX_EXPORT -NW_GDI_Metric_t -_NW_FBox_SelectBox_GetBaseline (NW_LMgr_Box_t* box); - - -NW_FBOX_EXPORT -NW_Uint8 -_NW_FBox_SelectBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectBox_Split(NW_LMgr_Box_t* thisObj, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_selectskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_selectskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SELECTSKIN_H -#define NW_FBOX_SELECTSKIN_H - -#include "nw_object_shared.h" -#include "nw_fbox_buttonboxskin.h" -#include "nw_fbox_selectbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_SelectSkin_Class_s NW_FBox_SelectSkin_Class_t; -typedef struct NW_FBox_SelectSkin_s NW_FBox_SelectSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_SetActive_t)(NW_FBox_SelectSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_AddOption_t)(NW_FBox_SelectSkin_t* thisObj, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** styleBox); - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_AddOptGrp_t)(NW_FBox_SelectSkin_t* thisObj, - NW_FBox_OptGrpBox_t* optGrpBox); - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_DetailsDialog_t)(NW_FBox_SelectSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_RefreshText_t)(NW_FBox_SelectSkin_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_FBox_SelectSkin_Split_t)(NW_FBox_SelectSkin_t* thisObj, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_SelectSkin_ClassPart_s { - NW_FBox_SelectSkin_SetActive_t setActive; - NW_FBox_SelectSkin_AddOption_t addOption; - NW_FBox_SelectSkin_AddOptGrp_t addOptGrp; - NW_FBox_SelectSkin_DetailsDialog_t detailsDialog; - NW_FBox_SelectSkin_RefreshText_t refreshText; - NW_FBox_SelectSkin_Split_t split; -} NW_FBox_SelectSkin_ClassPart_t; - -struct NW_FBox_SelectSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_SelectSkin_ClassPart_t NW_FBox_SelectSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_SelectSkin_s { - NW_FBox_ButtonBoxSkin_t super; - - /* private don't touch */ - NW_Object_Shared_t* sharingObject; - - /* member variables */ - NW_Bool hasFormBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_SelectSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_SelectSkin)) - -#define NW_FBox_SelectSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_SelectSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_SelectSkin_Class_t NW_FBox_SelectSkin_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_SelectSkin_SetActive(_object) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, setActive) \ - ((_object))) - -#define NW_FBox_SelectSkin_AddOption(_object, _optionBox, _box) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, addOption) \ - ((_object), (_optionBox), (_box))) - -#define NW_FBox_SelectSkin_AddOptGrp(_object, _optGrpBox) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, addOptGrp) \ - ((_object), (_optGrpBox))) - -#define NW_FBox_SelectSkin_DetailsDialog(_object) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, detailsDialog) \ - ((_object))) - -#define NW_FBox_SelectSkin_RefreshText(_object) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, refreshText) \ - ((_object))) - -#define NW_FBox_SelectSkin_Split(_object, _space, _splitBox, _flags) \ - (NW_Object_Invoke (_object, NW_FBox_SelectSkin, split) \ - ((_object), (_space), (_splitBox), (_flags))) - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_SelectSkin_GetMCharExtent(NW_FBox_SelectSkin_t* skin, - NW_GDI_Dimension2D_t *charExtent); - -NW_FBOX_EXPORT -TBrowserStatusCode -NW_FBox_SelectSkin_Reserve(NW_FBox_SelectSkin_t* thisObj); - - -NW_FBOX_EXPORT -NW_Bool -NW_FBox_SelectSkin_Release(NW_FBox_SelectSkin_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_SelectSkin_t* -NW_FBox_SelectSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTSKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_selectskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_selectskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SELECTSKINI_H -#define NW_FBOX_SELECTSKINI_H - -#include "nw_fbox_buttonboxskini.h" -#include "nw_fbox_selectskin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -void -_NW_FBox_SelectSkin_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_SelectSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_SelectSkin_GetSelectBox(_skin) \ - (NW_FBox_SelectBoxOf(NW_FBox_Skin_GetFormBox(_skin))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_INPUTSKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_skin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_skin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SKIN_H -#define NW_FBOX_SKIN_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_box.h" -#include "NW_FBox_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Skin_Class_s NW_FBox_Skin_Class_t; -typedef struct NW_FBox_Skin_s NW_FBox_Skin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_FBox_Skin_Draw_t) (NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -typedef -TBrowserStatusCode -(*NW_FBox_Skin_GetSize_t)(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size); - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_Skin_ClassPart_s { - NW_FBox_Skin_Draw_t draw; - NW_FBox_Skin_GetSize_t getSize; -} NW_FBox_Skin_ClassPart_t; - -struct NW_FBox_Skin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_Skin_s { - NW_Object_Dynamic_t super; - - /* member variables */ - struct NW_FBox_FormBox_s* formBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_Skin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_Skin)) - -#define NW_FBox_SkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_Skin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_Skin_Class_t NW_FBox_Skin_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#define NW_FBox_Skin_GetFormBox(_object)\ - (NW_FBox_SkinOf(_object)->formBox) - -#define NW_FBox_Skin_Draw(_object, _box, _deviceContext, _hasFocus) \ - (NW_Object_Invoke (_object, NW_FBox_Skin, draw) \ - ((_object), (_box), (_deviceContext), (_hasFocus))) - -#define NW_FBox_Skin_GetSize(_object, _box, _size) \ - (NW_Object_Invoke (_object, NW_FBox_Skin, getSize) \ - ((_object), (_box), (_size))) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_SKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_skini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_skini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_SKINI_H -#define NW_FBOX_SKINI_H - -#include "nw_object_dynamici.h" -#include "nw_fbox_skin.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -NW_Text_t* -NW_FBox_Skin_NonprintableToSpace(NW_Text_t *text); - -TBrowserStatusCode -NW_LMgr_Text_GetDisplayLength(CGDIDeviceContext* deviceContext, - NW_Text_t* text, - CGDIFont* font, - NW_Text_Length_t totalLength, - NW_Uint16 width, - NW_Text_Length_t* displayLength); - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_Skin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_SKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_tablekeymapper.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_tablekeymapper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TABLEKEYMAPPER_H -#define NW_FBOX_TABLEKEYMAPPER_H - -#include "nw_fbox_keymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TableKeyMapper_Class_s NW_FBox_TableKeyMapper_Class_t; -typedef const NW_Object_Base_t NW_FBox_TableKeyMapper_t; - -typedef struct NW_FBox_TableKeyMapper_KeyMapEntry_s NW_FBox_TableKeyMapper_KeyMapEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TableKeyMapper_ClassPart_s { - const NW_FBox_TableKeyMapper_KeyMapEntry_t** keyMaps; -} NW_FBox_TableKeyMapper_ClassPart_t; - -struct NW_FBox_TableKeyMapper_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_FBox_KeyMapper_ClassPart_t NW_FBox_KeyMapper; - NW_FBox_TableKeyMapper_ClassPart_t NW_FBox_TableKeyMapper; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_TableKeyMapper_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_TableKeyMapper)) - -#define NW_FBox_TableKeyMapperOf(object) \ - (NW_Object_Cast (object, NW_FBox_TableKeyMapper)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_TableKeyMapper_Class_t NW_FBox_TableKeyMapper_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_TABLEKEYMAPPER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_tablekeymapperi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_tablekeymapperi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TABLEKEYMAPPERI_H -#define NW_FBOX_TABLEKEYMAPPERI_H - -#include "nw_fbox_keymapperi.h" -#include "nw_fbox_tablekeymapper.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_FBox_TableKeyMapper_KeyMapEntry_s { - NW_Ucs2 key; - const NW_Ucs2* map; -}; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_Ucs2 -_NW_FBox_TableKeyMapper_MapKey (NW_FBox_KeyMapper_t* thisObj, - NW_FBox_KeyMapper_Mode_t* mode, - NW_Ucs2 key, - NW_Uint8 *repeated); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_TABLEKEYMAPPERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_textareabox.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_textareabox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TEXTAREABOX_H -#define NW_FBOX_TEXTAREABOX_H - -#include "nw_fbox_inputbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TextAreaBox_Class_s NW_FBox_TextAreaBox_Class_t; -typedef struct NW_FBox_TextAreaBox_s NW_FBox_TextAreaBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TextAreaBox_ClassPart_s { - void** unused; -} NW_FBox_TextAreaBox_ClassPart_t; - -struct NW_FBox_TextAreaBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_FBox_FormBox_ClassPart_t NW_FBox_FormBox; - NW_FBox_InputBox_ClassPart_t NW_FBox_InputBox; - NW_FBox_TextAreaBox_ClassPart_t NW_FBox_TextAreaBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_TextAreaBox_s { - NW_FBox_InputBox_t super; - - /* member variables */ - NW_Uint16 height; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_TextAreaBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_TextAreaBox)) - -#define NW_FBox_TextAreaBoxOf(object) \ - (NW_Object_Cast (object, NW_FBox_TextAreaBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_TextAreaBox_Class_t NW_FBox_TextAreaBox_Class; - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_TextAreaBox_t* -NW_FBox_TextAreaBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 columns, - NW_HED_AppServices_t* appServices, - NW_Uint16 rows); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_TEXTAREABOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_textareaboxi.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_textareaboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TEXTAREABOXI_H -#define NW_FBOX_TEXTAREABOXI_H - -#include "nw_fbox_inputboxi.h" -#include "nw_fbox_textareabox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -NW_FBOX_EXPORT -TBrowserStatusCode -_NW_FBox_TextAreaBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_FBOX_EXPORT -NW_Uint16 -_NW_FBox_TextAreaBox_GetHeight(NW_FBox_InputBox_t* box); - -NW_FBOX_EXPORT -void -_NW_FBox_TextAreaBox_SetHeight(NW_FBox_InputBox_t* box, NW_Uint16 height); - -/* -NW_FBOX_EXPORT -NW_Uint16 -_NW_FBox_TextAreaBox_GetCols(NW_FBox_TextAreaBox_t* textAreaBox); - -NW_FBOX_EXPORT -NW_Uint16 -_NW_FBox_TextAreaBox_GetRows(NW_FBox_TextAreaBox_t* textAreaBox); - -NW_FBOX_EXPORT -void -_NW_FBox_TextAreaBox_SetCols(NW_FBox_TextAreaBox_t* textAreaBox, NW_Uint16 cols); - -NW_FBOX_EXPORT -void -_NW_FBox_TextAreaBox_SetRows(NW_FBox_TextAreaBox_t* textAreaBox, NW_Uint16 rows); -*/ - -NW_FBOX_EXPORT -NW_FBox_Skin_t* -_NW_FBox_TextAreaBox_InitSkin(NW_FBox_FormBox_t* formBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - - -#endif /* NW_FBOX_TEXTAREABOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_textareaskin.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_textareaskin.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TEXTAREASKIN_H -#define NW_FBOX_TEXTAREASKIN_H - -#include "nw_fbox_inputskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TextAreaSkin_Class_s NW_FBox_TextAreaSkin_Class_t; -typedef struct NW_FBox_TextAreaSkin_s NW_FBox_TextAreaSkin_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_FBox_TextAreaSkin_ClassPart_s { - void** unused; -} NW_FBox_TextAreaSkin_ClassPart_t; - -struct NW_FBox_TextAreaSkin_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Skin_ClassPart_t NW_FBox_Skin; - NW_FBox_InputSkin_ClassPart_t NW_FBox_InputSkin; - NW_FBox_TextAreaSkin_ClassPart_t NW_FBox_TextAreaSkin; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_FBox_TextAreaSkin_s { - NW_FBox_InputSkin_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_FBox_TextAreaSkin_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_FBox_TextAreaSkin)) - -#define NW_FBox_TextAreaSkinOf(object) \ - (NW_Object_Cast (object, NW_FBox_TextAreaSkin)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT const NW_FBox_TextAreaSkin_Class_t NW_FBox_TextAreaSkin_Class; - - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBOX_EXPORT -NW_FBox_TextAreaSkin_t* -NW_FBox_TextAreaSkin_New(NW_FBox_FormBox_t* formBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_TEXTAREASKIN_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_textareaskini.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_textareaskini.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FBOX_TEXTAREASKINI_H -#define NW_FBOX_TEXTAREASKINI_H - -#include "nw_fbox_inputskini.h" -#include "nw_fbox_textareaskin.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FBOX_TEXTAREASKINI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_wmlformathandler.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_wmlformathandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,395 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef CWMLFORMATHANDLER_H -#define CWMLFORMATHANDLER_H - -// INCLUDES - -#include <e32base.h> - -// CONSTANTS - -const TInt KInfiniteLength = -1; -const TInt KNotFound = -1; -_LIT( KObscuringChar, "*" ); - -// DATA TYPES - -enum TWapDocType - { - EWmlDocType_Is_Literal_String, - EWmlDocType_Unknown, - EWmlDocType_Wml_1_0, - EWmlDocType_Wta_1_0, - EWmlDocType_Wml_1_1, - EWmlDocType_Si_1_0, - EWmlDocType_Sl_1_0, - EWmlDocType_Co_1_0, - EWmlDocType_Channel_1_0, - EWmlDocType_Wml_1_2, - EWmlDocType_Wml_1_3 - }; - - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Tiny class that encapsulates a WML format character. -*/ -class TWmlFormatChar - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * @param aChar Format character. - * @param aStatic Static character. - */ - TWmlFormatChar( TUint aChar = 0, TUint aStatic = 0 ); - - public: // New functions - - enum TWmlCase - { - EWmlNone, - EWmlUpperCase, - EWmlLowerCase, - EWmlNumericCase - }; - - /** - * Returns the character case forced by the format character. - * @return Character case. - */ - TWmlCase ForcedCase() const; - - /** - * Returns the character case suggested by the format character. - * @return Character case. - */ - TWmlCase SuggestedCase() const; - - /** - * Returns true whether alphabetical characters are allowed. - * @return Alphabetical characters are allowed. - */ - TBool AlphaAllowed() const; - - /** - * Returns true whether numbers are allowed. - * @return Numeric characters are allowed. - */ - TBool NumericAllowed() const; - - /** - * Returns true whether special characters are allowed. - * @return Special characters are allowed. - */ - TBool SpecialAllowed() const; - - public: // Getter functions - - /** - * Returns format character. - * @return Format character. - */ - TUint Char() const; - - /** - * Returns static character if the format specifies static text - * , otherwise 0. - * @return Static character. - */ - TUint Static() const; - - private: // Data - - TUint iChar; - TUint iStatic; - }; - -class TKStaticChar - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * @param aChar Character code. - * @param aPos Document position. - */ - TKStaticChar( TUint aChar, TInt aPos ); - - public: // Getter functions - - /** - * Returns static character. - * @return Static character. - */ - TUint Char() const; - - /** - * Returns document position. - * @return Document position. - */ - TInt Pos() const; - - private: // Data - - TUint iChar; - TInt iPos; - }; - -/** -* Handles WML input format string. -*/ -class CWmlFormatHandler : public CBase - { - protected: // Constructors and destructor - - /** - * C++ default constructor. - */ - CWmlFormatHandler(); - - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aFormatString Validated format string. - * @param aWapDocType Document type. Format handling is different - * in earlier WML versions. Other than EWmlDocType_Wml_1_x is handled - * as EWmlDocType_Wml_1_3. - */ - static CWmlFormatHandler* NewLC - ( const TDesC& aFormatString, TWapDocType aWapDocType ); - - /** - * Two-phased constructor. - * @param aFormatString Validated format string. - * @param aWapDocType Document type. Format handling is different - * in earlier WML versions. Other than EWmlDocType_Wml_1_x is handled - * as EWmlDocType_Wml_1_3. - */ - static CWmlFormatHandler* NewL - ( const TDesC& aFormatString, TWapDocType aWapDocType ); - - /** - * Destructor. - */ - virtual ~CWmlFormatHandler(); - - public: // Text handling - - /** - * Returns text only - without static text involved. - * This is quite useful for handling the pasting of text into the content of - * an input box. - * @return HBufC* Pointer to plain text input (no statics inserted). - */ - HBufC* GetTextOnlyL(); - - /** - * Stores visible text. If the text is invalid, - * the static text will be used instead. - * @param aText Constant descriptor. - * @param aNoValidation Force no validation. - * @return ETrue whether the operation succeeds. - */ - TBool SetTextL( const TDesC& aText, TBool aNoValidation = EFalse ); - - /** - * Returns zeroterminated copy of the stored content filled with - * static text in readable or illegible form. - * @param aReadable If EFalse dynamic text is replaced with - * KObscuringChar. - * @return Zeroterminated text. - */ - HBufC* TextLC( TBool aReadable = ETrue ) const; - - /** - * Inserts character into the stored text. - * Nothing happens if aPos is invalid! - * @param aPos Document position. - * @param aChar Character to be inserted. - */ - void InsertL( TInt aPos, TChar aChar ); - - /** - * Inserts text into the stored text. - * Nothing happens if aPos is invalid! - * @param aPos Document position. - * @param aDes Text to be inserted. - */ - void InsertL( TInt aPos, const TDesC& aDes ); - - /** - * Deletes characters from the stored text. - * Nothing happens if aPos or aLength is invalid! - * @param aPos Document position. - * @param aLength Specifies the number of characters to be deleted. - */ - TBool Delete( TInt aPos, TInt aLength ); - - public: // Static text handling - - /** - * Returns zeroterminated copy of the static text. - * @return Zeroterminated copy of the static text. - */ - HBufC* StaticTextLC() const; - - /** - * Returns number of static characters. - * @return Number of static characters.. - */ - TInt NumberOfStatic() const; - - public: // Format handling - - /** - * Returns the format of the specified document position. - * @param aIndex Document position. - * @return Format of the specified document position. - */ - TWmlFormatChar GetFormat( TInt aIndex ) const; - - /** - * Returns the format of postfix. It's the value of "f" when - * format ends with "*f" or "nf", KWmlFormatNone othervise - * @return Format of postfix. - */ - TWmlFormatChar PostFix() const; - - public: // Getter functions - - /* - * Getter function. - * @return Value of iMinLength member. - */ - TInt MinLength() const; - - /* - * Getter function. - * @return Value of iMaxLength member. - */ - TInt MaxLength() const; - - public: // Validation functions - - /** - * Validates the given character against the format character. - * @param aChar Character to be validated. - * @param aFormatChar Format character. - * @return ETrue whether the character matches to the format. - */ - TBool ValidateChar( TChar aChar, TWmlFormatChar aFormatChar ) const; - - /** - * Validates all of the stored text against the stored format. - * @return List of invalid positions. (always non-NULL, can be empty) - */ - CArrayFixFlat<TInt>* ValidateTextLC() const; - - /** - * Validates all of the stored text against the stored format. - * @return Text is valid. - */ - TBool ValidateTextL() const; - - public: // position conversions - - /** - * Returns position in the whole text. - * @param aPosExludingStatic Position in non-static text. - * @return Position in the whole text. - */ - TInt PosIncludingStatic( TInt aPosExludingStatic ); - - /** - * Returns position in the non-static text. - * @param aPosIncludingStatic Position in the whole text. - * @return Position in non-static text. - */ - TInt PosExludingStatic( TInt aPosIncludingStatic ); - - public: // other functions - - /** - * Returns the position of the previous dynamic character to aPos. - * Returns KNotFound if there's no previous dynamic character. - * @param aPos Document position. - * @return Position of the previous dynamic character. - */ - TInt PreviousNonStatic( TInt aPos ); - - /** - * Returns the position of the next dynamic character to aPos. - * Returns KNotFound if there's no next dynamic character. - * @param aPos Document position. - * @return Position of the next dynamic character. - */ - TInt NextNonStatic( TInt aPos ); - - /** - * Returns the first position that is empty, but can be filled. - * Returns the length of the whole text if the text is fully filled. - * @return First position that is empty, but can be filled. - */ - TInt FirstEmpty(); - - /** - * Returns the first static position to the given position from left - * @return First position of the static character. - */ - - TInt PreviousStatic( TInt aPos ); - - /** - * Returns the ETrue if the given pos is static else false - * @return is static char - */ - - TBool IsPosStatic( TInt aPos ); - - private: - - /** - * By default EPOC constructor is private. - * @param aFormatString Validated format string. - * @param aWapDocType Document type. Format handling is different - * in earlier WML versions. Other than EWmlDocType_Wml_1_x is handled - * as EWmlDocType_Wml_1_3. - */ - void ConstructL( const TDesC& aFormatString, TWapDocType aWapDocType ); - - private: // Data - - TInt iMinLength; - TInt iMaxLength; - HBufC* iMask; - CArrayFixFlat<TKStaticChar>* iStatic; - TText iPostFix; - HBufC* iDynamic; - }; - -#endif - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/include/nw_fbox_wmlformattededitor.h --- a/webengine/wmlengine/src/fbox/include/nw_fbox_wmlformattededitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WMLFORMATTEDEDITOR_H -#define WMLFORMATTEDEDITOR_H - -// INCLUDES -#include <e32std.h> -#include <aknkeys.h> -#include <e32def.h> -#include <coeinput.h> -#include <frmtview.h> -#include <fepbase.h> -#include <eikedwob.h> -#include <eikrted.h> -#include <eikedwin.h> - -#include "nw_fbox_wmlformathandler.h" - -// DATA TYPES - -// JSky editor modes -enum TWmlMode - { - EWmlModeNone, - EWmlModeHiragana, - EWmlModeKatakana, - EWmlModeHankakukana, - EWmlModeAlphabet, - EWmlModeNumeric - }; - -// Moving direction of the cursor -enum TWmlEdNavigation - { - EWmlEditorNavigateLeft, - EWmlEditorNavigateRight, - EWmlEditorNavigateDelete - }; - -// FORWARD DECLARATIONS - -class CEikEdwin; -class TEdwinEvent; -class CAknEdwinState; - -// CLASS DECLARATION - -/** -* Adds 'formatting' feature to its base class. -*/ -class CWmlFormattedEditor : public CEikRichTextEditor - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - CWmlFormattedEditor( TBool aIsSecret ); - - public: // Setter functions - - /** - * Must be called once! - * Sets format handler. Sets iSecret attribute. When its true editor - * acts as password editor, so text is echoed in illegible format. - * @param aHandler Format handler. - * @param aSecret New value of iSecret. - */ - void InitializeL( CWmlFormatHandler* aHandler = NULL, - TBool aSecret = EFalse, - TWmlMode aMode = EWmlModeNone ); - /** - * Sets default text colour. - * @param aDefaultColour Default text colour. - */ - void SetDefaultColour( TRgb aDefaultColour ); - - /** - * Sets the colour of invalid characters. - * @param aErrorColour Colour of invalid characters. - */ - void SetErrorColour( TRgb aErrorColour ); - - /** - * Enables or disables T9. - * @param aEnable Enable T9. - */ - void EnableT9( TBool aEnable = ETrue, TBool aIsSecret = EFalse ); - - /** - * Sets iCursorPos, to keep it updated when in T9 input - * mode. - * @param - */ - void SetiCursorPos(); - - /** - * Resets iEventKeyEntered, a flag used to indicate when keyboard input arrives via EVENTKEY, - * as distinguished from multi-tap input mode. - * @param - */ - void ResetFlagEventKeyEntered(); - - /** - * Returns iEventKeyEntered, a flag used to indicate when keyboard input arrives via EVENTKEY, - * as distinguished from multi-tap input mode. - * @param - */ - TBool IsEventKeyEntered(); - - /** - * Sets the current state case format information for the input box - * @param - */ - void SetEditorCurentCase(); - - /** - * Sets the editor cursor position - * @param position - */ - void SetCursorPosL( TInt aPos ); - - public: // other functions - - /** - * Returns value of iSecret attribute. - * @return True whether it's a password editor. - */ - TBool IsSecret() const; - - /** - * Sets iPassword with input from user - * Works with and without formats. That is, when iHandler, has value or not. - */ - void SpecialHandlingPasswordL(); - - /** - * Called on HandleEdwinEvent event to update what is stored in iHandler.iDynamic. - * Works with and without formats. - */ - void SpecialCharHandlingL(); - - /** - * Called on EEventKeyUp event to update what is stored in iHandler.iDynamic. - * Works with and without formats. - */ - void SpecialStaticHandlingL(); - - /** - * Returns text in readable format. - * @return Zeroterminated text. - */ - HBufC* ReadableTextL() const; - - /** - * Returns text in readable format. - * @return Zeroterminated text. - */ - HBufC* ReadableTextLC() const; - - /** - * Marks invalid characters by colouring them. - */ - void MarkInvalidCharsL(); - - /** - * Frees memory allocated for password. - * Must be called before destruction! - */ - void FreePassword(); - - /** - * @return ETrue if T9 is enabled. - */ - TBool T9Enabled() const; - - /** - * Handles edwin events. It is called from CEpoc32InputBox - * @param aEdwin Source of event. - * @param aEventType Type of event. - */ - void HandleEdwinEventL( CEikEdwin* aEdwin, - MEikEdwinObserver::TEdwinEvent aEventType ); - - public: // Functions from base classes - - /** - * Returns input capabilities. - * @return TCoeInputCapabilities - */ - TCoeInputCapabilities InputCapabilities() const; - - /** - * Handles key events. - * @param aKeyEvent Key event. - * @param aType Type. - * @return Response. - */ - TKeyResponse OfferKeyEventL - ( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * Handles clear key events. - * @param TInt position of cursor in editor. - * @return TBool if clear key "handled" - */ - TBool HandleClearKeyL( const TInt cursorPosition ); - - /** - * Handles paste operation. Called by CEikEdwin. - * @param aStartPos Beginning of pasted text. - * @param aLength Length of pasted text. - */ - void HandleTextPastedL( TInt aStartPos, TInt& aLength ); - - /** - * Checks if paste operation allowed, comparing clipboard info against format mask. - * @param aStartPos Beginning of pasted text. - * @param aLength Length of pasted text. - * @param aPtr Text from clipboard. - * @return TBool ETrue==paste is allowed - */ - TBool CheckIfPasteAllowedL( TInt aStartPos, TInt& aLength, TPtr aPtr ); - - - /** - * Sets the text of editor, and formathandler. If it gets null string, - * it fills the editor with static text. - * When empty text is set character formats will disappear. - * @param aDes New text. - */ - void SetTextL( const TDesC* aDes ); - - void Draw(const TRect& aRect) const; - - void DrawContents() ; - - public: // From MEikCcpuEditor - - /** - * Prohibits cutting in password fields and editors - * containing some static text. - * @return Cutting is allowed. - */ - TBool CcpuCanCut() const; - - /** - * Calls base method and deletes cut text from iHandler. - */ - void CcpuCutL(); - - /** - * Prohibits copying in secret editors. - */ - TBool CcpuCanCopy() const; - - /** - * Determines if paste operation is allowed. - * @return Pasting is allowed. - */ - TBool CcpuCanPaste() const; - - /** - * Calls appropriate routines (CheckPaste..., CheckCursor...) to determine if paste operation is allowed. - */ - void DoCanPasteL() const; - - /** - * Checks clipboard content against format to see if the content is allowed to be pasted. - * @param aClipboard clipboard - * @param aRichText boolean describing RichText or PlainText - * @return flag indicating paste is ALLOWED == 0; or NOT ALLOWED == -1. - */ - TInt CheckPasteAllowedCharsL(CClipboard& aClipboard, TBool aRichText) const; - - /** - * Returns next cursor position that is not a STATIC character cursor position. - * @param aCursoPos check if this cursor position is at a STATIC character in format - * @return next non-static cursor position (or present one if okay) or KNotFound if impossible to find next position - */ - TInt CheckCursorPositionForNextNonStatic( TInt aCursorPos ) const; - - /** - * Calls base method and updates state. - */ - void CcpuPasteL(); - - public: // New functions - - /** - * Updates fep state. - * @param aNaviType Direction. - * @param aUpdateEditingParameters Editing parameters need to be updated. - */ - void UpdateStateL( TWmlEdNavigation aNaviType, - TBool aUpdateEditingParameters = ETrue, - TBool aTextChanged = ETrue ); - - /** - * Sets editing parameters according to format of - * the given document position, such as input mode, case, etc. - * @param aDocPos Document position. - */ - TBool UpdateEditingParameters( TInt aDocPos = -1 ); - - void SetVkbState (CAknEdwinState* aVkbState) { iVkbState = aVkbState; } - - private: - - /** - * Resets the text color. - */ - void UpdateColour(TRgb aDefaultColour); - - /** - * for VKB state - */ - void UpdateFlagsState(TUint flags); - void UpdateInputModeState(TUint inputMode, TUint permittedInputModes); - void UpdateCaseState(TUint currentCase, TUint permittedCase); - - - private: // Data - - // WML format handler object ( used, not owned ) - CWmlFormatHandler* iHandler; - CRichText* iRichText; // rich text document - TRgb iDefaultColour; // default text colour - TRgb iErrorColour; // colour of invalid text - TBool iT9; // ETrue whether T9 is allowed - TBool iSecret; // ETrue for password editors - HBufC* iPassword; // Contains password or NULL - TBool iOverwrite; // ETrue if editor is in overwrite mode - TInt iCursorPos; // previous cursor position - TBool iStateChanged; // ignore extra textupdate events - TInt iFirstEmpty; // previous first empty position - TWmlFormatChar iFormat; // previous format - TWmlMode iMode; // JSky mode - TWmlMode iPrevMode; // previous JSky mode - TCursorSelection iSelection; // previous selection - TBool iLineFeedHasBeenInserted; // lastly inserted char is linefeed - TBool iShift; // shift has been pressed - TBool iPosAtEnd; // Is set when cursor pos is noted to be at end of string - to - // differentiate when cursor pos is at other locations - TBool iEventKeyEntered; // To help distinguish keyboard input between EVENTKEY events filtering - // to FBOXCEPOC32INPUTBOX.CPP from multi-tap keyboard (ITU-T) entry - TInt iNumberOfCharsInStaticInputBox; // Cannot rely upon iFirstEmpty with statics in input box, so need a counter - TWmlEdNavigation iWmlEdNavigation ; - TBool iDuplicateEvent; // for ignoring spurious edwin events when handling multi-tap characters. - TBool iInputFormatProcess; // Check for resetting the iEventKeyEntered - - CAknEdwinState* iVkbState; // not owned - TBool iPenEnabled; - }; - -#endif - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32ButtonBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32ButtonBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,348 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_epoc32buttonboxskini.h" - -#include "nw_lmgr_rootbox.h" -#include "nw_fbox_buttonbox.h" -#include "nw_fbox_epoc32formimages.h" -#include "GDIDevicecontext.h" -#include "nw_fbox_formboxutils.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* Get the dir attribute */ -static -void -NW_FBox_Epoc32ButtonBoxSkin_GetDirection(NW_LMgr_Box_t *box, - NW_GDI_FlowDirection_t* dir) -{ - NW_LMgr_Property_t dirProp; - NW_ASSERT(box != NULL); - - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_textDirection, &dirProp); - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - *dir = NW_GDI_FlowDirection_LeftRight; - } - else { - *dir = NW_GDI_FlowDirection_RightLeft; - } -} - -static -TBrowserStatusCode -NW_FBox_Epoc32ButtonBoxSkin_DisplayText(NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Point2D_t textStart, - NW_Text_t* value, - NW_Uint16 width) - { - NW_Text_Length_t displayLength = 0; - NW_Text_UCS2_t* displayText; - NW_Ucs2* displayStorage; - NW_Ucs2* bufferStorage; - NW_Text_Length_t totalLength = 0; - TBrowserStatusCode status; - NW_GDI_FlowDirection_t dir = NW_GDI_FlowDirection_LeftRight; - NW_GDI_Dimension2D_t extent; - CGDIFont* font; - - bufferStorage = NW_Text_GetUCS2Buffer(value, 0, &totalLength, NULL); - - font = NW_LMgr_Box_GetFont(box); - - if (totalLength == 0) - { - return KBrsrSuccess; - } - - if(width >= 255) - { - width = 254; - } - - status = NW_FBox_FormBoxUtils_GetDisplayLength(deviceContext, - value, - font, - totalLength, - width, - &displayLength, - NW_FALSE - ); - NW_ASSERT (status == KBrsrSuccess); - - if(displayLength != value->characterCount) - { - displayStorage = NW_Str_New(displayLength + NW_FBox_FormBoxUtils_Truncate_len); - if (displayStorage == NULL) - { - return KBrsrOutOfMemory; - } - - displayText = NW_Text_UCS2_New(NULL, 0, NW_Text_Flags_TakeOwnership); - if (displayText == NULL) - { - return KBrsrOutOfMemory; - } - - NW_Mem_memcpy(displayStorage, - (bufferStorage), - displayLength*sizeof(NW_Ucs2) - ); - - NW_Mem_memcpy(displayStorage + displayLength, - NW_FBox_FormBoxUtils_Truncate, - NW_FBox_FormBoxUtils_Truncate_len*sizeof(NW_Ucs2)); - - displayLength += NW_FBox_FormBoxUtils_Truncate_len; - status = NW_Text_SetStorage(NW_TextOf(displayText), displayStorage, - displayLength, NW_TRUE); - NW_ASSERT (status == KBrsrSuccess); - - NW_FBox_Epoc32ButtonBoxSkin_GetDirection(box, &dir); - status = deviceContext->GetTextExtent( NW_TextOf(displayText), - font, - 0, - dir, - &extent); - - textStart.x += ((width - extent.width) / 2); - status = deviceContext->DrawText( &textStart, - NW_TextOf(displayText), - font, - 0, - NW_GDI_TextDecoration_None, - dir, - extent.width ); - - NW_Object_Delete(displayText); - } - else - { - NW_FBox_Epoc32ButtonBoxSkin_GetDirection(box, &dir); - status = deviceContext->DrawText( &textStart, value, font, 0, NW_GDI_TextDecoration_None, dir, width); - } - return status; - } - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32ButtonBoxSkin_Class_t NW_FBox_Epoc32ButtonBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_ButtonBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32ButtonBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* draw */ _NW_FBox_ButtonBoxSkin_Draw, - /* getSize */ _NW_FBox_ButtonBoxSkin_GetSize - }, - { /* NW_FBox_ButtonBoxSkin */ - /* drawContent */ _NW_FBox_Epoc32ButtonBoxSkin_DrawContent - }, - { /* NW_FBox_Epoc32ButtonBoxSkin */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_Epoc32ButtonBoxSkin_DrawContent(NW_FBox_ButtonBoxSkin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - NW_FBox_ButtonBox_t* ButtonBox; - NW_GDI_Point2D_t textStart; - NW_GDI_Rectangle_t innerRect; - NW_Text_t* value; - NW_Uint16 width; - NW_GDI_Point2D_t shadow[3]; - NW_GDI_Color_t initialColor = 0; - NW_GDI_Color_t initialBgColor = 0; - NW_GDI_FlowDirection_t dir; - - NW_TRY(status) - { - NW_REQUIRED_PARAM(skin); - NW_REQUIRED_PARAM(hasFocus); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (skin, &NW_FBox_Epoc32ButtonBoxSkin_Class)); - - /* for convenience */ - ButtonBox = NW_FBox_ButtonBoxOf (box); - - /* this is the label */ - value = NW_FBox_ButtonBox_GetValue(ButtonBox); - - /* Calculate the inner rectangle */ - NW_LMgr_Box_GetInnerRectangle(box, &innerRect); - - /* Get the start coordinates for text*/ - textStart = innerRect.point; - width = (NW_Uint16)innerRect.dimension.width; - - /* now centralize the text */ - NW_LMgr_PropertyValue_t sizeVal; - NW_Uint16 box_height = 0; - NW_Uint16 box_width = 0; - sizeVal.integer = 0; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (KBrsrSuccess == status) - { - box_width = (NW_Uint16)sizeVal.integer; - } - - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal); - if (KBrsrSuccess == status) - { - box_height = (NW_Uint16)sizeVal.integer; - } - - /* calculate the extents */ - NW_GDI_Dimension2D_t textExtent; - - NW_FBox_Epoc32ButtonBoxSkin_GetDirection(box, &dir); - status = deviceContext->GetTextExtent ( value, - NW_LMgr_Box_GetFont(box), - 0, - dir, - &textExtent); - - /* if no truncation needed, centralize text with text length */ - if (textExtent.width <= box_width) - { - textStart.x += box_width/2 - 1; - textStart.x -= textExtent.width/2; - } - - if (box_height != 0) - { - textStart.y += box_height/2; - textStart.y -= textExtent.height/2; - } - - /* draw shadow to create 3D effect */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - shadow[0].x = (NW_GDI_Metric_t)(boxBounds.point.x + 1); - shadow[0].y = (NW_GDI_Metric_t)(boxBounds.point.y + boxBounds.dimension.height); - shadow[1].x = (NW_GDI_Metric_t)(boxBounds.point.x + boxBounds.dimension.width); - shadow[1].y = shadow[0].y; - shadow[2].x = shadow[1].x; - shadow[2].y = (NW_GDI_Metric_t)(boxBounds.point.y + 1); - - initialColor = deviceContext->ForegroundColor(); - initialBgColor = deviceContext->BackgroundColor(); - - deviceContext->SetForegroundColor( NW_GDI_Color_Black); - status = deviceContext->DrawPolyline ( 3, shadow, NW_FALSE); - NW_THROW_ON_ERROR(status); - - NW_LMgr_Property_t backgroundProp; - backgroundProp.type = NW_CSS_ValueType_Token; - backgroundProp.value.token = NW_CSS_PropValue_transparent; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_backgroundColor, &backgroundProp); - - NW_GDI_Color_t foregroundColor = 0; - NW_LMgr_Property_t fgColor; - fgColor.type = NW_CSS_ValueType_Color; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_color, &fgColor); - if (KBrsrSuccess == status) - { - foregroundColor = fgColor.value.integer; - } - else - { - foregroundColor = NW_GDI_Color_Black; - } - deviceContext->SetForegroundColor( foregroundColor); - - /* Make button label draw itself at the specified location */ - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - if ( value != NULL) - { - status = NW_FBox_Epoc32ButtonBoxSkin_DisplayText(box, - deviceContext, - textStart, - value, - width); - - NW_THROW_ON_ERROR(status); - } - - if (hasFocus) - { - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderStyle (box, &borderStyle, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - - borderWidth.top = (NW_GDI_Metric_t)(borderWidth.top + 1); - borderWidth.bottom = (NW_GDI_Metric_t)(borderWidth.bottom + 1); - borderWidth.left = (NW_GDI_Metric_t)(borderWidth.left + 1); - borderWidth.right = (NW_GDI_Metric_t)(borderWidth.right + 1); - - status = NW_LMgr_Box_DrawBorder ( NW_LMgr_Box_GetDisplayBounds( box ), deviceContext, &borderWidth, &borderStyle, &borderColor); - _NW_THROW_ON_ERROR(status); - } - - deviceContext->SetForegroundColor( initialColor); - deviceContext->SetBackgroundColor( initialBgColor); - - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_ButtonBoxSkin_t* -NW_FBox_ButtonBoxSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_ButtonBoxSkin_t*) - NW_Object_New (&NW_FBox_Epoc32ButtonBoxSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32FormImages.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32FormImages.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_fbox_epoc32formimagesi.h" - -#include "nw_fbox_checkbox.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_optionbox.h" -#include "nw_image_epoc32simpleimage.h" - -#include <e32base.h> -#include <fbs.h> -#include <nwx_buffer.h> -#include <nw_browser_browserimages.h> - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_FormImages_Class_t NW_FBox_FormImages_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Base_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_FBox_FormImages */ - /* numCheckBoxEntries */ 0, - /* checkBoxEntries */ NULL, - /* numCheckBoxEntries */ 0, - /* checkBoxEntries */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Image_AbstractImage_t* -NW_FBox_FormImages_GetImage(NW_FBox_FormImages_t* thisObj, - NW_Bool hasFocus, - NW_Bool state, - NW_FBox_FormBox_t* formBox) - { - NW_Int16 index; - NW_Uint8 numEntries; - const NW_Image_AbstractImage_t* image = NULL; - const NW_FBox_FormImages_Entry_t* entry; - - /*lint --e{794} --e{550} Conceivable use of null pointer, Symbol not accessed */ - - /* parameter assertion block */ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_FormImages_Class)); - - numEntries = 0; - entry = NULL; - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_RadioBox_Class)) - { - numEntries = NW_FBox_FormImages_GetClassPart (thisObj).numRadioBoxEntries; - entry = NW_FBox_FormImages_GetClassPart (thisObj).radioBoxEntries; - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_CheckBox_Class)) - { - numEntries = NW_FBox_FormImages_GetClassPart (thisObj).numCheckBoxEntries; - entry = NW_FBox_FormImages_GetClassPart (thisObj).checkBoxEntries; - } - - /* iterate through the table looking for a match */ - for (index = numEntries; index >= 0; index--) - { - if ((hasFocus == entry->focus) && (state == entry->state)) - { - break; - } - index++; - entry++; - } - - TFileName mbmDrive; - Dll::FileName(mbmDrive); - TParse parse; - parse.Set(mbmDrive, NULL, NULL); - mbmDrive = parse.Drive(); - - HBufC* mbmFile = HBufC::New( KMaxFileName ); - - if (mbmFile == NULL ) - { - /* Could not allocate memory for mbmFile, return from function with NULL*/ - return NULL; - } - - TPtr ptr(mbmFile->Des()); - - ptr.Append(mbmDrive); - - TFileName KBrowserBitmapsFolder; - //_LIT(KDC_APP_BITMAP_DIR,"\\resource\\apps\\localisablefiles\\"); // Bitmap files (.mbm) - - KBrowserBitmapsFolder += KDC_APP_BITMAP_DIR; - KBrowserBitmapsFolder += KBrowserBitmapsName; - KBrowserBitmapsFolder.ZeroTerminate(); - - ptr.Append(KBrowserBitmapsFolder); - - CFbsBitmap* bitmap = NULL; - CFbsBitmap* mask = NULL; - - TRAPD(error, bitmap = new (ELeave)CFbsBitmap()); - - error = bitmap->Load(mbmFile->Des(), entry->imageId); - - if (error == KErrNone) - { - /* Load mask for the image */ - TRAP(error, mask = new (ELeave)CFbsBitmap()); - - error = mask->Load(mbmFile->Des(), entry->maskId); - if (error == KErrNone) - { - /* Image loaded succesfully, create Kimono image object to hold it */ - TSize size = bitmap->SizeInPixels(); - - NW_GDI_Dimension3D_t gdiSize; - gdiSize.width = (NW_GDI_Metric_t)size.iWidth; - gdiSize.height = (NW_GDI_Metric_t)size.iHeight; - gdiSize.depth = 1; - - /* TODO: Here we are creating image object, but who will DELETE it ? */ - const NW_Image_Epoc32Simple_t* simpleImage = - NW_Image_Epoc32Simple_New(gdiSize, bitmap, mask, NW_TRUE, NW_FALSE, - ERecognizedImage, NULL, 0, NULL); - - NW_ASSERT(simpleImage != NULL); - - image = NW_Image_AbstractImageOf(simpleImage); - } - else - { - delete mask; - } - } - else - { - delete bitmap; - } - - delete mbmFile; - return image; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32ImageButtonBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32ImageButtonBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_epoc32imagebuttonboxskini.h" - -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_fbox_epoc32formimages.h" -#include "nw_fbox_formboxutils.h" -#include "nw_image_epoc32cannedimage.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_imgcontainerboxi.h" -#include "nw_image_cannedimages.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32ImageButtonBoxSkin_Class_t NW_FBox_Epoc32ImageButtonBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_ImageButtonBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32ImageButtonBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* draw */ _NW_FBox_ImageButtonBoxSkin_Draw, - /* getSize */ _NW_FBox_ImageButtonBoxSkin_GetSize - }, - { /* NW_FBox_ButtonBoxSkin */ - /* drawContent */ _NW_FBox_Epoc32ImageButtonBoxSkin_DrawContent - }, - { /* NW_FBox_Epoc32ButtonBoxSkin */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_Epoc32ImageButtonBoxSkin_DrawContent(NW_FBox_ImageButtonBoxSkin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_TRY(status) - { - NW_FBox_ImageButtonBox_t* imageButtonBox; - NW_GDI_Point2D_t imageStart; - NW_GDI_Rectangle_t innerRect; - NW_Text_t* value; - NW_GDI_Dimension3D_t dimension; - - NW_REQUIRED_PARAM(skin); - NW_REQUIRED_PARAM(hasFocus); - - /* for convenience */ - imageButtonBox = NW_FBox_ImageButtonBoxOf (box); - - /* this is the label */ - value = NW_FBox_ImageButtonBox_GetValue(imageButtonBox); - - /* Calculate the inner rectangle */ - NW_LMgr_Box_GetInnerRectangle(box, &innerRect); - - /* Get the start coordinates */ - imageStart = innerRect.point; - - dimension.width = innerRect.dimension.width; - dimension.height = innerRect.dimension.height; - dimension.depth = 0; - - /* Draw the valid image, if there is one */ - if ((imageButtonBox->image) && - !NW_Object_IsInstanceOf(imageButtonBox->image, &NW_Image_Epoc32Canned_Class)) - { - /* we want to be able to scale image buttons if necessary, so we invoke DrawScaled method */ - status = NW_Image_AbstractImage_DrawScaled (imageButtonBox->image, deviceContext, &imageStart, &dimension); - NW_THROW(status); - } - - /* now we know that we do not have a valid image */ - /* Make button label draw itself at the specified location */ - NW_Image_AbstractImage_t* image = imageButtonBox->image; - if( image == NULL) - { - // get canned image if there is no image available - NW_LMgr_RootBox_t *rootBox = NULL; - - rootBox = NW_LMgr_Box_GetRootBox( box ); - NW_THROW_OOM_ON_NULL( rootBox, status ); - - image = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage( rootBox->cannedImages, NW_Image_Missing ); - NW_THROW_OOM_ON_NULL( image, status ); - } - status = NW_LMgr_ImgBox_DrawContent( box, deviceContext, image, NW_TRUE, value, hasFocus ); - NW_THROW_ON_ERROR(status); - - } NW_CATCH (status) { - } NW_FINALLY { - - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_ImageButtonBoxSkin_t* -NW_FBox_ImageButtonBoxSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_ImageButtonBoxSkin_t*) - NW_Object_New (&NW_FBox_Epoc32ImageButtonBoxSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32InlineFormImages.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InlineFormImages.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_epoc32inlineformimagesi.h" -#include <nw_browser_browserimages.h> - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -static const -NW_FBox_FormImages_Entry_t _NW_FBox_InlineFormImages_CheckBoxEntries[] = { - {NW_TRUE, NW_TRUE, qgn_prop_wml_checkbox_on_sel, qgn_prop_wml_checkbox_on_sel_mask}, - {NW_FALSE, NW_TRUE, qgn_prop_wml_checkbox_on, qgn_prop_wml_checkbox_on_mask }, - {NW_TRUE, NW_FALSE, qgn_prop_wml_checkbox_off_sel, qgn_prop_wml_checkbox_off_sel_mask}, - {NW_FALSE, NW_FALSE, qgn_prop_wml_checkbox_off, qgn_prop_wml_checkbox_off_mask}, -}; - -/* ------------------------------------------------------------------------- */ -static const -NW_FBox_FormImages_Entry_t _NW_FBox_InlineFormImages_RadioBoxEntries[] = { - {NW_TRUE, NW_TRUE, qgn_prop_wml_radiobutt_on_sel, qgn_prop_wml_radiobutt_on_sel_mask}, - {NW_FALSE, NW_TRUE, qgn_prop_wml_radiobutt_on, qgn_prop_wml_radiobutt_on_mask}, - {NW_TRUE, NW_FALSE, qgn_prop_wml_radiobutt_off_sel, qgn_prop_wml_radiobutt_off_sel_mask}, - {NW_FALSE, NW_FALSE, qgn_prop_wml_radiobutt_off, qgn_prop_wml_radiobutt_off_mask} -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_InlineFormImages_Class_t NW_FBox_InlineFormImages_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormImages_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_FBox_FormImages */ - /* numCheckBoxEntries */ 4, - /* checkBoxEntries */ _NW_FBox_InlineFormImages_CheckBoxEntries, - /* numCheckBoxEntries */ 4, - /* checkBoxEntries */ _NW_FBox_InlineFormImages_RadioBoxEntries - }, - {/* NW_FBox_InlineFormImages */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_FBox_FormImages_t NW_FBox_FormImages = { - {&NW_FBox_InlineFormImages_Class} -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32InputInteractor.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InputInteractor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_fbox_epoc32inputinteractori.h" - -#include "nw_fbox_inputbox.h" - -#include "nw_evt_activateevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_navevent.h" -#include "nw_evt_unicodekeyevent.h" -#include "nw_evt_controlkeyevent.h" -#include "nw_lmgr_rootbox.h" - -#include "nw_fbox_keymapper.h" -#include "nw_fbox_textareabox.h" -#include "nw_fbox_epoc32inputskin.h" -#include <nwx_time.h> -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32InputInteractor_Class_t NW_FBox_Epoc32InputInteractor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_InputInteractor_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32InputInteractor_t), - /* construct */ _NW_FBox_Interactor_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Interactor */ - /* processEvent */ _NW_FBox_Epoc32InputInteractor_ProcessEvent - }, - { /* NW_FBox_InputInteractor */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_Epoc32InputInteractor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_FBox_Epoc32InputInteractor_ProcessEvent (NW_FBox_Interactor_t* interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event) -{ - NW_FBox_InputBox_t* inputBox; - NW_FBox_InputSkin_t* inputSkin; - NW_Uint8 eventAbsorbed; - - NW_REQUIRED_PARAM(interactor); - - inputBox = NW_FBox_InputBoxOf(box); - inputSkin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - eventAbsorbed = NW_LMgr_EventNotAbsorbed; - - /* Deactivate inputBox */ - if (NW_Object_IsInstanceOf(event, &NW_Evt_ControlKeyEvent_Class) && - NW_FBox_InputBox_IsActive(inputBox)) - { - NW_Evt_ControlKeyType_t keyVal; - - keyVal = NW_Evt_ControlKeyEvent_GetKeyVal(event); - - if (keyVal == NW_Evt_ControlKeyType_SoftA) - { - if (NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkinOf(inputSkin), NW_TRUE) != KBrsrSuccess) - { - return NW_LMgr_EventNotAbsorbed; - } - } - else if (keyVal == NW_Evt_ControlKeyType_SoftB) - { - NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkinOf(inputSkin), NW_FALSE); - } - else - { - return NW_LMgr_EventNotAbsorbed; - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - - /* Activate inputBox */ - else if ((NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) || - (NW_Object_Core_GetClass (event) == &NW_Evt_AccessKeyEvent_Class)) - { - if (!NW_FBox_InputBox_IsActive(inputBox)) - { - NW_FBox_InputBox_SetActive(inputBox, NW_TRUE); - } - else - { - NW_FBox_InputBox_SetVKB(inputBox); - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - - /* The activation made by UnicodeKeyEvent, in this case we have to repeat - the event for Edwin */ - else if (NW_Object_IsInstanceOf(event, &NW_Evt_UnicodeKeyEvent_Class)) - { - TKeyEvent keyEvent; - - if (!NW_FBox_InputBox_IsActive(inputBox)) - { - NW_FBox_InputBox_SetActive(inputBox, NW_TRUE); - } - NW_FBox_InputSkin_t* skin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - NW_FBox_Epoc32InputSkin_t* epoc32InputSkin = NW_FBox_Epoc32InputSkinOf(skin); - /* Make sure that we are active and the input is activated completly*/ - if (NW_FBox_InputBox_IsActive(inputBox) && epoc32InputSkin->cppEpoc32InputBox) - { - keyEvent.iCode = ((NW_Evt_UnicodeKeyEvent_t*)event)->keyVal; - keyEvent.iScanCode = ((NW_Evt_UnicodeKeyEvent_t*)event)->keyVal; - keyEvent.iModifiers = 0x00008001; - keyEvent.iRepeats = 0x00000000; - CCoeEnv::Static()->SimulateKeyEventL( keyEvent, EEventKey ); - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - } - else if ( NW_Object_Core_GetClass( event ) == &NW_Evt_FocusEvent_Class ) - { - if ( !NW_FBox_InputBox_IsFocus( inputBox ) ) - { - NW_FBox_InputBox_SetFocus( inputBox, NW_TRUE ); - } - else - { - NW_FBox_InputBox_SetFocus( inputBox, NW_FALSE ); - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - if (eventAbsorbed == NW_LMgr_EventAbsorbed) - { - return NW_LMgr_EventAbsorbed; - } - return NW_LMgr_EventNotAbsorbed; -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_InputInteractor_t* -NW_FBox_InputInteractor_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_InputInteractor_t*) - NW_Object_New (&NW_FBox_Epoc32InputInteractor_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1334 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include <calslbs.h> // for Latin.... font methods -#include <nwx_string.h> - -#include "nw_fbox_formbox.h" -#include "nw_evt_ecmaevent.h" - - -#include "nw_fbox_epoc32inputskini.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_textareabox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_fbox_passwordboxi.h" -#include "nw_lmgr_box.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "LMgrBoxTreeListener.h" -#include "GDIDevicecontext.h" -#include "nw_fbox_formboxutils.h" -#include "BrsrStatusCodes.h" -#include "nw_lmgr_statictablecellbox.h" - -const NW_GDI_Dimension2D_t extraPadding = {2,2}; - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_GetMaxCharExtent(NW_FBox_InputBox_t* inputBox, - NW_GDI_Dimension2D_t* extent) -{ - CFont* epocCFont; - CGDIFont* font; - CGDIDeviceContext* deviceContext; - NW_LMgr_RootBox_t* rootBox = NULL; - - /* parameter assertion block */ - NW_ASSERT(inputBox!=NULL); - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - NW_ASSERT(extent!=NULL); - - /* get device context */ - rootBox = NW_LMgr_Box_GetRootBox (NW_LMgr_BoxOf (inputBox)); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - /* get the box font */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(inputBox)); - NW_ASSERT (font != NULL); - epocCFont = (CFont*) - deviceContext->GetScaledCFont( font ); - - /* get character extents */ - extent->width = (NW_GDI_Metric_t)epocCFont->MaxNormalCharWidthInPixels(); - extent->height = (NW_GDI_Metric_t)epocCFont->HeightInPixels(); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_TruncateText(NW_FBox_Epoc32InputSkin_t* thisObj, - NW_GDI_Metric_t wrapWidth, - CGDIDeviceContext* deviceContext, - NW_Text_t* text, - CGDIFont* font, - NW_GDI_FlowDirection_t dir) - { - NW_GDI_Dimension2D_t extent; - NW_Text_Length_t valueLength = 0; - NW_Text_Length_t displayLength = 0; - NW_Ucs2* displayStorage = NULL; - NW_Ucs2* valueStorage = NULL; - - NW_TRY(status) - { - status = deviceContext->GetTextExtent(text, - font, - 0, - dir, - &extent); - NW_THROW_ON_ERROR(status); - /* Line fits in the space */ - if (extent.width - 1 <= wrapWidth) - { - NW_ADT_DynamicVector_InsertAt (thisObj->textList, &text, NW_ADT_Vector_AtEnd); - NW_THROW_SUCCESS(status); - } - - /* Line does not fit - truncate it */ - valueStorage = NW_Text_GetUCS2Buffer(text, 0, &valueLength, NULL); - NW_THROW_ON_NULL(valueStorage, status, KBrsrFailure); - - status = NW_FBox_FormBoxUtils_GetDisplayLength( deviceContext, - text, - font, - valueLength, - (NW_Uint16)wrapWidth, - &displayLength, - NW_FALSE); - - NW_THROW_ON_ERROR (status); - displayStorage = NW_Str_New(displayLength + NW_FBox_FormBoxUtils_Truncate_len); - NW_THROW_OOM_ON_NULL(displayStorage, status); - - NW_Mem_memcpy(displayStorage, valueStorage, displayLength*sizeof(NW_Ucs2)); - NW_Mem_memcpy(displayStorage + displayLength, NW_FBox_FormBoxUtils_Truncate, - NW_FBox_FormBoxUtils_Truncate_len*sizeof(NW_Ucs2)); - displayLength += NW_FBox_FormBoxUtils_Truncate_len; - - status = NW_Text_SetStorage(text, displayStorage, displayLength, NW_TRUE); - NW_THROW_ON_ERROR (status); - NW_ADT_DynamicVector_InsertAt (thisObj->textList, &text, NW_ADT_Vector_AtEnd); - } - NW_CATCH(status) - { - if (displayStorage) - { - NW_Mem_Free(displayStorage); - } - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -// NW_FBox_Epoc32GetInnerRectangle -// param: NW_LMgr_Box_t* - pointer to input box -// param: NW_GDI_Rectangle_t* - returns x,y and height,width of inner rectangle -// returns: KBrsrSuccess -// Very similar to LMgrBox.cpp / NW_LMgr_Box_GetInnerRectangle() this routine -// is different in that GetFormatBounds is used here, instead of GetDisplayBounds. -// -static -TBrowserStatusCode -NW_FBox_Epoc32GetInnerRectangle(NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* innerRectangle) -{ - NW_GDI_Rectangle_t bounds; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - /* Get all margin, border and padding settings */ - bounds = (NW_LMgr_Box_GetFormatBounds(box)); - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - - innerRectangle->point.x = - (NW_GDI_Metric_t)(bounds.point.x + borderWidth.left + padding.left); - - innerRectangle->point.y = - (NW_GDI_Metric_t)(bounds.point.y + borderWidth.top + padding.top); - - innerRectangle->dimension.height = (NW_GDI_Metric_t)(bounds.dimension.height - - (borderWidth.top + borderWidth.bottom + padding.top + padding.bottom)); - - innerRectangle->dimension.width = (NW_GDI_Metric_t)(bounds.dimension.width - - (borderWidth.left + borderWidth.right + padding.left + padding.right)); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_SplitText(NW_FBox_InputSkin_t* skin, - NW_FBox_InputBox_t* inputBox, - NW_Text_t* text) - { - NW_FBox_Epoc32InputSkin_t* thisObj; - NW_Text_t* splitText = NULL; - CGDIFont *font = NULL; - NW_Text_Length_t length; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - NW_GDI_Metric_t wrapWidth; - NW_GDI_Dimension2D_t maxCharExtent; - NW_GDI_Rectangle_t innerRect; - NW_ADT_Vector_Metric_t numTexts = 0; - NW_ADT_Vector_Metric_t numSplits = 0; - NW_LMgr_Property_t prop; - NW_GDI_FlowDirection_t dir; - - NW_TRY(status) - { - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(inputBox), NW_CSS_Prop_textDirection, &prop); - - dir = (prop.value.token == NW_CSS_PropValue_ltr) ? NW_GDI_FlowDirection_LeftRight : NW_GDI_FlowDirection_RightLeft; - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT (rootBox != NULL); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - status = NW_FBox_Epoc32InputSkin_GetMaxCharExtent(inputBox, &maxCharExtent); - NW_THROW_ON_ERROR(status); - - /* Set the font to match the parent. TODO: this may not be the best policy */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(font != NULL); - - thisObj = NW_FBox_Epoc32InputSkinOf(skin); - - /* Get the box info */ - NW_FBox_Epoc32GetInnerRectangle(NW_LMgr_BoxOf(inputBox), &innerRect); - innerRect.dimension.height -= extraPadding.height; - innerRect.dimension.width -= extraPadding.width; - numTexts = NW_FBox_InputBox_GetHeight(inputBox); - - // one extra character reserved so that EdWin looks good when wrapping - wrapWidth = innerRect.dimension.width; - - /* Munch until we have consumed the whole text */ - while ((numSplits < numTexts) && (splitText != text)) - { - if (numSplits == (numTexts - 1)) - { - status = NW_FBox_Epoc32InputSkin_TruncateText( thisObj, - wrapWidth, - deviceContext, - text, - font, - dir); - NW_THROW_ON_ERROR(status); - break; - } - /* try to split at the newline if newline char is within the width */ - status = deviceContext->SplitText (text, - font, - wrapWidth, 0, - dir, - &length, - NW_GDI_SplitMode_Newline); - if(status == KBrsrLmgrNoSplit) - { /* Failed */ - /* try to split at space to fit within current line */ - status = deviceContext->SplitText ( text, - font, - wrapWidth, - 0, - dir, - &length, - NW_GDI_SplitMode_WordWrap ); - - if(status == KBrsrLmgrNoSplit) - { /* Failed */ - status = deviceContext->SplitText ( text, - font, - wrapWidth, - 0, - dir, - &length, - NW_GDI_SplitMode_Clip ); - if(status == KBrsrLmgrNoSplit) - { - return KBrsrFailure; - } - } - } - - if (status == KBrsrOutOfMemory) - { - return status; - } - - if (length != NW_Text_GetCharCount(text)) - { - splitText = NW_Text_Split(text, length); - if (splitText == NULL) - { - return KBrsrOutOfMemory; - } - } - else - { - splitText = text; - } - numSplits++; - NW_ADT_DynamicVector_InsertAt (thisObj->textList, &splitText, NW_ADT_Vector_AtEnd); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return KBrsrSuccess; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_Epoc32InputSkin_ClearTextList(NW_FBox_Epoc32InputSkin_t* thisObj) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t size; - NW_Text_t* text; - - size = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(thisObj->textList)); - /* release the dynamic objects pointed by the object array */ - for (index = 0; index < size; index++) - { - text = *(NW_Text_t**) - NW_ADT_Vector_ElementAt(NW_ADT_VectorOf(thisObj->textList), 0); - NW_ADT_DynamicVector_RemoveAt(thisObj->textList, 0); - NW_ASSERT(text); - NW_Object_Delete(text); - } - thisObj->textList->size = 0; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_RecreateTextList(NW_FBox_Epoc32InputSkin_t* thisObj) -{ - NW_FBox_InputBox_t* inputBox = NULL; - NW_FBox_InputSkin_t* inputSkin = NULL; - NW_Text_t* text = NULL; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputSkin_Class)); - - /* for convenience */ - inputSkin = NW_FBox_InputSkinOf(thisObj); - - /* get input box */ - inputBox = NW_FBox_InputSkin_GetInputBox(inputSkin); - NW_ASSERT(inputBox!=NULL); - - /* clears the list of texts */ - NW_FBox_Epoc32InputSkin_ClearTextList(thisObj); - - /* Now we try to get the text to be displayed */ - - /* In case of password box, the following code, converts inputbox value - to * and stores it in InputSkin */ - if (NW_Object_IsClass(inputBox, &NW_FBox_PasswordBox_Class)) - { - status = _NW_FBox_PasswordBox_SetObscureDisplayText(inputBox, NW_TRUE); - if (status != KBrsrSuccess){ - return status; - } - if (inputSkin->displayText){ - text = NW_Text_Copy(inputSkin->displayText, NW_FALSE); - } - } - else - { - if (inputBox->value){ - text = NW_Text_Copy(inputBox->value, NW_FALSE); - } - } - - if (text == NULL){ - return KBrsrSuccess; - } - - /* input text does not fit within the space, input box is on new line, - we need to split the text into multiple rows */ - status = NW_FBox_Epoc32InputSkin_SplitText(inputSkin, inputBox, text); - if (status != KBrsrSuccess){ - return status; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_InputSkin_VKBCallback (void *timerData) -{ - NW_FBox_Epoc32InputSkin_t* thisObj = NW_FBox_Epoc32InputSkinOf(timerData); - //retrieve the epoc32 input box - if (thisObj && thisObj->cppEpoc32InputBox) - { - thisObj->cppEpoc32InputBox->ActivateVKB(); - } - if (thisObj->vkbTimer != NULL) { - NW_Object_Delete (thisObj->vkbTimer); - thisObj->vkbTimer = NULL; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32InputSkin_Class_t NW_FBox_Epoc32InputSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_InputSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32InputSkin_t), - /* construct */ _NW_FBox_Epoc32InputSkin_Construct, - /* destruct */ _NW_FBox_Epoc32InputSkin_Destruct - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw */ _NW_FBox_InputSkin_Draw, - /* NW_FBox_Skin_GetSize */ _NW_FBox_Epoc32InputSkin_GetSize - }, - { /* NW_FBox_InputSkin */ - /* drawText */ _NW_FBox_Epoc32InputSkin_DrawText, - /* moveCursorLeft */ NULL, - /* moveCursorRight */ NULL, - /* clearLastChar */ NULL, - /* setDisplayText */ _NW_FBox_Epoc32InputSkin_SetDisplayText, - /* setActive */ _NW_FBox_Epoc32InputSkin_SetActive, - /* setFocus */ _NW_FBox_Epoc32InputSkin_SetFocus, - /* detailsDialog */ NULL, - /* split */ _NW_FBox_Epoc32InputSkin_Split, - /* vkb */_NW_FBox_Epoc32InputSkin_SetVKB - }, - { /* NW_FBox_Epoc32InputSkin */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - NW_FBox_Epoc32InputSkin_t* thisObj; - - /* avoid "unreferenced formal parameter" warnings */ - (void) argp; - - /* for convenience */ - thisObj = NW_FBox_Epoc32InputSkinOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_InputSkin_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* create the TextBox and insert it into our parent */ - thisObj->textList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_Text_t*), 3,3); - if (thisObj->textList == NULL){ - return KBrsrOutOfMemory; - } - - thisObj->cppEpoc32InputBox = NULL; - - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_Epoc32InputSkin_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_Epoc32InputSkin_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_Epoc32InputSkinOf (dynamicObject); - - /* destroy edwin */ - delete thisObj->cppEpoc32InputBox; - thisObj->cppEpoc32InputBox = NULL; - - if (thisObj->vkbTimer != NULL) { - NW_Object_Delete (thisObj->vkbTimer); - thisObj->vkbTimer = NULL; - } - - NW_FBox_Epoc32InputSkin_ClearTextList(thisObj); - if (thisObj->textList){ - NW_Object_Delete(thisObj->textList); - } - -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) -{ - NW_FBox_InputBox_t* inputBox; - NW_GDI_Dimension2D_t charExtent; - NW_LMgr_PropertyValue_t sizeVal; - NW_GDI_Metric_t defaultHeight; - NW_REQUIRED_PARAM (skin); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_InputBox_Class)); - NW_ASSERT (size!=NULL); - - /* for convenience */ - inputBox = NW_FBox_InputBoxOf (box); - - NW_TRY(status) - { - status = NW_FBox_Epoc32InputSkin_GetMaxCharExtent(inputBox, &charExtent); - NW_THROW_ON_ERROR (status); - - /* set width and height basing on the size of the input box */ - NW_GDI_Metric_t boxWidth = NW_FBox_InputBox_GetWidth(inputBox); - size->width = (NW_GDI_Metric_t) 0; - if (boxWidth > 0) - { - size->width = (NW_GDI_Metric_t) - ((NW_FBox_InputBox_GetWidth(inputBox)+1)*charExtent.width); - } - - defaultHeight = (NW_GDI_Metric_t) - (NW_FBox_InputBox_GetHeight(inputBox)* - (charExtent.height + NW_FBOX_INPUTBOX_LINE_SPACING_IN_PIXELS)); - size->height = defaultHeight; - - /* J-Sky extensions: if width or height properties specified use those. */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess) - size->width = sizeVal.integer; - - /* Zero height input box defaults to the height of the line */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess && sizeVal.integer > defaultHeight) - size->height = sizeVal.integer; - - if (size->width == 0) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(rootBox); - - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext); - - const NW_GDI_Rectangle_t* rectangle = deviceContext->DisplayBounds(); - - size->width = rectangle->dimension.width; - - NW_LMgr_Box_t* tableBox = NW_LMgr_BoxOf(inputBox); - while (tableBox != NULL) - { - if (NW_Object_IsClass(tableBox, &NW_LMgr_StaticTableCellBox_Class)) - { - break; - } - tableBox = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(tableBox); - } - if (tableBox != NULL) - { - size->width = size->width / 3; - } - } - - /* In case of password box, the following code, converts inputbox value - to * and stores it in InputSkin */ - if (NW_Object_IsClass(inputBox, &NW_FBox_PasswordBox_Class)) - { - status = _NW_FBox_PasswordBox_SetObscureDisplayText(inputBox, NW_TRUE); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_Split(NW_FBox_InputSkin_t* inputSkin, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_LMgr_PropertyValue_t sizeVal; - TBrowserStatusCode status; - NW_LMgr_Box_t* box; - NW_FBox_FormBox_t* formBox; - - formBox = NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(inputSkin)); - box = NW_LMgr_BoxOf(formBox); - - *splitBox = NULL; - - /* If box does not fit in the space and the box is not - on the new line the input box needs to be pushed on the new line */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.width > space) && !(flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - if(boxBounds.dimension.width <= space) - { - return KBrsrSuccess; - } - - /* if width was specified we do not want to change it */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess){ - return status; - } - boxBounds.dimension.width = space; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_DrawText (NW_FBox_InputSkin_t* skin, - CGDIDeviceContext* deviceContext) - { - NW_FBox_Epoc32InputSkin_t* thisObj; - NW_ADT_Vector_Metric_t numTexts; - NW_ADT_Vector_Metric_t index; - NW_GDI_Point2D_t start; - NW_FBox_InputBox_t* inputBox; - CGDIFont* font; - TGDIFontInfo fontInfo; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_PropertyValue_t colorVal; - NW_GDI_Color_t fgColor; - NW_LMgr_Property_t prop; - NW_GDI_FlowDirection_t dir; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(skin, &NW_FBox_InputSkin_Class)); - inputBox = NW_FBox_InputSkin_GetInputBox(skin); - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - - thisObj = NW_FBox_Epoc32InputSkinOf(skin); - - NW_TRY(status) { - /* Get the box font */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(font != NULL); - - /* Get info */ - (void)font->GetFontInfo ( &fontInfo); - - /* Get the old foreground color */ - fgColor = deviceContext->ForegroundColor (); - - /* Get and set the box fg color */ - colorVal.integer = 0; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(inputBox), NW_CSS_Prop_color, NW_CSS_ValueType_Color, &colorVal); - - deviceContext->SetForegroundColor ( (NW_GDI_Color_t)colorVal.integer); - - /* Get the start coordinates */ - NW_LMgr_Box_GetInnerRectangle(NW_LMgr_BoxOf(inputBox), &innerRect); - innerRect.dimension.height -= extraPadding.height; - innerRect.dimension.width -= extraPadding.width; - start = innerRect.point; - - /* Set number of rows to be displayed */ - numTexts = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(thisObj->textList)); - - /* maybe we didn't split the texts */ - if (numTexts == 0) - { - status = NW_FBox_InputSkin_SetDisplayText(skin); - NW_THROW_ON_ERROR (status); - numTexts = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(thisObj->textList)); - } - if (numTexts > NW_FBox_InputBox_GetHeight(inputBox)) - { - numTexts = NW_FBox_InputBox_GetHeight(inputBox); - } - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(inputBox), NW_CSS_Prop_textDirection, &prop); - - dir = (prop.value.token == NW_CSS_PropValue_ltr) ? NW_GDI_FlowDirection_LeftRight : NW_GDI_FlowDirection_RightLeft; - if (dir == NW_GDI_FlowDirection_RightLeft && start.x > 0) - { - innerRect.dimension.width -= extraPadding.width; - } - - /* draw Text */ - for (index = 0; index < numTexts; index++) - { - NW_Text_t* text; - NW_Text_t* convertedText; - - /* the index of the row to be drawn */ - text = *(NW_Text_t**) - NW_ADT_Vector_ElementAt(thisObj->textList, index); - NW_ASSERT (NW_Object_IsInstanceOf (text, &NW_Text_UCS2_Class)); - - convertedText = NW_FBox_Skin_NonprintableToSpace (text); - NW_THROW_OOM_ON_NULL (convertedText, status); - - status = deviceContext->DrawText ( &start, - convertedText, font, 0, NW_GDI_TextDecoration_None, dir, innerRect.dimension.width); - NW_THROW_ON_ERROR (status); - - if(convertedText != text) - { - NW_Object_Delete(convertedText); - } - start.y = (NW_GDI_Metric_t)(start.y + - fontInfo.height + NW_FBOX_INPUTBOX_LINE_SPACING_IN_PIXELS); - } - - deviceContext->SetForegroundColor ( fgColor); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetDisplayText(NW_FBox_InputSkin_t* skin) -{ - NW_FBox_Epoc32InputSkin_t* epoc32InputSkin; - epoc32InputSkin = NW_FBox_Epoc32InputSkinOf(skin); - return NW_FBox_Epoc32InputSkin_RecreateTextList(epoc32InputSkin); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_DetailsDialog (NW_FBox_InputSkin_t* thisObj) -{ - NW_REQUIRED_PARAM(thisObj); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetVKB(NW_FBox_InputSkin_t* aSkin) -{ - NW_FBox_Epoc32InputSkin_t* thisObj = NW_FBox_Epoc32InputSkinOf(aSkin); - - //retrieve the epoc32 input box - if (thisObj && thisObj->cppEpoc32InputBox) - { - thisObj->cppEpoc32InputBox->ActivateVKB(); - } - - // also try to launch async in case dialog is up - if (thisObj->vkbTimer == NULL) - { - thisObj->vkbTimer = NW_System_Timer_New (NW_FBox_InputSkin_VKBCallback, - thisObj, 4000, NW_FALSE); - } - - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetActive (NW_FBox_InputSkin_t* aSkin) -{ - NW_FBox_InputSkin_t* skin = (NW_FBox_InputSkin_t*)aSkin; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_FrameInfo_t padding; - TMargins8 margins; - NW_Uint32 version; /* WBXML encoded to WAPFORUM WML spec version 1.x */ - NW_LMgr_Property_t prop; - NW_FBox_Epoc32InputSkin_t* thisObj = NW_FBox_Epoc32InputSkinOf(skin); - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(skin, &NW_FBox_Epoc32InputSkin_Class)); - - NW_TRY(status) - { - /* for convenience */ - status = NW_FBox_Epoc32InputSkin_Redraw(thisObj); - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (skin); - NW_ASSERT(inputBox); - - /* get form liaison - required for WBXML version */ - NW_FBox_FormLiaison_t* formLiaison = NW_FBox_FormBox_GetFormLiaison(inputBox); - NW_ASSERT(formLiaison); - - /* get device context */ - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(rootBox); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext); - - /* get the container */ - MBoxTreeListener* listener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - NW_ASSERT(listener); - CCoeControl* container = (CCoeControl*)listener->GetParentWindow(); - - NW_ASSERT(container); - - /* get the epoc32rect */ - NW_LMgr_Box_GetInnerRectangle(NW_LMgr_BoxOf(inputBox), &innerRect); - innerRect.dimension.height -= extraPadding.height; - innerRect.dimension.width -= extraPadding.width; - NW_GDI_Point2D_t origin = *(deviceContext->Origin()); - NW_GDI_Rectangle_t bounds = NW_LMgr_Box_GetDisplayBounds( NW_LMgr_BoxOf( inputBox ) ); - TRect epoc32Rect( TPoint( bounds.point.x - origin.x, bounds.point.y - origin.y), - TSize( bounds.dimension.width, bounds.dimension.height) ); - - /* get format and emptyok properties */ - NW_FBox_Validator_EmptyOk_t isEmptyOk = NW_FBox_Validator_EmptyOk_None; - const NW_Ucs2* formatBuffer = NULL; - NW_FBox_Validator_Mode_t mode = NW_FBox_Validator_Mode_None; - - NW_Text_Length_t formatBufferLength = 0; - - if ( inputBox->validator ) - { - status = NW_FBox_Validator_GetFormat(inputBox->validator, &formatBuffer, &mode, &isEmptyOk); - _NW_THROW_ON_ERROR(status); - - if (formatBuffer) - { - formatBufferLength = (NW_Text_Length_t) NW_Str_Strlen( formatBuffer ); - } - } - - /* get initial text from */ - NW_Ucs2* initialStringBuffer=NULL; - NW_Text_Length_t initialStringLength=0; - if ( inputBox->value ) - { - initialStringBuffer = (NW_Ucs2*)inputBox->value->storage; - initialStringLength = inputBox->value->characterCount; - } - - /* get isSecret parameter */ - TBool isSecret = EFalse; - if(NW_Object_IsInstanceOf(inputBox, &NW_FBox_PasswordBox_Class)) - { - isSecret = ETrue; - } - - /* get font */ - CGDIFont* font = NW_LMgr_Box_GetFont( NW_LMgr_BoxOf( inputBox ) ); - NW_THROW_OOM_ON_NULL(font, status); - CFont* epocFont = (CFont*) - deviceContext->GetScaledCFont( font ); - - /* get max char extent */ - NW_GDI_Dimension2D_t maxCharExtent; - status = NW_FBox_Epoc32InputSkin_GetMaxCharExtent(inputBox, &maxCharExtent); - _NW_THROW_ON_ERROR(status); - - /* Get box info */ - NW_LMgr_Box_GetPadding(NW_LMgr_BoxOf(inputBox), &padding, ELMgrFrameAll ); - - margins.iLeft = (TInt8)(padding.left+1); - margins.iTop = (TInt8)(padding.top+1); - margins.iRight = (TInt8)padding.right; - margins.iBottom = (TInt8)padding.bottom; - - /* if there's one line only - wrap width is one char more to - * avoid jumping while resizing */ - TInt wrapWidth = innerRect.dimension.width; - status = NW_FBox_FormLiaison_GetWBXMLVersion(formLiaison, &version); - _NW_THROW_ON_ERROR(status); - - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(inputBox), NW_CSS_Prop_textDirection, &prop); - - /* create CEpoc32InputBox */ - TRAPD( err, thisObj->cppEpoc32InputBox = - CEpoc32InputBox::NewL ( - container, - thisObj, - epoc32Rect, - margins, - wrapWidth, - TPtrC( initialStringBuffer, initialStringLength ), - TPtrC( formatBuffer, formatBufferLength ), - mode, - isSecret, - isEmptyOk, - version, - NW_FBox_InputBox_GetMaxChars( inputBox ), - *epocFont, - (prop.value.token == NW_CSS_PropValue_ltr) ? ELayoutAlignLeft : ELayoutAlignRight) ); - if (err == KErrNoMemory) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - if (err!=KErrNone) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - (void) NW_FBox_FormLiaison_DelegateEcmaEvent (formLiaison, - NW_FBox_FormBox_GetFormCntrlID(inputBox), - NW_Ecma_Evt_OnClick); - } - NW_CATCH(status) { } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32InputSkin_SetFocus( NW_FBox_InputSkin_t* aSkin, NW_Bool setFocus ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_FBox_InputSkin_t* skin = ( NW_FBox_InputSkin_t* ) aSkin; - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf( skin, &NW_FBox_Epoc32InputSkin_Class ) ); - /* for convenience */ - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox( skin ); - NW_ASSERT( inputBox ); - if( setFocus && !inputBox->focus ) - { - inputBox->focus = NW_TRUE; - /* get form liaison - required for WBXML version */ - NW_FBox_FormLiaison_t* formLiaison = - NW_FBox_FormBox_GetFormLiaison( inputBox ); - NW_ASSERT(formLiaison); - // generate focus event - status = NW_FBox_FormLiaison_DelegateEcmaEvent( - formLiaison, - NW_FBox_FormBox_GetFormCntrlID( inputBox ), - NW_Ecma_Evt_OnFocus ); - } - else if ( !setFocus && inputBox->focus ) - inputBox->focus = NW_FALSE; - return status; - } - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_Epoc32InputSkin_Scroll(NW_FBox_Epoc32InputSkin_t* thisObj, TInt deltaY) -{ - NW_GDI_Point2D_t origin; - NW_FBox_InputBox_t* inputBox; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_Epoc32InputSkin_Class)); - - /* get the device context */ - inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - NW_ASSERT(inputBox); - - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(rootBox); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext); - - origin = *(deviceContext->Origin()); - - origin.y = (NW_GDI_Metric_t) (origin.y - deltaY); - - deviceContext->SetOrigin( &origin ); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_GetViewRect(NW_FBox_Epoc32InputSkin_t* thisObj, TRect& viewRect) -{ - NW_GDI_Rectangle_t viewBounds; - NW_FBox_InputBox_t* inputBox; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_Epoc32InputSkin_Class)); - - NW_TRY(status) - { - /* get the device context */ - inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - NW_THROW_OOM_ON_NULL(inputBox, status); - - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT(rootBox); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext); - - viewBounds = *(deviceContext->DisplayBounds()); - - viewRect.iTl.iX = viewBounds.point.x; - viewRect.iTl.iY = viewBounds.point.y; - viewRect.iBr.iX = viewBounds.point.x + viewBounds.dimension.width; - viewRect.iBr.iY = viewBounds.point.y + viewBounds.dimension.height; - } - NW_CATCH(status) {} - NW_FINALLY - { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -static -void NW_FBox_Epoc32InputSkin_SaveTextAndCloseEdwin(NW_FBox_Epoc32InputSkin_t* thisObj) -{ - NW_FBox_InputBox_t* inputBox; /* pointer to associated InputBox class */ - HBufC* buf = NULL; - HBufC* newBuf = NULL; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_Epoc32InputSkin_Class)); - - NW_TRY(status) - { - thisObj->posCursorValue = thisObj->cppEpoc32InputBox->CurPos(); - thisObj->reallyEdited = NW_TRUE; - - inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - - NW_THROW_OOM_ON_NULL(inputBox, status); - - /* get text from edwin and save it to the form liaison */ - buf = thisObj->cppEpoc32InputBox->ReadableText(); - NW_THROW_OOM_ON_NULL(buf, status); - - /* deactivate input box */ - NW_FBox_InputBox_SetActive (inputBox, NW_FALSE); - - /* SetActive doesn't return error status, so make sure that we're not active */ - if (NW_FBox_InputBox_IsActive(inputBox)==NW_FALSE) - { - /* destroy edwin */ - delete thisObj->cppEpoc32InputBox; - thisObj->cppEpoc32InputBox = NULL; - - /* replace all NW_TEXT_UCS2_PARASEP with NW_TEXT_UCS2_CR and NW_TEXT_UCS2_LF */ - TInt pos = 0; - TPtr ptr = buf->Des(); - TInt len = buf->Length(); - - // count how many NW_TEXT_UCS2_PARASEP so we know how big buffer we need - TInt count = 0; - while ( pos < len ) - { - if ( ptr[pos++] == NW_TEXT_UCS2_PARASEP ) - { - count++; - } - } - - if (count == 0) - { - status=NW_FBox_Epoc32InputSkin_SetValue(thisObj, - buf->Des().Ptr(), - (NW_Text_Length_t)buf->Length() ); - } - else - { - // alloc the new buffer - newBuf = HBufC::NewL( len + count); - NW_THROW_OOM_ON_NULL(newBuf, status); - - TPtr newPtr(newBuf->Des()); - newPtr.Copy(ptr); - pos = 0; - - _LIT(Lf, "\n"); // For NW_TEXT_UCS2_LF - while ( (pos=newPtr.Locate(TChar(NW_TEXT_UCS2_PARASEP))) != KErrNotFound ) - { - newPtr[pos++] = NW_TEXT_UCS2_CR; - newPtr.Insert(pos, Lf); - } - status=NW_FBox_Epoc32InputSkin_SetValue(thisObj, - newBuf->Des().Ptr(), - (NW_Text_Length_t)newBuf->Length() ); - delete newBuf; - } - - NW_THROW_ON_ERROR(status); - - /* update value to the form liaison */ - status=NW_FBox_InputBox_SetFormLiaisonVal(inputBox); - NW_THROW_ON_ERROR(status); - - if(status == KBrsrSuccess) - { - NW_FBox_FormLiaison_t* formLiaison = NW_FBox_FormBox_GetFormLiaison(inputBox); - (void) NW_FBox_FormLiaison_DelegateEcmaEvent (formLiaison, - NW_FBox_FormBox_GetFormCntrlID(inputBox), - NW_Ecma_Evt_OnChange); - } - - - - status=NW_FBox_Epoc32InputSkin_Redraw(thisObj); - NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) {} - NW_FINALLY - { - delete buf; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkin_t* thisObj, NW_Bool saveText) -{ - NW_FBox_InputBox_t* inputBox; /* pointer to associated InputBox class */ - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_Epoc32InputSkin_Class)); - - /* for convenience */ - NW_TRY(status) - { - inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - NW_THROW_OOM_ON_NULL(inputBox, status); - - NW_THROW_ON_NULL(thisObj->cppEpoc32InputBox, status, KBrsrFailure); - - /* if user wants to save his input */ - if (saveText == NW_TRUE) - { - /* make sure that input is correct, so we can save it */ - if (thisObj->cppEpoc32InputBox->OkToExit()) - { - NW_FBox_Epoc32InputSkin_SaveTextAndCloseEdwin( thisObj ); - NW_FBox_FormLiaison_t* formLiaison = NW_FBox_FormBox_GetFormLiaison(inputBox); - (void) NW_FBox_FormLiaison_DelegateEcmaEvent (formLiaison, - NW_FBox_FormBox_GetFormCntrlID(inputBox), - NW_Ecma_Evt_OnBlur); - } - else - NW_THROW_STATUS(status, KBrsrFailure); - } - else - { - /* restore original value from the form liaison */ - NW_Text_t* buffer = NULL; - NW_FBox_FormLiaison_t* formLiaison = NW_FBox_FormBox_GetFormLiaison(inputBox); - NW_THROW_OOM_ON_NULL(formLiaison, status); - - void* controlId = NW_FBox_FormBox_GetFormCntrlID(inputBox); - NW_Bool dummy = NW_FALSE; /* Not used here, but informs us if "value" attribute used */ - status = NW_FBox_FormLiaison_GetStringValue(formLiaison, controlId, &buffer, &dummy); - NW_THROW_ON_ERROR(status); - - status = NW_FBox_InputBox_SetDefaultVal(inputBox, buffer); - NW_THROW_ON_ERROR(status); - - /* restore previous cursor position when cancel input */ - thisObj->posCursorValue = thisObj->prevCursorValue; - - // if NO static characters involved in format - cancel means NOT REALLY EDITED. - // if static characters are involved - "reallyEdited" will determine what action - // - read, "what initial value" will be displayed by CEpoc32InputBox::SetInitialTextL. - if (!thisObj->cppEpoc32InputBox->IsStaticCharInvolved()) - { - thisObj->reallyEdited = NW_FALSE; - } - NW_FBox_InputBox_SetActive(inputBox, NW_FALSE); - - /* SetActive doesn't return error status, so make sure that we're not active */ - if (NW_FBox_InputBox_IsActive(inputBox)==NW_FALSE) - { - /* destroy edwin */ - delete thisObj->cppEpoc32InputBox; - thisObj->cppEpoc32InputBox = NULL; - } - - /* text has changed - relayout required */ - status = NW_FBox_InputSkin_SetDisplayText(NW_FBox_InputSkinOf(thisObj)); - NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status){ - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_FBox_Epoc32InputSkin_TextChanged(NW_FBox_Epoc32InputSkin_t* thisObj, - const NW_Ucs2* string) -{ - const NW_Ucs2* storage; - NW_Text_Length_t length; - NW_Bool freeNeeded; - NW_Int32 ret; - - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - if (inputBox->value == NULL){ - return NW_TRUE; - } - - storage = NW_Text_GetUCS2Buffer (inputBox->value, 0, &length, &freeNeeded) ; - if (storage == NULL) { - return NW_TRUE; - } - - ret = NW_Str_Stricmp(storage, string); - if (freeNeeded){ - NW_Mem_Free((NW_Ucs2*)storage); - } - if (ret == 0){ - return NW_FALSE; - } - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_SetValue(NW_FBox_Epoc32InputSkin_t* thisObj, - const NW_Ucs2* string, - NW_Text_Length_t length) -{ - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - - - if (inputBox->value == NULL) - { - inputBox->value = (NW_Text_t*) - NW_Text_UCS2_New((void*)string, length, NW_Text_Flags_Copy); - if (inputBox->value == NULL) - { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; - } - TBrowserStatusCode status = NW_Text_SetStorage(inputBox->value, (void*)string, length, NW_Text_Flags_Copy); - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_Redraw(NW_FBox_Epoc32InputSkin_t* thisObj) -{ - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - NW_ASSERT(inputBox); - return NW_LMgr_Box_Refresh(NW_LMgr_BoxOf(inputBox)); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_Epoc32InputSkin_RedrawScreen(NW_FBox_Epoc32InputSkin_t* thisObj) -{ - NW_LMgr_RootBox_t* rootBox; - MBoxTreeListener* boxTreeListener; - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (thisObj); - NW_ASSERT (inputBox != NULL); - - /* we're going to need the deviceContext to redraw the box */ - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(inputBox)); - NW_ASSERT (rootBox != NULL); - - boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - NW_ASSERT (boxTreeListener != NULL); - - return boxTreeListener->RedrawDisplay (NW_TRUE); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_InputSkin_t* -NW_FBox_InputSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_InputSkin_t*) - NW_Object_New (&NW_FBox_Epoc32InputSkin_Class, formBox); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1497 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_fbox_epoc32selectskini.h" -#include "nw_image_cannedimages.h" -#include "nw_fbox_selectboxi.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "nw_fbox_epoc32formimages.h" -#include "nw_gdi_types.h" -#include "GDIDevicecontext.h" -#include "nw_adt_resizablevector.h" -#include "nw_fbox_formboxutils.h" -#include "KimonoLocalizationStrings.h" -#include "nwx_logger.h" -#include "nw_lmgr_statictablecellbox.h" -#include <nw_browser_browserimages.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private data typed - * ------------------------------------------------------------------------- */ - -static const NW_Ucs2 _NW_FBox_Epoc32SelectSkin_Separator[] = {',',' ','\0'}; -#define NW_FBox_Epoc32SelectSkin_Separator_len ((sizeof(_NW_FBox_Epoc32SelectSkin_Separator)\ - /sizeof(NW_Ucs2))-1) - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -NW_Ucs2* -NW_FBox_Epoc32SelectSkin_GetNewUcs2Str(NW_FBox_Epoc32SelectSkin_t* skin, - NW_Text_t* text) -{ - NW_REQUIRED_PARAM(skin); - - return - NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetArrowSize(NW_FBox_SelectBox_t* selectBox, - NW_GDI_Dimension3D_t* imageSize) -{ - const NW_Image_AbstractImage_t* image; - NW_LMgr_RootBox_t* rootBox; - - NW_ASSERT(imageSize!=NULL); - NW_ASSERT(selectBox!=NULL); - - /* get the root box */ - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(selectBox)); - NW_ASSERT(rootBox); - - /* get the image from the canned images dictionary */ - NW_ASSERT(rootBox->cannedImages!=NULL); - image = NW_Image_CannedImages_GetImage( rootBox->cannedImages, - NW_Image_SelectArrow ); - NW_ASSERT(image); - return NW_Image_AbstractImage_GetSize (image, imageSize); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetTextExtent(NW_FBox_Epoc32SelectSkin_t* selectSkin, - NW_FBox_SelectBox_t* selectBox, - CGDIDeviceContext* deviceContext, - NW_GDI_Dimension2D_t* extent, - NW_Text_t* text) - { - NW_REQUIRED_PARAM(selectSkin); - - CGDIFont *font; - TBrowserStatusCode status; - TGDIFontInfo fontInfo; - - extent->width = 0; - extent->height = 0; - - /* Set the font to match the parent. */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(selectBox)); - NW_ASSERT(font != NULL); - /* Get info */ - font->GetFontInfo ( &fontInfo); - - if (text == NULL) - { - return KBrsrSuccess; - } - - status = deviceContext->GetTextExtent (text, - font, - 0, - NW_GDI_FlowDirection_LeftRight, - extent); - - extent->height = fontInfo.height; - - return status; - } - -/* ------------------------------------------------------------------------- */ -static -NW_Int32 -NW_FBox_Epoc32SelectSkin_GetMaxTextWidth(NW_FBox_Epoc32SelectSkin_t* selectSkin, - NW_FBox_SelectBox_t* selectBox) - { - NW_REQUIRED_PARAM(selectSkin); - - CGDIFont *font; - CGDIDeviceContext* deviceContext; - TGDIFontInfo fontInfo; - NW_Int32 maxWidth = 0; - NW_Text_t* text = NULL; - NW_ADT_Vector_Metric_t index; - NW_GDI_Dimension2D_t extent; - NW_FBox_OptionBox_t* optionBox = NULL; - - /* we're going to need the deviceContext to do text extent calculations */ - deviceContext = NW_LMgr_RootBox_GetDeviceContext (NW_LMgr_Box_GetRootBox(selectBox)); - NW_ASSERT (deviceContext != NULL); - - /* Set the font to match the parent. */ - font = NW_LMgr_Box_GetFont(NW_LMgr_BoxOf(selectBox)); - NW_ASSERT(font != NULL); - font->GetFontInfo( &fontInfo); - - NW_Int32 numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - - for(index = 0; index < numItems; index++) - { - optionBox = *(NW_FBox_OptionBox_t**)NW_ADT_Vector_ElementAt(selectBox->children, index); - - if (!NW_Object_IsInstanceOf(optionBox, &NW_FBox_OptionBox_Class)) - continue; - - text = NW_FBox_OptionBox_GetText(optionBox); - if (text == NULL) - continue; - - extent.width = 0; - extent.height = 0; - deviceContext->GetTextExtent (text, font, 0, NW_GDI_FlowDirection_LeftRight, &extent); - if (maxWidth < extent.width) - { - maxWidth = extent.width; - } - } - - return maxWidth; - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_SetDisplayText(NW_FBox_Epoc32SelectSkin_t* thisObj) - { - CGDIDeviceContext* deviceContext = NULL; - NW_FBox_SelectBox_t* selectBox = NULL; - NW_GDI_Dimension2D_t extent; - NW_GDI_Dimension2D_t charExtent; - NW_GDI_Dimension3D_t imageSize; - NW_Uint16 displayWidth = 0; - NW_GDI_Rectangle_t innerRect; - NW_Text_Length_t valueLength = 0; - NW_Text_Length_t displayLength = 0; - CGDIFont *font = NULL; - NW_Ucs2* displayStorage = NULL; - NW_Ucs2* valueStorage = NULL; - - NW_TRY(status) - { - selectBox = NW_FBox_SelectSkin_GetSelectBox(thisObj); - NW_ASSERT (selectBox); - - /* we're going to need the deviceContext to do text extent calculations */ - deviceContext = NW_LMgr_RootBox_GetDeviceContext (NW_LMgr_Box_GetRootBox(selectBox)); - NW_ASSERT (deviceContext != NULL); - - /* Set the font to match the parent. TODO: this may not be the best policy */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(selectBox)); - NW_ASSERT(font != NULL); - - /* extract the image from our canned images */ - status = NW_FBox_Epoc32SelectSkin_GetArrowSize(selectBox, &imageSize); - NW_THROW_ON_ERROR (status); - - status = NW_FBox_SelectSkin_GetMCharExtent(NW_FBox_SelectSkinOf(thisObj), &charExtent); - NW_THROW_ON_ERROR (status); - - if (thisObj->value == NULL) - { - /* nothing to display */ - NW_THROW_SUCCESS(status); - } - - /* Find out how much space is required to display the value */ - status = NW_FBox_Epoc32SelectSkin_GetTextExtent(thisObj, selectBox, - deviceContext, &extent, NW_TextOf(thisObj->value)); - NW_THROW_ON_ERROR (status); - - displayWidth = (NW_Uint16)(extent.width + imageSize.width); - NW_LMgr_Box_GetInnerRectangle(NW_LMgr_BoxOf(selectBox), &innerRect); - - valueStorage = - NW_Text_GetUCS2Buffer(NW_TextOf(thisObj->value), 0, &valueLength, NULL); - - /* The text fits within the space */ - if (displayWidth <= innerRect.dimension.width) - { - /* Make a copy of the value */ - if (valueStorage) - { - displayStorage = NW_Str_Newcpy(valueStorage); - NW_THROW_OOM_ON_NULL(displayStorage, status); - } - - if (thisObj->displayText) - { - status = NW_Text_SetStorage(NW_TextOf(thisObj->displayText), displayStorage, - valueLength, NW_Text_Flags_TakeOwnership); - NW_THROW_ON_ERROR (status); - } - else - { - thisObj->displayText = NW_Text_UCS2_New(displayStorage, valueLength, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL(thisObj->displayText, status); - } - NW_THROW_SUCCESS(status); - } - - /* The text does not fit the select box. We have to truncate it */ - status = NW_FBox_FormBoxUtils_GetDisplayLength(deviceContext, - (NW_Text_t*)thisObj->value, - font, - valueLength, - (NW_Uint16)(innerRect.dimension.width - imageSize.width), - &displayLength, NW_FALSE); - - NW_THROW_ON_ERROR (status); - displayStorage = NW_Str_New(displayLength + NW_FBox_FormBoxUtils_Truncate_len); - NW_THROW_OOM_ON_NULL(displayStorage, status); - - NW_Mem_memcpy(displayStorage, (valueStorage), displayLength*sizeof(NW_Ucs2)); - NW_Mem_memcpy(displayStorage + displayLength, NW_FBox_FormBoxUtils_Truncate, - NW_FBox_FormBoxUtils_Truncate_len*sizeof(NW_Ucs2)); - displayLength += NW_FBox_FormBoxUtils_Truncate_len; - - if (thisObj->displayText == NULL) - { - thisObj->displayText = NW_Text_UCS2_New(displayStorage, displayLength, NW_Text_Flags_TakeOwnership); - if (thisObj->displayText == NULL) - { - NW_Mem_Free(displayStorage); - status = KBrsrOutOfMemory; - } - } - else - { - status = NW_Text_SetStorage(NW_TextOf(thisObj->displayText), displayStorage, - displayLength, NW_TRUE); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_FBox_Epoc32SelectSkin_OptionStateChanged(NW_FBox_Epoc32SelectSkin_t *skin, - NW_Ucs2* data, - NW_FBox_OptionBox_t* optionBox) -{ - NW_Ucs2* textStr; - NW_Uint8 freeNeeded; - NW_Text_Length_t length; - NW_Text_Length_t dataLength; - NW_Text_t* text; - NW_Bool changed; - - NW_REQUIRED_PARAM(skin); - - dataLength = (NW_Text_Length_t)NW_Str_Strlen(data); - - changed = NW_FALSE; - text = NW_FBox_OptionBox_GetText(optionBox); - textStr = (NW_Ucs2*) NW_Text_GetUCS2Buffer (text, 0, &length, &freeNeeded); - - if (length == dataLength) - { - if (!NW_Mem_memcmp (data, textStr, length * sizeof (NW_Ucs2))) { - NW_FBox_OptionBox_ChangeState(optionBox); - changed = NW_TRUE; - } - } - - if (freeNeeded){ - NW_Mem_Free(textStr); - } - - return changed; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_FBox_Epoc32SelectSkin_OptGrpStateChanged(NW_FBox_Epoc32SelectSkin_t *skin, - NW_Ucs2* data, - NW_FBox_OptGrpBox_t* optGrpBox) -{ - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(optGrpBox->children)); - - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(optGrpBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - if (NW_FBox_Epoc32SelectSkin_OptionStateChanged(skin, data, NW_FBox_OptionBoxOf(formBox))) - return NW_TRUE; - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - /* recurse here */ - if (NW_FBox_Epoc32SelectSkin_OptGrpStateChanged(skin, data, NW_FBox_OptGrpBoxOf(formBox))) - return NW_TRUE; - } - else{ - NW_ASSERT(0); - } - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_FBox_Epoc32SelectSkin_ChangeState(NW_FBox_Epoc32SelectSkin_t *skin, - NW_Ucs2* data) -{ - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - NW_FBox_SelectBox_t* selectBox; - - selectBox = (NW_FBox_SelectBox_t*)NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(selectBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - if (NW_FBox_Epoc32SelectSkin_OptionStateChanged(skin, data, NW_FBox_OptionBoxOf(formBox))) - return NW_TRUE; - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - if (NW_FBox_Epoc32SelectSkin_OptGrpStateChanged(skin, data, NW_FBox_OptGrpBoxOf(formBox))) - return NW_TRUE; - } - else{ - NW_ASSERT(0); - } - } - return NW_FALSE; -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetOptionValue(NW_FBox_OptionBox_t* optionBox, - NW_Ucs2** val, - NW_Bool* updated) -{ - NW_Ucs2* textStr = NULL; - NW_Uint8 freeNeeded = NW_FALSE; - NW_Text_Length_t length; - NW_Text_t* text; - NW_Bool state; - TBrowserStatusCode status = KBrsrSuccess; - - if (updated == NULL) - { - return KBrsrFailure; - } - - state = NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(optionBox)); - if (state == NW_FALSE) - { - *updated = NW_FALSE; - goto cleanup; - } - - text = NW_FBox_OptionBox_GetText(optionBox); - textStr = - NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Aligned, &length, &freeNeeded); - - if (textStr == NULL) - { - *updated = NW_FALSE; - status = KBrsrOutOfMemory; - goto cleanup; - } - - if (*val) - { - NW_Ucs2* str; - NW_Uint16 newLength; - - newLength = (NW_Uint16) - (NW_Str_Strlen (*val) + NW_FBox_Epoc32SelectSkin_Separator_len + length); - str = NW_Str_New(newLength); - - if (str == NULL) - { - *updated = NW_FALSE; - status = KBrsrOutOfMemory; - goto cleanup; - } - - NW_Mem_memset(str, 0, newLength); - NW_Str_Strcpy(str, *val); - NW_Str_Strcat(str, _NW_FBox_Epoc32SelectSkin_Separator); - NW_Str_Strcat(str, textStr); - NW_Str_Delete(*val); - *val = str; - } - else{ - *val = NW_Str_Newcpy(textStr); - - if (*val == NULL) - { - *updated = NW_FALSE; - status = KBrsrOutOfMemory; - goto cleanup; - } - } - - *updated = NW_TRUE; - -cleanup: - if (freeNeeded){ - NW_Mem_Free(textStr); - } - - return status; -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetChildrenValue(NW_FBox_Epoc32SelectSkin_t *skin, - NW_FBox_FormBox_t* parentFormBox, - NW_ADT_Vector_Metric_t numParentItems, - NW_Bool multiple, - NW_Ucs2** newStr, - NW_Bool* updated) -{ - NW_ADT_Vector_Metric_t index; - NW_FBox_OptionBox_t* optionBox; - TBrowserStatusCode status = KBrsrSuccess; - *updated = NW_FALSE; - - for(index = 0; index < numParentItems; index++) - { - NW_FBox_FormBox_t* childFormBox; - - childFormBox = NULL; - - /* get the next child of the parent */ - if (NW_Object_IsInstanceOf(parentFormBox, &NW_FBox_SelectBox_Class)) - { - childFormBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(NW_FBox_SelectBoxOf(parentFormBox)->children, index); - } - else if (NW_Object_IsInstanceOf(parentFormBox, &NW_FBox_OptGrpBox_Class)) - { - childFormBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(NW_FBox_OptGrpBoxOf(parentFormBox)->children, index); - } - else - { - /* bad content - only <select> and <optgroup> are allowed as parent */ - NW_ASSERT((NW_Object_IsInstanceOf(parentFormBox, &NW_FBox_SelectBox_Class)) - || (NW_Object_IsInstanceOf(parentFormBox, &NW_FBox_OptGrpBox_Class))); - - } - - /* handle the child */ - if (childFormBox == NULL) - { - NW_LOG0(NW_LOG_LEVEL1, "!!! NW_FBox_Epoc32SelectSkin_GetChildrenValue: BadContent: childFormBox==NULL"); - status = KBrsrXhtmlBadContent; - break; - } - else if (NW_Object_IsInstanceOf(childFormBox, &NW_FBox_OptionBox_Class)) - { - optionBox = NW_FBox_OptionBoxOf(childFormBox); - - status = NW_FBox_Epoc32SelectSkin_GetOptionValue(NW_FBox_OptionBoxOf(optionBox), - newStr, - updated); - if (status != KBrsrSuccess) - break; - - if (*updated && !multiple) - break; - } - else if (NW_Object_IsInstanceOf(childFormBox, &NW_FBox_OptGrpBox_Class)) - { - NW_FBox_OptGrpBox_t* optGrpBox; - NW_ADT_Vector_Metric_t numOptGrpItems; - - optGrpBox = NW_FBox_OptGrpBoxOf(childFormBox); - numOptGrpItems = NW_FBox_OptGrpBox_GetNumOptions(optGrpBox); - - /* recurse here */ - status = NW_FBox_Epoc32SelectSkin_GetChildrenValue(skin, - childFormBox, - numOptGrpItems, - multiple, - newStr, - updated); - if (status != KBrsrSuccess) - break; - - if (*updated && !multiple) - break; - } - else - { - /* bad content - only <optgroup> and <option> are allowed as children */ - NW_ASSERT((NW_Object_IsInstanceOf(childFormBox, &NW_FBox_OptionBox_Class)) - || (NW_Object_IsInstanceOf(childFormBox, &NW_FBox_OptGrpBox_Class))); - - NW_LOG0(NW_LOG_LEVEL1, "!!! NW_FBox_Epoc32SelectSkin_GetChildrenValue: BadContent: instance type error"); - status = KBrsrXhtmlBadContent; - break; - } - } - - return status; - -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_UpdateValue(NW_FBox_Epoc32SelectSkin_t *skin) -{ - NW_FBox_SelectBox_t* selectBox; - NW_ADT_Vector_Metric_t numItems; - NW_Bool multiple; - NW_Ucs2* newStr; - NW_Bool updated; - TBrowserStatusCode status; - - selectBox = (NW_FBox_SelectBox_t*)NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - multiple = NW_FBox_SelectBox_IsMultiple(selectBox); - newStr = NULL; - - status = NW_FBox_Epoc32SelectSkin_GetChildrenValue(skin, - NW_FBox_FormBoxOf(selectBox), - numItems, - multiple, - &newStr, - &updated); - - if (status != KBrsrSuccess) { - goto cleanup; - } - - if (newStr == NULL){ - return NW_Text_SetStorage (skin->value, NULL, 0, 0); - } - else{ - status = NW_Text_SetStorage(NW_TextOf(skin->value), - newStr, - 0, - NW_Text_Flags_TakeOwnership); - } - -cleanup: - return status; - -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_ClearOptionsList( NW_FBox_Epoc32SelectSkin_t* thisObj ) -{ - NW_ASSERT (thisObj != NULL); - - if (thisObj->optionsList != NULL) - { - NW_Int32 index; - NW_Dlg_SelectItemData_t* entry; - NW_Uint32 optionsListSize; - - optionsListSize = NW_ADT_Vector_GetSize (NW_ADT_VectorOf (thisObj->optionsList)) ; - index = 0; - for (index = optionsListSize - 1; index >= 0; index--) - { - entry = (NW_Dlg_SelectItemData_t*) - NW_ADT_Vector_ElementAt (NW_ADT_VectorOf (thisObj->optionsList), - (NW_ADT_Vector_Metric_t) index) ; - NW_Mem_Free (entry->text); - NW_ADT_DynamicVector_RemoveAt(thisObj->optionsList, - (NW_ADT_Vector_Metric_t)index); - } - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_SelectPromptResp (NW_Dlg_SelectData_t *data, - void* callbackCtx, - NW_Bool selectionChanged) -{ - NW_FBox_Epoc32SelectSkin_t* skin; - NW_FBox_SelectBox_t* selectBox; - NW_FBox_FormLiaison_t* formLiason; - TBrowserStatusCode status = KBrsrSuccess; - TUint32 ii; - TUint32 count; - NW_Dlg_SelectItemData_t* selectItemData; - TBool updateDisplay = NW_TRUE; - - skin = (NW_FBox_Epoc32SelectSkin_t*)callbackCtx; - selectBox = (NW_FBox_SelectBox_t*)NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - formLiason = NW_FBox_FormBox_GetFormLiaison(selectBox); - - - count = NW_ADT_Vector_GetSize(data->options); - - /* first set all options without onpick property */ - for ( ii = 0; ii < count; ++ii ) - { - selectItemData = (NW_Dlg_SelectItemData_t*)NW_ADT_Vector_ElementAt( data->options, (NW_ADT_Vector_Metric_t)ii ); - - if ( !selectItemData->isOptGroup && !selectItemData->hasOnPick ) - { - NW_FBox_OptionBox_t* optionBox = (NW_FBox_OptionBox_t*)selectItemData->context; - - if ( selectItemData->isSelected != (NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(optionBox)) )) - { - NW_FBox_OptionBox_ChangeState( optionBox ); - updateDisplay = NW_TRUE; - } - } - } - - /* now set options with onpick property */ - for ( ii = 0; ii < count; ++ii ) - { - selectItemData = (NW_Dlg_SelectItemData_t*)NW_ADT_Vector_ElementAt( data->options, (NW_ADT_Vector_Metric_t)ii ); - - if ( !selectItemData->isOptGroup && selectItemData->hasOnPick ) - { - NW_FBox_OptionBox_t* optionBox = (NW_FBox_OptionBox_t*)selectItemData->context; - - if ( !data->isCanceled - && (( !selectBox->multiple && selectItemData->isSelected) - || (selectBox->multiple && selectItemData->isSelected != NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(optionBox))) ) ) - { - updateDisplay = NW_TRUE; - if (selectItemData->isLocalNavOnpick) - { - updateDisplay = NW_FALSE; - } - // CAUTION: this eventually calls NW_UI_CreateCard which may remove 'skin' if onpick to intradeck card exists in content - NW_FBox_OptionBox_ChangeState( optionBox ); - break; - } - } - } - - /* if OnPick has been activated there's no skin anymore */ - if (updateDisplay == NW_TRUE) - { - NW_FBox_Epoc32SelectSkin_ClearOptionsList(skin); - status = NW_FBox_Epoc32SelectSkin_UpdateValue(skin); - if (status == KBrsrSuccess) - { - status = NW_FBox_Epoc32SelectSkin_SetDisplayText(skin); - } - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_Refresh(NW_LMgr_BoxOf(selectBox)); - } - // if the selection changed then notify ecma of the change event - if(selectionChanged) - { - (void) NW_FBox_FormLiaison_DelegateEcmaEvent (formLiason, - NW_FBox_FormBox_GetFormCntrlID(selectBox), - NW_Ecma_Evt_OnChange); - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_DrawText(NW_FBox_Epoc32SelectSkin_t* thisObj, - CGDIDeviceContext* deviceContext, - NW_Bool hasFocus, - NW_GDI_FlowDirection_t* dir) - { - NW_GDI_Point2D_t start; - NW_FBox_SelectBox_t* selectBox; - CGDIFont* font; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_PropertyValue_t textDir; - NW_GDI_Color_t fgColor; - NW_LMgr_Property_t color; - NW_GDI_Dimension2D_t extent; - - NW_REQUIRED_PARAM(hasFocus); - selectBox = NW_FBox_SelectSkin_GetSelectBox(thisObj); - NW_ASSERT(selectBox); - - NW_TRY(status) - { - /* Get the box font */ - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(selectBox)); - NW_ASSERT(font != NULL); - - /* Get the old foreground color */ - fgColor = deviceContext->ForegroundColor (); - - // Get and set the box fg color, not inherited from parent (same as IE not following CSS spec) - status = NW_LMgr_Box_GetRawProperty(NW_LMgr_BoxOf(selectBox), NW_CSS_Prop_color, &color); - if (status == KBrsrSuccess) - { - deviceContext->SetForegroundColor ( (NW_GDI_Color_t)color.value.integer); - } - else - { - deviceContext->SetForegroundColor ( (NW_GDI_Color_t)0); - } - - /* Get the start coordinates */ - NW_LMgr_Box_GetInnerRectangle(NW_LMgr_BoxOf(selectBox), &innerRect); - start = innerRect.point; - - if (thisObj->displayText == NULL) - { - status = NW_FBox_SelectSkin_RefreshText(NW_FBox_SelectSkinOf(thisObj)); - NW_THROW_ON_ERROR(status); - } - - /* Get the text direction attribute */ - textDir.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(selectBox), NW_CSS_Prop_textDirection, NW_CSS_ValueType_Token, &textDir); - - if (thisObj->displayText != NULL) - { - /* If RTL, change drawing coordinates */ - *dir = (textDir.token == NW_CSS_PropValue_ltr) ? NW_GDI_FlowDirection_LeftRight : NW_GDI_FlowDirection_RightLeft; - - status = deviceContext->GetTextExtent( NW_Text_AbstractOf(thisObj->displayText), - font, - 0, - *dir, - &extent); - NW_THROW_ON_ERROR(status); - if (*dir == NW_GDI_FlowDirection_RightLeft) - { - start.x = innerRect.point.x + innerRect.dimension.width - extent.width; - } - status = deviceContext->DrawText( &start, - NW_TextOf(thisObj->displayText), - font, - 0, - NW_GDI_TextDecoration_None, - *dir, - extent.width); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - deviceContext->SetForegroundColor ( fgColor); - return KBrsrSuccess; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_FillOptionsList( NW_FBox_Epoc32SelectSkin_t* thisObj, - NW_FBox_FormBox_t* formBox, - NW_Uint32 level) -{ - _LIT(KPrefix, " ");// 4 spaces to match look of browser engine select dialog - NW_Dlg_SelectItemData_t entry; - TBrowserStatusCode status; - NW_Uint32 ii; - NW_Uint32 count; - NW_Text_t* text; - - NW_ASSERT(thisObj!=NULL); - NW_ASSERT(formBox!=NULL); - - status = KBrsrSuccess; - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - /* just option - add to the list */ - NW_FBox_OptionBox_t* optionBox; - - optionBox = NW_FBox_OptionBoxOf(formBox); - - text = NW_FBox_OptionBox_GetText(optionBox); - - entry.hasOnPick = NW_FBox_OptionBox_HasOnPick(optionBox); - entry.isLocalNavOnpick = NW_FBox_OptionBox_IsLocalNavOnPick(optionBox); - entry.isOptGroup = NW_FALSE; - entry.isSelected = NW_FBox_CheckBox_GetState(NW_FBox_CheckBoxOf(optionBox)); - - // child of option group elements must be indented (level 0 = <select>) - if (level > 1) - { - HBufC* newText(NULL); - TRAPD(err, newText = HBufC::NewL(text->characterCount + KPrefix().Length() + 1));// add 1 for zero terminate - if (err == KErrNone) - { - newText->Des().Copy(KPrefix); - newText->Des().Append((NW_Ucs2*)text->storage, text->characterCount); - NW_Text_t* nt = NW_Text_New (HTTP_iso_10646_ucs_2, (void*)(newText->Des().PtrZ()), - newText->Length(), NW_TRUE); - - entry.text = NW_FBox_Epoc32SelectSkin_GetNewUcs2Str(thisObj, nt); - NW_Mem_Free(nt); - } - else - { - entry.text = NW_FBox_Epoc32SelectSkin_GetNewUcs2Str(thisObj, text); - } - } - else - { - entry.text = NW_FBox_Epoc32SelectSkin_GetNewUcs2Str(thisObj, text); - } - - entry.context = optionBox; - - NW_ADT_DynamicVector_InsertAt (thisObj->optionsList, &entry, NW_ADT_Vector_AtEnd); - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - /* optgroup - add to the list if not nested and process children */ - NW_FBox_OptGrpBox_t* optGrpBox; - - optGrpBox = NW_FBox_OptGrpBoxOf(formBox); - - text = NW_FBox_OptGrpBox_GetText(optGrpBox); - - if (text) - { - /* add optgroup only if it has a title */ - entry.text = NW_FBox_Epoc32SelectSkin_GetNewUcs2Str(thisObj, text); - entry.isLocalNavOnpick = NW_FALSE; - entry.hasOnPick = NW_FALSE; - entry.isOptGroup = NW_TRUE; - entry.isSelected = NW_FALSE; - entry.context = optGrpBox; - - NW_ADT_DynamicVector_InsertAt (thisObj->optionsList, &entry, NW_ADT_Vector_AtEnd); - } - - - /* process children recursively */ - if (optGrpBox->children) - count = NW_ADT_Vector_GetSize(optGrpBox->children); - else count = 0; - for ( ii = 0; ii < count; ii++ ) - { - NW_FBox_FormBox_t* child = - *(NW_FBox_FormBox_t**)NW_ADT_Vector_ElementAt(optGrpBox->children, - (NW_ADT_Vector_Metric_t)ii); - status = NW_FBox_Epoc32SelectSkin_FillOptionsList(thisObj, - child, level + 1); - } - - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_SelectBox_Class)) - { - /* select - just process children recursively */ - NW_FBox_SelectBox_t* selectBox; - - selectBox = NW_FBox_SelectBoxOf(formBox); - count = NW_ADT_Vector_GetSize(selectBox->children); - for ( ii = 0; ii < count; ii++ ) - { - NW_FBox_FormBox_t* child = - *(NW_FBox_FormBox_t**)NW_ADT_Vector_ElementAt(selectBox->children, - (NW_ADT_Vector_Metric_t)ii); - status = NW_FBox_Epoc32SelectSkin_FillOptionsList(thisObj, - child, level + 1); - } - } - else - { - /* unexpected box type */ - NW_ASSERT((NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - || (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class))); - - status = KBrsrFailure; - } - - return status; -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32SelectSkin_Class_t NW_FBox_Epoc32SelectSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_SelectSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32SelectSkin_t), - /* construct */ _NW_FBox_Epoc32SelectSkin_Construct, - /* destruct */ _NW_FBox_Epoc32SelectSkin_Destruct - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ _NW_FBox_Epoc32SelectSkin_Draw, - /* NW_FBox_Skin_GetSize_t */ _NW_FBox_Epoc32SelectSkin_GetSize - }, - { /* NW_FBox_SelectSkin */ - /* setActive */ _NW_FBox_Epoc32SelectSkin_SetActive, - /* addOption */ _NW_FBox_Epoc32SelectSkin_AddOption, - /* addOptGrp */ _NW_FBox_Epoc32SelectSkin_AddOptGrp, - /* detailsDialog */ _NW_FBox_Epoc32SelectSkin_DetailsDialog, - /* refeshText */ _NW_FBox_Epoc32SelectSkin_RefreshText, - /* split */ _NW_FBox_Epoc32SelectSkin_Split - }, - { /* NW_FBox_Epoc32SelectSkin */ - /* getBaseline */ _NW_FBox_Epoc32SelectSkin_GetBaseline - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_Epoc32SelectSkin_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_Epoc32SelectSkinOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_SelectSkin_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* Set initial value to empty string. */ - thisObj->value = NW_Text_UCS2_New (NULL, 0, 0); - - thisObj->displayText = NULL; - - thisObj->optionsList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_Dlg_SelectItemData_t), 3, 3); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_FBox_Epoc32SelectSkin_Destruct(NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_Epoc32SelectSkin_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_Epoc32SelectSkinOf (dynamicObject); - - if (thisObj->displayText){ - NW_Object_Delete(thisObj->displayText); - } - if (thisObj->value){ - NW_Object_Delete(thisObj->value); - } - if (thisObj->optionsList){ - NW_FBox_Epoc32SelectSkin_ClearOptionsList(thisObj); - NW_Object_Delete(thisObj->optionsList); - } -} - -// ------------------------------------------------------------------------- -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - NW_FBox_SelectBox_t* selectBox; - NW_FBox_Epoc32SelectSkin_t* thisObj; - NW_GDI_Rectangle_t innerRectangle; - NW_GDI_Point2D_t imagePoint; - NW_GDI_Dimension3D_t imageSize; - NW_LMgr_RootBox_t* rootBox; - NW_Image_AbstractImage_t* image; - NW_GDI_FlowDirection_t dir; - - // for convenience - selectBox = NW_FBox_SelectBoxOf (box); - thisObj = NW_FBox_Epoc32SelectSkinOf(skin); - - NW_TRY(status) - { - // standard paint mode - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - // let the base class draw draw the box - status =_NW_LMgr_Box_Draw(box, deviceContext, hasFocus); - NW_THROW_ON_ERROR (status); - - // get the root box - rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(selectBox)); - NW_THROW_ON_NULL (rootBox, status, KBrsrFailure); - - // get the image from the canned images dictionary - image = CONST_CAST (NW_Image_AbstractImage_t*, NW_Image_CannedImages_GetImage(rootBox->cannedImages, NW_Image_SelectArrow)); - NW_THROW_ON_NULL (image, status, KBrsrFailure); - - // get the image size - status = NW_Image_AbstractImage_GetSize(image, &imageSize); - NW_THROW_ON_ERROR (status); - - // draw text first - status = NW_FBox_Epoc32SelectSkin_DrawText(thisObj, deviceContext, hasFocus, &dir); - NW_THROW_ON_ERROR (status); - - // get the inner rectangle - status = NW_LMgr_Box_GetInnerRectangle(box, &innerRectangle); - NW_THROW_ON_ERROR (status); - - // position the select image on the correct side of the box depending on direction (RTL) - if(dir == NW_GDI_FlowDirection_RightLeft) - { - imagePoint.x = innerRectangle.point.x; - } - else - { - imagePoint.x = - (NW_GDI_Metric_t)(innerRectangle.point.x + innerRectangle.dimension.width - imageSize.width); - } - - // position the image so that it is centered in the box - if (innerRectangle.dimension.height > imageSize.height) - { - imagePoint.y = - (NW_GDI_Metric_t)(innerRectangle.point.y + ((innerRectangle.dimension.height - imageSize.height) / 2)); - } - else - { - imagePoint.y = (NW_GDI_Metric_t)(innerRectangle.point.y); - } - - status = NW_Image_AbstractImage_Draw (image, deviceContext, &imagePoint); - NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ------------------------------------------------------------------------- -NW_GDI_Metric_t -_NW_FBox_Epoc32SelectSkin_GetBaseline(NW_FBox_Epoc32SelectSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox) - { - CGDIFont* font; - TBrowserStatusCode status; - NW_GDI_Metric_t baseline; - - NW_REQUIRED_PARAM(aThisObj); - - // parameter assertion block - NW_ASSERT (aLmgrBox != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (aLmgrBox, &NW_FBox_FormBox_Class)); - - // set the font to match the parent - font = NW_LMgr_Box_GetFont (aLmgrBox); - if (font) - { - TGDIFontInfo fontInfo; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_GDI_Dimension3D_t imageSize; - - status = font->GetFontInfo ( &fontInfo); - NW_ASSERT (status == KBrsrSuccess); - - // Get padding and border width - NW_LMgr_Box_GetPadding(aLmgrBox, &padding, ELMgrFrameTop ); - NW_LMgr_Box_GetBorderWidth(aLmgrBox, &borderWidth, ELMgrFrameTop ); - - status = NW_FBox_Epoc32SelectSkin_GetArrowSize(NW_FBox_SelectBoxOf(aLmgrBox), &imageSize); - - if (status == KBrsrSuccess) - { - // Use the bigger of font baseline or image height and then adjust for border and padding - baseline = (NW_GDI_Metric_t) - ((fontInfo.baseline < imageSize.height) ? imageSize.height : fontInfo.baseline) + borderWidth.top + padding.top; - } - else - { - baseline = fontInfo.baseline + borderWidth.top + padding.top; - } - } - else - { - baseline = NW_LMgr_Box_GetFormatBounds(aLmgrBox).dimension.height; - } - - return baseline; - } - -// ------------------------------------------------------------------------- -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) - { - NW_FBox_Epoc32SelectSkin_t* thisObj; - NW_GDI_Dimension2D_t extent; - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - NW_GDI_Dimension3D_t imageSize; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - NW_TRY(status) - { - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_SelectBox_Class)); - - // for convenience - thisObj = NW_FBox_Epoc32SelectSkinOf(skin); - - size->width = 0; - size->height = 0; - - // get the device context - deviceContext = NW_LMgr_RootBox_GetDeviceContext (NW_LMgr_Box_GetRootBox(box)); - NW_ASSERT (deviceContext != NULL); - - // get the display bounds - rectangle = deviceContext->DisplayBounds(); - - // get the max character extents - status = NW_FBox_SelectSkin_GetMCharExtent(NW_FBox_SelectSkinOf(skin), &extent); - NW_THROW_ON_ERROR (status); - - // get the image size - status = NW_FBox_Epoc32SelectSkin_GetArrowSize(NW_FBox_SelectBoxOf(box), &imageSize); - - // get the padding and border width - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameLeft|ELMgrFrameRight ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - - size->height = (NW_GDI_Metric_t)(extent.height); - - // height must not be smaller than the icon height - if (size->height < imageSize.height) - { - size->height = imageSize.height; - } - - //Determine if this box sits in a table cell. Different rules apply based on this. - NW_LMgr_Box_t* parent = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(box); - if (NW_Object_IsClass(parent, &NW_LMgr_StaticTableCellBox_Class)) - { - // Calculate the minimum width. This is used for forms inside tables. - // In this case the input selection fields should not span the entire screen width. - size->width = imageSize.width + NW_FBox_Epoc32SelectSkin_GetMaxTextWidth(thisObj, NW_FBox_SelectBoxOf(box)); - } - else - { - // Calculate the full width. This is used for forms not inside tables. - // In this case the input selection fields should span the entire screen width. - size->width = rectangle->dimension.width - padding.left - padding.right - borderWidth.left - borderWidth.right; - } - - // Update the value of the select box - status = NW_FBox_Epoc32SelectSkin_UpdateValue(thisObj); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ------------------------------------------------------------------------- -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_SetActive(NW_FBox_SelectSkin_t* skin) - { - NW_FBox_SelectBox_t* selectBox; - NW_FBox_FormBox_t* formBox; - NW_FBox_Epoc32SelectSkin_t* epoc32Skin; - NW_Dlg_SelectData_t* data; - NW_Ucs2* textStr; - NW_Uint8 freeNeeded; - NW_Text_Length_t length; - NW_Ucs2* newStr; - NW_Text_t* text; - - formBox = NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - selectBox = NW_FBox_SelectBoxOf(formBox); - epoc32Skin = NW_FBox_Epoc32SelectSkinOf(skin); - - /* Use the title attribute for the select dialog title. */ - text = selectBox->title; - if (text == NULL) - { - newStr = selectBox->appServices->getLocalizedStringAPI.getLocalizedString( EKmLocSelectLabel ); - if (!newStr) - { - newStr = NW_Str_NewcpyConst("Select"); - if (!newStr) - { - return KBrsrOutOfMemory; - } - } - } - else - { - textStr = NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Aligned, &length, &freeNeeded); - - if (freeNeeded) - { - newStr = textStr; - } - else - { - newStr = NW_Str_Newcpy(textStr); - if (!newStr) - { - return KBrsrOutOfMemory; - } - } - } - - NW_FBox_Epoc32SelectSkin_FillOptionsList(epoc32Skin, formBox, 0); - - data = (NW_Dlg_SelectData_t*)NW_Mem_Malloc(sizeof(NW_Dlg_SelectData_t)); - - if (!data) - { - return KBrsrOutOfMemory; - } - - data->title = newStr; - data->multiple = selectBox->multiple; - data->options = NW_ADT_VectorOf(epoc32Skin->optionsList); - - selectBox->appServices->genDlgApi.DialogSelectOption( data, - epoc32Skin, - NW_FBox_Epoc32SelectSkin_SelectPromptResp); - - NW_Mem_Free(data->title); - NW_Mem_Free(data); - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_Split(NW_FBox_SelectSkin_t* skin, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) - { - NW_LMgr_PropertyValue_t sizeVal; - TBrowserStatusCode status; - NW_LMgr_Box_t* box; - NW_FBox_FormBox_t* formBox; - - formBox = NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - box = NW_LMgr_BoxOf(formBox); - - *splitBox = NULL; - /* If box does not fit in the space and the box is not - on the new line the input box needs to be pushed on the new line */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.width > space) && !(flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - if(boxBounds.dimension.width <= space) - { - return KBrsrSuccess; - } - - /* we are more than space */ - - /* if width was specified we do not want to change it */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess) - { - return status; - } - boxBounds.dimension.width = space; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_AddOption(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** styleBox) -{ - NW_REQUIRED_PARAM(selectSkin); - NW_REQUIRED_PARAM(optionBox); - NW_REQUIRED_PARAM(styleBox); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_AddOptGrp(NW_FBox_SelectSkin_t* selectSkin, - NW_FBox_OptGrpBox_t* optGrpBox) -{ - NW_REQUIRED_PARAM(selectSkin); - NW_REQUIRED_PARAM(optGrpBox); - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_DetailsDialog(NW_FBox_SelectSkin_t* skin) -{ - NW_REQUIRED_PARAM(skin); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32SelectSkin_RefreshText(NW_FBox_SelectSkin_t* selectSkin) -{ - TBrowserStatusCode status; - NW_FBox_Epoc32SelectSkin_t* skin = NW_FBox_Epoc32SelectSkinOf(selectSkin); - status = NW_FBox_Epoc32SelectSkin_UpdateValue(skin); - NW_ASSERT(status == KBrsrSuccess); - if (status != KBrsrSuccess){ - return status; - } - return NW_FBox_Epoc32SelectSkin_SetDisplayText(skin); -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_GetValue(NW_FBox_Epoc32SelectSkin_t *skin, NW_Ucs2** newStr) -{ - NW_FBox_SelectBox_t* selectBox; - NW_ADT_Vector_Metric_t numItems; - NW_Bool multiple; - NW_Bool updated; - TBrowserStatusCode status; - - NW_ASSERT(newStr != NULL); - if (newStr == NULL) { - return KBrsrBadInputParam; - } - - selectBox = (NW_FBox_SelectBox_t*)NW_FBox_Skin_GetFormBox(NW_FBox_SkinOf(skin)); - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - multiple = NW_FBox_SelectBox_IsMultiple(selectBox); - - status = NW_FBox_Epoc32SelectSkin_GetChildrenValue(skin, - NW_FBox_FormBoxOf(selectBox), - numItems, - multiple, - newStr, - &updated); - return status; -} - -TBrowserStatusCode -NW_FBox_Epoc32SelectSkin_UpdateSelection(NW_FBox_Epoc32SelectSkin_t* skin, - NW_Ucs2* selectedText, - NW_Bool* selectUpdated) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_FBox_SelectSkin_Reserve(NW_FBox_SelectSkinOf(skin)); - *selectUpdated = NW_FBox_Epoc32SelectSkin_ChangeState(skin, selectedText); - if (NW_FBox_SelectSkinOf(skin)->hasFormBox == NW_TRUE) - { - status = NW_FBox_Epoc32SelectSkin_UpdateValue(skin); - if (status == KBrsrSuccess) - { - status = NW_FBox_Epoc32SelectSkin_SetDisplayText(skin); - } - } - NW_FBox_SelectSkin_Release(NW_FBox_SelectSkinOf(skin)); - return status; -} - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_SelectSkin_t* -NW_FBox_SelectSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_SelectSkin_t*) - NW_Object_New (&NW_FBox_Epoc32SelectSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/Epoc32TextAreaBox.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32TextAreaBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_textareaboxi.h" -#include "nw_lmgr_rootbox.h" -#include <nwx_string.h> -#include "nw_fbox_textareaskin.h" -#include "nw_fbox_inputinteractor.h" -#include "BrsrStatusCodes.h" - -/* -**---------------------------------------------------------------- -** Macros -**---------------------------------------------------------------- -*/ -#define TEXTAREABOX_DEFAULT_HEIGHT 2 - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_TextAreaBox_Class_t NW_FBox_TextAreaBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_InputBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_TextAreaBox_t), - /* construct */ _NW_FBox_TextAreaBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_InputBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_InputBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone, - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_TextAreaBox_InitSkin, - /* initInteractor */ _NW_FBox_InputBox_InitInteractor, - /* reset */ _NW_FBox_InputBox_Reset - }, - { /* NW_FBox_InputBox */ - /* getHeight */ _NW_FBox_TextAreaBox_GetHeight, - /* setHeight */ _NW_FBox_TextAreaBox_SetHeight, - /* setDisplayText */ _NW_FBox_InputBox_SetDisplayText, - /* modifyBuffer */ _NW_FBox_InputBox_ModifyBuffer - }, - { /* NW_FBox_TextAreaBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_TextAreaBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_TextAreaBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_TextAreaBoxOf (dynamicObject); - /* invoke our superclass constructor */ - status = _NW_FBox_InputBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->height = (NW_Uint16)va_arg (*argp, NW_Uint32); - if(thisObj->height == 0) - { - /* - * If the rows attribute is not specified or its value is zero then - * specification requires, set height to the default value, which is 1. - */ - thisObj->height = TEXTAREABOX_DEFAULT_HEIGHT; - } - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint16 -_NW_FBox_TextAreaBox_GetHeight(NW_FBox_InputBox_t* box) -{ - NW_FBox_TextAreaBox_t* textAreaBox; - - textAreaBox = NW_FBox_TextAreaBoxOf(box); - return textAreaBox->height; -} - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_FBox_TextAreaBox_SetHeight(NW_FBox_InputBox_t* box, NW_Uint16 height) -{ - NW_FBox_TextAreaBox_t* textAreaBox; - - textAreaBox = NW_FBox_TextAreaBoxOf(box); - textAreaBox->height = height; -} - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_FBox_Skin_t* -_NW_FBox_TextAreaBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_InputSkin_New(formBox); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_TextAreaBox_t* -NW_FBox_TextAreaBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 columns, - NW_HED_AppServices_t* appServices, - NW_Uint16 rows) -{ - return (NW_FBox_TextAreaBox_t*) - NW_Object_New (&NW_FBox_TextAreaBox_Class, (NW_Uint32)numProperties, eventHandler, - formCntrlId, formLiaison, (NW_Uint32)columns, appServices, (NW_Uint32)rows); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXButtonBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXButtonBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,365 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_buttonboxi.h" -#include "nw_evt_ecmaevent.h" -#include "nwx_string.h" -#include "nw_evt_activateevent.h" -#include "nw_fbox_buttonboxskin.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" - -#include "KimonoLocalizationStrings.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_ButtonBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_ButtonBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_FBox_ButtonBox_InterfaceList[] = { - &_NW_FBox_ButtonBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_ButtonBox_Class_t NW_FBox_ButtonBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_ButtonBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_ButtonBox_t), - /* construct */ _NW_FBox_ButtonBox_Construct, - /* destruct */ _NW_FBox_ButtonBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_ButtonBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_ButtonBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_ButtonBox_InitSkin, - /* initInteractor */ _NW_FBox_ButtonBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_ButtonBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_ButtonBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY(status) - { - NW_FBox_ButtonBox_t* thisObj; - NW_Text_UCS2_t* label; - static const NW_Ucs2 submit[] = {'S','u','b','m','i','t','\0'}; - static const NW_Ucs2 reset[] = {'R','e','s','e','t','\0'}; - static const NW_Ucs2 blank[] = {' ','\0'}; - - /* for convenience */ - thisObj = NW_FBox_ButtonBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - _NW_THROW_ON_ERROR(status); - - /* initialize the member variables */ - thisObj->buttonType = (NW_FBox_ButtonBox_Type_t)va_arg (*argp, NW_Uint32); - thisObj->value = va_arg (*argp, NW_Text_t*); - /*lint --e{550} Symbol not accessed */ - NW_Image_AbstractImage_t*image = va_arg (*argp, NW_Image_AbstractImage_t*); - thisObj->appServices = va_arg (*argp, NW_HED_AppServices_t*); - - if (thisObj->value == NULL) - { - label = NULL; - if (thisObj->buttonType == NW_FBox_ButtonBox_Submit){ - NW_Ucs2* temp = thisObj->appServices->getLocalizedStringAPI.getLocalizedString( EKmLocSubmitButton ); - if (temp) - { - label = NW_Text_UCS2_New((NW_Ucs2*) temp, NW_Str_Strlen(temp), NW_TRUE); - } - else - { - label = NW_Text_UCS2_New((NW_Ucs2*) submit, NW_Str_Strlen(submit), 0); - } - NW_THROW_OOM_ON_NULL(label, status); - } - else if (thisObj->buttonType == NW_FBox_ButtonBox_Reset){ - NW_Ucs2* temp = thisObj->appServices->getLocalizedStringAPI.getLocalizedString( EKmLocResetButton ); - if (temp) - { - label = NW_Text_UCS2_New((NW_Ucs2*) temp, NW_Str_Strlen(temp), NW_TRUE); - } - else - { - label = NW_Text_UCS2_New((NW_Ucs2*) reset, NW_Str_Strlen(reset), 0); - } - NW_THROW_OOM_ON_NULL(label, status); - } - else if (thisObj->buttonType == NW_FBox_ButtonBox_Button){ - label = - NW_Text_UCS2_New((NW_Ucs2*) blank, NW_Str_Strlen(blank), 0); - NW_THROW_OOM_ON_NULL(label, status); - }else { - /* do nothing for now */ - } - thisObj->value = NW_TextOf(label); - } - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj->value, &NW_Text_Abstract_Class)); - - } NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_ButtonBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_ButtonBox_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_ButtonBoxOf (dynamicObject); - - /* Destroy our text object */ - if(thisObj->value != NULL){ - NW_Object_Delete(thisObj->value); - } -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Skin_t* -_NW_FBox_ButtonBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_ButtonBoxSkin_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Interactor_t* -_NW_FBox_ButtonBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - (void)formBox; - return NULL; -} - -/* --------------------------------------------------------------------------*/ - -NW_GDI_Metric_t -_NW_LMgr_ButtonBox_GetBaseline (NW_LMgr_Box_t* box) - { - CGDIFont* font; - TGDIFontInfo fontInfo; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_ButtonBox_Class)); - - /* Get the font info */ - font = NW_LMgr_Box_GetFont (box); - if (font != NULL) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - (void)font->GetFontInfo ( &fontInfo); - - /* Get the padding and the border width */ - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameTop ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameTop ); - - return (NW_GDI_Metric_t)(fontInfo.baseline + borderWidth.top + padding.top); - } - - /* unable to get the FontInfo we return our height */ - return NW_LMgr_Box_GetFormatBounds(box).dimension.height; - } - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_ButtonBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_ASSERT(box != NULL); - - *splitBox = NULL; - /* If box does not fit in the space and the box is not - on the new line the input box needs to be pushed on the new line */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.width > space) && !(flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - if(boxBounds.dimension.width <= space) - { - return KBrsrSuccess; - } - - /* we are more than space */ - boxBounds.dimension.width = (NW_GDI_Metric_t)(space-3); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_ButtonBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_FBox_ButtonBox_t* thisObj; - NW_FBox_ButtonBox_Type_t type; - NW_FBox_FormLiaison_t* formLiason; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_FBox_ButtonBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_ButtonBox_Class)); - - type = NW_FBox_ButtonBox_GetButtonType(thisObj); - formLiason = NW_FBox_FormBox_GetFormLiaison(thisObj); - - if ((NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) || - (NW_Object_Core_GetClass (event) == &NW_Evt_AccessKeyEvent_Class)) - { - // notify of the click event, - // if the ECMAScript is supported and the element has OnClick attribute - // then the submit and reset function calls are handled after executing OnClick script. - TBrowserStatusCode status = NW_FBox_FormLiaison_DelegateEcmaEvent (formLiason, - NW_FBox_FormBox_GetFormCntrlID(thisObj), - NW_Ecma_Evt_OnClick); - if(status == KBrsrSuccess) - { - return NW_LMgr_EventAbsorbed; - } - // if the ecmascript is not supported or the element does not have the onclick attr - // go ahead with submit or reset function - if(status == KBrsrNotFound) - { - if (type == NW_FBox_ButtonBox_Submit) - { - /* all submit on form liason */ - status = NW_FBox_FormLiaison_Submit(formLiason, NW_FBox_FormBox_GetFormCntrlID (thisObj)); - if (status != KBrsrSuccess) - { - thisObj->appServices->errorApi.notifyError(NULL, status, NULL, NULL); - } - - return NW_LMgr_EventAbsorbed; - } - else if (type == NW_FBox_ButtonBox_Reset) - { - /* all submit on form liason */ - (void) NW_FBox_FormLiaison_Reset(formLiason, NW_FBox_FormBox_GetFormCntrlID (thisObj)); - return NW_LMgr_EventAbsorbed; - } - } - } - else if ( NW_Object_Core_GetClass( event ) == &NW_Evt_FocusEvent_Class ) - { - if ( NW_LMgr_Box_HasFocus( NW_LMgr_BoxOf( thisObj ) ) ) - { - /* state change is taken care of by the form liaison */ - ( void ) NW_FBox_FormLiaison_Focus( - formLiason, - NW_FBox_FormBox_GetFormCntrlID( thisObj ) ); - } - return NW_LMgr_EventAbsorbed; - } - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent( eventListener, event ); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_FBox_ButtonBox_t* -NW_FBox_ButtonBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_FBox_ButtonBox_Type_t buttonType, - NW_Text_t* value, - NW_Image_AbstractImage_t* image, - NW_HED_AppServices_t* appServices) -{ - return (NW_FBox_ButtonBox_t*) - NW_Object_New (&NW_FBox_ButtonBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, (NW_Uint32)buttonType, value, image, appServices); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXButtonBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXButtonBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_buttonboxskini.h" -#include "nw_fbox_buttonbox.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -/* Get the dir attribute */ -static -void -NW_FBox_ButtonBoxSkin_GetDirection(NW_LMgr_Box_t *box, - NW_GDI_FlowDirection_t* dir) -{ - NW_LMgr_Property_t dirProp; - NW_ASSERT(box != NULL); - - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_textDirection, &dirProp); - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - *dir = NW_GDI_FlowDirection_LeftRight; - } - else { - *dir = NW_GDI_FlowDirection_RightLeft; - } -} - - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_ButtonBoxSkin_Class_t NW_FBox_ButtonBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_ButtonBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ _NW_FBox_ButtonBoxSkin_Draw, - /* NW_FBox_Skin_GetSize_t */ _NW_FBox_ButtonBoxSkin_GetSize - }, - { /* NW_FBox_ButtonBoxSkin */ - /* drawContent */ _NW_FBox_ButtonBoxSkin_DrawContent - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_ButtonBoxSkin_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_ButtonBoxSkinOf(skin); - - /* Let the base class draw draw the box */ - status = NW_LMgr_Box_Class.NW_LMgr_Box.draw(box, deviceContext, hasFocus); - if (status != KBrsrSuccess){ - return status; - } - - return NW_FBox_ButtonBoxSkin_DrawContent(thisObj, box, deviceContext, hasFocus); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_DrawContent(NW_FBox_ButtonBoxSkin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_ButtonBox_t* buttonBox; - NW_GDI_Point2D_t textStart; - NW_GDI_Rectangle_t innerRect; - NW_Text_t* value; - NW_GDI_FlowDirection_t dir = NW_GDI_FlowDirection_LeftRight; - - NW_REQUIRED_PARAM(skin); - NW_REQUIRED_PARAM(hasFocus); - - /* for convenience */ - buttonBox = NW_FBox_ButtonBoxOf (box); - - /* this is the label */ - value = NW_FBox_ButtonBox_GetValue(buttonBox); - - /* Calculate the inner rectangle */ - NW_LMgr_Box_GetInnerRectangle(box, &innerRect); - - /* Get the start coordinates */ - textStart = innerRect.point; - - /* Make button label draw itself at the specified location */ - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - if ( value != NULL){ - NW_FBox_ButtonBoxSkin_GetDirection(box, &dir); - (void) deviceContext->DrawText( &textStart, - value, - NW_LMgr_Box_GetFont(box), - 0, - NW_GDI_TextDecoration_None, - dir, - innerRect.dimension.width); - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_ButtonBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) - { - NW_FBox_ButtonBox_t* buttonBox; - NW_Text_t* value; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - CGDIFont* font; - TBrowserStatusCode status; - NW_GDI_Dimension2D_t textExtent; - NW_LMgr_PropertyValue_t sizeVal; - NW_GDI_FlowDirection_t dir; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_ButtonBox_Class)); - - sizeVal.integer = 0; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - size->width = sizeVal.integer; - sizeVal.integer = 0; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal); - size->height = sizeVal.integer; - - if (size->width != 0 && size->height != 0) - { - return KBrsrSuccess; - } - - buttonBox = NW_FBox_ButtonBoxOf (box); - (void)skin; - - /* Get the value */ - value = NW_FBox_ButtonBox_GetValue(buttonBox); - - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = NW_LMgr_Box_GetRootBox (box); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - - /* Set the font */ - font = NW_LMgr_Box_GetFont (box); - NW_ASSERT(font != NULL); - - NW_FBox_ButtonBoxSkin_GetDirection(box, &dir); - /* calculate the extents */ - status = deviceContext->GetTextExtent( value, font, 0, - dir, &textExtent); - if (status == KBrsrOutOfMemory) - { - return KBrsrSuccess; - } - - if (size->height == 0) - { - size->height = textExtent.height; - } - - if (size->width == 0) - { - size->width = textExtent.width; - } - - return KBrsrSuccess; - } - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXCEpoc32InputBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXCEpoc32InputBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1838 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// INCLUDE FILES -#include <e32keys.h> -#include <e32std.h> -#include <PtiDefs.h> -#include "nw_fbox_CEpoc32InputBox.h" -#include "nw_fbox_wmlformathandler.h" -#include "nw_fbox_formboxutils.h" -#include "nw_fbox_wmlformattededitor.h" -#include "nw_wml1x_wml_1_3_tokens.h" - -#include <aknenv.h> -#include <aknEditStateIndicator.h> -#include <AknIndicatorContainer.h> -#include <AknUtils.h> -#include <barsread.h> // for resource reader -#include <webkit.rsg> - -#include <centralrepository.h> -#include <AknFepInternalCRKeys.h> - -#include <eikseced.h> // for secret editor -#include <eikrted.h> -#include <txtrich.h> -#include <aknnotedialog.h> -#include <gulbordr.h> -#include "nw_fbox_inputbox.h" -#include "nw_fbox_inputskini.h" -#include "nw_fbox_inputskin.h" -#include "nw_fbox_epoc32inputskin.h" -#include "nw_fbox_textareabox.h" -#include "BrsrStatusCodes.h" - -#include "eikon.hrh" - - -//#include <aknedsts.h> -//#include <FEPBASE.H> - - -// CONSTANTS - -static const TInt KNumberOfLines = 1000; - -// ================= STATIC FUNCTIONS ======================= -TInt CEpoc32InputBox::RefreshContents( TAny* aParam ) -{ - CEpoc32InputBox* epoc32InputBox= (CEpoc32InputBox* )aParam ; - epoc32InputBox->iEditor->DrawContents(); - epoc32InputBox->iActiveSchedulerWait.AsyncStop(); - return 0; -} - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code, that -// might leave. -// -CEpoc32InputBox::CEpoc32InputBox( CCoeControl* aParent, - void* aOocInputSkin, - const TInt aInitialWrapWidth, - const TInt aMaxLength, - const CFont& aFont, - const TInt aLayoutMode) : - iOocInputSkin ( aOocInputSkin ), - iFont( aFont ), - iMaxLength( aMaxLength ), - iParent( aParent ), - iWrapWidth( aInitialWrapWidth ), - iLayoutMode(aLayoutMode) - { - // ignore negative values, and max possible value (it means that maxlength is not specified) - if ( iMaxLength < 0 ) - { - iMaxLength = 0; - } - } - -// Initialize format mask handler -// -void CEpoc32InputBox::InitFormatHandlerL( const TDesC& aFormat, - const TBool aIsSecret, - TBool& aT9Allowed, - TInt& aMaxLength, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId ) - { - // T9 is not allowed for password boxes (or touch) - aT9Allowed = (!aIsSecret && !iPenEnabled); - - - // get TWapDocType from aDocPublicId - TWapDocType wapDocType; - switch ( aDocPublicId ) - { - case NW_Wml_1_0_PublicId: - wapDocType = EWmlDocType_Wml_1_0; - break; - - case NW_Wml_1_1_PublicId: - wapDocType = EWmlDocType_Wml_1_1; - break; - - case NW_Wml_1_2_PublicId: - wapDocType = EWmlDocType_Wml_1_2; - break; - - case NW_Wml_1_3_PublicId: - wapDocType = EWmlDocType_Wml_1_3; - break; - - default: - wapDocType = EWmlDocType_Unknown; - break; - } - - if ( aFormat.Length() ) // is FORMAT specified? - { - // create format handler - iHandler = CWmlFormatHandler::NewL( aFormat, wapDocType ); - - // Is it other than "*f" or "nf" where f is not "n" or "N" ? - if ( aFormat.Length() != 2 || !iHandler->PostFix().AlphaAllowed() ) - { - aT9Allowed = EFalse; - } - } - - TInt formatMax( iHandler ? iHandler->MaxLength() : KInfiniteLength ); - - if ( iMaxLength && formatMax != KInfiniteLength ) // both are specified - { - aMaxLength = Min( formatMax, iMaxLength ); - } - else - { - aMaxLength = iMaxLength; - } - - if ( aIsEmptyOk == NW_FBox_Validator_EmptyOk_True ) - { - iEmptyOk = ETrue; - } - else if ( aIsEmptyOk == NW_FBox_Validator_EmptyOk_False ) - { - iEmptyOk = EFalse; - } - else - { - // emptyok is not specified. - // if there is no iHandler value, there is no format specified, too - // so use a default format - *m, which implies emptyok=true - if ( !iHandler || wapDocType == EWmlDocType_Unknown ) - { - iEmptyOk = ETrue; - } - if ( iHandler ) // Is format attribute specified? - { - iEmptyOk = !iHandler->MinLength() && // Does it allow empty input? - (wapDocType == EWmlDocType_Wml_1_3 || wapDocType == EWmlDocType_Unknown); // Is it WML 1.3? - } // for unknown documents (like XHTML) iEmptyOk will be true - } - } - - -// EPOC default constructor can leave. -// -void CEpoc32InputBox::ConstructL( const TRect& aInitialRectangle, - const TMargins8& aMargins, - const TDesC& aInitialText, - const TDesC& aFormat, - const NW_FBox_Validator_Mode_t aMode, - const TBool aIsSecret, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId, - const TInt aMaxLength ) - { - TBool t9Allowed; - TInt maxLength = aMaxLength; - TWmlMode mode; - iContainer = NULL; - - iPenEnabled = AknLayoutUtils::PenEnabled(); - - // if password input box, create the secret editor for it - if ( aIsSecret ) - { - TInt pwLength = aMaxLength; - - iContainer = new (ELeave) CEikSecretEditor; - - iContainer->SetMopParent(this); - - iContainer->AknSetFont( iFont ); - iContainer->SetBorder( TGulBorder::ESingleBlack ); - - iEikonEnv->AddFepObserverL( *this ); - - // add ourselves to the controls stack, so that we'll recieve key events - iEikonEnv->EikAppUi()->AddToStackL( this ); - iEikonEnv->AddFocusObserverL(*this); - - CreateWindowL( iParent ); - - TResourceReader reader; - - iCoeEnv->CreateResourceReaderLC(reader, R_WMLBROWSER_SECRET_EDITOR); - - iContainer->SetContainerWindowL(*this); - - iContainer->ConstructFromResourceL(reader); - - CleanupStack::PopAndDestroy(); // Resource reader - - ActivateL(); - - if (pwLength == KInfiniteLength || pwLength < 0 || pwLength > CEikSecretEditor::EMaxSecEdSecArrayLength ) - { - pwLength = CEikSecretEditor::EMaxSecEdSecArrayLength; - } - - iContainer->SetMaxLength( pwLength ); - - InitFormatHandlerL( aFormat, - aIsSecret, - t9Allowed, - pwLength, - aIsEmptyOk, - aDocPublicId ); - - TRect adjustedRect; - adjustedRect.iTl.iX = aInitialRectangle.iTl.iX; - adjustedRect.iTl.iY = aInitialRectangle.iTl.iY; - adjustedRect.iBr.iX = aInitialRectangle.iBr.iX; - adjustedRect.iBr.iY = aInitialRectangle.iBr.iY; - adjustedRect.Shrink(1, 1); - iContainer->SetRect(adjustedRect); - iRect = adjustedRect; - iFocusObserverAdded= ETrue; - - if (aFormat.Length() > 0 && (aFormat[0] == 'n' || aFormat[0] == 'N')) - { - iContainer->SetDefaultInputMode(EAknEditorNumericInputMode); - } - else - { - iContainer->SetDefaultInputMode(EAknEditorSecretAlphaInputMode); - } - - iContainer->SetText( aInitialText.Left( pwLength ) ); - - iEditor = NULL; - - AllowEditingL( ETrue ); - - ActivateVKB(); - - return; - } - else - { - SetContainerWindowL( *iParent ); - } - - // Create formatted editor - iEditor = new( ELeave )CWmlFormattedEditor(aIsSecret); - - // Create/Get the Avkon FEP repository - CRepository* aknFepRepository = CRepository::NewL( KCRUidAknFep ); - User::LeaveIfNull( aknFepRepository ); - - // Read the predictive text setting -#ifdef RD_INTELLIGENT_TEXT_INPUT - TPtiKeyboardType keyboardType( EPtiKeyboardNone ); - TInt predTxtMask( 0 ); - - aknFepRepository->Get( KAknFepPhysicalKeyboards, (TInt&)keyboardType ); - aknFepRepository->Get( KAknFepPredTxtFlagExtension, predTxtMask ); - - switch( keyboardType ) - { - case EPtiKeyboardNone: - // No hardware keyboard - break; - - case EPtiKeyboard12Key: - // ITU-T keyboard predictive text bit mask enabled - predTxtMask &= 0x01; // EKeyboardStyle12Key define missing in AknFepInternalCRKeys.h - break; - - case EPtiKeyboardQwerty4x12: - case EPtiKeyboardQwerty4x10: - case EPtiKeyboardQwerty3x11: - case EPtiKeyboardHalfQwerty: - case EPtiKeyboardCustomQwerty: - // qwerty keyboard predictive text bit mask enabled - predTxtMask &= 0x02; // EKeyboardStyleQwerty define missing in AknFepInternalCRKeys.h - break; - - default: - break; - } - - iPredictiveTextOn = ( predTxtMask ? 1 : 0); -#else - // Check repository for predictive text enable flag - aknFepRepository->Get( KAknFepPredTxtFlag, iPredictiveTextOn ); -#endif - - // Delete the repository - delete aknFepRepository; - aknFepRepository = NULL; - - // create format handler and get t9allowed and maxLength - InitFormatHandlerL( aFormat, - aIsSecret, - t9Allowed, - maxLength, - aIsEmptyOk, - aDocPublicId ); - - // initialize formatted editor - iEditor->ConstructL( iParent, - KNumberOfLines, - maxLength, - CEikEdwin::ENoAutoSelection ); - - iEditor->AddFlagToUserFlags ( CEikEdwin::EJustAutoCurEnd ); - iEditor->EnableT9( t9Allowed, aIsSecret ); - switch ( aMode ) - { - case NW_FBox_Validator_Mode_Alphabet: - mode = EWmlModeAlphabet; - break; - - case NW_FBox_Validator_Mode_Numeric: - mode = EWmlModeNumeric; - break; - - case NW_FBox_Validator_Mode_Hiragana: - mode = EWmlModeHiragana; - break; - - case NW_FBox_Validator_Mode_Katakana: - mode = EWmlModeKatakana; - break; - - case NW_FBox_Validator_Mode_Hankakukana: - mode = EWmlModeHankakukana; - break; - - default: - mode = EWmlModeNone; - break; - } - iEditor->InitializeL( iHandler, aIsSecret, mode ); - iEditor->SetBorderViewMargins( aMargins ); - iEditor->SetBorder( TGulBorder::ESingleBlack ); - - // set ourselves to be observer of the formatted editor - iEditor->SetEdwinObserver( this ); - iEikonEnv->AddFepObserverL(*this); - // add ourselves to the controls stack, so that we'll recieve key events - iEikonEnv->EikAppUi()->AddToStackL( this ); - - iEditCommitFlag = EFalse; - const NW_Object_t* object = NW_FBox_InputSkin_GetInputBox ((NW_FBox_Epoc32InputSkin_t *)iOocInputSkin); - if (!NW_Object_IsClass(object, &NW_FBox_TextAreaBox_Class)) - { // if NOT textarea box... - SetRect( aInitialRectangle ); - iEditor->AddFlagToUserFlags (CEikEdwin::ENoLineOrParaBreaks|EEikEdwinNoWrap); - iEditor->SetFocus(ETrue); - iEditor->SetRect(aInitialRectangle); - iEikonEnv->AddFocusObserverL(*this); - iFocusObserverAdded= ETrue; - } - else - { // if textarea box... - iEditor->AddFlagToUserFlags (CEikEdwin::ENoHorizScrolling); - iEditor->ActivateL(); - SetRectAndWrap( aInitialRectangle, iWrapWidth ); - iFocusObserverAdded= EFalse; - } - // replace all NW_TEXT_UCS2_LF with NW_TEXT_UCS2_PARASEP - TInt pos; - HBufC* buf = aInitialText.AllocLC(); - TPtr ptr = buf->Des(); - while ( (pos=ptr.Locate(TChar(NW_TEXT_UCS2_LF))) != KErrNotFound ) - { - ptr[pos] = NW_TEXT_UCS2_PARASEP; - if ( pos > 0 && ptr[pos-1] == NW_TEXT_UCS2_CR ) - { - ptr.Delete(pos-1,1); - } - } - - // replace all NW_TEXT_UCS2_TAB with ' ' - ptr = buf->Des(); - while ( (pos=ptr.Locate(TChar(NW_TEXT_UCS2_TAB))) != KErrNotFound ) - { - ptr[pos] = ' '; - } - - // set initial text - SetInitialTextL( buf->Des() ); - - CleanupStack::PopAndDestroy(); // buf - - iEditor->SetAllowUndo( EFalse ); - - // start editing - AllowEditingL( ETrue ); - - UpdateTextCounterL(); - - ActivateVKB(); - - } - - -// Two-phased constructor. -CEpoc32InputBox* CEpoc32InputBox::NewL( CCoeControl* aParent, - void* aOocInputSkin, - const TRect& aInitialRectangle, - const TMargins8& aMargins, - const TInt aInitialWrapWidth, - const TDesC& aInitialText, - const TDesC& aFormat, - const NW_FBox_Validator_Mode_t aMode, - const TBool aIsSecret, - const NW_FBox_Validator_EmptyOk_t aIsEmptyOk, - const NW_Uint32 aDocPublicId, - const TInt aMaxLength, - const CFont& aFont, - const TInt aLayoutMode) - { - - CEpoc32InputBox* thisObj = new( ELeave )CEpoc32InputBox( aParent, - aOocInputSkin, - aInitialWrapWidth, - aMaxLength, - aFont, - aLayoutMode); - - CleanupStack::PushL( thisObj ); - - thisObj->ConstructL( aInitialRectangle, - aMargins, - aInitialText, - aFormat, - aMode, - aIsSecret, - aIsEmptyOk, - aDocPublicId, - aMaxLength ); - - CleanupStack::Pop(); // thisObj - - return thisObj; - } - -// Destructor -CEpoc32InputBox::~CEpoc32InputBox() - { - // remove ourselves from controls stack - iEikonEnv->EikAppUi()->RemoveFromStack(this); - - if (iFocusObserverAdded) - { - iEikonEnv->RemoveFocusObserver(*this); - } - iEikonEnv->RemoveFepObserver(*this); - - if (iEditor) - { - iEditor->CancelFepTransaction(); // cancel inline editing - } - - TRAP_IGNORE( AllowEditingL( EFalse ) ); // close editor - - if ( iEditor ) - { - iEditor->SetVkbState(NULL); - iEditor->FreePassword(); // must be called before destruction!!!! - delete iEditor; - } - - delete iInlineEditText; - delete iDocumentText; - delete iState; - delete iHandler; - delete iContainer; - - // release editor's rich text content - delete iGlobalParaLayer; - delete iGlobalCharLayer; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::ShowCursorL -// --------------------------------------------------------- -void CEpoc32InputBox::ShowCursorL( TWmlCursorHandling aMode ) - { - // get cursor co-ordinates - TPoint cursorPos; - iEditor->TextView()->DocPosToXyPosL( iEditor->CursorPos(), cursorPos ); - - TInt width = iFont.MaxCharWidthInPixels(); - TInt height, ascent; - iEditor->TextLayout()->GetFontHeightAndAscentL - ( iFont.FontSpecInTwips(), height, ascent ); - - // visible part of the textview - TRect viewRect( iEditor->TextView()->ViewRect() ); - TRect browserViewRect; - NW_FBox_Epoc32InputSkin_GetViewRect( - (NW_FBox_Epoc32InputSkin_t *)iOocInputSkin, - browserViewRect ); - - - TBool above = cursorPos.iY - height < browserViewRect.iTl.iY; - TBool below = Min (cursorPos.iY , ((viewRect).iBr).iY) > browserViewRect.iBr.iY; - viewRect.Intersection( browserViewRect ); - - // Is cursor invisible? - if ( above || below ) - { - switch ( aMode ) - { - case EWmlMoveCursor: - { - // get the position of the character in the bottom right corner - TPoint xYPos = viewRect.iBr - TPoint( width, height ); - TInt docPos = iEditor->TextView()->XyPosToDocPosL( xYPos ); - if ( docPos > 0 ) - { - // if input is not empty - place cursor before the - // character, not after (because it'll jump onto the next line) - docPos--; - } - iEditor->SetCursorPosL( docPos ); - } - break; - - case EWmlNoCursor: - { - iEditor->TextView()->SetCursorVisibilityL( // hide cursor - TCursor::EFCursorInvisible, - TCursor::EFCursorInvisible ); - break; - } - - case EWmlScrollDisplay: - { - iEditor->TextView()->SetCursorVisibilityL( // hide cursor - TCursor::EFCursorInvisible, - TCursor::EFCursorInvisible ); - - // calculate amount of pixels to scroll - TInt deltaY = ( below ) - ? viewRect.iBr.iY - cursorPos.iY + ascent - height - : viewRect.iTl.iY - cursorPos.iY + ascent; - - NW_FBox_Epoc32InputSkin_Scroll( - (NW_FBox_Epoc32InputSkin_t *)iOocInputSkin, deltaY ); - - /* update Edwin editor position */ - /* cursor position business is here because */ - /* SetRectAndWrap calls TextView's reformat and ruins cursor pos */ - TRect rc = Rect(); - rc.Move( TPoint( 0, deltaY ) ); - - const NW_Object_t* object = NW_FBox_InputSkin_GetInputBox ((NW_FBox_Epoc32InputSkin_t *)iOocInputSkin); - if (!NW_Object_IsClass(object, &NW_FBox_TextAreaBox_Class)) - { - SetRect(rc); - if ( iEditor ) - { - iEditor->TextView()->FormatTextL(); - } - } - else - { - SetRectAndWrap( rc, iWrapWidth ); - } - - /* update offscreen bitmap and redraw the screen */ - NW_FBox_Epoc32InputSkin_t* epoc32InputSkin = - (NW_FBox_Epoc32InputSkin_t*)iOocInputSkin; - NW_FBox_Epoc32InputSkin_RedrawScreen( epoc32InputSkin ); - - iEditor->TextView()->SetCursorVisibilityL( // show cursor - TCursor::EFCursorInvisible, - TCursor::EFCursorFlashing ); - DrawDeferred(); - } - break; - - default: - { - break; - } - } - } - else - { - if ( iEditor ) - { - iEditor->TextView()->FormatTextL(); - } - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleEdwinEventL -// Handles multi-tap input from Avkon -// --------------------------------------------------------- -void CEpoc32InputBox::HandleEdwinEventL -( CEikEdwin* aEdwin, TEdwinEvent aEventType ) - { - if (iMaxLength == 0 && aEventType == EEventTextUpdate) - { - return; - } - - if ( aEventType == EEventNavigation ) - { - iEditor->HandleEdwinEventL( aEdwin, aEventType ); - DrawNow(); - } - else - { - // editor isn't in T9 mode and it isn't cancelled - if ( !( iEditor->T9Enabled() && iPredictiveTextOn ) && - - ( iConfirmed || iEditor->IsFocused() ) ) - { - DisplayCursorL(); - iEditor->HandleEdwinEventL( aEdwin, aEventType ); - UpdateTextCounterL(); - HandleTextChangeL(); - } - else - { // The following is done when switching between T9 and other input modes to - // reestablish some key variables for use in wmlformattededitor. - iEditor->SetiCursorPos(); - } - - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::OfferKeyEventL -// --------------------------------------------------------- -TKeyResponse CEpoc32InputBox::OfferKeyEventL -( const TKeyEvent& aKeyEvent, TEventCode aType ) -{ - if (iMaxLength == 0) - { - NW_FBox_Epoc32InputSkin_Redraw(NW_FBox_Epoc32InputSkinOf(iOocInputSkin)); - NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkinOf(iOocInputSkin), NW_FALSE); - return EKeyWasConsumed; - } - - if (iContainer) - { - iContainer->OfferKeyEventL( aKeyEvent, aType ); - } - else - { - if (aType == EEventKeyDown) - { - iPrevCurPos = iEditor->CursorPos(); - } - // call OfferKeyEvent of CWmlFormattedEditor - iEditor->OfferKeyEventL( aKeyEvent, aType ); - } - - switch (aKeyEvent.iScanCode) - { - case EKeyEnter: - case EStdKeyLeftFunc: - case EStdKeyDevice0: - break; - - default : - iEditCommitFlag = ETrue; - break; - } - - - if ( IsExitRequest(aKeyEvent.iCode) ) - { - NW_FBox_Epoc32InputSkin_TryExitEditMode(NW_FBox_Epoc32InputSkinOf(iOocInputSkin), NW_TRUE); - } - else - { - if (iEditor) - { - UpdateTextCounterL(); - // Paste or Cut Text - HandleTextChangeL(); - iLastCurPos = iEditor->CursorPos(); - if (iHandler && !iPrevCurPos && aType == EEventKeyUp && aKeyEvent.iScanCode == EStdKeyLeftArrow) - { - iEditor->SetCursorPosL( iHandler->FirstEmpty() ); - } - } - } - - return EKeyWasConsumed; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::SetInitialTextL -// Creates and initializes RichText object for the FormattedEditor -// --------------------------------------------------------- -// -void CEpoc32InputBox::SetInitialTextL( const TDesC& aInitialText ) - { - // if this routine is called by ECMA implementation for a password box, - // simply set the text into the SecretEditor and leave. - if (iContainer && !iEditor) - { - iContainer->SetText( aInitialText ); - return; - } - // Create paragraph format layer - CParaFormat* paraFormat = CParaFormat::NewLC(); - paraFormat->iLineSpacingInTwips = NW_FBOX_INPUTBOX_LINE_SPACING_IN_TWIPS; - TParaFormatMask paraMask; - paraMask.SetAttrib( EAttLineSpacing ); - iGlobalParaLayer = CParaFormatLayer::NewL( paraFormat, paraMask ); - CleanupStack::PopAndDestroy(); // paraFormat - - // Create character format layer - TCharFormat charFormat; - charFormat.iFontSpec = iFont.FontSpecInTwips(); - TCharFormatMask charMask; - charMask.SetAttrib( EAttFontTypeface ); - charMask.SetAttrib( EAttFontHeight ); - iGlobalCharLayer = CCharFormatLayer::NewL( charFormat, charMask ); - - // Create richtext object with the appropriate layers - CRichText* richText = CRichText::NewL( iGlobalParaLayer, iGlobalCharLayer ); - CleanupStack::PushL( richText ); - // make it used by the editor - iEditor->SetDocumentContentL( *richText, CEikEdwin::ECopyText ); - CleanupStack::PopAndDestroy(); // richText - - NW_FBox_Epoc32InputSkin_t* thisObj = NW_FBox_Epoc32InputSkinOf( iOocInputSkin ); - const NW_Object_t* object = NW_FBox_InputSkinOf(thisObj); - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox (object); - - - // position the cursor appropriately - // format exists and either initial value specified in content or value entered by user are present; - if ( aInitialText.Length() == 0 || - ( thisObj->reallyEdited == NW_FALSE && - (iHandler && iHandler->NumberOfStatic() > 0) && - (inputBox && inputBox->initialValueUsed == NW_FALSE) ) ) - { // this must be first time seen(cursorval==0) - iEditor->SetTextL( NULL); - iPrevCurPos = 0; - } - else // initial text probably present - { - iEditor->SetTextL( &aInitialText ); // put into the editor - UpdateInlineTextL(aInitialText); - DoCommitFepInlineEditL(); - iPrevCurPos = ( thisObj->reallyEdited ? thisObj->posCursorValue : aInitialText.Length()); - } - iLastCurPos = iEditor->CursorPos(); - thisObj->prevCursorValue = iPrevCurPos; // save cursor pos for cancel event handling - iEditor->SetAlignment(iLayoutMode); - - } - -// --------------------------------------------------------- -// CEpoc32InputBox::AllowEditingL -// Called by constructor and destructor, -// for edwin editor: -// it sets and unsets focus -// sets cursor -// updates state -// display cursor -// for secret-editor: -// only focus change is used -// --------------------------------------------------------- -// -void CEpoc32InputBox::AllowEditingL( TBool aOn ) - { - - if (iContainer) // if CEikSecretEditor password input box, there is no iEditor - { - iContainer->SetFocus( aOn ); - CCoeEnv::Static()->SyncNotifyFocusObserversOfChangeInFocus(); - } - else if (iEditor) - { - iEditor->SetFocus( aOn ); - UpdateTextCounterL( aOn ); - - if (aOn) - { - /* if pointing to a non-existant cursor location, set the cursor to the text length instead */ - TInt temp = (iPrevCurPos > iEditor->TextLength()) ? iEditor->TextLength() : iPrevCurPos; - - iEditor->SetCursorPosL(temp); - iEditor->UpdateStateL( EWmlEditorNavigateRight); - DisplayCursorL(); - } - - CCoeEnv::Static()->SyncNotifyFocusObserversOfChangeInFocus(); - - iEditor->SetEditorCurentCase(); - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::DisplayCursorL -// --------------------------------------------------------- -// -void CEpoc32InputBox::DisplayCursorL() - { - if (iContainer) - { - return; - } - TWmlCursorHandling displayCursor = EWmlScrollDisplay; - if (iEditor->IsSecret()) - { - displayCursor = EWmlNoCursor; - } - ShowCursorL( displayCursor ); - } - -// --------------------------------------------------------- -// CEpoc32InputBox::UpdateTextCounterL -// --------------------------------------------------------- -// -void CEpoc32InputBox::UpdateTextCounterL( TBool aVisible ) - { - MAknEditingStateIndicator* editingStateIndicator = - CAknEnv::Static()->EditingStateIndicator(); - - if ( editingStateIndicator ) - { - CAknIndicatorContainer* indi = - editingStateIndicator->IndicatorContainer(); - - if ( indi ) - { - TUid id = TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ); - - if ( aVisible && iMaxLength >= 0 && !iEditor->IsSecret() ) - { - TBuf<32> buf; // 32 digit must be enough! - buf.Num( iMaxLength - iEditor->TextLength() ); - indi->SetIndicatorValueL( id, buf ); - indi->SetIndicatorState( id, EAknIndicatorStateOn ); - } - else - { - indi->SetIndicatorState( id, EAknIndicatorStateOff ); - } - } - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::ComponentControl -// --------------------------------------------------------- -// -CCoeControl* CEpoc32InputBox::ComponentControl( TInt aIndex ) const - { - CCoeControl* retVal=NULL; - - switch ( aIndex ) - { - case 0: - { - if (iEditor) - { - retVal = iEditor; - } - else - { - retVal = iContainer; - } - break; - } - - default: - { - retVal = NULL; - break; - } - } - - return retVal; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::CountComponentControls -// --------------------------------------------------------- -// -TInt CEpoc32InputBox::CountComponentControls() const - { - const TInt KNumberOfControls = 1; - TInt retVal = 0; - if (iEditor) - { - retVal = KNumberOfControls; - } - if (iContainer) - { - retVal = KNumberOfControls; - } - return retVal; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleTextChangeL -// --------------------------------------------------------- -// -void CEpoc32InputBox::HandleTextChangeL() - { - TUint pushCnt = 0; - HBufC* buf = NULL; - // if text has been changed - update it to the input skin - if (iContainer) - { - buf = ReadableSecretTextL(); - CleanupStack::PushL( buf ); - ++pushCnt; - } - else - { - buf = iEditor->ReadableTextLC(); - ++pushCnt; - } - - // replace all NW_TEXT_UCS2_PARASEP with NW_TEXT_UCS2_LF - TInt pos; - TPtr ptr = buf->Des(); - while ( (pos=ptr.Locate(TChar(NW_TEXT_UCS2_PARASEP))) != KErrNotFound ) - { - ptr[pos] = NW_TEXT_UCS2_LF; - } - - TBool textChanged = (TBool)NW_FBox_Epoc32InputSkin_TextChanged( - NW_FBox_Epoc32InputSkinOf( iOocInputSkin ), - buf->Des().Ptr() ); - - if ( textChanged ) - { - // update value to the skin and draw new text with our GDI to the - // offscreen bitmap, so that if redraw event will come, we'll draw - // correct content - if ( NW_FBox_Epoc32InputSkin_SetValue( - (NW_FBox_Epoc32InputSkin_t*)iOocInputSkin, - buf->Des().Ptr(), - (NW_Text_Length_t)buf->Length() ) != KBrsrSuccess ) - { - User::Leave(KErrNoMemory); - } - if (!iUncommittedOffset) - { - ClearInlineText(); - delete iDocumentText; - iDocumentText = NULL; - UpdateInlineTextL(*buf); - iDocumentText = iInlineEditText->AllocL(); - } - } - - CleanupStack::PopAndDestroy(pushCnt); // buf - if (iEditor) - { - DisplayCursorL(); - HandleUpdateCursor(); - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::TextLength -// --------------------------------------------------------- -// -TUint32 CEpoc32InputBox::TextLength() -{ - // if iHandler is NULL the return value does not matter - return iHandler?iHandler->FirstEmpty():0; -} - - -// --------------------------------------------------------- -// CEpoc32InputBox::IsStaticCharsInvolved -// --------------------------------------------------------- -// -TBool CEpoc32InputBox::IsStaticCharInvolved() -{ - if (!iHandler || !iHandler->NumberOfStatic() ) - { - return EFalse; - } - return ETrue; -} - - -// --------------------------------------------------------- -// CEpoc32InputBox::CurPos -// --------------------------------------------------------- -// -TUint32 CEpoc32InputBox::CurPos() const -{ - if (iContainer) - { - return 0; - } - return ( iEditor->CursorPos() ); -} - -// --------------------------------------------------------- -// CEpoc32InputBox::OkToExit -// --------------------------------------------------------- -// -TBool CEpoc32InputBox::OkToExit() - { - TBool result = EFalse; - - if (!iOkToExitThreadSafety) - { - iOkToExitThreadSafety = ETrue; - TRAPD( err, result = OkToExitL() ); - iOkToExitThreadSafety = EFalse; - if (err) - { - result = EFalse; - } - } - return result; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::OkToExitL -// --------------------------------------------------------- -// -TBool CEpoc32InputBox::OkToExitL() - { - if (iUncommittedOffset) - { - DoCommitFepInlineEditL(); - } - if (iContainer) // if under CEikSecretEditor control - { - TBool response = ETrue; - HandleTextChangeL(); // update the skin with the present input value of control - HBufC* buf = ReadableSecretTextL(); - if (! iEmptyOk && ! buf->Length()) - { - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox ((NW_FBox_Epoc32InputSkin_t *)iOocInputSkin); - NW_HED_DocumentRoot_t* docRoot = NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_BoxOf(inputBox)); - (void) docRoot->appServices->formBoxCallbacks.InputInvalid(iParent, 0); - response = EFalse; - } - delete buf; - buf = NULL; - return response; - } - - TBool okToExit = EFalse; - - TInt cursorValue( iEditor->CursorPos() ); - - // Mobile Browser keeps track of user input if there are any static characters within the format. - // So, retrieve input values that Avkon knows about if there are NO static characters in the format - // string. - if ( iHandler && !iEditor->IsSecret() && !iHandler->NumberOfStatic() ) - { - HBufC* text = iEditor->GetTextInHBufL(); - if ( text ) // copy finished text to iDynamic in iHandler structure - { - iHandler->SetTextL( *text, ETrue ); - delete text; - } - } - if (iHandler && iHandler->NumberOfStatic() > 0) // accounts for static characters - { - cursorValue = iHandler->PreviousNonStatic( iEditor->CursorPos() ); - if (cursorValue == KNotFound) // possible return value from PreviousNonStatic() - { - cursorValue = 0; - } - } - else - { - if (cursorValue > 0) - { - --cursorValue; - } - } - - if (iEditCommitFlag) - { - if (iHandler && iHandler->NumberOfStatic() > 0) - { - iEditCommitFlag = EFalse; - } - else - { - HBufC* buf = iEditor->ReadableTextLC(); - // if the buf des length is equal to the document length , then no more chars are expected to commit - if (buf->Des().Length() >= iEditor->Text()->DocumentLength() ) - { - iEditCommitFlag = EFalse; - } - else if (buf->Des().Length() >= iEditor->MaxLength() ) // if chars are entered beyond the maxlen no more chars are expected to commit - { - iEditCommitFlag = EFalse; - } - else // check if the last entered data is numeric - { - TPtrC lastInputCharPtr = (iEditor->Text()->Read(cursorValue, 1)); - const TUint16* lastInputChar = lastInputCharPtr.Ptr(); - if (NW_Str_Isdigit(*lastInputChar)) - { - iEditCommitFlag = EFalse; - } - } - CleanupStack::PopAndDestroy(); // buf - } - } - - // commit any outstanding input characters to buffer, before checking if "okay" to exit. - if (iEditCommitFlag ) - { - InputCapabilities().FepAwareTextEditor()->CommitFepInlineEditL(*iEikonEnv); - } - - TInt textLength( iEditor->ReadableTextLC()->Des().Length()); - CleanupStack::PopAndDestroy(); - //if (iHandler && iHandler->NumberOfStatic() > 0) // if static characters found? - // { - // textLength = iHandler->MinLength() - iHandler->NumberOfStatic(); - // } - - TInt minLength = 0; - - minLength = ( iHandler ) ? (iHandler->MinLength()) : 0; - if ( !iEmptyOk ) - { - // When EMPTYOK is false, input is required even if the format - // mask would otherwise not require it. - // [WML Spec section 11.6.3] - if ( !minLength ) - { - ++minLength; // can't be empty - } - } - - if ( ( iHandler && // if no format specified, pass through, and allow okToExit=ETrue. - ( ( (iHandler->NumberOfStatic() > 0) ? // otherwise, if one secified, check the string lengths for validity. - iHandler->FirstEmpty() : textLength - ) - ) >= minLength - ) - || textLength >= minLength - ) // is it long enough? - { - if (iHandler) - { - iEditor->MarkInvalidCharsL(); - } - if ( !iHandler || iHandler->ValidateTextL() ) - { - iConfirmed = ETrue; - okToExit = ETrue; - } - } - else - { - NW_FBox_InputBox_t* inputBox = NW_FBox_InputSkin_GetInputBox ((NW_FBox_Epoc32InputSkin_t *)iOocInputSkin); - NW_HED_DocumentRoot_t* docRoot = NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_BoxOf(inputBox)); - TInt reportable = 1; - if (textLength > 0) - { - reportable = minLength; - } - else - { - if (iEmptyOk) - { - reportable = textLength; - } - else - { - reportable = 1; - } - } - if (iHandler && iHandler->NumberOfStatic() > 0) - { - reportable -= iHandler->NumberOfStatic(); - } - if (reportable == 0 && iEmptyOk) - { - okToExit = ETrue; - } - else if (reportable > 0) - { - (void) docRoot->appServices->formBoxCallbacks.InputInvalid(iParent, reportable); - } - } - - return okToExit; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::ReadableText -// --------------------------------------------------------- -// -HBufC* CEpoc32InputBox::ReadableText() - { - HBufC* buf = NULL; - TInt err; - TRAP( err, buf = ReadableTextL() ); - return buf; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::ReadableTextL -// --------------------------------------------------------- -// -HBufC* CEpoc32InputBox::ReadableTextL() - { - HBufC* buf = NULL; - if (iEditor) - { - buf = iEditor->ReadableTextL(); - } - else if (iContainer) - { - buf = ReadableSecretTextL(); - } - return buf; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::SizeChanged -// --------------------------------------------------------- -// -void CEpoc32InputBox::SizeChanged() - { - TRect rect( Rect() ); - CCoeControl* focusedControl = iEditor; - if (iContainer) - { - focusedControl = iContainer; - } - // update editor's size - focusedControl->SetRect( rect ); - } - -// --------------------------------------------------------- -// CEpoc32InputBox::PredictiveTextOnOffGSNotifiaction -// --------------------------------------------------------- -// -TInt CEpoc32InputBox::PredictiveTextOnOffGSNotifiaction( TAny* /*aObj*/ ) - { - return KErrNone; - } - -// --------------------------------------------------------- -// CEpoc32InputBox::SetRectAndWrap -// --------------------------------------------------------- -// -void CEpoc32InputBox::SetRectAndWrap(const TRect& aRect, TInt aWrapWidth) - { - SetRect( aRect ); - if ( iEditor ) - { - // set new wrap width - iWrapWidth = aWrapWidth; - iEditor->TextLayout()->SetWrapWidth( aWrapWidth ); - // disable scrolling - iEditor->AddFlagToUserFlags (CEikEdwin::ENoHorizScrolling); - // reformat input - iEditor->TextView()->FormatTextL(); - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::InputCapabilities -// --------------------------------------------------------- -// -TCoeInputCapabilities CEpoc32InputBox::InputCapabilities() const - { - if (iContainer) - { - return iContainer->InputCapabilities(); - } - else - { - if (iPenEnabled) - { - return TCoeInputCapabilities(iEditor->InputCapabilities().Capabilities(), - (MCoeFepAwareTextEditor*) this, - (MCoeCaptionRetrieverForFep*) this, TUid::Uid(KFepUid), (TCoeInputCapabilities::MCoeFepSpecificExtensions*)this ); - } - else - { - return iEditor->InputCapabilities(); - } - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleCompletionOfTransactionL() -// --------------------------------------------------------- -// -void CEpoc32InputBox::HandleCompletionOfTransactionL() -{ - iEditCommitFlag = EFalse; -} - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleStartOfTransactionL() -// --------------------------------------------------------- -// -void CEpoc32InputBox::HandleStartOfTransactionL() -{ - iEditCommitFlag = ETrue; -} - -// --------------------------------------------------------- -// CEpoc32InputBox::MCoeFepObserver_Reserved_1() -// --------------------------------------------------------- -// -void CEpoc32InputBox::MCoeFepObserver_Reserved_1() -{} - -// --------------------------------------------------------- -// CEpoc32InputBox::MCoeFepObserver_Reserved_2() -// --------------------------------------------------------- -// -void CEpoc32InputBox::MCoeFepObserver_Reserved_2() -{} - -// --------------------------------------------------------- -// CEpoc32InputBox::FocusChanged -// --------------------------------------------------------- -// -void CEpoc32InputBox::FocusChanged(TDrawNow aDrawNow) - { - if (iContainer) - { - iContainer->SetFocus(IsFocused(), aDrawNow); - } - else - { - iEditor->SetFocus(IsFocused(), aDrawNow); - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleChangeInFocus -// --------------------------------------------------------- -// -void CEpoc32InputBox::HandleChangeInFocus() - { - if (iContainer && IsFocused()) - { - // Rect() would not give us coordinates for password box - better to save - // those coordinates in iRect during the constructor phase and reference them here. - SetRect(iRect); // forces a redraw of password box and of window - } - } - -// --------------------------------------------------------- -// CEpoc32InputBox::HandleDestructionOfFocusedItem -// --------------------------------------------------------- -// -void CEpoc32InputBox::HandleDestructionOfFocusedItem() - { - } - - -// Decides whether to exit the control. -TBool CEpoc32InputBox::IsExitRequest(TUint aKeyCode) - { - TBool return_value = EFalse; - - switch (aKeyCode) - { - case EKeyDevice3: - { - return_value = ETrue; - break; - } - - case EKeyUpArrow: - case EKeyDownArrow: - { - const NW_Object_t* object = NW_FBox_InputSkin_GetInputBox( (NW_FBox_Epoc32InputSkin_t *)iOocInputSkin ); - if (NW_Object_IsClass(object, &NW_FBox_TextAreaBox_Class)) - { - // for TextArea, only exit if cursor is on top row moving up, or bottom row moving down. - return_value = EFalse; - TPoint cursorPos, startCursorPos, endCursorPos; - - iEditor->TextView()->DocPosToXyPosL( iLastCurPos, cursorPos ); - iEditor->TextView()->DocPosToXyPosL( 0, startCursorPos); - iEditor->TextView()->DocPosToXyPosL( iEditor->Text()->DocumentLength(), endCursorPos); - - if ( cursorPos.iY == startCursorPos.iY // At beginning of the range? And key is... - && aKeyCode == EKeyUpArrow ) // North - return_value = ETrue; // If so, allow the exit - - if ( cursorPos.iY == endCursorPos.iY // At end of the range? And key is... - && aKeyCode == EKeyDownArrow ) // South - return_value = ETrue; // If so, allow the exit - - } - else - { - // for InputBox and Password - return_value = ETrue; - } - - break; - } - -// All of the diagonal KeyEvents are allowed to flow through the "default" case... -// -// case EKeyRightUpArrow: // Northeast -// case EStdKeyDevice11: // : Additional KeyEvent to support the .SIS wedge -// case EKeyRightDownArrow: // Southeast -// case EStdKeyDevice12: // : Additional KeyEvent to support the .SIS wedge -// case EKeyLeftDownArrow: // Southwest -// case EStdKeyDevice13: // : Additional KeyEvent to support the .SIS wedge -// case EKeyLeftUpArrow: // Northwest -// case EStdKeyDevice10: // : Additional KeyEvent to support the .SIS wedge - default: - break; - - } - return return_value; -} - - -// --------------------------------------------------------- -// CEpoc32InputBox::GetText -// --------------------------------------------------------- -// -void CEpoc32InputBox::GetSecretText(TDes& aText) - { - iContainer->GetText( aText ); - } - - -// --------------------------------------------------------- -// CEpoc32InputBox::ReadableTextL -// --------------------------------------------------------- -// -HBufC* CEpoc32InputBox::ReadableSecretTextL() - { - TBuf<KBufLength> text; - GetSecretText( text ); - HBufC* buf = NULL; - if (text.Length()) - { - buf = text.AllocL(); - } - else - { - buf = HBufC::NewL(1); - buf->Des().FillZ(1); - buf->Des().SetLength(0); - } - return buf; - } - -// from MCoeFepAwareTextEditor_Extension1 -// ----------------------------------------------------------------------------- -// CEpoc32InputBox::SetStateTransferingOwnershipL -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::SetStateTransferingOwnershipL(CState* aState, TUid /*aTypeSafetyUid*/) -{ - delete iState; - iState = aState; - if (iEditor) - { - iEditor->SetVkbState(STATIC_CAST(CAknEdwinState*, iState)); - } -} - -// ----------------------------------------------------------------------------- -// CEpoc32InputBox::State -// ----------------------------------------------------------------------------- -MCoeFepAwareTextEditor_Extension1::CState* CEpoc32InputBox::State(TUid /*aTypeSafetyUid*/) -{ - if (!iState) - { - CAknEdwinState* state = new CAknEdwinState(); - state->SetObjectProvider(this); - iState = state; - if (iEditor) - { - iEditor->SetVkbState(STATIC_CAST(CAknEdwinState*, iState)); - } - } - return iState; -} - -// ----------------------------------------------------------------------------- -//CEpoc32InputBox::Activate VKB -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::ActivateVKB() -{ - if (iPenEnabled) - { - CAknEdwinState* state = NULL; - MCoeFepAwareTextEditor_Extension1* fepAwareTextEditor = InputCapabilities().FepAwareTextEditor()->Extension1(); - - if ( fepAwareTextEditor ) - { - state = STATIC_CAST(CAknEdwinState*, fepAwareTextEditor->State(KNullUid)); - } - - if ( iEditor ) - { - iEditor->SetEditorCurentCase(); - iEditor->UpdateEditingParameters(); - } - - if ( state ) - { - TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknActivatePenInputRequest ) ); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -// from MCoeFepAwareTextEditor -// -// ----------------------------------------------------------------------------- -// StartFepInlineEditL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::StartFepInlineEditL( - const TDesC& aInitialInlineText, - TInt /*aPositionOfInsertionPointInInlineText*/, - TBool /*aCursorVisibility*/, - const MFormCustomDraw*, - MFepInlineTextFormatRetriever&, - MFepPointerEventHandlerDuringInlineEdit& /*aPointerEventHandlerDuringInlineEdit*/) -{ - CCoeEnv::Static()->ForEachFepObserverCall(FepObserverHandleStartOfTransactionL); - ClearInlineText(); - iUncommittedOffset = aInitialInlineText.Length(); - UpdateInlineTextL(aInitialInlineText); -} -// ----------------------------------------------------------------------------- -// UpdateFepInlineTextL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::UpdateFepInlineTextL(const TDesC& aNewInlineText,TInt /*aPositionOfInsertionPointInInlineText*/) -{ - iUncommittedOffset = aNewInlineText.Length(); - UpdateInlineTextL(aNewInlineText); -} - -// ----------------------------------------------------------------------------- -// SetInlineEditingCursorVisibilityL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::SetInlineEditingCursorVisibilityL(TBool /*aCursorVisibility*/) -{ -} - -// ----------------------------------------------------------------------------- -// CancelFepInlineEdit -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::CancelFepInlineEdit() -{ - if (!m_cancelFepInlineEditInProgress) //prevent recursive calls on inputting enter key - { - m_cancelFepInlineEditInProgress = ETrue; - CAknEdwinState* state = static_cast<CAknEdwinState*>(State(KNullUid)); - if ( state ) { - TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateEventStateUpdate ) ); - } - m_cancelFepInlineEditInProgress = EFalse; - } -} - -// ----------------------------------------------------------------------------- -// DocumentLengthForFep -// -// -// ----------------------------------------------------------------------------- -TInt CEpoc32InputBox::DocumentLengthForFep() const -{ - return (iInlineEditText ? iInlineEditText->Length() : 0); -} - - -// ----------------------------------------------------------------------------- -// DocumentMaximumLengthForFep -// -// -// ----------------------------------------------------------------------------- -TInt CEpoc32InputBox::DocumentMaximumLengthForFep() const -{ - return iMaxLength; -} - -// ----------------------------------------------------------------------------- -// SetCursorSelectionForFepL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection) -{ - if ( iEditor ) - { - iEditor->SetCursorPosL( aCursorSelection.iCursorPos ); - iEditor->UpdateEditingParameters( aCursorSelection.iCursorPos ); - } -} - -// ----------------------------------------------------------------------------- -// GetCursorSelectionForFep -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const -{ - if ( iEditor ) - { - TInt cursorPos (iEditor->CursorPos() + iUncommittedOffset); - aCursorSelection.SetSelection(cursorPos,cursorPos); - } -} - -// ----------------------------------------------------------------------------- -// GetEditorContentForFep -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::GetEditorContentForFep(TDes& aEditorContent,TInt aDocumentPosition,TInt aLengthToRetrieve) const -{ - aEditorContent = KNullDesC; - if ( iInlineEditText && aDocumentPosition >= 0 && (aDocumentPosition + aLengthToRetrieve) <= iInlineEditText->Length() ) - { - aEditorContent = iInlineEditText->Des().Mid(aDocumentPosition,aLengthToRetrieve); - } -} - -// ----------------------------------------------------------------------------- -// GetFormatForFep -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::GetFormatForFep(TCharFormat& /*aFormat*/,TInt /*aDocumentPosition*/) const -{ -} - -// ----------------------------------------------------------------------------- -// GetScreenCoordinatesForFepL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine,TInt& aHeight,TInt& aAscent,TInt /*aDocumentPosition*/) const -{ - aLeftSideOfBaseLine = TPoint(10,10); - aHeight = 0; - aAscent = 0; -} - -// ----------------------------------------------------------------------------- -// UpdateInlineTextL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::UpdateInlineTextL(const TDesC& aText) -{ - if (DocumentLengthForFep() >= DocumentMaximumLengthForFep()) - return; - - delete iInlineEditText; - iInlineEditText = NULL; - - if (!iDocumentText) - { - iInlineEditText = aText.AllocL(); - } - else - { - TInt curPos(iEditor->CursorPos()); - HBufC* newText = HBufC::NewL(iDocumentText->Length() + aText.Length()); - newText->Des().Append(iDocumentText->Left(curPos)); - newText->Des().Append(aText); - newText->Des().Append(iDocumentText->Right(iDocumentText->Length() - curPos)); - iInlineEditText = newText; - } -} - -// ----------------------------------------------------------------------------- -// DoCommitFepInlineEditL -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::DoCommitFepInlineEditL() -{ - if (iInlineEditText) - { - HBufC* newText = iInlineEditText->AllocL(); - delete iDocumentText; - iDocumentText = newText; - } - - if ( iEditor ) - { - iEditor->SetTextL( iDocumentText ); - } - TCursorSelection sel; - GetCursorSelectionForFep(sel); - SetCursorSelectionForFepL(sel); - iUncommittedOffset = 0; -} - -// ----------------------------------------------------------------------------- -// Extension1 -// -// -// ----------------------------------------------------------------------------- -MCoeFepAwareTextEditor_Extension1* CEpoc32InputBox::Extension1(TBool& aSetToTrue) -{ - aSetToTrue=ETrue; - return STATIC_CAST(MCoeFepAwareTextEditor_Extension1*, this); -} - -// ----------------------------------------------------------------------------- -// MCoeFepAwareTextEditor_Reserved_2 -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::MCoeFepAwareTextEditor_Reserved_2() -{ -} - -// ----------------------------------------------------------------------------- -// MCoeFepAwareTextEditor_Reserved_2 -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::GetCaptionForFep(TDes& /*aCaption*/) const -{ -} - -// ----------------------------------------------------------------------------- -// ClearInlineText -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::ClearInlineText() -{ - delete iInlineEditText; - iInlineEditText = NULL; -} - -void CEpoc32InputBox::HandlePointerEventL(const TPointerEvent &aPointerEvent) - { - CCoeControl::HandlePointerEventL(aPointerEvent); - - if ( iContainer && aPointerEvent.iType == TPointerEvent::EButton1Up) - { - ActivateVKB(); - } - - } - -// ----------------------------------------------------------------------------- -// HandleUpdateCursor -// -// -// ----------------------------------------------------------------------------- -void CEpoc32InputBox::HandleUpdateCursor() -{ - // ReportAknEdStateEventL, for events see aknedstsobs.h - // MAknEdStateObserver::EAknCursorPositionChanged - if ( iEditor->CursorPos() == iPrevCurPos ) { - return; - } - - CAknEdwinState* state = static_cast<CAknEdwinState*>(State(KNullUid)); - if ( state ) { - TRAP_IGNORE( state->ReportAknEdStateEventL( MAknEdStateObserver::EAknCursorPositionChanged ) ); - } -} - -// ------------------------------------------------------------------------------- -// IsValidCharacter :: interface method of MCoeFepSpecificExtensions -// -// ------------------------------------------------------------------------------- -TBool CEpoc32InputBox::IsValidCharacter(TInt aChar) - { - // Single line input box, enter character need not be taken - if ( aChar == KLineEnterChar ) - return EFalse; - return ETrue; - } - -// End of File - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXCheckBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXCheckBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_checkboxi.h" - -#include "nw_evt_activateevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_focusevent.h" -#include "nw_fbox_checkboxskin.h" -#include "nw_fbox_radiobox.h" -#include "nw_lmgr_rootbox.h" -#include "LMgrBoxTreeListener.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_CheckBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_CheckBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_FBox_CheckBox_InterfaceList[] = { - &_NW_FBox_CheckBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_CheckBox_Class_t NW_FBox_CheckBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_CheckBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_CheckBox_t), - /* construct */ _NW_FBox_CheckBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_FormBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_CheckBox_InitSkin, - /* initInteractor */ _NW_FBox_CheckBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_CheckBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_CheckBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - NW_FBox_CheckBox_t* thisObj; - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - /* for convenience */ - thisObj = NW_FBox_CheckBoxOf (dynamicObject); - thisObj->focus = NW_FALSE; - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Skin_t* -_NW_FBox_CheckBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_CheckBoxSkin_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Interactor_t* -_NW_FBox_CheckBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - (void)formBox; - return NULL; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Bool -NW_FBox_CheckBox_GetState (NW_FBox_CheckBox_t* thisObj) -{ - NW_FBox_FormLiaison_t* formLiason; - NW_Bool state; - - /* no use checking for errors; cast to void */ - formLiason = NW_FBox_FormBox_GetFormLiaison(thisObj); - state = NW_FALSE; - (void) NW_FBox_FormLiaison_GetBoolValue (formLiason, - NW_FBox_FormBox_GetFormCntrlID(thisObj), - &state); - - return state; -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_CheckBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_FBox_CheckBox_t* thisObj; - NW_FBox_FormLiaison_t* formLiason; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_FBox_CheckBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_CheckBox_Class)); - - formLiason = NW_FBox_FormBox_GetFormLiaison(thisObj); - - if ((NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) || - (NW_Object_Core_GetClass (event) == &NW_Evt_AccessKeyEvent_Class)) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(NW_LMgr_BoxOf(thisObj)); - - /* state change is taken care of by the form liaison */ - (void) NW_FBox_FormLiaison_ToggleBoolValue (formLiason, - NW_FBox_FormBox_GetFormCntrlID (thisObj)); - - (void)NW_LMgr_RootBox_GetBoxTreeListener(rootBox)->RedrawDisplay (NW_TRUE); - /* we absorbed the event! */ - return NW_LMgr_EventAbsorbed; - } - else if ( NW_Object_Core_GetClass( event ) == &NW_Evt_FocusEvent_Class ) - { - if(NW_Evt_FocusEvent_GetHasFocus(event)) - { - /* state change is taken care of by the form liaison */ - ( void ) NW_FBox_FormLiaison_Focus( - formLiason, - NW_FBox_FormBox_GetFormCntrlID( thisObj ) ); - } - return NW_LMgr_EventAbsorbed; - } - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent( eventListener, event ); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_FBox_CheckBox_t* -NW_FBox_CheckBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison) -{ - return (NW_FBox_CheckBox_t*) - NW_Object_New (&NW_FBox_CheckBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXCheckBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXCheckBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_checkboxskini.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_CheckBoxSkin_Class_t NW_FBox_CheckBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_CheckBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ NULL, - /* NW_FBox_Skin_GetSize_t */ NULL - }, - { /* NW_FBox_CheckBoxSkin */ - /* unused */ NW_Object_Unused - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXEpoc32InlineCheckBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXEpoc32InlineCheckBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_inlinecheckboxskini.h" - -#include "nw_fbox_checkbox.h" -#include "nw_fbox_epoc32formimages.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_InlineCheckBoxSkin_Class_t NW_FBox_InlineCheckBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_CheckBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_InlineCheckBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ _NW_FBox_InlineCheckBoxSkin_Draw, - /* NW_FBox_Skin_GetSize_t */ _NW_FBox_InlineCheckBoxSkin_GetSize - }, - { /* NW_FBox_CheckBoxSkin */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_InlineCheckBoxSkin */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InlineCheckBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_CheckBox_t* checkBox; - NW_Image_AbstractImage_t* image = 0; - NW_FBox_FormImages_t* formImages; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_Property_t backgroundProp; - NW_GDI_Color_t backgroundColor = 0x00; - NW_LMgr_Box_t* parentBox = NULL; - NW_GDI_Color_t initialBgColor = 0; - - NW_TRY(status) - { - /* for convenience */ - checkBox = NW_FBox_CheckBoxOf (box); - (void)skin; - - /* Let the base class draw draw the box */ - status = NW_LMgr_Box_Class.NW_LMgr_Box.draw(box, deviceContext, hasFocus); - NW_THROW_ON_ERROR(status); - - /* Calculate the inner rectangle */ - NW_LMgr_Box_GetInnerRectangle(box, &innerRect); - formImages = (NW_FBox_FormImages_t*)&NW_FBox_FormImages; - image = (NW_Image_AbstractImage_t*) - NW_FBox_FormImages_GetImage(formImages, hasFocus, - NW_FBox_CheckBox_GetState(checkBox), - NW_FBox_FormBoxOf(checkBox)); - NW_THROW_OOM_ON_NULL(image, status); - - - /* get background color info */ - initialBgColor = deviceContext->BackgroundColor(); - backgroundProp.type = NW_CSS_ValueType_Token; - backgroundProp.value.token = NW_CSS_PropValue_transparent; - parentBox = NW_LMgr_BoxOf(box->parent); - while(parentBox != NULL) - { - status = NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_backgroundColor, &backgroundProp); - if (status == KBrsrSuccess){ - break; - } - parentBox = NW_LMgr_BoxOf(parentBox->parent); - } - - if (backgroundProp.type == NW_CSS_ValueType_Color) { - backgroundColor = backgroundProp.value.integer; - deviceContext->SetBackgroundColor( backgroundColor); - } - - /* make our image draw itself at the specified location */ - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - status = NW_Image_AbstractImage_Draw (image, deviceContext, &(innerRect.point)); - NW_THROW_ON_ERROR(status); - - /* draw the focused border */ - if (hasFocus) - { - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderStyle (box, &borderStyle, ELMgrFrameAll ); - - status = NW_LMgr_Box_DrawBorder( NW_LMgr_Box_GetDisplayBounds(box), deviceContext, &borderWidth, &borderStyle, &borderColor); - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) - { - } - NW_FINALLY{ - deviceContext->SetBackgroundColor( initialBgColor); - NW_Object_Delete ((NW_Image_AbstractImage_t*)image); - return status; - }NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InlineCheckBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) -{ - NW_FBox_CheckBox_t* checkBox; - const NW_Image_AbstractImage_t* image; - NW_FBox_FormImages_t* formImages; - NW_GDI_Dimension3D_t imageSize; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_CheckBox_Class)); - - /* for convenience */ - checkBox = NW_FBox_CheckBoxOf (box); - (void)skin; - formImages = (NW_FBox_FormImages_t*)&NW_FBox_FormImages; - - image = (NW_Image_AbstractImage_t*)NW_FBox_FormImages_GetImage(formImages, NW_FALSE, - NW_FBox_CheckBox_GetState(checkBox), - NW_FBox_FormBoxOf(checkBox)); - if (image == NULL) - { - return KBrsrOutOfMemory; - } - /* Get the size of the image itself */ - (void) NW_Image_AbstractImage_GetSize (image, &imageSize); - - size->height = imageSize.height; - size->width = imageSize.width; - - NW_Object_Delete ((NW_Image_AbstractImage_t*)image); - - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_CheckBoxSkin_t* -NW_FBox_CheckBoxSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_CheckBoxSkin_t*) - NW_Object_New (&NW_FBox_InlineCheckBoxSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXEpoc32OptGrpSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXEpoc32OptGrpSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_epoc32optgrpskini.h" - -#include "nw_fbox_optgrpbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "nwx_generic_dlg.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32OptGrpSkin_Class_t NW_FBox_Epoc32OptGrpSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_OptGrpSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32OptGrpSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* draw */ NULL, - /* getSize */ NULL - }, - { /* NW_FBox_OptGrpSkin */ - /* addOption */ _NW_FBox_Epoc32OptGrpSkin_AddOption, - /* addOptGrp */ _NW_FBox_Epoc32OptGrpSkin_AddOptGrp - }, - { /* NW_FBox_Epoc32OptGrpSkin */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32OptGrpSkin_AddOption(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptionBox_t* optionBox) -{ - NW_REQUIRED_PARAM(optGrpSkin); - NW_REQUIRED_PARAM(optionBox); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Epoc32OptGrpSkin_AddOptGrp(NW_FBox_OptGrpSkin_t* optGrpSkin, - NW_FBox_OptGrpBox_t* optGrpBox) -{ - NW_REQUIRED_PARAM(optGrpSkin); - NW_REQUIRED_PARAM(optGrpBox); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_OptGrpSkin_t* -NW_FBox_OptGrpSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_OptGrpSkin_t*) - NW_Object_New (&NW_FBox_Epoc32OptGrpSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXEpoc32OptionSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXEpoc32OptionSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_epoc32optionskini.h" - -#include "nw_fbox_optionbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "nwx_generic_dlg.h" - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Epoc32OptionSkin_Class_t NW_FBox_Epoc32OptionSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_OptionBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Epoc32OptionSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* draw */ NULL, - /* getSize */ NULL - }, - { /* NW_FBox_OptionSkin */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_ISAOptionSkin */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_OptionBoxSkin_t* -NW_FBox_OptionBoxSkin_New (NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_OptionBoxSkin_t*) - NW_Object_New (&NW_FBox_Epoc32OptionSkin_Class, formBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXFileSelectionBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXFileSelectionBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,549 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: FileSelectionBox OOC class implementation -- a box for XHTML -* input file, providing button for launching file-selection dialogs, which in -* turn allows the user to browse the local file system and select a file for -* upload. -* -*/ - - -// INCLUDE FILES -#include "BrsrStatusCodes.h" -#include "GDIDevicecontext.h" -#include "GDIFont.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_clearfieldevent.h" -#include "nw_evt_ecmaevent.h" -#include "nw_evt_focusevent.h" -#include "nw_fbox_fileselectionboxi.h" -#include "nw_fbox_fileselectionboxskin.h" -#include "nw_fbox_inputinteractor.h" -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_rootbox.h" -#include "nw_image_epoc32cannedimage.h" -#include "nwx_string.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// Default text-area width of file-selection control (from O'Reilly book, "HTML -// & XHTML, The Definitive Guide, 5th edition"). -const NW_Uint16 KDefaultTextAreaWidthInChars = 20; - -// The size of the text-area width will eventually be converted to pixels using -// an average char width value as stipulated in the UI spec, which differs -// based on the font. For example, Chinese is bigger. In order to prevent -// arithmetic overflow when the size is converted to pixels, a somewhat -// arbitrary max limit is applied. -const NW_Uint16 KDefaultTextAreaWidthMaxChars = 1000; - -// An empty string. -_LIT(KEmptyString, ""); - - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_FileSelectionBox_IEventListener_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof ( NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener ) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_FileSelectionBox_IEventListener_ProcessEvent - } - }; - -static -const NW_Object_Class_t* const _NW_FBox_FileSelectionBox_InterfaceList[] = - { - &_NW_FBox_FileSelectionBox_IEventListener_Class, - NULL - }; - -const -NW_FBox_FileSelectionBox_Class_t NW_FBox_FileSelectionBox_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_FileSelectionBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof ( NW_FBox_FileSelectionBox_t ), - /* construct */ _NW_FBox_FileSelectionBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_FileSelectionBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_FileSelectionBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_FileSelectionBox_InitSkin, - /* initInteractor */ _NW_FBox_FileSelectionBox_InitInteractor, - /* reset */ _NW_FBox_FileSelectionBox_Reset - }, - { /* NW_FBox_FileSelectionBox */ - /* unused */ NW_Object_Unused - } - }; - - -// LOCAL FUNCTION PROTOTYPES -TBrowserStatusCode -NW_FBox_FileSelectionBox_SetFormLiaisonValue( NW_FBox_FileSelectionBox_t* aThisObj ); - - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::NW_FBox_FileSelectionBox -// OOC constructor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Construct( - NW_Object_Dynamic_t* aDynamicObject, - va_list* aArgp ) - { - NW_FBox_FileSelectionBox_t* thisObj; - TBrowserStatusCode status; - - // For convenience. - thisObj = NW_FBox_FileSelectionBoxOf( aDynamicObject ); - - // Invoke superclass constructor. - status = _NW_FBox_FormBox_Construct( aDynamicObject, aArgp ); - if ( status != KBrsrSuccess ) - { - return status; - } - - // Initialize member variables. - - // The size is specified in the XHTML input as desired # of characters. - // This will eventually be converted to pixels using an average char width - // value as stipulated in the UI spec, which differs based on the font. - // For example, Chinese is bigger. In order to prevent arithmetic overflow - // when the size is converted to pixels, a somewhat arbitrary max limit is - // applied. A default size is used if none specified. The actual size of - // the input control will also be limited by the width of the display but - // that is handled later on. - NW_Uint16 size = (NW_Uint16)va_arg( *aArgp, NW_Uint32 ); - thisObj->iDesiredTextAreaWidthInChars = - ((size == 0 ) || (size > KDefaultTextAreaWidthMaxChars)) - ? KDefaultTextAreaWidthInChars : size; - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::GetBaseline -// Gets the baseline for the content of this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_GDI_Metric_t -_NW_FBox_FileSelectionBox_GetBaseline( NW_LMgr_Box_t* aLmgrBox ) - { - NW_FBox_FormBox_t* formBox; - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aLmgrBox, &NW_FBox_FormBox_Class ) ); - - // Get the 'skin' class through the form. - formBox = NW_FBox_FormBoxOf( aLmgrBox ); - NW_ASSERT( formBox ); - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( formBox ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Delegate the operation to the skin class. - return NW_FBox_FileSelectionBoxSkin_GetBaseline( - fileSelectionBoxSkin, aLmgrBox ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::InitInteractor -// Creates and initializes the interactor for this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_FBox_Interactor_t* -_NW_FBox_FileSelectionBox_InitInteractor( NW_FBox_FormBox_t* aFormBox ) - { - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aFormBox, &NW_FBox_FileSelectionBox_Class ) ); - - return ( NW_FBox_Interactor_t * ) NW_FBox_InputInteractor_New( aFormBox ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::InitSkin -// Creates and initializes the skin class for this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_FBox_Skin_t* -_NW_FBox_FileSelectionBox_InitSkin( NW_FBox_FormBox_t* aFormBox ) - { - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aFormBox, &NW_FBox_FileSelectionBox_Class ) ); - - return ( NW_FBox_Skin_t * ) NW_FBox_FileSelectionBoxSkin_New( aFormBox ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::Reset -// Resets this box; i.e., resets the value of the filename to an empty string -// but does not redraw the field. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Reset( NW_FBox_FormBox_t* aFormBox ) - { - TBrowserStatusCode status; - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aFormBox, &NW_FBox_FileSelectionBox_Class ) ); - - // Get the 'skin' class through the form. - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( aFormBox ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Have the skin reset the field, clearing internal storage but does not - // redraw the field. - status = NW_FBox_FileSelectionBoxSkin_Reset( fileSelectionBoxSkin ); - if ( status != KBrsrSuccess ) - { - return status; - } - - // Reset the form-liaison's value to the cleared value. - status = NW_FBox_FileSelectionBox_SetFormLiaisonValue( - NW_FBox_FileSelectionBoxOf( aFormBox) ); - - return status; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::Split -// Checks to see if this box needs to be split and if so, "splits" it; however, -// this box cannot be split. It is moved to a new line if not already on one. -// That is the best that can be done to split this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBox_Split( - NW_LMgr_Box_t* aLmgrBox, - NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, - NW_Uint8 aFlags ) - { - NW_FBox_FormBox_t* formBox; - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aLmgrBox, &NW_FBox_FormBox_Class ) ); - NW_ASSERT( aSplitBox ); - - // Get the 'skin' class through the form. - formBox = NW_FBox_FormBoxOf( aLmgrBox ); - NW_ASSERT( formBox ); - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( formBox ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Delegate the operation to the skin class. - return NW_FBox_FileSelectionBoxSkin_Split( fileSelectionBoxSkin, - aSpace, aSplitBox, aFlags ); - } - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::HasContent -// Determines whether or not the box has content. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBool -NW_FBox_FileSelectionBox_HasContent( NW_FBox_FileSelectionBox_t* aThisObj ) - { - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBox_Class ) ); - - // Get the 'skin' class through the form. - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( aThisObj ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Delegate the operation to the skin class. - return NW_FBox_FileSelectionBoxSkin_HasContent( fileSelectionBoxSkin ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::SetActive -// Activate this item, which launches the file-selection dialogs, allowing the -// user to interactively select a file. -// @since 2.6 -// @param aThisObj Ptr to the OOC class structure for this class. -// @return Browser status code: OutOfMemory if allocs fail; Failure on any -// other failure; otherwise, Success. -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_FBox_FileSelectionBox_SetActive( NW_FBox_FileSelectionBox_t* aThisObj ) - { - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBox_Class ) ); - - // Get the 'skin' class through the form. - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( aThisObj ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Delegate the operation to the skin class. - return NW_FBox_FileSelectionBoxSkin_SetActive( fileSelectionBoxSkin ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::SetFormLiaisonValue -// Set the value of this file-selection field to the corresponding variable -// within the form liaison. -// @since 2.6 -// @param thisObj Ptr to the OOC class structure for this class. -// @return Browser status code. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_FBox_FileSelectionBox_SetFormLiaisonValue( NW_FBox_FileSelectionBox_t* aThisObj ) - { - void* formControlId; - NW_Text_t* legacyText = NULL; - NW_FBox_FormBox_t* formBox; - NW_FBox_FormLiaison_t* formLiaison; - NW_FBox_FileSelectionBoxSkin_t* fileSelectionBoxSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBox_Class ) ); - - NW_TRY( status ) - { - // Get the skin class for this box. That's where the value is stored. - formBox = NW_FBox_FormBoxOf( aThisObj ); - NW_ASSERT( formBox ); - fileSelectionBoxSkin = NW_FBox_FileSelectionBoxSkinOf( - NW_FBox_FormBox_GetSkin( formBox ) ); - NW_ASSERT( fileSelectionBoxSkin ); - - // Convert from Symbian data structure to legacy data structure. For - // efficiency, the Symbian data structures are used wherever possible, but - // now it needs to be converted. Unfortunately, this allocates yet another - // buffer for the text object but the storage is just a pointer. - NW_Ucs2* buffer; - NW_Text_Length_t length; - if ( fileSelectionBoxSkin->iFullFileName ) - { - buffer = (NW_Ucs2*)fileSelectionBoxSkin->iFullFileName->Ptr(); - length = (NW_Text_Length_t)fileSelectionBoxSkin->iFullFileName->Length(); - } - else - { - buffer = (NW_Ucs2*)((&KEmptyString)->Ptr()); - length = 0; - } - legacyText = (NW_Text_t*)NW_Text_UCS2_New( buffer, length, - NW_Text_Flags_NullTerminated ); - NW_THROW_OOM_ON_NULL( legacyText, status ); - - // Get the form liaison. - formLiaison = NW_FBox_FormBox_GetFormLiaison( aThisObj ); - - // Every time the value in the formLiaison is set, the most-recent- - // file-selection-path is updated. This is done before setting the - // value -- while this method still has control of the buffer. - TPtrC ptrMostRecentPath( buffer, length ); - status = NW_FBox_FormLiaison_SetMostRecentFileSelectionPath( - formLiaison, ptrMostRecentPath ); - _NW_THROW_ON_ERROR( status ); - - // Set the value in the formLiaison. Note, the formLiaison takes ownership - // of the text object iff SetStringValue succeeds. - formControlId = NW_FBox_FormBox_GetFormCntrlID( aThisObj ); - status = NW_FBox_FormLiaison_SetStringValue( - formLiaison, formControlId, legacyText ); - if ( status != KBrsrSuccess ) - { - NW_Object_Delete( legacyText ); - legacyText = NULL; - NW_THROW( status ); - } - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::IEventListener_ProcessEvent -// Process events for this box: set-active, clear-field, gain/lose focus, etc. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_Uint8 -_NW_FBox_FileSelectionBox_IEventListener_ProcessEvent( - NW_LMgr_IEventListener_t* aEventListener, - NW_Evt_Event_t* aEvent ) - { - NW_FBox_FileSelectionBox_t* thisObj; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aEventListener, &NW_LMgr_IEventListener_Class ) ); - NW_ASSERT( NW_Object_IsInstanceOf( aEvent, &NW_Evt_Event_Class ) ); - - // Obtain the implementer. - thisObj = ( NW_FBox_FileSelectionBox_t* ) NW_Object_Interface_GetImplementer( aEventListener ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_FBox_FileSelectionBox_Class ) ); - - // Dispatch on the event type. - if ( ( NW_Object_Core_GetClass( aEvent ) == &NW_Evt_ActivateEvent_Class ) - || ( NW_Object_Core_GetClass( aEvent ) == &NW_Evt_AccessKeyEvent_Class ) ) - { - - // According to UI spec, when file Upload field is activated, ecma onFocus - // event should be delegated - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison( thisObj ); - (void)NW_FBox_FormLiaison_DelegateEcmaEvent( - formLiason, NW_FBox_FormBox_GetFormCntrlID( thisObj ), - NW_Ecma_Evt_OnFocus ); - (void)NW_FBox_FileSelectionBox_SetActive( thisObj ); - (void)NW_FBox_FileSelectionBox_SetFormLiaisonValue( thisObj ); - return NW_LMgr_EventAbsorbed; - } - else if ( NW_Object_Core_GetClass( aEvent ) == &NW_Evt_FocusEvent_Class ) - { - NW_FBox_FormLiaison_t* formLiason = - NW_FBox_FormBox_GetFormLiaison( thisObj ); - NW_ASSERT( formLiason ); - ( void ) NW_FBox_FormLiaison_DelegateEcmaEvent( - formLiason, - NW_FBox_FormBox_GetFormCntrlID( thisObj ), - NW_Ecma_Evt_OnFocus ); - return NW_LMgr_EventAbsorbed; - } - else if ( NW_Object_Core_GetClass( aEvent ) == &NW_Evt_ClearFieldEvent_Class ) - { - NW_LMgr_Box_t* lmgrBox = - NW_LMgr_BoxOf( thisObj ); - NW_ASSERT( lmgrBox ); - - (void)_NW_FBox_FileSelectionBox_Reset( NW_FBox_FormBoxOf( lmgrBox ) ); - (void)NW_LMgr_Box_Refresh( lmgrBox ); - - return NW_LMgr_EventAbsorbed; - } - - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent( aEventListener, aEvent ); - } - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBox::New -// Creates a new file selection box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_FBox_FileSelectionBox_t* -NW_FBox_FileSelectionBox_New( - NW_ADT_Vector_Metric_t aNumProperties, - NW_LMgr_EventHandler_t* aEventHandler, - void* aFormCntrlId, - NW_FBox_FormLiaison_t* aFormLiaison, - NW_Uint16 aSize, - NW_HED_AppServices_t* aAppServices ) - { - // Parameter assertion block. - NW_ASSERT( aEventHandler ); - NW_ASSERT( aFormLiaison ); - NW_ASSERT( aAppServices ); - - return ( NW_FBox_FileSelectionBox_t* ) - NW_Object_New( &NW_FBox_FileSelectionBox_Class, aNumProperties, - aEventHandler, aFormCntrlId, aFormLiaison, (NW_Uint32) aSize, - aAppServices ); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXFileSelectionBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXFileSelectionBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1009 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Class implementation for the FileSelectionBox skin, the skin being -* the displayed element within the rendered XHTML page. -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <AknBidiTextUtils.h> -#include <AknUtils.h> -#include <webkit.rsg> - -#include "BrCtl.h" -#include "BrsrStatusCodes.h" -#include "GDIDevicecontext.h" -#include "GDIFont.h" -#include "MVCShell.h" -#include "MVCView.h" -#include "nw_fbox_fileselectionbox.h" -#include "nw_fbox_fileselectionboxskin.h" -#include "nw_fbox_fileselectionboxskini.h" -#include "nw_fbox_formboxutils.h" -#include "nw_fbox_skini.h" -#include "nw_gdi_types.h" -#include "nw_image_epoc32cannedimage.h" -#include "nw_lmgr_imgcontainerboxi.h" -#include "nw_lmgr_rootbox.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// Arbitrary limit, specified in bytes, on amount of tolerated wasted space -// within file-name buffer. If the wasted space exceeds this amount, the buffer -// is reallocated. Must not be less than 2 (size of a 2-byte NULL terminator). -const TInt KFileNameWasteThreshold = 50; - -// Amount of padding in between text and icon. -const TUint KImageHorizontalPadding = 2; - - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES -const -NW_FBox_FileSelectionBoxSkin_Class_t NW_FBox_FileSelectionBoxSkin_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof ( NW_FBox_FileSelectionBoxSkin_t ), - /* construct */ _NW_FBox_FileSelectionBoxSkin_Construct, - /* destruct */ _NW_FBox_FileSelectionBoxSkin_Destruct - }, - { /* NW_FBox_Skin */ - /* draw */ _NW_FBox_FileSelectionBoxSkin_Draw, - /* getSize */ _NW_FBox_FileSelectionBoxSkin_GetSize - }, - { /* NW_FBox_FileSelectionBoxSkin */ - /* getBaseline */ _NW_FBox_FileSelectionBoxSkin_GetBaseline, - /* reset */ _NW_FBox_FileSelectionBoxSkin_Reset, - /* setActive */ _NW_FBox_FileSelectionBoxSkin_SetActive, - /* split */ _NW_FBox_FileSelectionBoxSkin_Split - } - }; - - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetDirection -// Gets the layout direction, LTR or RTL. -// @param aLmgrBox Ptr to the parent LMgr OOC box class for this skin's box object. -// @param aDir Ptr to desitination into which direction is returned. -// ----------------------------------------------------------------------------- -// -static -void -NW_FBox_FileSelectionBoxSkin_GetDirection( - NW_LMgr_Box_t* aLmgrBox, - NW_GDI_FlowDirection_t* aDir ) - { - NW_LMgr_Property_t dirProp; - - // Parameter assertion block. - NW_ASSERT( aLmgrBox ); - NW_ASSERT( aDir ); - - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty( aLmgrBox, NW_CSS_Prop_textDirection, &dirProp ); - *aDir = ( dirProp.value.token == NW_CSS_PropValue_ltr ) - ? NW_GDI_FlowDirection_LeftRight : NW_GDI_FlowDirection_RightLeft; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetDisplayText -// Extract the name and extension, no path, from the filename and truncate that -// to fit within the displayable area. -// @param aThisObj Ptr to the OOC class structure for this class. -// @param aDir Text direction. -// @param aImageSize Ptr to image size. -// @param aFont Font being used to display the text. -// @param aInnerRectangle Ptr to rectangle of the box available for text & icon. -// @param aDisplayText Ptr to destination into which the allocated text buffer -// for the display text is returned, which if not NULL, the caller is -// responsible for taking ownership and deallocating when appropriate. -// @return Browser status code: -// KBrsrSuccess if no errors -// KBrsrOutOfMemory if not enough memory -// KBrsrFailure for all other failure conditions -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_FBox_FileSelectionBoxSkin_GetDisplayText( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_GDI_FlowDirection_t aDir, - NW_GDI_Dimension3D_t* aImageSize, - const CFont& aFont, - NW_GDI_Rectangle_t* aInnerRectangle, - HBufC** aDisplayText ) - { - - // Parameter assertion block. - NW_ASSERT( aThisObj ); - NW_ASSERT( aImageSize ); - NW_ASSERT( aInnerRectangle ); - NW_ASSERT( aDisplayText ); - - *aDisplayText = NULL; - - // If no name yet, then nothing left to do. - if ( aThisObj->iFileNameAndExt.Length() == 0 ) - { - return KBrsrSuccess; - } - - // Determine the maxiumum width available for the text. - TInt maxWidthInPixels = aInnerRectangle->dimension.width - aImageSize->width - - KImageHorizontalPadding; - // Must be at least 2 pixels wide to display any text. - if ( maxWidthInPixels < 2 ) - { - return KBrsrSuccess; - } - - // Get text direction. - AknBidiTextUtils::TParagraphDirectionality directionality = - (aDir == NW_GDI_FlowDirection_LeftRight) - ? AknBidiTextUtils::ELeftToRight : AknBidiTextUtils::ERightToLeft; - - // Allocate buffer for the truncated text. - HBufC* truncatedText = HBufC::New( aThisObj->iFileNameAndExt.Length() - + KAknBidiExtraSpacePerLine + 1 ); // +1 for NULL terminator - if ( !truncatedText ) - { - return KBrsrOutOfMemory; - } - // The buffer is an HBufC, which is a 'constant' class. However, it is - // on the heap and is modifiable if accessed through its pointer. - TPtr ptrTruncatedText( truncatedText->Des() ); - - // Truncate. - AknBidiTextUtils::ConvertToVisualAndClip( aThisObj->iFileNameAndExt, - ptrTruncatedText, aFont, maxWidthInPixels, maxWidthInPixels, - directionality ); - - // Make sure it is NULL terminated for legacy text handling. - ptrTruncatedText.ZeroTerminate(); - - // Return the pointer to the truncated text. - *aDisplayText = truncatedText; - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetImageSize -// Gets the size of the icon used for indicating file-browse. -// @param aFileSelectionBox Ptr to OOC box to which this skin belongs. -// @param aImageSize Ptr to destination for returned image size. -// @return Browser status code, indicating status of operation. -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_FBox_FileSelectionBoxSkin_GetImageSize( - NW_FBox_FileSelectionBox_t* aFileSelectionBox, - NW_GDI_Dimension3D_t* aImageSize ) - { - NW_LMgr_RootBox_t* rootBox; - const NW_Image_AbstractImage_t* image; - - // Parameter assertion block. - NW_ASSERT( aFileSelectionBox ); - NW_ASSERT( aImageSize ); - - NW_TRY( status ) - { - // Get root box. - rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf( aFileSelectionBox ) ); - NW_ASSERT( rootBox ); - - // Get image from set of canned images. - NW_ASSERT( rootBox->cannedImages ); - image = CONST_CAST( NW_Image_AbstractImage_t*, - NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_SelectFile ) ); - NW_THROW_ON_NULL( image, status, KBrsrFailure ); - - // Get image size. - status = NW_Image_AbstractImage_GetSize( image, aImageSize ); - _NW_THROW_ON_ERROR( status ); - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetMaxCharExtent -// Gets the max extents (width & height) of a character for the current font. -// @param aFileSelectionBox Ptr to OOC box to which this skin belongs. -// @param aDeviceContext Ptr to GDI device context from which the current font -// and its extents are obtained. -// @param aExtent Ptr to destination into which the extents are returned. -// @return Browser status code, indicating status of operation. -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_FBox_FileSelectionBoxSkin_GetMaxCharExtent( - NW_FBox_FileSelectionBox_t* aFileSelectionBox, - CGDIDeviceContext* aDeviceContext, - NW_GDI_Dimension2D_t* aExtent ) - { - CFont* font; - CGDIFont* gdiFont; - - // Parameter assertion block. - NW_ASSERT( aFileSelectionBox ); - NW_ASSERT( aDeviceContext ); - NW_ASSERT( aExtent ); - - // Get the box font. - gdiFont = NW_LMgr_Box_GetFont( NW_LMgr_BoxOf( aFileSelectionBox ) ); - NW_ASSERT( gdiFont ); - font = ( CFont* )aDeviceContext->GetScaledCFont( gdiFont ); - NW_ASSERT( font ); - - // Get character extents. - aExtent->width = (NW_GDI_Metric_t)font->MaxNormalCharWidthInPixels(); - aExtent->height = (NW_GDI_Metric_t)font->HeightInPixels(); - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::DrawText -// Draws the text in the box, the text being the file name selected, if any. -// @param aThisObj Ptr to the OOC class structure for this class. -// @param aFileSelectionBox Ptr to OOC box to which this skin belongs. -// @param aDeviceContect Ptr to GDI device context to use for drawing. -// @param aImageSize Ptr to image size. -// @param aDir Direction of drawing, LTR or RTL. -// @return Browser status code, indicating status of operation. -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_FBox_FileSelectionBoxSkin_DrawText( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_FBox_FileSelectionBox_t* aFileSelectionBox, - CGDIDeviceContext* aDeviceContext, - NW_GDI_Dimension3D_t* aImageSize, - NW_GDI_FlowDirection_t aDir ) - { - NW_GDI_Point2D_t start; - const CFont* font; - CGDIFont* gdiFont; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_PropertyValue_t colorVal; - NW_GDI_Color_t oldFgColor; - NW_GDI_Dimension2D_t extent; - HBufC* displayText = NULL; - NW_Text_t* legacyText = NULL; - - // Parameter assertion block. - NW_ASSERT( aThisObj ); - NW_ASSERT( aFileSelectionBox ); - NW_ASSERT( aDeviceContext ); - NW_ASSERT( aImageSize ); - - // Get ALL items that will need to be restored in the "FINALLY" clause: - oldFgColor = aDeviceContext->ForegroundColor(); - - NW_TRY( status ) - { - NW_LMgr_Box_t* lmgrBox = NW_LMgr_BoxOf( aFileSelectionBox ); - - // Get box's font. - gdiFont = NW_LMgr_Box_GetFont( lmgrBox ); - NW_ASSERT( gdiFont ); - font = (CFont*)aDeviceContext->GetScaledCFont( gdiFont ); - NW_ASSERT( font ); - - // Get and set the box foreground color. - colorVal.integer = 0; - NW_LMgr_Box_GetPropertyValue( lmgrBox, NW_CSS_Prop_color, - NW_CSS_ValueType_Color, &colorVal ); - aDeviceContext->SetForegroundColor( ( NW_GDI_Color_t ) colorVal.integer ); - - // Get start coordinates. - NW_LMgr_Box_GetInnerRectangle( lmgrBox, &innerRect ); - start = innerRect.point; - - // Text set every time in order to truncate according to current - // settings. Note, GetDisplayText() may need to allocate a new - // buffer for the truncated text. If that happens, the returned - // descriptor will point to the new buffer, which will need to be - // deallocated below when it is no longer needed. - status = NW_FBox_FileSelectionBoxSkin_GetDisplayText( aThisObj, - aDir, aImageSize, *font, &innerRect, &displayText ); - _NW_THROW_ON_ERROR( status ); - - if ( displayText ) - { - if ( displayText->Length() ) - { - // Convert from Symbian data structure to legacy data - // structure. For efficiency, this was delayed as long as - // possible but now it's needed. Unfortunately, this will - // allocate another buffer for the text. - legacyText = (NW_Text_t*)NW_Text_UCS2_New( - (NW_Ucs2*)(displayText->Ptr()), - displayText->Length(), - NW_Text_Flags_NullTerminated ); - NW_THROW_OOM_ON_NULL( legacyText, status ); - - // Get extents. - status = aDeviceContext->GetTextExtent( legacyText, gdiFont, 0, aDir, &extent ); - _NW_THROW_ON_ERROR( status ); - - // If RTL, change drawing coordinates. - if ( aDir == NW_GDI_FlowDirection_RightLeft ) - { - start.x = innerRect.point.x + innerRect.dimension.width - extent.width; - } - status = aDeviceContext->DrawText( &start, legacyText, gdiFont, 0, - NW_GDI_TextDecoration_None, aDir, extent.width ); - _NW_THROW_ON_ERROR( status ); - } - } - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - // Free any allocated resources. - delete displayText; - NW_Object_Delete( legacyText ); - - // Restore fg color. - aDeviceContext->SetForegroundColor( oldFgColor ); - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::NW_FBox_FileSelectionBoxSkin -// OOC constructor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Construct( - NW_Object_Dynamic_t* aDynamicObject, - va_list* aArgp ) - { - TBrowserStatusCode status; - NW_FBox_FileSelectionBoxSkin_t* thisObj; - - // For convenience. - thisObj = NW_FBox_FileSelectionBoxSkinOf( aDynamicObject ); - - // Invoke superclass constructor. - status = _NW_FBox_Skin_Construct( aDynamicObject, aArgp ); - if ( status != KBrsrSuccess ) - { - return status; - } - - // Init member variables. - thisObj->iFullFileName = NULL; - thisObj->iFileNameAndExt.Set( NULL, 0 ); - - return KBrsrSuccess; - } - -// Destructor -void -_NW_FBox_FileSelectionBoxSkin_Destruct( NW_Object_Dynamic_t* aDynamicObject ) - { - NW_FBox_FileSelectionBoxSkin_t* thisObj; - - // For convenience. - thisObj = NW_FBox_FileSelectionBoxSkinOf( aDynamicObject ); - - delete thisObj->iFullFileName; - thisObj->iFullFileName = NULL; - thisObj->iFileNameAndExt.Set( NULL, 0 ); - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::Draw -// Draws the box, including border, icon, and text of file name. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Draw( - NW_FBox_Skin_t* aSkin, - NW_LMgr_Box_t* aLmgrBox, - CGDIDeviceContext* aDeviceContext, - NW_Uint8 aHasFocus ) - { - NW_FBox_FileSelectionBox_t* fileSelectionBox; - NW_FBox_FileSelectionBoxSkin_t* thisObj; - NW_GDI_Rectangle_t innerRectangle; - NW_GDI_Point2D_t imagePoint; - NW_GDI_Dimension3D_t imageSize; - NW_LMgr_RootBox_t* rootBox; - NW_Image_AbstractImage_t* image; - NW_GDI_FlowDirection_t dir; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aSkin, &NW_FBox_FileSelectionBoxSkin_Class ) ); - NW_ASSERT( NW_Object_IsInstanceOf( aLmgrBox, &NW_FBox_FileSelectionBox_Class ) ); - NW_ASSERT( aDeviceContext ); - - // For convenience. - fileSelectionBox = NW_FBox_FileSelectionBoxOf( aLmgrBox ); - NW_ASSERT( fileSelectionBox ); - thisObj = NW_FBox_FileSelectionBoxSkinOf( aSkin ); - NW_ASSERT( thisObj ); - - NW_TRY( status ) - { - // Standard paint mode. - aDeviceContext->SetPaintMode( NW_GDI_PaintMode_Copy ); - - // Let base class draw the box -- borders, padding, background color, etc. - status = _NW_LMgr_Box_Draw( aLmgrBox, aDeviceContext, aHasFocus ); - _NW_THROW_ON_ERROR( status ); - - // Get root box. - rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf( fileSelectionBox ) ); - NW_ASSERT( rootBox ); - - // Get image from set of canned images. - NW_ASSERT( rootBox->cannedImages ); - image = CONST_CAST( NW_Image_AbstractImage_t*, - NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_SelectFile ) ); - NW_THROW_ON_NULL( image, status, KBrsrFailure ); - - // Get image size. - status = NW_Image_AbstractImage_GetSize( image, &imageSize ); - _NW_THROW_ON_ERROR( status ); - - // Get current direction. - NW_FBox_FileSelectionBoxSkin_GetDirection( aLmgrBox, &dir ); - - // Draw text first. - status = NW_FBox_FileSelectionBoxSkin_DrawText( thisObj, fileSelectionBox, - aDeviceContext, &imageSize, dir ); - _NW_THROW_ON_ERROR( status ); - - // ========================================== - // Position image within the inner rectangle. - // ========================================== - - // Get inner rectangle. - status = NW_LMgr_Box_GetInnerRectangle( aLmgrBox, &innerRectangle ); - _NW_THROW_ON_ERROR( status ); - - // In x dimension, position image to either side; depends on direction. - if ( dir == NW_GDI_FlowDirection_RightLeft ) - { - imagePoint.x = innerRectangle.point.x; - } - else - { - imagePoint.x = ( NW_GDI_Metric_t ) ( innerRectangle.point.x - + innerRectangle.dimension.width - imageSize.width ); - } - // In y dimension, center image. - if ( innerRectangle.dimension.height > imageSize.height ) - { - imagePoint.y = ( NW_GDI_Metric_t ) ( innerRectangle.point.y - + ((innerRectangle.dimension.height - imageSize.height) / 2) ); - } - else - { - imagePoint.y = ( NW_GDI_Metric_t ) innerRectangle.point.y; - } - - // Draw image. - status = NW_Image_AbstractImage_Draw( image, aDeviceContext, &imagePoint ); - _NW_THROW_ON_ERROR( status ); - - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetBaseline -// Gets the baseline for the content of this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_GDI_Metric_t -_NW_FBox_FileSelectionBoxSkin_GetBaseline(NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_LMgr_Box_t* aLmgrBox ) - { - TBrowserStatusCode status; - CGDIFont* font; - NW_GDI_Metric_t baseline; - - NW_REQUIRED_PARAM( aThisObj ); - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBoxSkin_Class ) ); - NW_ASSERT( NW_Object_IsInstanceOf( aLmgrBox, &NW_FBox_FileSelectionBox_Class ) ); - - // Set font to match parent. - font = NW_LMgr_Box_GetFont( aLmgrBox ); - if ( font ) - { - TGDIFontInfo fontInfo; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_GDI_Dimension3D_t imageSize; - - status = font->GetFontInfo( &fontInfo ); - NW_ASSERT( status == KBrsrSuccess ); - - // Get padding and border width. - NW_LMgr_Box_GetPadding( aLmgrBox, &padding, ELMgrFrameTop ); - NW_LMgr_Box_GetBorderWidth( aLmgrBox, &borderWidth, ELMgrFrameTop ); - - // Get size of file-selection icon. - status = NW_FBox_FileSelectionBoxSkin_GetImageSize( - NW_FBox_FileSelectionBoxOf( aLmgrBox ), &imageSize ); - NW_ASSERT( status == KBrsrSuccess ); - if ( status == KBrsrSuccess ) - { - // Use bigger of font baseline or image height and then adjust - // for border and padding. - baseline = (NW_GDI_Metric_t)((fontInfo.baseline > imageSize.height) - ? fontInfo.baseline : imageSize.height) + borderWidth.top + padding.top; - } - else - { - // Unable to get icon size so font baseline is used, adjusted - // for border and padding. - baseline = fontInfo.baseline + borderWidth.top + padding.top; - } - } - else - { - // Unable to get FontInfo so box height is used. - baseline = NW_LMgr_Box_GetFormatBounds( aLmgrBox ).dimension.height; - } - - return baseline; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::GetSize -// Gets the size (width & height) needed for the content. The returned width is -// bounded by the display width, adjusted for padding. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_GetSize( - NW_FBox_Skin_t* aSkin, - NW_LMgr_Box_t* aLmgrBox, - NW_GDI_Dimension3D_t* aSize ) - { - NW_FBox_FileSelectionBox_t* fileSelectionBox; - NW_Uint16 desiredTextAreaWidthInChars; - NW_GDI_Metric_t maxWidth; - NW_GDI_Metric_t desiredTextAreaWidthInPixels; - NW_GDI_Dimension2D_t charExtent; - NW_GDI_Dimension3D_t imageSize; - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - NW_REQUIRED_PARAM( aSkin ); - - // Parameter assertion block. - NW_ASSERT( aSkin ); - NW_ASSERT( aSize ); - NW_ASSERT( NW_Object_IsInstanceOf( aLmgrBox, &NW_FBox_FileSelectionBox_Class ) ); - - NW_TRY( status ) - { - // For convenience. - fileSelectionBox = NW_FBox_FileSelectionBoxOf( aLmgrBox ); - - // Set to zero as default in case error occurs. - aSize->width = 0; - aSize->height = 0; - - // Get device context. - deviceContext = NW_LMgr_RootBox_GetDeviceContext( NW_LMgr_Box_GetRootBox( aLmgrBox ) ); - NW_ASSERT( deviceContext ); - - // Get display bounds. - rectangle = deviceContext->DisplayBounds(); - - // Get max char extents. - status = NW_FBox_FileSelectionBoxSkin_GetMaxCharExtent( - fileSelectionBox, deviceContext, &charExtent ); - _NW_THROW_ON_ERROR( status ); - - // Get size of file-selection icon. - status = NW_FBox_FileSelectionBoxSkin_GetImageSize( - fileSelectionBox, &imageSize ); - _NW_THROW_ON_ERROR( status ); - - // Get padding and border width. - NW_LMgr_Box_GetPadding( aLmgrBox, &padding, ELMgrFrameLeft|ELMgrFrameRight ); - NW_LMgr_Box_GetBorderWidth( aLmgrBox, &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - - aSize->height = ( NW_GDI_Metric_t ) ( charExtent.height ); - // Height must not be smaller than the icon height. - if ( aSize->height < imageSize.height ) - { - aSize->height = imageSize.height; - } - - // Max width is bounded by display width, adjusted for padding and borders. - maxWidth = rectangle->dimension.width - padding.left - padding.right - - borderWidth.left - borderWidth.right; - - // Determine the width based on desired width. A desired width of 0 - // indicates to use width of the display, adjusted for borders, etc. - desiredTextAreaWidthInChars = - NW_FBox_FileSelectionBox_GetDesiredTextAreaWidthInChars( fileSelectionBox ); - - CGDIFont* font = NW_LMgr_Box_GetFont(aLmgrBox); - - desiredTextAreaWidthInPixels = (NW_GDI_Metric_t)desiredTextAreaWidthInChars - * font->GetAverageCharWidthInPixels(); - - if ( desiredTextAreaWidthInPixels ) - { - aSize->width = desiredTextAreaWidthInPixels + KImageHorizontalPadding - + imageSize.width; - if ( aSize->width > maxWidth ) - { - aSize->width = maxWidth; - } - } - else - { - aSize->width = maxWidth; - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::Reset -// Resets this box; i.e., resets the value of the filename to an empty string -// but does not redraw the field. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Reset( NW_FBox_FileSelectionBoxSkin_t* aThisObj ) - { - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBoxSkin_Class ) ); - - // Clear the field. - if ( aThisObj->iFullFileName ) - { - TPtr ptrBuf( aThisObj->iFullFileName->Des() ); - ptrBuf.Zero(); - // For legacy text handling, always keep a null on end of string. - ptrBuf.ZeroTerminate(); - } - aThisObj->iFileNameAndExt.Set( NULL, 0 ); - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::SetActive -// Sets this box to be the active box, which launches the file-selection dialogs. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_SetActive( NW_FBox_FileSelectionBoxSkin_t* aThisObj ) - { - TInt err = KErrNone; - TBool selected = EFalse; - TBool useNewBuf; - HBufC* buf = NULL; - TPtrC ptrPath( NULL, 0 ); - TPtrC ptrRoot( NULL, 0 ); - TPtrC ptrMostRecentPath( NULL, 0 ); - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBoxSkin_Class ) ); - - NW_FBox_FileSelectionBox_t* fileSelectionBox = NW_FBox_FileSelectionBoxSkin_GetFileSelectionBox( aThisObj ); - NW_FBox_FormLiaison_t* formLiaison = NW_FBox_FormBox_GetFormLiaison(fileSelectionBox); - - NW_TRY( status ) - { - // If there is already a file selected for this field then use that as - // starting point. - if ( aThisObj->iFullFileName && aThisObj->iFileNameAndExt.Length() ) - { - ptrMostRecentPath.Set( aThisObj->iFullFileName->Des() ); - } - // Else check for existing form-liaison path. - else - { - NW_FBox_FileSelectionBox_t* fileSelectionBox = - NW_FBox_FileSelectionBoxSkin_GetFileSelectionBox( aThisObj ); - NW_FBox_FormLiaison_t* formLiaison = - NW_FBox_FormBox_GetFormLiaison( fileSelectionBox ); - status = NW_FBox_FormLiaison_GetMostRecentFileSelectionPath( - formLiaison, ptrMostRecentPath ); - _NW_THROW_ON_ERROR( status ); - } - - // If a recent path exists, use that as the starting point. - if ( ptrMostRecentPath.Length() ) - { - TParsePtrC fileNameParser( ptrMostRecentPath ); - ptrPath.Set( fileNameParser.DriveAndPath() ); - } - - // Get dialog provider. - NW_LMgr_Box_t* lmgrBox = NW_LMgr_BoxOf( fileSelectionBox ); - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( lmgrBox ); - MBoxTreeListener* listener = NW_LMgr_RootBox_GetBoxTreeListener( rootBox ); - NW_ASSERT(listener); - MBrCtlDialogsProvider* dialogProvider = ((CView*)listener)->BrCtl()->brCtlDialogsProvider(); - - // Launch the file-selection dialog. - TRAP( err, - selected = dialogProvider->DialogFileSelectLC( - ptrPath, ptrRoot, buf ); - if ( buf ) - CleanupStack::Pop(); // buf - else - CleanupStack::PopAndDestroy(); - ); - - if ( err ) - { - // Map the system error to browser error: out-of-memory or failure. - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - - // Delegate the ECMA onBlur event when the file selection dialog is closed. - // Note, error is ignored. But why?!!! - (void)NW_FBox_FormLiaison_DelegateEcmaEvent( formLiaison, - NW_FBox_FormBox_GetFormCntrlID(fileSelectionBox), - NW_Ecma_Evt_OnBlur ); -// _NW_THROW_ON_ERROR( status ); - - // If no file selected, nothing else to do. The value is unchanged. - if ( selected == EFalse ) - { - NW_THROW_STATUS( status, KBrsrSuccess ); - } - - // The buffer is an HBufC, which is a 'constant' class. However, it is - // on the heap and is modifiable if accessed through its pointer. - TPtr ptrNewBuf( buf->Des() ); - - // If the user selected the same file as the last time (i.e., the value - // hasn't changed) then nothing else to do. - if ( aThisObj->iFullFileName ) - { - if ( ptrNewBuf.Compare( aThisObj->iFullFileName->Des() ) == 0 ) - { - NW_THROW_STATUS( status, KBrsrSuccess ); - } - } - - // ============================= - // Conserve on memory usage. - // ============================= - - // Clear file name and extension for now. - aThisObj->iFileNameAndExt.Set( NULL, 0 ); - - // Re-use old file-name buffer if it is big enough. - useNewBuf = ETrue; // assume using a new buffer - if ( aThisObj->iFullFileName ) - { - TPtr ptrOldBuf( aThisObj->iFullFileName->Des() ); - if ( ptrOldBuf.MaxSize() >= ptrNewBuf.Size() ) - { - useNewBuf = EFalse; - // Copy newly selected file-name into old buffer. - ptrOldBuf.Copy( ptrNewBuf ); - } - } - - // If using new buffer, delete old one and save reference to new one. - if ( useNewBuf ) - { - delete aThisObj->iFullFileName; - aThisObj->iFullFileName = buf; - buf = NULL; - } - - // Re-allocate buffer that is in use if it's wasting too much space. - TPtr tmp( aThisObj->iFullFileName->Des() ); - if ( (tmp.MaxSize() - tmp.Size()) > KFileNameWasteThreshold ) - { - // +2 for 2-byte NULL terminator - aThisObj->iFullFileName = aThisObj->iFullFileName->ReAlloc( tmp.Size() + 2 ); - NW_THROW_OOM_ON_NULL( aThisObj->iFullFileName, status ); - } - TPtr tmpNew( aThisObj->iFullFileName->Des() ); - // Always zero terminate in order to allow for legacy text handling. - tmpNew.ZeroTerminate(); - - // Extract the name and extension from the fully-qualified file name. - TPtrC ptr( aThisObj->iFullFileName->Des() ); - TParsePtrC fileNameParser( ptr ); - aThisObj->iFileNameAndExt.Set( fileNameParser.NameAndExt() ); - - // ============================= - // Re-draw. - // ============================= - CGDIDeviceContext* deviceContext = - NW_LMgr_RootBox_GetDeviceContext( rootBox ); - - // Have the skin class draw the box, passing TRUE to indicate focus. - status = _NW_FBox_FileSelectionBoxSkin_Draw( - NW_FBox_SkinOf( aThisObj ), lmgrBox, deviceContext, NW_TRUE ); - _NW_THROW_ON_ERROR( status ); - - // Make the draw happen now. - deviceContext->PostDraw( ETrue ); - - // Delegate the ECMA onChange event when a different file is selected. - status = NW_FBox_FormLiaison_DelegateEcmaEvent( formLiaison, - NW_FBox_FormBox_GetFormCntrlID(fileSelectionBox), - NW_Ecma_Evt_OnChange ); - _NW_THROW_ON_ERROR( status ); - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - delete buf; - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::Split -// Checks to see if this box needs to be split and if so, "splits" it; however, -// this box cannot be split. It is moved to a new line if not already on one. -// That is the best that can be done to split this box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_FBox_FileSelectionBoxSkin_Split( - NW_FBox_FileSelectionBoxSkin_t* aThisObj, - NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, - NW_Uint8 aFlags ) - { - NW_LMgr_Box_t* lmgrBox; - NW_FBox_FormBox_t* formBox; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( aThisObj, &NW_FBox_FileSelectionBoxSkin_Class ) ); - NW_ASSERT( aSplitBox ); - - formBox = NW_FBox_Skin_GetFormBox( NW_FBox_SkinOf( aThisObj ) ); - NW_ASSERT( formBox ); - lmgrBox = NW_LMgr_BoxOf( formBox ); - NW_ASSERT( NW_Object_IsInstanceOf( lmgrBox, &NW_FBox_FileSelectionBox_Class ) ); - - *aSplitBox = NULL; - - // If box does not fit in the space and the box is not on the new line then - // the input box needs to be pushed on the new line. - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( lmgrBox ); - if ( ( boxBounds.dimension.width > aSpace ) - && !( aFlags & NW_LMgr_Box_SplitFlags_AtNewLine ) ) - { - return KBrsrLmgrNoSplit; - } - - if ( boxBounds.dimension.width <= aSpace ) - { - return KBrsrSuccess; - } - - boxBounds.dimension.width = aSpace; - NW_LMgr_Box_SetFormatBounds( lmgrBox, boxBounds ); - - return KBrsrSuccess; - } - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FileSelectionBoxSkin::New -// Creates a new instance of this box skin class. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_FBox_FileSelectionBoxSkin_t* -NW_FBox_FileSelectionBoxSkin_New( NW_FBox_FormBox_t* aFormBox ) - { - NW_ASSERT( aFormBox ); - return ( NW_FBox_FileSelectionBoxSkin_t* ) - NW_Object_New( &NW_FBox_FileSelectionBoxSkin_Class, aFormBox ); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXFormBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXFormBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,272 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_formboxi.h" -#include "nw_fbox_inputskin.h" -#include "nw_fbox_selectskin.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_clearaction.h" -#include "BrsrStatusCodes.h" -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_FormBox_Class_t NW_FBox_FormBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_ActiveBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_FormBox_t), - /* construct */ _NW_FBox_FormBox_Construct, - /* destruct */ _NW_FBox_FormBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_FormBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ NULL, - /* initInteractor */ NULL, - /* reset */ _NW_FBox_FormBox_Reset - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_FormBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_FormBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_FormBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_ActiveBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - thisObj->formCntrlId = va_arg (*argp, void*); - thisObj->formLiaison = va_arg (*argp, NW_FBox_FormLiaison_t*); - thisObj->skin = NW_FBox_FormBox_InitSkin(thisObj); - if (thisObj->skin == NULL) - { - NW_LMgr_ActiveBoxOf(thisObj)->eventHandler = NULL; - return KBrsrOutOfMemory; - } - if (NW_Object_IsInstanceOf(thisObj->skin, &NW_FBox_SelectSkin_Class)) - { - NW_FBox_SelectSkinOf(thisObj->skin)->hasFormBox = NW_TRUE; - } - thisObj->interactor = NW_FBox_FormBox_InitInteractor(thisObj); - /* successful completion */ - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ -void -_NW_FBox_FormBox_Destruct(NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_FormBox_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_FormBoxOf (dynamicObject); - - /* Destroy the skin */ - if(thisObj->skin != NULL){ - if (NW_Object_IsInstanceOf(thisObj->skin, &NW_FBox_SelectSkin_Class)) - { - NW_FBox_SelectSkinOf(thisObj->skin)->hasFormBox = NW_FALSE; - NW_FBox_SelectSkin_Release(NW_FBox_SelectSkinOf(thisObj->skin)); - } - else - { - NW_Object_Delete(thisObj->skin); - } - } - - /* Destroy the skin */ - if(thisObj->interactor != NULL){ - NW_Object_Delete(thisObj->interactor); - } -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_FormBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_FormBox_t* formBox; - - formBox = NW_FBox_FormBoxOf(box); - - return NW_FBox_Skin_Draw(formBox->skin, box, deviceContext, hasFocus); -} - -/* --------------------------------------------------------------------------*/ -NW_GDI_Metric_t -_NW_FBox_FormBox_GetBaseline (NW_LMgr_Box_t* box) -{ - NW_LMgr_FrameInfo_t padding; - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - - return NW_LMgr_Box_GetFormatBounds(box).dimension.height - padding.top - padding.bottom; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_FormBox_Resize (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t padding; - NW_GDI_Dimension2D_t size; - NW_REQUIRED_PARAM(context); - NW_TRY(status) { - /* Get the box info */ - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - - status = NW_LMgr_Box_GetMinimumContentSize(box, &size); - NW_THROW_ON_ERROR(status); - // - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - boxBounds.dimension.height = (NW_GDI_Metric_t)(size.height + - borderWidth.bottom + - borderWidth.top + - padding.bottom + - padding.top); - boxBounds.dimension.width = (NW_GDI_Metric_t)(size.width + - borderWidth.left + - borderWidth.right + - padding.left + - padding.right); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - if (NW_Object_IsClass(box, &NW_FBox_InputBox_Class)) - { - NW_FBox_Skin_t* skin; - NW_FBox_InputSkin_t* inputSkin; - skin = NW_FBox_FormBox_GetSkin(box); - inputSkin= NW_FBox_InputSkinOf(skin); - (void) NW_FBox_InputSkin_SetDisplayText(inputSkin); - } - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } NW_END_TRY; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_FormBox_GetMinimumContentSize (NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t* size) -{ - NW_FBox_Skin_t* skin; - NW_GDI_Dimension3D_t formSize; - - NW_TRY(status) { - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class)); - NW_ASSERT (size != NULL); - - /* Get text entent of masterString to set minimum height */ - skin = NW_FBox_FormBox_GetSkin(box); - status = NW_FBox_Skin_GetSize (skin, box, &formSize); - NW_THROW_ON_ERROR(status); - - size->height = formSize.height; - size->width = formSize.width; - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } NW_END_TRY; -} - -/* --------------------------------------------------------------------------*/ -NW_Bool -_NW_FBox_FormBox_HasFixedContentSize(NW_LMgr_Box_t *box) -{ - NW_REQUIRED_PARAM(box); - return NW_TRUE; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_FormBox_Reset (NW_FBox_FormBox_t* thisObj) -{ - TBrowserStatusCode status; - NW_FBox_FormLiaison_t* formLiaison; - void* formControlId; - - formControlId = NW_FBox_FormBox_GetFormCntrlID(thisObj); - formLiaison = NW_FBox_FormBox_GetFormLiaison(NW_FBox_FormBoxOf(thisObj)); - - /* set the value to NULL */ - status = NW_FBox_FormLiaison_SetStringValue(formLiaison, formControlId, NULL); - if (status != KBrsrSuccess) { - NW_Bool value = NW_FALSE; - // radio box check has to be before checkbox; - if ( NW_Object_IsInstanceOf(thisObj, &NW_FBox_RadioBox_Class) ) - { - // because original reset doesn't work for the case where by default no radio checked; - // ResetRadioValue method is dedicating to reset radio value only - value = NW_FBox_FormLiaison_GetInitialValue(formLiaison, formControlId); - status = NW_FBox_FormLiaison_ResetRadioValue(formLiaison, formControlId, &value); - } - else if ( NW_Object_IsInstanceOf(thisObj, &NW_FBox_CheckBox_Class) ) - { - value = NW_FBox_FormLiaison_GetInitialValue(formLiaison, formControlId); - status = NW_FBox_FormLiaison_SetBoolValue( formLiaison, formControlId, &value ); - } - } - - return status; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXFormBoxUtils.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXFormBoxUtils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_formboxutils.h" -#include "nwx_defs.h" -#include "nwx_string.h" -#include "nw_fbox_formbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - private data typed - * ------------------------------------------------------------------------- */ - -const NW_Ucs2 EscapeChar = '\\'; -const NW_Ucs2 NW_FBox_FormBoxUtils_Truncate[] = {'.','.','.','\0'}; -const NW_Ucs2 NW_FBox_FormBoxUtils_TrueStr[] = { 't', 'r', 'u', 'e', '\0' }; -const NW_Ucs2 NW_FBox_FormBoxUtils_FalseStr[] = { 'f', 'a', 'l', 's', 'e', '\0' }; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_FormBoxUtils_GetDisplayLength(CGDIDeviceContext* deviceContext, - NW_Text_t* text, - CGDIFont* font, - NW_Text_Length_t totalLength, - NW_Uint16 width, - NW_Text_Length_t* displayLength, - NW_Bool isNumber) - { - NW_GDI_Dimension2D_t extent; - NW_GDI_Dimension2D_t truncate_extent; - NW_Text_UCS2_t* truncate_text; - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool OverFlow = NW_FALSE; - NW_Text_Length_t i; - NW_Text_Length_t start = 0; - truncate_text = NW_Text_UCS2_New ((NW_Ucs2*) NW_FBox_FormBoxUtils_Truncate, - NW_FBox_FormBoxUtils_Truncate_len, - 0); - if (truncate_text == NULL) - { - return KBrsrOutOfMemory; - } - status = deviceContext->GetTextExtent ( NW_TextOf(truncate_text), - font, - 0, - NW_GDI_FlowDirection_LeftRight, - &truncate_extent); - if (status != KBrsrSuccess) - { - NW_Object_Delete(truncate_text); - return status; - } - - NW_Object_Delete(truncate_text); - extent.width = 0; - extent.height = 0; - for (i=1; i<=totalLength; i++) - { - if(isNumber) - { - start = (NW_Text_Length_t) (totalLength - i); - } - status = deviceContext->GetSubstringExtent( text, - font, - start, - i, - 0, - NW_GDI_FlowDirection_LeftRight, - &extent ); - if (status != KBrsrSuccess) - { - return status; - } - if(!OverFlow) - { - if(extent.width > width) - { - if(i > 3) - { - i = (NW_Text_Length_t) (i - 3); - } - else - { - i = 0; - } - OverFlow = NW_TRUE; - } - continue; - } - else if ((extent.width + truncate_extent.width) > width) - { - break; - } - } - *displayLength = --i; - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DocumentRoot_t * -NW_FBox_FormBoxUtils_GetDocRoot(NW_LMgr_Box_t* box) -{ - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_FBox_FormLiaison_t *fboxFormLiaison = NULL; - NW_ASSERT(box != NULL); - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class)); - fboxFormLiaison = NW_FBox_FormBox_GetFormLiaison (box); - (void) NW_FBox_FormLiaison_GetDocRoot(fboxFormLiaison, &docRoot ); - return docRoot; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint16 -NW_FBox_FormBoxUtils_GetNumEscapeChars(const NW_Ucs2* format) -{ - NW_Uint16 numEscapeChars = 0; - if((!format) || (!*format)) - { - return numEscapeChars; - } - while(*format) - { - if((*format == EscapeChar) && *(format + 1)) - { - numEscapeChars++; - format++; - } - format++; - } - return numEscapeChars; -} - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_FormBoxUtils_FillEscapeChars(const NW_Ucs2* format, NW_Ucs2 *input, - NW_Ucs2 *retValue, NW_Uint16 retValueLen) -{ - if( (!format) || (!*format) || (!input)) - { - return; - } - while(*format && retValueLen) - { - if((*format == EscapeChar) && *(format + 1)) - { - format++; - *retValue = *format; - retValue++; - } - else if (*input) - { - *retValue = *input; - retValue++; - input++; - } - else - { - break; - } - format++; - retValueLen --; - } - while(*input && retValueLen) - { - /*lint --e{794} Conceivable use of null pointer*/ - - *retValue = *input; - retValue++; - input++; - retValueLen --; - } -} - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_FormBoxUtils_StripEscapeChars(const NW_Ucs2* format, NW_Ucs2 *input, - NW_Ucs2 *retValue, NW_Uint16 retValueLen) -{ - if( (!format) || (!*format) || (!input)) - { - return; - } - while(*format && *input && retValueLen) - { - if((*format == EscapeChar) && *(format + 1)) - { - format += 2; - } - else - { - *retValue = *input; - retValue++; - format++; - retValueLen --; - } - input++; - } - while(*input && retValueLen) - { - *retValue = *input; - retValue++; - input++; - retValueLen --; - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXFormLiaison.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXFormLiaison.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32std.h> -#include "nw_fbox_formliaisoni.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_FormLiaison_Class_t NW_FBox_FormLiaison_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_FormLiaison_t), - /* construct */ NULL, - /* destruct */ _NW_FBox_FormLiaison_Destruct - }, - { /* NW_FBox_FormLiaison */ - /* getWBXMLVersion */ NULL, - /* addControl */ NULL, - /* setInitialStringValue */ NULL, - /* setStringValue */ NULL, - /* validateStringValue */ NULL, - /* getStringValue */ NULL, - /* getStringName */ NULL, - /* getStringTitle */ NULL, - /* setBoolValue */ NULL, - /* toggleBoolValue */ NULL, - /* getBoolValue */ NULL, - /* reset */ NULL, - /* submit */ NULL, - /* isOptionMultiple */ NULL, - /* isOptionSelected */ NULL, - /* optionHasOnPick */ NULL, - /* isLocalNavOnPick */ NULL, - /* getInitialValue */ NULL, - /* getDocRoot */ NULL, - /* delegateEcmaEvent */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -void -_NW_FBox_FormLiaison_Destruct( NW_Object_Dynamic_t* aDynamicObject ) - { - NW_FBox_FormLiaison_t* thisObj; - - // Parameter assertions. - NW_ASSERT( NW_Object_IsInstanceOf( aDynamicObject, - &NW_FBox_FormLiaison_Class) ); - - // For convenience. - thisObj = NW_FBox_FormLiaisonOf( aDynamicObject ); - - delete thisObj->iMostRecentFileSelectionPath; - } - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_FBox_FormLiaison::GetMostRecentFileSelectionPath -// Gets the most-recent-file-selection-path. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_FBox_FormLiaison_GetMostRecentFileSelectionPath( - NW_FBox_FormLiaison_t* aThisObj, TPtrC& aPath ) - { - // Parameter assertion block. - NW_ASSERT( aThisObj ); - - if ( aThisObj->iMostRecentFileSelectionPath ) - { - aPath.Set( *aThisObj->iMostRecentFileSelectionPath ); - } - else - { - aPath.Set( NULL, 0 ); - } - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_FBox_FormLiaison::SetMostRecentFileSelectionPath -// Sets the most-recent-file-selection-path. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_FBox_FormLiaison_SetMostRecentFileSelectionPath( - NW_FBox_FormLiaison_t* aThisObj, TPtrC& aPath ) - { - // Parameter assertion block. - NW_ASSERT( aThisObj ); - - // Allocate buffer if needed. - if ( !aThisObj->iMostRecentFileSelectionPath ) - { - aThisObj->iMostRecentFileSelectionPath = HBufC::New( KMaxFileName ); - if ( !aThisObj->iMostRecentFileSelectionPath ) - { - return KBrsrOutOfMemory; - } - } - - // Set the value. - TPtr ptrNewBuf( aThisObj->iMostRecentFileSelectionPath->Des() ); - ptrNewBuf.Copy( aPath ); - - return KBrsrSuccess; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXHiddenBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXHiddenBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_hiddenboxi.h" -#include "nw_fbox_inputskin.h" -#include "nw_fbox_inputinteractor.h" -#include "nw_fbox_inlineinputskin.h" -#include "nw_lmgr_rootbox.h" - - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_HiddenBox_Class_t NW_FBox_HiddenBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_InputBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_HiddenBox_t), - /* construct */ _NW_FBox_InputBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_InputBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_InputBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_InputBox_InitSkin, - /* initInteractor */ _NW_FBox_InputBox_InitInteractor, - /* reset */ _NW_FBox_InputBox_Reset - }, - {/* NW_FBox_InputBox */ - /* getHeight */ _NW_FBox_InputBox_GetHeight, - /* setHeight */ _NW_FBox_InputBox_SetHeight, - /* setDisplayText */ _NW_FBox_InputBox_SetDisplayText, - /* modifyBuffer */ _NW_FBox_InputBox_ModifyBuffer - }, - { /* NW_FBox_HiddenBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_FBox_HiddenBox_t* -NW_FBox_HiddenBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_HED_AppServices_t* appServices) -{ - return (NW_FBox_HiddenBox_t*) - NW_Object_New (&NW_FBox_HiddenBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, appServices); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXImageButtonBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXImageButtonBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,430 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_imagebuttonboxi.h" - -#include "nwx_string.h" -#include "nw_evt_activateevent.h" -#include "nw_fbox_imagebuttonboxskin.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" -#include "nw_image_virtualimage.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_ImageButtonBox_Class_t NW_FBox_ImageButtonBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* secondaryList */ _NW_FBox_ImageButtonBox_SecondaryList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_ImageButtonBox_t), - /* construct */ _NW_FBox_ImageButtonBox_Construct, - /* destruct */ _NW_FBox_ImageButtonBox_Destruct, - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_ImageButtonBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_ImageButtonBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_ImageButtonBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_ImageButtonBox_InitSkin, - /* initInteractor */ _NW_FBox_ImageButtonBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_ImageButtonBox*/ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Object_Class_t* const _NW_FBox_ImageButtonBox_SecondaryList[] = { - &_NW_FBox_ImageButtonBox_IEventListener_Class, - &_NW_LMgr_AnimatedImageButtonBoxAggregate_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_IEventListener_Class_t _NW_FBox_ImageButtonBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_ImageButtonBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_AnimatedImageAggregate_Class_t _NW_LMgr_AnimatedImageButtonBoxAggregate_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AnimatedImageAggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_FBox_ImageButtonBox_t, NW_LMgr_AnimatedImageAggregate) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NULL, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_LMgr_AnimatedImageAggregate*/ - /* animate */ _NW_LMgr_AnimatedImageAggregate_Animate, - /* getImage */ _NW_FBox_ImageButtonBox_AnimatedImageAggregate_GetImage - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_ImageButtonBox_t* thisObj; - TBrowserStatusCode status; - NW_Text_UCS2_t* label; - static const NW_Ucs2 noText[] = {'\0'}; - - /* for convenience */ - thisObj = NW_FBox_ImageButtonBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - - thisObj->value = va_arg (*argp, NW_Text_t*); - thisObj->image = va_arg (*argp, NW_Image_AbstractImage_t*); - - - if (thisObj->value == NULL) { - label = NULL; - label = NW_Text_UCS2_New((NW_Ucs2*) noText, NW_Str_Strlen(noText), 0); - thisObj->value = NW_TextOf(label); - } - else - { - NW_Ucs2* storage = NULL; - NW_Bool freeNeeded = NW_FALSE; - NW_Uint16 flags = 0; - NW_Text_Length_t len = 0; - - /* compress whitespaces */ - flags = NW_Text_Flags_Aligned | NW_Text_Flags_Copy | NW_Text_Flags_NullTerminated; - flags |= NW_Text_Flags_CompressWhitespace; - storage = NW_Text_GetUCS2Buffer (thisObj->value, flags, &len, &freeNeeded); - if (storage == NULL){ - return KBrsrOutOfMemory; - } - status = NW_Text_SetStorage(thisObj->value, storage, len, freeNeeded); - } - - return status; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_ImageButtonBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_ImageButtonBox_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_ImageButtonBoxOf (dynamicObject); - - /* Destroy our text object */ - if(thisObj->value != NULL) - { - NW_Object_Delete(thisObj->value); - } - // destroy virtual image -do not destroy canned image though - if( NW_Object_IsInstanceOf( thisObj->image, &NW_Image_Virtual_Class ) == NW_TRUE ) - { - NW_Object_Delete( thisObj->image ); - } -} - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_Box */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_ImageButtonBox_t* thisObj; - NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate; - TBrowserStatusCode status; - - thisObj = NW_FBox_ImageButtonBoxOf (box); - - /* invoke our superclass draw method first */ - status = _NW_FBox_FormBox_Draw (box, deviceContext, hasFocus); - - /* support for animations. Note the method checks for animations also, i.e. - ImageButtonBox need not be concerned wether the image is animated or not - vishy */ - - /* Get the aggregate object */ - AnimatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t*) - NW_Object_QuerySecondary (thisObj, &NW_LMgr_AnimatedImageAggregate_Class); - status = NW_LMgr_AnimatedImageAggregate_Animate (AnimatedImageAggregate); - - return status; - -} - -/* ------------------------------------------------------------------------- */ -/* NW_FBox_FormBox */ -/* ------------------------------------------------------------------------- */ - -NW_FBox_Skin_t* -_NW_FBox_ImageButtonBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_ImageButtonBoxSkin_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Interactor_t* -_NW_FBox_ImageButtonBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - (void)formBox; - return NULL; -} - -/* --------------------------------------------------------------------------*/ - -NW_GDI_Metric_t -_NW_FBox_ImageButtonBox_GetBaseline (NW_LMgr_Box_t* box) - { - CGDIFont* font; - TGDIFontInfo fontInfo; - NW_FBox_ImageButtonBox_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_ImageButtonBox_Class)); - - /* for convenience */ - thisObj = NW_FBox_ImageButtonBoxOf (box); - - if ( thisObj->image ) - { - return NW_LMgr_Box_GetFormatBounds(box).dimension.height; - } - - /* Get the font info */ - font = NW_LMgr_Box_GetFont (box); - if (font != NULL) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - (void) font->GetFontInfo ( &fontInfo); - - /* Get the padding and the border width */ - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameTop ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameTop ); - - return (NW_GDI_Metric_t)(fontInfo.baseline + borderWidth.top + padding.top); - } - - /* unable to get the FontInfo we return our height */ - return NW_LMgr_Box_GetFormatBounds(box).dimension.height; -} - - -/* ------------------------------------------------------------------------- * - implemented interface/aggregate methods - * ------------------------------------------------------------------------- */ - -NW_Image_AbstractImage_t* -_NW_FBox_ImageButtonBox_AnimatedImageAggregate_GetImage (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate) -{ - NW_FBox_ImageButtonBox_t* thisObj; - - /* obtain the implementer */ - thisObj = (NW_FBox_ImageButtonBox_t*) NW_Object_Interface_GetImplementer (AnimatedImageAggregate); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_ImageButtonBox_Class)); - - return thisObj->image; -} - - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_ImageButtonBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) - { - NW_FBox_ImageButtonBox_t* thisObj; - NW_FBox_FormLiaison_t* formLiason; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_FBox_ImageButtonBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_ImageButtonBox_Class)); - - formLiason = NW_FBox_FormBox_GetFormLiaison( thisObj ); - - if ((NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) || - (NW_Object_Core_GetClass (event) == &NW_Evt_AccessKeyEvent_Class)) - { - // set the button active in order that we can send .x .y data - // at submit time - void* formControlId = NW_FBox_FormBox_GetFormCntrlID( thisObj ); - - // "on" is the keyword - NW_Ucs2 onStr[] = { 'o', 'n', 0 }; - NW_Text_t* onText = NW_Text_New( HTTP_iso_10646_ucs_2, onStr, - NW_Str_Strlen( onStr ), NW_Text_Flags_Copy ); - // cannot handle OOM properly - if( onText ) - { - // SetStringValue takes onText's ownership, unless it fails. - if( NW_FBox_FormLiaison_SetStringValue( formLiason, formControlId, onText ) - != KBrsrSuccess ) - { - NW_Object_Delete( onText ); - } - } - // notify of the click event, - // if the ECMAScript is supported and the element has OnClick attribute - // then the submit and reset function calls are handled after executing OnClick script. - status = NW_FBox_FormLiaison_DelegateEcmaEvent( formLiason, formControlId, NW_Ecma_Evt_OnClick ); - - if( status == KBrsrSuccess ) - { - return NW_LMgr_EventAbsorbed; - } - - /* all submit on form liason */ - (void)NW_FBox_FormLiaison_Submit( formLiason, NW_FBox_FormBox_GetFormCntrlID( thisObj ) ); - return NW_LMgr_EventAbsorbed; - } - else if(NW_Object_Core_GetClass(event) == &NW_Evt_FocusEvent_Class) { - return NW_LMgr_EventAbsorbed; - } - - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent (eventListener, event); - } - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_ImageButtonBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_ASSERT(box != NULL); - - *splitBox = NULL; - /* If box does not fit in the space and the box is not - on the new line the input box needs to be pushed on the new line */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.width > space) && !(flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - if(boxBounds.dimension.width <= space) - { - return KBrsrSuccess; - } - - /* we are more than space */ - - /* if width was specified we do not want to change it / - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess){ - return status; - }*/ - boxBounds.dimension.width = space; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; -} - - -/* --------------------------------------------------------------------------*/ -void -NW_LMgr_ImageButtonBox_ReplaceBrokenImage( NW_LMgr_Box_t* box, NW_Image_AbstractImage_t* image ) - { - NW_FBox_ImageButtonBox_t* thisObj; - - NW_ASSERT( box != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf ( box, &NW_FBox_ImageButtonBox_Class ) ); - - thisObj = NW_FBox_ImageButtonBoxOf( box ); - - // dont free canned image - // but replace it - thisObj->image = image; - } - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_FBox_ImageButtonBox_t* -NW_FBox_ImageButtonBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* value, - NW_Image_AbstractImage_t* image) -{ - return (NW_FBox_ImageButtonBox_t*) - NW_Object_New (&NW_FBox_ImageButtonBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison,value, image); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXImageButtonBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXImageButtonBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_imagebuttonboxskini.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_image_epoc32cannedimage.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -const -NW_FBox_ImageButtonBoxSkin_Class_t NW_FBox_ImageButtonBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_ImageButtonBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ _NW_FBox_ImageButtonBoxSkin_Draw, - /* NW_FBox_Skin_GetSize_t */ _NW_FBox_ImageButtonBoxSkin_GetSize - }, - { /* NW_FBox_ButtonBoxSkin */ - /* drawContent */ NULL - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_ImageButtonBoxSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_ImageButtonBoxSkin_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_ImageButtonBoxSkinOf(skin); - - /* Let the base class draw the box */ - (void) NW_LMgr_Box_Class.NW_LMgr_Box.draw(box, deviceContext, hasFocus); - - return NW_FBox_ImageButtonBoxSkin_DrawContent(thisObj, box, deviceContext, hasFocus); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_ImageButtonBoxSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) -{ - NW_FBox_ImageButtonBox_t* imageButtonBox; - NW_Text_t* value; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - CGDIFont* font; - TBrowserStatusCode status; - NW_GDI_Dimension2D_t textExtent; - NW_GDI_Dimension3D_t imgSize; - NW_GDI_Dimension3D_t textSize; - NW_LMgr_Property_t heightVal; - NW_LMgr_Property_t widthVal; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_ImageButtonBox_Class)); - - /* for convenience */ - imageButtonBox = NW_FBox_ImageButtonBoxOf (box); - (void)skin; - - /* Get the value */ - value = NW_FBox_ImageButtonBox_GetValue(imageButtonBox); - - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = NW_LMgr_Box_GetRootBox (box); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - - /* Get the font */ - font = NW_LMgr_Box_GetFont (box); - NW_ASSERT(font != NULL); - - /* calculate the extents */ - status = deviceContext->GetTextExtent ( value, - font, - 0, - NW_GDI_FlowDirection_LeftRight, - &textExtent); - if (status == KBrsrOutOfMemory) - { - return status; - } - - if ((value != NULL) && - !(NW_Object_IsInstanceOf(imageButtonBox->image, &NW_Image_Epoc32Canned_Class))) - { - textExtent.height = 0; - textExtent.width = 0; - } - - textSize.height = (NW_GDI_Metric_t)(textExtent.height); - textSize.width = (NW_GDI_Metric_t)(textExtent.width); - - if(imageButtonBox->image) - { - (void) NW_Image_AbstractImage_GetSize(imageButtonBox->image, &imgSize); - size->depth = imgSize.depth; - size->width = imgSize.width; - size->height = imgSize.height; - - if (textSize.width != 0) - { - size->width = (NW_GDI_Metric_t)(size->width + textSize.width); - if(imgSize.height > textSize.height) - { - size->height = imgSize.height; - } - else - { - size->height = textSize.height; - } - } - - /* If the image button has height and width properties, use those instead */ - heightVal.type = widthVal.type = 0; - heightVal.value.decimal = widthVal.value.decimal = 0; - - status = NW_LMgr_PropertyList_Get(box->propList, NW_CSS_Prop_width, &widthVal); - if (status == KBrsrSuccess) - { - size->width = widthVal.value.integer; - } - - status = NW_LMgr_PropertyList_Get(box->propList, NW_CSS_Prop_height, &heightVal); - if (status == KBrsrSuccess) - { - size->height = heightVal.value.integer; - } - - /* In vertical layout mode, we do not want the size of the image to be bigger than the display, - so we scale it */ - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - const NW_GDI_Rectangle_t* rectangle; - NW_GDI_Metric_t maxWidth = 0; - NW_GDI_Metric_t maxHeight = 0; - NW_LMgr_FrameInfo_t borderWidth; - - rectangle = deviceContext->DisplayBounds(); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - - maxWidth = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.left - padding.right - borderWidth.right - borderWidth.left - 6); - maxHeight = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.top - padding.bottom - borderWidth.top - borderWidth.bottom); - - if (size->width > maxWidth) - { - size->height = (NW_GDI_Metric_t)((maxWidth*size->height)/size->width); - size->width = maxWidth; - } - - if (size->height > maxHeight) - { - size->width = (NW_GDI_Metric_t)((maxHeight*size->width)/size->height); - size->height = maxHeight; - } - } - } - else - { - size->height = textSize.height; - size->width = textSize.width; - } - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXInputBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXInputBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,703 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_inputboxi.h" - -#include "nw_fbox_inputskin.h" -#include "nw_fbox_inputinteractor.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -//#include "nw_fbox_passwordbox.h" -#include "nw_hed_documentroot.h" -#include "nw_fbox_formboxutils.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" -#include "nw_wml1x_wml1xformliaison.h" -#include "wml_elm_attr.h" -#include "nw_wml_core.h" -#include "nw_wml1x_wml1xcontenthandler.h" - - -/* ------------------------------------------------------------------------- * - private data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_InputBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_InputBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_FBox_InputBox_InterfaceList[] = { - &_NW_FBox_InputBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_InputBox_Class_t NW_FBox_InputBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_InputBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_InputBox_t), - /* construct */ _NW_FBox_InputBox_Construct, - /* destruct */ _NW_FBox_InputBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_InputBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_InputBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_InputBox_InitSkin, - /* initInteractor */ _NW_FBox_InputBox_InitInteractor, - /* reset */ _NW_FBox_InputBox_Reset - }, - { /* NW_FBox_InputBox */ - /* getHeight */ _NW_FBox_InputBox_GetHeight, - /* setHeight */ _NW_FBox_InputBox_SetHeight, - /* setDisplayText */ _NW_FBox_InputBox_SetDisplayText, - /* modifyBuffer */ _NW_FBox_InputBox_ModifyBuffer - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_InputBox_t* thisObj; - TBrowserStatusCode status; - NW_FBox_FormLiaison_t* formLiaison; - void *controlId; - NW_Text_t* buffer; - NW_Bool initialValue = NW_FALSE; - - /* for convenience */ - thisObj = NW_FBox_InputBoxOf (dynamicObject); - buffer = NULL; - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->width = (NW_Uint16)va_arg (*argp, NW_Uint32); - thisObj->appServices = va_arg (*argp, NW_HED_AppServices_t*); - thisObj->title = NULL; - thisObj->validator = NULL; - thisObj->active = NW_FALSE; - thisObj->focus = NW_FALSE; - thisObj->maxChars = NW_FBox_InputBox_MaxCharacters; - thisObj->IsMaxlength = NW_FALSE; - thisObj->value = NULL; - - /* Get initial value from the form liaison */ - formLiaison = NW_FBox_FormBox_GetFormLiaison(thisObj); - controlId = NW_FBox_FormBox_GetFormCntrlID(thisObj); - (void) NW_FBox_FormLiaison_GetStringValue(formLiaison, controlId, &buffer, &initialValue); - thisObj->initialValueUsed = initialValue; - - if (buffer){ - NW_FBox_InputBox_SetDefaultVal(thisObj, buffer); - } - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_InputBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_InputBox_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_InputBoxOf (dynamicObject); - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputBox_Class)); - - /* Destroy our Value object */ - if(thisObj->value != NULL){ - NW_Object_Delete(thisObj->value); - } - if (thisObj->title != NULL) { - NW_Str_Delete(thisObj->title); - } - if (thisObj->validator != NULL) { - NW_Object_Delete(thisObj->validator); - } -} - -/* ------------------------------------------------------------------------- */ -NW_Uint16 -_NW_FBox_InputBox_GetHeight(NW_FBox_InputBox_t* box) -{ - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class)); - NW_REQUIRED_PARAM(box); - return 1; -} - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -void -_NW_FBox_InputBox_SetHeight(NW_FBox_InputBox_t* box, NW_Uint16 height) -{ - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class)); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(height); -// box->height = height; -} - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_FBox_InputBox_SetDisplayText(NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn) -{ - NW_FBox_InputSkin_t* skin; - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputBox_Class)); - NW_REQUIRED_PARAM(thisObj); - NW_REQUIRED_PARAM(bufferModificationOn); - skin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(thisObj)); - return NW_FBox_InputSkin_SetDisplayText(skin); -} - - -/* ------------------------------------------------------------------------- */ -NW_FBox_Skin_t* -_NW_FBox_InputBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - NW_ASSERT(NW_Object_IsInstanceOf(formBox, &NW_FBox_InputBox_Class)); - return (NW_FBox_Skin_t *)NW_FBox_InputSkin_New(formBox); -} - -/* ------------------------------------------------------------------------- */ -NW_FBox_Interactor_t* -_NW_FBox_InputBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - NW_ASSERT(NW_Object_IsInstanceOf(formBox, &NW_FBox_InputBox_Class)); - return (NW_FBox_Interactor_t *)NW_FBox_InputInteractor_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_InputBox_ModifyBuffer(NW_FBox_InputBox_t* inputBox, - NW_Ucs2 c, - NW_Uint32 repeated) -{ - NW_REQUIRED_PARAM(inputBox); - NW_REQUIRED_PARAM(c); - NW_REQUIRED_PARAM(repeated); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_FBox_InputSkin_t* inputSkin; - NW_FBox_FormBox_t* formBox; - - if (flags & NW_LMgr_Box_SplitFlags_Nowrap) { - *splitBox = NULL; - return KBrsrSuccess; - } - *splitBox = NULL; - formBox = NW_FBox_FormBoxOf(box); - inputSkin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(formBox)); - return NW_FBox_InputSkin_Split(inputSkin, space, splitBox, flags); -} - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -NW_Text_Length_t -NW_FBox_InputBox_GetBufferLength(NW_FBox_InputBox_t* inputBox) -{ - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - if (inputBox->value == NULL){ - return 0; - } - return NW_Text_GetCharCount(inputBox->value); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_InputBox_CheckFormLiaisonVal(NW_FBox_InputBox_t* inputBox) -{ - NW_Text_t* text; - NW_FBox_FormLiaison_t* formLiaison; - void* formControlId; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - - /* get the UCS2 pointer to the value and construct a new Text - object from this */ - text = NW_Text_Copy(inputBox->value, NW_TRUE); - - /* we pass ownership of the text object to the formLiaison */ - formLiaison = NW_FBox_FormBox_GetFormLiaison (inputBox); - formControlId = NW_FBox_FormBox_GetFormCntrlID(inputBox); - - status = NW_FBox_FormLiaison_ValidateStringValue (formLiaison, formControlId, - text); - - NW_Object_Delete( text ); - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_InputBox_SetFormLiaisonVal(NW_FBox_InputBox_t* inputBox) -{ - NW_Text_t* text = NULL; - NW_FBox_FormLiaison_t* formLiaison; - void* formControlId; - TBrowserStatusCode status; - NW_Bool dummy; - - // parameter assertion block - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - - // get UCS2 pointer to value and construct new Text object from this - if (inputBox->value != NULL){ - text = NW_Text_Copy(inputBox->value, NW_TRUE); - }else{ - text = (NW_Text_t*) NW_Text_UCS2_New (NULL, 0, 0); - } - // pass ownership of text object to formLiaison - formLiaison = NW_FBox_FormBox_GetFormLiaison (inputBox); - formControlId = NW_FBox_FormBox_GetFormCntrlID(inputBox); - - status = NW_FBox_FormLiaison_SetStringValue (formLiaison, formControlId, - text); - if (status == KBrsrWmlbrowserInputNonconformingToMask) { - // Expected that may not match format mask. Force to success so - // will contine. - status = KBrsrSuccess; - } else if (status == KBrsrOutOfMemory) { - return KBrsrOutOfMemory; - } else if (status != KBrsrSuccess) { - // Gracefully attempt to recover from other types of errors, at least - // trying to keep the displayed text in synch with what the user entered. - // Without this, expected possible errors such as KBrsrWmlbrowserBadContent - // for example, will cause displayed text to be out of synch. - return NW_FBox_InputBox_SetDisplayText (inputBox, NW_TRUE); - } - - // get formLiaison's intrepretation of value and set that as default - status = - NW_FBox_FormLiaison_GetStringValue (formLiaison, formControlId, &text, &dummy); - if (status != KBrsrSuccess){ - return status; - } - status = NW_FBox_InputBox_SetDefaultVal (inputBox, text); - NW_ASSERT (status == KBrsrSuccess); - return NW_FBox_InputBox_SetDisplayText (inputBox, NW_TRUE); -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_FBox_InputBox_SetDefaultVal(NW_FBox_InputBox_t* thisObj, - NW_Text_t* defaultVal) -{ - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputBox_Class)); - NW_ASSERT (defaultVal == NULL || - NW_Object_IsInstanceOf (defaultVal, &NW_Text_Abstract_Class)); - - if (thisObj->value){ - NW_Object_Delete(thisObj->value); - thisObj->value = NULL; - } - if (defaultVal == NULL){ - return KBrsrSuccess; - } - thisObj->value = NW_Text_Copy(defaultVal, NW_TRUE); - if (thisObj->value == NULL){ - return KBrsrOutOfMemory; - } - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -NW_FBox_InputBox_SetActive(NW_FBox_InputBox_t* inputBox, NW_Bool active) -{ - NW_AppServices_SoftKeyAPI_t* softKeyAPI; - NW_FBox_InputSkin_t* inputSkin; - TBrowserStatusCode status; - - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - - inputBox->active = active; - softKeyAPI = &(inputBox->appServices->softKeyApi); - NW_ASSERT(softKeyAPI != NULL); - - if (active == NW_TRUE) { - if (softKeyAPI->setLeft != NULL) { - softKeyAPI->setLeft(NW_SOFTKEY_OK); - } - if (softKeyAPI->setRight != NULL) { - softKeyAPI->setRight(NW_SOFTKEY_CLEAR); - } - inputSkin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - status = NW_FBox_InputSkin_SetActive (inputSkin); - if (status != KBrsrSuccess) { - NW_FBox_InputBox_SetActive (inputBox, NW_FALSE); - (void) inputBox->appServices->errorApi.notifyError (NULL, status, NULL, NULL); - } - } - else { - if (softKeyAPI->setLeft != NULL) { - softKeyAPI->setLeft(NW_SOFTKEY_OPTIONS); - } - if (softKeyAPI->setRight != NULL) { - softKeyAPI->setRight(NW_SOFTKEY_BACK); - } - } -} - -/* --------------------------------------------------------------------------*/ -void -NW_FBox_InputBox_SetFocus( NW_FBox_InputBox_t* inputBox, NW_Bool focus ) -{ - NW_FBox_InputSkin_t* inputSkin; - NW_ASSERT( NW_Object_IsInstanceOf( inputBox, &NW_FBox_InputBox_Class ) ); - inputSkin = NW_FBox_InputSkinOf( NW_FBox_FormBox_GetSkin( inputBox ) ); - NW_FBox_InputSkin_SetFocus( inputSkin, focus ); -} - -/* --------------------------------------------------------------------------*/ -void -NW_FBox_InputBox_SetVKB( NW_FBox_InputBox_t* inputBox) -{ - NW_FBox_InputSkin_t* inputSkin; - NW_ASSERT( NW_Object_IsInstanceOf( inputBox, &NW_FBox_InputBox_Class ) ); - inputSkin = NW_FBox_InputSkinOf( NW_FBox_FormBox_GetSkin( inputBox ) ); - NW_FBox_InputSkin_SetVKB( inputSkin); -} - - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_InputBox_Reset (NW_FBox_FormBox_t* box) -{ - TBrowserStatusCode status; - NW_FBox_FormLiaison_t* formLiaison; - void* formControlId; - NW_Text_t *buffer; - NW_FBox_InputBox_t* thisObj; - NW_Bool dummy; - - /* Call superclass to NULL/reset values. */ - status = _NW_FBox_FormBox_Reset(box); - if ( status != KBrsrSuccess ) { - return status; - } - - thisObj = NW_FBox_InputBoxOf (box); - - formControlId = NW_FBox_FormBox_GetFormCntrlID(thisObj); - formLiaison = NW_FBox_FormBox_GetFormLiaison(NW_FBox_FormBoxOf(thisObj)); - - /* SetInitialStringValue will retrieve the the default form value... */ - status = NW_FBox_FormLiaison_SetInitialStringValue(formLiaison, - formControlId, - NW_FBox_InputBox_GetMaxChars(thisObj)); - if (status == KBrsrWmlbrowserInputNonconformingToMask) { - /* Expected that may not match format mask. Force to success so - will contine. */ - status = KBrsrSuccess; - } - - status = NW_FBox_FormLiaison_GetStringValue(formLiaison, formControlId, &buffer, &dummy); - NW_ASSERT(status == KBrsrSuccess); - if (status != KBrsrSuccess){ - return status; - } - - NW_FBox_InputBox_SetDefaultVal(thisObj, buffer); - status = NW_FBox_InputBox_SetDisplayText(thisObj, NW_TRUE); - if (status != KBrsrSuccess) { - return status; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_GDI_Metric_t -_NW_FBox_InputBox_GetBaseline (NW_LMgr_Box_t* box) - { - CGDIFont* font; - TGDIFontInfo fontInfo; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class)); - - /* Get the font info */ - font = NW_LMgr_Box_GetFont (box); - if (font != NULL) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - (void) font->GetFontInfo ( &fontInfo); - - /* Get the padding and the border width */ - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameTop ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameTop ); - - return (NW_GDI_Metric_t)(fontInfo.baseline + borderWidth.top + padding.top); - } - - /* unable to get the FontInfo we return our height */ - return NW_LMgr_Box_GetFormatBounds(box).dimension.height; -} - - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_FBox_InputBox_GetFormat(NW_FBox_InputBox_t* thisObj, - const NW_Text_t** format, - NW_FBox_Validator_Mode_t* mode, - NW_FBox_Validator_EmptyOk_t* emptyOk) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Property_t prop; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputBox_Class)); - NW_ASSERT( format != NULL ); - NW_ASSERT( emptyOk != NULL ); - NW_ASSERT( mode != NULL ); - - *format = NULL; - *emptyOk = NW_FBox_Validator_EmptyOk_None; - *mode = NW_FBox_Validator_Mode_None; - - /* Get and set -wap-input-format property. */ - status = NW_LMgr_Box_GetProperty( NW_LMgr_BoxOf(thisObj), - NW_CSS_Prop_inputFormat, - &prop ); - - if ( ( status == KBrsrSuccess ) && - ( prop.type == NW_CSS_ValueType_Text ) ) { - /* Found -wap-input-format property. Set it on the box. */ - *format = NW_TextOf( prop.value.object ); - } - - /* Get and set -wap-input-required property. */ - status = NW_LMgr_Box_GetProperty( NW_LMgr_BoxOf(thisObj), - NW_CSS_Prop_inputRequired, - &prop ); - - if ( ( status == KBrsrSuccess ) && - ( prop.type == NW_CSS_ValueType_Token ) ) { - /* Found -wap-input-required property. Set it on the box. */ - if ( prop.value.token == NW_CSS_PropValue_true ) { - /* Input required is true. Note this translates to emptyOk == FALSE. */ - *emptyOk = NW_FBox_Validator_EmptyOk_False; - } - else if ( prop.value.token == NW_CSS_PropValue_false ) { - /* Input required is false. Note this translates to emptyOk == TRUE. */ - *emptyOk = NW_FBox_Validator_EmptyOk_True; - } - } - - status = NW_LMgr_Box_GetProperty( NW_LMgr_BoxOf(thisObj), NW_CSS_Prop_istyle, - &prop ); - if ( ( status == KBrsrSuccess ) && - ( prop.type == NW_CSS_ValueType_Integer ) ) { - switch (prop.value.integer) - { - case 1: - { - *mode = NW_FBox_Validator_Mode_Hiragana; - break; - } - case 2: - { - *mode = NW_FBox_Validator_Mode_Hankakukana; - break; - } - case 3: - { - *mode = NW_FBox_Validator_Mode_Alphabet; - break; - } - case 4: - { - *mode = NW_FBox_Validator_Mode_Numeric; - break; - } - default: - { - break; - } - } - } - - status = NW_LMgr_Box_GetProperty( NW_LMgr_BoxOf(thisObj), NW_CSS_Prop_mode, - &prop ); - if ( ( status == KBrsrSuccess ) && - ( prop.type == NW_CSS_ValueType_Token ) ) { - switch (prop.value.token) - { - case NW_CSS_PropValue_hiragana: - { - *mode = NW_FBox_Validator_Mode_Hiragana; - break; - } - case NW_CSS_PropValue_katakana: - { - *mode = NW_FBox_Validator_Mode_Katakana; - break; - } - case NW_CSS_PropValue_hankakukana: - { - *mode = NW_FBox_Validator_Mode_Hankakukana; - break; - } - case NW_CSS_PropValue_alphabet: - { - *mode = NW_FBox_Validator_Mode_Alphabet; - break; - } - case NW_CSS_PropValue_numeric: - { - *mode = NW_FBox_Validator_Mode_Numeric; - break; - } - default: - { - break; - } - } - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_InputBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_FBox_InputBox_t* thisObj; - NW_FBox_Interactor_t* interactor; - NW_Uint8 eventAbsorbed; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_FBox_InputBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_InputBox_Class)); - - thisObj = NW_FBox_InputBoxOf(thisObj); - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_InputBox_Class)); - - interactor = NW_FBox_FormBox_GetInteractor(NW_FBox_FormBoxOf(thisObj)); - - eventAbsorbed = - NW_FBox_Interactor_ProcessEvent (interactor, - NW_LMgr_ActiveBoxOf (thisObj), event); - if (eventAbsorbed){ - return eventAbsorbed; - } - - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent (eventListener, event); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_FBox_InputBox_t* -NW_FBox_InputBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 colulmns, - NW_HED_AppServices_t* appServices) -{ - return (NW_FBox_InputBox_t*) - NW_Object_New (&NW_FBox_InputBox_Class, (NW_Uint32)numProperties, eventHandler, - formCntrlId, formLiaison, (NW_Uint32)colulmns, appServices); -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXInputInteractor.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXInputInteractor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_inputinteractori.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_fbox_inputskin.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_unicodekeyevent.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_InputInteractor_Class_t NW_FBox_InputInteractor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Interactor_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_InputInteractor_t), - /* construct */ _NW_FBox_Interactor_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Interactor */ - /* processEvent */ _NW_FBox_InputInteractor_ProcessEvent - }, - { /* NW_FBox_InputInteractor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_FBox_InputInteractor_ProcessEvent( - NW_FBox_Interactor_t* interactor, - NW_LMgr_ActiveBox_t* box, - NW_Evt_Event_t* event) -{ - NW_Evt_UnicodeKeyEvent_t *unicodeKeyEvent; - NW_FBox_InputBox_t* inputBox; - NW_Uint8 eventAbsorbed; - - NW_REQUIRED_PARAM(interactor); - eventAbsorbed = NW_LMgr_EventNotAbsorbed; - - inputBox = NW_FBox_InputBoxOf(box); - - if (NW_Object_Core_GetClass (event) == &NW_Evt_FocusEvent_Class) { - /* we are not doing anything for the gained focus event. - * Only for lost focus event we commit the value of - * inputBox to the formLiaison - */ - - eventAbsorbed = NW_LMgr_EventAbsorbed; - if(!NW_Evt_FocusEvent_GetHasFocus(event)) { - TBrowserStatusCode status = KBrsrSuccess; - /* We set the form liaison value in case the input element is active */ - if(NW_FBox_InputBox_IsActive(inputBox)) - { - status = NW_FBox_InputBox_CheckFormLiaisonVal(inputBox); - } - if (status == KBrsrWmlbrowserInputNonconformingToMask) { - eventAbsorbed = NW_LMgr_EventNotAbsorbed; - - /* Display dialog that user input did not match the format mask. */ - (void) inputBox->appServices->errorApi.notifyError(NULL, - KBrsrWmlbrowserInputNonconformingToMask, - NULL, NULL); - } - else if (status == KBrsrSuccess) { - /* Valid input. Set the new value in the form liaison. */ - (void) NW_FBox_InputBox_SetFormLiaisonVal(inputBox); - } - NW_FBox_InputBox_SetActive(inputBox, NW_FALSE); - } - } - else if (NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) - { - if (!NW_FBox_InputBox_IsActive(inputBox)){ - NW_FBox_InputBox_SetActive(inputBox, NW_TRUE); - }else{ - NW_FBox_InputBox_SetActive(inputBox, NW_FALSE); - NW_FBox_InputBox_SetFormLiaisonVal(inputBox); - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - else if (NW_Object_Core_GetClass (event) == &NW_Evt_AccessKeyEvent_Class) - { - if (!NW_FBox_InputBox_IsActive(inputBox)){ - NW_FBox_InputBox_SetActive(inputBox, NW_TRUE); - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - } - else if (NW_Object_Core_GetClass (event) == &NW_Evt_UnicodeKeyEvent_Class) - { - unicodeKeyEvent = NW_Evt_UnicodeKeyEventOf(event); - if (unicodeKeyEvent->keyVal == '#' && !NW_Evt_KeyEvent_IsLongPress(NW_Evt_KeyEventOf(event))) - { - TBrowserStatusCode status = KBrsrSuccess; - if(status) {} // fix rvct compiler warning - NW_FBox_InputSkin_t* inputSkin; - inputSkin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - if ((NW_Object_Core_GetClass(inputBox) != &NW_FBox_PasswordBox_Class) && - !NW_Evt_KeyEvent_IsLongPress(NW_Evt_KeyEventOf(event))) - { - status = NW_FBox_InputSkin_DetailsDialog(inputSkin); - NW_ASSERT(status == KBrsrSuccess); - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - status = KBrsrSuccess; - } - } - - if (eventAbsorbed == NW_LMgr_EventAbsorbed){ - NW_LMgr_Box_Refresh (NW_LMgr_BoxOf (box)); - return NW_LMgr_EventAbsorbed; - } - - return NW_LMgr_EventNotAbsorbed; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXInputSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXInputSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_inputskini.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "nw_fbox_inputbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_InputSkin_Class_t NW_FBox_InputSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_ButtonBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { - /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_InputSkin_t), - /* construct */ _NW_FBox_InputSkin_Construct, - /* destruct */ _NW_FBox_InputSkin_Destruct - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ _NW_FBox_InputSkin_Draw, - /* NW_FBox_Skin_GetSize_t */ _NW_FBox_InputSkin_GetSize - }, - { /* NW_FBox_InputSkin */ - /* drawText */ NULL, - /* moveCursorLeft */ NULL, - /* moveCursorRight */ NULL, - /* clearLastChar */ NULL, - /* setDisplayText */ NULL, - /* setActive */ _NW_FBox_InputSkin_SetActive, - /* detailsDialog */ NULL, - /* split */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_InputSkin_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_InputSkinOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_Skin_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->displayText = NULL; - - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_InputSkin_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_InputSkin_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_InputSkinOf (dynamicObject); - - if (thisObj->displayText){ - NW_Object_Delete(thisObj->displayText); - thisObj->displayText = NULL; - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputSkin_Draw(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_FBox_InputSkin_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - /* for convenience */ - thisObj = NW_FBox_InputSkinOf(skin); - /* Let the base class draw draw the box */ - (void) NW_LMgr_Box_Class.NW_LMgr_Box.draw(box, deviceContext, hasFocus); - status = NW_FBox_InputSkin_DrawText(thisObj, deviceContext); - if ( status != KBrsrSuccess) - return status; - status = NW_FBox_InputSkin_SetFocus( thisObj, hasFocus); - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputSkin_GetSize(NW_FBox_Skin_t* skin, - NW_LMgr_Box_t* box, - NW_GDI_Dimension3D_t* size) -{ - NW_FBox_InputBox_t* inputBox; - NW_GDI_Dimension2D_t mExtent; - NW_GDI_Metric_t inputWidth; - NW_GDI_Metric_t inputHeight; - NW_Text_Length_t width; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_InputBox_Class)); - - /* for convenience */ - inputBox = NW_FBox_InputBoxOf (box); - - TBrowserStatusCode status = NW_FBox_InputSkin_GetMCharExtent(NW_FBox_InputSkinOf(skin), &mExtent); - NW_ASSERT(status == KBrsrSuccess); - - /* Calculate the size */ - width = NW_FBox_InputBox_GetWidth(inputBox); - if (width == 0) { - width = 4; - } - inputWidth = (NW_GDI_Metric_t) - ((mExtent.width)*width); - /* one pixel is added for space between the line */ - inputHeight = (NW_GDI_Metric_t) - ((mExtent.height + 1)*(NW_FBox_InputBox_GetHeight(inputBox))); - - /* For the first line we don't need to add one pixel. */ - inputHeight--; - size->height = inputHeight; - size->width = inputWidth; - - /* Get the size of the image itself */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_InputSkin_SetActive (NW_FBox_InputSkin_t* skin) -{ - NW_REQUIRED_PARAM(skin); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_InputSkin_GetMCharExtent(NW_FBox_InputSkin_t* skin, - NW_GDI_Dimension2D_t *charExtent) - { - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - static const NW_Ucs2 mWidth[] = {'M'}; - NW_Text_UCS2_t* text; - TBrowserStatusCode status; - NW_FBox_InputBox_t* box; - CGDIFont* font; - - NW_ASSERT(NW_Object_IsInstanceOf(skin, &NW_FBox_InputSkin_Class)); - box = NW_FBox_InputSkin_GetInputBox(skin); - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class)); - - text = NW_Text_UCS2_New ((NW_Ucs2*) mWidth, 1, 0); - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(box)); - NW_ASSERT(font != NULL); - - /* calculate the extents */ - status = deviceContext->GetTextExtent( NW_TextOf(text), - font, - 0, - NW_GDI_FlowDirection_LeftRight, - charExtent ); - NW_Object_Delete(text); - - if (status == KBrsrOutOfMemory) - { - return status; - } - - return KBrsrSuccess; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXInteractor.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXInteractor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_interactori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Interactor_Class_t NW_FBox_Interactor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Interactor_t), - /* construct */ _NW_FBox_Interactor_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Interactor */ - /* NW_FBox_Interactor_ProcessEvent_t */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Interactor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_Interactor_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_InteractorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->formBox = va_arg (*argp, NW_LMgr_Box_t*); - - /* successful completion */ - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXOptGrpBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXOptGrpBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_optgrpboxi.h" - -#include "nw_evt_activateevent.h" -#include "nw_fbox_optgrpskin.h" -#include "nw_adt_resizablevector.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_OptGrpBox_Class_t NW_FBox_OptGrpBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_OptGrpBox_t), - /* construct */ _NW_FBox_OptGrpBox_Construct, - /* destruct */ _NW_FBox_OptGrpBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_OptGrpBox_InitSkin, - /* initInteractor */ _NW_FBox_OptGrpBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_OptGrpBox */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_OptGrpBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_OptGrpBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_OptGrpBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->text = va_arg (*argp, NW_Text_t*); - thisObj->children = NULL; - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_OptGrpBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_OptGrpBox_t* thisObj; - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t index; - - /* for convenience */ - thisObj = NW_FBox_OptGrpBoxOf (dynamicObject); - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_OptGrpBox_Class)); - - if (thisObj->children) - { - size = NW_ADT_Vector_GetSize(thisObj->children); - for (index =0; index <size; index++) - { - NW_FBox_FormBox_t* box; - - box = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt (thisObj->children, index); - NW_Object_Delete(box); - } - - NW_Object_Delete(thisObj->children); - } - NW_Object_Delete(thisObj->text); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Skin_t* -_NW_FBox_OptGrpBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_OptGrpSkin_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Interactor_t* -_NW_FBox_OptGrpBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - (void)formBox; - return NULL; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_OptGrpBox_AddOption(NW_FBox_OptGrpBox_t* optGrpBox, - NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_OptGrpSkin_t* skin; - - if (optGrpBox->children == NULL){ - optGrpBox->children = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_FBox_FormBox_t*), 1, 2); - } - NW_ASSERT(optGrpBox->children); - NW_FBox_OptionBox_t* optionBox2 = *(NW_FBox_OptionBox_t**) - NW_ADT_DynamicVector_InsertAt(optGrpBox->children, - &optionBox, NW_ADT_Vector_AtEnd); - NW_ASSERT(optionBox2 == optionBox); - skin = (NW_FBox_OptGrpSkin_t*) - NW_FBox_FormBox_GetSkin(optGrpBox); - (void) NW_FBox_OptGrpSkin_AddOption(skin, optionBox); -} - - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_OptGrpBox_AddOptGrp(NW_FBox_OptGrpBox_t* optGrpBox, - NW_FBox_OptGrpBox_t* childOptGrpBox) -{ - NW_FBox_OptGrpSkin_t* skin; - - if (optGrpBox->children == NULL){ - optGrpBox->children = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_FBox_FormBox_t*), 10, 5); - } - NW_ASSERT(optGrpBox->children); - (void) NW_ADT_DynamicVector_InsertAt(optGrpBox->children, - &childOptGrpBox, - NW_ADT_Vector_AtEnd); - skin = (NW_FBox_OptGrpSkin_t*) - NW_FBox_FormBox_GetSkin(optGrpBox); - (void) NW_FBox_OptGrpSkin_AddOptGrp(skin, childOptGrpBox); -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -NW_FBox_OptGrpBox_GetNumOptions(NW_FBox_OptGrpBox_t* optGrpBox) -{ - if (optGrpBox->children == NULL) - return 0; - return NW_ADT_Vector_GetSize(optGrpBox->children); -} - -/* ------------------------------------------------------------------------- */ -NW_FBox_OptionBox_t* -NW_FBox_OptGrpBox_GetOption(NW_FBox_OptGrpBox_t* optGrpBox, - NW_ADT_Vector_Metric_t index) -{ - return *(NW_FBox_OptionBox_t**) - NW_ADT_Vector_ElementAt (optGrpBox->children, index); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_FBox_OptGrpBox_t* -NW_FBox_OptGrpBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* text) -{ - return (NW_FBox_OptGrpBox_t*) - NW_Object_New (&NW_FBox_OptGrpBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, text); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXOptGrpSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXOptGrpSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_optgrpskini.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_OptGrpSkin_Class_t NW_FBox_OptGrpSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_OptGrpSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* draw */ NULL, - /* getSize */ NULL - }, - { /* NW_FBox_OptGrpSkin */ - /* addOption */ NULL, - /* addOptGrp */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXOptionBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXOptionBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_optionboxi.h" - -#include "nw_evt_activateevent.h" -#include "nw_fbox_optionboxskin.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_OptionBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_OptionBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_FBox_OptionBox_InterfaceList[] = { - &_NW_FBox_OptionBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_OptionBox_Class_t NW_FBox_OptionBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_CheckBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_OptionBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_OptionBox_t), - /* construct */ _NW_FBox_OptionBox_Construct, - /* destruct */ _NW_FBox_OptionBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_OptionBox_InitSkin, - /* initInteractor */ _NW_FBox_OptionBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_CheckBox */ - /* unused */ 0 - }, - { /* NW_FBox_OptionBox */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_OptionBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_OptionBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_OptionBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_CheckBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->text = va_arg (*argp, NW_Text_t*); - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_FBox_OptionBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_OptionBox_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_OptionBoxOf (dynamicObject); - - /* Destroy our text object */ - NW_Object_Delete(thisObj->text); - thisObj->text = NULL; -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Skin_t* -_NW_FBox_OptionBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - return (NW_FBox_Skin_t *)NW_FBox_OptionBoxSkin_New(formBox); -} - -/* --------------------------------------------------------------------------*/ -NW_FBox_Interactor_t* -_NW_FBox_OptionBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - (void)formBox; - return NULL; -} - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -NW_Bool -NW_FBox_OptionBox_IsMultiple(NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison(optionBox); - - return NW_FBox_FormLiaison_IsOptionMultiple(formLiason, - NW_FBox_FormBox_GetFormCntrlID(optionBox)); - -} - -NW_Bool -NW_FBox_OptionBox_IsSelected(NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison(optionBox); - - return NW_FBox_FormLiaison_IsOptionSelected(formLiason, - NW_FBox_FormBox_GetFormCntrlID(optionBox)); - -} - -NW_Bool -NW_FBox_OptionBox_HasOnPick(NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison(optionBox); - - return NW_FBox_FormLiaison_OptionHasOnPick(formLiason, - NW_FBox_FormBox_GetFormCntrlID(optionBox)); -} - -NW_Bool -NW_FBox_OptionBox_IsLocalNavOnPick(NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison(optionBox); - - return NW_FBox_FormLiaison_IsLocalNavOnPick(formLiason, - NW_FBox_FormBox_GetFormCntrlID(optionBox)); -} -/* --------------------------------------------------------------------------*/ -void -NW_FBox_OptionBox_ChangeState(NW_FBox_OptionBox_t* optionBox) -{ - NW_FBox_FormLiaison_t* formLiason = NW_FBox_FormBox_GetFormLiaison(optionBox); - - (void) NW_FBox_FormLiaison_ToggleBoolValue(formLiason, - NW_FBox_FormBox_GetFormCntrlID(optionBox)); -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_OptionBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_FBox_OptionBox_t* thisObj; - NW_FBox_FormLiaison_t* formLiaison; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_FBox_OptionBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_OptionBox_Class)); - - formLiaison = NW_FBox_FormBox_GetFormLiaison(thisObj); - - if (NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) { - (void) NW_FBox_FormLiaison_ToggleBoolValue (formLiaison, - NW_FBox_FormBox_GetFormCntrlID (thisObj)); - return NW_LMgr_EventAbsorbed; - } - - return _NW_FBox_CheckBox_IEventListener_ProcessEvent (eventListener, event); -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_OptionBox_t* -NW_FBox_OptionBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Text_t* text) -{ - return (NW_FBox_OptionBox_t*) - NW_Object_New (&NW_FBox_OptionBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, text); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXOptionBoxSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXOptionBoxSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_optionboxskini.h" - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_OptionBoxSkin_Class_t NW_FBox_OptionBoxSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Skin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_OptionBoxSkin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ NULL, - /* NW_FBox_Skin_GetSize_t */ NULL - }, - { /* NW_FBox_OptionBoxSkin */ - /* unused */ NW_Object_Unused - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXPasswordBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXPasswordBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,275 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_passwordboxi.h" -#include "nw_fbox_inputskin.h" -#include "nw_fbox_inputinteractor.h" -#include "nw_evt_timerevent.h" -#include "nw_fbox_inlineinputskin.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - forward method declarations - * ------------------------------------------------------------------------- */ - -#if 0 -/* -static -TBrowserStatusCode -NW_FBox_PasswordBox_TimerCallback (void *timerData); -*/ - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_FBox_PasswordBox_CreateTimer (NW_FBox_PasswordBox_t* thisObj) -{ - NW_TRY (status) { - if (thisObj->timer == NULL) { - thisObj->timer = NW_System_Timer_New (NW_FBox_PasswordBox_TimerCallback, - thisObj, 500, NW_TRUE); - NW_THROW_ON_NULL (thisObj->timer, status, KBrsrUnexpectedError); - } - } - - NW_CATCH (status) { } - - NW_FINALLY { - return status; - } NW_END_TRY -} -*/ -/* ------------------------------------------------------------------------- -static -void -NW_FBox_PasswordBox_DestroyTimer (NW_FBox_PasswordBox_t* thisObj) -{ - NW_Object_Delete (thisObj->timer); - thisObj->timer = NULL; -}*/ -#endif /* UNUSED_CODE */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_PasswordBox_SetDisplayTextToObscure (NW_FBox_PasswordBox_t* box) -{ - NW_FBox_InputSkin_t* skin; - NW_Ucs2* displayStorage; - NW_Text_Length_t displayLength = 0; - NW_Text_Length_t index; - NW_Text_UCS2_t* text; - NW_FBox_InputBox_t* inputBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_FBox_PasswordBox_Class)); - - /* get the associated skin */ - skin = NW_FBox_InputSkinOf (NW_FBox_FormBox_GetSkin (box)); - - if (skin->displayText){ - NW_Object_Delete (skin->displayText); - skin->displayText = NULL; - } - - inputBox = NW_FBox_InputBoxOf(box); - - /* retrieve the storage associated with the current display text */ - if (inputBox->value == NULL) { - return KBrsrSuccess; - } - displayLength = NW_Text_GetCharCount (inputBox->value) ; - if (displayLength == 0) { - return KBrsrSuccess; - } - displayStorage = NW_Str_New(displayLength); - NW_Mem_memset(displayStorage, 0, (NW_Uint32)((displayLength+1)*sizeof(NW_Ucs2))); - - /* obscure the string */ - for (index = 0; index < displayLength; index++) { - *(displayStorage + index) = '*'; - } - - /* swap the display text object */ - text = NW_Text_UCS2_New (displayStorage, displayLength, - NW_Text_Flags_TakeOwnership); - if (text == NULL) { - return KBrsrOutOfMemory; - } - if (skin->displayText){ - NW_Object_Delete (skin->displayText); - skin->displayText = NULL; - } - skin->displayText = NW_TextOf (text); - - /* successful completion */ - return KBrsrSuccess; -} - -#if 0 -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_FBox_PasswordBox_TimerCallback (void *timerData) -{ - NW_FBox_PasswordBox_t *thisObj; - NW_LMgr_RootBox_t *rootBox; - TBrowserStatusCode status = KBrsrSuccess; - - /* cast timerData to a box */ - thisObj = NW_FBox_PasswordBoxOf (timerData); - NW_ASSERT (thisObj); - - /* make sure it is an PasswordBox */ - NW_ASSERT (NW_Object_IsClass (thisObj, &NW_FBox_PasswordBox_Class)); - - /* if the box tree is not visible, we do not draw */ - rootBox = NW_LMgr_Box_GetRootBox (thisObj); - if (!NW_LMgr_RootBox_HasFocus(rootBox)) { - return KBrsrSuccess; - } - - /* Stop the timer */ - NW_FBox_PasswordBox_DestroyTimer (thisObj); - - /* make the DisplayText obscured */ - /* NW_TRUE means the last Char of displayText need to be illegible */ - NW_FBox_PasswordBox_SetDisplayTextToObscure (thisObj, NW_TRUE); - - /* Refresh the box */ - NW_LMgr_Box_Refresh (NW_LMgr_BoxOf (thisObj)); - - return status; - } -#endif /* UNUSED_CODE */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_PasswordBox_Class_t NW_FBox_PasswordBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_InputBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_PasswordBox_t), - /* construct */ _NW_FBox_InputBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_InputBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_InputBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_InputBox_InitSkin, - /* initInteractor */ _NW_FBox_InputBox_InitInteractor, - /* reset */ _NW_FBox_InputBox_Reset - }, - { /* NW_FBox_InputBox */ - /* getHeight */ _NW_FBox_InputBox_GetHeight, - /* setHeight */ _NW_FBox_InputBox_SetHeight, - /* setDisplayText */ _NW_FBox_InputBox_SetDisplayText, - /* modifyBuffer */ _NW_FBox_PasswordBox_ModifyBuffer - }, - { /* NW_FBox_PasswordBox */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -#if 0 -void -_NW_FBox_PasswordBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_PasswordBox_t* thisObj = NW_FBox_PasswordBoxOf(dynamicObject); - - /* destroy the timer - if (thisObj->timer != NULL) { - NW_FBox_PasswordBox_DestroyTimer(thisObj); - }*/ - -} -#endif - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_PasswordBox_SetObscureDisplayText (NW_FBox_InputBox_t* thisObj, - NW_Bool bufferModificationOn) -{ - NW_REQUIRED_PARAM(bufferModificationOn); - return NW_FBox_PasswordBox_SetDisplayTextToObscure (NW_FBox_PasswordBoxOf (thisObj)); -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_PasswordBox_ModifyBuffer(NW_FBox_InputBox_t* thisObj, - NW_Ucs2 c, - NW_Uint32 repeated) -{ - TBrowserStatusCode status; - - /* call the superclass method */ - status = NW_FBox_InputBox_Class.NW_FBox_InputBox.modifyBuffer(thisObj, c, repeated); - - /* start the timer - status = NW_FBox_PasswordBox_CreateTimer ((NW_FBox_PasswordBox_t*)thisObj); - if (status != KBrsrSuccess) { - return status; - }*/ - - return status; -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_PasswordBox_t* -NW_FBox_PasswordBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_Uint16 columns, - NW_HED_AppServices_t* appServices) -{ - return (NW_FBox_PasswordBox_t*) - NW_Object_New (&NW_FBox_PasswordBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, columns, appServices); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXRadioBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXRadioBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_radioboxi.h" - -#include "nw_lmgr_rootbox.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_RadioBox_Class_t NW_FBox_RadioBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_CheckBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_RadioBox_t), - /* construct */ _NW_FBox_CheckBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_FBox_FormBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_FormBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_CheckBox_InitSkin, - /* initInteractor */ _NW_FBox_CheckBox_InitInteractor, - /* reset */ _NW_FBox_FormBox_Reset - }, - { /* NW_FBox_CheckBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_RadioBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_FBox_RadioBox_t* -NW_FBox_RadioBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison) -{ - return (NW_FBox_RadioBox_t*) - NW_Object_New (&NW_FBox_RadioBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXSelectBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXSelectBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,540 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_selectboxi.h" - -#include "nw_evt_ecmaevent.h" - -#include "nw_fbox_selectskin.h" -#include "nw_fbox_epoc32selectskin.h" -#include "nw_fbox_inputinteractor.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "nw_fbox_passwordbox.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_unicodekeyevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_adt_resizablevector.h" -#include "nw_fbox_formboxutils.h" -#include "nw_hed_documentroot.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_FBox_SelectBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_FBox_SelectBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_FBox_SelectBox_InterfaceList[] = { - &_NW_FBox_SelectBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_SelectBox_Class_t NW_FBox_SelectBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_FBox_SelectBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_SelectBox_t), - /* construct */ _NW_FBox_SelectBox_Construct, - /* destruct */ _NW_FBox_SelectBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_FBox_SelectBox_Split, - /* resize */ _NW_FBox_FormBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_FBox_FormBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_FBox_FormBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_FBox_SelectBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_FormBox */ - /* initSkin */ _NW_FBox_SelectBox_InitSkin, - /* initInteractor */ _NW_FBox_SelectBox_InitInteractor, - /* reset */ _NW_FBox_SelectBox_Reset - }, - { /* NW_FBox_SelectBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_SelectBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_SelectBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_SelectBoxOf (dynamicObject); - /* invoke our superclass constructor */ - status = _NW_FBox_FormBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - thisObj->appServices = va_arg (*argp, NW_HED_AppServices_t*); - thisObj->multiple = (NW_Bool)va_arg(*argp, NW_Uint32); - thisObj->name = va_arg (*argp, NW_Text_t*); - thisObj->title = va_arg(*argp, NW_Text_t*); - thisObj->active = NW_FALSE; - - thisObj->children = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(NW_FBox_FormBox_t*), 10, 5 ); - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_SelectBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_FBox_SelectBox_t* thisObj; - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t index; - - /* for convenience */ - thisObj = NW_FBox_SelectBoxOf (dynamicObject); - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_SelectBox_Class)); - - if (thisObj->children != NULL) { - size = NW_ADT_Vector_GetSize(thisObj->children); - for (index =0; index <size; index++) - { - NW_FBox_OptionBox_t* optionBox; - - optionBox = *(NW_FBox_OptionBox_t**) - NW_ADT_Vector_ElementAt (thisObj->children, index); - NW_Object_Delete(optionBox); - } - - NW_Object_Delete(thisObj->children); - } - - NW_Object_Delete(thisObj->name); - NW_Object_Delete(thisObj->title); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_SelectBox_SetDisplayText(NW_FBox_SelectBox_t* thisObj, - NW_Bool bufferModificationOn) -{ - - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_FBox_SelectBox_Class)); - NW_REQUIRED_PARAM(thisObj); - NW_REQUIRED_PARAM(bufferModificationOn); - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -NW_FBox_Skin_t* -_NW_FBox_SelectBox_InitSkin(NW_FBox_FormBox_t* formBox) -{ - NW_FBox_Skin_t *skin; - - NW_ASSERT(NW_Object_IsInstanceOf(formBox, &NW_FBox_SelectBox_Class)); - skin = (NW_FBox_Skin_t *)NW_FBox_SelectSkin_New(formBox); - if ((skin != NULL) && NW_Object_IsInstanceOf(skin, &NW_FBox_SelectSkin_Class)) - { - NW_FBox_SelectSkin_Reserve(NW_FBox_SelectSkinOf(skin)); - } - return skin; -} - -/* ------------------------------------------------------------------------- */ -NW_FBox_Interactor_t* -_NW_FBox_SelectBox_InitInteractor(NW_FBox_FormBox_t* formBox) -{ - NW_ASSERT(NW_Object_IsInstanceOf(formBox, &NW_FBox_SelectBox_Class)); - return (NW_FBox_Interactor_t *)NW_FBox_InputInteractor_New(formBox); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_SelectBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_FBox_SelectSkin_t* selectSkin; - NW_FBox_FormBox_t* formBox; - - if (flags & NW_LMgr_Box_SplitFlags_Nowrap) { - *splitBox = NULL; - return KBrsrSuccess; - } - *splitBox = NULL; - formBox = NW_FBox_FormBoxOf(box); - selectSkin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(formBox)); - return NW_FBox_SelectSkin_Split(selectSkin, space, splitBox, flags); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -void -NW_FBox_SelectBox_AddOption(NW_FBox_SelectBox_t* selectBox, - NW_FBox_OptionBox_t* optionBox, - NW_LMgr_Box_t** styleBox) -{ - NW_FBox_SelectSkin_t* selectSkin; - - (void) NW_ADT_DynamicVector_InsertAt(selectBox->children, - &optionBox, NW_ADT_Vector_AtEnd); - selectSkin = (NW_FBox_SelectSkin_t*) - NW_FBox_FormBox_GetSkin(selectBox); - (void) NW_FBox_SelectSkin_AddOption(selectSkin, optionBox,styleBox); -} - -/* ------------------------------------------------------------------------- */ -void -NW_FBox_SelectBox_AddOptGrp(NW_FBox_SelectBox_t* selectBox, - NW_FBox_OptGrpBox_t* optGrpBox) -{ - NW_FBox_SelectSkin_t* selectSkin; - - (void) NW_ADT_DynamicVector_InsertAt(selectBox->children, - &optGrpBox, NW_ADT_Vector_AtEnd); - selectSkin = (NW_FBox_SelectSkin_t*) - NW_FBox_FormBox_GetSkin(selectBox); - (void) NW_FBox_SelectSkin_AddOptGrp(selectSkin, optGrpBox); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_SelectBox_SetFormLiaisonVal(NW_FBox_SelectBox_t* inputBox) -{ - NW_FBox_FormLiaison_t* formLiaison; - NW_Ucs2* storage; - NW_Text_Length_t length; - NW_Bool freeNeeded; - NW_Text_t* text; - void* formControlId; - TBrowserStatusCode status; - NW_Bool dummy; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_SelectBox_Class)); - - /* build a UCS2 text object with the inputBox name */ - storage = - NW_Text_GetUCS2Buffer (inputBox->name, - NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated, - &length, &freeNeeded); - if (storage == NULL){ - return KBrsrOutOfMemory; - } - text = (NW_Text_t*) - NW_Text_UCS2_New (storage, length, - (NW_Uint8) (freeNeeded ? NW_Text_Flags_TakeOwnership : 0)); - if (text == NULL) { - return KBrsrOutOfMemory; - } - - /* formLiaison is responsible for freeing the text text object */ - formControlId = NW_FBox_FormBox_GetFormCntrlID(inputBox); - formLiaison = NW_FBox_FormBox_GetFormLiaison (inputBox); - status = NW_FBox_FormLiaison_SetStringValue (formLiaison, formControlId, text); - if (status != KBrsrSuccess){ - return status; - } - - status = - NW_FBox_FormLiaison_GetStringValue (formLiaison, formControlId, &text, &dummy); - if (status != KBrsrSuccess){ - return status; - } - inputBox->name = text; - - return status; -} - -/* --------------------------------------------------------------------------*/ -void -NW_FBox_SelectBox_SetActive(NW_FBox_SelectBox_t* inputBox, NW_Bool active) -{ - NW_FBox_SelectSkin_t* skin; - if (active){ - skin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - TBrowserStatusCode status = NW_FBox_SelectSkin_SetActive(skin); - NW_ASSERT(status == KBrsrSuccess); - } -} - -/* --------------------------------------------------------------------------*/ -static -void -NW_FBox_SelectBox_ResetOption(NW_FBox_OptionBox_t* optionBox, NW_Bool *value) -{ - if(*value == NW_TRUE) - { - (void) NW_FBox_FormLiaison_SetBoolValue(NW_FBox_FormBox_GetFormLiaison(optionBox), - NW_FBox_FormBox_GetFormCntrlID(optionBox), value); - } - else if(NW_FBox_OptionBox_IsSelected(optionBox)) - { - *value = NW_TRUE; - (void) NW_FBox_FormLiaison_SetBoolValue(NW_FBox_FormBox_GetFormLiaison(optionBox), - NW_FBox_FormBox_GetFormCntrlID(optionBox), value); - } - else - { - (void) NW_FBox_FormLiaison_SetBoolValue(NW_FBox_FormBox_GetFormLiaison(optionBox), - NW_FBox_FormBox_GetFormCntrlID(optionBox), NULL); - } - - return; -} - -/* --------------------------------------------------------------------------*/ -static -void -NW_FBox_SelectBox_ResetOptgrp(NW_FBox_OptGrpBox_t* optGrpBox, NW_Bool* isFirstOption) -{ - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(optGrpBox->children)); - - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(optGrpBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - NW_Bool value = NW_FALSE; - if((*isFirstOption == NW_TRUE) && - !NW_FBox_OptionBox_IsMultiple(NW_FBox_OptionBoxOf(formBox))) - { - value = NW_TRUE; - *isFirstOption = NW_FALSE; - } - NW_FBox_SelectBox_ResetOption(NW_FBox_OptionBoxOf(formBox), &value); - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - /* recurse here */ - NW_FBox_SelectBox_ResetOptgrp(NW_FBox_OptGrpBoxOf(formBox), isFirstOption); - } - else{ - NW_ASSERT(0); - } - } - - return; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_FBox_SelectBox_Reset (NW_FBox_FormBox_t* box) -{ - TBrowserStatusCode status; - NW_FBox_SelectSkin_t* selectSkin; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - NW_FBox_SelectBox_t* selectBox; - NW_Bool isFirstOption = NW_TRUE; - - selectBox = NW_FBox_SelectBoxOf (box); - selectSkin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(box)); - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(selectBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - NW_Bool value = NW_FALSE; - if((isFirstOption == NW_TRUE) && - !NW_FBox_OptionBox_IsMultiple(NW_FBox_OptionBoxOf(formBox))) - { - value = NW_TRUE; - isFirstOption = NW_FALSE; - } - NW_FBox_SelectBox_ResetOption(NW_FBox_OptionBoxOf(formBox), &value); - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - NW_FBox_SelectBox_ResetOptgrp(NW_FBox_OptGrpBoxOf(formBox), &isFirstOption); - } - else{ - NW_ASSERT(0); - } - } - - status = NW_FBox_SelectSkin_RefreshText(selectSkin); - - return status; -} - -// ------------------------------------------------------------------------- -NW_GDI_Metric_t -_NW_FBox_SelectBox_GetBaseline (NW_LMgr_Box_t* box) - { - NW_FBox_FormBox_t* formBox; - NW_FBox_Epoc32SelectSkin_t* epoc32SelectSkin; - - // Parameter assertion block. - NW_ASSERT( NW_Object_IsInstanceOf( box, &NW_FBox_FormBox_Class ) ); - - // Get the 'skin' class through the form. - formBox = NW_FBox_FormBoxOf( box ); - NW_ASSERT( formBox ); - epoc32SelectSkin = NW_FBox_Epoc32SelectSkinOf( NW_FBox_FormBox_GetSkin( formBox ) ); - NW_ASSERT( epoc32SelectSkin ); - - // Delegate the operation to the skin class. - return NW_FBox_Epoc32SelectSkin_GetBaseline(epoc32SelectSkin, box ); - } - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Uint8 -_NW_FBox_SelectBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) - { - NW_FBox_SelectBox_t* thisObj; - NW_Evt_UnicodeKeyEvent_t *unicodeKeyEvent; - NW_Uint8 eventAbsorbed; - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - // obtain the implementer - thisObj = (NW_FBox_SelectBox_t*) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_FBox_SelectBox_Class)); - - eventAbsorbed = NW_LMgr_EventNotAbsorbed; - if( NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class || - NW_Object_Core_GetClass( event ) == &NW_Evt_AccessKeyEvent_Class ) - { - NW_FBox_FormLiaison_t* formLiaison= NW_FBox_FormBox_GetFormLiaison (thisObj); - - if( NW_FBox_FormLiaison_DelegateEcmaEvent (formLiaison, - NW_FBox_FormBox_GetFormCntrlID(thisObj), - NW_Ecma_Evt_OnFocus) == KBrsrNotFound) - { - (void)NW_FBox_FormLiaison_DelegateEcmaEvent (formLiaison, - NW_FBox_FormBox_GetFormCntrlID(thisObj), - NW_Ecma_Evt_OnClick); - } - - if (!thisObj->active) - { - NW_FBox_SelectBox_SetActive(thisObj, NW_TRUE); - } - else - { - NW_FBox_SelectBox_SetActive(thisObj, NW_FALSE); - NW_FBox_SelectBox_SetFormLiaisonVal(thisObj); - } - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - else if( NW_Object_Core_GetClass( event ) == &NW_Evt_FocusEvent_Class ) - { - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - else if (NW_Object_Core_GetClass (event) == &NW_Evt_UnicodeKeyEvent_Class) - { - unicodeKeyEvent = NW_Evt_UnicodeKeyEventOf(event); - if ((unicodeKeyEvent->keyVal == '#') && !NW_Evt_KeyEvent_IsLongPress(NW_Evt_KeyEventOf(event))) - { - NW_FBox_SelectSkin_t* selectSkin; - selectSkin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(thisObj)); - TBrowserStatusCode status = NW_FBox_SelectSkin_DetailsDialog(selectSkin); - NW_ASSERT(status == KBrsrSuccess); - eventAbsorbed = NW_LMgr_EventAbsorbed; - } - } - if (eventAbsorbed == NW_LMgr_EventAbsorbed) - { - return NW_LMgr_EventAbsorbed; - } - - return _NW_LMgr_ActiveBox_IEventListener_ProcessEvent (eventListener, event); - } - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_FBox_SelectBox_t* -NW_FBox_SelectBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - void* formCntrlId, - NW_FBox_FormLiaison_t* formLiaison, - NW_HED_AppServices_t* appServices, - NW_Bool multiple, - NW_Text_t* name, - NW_Text_t* title) -{ - return (NW_FBox_SelectBox_t*) - NW_Object_New (&NW_FBox_SelectBox_Class, numProperties, eventHandler, - formCntrlId, formLiaison, appServices, (NW_Uint32 )multiple, name, title); -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXSelectSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXSelectSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_selectskini.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_SelectSkin_Class_t NW_FBox_SelectSkin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_ButtonBoxSkin_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { - /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_SelectSkin_t), - /* construct */ _NW_FBox_SelectSkin_Construct, - /* destruct */ _NW_FBox_SelectSkin_Destruct - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ NULL, - /* NW_FBox_Skin_GetSize_t */ NULL - }, - { /* NW_FBox_SelectSkin */ - /* setActive */ NULL, - /* addOption */ NULL, - /* addOptGrp */ NULL, - /* detailsDialog */ NULL, - /* refreshText */ NULL, - /* split */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_SelectSkin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_SelectSkin_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_FBox_SelectSkinOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_FBox_Skin_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* - ** create the NW_Object_Shared that allows us to treat history-entry as a - ** reference counted obj. The weird thing about this is that thisObj points - ** to thisObj->sharingObject which in turn points to thisObj. This is on - ** purpose... When thisObj->sharingObject is released for the last time it - ** WILL delete "thisObj". - */ - thisObj->sharingObject = NW_Object_Shared_New (NW_Object_DynamicOf (thisObj)); - - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_FBox_SelectSkin_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_FBox_SelectSkin_Class)); - NW_REQUIRED_PARAM(dynamicObject); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_SelectSkin_GetMCharExtent(NW_FBox_SelectSkin_t* skin, - NW_GDI_Dimension2D_t *charExtent) - { - static const NW_Ucs2 mWidth[] = {'M', '\0'}; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - NW_Text_UCS2_t* text; - TBrowserStatusCode status; - NW_FBox_SelectBox_t* box; - CGDIFont* font; - - NW_ASSERT(NW_Object_IsInstanceOf(skin, &NW_FBox_SelectSkin_Class)); - box = NW_FBox_SelectSkin_GetSelectBox(skin); - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_FBox_SelectBox_Class)); - - text = NW_Text_UCS2_New ((NW_Ucs2*) mWidth, 1, 0); - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(box)); - NW_ASSERT(font != NULL); - - /* calculate the extents */ - status = deviceContext->GetTextExtent ( NW_TextOf(text), - font, - 0, - NW_GDI_FlowDirection_LeftRight, - charExtent); - if (status == KBrsrOutOfMemory) - { - return status; - } - - NW_Object_Delete(text); - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_SelectSkin_Reserve (NW_FBox_SelectSkin_t* thisObj) -{ - return NW_Object_Shared_Reserve (thisObj->sharingObject); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_FBox_SelectSkin_Release (NW_FBox_SelectSkin_t* thisObj) -{ - return NW_Object_Shared_Release (thisObj->sharingObject); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXSkin.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXSkin.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_skini.h" - -#include "nw_fbox_formbox.h" -#include "nwx_string.h" -#include "nw_text_ucs2.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -static const NW_Ucs2 _NW_LMgr_Text_Truncate[] = {'.','.','.','\0'}; -#define NW_LMgr_Text_Truncate_len ((sizeof(_NW_LMgr_Text_Truncate)\ - /sizeof(NW_Ucs2))-1) - -/* ----------------------------------------------------------------------- * - This routine will replace all non printable characters with spaces. - * ----------------------------------------------------------------------- */ -NW_Text_t* -NW_FBox_Skin_NonprintableToSpace(NW_Text_t *text) -{ - NW_Ucs2* string; - NW_Text_Length_t numCharacters; - NW_Text_Length_t index; - NW_Bool modified; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (text, &NW_Text_Abstract_Class)); - - /* get a copy of the string managed by the text object */ - string = NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Copy, - &numCharacters, NULL); - if (string == NULL) { - return NULL; - } - - /* iterate through each character converting them as necessary */ - modified = NW_FALSE; - for (index = 0; index < numCharacters; index++) { - if (string[index] != 0x0020 /* <SP> */ && - NW_Str_Isspace (string[index])) { - string[index] = 0x0020; /* <SP> */ - modified = NW_TRUE; - } - } - - /* if we didn't modify the string, we can simply return the original text - object */ - if (!modified) { - NW_Mem_Free (string); - return text; - } - - return (NW_Text_t*) - NW_Text_UCS2_New (string, numCharacters, NW_Text_Flags_TakeOwnership); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_Text_GetDisplayLength(CGDIDeviceContext* deviceContext, - NW_Text_t* text, - CGDIFont* font, - NW_Text_Length_t totalLength, - NW_Uint16 width, - NW_Text_Length_t* displayLength) - { - NW_GDI_Dimension2D_t extent; - NW_GDI_Dimension2D_t truncateExtent; - NW_Text_UCS2_t* truncateText; - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool OverFlow = NW_FALSE; - NW_Text_Length_t i; - - truncateText = NW_Text_UCS2_New ((NW_Ucs2*) _NW_LMgr_Text_Truncate, NW_LMgr_Text_Truncate_len, 0); - - if (truncateText == NULL) - { - return KBrsrOutOfMemory; - } - - status = - deviceContext->GetTextExtent ( NW_TextOf(truncateText), - font, - 0, - NW_GDI_FlowDirection_LeftRight, - &truncateExtent ); - if (status != KBrsrSuccess) - { - NW_Object_Delete(truncateText); - return status; - } - - NW_Object_Delete(truncateText); - extent.width = 0; - extent.height = 0; - for (i=1; i<=totalLength; i++) - { - status = deviceContext->GetSubstringExtent(text, - font, - 0, - i, - 0, - NW_GDI_FlowDirection_LeftRight, - &extent); - if (status != KBrsrSuccess) - { - return status; - } - if(!OverFlow) - { - if(extent.width > width) - { - i = (NW_Text_Length_t)((i > 3) ? (i - 3) : 0); - OverFlow = NW_TRUE; - } - continue; - } - else if ((extent.width + truncateExtent.width) > width) - { - break; - } - } - *displayLength = --i; - return status; - } - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Skin_Class_t NW_FBox_Skin_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Skin_t), - /* construct */ _NW_FBox_Skin_Construct, - /* destruct */ NULL - }, - { /* NW_FBox_Skin */ - /* NW_FBox_Skin_Draw_t */ NULL, - /* NW_FBox_Skin_GetSize_t */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_Skin_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_Skin_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_SkinOf (dynamicObject); - - /* initialize the member variables */ - thisObj->formBox = va_arg (*argp, NW_FBox_FormBox_t*); - - /* successful completion */ - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXValidator.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXValidator.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_FBox_ValidatorI.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_Validator_Class_t NW_FBox_Validator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_Validator_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_FBox_Validator */ - /* validate */ NULL, - /* getFormat */ NULL - } -}; - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXWmlFormatHandler.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXWmlFormatHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,844 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// INCLUDE FILES -#include <AknUtils.h> -#include "nw_fbox_wmlformathandler.h" -#include "NW_Unicode_LetterOther.h" -#include "NW_Unicode_LetterChina.h" -#include "NW_Unicode_LetterThai.h" - - -// CONSTANTS - -static const TUint KWmlFormatNone = 0; -static const TUint KWmlFormatA = 'A'; -static const TUint KWmlFormata = 'a'; -static const TUint KWmlFormatn = 'n'; -static const TUint KWmlFormatN = 'N'; -static const TUint KWmlFormatX = 'X'; -static const TUint KWmlFormatx = 'x'; -static const TUint KWmlFormatm = 'm'; -static const TUint KWmlFormatM = 'M'; -static const TUint KWmlFormatStatic = '\\'; - -static const TUint KWmlFormatMultiplier = '*'; - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code, that -// might leave. -// -TWmlFormatChar::TWmlFormatChar( TUint aChar, TUint aStatic ) - : iChar( aChar ) - { - iStatic = ( aChar == KWmlFormatStatic ) ? aStatic : 0; - } - -// --------------------------------------------------------- -// TWmlFormatChar::ForcedCase -// --------------------------------------------------------- -// -TWmlFormatChar::TWmlCase TWmlFormatChar::ForcedCase() const - { - TWmlCase result; - switch( iChar ) - { - case KWmlFormatA : - case KWmlFormatX : - result = EWmlUpperCase; - break; - - case KWmlFormata : - case KWmlFormatx : - result = EWmlLowerCase; - break; - - case KWmlFormatn : - case KWmlFormatN : - result = EWmlNumericCase; - break; - - default: - result = EWmlNone; - break; - } - return result; - } - -// --------------------------------------------------------- -// TWmlFormatChar::SuggestedCase -// --------------------------------------------------------- -// -TWmlFormatChar::TWmlCase TWmlFormatChar::SuggestedCase() const - { - TWmlCase result; - switch( iChar ) - { - case KWmlFormatA : - case KWmlFormatX : - case KWmlFormatM : - result = EWmlUpperCase; - break; - - case KWmlFormata : - case KWmlFormatx : - case KWmlFormatm : - result = EWmlLowerCase; - break; - - case KWmlFormatn : - case KWmlFormatN : - result = EWmlNumericCase; - break; - - default: - result = EWmlNone; - break; - } - return result; - } - -// --------------------------------------------------------- -// TWmlFormatChar::AlphaAllowed -// --------------------------------------------------------- -// -TBool TWmlFormatChar::AlphaAllowed() const - { - TBool result; - switch( iChar ) - { - case KWmlFormatA : - case KWmlFormata : - case KWmlFormatX : - case KWmlFormatx : - case KWmlFormatM : - case KWmlFormatm : - case KWmlFormatStatic : - result = ETrue; - break; - - default: - result = EFalse; - break; - } - return result; - } - -// --------------------------------------------------------- -// TWmlFormatChar::NumericAllowed -// --------------------------------------------------------- -// -TBool TWmlFormatChar::NumericAllowed() const - { - TBool result; - switch( iChar ) - { - case KWmlFormatX : - case KWmlFormatx : - case KWmlFormatM : - case KWmlFormatm : - case KWmlFormatn : - case KWmlFormatN : - case KWmlFormatStatic : - result = ETrue; - break; - - default: - result = EFalse; - break; - } - return result; - } - -// --------------------------------------------------------- -// TWmlFormatChar::SpecialAllowed -// --------------------------------------------------------- -// -TBool TWmlFormatChar::SpecialAllowed() const - { - TBool result; - switch( iChar ) - { - case KWmlFormatA : - case KWmlFormata : - case KWmlFormatX : - case KWmlFormatx : - case KWmlFormatM : - case KWmlFormatm : - case KWmlFormatn : - case KWmlFormatStatic : - result = ETrue; - break; - - default: - result = EFalse; - break; - } - return result; - } - -// --------------------------------------------------------- -// TWmlFormatChar::Char -// --------------------------------------------------------- -// -TUint TWmlFormatChar::Char() const - { - return iChar; - } - -// --------------------------------------------------------- -// TWmlFormatChar::Static() -// --------------------------------------------------------- -// -TUint TWmlFormatChar::Static() const - { - return iStatic; - } - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code, that -// might leave. -// -TKStaticChar::TKStaticChar( TUint aChar, TInt aPos ) - : iChar( aChar ) - , iPos( aPos ) - { - } - -// --------------------------------------------------------- -// TStaticChar::Char -// --------------------------------------------------------- -// -TUint TKStaticChar::Char() const - { - return iChar; - } - -// --------------------------------------------------------- -// TStaticChar::Pos -// --------------------------------------------------------- -// -TInt TKStaticChar::Pos() const - { - return iPos; - } - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code, that -// might leave. -// -CWmlFormatHandler::CWmlFormatHandler() - : iPostFix( KWmlFormatNone ) - { - } - -// EPOC default constructor can leave. -void CWmlFormatHandler::ConstructL - ( const TDesC& aFormatString, TWapDocType aWapDocType ) - { - if ( aWapDocType != EWmlDocType_Wml_1_0 && - aWapDocType != EWmlDocType_Wml_1_1 && - aWapDocType != EWmlDocType_Wml_1_2 ) - { - // handle unknown types as WML1.3 - aWapDocType = EWmlDocType_Wml_1_3; - } - - CArrayFixFlat<TInt>* statics = new( ELeave )CArrayFixFlat<TInt>( 3 ); - CleanupStack::PushL( statics ); - - // collect the indexes of static characters - TBool mark = EFalse; - TInt length = aFormatString.Length(); - for ( TInt i = 0; i < length; i++ ) - { - if ( mark ) // was the previous character prefix? - { - mark = EFalse; - statics->AppendL( i ); - } - else - { // is it prefix? - mark = ( aFormatString[ i ] == KWmlFormatStatic ); - } - } - - TInt numberOfStatics = statics->Count(); - iMinLength = length - numberOfStatics; - iMaxLength = iMinLength; - - // *f and nf handling - if ( length > 1 && // longer than one character - ( !numberOfStatics || // there are no statics, or it isn't static - statics->At( numberOfStatics - 1 ) != length - 2 ) ) - { - if ( aFormatString[ length - 2 ] == KWmlFormatMultiplier ) // *f? - { - iPostFix = aFormatString[ ( --length )-- ]; - iMinLength = length - numberOfStatics; - iMaxLength = KInfiniteLength; - } - else - { - TChar n( aFormatString[ length - 2 ] ); - if ( n.IsDigit() && n != '0' ) // nf? - { - TInt adjustLength = length; - iPostFix = aFormatString[ ( --adjustLength )-- ]; - iMaxLength = adjustLength - numberOfStatics + n.GetNumericValue(); - // WML1.0, WML1.1: entry of n characters - // WML1.2, WML1.3: entry of up to n characters - iMinLength = aWapDocType > EWmlDocType_Wml_1_1 - ? adjustLength - numberOfStatics + 1 : iMaxLength; - } - } - } - - // allocate memory for members - iMask = HBufC::NewL( length); - iStatic = new( ELeave )CArrayFixFlat<TKStaticChar>( 3 ); - - // copy aFormatString to iMask except static text - TInt nextStatic = 0; - for ( TInt j = 0; j < length; j++ ) - { - if ( nextStatic < numberOfStatics && - j == statics->At( nextStatic ) ) // is it static? - { - nextStatic++; - iStatic->AppendL - ( TKStaticChar( aFormatString[ j ], j - nextStatic ) ); - } - else - { - iMask->Des().Append( aFormatString[ j ] ); - } - } - - iDynamic = HBufC::NewL( iMinLength ); - - CleanupStack::PopAndDestroy(); // statics - } - -// Two-phased constructor. -CWmlFormatHandler* CWmlFormatHandler::NewLC - ( const TDesC& aFormatString, TWapDocType aWapDocType ) - { - CWmlFormatHandler* self = new( ELeave )CWmlFormatHandler; - CleanupStack::PushL( self ); - self->ConstructL( aFormatString, aWapDocType ); - return self; - } - -// Two-phased constructor. -CWmlFormatHandler* CWmlFormatHandler::NewL - ( const TDesC& aFormatString, TWapDocType aWapDocType ) - { - CWmlFormatHandler* self = NewLC( aFormatString, aWapDocType ); - CleanupStack::Pop(); - return self; - } - -// Destructor -CWmlFormatHandler::~CWmlFormatHandler() - { - delete iMask; - delete iStatic; - delete iDynamic; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::GetTextOnly -// --------------------------------------------------------- -// -HBufC* CWmlFormatHandler::GetTextOnlyL( ) - { - HBufC* newText = HBufC::NewL( iDynamic->Length() ); - TPtr ptr = iDynamic->Des(); - - newText->Des().Copy( ptr ); - return newText; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::SetTextL -// --------------------------------------------------------- -// -TBool CWmlFormatHandler::SetTextL( const TDesC& aText, TBool aNoValidation ) - { - iDynamic->Des().SetLength( 0 ); // ignore previous text - - if(AknLayoutUtils::PenEnabled()) - { - // ignore validation if VKB is in use - // validation will be done on exit - aNoValidation = ETrue; - } - - // insert chars while they are valid - TInt j( 0 ); - TInt textLength( aText.Length() ); - for ( ; - j < textLength && - ( aNoValidation || ValidateChar( aText[ j ], GetFormat( j ) ) ); - j++ ) - { - - if ( !GetFormat( j ).Static() ) - { - InsertL( j, aText[ j ] ); // insert non-static chars - } - } - - return j == textLength; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::TextLC -// --------------------------------------------------------- -// -HBufC* CWmlFormatHandler::TextLC( TBool aReadable ) const - { - HBufC* text = StaticTextLC(); // get static text - TInt staticLength = text->Length(); - TInt dynamicLength = iDynamic->Length(); - TInt dynamicPtr( 0 ); - TInt staticPtr( 0 ); - TInt staticCounter( 0 ); - TInt numberOfStatics( iStatic->Count() ); - // insert dynamic text into the static text as many as possible - for ( ; dynamicPtr < dynamicLength; ++dynamicPtr, ++staticPtr ) - { - // find the next non-static position - while ( staticCounter < numberOfStatics && - iStatic->At( staticCounter ).Pos() == staticPtr ) - { - ++staticCounter; - ++staticPtr; - } - - if ( staticPtr < staticLength ) // is there place for it? - { - /*lint -e{111} Assignment to const object */ - text->Des()[ staticPtr ] = aReadable ? ( *iDynamic )[ dynamicPtr ] - : KObscuringChar()[ 0 ]; - } - else - { - break; - } - } - - if ( dynamicPtr < dynamicLength ) // append the remaining dynamic text - { - HBufC* newText = text->ReAllocL - ( staticLength + dynamicLength - dynamicPtr + 1 ); - - CleanupStack::Pop(); // text - CleanupStack::PushL( newText ); // newText - text = newText; - - if ( aReadable ) - { - for ( ; dynamicPtr < dynamicLength; dynamicPtr++ ) - { - text->Des().Append( ( *iDynamic )[ dynamicPtr ] ); - } - } - else - { - for ( ; dynamicPtr < dynamicLength; dynamicPtr++ ) - { - text->Des().Append( KObscuringChar ); - } - } - } - - text->Des().ZeroTerminate(); - return text; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::InsertL -// --------------------------------------------------------- -// -void CWmlFormatHandler::InsertL( TInt aPos, TChar aChar ) - { - TBuf<1> buf; - buf.Append( aChar ); - InsertL( aPos, buf ); - } - -// --------------------------------------------------------- -// CWmlFormatHandler::InsertL -// --------------------------------------------------------- -// -void CWmlFormatHandler::InsertL( TInt aPos, const TDesC& aDes ) - { - TInt newPos = PosExludingStatic( aPos ); - if ( -1 < newPos && newPos <= iDynamic->Length() ) - { - // make sure there's enough space - TInt newLength = iDynamic->Length() + aDes.Length(); - if ( iDynamic->Des().MaxLength() < newLength ) - { - iDynamic = iDynamic->ReAllocL( newLength ); - } - - iDynamic->Des().Insert( newPos, aDes ); - } - } - -// --------------------------------------------------------- -// CWmlFormatHandler::Delete -// --------------------------------------------------------- -// -TBool CWmlFormatHandler::Delete( TInt aPos, TInt aLength ) - { - TBool status = EFalse; - TInt newPos = PosExludingStatic( aPos ); - if ( -1 < newPos && newPos <= iDynamic->Length() ) - { - iDynamic->Des().Delete( newPos, aLength ); - status = ETrue; - } - return status; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::StaticTextLC -// --------------------------------------------------------- -// -HBufC* CWmlFormatHandler::StaticTextLC() const - { - TInt count = iStatic->Count(); - TInt length = ( count ) ? iStatic->At( count - 1 ).Pos() + 1 : 0; - HBufC* empty = HBufC::NewLC( length + 1 ); - empty->Des().Fill( ' ', length ); - for ( TInt i = 0; i < count; i++ ) - { - TKStaticChar staticChar = iStatic->At( i ); - /*lint -e{111} Assignment to const object */ - empty->Des()[ staticChar.Pos() ] = - STATIC_CAST( TUint16, staticChar.Char() ); - } - - empty->Des().ZeroTerminate(); - return empty; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::NumberOfStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::NumberOfStatic() const - { - return iStatic->Count(); - } - -// --------------------------------------------------------- -// CWmlFormatHandler::GetFormat -// --------------------------------------------------------- -// -TWmlFormatChar CWmlFormatHandler::GetFormat( TInt aIndex ) const - { - TUint code = KWmlFormatNone; - if ( -1 < aIndex ) - { - if ( aIndex < iMask->Length() ) // is it in the mask? - { - code = ( *iMask )[ aIndex ]; - TChar n( code ); - if ( n.IsDigit() || code == KWmlFormatMultiplier ) // nf? *f? - { - ++aIndex; - code = ( *iMask )[ aIndex ]; - } - } - else - { - if ( aIndex < iMaxLength || - iMaxLength == KInfiniteLength ) // is it the postfix? - { - code = iPostFix; - } - } - } - - TInt staticChar = 0; - if ( code == KWmlFormatStatic ) // is it static? - { - for ( TInt i = iStatic->Count() - 1; i > -1; i-- ) - { - if ( iStatic->At( i ).Pos() == aIndex ) - { - staticChar = iStatic->At( i ).Char(); - break; - } - } - } - - return TWmlFormatChar( code, staticChar ); - } - -// --------------------------------------------------------- -// CWmlFormatHandler::PostFix -// --------------------------------------------------------- -// -TWmlFormatChar CWmlFormatHandler::PostFix() const - { - return iPostFix; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::MinLength -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::MinLength() const - { - return iMinLength; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::MaxLength -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::MaxLength() const - { - return iMaxLength; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::ValidateChar -// --------------------------------------------------------- -// -TBool CWmlFormatHandler::ValidateChar - ( TChar aChar, TWmlFormatChar aFormatChar ) const - { - TBool match( EFalse ); - - if ( aFormatChar.Static() ) // is it static? - { - match = ( aChar == aFormatChar.Static() ); - } - else - { - if ( aChar.IsDigit() ) // is it number? - { - match = aFormatChar.NumericAllowed(); - } - else - { - if ( aChar.IsAlpha() ) // is it alphabetical? - { - TWmlFormatChar::TWmlCase forcedCase = aFormatChar.ForcedCase(); - match = ( forcedCase == TWmlFormatChar::EWmlNone ) - ? ETrue - : ( aChar.IsUpper() && - forcedCase == TWmlFormatChar::EWmlUpperCase ) || - ( aChar.IsLower() && - forcedCase == TWmlFormatChar::EWmlLowerCase ); - // If non-western alpha then assume there is no upper and lower case - // - so check for LetterOther or LetterChina/LetterThai (depending upon variant). - // If invalid char for format, value of "match" is retained. - if ( !match && !aChar.IsUpper() && !aChar.IsLower() ) - { - NW_Ucs4 uniCompare; - EVariantFlag variant = AknLayoutUtils::Variant(); - uniCompare = (NW_Ucs4)aChar; - if (variant == EApacVariant) - { - if ( NW_Unicode_IsLetterChina(uniCompare) ) - { - match = ETrue; - } - if ( NW_Unicode_IsLetterThai(uniCompare) ) - { - match = ETrue; - } - } - else if ( NW_Unicode_IsLetterOther(uniCompare) ) - { - match = ETrue; - } - } - } - else - { // it's punctuator or symbol - match = aFormatChar.SpecialAllowed(); - } - } - } - - return match; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::ValidateTextLC -// --------------------------------------------------------- -// -CArrayFixFlat<TInt>* CWmlFormatHandler::ValidateTextLC() const - { - CArrayFixFlat<TInt>* errors = - new( ELeave )CArrayFixFlat<TInt>( 3 ); - CleanupStack::PushL( errors ); - - HBufC* text = TextLC(); - TInt length( text->Length() ); - for ( TInt i = 0; i < length; i++ ) - { - if ( !ValidateChar( ( *text )[ i ], GetFormat( i ) ) ) - { - errors->AppendL( i ); - } - } - - CleanupStack::PopAndDestroy(); // text - return errors; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::ValidateTextL -// --------------------------------------------------------- -// -TBool CWmlFormatHandler::ValidateTextL() const - { - HBufC* text = TextLC(); - TInt length( text->Length() ); - TInt i; - for ( i = 0; - i < length && ValidateChar( ( *text )[ i ], GetFormat( i ) ); - i++ ) - {} - - CleanupStack::PopAndDestroy(); // text - return ( i == length ); - } - -// --------------------------------------------------------- -// CWmlFormatHandler::PosIncludingStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::PosIncludingStatic( TInt aPosExludingStatic ) - { - TInt i = 0; - TInt count = iStatic->Count(); - for ( ; i < count; i++ ) - { - if ( iStatic->At( i ).Pos() <= aPosExludingStatic ) - { - aPosExludingStatic++; - } - } - - return aPosExludingStatic; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::PosExludingStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::PosExludingStatic( TInt aPosIncludingStatic ) - { - // find the nearest static character before aPosIncludingStatic - TInt c = iStatic->Count(); - TInt i (0); - for ( ; - i < c && aPosIncludingStatic >= iStatic->At( i ).Pos(); - i++ ) - { - } - - return ( aPosIncludingStatic - i ); - } - -// --------------------------------------------------------- -// CWmlFormatHandler::PreviousNonStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::PreviousNonStatic( TInt aPos ) - { - TInt posExludingStatic = PosExludingStatic( aPos ); - - return ( -1 < posExludingStatic ) - ? PosIncludingStatic( posExludingStatic ) - : KNotFound; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::NextNonStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::NextNonStatic( TInt aPos ) - { - TInt posExludingStatic = PosExludingStatic( aPos ) + 1; - - return ( posExludingStatic < iDynamic->Length() ) - ? PosIncludingStatic( posExludingStatic ) - : KNotFound; - } - -// --------------------------------------------------------- -// CWmlFormatHandler::FirstEmpty -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::FirstEmpty() - { - return PosIncludingStatic( iDynamic->Length() ); - } - - -// --------------------------------------------------------- -// CWmlFormatHandler::PreviousStatic -// --------------------------------------------------------- -// -TInt CWmlFormatHandler::PreviousStatic( TInt aPos ) - { - TInt prevStaticPos = 0; - TInt i = iStatic->Count() - 1; - for ( ; i >= 0 && iStatic->At( i ).Pos() > aPos; i-- ) - {} - if(i >= 0) - { - prevStaticPos = iStatic->At( i ).Pos() ; - } - return prevStaticPos ; - } - - - -// --------------------------------------------------------- -// CWmlFormatHandler::IsPosStatic -// --------------------------------------------------------- -// -TBool CWmlFormatHandler::IsPosStatic( TInt aPos ) - { - TInt i = iStatic->Count() - 1; - for ( ; i >= 0 && iStatic->At( i ).Pos() != aPos; i-- ) - {} - if(i >= 0) - { - return ETrue; - } - return EFalse; - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1570 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -// INCLUDE FILES -// System includes -#include <calslbs.h> -#include <eikenv.h> -#include <eikedwin.h> -#include <e32std.h> -#include <PtiDefs.h> - -#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS -#include <txtrich.h> -#else -#include <txtrich.h> -#include <txtclipboard.h> -#endif - - -#include <bautils.h> -#include <webkit.rsg> -#include <PUAcodes.hrh> -#include <featmgr.h> -#include <baclipb.h> -#include <aknedsts.h> - -// User includes -#include "nw_fbox_wmlformattededitor.h" -// CONSTANTS - -static const TInt KWmlDefaultTextColor = 215; ///< black (plain text) -static const TInt KWmlFormattedInputErrorColor = 35; ///< TEMP : should be clarified! -const TInt KFullFormattingUpperThreshold=2000; - -// ================= MEMBER FUNCTIONS ======================= - -// C++ default constructor can NOT contain any code, that -// might leave. -// -CWmlFormattedEditor::CWmlFormattedEditor( TBool aIsSecret ) : CEikRichTextEditor() - , iDefaultColour( AKN_LAF_COLOR( KWmlDefaultTextColor ) ) - , iErrorColour( AKN_LAF_COLOR( KWmlFormattedInputErrorColor ) ) - , iPosAtEnd(EFalse) - , iEventKeyEntered(EFalse) - , iDuplicateEvent(EFalse) - , iVkbState(NULL) - { - SetAknEditorPermittedCaseModes( EAknEditorAllCaseModes ); - - UpdateInputModeState(EAknEditorTextInputMode, EAknEditorAllInputModes); - - TUint flags( EAknEditorFlagDefault | - EAknEditorFlagUseSCTNumericCharmap | - EAknEditorFlagNoT9 | EAknEditorFlagMTAutoOverwrite ); - // NOTE: Use of "variant" indicator will be removed in near term - code will be changed - // allowing simpler conditional as EAknEditorFlagLatinInputModesOnly will be allowed - // in European and Apac builds. - EVariantFlag variant = AknLayoutUtils::Variant(); - if (aIsSecret && variant == EApacVariant) - { - UpdateFlagsState( flags | EAknEditorFlagLatinInputModesOnly ); - SetAknEditorCase( EAknEditorLowerCase ); - } - else - { - UpdateFlagsState( flags ); - SetAknEditorCase( EAknEditorTextCase ); - } - SetBorder(TGulBorder::EDeepSunkenWithOutline); - iWmlEdNavigation = EWmlEditorNavigateRight ; - iPenEnabled = AknLayoutUtils::PenEnabled(); - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::InitializeL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::InitializeL -( CWmlFormatHandler* aHandler, TBool aSecret, TWmlMode aMode ) - { - iHandler = aHandler; - iSecret = aSecret; - if ( iSecret && !iHandler ) // T9 must be disabled in password editor - { - iPassword = HBufC::NewL( 1 ); - } - - iMode = aMode; - iPrevMode = EWmlModeNone; - /*lint -e{40} Undeclared identifier 'KFeatureIdJapanese'*/ - if (!FeatureManager::FeatureSupported(KFeatureIdJapanese)) - { - iMode = EWmlModeNone; - } - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::SetDefaultColour -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SetDefaultColour( TRgb aDefaultColour ) - { - iDefaultColour = aDefaultColour; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::SetErrorColour -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SetErrorColour( TRgb aErrorColour ) - { - iErrorColour = aErrorColour; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::EnableT9 -// --------------------------------------------------------- -// -void CWmlFormattedEditor::EnableT9( TBool aEnable, TBool aIsSecret ) - { - iT9 = aEnable; - - TUint flags = iT9 ? EAknEditorFlagDefault | - EAknEditorFlagUseSCTNumericCharmap | EAknEditorFlagMTAutoOverwrite - : EAknEditorFlagDefault | - EAknEditorFlagUseSCTNumericCharmap | - EAknEditorFlagNoT9 | EAknEditorFlagMTAutoOverwrite; - EVariantFlag variant = AknLayoutUtils::Variant(); - if (aIsSecret && variant == EApacVariant) - { - UpdateFlagsState( flags | EAknEditorFlagLatinInputModesOnly ); - } - else - { - UpdateFlagsState( flags ); - } - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::IsSecret -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::IsSecret() const - { - return iSecret; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::ReadableTextL -// --------------------------------------------------------- -// -HBufC* CWmlFormattedEditor::ReadableTextL() const - { - HBufC* result = ReadableTextLC(); - - CleanupStack::Pop(); // result - - return result; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::ReadableTextLC -// --------------------------------------------------------- -// -HBufC* CWmlFormattedEditor::ReadableTextLC() const - { - HBufC* result = NULL; - if ( iHandler ) // formatted? - { - result = iHandler->TextLC(); // zeroterminated - } - else - { - if ( iPassword ) // secret? - { - /*lint --e{1058} nitializing a non-const reference */ - // make a zeroterminated copy - result = HBufC::NewLC( iPassword->Length() + 1); - result->Des() = *iPassword; - result->Des().ZeroTerminate(); - } - else - { - // make a zeroterminated copy - result = HBufC::NewLC( TextLength() + 1 ); - TPtr ptr = result->Des(); - if (TextLength() > 0) - { - GetText( ptr ); - } - - result->Des().ZeroTerminate(); - } - } - return result; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::MarkInvalidCharsL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::MarkInvalidCharsL() - { - if ( iHandler ) - { - // make character format - TCharFormat charFormat; - charFormat.iFontPresentation.iTextColor = iDefaultColour; - TCharFormatMask charFormatMask; - charFormatMask.SetAttrib( EAttColor ); - - // unmark all, by colouring to default - RichText()->ApplyCharFormatL - ( charFormat, charFormatMask, 0, iText->DocumentLength() ); - - charFormat.iFontPresentation.iTextColor = iErrorColour; - const CArrayFixFlat<TInt>* errors = iHandler->ValidateTextLC(); - TInt endIndex = errors->Count() - 1; - for ( ; endIndex > -1; ) // loop through the errors - { - // find a block of errors - TInt startIndex = endIndex - 1; - TInt endPos = errors->At( endIndex ); - for ( ; - startIndex > -1 && - endPos - errors->At( startIndex ) == - endIndex - startIndex; - startIndex-- ) - { // find the lower border of error block - } - - TInt blockLength = endIndex - startIndex; - RichText()->ApplyCharFormatL // colour that block - ( charFormat, - charFormatMask, - errors->At( startIndex + 1 ), - blockLength ); - - endIndex = startIndex; - } - CleanupStack::PopAndDestroy(); // errors - } - UpdateColour(iDefaultColour); - NotifyNewFormatL(); // redraws editor - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::UpdateColour(TRgb aDefaultColour) -// --------------------------------------------------------- -// -void CWmlFormattedEditor::UpdateColour(TRgb aDefaultColour) - { - // make character format - TCharFormat charFormat; - charFormat.iFontPresentation.iTextColor = aDefaultColour; - TCharFormatMask charFormatMask; - charFormatMask.SetAttrib( EAttColor ); - RichText()->ApplyCharFormatL(charFormat, charFormatMask, CursorPos(), 0); - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::FreePassword -// --------------------------------------------------------- -// -void CWmlFormattedEditor::FreePassword() - { - delete iPassword; - iPassword = NULL; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor<Editor>::T9Enabled -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::T9Enabled() const - { - return iT9; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor<Editor>::SetiCursorPos -// Note: when switching modes to and from T9 this will -// prevent duplication of characters when switch from T9 to -// multi-tap input. -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SetiCursorPos() - { - iCursorPos = CursorPos(); - } - -// --------------------------------------------------------- -// CWmlFormattedEditor<Editor>::ResetFlagEventKeyEntered -// Resets flag used to indicate input via EVENTKEY event handling. -// --------------------------------------------------------- -// -void CWmlFormattedEditor::ResetFlagEventKeyEntered() - { - iEventKeyEntered = EFalse; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor<Editor>::IsEventKeyEntered -// Returns iEventKeyEntered, a flag used to indicate when -// key data received via EVENTKEY event handling. -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::IsEventKeyEntered() - { - return iEventKeyEntered; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::SpecialHandlingPasswordL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SpecialHandlingPasswordL() - { - TInt cursorPos( CursorPos() ); - TInt length( CursorPos() - iCursorPos +1); - if (length <= 0) - { - length = 1; - } - TInt firstEmpty( TextLength() ); - if (iHandler && iHandler->NumberOfStatic() > 0) - { - firstEmpty = iHandler->FirstEmpty(); - } - if ( (iFirstEmpty <= firstEmpty ) ) - { // insert character into storage place - if ( IsEventKeyEntered() ) - { - return; // already added by iEditor->OfferKey - } - HBufC* newText = HBufC::NewLC( length ); - TPtr ptr = newText->Des(); - - Text()->Extract( ptr, iCursorPos, length ); - - if ( iHandler ) - { - iHandler->InsertL( iCursorPos, *newText ); - iWmlEdNavigation = EWmlEditorNavigateRight; - } - else - { - if ( iPassword ) - { - TInt newLength( iPassword->Length() + length ); - if ( newLength > iPassword->Des().MaxLength() ) - { - iPassword = iPassword->ReAllocL( newLength + 1); - } - iPassword->Des().Insert( iCursorPos, *newText ); - iWmlEdNavigation = EWmlEditorNavigateRight; - } - } - CleanupStack::PopAndDestroy(); // newText - } - else - { // remove character from storage place - if ( iHandler ) - { - iHandler->Delete( cursorPos, 1 ); // cursorPos already is actual cursor - 1 - SetCursorPosL( 0 ); - iText->Reset(); - CEikRichTextEditor::SetTextL( iHandler->TextLC() ); - CleanupStack::PopAndDestroy(); // for return value of iHandler->TextLC - SetCursorPosL( cursorPos ); - } - else - { - if ( iPassword && cursorPos >= 0 ) - { - iPassword->Des().Delete( cursorPos, 1 ); - } - } - } - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::SpecialStaticHandlingL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SpecialStaticHandlingL() - { - TInt pos = CursorPos(); - TBool adjustPosFlag = EFalse; // if static char in proximity, adjust cursor to get input character. - - // There is no special handling if a DELETE (clear/backspace) has been done. - // We now distinguish between a "NavigateLeft" and a "NavigateDelete". - if ( iWmlEdNavigation == EWmlEditorNavigateDelete ) - { - // reset - iWmlEdNavigation = EWmlEditorNavigateRight; - return; - } - - // This is compensation code for Avkon taking control of cursor movement when looping from last - // char position to first position and Avkon does not send browser input an indication that this is - // happening. - if (iCursorPos > pos) - { - iCursorPos = pos; - if (pos > 0) - { - iCursorPos = pos - 1; - } - } - - // If an input box with static text, prep the text to use - // asking if we are doing an insertion - if ( !IsEventKeyEntered() && iHandler && iHandler->NumberOfStatic()) - { - HBufC* text = NULL; - TInt length = pos - iCursorPos; - if (length > 0) - { - text = HBufC::NewLC( length ); - } - - if ( iWmlEdNavigation == EWmlEditorNavigateLeft ) - { - iCursorPos = pos; // adjust now - if (iCursorPos > 0) - { - --iCursorPos; - } - iWmlEdNavigation = EWmlEditorNavigateRight; - } - - // When a static char is reached during input, the iCursorPos and CursorPos() values indicate the - // correct NEXT location, but edwin seems to ignore where it SHOULD be and the cursor remains on the - // static character location. This code is to compensate in part for this with respect to inserting - // the new character into the saved input area. There is still an issue however - // with edwin / commitinput() re-setting the cursor position to an improper location - that is - it's - // not ahead of the newly inserted character, but behind it. - if ( (pos - 1 >= 0) && iHandler->IsPosStatic( pos - 1 )) - { - --pos; - adjustPosFlag = ETrue; - } - - if ( text ) // with whatever info was obtained, store it into iHandler - { - TPtr ptr = text->Des(); - Text()->Extract( ptr, iCursorPos, length ); - if (adjustPosFlag) - { - iCursorPos = pos; - } - iHandler->InsertL( iCursorPos, *text ); - ++ iNumberOfCharsInStaticInputBox; - CleanupStack::PopAndDestroy(); // text - } - - iCursorPos = pos; - } - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::SpecialCharHandlingL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SpecialCharHandlingL() - { - if (IsSecret() || ( iHandler && iHandler->NumberOfStatic()) ) - { - if ( IsSecret() ) - { - SpecialHandlingPasswordL(); - } - // if secret (that is, type password) -and- static text in format do additional handling - // otherwise if static text in format only (input field is -not- a password type) - // do the additional handling - if (iHandler && iHandler->NumberOfStatic()) - { - SpecialStaticHandlingL(); - } - UpdateStateL( iWmlEdNavigation, ETrue, ETrue ); - } - else - { - if (iHandler) - { - HBufC* text; - text = GetTextInHBufL(); - if ( text ) - { // add the new char entry to locally held storage. If there was a shift in input mode - // from char to numeric, it may have been possible for a char to slip in before the new - // input mode may have taken effect in Avkon - so for right now, remove it. - TInt pos = CursorPos(); - TWmlFormatChar format = iHandler->GetFormat( pos ); - if ( TWmlFormatChar::EWmlNumericCase == format.ForcedCase() ) - { - // really want to delete the inadvertantly added char and add the number for "scancode" - text->Des().Delete(text->Length(), 1); - } - CleanupStack::PushL( text ); - //iHandler->SetTextL( *text, EFalse ); // removes static stuff and stores chars in iHandler.iDynamic - // For VKB we want all chars to show so we shut off validation. - // Validation will still happen when you try to exit the input box. - iHandler->SetTextL( *text, iPenEnabled ); // removes static stuff and stores chars in iHandler.iDynamic - CleanupStack::PopAndDestroy(); // text - } - else - { - iHandler->SetTextL( KNullDesC(), ETrue ); - } - } - } - TInt tempPos = CursorPos(); - UpdateEditingParameters( tempPos ); - - if ( IsEventKeyEntered() && !iInputFormatProcess ) - { - ResetFlagEventKeyEntered(); - } - - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::HandleEdwinEventL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::HandleEdwinEventL -( CEikEdwin* /*aEdwin*/, MEikEdwinObserver::TEdwinEvent aEventType ) - { - switch ( aEventType ) - { - case MEikEdwinObserver::EEventNavigation: // navigation - // Event navigation cannot be done before the text update . - { - // keep cursor away from invalid positions - //SetCursorPosL(iCursorPos); - //CEikEdwin::DrawContents(); - //UpdateStateL( EWmlEditorNavigateRight ); - break; - } - case MEikEdwinObserver::EEventTextUpdate: // updating - { - if (iDuplicateEvent) // ignore extraneous TextUpdate event - this flag is reset when next "EventKey-X" received in OfferKeyEvent - { - return; - } - iDuplicateEvent = ETrue; // set trap to ignore extraneous TextUpdate events - SpecialCharHandlingL(); - break; - } - default: - break; - } - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::InputCapabilities -// --------------------------------------------------------- -// -TCoeInputCapabilities CWmlFormattedEditor::InputCapabilities() const - { - return CEikRichTextEditor::IsFocused() ? - CEikRichTextEditor::InputCapabilities() : - TCoeInputCapabilities( TCoeInputCapabilities::ENone ); - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CWmlFormattedEditor::OfferKeyEventL -( const TKeyEvent& aKeyEvent, TEventCode aType ) - { - UpdateColour(iDefaultColour); - - TInt newCursorPos = 0; // used below in left/right arrow key handling - TWmlEdNavigation naviType = EWmlEditorNavigateRight; - TKeyResponse response = EKeyWasNotConsumed; - iShift = // filters out the popping up of shift menu - aKeyEvent.iCode && aKeyEvent.iModifiers & EModifierShift; - - iDuplicateEvent = EFalse; // reset "trap" for extraneous multi-tap TextUpdate edwin events as we are - // now working on another input (makes no difference if control/numeric/multi-tap). - - if (aType != EEventKey) - { - return response; - } - - TInt pos( CursorPos() ); - switch ( aKeyEvent.iCode ) - { - // "short key press" of clear key for deleting numbers - in mixed formats - but be aware - // deletion of chars (and most nums, depending upon format) is now based upon receiving "EventKeyDown" event (see further down). - // If a default format char/number, deletion of numbers is based upon KeyEvent. Also, special handling - // For cursorPos=0, this case is invoked. - case EKeyBackspace: - { - // When pointing to a static character to delete, adjust the cursor position to preserve the - // static character. - TBool doBackspace = ETrue; - if (iHandler && iHandler->NumberOfStatic()) - { - doBackspace = HandleClearKeyL( pos ); - } - if (doBackspace) - { - response = CEikRichTextEditor::OfferKeyEventL( aKeyEvent, aType ); - SpecialCharHandlingL(); - } - } - break; - - case EKeyLeftArrow: - { - response = CEikRichTextEditor::OfferKeyEventL( aKeyEvent, aType ); - newCursorPos = CursorPos(); - naviType = EWmlEditorNavigateLeft; - // "iShift" set to 1 indicates a COPY (ie, CCPU) operation is in progress. If that is the case, - // do not adjust cursor position. - if (!iShift && iHandler && iHandler->NumberOfStatic() > 0 && iHandler->IsPosStatic( newCursorPos) ) - { - TInt adjustedCursor = iHandler->PreviousNonStatic( newCursorPos ); - if (adjustedCursor >= 0) - { - SetCursorPosL( adjustedCursor ); - } - //else - positioned next to static chars from pos 0 - change cursor pos to end of input - else - { - adjustedCursor = iHandler->FirstEmpty(); - SetCursorPosL( adjustedCursor ); - } - iCursorPos = adjustedCursor; - } - } - break; - - case EKeyDownArrow: - case EKeyUpArrow: - { - response = CEikRichTextEditor::OfferKeyEventL( aKeyEvent, aType ); - } - break; - - case EKeyRightArrow: - { - if (iHandler && iHandler->NumberOfStatic() > 0 && iHandler->FirstEmpty() == pos) - { - SetCursorPosL( 0 ); - return EKeyWasConsumed; - } - response = CEikRichTextEditor::OfferKeyEventL( aKeyEvent, aType ); - newCursorPos = CursorPos(); - // "iShift" set to 1 indicates a COPY (ie, CCPU) operation is in progress. If that is the case, - // do not adjust cursor position. - if (!iShift && iHandler && iHandler->NumberOfStatic() > 0 && iHandler->IsPosStatic( newCursorPos)) - { - newCursorPos = iHandler->NextNonStatic( newCursorPos ); - SetCursorPosL( newCursorPos ); - } - } - iCursorPos = newCursorPos; - naviType = EWmlEditorNavigateRight; - break; - - - default: - { - iEventKeyEntered = ETrue; - iInputFormatProcess = ETrue; - TInt maxLength = iHandler ? iHandler->MaxLength() : KInfiniteLength; - if ( maxLength == KInfiniteLength || - maxLength > MaxLength() ) // is iHandler and iEditor maxlength different? - { - maxLength = MaxLength(); - } - // if the input box is NOT read only and the character in question is NOT a "non character", - // then add the character to the data structure (iDynamic) maintained by class WmlFormatHandler. - if ( !(aKeyEvent.iCode & ENonCharacterKeyBase) && !IsReadOnly() ) - { - if ( iHandler && (iHandler->NumberOfStatic() || iSecret) ) - { - if (iHandler->FirstEmpty() < maxLength ) - { - if ( (TInt)aKeyEvent.iCode == EPtiKey0 && aKeyEvent.iRepeats == 1) - { - iHandler->Delete( pos, 1); - } - iHandler->InsertL( pos, aKeyEvent.iCode ); - if(iHandler->MaxLength() == iHandler->TextLC(ETrue)->Length() && pos < iHandler->MaxLength()) - { - SetCursorPosL(pos+1);// set it to next cursor pos but not > max length - } - CleanupStack::PopAndDestroy();//iHandler->TextLC - naviType = EWmlEditorNavigateRight; - } - } - else - { - if ( iPassword && pos < MaxLength() ) - { - TInt length = iPassword->Length(); - if ( length == iPassword->Des().MaxLength() ) - { - iPassword = - iPassword->ReAllocL( length + 1 ); - } - - TBuf<1> currentChar; - currentChar.Append( aKeyEvent.iCode ); - // long press on KeyPad0, results in calling HandleEdwinEventL and OfferKeyEvent - // so replace the character - if ( (TInt)aKeyEvent.iCode == EPtiKey0 && aKeyEvent.iRepeats == 1) - { - iPassword->Des().Replace( pos, 1, currentChar ); - } - else - { - iPassword->Des().Insert( pos, currentChar ); - } - } - } - } - CEikRichTextEditor::OfferKeyEventL( aKeyEvent, aType ); - SpecialCharHandlingL(); - response = EKeyWasConsumed; - - if (IsEventKeyEntered()) - { - ResetFlagEventKeyEntered(); - } - iInputFormatProcess = EFalse; - break; - } - } - - if ( !iShift) - { - CEikEdwin::DrawContents(); - } - - iWmlEdNavigation = naviType; - return response; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::HandleClearKeyL -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::HandleClearKeyL( const TInt aCursorPos ) - { - TInt pos = aCursorPos; - TBool clearKeyWorked = ETrue; - if (!iHandler || !iHandler->NumberOfStatic()) - { - return clearKeyWorked; // if no iHandler, no special handling necessary - } - - if ( pos <= 0 ) // if there are no user entered chars left, return - { - return !clearKeyWorked; - } - - if ( (pos > 0 || Selection().Length() > 0) && !IsReadOnly() ) - { - TInt startDeletingFrom; - TInt charsToDelete; - - // if there's a selection - delete it - if ( Selection().Length() ) - { - startDeletingFrom = Selection().LowerPos(); - charsToDelete = Selection().Length(); - } - else - { - startDeletingFrom = pos - 1; - charsToDelete = 1; - } - iHandler->Delete( startDeletingFrom, charsToDelete ); - } - else - { - if ( iPassword && pos > 0 ) - { - iPassword->Des().Delete( pos - 1, 1 ); - } - } - iWmlEdNavigation = EWmlEditorNavigateDelete; - return clearKeyWorked; - - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::HandleTextPastedL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::HandleTextPastedL( TInt aStartPos, TInt& aLength ) - { - // aLength == length of selected text, not what is in copy buffer - // aStartPos == starting position in input box (0 based), and includes static text - if (aLength < 1 || aStartPos < 0) - { - return; - } - HBufC* copiedText = HBufC::NewLC( aLength ); - TPtr ptr = copiedText->Des(); - // get what is in the clipboard and should be pasted - Text()->Extract( ptr, aStartPos, aLength ); - - // if there is a format, there is a iHandler, so get the stored text - // from iHandler.iDynamic and manipulate it. Importantly, with this method, we - // don't care if there are static characters in the way when we do - // the pasting. - if ( iHandler ) - { - TInt adjustedSelectedLength = 0; - TInt numberStatics = 0; - if (iSelection.Length()) - { - TInt temp = iSelection.LowerPos(); - // if any static chars in selection, account for them in the length to delete - // from iHandler.iDynamic - for (;temp < iSelection.HigherPos(); ++temp) - { - if (iHandler->IsPosStatic( temp )) - { - ++numberStatics; - } - } - adjustedSelectedLength = iSelection.Length() - numberStatics; - iHandler->Delete( iSelection.LowerPos(), adjustedSelectedLength ); - // if clipboard is giving us more than selected text will allow, accounting for static chars, - // adjust length - if ( aLength > adjustedSelectedLength ) - { - ptr.SetLength( adjustedSelectedLength ); // set lengh of "copiedText" if cannot take all clipboard - } - } - iHandler->InsertL( aStartPos, *copiedText ); - } - else - { // if no iHandler, are we dealing with a password input box & no format - if ( iPassword ) - { - TInt newLength( iPassword->Length() + aLength ); - if ( newLength > iPassword->Des().MaxLength() ) - { - iPassword = - iPassword->ReAllocL( newLength + 1 ); - } - iPassword->Des().Insert( aStartPos, *copiedText ); - } - } - iCursorPos = aStartPos; // save for possible use by UpdateState if eikedwin does not set up cursorpos correctly - CleanupStack::PopAndDestroy(); // copiedText - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::SetTextL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SetTextL( const TDesC* aDes ) - { - TInt pos = 0, length = iText->DocumentLength(); - if ( iHandler ) - { - /*lint -e{62} Incompatible types (basic) for operator ':' */ - iHandler->SetTextL( aDes ? *aDes : KNullDesC ); - HBufC* text = iHandler->TextLC( !iSecret ); - if ( text->Length() ) - { - iText->InsertL( 0, text->Des() ); - pos += text->Length(); - } - CleanupStack::PopAndDestroy(); // text - } - else - { - if ( aDes && aDes->Length() ) - { - const TInt len = aDes->Length(); - if ( iPassword ) - { - HBufC* newPwd = aDes->AllocL(); - - // make illegible copy - HBufC* illegibleText = HBufC::NewLC( len ); - illegibleText->Des().Fill( KObscuringChar()[ 0 ], len ); - - iText->InsertL( 0, *illegibleText ); - pos += len; - - CleanupStack::PopAndDestroy(); // illegibleText - - delete iPassword; // replace password with new one - iPassword = newPwd; - } - else - { - iText->InsertL( 0, *aDes ); - pos += len; - } - } - } - - if ( length ) - { - RichText()->DelSetInsertCharFormatL( pos, length ); - } - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CcpuCanCut -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::CcpuCanCut() const - { - // not formatted nor password and doesn't contain static text - return CEikRichTextEditor::CcpuCanCut() && - !iSecret && - ( !iHandler || !iHandler->NumberOfStatic() ); - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CcpuCutL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::CcpuCutL() - { - TCursorSelection selection = Selection(); - - CEikRichTextEditor::CcpuCutL(); - - if ( iHandler ) - { - iHandler->Delete( selection.LowerPos(), selection.Length() ); - } - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CcpuCanCopy -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::CcpuCanCopy() const - { - return CEikRichTextEditor::CcpuCanCopy() && !iSecret; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CcpuCanPaste -// -// "TRAPD" use adapted from EIKEDWIN.CPP function CcpuCanPaste -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::CcpuCanPaste() const - { - if (!iHandler) - { - return ETrue; // if no active format - nothing to check - } - TRAPD(err, DoCanPasteL()); - return err == KErrNone; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::DoCanPaste -// -// Adapted from EIKEDWIN.CPP function, DoCcpuCanPasteL(). -// It is assumed that iHandler EXISTS for the input box -// under consideration. If it does not exist, then it can be -// assumed that the paste operation may proceed. -// This routine retrieves clipboard info and calls -// CheckPasteAllowedCharsL to see if a paste operation is -// allowed - based upon a comparison with the input box -// format. -// --------------------------------------------------------- -// -void CWmlFormattedEditor::DoCanPasteL() const - { - if (!SelectionLength() && (iTextLimit && (TextLength() >= iTextLimit))) - User::Leave(KErrNotFound); - - CClipboard* cb=CClipboard::NewForReadingL(iCoeEnv->FsSession()); - CleanupStack::PushL(cb); - - TBool richText = ETrue; - TStreamId streamId=cb->StreamDictionary().At(KClipboardUidTypeRichText); - if (streamId==KNullStreamId) - { - streamId=cb->StreamDictionary().At(KClipboardUidTypePlainText); - richText = EFalse; - } - if (streamId==KNullStreamId) - User::Leave(KErrNotFound); - - User::LeaveIfError(CheckPasteAllowedCharsL(*cb, richText)); - - CleanupStack::PopAndDestroy(1); // cb - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CheckPasteAllowedCharsL -// -// Adapted from EIKEDWIN.CPP function, CheckAllowedCharsL, -// this routine validates the characters selected in the -// clipboard against the input box format, if applicable. -// --------------------------------------------------------- -// -TInt CWmlFormattedEditor::CheckPasteAllowedCharsL(CClipboard& aClipboard, TBool aRichText) const - { - CPlainText* txtStore; - CRichText* richText = STATIC_CAST(CRichText*, Text()); - if (aRichText && richText) - { - const CParaFormatLayer* paraFormatLayer=richText->GlobalParaFormatLayer(); - const CCharFormatLayer* charFormatLayer=richText->GlobalCharFormatLayer(); - txtStore = CRichText::NewL(paraFormatLayer, charFormatLayer); - } - else - { - txtStore = CPlainText::NewL(); - } - CleanupStack::PushL(txtStore); - txtStore->PasteFromStoreL(aClipboard.Store(), aClipboard.StreamDictionary(), 0); - TPtrC text = txtStore->Read(0); - - TInt cursorPos = CursorPos(); - TInt length( text.Length() ); - if (length > 0) - { - --length; // in the debugger, clipboard length seems to be 1 greater than it should be - } - TInt adjustedPosition = 0; - TInt err = KErrNone; - for ( TInt i = 0; i < length; i++ ) - { - TChar ch = text[i]; - adjustedPosition = CheckCursorPositionForNextNonStatic(i + cursorPos); - if (adjustedPosition == KNotFound) // assumed the current cursor position is a static character - { - err = KErrNotFound; - break; - } - else if ( ! iHandler->ValidateChar( ch, iHandler->GetFormat( adjustedPosition ) ) ) - { - err = KErrNotFound; - break; - } - } - - CleanupStack::PopAndDestroy(txtStore); - - return err; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::CheckCursorPositionForNextNonStatic -// -// Only interested in checking the current cursor position -// to see if it is a static character. If it is, search for -// the next NON-STATIC cursor position and return that pos. -// If run out of format length, return KNotFound. -// NOTE: The difference between this function and -// CWmlFormatHandler::NextNonStatic is internal input box -// content (iHandler->iDynamic) is not referenced. At this -// point, only interested in what the format mask directs. -// That is why only CWmlFormatHandler::IsPosStatic is used. -// --------------------------------------------------------- -// -TInt CWmlFormattedEditor::CheckCursorPositionForNextNonStatic( TInt aCursorPos ) const - { - if (!iHandler) - { - return aCursorPos; - } - TInt i = 0; - TBool found = ETrue; - TInt length = iHandler->MaxLength(); // quantity of chars entered so far in box considered as maxlength - if (length == KInfiniteLength) - { - length = KFullFormattingUpperThreshold; - } - while ((aCursorPos + i) < length) - { - if (iHandler->IsPosStatic( aCursorPos + i )) - { - ++ i; - found = EFalse; - } - else - { - found = ETrue; - break; - } - } - if (!found) - { - return KNotFound; - } - return (aCursorPos + i); -} - -// --------------------------------------------------------- -// CWmlFormattedEditor::CcpuPasteL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::CcpuPasteL() - { - // selection is cancelled before HandleTextPastedL is called back, so get value now. - iSelection = iTextView->Selection(); - CEikRichTextEditor::CcpuPasteL(); - - if ( iHandler ) - { - UpdateStateL( EWmlEditorNavigateRight ); - } - else - { - if ( iPassword ) - { - UpdateStateL( EWmlEditorNavigateRight, EFalse ); - } - } - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::UpdateStateL -// --------------------------------------------------------- -// -void CWmlFormattedEditor::UpdateStateL( TWmlEdNavigation aNaviType, - TBool aUpdateEditingParameters, - TBool aTextChanged ) - { - TInt pos( CursorPos() ); - - if ( iHandler ) - { - if (pos > iHandler->FirstEmpty()) // if eikedwin does not set cursor pos correctly - { - pos = iCursorPos; - } - HBufC* tempText = ReadableTextL(); - if (iHandler->NumberOfStatic()) - { - iFirstEmpty = iHandler->FirstEmpty(); // iHandler->MaxLength(); - } - else - { - iFirstEmpty = tempText->Length(); - } - delete tempText; - - if ( aNaviType != EWmlEditorNavigateRight ) - { - for ( ; pos > 0 && iHandler->GetFormat( pos ).Static(); --pos ) - ; - } - - if ( iHandler->GetFormat( pos ).Static() || - aNaviType == EWmlEditorNavigateRight ) - { - for ( ; pos < iFirstEmpty && iHandler->GetFormat( pos ).Static() - ; ++pos ) - ; - } - - SetCursorPosL( 0 ); - iText->Reset(); - CEikRichTextEditor::SetTextL( iHandler->TextLC()); - CleanupStack::PopAndDestroy(); // return value of iHandler->TextLC - if ( iSecret && aNaviType == EWmlEditorNavigateRight ) - { - SetCursorPosL( pos ); - CEikRichTextEditor::SetTextL( iHandler->TextLC( EFalse ) ); - CleanupStack::PopAndDestroy(); // return value of iHandler->TextLC - } - } - else - { // no format involved, so simply use the length of text entered so far - iFirstEmpty = TextLength(); - if ( iSecret ) // if password input, update what Avkon with changes - { - HBufC* text = GetTextInHBufL(); - if ( text ) - { - CleanupStack::PushL( text ); - text->Des().Fill( KObscuringChar()[ 0 ] ); - CEikRichTextEditor::SetTextL( text ); - CleanupStack::PopAndDestroy(); // text - } - } - } - - // set editor cursor to correct position - if ( pos != CursorPos() ) - { - TCursorSelection selection = Selection(); - if ( aTextChanged || selection.LowerPos() == selection.HigherPos()) - { - if (iHandler && iHandler->PosIncludingStatic( iHandler->FirstEmpty() ) < pos) - { - pos = iHandler->PosIncludingStatic( iHandler->FirstEmpty() ); - } - SetSelectionL( pos, pos ); - } - else - { - - if (aNaviType == EWmlEditorNavigateRight) - // Set the selection from right most selection point to the current cursor pos. - SetSelectionL ( pos , iHandler->IsPosStatic(selection.LowerPos()) ? selection.LowerPos() + 1 : selection.LowerPos() ); - else - // Set the selection from current cursor pos to left most selection point - SetSelectionL (pos , iHandler->IsPosStatic(selection.HigherPos()) ? selection.HigherPos() - 1 : selection.HigherPos()); - } - } - - iSelection = Selection(); - iCursorPos = pos; - iOverwrite = EFalse; - - if ( aUpdateEditingParameters ) - { - UpdateEditingParameters( pos ); // Change parameters - } - - SetCursorPosL(pos); - CEikEdwin::ReportEdwinEventL(MEikEdwinObserver::EEventTextUpdate); - - CEikEdwin::DrawContents(); - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::UpdateEditingParameters -// --------------------------------------------------------- -// -TBool CWmlFormattedEditor::UpdateEditingParameters( TInt aDocPos ) - { - if (aDocPos < 0) - { - aDocPos = 0; - iFormat = TWmlFormatChar(0,0); - } - TUint inputMode( EAknEditorNullInputMode ); - TUint allowedInputModes( EAknEditorAllInputModes ); - TUint fepCase( EAknEditorAllCaseModes ); - TUint flags( EAknEditorFlagDefault ); - TBool needsChange( EFalse ); - - TUint alphaInputModes; - TUint numericInputModes; - EVariantFlag variant = AknLayoutUtils::Variant(); - if (variant == EApacVariant) - { - alphaInputModes = EAknEditorTextInputMode | - EAknEditorHalfWidthTextInputMode | EAknEditorFullWidthTextInputMode | - EAknEditorKatakanaInputMode | EAknEditorFullWidthKatakanaInputMode | - EAknEditorHiraganaKanjiInputMode | EAknEditorHiraganaInputMode; - numericInputModes = EAknEditorNumericInputMode | EAknEditorFullWidthNumericInputMode; - } - else - { - alphaInputModes = EAknEditorTextInputMode; - numericInputModes = EAknEditorNumericInputMode; - } - - if ( iT9 ) - { - inputMode = EAknEditorTextInputMode; - } - else - { - flags |= EAknEditorFlagNoT9; - if ( ! iHandler ) - { - inputMode = EAknEditorTextInputMode; - } - } - - if ( iHandler ) - { - TWmlFormatChar format = iHandler->GetFormat( aDocPos ); - - if ( iFormat.Char() != format.Char() ) - { - if ( format.Char() || iT9 ) - { - needsChange = ETrue; - } - - if ( format.SuggestedCase() == TWmlFormatChar::EWmlUpperCase ) - { - fepCase = EAknEditorUpperCase; - } - - if (format.SpecialAllowed()) - { - flags |= EAknEditorFlagUseSCTNumericCharmap ; - } - - if ( format.ForcedCase() != TWmlFormatChar::EWmlNone ) - { - flags |= EAknEditorFlagFixedCase; - } - - if ( format.NumericAllowed() ) - { - inputMode = EAknEditorNumericInputMode; - } - else - { - allowedInputModes &= ~numericInputModes; - } - - if ( format.AlphaAllowed() ) - { - inputMode = EAknEditorTextInputMode; - } - else - { - allowedInputModes &= ~alphaInputModes; - } - iFormat = format; - } - } - else - { - flags |= EAknEditorFlagUseSCTNumericCharmap ; - - // WML format takes precedence over JSky mode or istyle, - // but if no wml format is defined look at JSky attributes. - if ( iMode != iPrevMode ) - { - needsChange = ETrue; - switch ( iMode ) - { - case EWmlModeAlphabet: - { - inputMode = EAknEditorTextInputMode; - break; - } - case EWmlModeNumeric: - { - inputMode = EAknEditorNumericInputMode; - break; - } - case EWmlModeHiragana: - { - inputMode = EAknEditorHiraganaKanjiInputMode; - break; - } - case EWmlModeKatakana: - { - inputMode = EAknEditorFullWidthKatakanaInputMode; - break; - } - case EWmlModeHankakukana: - { - inputMode = EAknEditorKatakanaInputMode; - break; - } - default: - break; - - } - - iPrevMode = iMode; - } - } - if (iSecret) - { - EVariantFlag variant = AknLayoutUtils::Variant(); - if (variant == EApacVariant) - { - flags |= EAknEditorFlagLatinInputModesOnly; - } - UpdateCaseState(fepCase, fepCase); - } - else - { - allowedInputModes &= ~EAknEditorSecretAlphaInputMode; - } - if (!allowedInputModes) - { - inputMode = EAknEditorNullInputMode; - } - if (iHandler) - { - iOverwrite = iHandler->PreviousStatic(iHandler->MaxLength()) > CursorPos(); - } - if ( needsChange ) - { - UpdateInputModeState(inputMode, - ( inputMode != EAknEditorNullInputMode ? allowedInputModes : EAknEditorAllInputModes )); - - UpdateFlagsState( iOverwrite - ? flags | EAknEditorFlagMTAutoOverwrite - : flags &~ EAknEditorFlagMTAutoOverwrite ); - - UpdateCaseState(fepCase, fepCase); - } - else - { - TBool overWrite( AknEdwinFlags() & EAknEditorFlagMTAutoOverwrite ); - if ( !overWrite && iOverwrite || - overWrite && !iOverwrite ) - { // iOverwrite is changed, flags must be updated - UpdateFlagsState( iOverwrite - ? flags | EAknEditorFlagMTAutoOverwrite - : flags &~ EAknEditorFlagMTAutoOverwrite ); - needsChange = ETrue; - } - } - return needsChange; - } - -// --------------------------------------------------------- -// CWmlFormattedEditor::SetEditorCurentCase() -// --------------------------------------------------------- -// -void CWmlFormattedEditor::SetEditorCurentCase() - { - TUint fepCase = EAknEditorTextCase; - if (iHandler) - { - TWmlFormatChar format = iHandler->GetFormat(CursorPos()); - TWmlFormatChar::TWmlCase caseFormat = format.SuggestedCase(); - switch( caseFormat ) - { - case TWmlFormatChar::EWmlUpperCase : - fepCase = EAknEditorUpperCase; - break; - - case TWmlFormatChar::EWmlLowerCase : - fepCase = EAknEditorLowerCase; - break; - - default : - fepCase = EAknEditorTextCase; - break; - } - } - UpdateCaseState( fepCase, EAknEditorAllCaseModes ); - } - - -// --------------------------------------------------------- -// CWmlFormattedEditor::Draw -// --------------------------------------------------------- -// -void CWmlFormattedEditor::Draw(const TRect& /*aRect*/) const - { - CGraphicsContext& gc = SystemGc(); - TRect internalRect = Rect(); - internalRect.Shrink( 1, 1 ); - iBorder.Draw( gc, internalRect ); - - const TRect viewRect = iTextView->ViewRect(); - if (IsDimmed()) - gc.SetBrushColor(iEikonEnv->ControlColor(EColorControlDimmedBackground, *this)); - else - gc.SetBrushColor(iEikonEnv->ControlColor(EColorControlBackground, *this)); - DrawUtils::ClearBetweenRects(gc, iBorder.InnerRect(internalRect), viewRect); - TrappedDraw(viewRect); - } - -void CWmlFormattedEditor::DrawContents() - { - CEikEdwin::DrawContents(); - } - -// ----------------------------------------------------------------------------- -// UpdateFlagsState -// -// -// ----------------------------------------------------------------------------- -void CWmlFormattedEditor::UpdateFlagsState(TUint flags) -{ - SetAknEditorFlags( flags ); - - if (iVkbState) - { - iVkbState->SetFlags(flags | EAknEditorFlagUseSCTNumericCharmap); - iVkbState->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateFlagsUpdate); - } -} - -// ----------------------------------------------------------------------------- -// UpdateInputModeState -// -// -// ----------------------------------------------------------------------------- -void CWmlFormattedEditor::UpdateInputModeState(TUint inputMode, TUint permittedInputModes) -{ - SetAknEditorNumericKeymap( EAknEditorPlainNumberModeKeymap ); - SetAknEditorAllowedInputModes( permittedInputModes ); - SetAknEditorInputMode( inputMode ); - - if (iVkbState) - { - - if (permittedInputModes != EAknEditorNumericInputMode) { - EVariantFlag variant = AknLayoutUtils::Variant(); - if (variant == EApacVariant) { - permittedInputModes |= EAknEditorTextInputMode | - EAknEditorHalfWidthTextInputMode | EAknEditorFullWidthTextInputMode | - EAknEditorKatakanaInputMode | EAknEditorFullWidthKatakanaInputMode | - EAknEditorHiraganaKanjiInputMode | EAknEditorHiraganaInputMode; - - } - } - - iVkbState->SetDefaultInputMode(inputMode); - iVkbState->SetCurrentInputMode(inputMode); - iVkbState->SetPermittedInputModes(permittedInputModes); - iVkbState->SetNumericKeymap(static_cast<TAknEditorNumericKeymap>(EAknEditorPlainNumberModeKeymap)); - - iVkbState->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateInputModeUpdate); - } -} - -// ----------------------------------------------------------------------------- -// UpdateCaseState -// -// -// ----------------------------------------------------------------------------- -void CWmlFormattedEditor::UpdateCaseState(TUint currentCase, TUint permittedCase) -{ - SetAknEditorCurrentCase( currentCase ); - - if (iVkbState) - { - iVkbState->SetDefaultCase(currentCase); - iVkbState->SetCurrentCase(currentCase); - iVkbState->SetPermittedCases(permittedCase); - - iVkbState->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateCaseModeUpdate); - } -} - -void CWmlFormattedEditor::SetCursorPosL( TInt aPos ) - { - CEikRichTextEditor::SetCursorPosL( aPos, EFalse ); - TextView()->SetDocPosL(aPos); - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/fbox/src/KeyBoardEvent.c --- a/webengine/wmlengine/src/fbox/src/KeyBoardEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_fbox_keyboardeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_FBox_KeyBoardEvent_Class_t NW_FBox_KeyBoardEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_FBox_KeyBoardEvent_t), - /* construct */ _NW_FBox_KeyBoardEvent_Construct, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ NW_Object_Unused - }, - { /* NW_FBox_KeyBoardEvent */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_FBox_KeyBoardEvent_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_FBox_KeyBoardEvent_t* thisObj; - - /* for convenience */ - thisObj = NW_FBox_KeyBoardEventOf (dynamicObject); - - /* initialize our members */ - thisObj->c = (NW_Ucs2)va_arg (*argp, NW_Uint32); - thisObj->keyType = va_arg (*argp, NW_FBox_KeyBoardEvent_KeyType_t); - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_FBox_KeyBoardEvent_Initialize (NW_FBox_KeyBoardEvent_t* event, - NW_Ucs2 c, NW_FBox_KeyBoardEvent_KeyType_t keyType) -{ - return NW_Object_Initialize (&NW_FBox_KeyBoardEvent_Class, event, (NW_Uint32)c, keyType); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/GDIDevicecontext.h --- a/webengine/wmlengine/src/gdi/include/GDIDevicecontext.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,685 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: gdi interface -* -*/ - - -#ifndef _GDIDEVICECONTEXT_H -#define _GDIDEVICECONTEXT_H - -// INCLUDES -#include <AknUtils.h> -#include "nw_object_dynamic.h" -#include "GDIFont.h" -#include "BrsrTypes.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS -enum TGDIDeviceContextFontSizeLevel - { - EGDIDeviceContextFontSizeLevelAllSmall, - EGDIDeviceContextFontSizeLevelSmaller, - EGDIDeviceContextFontSizeLevelNormal, - EGDIDeviceContextFontSizeLevelLarger, - EGDIDeviceContextFontSizeLevelAllLarge - }; - -// fonts to be created : italic12, bold-italic12, plain13, italic13, -// bold-italic13, plain17, italic17, bold-italic17 -const TInt8 KNumberOfFonts = 8; - -// Browser specific font types -// -enum TGDIDeviceContextFontNames - { - ELatinItalic12, - ELatinBoldItalic12, - ELatinPlain13, - ELatinItalic13, - ELatinBoldItalic13, - ELatinPlain17, - ELatinItalic17, - ELatinBoldItalic17 - }; - -enum TGDISupportedLanguage - { - EElafLanguage, - EThaiLanguage, - EJapaneseLanguage, - EChinesePRCLanguage, - EChinaHKTWLanguage - }; - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* CGDIDeviceContext -* -* @lib BrowserEngine.dll -* @since 2.1 -*/ -class CGDIDeviceContext : public CBase -{ - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @return CGDIDeviceContext* - */ - static CGDIDeviceContext* NewL( void* aGraphicsContext, CView* aOocEpoc32View ); - - /** - * Destructor. - */ - virtual ~CGDIDeviceContext(); - - public: // New functions - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void DrawImage( const NW_GDI_Point2D_t* aLocation, - const NW_GDI_Rectangle_t* aRectangle, - NW_GDI_ImageBlock_t* aImageBlock ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode ScaleImage( const NW_GDI_Dimension3D_t* aSize, - const NW_GDI_ImageBlock_t* aImageBlock, - NW_GDI_ImageBlock_t* aScaledImageBlock ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void DrawPixel( const NW_GDI_Point2D_t* aLocation ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode DrawPolyline( NW_GDI_Metric_t aNumPoints, - const NW_GDI_Point2D_t* aPoints, - TBool aClosed ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void DrawRectangle( const NW_GDI_Rectangle_t* aRectangle ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - - TBrowserStatusCode DrawText( const NW_GDI_Point2D_t* aLocation, - const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aSpacing, - NW_GDI_TextDecoration_t aDecoration, - NW_GDI_FlowDirection_t aDir, - NW_GDI_Metric_t aWidth ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void FillRectangle( const NW_GDI_Rectangle_t* aRectangle ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode GetColorPalette( NW_GDI_ColorPalette_t* aColPalette ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Color_t BackgroundColor () const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Rectangle_t ClipRect () const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - const NW_GDI_Rectangle_t* DisplayBounds () const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TUint8 DisplayDepth() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Pattern_t FillPattern() const; - - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode GetFlowDirection( NW_Text_t* aText, - NW_GDI_FlowDirection_t* aFlowDirection) const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Color_t ForegroundColor() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Pattern_t LinePattern() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Metric_t LineWidth() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - const NW_GDI_Point2D_t* Origin() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_PaintMode_t PaintMode() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void* GetScaledCFont( CGDIFont* aFont ) const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_TextDirection_t TextDirection() const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode GetTextExtent( const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_GDI_Dimension2D_t* aExtent) const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void PreDraw(); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void PostDraw( TBool aDrawNow ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetBackgroundColor( NW_GDI_Color_t aColor ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetClipRect( const NW_GDI_Rectangle_t* aClipRect ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetFillPattern( NW_GDI_Pattern_t aFillPattern ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetForegroundColor( NW_GDI_Color_t aColor ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetLinePattern( NW_GDI_Pattern_t aLinePattern ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetLineWidth( NW_GDI_Metric_t aLineWidth ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetOrigin( const NW_GDI_Point2D_t* aOrigin ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetPaintMode( NW_GDI_PaintMode_t aPaintMode ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetTextDirection( NW_GDI_TextDirection_t aTextDirection ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetDisplayBounds( const NW_GDI_Rectangle_t* aDisplaybounds ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - CGDIFont* CreateFont( const NW_Text_t* aFamily, - TGDIFontStyle aStyle, - TUint8 aSizeInPixels, - TUint16 aWeight, - TGDIFontVariant aVariant) const; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void DrawLine( NW_GDI_Point2D_t aStartPoint, NW_GDI_Point2D_t aEndPoint ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBool SetFontSizeLevel(); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void ChangeFontSize( CGDIFont* aFont ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void GetHighlightColor( NW_GDI_Color_t* aColor ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SwitchAgainstBG( NW_GDI_Color_t* aColor ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode SplitText( NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength, - TUint8 aMode ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode GetSubstringExtent( const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_Text_Length_t aStart, - NW_Text_Length_t aLength, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_GDI_Dimension2D_t* aExtent ); - - /** - * This method - * @since 2.1 - * @param TFontSpec which specifies the font family and the height of the font - * the caller of this method wishes to find. - * @return pointer to a CFont object which will have been found in the iFontCache - * or have been created if the font was not already in the cache - */ - CFont* FindFont( TFontSpec aFontSpec ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetRemoveNbsp( TBool aFlag ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBool RemoveNbsp(); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetGraphicsContext( void* aGraphicsContext ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void SetFontSizeLevel( TGDIDeviceContextFontSizeLevel aFontSizeLevel ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - EVariantFlag VariantFlag(); - - /** - * This method - * @since 2.x - * @param - * @return - */ - inline CWsScreenDevice* WsScreenDevice() { return iWsScreenDev; }; - - /** - * This method - * @since 2.x - * @param - * @return - */ - TGDISupportedLanguage SupportedLanguage(); - - private: // New functions - - /** - * C++ default constructor. - */ - CGDIDeviceContext(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - TBrowserStatusCode ConstructL( void* aGraphicsContext, CView* aOocEpoc32View ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - NW_GDI_Color_t SwapColorBytes( NW_GDI_Color_t aColor ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - CBitmapContext* Epoc32GraphicsContext(); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode WordWrap ( NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode SplitAtNewline ( NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aCconstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode Truncate ( NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - TBrowserStatusCode ScaleBitmap( CFbsBitmap* aBitmap, - CFbsBitmap** aScaledBitmap, - TRect* aRect ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - void InitializeGraphicsContext(); - - /** - * Checks whether or not a line split (word wrap) can occur between the two - * characters specified. - * @since 2.6 - * @param aChar1 First character. - * @param aChar2 Second character. - * @return ETrue if split can occur between the two characters; else, EFalse. - */ - TBool CanSplit(TText16 aChar1, TText16 aChar2); - - /** - * Checks whether or not the two consecutive characters are within a single - * Thai script "cell". - * @since 2.6 - * @param aChar1 First character. - * @param aChar2 Second character. - * @return ETrue if is in a single Thai script "cell"; else, EFalse. - */ - TBool - IsThaiCell( TText16 aChar1, TText16 aChar2 ); - - - private: // Data - - // - EVariantFlag iVariantFlag; - // - CFontCache* iFontCache; - // - CWsScreenDevice* iWsScreenDev; - // used for removing nbsp in vertical-layout mode - TBool iRemoveNbsp; - // is a CBitmapContext* - void* iGraphicsContext; - // - NW_GDI_Point2D_t iOrigin; - // - TGDIDeviceContextFontSizeLevel iFontSizeLevel; - // - NW_GDI_Pattern_t iFillPattern; - // - NW_GDI_Pattern_t iLinePattern; - // - NW_GDI_Metric_t iLineWidth; - // - NW_GDI_PaintMode_t iPaintMode; - // - NW_GDI_TextDirection_t iTextDirection; - // - NW_GDI_Color_t iForegroundColor; - // - NW_GDI_Color_t iBackgroundColor; - // - NW_GDI_Rectangle_t iDisplayBounds; - // - NW_GDI_Rectangle_t iClipRect; - // - CView* iOocEpoc32View; - // - NW_Int32 iResourceFileOffset; - // - TGDISupportedLanguage iSupportedLanguage; -}; - -#endif // _GDIDEVICECONTEXT_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/GDIFont.h --- a/webengine/wmlengine/src/gdi/include/GDIFont.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,218 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: font interface -* -*/ - - -#ifndef _GDIFONT_H -#define _GDIFONT_H - -// INCLUDES -#include "nw_object_dynamic.h" -#include "nw_gdi_types.h" -#include "NW_GDI_EXPORT.h" -#include "BrsrTypes.h" -#include "BrsrStatusCodes.h" -#include "e32base.h" - -// DATA TYPES -struct TGDIFontInfo - { - TUint8 height; - TUint8 baseline; - }; - -enum TGDIFontStyle - { - EGDIFontStyleNormal = 1, - EGDIFontStyleItalic, - EGDIFontStyleOblique - }; - -enum TGDIFontVariant - { - EGDIFontVariantNormal = 1, - EGDIFontVariantSmallCaps - }; - -// CONSTANTS -const NW_Text_t* const KGDIFontDefaultFamily = NULL; -const TUint8 KGDIFontDefaultStyle = EGDIFontStyleNormal; -const NW_Float32 KGDIFontDefaultSizeInPt = 6.0F; // 6pt -const TUint8 KGDIFontZeroSize = 0; -const TUint16 KGDIFontDefaultWeight = 400; -const TUint8 KGDIFontDefaultVariant = EGDIFontVariantNormal; -const TUint16 KGDIDefaultFontSizeInTwips = 120; - -// MACROS - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -typedef struct - { - const char* iSpecifiedFontName; - const char* iDefaultFontName; - }TFontLookupArray; - -/** -* CGDIDeviceContext -* -* @lib BrowserEngine.dll -* @since 2.1 -*/ -class CGDIFont : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @return CCSSHandler* - */ - static CGDIFont* NewL( const CGDIDeviceContext* aDeviceContext, - const NW_Text_t* aFamily, - TGDIFontStyle aStyle, - TUint16 aSize, - TUint16 aWeight, - TGDIFontVariant aVariant ); - - /** - * Destructor. - */ - virtual ~CGDIFont(); - - public: // New functions - - /** - * This method - * @since 2.1 - * @param - this parameter is in twips - * @return - */ - void SetFontSize( TUint16 aFontSize ); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - inline TDesC* FontFamily() { return iFontFamily; }; - - /** - * This method - * @since 2.1 - * @param - * @return TUint16 - the font size in twips - */ - inline TUint16 FontSize() { return iFontSize; }; - - /** - * This method - * @since 2.x - * @param - * @return TUint16 - the declared or default font size in twips - */ - inline TUint16 DeclaredFontSize() { return iDeclaredFontSizeInTwips; }; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - inline TGDIFontVariant FontVariant() { return iFontVariant; }; - - /** - * This method - * @since 2.1 - * @param - * @return TUint16 - */ - inline TUint16 FontWeight() { return iFontWeight; }; - - /** - * This method - * @since 2.1 - * @param - * @return - */ - inline TGDIFontStyle FontStyle() { return iFontStyle; }; - - /** - * This method - * @since 2.x - * @param TGDIFontInfo* whose height and baseline data will be populated - * @return TBrowserStatusCode - */ - TBrowserStatusCode GetFontInfo( TGDIFontInfo* aFontInfo ); - - /** - * This method - * @since 2.x - * @param - * @return TUint8 width of the average character in pixels (based off of the 'w' character) - */ - TUint8 GetAverageCharWidthInPixels(); - - /** - * This method - * @since 2.1 - * @param - * @return - */ - const void* GetEpocNativeFont(); - - private: // New functions - - /** - * C++ default constructor. - */ - CGDIFont(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( const CGDIDeviceContext* aDeviceContext, - const NW_Text_t* aFamily, - TGDIFontStyle aStyle, - TUint16 aSize, - TUint16 aWeight, - TGDIFontVariant aVariant ); - - private: // Data - // - HBufC* iFontFamily; - // The font size value in twips - TUint16 iFontSize; - // - TUint16 iDeclaredFontSizeInTwips; - // - TGDIFontVariant iFontVariant; - // - TGDIFontStyle iFontStyle; - // - TUint16 iFontWeight; - // - CGDIDeviceContext* iDeviceContext; - // - TBool iFontFound; - }; - - -#endif // _GDIFONT_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/NW_GDI_EXPORT.h --- a/webengine/wmlengine/src/gdi/include/NW_GDI_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_GDI_EXPORT_h_ -#define _NW_GDI_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_GDI_EXPORT -#ifdef NW_IMPORT -#define NW_GDI_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_GDI_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_GDI_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_GDI_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/nw_gdi_epoc32types.h --- a/webengine/wmlengine/src/gdi/include/nw_gdi_epoc32types.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_GDI_EPOC32TYPES_H -#define NW_GDI_EPOC32TYPES_H - -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -typedef NW_Int32 NW_GDI_Metric_t; - -typedef enum NW_GDI_Pattern_e { - NW_GDI_Pattern_None, /* CGraphicsContext::ENullPen */ - NW_GDI_Pattern_Solid, /* CGraphicsContext::ESolidPen */ - NW_GDI_Pattern_Dotted, /* CGraphicsContext::EDottedPen */ - NW_GDI_Pattern_Dashed, /* CGraphicsContext::EDashedPen */ -} NW_GDI_Pattern_t; - -typedef enum NW_GDI_PaintMode_e { - NW_GDI_PaintMode_Copy=0x20, /* CGraphicsContext::EDrawModePEN */ - NW_GDI_PaintMode_Or, - NW_GDI_PaintMode_XOr, - NW_GDI_PaintMode_And, - NW_GDI_PaintMode_Not, - NW_GDI_PaintMode_Blink -} NW_GDI_PaintMode_t; - -typedef enum NW_GDI_TextDirection_e { - NW_GDI_TextDirection_Horizontal, - NW_GDI_TextDirection_HorizontalUpDown, - NW_GDI_TextDirection_VerticalTopDown, - NW_GDI_TextDirection_VerticalBottomUp -} NW_GDI_TextDirection_t; - - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - -#endif /* NW_GDI_EPOC32TYPES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/nw_gdi_types.h --- a/webengine/wmlengine/src/gdi/include/nw_gdi_types.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_GDI_TYPES_H -#define NW_GDI_TYPES_H - -#include "nwx_defs.h" -#include "nw_gdi_epoc32types.h" -#include "nwx_buffer.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef NW_Uint32 NW_GDI_Color_t; -enum { - NW_GDI_Color_Black = 0x00000000, - NW_GDI_Color_Red = 0x00ff0000, - NW_GDI_Color_Green = 0x0000ff00, - NW_GDI_Color_Blue = 0x000000ff, - NW_GDI_Color_White = 0x00ffffff, - NW_GDI_Color_Transparent = 0x01000000, - -}; - -#define NW_GDI_RGB(r,g,b) ((NW_GDI_Color_t)(((NW_Byte)(b)|((NW_Word)((NW_Byte) \ - (g))<<8))|(((NW_Dword)(NW_Byte)(r))<<16))) -#define NW_GDI_GetRValue(rgb) ((NW_Byte)((rgb)>>16)) -#define NW_GDI_GetGValue(rgb) ((NW_Byte)(((NW_Word)(rgb)) >> 8)) -#define NW_GDI_GetBValue(rgb) ((NW_Byte)(rgb)) - -typedef struct NW_GDI_ColorPalette_s { - NW_GDI_Color_t *colors; - NW_Int32 numColors; -} NW_GDI_ColorPalette_t; - -typedef struct NW_GDI_Point2D_s { - NW_GDI_Metric_t x; - NW_GDI_Metric_t y; -} NW_GDI_Point2D_t, NW_GDI_Delta_t; - -typedef struct NW_GDI_Dimension2D_s { - NW_GDI_Metric_t width; - NW_GDI_Metric_t height; -} NW_GDI_Dimension2D_t; - -typedef struct NW_GDI_Dimension3D_s { - NW_GDI_Metric_t width; - NW_GDI_Metric_t height; - NW_GDI_Metric_t depth; -} NW_GDI_Dimension3D_t; - -typedef struct NW_GDI_Rectangle_s { - NW_GDI_Point2D_t point; - NW_GDI_Dimension2D_t dimension; -} NW_GDI_Rectangle_t; - -typedef enum NW_GDI_FlowDirection_e { - NW_GDI_FlowDirection_LeftRight, - NW_GDI_FlowDirection_RightLeft, - NW_GDI_FlowDirection_TopDown, - NW_GDI_FlowDirection_BottomUp, - NW_GDI_FlowDirection_Unknown -} NW_GDI_FlowDirection_t; - -typedef enum NW_GDI_Image_ConvertToNativeFormat_e { - NW_GDI_Image_ConversionNotRequired = 0, - NW_GDI_Image_ConversionRequired -} NW_GDI_Image_ConvertToNativeFormat_t; - -typedef enum NW_GDI_SplitModes_e { - NW_GDI_SplitMode_WordWrap, - NW_GDI_SplitMode_Clip, - NW_GDI_SplitMode_Truncate, - NW_GDI_SplitMode_Newline -} NW_GDI_SplitFlags_t; - -typedef enum NW_GDI_TextDecoration_e { - NW_GDI_TextDecoration_None = 0x00, - NW_GDI_TextDecoration_Underline = 0x01, - NW_GDI_TextDecoration_Overline = 0x02, - NW_GDI_TextDecoration_Strikeout = 0x04 -} NW_GDI_TextDecoration_t; - -typedef struct NW_GDI_ImageBlock_s { - NW_GDI_Dimension3D_t size; - const void* data; - const void* mask; - NW_Bool invertedMask; - NW_Buffer_t colPalette; - NW_Bool isTransparent; - NW_GDI_Color_t transparencyIndex; - NW_GDI_Image_ConvertToNativeFormat_t conversionStatus; -} NW_GDI_ImageBlock_t; - - -#ifdef __cplusplus -} /* extern "C" { */ -#endif /* __cplusplus */ - -#endif /* NW_GDI_TYPES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/include/nw_gdi_utils.h --- a/webengine/wmlengine/src/gdi/include/nw_gdi_utils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_GDI_UTILS_H -#define NW_GDI_UTILS_H - -#include "nw_gdi_types.h" -#include "NW_GDI_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -NW_GDI_EXPORT -NW_Bool -NW_GDI_Rectangle_Contains (const NW_GDI_Rectangle_t* rect, - const NW_GDI_Point2D_t* point); - -/** -* NW_GDI_Rectangle_Cross -* @description This method is useful to see if two rectangles overlap. There -* are 3 cases to consider: -* (1) The rectangles do not overlap -* (2) The rectangles partially overlap -* (3) One rectangle completely encloses the other rectangle -* Case (1): If the rectangles do not overlap, NW_GDI_Rectangle_Cross will return -* NW_FALSE. -* -* ________________ -* | | ________ -* | 1 | | 2 | -* | | |______| -* |______________| -* -* Case (2): If the rectangles partially overlap, NW_GDI_Rectangle_Cross will -* return NW_TRUE, and the resulting rectangle will be the overlapping intersection -* of the two rectangles. So as in the example below, the result rectangle will -* contain the intersection of rectangle #1 and rectangle #2, which is rectangle #3. -* -* ________________ -* | __|___ -* | 1 |3 | 2 | -* | |__|___| -* |______________| -* -* Case (3): One rectangle completely encloses the other rectangle, NW_GDI_Rectangle_Cross -* will return NW_TRUE, and the resulting rectangle will be the portion of the -* overlap, which in this case will be the enclosed rectangle. So in the example -* below, the intesection of rectangle #1 and rectangle #2, is rectangle #2. -* -* --------------- -* | _____ | -* | 1 | 2 | | -* | |_____| | -* | | -* --------------- -* -* @param const NW_GDI_Rectangle_t* rect1: One of the rectangles compare for overlap -* @param const NW_GDI_Rectangle_t* rect2: The other rectangle to compare for overlap -* @param NW_GDI_Rectangle_t* result: If there is a overlap, the result is the intersecting -* rectangle. -* @return NW_Bool: NW_TRUE if there is an overlap. NW_FALSE if there is no overlap -*/ -NW_GDI_EXPORT -NW_Bool -NW_GDI_Rectangle_Cross (const NW_GDI_Rectangle_t* rect1, - const NW_GDI_Rectangle_t* rect2, - NW_GDI_Rectangle_t* result); - -NW_GDI_EXPORT -void -NW_GDI_Rectangle_Add (const NW_GDI_Rectangle_t* rect1, - const NW_GDI_Rectangle_t* rect2, - NW_GDI_Rectangle_t* result); - -#define NW_VerticalLayout_MinImageWidth1 4 -#define NW_VerticalLayout_MinImageHeight1 4 -#define NW_VerticalLayout_MinImageWidth2 26 -#define NW_VerticalLayout_MinImageHeight2 19 - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_GDI_UTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/src/GDIDeviceContext.cpp --- a/webengine/wmlengine/src/gdi/src/GDIDeviceContext.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2336 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: device context -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "GDIDevicecontext.h" -#include "nw_object_dynamici.h" -#include "GDIFont.h" -#include "nw_gdi_utils.h" -#include "nw_text_ucs2.h" -#include <nwx_string.h> -#include <nwx_settings.h> -#include "nwx_logger.h" -#include "nwx_http_defs.h" -#include "MVCView.h" -#include <AknUtils.h> -#include <gdi.h> -#include <w32std.h> -#include <eikenv.h> -#include <barsread.h> -#include <gulutil.h> -#include <bautils.h> -#include <webkit.rsg> -#include <AknPictographInterface.h> -#include <AknPictographDrawerInterface.h> -#include <biditext.h> -#include "BrsrStatusCodes.h" -#include "featmgr.h" -#include <AknFontAccess.h> - -#include <bldvariant.hrh> -#include <data_caging_path_literals.hrh> -#include "MemoryManager.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -/* - The Thai language is unique in that it has certain characters that combine - into a single entity that will be referred to as a Thai script "cell" or just - "cell" for short. Furthermore, the language uses white space very sparingly, - frequently not having any space at all between individual words. These unique - features create additional complexity when truncating or word-wrapping Thai - text. - - Truncation should not occur in the middle of a "cell" if possible. The - exception is if all that remains to be displayed is a single cell but - there isn't space for the entire cell. - - As for word-wrapping, in optimal case, Thai text ought to be broken into lines - at word boundaries. However, because white space is seldom used, word - boundaries cannot be found unless a dictionary or a heavy statistical/ - morphological analysis is run on the text. Therefore, a less perfect approach - is used. - - Line breaking is done according to Thai script "cells", which can be - thought of as the smallest indivisible units of the script. - - The cells consist of combinations of characters from the following classes - of characters, which are divided into two types -- spacing and combining: - CONS Consonant (spacing) - AD Above Diacritic (combining) - AV Above Vowel (combining) - BD Below Diacritic (combining) - BV Below Vowel (combining) - FV Following Vowel (spacing) - LV Leading Vowel (spacing) - NON Not a Thai letter, i.e. is a number, currency, etc (spacing) - TONE Tone mark (combining) - - Graphically, the "cells" are built around a consonant, which functions as a - base for a stack of combining elements, optionally preceded and/or followed - by spacing vowels. The graph below illustrates how the bits and pieces of a - cell are placed around the consonant: - - [TONE] - [AV/AD/TONE] -_______[LV]__[CONS]__[FV]________ (baseline) - [BV/BD] - - In the encoded text, you can anticipate sequences like: - ... [LV] [CONS] [AV/BV/AD/BD] [TONE] [FV] ... - - If such is a prototype of a Thai script "cell", lines can be split without - interfering with the most crucial structures of the script - * between subsequent [FV] and [LV] - * between subsequent [CONS] and [LV] - * between subsequent [AV/BV/AD/BD] and [LV] - * between subsequent [TONE] and [LV] - * between subsequent [CONS] and [CONS] - * between subsequent [AV/BV/AD/BD] and [CONS] - * between subsequent [TONE] and [CONS] - * between subsequent [FV] and [CONS] - - This can be reduced to the following three rules: - 1. Splits can occur at whitespace. - 2. Splits can occur immediately preceding any LV. - 3. Splits can occur immediately preceding any CONS that is not - immediately preceded by an LV. - - Unfortunately, this approach does not guarantee individual words, or even - individual syllables, from being broken across lines. All that can be said is - that the outer structure of the script is preserved - combining characters as - well as the leading/following vowels stick with the base character. -*/ - -// Thai unicode char range: 0x0E00 - 0x0E7F. Note, only the first 0x60 -// characters are used. -#define THAI_CHAR_BASE 0x0E00 -// Charcter classes and types. -#define THAI_CHAR_COMBINING_TYPE_FLAG 0x80 -#define THAI_CHAR_SPACING_TYPE_FLAG 0x40 -#define THAI_CHAR_CONS (1 | THAI_CHAR_SPACING_TYPE_FLAG) -#define THAI_CHAR_AD (2 | THAI_CHAR_COMBINING_TYPE_FLAG) -#define THAI_CHAR_AV (3 | THAI_CHAR_COMBINING_TYPE_FLAG) -#define THAI_CHAR_BD (4 | THAI_CHAR_COMBINING_TYPE_FLAG) -#define THAI_CHAR_BV (5 | THAI_CHAR_COMBINING_TYPE_FLAG) -#define THAI_CHAR_FV (6 | THAI_CHAR_SPACING_TYPE_FLAG) -#define THAI_CHAR_LV (7 | THAI_CHAR_SPACING_TYPE_FLAG) -#define THAI_CHAR_NON (8 | THAI_CHAR_SPACING_TYPE_FLAG) -#define THAI_CHAR_TONE (9 | THAI_CHAR_COMBINING_TYPE_FLAG) - -// Map that defines the class and type for each Thai character. -// Character range -const TUint8 ThaiCharMap[0x60] = - { - // 0x0E00 - THAI_CHAR_NON, - // 0x0E01 - 0x0E23 - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - // 0x0E24 - THAI_CHAR_FV, - // 0x0E25 - THAI_CHAR_CONS, - // 0x0E26 - THAI_CHAR_FV, - // 0x0E27 - 0x0E2E - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - THAI_CHAR_CONS, THAI_CHAR_CONS, THAI_CHAR_CONS, - // 0x0E2F - THAI_CHAR_NON, - // 0x0E30 - THAI_CHAR_FV, - // 0x0E31 - THAI_CHAR_AV, - // 0x0E32 - 0x0E33 - THAI_CHAR_FV, THAI_CHAR_FV, - // 0x0E34 - 0x0E37 - THAI_CHAR_AV, THAI_CHAR_AV, THAI_CHAR_AV, THAI_CHAR_AV, - // 0x0E38 - 0x0E39 - THAI_CHAR_BV, THAI_CHAR_BV, - // 0x0E3A - THAI_CHAR_BD, - // 0x0E3B - 0x0E3F - THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, - // 0x0E40 - 0x0E44 - THAI_CHAR_LV, THAI_CHAR_LV, THAI_CHAR_LV, THAI_CHAR_LV, THAI_CHAR_LV, - // 0x0E45 - THAI_CHAR_FV, - // 0x0E46 - THAI_CHAR_NON, - // 0x0E47 - THAI_CHAR_AD, - // 0x0E48 - 0x0E4B - THAI_CHAR_TONE, THAI_CHAR_TONE, THAI_CHAR_TONE, THAI_CHAR_TONE, - // 0x0E4C - 0x0E4E - THAI_CHAR_AD, THAI_CHAR_AD, THAI_CHAR_AD, - // 0x0E4F - 0x0E5F - THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, - THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, - THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, THAI_CHAR_NON, - THAI_CHAR_NON, THAI_CHAR_NON - }; - -// MACROS -#define IS_THAI_CHAR(c) ((c >= 0x0E00) && (c <= 0x0E60)) -//#define IS_THAI_LEADING_VOWEL(c) ((c >= 0x0E40) && (c <= 0x0E44)) -#define IS_THAI_LEADING_VOWEL(c) (ThaiCharMap[c - THAI_CHAR_BASE] == THAI_CHAR_LV) -//#define IS_THAI_CONSONANT(c) ((c >= 0x0E01) && (c <= 0x0E2E) && (c != 0x0E24) && (c != 0x0E26)) -#define IS_THAI_CONSONANT(c) (ThaiCharMap[c - THAI_CHAR_BASE] == THAI_CHAR_CONS) -//#define IS_THAI_FOLLOWING_VOWEL(c) ((c == 0x0E24) || (c == 0x0E26) || (c == 0x0E30) || (c == 0x0E32) || (c == 0x0E33) || (c == 0x0E45)) -#define IS_THAI_FOLLOWING_VOWEL(c) (ThaiCharMap[c - THAI_CHAR_BASE] == THAI_CHAR_FV) -#define IS_THAI_COMBINING(c) (ThaiCharMap[c - THAI_CHAR_BASE] & THAI_CHAR_COMBINING_TYPE_FLAG) - - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::CGDIDeviceContext -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CGDIDeviceContext::CGDIDeviceContext() - { - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::CGDIDeviceContext -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::ConstructL (void* aGraphicsContext, - CView* aOocEpoc32View) - { - // initialize the member variables - iGraphicsContext = aGraphicsContext; - if( !iGraphicsContext ) - { - return KBrsrFailure; - } - - iOocEpoc32View = aOocEpoc32View; - if( !iOocEpoc32View ) - { - return KBrsrFailure; - } - - iVariantFlag = AknLayoutUtils::Variant(); - - _LIT( KResourceFile, "\\resource\\Webkit.rsc"); - _LIT( KResourceFileZ, "Z:Webkit.rsc"); - TFileName resourceFileName; - TParse parse; - Dll::FileName (resourceFileName); - parse.Set(KResourceFile, &resourceFileName, NULL); - resourceFileName = parse.FullName(); - - CCoeEnv* coeEnv=CCoeEnv::Static(); - BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceFileName); - if ( !BaflUtils::FileExists( coeEnv->FsSession(), resourceFileName ) ) - { - // Use resource file on the Z drive instead - parse.Set( KResourceFileZ, &KDC_RESOURCE_FILES_DIR, NULL ); - resourceFileName = parse.FullName(); - BaflUtils::NearestLanguageFile( coeEnv->FsSession(),resourceFileName ); - } - iResourceFileOffset = coeEnv->AddResourceFileL(resourceFileName); - - // Get the array of available fonts on the phone - CEikonEnv* eikEnv = CEikonEnv::Static(); - iWsScreenDev = eikEnv->ScreenDevice(); - - // Create the font cache - iFontCache = new (ELeave) CFontCache(30); // 30 items in cache - - // Find out which language we support - if ( FeatureManager::FeatureSupported(KFeatureIdAvkonELaf) ) - { - iSupportedLanguage = EElafLanguage; - } - else if ( FeatureManager::FeatureSupported(KFeatureIdAvkonApac) ) - { - if ( FeatureManager::FeatureSupported(KFeatureIdThai) ) - { - iSupportedLanguage = EThaiLanguage; - } - else if ( FeatureManager::FeatureSupported(KFeatureIdJapanese) ) - { - iSupportedLanguage = EJapaneseLanguage; - } - else if ( FeatureManager::FeatureSupported(KFeatureIdChineseTaiwanHkFonts) ) - { - iSupportedLanguage = EChinaHKTWLanguage; - } - else if ( FeatureManager::FeatureSupported(KFeatureIdChinesePrcFonts) ) - { - iSupportedLanguage = EChinesePRCLanguage; - } - } - - iFillPattern=NW_GDI_Pattern_Solid; - iLinePattern=NW_GDI_Pattern_Solid; - iPaintMode=(NW_GDI_PaintMode_e)CGraphicsContext::EDrawModePEN; - iLineWidth=1; - iFontSizeLevel = EGDIDeviceContextFontSizeLevelNormal; - // successful completion - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CGDIDeviceContext* CGDIDeviceContext::NewL (void* aGraphicsContext, - CView* aOocEpoc32View) - { - CGDIDeviceContext* self = new( ELeave ) CGDIDeviceContext(); - - CleanupStack::PushL( self ); - self->ConstructL(aGraphicsContext, aOocEpoc32View); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor -// -// ----------------------------------------------------------------------------- -// -CGDIDeviceContext::~CGDIDeviceContext() - { - CFont* font = NULL; - CBitmapContext* gc = Epoc32GraphicsContext(); - while ((font = iFontCache->RemoveFirstEntry()) != NULL) - { - gc->DiscardFont(); - iWsScreenDev->ReleaseFont( font ); - } - - delete iFontCache; - - // screen device - iWsScreenDev = NULL; - - // unload resource file - CCoeEnv* coeEnv=CCoeEnv::Static(); - coeEnv->DeleteResourceFile(iResourceFileOffset); - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SwapColorBytes -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Color_t -CGDIDeviceContext::SwapColorBytes(NW_GDI_Color_t aColor) -{ - return NW_GDI_RGB(NW_GDI_GetBValue(aColor), NW_GDI_GetGValue(aColor), NW_GDI_GetRValue(aColor)); -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::Epoc32GraphicsContext -// -// ----------------------------------------------------------------------------- -// -CBitmapContext* -CGDIDeviceContext::Epoc32GraphicsContext () -{ - return (CBitmapContext*)(iGraphicsContext); -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::WordWrap -// If a zero length string is passed in, KBrsrSuccess is returned and *length = 0 -// If constraint is -1 return the smallest string that can split and KBrsrSuccess -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::WordWrap (NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength) - { - NW_REQUIRED_PARAM(aSpacing); - NW_Text_Length_t strLen; - NW_Text_Length_t i; - TText16 ch1 = 0; - TText16 ch2 = 0; - TText16* string = NULL; - TBool freeNeeded = NW_FALSE; - TPtrC ptr; - TBidiText *bidiText = NULL; - CFont* epocFont = NULL; - - strLen = NW_Text_GetCharCount (aText); - if (strLen == 0) - { - *aLength = 0; - return KBrsrSuccess; - } - - if (aConstraint == -1) - { - if (strLen > 1) - { - ch1 = (TText16)NW_Text_GetAt (aText, 0); - for (i = 1; i < strLen; i++) - { - ch2 = (TText16)NW_Text_GetAt (aText, i); - if (CanSplit(ch1, ch2)) - { - *aLength = (NW_Text_Length_t)(i); - return KBrsrSuccess; - } - ch1 = ch2; - } - } - *aLength = strLen; - return KBrsrSuccess; - } - - if (aConstraint == 0) - { - *aLength = 0; - return KBrsrLmgrNoSplit; - } - - NW_TRY(status) - { - string = NW_Text_GetUCS2Buffer (aText, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &strLen, (unsigned char*) &freeNeeded ); - - for (i = 0; i < strLen; i++) - { - if (!NW_Str_Isspace((TText16)string[i]) && (string[i] != 0)) - { - break; - } - } - - if (i == strLen) - { - *aLength = i; - NW_THROW_SUCCESS(status); - } - - ptr.Set(string, strLen); - TRAPD(ret, bidiText = TBidiText::NewL(ptr, 1, (aFlowDirection == NW_GDI_FlowDirection_LeftRight) ? - TBidiText::ELeftToRight : TBidiText::ERightToLeft)); - if (ret != KErrNone) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - - epocFont = (CFont*)aGDIFont->GetEpocNativeFont(); - bidiText->WrapText(aConstraint, *epocFont, 0); - - *aLength = bidiText->DisplayText().Length(); - - //Solution for bug in TBidiText::WrapText for long text - if(aFlowDirection == NW_GDI_FlowDirection_LeftRight) - { - NW_GDI_Dimension2D_t extent; - status = GetSubstringExtent (aText, - aGDIFont, - 0, - *aLength, - aSpacing, - aFlowDirection, - &extent); - NW_THROW_ON_ERROR(status); - if(extent.width > aConstraint) - { - extent.width = 0; - NW_Text_Length_t len = 0; - while(extent.width < aConstraint) - { - len++; - status = GetSubstringExtent(aText, aGDIFont, 0, len, aSpacing, aFlowDirection, &extent); - NW_THROW_ON_ERROR(status); - } - *aLength = len -1; - } - } - //The above solution is to fix a Symbian bug in TBidiText::WrapText for long text - - delete bidiText; - if (*aLength == 0) - { - NW_THROW_STATUS(status, KBrsrLmgrNoSplit); - } - if (*aLength < strLen) - { - // If the next character is a soft hyphen, add it to the aText - if (string[*aLength] == NW_TEXT_UCS2_SOFT_HYPHEN) - { - (*aLength)++; - NW_THROW_SUCCESS(status); - } - - // TBidiText always omits the last space. see if we can add it back - if ((*aLength) + 1 == strLen && NW_Str_Isspace(string[*aLength])) - { - NW_GDI_Dimension2D_t extent; - status = GetSubstringExtent (aText, - aGDIFont, - 0, - *aLength, - aSpacing, - aFlowDirection, - &extent); - NW_THROW_ON_ERROR(status); - if (extent.width <= aConstraint) - { - (*aLength)++; - NW_THROW_SUCCESS(status); - } - } - - // Make sure we do the split at a valid position - TInt len = *aLength; - ch2 = (TText16)((len < (TInt)strLen) ? NW_Text_GetAt (aText, len) : 0); - while (--len >= 0) - { - ch1 = (TText16)NW_Text_GetAt (aText, len); - if (CanSplit(ch1, ch2)) - { - break; - } - ch2 = ch1; - } - - CGDIDeviceContext* self = const_cast<CGDIDeviceContext*> (this); - if(NW_Str_Isspace(ch2)|| - len < 0 || - ch1 == NW_TEXT_UCS2_SOFT_HYPHEN || - (self->VariantFlag() == EApacVariant && ch2 < 255 && ch1 > 255) //Doule bytes language word followed by a latin word - ) - { - *aLength = len + 1; - } - else - { - *aLength = len; - } - } - if (*aLength == 0) - { - NW_THROW_STATUS(status, KBrsrLmgrNoSplit); - } - else - { - status = KBrsrSuccess; - } - } - - NW_CATCH(status) - { - } // empty - NW_FINALLY - { - if (freeNeeded) - { - NW_Mem_Free(string); - } - return status; - } - NW_END_TRY; - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SplitAtNewline -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::SplitAtNewline(NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength) - { - NW_Text_Length_t strLen; - NW_Text_Length_t i; - TText16 ch = 0; - NW_GDI_Dimension2D_t size; - - NW_TRY(status) - { - // Get the aText aLength - strLen = NW_Text_GetCharCount (aText); - if (strLen == 0) - { - *aLength = 0; - NW_THROW_SUCCESS(status); - } - - // Look for the first LF character - for (i=0; i<strLen; i++) - { - ch = (TText16) NW_Text_GetAt (aText, i); - if (ch == NW_TEXT_UCS2_LF) - { - break; - } - } - if (aConstraint < 0) - { - if (ch == NW_TEXT_UCS2_LF) - { - *aLength = (NW_Text_Length_t)(i + 1); - } - else - { - *aLength = strLen; - } - } - else - { - status = CGDIDeviceContext::GetSubstringExtent( aText, - aGDIFont, - 0, - i, - aSpacing, - aFlowDirection, &size ); - NW_THROW_ON_ERROR(status); - - if (size.width <= aConstraint) - { - if (ch == NW_TEXT_UCS2_LF) - { - *aLength = (NW_Text_Length_t)(i + 1); - NW_THROW_SUCCESS(status); - } - else - { - *aLength = strLen; - NW_THROW_SUCCESS(status); - } - } - else - { - *aLength = 0; - NW_THROW_STATUS(status, KBrsrLmgrNoSplit); - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY; - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::Truncate -// NOTE: This function never fails! Even if a single character is too -// big for the constraint, it will return length = 1, and STAT_SUCCESS -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::Truncate (NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength) -{ - NW_Text_Length_t strLen; - TText16* string = NULL; - TBool freeNeeded = NW_FALSE; - TPtrC ptr; - TBidiText *bidiText = NULL; - CFont* epocFont = NULL; - - NW_REQUIRED_PARAM(aSpacing); - - if (NW_Text_GetCharCount(aText) == 0) - { - *aLength = 1; // Must return at least 1 - return KBrsrSuccess; - } - - NW_TRY(status) - { - string = - NW_Text_GetUCS2Buffer (aText, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &strLen, - (unsigned char*) &freeNeeded); - - ptr.Set(string, strLen); - TUint newLen = ptr.Locate('\n'); - if (newLen < strLen) - { - ptr.Set(ptr.Ptr(), newLen); - } - - TRAPD(ret, bidiText = TBidiText::NewL(ptr, 1, (aFlowDirection == NW_GDI_FlowDirection_LeftRight) ? - TBidiText::ELeftToRight : TBidiText::ERightToLeft)); - if (ret != KErrNone) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - - epocFont = (CFont*)aGDIFont->GetEpocNativeFont(); - bidiText->WrapText(aConstraint, *epocFont, 0); - - *aLength = bidiText->DisplayText().Length(); - - //Solution for bug in TBidiText::WrapText for long text - if(aFlowDirection == NW_GDI_FlowDirection_LeftRight) - { - NW_GDI_Dimension2D_t extent; - status = GetSubstringExtent (aText, - aGDIFont, - 0, - *aLength, - aSpacing, - aFlowDirection, - &extent); - NW_THROW_ON_ERROR(status); - if (extent.width > aConstraint) - { - NW_Text_Length_t len = *aLength; - while(extent.width > aConstraint) - { - len--; - status = GetSubstringExtent (aText, - aGDIFont, - 0, - len, - aSpacing, - aFlowDirection, - &extent); - NW_THROW_ON_ERROR(status); - } - *aLength = len; - } - } - - delete bidiText; - - // For the Thai language, truncation should not occur within the middle of - // a "cell" unless all that is left is a single "cell". The text was - // truncated above and now it will be walked in reverse, looking for a - // spot that is not within a "cell", further reducing the returned length - // if needed. - TInt len = *aLength; - if (len > 1) - { - TText16 ch1; - TText16 ch2; - ch2 = (TText16)((len < (TInt)strLen) ? NW_Text_GetAt (aText, len) : 0); - while (--len >= 0) - { - ch1 = (TText16)NW_Text_GetAt (aText, len); - if ( !IS_THAI_CHAR(ch1) || !IS_THAI_CHAR(ch2) ) - { - break; - } - if (!IsThaiCell(ch1, ch2)) - { - break; - } - ch2 = ch1; - } - len += 1; - } - if (len) - { - *aLength = len; - } - status = KBrsrSuccess; - } - NW_CATCH(status) - { - } // empty - NW_FINALLY - { - if (freeNeeded) - { - NW_Mem_Free(string); - } - if (*aLength == 0) - { - // As described above, this function must not return aLength==0. - // This happens when aConstraint is 0, as has occured in some tables, when - // NW_LMgr_FormatContext->lineStart > NW_LMgr_FormatContext->lineEnd - - *aLength = 1; - } - return status; - } - NW_END_TRY; - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::ScaleBitmap -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::ScaleBitmap (CFbsBitmap* aBitmap, - CFbsBitmap** aScaledBitmap, - TRect* aRect) -{ - CBitmapContext* bitmapContext = NULL; - CBitmapDevice* bitmapDevice = NULL; - - // parameter assertion block - NW_ASSERT (aBitmap); - NW_ASSERT (aScaledBitmap); - NW_ASSERT (aRect); - - NW_TRY (status) - { - // create scaled aBitmap - *aScaledBitmap = new CFbsBitmap(); - NW_THROW_OOM_ON_NULL( aScaledBitmap, status ); - - TInt err = (*aScaledBitmap)->Create( aRect->Size(), aBitmap->DisplayMode() ); - if ( err != KErrNone ) - { - NW_THROW_STATUS (status, KBrsrFailure); - } - - // create aBitmap device and context - TRAP( err, bitmapDevice = CFbsBitmapDevice::NewL( *aScaledBitmap ) ); - NW_THROW_OOM_ON_NULL( bitmapDevice, status ); - if ( err != KErrNone ) - { - NW_THROW_STATUS (status, KBrsrFailure); - } - - err = bitmapDevice->CreateBitmapContext( bitmapContext ); - if ( err != KErrNone ) - { - NW_THROW_STATUS (status, KBrsrFailure); - } - - // scale aBitmap - bitmapContext->DrawBitmap( *aRect, aBitmap ); - } - NW_CATCH (status) - { - delete *aScaledBitmap; - *aScaledBitmap = NULL; - } - NW_FINALLY - { - delete bitmapContext; - delete bitmapDevice; - - return status; - } - NW_END_TRY -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::InitializeGraphicsContext -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::InitializeGraphicsContext () -{ - CBitmapContext* gc = Epoc32GraphicsContext(); - - if (iClipRect.dimension.width!=0 && iClipRect.dimension.height!=0) - { - gc->SetClippingRect( TRect( - iClipRect.point.x, - iClipRect.point.y, - iClipRect.point.x+iClipRect.dimension.width, - iClipRect.point.y+iClipRect.dimension.height ) ); - } - else - { - gc->CancelClippingRect(); - } - - //gc->SetDrawMode((CGraphicsContext::TDrawMode)(iPaintMode)); - gc->SetPenSize(TSize(iLineWidth, iLineWidth)); - gc->SetPenStyle((CGraphicsContext::TPenStyle)(iLinePattern)); - gc->SetPenColor(iForegroundColor); - gc->SetBrushStyle((CGraphicsContext::TBrushStyle)(iFillPattern)); - gc->SetBrushColor(iBackgroundColor); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawImage -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::DrawImage (const NW_GDI_Point2D_t* aLocation, - const NW_GDI_Rectangle_t* aRectangle, - NW_GDI_ImageBlock_t* aImageBlock) -{ - NW_GDI_Rectangle_t imageRect; - NW_GDI_Rectangle_t clipRect; - - // parameter assertion block - NW_ASSERT (aLocation); - - NW_REQUIRED_PARAM(aRectangle); - - InitializeGraphicsContext(); - - CBitmapContext* gc = Epoc32GraphicsContext() ; - CFbsBitmap* bitmap = (CFbsBitmap*) aImageBlock->data; - - NW_ASSERT( bitmap ); - - TPoint point( aLocation->x - iOrigin.x + iDisplayBounds.point.x, - aLocation->y - iOrigin.y + iDisplayBounds.point.y ); - - - TRect rect( aRectangle->point.x, aRectangle->point.y, - aRectangle->dimension.width + aRectangle->point.x, - aRectangle->dimension.height + aRectangle->point.y ); - - imageRect.point.x = aLocation->x; - imageRect.point.y = aLocation->y; - imageRect.dimension.width = aRectangle->dimension.width; - imageRect.dimension.height = aRectangle->dimension.height; - - clipRect = ClipRect(); - if ( NW_GDI_Rectangle_Cross( &imageRect, &clipRect, NULL ) == NW_TRUE ) - { - // Set brush style to NULL to prevent filling of aRectangle - gc->SetBrushStyle (CGraphicsContext::ENullBrush); - - if ( !aImageBlock->mask ){ - gc->BitBlt( point, bitmap, rect ); - } - else { - CFbsBitmap* mask = (CFbsBitmap*) aImageBlock->mask; - gc->BitBltMasked( point, bitmap, rect, mask, ((aImageBlock->invertedMask == NW_TRUE) ? ETrue : EFalse) ); - } - } -} - - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::ScaleImage -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::ScaleImage (const NW_GDI_Dimension3D_t* size, - const NW_GDI_ImageBlock_t* imageBlock, - NW_GDI_ImageBlock_t* scaledImageBlock) -{ - CFbsBitmap* scaledBitmap = NULL; - CFbsBitmap* scaledMask = NULL; - - // parameter assertion block - NW_ASSERT (imageBlock); - NW_ASSERT (size); - NW_ASSERT (scaledImageBlock); - NW_ASSERT (imageBlock->data); - - NW_TRY (status) - { - TRect rect (0, 0, size->width, size->height); - - // scale bitmap - status = ScaleBitmap ((CFbsBitmap*)imageBlock->data, &scaledBitmap, &rect); - _NW_THROW_ON_ERROR (status); - scaledImageBlock->data = scaledBitmap; - - // scale mask, if any - if ( imageBlock->mask ) - { - status = ScaleBitmap((CFbsBitmap*)imageBlock->mask, &scaledMask, &rect); - _NW_THROW_ON_ERROR (status); - scaledImageBlock->mask = scaledMask; - } - else - { - scaledImageBlock->mask = NULL; - } - - // set the rest of the scaled image parameters - scaledImageBlock->size = *size; - scaledImageBlock->conversionStatus = imageBlock->conversionStatus; - scaledImageBlock->transparencyIndex = imageBlock->transparencyIndex; - scaledImageBlock->isTransparent = imageBlock->isTransparent; - scaledImageBlock->colPalette = imageBlock->colPalette; - } - NW_CATCH (status) - { - delete scaledBitmap; - delete scaledMask; - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawPixel -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::DrawPixel (const NW_GDI_Point2D_t* aLocation) -{ - // parameter assertion block - NW_ASSERT (aLocation); - - // for convenience - InitializeGraphicsContext(); - Epoc32GraphicsContext()->Plot - ( TPoint( aLocation->x - iOrigin.x + iDisplayBounds.point.x, - aLocation->y - iOrigin.y + iDisplayBounds.point.y ) ); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawPolyline -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::DrawPolyline (NW_GDI_Metric_t aNumPoints, - const NW_GDI_Point2D_t* aPoints, - TBool aClosed) -{ - NW_GDI_Color_t initialColor = 0; - - // parameter assertion block - NW_ASSERT (aPoints); - - // for convenience - if (iLineWidth == 0){ - return KBrsrSuccess; - } - - initialColor = iForegroundColor; - - CBitmapContext* gc = Epoc32GraphicsContext(); - - InitializeGraphicsContext(); - - // convert NW_Point2D array into TPoint array - TPoint* epocPoints=new TPoint[aNumPoints]; - - if (epocPoints) - { - for (TInt ii=0; ii<aNumPoints; ii++) - { - epocPoints[ii]=TPoint( aPoints[ii].x - iOrigin.x + iDisplayBounds.point.x, - aPoints[ii].y - iOrigin.y + iDisplayBounds.point.y); - } - gc->DrawPolyLine(epocPoints, aNumPoints); - delete[] epocPoints; - } - - if (aClosed && aNumPoints>2) - { - DrawLine(aPoints[0], aPoints[aNumPoints-1]); - } - iForegroundColor = initialColor; - // successful completion - return KBrsrSuccess; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawaRectangle -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::DrawRectangle (const NW_GDI_Rectangle_t* aRectangle) -{ - NW_GDI_Rectangle_t clipRect; - NW_GDI_Color_t initialColor = 0; - - CBitmapContext* gc = Epoc32GraphicsContext(); - - clipRect = ClipRect(); - - initialColor = iForegroundColor; - - if ( NW_GDI_Rectangle_Cross( aRectangle, &clipRect, NULL ) == NW_TRUE ) - { - InitializeGraphicsContext(); - - // Style to null for NO-FILL in aRectangle - gc->SetBrushStyle (CGraphicsContext::ENullBrush); - gc->DrawRect( TRect( aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x, - aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y, - aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x + aRectangle->dimension.width, - aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y + aRectangle->dimension.height)); - } - iForegroundColor = initialColor; -} - - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawText -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::DrawText (const NW_GDI_Point2D_t* aLocation, - const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aSpacing, - NW_GDI_TextDecoration_t aDecoration, - NW_GDI_FlowDirection_t aGlobalDir, - NW_GDI_Metric_t aWidth) - { - NW_Text_Length_t length; - NW_Text_Length_t trimmedLen; - NW_Text_Length_t i; - TText16* string = NULL; - TBool freeNeeded = NW_FALSE; - NW_GDI_Color_t initialColor = 0; - - // parameter assertion block - NW_ASSERT (aLocation); - NW_ASSERT (aText); - - NW_TRY (status) - { - // Get the aText as unicode - string = - NW_Text_GetUCS2Buffer (aText, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &length, - (unsigned char*) &freeNeeded); - if (length == 0) - { - NW_THROW_STATUS (status, KBrsrSuccess); - } - - if (!string) - { - NW_THROW_STATUS (status, KBrsrFailure); - } - - // Trim the string - trimmedLen = 0; - for (i = 0; i < length; i++) - { - if ((string[i] == NW_TEXT_UCS2_SOFT_HYPHEN) || (string[i] == NW_TEXT_UCS2_LF) - || (string[i] == NW_TEXT_UCS2_CR)) - { - continue; - } - else if ((string[i] == NW_TEXT_UCS2_TAB) || (string[i] == NW_TEXT_UCS2_NBSP)) - { - // In vertical-layout mode we want to ignore nbsp within a table cell - if (iRemoveNbsp) - { - continue; - } - string[trimmedLen++] = ' '; - } - else - { - string[trimmedLen++] = string[i]; - } - } - string[trimmedLen] = 0; - - if (trimmedLen == 0) - { - NW_THROW_STATUS (status, KBrsrSuccess); - } - - initialColor = iForegroundColor; - - CBitmapContext* gc = Epoc32GraphicsContext(); - - CFont* epocFont = NULL; - epocFont = (CFont*)aGDIFont->GetEpocNativeFont(); - - // Lowercase letters will be rendered as uppercase characters - // Font size remains intact (according to spec) - - if(aGDIFont->FontVariant() == EGDIFontVariantSmallCaps) { - if(!freeNeeded) { - string = NW_Text_GetUCS2Buffer(aText, NW_Text_Flags_Copy, NULL, NULL); - NW_THROW_OOM_ON_NULL (string, status); - - freeNeeded = NW_TRUE; - } - NW_Str_Strupr((TText16*)string); - } - - CGraphicsContext::TDrawTextParam params; - params.iCharJustExcess=aSpacing; - InitializeGraphicsContext(); - gc->UseFont(epocFont); - - //Calculate Baseline offset - //Baseline is calculated as (Height + ascent in pixels - descent in pixels) /2 - //iDisplayBounds and iOrigin are kept as it is to make sure drawing is respective to - //display bound - TInt heightInPixels = epocFont->HeightInPixels(); - TInt descentInPixels = epocFont->DescentInPixels(); - TInt acsentInPixels = epocFont->FontMaxAscent(); - TInt baseLineOffset = (iDisplayBounds.point.y) + (heightInPixels + acsentInPixels - descentInPixels ) / (2) - iOrigin.y; - - TPtrC ptrC(string); - TPoint point( aLocation->x - iOrigin.x + iDisplayBounds.point.x, - aLocation->y + baseLineOffset); - - if (aDecoration & NW_GDI_TextDecoration_Underline) { - gc->SetUnderlineStyle(EUnderlineOn); - } - - if (aDecoration & NW_GDI_TextDecoration_Strikeout) { - gc->SetStrikethroughStyle(EStrikethroughOn); - } - - // Draw the aText either using the TBidiText sophicated method - // or the simple CGraphicsContext method if the orginal encoding is 8859-8 - CGraphicsContext::TTextAlign alignment = CGraphicsContext::ELeft; - TInt ret = KErrNone; - - if (aGlobalDir == NW_GDI_FlowDirection_RightLeft) { - alignment = CGraphicsContext::ERight; - } - - // When aText is encoded with HTTP_iso_8859_8 CGraphicsContext::DrawText - // is used instead of TBidiText::DrawText. This is done because this encoding - // implies that the buffer should be rendered as is if aGlobalDir is left to right - // or reversed and rendered if aGlobalDir is right to left (including latin chars). - if (NW_Settings_GetOriginalEncoding() == HTTP_iso_8859_8) { - if (aGlobalDir == NW_GDI_FlowDirection_RightLeft) { - NW_Text_Length_t len = NW_Str_Strlen(string); - - // Reverse the aText first then draw it - for (NW_Text_Length_t i = 0; i < (len / 2); i++) { - TText16 temp; - - temp = string[i]; - string[i] = string[len - 1 - i]; - string[len - 1 - i] = temp; - } - } - - gc->DrawText(ptrC, point); - iOocEpoc32View->DrawPictographsInText(*gc, *epocFont, ptrC, point); - } - - // Otherwise use TBidiText to render the aText which correctly renders - // hebrew chars right to left or left to right depending on aGlobalDir -- - // embedded latin chars are always rendered left to right. - else { - TBidiText *bidiText = NULL; - - // Wrap the aText in a TBidiText to allow bi-directional flow. - TRAP(ret, bidiText = TBidiText::NewL(ptrC, 1, - (aGlobalDir == NW_GDI_FlowDirection_LeftRight) ? - TBidiText::ELeftToRight : TBidiText::ERightToLeft)); - - if (ret != KErrNone) { - NW_THROW_STATUS (status, KBrsrFailure); - } - - bidiText->WrapText(aWidth, *epocFont, 0); - bidiText->DrawText(*gc, point, aSpacing, alignment); - iOocEpoc32View->DrawPictographsInText(*gc, *epocFont, ptrC, point); - - delete bidiText; - } - - if (aDecoration & NW_GDI_TextDecoration_Underline) { - gc->SetUnderlineStyle(EUnderlineOff); - } - - if (aDecoration & NW_GDI_TextDecoration_Strikeout) { - gc->SetStrikethroughStyle(EStrikethroughOff); - } - - gc->DiscardFont(); - - iForegroundColor = initialColor; - - } NW_CATCH (status) { - } NW_FINALLY { - - if (freeNeeded){ - NW_Mem_Free (string); - } - - return status; - } NW_END_TRY; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::FillaRectangle -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::FillRectangle (const NW_GDI_Rectangle_t* aRectangle) -{ - NW_GDI_Rectangle_t clipRect; - - // parameter assertion block - NW_ASSERT (aRectangle); - - // for convenience - clipRect = ClipRect(); - if ( NW_GDI_Rectangle_Cross( aRectangle, &clipRect, NULL ) == NW_TRUE ) - { - CBitmapContext* gc = Epoc32GraphicsContext(); - - InitializeGraphicsContext (); - - gc->SetPenColor(iBackgroundColor); - gc->DrawRect(TRect(aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x, - aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y, - aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x + aRectangle->dimension.width, - aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y + aRectangle->dimension.height)); - } -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::GetColorPalette -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::GetColorPalette (NW_GDI_ColorPalette_t* aColPalette) -{ - // parameter assertion block - NW_ASSERT (aColPalette); - NW_REQUIRED_PARAM (aColPalette); - - // Get the system palette entries - - /*********************************************************** - * PORTING NOTE: - * - * Write some statements similar to the next lines (NT - * implementation reference) based on your platform properties: - * - * GetSystemPaletteEntries(this->hdc,0,256,pe); - * - * for(j = 0; j< 256; j++) - * { - * aColPalette[j].Red = pe[j].peRed; - * aColPalette[j].Green = pe[j].peGreen; - * aColPalette[j].Blue = pe[j].peBlue; - * } - ************************************************************/ - - // successful completion - return KBrsrNotImplemented; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::BackgroundColor -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Color_t -CGDIDeviceContext::BackgroundColor () const -{ - CGDIDeviceContext* self = const_cast<CGDIDeviceContext*> (this); - return self->SwapColorBytes(iBackgroundColor); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::ClipRect -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Rectangle_t -CGDIDeviceContext::ClipRect () const -{ - NW_GDI_Rectangle_t clip; - - clip.point.x = (NW_GDI_Metric_t) - (iClipRect.point.x + iOrigin.x - iDisplayBounds.point.x); - - clip.point.y = (NW_GDI_Metric_t) - (iClipRect.point.y + iOrigin.y - iDisplayBounds.point.y); - - clip.dimension.width = (NW_GDI_Metric_t)(iClipRect.dimension.width); - - clip.dimension.height = (NW_GDI_Metric_t)(iClipRect.dimension.height); - - return clip; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DisplayBounds -// -// ----------------------------------------------------------------------------- -// -const NW_GDI_Rectangle_t* -CGDIDeviceContext::DisplayBounds () const -{ - // displayBounds - return &(iDisplayBounds); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DisplayDepth -// -// ----------------------------------------------------------------------------- -// -TUint8 -CGDIDeviceContext::DisplayDepth () const -{ - // return the desired property - - // Gets 'bits per color' property of the display - CGDIDeviceContext* self = const_cast<CGDIDeviceContext*> (this); - switch(self->Epoc32GraphicsContext()->Device()->DisplayMode()) - { - case EGray2: - return 1; - case EGray4: - return 2; - case EGray16:case EColor16: - return 4; - case EGray256:case EColor256: - return 8; - case EColor64K: - return 16; - case EColor16M: - return 24; - case EColor4K: - return 12; - default: - return 0; - } -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::FillPattern -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Pattern_t -CGDIDeviceContext::FillPattern () const -{ - // return the desired property - return iFillPattern; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::GetFlowDirection -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::GetFlowDirection (NW_Text_t* aText, - NW_GDI_FlowDirection_t* aFlowDirection) const -{ - TText16* string; - NW_Text_Length_t strLen = 0; - TBool freeNeeded = NW_FALSE; - TPtrC textPtr; - - NW_ASSERT ( aFlowDirection ); - - NW_TRY (status) { - - // Set the default response - *aFlowDirection = NW_GDI_FlowDirection_LeftRight; - - // Set the aText string*/ - string = - NW_Text_GetUCS2Buffer (aText, - NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated, - &strLen, - (unsigned char*) &freeNeeded); - NW_THROW_OOM_ON_NULL (string, status); - - // If no aText, we're done - if (strLen == 0) { - return KBrsrSuccess; - } - textPtr.Set(string, strLen); - TBool found; - TBidiText::TDirectionality bidiDir = TBidiText::TextDirectionality(textPtr, &found); - *aFlowDirection = (bidiDir == TBidiText::ELeftToRight) ? NW_GDI_FlowDirection_LeftRight : NW_GDI_FlowDirection_RightLeft; - - } NW_CATCH (status) { - } NW_FINALLY { - if (freeNeeded) NW_Mem_Free (string); - return status; - } NW_END_TRY -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::ForegroundColor -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Color_t -CGDIDeviceContext::ForegroundColor () const -{ - CGDIDeviceContext* self = const_cast<CGDIDeviceContext*> (this); - return self->SwapColorBytes(iForegroundColor); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::LinePattern -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Pattern_t -CGDIDeviceContext::LinePattern () const -{ - return iLinePattern; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::LineWidth -// -// ----------------------------------------------------------------------------- -// -NW_GDI_Metric_t -CGDIDeviceContext::LineWidth () const -{ - return iLineWidth; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::Origin -// -// ----------------------------------------------------------------------------- -// -const NW_GDI_Point2D_t* -CGDIDeviceContext::Origin () const -{ - // return the desired property - return &iOrigin; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::PaintMode -// -// ----------------------------------------------------------------------------- -// -NW_GDI_PaintMode_t -CGDIDeviceContext::PaintMode () const -{ - return iPaintMode; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::GetScaledCFont -// This method takes GDI font as a parameter, updates its size according -// to font size level and returns corresponding CFont* -// -// ----------------------------------------------------------------------------- -// -void* -CGDIDeviceContext::GetScaledCFont (CGDIFont* aFont) const - { - // parameter assertion block - NW_ASSERT (aFont); - - return (CFont*)aFont->GetEpocNativeFont(); - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::TextDirection -// -// ----------------------------------------------------------------------------- -// -NW_GDI_TextDirection_t -CGDIDeviceContext::TextDirection () const -{ - // return the desired property - return iTextDirection; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::GetTextExtent -// The purpose of this function is to calculate the length of a string (in -// pixels -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::GetTextExtent (const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_GDI_Dimension2D_t* aExtent) const - { - TText16* string = NULL; - NW_Text_Length_t length; - NW_Text_Length_t trimmedLen; - NW_Text_Length_t i; - TBool freeNeeded = NW_FALSE; - - NW_REQUIRED_PARAM(aSpacing); - - // parameter assertion block - NW_ASSERT (aText); - NW_ASSERT (aExtent); - - NW_TRY (status) - { - (void) NW_Mem_memset (aExtent, 0, sizeof (*aExtent)); - - // Get the aText as unicode - string = - NW_Text_GetUCS2Buffer (aText, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &length, - (unsigned char*) &freeNeeded); - - if (length == 0) - { - NW_THROW_STATUS (status, KBrsrSuccess); - } - - if (!string) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - - // Trim the string - trimmedLen = 0; - for (i = 0; i < length; i++) - { - if ((string[i] == NW_TEXT_UCS2_SOFT_HYPHEN) || (string[i] == NW_TEXT_UCS2_CR)) - { - continue; - } - else if ((string[i] == NW_TEXT_UCS2_TAB) || (string[i] == NW_TEXT_UCS2_NBSP)) - { - // In vertical-layout mode we want to ignore nbsp within a table cell - if (iRemoveNbsp) - { - continue; - } - string[trimmedLen++] = ' '; - } - else - { - string[trimmedLen++] = string[i]; - } - } - string[trimmedLen] = 0; - - // Lowercase letters will be rendered as uppercase characters - // Font size remains intact (according to spec) - - if(aGDIFont->FontVariant() == EGDIFontVariantSmallCaps) - { - if(!freeNeeded) - { - string = NW_Text_GetUCS2Buffer(aText, NW_Text_Flags_Copy, NULL, NULL); - NW_THROW_OOM_ON_NULL (string, status); - - freeNeeded = NW_TRUE; - } - NW_Str_Strupr((TText16*)string); - } - - CFont* epocFont = (CFont*)aGDIFont->GetEpocNativeFont(); - - TPtrC ptrC(string); - - TInt width = epocFont->TextWidthInPixels(ptrC); - width += (length-1)*aSpacing; - - TInt height = 0; - if (width) - { - height = epocFont->HeightInPixels(); - } - - if (aFlowDirection == NW_GDI_FlowDirection_LeftRight || - aFlowDirection == NW_GDI_FlowDirection_RightLeft) - { - aExtent->width=(NW_GDI_Metric_t)width; - aExtent->height=(NW_GDI_Metric_t)height; - } - else - { - aExtent->width=(NW_GDI_Metric_t)height; - aExtent->height=(NW_GDI_Metric_t)width; - } - - if (aExtent->width) - { - aExtent->width = (NW_GDI_Metric_t)(aExtent->width + 1); - } - if (aExtent->height) - { - if (iVariantFlag == EApacVariant) - { - aExtent->height = (NW_GDI_Metric_t)(aExtent->height + 3); - } - else - { - aExtent->height = (NW_GDI_Metric_t)(aExtent->height + 1); - } - } - - } - NW_CATCH (status) - { - } - NW_FINALLY - { - // cleanup! - if (freeNeeded) - { - NW_Mem_Free (string); - } - // successful completion - return status; - } - NW_END_TRY; - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::PreDraw -// The purpose of this function is to clean up the screen for next draw -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::PreDraw () -{ - NW_GDI_Rectangle_t rect; - - rect.point.x = (NW_GDI_Metric_t)(iClipRect.point.x + iOrigin.x); - rect.point.y = (NW_GDI_Metric_t)(iClipRect.point.y + iOrigin.y); - rect.dimension.width = iClipRect.dimension.width; - rect.dimension.height = iClipRect.dimension.height; - - FillRectangle(&rect); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::PostDraw -// The purpose of this function is to redraw the screen partially. redraw -// area should be given -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::PostDraw ( TBool aDrawNow) -{ - iOocEpoc32View->EpocDrawNow ((unsigned char)aDrawNow); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetBackgroundColor -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetBackgroundColor (NW_GDI_Color_t aColor) -{ - iBackgroundColor = SwapColorBytes(aColor); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetClipRect -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetClipRect (const NW_GDI_Rectangle_t* aRectangle) -{ - if(aRectangle) { - iClipRect.point.x = (NW_GDI_Metric_t) - ((aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x) > 0 ? - (aRectangle->point.x - iOrigin.x + iDisplayBounds.point.x) : 0); - - iClipRect.point.y = (NW_GDI_Metric_t) - ((aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y) > 0 ? - (aRectangle->point.y - iOrigin.y + iDisplayBounds.point.y) : 0); - iClipRect.dimension.width = (NW_GDI_Metric_t)((aRectangle->dimension.width + 1) > - iDisplayBounds.dimension.width ? - iDisplayBounds.dimension.width : - aRectangle->dimension.width); - iClipRect.dimension.height = (NW_GDI_Metric_t)((aRectangle->dimension.height + 1) > - iDisplayBounds.dimension.height ? - iDisplayBounds.dimension.height : - aRectangle->dimension.height); - } - else { - iClipRect = iDisplayBounds; - } -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetFillPattern -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetFillPattern (NW_GDI_Pattern_t aFillPattern) -{ - iFillPattern = aFillPattern; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetForegroundColor -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetForegroundColor (NW_GDI_Color_t aColor) -{ - iForegroundColor = SwapColorBytes(aColor); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetLinePattern -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetLinePattern (NW_GDI_Pattern_t aLinePattern) -{ - iLinePattern = aLinePattern; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetLineWidth -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetLineWidth (NW_GDI_Metric_t aLineWidth) -{ - // set the property - iLineWidth = aLineWidth; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetOrigin -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetOrigin (const NW_GDI_Point2D_t* aOrigin) -{ - NW_ASSERT(aOrigin); - - // set the property - iOrigin=*aOrigin; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetPaintMode -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetPaintMode (NW_GDI_PaintMode_t aPaintMode) -{ - // set the property - iPaintMode = aPaintMode; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetTextDirection -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetTextDirection (NW_GDI_TextDirection_t aTextDirection) -{ - NW_REQUIRED_PARAM (aTextDirection); - - // set the property - iTextDirection = aTextDirection; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetDisplayBounds -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetDisplayBounds (const NW_GDI_Rectangle_t* aRectangle) -{ - // set the desired property - iDisplayBounds = *aRectangle; - iClipRect = iDisplayBounds; -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::CreateFont -// -// ----------------------------------------------------------------------------- -// -CGDIFont* -CGDIDeviceContext::CreateFont (const NW_Text_t* aFamily, - TGDIFontStyle aStyle, - TUint8 aSizeInPixels, - TUint16 aWeight, - TGDIFontVariant aVariant) const - { - // ignore err, because function is handling the error when font created is NULL - CGDIFont* font = NULL; - - // convert font size from pixels to twips - TUint16 sizeInTwips = (TUint16)iWsScreenDev->VerticalPixelsToTwips((TInt)aSizeInPixels); - - TInt err; - TRAP( err, font = CGDIFont::NewL( this, aFamily, aStyle, sizeInTwips, aWeight, aVariant ) ); - return font; - } - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::DrawLine -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::DrawLine (NW_GDI_Point2D_t aStartPoint, - NW_GDI_Point2D_t aEndPoint) -{ - CBitmapContext* gc = Epoc32GraphicsContext(); - if (iLinePattern != NW_GDI_Pattern_None) - { - gc->SetPenStyle((CGraphicsContext::TPenStyle)(iLinePattern)); - } - - gc->DrawLine( TPoint( aStartPoint.x - iOrigin.x + iDisplayBounds.point.x, - aStartPoint.y - iOrigin.y + iDisplayBounds.point.y), - TPoint( aEndPoint.x - iOrigin.x + iDisplayBounds.point.x, - aEndPoint.y - iOrigin.y + iDisplayBounds.point.y ) ); -} - -// ------------------------------------------------------------------------- -// CGDIDeviceContext::SetFontSizeLevel -// -// ----------------------------------------------------------------------------- -// -TBool -CGDIDeviceContext::SetFontSizeLevel () -{ - TGDIDeviceContextFontSizeLevel fontSizeLevel; - - fontSizeLevel = (TGDIDeviceContextFontSizeLevel)NW_Settings_GetFontSizeLevel(); - if (iFontSizeLevel == fontSizeLevel){ - return NW_FALSE; - } - - switch(fontSizeLevel) - { - case EGDIDeviceContextFontSizeLevelAllSmall: - case EGDIDeviceContextFontSizeLevelSmaller: - case EGDIDeviceContextFontSizeLevelNormal: - case EGDIDeviceContextFontSizeLevelLarger: - case EGDIDeviceContextFontSizeLevelAllLarge: - iFontSizeLevel = fontSizeLevel; - return NW_TRUE; - - default: - return NW_FALSE; - } - -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::ChangeFontSize -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::ChangeFontSize (CGDIFont* aFont) -{ - TInt16 fontSize; - TInt16 difference; - TInt16 newFontSize; - - switch(iFontSizeLevel) - { - case EGDIDeviceContextFontSizeLevelAllSmall: - // show text 40% smaller than the declared size - fontSize = aFont->DeclaredFontSize(); - difference = (TInt16)((float)fontSize / 2.5); - newFontSize = (TInt16)(fontSize - difference); - - aFont->SetFontSize((TUint16)newFontSize); - return; - case EGDIDeviceContextFontSizeLevelSmaller: - // show text 20% smaller than the declared size - fontSize = aFont->DeclaredFontSize(); - difference = (TInt16)((float)fontSize / 5); - newFontSize = (TInt16)(fontSize - difference); - - aFont->SetFontSize((TUint16)newFontSize); - return; - case EGDIDeviceContextFontSizeLevelNormal: - // show text to be the declared size - fontSize = aFont->DeclaredFontSize(); - - aFont->SetFontSize((TUint16)fontSize); - return; - case EGDIDeviceContextFontSizeLevelLarger: - // show text 20% larger than the declared size - fontSize = aFont->DeclaredFontSize(); - difference = (TInt16)((float)fontSize / 5); - newFontSize = (TInt16)(fontSize + difference); - - aFont->SetFontSize((TUint16)newFontSize); - return; - case EGDIDeviceContextFontSizeLevelAllLarge: - // show text 40% larger than the declared size - fontSize = aFont->DeclaredFontSize(); - difference = (TInt16)((float)fontSize / 2.5); - newFontSize = (TInt16)(fontSize + difference); - - aFont->SetFontSize((TUint16)newFontSize); - return; - default: - return; - } -} - -// ---------------------------------------------------------------------------- -// CGDIDeviceContext::GetHighlightColor -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::GetHighlightColor (NW_GDI_Color_t* aColor) -{ - NW_ASSERT (aColor); - TRgb col = CEikonEnv::Static()->Color(EColorControlHighlightBackground); - - *aColor = NW_GDI_RGB(col.Red(), col.Green(), col.Blue()); -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SwitchAgainstBG -// switch the color to white if the background color is dark enough, -// i.e. darker than half of the white color indensity. -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SwitchAgainstBG( NW_GDI_Color_t* aColor) -{ - NW_GDI_Color_t rValue = 0; - NW_GDI_Color_t gValue = 0; - NW_GDI_Color_t bValue = 0; - NW_GDI_Color_t bgColor = 0; - - bgColor = BackgroundColor(); - - rValue = NW_GDI_GetRValue(bgColor); - gValue = NW_GDI_GetGValue(bgColor); - bValue = NW_GDI_GetBValue(bgColor); - - if ((rValue+gValue+bValue) < 384){ - *aColor = SwapColorBytes(NW_GDI_Color_White); - } -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SplitText -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::SplitText (NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_GDI_Metric_t aConstraint, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_Text_Length_t* aLength, - TUint8 aMode) - { - if (aMode == NW_GDI_SplitMode_Newline) - { - return SplitAtNewline (aText, aGDIFont, aConstraint, aSpacing, aFlowDirection, aLength); - } - else if (aMode == NW_GDI_SplitMode_Clip) - { - return Truncate (aText, aGDIFont, aConstraint, aSpacing, aFlowDirection, aLength); - } - else - { - return WordWrap(aText, aGDIFont, aConstraint, aSpacing, aFlowDirection, aLength); - } - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::GetSubstringExtent -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIDeviceContext::GetSubstringExtent (const NW_Text_t* aText, - CGDIFont* aGDIFont, - NW_Text_Length_t aStart, - NW_Text_Length_t aLength, - NW_GDI_Metric_t aSpacing, - NW_GDI_FlowDirection_t aFlowDirection, - NW_GDI_Dimension2D_t* aExtent) -{ - NW_Text_t* frag = NULL; - NW_Text_Length_t totalLength; - TText16* storage = NULL; - TBool freeNeeded = NW_FALSE; - - NW_Mem_memset(aExtent, 0, sizeof(NW_GDI_Dimension2D_t)); - - NW_TRY(status) { - - storage = NW_Text_GetUCS2Buffer (aText, 0, &totalLength, (unsigned char*) &freeNeeded); - NW_THROW_OOM_ON_NULL(storage, status); - - if (totalLength < aStart + aLength) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - if (aLength == 0) { - NW_THROW_SUCCESS(status); - } - - frag = (NW_Text_t*)NW_Text_UCS2_New(&storage[aStart], aLength, 0); - NW_THROW_OOM_ON_NULL(frag, status); - - status = GetTextExtent (frag, aGDIFont, aSpacing, aFlowDirection, aExtent); - NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) { - } - NW_FINALLY { - - if (freeNeeded) { - NW_Str_Delete(storage); - } - NW_Object_Delete(frag); - - return status; - } NW_END_TRY; -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::FindFont -// -// ----------------------------------------------------------------------------- -// -CFont* -CGDIDeviceContext::FindFont (TFontSpec aFontSpec) - { - CFont* font = (CFont*)iFontCache->Search(aFontSpec); - - if (!font) // not found in cache - { - // we should always get a font back from the Avkon - font = AknFontAccess::GetClosestFont( *iWsScreenDev, - aFontSpec.iFontStyle, - aFontSpec.iHeight, - aFontSpec.iTypeface.iName ); - - CFont* discardFont = iFontCache->AddEntryL( (CFont*&)font, aFontSpec ); - if (discardFont) - { - iWsScreenDev->ReleaseFont( discardFont ); - } - } - - return font; - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SetRemoveNbsp -// -// ----------------------------------------------------------------------------- -void -CGDIDeviceContext::SetRemoveNbsp( TBool aFlag ) - { - iRemoveNbsp = aFlag; - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::RemoveNbsp -// -// ----------------------------------------------------------------------------- -// -TBool -CGDIDeviceContext::RemoveNbsp() -{ - return iRemoveNbsp; -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SetGraphicsContext -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetGraphicsContext( void* aGraphicsContext ) -{ - iGraphicsContext = aGraphicsContext; -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::SetFontSizeLevel -// -// ----------------------------------------------------------------------------- -// -void -CGDIDeviceContext::SetFontSizeLevel( TGDIDeviceContextFontSizeLevel aFontSizeLevel ) -{ - iFontSizeLevel = aFontSizeLevel; -} - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::VariantFlag -// -// ----------------------------------------------------------------------------- -// -EVariantFlag -CGDIDeviceContext::VariantFlag() -{ - return iVariantFlag; -} - -TGDISupportedLanguage -CGDIDeviceContext::SupportedLanguage() - { - return iSupportedLanguage; - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::CanSplit -// -// ----------------------------------------------------------------------------- -// -TBool -CGDIDeviceContext::CanSplit( TText16 aChar1, TText16 aChar2 ) - { - CGDIDeviceContext* self = const_cast<CGDIDeviceContext*> (this); - if ( (aChar1 == 0) || (aChar2 == 0) || - NW_Str_Isspace( aChar1 ) || NW_Str_Isspace( aChar2 ) || - (aChar1 == NW_TEXT_UCS2_HYPHEN) || - (aChar1 == NW_TEXT_UCS2_SOFT_HYPHEN) ) - { - return ETrue; - } - - // Special case the Thai language, unicode chars 0x0E00 - 0x0E7F. For more - // details, see description of Thai characters at the top of this file. - // - // The description at the top of this file defined 3 concise rules for - // splitting: - // 1. Splits can occur at whitespace. - // 2. Splits can occur immediately preceding any LV. - // 3. Splits can occur immediately preceding any CONS that is not - // immediately preceded by an LV. - // - // Rule #1, dealing with whitespace, was handled above. Here, rules 2 and - // 3 are handled. - if ( IS_THAI_CHAR( aChar1) && IS_THAI_CHAR( aChar2 ) ) - { - // Rule #2: Splits can occur immediately preceding any LV. - if ( IS_THAI_LEADING_VOWEL( aChar2 ) ) - { - return ETrue; - } - // Rule #3: Splits can occur immediately preceding any CONS that is not - // immediately preceded by an LV. - if ( !IS_THAI_LEADING_VOWEL( aChar1 ) && IS_THAI_CONSONANT( aChar2 ) ) - { - return ETrue; - } - } - - //For Chinese string and other character-based language string can be broke between any two characters. - //Also we considered the case if some western words are embeded in a APAC string. - else if (self->VariantFlag() == EApacVariant && (aChar2 > 255 || aChar1 > 255) ) - { - return ETrue; - } - - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CGDIDeviceContext::IsThaiCell -// -// ----------------------------------------------------------------------------- -// -TBool -CGDIDeviceContext::IsThaiCell( TText16 aChar1, TText16 aChar2 ) - { - if ( IS_THAI_CHAR( aChar1 ) && IS_THAI_CHAR( aChar2) ) - { - // The following "if" statements are not arranged how one would - // traverse a Thai script "cell" from left to right. Instead, they - // are arranged by which is most likely to occur; thereby maximizing - // performance, albeit only slightly. - if ( (IS_THAI_COMBINING( aChar1 ) || IS_THAI_CONSONANT( aChar1 )) - && (IS_THAI_COMBINING( aChar2 ) || IS_THAI_FOLLOWING_VOWEL( aChar2 )) ) - { - return ETrue; - } - if ( IS_THAI_LEADING_VOWEL( aChar1 ) && IS_THAI_CONSONANT( aChar2 ) ) - { - return ETrue; - } - } - return EFalse; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/src/GDIFont.cpp --- a/webengine/wmlengine/src/gdi/src/GDIFont.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: device context -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_object_dynamici.h" -#include "GDIFont.h" -#include "GDIDevicecontext.h" -#include "nw_text_ucs2.h" -#include "nwx_string.h" -#include <fbs.h> -#include "BrsrStatusCodes.h" - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// Average char width in pixels (as stipulated in the UI spec). -const TUint KAverageChineseCharWidthInPixels = 12; - -// MACROS - -// LOCAL CONSTANTS AND MACROS -_LIT(KEmptyFontName,""); - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CGDIFont::CGDIFont -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CGDIFont::CGDIFont() - { - } - -// ----------------------------------------------------------------------------- -// CGDIFont::CGDIFont -// Symbian 2nd phase constructor can leave. -// aSize is in Twips -// ----------------------------------------------------------------------------- -// -void CGDIFont::ConstructL (const CGDIDeviceContext* aDeviceContext, - const NW_Text_t* aFamily, - TGDIFontStyle aStyle, - TUint16 aSize, - TUint16 aWeight, - TGDIFontVariant aVariant) - { - NW_Uint16* storage = NULL; - HBufC* buf = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded = 0; - - iDeviceContext = const_cast<CGDIDeviceContext*> (aDeviceContext); - iFontStyle = aStyle; - iFontVariant = aVariant; - iFontWeight = aWeight; - iFontFound = EFalse; - - if (aStyle == EGDIFontStyleOblique) - { - iFontStyle = EGDIFontStyleItalic; - } - - if (aFamily) - { - // convert font family name from UCS2 to TPtr16 - storage = (NW_Uint16*)NW_Text_GetUCS2Buffer (aFamily, 0, &length, &freeNeeded); - NW_ASSERT(storage); - - TPtrC16 requestedFontPtr16(storage, length); - - // convert font family name from UCS2 to HBufC - iFontFamily = requestedFontPtr16.AllocLC(); - - CleanupStack::Pop(iFontFamily); - - if (freeNeeded) - { - NW_Mem_Free ((NW_Ucs2*)storage); - } - } - // no font family was specified so use empty font family name - // underlying font API should find variant dependent font - else - { - buf = KEmptyFontName().AllocLC(); - iFontFamily = buf; - - CleanupStack::Pop(buf); - } - - if (aSize == 0) - { - iDeclaredFontSizeInTwips = KGDIDefaultFontSizeInTwips; - } - else - { - iDeclaredFontSizeInTwips = aSize; - } - - // initialize the font size - iDeviceContext->ChangeFontSize(const_cast<CGDIFont*>(this)); - } - - -// ----------------------------------------------------------------------------- -// CGDIFont::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CGDIFont* CGDIFont::NewL (const CGDIDeviceContext* aDeviceContext, - const NW_Text_t* aFamily, - TGDIFontStyle style, - TUint16 aSize, - TUint16 aWeight, - TGDIFontVariant aVariant) - { - CGDIFont* self = new( ELeave ) CGDIFont(); - - CleanupStack::PushL( self ); - self->ConstructL(aDeviceContext, aFamily, style, aSize, aWeight, aVariant); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor -// -// ----------------------------------------------------------------------------- -// -CGDIFont::~CGDIFont () -{ - if (iFontFamily) - { - delete iFontFamily; - } -} - -// ----------------------------------------------------------------------------- -// CGDIFont::GetEpocNativeFont -// returns const pointer to a CFont object */ -// -// ----------------------------------------------------------------------------- -const void* CGDIFont::GetEpocNativeFont () - { - const CFont* epocCFont = NULL; - CGDIDeviceContext* epoc32dc = iDeviceContext; - - // create the font spec - TFontSpec fs(*iFontFamily, (TInt)iFontSize); - TBool bold( EFalse ); - if (iFontWeight > 400) - { - bold = ETrue; - } - - TBool italic( EFalse ); - if ( iFontStyle == EGDIFontStyleItalic || iFontSize == EGDIFontStyleItalic ) - { - italic = ETrue; - } - fs.iFontStyle.SetStrokeWeight(bold ? EStrokeWeightBold : EStrokeWeightNormal); - fs.iFontStyle.SetPosture(italic ? EPostureItalic : EPostureUpright); - - // we should always get a font back from the device context - epocCFont = epoc32dc->FindFont(fs); - NW_ASSERT(epocCFont); - - return epocCFont; - } - -// ----------------------------------------------------------------------------- -// CGDIFont::SetFontSize -// -// ----------------------------------------------------------------------------- -void -CGDIFont::SetFontSize (TUint16 aFontSize) -{ - iFontSize = aFontSize; -} - -// ------------------------------------------------------------------------- -// CGDIFont::GetFontInfo -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CGDIFont::GetFontInfo (TGDIFontInfo* aFontInfo) -{ - // parameter assertion block - NW_ASSERT (aFontInfo); - - // change font size - iDeviceContext->ChangeFontSize(const_cast<CGDIFont*>(this)); - - CFont* epocFont = (CFont*)GetEpocNativeFont(); - - // initialize the aFontInfo structure - aFontInfo->baseline = (TUint8)(epocFont->AscentInPixels() - epocFont->BaselineOffsetInPixels()); - aFontInfo->height = (TUint8)(epocFont->HeightInPixels()); - - // successful completion - return KBrsrSuccess; -} - -TUint8 -CGDIFont::GetAverageCharWidthInPixels() - { - TUint8 width; - CFont* epocFont = (CFont*)GetEpocNativeFont(); - - if (AknLayoutUtils::Variant() == EApacVariant) - { - width = KAverageChineseCharWidthInPixels; - } - else - { - width = (TUint8)(epocFont->CharWidthInPixels('w')); - } - return width; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/gdi/src/Utils.c --- a/webengine/wmlengine/src/gdi/src/Utils.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_gdi_utils.h" - -NW_Bool -NW_GDI_Rectangle_Contains (const NW_GDI_Rectangle_t* rect, - const NW_GDI_Point2D_t* point) -{ - if ((point->x >= rect->point.x) && (point->x < rect->point.x + rect->dimension.width) && - (point->y >= rect->point.y) && (point->y < rect->point.y + rect->dimension.height)) { - return NW_TRUE; - } - else { - return NW_FALSE; - } -} - -NW_Bool -NW_GDI_Rectangle_Cross (const NW_GDI_Rectangle_t* rect1, - const NW_GDI_Rectangle_t* rect2, - NW_GDI_Rectangle_t* result) -{ - const NW_GDI_Rectangle_t* temp; - NW_GDI_Metric_t x1_left; - NW_GDI_Metric_t x1_right; - NW_GDI_Metric_t y1_bottom; - NW_GDI_Metric_t x2_left; - NW_GDI_Metric_t x2_right; - NW_GDI_Metric_t y2_top; - NW_GDI_Metric_t y2_bottom; - NW_GDI_Metric_t r_left; - NW_GDI_Metric_t r_right; - NW_GDI_Metric_t r_top; - NW_GDI_Metric_t r_bottom; - - if (result != NULL) { - NW_Mem_memset(result, 0, sizeof(NW_GDI_Rectangle_t)); - } - - if ((rect1->dimension.width==0 && rect1->dimension.height==0) || - (rect2->dimension.width==0 && rect2->dimension.height==0)) { - return NW_FALSE; - } - - if (rect1->point.y > rect2->point.y) { - temp = rect1; - rect1 = rect2; - rect2 = temp; - } - - x1_left = rect1->point.x; - x1_right = (NW_GDI_Metric_t)(rect1->point.x + rect1->dimension.width - 1); - y1_bottom = (NW_GDI_Metric_t)(rect1->point.y + rect1->dimension.height - 1); - - x2_left = rect2->point.x; - x2_right = (NW_GDI_Metric_t)(rect2->point.x + rect2->dimension.width - 1); - y2_top = rect2->point.y; - y2_bottom = (NW_GDI_Metric_t)(rect2->point.y + rect2->dimension.height - 1); - - if (x1_left < x2_left) { - if (x1_right < x2_left) { - return NW_FALSE; - } - else { - r_left = x2_left; - } - - if (x2_right < x1_right) { - r_right = x2_right; - } - else { - r_right = x1_right; - } - } - else { - if (x1_left > x2_right) { - return NW_FALSE; - } - else { - r_left = x1_left; - } - - if (x1_right < x2_right) { - r_right = x1_right; - } - else { - r_right = x2_right; - } - } - - /* Get the vertical intersection */ - if (y1_bottom < y2_top) { - return NW_FALSE; - } - else { - r_top = y2_top; - } - - if (y2_bottom < y1_bottom) { - r_bottom = y2_bottom; - } - else { - r_bottom = y1_bottom; - } - - if (result != NULL) { - result->point.x = r_left; - result->point.y = r_top; - result->dimension.width = (NW_GDI_Metric_t)(r_right - r_left + 1); - result->dimension.height = (NW_GDI_Metric_t)(r_bottom - r_top + 1); - } - - return NW_TRUE; -} - -void -NW_GDI_Rectangle_Add (const NW_GDI_Rectangle_t* rect1, - const NW_GDI_Rectangle_t* rect2, - NW_GDI_Rectangle_t* result) -{ - if (result) { - *result = *rect1; - - if (rect2->point.x < rect1->point.x) { - result->point.x = rect1->point.x; - } - if (rect2->point.y < rect1->point.y) { - result->point.y = rect1->point.y; - } - if (rect2->point.x + rect2->dimension.width > - rect1->point.x + rect1->dimension.width) { - result->dimension.width = (NW_GDI_Metric_t)(rect2->point.x + rect2->dimension.width - result->point.x); - } - if (rect2->point.y + rect2->dimension.height > - rect1->point.y + rect1->dimension.height) { - result->dimension.height = (NW_GDI_Metric_t)(rect2->point.y + rect2->dimension.height - result->point.y); - } - } -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/HEDDocumentListener.h --- a/webengine/wmlengine/src/hed/include/HEDDocumentListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,218 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef HEDDOCUMENTLISTENER_H -#define HEDDOCUMENTLISTENER_H - -// INCLUDES -#include "BrsrTypes.h" -#include <e32base.h> - -// CONSTANTS - -// MACROS - -// DATA TYPES -#ifdef __cplusplus -extern "C" - { -#endif - typedef - NW_Bool (ReportErrorCallback) (NW_HED_DocumentRoot_t* documentRoot, NW_Int16 errorClass, NW_WaeError_t error); -#ifdef __cplusplus - } -#endif - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Base class for. -* -* @lib hed.lib -* @since 2.6 -*/ -class MHEDDocumentListener -{ - - public: - /** - * - * @since 2.6 - * @param - * @return - */ - virtual void NewDocument (NW_HED_DocumentRoot_t* documentRoot, NW_HED_UrlRequest_t* urlRequest, NW_Bool aDestroyBoxTree) = 0; - - /** - * - * @since 2.6 - * @param - * @return - */ - virtual void DestroyPreviousDocument() = 0; - - /** - * - * @since 2.6 - * @param - * @return - */ - virtual void RestoreDocument () = 0; - - /** - * - * @since 2.6 - * @param - * @return NW_Bool - */ - virtual NW_Bool LoadEnd (NW_HED_DocumentRoot_t* documentRoot, NW_Int16 errorClass, NW_WaeError_t error) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode DocumentChanged( NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode DocumentChangedPartial( NW_HED_DocumentRoot_t* documentRoot, - CActive::TPriority aMessagePriority ) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode SwitchLayout (NW_Bool aVerticalLayout, NW_Bool aReformatBoxTree) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode IsActive (NW_HED_DocumentRoot_t* documentRoot, NW_Bool state) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode ShowNamedBox (NW_LMgr_Box_t* boxTree, const NW_Text_t* targetName) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode SetAnchorName (NW_Text_t* anchorName) = 0; - - /** - * - * @since 2.6 - * @param transactionId - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode LoadProgressOn (NW_Uint16 transactionId) = 0; - - /** - * - * @since 2.6 - * @param transactionId - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode LoadProgressOff (NW_Uint16 transactionId) = 0; - - /** - * - * @since 2.6 - * @param - * @return NW_Bool - */ - virtual NW_Bool ReportError (NW_HED_DocumentRoot_t* documentRoot, NW_Int16 errorClass, NW_WaeError_t error, - ReportErrorCallback* callback) = 0; - - /** - * - * @since 2.6 - * @param box - * @return NW_LMgr_RootBox_t* - */ - virtual NW_LMgr_RootBox_t* GetRootBox () = 0; - - /** - * Request the host applicaion to open the URL in a new window - * @since 3.0 - * @param aUrl The Url of the request to be done in the new window - * @param aTargetName The name of the new window - * @param aReason The reason for opening the new window - * @param aMethod The method to be used for fetching the supplied url - * @param aContentType If the method is POST, this is the content type of the data to be posted - * @param aPostData If the method is POST, this is the data to be posted - * @param aBoundary The boundary used if the content is multipart/form-data - * @param aReserved For future use - * @return Return Value is for future reference and is currently ignored - */ - virtual void WindowOpenAndPostL(TUint16* url, TUint16* target, TUint32 reason, - TUint16 method, TDesC8* contentType, TDesC8* postData, - TDesC8* aBoundary, void* reserved) = 0; - - /** - * - * @since 3.0 - * @param url - * @param target - * @param reason - */ - virtual void WindowOpenL(TUint16* url, TUint16* target, TUint32 reason) = 0; - - - /** - * - * @since 3.0 - * @return if the Browser is exiting - */ - virtual TBool Exiting() = 0; - - - /** - * - * @since 3.0 - * @return if the file processed by document handler - */ - virtual void SetFileOpenedByDocHandler( TBool aFileOpenedByDocHandler ) = 0; - -}; - -#endif // HEDDOCUMENTLISTENER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/HedLoadObserver.h --- a/webengine/wmlengine/src/hed/include/HedLoadObserver.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides an interface observe/track load requests. -* -*/ - - - -#ifndef MHEDLOADOBSERVER_H -#define MHEDLOADOBSERVER_H - -// INCLUDES -#include "BrsrStatusCodes.h" - -// FORWARD DECLARATIONS - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_Url_Resp_s NW_Url_Resp_t; -typedef struct NW_HED_UrlRequest_s NW_HED_UrlRequest_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -// CLASS DECLARATION - -class MHEDLoadObserver - { - public: // Interface - /** - * Passes a HEAD response to the observer. - * - * @param aTransactionId the transaction id. - * @param aResponse the HEAD response to be processed. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - virtual void HeadCompleted(TUint16 aTransactionId, const NW_Url_Resp_t& aResponse, - const NW_HED_UrlRequest_t& aUrlRequest, void* aClientData) = 0; - - /** - * Passes a chunk of a response to the observer. - * - * @param aTransactionId the transaction id. - * @param aChunkIndex the chunk count of this call, aChunkIndex > 0 - * @param aResponse the HEAD response to be processed. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - virtual void ChunkReceived(TUint16 aTransactionId, TUint32 aChunkIndex, - const NW_Url_Resp_t& aResponse, const NW_HED_UrlRequest_t& aUrlRequest, - void* aClientData) = 0; - - /** - * Passes a chunk of a response to the observer. - * - * @param aStatusClass the type of status-code found in aStatus -- - BRSR_STAT_CLASS_HTTP or BRSR_STAT_CLASS_GENERAL. - * @param aStatus the final load status of the request. - * @param aTransactionId the transaction id. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - virtual void LoadCompleted(TInt16 aStatusClass, TBrowserStatusCode aStatus, - TUint16 aTransactionId, const NW_HED_UrlRequest_t& aUrlRequest, - void* aClientData) = 0; - }; - -#endif // MHEDLOADOBSERVER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/HedResponseHandler.h --- a/webengine/wmlengine/src/hed/include/HedResponseHandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -Remove this file... diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/HistoryStack.h --- a/webengine/wmlengine/src/hed/include/HistoryStack.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stack of HistoryEntry objects containing info about previously -* viewed pages. Allows for the navigation (forward and back) of -* those pages and for the maintenance (add/remove) of the pages -* -*/ - - -#ifndef HISTORYSTACK_H -#define HISTORYSTACK_H - -// INCLUDES -#include <e32base.h> -//#include "historyentry.h" -#include "HistoryInterface.h" -#include "HistoryController.h" - -// CONSTANTS - -/* - static const TUint KHistoryStackSize = 20; - -// MACROS - -// DATA TYPES - -enum THistoryStackDirection -{ - - EHistoryStackDirectionPrevious, - EHistoryStackDirectionCurrent, - EHistoryStackDirectionNext -}; - - -enum THistoryStackLocation -{ - - EHistoryStackLocationAtBeginning, - EHistoryStackLocationInMiddle, - EHistoryStackLocationAtEnd -}; -*/ - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CHistoryMemCollector; -class CUrlRequestInfo; - -// CLASS DECLARATION - -/** -* CHistoryStack -* -* @lib ?library -* @since ?Series60_version -*/ -class CHistoryStack : public CBase - { - - public: - - /** - * Two-phased constructor. - * @return CHistoryStack * - */ - static CHistoryStack* NewL(TInt aHistoryStackStackSize); - - /** - * Two-phased constructor. - * @return CHistoryStack * - */ - static CHistoryStack* NewLC(TInt aHistoryStackStackSize); - - /** - * Sets the new current page in the history relative to - * the current page. - * Leave if index out of bounds. - */ - void SetCurrentL (THistoryStackDirection aDirection); - - /** - * Sets the new current page in the history to - * the index. - * Leave if index out of bounds. - */ - void SetCurrentByIndexL (TInt aIndex); - - /** - * Return the entry in the direction relative to the current page - * @return CHistoryEntry const* - */ -// CHistoryEntry* Entry (THistoryStackDirection aDirection) ; - - - /** - * Delete entire history - */ - void DeleteAll (); - - /** - * Returns the number of objects in the history list - * @return TInt - */ -// TInt Length () const {return iHistoryList->Count();} - - /** - * Retreive an entry by it's position (index) in the list - * @return CHistoryEntry const* - */ -// CHistoryEntry* EntryByIndex (TInt aHistoryIndex); - - /** - * Determine position in stack - * @return THistoryStackLocation - */ - THistoryStackLocation HistoryStackLocation () const; - - // return current index - TInt CurrentIndex () const { return iCurrent; } - - // sets the current index - void SetCurrentIndex(TInt aHistoryIndex) {iCurrent = aHistoryIndex;} - - /** - * Insert - * Add Url to History List - * @since 3.x - * @return void - */ - void Insert( const TDesC& aUrl, const CUrlRequestInfo* aRequestInfo); - - /** - * Insert - * Add Url to History List - * @since 3.x - * @return void - */ -// void InsertL( const TDesC& aUrl, const TDesC& aRequestUrl, TBool aIsPost, TDesC8& aFormContentType, CPostDataParts* aPostData ); - - /** - * Implements virtual TBool ContainsItemForURL(const TDesC& aUrl) = 0;) - * @return TBool - * Return TRUE if URL request is in the history list - */ - TBool containsItemForURL (const TDesC& aUrl); - - /** - * Delete the entry(s) from the list - */ - void DeleteEntry (TInt aIndex, TInt aCount=1); - - /** - * Returns the stack size - */ - TInt Size(){ return iHistoryStackStackSize; } - - /** - * Retreive the index of the entry relative to the current page - * @return TInt - */ - TInt Index (THistoryStackDirection aDirection); - - public: - - void ClearThumbnails(); - - TBool IsOOMCollecting(); - - /** - * Destructor - */ - ~CHistoryStack(); - - private: - - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(TInt aHistoryStackStackSize); - - /** - * Insert entry into stack at the current position and - * delete all entries above the current entry. - * Leave if out of memory. - */ -// void PushEntryL (CHistoryEntry* aHistoryEntry); - - /** - * Insert entry either at the beginning of the list - * or at the end of the list - * Leave if out of memory. - */ -// void InsertEntryL (CHistoryEntry* aHistoryEntry, THistoryStackLocation aLocation); - - /** - * Default constructor - */ - CHistoryStack(); - - /* Private Members */ - - private : - - /** - * List of pointers to History Entries - * Pointers are owned by this class - */ -// CArrayPtrFlat<CHistoryEntry>* iHistoryList; - - TInt iCurrent; - - TInt iHistoryStackStackSize; - - CHistoryMemCollector* iMemCollector; - - }; -#endif // HISTORYSTACK_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/NW_HED_EXPORT.h --- a/webengine/wmlengine/src/hed/include/NW_HED_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_EXPORT_h_ -#define _NW_HED_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_HED_EXPORT -#ifdef NW_IMPORT -#define NW_HED_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_HED_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_HED_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/TextReverse.h --- a/webengine/wmlengine/src/hed/include/TextReverse.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reverse ISO-8859-8 text -* -*/ - - - -#ifndef TEXTREVERSE_H -#define TEXTREVERSE_H - -#ifdef __cplusplus -extern "C" { -#endif - - -// INCLUDES -#include "nwx_defs.h" -#include "nwx_http_defs.h" -#include "nw_string_string.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - - - -TBrowserStatusCode ReverseText(NW_String_t* string); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // TEXTREVERSE_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/contentLoader.h --- a/webengine/wmlengine/src/hed/include/contentLoader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// This file was given to Nokia Boston by HAMETVAARA. It forwards content -// which is not handled by the browser to the OS document handler. - -// ContentLoader.h: interface for the CContentLoader class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(CONTENTLOADER_H) -#define CONTENTLOADER_H - -#include <e32base.h> // Basic Epoc stuff -#include "nwx_defs.h" -#include "urlloader_urlresponse.h" -#include "nw_hed_documentroot.h" -#include "BrsrStatusCodes.h" - -// FORWARD DECLARATIONS -class CEikProcess; -class CErrorUI; - -class CContentLoader : public CBase -{ -public: - /* - * Constructor - * @param aProcess An instance of CEikProcess. Needed for embedding. - **/ - CContentLoader( CEikProcess* aProcess ); - - /** - * Destructor - **/ - virtual ~CContentLoader(); - - /** - * Handler function. - * <ul> - * <li>Constructs DocumentHandler and passes content to it.</li> - * <li>Tries to extract the file name from the request url in order to - * get a meaninful name for content. The file name extension also - * helps Epoc recognizers. <b>What to do if the file name is - * data.php and contains a wav sound clip?</b></li> - * <li>Leaves through any system wide error. Catched by the app framework.</li> - * </ul> - */ - void HandleL( HBufC* aUrl, HBufC8* aCharset, HBufC8* aContentType, - NW_HED_DocumentRoot_t* aDocRoot, - const TDesC& aFileName, TBool* aNeedDelete ); - RFs iRfs; - HBufC* iFileName; - -private: - - void SetMimeTypeL( TUint8* aContentType, TDes8& mimetypestr ); - - CEikProcess* iProcess; - -}; - -TBrowserStatusCode HandleContent(HBufC* aUrl, HBufC8* aCharset, HBufC8* aContentType, - NW_HED_DocumentRoot_t* aDocRoot, - const TDesC& aFileName, TBool* aNeedDelete); - -void DeletePrevContentL(struct NW_HED_DocumentRoot_s* aDocRoot); - -#endif // !defined(CONTENTLOADER_H) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_dom_domvisitor.h --- a/webengine/wmlengine/src/hed/include/nw_dom_domvisitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CXML_DOM_DOMVISITOR_H -#define NW_CXML_DOM_DOMVISITOR_H - -#include "nw_object_dynamic.h" -#include "nw_dom_node.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** ----------------------------------------------------------------------- ** - @struct: NW_cXML_DOM_DOMVisitor_ClassPart - - @synopsis: default - - @scope: public - @variables: - void** unused - default - - @description: default - ** ----------------------------------------------------------------------- **/ -typedef struct NW_cXML_DOM_DOMVisitor_ClassPart_s { - void** unused; -} NW_cXML_DOM_DOMVisitor_ClassPart_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_cXML_DOM_DOMVisitor_Class - - @synopsis: default - - @scope: public - @variables: - NW_Object_Core_ClassPart_t NW_Object_Core - default - - NW_Object_Base_ClassPart_t NW_Object_Base - default - - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic - default - - NW_cXML_DOM_DOMVisitor_ClassPart_t NW_cXML_DOM_DOMVisitor - default - - @description: default - ** ----------------------------------------------------------------------- **/ -typedef struct NW_cXML_DOM_DOMVisitor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_cXML_DOM_DOMVisitor_ClassPart_t NW_cXML_DOM_DOMVisitor; -}NW_cXML_DOM_DOMVisitor_Class_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_cXML_DOM_DOMVisitor - - @synopsis: default - - @scope: public - @variables: - NW_Object_Dynamic_t super - default - - NW_DOM_Node_t* rootNode - default - - NW_DOM_Node_t* currentNode - default - - @description: default - ** ----------------------------------------------------------------------- **/ -typedef struct NW_cXML_DOM_DOMVisitor_s { - NW_Object_Dynamic_t super; - /* member variables */ - NW_DOM_Node_t* rootNode; - NW_DOM_Node_t* currentNode; -}NW_cXML_DOM_DOMVisitor_t; - - -/* ------------------------------------------------------------------------- */ -#define NW_cXML_DOM_DOMVisitor_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_cXML_DOM_DOMVisitor)) - -#define NW_cXML_DOM_DOMVisitorOf(_object) \ - (NW_Object_Cast (_object, NW_cXML_DOM_DOMVisitor)) - -/* ------------------------------------------------------------------------- */ -extern const NW_cXML_DOM_DOMVisitor_Class_t NW_cXML_DOM_DOMVisitor_Class; - -/* ------------------------------------------------------------------------- * - final public methods - * ------------------------------------------------------------------------- */ - - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_SetRootNode - - @synopsis: Sets root node. - - @scope: public - - @parameters: - [in-out] NW_cXML_DOM_DOMVisitor_t* visitor - default - - [in-out] NW_DOM_Node_t* rootNode - default - - @description: Sets root node. - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -extern TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_SetRootNode (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_DOM_Node_t* rootNode); - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_GetRootNode - - @synopsis: Gets root node. - - @scope: public - - @parameters: - [in-out] NW_cXML_DOM_DOMVisitor_t* visitor - default - - @description: Returns the root node. - - @returns: NW_DOM_Node_t* - default - - ** ----------------------------------------------------------------------- **/ -extern -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_GetRootNode (NW_cXML_DOM_DOMVisitor_t* visitor); - - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_Next - - @synopsis: Gets next node. - - @scope: public - - @parameters: - [in] NW_cXML_DOM_DOMVisitor_t* visitor - default - - [in] NW_Uint8 type - default - - @description: Returns the next node of the given type. Starting with - the root node it returns nodes in a depth-first fashion. - NULL is returned when all of the nodes have been iterated - over. - - @returns: NW_DOM_Node_t* - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -extern -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_Next (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type); - - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_NextChild - - @synopsis: Like Next except that it only iterates over the root's - direct children. NULL is returned when all of the nodes - have been iterated over. - - @scope: public - - @parameters: - [in] NW_cXML_DOM_DOMVisitor_t* visitor - default - - [in] NW_Uint8 type - default - - @description: Like Next except that it only iterates over the root's direct children.. - - @returns: NW_DOM_Node_t* - default - - ** ----------------------------------------------------------------------- **/ -extern -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_NextChild (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type); - - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_Reset - - @synopsis: resets the visitor to its initial state. - - @scope: public - - @parameters: - [in] NW_cXML_DOM_DOMVisitor_t* visitor - default - - @description: resets the visitor to its initial state. - - @returns: TBrowserStatusCode - default - - ** ----------------------------------------------------------------------- **/ -extern -TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_Reset (NW_cXML_DOM_DOMVisitor_t* visitor); - -/* ------------------------------------------------------------------------- */ -/* Gets the next node using skipChildren functionality */ -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_NextNode (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type, - NW_Bool skipChildren); - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - - -/** ----------------------------------------------------------------------- ** - @function: NW_cXML_DOM_DOMVisitor_New - - @synopsis: Creates new node. - - @scope: public - - @parameters: - [in] NW_DOM_Node_t* rootNode - default - - @description: Creates new node. - - @returns: NW_cXML_DOM_DOMVisitor_t* - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -extern -NW_cXML_DOM_DOMVisitor_t* -NW_cXML_DOM_DOMVisitor_New (NW_DOM_Node_t* rootNode); - - -extern -TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_Initialize (NW_cXML_DOM_DOMVisitor_t* visitor, NW_DOM_Node_t* rootNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CXML_DOM_DOMVISITOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_dom_domvisitori.h --- a/webengine/wmlengine/src/hed/include/nw_dom_domvisitori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CXML_DOM_DOMVISITORI_H -#define NW_CXML_DOM_DOMVISITORI_H - -#include "nw_object_dynamici.h" -#include "nw_dom_domvisitor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_cXML_DOM_DOMVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CXML_DOM_DOMVISITORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_appservices.h --- a/webengine/wmlengine/src/hed/include/nw_hed_appservices.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,305 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_APPSERVICES_H -#define NW_HED_APPSERVICES_H - -#ifndef __E32DEF_H__ -// Undef NULL is necessary to prevent un-necessary warnings. <time.h> also -// defines NULL if not defined already. Therefore, if time.h has already -// been included in the source file before this header file then warnings -// would otherwise occur. -#ifdef NULL -#undef NULL -#endif -#include <e32def.h> -#endif - -#include "nw_errnotify.h" -#include "nw_scrproxy.h" -#include "nw_wml_api.h" -#include "nw_wae.h" -#include "nw_evlog_api.h" -#include "nwx_url_utils.h" -#include "BrsrStatusCodes.h" -//#include "urlloader_urlloaderint.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct NW_String_String_s; -typedef struct NW_String_String_s NW_String_t; - -typedef struct _NW_HED_AppServices_s NW_HED_AppServices_t; - -typedef struct NW_AppServices_PictureViewAPI_s NW_AppServices_PictureViewAPI_t; - -typedef struct NW_AppServices_SoftKeyAPI_s NW_AppServices_SoftKeyAPI_t; - -typedef struct NW_AppServices_SelectListAPI_s NW_AppServices_SelectListAPI_t; - -typedef struct NW_AppServices_BrowserAppAPI_s NW_AppServices_BrowserAppAPI_t; - -typedef struct NW_AppServices_ImageViewAPI_s NW_AppServices_ImageViewAPI_t; - -typedef struct NW_AppServices_GetLocalizedStringAPI_s NW_AppServices_GetLocalizedStringAPI_t; - -typedef struct NW_AppServices_CharacterConversionAPI_s NW_AppServices_CharacterConversionAPI_t; - -typedef struct NW_AppServices_EcmaScriptPI_s NW_AppServices_EcmaScriptPI_t; - -typedef struct NW_AppServices_FormBox_s NW_AppServices_FormBox_t; - -typedef struct NW_AppServices_SecurityNotes_s NW_AppServices_SecurityNotes_t; - -typedef struct NW_AppServices_ObjectDialog_s NW_AppServices_ObjectDialog_t; - -/* -**------------------------------------------------------------------------- -** PictureViewer API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_PictureViewAPI_s -{ - /* initialize the dynamic item list */ - void (*initDynList)(void *ctx); - /* Add item to the dynamic item list */ - void (*addItem)(NW_Uint32* image); - - }; - -/* -**------------------------------------------------------------------------- -** SoftKey API -**------------------------------------------------------------------------- -*/ -typedef enum { - NW_SOFTKEY_OK, - NW_SOFTKEY_CLEAR, - NW_SOFTKEY_OPTIONS, - NW_SOFTKEY_BACK, - NW_SOFTKEY_CANCEL -} NW_SoftKeyText_t; - -struct NW_AppServices_SoftKeyAPI_s -{ - /* Set text of LeftSoftKey */ - void (*setLeft)(NW_SoftKeyText_t softKeyText); - /* Set text of RightSoftKey */ - void (*setRight)(NW_SoftKeyText_t softKeyText); -}; - -/* - -**------------------------------------------------------------------------- -** SelectList API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_SelectListAPI_s -{ - /* Stop select list panel */ - void (*cleanup)(void); -}; - -/*------------------------------------------------------------------------- - * Telephony API - *------------------------------------------------------------------------- - */ -struct NW_AppServices_TelephonyAPI_s -{ - /* Make Call - a valid number should be sent */ - TBrowserStatusCode (*makeCall)(const NW_Ucs2* number); - /* add phone book entry */ - TBrowserStatusCode (*addPBEntry)(const NW_Ucs2* number, const NW_Ucs2* name, const NW_Ucs2* email); -}; - -/*------------------------------------------------------------------------- - * Telephony API - *------------------------------------------------------------------------- - */ -struct NW_AppServices_BrowserAppAPI_s -{ - /* Exit the browser application */ - TBrowserStatusCode (*exit)(void *ctx); - TInt (*SwitchToImgMapView)(void); - TInt (*SwitchFromImgMapViewIfNeeded)(void); - TBool (*IsImageMapView)(void); -}; - -/* -**------------------------------------------------------------------------- -** ImageViewer API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_ImageViewAPI_s -{ - /* View the focussed image */ - void (*imageView)(void* rawData, NW_Int32 length, NW_Bool isWbmp); - -}; - -/* -**------------------------------------------------------------------------- -** GetLocalizedString API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_GetLocalizedStringAPI_s -{ - /* Retrieve localized string based on type */ - NW_Ucs2* (*getLocalizedString)(NW_Uint32 type); - -}; - -/* -**------------------------------------------------------------------------- -** Character Conversion API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_CharacterConversionAPI_s -{ - /* Converts the respo */ - TBrowserStatusCode (*convertFromForeignCharSet)(void* ctx, NW_Url_Resp_t* response); - TBrowserStatusCode (*convertToForeignCharSet)(void* ctx, NW_String_t* text); - TBrowserStatusCode (*convertFromForeignChunk)(void* ctx, NW_Uint32 foreignEncoding, void* inBuf, - TInt * numUnconvertible, TInt* indexFirstUnconvertible, void** outBuf); -}; - -/* -**------------------------------------------------------------------------- -** EcmaScript API -**------------------------------------------------------------------------- -*/ -struct NW_AppServices_EcmaScriptPI_s -{ - void (*WindowAlert)(void* browserApp_Ctx, NW_Ucs2* msg); - NW_Bool (*WindowConfirm)(void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* yesMsg, NW_Ucs2* noMsg); - NW_Ucs2* (*WindowPrompt)(void* browserApp_Ctx, NW_Ucs2* msg, NW_Ucs2* defaultVal); - void (*WindowOpen)(void* browserApp_Ctx, NW_Ucs2* url, NW_Ucs2* target, NW_Uint32 reason); -}; - -/* -**------------------------------------------------------------------------- -** FormBox API -**------------------------------------------------------------------------- -*/ - -struct NW_AppServices_FormBox_s -{ - TBrowserStatusCode (*InputInvalid)(void* aCtx, TInt aMin); -}; - -/* -**------------------------------------------------------------------------- -** SecurityNotes API -**------------------------------------------------------------------------- -*/ - -struct NW_AppServices_SecurityNotes_s -{ - TBrowserStatusCode (*AboutToLoadPage)(NW_Uint32 noteType); -}; - -/* -**------------------------------------------------------------------------- -** ObjectDialog API -**------------------------------------------------------------------------- -*/ - -struct NW_AppServices_ObjectDialog_s -{ - NW_Bool (*ShowObjectDialog)(); -}; - - -/* -**------------------------------------------------------------------------- -** Application Services API -**------------------------------------------------------------------------- -*/ -struct _NW_HED_AppServices_s { - - /* TODO: insert other relevant APIs */ - /* ... */ - - /* Script Dialog API */ - NW_Scr_DialogApi_t scrDlgApi; - - /* Error Notification API */ - NW_ErrorApi_t errorApi; - - /* WTAI API */ - NW_WtaiApi_t wtaiApi; - - /* Generic Dialog API */ - NW_GenDlgApi_t genDlgApi; - - /* PictureView API */ - NW_AppServices_PictureViewAPI_t pictureViewApi; - - /* WaitNotePanel API */ - NW_UrlLoadProgressApi_t loadProgress_api; - - /* Event Log API */ - NW_EvLogApi_t evLogApi; - - /* SoftKey API */ - NW_AppServices_SoftKeyAPI_t softKeyApi; - - /* Userredirection Resp API */ - NW_UserRedirectionApi_t userRedirection; - - /* Select List API */ - NW_AppServices_SelectListAPI_t selectListApi; - - /* Script Suspend/Resume Query API */ - NW_Scr_SuspResQueryApi_t scriptSuspResApi; - - /* BrowserApp API */ - NW_AppServices_BrowserAppAPI_t browserAppApi; - - /* ImageView API */ - NW_AppServices_ImageViewAPI_t imageViewAPI; - - /* Localized UI strings API */ - NW_AppServices_GetLocalizedStringAPI_t getLocalizedStringAPI; - - /* Character Conversion API */ - NW_AppServices_CharacterConversionAPI_t characterConversionAPI; - - /* EcmaScript API */ - NW_AppServices_EcmaScriptPI_t ecmaScriptAPI; - - /* Fbox callbacks */ - NW_AppServices_FormBox_t formBoxCallbacks; - - /* Security Notes */ - NW_AppServices_SecurityNotes_t securityNotes; - - /* Object Dialog */ - NW_AppServices_ObjectDialog_t objectDialog; - -}; - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_APPSERVICES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_appservicesimpl.h --- a/webengine/wmlengine/src/hed/include/nw_hed_appservicesimpl.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: AppServicesImpl.h -** Part of: HED -** Description: Provides an interface to WTA functionality. -******************************************************************/ - -#ifndef NW_HED_APPSERVICESIMPL_H -#define NW_HED_APPSERVICESIMPL_H - -#include "nwx_defs.h" -#include "nwx_string.h" -#include "nw_scrproxy.h" -#include "nw_hed_appservices.h" -#include "nwx_generic_dlg.h" -#include "nw_wae.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -/* -**------------------------------------------------------------------------- -** Function declarations -**------------------------------------------------------------------------- -*/ - -/* TODO: add any other relevant api declarations */ - -/* error functions called by the WML Browser */ -TBrowserStatusCode NW_UI_NotifyError(void *wae, const TBrowserStatusCode status, - void *callback_ctx, - NW_ErrorCB_t *callback); -TBrowserStatusCode NW_UI_HttpError(void *wae, const NW_WaeHttpStatus_t httpError, - const NW_Ucs2 *uri, - void *callback_ctx, - NW_ErrorCB_t *callback); - -/* dialog api called by the script/authentication */ -void NW_UI_DialogListSelect ( NW_Dlg_ListSelect_t *data, - void* callbackCtx, - NW_Dlg_ListSelectCB_t *callback ); - -void NW_UI_DialogPrompt ( NW_Dlg_Prompt_t* data, - void* callbackCtx, - NW_Dlg_PromptCB_t *callback ); - -void NW_UI_DialogInputPrompt ( NW_Dlg_InputPrompt_t *data, - void* callbackCtx, - NW_Dlg_InputPromptCB_t *callback ); - -void NW_UI_DlgAlert (void *wae, - const NW_Ucs2 *message, - void *callback_ctx, - NW_ScrProxy_DlgAlertCB_t *callback); - -void NW_UI_DlgConfirm (void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callback_ctx, - NW_Dlg_ConfirmCB_t *callback); - -void NW_UI_DlgPrompt (void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - void *callback_ctx, - NW_ScrProxy_DlgPromptCB_t *callback); - - -/*PictureViewer */ -void NW_UI_PictureView_InitPVList(void *ctx); -void NW_UI_PictureView_AddItem(NW_Uint32* image); - -/* SoftKey rountines */ -void NW_UI_SoftKey_SetLeftKey(NW_SoftKeyText_t softKeyText); -void NW_UI_SoftKey_SetRightKey(NW_SoftKeyText_t softKeyText); - -/* WTAI declarations */ -TBrowserStatusCode NW_HED_wp_makeCall (void *ctx, /* context */ - const NW_Ucs2 *number); /* arguments */ -TBrowserStatusCode NW_HED_wp_sendDTMF (void *ctx, - const NW_Ucs2 *dtmf); -TBrowserStatusCode NW_HED_wp_addPBEntry (void *ctx, - const NW_Ucs2 *number, const NW_Ucs2 *name); -TBrowserStatusCode NW_HED_nokia_locationInfo(void *ctx, - NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format, - NW_Http_Header_t *header); -/* URLLoadProgress API routines */ -TBrowserStatusCode NW_UI_StopContentLoad(void *ctx,const NW_Ucs2* urlname); -TBrowserStatusCode NW_UI_StartContentLoad(void *ctx,const NW_Ucs2* urlname); -TBrowserStatusCode NW_UI_UrlLoadProgressOn(void *wae, NW_Uint16 transactionId); - -/* User Redirection Response API routines */ -void NW_UI_GetUserRedirectionData (void *wae, - const NW_Ucs2 *originalUrl, - const NW_Ucs2 *redirectedUrl, - void *callbackCtx, - NW_Wae_UserRedirectionCB_t *callback); - -/* Select List API declarations */ -void NW_UI_SelectList_Cleanup(void); - -/* Script Suspend/Resume Query Declaration */ -TBrowserStatusCode NW_UI_ScriptSuspResQuery(void *ctx); - -/* Mailto API */ -TBrowserStatusCode NW_UI_SendEmailRequest(const NW_Ucs2 *url); - -TBrowserStatusCode NW_UI_BrowserApp_Exit(void *ctx); - -TBrowserStatusCode NW_UI_QuitSelect(void *ctx, TBrowserStatusCode status, NW_Dlg_Confirm_Result_t res); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_APPSERVICESIMPL_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_childiterator.h --- a/webengine/wmlengine/src/hed/include/nw_hed_childiterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_ChildIterator_h_ -#define _NW_HED_ChildIterator_h_ - -#include "NW_HED_EXPORT.h" -#include "nw_adt_mapiterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_HED_ChildIterator - - @scope: public - - @description: - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ChildIterator_Class_s NW_HED_ChildIterator_Class_t; -typedef struct NW_HED_ChildIterator_s NW_HED_ChildIterator_t; - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ChildIterator_ClassPart_s { - void** unused; -} NW_HED_ChildIterator_ClassPart_t; - -struct NW_HED_ChildIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_ADT_Iterator_ClassPart_t NW_ADT_Iterator; - NW_ADT_VectorIterator_ClassPart_t NW_ADT_VectorIterator; - NW_ADT_MapIterator_ClassPart_t NW_ADT_MapIterator; - NW_HED_ChildIterator_ClassPart_t NW_HED_ChildIterator; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_HED_ChildIterator_s { - NW_ADT_MapIterator_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_ChildIterator_GetClassPart(_object) \ - NW_HED_ChildIterator_GetClassPart (_object) - -#define NW_HED_ChildIteratorOf(_object) \ - NW_HED_ChildIteratorOf (_object) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ChildIterator_Class_t NW_HED_ChildIterator_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ChildIterator_Initialize (NW_HED_ChildIterator_t* childIterator, - NW_ADT_Map_t* children); - -NW_HED_EXPORT -NW_HED_ChildIterator_t* -_NW_HED_ChildIterator_New (NW_ADT_Map_t* children); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_ChildIterator_Initialize(_childIterator, _children) \ - (_NW_HED_ChildIterator_Initialize ((_childIterator), NW_ADT_MapOf (_children))) - -#define NW_HED_ChildIterator_New(_children) \ - (_NW_HED_ChildIterator_New (NW_ADT_MapOf (_children))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_ChildIterator_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_childiteratori.h --- a/webengine/wmlengine/src/hed/include/nw_hed_childiteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_ChildIteratorI_h_ -#define _NW_HED_ChildIteratorI_h_ - -#include "nw_adt_mapiteratori.h" -#include "nw_hed_childiterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -void** -_NW_HED_ChildIterator_NextElement (NW_ADT_Iterator_t* iterator); - -NW_HED_EXPORT -NW_Uint32 -_NW_HED_ChildIterator_GetElementSize (NW_ADT_Iterator_t* iterator); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_ChildIteratorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_compositecontenthandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_compositecontenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_CompositeContentHandler_h_ -#define _NW_HED_CompositeContentHandler_h_ - -#include <e32def.h> -#include <e32std.h> -#include "nw_hed_contenthandler.h" -#include "nw_hed_compositenode.h" -#include "nwx_osu_file.h" -#include "BrsrStatusCodes.h" -#include "urlloader_urlresponse.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -class CBodyPart; - -typedef struct NW_HED_CompositeContentHandler_Class_s NW_HED_CompositeContentHandler_Class_t; -typedef struct NW_HED_CompositeContentHandler_s NW_HED_CompositeContentHandler_t; - -typedef struct { - NW_HED_CompositeContentHandler_t* contentHandler; - NW_Url_Resp_t* response; -} NW_HED_CharsetConvContext; - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_SaveImagesToFile(NW_HED_CompositeContentHandler_t* thisObj, - NW_Osu_File_t fh); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_SaveScriptsToFile(NW_HED_CompositeContentHandler_t* thisObj, - NW_Osu_File_t fh); - - -TBrowserStatusCode -_NW_HED_CompositeContentHandler_ComputeEncoding(NW_HED_CompositeContentHandler_t* thisObj, - NW_Url_Resp_t* response, - NW_Bool* encodingFound); - -TBrowserStatusCode NW_HED_CompositeContentHandler_CharConvCB(void* context, - NW_Uint32 charsetLength, - NW_Uint32 charsetOffset, - NW_Buffer_t* body, - NW_Int32* numUnconvertible, - NW_Int32* indexFirstUnconvertible, - NW_Buffer_t** outBuf, - NW_Uint32 *selectedCharset); - -TBool -_NW_HED_CompositeContentHandler_IsUrlInMultipart( NW_HED_CompositeContentHandler_t* thisObj, - const NW_Ucs2* aUrl, - CBodyPart** aBodyPart ); - -/* ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_CompositeContentHandler_DocumentDisplayed_t) (NW_HED_ContentHandler_t* thisObj); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_CompositeContentHandler_ClassPart_s { - NW_HED_CompositeContentHandler_DocumentDisplayed_t documentDisplayed; -} NW_HED_CompositeContentHandler_ClassPart_t; - -struct NW_HED_CompositeContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_CompositeContentHandler_ClassPart_t NW_HED_CompositeContentHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_CompositeContentHandler_s { - NW_HED_ContentHandler_t super; - - /* aggregate(s) */ - NW_HED_CompositeNode_t NW_HED_CompositeNode; - - // array of body parts if multipart page - RPointerArray<CBodyPart> iBodyPartArray; - // old response body which holds multipart buffer - NW_Buffer_t* iOldResponseBody; - // multipart page or not - TBool iMultipart; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_CompositeContentHandler)) - -#define NW_HED_CompositeContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_CompositeContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_CompositeContentHandler_Class_t NW_HED_CompositeContentHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeContentHandler_SaveImagesToFile(_object, _fh) \ - (_NW_HED_CompositeContentHandler_SaveImagesToFile \ - (NW_HED_CompositeContentHandlerOf (_object), _fh)) - -#define NW_HED_CompositeContentHandler_SaveScriptsToFile(_object, _fh) \ - (_NW_HED_CompositeContentHandler_SaveScriptsToFile \ - (NW_HED_CompositeContentHandlerOf (_object), _fh)) - - -NW_HED_EXPORT -NW_Uint32 -NW_HED_CompositeContentHandler_GetImageCount(NW_HED_CompositeContentHandler_t* thisObj); - -NW_HED_EXPORT -NW_Uint32 -NW_HED_CompositeContentHandler_GetScriptCount(NW_HED_CompositeContentHandler_t* thisObj); - - - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_CompositeContentHandler_AddChild( NW_HED_CompositeContentHandler_t* thisObj, - NW_HED_DocumentNode_t* childNode, - void* context ); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_CompositeContentHandler_HandleImageLoad( NW_HED_CompositeContentHandler_t* thisObj, - NW_Int32 chunkIndex, - NW_HED_ContentHandler_t* newContentHandler, - NW_HED_UrlRequest_t* urlRequest ); - - -NW_HED_EXPORT -NW_HED_ContentHandler_t* -NW_HED_CompositeContentHandler_CreateContentHandler( NW_HED_ContentHandler_t* thisObj, - NW_Uint8* contentTypeString, NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, void* clientData ); -NW_HED_EXPORT -NW_Int16 NW_HED_CompositeContentHandler_Encoding(NW_Uint8* charset, NW_Uint32 charsetLength); - -NW_Int32 NW_HED_CompositeContentHandler_GetCharsetString(NW_Uint16 aCharset, - const NW_Uint8** aCharsetString); - -TBrowserStatusCode -_NW_HED_CompositeContentHandler_ConvertEncoding(NW_HED_CompositeContentHandler_t* thisObj, - NW_Uint32 foreignEncoding, - NW_Buffer_t* inBuf, - NW_Int32* numUnconvertible, - NW_Int32* indexFirstUnconvertible, - NW_Buffer_t** outBuf); - - -/* ------------------------------------------------------------------------- */ -#define NW_HED_CompositeContentHandler_DocumentDisplayed(_object) \ - (NW_Object_Invoke (_object, NW_HED_CompositeContentHandler, documentDisplayed) \ - (NW_HED_ContentHandlerOf (_object))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_CompositeContentHandler_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_compositecontenthandleri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_compositecontenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_CompositeContentHandlerI_h_ -#define _NW_HED_CompositeContentHandlerI_h_ - -#include "nw_hed_contenthandleri.h" -#include "nw_hed_compositenodei.h" -#include "nw_hed_compositecontenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_CompositeNode_Class_t NW_HED_CompositeContentHandler_CompositeNode_Class; -NW_HED_EXPORT const NW_Object_Class_t* const NW_HED_CompositeContentHandler_SecondaryList[]; - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_DetachChildren (NW_HED_CompositeContentHandler_t* compositeContentHandler); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_CompositeNode_AddChild (NW_HED_CompositeNode_t* compositeNode, - NW_HED_DocumentNode_t* documentNode, - void* key); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeContentHandler_DetachChildren(_object) \ - (_NW_HED_CompositeContentHandler_DetachChildren ( \ - NW_HED_CompositeContentHandlerOf (_object))) - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree); - -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_Resume (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_CompositeContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeContentHandler_DocumentDisplayed (NW_HED_ContentHandler_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_CompositeContentHandlerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_compositenode.h --- a/webengine/wmlengine/src/hed/include/nw_hed_compositenode.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_CompositeNode_h_ -#define _NW_HED_CompositeNode_h_ - -#include "nw_object_aggregate.h" -#include "nw_hed_icompositenode.h" -#include "nw_adt_map.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_CompositeNode_Class_s NW_HED_CompositeNode_Class_t; -typedef struct NW_HED_CompositeNode_s NW_HED_CompositeNode_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_CompositeNode_AddChild_t) (NW_HED_CompositeNode_t* thisObj, - NW_HED_DocumentNode_t* childNode, - void* key); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_CompositeNode_ClassPart_s { - NW_HED_CompositeNode_AddChild_t addChild; -} NW_HED_CompositeNode_ClassPart_t; - -struct NW_HED_CompositeNode_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; - NW_HED_CompositeNode_ClassPart_t NW_HED_CompositeNode; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_CompositeNode_s { - NW_Object_Aggregate_t super; - - /* interface implementation(s) */ - NW_HED_ICompositeNode_t NW_HED_ICompositeNode; - - /* member variables */ - NW_ADT_Map_t* children; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeNode_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_CompositeNode)) - -#define NW_HED_CompositeNodeOf(_object) \ - (NW_Object_Cast (_object, NW_HED_CompositeNode)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_CompositeNode_Class_t NW_HED_CompositeNode_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_DocumentNode_t* -_NW_HED_CompositeNode_LookupChild (NW_HED_CompositeNode_t* compositeNode, - void* key); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_DeleteChildren (NW_HED_CompositeNode_t* compositeNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_DeleteChild (NW_HED_CompositeNode_t* compositeNode, - void* key); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_RemoveChild (NW_HED_CompositeNode_t* thisObj, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_GetChildren (NW_HED_CompositeNode_t* thisObj, - NW_ADT_Iterator_t** iterator); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeNode_LookupChild(_compositeNode, _key) \ - (_NW_HED_CompositeNode_LookupChild (\ - NW_HED_CompositeNodeOf (_compositeNode), (_key))) - -#define NW_HED_CompositeNode_DeleteChildren(_compositeNode) \ - (_NW_HED_CompositeNode_DeleteChildren (\ - NW_HED_CompositeNodeOf (_compositeNode))) - -#define NW_HED_CompositeNode_DeleteChild(_compositeNode, _key) \ - (_NW_HED_CompositeNode_DeleteChild (\ - NW_HED_CompositeNodeOf (_compositeNode), (_key))) - -#define NW_HED_CompositeNode_RemoveChild(_compositeNode, _child) \ - (_NW_HED_CompositeNode_RemoveChild (\ - NW_HED_CompositeNodeOf (_compositeNode), \ - NW_HED_DocumentNodeOf (_child))) - -#define NW_HED_CompositeNode_GetChildren(_compositeNode, _iterator) \ - (_NW_HED_CompositeNode_GetChildren (\ - NW_HED_CompositeNodeOf (_compositeNode), (_iterator))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_CompositeNode_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_compositenodei.h --- a/webengine/wmlengine/src/hed/include/nw_hed_compositenodei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_CompositeNodeI_h_ -#define _NW_HED_CompositeNodeI_h_ - -#include "nw_object_aggregatei.h" -#include "nw_hed_icompositenode.h" -#include "nw_hed_compositenode.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ICompositeNode_Class_t NW_HED_CompositeNode_ICompositeNode_Class; -NW_HED_EXPORT const NW_Object_Class_t* const NW_HED_CompositeNode_InterfaceList[]; - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -void -_NW_HED_CompositeNode_Destruct (NW_Object_Aggregate_t* aggregate); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_AddChild (NW_HED_CompositeNode_t* compositeNode, - NW_HED_DocumentNode_t* childNode, - void* key); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_ICompositeNode_RemoveChild (NW_HED_ICompositeNode_t* icompositeNode, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_CompositeNode_ICompositeNode_GetChildren (NW_HED_ICompositeNode_t* icompositeNode, - NW_ADT_Iterator_t** childIterator); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_HED_CompositeNode_AddChild(_compositeNode, _child, _key) \ - (NW_Object_Invoke (_compositeNode, NW_HED_CompositeNode, addChild) ( \ - NW_HED_CompositeNodeOf (_compositeNode), \ - NW_HED_DocumentNodeOf (_child), (_key))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_CompositeNodeI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_contenthandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTENTHANDLER_H -#define NW_HED_CONTENTHANDLER_H - -#include "nw_hed_documentnode.h" -#include "nw_hed_historyentry.h" -#include "nw_hed_urlrequest.h" -#include "nw_hed_urlresponse.h" -#include "nw_text_ucs2.h" -#include <urlloader_urlresponse.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -typedef enum NW_HED_ContentHandler_Feature_e { - NW_HED_ContentHandler_NoFeatures = 0, - NW_HED_ContentHandler_HitoryPrevUseStale -} NW_HED_ContentHandler_Feature_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ContentHandler_Class_s NW_HED_ContentHandler_Class_t; -typedef struct NW_HED_ContentHandler_s NW_HED_ContentHandler_t; - -/* ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_PartialNextChunk_t) (NW_HED_ContentHandler_t* thisObj, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context); - -typedef -const NW_Text_t* -(*NW_HED_ContentHandler_GetTitle_t) (NW_HED_ContentHandler_t* thisObj); - -typedef -const NW_Text_t* -(*NW_HED_ContentHandler_GetURL_t) (NW_HED_ContentHandler_t* thisObj); - -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_ResolveURL_t) (NW_HED_ContentHandler_t* thisObj, NW_Text_t* url, NW_Text_t** retUrl); - -typedef -NW_HED_HistoryEntry_t* -(*NW_HED_ContentHandler_CreateHistoryEntry_t) (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - NW_HED_UrlResponse_t* urlResponse); - -typedef -NW_HED_HistoryEntry_t* -(*NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry_t) (NW_HED_ContentHandler_t* thisObj, - const NW_Text_t* requestUrl, - const NW_Text_t* responseUrl); - -typedef -NW_HED_UrlResponse_t* -(*NW_HED_ContentHandler_NewUrlResponse_t) (NW_HED_ContentHandler_t* thisObj, - NW_Url_Resp_t* response); - -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_CreateBoxTree_t) (NW_HED_ContentHandler_t* thisObj, - NW_LMgr_Box_t** boxTree); - -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_HandleRequest_t) (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest); - -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_FeatureQuery_t) (NW_HED_ContentHandler_t* thisObj, - NW_HED_ContentHandler_Feature_t featureId); - -typedef -TBrowserStatusCode -(*NW_HED_ContentHandler_ResponseComplete_t) (NW_HED_ContentHandler_t* thisObj, - NW_Url_Resp_t* response, - void* context); - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ContentHandler_ClassPart_s { - NW_HED_ContentHandler_PartialNextChunk_t partialNextChunk; - NW_HED_ContentHandler_GetTitle_t getTitle; - NW_HED_ContentHandler_GetURL_t getUrl; - NW_HED_ContentHandler_ResolveURL_t resolveUrl; - NW_HED_ContentHandler_CreateHistoryEntry_t createHistoryEntry; - NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry_t createIntraDocumentHistoryEntry; - NW_HED_ContentHandler_NewUrlResponse_t newUrlResponse; - NW_HED_ContentHandler_CreateBoxTree_t createBoxTree; - NW_HED_ContentHandler_HandleRequest_t handleRequest; - NW_HED_ContentHandler_FeatureQuery_t featureQuery; - NW_HED_ContentHandler_ResponseComplete_t responseComplete; -} NW_HED_ContentHandler_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_ContentHandler_s { - NW_HED_DocumentNode_t super; - - /* member variables */ - NW_HED_HistoryEntry_t* associatedHistoryEntry; - NW_LMgr_Box_t* boxTree; - NW_Bool isEmbeddable; - NW_Int32 outstandingDecoderOps; - NW_Bool needsRelayout; - NW_Bool initialized; - - // partial buffer - NW_Url_Resp_t* response; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_HED_ContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_ContentHandler)) - -#define NW_HED_ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ContentHandler)) - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ContentHandler_Class_t NW_HED_ContentHandler_Class; - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT -const NW_HED_UrlRequest_t* -_NW_HED_ContentHandler_GetUrlRequest(NW_HED_ContentHandler_t* thisObj); - -NW_HED_EXPORT -const NW_HED_UrlResponse_t* -_NW_HED_ContentHandler_GetUrlResponse(NW_HED_ContentHandler_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_SetAssociatedHistoryEntry (NW_HED_ContentHandler_t* thisObj, - NW_HED_HistoryEntry_t* entry); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_GetAssociatedHistoryEntry (NW_HED_ContentHandler_t* thisObj); - -/* ------------------------------------------------------------------------- */ -#define NW_HED_ContentHandler_PartialNextChunk(_object, _chunkIndex, _response, _context) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, partialNextChunk) \ - (NW_HED_ContentHandlerOf (_object), (_chunkIndex), (_response), (_context))) - -#define NW_HED_ContentHandler_GetTitle(_object) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, getTitle) \ - (NW_HED_ContentHandlerOf (_object))) - -#define NW_HED_ContentHandler_CreateHistoryEntry(_object, _urlRequest, _urlResponse) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, createHistoryEntry) \ - (NW_HED_ContentHandlerOf(_object), NW_HED_UrlRequestOf (_urlRequest), \ - NW_HED_UrlResponseOf (_urlResponse))) - -#define NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry(_object, _requestUrl, _responseUrl) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, createIntraDocumentHistoryEntry) \ - (NW_HED_ContentHandlerOf(_object), NW_TextOf (_requestUrl), \ - NW_TextOf (_responseUrl))) - -#define NW_HED_ContentHandler_NewUrlResponse(_object, _response) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, newUrlResponse) \ - (NW_HED_ContentHandlerOf(_object), (_response))) - -#define NW_HED_ContentHandler_GetURL(_object) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, getUrl) \ - (NW_HED_ContentHandlerOf (_object))) - -#define NW_HED_ContentHandler_ResolveURL(_object, _url, _retUrl) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, resolveUrl) \ - (NW_HED_ContentHandlerOf (_object), (_url), (_retUrl))) - -#define NW_HED_ContentHandler_HandleRequest(_object, _urlRequest) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, handleRequest) \ - (NW_HED_ContentHandlerOf (_object), NW_HED_UrlRequestOf (_urlRequest))) - -#define NW_HED_ContentHandler_FeatureQuery(_object, _featureId) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, featureQuery) \ - (NW_HED_ContentHandlerOf (_object), _featureId)) - -#define NW_HED_ContentHandler_GetUrlRequest(_object) \ - (_NW_HED_ContentHandler_GetUrlRequest \ - (NW_HED_ContentHandlerOf (_object))) - -#define NW_HED_ContentHandler_GetUrlResponse(_object) \ - (_NW_HED_ContentHandler_GetUrlResponse \ - (NW_HED_ContentHandlerOf (_object))) - -#define NW_HED_ContentHandler_SetAssociatedHistoryEntry(_object, _entry) \ - (_NW_HED_ContentHandler_SetAssociatedHistoryEntry \ - (NW_HED_ContentHandlerOf (_object), NW_HED_HistoryEntryOf (_entry))) - -#define NW_HED_ContentHandler_GetAssociatedHistoryEntry(_object) \ - (_NW_HED_ContentHandler_GetAssociatedHistoryEntry \ - (NW_HED_ContentHandlerOf (_object))) - -#define NW_HED_ContentHandler_SetIsEmbeddable(_object, _value) \ - (NW_HED_ContentHandlerOf (_object)->isEmbeddable = (_value)) - -#define NW_HED_ContentHandler_ResponseComplete(_object, _response, _context) \ - (NW_Object_Invoke (_object, NW_HED_ContentHandler, responseComplete) \ - (NW_HED_ContentHandlerOf (_object), (_response), (_context))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_contenthandleri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTENTHANDLERI_H -#define NW_HED_CONTENTHANDLERI_H - -#include "nw_hed_documentnodei.h" -#include "nw_hed_contenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_HED_ContentHandler_CreateBoxTree(_contentHandler, _boxTree) \ - (NW_Object_Invoke (_contentHandler, NW_HED_ContentHandler, createBoxTree) ( \ - NW_HED_ContentHandlerOf (_contentHandler), (_boxTree))) - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -const NW_Text_t* -_NW_HED_ContentHandler_GetURL (NW_HED_ContentHandler_t* contentHandler); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_ResolveURL (NW_HED_ContentHandler_t* contentHandler, - NW_Text_t* url, NW_Text_t** retUrl); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_PartialNextChunk( NW_HED_ContentHandler_t* thisObj, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ); - -NW_HED_EXPORT -void -_NW_HED_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree); - -NW_HED_EXPORT -void -_NW_HED_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_CreateHistoryEntry (NW_HED_ContentHandler_t* contentHandler, - NW_HED_UrlRequest_t* urlRequest, - NW_HED_UrlResponse_t* urlResponse); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry (NW_HED_ContentHandler_t* thisObj, - const NW_Text_t* requestUrl, - const NW_Text_t* responseUrl); -NW_HED_EXPORT -NW_HED_UrlResponse_t* -_NW_HED_ContentHandler_NewUrlResponse (NW_HED_ContentHandler_t* contentHandler, - NW_Url_Resp_t* response); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_HandleRequest (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_FeatureQuery (NW_HED_ContentHandler_t* thisObj, - NW_HED_ContentHandler_Feature_t featureId); - - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContentHandler_ResponseComplete( NW_HED_ContentHandler_t* thisObj, - NW_Url_Resp_t* response, - void* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_context.h --- a/webengine/wmlengine/src/hed/include/nw_hed_context.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTEXT_H -#define NW_HED_CONTEXT_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "nw_string_string.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_Context_Class_s NW_HED_Context_Class_t; -typedef struct NW_HED_Context_s NW_HED_Context_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_Context_ClassPart_s { - void** unused; -} NW_HED_Context_ClassPart_t; - -struct NW_HED_Context_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_Context_ClassPart_t NW_HED_Context; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_Context_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_DynamicVector_t *vars; -}; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef struct { - NW_String_t name; - NW_String_t value; -} NW_HED_Context_Variable_t; - - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_Context_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_Context)) - -#define NW_HED_ContextOf(_object) \ - (NW_Object_Cast (_object, NW_HED_Context)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_Context_Class_t NW_HED_Context_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_Context_t* -NW_HED_Context_New (void); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Context_Reset (NW_HED_Context_t *thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Context_SetOrAddVariable (NW_HED_Context_t *thisObj, - const NW_String_t *name, - const NW_String_t *value); - -NW_HED_EXPORT -const NW_String_t * -NW_HED_Context_GetVariable (const NW_HED_Context_t *thisObj, - const NW_String_t *name); - -NW_HED_EXPORT -const NW_HED_Context_Variable_t * -NW_HED_Context_GetEntry (const NW_HED_Context_t *thisObj, - NW_Uint32 index); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Context_RemoveEntry (NW_HED_Context_t *thisObj, - NW_Uint32 index); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTEXT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_contexti.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contexti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTEXTI_H -#define NW_HED_CONTEXTI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_context.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_Context_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_Context_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTEXTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_contextvisitor.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contextvisitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTEXTVISITOR_H -#define NW_HED_CONTEXTVISITOR_H - -#include "nw_object_dynamic.h" -#include "nw_hed_context.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ContextVisitor_Class_s NW_HED_ContextVisitor_Class_t; -typedef struct NW_HED_ContextVisitor_s NW_HED_ContextVisitor_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ContextVisitor_ClassPart_s { - void** unused; -} NW_HED_ContextVisitor_ClassPart_t; - -struct NW_HED_ContextVisitor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_ContextVisitor_ClassPart_t NW_HED_ContextVisitor; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_ContextVisitor_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_HED_Context_t* context; - NW_Uint32 current; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_HED_ContextVisitor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_HED_ContextVisitor)) - -#define NW_HED_ContextVisitorOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ContextVisitor)) - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ContextVisitor_Class_t NW_HED_ContextVisitor_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -const NW_HED_Context_Variable_t* -NW_HED_ContextVisitor_NextVariable (NW_HED_ContextVisitor_t* thisObj); - -NW_HED_EXPORT -void -NW_HED_ContextVisitor_Reset (NW_HED_ContextVisitor_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_ContextVisitor_Initialize (NW_HED_ContextVisitor_t* thisObj, - const NW_HED_Context_t* context); - -NW_HED_EXPORT -NW_HED_ContextVisitor_t* -NW_HED_ContextVisitor_New (NW_HED_Context_t* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTEXTVISITOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_contextvisitori.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contextvisitori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_CONTEXTVISITORI_H -#define NW_HED_CONTEXTVISITORI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_contextvisitor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ContextVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_CONTEXTVISITORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_documentnode.h --- a/webengine/wmlengine/src/hed/include/nw_hed_documentnode.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,271 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_DOCUMENTNODE_H -#define NW_HED_DOCUMENTNODE_H - -#include "nw_object_dynamic.h" - -#include "nw_lmgr_box.h" -#include "nw_evt_event.h" -#include "nw_hed_urlrequest.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -class MHEDLoadObserver; - -typedef struct NW_HED_DocumentNode_Class_s NW_HED_DocumentNode_Class_t; -typedef struct NW_HED_DocumentNode_s NW_HED_DocumentNode_t; - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_HED_CancelType_e { - NW_HED_CancelType_User, - NW_HED_CancelType_NewRequest, - NW_HED_CancelType_Error -} NW_HED_CancelType_t; - -typedef struct NW_HED_DocumentRoot_LoadContext_s { - NW_HED_DocumentNode_t* owner; - MHEDLoadObserver* loadObserver; - void* clientData; - NW_Uint16 transactionId; - NW_Bool virtualRequest; -} NW_HED_DocumentRoot_LoadContext_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_Cancel_t) (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_PartialLoadCallback_t) (NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode status, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context); - -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_Initialize_t) (NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus); - - -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_NodeChanged_t) (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode); - -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_GetBoxTree_t) (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree); - -typedef -NW_Uint8 -(*NW_HED_DocumentNode_ProcessEvent_t) (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event, - void* context); - -typedef -void -(*NW_HED_DocumentNode_HandleError_t) (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - NW_WaeError_t error); - -typedef -void -(*NW_HED_DocumentNode_Suspend_t) (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree); - -typedef -void -(*NW_HED_DocumentNode_Resume_t) (NW_HED_DocumentNode_t* documentNode); - -typedef -void -(*NW_HED_DocumentNode_AllLoadsCompleted_t) (NW_HED_DocumentNode_t* documentNode); - -typedef -TBrowserStatusCode -(*NW_HED_DocumentNode_IntraPageNavigationCompleted_t) (NW_HED_DocumentNode_t* documentNode); - -typedef -void -(*NW_HED_DocumentNode_LoseFocus_t) (NW_HED_DocumentNode_t* documentNode); - -typedef -void -(*NW_HED_DocumentNode_GainFocus_t) (NW_HED_DocumentNode_t* documentNode); - - -typedef -void -(*NW_HED_DocumentNode_HandleLoadComplete_t) (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ); - -/* ------------------------------------------------------------------------- * - object class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_DocumentNode_ClassPart_s { - NW_HED_DocumentNode_Cancel_t cancel; - NW_HED_DocumentNode_PartialLoadCallback_t partialLoadCallback; - NW_HED_DocumentNode_Initialize_t initialize; - NW_HED_DocumentNode_NodeChanged_t nodeChanged; - NW_HED_DocumentNode_GetBoxTree_t getBoxTree; - NW_HED_DocumentNode_ProcessEvent_t processEvent; - NW_HED_DocumentNode_HandleError_t handleError; - NW_HED_DocumentNode_Suspend_t suspend; - NW_HED_DocumentNode_Resume_t resume; - NW_HED_DocumentNode_AllLoadsCompleted_t allLoadsCompleted; - NW_HED_DocumentNode_IntraPageNavigationCompleted_t intraPageNavigationCompleted; - NW_HED_DocumentNode_LoseFocus_t loseFocus; - NW_HED_DocumentNode_GainFocus_t gainFocus; - NW_HED_DocumentNode_HandleLoadComplete_t handleLoadComplete; -} NW_HED_DocumentNode_ClassPart_t; - -struct NW_HED_DocumentNode_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; -}; - -/* ------------------------------------------------------------------------- * - object instance definition - * ------------------------------------------------------------------------- */ -struct NW_HED_DocumentNode_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_HED_DocumentNode_t* parent; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_DocumentNode_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_DocumentNode)) - -#define NW_HED_DocumentNodeOf(_object) \ - (NW_Object_Cast (_object, NW_HED_DocumentNode)) - -/* ------------------------------------------------------------------------- * - public static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_DocumentNode_Class_t NW_HED_DocumentNode_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_DocumentNode_t* -_NW_HED_DocumentNode_GetRootNode (NW_HED_DocumentNode_t* documentNode); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_DocumentNode_Cancel(_documentNode, _cancelType) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, cancel) \ - (NW_HED_DocumentNodeOf (_documentNode), (_cancelType))) - -#define NW_HED_DocumentNode_PartialLoadCallback(_documentNode, _status, _chunkIndex, _request, _response, _transactionId, _context) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, partialLoadCallback) \ - (NW_HED_DocumentNodeOf (_documentNode), \ - (_status), (_chunkIndex), (_request), (_response), (_transactionId), (_context))) - -#define NW_HED_DocumentNode_Initialize(_documentNode, _initStatus) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, initialize) \ - (NW_HED_DocumentNodeOf (_documentNode), (_initStatus))) - -#define NW_HED_DocumentNode_NodeChanged(_documentNode, _childNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, nodeChanged) \ - (NW_HED_DocumentNodeOf (_documentNode), NW_HED_DocumentNodeOf (_childNode))) - -#define NW_HED_DocumentNode_GetBoxTree(_documentNode, _boxTree) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, getBoxTree) \ - (NW_HED_DocumentNodeOf (_documentNode), (_boxTree))) - -#define NW_HED_DocumentNode_ProcessEvent(_documentNode, _activeBox, _event, _context) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, processEvent) \ - (NW_HED_DocumentNodeOf (_documentNode), NW_LMgr_BoxOf (_activeBox), \ - NW_Evt_EventOf (_event), (_context))) - -#define NW_HED_DocumentNode_HandleError(_documentNode, _urlRequest, _errorClass, _error) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, handleError) \ - (NW_HED_DocumentNodeOf (_documentNode), (_urlRequest), (_errorClass), (_error))) - -#define NW_HED_DocumentNode_Suspend(_documentNode, _destroyBoxTree) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, suspend) \ - (NW_HED_DocumentNodeOf (_documentNode), (_destroyBoxTree))) - -#define NW_HED_DocumentNode_Resume(_documentNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, resume) \ - (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_AllLoadsCompleted(_documentNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, allLoadsCompleted) \ - (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_IntraPageNavigationCompleted(_documentNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, intraPageNavigationCompleted) \ - (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_LoseFocus(_documentNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, loseFocus) \ - (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_GainFocus(_documentNode) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, gainFocus) \ - (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_GetRootNode(_documentNode) \ - (_NW_HED_DocumentNode_GetRootNode (NW_HED_DocumentNodeOf (_documentNode))) - -#define NW_HED_DocumentNode_GetParentNode(_documentNode) \ - (NW_OBJECT_CONSTCAST(NW_HED_DocumentNode_t*) NW_HED_DocumentNodeOf (_documentNode)->parent) - -#define NW_HED_DocumentNode_HandleLoadComplete(_documentNode, _urlRequest, _errorClass, _error, _transactionId, _context) \ - (NW_Object_Invoke (_documentNode, NW_HED_DocumentNode, handleLoadComplete) \ - (NW_HED_DocumentNodeOf (_documentNode), (_urlRequest), (_errorClass), (_error), (_transactionId), (_context) )) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOCUMENTNODE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_documentnodei.h --- a/webengine/wmlengine/src/hed/include/nw_hed_documentnodei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_DOCUMENTNODEI_H -#define NW_HED_DOCUMENTNODEI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_documentnode.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentNode_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_DocumentNode_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentNode_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentNode_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentNode_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -NW_Uint8 -_NW_HED_DocumentNode_ProcessEvent (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event, - void* context); -NW_HED_EXPORT -void -_NW_HED_DocumentNode_HandleError (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - NW_WaeError_t error); - -NW_HED_EXPORT -void -_NW_HED_DocumentNode_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDeleteBoxTree); - -NW_HED_EXPORT -void -_NW_HED_DocumentNode_Resume (NW_HED_DocumentNode_t* documentNode); - -// The function is called when a load issued by the document node is complete -NW_HED_EXPORT -void -_NW_HED_DocumentNode_HandleLoadComplete(NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ); - - - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentNode_IntraPageNavigationCompleted (NW_HED_DocumentNode_t* documentNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOCUMENTNODEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_documentroot.h --- a/webengine/wmlengine/src/hed/include/nw_hed_documentroot.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_DOCUMENTROOT_H -#define NW_HED_DOCUMENTROOT_H - -#include "nw_hed_documentnode.h" -#include "nw_hed_icompositenode.h" -#include "nw_hed_iloadrecipient.h" -#include "nw_hed_iloaderlistener.h" - -#include "nw_hed_mimetable.h" -#include "nw_hed_appservices.h" -#include "nw_hed_historystack.h" -#include "nw_hed_loader.h" -#include "nw_hed_context.h" -#include "nw_hed_urlrequest.h" -#include "nw_adt_map.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -class MHEDLoadObserver; -class CWmlControl; -/* ------------------------------------------------------------------------- */ -/* -** TODO these should be moved to an external file. The main reason is that -** DocumentRoot should remain pure, in that it doesn't have knowledge about -** specific content handler issues -- such as the variable contexts it may -** define. -*/ -#define NW_HED_DocumentRoot_ContextPickId 0 -#define NW_HED_DocumentRoot_ContextGlobalId 1 -#define NW_Wml1x_ContentHandler_ContextTaskId 2 - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_DocumentRoot_Class_s NW_HED_DocumentRoot_Class_t; -typedef struct NW_HED_DocumentRoot_s NW_HED_DocumentRoot_t; -class MHEDDocumentListener; - -/* ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_DocumentRoot_DocumentDisplayed_t) (NW_HED_DocumentRoot_t* thisObj); - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_DocumentRoot_ClassPart_s { - NW_HED_DocumentRoot_DocumentDisplayed_t documentDisplayed; -} NW_HED_DocumentRoot_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_DocumentRoot_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_DocumentRoot_ClassPart_t NW_HED_DocumentRoot; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_DocumentRoot_s { - NW_HED_DocumentNode_t super; - - /* interface implementations */ - NW_HED_ICompositeNode_t NW_HED_ICompositeNode; - NW_HED_ILoadRecipient_t NW_HED_ILoadRecipient; - NW_HED_ILoaderListener_t NW_HED_ILoaderListener; - - /* member variables */ - MHEDDocumentListener* documentListener; - - NW_HED_DocumentNode_t* childNode; - - /*need for cancel mechanism*/ - NW_HED_UrlRequest_t* nextUrlRequestToLoad; - - NW_HED_Loader_t* loader; - NW_ADT_DynamicVector_t* loadList; - - NW_HED_HistoryStack_t* historyStack; - NW_ADT_Map_t* contextMap; - NW_HED_MimeTable_t* mimeTable; - NW_HED_AppServices_t* appServices; - void* browserApp_Ctx; - - NW_Bool isLoading; - NW_Int16 isIntraPageNav; - NW_Bool isCancelling; - NW_Bool isTopLevelRequest; - NW_Int32 chunkIndex; - - NW_Int16 documentErrorClass; - NW_WaeError_t documentError; - void* certInfo; - -// void* ecmaHost; - - // referrer url that points to prev document url , - // if accessed from a link - NW_Text_t* referrerUrl; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_HED_DocumentRoot_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_DocumentRoot)) - -#define NW_HED_DocumentRootOf(_object) \ - (NW_Object_Cast (_object, NW_HED_DocumentRoot)) - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_DocumentRoot_Class_t NW_HED_DocumentRoot_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ - - -NW_HED_EXPORT -void* -NW_HED_DocumentRoot_GetCertInfo (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -const NW_Text_t* -NW_HED_DocumentRoot_GetTitle (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -const NW_Text_t* -NW_HED_DocumentRoot_GetDocumentReferrer(NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -void -NW_HED_DocumentRoot_SetDocumentReferrer(NW_HED_DocumentRoot_t* thisObj, - const NW_Text_t* referrerUrl); - - - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t* urlRequest, - void* clientData ); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest_tId2 (NW_HED_DocumentRoot_t* thisObj, - const NW_HED_UrlRequest_t* aUrlRequest, - void* aLoadRecipient, - void* aClientData, - NW_Uint16* aTransactionId, - void* aLoadContext = NULL); - - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest_tId (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t* urlRequest, - void* clientData , - NW_Uint16* aTransactionId, - void* aLoadContext = NULL); - - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_StartLoad (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_Text_t* url, - NW_Uint8 reason, - void* clientData, - NW_Uint8 loadType, - NW_Cache_Mode_t cacheMode); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_HistoryLoad (NW_HED_DocumentRoot_t* thisObj, - NW_HED_HistoryStack_Direction_t direction); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_SetLoadObserver (NW_HED_DocumentRoot_t* thisObj, - NW_Uint16 aTransationId, - MHEDLoadObserver* aLoadObserver); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_DeleteRequests (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_HandleIntraPageNavigationStarted (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -const NW_Text_t* -NW_HED_DocumentRoot_GetURL (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -const NW_HED_UrlRequest_t* -NW_HED_DocumentRoot_GetUrlRequest (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_AddContext (NW_HED_DocumentRoot_t* thisObj, - NW_HED_Context_t* context, - NW_Int8 *contextId); -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_RemoveContext (NW_HED_DocumentRoot_t* thisObj, - NW_Int8 contextId); -NW_HED_EXPORT -NW_HED_Context_t* -NW_HED_DocumentRoot_GetContext (NW_HED_DocumentRoot_t* thisObj, - NW_Int8 contextId); -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_DocumentRoot_SetDocumentListener (NW_HED_DocumentRoot_t* thisObj, - MHEDDocumentListener* documentListener); -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_CollectNumbers (NW_HED_DocumentRoot_t* documentRoot, - NW_ADT_DynamicVector_t* dynamicVector); - -NW_HED_EXPORT -NW_Bool -_NW_HED_DocumentRoot_ECMLExists (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_FillAll (NW_HED_DocumentRoot_t* thisObj, NW_LMgr_Box_t** firstNotFilled); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_FillOne (NW_HED_DocumentRoot_t* thisObj, NW_Ucs2* value, NW_LMgr_Box_t* node); - -NW_HED_EXPORT -NW_HED_DocumentRoot_t* -NW_HED_DocumentRoot_New (NW_HED_MimeTable_t* mimeTable, - NW_HED_AppServices_t* appServices, - void* browserAppCtx); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ShowImages(NW_HED_DocumentRoot_t *thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_GetViewImageList(NW_HED_DocumentRoot_t *thisObj, NW_ADT_DynamicVector_t* dynamicVector); - -NW_HED_EXPORT -NW_Bool -NW_HED_DocumentRoot_IsContextSwitchPending (NW_HED_DocumentRoot_t* thisObj); - -NW_HED_EXPORT -void -NW_HED_DocumentRoot_SetHistoryControl(NW_HED_DocumentRoot_t* thisObj, CWmlControl* aWmlControl); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_DocumentRoot_GetAppServices(_documentRoot) \ - (NW_OBJECT_CONSTCAST(void*) \ - NW_HED_DocumentRootOf (_documentRoot)->appServices) - -#define NW_HED_DocumentRoot_GetBrowserAppCtx(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_HED_AppServices_t*) \ - NW_HED_DocumentRootOf (_documentRoot)->browserApp_Ctx) - -#define NW_HED_DocumentRoot_GetChildNode(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_HED_DocumentNode_t*) \ - NW_HED_DocumentRootOf (_documentRoot)->childNode) - -#define NW_HED_DocumentRoot_GetDocumentListener(_documentRoot) \ - (NW_HED_DocumentRootOf (_documentRoot)->documentListener) - -#define NW_HED_DocumentRoot_GetLoader(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_HED_Loader_t*) \ - NW_HED_DocumentRootOf(_documentRoot)->loader) - -#define NW_HED_DocumentRoot_GetHistoryStack(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_HED_HistoryStack_t*) \ - NW_HED_HistoryStackOf((_documentRoot)->historyStack)) - -#define NW_HED_DocumentRoot_IsLoading(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_Bool) \ - NW_HED_DocumentRootOf(_documentRoot)->isLoading) - -#define NW_HED_DocumentRoot_IsIntraPageNav(_documentRoot) \ - (NW_OBJECT_CONSTCAST(NW_Bool) \ - NW_HED_DocumentRootOf(_documentRoot)->isIntraPageNav) - -#define NW_HED_DocumentRoot_DeleteRequests(_documentRoot, _childNode) \ - (_NW_HED_DocumentRoot_DeleteRequests ( \ - NW_HED_DocumentRootOf (_documentRoot), \ - NW_HED_DocumentNodeOf (_childNode))) - -#define NW_HED_DocumentRoot_CollectNumbers(_documentRoot, _dynamicVector) \ - (_NW_HED_DocumentRoot_CollectNumbers ( \ - NW_HED_DocumentRootOf (_documentRoot), \ - NW_ADT_DynamicVectorOf (_dynamicVector))) - -#define NW_HED_DocumentRoot_ECMLExists(_documentRoot) \ - (_NW_HED_DocumentRoot_ECMLExists ( \ - NW_HED_DocumentRootOf (_documentRoot))) - -#define NW_HED_DocumentRoot_FillAll(_documentRoot, _firstNotFilled) \ - (_NW_HED_DocumentRoot_FillAll ( \ - NW_HED_DocumentRootOf (_documentRoot), \ - (_firstNotFilled))) - -#define NW_HED_DocumentRoot_FillOne(_documentRoot, _value, _node) \ - (_NW_HED_DocumentRoot_FillOne ( \ - NW_HED_DocumentRootOf (_documentRoot), \ - (_value), \ - (_node))) - -#define NW_HED_DocumentRoot_GetViewImageList(_documentRoot, _dynamicVector) \ - (_NW_HED_DocumentRoot_GetViewImageList ( \ - NW_HED_DocumentRootOf (_documentRoot), \ - NW_ADT_DynamicVectorOf (_dynamicVector))) - -#define NW_HED_DocumentRoot_ShowImages(_documentRoot) \ - (_NW_HED_DocumentRoot_ShowImages ( \ - NW_HED_DocumentRootOf (_documentRoot))) - -#define NW_HED_DocumentRoot_GetRootBox(_documentRoot) \ - (NW_HED_DocumentRootOf(_documentRoot)->documentListener->GetRootBox()) - -/* ------------------------------------------------------------------------- */ -#define NW_HED_DocumentRoot_DocumentDisplayed(_object) \ - (NW_Object_Invoke (_object, NW_HED_DocumentRoot, documentDisplayed) \ - (NW_HED_DocumentRootOf (_object))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOCUMENTROOT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_documentrooti.h --- a/webengine/wmlengine/src/hed/include/nw_hed_documentrooti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_DOCUMENTROOTI_H -#define NW_HED_DOCUMENTROOTI_H - -#include "nw_hed_documentnodei.h" -#include "nw_hed_icompositenodei.h" -#include "nw_hed_iloadrecipienti.h" -#include "nw_hed_iloaderlisteneri.h" -#include "nw_hed_documentroot.h" -#include "BrsrStatusCodes.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -//class CWmlControl; - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ICompositeNode_Class_t NW_HED_DocumentRoot_ICompositeNode_Class; -NW_HED_EXPORT const NW_HED_ILoadRecipient_Class_t NW_HED_DocumentRoot_ILoadRecipient_Class; -NW_HED_EXPORT const NW_HED_ILoaderListener_Class_t NW_HED_DocumentRoot_ILoaderListener_Class; -NW_HED_EXPORT const NW_Object_Class_t* const NW_HED_DocumentRoot_InterfaceList[]; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_Object_t* -_NW_HED_DocumentRoot_QueryInterface (NW_Object_Core_t* core, - const NW_Object_Class_t* objClass); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_PartialLoadCallback(NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode status, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_HandleError (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - NW_WaeError_t error); -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_Resume (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_LoseFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_GainFocus (NW_HED_DocumentNode_t* documentNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_DocumentDisplayed (NW_HED_DocumentRoot_t* documentNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ICompositeNode_RemoveChild (NW_HED_ICompositeNode_t* icompositeNode, - NW_HED_DocumentNode_t* childNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ICompositeNode_GetChildren (NW_HED_ICompositeNode_t* icompositeNode, - NW_ADT_Iterator_t** childIterator); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoadRecipient_ProcessLoad (NW_HED_ILoadRecipient_t* loadRecipient, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData); -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad (NW_HED_ILoadRecipient_t* loadRecipient, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData); - -NW_HED_EXPORT -void -_NW_HED_DocumentRoot_ILoaderListener_IsLoading (NW_HED_ILoaderListener_t* loaderListener, - NW_HED_Loader_t* loader, - NW_Bool state); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoaderListener_LoadProgressOn (NW_HED_ILoaderListener_t* loaderListener, - NW_Uint16 transId ); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoaderListener_LoadProgressOff (NW_HED_ILoaderListener_t* loaderListener, - NW_Uint16 transId ); - -//NW_HED_EXPORT -//void -//NW_HED_DocumentRoot_SetHistoryControl(NW_HED_DocumentRoot_t* thisObj, -// CWmlControl* aWmlControl); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOCUMENTROOTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_domhelper.h --- a/webengine/wmlengine/src/hed/include/nw_hed_domhelper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,559 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/** ----------------------------------------------------------------------- ** - @package: NW_HED - - @synopsis: Convenience functions for accessing the DOM. - - @description: default - - ** ----------------------------------------------------------------------- **/ - -#ifndef NW_HED_DOM_HELPER_H -#define NW_HED_DOM_HELPER_H - -#include "nw_dom_node.h" -#include "nw_string_string.h" -#include "nw_hed_context.h" -#include "nw_hed_entityset.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @struct: NW_HED_DomHelper_t - - @synopsis: default - - @scope: public - @variables: - const NW_HED_EntitySet_t* - default - - NW_HED_Context_t* context - default - - NW_Bool resolvePlainTextVariablesAndEntities - default - - @description: default - ** ----------------------------------------------------------------------- **/ -typedef struct NW_HED_DomHelper_s{ - const NW_HED_EntitySet_t* entitySet; - NW_HED_Context_t* context; - - NW_Bool resolvePlainTextVariablesAndEntities; -} NW_HED_DomHelper_t; - - - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_ResolveEntities - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_EntitySet_t* entitySet - default - - [in] const NW_Ucs2* origText - default - - [out] NW_String_t* destString - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_ResolveEntities (const NW_HED_EntitySet_t* entitySet, - const NW_Ucs2* origText, - NW_String_t* destString); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetAttributeValue - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const NW_DOM_Node_t* element - default - - [in] NW_Uint16 attribute - default - - [out] NW_String_t* value - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_GetAttributeValue (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attribute, - NW_String_t* value); - -TBrowserStatusCode NW_HED_DomHelper_GetHTMLAttributeValue (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attribute, - NW_String_t* value); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetText - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const NW_DOM_Node_t* element - default - - [in] NW_Bool forceUcs2Copy - default - - [out] NW_String_t* value - default - - [out] NW_Uint32* valueEncoding - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_GetText (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Bool forceUcs2Copy, - NW_String_t* value, - NW_Uint32* valueEncoding); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetChildText - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const NW_DOM_Node_t* element - default - - [out] NW_String_t* value - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_GetChildText (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_String_t* value); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_AttributeEquals - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const NW_DOM_Node_t* element - default - - [in] NW_Uint16 attribute - default - - [in] const NW_String_t* value - default - - @description: default - - @returns: NW_Bool - default - - ** ----------------------------------------------------------------------- **/ -NW_Bool NW_HED_DomHelper_AttributeEquals (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attribute, - const NW_String_t* value); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_IsMatch - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const NW_DOM_Node_t* element - default - - [in] NW_Uint16 elementType - default - - [in] NW_Uint16 attribute - default - - [in] const attributeMatchString - default - - @description: default - - @returns: NW_Bool - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -NW_Bool NW_HED_DomHelper_IsMatch (const NW_HED_DomHelper_t* domHelper, - NW_DOM_Node_t* element, - NW_Uint16 elementType, - NW_Uint16 attribute, - const NW_String_t* attributeMatchString); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_FindElement - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] NW_DOM_Node_t* rootNode - default - - [in] NW_Int32 maxSearchDepth - default - - [in] NW_Uint16 elementType - default - - [in] NW_Uint16 attribute - default - - [in] const NW_String_t* attributeMatchString - default - - @description: default - - @returns: NW_DOM_Node_t* - default - - ** ----------------------------------------------------------------------- **/ -NW_DOM_Node_t* NW_HED_DomHelper_FindElement (const NW_HED_DomHelper_t* domHelper, - NW_DOM_Node_t* rootNode, - NW_Int32 maxSearchDepth, - NW_Uint16 elementType, - NW_Uint16 attribute, - const NW_String_t* attributeMatchString); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetEncoding - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_DOM_Node_t* element - default - - @description: default - - @returns: NW_Uint32 - default - - ** ----------------------------------------------------------------------- **/ -NW_Uint32 NW_HED_DomHelper_GetEncoding (const NW_DOM_Node_t* element); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetDictionary - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_DOM_Node_t* element - default - - @description: default - - @returns: NW_WBXML_Dictionary_t* - default - - ** ----------------------------------------------------------------------- **/ -NW_WBXML_Dictionary_t* NW_HED_DomHelper_GetDictionary (const NW_DOM_Node_t* element); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetAttributeName - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_DOM_Node_t* element - default - - [in] NW_Uint16 attribute - default - - [out] NW_String_t* name - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_GetAttributeName (const NW_DOM_Node_t* element, - NW_Uint16 attribute, - NW_String_t* name); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetElementToken - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_DOM_Node_t* element - default - - @description: default - - @returns: NW_Uint16 - default - - ** ----------------------------------------------------------------------- **/ -NW_Uint16 NW_HED_DomHelper_GetElementToken (const NW_DOM_Node_t* element); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_GetElementName - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_DOM_Node_t* element - default - - [out] NW_String_t* name - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_GetElementName (const NW_DOM_Node_t* element, - NW_String_t* name); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_PrintTree - - @synopsis: default - - @scope: public - - @parameters: - [in] const NW_HED_DomHelper_t* domHelper - default - - [in] const rootNode - const NW_DOM_Node_t* rootNode - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_PrintTree (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* rootNode); - - -TBrowserStatusCode NW_HED_DomHelper_PrintNode (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* domNode); -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_CatString - - @synopsis: default - - @scope: public - - @parameters: - [in-out] NW_String_t* destString - default - - [in] const NW_String_t* srcString - default - - [in] NW_Uint32 srcEncoding - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_CatString (NW_String_t* destString, - const NW_String_t* srcString, - NW_Uint32 srcEncoding); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_CatUcs2String - - @synopsis: default - - @scope: public - - @parameters: - [in-out] NW_String_t* destString - default - - [in] const NW_Ucs2* srcString - default - - @description: default - - @returns: TBrowserStatusCode - default - - [default] - default - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HED_DomHelper_CatUcs2String (NW_String_t* destString, - const NW_Ucs2* srcString); - -/** ----------------------------------------------------------------------- ** - @function: NW_HED_DomHelper_HasAttribute - - @synopsis: default - - @scope: public - - @parameters: - - [in] const NW_DOM_Node_t* element - default - - [in] NW_Uint16 attribute - default - - @description: default - - @returns: TBrowserStatusCode - KBrsrSuccess- Attribute is found. - KBrsrNotFound - Attribute is not found. - KBrsrDomNodeTypeErr - not a DOM node - - [default] - default - ** ----------------------------------------------------------------------- **/ - -TBrowserStatusCode NW_HED_DomHelper_HasAttribute(const NW_DOM_Node_t* element, - NW_Uint16 attributeToken); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOM_HELPER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_domtree.h --- a/webengine/wmlengine/src/hed/include/nw_hed_domtree.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_DOM_TREE_H -#define NW_HED_DOM_TREE_H - -#include "nwx_http_header.h" -#include "nwx_buffer.h" - -#include "nw_dom_node.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -typedef struct NW_HED_DomTree_s NW_HED_DomTree_t; - - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -NW_HED_DomTree_t* NW_HED_DomTree_New (NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Uint32 defaultPublicId, - void* WBXMLEncStrTbl); - -TBrowserStatusCode NW_HED_DomTree_Append (NW_HED_DomTree_t** ppDomTree, - NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Uint32 defaultPublicId, - NW_Uint32 cp_count, - NW_Int32 lastValid, - void* WBXMLEncStrTbl); - -void NW_HED_DomTree_Delete (NW_HED_DomTree_t* thisObj); - -NW_DOM_Node_t* NW_HED_DomTree_GetRootNode (const NW_HED_DomTree_t* thisObj); - -NW_Uint32 NW_HED_DomTree_GetPublicId (const NW_HED_DomTree_t* thisObj); - -NW_Uint8 NW_HED_DomTree_GetVersion (const NW_HED_DomTree_t* thisObj); - -NW_Uint32 NW_HED_DomTree_GetCharEncoding (const NW_HED_DomTree_t* thisObj); - -NW_Buffer_t* NW_HED_DomTree_GetDomBuffer (const NW_HED_DomTree_t* thisObj); - -NW_Buffer_t* NW_HED_DomTree_OrphanDomBuffer (NW_HED_DomTree_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_DOM_TREE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_entityset.h --- a/webengine/wmlengine/src/hed/include/nw_hed_entityset.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ENTITYSET_H -#define NW_HED_ENTITYSET_H - -#include "nw_object_base.h" -#include "nwx_defs.h" -#include "nwx_string.h" -#include "NW_HED_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_EntitySet_Class_s NW_HED_EntitySet_Class_t; -typedef struct NW_HED_EntitySet_s NW_HED_EntitySet_t; - -typedef struct NW_HED_EntitySet_Entry_s NW_HED_EntitySet_Entry_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Ucs2 -(*NW_HED_EntitySet_GetEntityChar_t) (const NW_HED_EntitySet_t* entitySet, - NW_Ucs2* name); -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_EntitySet_ClassPart_s { - NW_Uint32 numEntries; - NW_Uint32 numCaseInsensitiveEntries; - const NW_HED_EntitySet_Entry_t* entries; - NW_HED_EntitySet_GetEntityChar_t getEntityChar; -} NW_HED_EntitySet_ClassPart_t; - -struct NW_HED_EntitySet_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_HED_EntitySet_ClassPart_t NW_HED_EntitySet; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_EntitySet_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_EntitySet_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_EntitySet)) - -#define NW_HED_EntitySetOf(_object) \ - (NW_Object_Cast (_object, NW_HED_EntitySet)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_EntitySet_Class_t NW_HED_EntitySet_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_EntitySet_GetEntityChar(_entitySet, _name) \ - (NW_Object_Invoke (_entitySet, NW_HED_EntitySet, getEntityChar) \ - ((_entitySet), (_name))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ENTITYSET_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_entityseti.h --- a/webengine/wmlengine/src/hed/include/nw_hed_entityseti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ENTITYSETI_H -#define NW_HED_ENTITYSETI_H - -#include "nw_object_basei.h" -#include "nw_hed_entityset.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_HED_EntitySet_Entry_s { - const char* name; - NW_Ucs2 value; -}; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_Ucs2 -_NW_HED_EntitySet_GetEntityChar (const NW_HED_EntitySet_t* entitySet, - NW_Ucs2 *name); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ENTITYSETI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ERRORCONTENTHANDLER_H -#define NW_HED_ERRORCONTENTHANDLER_H - -#include "nw_hed_contenthandler.h" -#include "nw_text_ucs2.h" -#include <urlloader_urlresponse.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ErrorContentHandler_Class_s NW_HED_ErrorContentHandler_Class_t; -typedef struct NW_HED_ErrorContentHandler_s NW_HED_ErrorContentHandler_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_HED_ErrorContentHandler_ClassPart_s { - NW_Uint8 foo; -} NW_HED_ErrorContentHandler_ClassPart_t; - -struct NW_HED_ErrorContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_ErrorContentHandler_ClassPart_t NW_HED_ErrorContentHandler; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_HED_ErrorContentHandler_s { - NW_HED_ContentHandler_t super; - - /* member variables */ - NW_Text_t* title; - TBrowserStatusCode status; - NW_Uint8 wsp_status; /* encoded HTTP return status */ - -}; - -/* ------------------------------------------------------------------------- */ -#define NW_HED_ErrorContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_ErrorContentHandler)) - -#define NW_HED_ErrorContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ErrorContentHandler)) - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ErrorContentHandler_Class_t NW_HED_ErrorContentHandler_Class; - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_ErrorContentHandler_t* -NW_HED_ErrorContentHandler_New (NW_HED_DocumentNode_t* parent, - NW_HED_UrlRequest_t* urlRequest, - TBrowserStatusCode status, - NW_Uint8 wsp_status); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ERRORCONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandleri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ERRORCONTENTHANDLERI_H -#define NW_HED_ERRORCONTENTHANDLERI_H - -#include "nw_hed_contenthandleri.h" -#include "nw_hed_errorcontenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ErrorContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_ErrorContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_ErrorContentHandler_Initialize (NW_HED_DocumentNode_t* documentNode, - NW_Url_Resp_t* response); - -NW_HED_EXPORT -const NW_Text_t* -_NW_HED_ErrorContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler); - -NW_HED_EXPORT -NW_LMgr_Box_t* -_NW_HED_ErrorContentHandler_CreateBoxTree (NW_HED_ContentHandler_t* contentHandler); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ERRORCONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_hedeventhandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_hedeventhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_EVENTHANDLER_H -#define NW_HED_EVENTHANDLER_H - -#include "nw_lmgr_eventhandler.h" -#include "nw_hed_documentnode.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_EventHandler_Class_s NW_HED_EventHandler_Class_t; -typedef struct NW_HED_EventHandler_s NW_HED_EventHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_EventHandler_ClassPart_s { - void** unused; -} NW_HED_EventHandler_ClassPart_t; - -struct NW_HED_EventHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_EventHandler_ClassPart_t NW_LMgr_EventHandler; - NW_HED_EventHandler_ClassPart_t NW_EventHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_EventHandler_s { - NW_LMgr_EventHandler_t super; - - /* member variables */ - NW_HED_DocumentNode_t* documentNode; - void* context; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_EventHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_EventHandler)) - -#define NW_HED_EventHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_EventHandler)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_EventHandler_Class_t NW_HED_EventHandler_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EventHandler_t* -NW_HED_EventHandler_New (NW_HED_DocumentNode_t* documentNode, - void* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_EVENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_hedeventhandleri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_hedeventhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_EVENTHANDLERI_H -#define NW_HED_EVENTHANDLERI_H - -#include "nw_lmgr_eventhandleri.h" -#include "nw_hed_hedeventhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_EventHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -NW_Uint8 -_NW_HED_EventHandler_ProcessEvent (NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_EVENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historyentry.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historyentry.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYENTRY_H -#define NW_HED_HISTORYENTRY_H - -#include "nw_object_shared.h" -#include "nw_adt_dynamicvector.h" -#include "nw_hed_urlrequest.h" -#include "nw_hed_urlresponse.h" -#include "nw_gdi_types.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryEntry_Class_s NW_HED_HistoryEntry_Class_t; -typedef struct NW_HED_HistoryEntry_s NW_HED_HistoryEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryEntry_ClassPart_s { - void** unused; -} NW_HED_HistoryEntry_ClassPart_t; - -struct NW_HED_HistoryEntry_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_HistoryEntry_ClassPart_t NW_HED_HistoryEntry; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_HistoryEntry_s { - NW_Object_Dynamic_t super; - - /* private don't touch */ - NW_Object_Shared_t* sharingObject; - - /* member variables */ - NW_HED_UrlRequest_t* urlRequest; - NW_HED_UrlResponse_t* urlResponse; - NW_Object_Shared_t* contentData; - - NW_Ucs2* pageTitle; - NW_GDI_Point2D_t docPosition; - NW_ADT_Vector_Metric_t activeBoxId; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_HistoryEntry_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_HistoryEntry)) - -#define NW_HED_HistoryEntryOf(_object) \ - (NW_Object_Cast (_object, NW_HED_HistoryEntry)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_HistoryEntry_Class_t NW_HED_HistoryEntry_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_HistoryEntry_GetUrlRequest(_historyEntry) \ - (NW_OBJECT_CONSTCAST(NW_HED_UrlRequest_t*) NW_HED_HistoryEntryOf(_historyEntry)->urlRequest) - -#define NW_HED_HistoryEntry_GetUrlResponse(_historyEntry) \ - (NW_OBJECT_CONSTCAST(NW_HED_UrlResponse_t*) NW_HED_HistoryEntryOf(_historyEntry)->urlResponse) - -#define NW_HED_HistoryEntry_GetPageTitle(_historyEntry) \ - ((const NW_Ucs2* const) NW_HED_HistoryEntryOf(_historyEntry)->pageTitle) - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryEntry_AdoptContentData (NW_HED_HistoryEntry_t* thisObj, - NW_Object_Dynamic_t* contentData); - -NW_HED_EXPORT -NW_Object_Dynamic_t* -NW_HED_HistoryEntry_OrphanContentData (NW_HED_HistoryEntry_t* thisObj); - -NW_HED_EXPORT -NW_Object_Shared_t* -NW_HED_HistoryEntry_GetContentDataHolder (NW_HED_HistoryEntry_t* thisObj); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -NW_HED_HistoryEntry_Clone (const NW_HED_HistoryEntry_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryEntry_Reserve (NW_HED_HistoryEntry_t* thisObj); - -NW_HED_EXPORT -NW_Bool -NW_HED_HistoryEntry_Release (NW_HED_HistoryEntry_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryEntry_SetPageTitle(NW_HED_HistoryEntry_t* entry, NW_Ucs2* pageTitle); - -NW_HED_EXPORT -void -NW_HED_HistoryEntry_SetDocPosition(NW_HED_HistoryEntry_t* entry, - NW_GDI_Point2D_t* position); - -NW_HED_EXPORT -void -NW_HED_HistoryEntry_GetDocPosition(NW_HED_HistoryEntry_t* entry, - NW_GDI_Point2D_t* position); - - -#define NW_HED_HistoryEntry_SetActiveBoxId(_object, _id) \ - (NW_HED_HistoryEntryOf(_object)->activeBoxId = _id) - -#define NW_HED_HistoryEntry_GetActiveBoxId(_historyEntry) \ - (NW_HED_HistoryEntryOf(_historyEntry)->activeBoxId) - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -NW_HED_HistoryEntry_New (NW_HED_UrlRequest_t* urlRequest, NW_HED_UrlResponse_t* urlResponse); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_HISTORYENTRY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historyentryi.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historyentryi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYENTRYI_H -#define NW_HED_HISTORYENTRYI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_historyentry.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_HistoryEntry_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_HistoryEntry_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_HISTORYENTRYI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historystack.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historystack.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,185 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYSTACK_H -#define NW_HED_HISTORYSTACK_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "nw_hed_historyentry.h" -#include "BrsrStatusCodes.h" - -#include "HistoryStack.h" - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryStack_Class_s NW_HED_HistoryStack_Class_t; -typedef struct NW_HED_HistoryStack_s NW_HED_HistoryStack_t; -class CWmlControl; -/* ------------------------------------------------------------------------- * - miscellaneous types - * ------------------------------------------------------------------------- */ -typedef NW_Int8 NW_HED_HistoryStack_Metric_t; - -typedef enum NW_HED_HistoryStack_Direction_e { - NW_HED_HistoryStack_Direction_Previous, - NW_HED_HistoryStack_Direction_Current, - NW_HED_HistoryStack_Direction_Next, - NW_HED_HistoryStack_Direction_RestorePrevious, - NW_HED_HistoryStack_Direction_RestoreNext -} NW_HED_HistoryStack_Direction_t; - -typedef enum NW_HED_HistoryStack_Location_e { - NW_HED_HistoryStack_Loacation_AtBeginning, - NW_HED_HistoryStack_Loacation_BeforeCurrent, - NW_HED_HistoryStack_Loacation_AtEnd -} NW_HED_HistoryStack_Location_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryStack_ClassPart_s { - void** unused; -} NW_HED_HistoryStack_ClassPart_t; - -struct NW_HED_HistoryStack_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_HistoryStack_ClassPart_t NW_HED_HistoryStack; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_HistoryStack_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* vector; - NW_HED_HistoryStack_Metric_t current; - CWmlControl* iWmlCtrl; - TInt iReason; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_HistoryStack_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_HistoryStack)) - -#define NW_HED_HistoryStackOf(_object) \ - (NW_Object_Cast (_object, NW_HED_HistoryStack)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_HistoryStack_Class_t NW_HED_HistoryStack_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_DeleteEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Metric_t index); - - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryStack_SetCurrent (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryStack_SetCurrentEntry(NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* entry); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_GetEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryStack_PushEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryStack_InsertEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry, - NW_HED_HistoryStack_Location_t location); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_RemoveEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryStack_DeleteAll (NW_HED_HistoryStack_t* thisObj); - -NW_HED_EXPORT -NW_Bool -NW_HED_HistoryStack_IsUrlinHistory (NW_HED_HistoryStack_t* thisObj, - NW_HED_UrlRequest_t* urlRequest); - -NW_HED_EXPORT -NW_Uint8 -NW_HED_HistoryStack_Length (NW_HED_HistoryStack_t* thisObj); - -NW_HED_EXPORT -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_GetEntryByIndex(NW_HED_HistoryStack_t* thisObj, - NW_Uint8 historyIndex); - -NW_HED_EXPORT -NW_HED_HistoryStack_Metric_t -NW_HED_HistoryStack_GetIndex (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction); - -NW_HED_EXPORT -void -SetOssHistoryControl(NW_HED_HistoryStack_t* thisObj, CWmlControl* aWmlControl); - -NW_HED_EXPORT -void -SetUrlRequestReason(NW_HED_HistoryStack_t* thisObj, TInt aReason); - -NW_Bool -NW_HED_HistoryStack_ValidateEntry (const NW_HED_HistoryEntry_t* historyEntry); - -NW_Int8 -NW_HED_HistoryStack_GetIndexByEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry); - -THistoryStackDirection KimonoToOssDirection(NW_HED_HistoryStack_Direction_t aDirection); - -void -SetPossibleWmlOEB(NW_HED_HistoryStack_t* thisObj, NW_Bool flag); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_HistoryStack_t* -NW_HED_HistoryStack_New (void); - -#endif /* NW_HED_HISTORYSTACK_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historystacki.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historystacki.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYSTACKI_H -#define NW_HED_HISTORYSTACKI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_historystack.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_HistoryStack_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_HistoryStack_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_HISTORYSTACKI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historyvisitor.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historyvisitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYVISITOR_H -#define NW_HED_HISTORYVISITOR_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "nw_hed_historystack.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryVisitor_Class_s NW_HED_HistoryVisitor_Class_t; -typedef struct NW_HED_HistoryVisitor_s NW_HED_HistoryVisitor_t; - -/* ------------------------------------------------------------------------- * - miscellaneous types - * ------------------------------------------------------------------------- */ -typedef enum NW_HED_HistoryVisitor_Location_e { - NW_HED_HistoryVisitor_Loacation_AtBeginning, - NW_HED_HistoryVisitor_Loacation_Current, - NW_HED_HistoryVisitor_Loacation_AtEnd -} NW_HED_HistoryVisitor_Location_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_HistoryVisitor_ClassPart_s { - void** unused; -} NW_HED_HistoryVisitor_ClassPart_t; - -struct NW_HED_HistoryVisitor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_HistoryVisitor_ClassPart_t NW_HED_HistoryVisitor; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_HistoryVisitor_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_HED_HistoryStack_t* stack; - NW_HED_HistoryStack_Metric_t current; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_HistoryVisitor_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_HistoryVisitor)) - -#define NW_HED_HistoryVisitorOf(_object) \ - (NW_Object_Cast (_object, NW_HED_HistoryVisitor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_HistoryVisitor_Class_t NW_HED_HistoryVisitor_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -const NW_HED_HistoryEntry_t* -NW_HED_HistoryVisitor_Prev (NW_HED_HistoryVisitor_t* thisObj); - -NW_HED_EXPORT -const NW_HED_HistoryEntry_t* -NW_HED_HistoryVisitor_Next (NW_HED_HistoryVisitor_t* thisObj); - -NW_HED_EXPORT -const NW_HED_HistoryEntry_t* -NW_HED_HistoryVisitor_Current (NW_HED_HistoryVisitor_t* thisObj); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_HistoryVisitor_Initialize (NW_HED_HistoryVisitor_t* thisObj, - NW_HED_HistoryStack_t* stack, - NW_HED_HistoryVisitor_Location_t location); - - -NW_HED_EXPORT -NW_HED_HistoryVisitor_t* -NW_HED_HistoryVisitor_New (NW_HED_HistoryStack_t* stack, - NW_HED_HistoryVisitor_Location_t location); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_HISTORYVISITOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_historyvisitori.h --- a/webengine/wmlengine/src/hed/include/nw_hed_historyvisitori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_HISTORYVISITORI_H -#define NW_HED_HISTORYVISITORI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_historyvisitor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_HistoryVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_HistoryVisitor_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_HISTORYVISITORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_icompositenode.h --- a/webengine/wmlengine/src/hed/include/nw_hed_icompositenode.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_ICompositeNode_h_ -#define _NW_HED_ICompositeNode_h_ - -#include "nw_object_secondary.h" -#include "nw_hed_documentnode.h" -#include "nw_adt_iterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ICompositeNode_Class_s NW_HED_ICompositeNode_Class_t; -typedef struct NW_HED_ICompositeNode_s NW_HED_ICompositeNode_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_ICompositeNode_RemoveChild_t) (NW_HED_ICompositeNode_t* thisObj, - NW_HED_DocumentNode_t* childNode); - -typedef -TBrowserStatusCode -(*NW_HED_ICompositeNode_GetChildren_t) (NW_HED_ICompositeNode_t* thisObj, - NW_ADT_Iterator_t** iterator); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ICompositeNode_ClassPart_s { - NW_HED_ICompositeNode_RemoveChild_t removeChild; - NW_HED_ICompositeNode_GetChildren_t getChildren; -} NW_HED_ICompositeNode_ClassPart_t; - -struct NW_HED_ICompositeNode_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_HED_ICompositeNode_ClassPart_t NW_HED_ICompositeNode; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_ICompositeNode_s { - NW_Object_Secondary_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_ICompositeNode_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_ICompositeNode)) - -#define NW_HED_ICompositeNodeOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ICompositeNode)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_ICompositeNode_Class_t NW_HED_ICompositeNode_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_ICompositeNode_RemoveChild(_object, _child) \ - (NW_Object_Invoke (_object, NW_HED_ICompositeNode, removeChild) ( \ - NW_HED_ICompositeNodeOf (_object), NW_HED_DocumentNodeOf (_child))) - -#define NW_HED_ICompositeNode_GetChildren(_object, _iterator) \ - (NW_Object_Invoke (_object, NW_HED_ICompositeNode, getChildren) ( \ - NW_HED_ICompositeNodeOf (_object), (_iterator))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_ICompositeNode_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_icompositenodei.h --- a/webengine/wmlengine/src/hed/include/nw_hed_icompositenodei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_ICompositeNodeI_h_ -#define _NW_HED_ICompositeNodeI_h_ - -#include "nw_object_secondaryi.h" -#include "nw_hed_icompositenode.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_ICompositeNodeI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iformfiller.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iformfiller.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2002 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef _NW_HED_IFormFiller_h_ -#define _NW_HED_IFormFiller_h_ - -#include "nw_object_interface.h" -#include "nw_adt_dynamicvector.h" -#include "nw_lmgr_box.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_HED_IFormFiller - - @scope: public - - @description: - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_IFormFiller_Class_s NW_HED_IFormFiller_Class_t; -typedef struct NW_HED_IFormFiller_s NW_HED_IFormFiller_t; - -typedef struct NW_HED_IFormFiller_ConfigEntry_s NW_HED_IFormFiller_ConfigEntry_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -NW_Bool -(*NW_HED_IFormFiller_ECMLExists_t) (NW_HED_IFormFiller_t* formFiller); - -typedef -TBrowserStatusCode -(*NW_HED_IFormFiller_FillAll_t) (NW_HED_IFormFiller_t* formFiller, - NW_LMgr_Box_t** firstNotFilled); - -typedef -TBrowserStatusCode -(*NW_HED_IFormFiller_FillOne_t) (NW_HED_IFormFiller_t* formFiller, - NW_Ucs2* value, NW_LMgr_Box_t* node); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_IFormFiller_ClassPart_s { - NW_HED_IFormFiller_ECMLExists_t ECMLExists; - NW_HED_IFormFiller_FillAll_t fillAll; - NW_HED_IFormFiller_FillOne_t fillOne; -} NW_HED_IFormFiller_ClassPart_t; - -struct NW_HED_IFormFiller_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_HED_IFormFiller_ClassPart_t NW_HED_IFormFiller; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_IFormFiller_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_IFormFiller_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_HED_IFormFiller)) - -#define NW_HED_IFormFillerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_IFormFiller)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -NW_HED_EXPORT const NW_HED_IFormFiller_Class_t NW_HED_IFormFiller_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_IFormFiller_ECMLExists - - @synopsis: - - @scope: public - @access: virtual - - @parameters: - - - @description: - - - @returns: - ** ----------------------------------------------------------------------- **/ -#define NW_HED_IFormFiller_ECMLExists(_formFiller) \ - (NW_Object_Invoke (_formFiller, NW_HED_IFormFiller, ECMLExists) ( \ - NW_HED_IFormFillerOf (_formFiller))) - -#define NW_HED_IFormFiller_FillAll(_formFiller, _firstNotFilled) \ - (NW_Object_Invoke (_formFiller, NW_HED_IFormFiller, fillAll) ( \ - NW_HED_IFormFillerOf (_formFiller), (_firstNotFilled))) - -#define NW_HED_IFormFiller_FillOne(_formFiller, _value, _node) \ - (NW_Object_Invoke (_formFiller, NW_HED_IFormFiller, fillOne) ( \ - NW_HED_IFormFillerOf (_formFiller), (_value), (_node))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_INumberCollector_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iformfilleri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iformfilleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2002 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef _NW_HED_IFormFillerI_h_ -#define _NW_HED_IFormFillerI_h_ - -#include "nw_object_interfacei.h" -#include "nw_hed_iformfiller.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_IFormFillerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iimageviewer.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iimageviewer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_IImageViewer_h_ -#define _NW_HED_IImageViewer_h_ - -#include "nw_object_interface.h" -#include "nw_adt_dynamicvector.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" -#include "ImageUtils.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_HED_IImageViewer - - @scope: public - - @description: An interface typically implemented by content handlers. - Used by the NW_HED_DocumentRoot to retrieve the list of - images embedded in the document tree. - - The NW_HED_DocumentRoot will traverse the document tree - querying each content handler in the tree for an - implementation of the this interface. If found, the document - root will invoke this method to retrieve the phone numbers - associated with that content handler. - - How a particular content handler decides to implement this - interface is not specified. - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_IImageViewer_Class_s NW_HED_IImageViewer_Class_t; -typedef struct NW_HED_IImageViewer_s NW_HED_IImageViewer_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_IImageViewer_GetImage_t) (NW_HED_IImageViewer_t* imageViewer, - NW_ADT_DynamicVector_t* dynamicVector); - -typedef -TBrowserStatusCode -(*NW_HED_IImageViewer_ShowImages_t) (NW_HED_IImageViewer_t* imageViewer); - -/* ------------------------------------------------------------------------- * - data type - * ------------------------------------------------------------------------- */ - -typedef struct NW_HED_ViewImageList_Entry_s -{ - NW_Byte* rawData; - NW_Uint32 rawDataLen; - NW_Ucs2* url; - NW_Ucs2* altText; - TImageType imageType; - NW_Ucs2* contentType; -}NW_HED_ViewImageList_Entry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_IImageViewer_ClassPart_s { - NW_HED_IImageViewer_GetImage_t getImage; - NW_HED_IImageViewer_ShowImages_t showImages; -} NW_HED_IImageViewer_ClassPart_t; - -struct NW_HED_IImageViewer_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_HED_IImageViewer_ClassPart_t NW_HED_IImageViewer; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_IImageViewer_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_IImageViewer_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_HED_IImageViewer)) - -#define NW_HED_IImageViewerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_IImageViewer)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_IImageViewer_Class_t NW_HED_IImageViewer_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_IImageViewer_GetImage - - @synopsis: Returns the imageData - - @scope: public - @access: virtual - - @parameters: - [in, out] NW_ADT_DynamicVector_t* dynamicVector - The dynamic vector into which all the phone numbers will be - placed. This is a vector of Image Data - - @description: Retrieves, by any mechanism necessary, all image data - associated with the interface implementer. The image entries - are added to the 'dynamicVector'. - - @returns: TBrowserStatusCode - On error, it is not the responsibility of the implementer - to clean up the out parameters. The only guarantee that the - implementer must fullfill is that the parameters are left - in a consistent state. This simply means that the entries of - the 'dynamicVector' must still be valid NW_Text_t*'s. - - [KBrsrSuccess] - Successful completion; 'dynamicVector' will have had all - phone numbers appendeded. - - [KBrsrOutOfMemory] - Not enough memory available to complete operation. - - [KBrsrUnexpectedError] - An unexpected error occurred. - ** ----------------------------------------------------------------------- **/ -#define NW_HED_IImageViewer_GetImage(_imageViewer, _dynamicVector) \ - (NW_Object_Invoke (_imageViewer, NW_HED_IImageViewer, getImage) ( \ - NW_HED_IImageViewerOf (_imageViewer), (_dynamicVector))) - - -#define NW_HED_IImageViewer_ShowImages(_imageViewer) \ - (NW_Object_Invoke (_imageViewer, NW_HED_IImageViewer, showImages) ( \ - NW_HED_IImageViewerOf (_imageViewer))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_IImageViewer_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iimagevieweri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iimagevieweri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_IImageViewerI_h_ -#define _NW_HED_IImageViewerI_h_ - -#include "nw_object_interfacei.h" -#include "nw_hed_iimageviewer.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_IImageViewerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iloaderlistener.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iloaderlistener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ILOADERLISTENER_H -#define NW_HED_ILOADERLISTENER_H - -#include "nw_object_interface.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ILoaderListener_Class_s NW_HED_ILoaderListener_Class_t; -typedef struct NW_HED_ILoaderListener_s NW_HED_ILoaderListener_t; - -typedef struct NW_HED_Loader_s NW_HED_Loader_t; - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ -typedef -void -(*NW_HED_ILoaderListener_IsLoading_t) (NW_HED_ILoaderListener_t* loaderListener, - NW_HED_Loader_t* loader, - NW_Bool state); - -typedef -TBrowserStatusCode -(*NW_HED_ILoaderListener_LoadProgressOn_t)(NW_HED_ILoaderListener_t *loaderListener, - NW_Uint16 transactionId); - -typedef -TBrowserStatusCode -(*NW_HED_ILoaderListener_LoadProgressOff_t)(NW_HED_ILoaderListener_t *loaderListener, - NW_Uint16 transactionId); -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ILoaderListener_ClassPart_s { - NW_HED_ILoaderListener_IsLoading_t isLoading; - NW_HED_ILoaderListener_LoadProgressOn_t loadProgressOn; - NW_HED_ILoaderListener_LoadProgressOff_t loadProgressOff; -} NW_HED_ILoaderListener_ClassPart_t; - -struct NW_HED_ILoaderListener_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_HED_ILoaderListener_ClassPart_t NW_HED_ILoaderListener; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_ILoaderListener_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_ILoaderListener_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_ILoaderListener)) - -#define NW_HED_ILoaderListenerOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ILoaderListener)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_Object_Core_Class_t NW_HED_ILoaderListener_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_ILoaderListener_IsLoading(_loaderListener, _loader, _state) \ - (NW_Object_Invoke ((_loaderListener), NW_HED_ILoaderListener, isLoading) \ - ((_loaderListener), (_loader), (_state))) - -#define NW_HED_ILoaderListener_LoadProgressOn(_loaderListener, _transId) \ - (NW_Object_Invoke ((_loaderListener), NW_HED_ILoaderListener, loadProgressOn) \ - ((_loaderListener), (_transId))) - -#define NW_HED_ILoaderListener_LoadProgressOff(_loaderListener, _transId) \ - (NW_Object_Invoke ((_loaderListener), NW_HED_ILoaderListener, loadProgressOff) \ - ((_loaderListener), (_transId))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ILOADERLISTENER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iloaderlisteneri.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iloaderlisteneri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ILOADERLISTENERI_H -#define NW_HED_ILOADERLISTENERI_H - -#include "nw_object_interfacei.h" -#include "nw_hed_iloaderlistener.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ILOADERLISTENERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iloadrecipient.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iloadrecipient.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ILOADRECIPIENT_H -#define NW_HED_ILOADRECIPIENT_H - -#include "nw_object_interface.h" -#include "NW_Text_Abstract.h" -#include "nw_hed_urlrequest.h" -#include <urlloader_urlresponse.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ILoadRecipient_Class_s NW_HED_ILoadRecipient_Class_t; -typedef struct NW_HED_ILoadRecipient_s NW_HED_ILoadRecipient_t; - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_ILoadRecipient_ProcessPartialLoad_t) (NW_HED_ILoadRecipient_t* loadRecipient, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_ILoadRecipient_ClassPart_s { - NW_HED_ILoadRecipient_ProcessPartialLoad_t processPartialLoad; -} NW_HED_ILoadRecipient_ClassPart_t; - -struct NW_HED_ILoadRecipient_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_HED_ILoadRecipient_ClassPart_t NW_HED_ILoadRecipient; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_ILoadRecipient_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_ILoadRecipient_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_ILoadRecipient)) - -#define NW_HED_ILoadRecipientOf(_object) \ - (NW_Object_Cast (_object, NW_HED_ILoadRecipient)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_Object_Core_Class_t NW_HED_ILoadRecipient_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_ILoadRecipient_ProcessPartialLoad(_loadRecipient, _loadStatus, _transactionId, _chunkIndex, _response, _urlRequest, _clientData) \ - (NW_Object_Invoke ((_loadRecipient), NW_HED_ILoadRecipient, processPartialLoad) \ - ((_loadRecipient), (_loadStatus), (_transactionId), (_chunkIndex), (_response), (_urlRequest), \ - (_clientData))) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ILOADRECIPIENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_iloadrecipienti.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iloadrecipienti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_ILOADRECIPIENTI_H -#define NW_HED_ILOADRECIPIENTI_H - -#include "nw_object_interfacei.h" -#include "nw_hed_iloadrecipient.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_ILOADRECIPIENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_inumbercollector.h --- a/webengine/wmlengine/src/hed/include/nw_hed_inumbercollector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_INumberCollector_h_ -#define _NW_HED_INumberCollector_h_ - -#include "nw_object_interface.h" -#include "nw_adt_dynamicvector.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_HED_INumberCollector - - @scope: public - - @description: An interface typically implemented by content handlers. - Used by the NW_HED_DocumentRoot to retrieve the list of - phone numbers possibly embedded in the document tree. - - The NW_HED_DocumentRoot will traverse the document tree - querying each content handler in the tree for an - implementation of the this interface. If found, the document - root will invoke this method to retrieve the phone numbers - associated with that content handler. - - How a particular content handler decides to implement this - interface is not specified. - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_INumberCollector_Class_s NW_HED_INumberCollector_Class_t; -typedef struct NW_HED_INumberCollector_s NW_HED_INumberCollector_t; - -typedef struct NW_HED_INumberCollector_ConfigEntry_s NW_HED_INumberCollector_ConfigEntry_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_HED_INumberCollector_Collect_t) (NW_HED_INumberCollector_t* numberCollector, - NW_ADT_DynamicVector_t* dynamicVector); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_INumberCollector_ClassPart_s { - NW_HED_INumberCollector_Collect_t collect; -} NW_HED_INumberCollector_ClassPart_t; - -struct NW_HED_INumberCollector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_HED_INumberCollector_ClassPart_t NW_HED_INumberCollector; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_INumberCollector_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_INumberCollector_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_HED_INumberCollector)) - -#define NW_HED_INumberCollectorOf(_object) \ - (NW_Object_Cast (_object, NW_HED_INumberCollector)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_INumberCollector_Class_t NW_HED_INumberCollector_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_INumberCollector_Collect - - @synopsis: Returns all phone numbers associated with the implementer. - - @scope: public - @access: virtual - - @parameters: - [in, out] NW_ADT_DynamicVector_t* dynamicVector - The dynamic vector into which all the phone numbers will be - placed. This is a vector of NW_Text_t*. - - @description: Retrieves, by any mechanism necessary, all the phone numbers - associated with the interface implementer. The phone numbers - are added to the 'dynamicVector' as NW_Text_t* pointers. - These NW_Text_t will be freed by the caller when no longer - needed. - - The order in which the numbers are added to the vector is - undefined only that they are appended to the vector is - mandated. In addition it is not legal for the implementer to - remove or otherwise alter any entries that may already be - present in the vector at entry. - - Note that this last point implies that it is not necessary, - for the implementer to attempt any intelligent insertion to - avoid duplicate items. If the implementer wishes to do so, it - must do so by not inserting a new item instead of deleting an - existing item so as not to violate the sanctity of existing - entries of the 'dynamicVector'. - - - @returns: TBrowserStatusCode - On error, it is not the responsibility of the implementer - to clean up the out parameters. The only guarantee that the - implementer must fullfill is that the parameters are left - in a consistent state. This simply means that the entries of - the 'dynamicVector' must still be valid NW_Text_t*'s. - - [KBrsrSuccess] - Successful completion; 'dynamicVector' will have had all - phone numbers appendeded. - - [KBrsrOutOfMemory] - Not enough memory available to complete operation. - - [KBrsrUnexpectedError] - An unexpected error occurred. - ** ----------------------------------------------------------------------- **/ -#define NW_HED_INumberCollector_Collect(_numberCollector, _dynamicVector) \ - (NW_Object_Invoke (_numberCollector, NW_HED_INumberCollector, collect) ( \ - NW_HED_INumberCollectorOf (_numberCollector), \ - (_dynamicVector))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_INumberCollector_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_inumbercollectori.h --- a/webengine/wmlengine/src/hed/include/nw_hed_inumbercollectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_INumberCollectorI_h_ -#define _NW_HED_INumberCollectorI_h_ - -#include "nw_object_interfacei.h" -#include "nw_hed_inumbercollector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_INumberCollectorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_loader.h --- a/webengine/wmlengine/src/hed/include/nw_hed_loader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_LOADER_H -#define NW_HED_LOADER_H - -#include "nw_object_dynamic.h" -#include "nw_hed_iloaderlistener.h" -#include "nw_hed_iloadrecipient.h" -#include "nw_hed_urlrequest.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_Loader_Class_s NW_HED_Loader_Class_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_Loader_ClassPart_s { - void** unused; -} NW_HED_Loader_ClassPart_t; - -struct NW_HED_Loader_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_Loader_ClassPart_t NW_HED_Loader; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_Loader_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_HED_ILoaderListener_t* loaderListener; - NW_ADT_DynamicVector_t* requestList; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_Loader_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_Loader)) - -#define NW_HED_LoaderOf(_object) \ - (NW_Object_Cast (_object, NW_HED_Loader)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_Loader_Class_t NW_HED_Loader_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_Loader_SetLoaderListener(_loader, _loaderListener) \ - ((NW_HED_LoaderOf (_loader)->loaderListener = (_loaderListener)), \ - KBrsrSuccess) - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_StartLoad (NW_HED_Loader_t* loader, - const NW_Text_t* url, - NW_Uint8 reason, - NW_HED_ILoadRecipient_t* loadRecipient, - void* clientData, - NW_Uint16* transactionId, - NW_Uint8 loadType, - NW_Cache_Mode_t cacheMode); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_StartRequest (NW_HED_Loader_t* loader, - const NW_HED_UrlRequest_t* urlRequest, - NW_HED_ILoadRecipient_t* loadRecipient, - void* clientData, - NW_Uint16* transactionId, void* aLoadContext ); - -NW_HED_EXPORT -NW_ADT_Vector_Metric_t -NW_HED_Loader_GetRequestListSize (NW_HED_Loader_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_DeleteLoad (NW_HED_Loader_t* loader, - NW_Uint16 transactionId, - void* clientData); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_CancelLoad (NW_HED_Loader_t* loader, - NW_Uint16 transactionId, - TBrowserStatusCode cancelReason ); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_RemoveTransFromLoadList( NW_HED_Loader_t* thisObj, - NW_Uint16 transactionId ); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_Loader_CancelAllLoads (NW_HED_Loader_t* loader); - -NW_HED_EXPORT -TBrowserStatusCode -OssPartialRespCallback( TBrowserStatusCode aLoadStatus, - NW_Uint16 aTransactionId, - NW_Int32 aChunkIndex, - void* aLoadContext, - NW_Url_Resp_t* aResponse ); - -NW_HED_EXPORT -NW_ADT_DynamicVector_t* -GetNW_HED_Loader_LoadQueue(); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_Loader_t* -NW_HED_Loader_New (void); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_LOADER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_loaderi.h --- a/webengine/wmlengine/src/hed/include/nw_hed_loaderi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_LOADERI_H -#define NW_HED_LOADERI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_loader.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_Loader_LoadQEntry_s { - void* clientData; - NW_Uint16 transactionId; - TBrowserStatusCode loadStatus; -} NW_HED_Loader_LoadQEntry_t; - -typedef struct NW_HED_Loader_Context_s { - NW_HED_UrlRequest_t* urlRequest; - NW_HED_ILoadRecipient_t* loadRecipient; - void* clientData; -} NW_HED_Loader_Context_t; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_Loader_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_Loader_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_HED_EXPORT -TBrowserStatusCode -OssPartialRespCallback( TBrowserStatusCode aLoadStatus, - NW_Uint16 aTransactionId, - NW_Int32 aChunkIndex, - void* aLoadContext, - NW_Url_Resp_t* aResponse ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_LOADERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_mimetable.h --- a/webengine/wmlengine/src/hed/include/nw_hed_mimetable.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_MIMETABLE_H -#define NW_HED_MIMETABLE_H - -#include "nw_object_base.h" -#include "nw_hed_contenthandler.h" -#include <urlloader_urlresponse.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_MimeTable_Class_s NW_HED_MimeTable_Class_t; -typedef struct NW_HED_MimeTable_s NW_HED_MimeTable_t; - -typedef struct NW_HED_MimeTable_Entry_s NW_HED_MimeTable_Entry_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_HED_ContentHandler_t* -(*NW_HED_MimeTable_CreateContentHandler_t) (const NW_HED_MimeTable_t* mimeTable, - NW_HED_DocumentNode_t* parent, - NW_Http_ContentTypeString_t contentTypeString, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Bool isTopLevel); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_MimeTable_ClassPart_s { - NW_Uint8 numEntries; - const NW_HED_MimeTable_Entry_t* entries; - NW_HED_MimeTable_CreateContentHandler_t createContentHandler; -} NW_HED_MimeTable_ClassPart_t; - -struct NW_HED_MimeTable_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_HED_MimeTable_ClassPart_t NW_HED_MimeTable; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_MimeTable_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_MimeTable_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_MimeTable)) - -#define NW_HED_MimeTableOf(_object) \ - (NW_Object_Cast (_object, NW_HED_MimeTable)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_MimeTable_Class_t NW_HED_MimeTable_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_HED_MimeTable_CreateContentHandler(_mimeTable, _parent, _contentType, _urlRequest, _response, _isTopLevel) \ - (NW_Object_Invoke (_mimeTable, NW_HED_MimeTable, createContentHandler) \ - ((_mimeTable), (_parent), (_contentType), (_urlRequest), (_response), (_isTopLevel))) - -NW_HED_EXPORT -NW_Bool -NW_HED_MimeTable_IsSupportedContent(NW_HED_MimeTable_t* mimeTable, - NW_Http_ContentTypeString_t contentTypeString, - NW_Bool isTopLevel); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_MIMETABLE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_mimetablei.h --- a/webengine/wmlengine/src/hed/include/nw_hed_mimetablei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_MIMETABLEI_H -#define NW_HED_MIMETABLEI_H - -#include "nw_object_basei.h" -#include "nw_hed_mimetable.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_HED_MimeTable_Entry_s { - const NW_Http_ContentTypeString_t contentTypeString; - NW_HED_ContentHandler_Class_t* objClass; - NW_Bool acceptTopLevel; -}; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_ContentHandler_t* -_NW_HED_MimeTable_CreateContentHandler (const NW_HED_MimeTable_t* mimeTable, - NW_HED_DocumentNode_t* parent, - NW_Http_ContentTypeString_t contentTypeString, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Bool isTopLevel); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_MIMETABLEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_treevisitor.h --- a/webengine/wmlengine/src/hed/include/nw_hed_treevisitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_TreeVisitor_h_ -#define _NW_HED_TreeVisitor_h_ - -#include "nw_object_dynamic.h" -#include "nw_hed_documentnode.h" -#include "nw_adt_iterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_HED_TreeVisitor - - @scope: public - - @description: - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_TreeVisitor_Class_s NW_HED_TreeVisitor_Class_t; -typedef struct NW_HED_TreeVisitor_s NW_HED_TreeVisitor_t; - -typedef struct NW_HED_TreeVisitor_ConfigEntry_s NW_HED_TreeVisitor_ConfigEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_TreeVisitor_ClassPart_s { - void** unused; -} NW_HED_TreeVisitor_ClassPart_t; - -struct NW_HED_TreeVisitor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_TreeVisitor_ClassPart_t NW_HED_TreeVisitor; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_TreeVisitor_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_HED_DocumentNode_t* rootNode; - NW_HED_DocumentNode_t* currentNode; - NW_ADT_Iterator_t* childIterator; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_TreeVisitor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_HED_TreeVisitor)) - -#define NW_HED_TreeVisitorOf(_object) \ - (NW_Object_Cast (_object, NW_HED_TreeVisitor)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_TreeVisitor_Class_t NW_HED_TreeVisitor_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_Bool -_NW_HED_TreeVisitor_HasNext (NW_HED_TreeVisitor_t* treeVisitor); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_TreeVisitor_GetNext (NW_HED_TreeVisitor_t* treeVisitor, - NW_HED_DocumentNode_t** documentNode); - -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_TreeVisitor_Initialize (NW_HED_TreeVisitor_t* treeVisitor, - NW_HED_DocumentNode_t* rootNode); - -NW_HED_EXPORT -NW_HED_TreeVisitor_t* -_NW_HED_TreeVisitor_New (NW_HED_DocumentNode_t* rootNode); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_TreeVisitor_HasNext - - @synopsis: Specifies whether there are any more document nodes to - iterate. - - @scope: public - @access: final - - @description: This method will return a boolean specifying whether there - are more document nodes to iterate; in other words, whether - a successive call to 'NW_HED_TreeVisitor_GetNext' would - succeed or fail. - - @returns: NW_Bool - Returns a boolean specifying if there are any more document - nodes to iterate. - - [TRUE] - There are more node's to iterate. Another call to - 'NW_HED_TreeVisitor_GetNext' will succeed. - - [FALSE] - There are no more document nodes to iterate. Another call to - 'NW_HED_TreeVisitor_GetNext' will fail. - ** ----------------------------------------------------------------------- **/ -#define NW_HED_TreeVisitor_HasNext(_treeVisitor) \ - (_NW_HED_TreeVisitor_HasNext ( \ - NW_HED_TreeVisitorOf (_treeVisitor))) - -/** ----------------------------------------------------------------------- ** - @method: - - @synopsis: - - @scope: public - @access: final - - @parameters: - [out] NW_HED_DocumentNode_t** documentNode - - @description: - - @returns: - - [KBrsrSuccess] - Successful completion; 'documentNode' is a pointer to the - next document node. - - [KBrsrUnexpectedError] - An unexpected error occurred. - ** ----------------------------------------------------------------------- **/ -#define NW_HED_TreeVisitor_GetNext(_treeVisitor, _documentNode) \ - (_NW_HED_TreeVisitor_GetNext ( \ - NW_HED_TreeVisitorOf (_treeVisitor), \ - (_documentNode))) - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_TreeVisitor_Initialize - - @synopsis: - - @scope: public - @access: static - - @parameters: - [in] NW_HED_TreeVisitor_t* treeVisitor - - [in] NW_HED_DocumentNode_t* rootNode - - @description: - - @returns: TBrowserStatusCode - - [KBrsrSuccess] - Successful completion; - - [KBrsrUnexpectedError] - An unexpected error occurred. - ** ----------------------------------------------------------------------- **/ -#define NW_HED_TreeVisitor_Initialize(_treeVisitor, _rootNode) \ - (_NW_HED_TreeVisitor_Initialize ( \ - /*MT* NW_HED_TreeVisitorOf */(_treeVisitor), \ - NW_HED_DocumentNodeOf (_rootNode))) - -/** ----------------------------------------------------------------------- ** - @method: NW_HED_TreeVisitor_New - - @synopsis: - - @scope: public - @access: static - - @parameters: - [in] NW_HED_DocumentNode_t* rootNode - - @description: - - @returns: NW_TreeVisitor_t* - ** ----------------------------------------------------------------------- **/ -#define NW_HED_TreeVisitor_New(_rootNode) \ - (_NW_HED_TreeVisitor_Initialize ( \ - NW_HED_DocumentNodeOf (_rootNode))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_TreeVisitor_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_treevisitori.h --- a/webengine/wmlengine/src/hed/include/nw_hed_treevisitori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_HED_TreeVisitorI_h_ -#define _NW_HED_TreeVisitorI_h_ - -#include "nw_object_dynamici.h" -#include "nw_hed_treevisitor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_TreeVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_HED_EXPORT -void -_NW_HED_TreeVisitor_Destruct (NW_Object_Dynamic_t* dynamicObject); - -TBrowserStatusCode -_NW_HED_TreeVisitor_NextSibling (NW_HED_TreeVisitor_t* treeVisitor, - NW_HED_DocumentNode_t* parentNode, - NW_HED_DocumentNode_t* node); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_HED_TreeVisitor_NextSibling(_treeVisitor, _parentNode, _node) \ - (_NW_HED_TreeVisitor_NextSibling ( \ - NW_HED_TreeVisitorOf (_treeVisitor), \ - NW_HED_DocumentNodeOf (_parentNode), \ - NW_HED_DocumentNodeOf (_node))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_HED_TreeVisitorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_urlrequest.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlrequest.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_URLREQUEST_H -#define NW_HED_URLREQUEST_H - -#include "nwx_defs.h" -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "NW_Text_Abstract.h" -#include "urlloader_urlresponse.h" -#include <nwx_http_header.h> -#include "nwx_buffer.h" -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -typedef enum NW_HED_UrlRequest_LoadMode_e { - NW_HED_UrlRequest_LoadNormal, - NW_HED_UrlRequest_LoadLocal -} NW_HED_UrlRequest_LoadMode_t; - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_UrlRequest_Class_s NW_HED_UrlRequest_Class_t; -typedef struct NW_HED_UrlRequest_s NW_HED_UrlRequest_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_UrlRequest_ClassPart_s { - void** unused; -} NW_HED_UrlRequest_ClassPart_t; - -struct NW_HED_UrlRequest_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_UrlRequest_ClassPart_t NW_HED_UrlRequest; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_UrlRequest_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_Text_t* url; - NW_Uint8 method; - NW_Http_Header_t* header; - NW_Buffer_t* body; - - NW_Uint8 reason; - - NW_Ucs2* rawUrl; - NW_Uint8 ownRawUrl; - - NW_HED_UrlRequest_LoadMode_t loadMode; - NW_Cache_Mode_t cacheMode; - NW_Uint8 loadType; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_UrlRequest_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_UrlRequest)) - -#define NW_HED_UrlRequestOf(_object) \ - (NW_Object_Cast (_object, NW_HED_UrlRequest)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_UrlRequest_Class_t NW_HED_UrlRequest_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_UrlRequest_t* -NW_HED_UrlRequest_New (NW_Text_t* url, NW_Uint8 method, - NW_Http_Header_t* header, NW_Buffer_t* body, NW_Uint8 reason, NW_HED_UrlRequest_LoadMode_t loadMode, NW_Uint8 loadType); - -NW_HED_EXPORT -NW_HED_UrlRequest_t* -NW_HED_UrlRequest_Clone (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -const NW_Text_t* -NW_HED_UrlRequest_GetUrl (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -const NW_Ucs2* -NW_HED_UrlRequest_GetRawUrl (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Uint8 -NW_HED_UrlRequest_GetMethod (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Uint8 -NW_HED_UrlRequest_GetReason (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Uint8 -NW_HED_UrlRequest_GetLoadType (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -const NW_Http_Header_t* -NW_HED_UrlRequest_GetHeader (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -const NW_Buffer_t* -NW_HED_UrlRequest_GetBody (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Cache_Mode_t -NW_HED_UrlRequest_GetCacheMode(const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Bool -NW_HED_UrlRequest_IsTopLevelRequest (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -NW_Bool -NW_HED_UrlRequest_IsHistoricRequest (const NW_HED_UrlRequest_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_UrlRequest_UpdateUrl (NW_HED_UrlRequest_t* thisObj, const NW_Text_t* newUrl); - -NW_HED_EXPORT -NW_Bool -NW_HED_UrlRequest_Equal (const NW_HED_UrlRequest_t* urlRequest1, - const NW_HED_UrlRequest_t* urlRequest2); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_UrlRequest_SetMethod (NW_HED_UrlRequest_t* thisObj, NW_Uint8 method); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_UrlRequest_SetReason (NW_HED_UrlRequest_t* thisObj, NW_Uint8 reason); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_UrlRequest_SetCacheMode(NW_HED_UrlRequest_t* thisObj, NW_Cache_Mode_t cacheMode); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_URLREQUEST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_urlrequesti.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlrequesti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_URLREQUESTI_H -#define NW_HED_URLREQUESTI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_urlrequest.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_UrlRequest_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_UrlRequest_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_URLREQUESTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_urlresponse.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlresponse.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_URLRESPONSE_H -#define NW_HED_URLRESPONSE_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "NW_Text_Abstract.h" -#include <urlloader_urlresponse.h> -#include "NW_HED_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_UrlResponse_Class_s NW_HED_UrlResponse_Class_t; -typedef struct NW_HED_UrlResponse_s NW_HED_UrlResponse_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_HED_UrlResponse_ClassPart_s { - void** unused; -} NW_HED_UrlResponse_ClassPart_t; - -struct NW_HED_UrlResponse_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_UrlResponse_ClassPart_t NW_HED_UrlResponse; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_HED_UrlResponse_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_Text_t* url; - - NW_Ucs2* rawUrl; - NW_Uint8 ownRawUrl; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_HED_UrlResponse_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_HED_UrlResponse)) - -#define NW_HED_UrlResponseOf(_object) \ - (NW_Object_Cast (_object, NW_HED_UrlResponse)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT const NW_HED_UrlResponse_Class_t NW_HED_UrlResponse_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -NW_HED_UrlResponse_t* -NW_HED_UrlResponse_New (const NW_Url_Resp_t* response); - -NW_HED_EXPORT -const NW_Text_t* -NW_HED_UrlResponse_GetUrl (const NW_HED_UrlResponse_t* thisObj); - -NW_HED_EXPORT -const NW_Ucs2* -NW_HED_UrlResponse_GetRawUrl (const NW_HED_UrlResponse_t* thisObj); - -NW_HED_EXPORT -TBrowserStatusCode -NW_HED_UrlResponse_UpdateUrl (NW_HED_UrlResponse_t* thisObj, const NW_Text_t* newUrl); - -NW_HED_EXPORT -NW_Bool -NW_HED_UrlResponse_Equal (const NW_HED_UrlResponse_t* urlResponse1, - const NW_HED_UrlResponse_t* urlResponse2); - -NW_HED_EXPORT -NW_HED_UrlResponse_t* -NW_HED_UrlResponse_Clone (const NW_HED_UrlResponse_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_URLRESPONSE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nw_hed_urlresponsei.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlresponsei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_HED_URLRESPONSEI_H -#define NW_HED_URLRESPONSEI_H - -#include "nw_object_dynamici.h" -#include "nw_hed_urlresponse.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_HED_EXPORT -TBrowserStatusCode -_NW_HED_UrlResponse_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_HED_EXPORT -void -_NW_HED_UrlResponse_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_HED_URLRESPONSEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/nwx_http_header.h --- a/webengine/wmlengine/src/hed/include/nwx_http_header.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: HTTP commonly used constants - - Version: V1.0 - - Description: - Definintions of commonly used HTTP constants. - -******************************************************************/ - -#ifndef NW_HTTP_HEADER_H -#define NW_HTTP_HEADER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_Http_Header_t void -#define NW_Http_ContentTypeString_t NW_Uint8* -#define NW_Http_CharSet_t NW_Uint16 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_HTTP_HEADER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/include/urlloader_urlresponse.h --- a/webengine/wmlengine/src/hed/include/urlloader_urlresponse.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Creating and deleting of url response -* -*/ - - -#ifndef URLRESPONSE_H -#define URLRESPONSE_H - -#ifdef __cplusplus -extern "C" { -#endif - // INCLUDES -#include "nwx_defs.h" -#include "nwx_buffer.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES -typedef enum { - NW_CACHE_NORMAL, // Normal Http load, use cache if not stale - NW_CACHE_HISTPREV, // History Prev load, use cache even if stale, - // unless must-revalidate - NW_CACHE_NOCACHE, // Do not use cache, even if fresh - NW_CACHE_ONLYCACHE // Only load from cache, for loading saved deck -} NW_Cache_Mode_t; - - -typedef struct NW_Url_Resp_s -{ - NW_Ucs2 *uri; // The original URL of the request - // NULL terminated - NW_Buffer_t *body; // The body of the request - void *headers; // The response headers - NW_Uint8 *contentTypeString; // The string representation of content type - NW_Ucs2 *contentTypeString16; // The string representation of content type - NW_Uint8 *contentLocationString; // The string representation of Content Base header - NW_Bool noStore; // HTTP cache-control directive. - NW_Uint8 *boundary; // The string representation of boundary (multipart) - NW_Ucs2 *lastModified; // The string representation of last-modified header. Used by ECMAScript - NW_Uint16 charset; // WAP encoding of response's character set - NW_Uint8 *charsetString; // The charset string - NW_Uint8 byteOrder; // Byte order: big-endian or little-endian for 2-byte charset or single byte - NW_Uint32 httpStatus; // Response status as received from server - NW_Uint8 method; // Method used for the final request - NW_Uint16 transId; // The transaction id of the response - void* certInfo; // The certificate information - NW_Uint32 contentLength; // The content length of the response. Used only for HEAD requests -} NW_Url_Resp_t; - - -// A URLPartialResponseCallback is passed into this component to receive partial response -typedef TBrowserStatusCode (NW_Url_RespCallback_t) - (TBrowserStatusCode status, // The load status - NW_Uint16 transId, // The transaction id of the response - NW_Int32 chunkIndex, // chunk index - void *loadContext, // A context to pass back with the response - NW_Url_Resp_t *resp); // The response structure - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -/** -* Create a url response structure -* aUri The response URL, NULL terminated. -* aBody The body of the request. -* aBodyLength The length of the body of the request. -* aHeaders The response headers. -* aContentTypeString The string representation of the content type. -* aCharset The WAP encoding of the response's character set. -* aCharsetString The response's character set. -* aHttpStatus The response status, as received from the server. -* aMethod The method used for the final request. -* aTransId The transaction id of the response. -* aContentLength The content length of the response. Used only for HEAD requests. -*/ - -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - NW_Uint8 *aContentTypeString, - NW_Uint8 *aContentLocationString, - NW_Bool noStore, - NW_Uint8 *aBoundaryString, - NW_Ucs2 *aLastModified, - NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength); -/*//R -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - const NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - const NW_Uint8 *aContentTypeString, - const NW_Uint8 *aContentLocationString, - NW_Bool noStore, - const NW_Uint8 *aBoundaryString, - const NW_Ucs2 *aLastModified, - const NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength); -*/ - -/** -* Free a url response structure -*/ -void UrlLoader_UrlResponseDelete(NW_Url_Resp_t* aResp); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // URLRESPONSE_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/ChildIterator.c --- a/webengine/wmlengine/src/hed/src/ChildIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_childiteratori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ChildIterator_Class_t NW_HED_ChildIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_ADT_MapIterator_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_ChildIterator_t), - /* construct */ _NW_ADT_MapIterator_Construct, - /* destruct */ NULL - }, - { /* NW_ADT_Iterator */ - /* hasMoreElements */ _NW_ADT_VectorIterator_HasMoreElements, - /* nextElement */ _NW_HED_ChildIterator_NextElement, - /* getElementSize */ _NW_HED_ChildIterator_GetElementSize - }, - { /* NW_ADT_VectorIterator */ - /* unused */ NW_Object_Unused - }, - { /* NW_ADT_MapIterator */ - /* unused */ NW_Object_Unused - }, - { /* NW_HED_ChildIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_ADT_Iterator methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void** -_NW_HED_ChildIterator_NextElement (NW_ADT_Iterator_t* iterator) -{ - void** entry; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_HED_ChildIterator_Class)); - - /* get the next entry from the iterator */ - entry = NW_ADT_MapIterator_Class.NW_ADT_Iterator.nextElement (iterator); - if (entry == NULL) { - return NULL; - } - - /* we know that the map is an array of packed pointers */ - return &entry[1]; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_HED_ChildIterator_GetElementSize (NW_ADT_Iterator_t* iterator) -{ - NW_ADT_MapIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, &NW_HED_ChildIterator_Class)); - - /* for convenience */ - thisObj = NW_ADT_MapIteratorOf (iterator); - - return NW_ADT_Map_GetValueSize (thisObj->map); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ChildIterator_Initialize (NW_HED_ChildIterator_t* iterator, - NW_ADT_Map_t* children) -{ - return - NW_Object_Initialize (&NW_HED_ChildIterator_Class, iterator, - children->vector, 0, NW_ADT_Vector_AtEnd, - NW_ADT_IteratorDirection_Increment, children); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_ChildIterator_t* -_NW_HED_ChildIterator_New (NW_ADT_Map_t* children) -{ - return (NW_HED_ChildIterator_t*) - NW_Object_New (&NW_HED_ChildIterator_Class, children->vector, 0, - NW_ADT_Vector_AtEnd, NW_ADT_IteratorDirection_Increment, - children); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/Context.c --- a/webengine/wmlengine/src/hed/src/Context.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,341 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_contexti.h" - -#include "nw_adt_resizablevector.h" -#include "nwx_statuscodeconvert.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public consts - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - internal methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static void -NW_HED_Variable_Delete (NW_HED_Context_Variable_t *var) -{ - if (var) { - NW_String_deleteStorage (&(var->name)); - NW_String_deleteStorage (&(var->value)); - - NW_Mem_Free (var); - } -} - -/* ------------------------------------------------------------------------- */ -static NW_HED_Context_Variable_t * -NW_HED_Variable_New (const NW_String_t *name, const NW_String_t *value) -{ - NW_HED_Context_Variable_t *var = NULL; - - NW_ASSERT (name); - NW_ASSERT (value); - - var = (NW_HED_Context_Variable_t*) NW_Mem_Malloc (sizeof (NW_HED_Context_Variable_t)); - - if (var) { - NW_String_deepCopy ((NW_String_t *) &(var->name), (NW_String_t *) name); - NW_String_deepCopy ((NW_String_t *) &(var->value), (NW_String_t *) value); - - if ((var->name.storage == NULL) || (var->value.storage == NULL)) { - NW_HED_Variable_Delete (var); - var = NULL; - } - } - - return var; -} - -/* ------------------------------------------------------------------------- */ -static NW_HED_Context_Variable_t * -NW_HED_Context_Find (const NW_HED_Context_t *thisObj, - const NW_String_t *name) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_t *v; - void** element; - - NW_ASSERT (thisObj); - NW_ASSERT (name); - - v = NW_ADT_VectorOf (thisObj->vars); - - for (index = 0; index < NW_ADT_Vector_GetSize (v); index++) { - element = NW_ADT_Vector_ElementAt (v, index); - NW_ASSERT (element != NULL); - - if (NW_String_equals (name, &((NW_HED_Context_Variable_t *) *element)->name)) - return (NW_HED_Context_Variable_t *) *element; - } - - return NULL; -} - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_HED_Context_SetVariable (NW_HED_Context_t *thisObj, - const NW_String_t *name, - const NW_String_t *value) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_Context_Variable_t *var; - - NW_ASSERT (thisObj); - NW_ASSERT (name); - - if ((var = NW_HED_Context_Find (thisObj, name)) != NULL) { - NW_String_deleteStorage (&(var->value)); - - status = StatusCodeConvert(NW_String_deepCopy(&(var->value), (NW_String_t *) value)); - } - else { - /* the var didn't exist */ - NW_ASSERT (0); - } - - return status; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_Context_Class_t NW_HED_Context_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_Context_t), - /* construct */ _NW_HED_Context_Construct, - /* destruct */ _NW_HED_Context_Destruct - }, - { /* NW_HED_Context */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_Context_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_Context_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_Context_Class)); - NW_ASSERT (argp != NULL); - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (argp); - - /* for convenience */ - thisObj = NW_HED_ContextOf (dynamicObject); - - /* create the variable list */ - thisObj->vars = (NW_ADT_DynamicVector_t *) (NW_ADT_ResizableVector_New ( - sizeof (NW_HED_Context_Variable_t*), 10, 5)); - - if (!thisObj->vars) { - status = KBrsrOutOfMemory; - } - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_Context_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_Context_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_Context_Class)); - - /* for convenience */ - thisObj = NW_HED_ContextOf (dynamicObject); - - /* deallocate our dynamic data */ - NW_HED_Context_Reset (thisObj); - NW_Object_Delete (thisObj->vars); -} - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Context_Reset (NW_HED_Context_t *thisObj) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_t *v; - void** element; - - if (thisObj == NULL) { - return KBrsrSuccess; - } - - if (thisObj->vars == NULL) { - return KBrsrSuccess; - } - - v = NW_ADT_VectorOf (thisObj->vars); - - /* delete each item */ - for (index = 0; index < NW_ADT_Vector_GetSize (v); index++) { - element = NW_ADT_Vector_ElementAt (v, index); - NW_ASSERT (element != NULL); - - NW_HED_Variable_Delete ((NW_HED_Context_Variable_t *) *element); - } - - /* set the vector length to zero */ - return NW_ADT_DynamicVector_Clear (thisObj->vars); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Context_SetOrAddVariable (NW_HED_Context_t *thisObj, - const NW_String_t *name, - const NW_String_t *value) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_Context_Variable_t* var; - - NW_ASSERT (name); - - if (thisObj == NULL) { - return KBrsrFailure; - } - - /* don't allow the variable to be added more than once */ - if (NW_HED_Context_Find (thisObj, name) != NULL) { - return NW_HED_Context_SetVariable (thisObj, name, value); - } - - /* create and append the var */ - var = NW_HED_Variable_New (name, value); - if (var != NULL) { - void** address; - - address = NW_ADT_DynamicVector_InsertAt (thisObj->vars, &var, NW_ADT_Vector_AtEnd); - if (!address) { - NW_HED_Variable_Delete (var); - status = KBrsrOutOfMemory; - } - } - else { - status = KBrsrOutOfMemory; - } - - return status; -} - - -/* ------------------------------------------------------------------------- */ -const NW_String_t * -NW_HED_Context_GetVariable (const NW_HED_Context_t *thisObj, - const NW_String_t *name) -{ - NW_HED_Context_Variable_t *var; - - NW_ASSERT (name); - - if (thisObj == NULL) { - return NULL; - } - - if ((var = NW_HED_Context_Find (thisObj, name)) != NULL) { - return &(var->value); - } - else { - return NULL; - } -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_Context_Variable_t * -NW_HED_Context_GetEntry (const NW_HED_Context_t *thisObj, - NW_Uint32 index) -{ - NW_ADT_Vector_Metric_t size; - - if (thisObj == NULL) { - return NULL; - } - - size = NW_ADT_Vector_GetSize (thisObj->vars); - - if (index >= size) { - return NULL; - } - - return (const NW_HED_Context_Variable_t *) (*NW_ADT_Vector_ElementAt ( - thisObj->vars, (NW_ADT_Vector_Metric_t) index)); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Context_RemoveEntry (NW_HED_Context_t *thisObj, - NW_Uint32 index) -{ - NW_ADT_Vector_Metric_t size; - - if (thisObj == NULL) { - return KBrsrFailure; - } - - size = NW_ADT_Vector_GetSize (thisObj->vars); - - if (index >= size) { - return KBrsrFailure; - } - - return NW_ADT_DynamicVector_RemoveAt (thisObj->vars, (NW_ADT_Vector_Metric_t) index); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_Context_t* -NW_HED_Context_New (void) -{ - return (NW_HED_Context_t*) NW_Object_New (&NW_HED_Context_Class); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/ContextVisitor.c --- a/webengine/wmlengine/src/hed/src/ContextVisitor.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_contextvisitori.h" - -#include "nw_hed_context.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ContextVisitor_Class_t NW_HED_ContextVisitor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_ContextVisitor_t), - /* construct */ _NW_HED_ContextVisitor_Construct, - /* destruct */ NULL - }, - { /* NW_HED_ContextVisitor */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContextVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_ContextVisitor_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_ContextVisitorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->context = va_arg (*argp, NW_HED_Context_t*); - NW_ASSERT (thisObj->context != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->context, &NW_HED_Context_Class)); - - thisObj->current = 0; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_Context_Variable_t* -NW_HED_ContextVisitor_NextVariable (NW_HED_ContextVisitor_t* thisObj) -{ - const NW_HED_Context_Variable_t* var; - - NW_ASSERT (thisObj); - - var = NW_HED_Context_GetEntry (thisObj->context, thisObj->current); - - if (var) { - thisObj->current++; - } - - return var; -} - -/* ------------------------------------------------------------------------- */ -void -NW_HED_ContextVisitor_Reset (NW_HED_ContextVisitor_t* thisObj) -{ - NW_ASSERT (thisObj); - - thisObj->current = 0; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_ContextVisitor_Initialize (NW_HED_ContextVisitor_t* thisObj, - const NW_HED_Context_t* context) -{ - return NW_Object_Initialize (&NW_HED_ContextVisitor_Class, thisObj, context); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_ContextVisitor_t* -NW_HED_ContextVisitor_New (NW_HED_Context_t* context) -{ - return (NW_HED_ContextVisitor_t*) - NW_Object_New (&NW_HED_ContextVisitor_Class, context); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/DOMVisitor.c --- a/webengine/wmlengine/src/hed/src/DOMVisitor.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_dom_domvisitori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_cXML_DOM_DOMVisitor_Class_t NW_cXML_DOM_DOMVisitor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_cXML_DOM_DOMVisitor_t), - /* construct */ _NW_cXML_DOM_DOMVisitor_Construct, - /* destruct */ NULL - }, - { /* NW_cXML_DOM_DOMVisitor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_cXML_DOM_DOMVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_cXML_DOM_DOMVisitor_t* thisObj; - - /* for convenience */ - thisObj = NW_cXML_DOM_DOMVisitorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->rootNode = va_arg (*argp, NW_DOM_Node_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_SetRootNode (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_DOM_Node_t* rootNode) -{ - /* set the rootNode member variable - don't forget to clear the currentNode, - after all this may be a completely new document! */ - visitor->rootNode = rootNode; - visitor->currentNode = NULL; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_GetRootNode (NW_cXML_DOM_DOMVisitor_t* visitor) -{ - return visitor->rootNode; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_Reset (NW_cXML_DOM_DOMVisitor_t* visitor) -{ - visitor->currentNode = NULL; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_Next (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type) -{ - /* if this is the first time we're called, we simply return the specified - root */ - if (visitor->currentNode == NULL) { - visitor->currentNode = visitor->rootNode; - if (type & NW_DOM_Node_getNodeType (visitor->currentNode)) { - return visitor->currentNode; - } - } - - do { - NW_DOM_Node_t* node; - NW_DOM_Node_t* parentNode; - - /* ok, we've been here before ... check whether the current node has any - children, if so we return the first of its children and make that the - current node */ - node = NW_DOM_Node_getFirstChild (visitor->currentNode); - if (node != NULL) { - visitor->currentNode = node; - continue; - } - - /* so, no children - if currentNode equals rootNode were done */ - if (visitor->currentNode == visitor->rootNode) { - visitor->currentNode = NULL; - continue; - } - - /* so, no children (although abstinence is hard) - look for a sibling, if - found make that our current node and return it */ - node = NW_DOM_Node_getNextSibling (visitor->currentNode); - if (node != NULL) { - visitor->currentNode = node; - continue; - } - - /* what? no siblings? oh well, we'll have to look for the first sibling of - the first ancestor we can find (not including our root) */ - for (parentNode = NW_DOM_Node_getParentNode (visitor->currentNode); - parentNode != visitor->rootNode; - parentNode = NW_DOM_Node_getParentNode (parentNode)) { - node = NW_DOM_Node_getNextSibling (parentNode); - if (node != NULL) { - visitor->currentNode = node; - break; - } - } - if (node != NULL) { - continue; - } - - /* ok, if we get this far it means that we can find no more nodes to - iterate over */ - visitor->currentNode = NULL; - } while (visitor->currentNode != NULL && - visitor->currentNode != visitor->rootNode && - ! (type & NW_DOM_Node_getNodeType (visitor->currentNode))); - - /* return the result */ - return visitor->currentNode; -} - -/* ------------------------------------------------------------------------- */ -/* iterates only over the first level children */ -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_NextChild (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type) -{ - NW_DOM_Node_t* node; - - /* return NULL if the root node has no children */ - if (NW_DOM_Node_hasChildNodes (visitor->rootNode) == NW_FALSE) { - return NULL; - } - - /* search for a child of the given type */ - node = visitor->currentNode; - do { - if (node == NULL) { - node = NW_DOM_Node_getFirstChild (visitor->rootNode); - } - else { - node = NW_DOM_Node_getNextSibling (node); - } - } while ((node != NULL) && ((type & NW_DOM_Node_getNodeType (node)) == 0)); - - /* return the result */ - visitor->currentNode = node; - return node; -} - -/* ------------------------------------------------------------------------- */ -/* Gets the next node using skipChildren functionality */ -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* -NW_cXML_DOM_DOMVisitor_NextNode (NW_cXML_DOM_DOMVisitor_t* visitor, - NW_Uint8 type, - NW_Bool skipChildren) -{ - NW_DOM_Node_t* node = NULL; - NW_DOM_Node_t* nextNode = NULL; - - /* return NULL if the root node has no children */ - if ((visitor->currentNode == NULL) || (NW_DOM_Node_getParentNode(visitor->currentNode) == NULL)){ - return NULL; - } - - if (skipChildren) - { - /* search for a child of the given type */ - node = visitor->currentNode; - do - { - nextNode = NW_DOM_Node_getNextSibling (node); - if (nextNode && (type & NW_DOM_Node_getNodeType (nextNode))) - { - break; - } - node = NW_DOM_Node_getParentNode(node); - } while (node != NULL); - } - else - { - nextNode = NW_cXML_DOM_DOMVisitor_Next(visitor, type); - } - - /* return the result */ - return nextNode; -} - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_cXML_DOM_DOMVisitor_t* -NW_cXML_DOM_DOMVisitor_New (NW_DOM_Node_t* rootNode) -{ - return (NW_cXML_DOM_DOMVisitor_t*) - NW_Object_New (&NW_cXML_DOM_DOMVisitor_Class, rootNode); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_cXML_DOM_DOMVisitor_Initialize (NW_cXML_DOM_DOMVisitor_t* visitor, NW_DOM_Node_t* rootNode) -{ - return NW_Object_Initialize (&NW_cXML_DOM_DOMVisitor_Class, visitor, rootNode); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/DomHelper.c --- a/webengine/wmlengine/src/hed/src/DomHelper.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1745 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_defs.h" -#include "nw_hed_domhelper.h" - -#include "nw_dom_element.h" -#include "nw_dom_domvisitor.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "nwx_logger.h" -#include "TextReverse.h" -#include "nwx_settings.h" -#include <nwx_status.h> -#include "nwx_statuscodeconvert.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "BrsrStatusCodes.h" -#include "wml_elm_attr.h" - - -/* ------------------------------------------------------------------------- * - private constants - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- * - private static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -NW_Bool NW_HED_DomHelper_ContainsPlainTextVariablesAndEntities (const NW_HED_DomHelper_t* domHelper, - const NW_String_t* value, - NW_Uint32 encoding) -{ - NW_Uint16 charCount; - NW_Uint16 i; - NW_Byte* buff; - NW_Int32 skip; - - - NW_ASSERT (domHelper != NULL); - NW_ASSERT (value != NULL); - - charCount = NW_String_getCharCount ((NW_String_t*) value, encoding); - buff = value->storage; - - for (i = 0; i < charCount; i++) { - NW_Ucs2 ucs2Char; - - skip = NW_String_readChar (buff, &ucs2Char, encoding); - - /* found a variable */ - if ((domHelper->context != NULL) && (ucs2Char == WAE_ASCII_DOLLAR)) { - return NW_TRUE; - } - - /* Found entity begin. There is support for loose entity i.e. entity - * not ending with (;). So, if this entity begin symbol is found then - * let NW_HED_DomHelper_GetText_Resolve(...) to decide about the text string. - * */ - - if ((domHelper->entitySet != NULL) && (ucs2Char == WAE_URL_AMP_CHAR)) - { - return NW_TRUE; - } - - buff += skip; - } - - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Int32 IsValidDigit (const NW_Ucs2 ch, - NW_Int32 base) -{ - switch (base) { - case 10: - return NW_Str_Isdigit (ch); - - case 16: - return NW_Str_Isxdigit (ch); - - default: - return 0; - } -} - -/* ------------------------------------------------------------------------- */ -static -NW_Bool GetNumEntityChar (const NW_Ucs2* instring, - NW_Ucs2 *retchar, - NW_Int32 base) -{ - NW_Int32 result = 0; - NW_Int32 prevResult; - NW_Uint32 currDigit = 0; - - if (*instring == 0) { - return NW_FALSE; - } - - while (*instring != 0) { - if (!(IsValidDigit (*instring, base))) - return NW_FALSE; - - if (NW_Str_Isdigit (*instring)) { - currDigit = *instring - WAE_ASCII_0; - instring++; - } - else { - currDigit = NW_Str_ToUpper (*instring) - WAE_ASCII_UPPER_A + 10; - instring++; - } - - prevResult = result; - result = result * base + currDigit; - if (result < prevResult) { - return NW_FALSE; - } - } - if (result > 0xffff || result < 0x0) - return NW_FALSE; - - /* TODO: validate the entity number */ - *retchar = (NW_Ucs2) result; - return NW_TRUE; -} - - -// Full support for MS Windows extensions to Latin-1. -// Technically these extensions should only be activated for pages -// marked "windows-1252" or "cp1252", but -// in the standard Microsoft way, these extensions infect hundreds of thousands -// of web pages. Note that people with non-latin-1 Microsoft extensions -// are SOL. -// -// See: http://www.microsoft.com/globaldev/reference/WinCP.asp -// http://www.bbsinc.com/iso8859.html -// http://www.obviously.com/ -// -// There may be better equivalents - -// We only need this for entities. For non-entity text, we handle this in the text encoding. - -static const NW_Ucs2 wml_windowsLatin1Extension[32] = { - 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, // 80-87 - 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F, // 88-8F - 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, // 90-97 - 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178 // 98-9F -}; - -static NW_Ucs2 wml_fixUpChar(NW_Ucs2 c) -{ - if ((c & ~0x1F) != 0x0080) - return c; - return wml_windowsLatin1Extension[c - 0x80]; -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode ResolveEntity (const NW_HED_EntitySet_t* entitySet, - NW_String_t* entityName, - NW_Ucs2* entityChar) -{ - NW_Ucs2* rawEntity = NULL; - - NW_TRY (status) { - const NW_Ucs2 EREF_HEXSIGN = 'x'; - - /* get the raw entity */ - rawEntity = NW_Str_New (entityName->length); - NW_THROW_OOM_ON_NULL (rawEntity, status); - NW_Str_Strncpy (rawEntity, (NW_Ucs2*) entityName->storage, entityName->length); - *(rawEntity + entityName->length) = 0; - - /* check and validate for hex numeric char entity */ - if ((*(rawEntity) == WAE_URL_FRAG_CHAR) && - (*(rawEntity + 1) == EREF_HEXSIGN) && - (GetNumEntityChar(rawEntity + 2, entityChar, 16) != 0)) { - NW_THROW_SUCCESS (status); - } - - /* check and validate for dec numeric char entity */ - if((*rawEntity == WAE_URL_FRAG_CHAR) && - (GetNumEntityChar (rawEntity+1, entityChar, 10) != 0)) { - NW_THROW_SUCCESS (status); - } - - /* check if it is a named char entity */ - if ((*entityChar = NW_HED_EntitySet_GetEntityChar (entitySet, rawEntity)) != 0) { - NW_THROW_SUCCESS (status); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Str_Delete (rawEntity); - - /* Map Windows Latin1 extensions to their Unicode equivalents */ - *entityChar = wml_fixUpChar(*entityChar); - - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -static -NW_Ucs2* NW_HED_DomHelper_ResolveVariable (const NW_HED_Context_t* context, - NW_Uint16 variableType, - const NW_Ucs2* varName) -{ - NW_String_t vName; - const NW_String_t* varValue; - NW_Ucs2* vValue; - - /* get the value of the variable */ - if (StatusCodeConvert(NW_String_initialize (&vName, (void *) varName, HTTP_iso_10646_ucs_2)) != KBrsrSuccess) { - return NULL; - } - - varValue = NW_HED_Context_GetVariable(context, &vName); - if (varValue == NULL) { - return NULL; - } - - switch (variableType) { - /* escape the variable's value */ - case NW_WBXML_EXT_I_0: - case NW_WBXML_EXT_T_0: - vValue = NW_Str_New (NW_Url_EscapeStringLen ((NW_Ucs2 *) varValue->storage)); - if (vValue) { - (void) NW_Url_EscapeString ((NW_Ucs2 *) varValue->storage, vValue); - } - break; - - /* unescape the variable's value */ - case NW_WBXML_EXT_I_1: - case NW_WBXML_EXT_T_1: - vValue = NW_Str_New (NW_Url_UnEscapeStringLen ((NW_Ucs2 *) varValue->storage)); - if (vValue) { - (void) NW_Url_UnEscapeString ((NW_Ucs2 *) varValue->storage, vValue); - } - break; - - /* just copy the variable's value */ - default: - NW_String_stringToUCS2Char (varValue, HTTP_iso_10646_ucs_2, &vValue); - break; - - } - - return vValue; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -IsEndofVar (NW_Ucs2 varChar, - NW_Ucs2 endVar) -{ - if (NW_Str_Isalnum(varChar) || (varChar == WAE_ASCII_UNDERSCORE) || - ((varChar == WAE_ASCII_COLON) && (endVar == WAE_ASCII_RIGHT_BRACE))) { - return NW_FALSE; - } - - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Uint16 -getVariableType (NW_Ucs2* conv) -{ - static const NW_Ucs2 DEPRECATED_CONV_NOESC[] = { 'n', 'o', 'e', 's', 'c', 0}; - static const NW_Ucs2 DEPRECATED_CONV_ESCAPE[] = { 'e', 's', 'c', 'a', 'p', 'e', 0}; - static const NW_Ucs2 DEPRECATED_CONV_UNESC[] = { 'u', 'n', 'e', 's', 'c', 0}; - NW_Ucs2 *pChar = conv; - - if(conv == NULL) { - return 0; - } - - if (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_NOESC, 1) == 0) { - if ((*(pChar + 1) != WAE_ASCII_NULL) && - (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_NOESC, 5) != 0)) { - return 0; - } - return NW_WBXML_EXT_I_2; - } - else if (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_ESCAPE, 1) == 0) - { - if ((*(pChar + 1) != WAE_ASCII_NULL) && - (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_ESCAPE, 6) != 0)) { - return 0; - } - return NW_WBXML_EXT_I_0; - } - else if (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_UNESC, 1) == 0) - { - if ((*(pChar + 1) != WAE_ASCII_NULL) && - (NW_Str_Strnicmp (pChar, (NW_Ucs2 *) DEPRECATED_CONV_UNESC, 5) != 0)) { - return 0; - } - return NW_WBXML_EXT_I_1; - } - return 0; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode getVarValue (const NW_HED_Context_t* context, - NW_Ucs2* varName, - NW_Ucs2** varValue, - NW_Ucs2** varEnd, - NW_Uint16 variableType - ) -{ - NW_Ucs2 varRefEnd = ' '; - NW_Ucs2* nameStart; - NW_Ucs2* tmpName = NULL; - NW_Uint32 nameLen; - TBrowserStatusCode status = KBrsrSuccess; - - /* skip $ char */ - nameStart = ++varName; - - /* is $$ */ - if (*varName == WAE_ASCII_DOLLAR) { - varName++; /* skip second dollar */ - NW_THROWIF_NULL (*varValue = NW_Str_New(1)); - NW_Str_Strncpy (*varValue, nameStart , 1); - *(*varValue + 1) = 0; - *varEnd = varName; - - return status; - } - - /* is "$(" Variable ")" type variable */ - if (*varName == WAE_ASCII_LEFT_BRACE) { - varRefEnd = WAE_ASCII_RIGHT_BRACE; - nameStart = ++varName; /* skip left brace */ - - while (!IsEndofVar (*varName, varRefEnd)) { - varName++; - } - - if (*varName == WAE_ASCII_RIGHT_BRACE) { - NW_Ucs2* convStart = NULL; - NW_Ucs2 convChar = 0; - NW_Uint16 varType = 0; - nameLen = varName - nameStart; - - NW_THROWIF_NULL (tmpName = NW_Str_New (nameLen)); - NW_Str_Strncpy (tmpName, nameStart, nameLen); - *(tmpName + nameLen) = 0; - - varName++; /* skip ) char */ - /* Support for conv and deprecated-conv */ - convStart = NW_Str_Strchr (tmpName, WAE_ASCII_COLON); - if(convStart) { - convChar = *convStart; - *convStart = 0; - convStart++; - - varType = getVariableType (convStart); - if(varType) { - *varValue = NW_HED_DomHelper_ResolveVariable(context, varType, tmpName); - } - - /* unexpected conv char, copy as is */ - else { - nameLen = varName - nameStart + 2; /* To include the "$(" chars */ - NW_THROWIF_NULL (*varValue = NW_Str_New (nameLen)); - NW_Str_Strncpy (*varValue, (nameStart - 2), nameLen); - *(*varValue + nameLen) = 0; - } - - convStart--; - *convStart = convChar; - } - else { - *varValue = NW_HED_DomHelper_ResolveVariable (context, variableType, tmpName); - } - - NW_Str_Delete(tmpName); - *varEnd = varName; - return status; - } - - /* Found "$(" but no corresponding ")", so copy as is */ - nameLen = varName - nameStart + 2; /* To include the "$(" chars */ - NW_THROWIF_NULL (*varValue = NW_Str_New (nameLen)); - NW_Str_Strncpy (*varValue, (nameStart - 2), nameLen); - *(*varValue + nameLen) = 0; - *varEnd = varName; - return status; - } - - /* is "$" Variable " " type variable */ - if(NW_Str_Isalpha (*varName) || (*varName == WAE_ASCII_UNDERSCORE)) { - while (!IsEndofVar (*varName, varRefEnd)) { - varName++; - } - - nameLen = varName - nameStart; - - NW_THROWIF_NULL (tmpName = NW_Str_New (nameLen)); - NW_Str_Strncpy (tmpName, nameStart, nameLen); - *(tmpName + nameLen) = 0; - *varValue = NW_HED_DomHelper_ResolveVariable (context, NW_WBXML_EXT_I_2, tmpName); - NW_Str_Delete (tmpName); - *varEnd = varName; - return status; - } - - /* If we reach here that means its just a $, copy as is */ - NW_THROWIF_NULL (*varValue = NW_Str_New (1)); - NW_Str_Strncpy (*varValue, varName - 1 , 1); - *(*varValue + 1) = 0; - *varEnd = varName; - return status; - -NW_CATCH_ERROR - return KBrsrOutOfMemory; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode NW_HED_DomHelper_ResolveVariables (const NW_HED_Context_t* context, - const NW_Ucs2* origText, - NW_String_t* destString, - NW_Uint16 variableType - ) -{ - NW_Ucs2* sourceWalker = NULL; - NW_Ucs2* varStart = NULL; - NW_Ucs2* varEnd = NULL; - NW_Ucs2* varValue = NULL; - NW_Bool done = NW_FALSE; - NW_String_t tmpString; - TBrowserStatusCode status = KBrsrDomNoStringReturned; - - /* Initialising the dest to NULL */ - destString->length = 0; - destString->storage = NULL; - tmpString.length = 0; - tmpString.storage = NULL; - - /* Initialise sourceWalker to origText */ - sourceWalker = (NW_Ucs2*) origText; - - /* Itarate through sourceWalker to substitute all variables */ - while (!done) { - /* Find a variable */ - varStart = NW_Str_Strchr (sourceWalker, WAE_ASCII_DOLLAR); - - /* Resolve variable */ - if(varStart) { - NW_THROWIF_ERROR (status = getVarValue (context, varStart, &varValue, &varEnd, variableType)); - } - - /* append rest to the dest string, if no more variables */ - if(varStart == NULL) { - if(destString != NULL) { - tmpString.length = NW_Str_Strsize (sourceWalker); - tmpString.storage = (NW_Byte*) sourceWalker; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - } - - done = NW_TRUE; - NW_Str_Delete (varValue); - continue; - } - - /* append the text before variable and the variable Value to the destSting */ - if(varStart != sourceWalker) { - tmpString.length = (varStart - sourceWalker) * sizeof (NW_Ucs2); - tmpString.storage = (NW_Byte*) sourceWalker; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - } - - if(varValue && NW_Str_Strlen(varValue)) { - tmpString.length = NW_Str_Strlen (varValue) * sizeof (NW_Ucs2); - tmpString.storage = (NW_Byte*) varValue; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - NW_Str_Delete (varValue); - varValue = NULL; - } - - /* set the sourceWlaker to the next iteration */ - sourceWalker = varEnd; - } - - return status; - -NW_CATCH_ERROR - NW_Str_Delete (varValue); - NW_String_deleteStorage (destString); - destString->length = 0; - destString->storage = NULL; - if (status != KBrsrOutOfMemory) { - status = KBrsrDomNoStringReturned; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode NW_HED_DomHelper_ResolveVariablesAndEntities ( - const NW_String_t* origText, - const NW_HED_EntitySet_t* entitySet, - const NW_HED_Context_t* context, - NW_Uint32 encoding, - NW_String_t *resolvedText, - NW_Uint16 variableType) -{ - TBrowserStatusCode status; - NW_Ucs2* ucs2String = NULL; - NW_String_t tempString; - - NW_ASSERT (origText != NULL); - NW_ASSERT (resolvedText != NULL); - - NW_String_initialize (resolvedText, NULL, 0); - NW_String_initialize (&tempString, NULL, 0); - - /* convert the value to a ucs2-NW_String_t */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_String_stringToUCS2Char (origText, encoding, &ucs2String))); - - /* perform enitity substitution */ - if (entitySet != NULL) { - status = NW_HED_DomHelper_ResolveEntities (entitySet, ucs2String, &tempString); - - /* entities were found so update ucs2String with the resolved string */ - if (status == KBrsrSuccess) { - NW_Str_Delete (ucs2String); - ucs2String = NULL; - - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_String_stringToUCS2Char (&tempString, HTTP_iso_10646_ucs_2, &ucs2String))); - NW_String_deleteStorage (&tempString); - } - - /* - ** if status equals KBrsrDomNoStringReturned no entities were found. In - ** which case ucs2String doesn't need to be updated. All other errors cause - ** an exception to be thrown. - */ - else if (status != KBrsrDomNoStringReturned) { - NW_THROW_ERROR(); - } - } - - /* perform variable substitution */ - if (context != NULL) { - status = NW_HED_DomHelper_ResolveVariables (context, ucs2String, &tempString, variableType); - - /* variables were found so update ucs2String with the resolved string */ - if (status == KBrsrSuccess) { - NW_Str_Delete (ucs2String); - ucs2String = NULL; - - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_String_stringToUCS2Char (&tempString, encoding, &ucs2String))); - NW_String_deleteStorage (&tempString); - } - - /* - ** if status equals KBrsrDomNoStringReturned no variables were found. In - ** which case ucs2String doesn't need to be updated. All other errors cause - ** an exception to be thrown. - */ - else if (status != KBrsrDomNoStringReturned) { - NW_THROW_ERROR(); - } - } - - /* update resolvedText */ - NW_String_initialize (resolvedText, ucs2String, HTTP_iso_10646_ucs_2); - NW_String_setUserOwnsStorage (resolvedText); - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (&tempString); - NW_Str_Delete (ucs2String); - - return status; -} - - -/* ------------------------------------------------------------------------- */ -/* -** Extracts the text from the element. It is able to properly resolve variables -** & entities and handle multiple text items. Upon success value holds the -** result encoded as ucs2. -*/ -static -TBrowserStatusCode NW_HED_DomHelper_GetText_Resolve (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_String_t* value) -{ - TBrowserStatusCode status; - NW_DOM_TextItemIterator_t iterator; - NW_DOM_TextItem_t item; - NW_String_t nativeText; - NW_Uint32 nativeEncoding; - NW_Ucs2* ucs2String = NULL; - - NW_ASSERT (element != NULL); - NW_ASSERT (value != NULL); - - nativeText.storage = NULL; - nativeText.length = 0; - - /* init the result string */ - value->storage = NULL; - value->length = 0; - NW_String_setUserOwnsStorage (value); - - if (NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element) != NW_DOM_TEXT_NODE){ - return KBrsrFailure; - } - - nativeEncoding = NW_HED_DomHelper_GetEncoding (element); - - /* init the text item iter */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_DOM_TextNode_getTextItemIterator ((NW_DOM_Node_t*) element, &iterator))); - - /* build the text by appendding the testItems */ - NW_Mem_memset (&item, 0x00, sizeof (NW_DOM_TextItem_t)); - while (NW_DOM_TextItemIterator_getNextTextItem (&iterator, &item) == NW_STAT_WBXML_ITERATE_MORE) { - NW_Uint32 encoding = nativeEncoding; - - /* entities should always be extracted with an ucs2 encoding */ - if (NW_DOM_TextItem_getType (&item) == NW_DOM_TEXT_ITEM_ENTITY) { - encoding = HTTP_iso_10646_ucs_2; - } - - /* don't include opaque data */ - if (NW_DOM_TextItem_getType (&item) == NW_DOM_TEXT_ITEM_OPAQUE) { - continue; - } - - /* get items's value as a string using the document's encoding */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_DOM_TextItem_toString (&item, &nativeText, encoding))); - - /* convert the value to a ucs2 string or copy it if it is already ucs2 */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_String_stringToUCS2Char (&nativeText, encoding, &ucs2String))); - NW_String_deleteStorage (&nativeText); - - /* if this item is a wbxml variable get the value -- we will append it instead */ - if(NW_DOM_TextItem_getType (&item) == NW_DOM_TEXT_ITEM_EXTENSION) { - NW_Ucs2* varName; - NW_String_t tmpStr; - NW_Uint16 token; - - token = NW_DOM_TextItem_getExtension (&item, &tmpStr); - - varName = ucs2String; - ucs2String = NW_HED_DomHelper_ResolveVariable (domHelper->context, (NW_Uint16) (token & 0xFF), varName); - - NW_Str_Delete (varName); - } - - /* append the resolved string */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatUcs2String (value, ucs2String)); - - NW_Str_Delete (ucs2String); - ucs2String = NULL; - - NW_Mem_memset (&item, 0x00, sizeof (NW_DOM_TextItem_t)); - } - - /* if after building the text it is null just throw an "exception" so we can clean up below */ - if (value->storage == NULL) { - status = KBrsrFailure; - NW_THROW_ERROR (); - } - - /* perform plain-text variable and entity substitution as needed */ - if (domHelper->resolvePlainTextVariablesAndEntities == NW_TRUE) { - NW_String_t newValue; - - NW_THROWIF_ERROR (status = NW_HED_DomHelper_ResolveVariablesAndEntities (value, domHelper->entitySet, - domHelper->context, HTTP_iso_10646_ucs_2, &newValue, NW_WBXML_EXT_I_2)); - - NW_String_deleteStorage (value); - NW_String_initialize (value, newValue.storage, HTTP_iso_10646_ucs_2); - NW_String_setUserOwnsStorage (value); - } - - /* return the result */ - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (&nativeText); - NW_Str_Delete (ucs2String); - NW_String_deleteStorage (value); - - return status; -} - -/* ------------------------------------------------------------------------- */ -/* -** Extracts the text from the element without copying the original data from -** the DOM. This function returns KBrsrUnexpectedError if it isn't possible -** to extract the text without copying it -- in which case the caller should call -** NW_HED_DomHelper_GetText_Resolve. -*/ -static -TBrowserStatusCode NW_HED_DomHelper_GetText_NoResolve (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_String_t* value, - NW_Uint32* encoding) -{ - NW_DOM_TextItemIterator_t iterator; - NW_DOM_TextItem_t item; - NW_Int32 itemCount = 0; - - NW_ASSERT (domHelper != NULL); - NW_ASSERT (element != NULL); - NW_ASSERT (value != NULL); - NW_ASSERT (encoding != NULL); - - /* init the result string */ - NW_String_initialize (value, NULL, 0); - - NW_TRY (status) { - if (NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element) != NW_DOM_TEXT_NODE){ - NW_THROW_UNEXPECTED (status); - } - - /* set the encoding */ - *encoding = NW_HED_DomHelper_GetEncoding (element); - - /* init the text item iter */ - status = StatusCodeConvert(NW_DOM_TextNode_getTextItemIterator ((NW_DOM_Node_t*) element, &iterator)); - NW_THROW_ON_ERROR (status); - - /* extract the single text item -- reject complex elements */ - NW_Mem_memset (&item, 0x00, sizeof (NW_DOM_TextItem_t)); - while (NW_DOM_TextItemIterator_getNextTextItem (&iterator, &item) == NW_STAT_WBXML_ITERATE_MORE) { - NW_DOM_TextItemType_t type; - - /* get the item's type */ - type = NW_DOM_TextItem_getType (&item); - - /* just ignore opaque data */ - if (type == NW_DOM_TEXT_ITEM_OPAQUE) { - continue; - } - - /* - ** reject the text element if it contains anything other than a string - ** item (ignoring opaque). The caller must use NW_HED_DomHelper_GetText_Resolve instead. - */ - if (type != NW_DOM_TEXT_ITEM_STRING) { - NW_THROW_UNEXPECTED (status); - } - - /* reject the text element if it contains more than one text item */ - if (itemCount > 0) { - NW_THROW_UNEXPECTED (status); - } - else { - itemCount++; - } - - /* get items's value as a string using the document's encoding */ - status = StatusCodeConvert(NW_DOM_TextItem_toString (&item, value, *encoding)); - NW_THROW_ON_ERROR (status); - - NW_Mem_memset (&item, 0x00, sizeof (NW_DOM_TextItem_t)); - } - - /* if after building the text it is null just throw an "exception" */ - if (value->storage == NULL) { - NW_THROW_UNEXPECTED (status); - } - - /* - ** if the text element contains plain-text entities or variables the caller must use - ** NW_HED_DomHelper_GetText_Resolve instead. - */ - if (domHelper->resolvePlainTextVariablesAndEntities == NW_TRUE) { - if (NW_HED_DomHelper_ContainsPlainTextVariablesAndEntities (domHelper, - value, *encoding) == NW_TRUE) { - NW_THROW_UNEXPECTED (status); - } - } - } - - NW_CATCH (status) { - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode NW_HED_DomHelper_GetAttributeValueHelper (const NW_DOM_ElementNode_t* element, - const NW_String_t* attributeName, - const NW_HED_Context_t* context, - NW_String_t* value) -{ - TBrowserStatusCode status; - NW_String_t nativeText; - NW_Uint32 nativeEncoding; - NW_Ucs2* ucs2String = NULL; - NW_DOM_AttrVal_t av; - NW_DOM_AttributeHandle_t attributeHandle; - - nativeEncoding = NW_HED_DomHelper_GetEncoding (element); - - nativeText.storage = NULL; - nativeText.length = 0; - - value->storage = NULL; - value->length = 0; - - /* get the attribute's handle */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_DOM_ElementNode_getAttributeHandleByName ((NW_DOM_ElementNode_t*) element, - (NW_String_t*) attributeName, &attributeHandle))); - - /* - If this attribute's name includes the an attribute value prefix - (e.g. name is something like "href=http://"), then the attribute's - value prefix must be added. - */ - status = StatusCodeConvert(NW_DOM_AttributeHandle_getValuePrefix (&attributeHandle, &nativeText)); - if (status == KBrsrSuccess) { - value->storage = NULL; - - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (value, &nativeText, nativeEncoding)); - NW_String_deleteStorage(&nativeText); - } - else if (status != KBrsrDomNoValuePrefix) { - status = KBrsrNotFound; - NW_THROW_ERROR(); - } - - /* build the rest of the attribute's value */ - while (NW_DOM_AttributeHandle_getNextVal (&attributeHandle, &av) - == NW_STAT_WBXML_ITERATE_MORE) { - NW_Uint32 encoding = nativeEncoding; - - /* entities should always be extracted with an ucs2 encoding */ - if (NW_DOM_AttrVal_getType(&av) == NW_DOM_ATTR_VAL_ENTITY) { - encoding = HTTP_iso_10646_ucs_2; - } - - /* get the next value as a string using the document's encoding */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_DOM_AttrVal_toString (&av, &nativeText, encoding))); - - /* convert the value to a newly malloc'ed ucs2 string*/ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_String_stringToUCS2Char (&nativeText, encoding, &ucs2String))); - NW_String_deleteStorage (&nativeText); - - /* if this item is a wbxml variable get the value -- we will append it instead */ - if(NW_DOM_AttrVal_getType (&av) == NW_DOM_ATTR_VAL_EXTENSION) { - NW_Ucs2* varName; - NW_String_t tmpStr; - NW_Uint16 token; - - token = NW_DOM_AttrVal_getExtension (&av, &tmpStr); - - varName = ucs2String; - ucs2String = NW_HED_DomHelper_ResolveVariable (context, (NW_Uint16) (token & 0xFF), varName); - - NW_Str_Delete (varName); - } - - /* append the resolved string */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatUcs2String (value, ucs2String)); - - NW_Str_Delete (ucs2String); - ucs2String = NULL; - } - - if (value->storage == NULL) - status = KBrsrDomNoStringReturned; - else - status = KBrsrSuccess; - - return status; - -NW_CATCH_ERROR - NW_String_deleteStorage (value); - NW_String_deleteStorage (&nativeText); - - if (status != KBrsrOutOfMemory) { - status = KBrsrDomNoStringReturned; - } - - return status; -} - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- - return values: normal completion: - KBrsrSuccess if attribute found - KBrsrNotFound if attribute not found - - abnormal completion: - other code if critical error - ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_ResolveEntities (const NW_HED_EntitySet_t* entitySet, - const NW_Ucs2* origText, - NW_String_t* destString) -{ - NW_Ucs2* sourceWalker = NULL; - NW_Ucs2* entStart = NULL; - NW_Ucs2* entEnd = NULL; - NW_String_t tmpString; - NW_String_t entityName; - NW_Ucs2 entityChar; - NW_Bool done = NW_FALSE; - NW_Bool looseEntity = NW_FALSE; - NW_Bool resolve = NW_TRUE; - TBrowserStatusCode status = KBrsrDomNoStringReturned; - - if (!origText) - return status; - - /* Initialise destString to NULL */ - destString->length = 0; - destString->storage = NULL; - - /* Initialise sourceWalker to origText */ - sourceWalker = (NW_Ucs2*) origText; - - /* Itarate through sourceWalker to substitute all entities. Let us allow the loose - * entities. The loose entity means if semicolon (;) is missing at the end of entity. - * But, the loose entity is still verified that it formed with correct syntax and is - * found in the "entitySet" of xHTML. - */ - - while (!done) { - /* initialise entityChar */ - entityChar = 0; - - /* Find an entity */ - entStart = NW_Str_Strchr (sourceWalker, WAE_URL_AMP_CHAR); - if (entStart != NULL) { - entEnd = NW_Str_Strchr (entStart, WAE_URL_PARAM_CHAR); - } - - /* Append the rest to destSting, if there are no more entities */ - - if (entStart == NULL ) - { - if (destString->length) - { - tmpString.length = NW_Str_Strsize (sourceWalker); - tmpString.storage = (NW_Byte*) sourceWalker; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - } - - done = NW_TRUE; - continue; - } - - if(entEnd != NULL) - { - /* Validate the correct syntax entity */ - NW_ASSERT(entEnd > entStart); - entityName.length = (entEnd - entStart - 1); /* just to hold characters between & and ; */ - entityName.storage = (NW_Byte*) (entStart + 1); /* starting the char after & */ - } - else - { - /* Check for loose syntax */ - - looseEntity = NW_FALSE; - - for(entEnd=entStart+1; NW_Str_Isalnum(*entEnd) ;entEnd++) - { - /* do nothing */ - } - // in the case: src="http://a.com/leftwindow?OpenDocument&lang=en" - // although &lang is an entity in entityset defs; it shouldn't be recognized as entity here - if (entEnd && (entEnd[0] > 0x20)) - { - resolve = NW_FALSE; - } - - /* Check some thing is moved or not. */ - - if(entEnd > (entStart + 2) ) - { - entityName.length = (NW_Uint32) (entEnd - entStart) - 1; /* just to hold characters between & and non alphanumeric */ - - entityName.storage = (NW_Byte*) (entStart + 1); /* starting the char after & */ - looseEntity = NW_TRUE; - } - else - { - //Done - if (destString->length) - { - tmpString.length = NW_Str_Strsize (sourceWalker); - tmpString.storage = (NW_Byte*) sourceWalker; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - } - - done = NW_TRUE; - continue; - } - }//end else - - - - if (resolve) - { - NW_THROWIF_ERROR (status = ResolveEntity (entitySet, &entityName, &entityChar)); - } - - /* append the text before entity and the entity value to the destSting */ - if(entStart != sourceWalker) { - tmpString.length = (entStart - sourceWalker) * sizeof (NW_Ucs2); - tmpString.storage = (NW_Byte*) sourceWalker; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - } - - /* valid entity, copy entityChar, and set the sourceWalker to entEnd + 1 */ - if(entityChar) { - tmpString.length = sizeof (NW_Ucs2); - tmpString.storage = (NW_Byte*) &entityChar; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - - /* set the sourceWlaker to the next iteration */ - if(looseEntity == NW_FALSE) - { - sourceWalker = ++entEnd; /* skip ; char */ - } - else - { - sourceWalker = entEnd; //Already at next character so don't skip - } - - } - - /* invalid entity, copy &, and set the sourceWalker to entStart + 1 */ - else { - tmpString.length = sizeof (NW_Ucs2); - tmpString.storage = (NW_Byte*) entStart; - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (destString, &tmpString, HTTP_iso_10646_ucs_2)); - sourceWalker = ++entStart; /* skip & char of invalid entity */ - } - } - - return status; - -NW_CATCH_ERROR - NW_String_deleteStorage (destString); - if (status != KBrsrOutOfMemory) { - status = KBrsrDomNoStringReturned; - } - - return status; -} - - -/* ------------------------------------------------------------------------- - return values: normal completion: - KBrsrSuccess if attribute found - KBrsrNotFound if attribute not found - - abnormal completion: - other code if critical error - ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_GetAttributeValue (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attribute, - NW_String_t *value) -{ - TBrowserStatusCode status; - NW_String_t attrName; - NW_DOM_NodeType_t nodeType; - - NW_ASSERT (element != NULL); - NW_ASSERT (value != NULL); - - /* init the result string */ - value->storage = NULL; - value->length = 0; - NW_String_setUserOwnsStorage (value); - - attrName.storage = NULL; - attrName.length = 0; - - nodeType = NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element); - if ((nodeType != NW_DOM_PROCESSING_INSTRUCTION_NODE) - && (nodeType != NW_DOM_ELEMENT_NODE)) { - return KBrsrDomNodeTypeErr; - } - - /* get the attribute as a string */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_GetAttributeName (element, attribute, &attrName)); - - /* get the attribute value */ - status = NW_HED_DomHelper_GetAttributeValueHelper ((NW_DOM_ElementNode_t* ) element, &attrName, - domHelper->context, value); - - /* if after building the text it is null just throw an "exception" so we can clean up below */ - if (value->storage == NULL) { - status = KBrsrNotFound; - NW_THROW_ERROR (); - } - - /* perform plain-text variable and entity substitution as needed */ - if (domHelper->resolvePlainTextVariablesAndEntities == NW_TRUE) { - NW_String_t newValue; - - NW_Uint16 variableType = NW_WBXML_EXT_I_2; - if (attribute == HREF_ATTR) - { - variableType = NW_WBXML_EXT_I_0; - } - NW_THROWIF_ERROR (status = NW_HED_DomHelper_ResolveVariablesAndEntities (value, domHelper->entitySet, - domHelper->context, HTTP_iso_10646_ucs_2, &newValue, variableType)); - - NW_String_deleteStorage (value); - NW_String_initialize (value, newValue.storage, HTTP_iso_10646_ucs_2); - NW_String_setUserOwnsStorage (value); - } - - /* clean up and return the result */ - NW_String_deleteStorage (&attrName); - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (&attrName); - NW_String_deleteStorage (value); - - return status; -} - - -TBrowserStatusCode NW_HED_DomHelper_GetHTMLAttributeValue (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attributeToken, - NW_String_t *valueString) -{ - TBrowserStatusCode status; - NW_DOM_NodeType_t nodeType; - NW_DOM_AttributeHandle_t attributeHandle; - NW_DOM_AttrVal_t av; - NW_String_t str; - NW_Uint32 encoding; - - NW_ASSERT (element != NULL); - NW_ASSERT (valueString != NULL); - - /* init the result string */ - valueString->storage = NULL; - valueString->length = 0; - NW_String_setUserOwnsStorage (valueString); - - nodeType = NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element); - if ((nodeType != NW_DOM_PROCESSING_INSTRUCTION_NODE) - && (nodeType != NW_DOM_ELEMENT_NODE)) { - return KBrsrDomNodeTypeErr; - } - - status = StatusCodeConvert(NW_DOM_ElementNode_getAttributeHandleByToken((NW_DOM_Node_t*)element, attributeToken, &attributeHandle)); - if (status != KBrsrSuccess){ - return status; - } - encoding = NW_DOM_AttributeHandle_getEncoding(&attributeHandle); - - while (NW_DOM_AttributeHandle_getNextVal(&attributeHandle, &av) == NW_STAT_WBXML_ITERATE_MORE) - { - status = StatusCodeConvert(NW_DOM_AttrVal_toString(&av, &str, encoding)); - if (status != KBrsrSuccess) - return KBrsrDomNoStringReturned; - - if ((valueString->length == 0) || (valueString->storage == NULL)){ - status = StatusCodeConvert(NW_String_deepCopy(valueString, &str)); - } - else{ - status = StatusCodeConvert(NW_String_concatenate(valueString, &str, encoding)); - } - NW_String_deleteStorage(&str); - if (status == KBrsrOutOfMemory) - { - return KBrsrOutOfMemory; - } - if (status != KBrsrSuccess) - { - return KBrsrDomNoStringReturned; - } - } - - /* if after building the text it is null just throw an "exception" so we can clean up below */ -/* - if (valueString->storage == NULL) { - status = KBrsrNotFound; - NW_THROW_ERROR (); - } -*/ - /* perform plain-text variable and entity substitution as needed */ - if (domHelper->resolvePlainTextVariablesAndEntities == NW_TRUE) { - NW_String_t newValue; - - NW_THROWIF_ERROR (status = NW_HED_DomHelper_ResolveVariablesAndEntities (valueString, domHelper->entitySet, - domHelper->context, encoding, &newValue, NW_WBXML_EXT_I_2)); - NW_String_deleteStorage (valueString); - NW_String_initialize (valueString, newValue.storage, HTTP_iso_10646_ucs_2); - NW_String_setUserOwnsStorage (valueString); - } - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (valueString); - - return status; -} - -/* ------------------------------------------------------------------------- - return values: normal completion: - KBrsrSuccess if text found - KBrsrFailure if text == NULL - - abnormal completion: - other code if critical error - ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_GetText (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Bool forceUcs2Copy, - NW_String_t* value, - NW_Uint32* valueEncoding) - { - TBrowserStatusCode status; - NW_String_t text; - NW_Uint32 encoding = 0; - - NW_ASSERT (domHelper != NULL); - NW_ASSERT (element != NULL); - NW_ASSERT (value != NULL); - - /* init value */ - NW_String_initialize (&text, NULL, 0); - - /* - ** try to extracts the text from the element without copying the - ** original data from the DOM. Because we must copy the text to resolve - ** variables and entities this function returns with a failure if - ** it contains them. - */ - if (forceUcs2Copy == NW_FALSE) { - status = NW_HED_DomHelper_GetText_NoResolve (domHelper, element, - &text, &encoding); - } - else { - /* set status to KBrsrUnexpectedError so the next block will execute */ - status = KBrsrUnexpectedError; - } - - /* - ** if the above fails use the more sophisicated GetText_Resolve function - ** to extract the text. This function on success always returns a ucs2 - ** encoded copy of the text. - */ - if (status != KBrsrSuccess) { - encoding = HTTP_iso_10646_ucs_2; - status = NW_HED_DomHelper_GetText_Resolve (domHelper, element, &text); - } - - if (status == KBrsrSuccess) - { - if (valueEncoding != NULL) - { - *valueEncoding = encoding; - } - - // Force copy of the string - if (NW_String_getUserOwnsStorage(&text)) - { - NW_String_shallowCopy(value, &text); - } - else - { - status = NW_String_deepCopy(value, &text); - } - } - - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_GetChildText (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_String_t* value) -{ - TBrowserStatusCode status = KBrsrOutOfMemory; - NW_cXML_DOM_DOMVisitor_t* visitor = NULL; - NW_DOM_Node_t* textNode = NULL; - NW_String_t text; - - NW_ASSERT (domHelper != NULL); - NW_ASSERT (element != NULL); - NW_ASSERT (value != NULL); - - /* init the string */ - NW_String_initialize (value, NULL, 0); - NW_String_setUserOwnsStorage (value); - - NW_String_initialize (&text, NULL, 0); - - /* create a dom visitor to extract text nodes */ - NW_THROWIF_NULL (visitor = NW_cXML_DOM_DOMVisitor_New ((NW_DOM_Node_t*) element)); - - /* while there are text nodes */ - while ((textNode = NW_cXML_DOM_DOMVisitor_Next (visitor, NW_DOM_TEXT_NODE)) != NULL) { - NW_Uint32 encoding; - - /* get the text */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_GetText (domHelper, textNode, - NW_TRUE, &text, &encoding)) - - /* append the text */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (value, &text, encoding)); - - /* discard the text */ - NW_String_deleteStorage (&text); - } - - NW_Object_Delete (visitor); - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (value); - NW_String_deleteStorage (&text); - NW_Object_Delete (visitor); - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_HED_DomHelper_AttributeEquals (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* element, - NW_Uint16 attribute, - const NW_String_t* value) -{ - NW_Bool match = NW_FALSE; - NW_String_t attrValue; - - attrValue.storage = NULL; - - /* get the attribute as a ucs2 encoded string */ - if (NW_HED_DomHelper_GetAttributeValue (domHelper, element, attribute, &attrValue) == KBrsrSuccess) { - match = (NW_Bool) NW_String_equals (value, &attrValue); - } - - NW_String_deleteStorage (&attrValue); - - return match; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_HED_DomHelper_IsMatch (const NW_HED_DomHelper_t* domHelper, - NW_DOM_Node_t* element, - NW_Uint16 elementType, - NW_Uint16 attribute, - const NW_String_t* attributeMatchString) -{ - NW_Bool match = NW_TRUE; - - /* this is false if the types don't match */ - if (NW_HED_DomHelper_GetElementToken (element) != elementType) { - match = NW_FALSE; - } - - /* does the element have an attribute with the given value */ - else if (attributeMatchString != NULL) { - match = NW_HED_DomHelper_AttributeEquals (domHelper, element, attribute, attributeMatchString); - } - - return match; -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* NW_HED_DomHelper_FindElement (const NW_HED_DomHelper_t* domHelper, - NW_DOM_Node_t* rootNode, - NW_Int32 maxSearchDepth, - NW_Uint16 elementType, - NW_Uint16 attribute, - const NW_String_t* attributeMatchString) -{ - NW_DOM_Node_t* childNode; - NW_DOM_Node_t* descendantNode; - - /* does the root-node meet our criteria */ - if (NW_HED_DomHelper_IsMatch (domHelper, rootNode, elementType, attribute, attributeMatchString)) { - return rootNode; - } - - if (maxSearchDepth == 0) { - return NULL; - } - - /* does one of the children meet our criteria */ - for (childNode = NW_DOM_Node_getFirstChild (rootNode); childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) { - - if (NW_HED_DomHelper_IsMatch (domHelper, childNode, elementType, attribute, attributeMatchString)) { - return childNode; - } - } - - /* does one of the children's ancestors meet our criteria */ - for (childNode = NW_DOM_Node_getFirstChild (rootNode); childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) { - - descendantNode = NW_HED_DomHelper_FindElement (domHelper, childNode, maxSearchDepth - 1, - elementType, attribute, attributeMatchString); - - if (descendantNode != NULL) { - return descendantNode; - } - } - - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 NW_HED_DomHelper_GetEncoding (const NW_DOM_Node_t* element) -{ - NW_DOM_DocumentNode_t *docNode; - - docNode = NW_DOM_Node_getOwnerDocument ((NW_DOM_Node_t*) element); - - return NW_DOM_DocumentNode_getCharacterEncoding (docNode); -} - -/* ------------------------------------------------------------------------- */ -NW_WBXML_Dictionary_t* NW_HED_DomHelper_GetDictionary (const NW_DOM_Node_t* element) -{ - NW_DOM_DocumentNode_t *docNode; - - docNode = NW_DOM_Node_getOwnerDocument ((NW_DOM_Node_t*) element); - - return NW_DOM_DocumentNode_getDictionary (docNode); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_GetAttributeName (const NW_DOM_Node_t* element, - NW_Uint16 attribute, - NW_String_t *name) -{ - TBrowserStatusCode status; - NW_String_UCS2Buff_t* ucs2Buff; - - NW_ASSERT (element != NULL); - NW_ASSERT (name != NULL); - - ucs2Buff = NW_WBXML_Dictionary_getAttributeNameByToken (NW_HED_DomHelper_GetDictionary (element), - attribute); - - if (ucs2Buff != NULL) { - status = StatusCodeConvert(NW_String_UCS2BuffToString (ucs2Buff, name, HTTP_iso_10646_ucs_2)); - } - else { - status = KBrsrFailure; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -NW_Uint16 NW_HED_DomHelper_GetElementToken (const NW_DOM_Node_t* element) - { - NW_Uint16 token; - - // Try to gracefully continue without crashing. - if (!element) - { - return 0; - } - - /* get the basic token */ - token = NW_DOM_Node_getNodeToken ((NW_DOM_Node_t *) element); - - - /* If it is Literal then there is no corresponding token in the Dictionary. - * Return this as "zzzunknown" token. - */ - - if (token == NW_WBXML_LITERAL) - { - token = NW_XHTML_ElementToken_zzzunknown; - } - - return token; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_GetElementName (const NW_DOM_Node_t* element, - NW_String_t* name) -{ - TBrowserStatusCode status; - NW_String_t temp; - - if (NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element) != NW_DOM_ELEMENT_NODE) { - return KBrsrFailure; - } - - NW_String_initialize (&temp, NULL, 0); - NW_String_initialize (name, NULL, 0); - - /* get the element's name */ - NW_THROWIF_ERROR (status = StatusCodeConvert(NW_DOM_ElementNode_getTagName((NW_DOM_Node_t*) element, &temp))); - - /* convert it to ucs2 */ - NW_THROWIF_ERROR (status = NW_HED_DomHelper_CatString (name, - &temp, NW_HED_DomHelper_GetEncoding (element))); - - NW_String_deleteStorage (&temp); - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (&temp); - NW_String_deleteStorage (name); - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_PrintTree (const NW_HED_DomHelper_t* domHelper, - const NW_DOM_Node_t* rootNode) -{ - TBrowserStatusCode status = KBrsrOutOfMemory; - NW_cXML_DOM_DOMVisitor_t* visitor = NULL; - NW_DOM_Node_t* domNode; - NW_DOM_NodeType_t domType; - NW_String_t nodeName; - NW_Ucs2* name = NULL; - NW_Ucs2* type = NULL; - NW_DOM_Node_t* parentNode = NULL; - - if (parentNode) {} //fix warning - - NW_ASSERT (domHelper != NULL); - NW_ASSERT (rootNode != NULL); - - NW_String_initialize (&nodeName, NULL, 0); - - NW_LOG0(NW_LOG_LEVEL3, "\n\n** Print DOM Tree **"); - - /* create a dom visitor */ - NW_THROWIF_NULL (visitor = NW_cXML_DOM_DOMVisitor_New ((NW_DOM_Node_t*) rootNode)); - - /* print the tree */ - while ((domNode = NW_cXML_DOM_DOMVisitor_Next (visitor, /*NW_DOM_ELEMENT_NODE | - NW_DOM_TEXT_NODE*/ 255)) != NULL) { - - domType = NW_DOM_Node_getNodeType (domNode); - - /* if it is a text-node extract the text */ - if (domType == NW_DOM_TEXT_NODE) { - NW_Uint16 i; - - status = NW_HED_DomHelper_GetText (domHelper, - domNode, NW_TRUE, &nodeName, NULL); - name = ((NW_Ucs2 *) nodeName.storage); - - /* trunc the string */ - if (NW_Str_Strlen (name) > 10) { - name[9] = '\0'; - } - - /* remove /r & /n */ - for (i = 0; i < NW_Str_Strlen (name); i++) { - if ((name[i] == '\r') || (name[i] == '\n')) { - name[i] = ' '; - } - } - } - - /* otherwise get the element's name */ - else { - status = NW_HED_DomHelper_GetElementName (domNode, &nodeName); - if (status == KBrsrSuccess) - name = ((NW_Ucs2 *) nodeName.storage); - } - - switch (domType) { - case 1: - type = NW_Str_NewcpyConst("tag"); break; - case 2: - type = NW_Str_NewcpyConst("text"); break; - case 4: - type = NW_Str_NewcpyConst("cdata"); break; - case 8: - type = NW_Str_NewcpyConst("pi"); break; - case 16: - type = NW_Str_NewcpyConst("comment"); break; - case 32: - type = NW_Str_NewcpyConst("doc"); break; - default: - type = NW_Str_NewcpyConst("unknown"); break; - } - - /* log it and clean up */ - parentNode = NW_DOM_Node_getParentNode(domNode) ; - if (name) - { - NW_LOG7(NW_LOG_LEVEL3, "Node: %x, type %s, name: %s, Offset:%x, first_child:%x, next_sib:%x, parent: %x", - domNode, type, name, domNode->source_offset, domNode->first_child, domNode->next_sibling, parentNode); - NW_String_deleteStorage (&nodeName); - }else - { - NW_LOG6(NW_LOG_LEVEL3, "Node: %x, type %s, Offset: %x, first_child:%x, next_sib:%x, parent: %x", - domNode, type, domNode->source_offset, domNode->first_child, domNode->next_sibling, parentNode); - } - NW_Str_Delete(type); - } - NW_Object_Delete (visitor); - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_String_deleteStorage (&nodeName); - NW_Object_Delete (visitor); - NW_Str_Delete(type); - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_CatString (NW_String_t* destString, - const NW_String_t* srcString, - NW_Uint32 encoding) -{ - TBrowserStatusCode status; - NW_String_t src; - NW_Bool deleteStorage = NW_FALSE; - - NW_ASSERT (destString != NULL); - NW_ASSERT (srcString != NULL); - - if (srcString->storage == NULL) { - return KBrsrSuccess; - } - - /* if encoding is not ucs2 convert it to ucs2 before appendding it */ - if (encoding != HTTP_iso_10646_ucs_2) { - NW_Ucs2* ucs2String; - - if ((status = StatusCodeConvert(NW_String_stringToUCS2Char (srcString, encoding, &ucs2String))) == KBrsrSuccess) { - NW_String_initialize (&src, (void *) ucs2String, HTTP_iso_10646_ucs_2); - NW_String_setUserOwnsStorage (&src); - - deleteStorage = NW_TRUE; - } - else { - return status; - } - } - else { - NW_String_shallowCopy(&src, (NW_String_t *) srcString); - } - - /* append the string, copy it if destString is empty */ - if ((destString->length == 0) || (destString->storage == NULL)){ - status = StatusCodeConvert(NW_String_deepCopy (destString, &src)); - } - else { - status = StatusCodeConvert(NW_String_concatenate (destString, &src, HTTP_iso_10646_ucs_2)); - } - - /* delete the ucs2 version */ - if (deleteStorage == NW_TRUE) { - NW_String_deleteStorage (&src); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomHelper_CatUcs2String (NW_String_t* destString, - const NW_Ucs2* srcString) -{ - TBrowserStatusCode status; - NW_String_t src; - - if ((status = StatusCodeConvert(NW_String_initialize (&src, (void *) srcString, HTTP_iso_10646_ucs_2))) == KBrsrSuccess) { - status = NW_HED_DomHelper_CatString (destString, &src, HTTP_iso_10646_ucs_2); - } - - return status; -} - - -/* ------------------------------------------------------------------------- */ -// the function returns TBrowserStatusCode KBrsrSuccess- Attribute is found. -// KBrsrNotFound - Attribute is not found. -// KBrsrDomNodeTypeErr - not a DOM node -// if the attributeToken exists on a element - -TBrowserStatusCode NW_HED_DomHelper_HasAttribute(const NW_DOM_Node_t* element, - NW_Uint16 attributeToken) - { - TBrowserStatusCode status; - NW_DOM_NodeType_t nodeType; - NW_DOM_AttributeHandle_t attributeHandle; - - nodeType = NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) element); - if ((nodeType != NW_DOM_PROCESSING_INSTRUCTION_NODE) - && (nodeType != NW_DOM_ELEMENT_NODE)) { - return KBrsrDomNodeTypeErr; - } - status = StatusCodeConvert(NW_DOM_ElementNode_getAttributeHandleByToken((NW_DOM_Node_t*)element, attributeToken, &attributeHandle)); - return status; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/DomTree.c --- a/webengine/wmlengine/src/hed/src/DomTree.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_domtree.h" -#include "nw_tinydom_utils.h" -#include "nw_object_exceptions.h" -#include "nwx_statuscodeconvert.h" -//#include "Nw_string_string.h" - -struct NW_HED_DomTree_s { - Parser_t domParser; - NW_Buffer_t* domBuffer; -}; - -/* - * - * - * - */ - -static TBrowserStatusCode -NW_HED_Write_WBXML_StrTbl(Parser_t *p, void* WBXMLEncStrTbl) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint32 stringTableByteCount = 0; - NW_Encoder_StringTableIterator_t strTableIterator; - NW_Status_t s = NW_STAT_FAILURE; - NW_Uint8* pLiteralBuf; - NW_String_t pLiteralStr; - NW_Uint32 docTableIndex; - NW_Encoder_StringTable_t* strTable = NULL; - NW_WBXML_Document_t* doc = &(p->document); - - - - - strTable = (NW_Encoder_StringTable_t*) WBXMLEncStrTbl; - - stringTableByteCount = NW_Encoder_StringTable_getTotalBytes(strTable); - - - if(stringTableByteCount > 0) - { - /*The following function always return success so why bother to check? */ - - NW_Encoder_StringTable_StringTableIterateInit(WBXMLEncStrTbl,&strTableIterator); - - - s = NW_Encoder_StringTable_StringTableIterateNext - (&strTableIterator,&stringTableByteCount,&pLiteralBuf); - - while(s == NW_STAT_WBXML_ITERATE_MORE) - { - - pLiteralStr.length = stringTableByteCount; - pLiteralStr.storage = pLiteralBuf; - - status = StatusCodeConvert( NW_WBXML_Document_putTableString( - doc,&pLiteralStr,&docTableIndex) ); - - if(status != KBrsrSuccess) - { - break; - } - - //Just a sanity check - - /* - if(WBXMLwriterPrevIndex != docTableIndex) - { - status = KBrsrFailure; - break; - } - - WBXMLwriterPrevIndex += pLiteralStr.length; - */ - - - s = NW_Encoder_StringTable_StringTableIterateNext - (&strTableIterator,&stringTableByteCount,&pLiteralBuf) ; - - }//end while - - }//end if(stringTableByteCount > 0) - - //Delete the tree - - NW_Encoder_StringTable_delete(WBXMLEncStrTbl); - WBXMLEncStrTbl = NULL; - return status; -}//end NW_HED_Write_WBXML_StrTbl() - -/* ------------------------------------------------------------------------- */ -NW_HED_DomTree_t* NW_HED_DomTree_New (NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Uint32 defaultPublicId, - void* WBXMLEncStrTbl) -{ - NW_HED_DomTree_t* domTree; - - NW_ASSERT(domBuffer != NULL); - NW_REQUIRED_PARAM(charset); - - NW_TRY(status) { - /* create the dom-tree */ - domTree = (NW_HED_DomTree_t*) NW_Mem_Malloc(sizeof(NW_HED_DomTree_t)); - NW_THROW_OOM_ON_NULL(domTree, status); - NW_Mem_memset(domTree, 0, sizeof(NW_HED_DomTree_t)); - - /* init the parser */ - status = StatusCodeConvert(NW_TinyDom_ParserInitialize(&domTree->domParser, NULL, - 0, defaultPublicId)); - NW_THROW_ON_ERROR(status); - - /*If the WBXML encoder table is present then write these contents to - * extension table. - */ - - if(WBXMLEncStrTbl) - { - status = NW_HED_Write_WBXML_StrTbl(&domTree->domParser, WBXMLEncStrTbl); - NW_THROW_ON_ERROR(status); - }//end if(WBXMLEncStrTbl) - - /* build the dom-tree */ - status = StatusCodeConvert(NW_TinyDom_MakeDOMTree(&domTree->domParser, - domBuffer->data, domBuffer->length, NULL)); - NW_THROW_ON_ERROR(status); - domTree->domBuffer = domBuffer; - } - NW_CATCH(status) { - if (domTree != NULL) { - NW_TinyDom_ParserDelete(&domTree->domParser); - } - NW_Mem_Free(domTree); - NW_Buffer_Free(domBuffer); - domTree = NULL; - } - NW_FINALLY { - return domTree; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_HED_DomTree_Append (NW_HED_DomTree_t** ppDomTree, - NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Uint32 defaultPublicId, - NW_Uint32 cp_count, - NW_Int32 lastValid, - void* WBXMLEncStrTbl) -{ - NW_HED_DomTree_t* domTree; - - NW_ASSERT(domBuffer != NULL); - NW_ASSERT(ppDomTree != NULL); - NW_REQUIRED_PARAM(charset); - - domTree = *ppDomTree; - - NW_TRY(status) { - if (domTree == NULL) - { - /* create the dom-tree */ - domTree = (NW_HED_DomTree_t*) NW_Mem_Malloc(sizeof(NW_HED_DomTree_t)); - NW_THROW_OOM_ON_NULL(domTree, status); - NW_Mem_memset(domTree, 0, sizeof(NW_HED_DomTree_t)); - - /* init the parser */ - status = StatusCodeConvert(NW_TinyDom_ParserInitialize(&domTree->domParser, NULL, - 0, defaultPublicId)); - NW_THROW_ON_ERROR(status); - - } - - /*If the WBXML encoder table is present then write these contents to - * extension table. - */ - - if(WBXMLEncStrTbl) - { - status = NW_HED_Write_WBXML_StrTbl(&domTree->domParser,WBXMLEncStrTbl); - NW_THROW_ON_ERROR(status); - }//end if(WBXMLEncStrTbl) - - /* build the dom-tree */ - - status = StatusCodeConvert(NW_TinyDom_AppendDOMTree(&domTree->domParser, - domBuffer->data, domBuffer->length, cp_count, lastValid, NULL)); - NW_THROW_ON_ERROR(status); - if (domTree->domBuffer != domBuffer) - { - NW_Buffer_Free(domTree->domBuffer); - } - domTree->domBuffer = domBuffer; - *ppDomTree = domTree; - } - NW_CATCH(status) { - if (domTree != NULL) { - NW_TinyDom_ParserDelete(&domTree->domParser); - } - NW_Mem_Free(domTree); - NW_Buffer_Free(domBuffer); - domTree = NULL; - *ppDomTree = domTree; - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -void NW_HED_DomTree_Delete (NW_HED_DomTree_t* thisObj) -{ - if (thisObj != NULL) { - NW_TinyDom_ParserDelete(&thisObj->domParser); - - if (thisObj->domBuffer != NULL) { - NW_Buffer_Free (thisObj->domBuffer); - } - - NW_Mem_Free (thisObj); - } -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* NW_HED_DomTree_GetRootNode (const NW_HED_DomTree_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return thisObj->domParser.tinyParser.dom_tree->root_node; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 NW_HED_DomTree_GetPublicId (const NW_HED_DomTree_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return NW_DOM_DocumentNode_getPublicIdAsNumber ( - NW_HED_DomTree_GetRootNode (thisObj)); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 NW_HED_DomTree_GetVersion (const NW_HED_DomTree_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return NW_DOM_DocumentNode_getVersion ( - NW_HED_DomTree_GetRootNode (thisObj)); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 NW_HED_DomTree_GetCharEncoding (const NW_HED_DomTree_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return NW_DOM_DocumentNode_getCharacterEncoding ( - NW_HED_DomTree_GetRootNode (thisObj)); -} - -/* ------------------------------------------------------------------------- */ -NW_Buffer_t* NW_HED_DomTree_GetDomBuffer (const NW_HED_DomTree_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return thisObj->domBuffer; -} - -/* ------------------------------------------------------------------------- */ -NW_Buffer_t* NW_HED_DomTree_OrphanDomBuffer (NW_HED_DomTree_t* thisObj) -{ - NW_Buffer_t* buff; - - NW_ASSERT (thisObj != NULL); - - buff = thisObj->domBuffer; - thisObj->domBuffer = NULL; - - return buff; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/EntitySet.c --- a/webengine/wmlengine/src/hed/src/EntitySet.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_entityseti.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_EntitySet_Class_t NW_HED_EntitySet_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Base_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_HED_EntitySet */ - /* numEntries */ 0, - /* numCaseInsensitiveEntries */ 0, - /* entries */ NULL, - /* getEntityChar */ _NW_HED_EntitySet_GetEntityChar - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Ucs2 -_NW_HED_EntitySet_GetEntityChar (const NW_HED_EntitySet_t* entitySet, - NW_Ucs2 *name) -{ - NW_Int32 index; - const NW_HED_EntitySet_Entry_t* entry; - - /* First do a binary search search in the case sensitive part of the array */ - NW_Int32 low = 0; - NW_Int32 high = NW_HED_EntitySet_GetClassPart(entitySet).numEntries - - NW_HED_EntitySet_GetClassPart(entitySet).numCaseInsensitiveEntries - 1; - NW_Int32 res = 0; - - while (low <= high ) { - index = (high + low) / 2; - entry = & (NW_HED_EntitySet_GetClassPart(entitySet).entries[index]); - - /* do a case sensitive string comparison */ - res = NW_Str_StrcmpConst( name, entry->name ); - - if ( res > 0 ) { - /* name is ahead of this slot. Increase low bound. */ - low = index + 1; - } else if ( res < 0 ) { - /* name is behind this slot. Decrease high bound. */ - high = index - 1; - } else { - /* Found the entity name. Return its value. */ - return entry->value; - } - } - - /* if no match was found search in the case insensitive part of the table. */ - low = NW_HED_EntitySet_GetClassPart(entitySet).numEntries - - NW_HED_EntitySet_GetClassPart(entitySet).numCaseInsensitiveEntries; - high = NW_HED_EntitySet_GetClassPart(entitySet).numEntries - 1; - res = 0; - while (low <= high ) { - index = (high + low) / 2; - entry = & (NW_HED_EntitySet_GetClassPart(entitySet).entries[index]); - - // do a case insensitive string comparison - res = NW_Str_StricmpConst( name, entry->name ); - - if ( res > 0 ) { - /* name is ahead of this slot. Increase low bound. */ - low = index + 1; - } else if ( res < 0 ) { - /* name is behind this slot. Decrease high bound. */ - high = index - 1; - } else { - /* Found the entity name. Return its value. */ - return entry->value; - } - } - - /* if no match were found we return 0 */ - return 0; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDCompositeContentHandler.cpp --- a/webengine/wmlengine/src/hed/src/HEDCompositeContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1391 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_compositecontenthandleri.h" -#include "nw_hed_documentroot.h" -#include "nw_system_optionlist.h" -#include "nw_image_epoc32simpleimage.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nwx_multipart_generator.h" -#include "nw_image_epoc32cannedimage.h" -#include "nw_image_cannedimages.h" -#include "HEDDocumentListener.h" -#include "nw_lmgr_rootbox.h" -#include "nw_image_virtualimage.h" -#include "BrsrStatusCodes.h" -#include "nwx_settings.h" -#include <nwx_http_defs.h> -#include "StringUtils.h" -#include "TEncodingMapping.h" -#include "bodypart.h" -#include "MemoryManager.h" - - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_CompositeContentHandler_Class_t NW_HED_CompositeContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_HED_CompositeContentHandler_SecondaryList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_CompositeContentHandler_t), - /* construct */ _NW_HED_CompositeContentHandler_Construct, - /* destruct */ _NW_HED_CompositeContentHandler_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_HED_CompositeContentHandler_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_HED_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_HED_ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_HED_CompositeContentHandler_Suspend, - /* resume */ _NW_HED_CompositeContentHandler_Resume, - /* allLoadsCompleted */ _NW_HED_CompositeContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_HED_CompositeContentHandler_LoseFocus, - /* gainFocus */ _NW_HED_CompositeContentHandler_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_HED_ContentHandler_PartialNextChunk, - /* getTitle */ NULL, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ NULL, - /* handleRequest */ _NW_HED_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_HED_CompositeContentHandler */ - /* documentDisplayed */ _NW_HED_CompositeContentHandler_DocumentDisplayed - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Object_Class_t* const NW_HED_CompositeContentHandler_SecondaryList[] = { - &NW_HED_CompositeContentHandler_CompositeNode_Class, - NULL, -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_CompositeNode_Class_t NW_HED_CompositeContentHandler_CompositeNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_CompositeNode_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_HED_CompositeContentHandler_t, - NW_HED_CompositeNode) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NULL, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_HED_CompositeNode */ - /* addChild */ _NW_HED_CompositeContentHandler_CompositeNode_AddChild - } -}; - -/* ------------------------------------------------------------------------- */ -static NW_Int32 NW_HED_CompositeContentHandler_FindCharset(NW_Uint8* charset, NW_Uint32 charsetLength) -{ - NW_Uint32 i = 0; - NW_Ucs2* supportedCharStr = NULL; - - for (; supportedCharset[i].charset != NULL; i++) - { - supportedCharStr = NW_Asc_toUcs2((char*)supportedCharset[i].charset); - if (charsetLength == NW_Str_Strlen(supportedCharStr)*sizeof(NW_Ucs2) && - NW_Byte_Strnicmp((const NW_Byte*)supportedCharStr, (const NW_Byte*)charset, charsetLength) == 0) - { - NW_Str_Delete(supportedCharStr); - return i; - } - NW_Str_Delete(supportedCharStr); - } - return -1; -} - -NW_Int16 NW_HED_CompositeContentHandler_Encoding(NW_Uint8* charset, NW_Uint32 charsetLength) - { - NW_Int16 encoding = 0; - NW_Ucs2* supportedCharStr = NULL; - StringUtils::ConvertPtrAsciiToUcs2(TPtrC8(charset, charsetLength), &supportedCharStr); - NW_Int32 index = NW_HED_CompositeContentHandler_FindCharset((NW_Byte*)supportedCharStr, charsetLength * sizeof(NW_Ucs2)); - if (index != -1 ) - { - encoding = supportedCharset[index].ianaEncoding ; - } - delete supportedCharStr; - return encoding; - } - -NW_Int32 NW_HED_CompositeContentHandler_GetCharsetString(NW_Uint16 aCharset, - const NW_Uint8** aCharsetString) - { - TUint i = 0; - - for (; supportedCharset[i].charset != NULL; i++) - { - if (supportedCharset[i].ianaEncoding == aCharset) - { - *aCharsetString = supportedCharset[i].charset; - return KErrNone; - } - } - return KErrArgument; - } - -static NW_Int32 NW_HED_CompositeContentHandler_FindCharsetFromInternalEncoding(NW_Uint16 internalEncoding) -{ - NW_Uint32 i = 0; - - // First check if "automatic" encoding mode set on phone, if so return -1. This is - // needed to allow the follow on code to determine the encoding from the response. - if (internalEncoding == EAutomatic) - { - return -1; - } - - // If not "automatic" encoding, get the charset encoding that is set on phone - for (; supportedCharset[i].charset != NULL; i++) - { - if (supportedCharset[i].internalEncoding == internalEncoding) - { - return i; - } - } - return -1; -} - -static NW_Int32 NW_HED_CompositeContentHandler_FindCharsetFromIanaEncoding(NW_Uint16 ianaEncoding) -{ - NW_Uint32 i = 0; - for (; supportedCharset[i].charset != NULL; i++) - { - if (supportedCharset[i].ianaEncoding == ianaEncoding) - { - return i; - } - } - return -1; -} - - -/* ------------------------------------------------------------------------- * - NW_HED_DocumentNode methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_HED_CompositeContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) - { - NW_HED_CompositeContentHandler_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_HED_ContentHandler_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) - { - return status; - } - - thisObj->iMultipart = EFalse; - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -void -_NW_HED_CompositeContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject) - { - NW_HED_CompositeContentHandler_t* thisObj; - - /* cast the 'object' for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (dynamicObject); - - - // multipart related cleanup - if( thisObj->iMultipart ) - { - // Free original body - NW_Buffer_Free( thisObj->iOldResponseBody ); - - // clean up body part array and its content - TInt size = thisObj->iBodyPartArray.Count(); - TInt i; - for (i = 0; i < size; i++) - { - delete thisObj->iBodyPartArray[i]; - } - thisObj->iBodyPartArray.Reset(); - } - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - (void) NW_HED_DocumentNode_Cancel (childNode, cancelType); - } - } - - /* invoke our superclass */ - status = NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - cancel (documentNode, cancelType); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - NW_HED_DocumentNode_Suspend (childNode, aDestroyBoxTree); - } - } - - /* invoke our superclass */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - suspend (documentNode, aDestroyBoxTree); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeContentHandler_Resume (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - NW_HED_DocumentNode_Resume (childNode); - } - } - - /* invoke our superclass */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - resume (documentNode); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - NW_HED_DocumentNode_AllLoadsCompleted (childNode); - } - } - - /* invoke our superclass */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - allLoadsCompleted (documentNode); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - NW_HED_DocumentNode_LoseFocus (childNode); - } - } - - /* invoke our superclass */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - loseFocus (documentNode); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_CompositeContentHandler_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeContentHandlerOf (documentNode); - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* invoke the child method */ - NW_HED_DocumentNode_GainFocus (childNode); - } - } - - /* invoke our superclass */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode. - gainFocus (documentNode); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_DetachChildren (NW_HED_CompositeContentHandler_t* thisObj) -{ - NW_HED_CompositeNode_t* compositeNode; - NW_ADT_Iterator_t* iterator = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_HED_CompositeContentHandler_Class)); - - /* for convenience */ - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - NW_TRY (status) { - NW_HED_DocumentNode_t* childNode; - - /* create the child iterator */ - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iterator); - if (status == KBrsrNotFound) { - NW_THROW_SUCCESS (status); - } - NW_THROW_ON_ERROR (status); - - /* iterate through the children */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* detach the child */ - if (NW_HED_ContentHandlerOf (childNode)->boxTree != NULL) { - (void) NW_LMgr_Box_Detach (NW_HED_ContentHandlerOf (childNode)->boxTree); - } - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Delete (iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_DocumentDisplayed (NW_HED_ContentHandler_t* thisObj) -{ - NW_REQUIRED_PARAM(thisObj); - - /* Default implementation does nothing. */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -static -NW_Bool -_NW_HED_CompositeContentHandler_DetectEncoding(NW_Buffer_t* pInBuf, - NW_Uint16* encoding, - NW_Uint8* byteOrder) -{ - /* - The goal here is to permit the content author to do something - which is within current specifications and can be depended on to - work. - - Despite of the charset in response header, we apply the following - constraint to determine the charset: - - Content authors must place a byte order mark (BOM) at the - beginning of the document only if the encoding is UCS-2 or UTF-8. - - If the first bytes are: - 0xFE 0xFF ## ## (big endian) or 0xFF 0xFE ## ## (little endian), where the - two ## bytes are not both zero then the encoding is UCS-2. - (UCS-2 is roughly a subset of UTF-16 in our use, aka Unicode) - - 0xEF 0xBB 0xBF then the encoding is UTF-8 - - otherwise the encoding is left as Latin-1. - - Differentiating ASCII from Latin-1 is never an issue because it is - a subset of Latin-1 which is the default. - - You can find a discussion of this type of encoding detection at - http://www.w3.org/TR/2000/REC-xml-20001006#sec-guessing - */ - - *byteOrder = NW_BYTEORDER_SINGLE_BYTE; - - if ((pInBuf == NULL) || (pInBuf->data == NULL)) - { - return NW_FALSE; - } - - if (pInBuf->length >= 3) - { - if (((pInBuf->data)[0] == 0xef) - && ((pInBuf->data)[1] == 0xbb) - && ((pInBuf->data)[2] == 0xbf)) - { - *encoding = HTTP_utf_8; - *byteOrder = NW_BYTEORDER_SINGLE_BYTE; - return NW_TRUE; - } - } - - if (pInBuf->length >= 4) - { - if (((pInBuf->data)[0] == 0xfe) && ((pInBuf->data)[1] == 0xff)) - { - *encoding = HTTP_iso_10646_ucs_2; - *byteOrder = NW_BYTEORDER_BIG_ENDIAN; - // The order is suppose to be big-endian but check to see if it looks - // like little-endian. - if (((pInBuf->data)[2] != 0) && ((pInBuf->data)[3] == 0)) - { - *byteOrder = NW_BYTEORDER_LITTLE_ENDIAN; - } - return NW_TRUE; - } - if (((pInBuf->data)[0] == 0xff) && ((pInBuf->data)[1] == 0xfe)) - { - *encoding = HTTP_iso_10646_ucs_2; - *byteOrder = NW_BYTEORDER_LITTLE_ENDIAN; - // The order is suppose to be little-endian but check to see if it looks - // like big-endian. - if (((pInBuf->data)[2] == 0) && ((pInBuf->data)[3] != 0)) - { - *byteOrder = NW_BYTEORDER_BIG_ENDIAN; - } - return NW_TRUE; - } - } - - // Special case: content authors write a ucs-2 document but do not place BOM - // at beginning of document. If first two chars (4 bytes) look like ucs-2 - // then set encoding to ucs-2 and check the byte-order. Note, this is not - // exact. It looks for zero bytes followed by non-zero bytes or vice-versa. - // It is highly probably that if these conditions are met then the contents - // are in fact ucs-2. However, it is theoretically possible for both of the - // first two chars to not have a zero-byte but still be ucs-2. If that were - // to occur this logic would not be able to determine that it is ucs-2 and - // would end up returning FALSE, indicating encoding not found. - if (pInBuf->length >= 4) - { - // Check to see if it looks like big-endian ucs-2. - if ((((pInBuf->data)[0] == 0) && ((pInBuf->data)[1] != 0)) && - (((pInBuf->data)[2] == 0) && ((pInBuf->data)[3] != 0))) - { - *encoding = HTTP_iso_10646_ucs_2; - *byteOrder = NW_BYTEORDER_BIG_ENDIAN; - return NW_TRUE; - } - // Check to see if it looks like little-endian ucs-2. - if ((((pInBuf->data)[0] != 0) && ((pInBuf->data)[1] == 0)) && - (((pInBuf->data)[2] != 0) && ((pInBuf->data)[3] == 0))) - { - *encoding = HTTP_iso_10646_ucs_2; - *byteOrder = NW_BYTEORDER_LITTLE_ENDIAN; - return NW_TRUE; - } - } - - return NW_FALSE; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_ConvertEncoding(NW_HED_CompositeContentHandler_t* thisObj, - NW_Uint32 foreignEncoding, - NW_Buffer_t* inBuf, - NW_Int32* numUnconvertible, - NW_Int32* indexFirstUnconvertible, - NW_Buffer_t** outBuf) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_DocumentRoot_t* docRoot; - NW_HED_AppServices_t* appServices; - - docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode(thisObj); - appServices = (NW_HED_AppServices_t *) NW_HED_DocumentRoot_GetAppServices(docRoot); - status = appServices->characterConversionAPI.convertFromForeignChunk(NW_HED_DocumentRoot_GetBrowserAppCtx(docRoot), - foreignEncoding, inBuf, (TInt *)numUnconvertible, (TInt*)indexFirstUnconvertible, (void**)outBuf); - if (status == KBrsrSuccess && *outBuf == NULL) - *outBuf = inBuf; - return status; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_ComputeEncoding(NW_HED_CompositeContentHandler_t* thisObj, - NW_Url_Resp_t* response, - NW_Bool* encodingFound) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint16 settingEncoding = NW_Settings_GetEncoding(); - NW_Int32 index = NW_HED_CompositeContentHandler_FindCharsetFromInternalEncoding(settingEncoding); - NW_ASSERT(encodingFound != NULL); - NW_REQUIRED_PARAM(thisObj); - // If the setting is not automatic, use the charset from the settings - if (index >= 0) - { - response->charset = supportedCharset[index].ianaEncoding; - *encodingFound = NW_TRUE; - } - else - { - *encodingFound = _NW_HED_CompositeContentHandler_DetectEncoding( - response->body, &response->charset, &response->byteOrder); - if (*encodingFound) - { - NW_Settings_SetOriginalEncoding(response->charset); - } - } - - return status; -} - -// take a url repsonse, and try to find to find its charset in http header, -// if not found, use default locale charset, if that's not supported, -// use latin-1 as default. -// also set the response charset to whatever is determined -// finally returns the index of the charset. -static NW_Int32 findDefaultCharsetIndex(NW_Url_Resp_t * response) -{ - NW_Int32 index = -1; - if (response->charsetString != NULL) - { - index = NW_HED_CompositeContentHandler_FindCharsetFromIanaEncoding(response->charset); - } - if (index < 0) - { - // No valid http header was found, use the locale specific default - index = NW_HED_CompositeContentHandler_FindCharsetFromInternalEncoding(NW_Settings_GetDefaultCharset()); - } - if (index < 0) - { - index = NW_HED_CompositeContentHandler_FindCharsetFromInternalEncoding(HTTP_iso_8859_1); - } - response->charset = supportedCharset[index].ianaEncoding; - NW_Settings_SetOriginalEncoding(response->charset); - return index; -} - -// this function serves 3 purposes: -// 1. when charset is found in META or XML, -// charsetLength and charsetOffset not zero, -// (Mainly called from handle_Meta or handle_xml_charset in parser). -// 2. when encoding is set auto, and charset not found in META or XML, -// charsetLength and charsetOffset would be zero, selectedCharset should be 0; -// (Mainly called from BodyStart in parser). -// 3. when encoding is set auto, and parser needs to perform the char conv based on previous found charset. -// charsetLength and charsetOffset would be zero, selectedCharset is not 0; -// also, in this case, we should expect the response->charset has been set to -// the correct value. -// (Mainly called from htmlp_to_wbxml function to perform transcoding). -TBrowserStatusCode NW_HED_CompositeContentHandler_CharConvCB(void* context, - NW_Uint32 charsetLength, - NW_Uint32 charsetOffset, - NW_Buffer_t* body, - NW_Int32* numUnconvertible, - NW_Int32* indexFirstUnconvertible, - NW_Buffer_t** outBuf, - NW_Uint32* selectedCharset) -{ - NW_HED_CharsetConvContext* ctx = NULL; - NW_Int32 index = -1; - TBrowserStatusCode status = KBrsrSuccess; - - ctx = (NW_HED_CharsetConvContext*) context; - NW_ASSERT(ctx != NULL); - NW_ASSERT(ctx->contentHandler != NULL); - NW_ASSERT(ctx->response != NULL); - NW_ASSERT(body != NULL); - - if (charsetLength == 0 && charsetOffset == 0) - { - if (*selectedCharset == NULL) - { - // case 2: - // We are here because the Encoding setting is automatic and there was no Meta tag or XML declaration - // Look for Http header, but only if it was set by the server and we can support it, - // if not, we'll use default encoding - index = findDefaultCharsetIndex(ctx->response); - } - else - { - // case 3: use selectedCharset to set response->charset - ctx->response->charset = (NW_Uint16)*selectedCharset; - status = _NW_HED_CompositeContentHandler_ConvertEncoding(ctx->contentHandler, ctx->response->charset, - body, numUnconvertible, indexFirstUnconvertible, - outBuf); - } - } - else // case 1: find the charset from the META or XML - { - index = NW_HED_CompositeContentHandler_FindCharset(body->data + charsetOffset, charsetLength); - if (index < 0) - { - index = findDefaultCharsetIndex(ctx->response); - } - else{ - ctx->response->charset = supportedCharset[index].ianaEncoding; - } - } - *selectedCharset = ctx->response->charset; - NW_Settings_SetOriginalEncoding(ctx->response->charset); - return status; -} - -/************************************************************************ - - Function: NW_HED_CompositeContentHandler_SaveImagesToFile - - Description: Write images to a file in the form of multipart segments. - Each segment consists of: - header length (including content type length) - image data length - content type (including character encoding) - headers - image - - Parameters: thisObj - in: content handler - file - in: file name - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory - KBrsrSavedPageFailed - -**************************************************************************/ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_SaveImagesToFile(NW_HED_CompositeContentHandler_t* thisObj, - NW_Osu_File_t fh) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_HED_CompositeNode_t* compositeNode; - NW_HED_ContentHandler_t* childNode; - NW_ADT_Iterator_t* iter = NULL; - NW_Image_Epoc32Simple_t* image = NULL; - const NW_Byte* rawData = NULL; - NW_Uint32 rawDataLen = 0; - NW_Byte* segment; - NW_Uint32 segmentLen; - char* urlAscii = NULL; - NW_Image_CannedImages_t *cannedImages; - NW_LMgr_RootBox_t *rootBox; - MHEDDocumentListener *documentListener; - NW_HED_DocumentRoot_t *documentRoot; - - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_HED_CompositeContentHandler_Class)); - - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - TUint originalEncoding = NW_Settings_GetOriginalEncoding(); - - /* Create a child iterator */ - if (thisObj != NULL) - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iter); - - /* If there are no children, return success status */ - if (status == KBrsrNotFound) - return KBrsrSuccess; - - if (status == KBrsrSuccess) - { - /* Loop through the child content handlers; each contatins an image. */ - while (NW_ADT_Iterator_HasMoreElements (iter)) - { - NW_ImageCH_Epoc32ContentHandler_t* imageCH; - - status = NW_ADT_Iterator_GetNextElement (iter, &childNode); - - if (status != KBrsrSuccess) - { - status = KBrsrFailure; - break; - } - - if (!NW_Object_IsClass(childNode, &NW_ImageCH_Epoc32ContentHandler_Class)) - continue; - - imageCH = NW_ImageCH_Epoc32ContentHandlerOf(childNode); - - if (imageCH->image != NULL) - { - if (NW_Object_IsInstanceOf(imageCH->image, &NW_Image_Virtual_Class)) - continue; - - image = NW_Image_Epoc32SimpleOf(imageCH->image); - rawData = (const NW_Byte *)image->rawData; - rawDataLen = image->rawDataLength; - } - else - { - documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT(documentRoot != NULL); - - documentListener = documentRoot->documentListener; - NW_ASSERT(documentListener != NULL); - - rootBox = documentListener->GetRootBox(); - if (rootBox==NULL) { - return KBrsrOutOfMemory; - } - - cannedImages = rootBox->cannedImages; - NW_ASSERT(cannedImages!=NULL); - image = NULL; - image = (NW_Image_Epoc32Simple_t *) - NW_Image_CannedImages_GetImage(cannedImages, NW_Image_Missing); - NW_ASSERT(image != NULL); - - rawData = (const NW_Byte *)image->rawData; - rawDataLen = image->rawDataLength; - } - - /* Get response URL. If it is NULL, use it anyway. */ - if (imageCH->requestUrl) - urlAscii = NW_Str_CvtToAscii(imageCH->requestUrl); - - status = NW_CreateMultipartSegment - ( - HTTP_iso_8859_1, // encoding - does it matter for images? - originalEncoding, // used by saved foreign content loading - childNode->response->contentTypeString, - urlAscii, - rawData, - rawDataLen, - &segment, - &segmentLen - ); - NW_Mem_Free(urlAscii); - if (status != KBrsrSuccess) - break; - - /* write segment to file */ - status = NW_Osu_WriteFile(fh, segment, segmentLen); - NW_Mem_Free(segment); - if (status != KBrsrSuccess) - break; - } - - NW_Object_Delete (iter); - } - return status; -} - - -/************************************************************************ - - Function: NW_HED_CompositeContentHandler_GetImageCount - - Description: Gets the number of images embedded in the document. - This does not include the images loaded via CSS - - Parameters: thisObj - in: content handler - - Return Value: Number of images - -**************************************************************************/ -NW_Uint32 -NW_HED_CompositeContentHandler_GetImageCount(NW_HED_CompositeContentHandler_t* thisObj) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_HED_CompositeNode_t* compositeNode; - NW_HED_ContentHandler_t* childNode; - NW_ADT_Iterator_t* iter = NULL; - NW_Uint32 numImages = 0; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_HED_CompositeContentHandler_Class)); - - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - - /* Create a child iterator */ - if (thisObj != NULL) - status = NW_HED_CompositeNode_GetChildren (compositeNode, &iter); - - /* If there are no children, return success status */ - if (status == KBrsrNotFound) - return 0; - - if (status == KBrsrSuccess) - { - /* Loop through the child content handlers; each contatins an image. */ - while (NW_ADT_Iterator_HasMoreElements (iter)) - { - NW_ImageCH_Epoc32ContentHandler_t* imageCH; - - status = NW_ADT_Iterator_GetNextElement (iter, &childNode); - - if (status != KBrsrSuccess) - break; - - if (!NW_Object_IsClass(childNode, &NW_ImageCH_Epoc32ContentHandler_Class)) - continue; - - imageCH = NW_ImageCH_Epoc32ContentHandlerOf(childNode); - - if (imageCH->image != NULL) - { - if (!NW_Object_IsInstanceOf(imageCH->image, &NW_Image_Virtual_Class)) - numImages++; - } - } - } - return numImages; -} - - -/************************************************************************ - - Function: NW_HED_CompositeContentHandler_AddChild - - Description: Add a child to the list - - Parameters: thisObj - in: composite content handler - childNode - in: child to be added - - Return Value: - -**************************************************************************/ -TBrowserStatusCode -NW_HED_CompositeContentHandler_AddChild( NW_HED_CompositeContentHandler_t* thisObj, - NW_HED_DocumentNode_t* childNode, - void* context ) - { - NW_HED_CompositeNode_t* compositeNode; - - // parameter assertion block - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_HED_CompositeContentHandler_Class ) ); - NW_ASSERT( NW_Object_IsInstanceOf( childNode, &NW_HED_ContentHandler_Class ) ); - - // for convenience - compositeNode = (NW_HED_CompositeNode_t *) - NW_Object_QuerySecondary( thisObj, &NW_HED_CompositeNode_Class ); - - NW_ASSERT( NW_Object_IsInstanceOf( compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class ) ); - - NW_TRY( status ) - { - // insert the childNode into our children list - status = NW_HED_CompositeNode_AddChild( compositeNode, childNode, context ); - _NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - NW_HED_CompositeNode methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeContentHandler_CompositeNode_AddChild (NW_HED_CompositeNode_t* compositeNode, - NW_HED_DocumentNode_t* childNode, - void* key) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (compositeNode, - &NW_HED_CompositeContentHandler_CompositeNode_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (childNode, &NW_HED_DocumentNode_Class)); - - /* if the content handler is not embeddable do not add it.There is this - prevents nested <html> tags created inadvertently */ - if (NW_HED_ContentHandlerOf (childNode)->isEmbeddable == NW_FALSE) { - return KBrsrBadInputParam; - } - - return _NW_HED_CompositeNode_AddChild (compositeNode, childNode, key); -} - - -/***************************************************************** - - Name: NW_HED_CompositeContentHandler_HandleImageLoad - - Description: If the image corresponsing to the newContentHandler - (which is an ImageCH) exists more than once in the document, - this function creates new ImageCH for all those other - transactions and sets Virtual Image in them - - Parameters: See below - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -NW_HED_CompositeContentHandler_HandleImageLoad( - NW_HED_CompositeContentHandler_t* thisObj, - NW_Int32 chunkIndex, - NW_HED_ContentHandler_t* newContentHandler, - NW_HED_UrlRequest_t* urlRequest ) - { - // note that this function should be in a utility class instead - NW_TRY( status ) - { - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t numItems; - // get document root load list - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) - _NW_HED_DocumentNode_GetRootNode( NW_HED_DocumentNodeOf( thisObj ) ); - - // handle unlikely error cases - NW_THROW_ON_NULL( newContentHandler, status, KBrsrUnexpectedError ); - NW_THROW_ON_NULL( newContentHandler->response, status, KBrsrUnexpectedError ); - - numItems = NW_ADT_Vector_GetSize( docRoot->loadList ); - index = numItems; - - while (index > 0) - { - NW_HED_DocumentRoot_LoadContext_t *entry = NULL; - - index--; - entry = *(NW_HED_DocumentRoot_LoadContext_t**) - NW_ADT_Vector_ElementAt( docRoot->loadList, index ); - - NW_ASSERT( entry ); - // find all the corresponding virtual entries. - if( ( entry ) && ( entry->virtualRequest == NW_TRUE ) && - ( entry->transactionId == newContentHandler->response->transId ) ) - { - NW_ImageCH_Epoc32ContentHandler_t* virtualHandler = NULL; - - // first chunk. let's create the virtual image content handler - if( chunkIndex == 0 ) - { - // clone image handler - status = NW_ImageCH_Epoc32ContentHandler_GetVirtualHandler( - NW_HED_DocumentNodeOf( thisObj ), urlRequest, - NW_ImageCH_Epoc32ContentHandlerOf( newContentHandler ), &virtualHandler ); - // check only OOM - NW_THROW_ON( KBrsrOutOfMemory, status ); - - if( virtualHandler && - NW_HED_CompositeContentHandler_AddChild( NW_HED_CompositeContentHandlerOf( thisObj ), - NW_HED_DocumentNodeOf( virtualHandler ), entry->clientData ) == KBrsrSuccess ) - { - // set the context - virtualHandler->context = entry->clientData; - } - else - { - // if the virtual content handler is either NULL or could not be added to the child list - // then erase and set it to NULL. - NW_Object_Delete( virtualHandler ); - virtualHandler = NULL; - // release entry - NW_Mem_Free( entry ); - // remove it from the list - NW_ADT_DynamicVector_RemoveAt( docRoot->loadList, index ); - // catch OOM only - NW_THROW_ON( KBrsrOutOfMemory, status ); - } - // jump to the next candidate - } - // last chunk, load complete - else if( chunkIndex == -1 ) - { - NW_HED_CompositeNode_t* compositeNode; - - // look up the child list to get the virtual content handler - compositeNode = (NW_HED_CompositeNode_t*) - (NW_Object_QueryAggregate( thisObj, &NW_HED_CompositeNode_Class)); - NW_ASSERT( compositeNode != NULL ); - - virtualHandler = (NW_ImageCH_Epoc32ContentHandler_t*) - NW_HED_CompositeNode_LookupChild( compositeNode, entry->clientData ); - - if( virtualHandler ) - { - status = NW_HED_DocumentNode_Initialize( NW_HED_DocumentNodeOf( virtualHandler ), KBrsrSuccess ); - // catch OOM only - NW_THROW_ON( KBrsrOutOfMemory, status ); - } - NW_Mem_Free( entry ); - // load complet. remove virtual item from the loadList - status = NW_ADT_DynamicVector_RemoveAt( docRoot->loadList, index ); - // catch OOM only - NW_THROW_ON( KBrsrOutOfMemory, status ); - } - else - { - // only the first chunk and the load complete should - // be passed to the function - NW_ASSERT( NW_TRUE ); - } - } - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -/* NW_HED_CompositeContentHandler_CreateContentHandler - * - * Creates non top level content handler for a given context - * Parameters: - * image: this object - */ -NW_HED_ContentHandler_t* -NW_HED_CompositeContentHandler_CreateContentHandler( NW_HED_ContentHandler_t* thisObj, - NW_Uint8* contentTypeString, NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, void* clientData ) - - { - NW_HED_ContentHandler_t* newContentHandler; - NW_HED_DocumentRoot_t* docRoot; - - // parameter assertion block - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( urlRequest != NULL ); - NW_ASSERT( contentTypeString != NULL ); - - // it musn't be top level request - NW_ASSERT( NW_HED_UrlRequest_IsTopLevelRequest( urlRequest ) != NW_TRUE ); - - docRoot = (NW_HED_DocumentRoot_t*) - _NW_HED_DocumentNode_GetRootNode( NW_HED_DocumentNodeOf( thisObj ) ); - - newContentHandler = NW_HED_MimeTable_CreateContentHandler( docRoot->mimeTable, NW_HED_DocumentNodeOf( thisObj ), - contentTypeString, urlRequest, response, NW_FALSE ); - - // if this is null we don't support the content-type of the response - if( newContentHandler != NULL ) - { - TBrowserStatusCode status; - // add content handler to the children list - status = NW_HED_CompositeContentHandler_AddChild( NW_HED_CompositeContentHandlerOf( thisObj ), - NW_HED_DocumentNodeOf( newContentHandler ), clientData ); - - // the content handler initalized successfully set "contentHandler" - if( status != KBrsrSuccess ) - { - // delete the bogus content handler - NW_Object_Delete( newContentHandler ); - newContentHandler = NULL; - } - } - return newContentHandler; - } - - -// check if any body part has the same url as the one passed in -// if it does, return true, set aBodyPart to the body part -// else, return false -TBool -_NW_HED_CompositeContentHandler_IsUrlInMultipart( NW_HED_CompositeContentHandler_t* thisObj, - const NW_Ucs2* aUrl, - CBodyPart** aBodyPart ) - { - TInt32 bodyPartLen; - - if( thisObj->iMultipart ) - { - TInt size = thisObj->iBodyPartArray.Count(); - TInt i; - TInt32 len = NW_Str_Strlen( aUrl ); - for (i = 0; i < size; i++) - { - CBodyPart* bodyPart = thisObj->iBodyPartArray[i]; - NW_Ucs2* bodyPartUrl = (NW_Ucs2*)( bodyPart->Url().Ptr() ); - - if( bodyPartUrl ) - { - bodyPartLen = NW_Str_Strlen( bodyPartUrl ); - - if( bodyPartLen == len ) - { - if( NW_Str_Strcmp( bodyPartUrl, aUrl ) == 0 ) - { - //aBodyPart = &bodyPart; - *aBodyPart = bodyPart; - return ETrue; - } - // else: continue loop - } - // else: continue loop - } - // else: continue loop - } - } - // else: return false - - return EFalse; - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDCompositeNode.cpp --- a/webengine/wmlengine/src/hed/src/HEDCompositeNode.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,343 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_compositenodei.h" -#include "nw_hed_childiterator.h" -#include "nw_object_interface.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_CompositeNode_Class_t NW_HED_CompositeNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Aggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NW_HED_CompositeNode_InterfaceList, - /* construct */ NULL, - /* destruct */ _NW_HED_CompositeNode_Destruct - }, - { /* NW_HED_CompositeNode */ - /* addChild */ _NW_HED_CompositeNode_AddChild - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Object_Class_t* const NW_HED_CompositeNode_InterfaceList[] = { - &NW_HED_CompositeNode_ICompositeNode_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_ICompositeNode_Class_t NW_HED_CompositeNode_ICompositeNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ICompositeNode_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_HED_CompositeNode_t, NW_HED_ICompositeNode) - }, - { /* NW_HED_ICompositeNode */ - /* removeChild */ _NW_HED_CompositeNode_ICompositeNode_RemoveChild, - /* getChildren */ _NW_HED_CompositeNode_ICompositeNode_GetChildren - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Aggregate methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_CompositeNode_Destruct (NW_Object_Aggregate_t* aggregate) -{ - NW_HED_CompositeNode_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (aggregate, - &NW_HED_CompositeNode_Class)); - - /* for convenience */ - thisObj = NW_HED_CompositeNodeOf (aggregate); - - /* delete all the children */ - NW_HED_CompositeNode_DeleteChildren(thisObj); -} - -/* ------------------------------------------------------------------------- * - NW_HED_ICompositeNode method implemtations - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_ICompositeNode_RemoveChild (NW_HED_ICompositeNode_t* icompositeNode, - NW_HED_DocumentNode_t* childNode) -{ - NW_HED_CompositeNode_t* thisObj; - NW_ADT_MapIterator_t iterator; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (icompositeNode, - &NW_HED_CompositeNode_ICompositeNode_Class)); - - /* for convenience */ - thisObj = (NW_HED_CompositeNode_t *) NW_Object_Interface_GetImplementer (icompositeNode); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_CompositeNode_Class)); - - NW_Object_Invalidate (&iterator); - NW_TRY (status) { - /* there is nothing we can do if the child map is not allocated */ - NW_THROW_ON_NULL (thisObj->children, status, KBrsrNotFound); - - /* create an child iterator */ - status = NW_ADT_MapIterator_Initialize (&iterator, thisObj->children); - NW_THROW_ON_ERROR (status); - - while (NW_ADT_Iterator_HasMoreElements (&iterator)) { - void* key; - NW_HED_DocumentNode_t* node; - - status = NW_ADT_Iterator_GetNextElement (&iterator, &key); - NW_ASSERT (status == KBrsrSuccess); - status = NW_ADT_Map_Get (thisObj->children, &key, &node); - NW_THROW_ON_ERROR (status); - - if (node == childNode) { - childNode->parent = NULL; - status = NW_ADT_Map_Remove (thisObj->children, &key); - NW_THROW_ON_ERROR (status); - break; - } - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Terminate (&iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_ICompositeNode_GetChildren (NW_HED_ICompositeNode_t* icompositeNode, - NW_ADT_Iterator_t** childIterator) -{ - NW_HED_CompositeNode_t* thisObj; - NW_HED_ChildIterator_t* iterator; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (icompositeNode, - &NW_HED_CompositeNode_ICompositeNode_Class)); - NW_ASSERT (childIterator != NULL); - - /* for convenience */ - thisObj = (NW_HED_CompositeNode_t*) NW_Object_Interface_GetImplementer (icompositeNode); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_CompositeNode_Class)); - - /* make sure we do in fact have children */ - if (thisObj->children == NULL) { - return KBrsrNotFound; - } - - /* instantiate a new NW_HED_ChildIterator */ - iterator = NW_HED_ChildIterator_New (thisObj->children); - if (iterator == NULL) { - return KBrsrOutOfMemory; - } - - /* successful completion */ - *childIterator = (NW_ADT_Iterator_t*) iterator; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - NW_HED_CompositeNode methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_AddChild (NW_HED_CompositeNode_t* thisObj, - NW_HED_DocumentNode_t* childNode, - void* context) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_HED_CompositeNode_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (childNode, - &NW_HED_DocumentNode_Class)); - - NW_TRY (status) { - /* create the 'children' map on-demand */ - if (thisObj->children == NULL) { - thisObj->children = - NW_ADT_ResizableMap_New (sizeof (void*), - sizeof (NW_HED_DocumentNode_t*), 1, 1); - NW_THROW_OOM_ON_NULL (thisObj->children, status); - } - - /* add the child */ - status = NW_ADT_Map_Set (thisObj->children, &context, &childNode); - NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DocumentNode_t* -_NW_HED_CompositeNode_LookupChild (NW_HED_CompositeNode_t* thisObj, - void* key) -{ - NW_HED_DocumentNode_t* childNode = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_HED_CompositeNode_Class)); - - NW_TRY (status) { - /* there is nothing we can do if the child map is not allocated */ - NW_THROW_ON_NULL (thisObj->children, status, KBrsrNotFound); - - childNode = NULL; - status = NW_ADT_Map_Get (thisObj->children, &key, &childNode); - NW_THROW_ON (status, KBrsrNotFound); - NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return childNode; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_DeleteChildren (NW_HED_CompositeNode_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_CompositeNode_Class)); - - NW_TRY (status) { - NW_ADT_Iterator_t* iterator; - - status = NW_HED_CompositeNode_GetChildren (thisObj, &iterator); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - } else { - /* delete each child */ - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - NW_HED_DocumentNode_t* childNode; - - status = NW_ADT_Iterator_GetNextElement (iterator, &childNode); - NW_ASSERT (status == KBrsrSuccess); - - childNode->parent = NULL; - NW_Object_Delete (childNode); - } - - NW_Object_Delete (iterator); - } - - /* delete the map */ - NW_Object_Delete (thisObj->children); - thisObj->children = NULL; - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_DeleteChild (NW_HED_CompositeNode_t* thisObj, - void* key) -{ - NW_HED_DocumentNode_t* childNode; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_CompositeNode_Class)); - - NW_TRY (status) { - /* there is nothing we can do if the child map is not allocated */ - NW_THROW_ON_NULL (thisObj->children, status, KBrsrNotFound); - - /* find the child */ - childNode = NW_HED_CompositeNode_LookupChild (thisObj, key); - NW_THROW_ON_NULL (childNode, status, KBrsrNotFound); - - /* remove the child from the map */ - status = NW_HED_CompositeNode_RemoveChild (thisObj, childNode); - NW_ASSERT (status == KBrsrSuccess); - - /* delete the node */ - NW_Object_Delete (childNode); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_RemoveChild (NW_HED_CompositeNode_t* thisObj, - NW_HED_DocumentNode_t* childNode) -{ - NW_HED_ICompositeNode_t* icompositeNode; - - /* get the interface implementation and invoke that */ - icompositeNode = (NW_HED_ICompositeNode_t*) - NW_Object_QueryInterface (thisObj, &NW_HED_ICompositeNode_Class); - NW_ASSERT (icompositeNode != NULL); - return NW_HED_ICompositeNode_RemoveChild (icompositeNode, childNode); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_CompositeNode_GetChildren (NW_HED_CompositeNode_t* thisObj, - NW_ADT_Iterator_t** childIterator) -{ - NW_HED_ICompositeNode_t* icompositeNode; - - /* get the interface implementation and invoke that */ - icompositeNode = (NW_HED_ICompositeNode_t*) - NW_Object_QueryInterface (thisObj, &NW_HED_ICompositeNode_Class); - NW_ASSERT (icompositeNode != NULL); - return NW_HED_ICompositeNode_GetChildren (icompositeNode, childIterator); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDContentHandler.cpp --- a/webengine/wmlengine/src/hed/src/HEDContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,631 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_contenthandleri.h" - -#include "nw_hed_documentrooti.h" // Should we need to include this?? -#include "nw_hed_documentroot.h" -#include "nw_hed_historystack.h" -#include "nw_hed_historyentry.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_imagech_epoc32contenthandler.h" - -#include "nwx_url_utils.h" -#include "BrsrStatusCodes.h" - -//R -#include "urlloader_urlresponse.h" - -/* ------------------------------------------------------------------------- */ -static void NW_HED_ContentHandler_DestroyBoxTree(NW_HED_ContentHandler_t* thisObj) -{ - NW_LMgr_ContainerBox_t* parentBox = NULL; - - if(thisObj->boxTree == NULL) { - return; - } - - parentBox = NW_LMgr_Box_GetParent(thisObj->boxTree); - - if((parentBox != NULL) && (NW_Object_Core_GetClass(parentBox) == &NW_LMgr_RootBox_Class)) { - NW_LMgr_RootBox_BoxTreeDestroyed(NW_LMgr_RootBoxOf(parentBox)); - } - - NW_Object_Delete (thisObj->boxTree); - thisObj->boxTree = NULL; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ContentHandler_Class_t NW_HED_ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_DocumentNode_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_ContentHandler_t), - /* construct */ _NW_HED_ContentHandler_Construct, - /* destruct */ _NW_HED_ContentHandler_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_HED_DocumentNode_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_HED_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_HED_ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_HED_ContentHandler_Suspend, - /* resume */ _NW_HED_DocumentNode_Resume, - /* allLoadsCompleted */ _NW_HED_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_HED_ContentHandler_LoseFocus, - /* gainFocus */ _NW_HED_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_HED_ContentHandler_PartialNextChunk, - /* getTitle */ NULL, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ NULL, - /* handleRequest */ _NW_HED_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - NW_HED_ContentHandler_t* thisObj; - - /* invoke our superclass constructor */ - status = _NW_HED_DocumentNode_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf( dynamicObject ); - - thisObj->initialized = NW_FALSE; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_ContentHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf (dynamicObject); - - // destroy response - UrlLoader_UrlResponseDelete( thisObj->response ); - - /* delete our dynamic members */ - NW_HED_ContentHandler_DestroyBoxTree (thisObj); - - /* release our association with our history-entry */ - NW_HED_ContentHandler_SetAssociatedHistoryEntry (thisObj, NULL); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_PartialNextChunk( NW_HED_ContentHandler_t* thisObj, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context) - { - NW_REQUIRED_PARAM(context); - - NW_TRY( status ) - { - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( response != NULL ); - - // first chunk - if( chunkIndex == 0 ) - { - // save response - thisObj->response = - UrlLoader_UrlResponseNew( response->uri, - response->body->data, response->body->length, - response->headers, response->contentTypeString, - response->contentLocationString, response->noStore, response->boundary, response->lastModified, - response->charset, response->charsetString, response->httpStatus, - response->method, response->transId, - response->contentLength); - NW_THROW_OOM_ON_NULL( thisObj->response, status ); - // add this manually. - thisObj->response->certInfo = response->certInfo ; - - // uri is copied - // response->uri = NULL; - response->body->data = NULL; - response->body->length = 0; - response->headers = NULL; - response->contentTypeString = NULL; - response->contentLocationString = NULL; - response->boundary = NULL; - response->lastModified = NULL; - response->certInfo = NULL; - response->charsetString = NULL; - } - // further chunks - else if( chunkIndex != -1 ) - { - // append new chunk - status = NW_Buffer_AppendBuffers( thisObj->response->body, response->body ); - _NW_THROW_ON_ERROR( status ); - } - else - { - // this function musn't be called with the last partial response as it has no body. - // Initialize must be called instead - NW_ASSERT( NW_TRUE ); - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - // free response - UrlLoader_UrlResponseDelete( response ); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree) -{ - NW_HED_ContentHandler_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_HED_ContentHandler_Class)); - - // for convenience - thisObj = NW_HED_ContentHandlerOf (documentNode); - - // if we haven't created a box tree yet, do so now - *boxTree = NULL; - if( !thisObj->boxTree ) - { - status = NW_HED_ContentHandler_CreateBoxTree (thisObj, &thisObj->boxTree); - } - // return the box tree - *boxTree = thisObj->boxTree; - return status; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_HED_ContentHandler_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ) - { - NW_HED_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT( NW_Object_IsInstanceOf( documentNode, &NW_HED_ContentHandler_Class ) ); - - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf( documentNode ); - - thisObj->initialized = NW_TRUE; - - // invoke our superclass method - return( NW_HED_DocumentNode_Class.NW_HED_DocumentNode.initialize( - documentNode, aInitStatus ) ); - } - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree) -{ - NW_HED_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_HED_ContentHandler_Class)); - - /* invoke our superclass method */ - _NW_HED_DocumentNode_Suspend (documentNode, aDestroyBoxTree); - - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf (documentNode); - - /* delete our dynamic members */ - if (aDestroyBoxTree) - { - NW_HED_ContentHandler_DestroyBoxTree (thisObj); - } - -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentNode; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_HED_ContentHandler_Class)); -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_ContentHandler_t* thisObj = NULL; - NW_LMgr_RootBox_t* rootBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_HED_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf (documentNode); - - /* there is nothing to do if there is no box tree */ - if (thisObj->boxTree == NULL) { - return; - } - - rootBox = NW_LMgr_Box_GetRootBox (thisObj->boxTree); - if (rootBox != NULL) { - NW_LMgr_RootBox_LoseFocus (rootBox); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_ContentHandler_t* thisObj = NULL; - NW_LMgr_RootBox_t* rootBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_HED_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_HED_ContentHandlerOf (documentNode); - - /* there is nothing to do if there is no box tree */ - if (thisObj->boxTree == NULL) { - return; - } - - rootBox = NW_LMgr_Box_GetRootBox (thisObj->boxTree); - if (rootBox != NULL) { - NW_LMgr_RootBox_GainFocus (rootBox); - } -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_CreateHistoryEntry (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - NW_HED_UrlResponse_t* urlResponse) -{ - (void) thisObj; - - return NW_HED_HistoryEntry_New (urlRequest, urlResponse); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry (NW_HED_ContentHandler_t* thisObj, - const NW_Text_t* requestUrl, - const NW_Text_t* responseUrl) -{ - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_HED_HistoryStack_t* history = NULL; - NW_HED_HistoryEntry_t* entry = NULL; - NW_HED_UrlRequest_t* urlReq = NULL; - NW_HED_UrlResponse_t *urlResp = NULL; - NW_HED_HistoryEntry_t* newEntry = NULL; - const NW_Text_t* title; - NW_Ucs2* storage = NULL; - static const NW_Ucs2 empty[] = { '\0' }; - static const NW_Ucs2 space[] = { ' ', '\0' }; - - /* get current entry */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_THROWIF_NULL (docRoot); - NW_THROWIF_NULL (history = NW_HED_DocumentRoot_GetHistoryStack (docRoot)); - NW_THROWIF_NULL (entry = NW_HED_HistoryStack_GetEntry (history, - NW_HED_HistoryStack_Direction_Current)); - - /* clone the entry */ - NW_THROWIF_NULL (newEntry = NW_HED_HistoryEntry_Clone (entry)); - - /* set the new urls */ - NW_THROWIF_NULL (urlReq = (NW_HED_UrlRequest_t*) NW_HED_HistoryEntry_GetUrlRequest (newEntry)); - NW_THROWIF_ERROR (NW_HED_UrlRequest_UpdateUrl (urlReq, requestUrl)); - - NW_THROWIF_NULL (urlResp = (NW_HED_UrlResponse_t*) NW_HED_HistoryEntry_GetUrlResponse (newEntry)); - NW_THROWIF_ERROR (NW_HED_UrlResponse_UpdateUrl (urlResp, responseUrl)); - - /* Save the title of page to history */ - title = NW_HED_DocumentRoot_GetTitle (docRoot); - - if (title != NULL) - { - NW_Uint8 freeNeeded; - NW_Text_Length_t length; - - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (title, 0, &length, &freeNeeded); - if (!freeNeeded) - { - storage = NW_Str_Newcpy (storage); - } - if(storage == NULL) - { - storage = (NW_Ucs2*) empty; - } - - NW_HED_HistoryEntry_SetPageTitle(newEntry, storage); - - if (storage != empty) - { - NW_Mem_Free (storage); - storage=NULL; - } - } - /* No title, let's leave it empty */ - else - { - NW_HED_HistoryEntry_SetPageTitle(newEntry, (NW_Ucs2*) space); - } - - - return newEntry; - -NW_CATCH_ERROR - NW_Object_Delete (newEntry); - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlResponse_t* -_NW_HED_ContentHandler_NewUrlResponse (NW_HED_ContentHandler_t* thisObj, - NW_Url_Resp_t* response) -{ - (void) thisObj; - - return NW_HED_UrlResponse_New (response); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_HandleRequest (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest) -{ - (void) thisObj; - (void) urlRequest; - - /* simply return KBrsrFailure, meaning that we couldn't act on the request */ - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_FeatureQuery (NW_HED_ContentHandler_t* thisObj, - NW_HED_ContentHandler_Feature_t featureId) -{ - (void) thisObj; - (void) featureId; - - /* simply return KBrsrFailure, meaning that no support for the feature */ - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -_NW_HED_ContentHandler_GetURL (NW_HED_ContentHandler_t* thisObj) -{ - //lint --e{550} Warning -- Symbol 'status' not accessed - const NW_HED_UrlResponse_t* urlResponse; - const NW_Text_t* docUrl = NULL; - urlResponse = NW_HED_ContentHandler_GetUrlResponse (thisObj); - - if (urlResponse != NULL) { - docUrl = NW_HED_UrlResponse_GetUrl (urlResponse); - } - - return docUrl; -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_UrlRequest_t* -_NW_HED_ContentHandler_GetUrlRequest(NW_HED_ContentHandler_t* thisObj) -{ - const NW_HED_UrlRequest_t* urlReq = NULL; - NW_ASSERT(thisObj); - - if (thisObj->associatedHistoryEntry != NULL) { - urlReq = NW_HED_HistoryEntry_GetUrlRequest (thisObj->associatedHistoryEntry); - } - - return urlReq; -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_UrlResponse_t* -_NW_HED_ContentHandler_GetUrlResponse(NW_HED_ContentHandler_t* thisObj) -{ - const NW_HED_UrlResponse_t* urlResp = NULL; - NW_ASSERT(thisObj); - - if (thisObj->associatedHistoryEntry != NULL) { - urlResp = NW_HED_HistoryEntry_GetUrlResponse (thisObj->associatedHistoryEntry); - } - - return urlResp; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_SetAssociatedHistoryEntry (NW_HED_ContentHandler_t* thisObj, - NW_HED_HistoryEntry_t* entry) -{ - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_ContentHandler_Class)); - - /* we don't need to do anything if associate the same entry */ - if (thisObj->associatedHistoryEntry == entry) { - return KBrsrSuccess; - } - - /* release the old history-entry */ - if (thisObj->associatedHistoryEntry != NULL) { - NW_HED_HistoryEntry_Release (thisObj->associatedHistoryEntry); - thisObj->associatedHistoryEntry = NULL; - } - - /* reserve and hold on to the new history entry */ - if (entry != NULL) { - status = NW_HED_HistoryEntry_Reserve (entry); - - if (status == KBrsrSuccess) { - thisObj->associatedHistoryEntry = entry; - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -_NW_HED_ContentHandler_GetAssociatedHistoryEntry (NW_HED_ContentHandler_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_ContentHandler_Class)); - - return thisObj->associatedHistoryEntry; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_ContentHandler_ResolveURL (NW_HED_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t** retUrl) -{ - const NW_Ucs2* urlStorage; - NW_Uint8 urlFreeNeeded; - const NW_Ucs2* baseStorage; - TBrowserStatusCode status = KBrsrSuccess; - NW_Ucs2* absStorage; - NW_Text_UCS2_t* absURL; - NW_Bool isRelative; - - NW_ASSERT(retUrl != NULL); - *retUrl = NULL; - /* all URL's are used by the Rainbow loader system as Unicode */ - urlStorage = - NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, NULL, &urlFreeNeeded); - - /* if the supplied URL is absolute we simply return that */ - if (KBrsrSuccess != NW_Url_IsRelative (urlStorage, &isRelative)) - { - if (urlFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - return KBrsrFailure; - } - - if (!isRelative) { - if (urlFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - *retUrl = url; - return status; - } - - /* ok - its a relative URL, we need to resolve that - first thing is to get - the storage of the base URL */ - baseStorage = NW_HED_UrlRequest_GetRawUrl (NW_HED_ContentHandler_GetUrlRequest (thisObj)); - - /* construct the absolute URL */ - status = NW_Url_RelToAbs (baseStorage, urlStorage, &absStorage); - if (status != KBrsrSuccess) { - if (urlFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - return status; - } - - /* cleanup */ - if (urlFreeNeeded) { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - - absURL = NW_Text_UCS2_New (absStorage, 0, NW_Text_Flags_TakeOwnership); - if (absURL == NULL) { - return KBrsrOutOfMemory; - } - NW_Object_Delete (url); - *retUrl = NW_TextOf (absURL); - return KBrsrSuccess; -} - - -TBrowserStatusCode -_NW_HED_ContentHandler_ResponseComplete( NW_HED_ContentHandler_t* thisObj, - NW_Url_Resp_t* response, - void* context) -{ - NW_REQUIRED_PARAM(thisObj); - NW_REQUIRED_PARAM(response); - NW_REQUIRED_PARAM(context); - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDDocumentNode.cpp --- a/webengine/wmlengine/src/hed/src/HEDDocumentNode.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,288 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_documentnodei.h" - -#include "nw_hed_documentroot.h" -#include "nw_text_ucs2.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_DocumentNode_Class_t NW_HED_DocumentNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_DocumentNode_t), - /* construct */ _NW_HED_DocumentNode_Construct, - /* destruct */ _NW_HED_DocumentNode_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_HED_DocumentNode_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_HED_DocumentNode_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ NULL, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_HED_DocumentNode_Suspend, - /* resume */ _NW_HED_DocumentNode_Resume, - /* allLoadCompleted */ NULL, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ NULL, - /* gainFocus */ NULL, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentNode_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_HED_DocumentNode_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_HED_DocumentNode_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_HED_DocumentNodeOf (dynamicObject); - - /* initialize our members */ - thisObj->parent = va_arg (*argList, NW_HED_DocumentNode_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentNode_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_DocumentNode_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentNodeOf (dynamicObject); - - /* if this node is connected to a document tree, we must remove it from - that tree before deleting it */ - if (thisObj->parent != NULL) { - NW_HED_DocumentNode_t* rootNode; - NW_HED_ICompositeNode_t* compositeNode; - - /* delete all outstanding requests associated with this node */ - rootNode = NW_HED_DocumentNode_GetRootNode (thisObj); - - /* Detach the node from its parent first. It's important because in Destructor - we should not cast the node back to it's subclass, e.g. XHTML CH */ - compositeNode = (NW_HED_ICompositeNode_t*) - NW_Object_QueryInterface (thisObj->parent, &NW_HED_ICompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - (void) NW_HED_ICompositeNode_RemoveChild (compositeNode, thisObj); - - /* delete all outstanding requests associated with this node */ - if (NW_Object_IsInstanceOf (rootNode, &NW_HED_DocumentRoot_Class)) { - NW_HED_DocumentRoot_DeleteRequests (rootNode, thisObj); - } - } -} - -/* ------------------------------------------------------------------------- * - NW_HED_DocumentNode public/protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentNode_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType) -{ - /* avoid "unreferenced formal parameter" warnings */ - (void) documentNode; - NW_REQUIRED_PARAM(cancelType); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentNode_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ) -{ - TBrowserStatusCode status; - - NW_REQUIRED_PARAM( aInitStatus ); - - /* now that the content has been loaded and initialization has taken place, - we are ready for action - we need to notify out parent of this */ - status = NW_HED_DocumentNode_NodeChanged (documentNode, documentNode); - if(status != KBrsrSuccess) - { - return status; - } - /* successful completion */ - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentNode_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) childNode; - - /* notify our parent */ - return NW_HED_DocumentNode_NodeChanged (documentNode->parent, documentNode); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_HED_DocumentNode_ProcessEvent (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event, - void* context) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) documentNode; - (void) box; - (void) event; - (void) context; - - /* we didn't absorb the event */ - return 0; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentNode_HandleError (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - NW_WaeError_t error) -{ - /* - ** TODO this doesn't work if the node is deeper than one level -- - ** (eg. DocumentRoot -> XHTML -> Image) - */ - - /* notify our parent */ - if (documentNode->parent != NULL) { - NW_HED_DocumentNode_HandleError (documentNode->parent, urlRequest, - errorClass, error); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentNode_Suspend (NW_HED_DocumentNode_t* thisObj, - NW_Bool aDestroyBoxTree) -{ - /* avoid "unreferenced formal parameter" warnings */ - (void) aDestroyBoxTree; - - NW_HED_DocumentNode_t* rootNode; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentNode_Class)); - - /* delete all outstanding requests associated with this node */ - rootNode = NW_HED_DocumentNode_GetRootNode (thisObj); - if (NW_Object_IsInstanceOf (rootNode, &NW_HED_DocumentRoot_Class)) - { - NW_HED_DocumentRoot_DeleteRequests (rootNode, thisObj); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentNode_Resume (NW_HED_DocumentNode_t* thisObj) -{ - /* avoid unreferenced formal parameter warnings */ - (void) thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentNode_Class)); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentNode_IntraPageNavigationCompleted (NW_HED_DocumentNode_t* documentNode) -{ - /* avoid "unreferenced formal parameter" warnings */ - (void) documentNode; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DocumentNode_t* -_NW_HED_DocumentNode_GetRootNode (NW_HED_DocumentNode_t* thisObj) -{ - /* find the topmost DocumentNode - this should be the DocumentRoot */ - while (thisObj->parent != NULL) { - thisObj = thisObj->parent; - } - return thisObj; -} - - -/* ------------------------------------------------------------------------- */ -// The function is called when a load issued by the document node is complete -void -_NW_HED_DocumentNode_HandleLoadComplete(NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ) -{ - // default implementation none - NW_REQUIRED_PARAM(documentNode); - NW_REQUIRED_PARAM(urlRequest); - NW_REQUIRED_PARAM(errorClass); - NW_REQUIRED_PARAM(error); - NW_REQUIRED_PARAM(transactionId); - NW_REQUIRED_PARAM(context); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDDocumentRoot.cpp --- a/webengine/wmlengine/src/hed/src/HEDDocumentRoot.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2480 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#include "nw_hed_documentrooti.h" -#include "nw_hed_historyentry.h" -#include "nw_hed_urlrequest.h" -#include "nw_hed_urlresponse.h" -#include "nw_hed_treevisitor.h" -#include "nw_hed_appservices.h" -#include "nw_hed_inumbercollector.h" -#include "nw_adt_resizablevector.h" -#include "nw_adt_mapiterator.h" -#include "nw_adt_singleiterator.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_wml1x_epoc32contenthandler.h" -#include "nw_hed_iimageviewer.h" -#include "nw_hed_compositecontenthandleri.h" -#include "urlloader_urlloaderint.h" - -#include "LMgrObjectBoxOOCi.h" -#include "HedLoadObserver.h" - -#include "nwx_string.h" -#include "nw_evlog_api.h" -#include "nwx_logger.h" -#include "nwx_http_defs.h" -#include <stddef.h> -#include <uri16.h> -#include "BrsrStatusCodes.h" -#include "HEDDocumentListener.h" - -#include "WmlControl.h" - - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_PartialLoad_ValidityCheck( NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t** owner, - TBrowserStatusCode loadStatus, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest ) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( owner != NULL ); - NW_ASSERT( urlRequest != NULL ); - - // TODO remove this wmlscript HACK - // - // Wml-scripts can be executed from a <go> tag -- go's usually replace - // the top-level document, but in this case we want to handle it as an - // embedded resource. Because of this we must change the url-request - // reason to NW_HED_UrlRequest_Reason_DocLoadChild. - if( response != NULL && response->contentTypeString != NULL ) - { - if( NW_Asc_stricmp( (char*)HTTP_application_vnd_wap_wmlscriptc_string, - (char*)response->contentTypeString ) == 0 ) - { - NW_HED_UrlRequest_SetReason( urlRequest, NW_HED_UrlRequest_Reason_DocLoadChild ); - // set the owner back to wml content handler - NW_ASSERT( thisObj->childNode != NULL ); - // wml script onwed by wml ch - if( NW_Object_IsInstanceOf( thisObj->childNode, &NW_Wml1x_Epoc32ContentHandler_Class ) == NW_TRUE ) - { - *owner = thisObj->childNode; - } - else - { - status = KBrsrWmlbrowserBadContentType; - } - } - } - if( loadStatus != KBrsrSuccess ) - { - // we failed to load the page and will not be creating a new box tree. - // The reason for the load was doing Back - since before issuing request - // we pushed the history back, we now move it forward. This is not the right - // way to do things and should be cleaned up in future - if( ( NW_HED_UrlRequest_GetReason( urlRequest ) == NW_HED_UrlRequest_Reason_ShellPrev ) || - ( NW_HED_UrlRequest_GetReason( urlRequest ) == NW_HED_UrlRequest_Reason_DocPrev ) ) - { - NW_HED_HistoryStack_SetCurrent( thisObj->historyStack, NW_HED_HistoryStack_Direction_Next ); - } - } - // if a top-level request is cancelled we don't need to do anything else - return status; - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_DocumentRoot_PushNewHistoryEntry (NW_HED_DocumentRoot_t* thisObj, - NW_HED_ContentHandler_t* contentHandler, - NW_HED_UrlRequest_t* newReq, - NW_HED_UrlResponse_t* newResp) - { - NW_HED_HistoryEntry_t* newEntry; - TBrowserStatusCode status = KBrsrSuccess; - const NW_Ucs2* url = NW_HED_UrlRequest_GetRawUrl( newReq ); - TUriParser16 uriParser; - const TText* linkUrl = NULL; - NW_Text_t* textUrl = NULL; - - // remove username:password information from the URL - if (url) - { - linkUrl = url; - - TPtrC urlDes (linkUrl, User::StringLength(linkUrl)); - - User::LeaveIfError(uriParser.Parse(urlDes)); - - if ( uriParser.IsPresent( EUriUserinfo ) ) - { - // Remove the username and password from the URI - CUri16* newUri = CUri16::NewLC( uriParser ); - - newUri->RemoveComponentL( EUriUserinfo ); - - const TText* newUrl = newUri->Uri().UriDes().Ptr(); - - textUrl = NW_Text_New(HTTP_iso_10646_ucs_2, (void*)newUrl, newUri->Uri().UriDes().Length(), - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy); - - // delete the old url from the request - NW_Object_Delete (newReq->url); - - // assign the new url to the request - newReq->url = textUrl; - CleanupStack::PopAndDestroy( newUri ); // newUri - } - } - - if (contentHandler != NULL) - { - newEntry = NW_HED_ContentHandler_CreateHistoryEntry (contentHandler, - newReq, newResp); - } - else - { - newEntry = NW_HED_HistoryEntry_New (newReq, newResp); - } - - if (newEntry) - { - NW_Ucs2 *responseUrl = NULL; - - status = NW_HED_HistoryStack_PushEntry (thisObj->historyStack, newEntry); - NW_ASSERT (status == KBrsrSuccess); - - /* We don't want to current entry in the stack to have an invalid url.*/ - responseUrl = (NW_Ucs2 *)NW_HED_UrlResponse_GetRawUrl(newResp); - if (responseUrl == NULL || NW_Str_Strlen(responseUrl) == 0) - { - - NW_HED_HistoryStack_SetCurrent (thisObj->historyStack, - NW_HED_HistoryStack_Direction_Previous); - } - - if(url != NULL) - { - NW_ASSERT(thisObj->appServices != NULL); - NW_EvLog_Log( &(thisObj->appServices->evLogApi), NW_EvLog_HISTORY_PUSH, - url ); - } - } - else - { - status = KBrsrOutOfMemory; - } - - return status; - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_DocumentRoot_UpdateHistory (NW_HED_DocumentRoot_t* thisObj, - NW_HED_ContentHandler_t* contentHandler, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response) -{ - NW_HED_UrlResponse_t* newResp = NULL; - NW_Url_Resp_t* tempResponse = NULL; - - - /* get the new and current url-responses */ - if (response == NULL) { - tempResponse = UrlLoader_UrlResponseNew(NW_HED_UrlRequest_GetRawUrl (urlRequest), - NULL, 0, NULL, NULL, NULL, NW_FALSE, NULL, NULL, 0, NULL, 0, 0, 0, 0); - - NW_THROWIF_MEM (tempResponse); - - response = tempResponse; - } - - if (contentHandler == NULL) { - newResp = NW_HED_UrlResponse_New (response); - } - else { - newResp = NW_HED_ContentHandler_NewUrlResponse (contentHandler, response); - } - - NW_THROWIF_MEM (newResp); - - /* this is no longer needed */ - if (tempResponse != NULL) { - UrlLoader_UrlResponseDelete (tempResponse); - tempResponse = NULL; - } - - /* if the request is non-history-based "push" a new history-entry */ - // urlRequest->loadType == NW_HED_UrlRequest_Reason_ShellReload is a temporary - // fix on the Meta refresh issue when the meta starts a request with ShellReload type - // and that request returns a different response url ("redirection") to what we already have in - // the history list. In this case we need to update the history entry with the - // redirected url otherwise no relative url will work. - if ((NW_HED_UrlRequest_IsHistoricRequest (urlRequest) == NW_FALSE || - urlRequest->reason == NW_HED_UrlRequest_Reason_ShellReload )) - { - NW_HED_HistoryEntry_t* currentEntry; - currentEntry = NW_HED_HistoryStack_GetEntry( thisObj->historyStack, NW_HED_HistoryStack_Direction_Current ); - - if( !currentEntry || !NW_HED_UrlRequest_Equal( currentEntry->urlRequest,urlRequest ) ) - { - // this is a new request. let's push it to the history stack. - NW_THROWIF_ERROR( NW_HED_DocumentRoot_PushNewHistoryEntry( thisObj, contentHandler, urlRequest, newResp ) ); - } - else if( currentEntry ) - { - // check if the response url has been changed. - redirection case from www.x.com to www2.x.com - if( currentEntry->urlResponse ) - { - if( !NW_HED_UrlResponse_Equal( currentEntry->urlResponse, newResp ) ) - { - // If currentEntry's URL is same as referrer, clear referer before deleting. - const NW_Text_t* referrerUrl = NW_HED_DocumentRoot_GetDocumentReferrer( thisObj ); - if ( referrerUrl ) - { - if ( referrerUrl->storage == currentEntry->urlResponse->rawUrl ) - { - NW_HED_DocumentRoot_SetDocumentReferrer( thisObj, NULL ); - } - } - // update response entry - NW_Object_Delete( currentEntry->urlResponse ); - currentEntry->urlResponse = newResp; - } - else - { - // free response entry if we do not add it to the history stack - NW_Object_Delete( newResp ); - } - } - } - } - - /* - ** We are navigating in history or preforming a reload. So we don't need to - ** create a new history entry. - */ - else - { - /* - ** TODO we should probably replace the urlResponse found in the history - ** entry with this one. The question is how do we know which history - ** entry contains the response we want to update? - */ - NW_Object_Delete (newResp); - } - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_Object_Delete (newResp); - UrlLoader_UrlResponseDelete(tempResponse); - - return KBrsrFailure; - -NW_CATCH_MEM - NW_Object_Delete (newResp); - UrlLoader_UrlResponseDelete(tempResponse); - - return KBrsrOutOfMemory; -} - - -/* ------------------------------------------------------------------------- */ -/***************************************************************** - - Name: NW_HED_DocumentRoot_CreateTopLevelContentHandler - - Description: Creates content handler for a given top level context - - Parameters: See below - - Return Value: loadStatus, *contentHandler - -*****************************************************************/ -static -TBrowserStatusCode -NW_HED_DocumentRoot_CreateTopLevelContentHandler(NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - NW_HED_ContentHandler_t** newContentHandler) - { - NW_HED_ContentHandler_t* contentHandler = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - // parameter assertion block - NW_ASSERT(urlRequest != NULL); - NW_ASSERT(response != NULL); - NW_ASSERT(response->contentTypeString != NULL); - NW_ASSERT(NW_HED_UrlRequest_IsTopLevelRequest(urlRequest) != NW_FALSE); - - // Check if we want to create a top-level content handler - if ((NW_Asc_stricmp((char*)HTTP_text_vnd_wap_wmlscript_string, - (char*)response->contentTypeString) == 0)) - { - // Script cannot be at top level - status = KBrsrScriptBadContent; - } - - // Try to create a content handler for - if (status == KBrsrSuccess) - { - // create content handler - contentHandler = NW_HED_MimeTable_CreateContentHandler(thisObj->mimeTable, - owner, - response->contentTypeString, - urlRequest, response, NW_TRUE); - // we do support the content-type so initialize the newly created - // content-handler - if (contentHandler != NULL) - { - NW_HED_HistoryEntry_t* currentEntry; - NW_Bool deleteBoxTree = NW_TRUE; - - thisObj->documentListener->NewDocument (thisObj, urlRequest, deleteBoxTree); - // update the history - NW_HED_DocumentRoot_UpdateHistory(thisObj, contentHandler, urlRequest, response); - - // associate content handler with current history entry - currentEntry = NW_HED_HistoryStack_GetEntry(thisObj->historyStack, - NW_HED_HistoryStack_Direction_Current); - - NW_HED_ContentHandler_SetAssociatedHistoryEntry(contentHandler, currentEntry); - - // delete old certInfo, store the new certInfo - NW_Mem_Free(thisObj->certInfo); - thisObj->certInfo = NULL; - if (response != NULL) - { - thisObj->certInfo = response->certInfo; - // take ownership - response->certInfo = NULL; - } - - // set childnode. current childnode is saved as previous at - // MHEDDocumentListener::NewDocument - thisObj->childNode = NW_HED_DocumentNodeOf( contentHandler ); - } - else - { - // if this is null we don't support the content-type of the response - status = KBrsrWmlbrowserBadContentType; - } - } - - *newContentHandler = contentHandler; - - return status; - } - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_HED_DocumentRoot_OnLoadError (NW_HED_DocumentRoot_t* thisObj, - NW_Int16 errorClass, - NW_WaeError_t error) -{ - return thisObj->documentListener->LoadEnd (thisObj, errorClass, error); - /* Be careful adding code after this line, since we may already exitted the browser */ - -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_HED_DocumentRoot_HandleLoadError (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error) -{ - (void) urlRequest; - - /* - ** only handle errors generated by the document-root or the - ** current content handler. - */ - if ((owner == NW_HED_DocumentNodeOf (thisObj)) || - (owner == NW_HED_DocumentNodeOf (thisObj->childNode))) { - thisObj->documentErrorClass = errorClass; - thisObj->documentError = error; - (void)NW_HED_DocumentNode_Cancel (thisObj, NW_HED_CancelType_Error); - } -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_HED_DocumentRoot_HandleIntraPageNavError (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error) -{ - (void) urlRequest; - - /* - ** only handle errors generated by the document-root or the - ** current content handler. - */ - if ((owner == NW_HED_DocumentNodeOf (thisObj)) || - (owner == NW_HED_DocumentNodeOf (thisObj->childNode))) { - thisObj->documentErrorClass = errorClass; - thisObj->documentError = error; - (void)NW_HED_DocumentNode_Cancel (thisObj, NW_HED_CancelType_Error); - } -} - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_HED_DocumentRoot_HandleSteadyStateError (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error) -{ - (void) owner; - (void) urlRequest; - - /* simply show the error */ - return thisObj->documentListener->ReportError (thisObj, errorClass, (NW_WaeError_t) error, NULL); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_DocumentRoot_GetRestoreHistoryDirection (NW_HED_DocumentRoot_t* thisObj, - NW_HED_HistoryStack_Direction_t* restoreDir) -{ - NW_HED_HistoryEntry_t* entry = NULL; - const NW_HED_UrlRequest_t* urlReq = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint8 reason; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - NW_ASSERT (restoreDir); - - /* get the reason the current load was issued */ - NW_THROWIF_NULL (entry = NW_HED_HistoryStack_GetEntry (thisObj->historyStack, - NW_HED_HistoryStack_Direction_Current)); - NW_THROWIF_NULL (urlReq = NW_HED_HistoryEntry_GetUrlRequest (entry)); - - reason = NW_HED_UrlRequest_GetReason (urlReq); - - /* - ** given the reason for the load that just failed determine the history - ** direction that would "restore" it. If the reason was either restore-next - ** or restore-prev then the "restored" page failed for some reason and we - ** should do nothing. - */ - - switch (reason) - { - case NW_HED_UrlRequest_Reason_ShellPrev: - case NW_HED_UrlRequest_Reason_DocPrev: - *restoreDir = NW_HED_HistoryStack_Direction_RestoreNext; - break; - - case NW_HED_UrlRequest_Reason_DocLoad: - case NW_HED_UrlRequest_Reason_ShellLoad: - case NW_HED_UrlRequest_Reason_ShellNext: - *restoreDir = NW_HED_HistoryStack_Direction_RestorePrevious; - break; - - case NW_HED_UrlRequest_Reason_ShellReload: - case NW_HED_UrlRequest_Reason_Undefined: - case NW_HED_UrlRequest_Reason_DocLoadChild: - status = KBrsrFailure; - break; - - case NW_HED_UrlRequest_Reason_RestorePrev: - case NW_HED_UrlRequest_Reason_RestoreNext: - status = KBrsrFailure; - break; - } - - return status; - -NW_CATCH_ERROR - status = KBrsrFailure; - return status; -} - - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_HED_DocumentRoot_RestorePrev (NW_HED_DocumentRoot_t* thisObj, - NW_Int16 errorClass, - NW_WaeError_t error) -{ - TBrowserStatusCode status; - NW_HED_HistoryStack_Direction_t restoreDir(NW_HED_HistoryStack_Direction_Current); - - /* avoid 'unreferenced formal parameter' warnings */ - (void) errorClass; - (void) error; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* load the previous page from history */ - status = - NW_HED_DocumentRoot_GetRestoreHistoryDirection (thisObj, &restoreDir); - if (status == KBrsrSuccess) { - (void) NW_HED_DocumentRoot_HistoryLoad (thisObj, restoreDir); - } - - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_HED_DocumentRoot_HandlePageLoadStarted (NW_HED_DocumentRoot_t* thisObj) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* reset the documentStatus and set the loading flag */ - thisObj->documentErrorClass = BRSR_STAT_CLASS_NONE; - thisObj->documentError = KBrsrSuccess; - thisObj->isLoading = NW_TRUE; - thisObj->chunkIndex = 0; -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_HED_DocumentRoot_HandlePageLoadCompleted (NW_HED_DocumentRoot_t* thisObj) -{ - NW_Bool cancel = NW_FALSE; - NW_Int16 errorClass; - NW_WaeError_t error; - NW_Bool exitBrowser = NW_FALSE; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* reset the loading flag */ - thisObj->isLoading = NW_FALSE; - - /* reset the cancel flag and store the status for further use */ - if (thisObj->isCancelling == NW_TRUE) { - cancel = thisObj->isCancelling; - thisObj->isCancelling = NW_FALSE; - } - - /* reset the documentStatus */ - errorClass = thisObj->documentErrorClass; - error = thisObj->documentError; - - thisObj->documentErrorClass = BRSR_STAT_CLASS_NONE; - thisObj->documentError = KBrsrSuccess; - - /* - ** it is possible for a page to load embedded resources while - ** performing intra-page navigation (this can happen in wml while navigating - ** between cards that contain images). When all of the embedded resources - ** are loaded this method will be called. In this case we simply need to - ** call HandleIntraPageNavigationCompleted. - */ - if (thisObj->isIntraPageNav > 0) { - (void) NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (thisObj); - } - - /* if the page loaded without errors... */ - else if (error == KBrsrSuccess) { - /* - ** tell the content handler that all of it loads are done so that it - ** can start tasks that were postponed until the document was completely loaded. - */ - if(thisObj->childNode) { - NW_HED_DocumentNode_AllLoadsCompleted (thisObj->childNode); - } - } - - /* - ** else if cancelled... Currently the thought is to treat cancel just - ** like any other error (which is handled below). One could add a - ** block here to handle it differently. - */ - - /* else the page failed to load... */ - else { - if (errorClass != BRSR_STAT_CLASS_GENERAL || - error != KBrsrHedContentDispatched) { - exitBrowser = thisObj->documentListener->ReportError (thisObj, errorClass, error, NW_HED_DocumentRoot_OnLoadError); - } - if (exitBrowser == NW_TRUE) { - return; - } - - if (thisObj->childNode == NULL) { - return; - } - } - - /* if cancel mechanism was in progress load the most recent urlRequest - if it exists*/ - if (cancel == NW_TRUE) { - - if (thisObj->nextUrlRequestToLoad != NULL) { - NW_HED_UrlRequest_t *urlRequest; - - urlRequest = thisObj->nextUrlRequestToLoad; - thisObj->nextUrlRequestToLoad = NULL; - NW_HED_DocumentRoot_StartRequest (thisObj, NW_HED_DocumentNodeOf(thisObj), - urlRequest, NULL ); - } - } -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_DocumentRoot_InitContexts (NW_HED_DocumentRoot_t* thisObj) -{ - NW_Int8 id; - NW_HED_Context_t* globalContext = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - thisObj->contextMap = NULL; - - /* create the map */ - NW_THROWIF_NULL (thisObj->contextMap = NW_ADT_ResizableMap_New (sizeof (NW_Int8), - sizeof (NW_HED_Context_t*), 2, 1)); - - /* create and add the global context */ - NW_THROWIF_NULL (globalContext = NW_HED_Context_New()); - - id = NW_HED_DocumentRoot_ContextGlobalId; - NW_THROWIF_ERROR (NW_HED_DocumentRoot_AddContext (thisObj, globalContext, &id)); - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_Object_Delete (thisObj->contextMap); - thisObj->contextMap = NULL; - - NW_Object_Delete (globalContext); - - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_HED_DocumentRoot_ShutdownContexts (NW_HED_DocumentRoot_t* thisObj) -{ - NW_ADT_MapIterator_t mapIterator; - void **key; - void** valuePtr; - TBrowserStatusCode status; - NW_ADT_Iterator_t *iterator; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* delete each context */ - status = NW_ADT_MapIterator_Initialize(&mapIterator,thisObj->contextMap); - if (status!= KBrsrSuccess){ - return; - } - iterator = NW_ADT_IteratorOf(&mapIterator); - while (NW_ADT_Iterator_HasMoreElements (iterator)) { - NW_HED_Context_t* context; - - key = NW_ADT_Iterator_NextElement (iterator); - NW_ASSERT (key != NULL); - - /* fetch a pointer to the value from the map Returns NULL if item - doesn't exist. */ - valuePtr = NW_ADT_Map_GetUnsafe (thisObj->contextMap, key); - - /* use byte-wise copy to get the unaligned data at valuePtr into - the context pointer */ - if (valuePtr != NULL) - { - (void) NW_Mem_memcpy (&context, valuePtr, sizeof context); - } - else - { - /* no context exists for the given key */ - context = NULL; - } - - NW_Object_Delete (context); - } - - - /* delete the map */ - NW_Object_Delete (thisObj->contextMap); - thisObj->contextMap = NULL; - - return; - -} - -/* ------------------------------------------------------------------------- */ -const -NW_HED_DocumentRoot_Class_t NW_HED_DocumentRoot_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_DocumentNode_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_HED_DocumentRoot_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_DocumentRoot_t), - /* construct */ _NW_HED_DocumentRoot_Construct, - /* destruct */ _NW_HED_DocumentRoot_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_HED_DocumentRoot_Cancel, - /* partialLoadCallback */ _NW_HED_DocumentRoot_PartialLoadCallback, - /* initialize */ _NW_HED_DocumentNode_Initialize, - /* nodeChanged */ _NW_HED_DocumentRoot_NodeChanged, - /* getBoxTree */ _NW_HED_DocumentRoot_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentRoot_HandleError, - /* suspend */ _NW_HED_DocumentRoot_Suspend, - /* resume */ _NW_HED_DocumentRoot_Resume, - /* allLoadsCompleted */ _NW_HED_DocumentRoot_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_HED_DocumentRoot_LoseFocus, - /* GainFocus */ _NW_HED_DocumentRoot_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_DocumentRoot */ - /* documentDisplayed */ _NW_HED_DocumentRoot_DocumentDisplayed - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const NW_HED_DocumentRoot_InterfaceList[] = { - &NW_HED_DocumentRoot_ICompositeNode_Class, - &NW_HED_DocumentRoot_ILoadRecipient_Class, - &NW_HED_DocumentRoot_ILoaderListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_ICompositeNode_Class_t NW_HED_DocumentRoot_ICompositeNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ICompositeNode_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_HED_DocumentRoot_t, - NW_HED_ICompositeNode) - }, - { /* NW_HED_ICompositeNode */ - /* removeChild */ _NW_HED_DocumentRoot_ICompositeNode_RemoveChild, - /* getChildren */ _NW_HED_DocumentRoot_ICompositeNode_GetChildren - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ILoadRecipient_Class_t NW_HED_DocumentRoot_ILoadRecipient_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ILoadRecipient_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_HED_DocumentRoot_t, - NW_HED_ILoadRecipient) - }, - { /* NW_HED_ILoadRecipient */ - /* processPartialLoad */ _NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_HED_ILoaderListener_Class_t NW_HED_DocumentRoot_ILoaderListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ILoaderListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_HED_DocumentRoot_t, - NW_HED_ILoaderListener) - }, - { /* NW_HED_ILoaderListener */ - /* isLoading */ _NW_HED_DocumentRoot_ILoaderListener_IsLoading, - /* loadProgressOn */ _NW_HED_DocumentRoot_ILoaderListener_LoadProgressOn, - /* loadProgressOff */ _NW_HED_DocumentRoot_ILoaderListener_LoadProgressOff - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_HED_DocumentRoot_t* thisObj = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_HED_DocumentRoot_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (dynamicObject); - - NW_TRY (status) { - /* invoke our superclass constructor */ - status = _NW_HED_DocumentNode_Construct (dynamicObject, argList); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - thisObj->mimeTable = va_arg (*argList, NW_HED_MimeTable_t*); - NW_ASSERT (thisObj->mimeTable != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->mimeTable, - &NW_HED_MimeTable_Class)); - - thisObj->appServices = va_arg (*argList, NW_HED_AppServices_t*); - NW_ASSERT (thisObj->appServices != NULL); - - thisObj->browserApp_Ctx = va_arg(*argList, void*); - -/* Let's be pessimistic and assume that function calls below will fail.. */ - status = KBrsrFailure; - - thisObj->loadList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_HED_DocumentRoot_LoadContext_t*), - 5, 10); - NW_THROW_OOM_ON_NULL (thisObj->loadList, status); - thisObj->loader = NW_HED_Loader_New (); - NW_THROW_OOM_ON_NULL (thisObj->loader, status); - status = - NW_HED_Loader_SetLoaderListener (thisObj->loader, - &thisObj->NW_HED_ILoaderListener); - - thisObj->historyStack = NW_HED_HistoryStack_New (); - NW_THROW_OOM_ON_NULL (thisObj->historyStack, status); - - status = NW_HED_DocumentRoot_InitContexts (thisObj); - NW_THROW_ON_ERROR (status); - - /*this may not be the best place for this - vk*/ - thisObj->isCancelling = NW_FALSE; - thisObj->certInfo = NULL; - } - - NW_CATCH (status) { - NW_HED_DocumentRoot_ShutdownContexts (thisObj); - NW_Object_Delete (thisObj->historyStack); - NW_Object_Delete (thisObj->loader); - NW_Object_Delete (thisObj->loadList); - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (dynamicObject); - - NW_Mem_Free(thisObj->certInfo); - - /* delete our dynamic members */ - NW_Object_Delete (thisObj->historyStack); - NW_Object_Delete (thisObj->childNode); - NW_Object_Delete (thisObj->loader); - - if(thisObj->loadList != NULL) - { - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t i; - - size = NW_ADT_Vector_GetSize(thisObj->loadList); - for (i =0; i <size; i++) - { - NW_HED_DocumentRoot_LoadContext_t* loadContext; - - loadContext = *(NW_HED_DocumentRoot_LoadContext_t**) - NW_ADT_Vector_ElementAt (thisObj->loadList, i); - NW_Mem_Free(loadContext); - loadContext = NULL; - } - NW_Object_Delete(thisObj->loadList); - } - - - - NW_HED_DocumentRoot_ShutdownContexts (thisObj); -} - -/* ------------------------------------------------------------------------- * - NW_HED_DocumentNode methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_Cancel (NW_HED_DocumentNode_t* /*documentNode*/, - NW_HED_CancelType_t /*cancelType*/) -{ -/* NW_HED_DocumentRoot_t* thisObj; - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentRoot_Class)); - - // for convenience - thisObj = NW_HED_DocumentRootOf (documentNode); - - // If there are requests in the request list and if the isCancelling - // flag is not already set,set the isCancelling flag to indicate - // that the cancel mechanism is in progress. Call - // NW_HED_Loader_CancelAllLoads to cancel all outstanding requests - if (!thisObj->isCancelling) { - if (NW_HED_Loader_GetRequestListSize (thisObj->loader) > 0) { - thisObj->isCancelling = NW_TRUE; - NW_HED_Loader_CancelAllLoads (thisObj->loader); - } - } - - if (thisObj->childNode != NULL) { - (void)NW_HED_DocumentNode_Cancel (thisObj->childNode, cancelType); - } -*/ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_PartialLoadCallback(NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode loadStatus, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context ) - { - NW_REQUIRED_PARAM( context ); - NW_REQUIRED_PARAM( transactionId ); - NW_REQUIRED_PARAM( urlRequest ); - NW_REQUIRED_PARAM( loadStatus ); - - NW_TRY( status ) - { - NW_HED_DocumentRoot_t* thisObj; - thisObj = NW_HED_DocumentRootOf( documentNode ); - - // keep track of chunk - thisObj->chunkIndex = chunkIndex; - - // first chunk - if( chunkIndex == 0 ) - { - status = NW_HED_ContentHandler_PartialNextChunk( - NW_HED_ContentHandlerOf( thisObj->childNode ), chunkIndex, response, context ); - _NW_THROW_ON_ERROR( status ); - } - // further chunk - else if( chunkIndex != -1 ) - { - status = NW_HED_ContentHandler_PartialNextChunk( - NW_HED_ContentHandlerOf( thisObj->childNode ), chunkIndex, response, context ); - _NW_THROW_ON_ERROR( status ); - } - // the last chunk. - else - { - NW_LOG0( NW_LOG_LEVEL2, "Performance measurement: top-level content loaded" ); - // initialize the content handler - status = NW_HED_DocumentNode_Initialize( thisObj->childNode, loadStatus ); - // Notify the document listener that we've loaded a new document - (void)thisObj->documentListener->LoadEnd (thisObj, BRSR_STAT_CLASS_GENERAL, status); - // dispatched content means load success - if( status == KBrsrHedContentDispatched ) - { - status = KBrsrSuccess; - } - // last response is not taken by the content handler, - // let's release it right here - UrlLoader_UrlResponseDelete( response ); - - _NW_THROW_ON_ERROR( status ); - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* deal with the 'unreferenced formal parameter' warning */ - (void) childNode; - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - /* notify our listener */ - (void)thisObj->documentListener->DocumentChanged( thisObj, ((CActive::TPriority)( CActive::EPriorityLow + 2 )) ); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - if(thisObj->childNode == NULL) - { - return KBrsrFailure; - } - /* we simply allow our single child to create its box tree within the - supplied parent box */ - return NW_HED_DocumentNode_GetBoxTree (thisObj->childNode, boxTree); -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_HandleError (NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - NW_WaeError_t error) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentRoot_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - if (NW_HED_DocumentRoot_IsLoading(thisObj) == NW_TRUE) { - NW_HED_DocumentRoot_HandleLoadError (thisObj, documentNode, urlRequest, - errorClass, (TBrowserStatusCode) error); - } - else if (NW_HED_DocumentRoot_IsIntraPageNav(thisObj) > 0) { - NW_HED_DocumentRoot_HandleIntraPageNavError (thisObj, documentNode, - urlRequest, errorClass, - (TBrowserStatusCode) error); - } - else { - NW_HED_DocumentRoot_HandleSteadyStateError (thisObj, documentNode, - urlRequest, errorClass, - (TBrowserStatusCode) error); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree) - { - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - /* we simply suspend our one child */ - if( thisObj->childNode != NULL ) - { - NW_HED_DocumentNode_Suspend ( thisObj->childNode, aDestroyBoxTree ); - } - thisObj->childNode = NULL; - } - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_Resume (NW_HED_DocumentNode_t* documentNode) - { - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf( documentNode ); - - if (thisObj->childNode != NULL) - { - /* resume the content handler to cause it to reactivate */ - NW_HED_DocumentNode_Resume ( thisObj->childNode ); - } - /* notify our listener */ - (void)thisObj->documentListener->DocumentChanged( thisObj, ((CActive::TPriority)( CActive::EPriorityLow + 2 )) ); - } - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - /* we simply tell our one child */ - if (thisObj->childNode != NULL) { - NW_HED_DocumentNode_AllLoadsCompleted (thisObj->childNode); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_LoseFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - /* we losefocus for our one child */ - if (thisObj->childNode != NULL) { - NW_HED_DocumentNode_LoseFocus (thisObj->childNode); - } -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_GainFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_HED_DocumentRootOf (documentNode); - - /* we gainfocus our one child */ - if (thisObj->childNode != NULL) { - NW_HED_DocumentNode_GainFocus (thisObj->childNode); - } -} - -/* ------------------------------------------------------------------------- * - NW_HED_ICompositeNode method implemtations - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ICompositeNode_RemoveChild (NW_HED_ICompositeNode_t* icompositeNode, - NW_HED_DocumentNode_t* childNode) -{ - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (icompositeNode, - &NW_HED_DocumentRoot_ICompositeNode_Class)); - - /* for convenience */ - thisObj = (NW_HED_DocumentRoot_t*)NW_Object_Interface_GetImplementer (icompositeNode); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* only remove the node if it actually matches */ - if (NW_HED_DocumentNodeOf (thisObj->childNode) != childNode) { - return KBrsrNotFound; - } - - thisObj->childNode = NULL; - childNode->parent = NULL; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ICompositeNode_GetChildren (NW_HED_ICompositeNode_t* icompositeNode, - NW_ADT_Iterator_t** childIterator) -{ - NW_HED_DocumentRoot_t* thisObj; - NW_ADT_SingleIterator_t* iterator; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (icompositeNode, - &NW_HED_DocumentRoot_ICompositeNode_Class)); - - /* for convenience */ - thisObj = (NW_HED_DocumentRoot_t*)NW_Object_Interface_GetImplementer (icompositeNode); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* instantiate the iterator */ - iterator = NW_ADT_SingleIterator_New (&thisObj->childNode, - sizeof (thisObj->childNode)); - if (iterator == NULL) { - return KBrsrOutOfMemory; - } - *childIterator = (NW_ADT_Iterator_t*) iterator; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - ILoadRecipient implementation - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad( NW_HED_ILoadRecipient_t* thisObj, - TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - NW_HED_UrlRequest_t* urlRequest, - void* clientData ) - { - TBrowserStatusCode failedStatus = KBrsrSuccess; - NW_HED_DocumentRoot_t* documentRoot; - NW_HED_DocumentRoot_LoadContext_t* loadContext = NULL; - NW_ADT_Vector_Metric_t index; - - NW_TRY( status ) - { - // parameter assertion block - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, - &NW_HED_DocumentRoot_ILoadRecipient_Class ) ); - NW_ASSERT( urlRequest != NULL ); - NW_ASSERT( clientData != NULL ); - - // for convenience - documentRoot = (NW_HED_DocumentRoot_t*) - NW_Object_QueryInterface (thisObj, &NW_HED_DocumentRoot_Class); - loadContext = (NW_HED_DocumentRoot_LoadContext_t*) clientData; - - NW_LOG4( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad START trans=%d chunkIndex=%d status=%d, loadStatus=%d", - transactionId, chunkIndex, status, loadStatus ); - - // find the loadContext on our load list - if it isn't there, the load has - // been deleted and should not be processed - index = NW_ADT_Vector_GetElementIndex( documentRoot->loadList, &loadContext ); - if( index != NW_ADT_Vector_AtEnd ) - { - // some general checks - status = NW_HED_PartialLoad_ValidityCheck( documentRoot, &loadContext->owner, - loadStatus, response, urlRequest ); - _NW_THROW_ON_ERROR( status ); - _NW_THROW_ON_ERROR( loadStatus ); - - // Report each chunk to the load observer -- except the last one. - if (loadContext->loadObserver && response) - { - if (chunkIndex >= 0) - { - loadContext->loadObserver->ChunkReceived(transactionId, chunkIndex, *response, - *urlRequest, clientData); - } - } - - if( chunkIndex == 0 ) - { - NW_HED_ContentHandler_t* newContentHandler = NULL; - // first chunk - if( NW_HED_UrlRequest_IsTopLevelRequest( urlRequest ) == NW_TRUE ) - { - // create content handler - status = NW_HED_DocumentRoot_CreateTopLevelContentHandler( documentRoot, loadContext->owner, - response, urlRequest, &newContentHandler ); - _NW_THROW_ON_ERROR( status ); - } - // pass the content to the owner - status = NW_HED_DocumentNode_PartialLoadCallback( loadContext->owner, loadStatus, chunkIndex, - urlRequest, response, transactionId, loadContext->clientData ); - // NW_HED_DocumentNode_PartialLoadCallback takes the ownership of response - response = NULL; - - _NW_THROW_ON_ERROR( status ); - // destroy prev document if the first chunk is all set unless - // the new document is an unknown content handler or a wml ch ( onenterbackward) - if( newContentHandler ) - { - if( NW_Object_IsClass( newContentHandler, &NW_Wml1x_Epoc32ContentHandler_Class ) != NW_TRUE ) - { - documentRoot->documentListener->DestroyPreviousDocument(); - } - } - } - // further chunks - else if( chunkIndex != -1 ) - { - // page continues - status = NW_HED_DocumentNode_PartialLoadCallback( loadContext->owner, loadStatus, chunkIndex, - urlRequest, response, transactionId, loadContext->clientData ); - // NW_HED_DocumentNode_PartialLoadCallback takes the ownership of response - response = NULL; - - _NW_THROW_ON_ERROR( status ); - } - // last chunk - else - { - NW_Bool isInHistoryStack; - // remove the loadContext from the list - TBrowserStatusCode tempStatus = NW_ADT_DynamicVector_RemoveAt( documentRoot->loadList, index ); - NW_ASSERT( tempStatus == KBrsrSuccess ); - - // Report the successful handling of the resource. - if (loadContext->loadObserver) - { - if (response && (response->method == NW_URL_METHOD_HEAD)) - { - loadContext->loadObserver->HeadCompleted(transactionId, *response, - *urlRequest, clientData); - } - else - { - loadContext->loadObserver->LoadCompleted(BRSR_STAT_CLASS_GENERAL, KBrsrSuccess, - transactionId, *urlRequest, clientData); - } - } - - // Check to see if urlRequest is in the HistoryStack now. This is - // necessary because a WML card could indicate new context in which - // case the HistoryStack will be cleared. If it's ever in the stack - // then the stack owns it; otherwise, this method owns it and needs - // to deallocate it when done with it. Only top-level-requests are - // added to the HistoryStack so only those have to be checked against - // the stack. - if( NW_HED_UrlRequest_IsTopLevelRequest( urlRequest ) ) - { - isInHistoryStack = NW_HED_HistoryStack_IsUrlinHistory( documentRoot->historyStack, urlRequest ); - } - else - { - isInHistoryStack = NW_FALSE; - } - - // final chunk. it does not have any body though. - status = NW_HED_DocumentNode_PartialLoadCallback( loadContext->owner, loadStatus, chunkIndex, - urlRequest, response, transactionId, loadContext->clientData ); - // NW_HED_DocumentNode_PartialLoadCallback takes the ownership of response - response = NULL; - - _NW_THROW_ON_ERROR( status ); - - // urlrequest is no longer needed and may need to be deleted. It gets - // deleted if it's not, or was never, in the HistoryStack. - if( !isInHistoryStack ) - { - NW_Object_Delete( urlRequest ); - } - // free the loadContext - NW_Mem_Free( loadContext ); - loadContext = NULL; - } - } - else - { - // no associated entry found - NW_THROW_STATUS( status, KBrsrFailure ); - } - } - NW_CATCH( status ) - { - NW_Int16 errorClass = BRSR_STAT_CLASS_GENERAL; - - // Report the failed handling of the resource to the load observer. - if (loadContext && loadContext->loadObserver) - { - TBrowserStatusCode stat; - NW_Int16 statClass; - - if( (loadStatus == KBrsrHttpStatus) && (response != NULL) ) - { - stat = response->httpStatus; - statClass = BRSR_STAT_CLASS_HTTP; - } - else - { - stat = status; - statClass = BRSR_STAT_CLASS_GENERAL; - } - - loadContext->loadObserver->LoadCompleted(statClass, stat, transactionId, *urlRequest, clientData); - } - - // any chunk can fail and any chunk can cancel itself by failing. - NW_LOG4( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad Chunk failed trans=%d chunkIndex=%d status=%d, loadStatus=%d", - transactionId, chunkIndex, status, loadStatus ); - - // in case of top level request. - if( NW_HED_UrlRequest_IsTopLevelRequest( urlRequest ) == NW_TRUE ) - { - // handle http errors - if( loadStatus != KBrsrSuccess ) - { - failedStatus = loadStatus; - - // all http errors (except cancel) - // remove current top level trans from the load list as HandlerError puts a cancellAll call on - // all transactions in this list. - NW_HED_Loader_RemoveTransFromLoadList( documentRoot->loader, transactionId ); - // report top level http error - - if( loadStatus == KBrsrHttpStatus && response != NULL ) - { - // set loadStatus to the actual error number. - loadStatus = response->httpStatus; - errorClass = BRSR_STAT_CLASS_HTTP; - } - if (loadContext && loadContext->owner) - { - NW_HED_DocumentNode_HandleError( loadContext->owner, urlRequest, errorClass, (NW_WaeError_t)loadStatus ); - } - } - // non-http errors - else if( status != KBrsrSuccess ) - { - failedStatus = status; - - NW_LOG0( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad non http error" ); - // We need to cancel any top level transaction that fails due to bad content etc - // the cancel reason must be KBrsrFailure so that when the cancel comes back from - // stack we know that the cancel has been initiated by us (we need to differentiate the cancel from - // network or the user cancel) - - // status must be set here 'cause if this is the only oustanding request, then the cancel - // calls NW_HED_ILoaderListener_IsLoading( FALSE ) at loader.c which ends up calling handleError with ok status. - // if we don't set error status here, then HandleError does not get it. - // comment continues right below - documentRoot->documentErrorClass = BRSR_STAT_CLASS_GENERAL; - documentRoot->documentError = (NW_WaeError_t)status; - - NW_HED_Loader_CancelLoad( documentRoot->loader, transactionId, KBrsrFailure ); - // part2: if there are outstanding request then let handleError take care of the rest. - if( documentRoot->isLoading == NW_TRUE ) - { - if (loadContext && loadContext->owner) - { - // report top level error - NW_HED_DocumentNode_HandleError( loadContext->owner, urlRequest, BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t)status ); - } - } - // set status to KBrsrCancelled so that the stack can be aware that this - // transaction has already been cancelled. - status = KBrsrCancelled; - } - // The new content handler has to be initialized even if it fails at some point no matter whether - // the failing is due to a user cancel or an internal error (for example: bad content). - // However, if the new content handler fails on the very first chunk, then we take the - // previous top level content handler back, and that one does not need any initialization. - // If link is broken case happens then we don't even create a new content handler so - // there is nothing to initialize. The content handler is passed the failedStatus and it can - // decide for itself whether to create the partial document or not. - if( chunkIndex != 0 && documentRoot->childNode ) - { - NW_HED_ContentHandler_t* topLevelContentHander = NW_HED_ContentHandlerOf( documentRoot->childNode ); - if( topLevelContentHander->initialized == NW_FALSE ) - { - TBrowserStatusCode initStatus; - initStatus = NW_HED_DocumentNode_Initialize( documentRoot->childNode, failedStatus ); - NW_LOG0( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad Initialization passed" ); - if ( initStatus != KBrsrSuccess && initStatus != KBrsrWmlbrowserBadContent) - { - NW_HED_DocumentRoot_RestorePrev( documentRoot, BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t)initStatus ); - } - } - } - } - // non top level errors - else - { - NW_LOG0( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad non top level error" ); - // handle http errors - if( loadStatus != KBrsrSuccess ) - { - // report top level http error - - if( loadStatus == KBrsrHttpStatus && response != NULL ) - { - // set loadStatus to the actual error number. - loadStatus = response->httpStatus; - errorClass = BRSR_STAT_CLASS_HTTP; - } - // notify the owner of the embedded load complete - if (loadContext && loadContext->owner) - { - NW_HED_DocumentNode_HandleLoadComplete( loadContext->owner, urlRequest, errorClass, loadStatus, - transactionId, loadContext->clientData ); - } - } - // non-http errors - else - { - // notify the owner of the embedded load complete - if (loadContext && loadContext->owner) - { - NW_HED_DocumentNode_HandleLoadComplete( loadContext->owner, urlRequest, BRSR_STAT_CLASS_GENERAL, status, - transactionId, loadContext->clientData ); - } - // no need either to report the error or to cancel transactions. - // ZAL: comment: http ok status failed ->cancel trans - if( chunkIndex != -1 && status != KBrsrSuccess ) - { - NW_HED_Loader_CancelLoad( documentRoot->loader, transactionId, KBrsrFailure ); - // set status to KBrsrCancelled so that the stack can be aware of that this - // transaction has already been cancelled. - status = KBrsrCancelled; - } - else - { - status = KBrsrSuccess ; - } - } - } - index = NW_ADT_Vector_GetElementIndex( documentRoot->loadList, &loadContext ); - // delete both request and response - if( index != NW_ADT_Vector_AtEnd ) - { - // pop the request off the docroot loadlist - TBrowserStatusCode tempStatus = NW_ADT_DynamicVector_RemoveAt( documentRoot->loadList, index ); - NW_ASSERT( tempStatus == KBrsrSuccess ); - - // In other cases UrlRequest is deleted by the HistoryEntry - if( NW_HED_HistoryStack_IsUrlinHistory( documentRoot->historyStack, urlRequest ) != NW_TRUE ) - { - NW_Object_Delete( urlRequest ); - } - } - // release response. note that a content handler might have released the - // response structure but then it must be NULL at this point. - UrlLoader_UrlResponseDelete( response ); - // free the loadContext - if (loadContext!=NULL) - { - NW_Mem_Free( loadContext ); - loadContext = NULL; - } - } - NW_FINALLY - { - NW_LOG4( NW_LOG_LEVEL2, "_NW_HED_DocumentRoot_ILoadRecipient_ProcessPartialLoad END trans=%d chunkIndex=%d status=%d, loadStatus=%d", - transactionId, chunkIndex, status, loadStatus ); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - ILoaderListener implementation - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_ILoaderListener_IsLoading (NW_HED_ILoaderListener_t* loaderListener, - NW_HED_Loader_t* loader, - NW_Bool state) -{ - NW_HED_DocumentRoot_t* thisObj; - - NW_REQUIRED_PARAM(loader); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (loaderListener, - &NW_HED_ILoaderListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (loader, &NW_HED_Loader_Class)); - - /* obtain the implementer */ - thisObj = (NW_HED_DocumentRoot_t*)NW_Object_Interface_GetImplementer (loaderListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - if (state == NW_TRUE) { - /* notify the MHEDDocumentListener */ - if (thisObj->isLoading == NW_FALSE && thisObj->documentListener != NULL) { - (void)thisObj->documentListener->IsActive (thisObj, state); - NW_HED_DocumentRoot_HandlePageLoadStarted (thisObj); - } - } - else { - /* notify the MHEDDocumentListener */ - if (thisObj->isLoading == NW_TRUE && thisObj->documentListener != NULL) { - (void)thisObj->documentListener->IsActive (thisObj, state); - NW_HED_DocumentRoot_HandlePageLoadCompleted (thisObj); - /* Be careful adding code after this line, since we may already exit - the browser */ - } - } -} - -/* ------------------------------------------------------------------------- * - NW_HED_DocumentRoot methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -void* -NW_HED_DocumentRoot_GetCertInfo (NW_HED_DocumentRoot_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - return thisObj->certInfo; -} - - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -NW_HED_DocumentRoot_GetTitle (NW_HED_DocumentRoot_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* the DocumentRoot does not store a title - it always returns it's child - title (if there is one) */ - if (thisObj->childNode != NULL && thisObj->documentError != KBrsrWmlbrowserBadContent) { - return NW_HED_ContentHandler_GetTitle (thisObj->childNode); - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -NW_HED_DocumentRoot_GetDocumentReferrer(NW_HED_DocumentRoot_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - return thisObj->referrerUrl; -} - - -void -NW_HED_DocumentRoot_SetDocumentReferrer(NW_HED_DocumentRoot_t* thisObj, const NW_Text_t* referrerUrl) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - thisObj->referrerUrl = (NW_Text_t*)referrerUrl; -} - - - -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest_tId2( NW_HED_DocumentRoot_t* thisObj, - const NW_HED_UrlRequest_t* aUrlRequest, - void* aLoadRecipient, - void* aClientData, - NW_Uint16* aTransactionId, - void* aLoadContext ) - { - TBrowserStatusCode status; - - status = - NW_HED_Loader_StartRequest( thisObj->loader, - aUrlRequest, - (NW_HED_ILoadRecipient_t*) aLoadRecipient, - aClientData, aTransactionId, aLoadContext ); - - return status; - } - -/* ------------------------------------------------------------------------- */ -/* upon success the ownership of urlRequest is passed to this method */ -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest_tId (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t* urlRequest, - void* clientData , NW_Uint16* aTransactionId, - void* aLoadContext) -{ - NW_HED_DocumentRoot_LoadContext_t* loadContext = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (owner, &NW_HED_DocumentNode_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - if (urlRequest && urlRequest->url) - NW_LOG1( NW_LOG_OFF, "NW_HED_DocumentRoot_StartRequest_tId START: %s", urlRequest->url->storage ); - - NW_TRY (status) { - NW_HED_ILoadRecipient_t* loadRecipient; - void** entry; - - /* terminate all outstanding load requests */ - if (NW_HED_UrlRequest_IsTopLevelRequest (urlRequest)) { - NW_LOG0( NW_LOG_LEVEL2, "Performance measurement: top level load is requested" ); - (void) NW_HED_DocumentNode_Cancel (thisObj, NW_HED_CancelType_NewRequest); - thisObj->isTopLevelRequest = NW_TRUE; - } - else { - thisObj->isTopLevelRequest = NW_FALSE; - } - - /* switch from image map view if we need to */ - thisObj->appServices->browserAppApi.SwitchFromImgMapViewIfNeeded(); - - /* if a cancel is in progress */ - if (thisObj->isCancelling == NW_TRUE) { - - /* if the new request is a top level request cache it so that we can load - it after the cancel is over provided it is not already cached */ - if ((NW_HED_UrlRequest_IsTopLevelRequest (urlRequest)) && - (thisObj->nextUrlRequestToLoad != urlRequest)) { - - /* delete the old request if not historic */ - if ((thisObj->nextUrlRequestToLoad != NULL) && - (NW_HED_UrlRequest_IsHistoricRequest (thisObj->nextUrlRequestToLoad) == NW_FALSE)) { - - NW_Object_Delete (thisObj->nextUrlRequestToLoad); - thisObj->nextUrlRequestToLoad = NULL; - } - - /* cache the top level request */ - thisObj->nextUrlRequestToLoad = NW_HED_UrlRequestOf (urlRequest); - NW_THROW_SUCCESS (status); - } - - /* if not a top level request delete the request as we do not cache it */ - else if (NW_HED_UrlRequest_IsTopLevelRequest (urlRequest) != NW_TRUE) { - NW_Object_Delete (NW_HED_UrlRequestOf (urlRequest)); - NW_THROW_SUCCESS (status); - } - - /* this is a top level request already in the cache */ - NW_THROW_SUCCESS (status); - } - /* let the current content handler try to handle the request first */ - if ((thisObj->childNode != NULL) && - (NW_HED_ContentHandler_HandleRequest (thisObj->childNode, - (NW_HED_UrlRequest_t*) urlRequest) == KBrsrSuccess)) { - NW_THROW_SUCCESS (status); - } - - /* allocate and initialize the LoadContext */ - loadContext = (NW_HED_DocumentRoot_LoadContext_t*) - NW_Mem_Malloc (sizeof (*loadContext)); - NW_THROW_OOM_ON_NULL (loadContext, status); - loadContext->owner = owner; - loadContext->loadObserver = NULL; - loadContext->clientData = clientData; - loadContext->virtualRequest = NW_FALSE; - - /* submit the load request */ - loadRecipient = (NW_HED_ILoadRecipient_t*) - NW_Object_QueryInterface (thisObj, &NW_HED_ILoadRecipient_Class); - status = - NW_HED_Loader_StartRequest (thisObj->loader, urlRequest, loadRecipient, - loadContext, &loadContext->transactionId, aLoadContext ); - if( status == KBrsrCancelled ) - { - // status == KBrsrCancelled means virtual request - loadContext->virtualRequest = NW_TRUE; - //pay attention on changing the status value TSW id: MVIA-72EJ6A - status = KBrsrSuccess; - } - _NW_THROW_ON_ERROR (status); - - /* append the loadContext to our list of outstanding loads */ - entry = NW_ADT_DynamicVector_InsertAt (thisObj->loadList, &loadContext, - NW_ADT_Vector_AtEnd); - /*NW_ASSERT (entry != NULL);*/ - if (entry == NULL) { - status = - NW_HED_Loader_DeleteLoad (thisObj->loader, loadContext->transactionId,NULL); - _NW_THROW_ON_ERROR( status ); - } - if(aTransactionId ) - { - *aTransactionId = loadContext->transactionId; - } - - } - - NW_CATCH (status) { - NW_Mem_Free (loadContext); - loadContext = NULL; - } - - NW_FINALLY { - NW_LOG0( NW_LOG_OFF, "NW_HED_DocumentRoot_StartRequest_tId End" ); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -/* upon success the ownership of urlRequest is passed to this method */ -TBrowserStatusCode -NW_HED_DocumentRoot_StartRequest (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* owner, - const NW_HED_UrlRequest_t* urlRequest, - void* clientData) - { - return NW_HED_DocumentRoot_StartRequest_tId(thisObj,owner,urlRequest, - clientData , NULL); - } -/* ------------------------------------------------------------------------- */ -/* The caller retains ownership of url */ -TBrowserStatusCode -NW_HED_DocumentRoot_StartLoad (NW_HED_DocumentRoot_t *thisObj, - NW_HED_DocumentNode_t *owner, - const NW_Text_t *url, - NW_Uint8 reason, - void *clientData, - NW_Uint8 loadType, - NW_Cache_Mode_t cacheMode) - { - NW_HED_UrlRequest_t* urlRequest = NULL; - - NW_LOG0( NW_LOG_OFF, "NW_HED_DocumentRoot_StartLoad START" ); - - NW_TRY (status) { - /* instantiate the url request structure */ - urlRequest = - NW_HED_UrlRequest_New ((NW_Text_t*) url, NW_URL_METHOD_GET, NULL, - NULL, reason, NW_HED_UrlRequest_LoadNormal, loadType ); - NW_THROW_OOM_ON_NULL (urlRequest, status); - - NW_HED_UrlRequest_SetCacheMode (urlRequest, cacheMode); - - /* issue the load request */ - status = NW_HED_DocumentRoot_StartRequest (thisObj, owner, urlRequest, - clientData ); - _NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { - NW_Object_Delete (urlRequest); - } - - NW_FINALLY { - NW_LOG1( NW_LOG_OFF, "NW_HED_DocumentRoot_StartLoad END, status: %x", status ); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_HistoryLoad (NW_HED_DocumentRoot_t *thisObj, - NW_HED_HistoryStack_Direction_t direction) -{ - TBrowserStatusCode status; - const NW_HED_UrlRequest_t *urlRequest; - const NW_HED_HistoryEntry_t *entry; - NW_Cache_Mode_t cacheMode = NW_CACHE_NORMAL; - NW_Uint8 reason; - NW_Uint8 method; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* get the url in the given direction */ - entry = NW_HED_HistoryStack_GetEntry (thisObj->historyStack, direction); - if (entry != NULL) - { - if (!NW_HED_HistoryStack_ValidateEntry(entry)) - { - entry = NULL; - } - } - if (entry == NULL) { - switch(direction) { - case NW_HED_HistoryStack_Direction_Current: - status = KBrsrHedNoCurrentHistEntry; - break; - - case NW_HED_HistoryStack_Direction_Previous: - status = KBrsrHedNoPreviousHistEntry; - break; - - case NW_HED_HistoryStack_Direction_Next: - status = KBrsrHedNoNextHistEntry; - break; - - default: - status = KBrsrFailure; - } - - return status; - } - - urlRequest = NW_HED_HistoryEntry_GetUrlRequest (entry); - NW_ASSERT (urlRequest); - - method = NW_HED_UrlRequest_GetMethod(urlRequest); - if (method == NW_URL_METHOD_POST) - { - if ((status = thisObj->appServices->securityNotes.AboutToLoadPage(ERepostConfirmation)) != KBrsrSuccess) - { - return status; - } - } - - /* set the reason and cache mode */ - if (direction == NW_HED_HistoryStack_Direction_Previous) { - reason = NW_HED_UrlRequest_Reason_ShellPrev; - cacheMode = NW_CACHE_HISTPREV; - } - else if (direction == NW_HED_HistoryStack_Direction_Next) { - reason = NW_HED_UrlRequest_Reason_ShellNext; - } - else if (direction == NW_HED_HistoryStack_Direction_Current) { - reason = NW_HED_UrlRequest_Reason_ShellReload; - cacheMode = NW_CACHE_NOCACHE; - } - else if (direction == NW_HED_HistoryStack_Direction_RestorePrevious) { - reason = NW_HED_UrlRequest_Reason_RestorePrev; - } - else if (direction == NW_HED_HistoryStack_Direction_RestoreNext) { - reason = NW_HED_UrlRequest_Reason_RestoreNext; - } - else { - NW_ASSERT (0); /* this is an error */ - reason = NW_HED_UrlRequest_Reason_Undefined; - } - - if( NW_HED_UrlRequest_GetMethod ((NW_HED_UrlRequest_t*) urlRequest) == NW_URL_METHOD_DATA ) - { - NW_HED_UrlRequest_SetMethod ((NW_HED_UrlRequest_t*) urlRequest, NW_URL_METHOD_GET); - } - NW_HED_UrlRequest_SetReason ((NW_HED_UrlRequest_t*) urlRequest, reason); - NW_HED_UrlRequest_SetCacheMode ((NW_HED_UrlRequest_t*) urlRequest, - cacheMode); - /* update the history to point to the new current entry. It is - important that this is done BEFORE StartRequest -- to support - intra-doc navigation. */ - NW_HED_HistoryStack_SetCurrent(thisObj->historyStack, direction); - - /* load the url */ - status = - NW_HED_DocumentRoot_StartRequest (thisObj, NW_HED_DocumentNodeOf (thisObj), - urlRequest, NULL ); - - /* event log function, Back or Forward */ - if (status == KBrsrSuccess) { - if (direction == NW_HED_HistoryStack_Direction_Previous) { - NW_ASSERT(thisObj->appServices != NULL); - NW_EvLog_Log(&(thisObj->appServices->evLogApi), NW_EvLog_HISTORY_FORWARD, - NULL); - } - else if (direction == NW_HED_HistoryStack_Direction_Next) { - NW_ASSERT(thisObj->appServices != NULL); - NW_EvLog_Log(&(thisObj->appServices->evLogApi), NW_EvLog_HISTORY_BACK, - NULL); - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_SetLoadObserver (NW_HED_DocumentRoot_t* thisObj, - NW_Uint16 aTransationId, - MHEDLoadObserver* aLoadObserver) - { - NW_HED_DocumentRoot_LoadContext_t* loadContext = NULL; - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t size; - - size = NW_ADT_Vector_GetSize(thisObj->loadList); - for (i = 0; i < size; i++) - { - TBrowserStatusCode status; - - loadContext = NULL; - status = NW_ADT_Vector_GetElementAt(thisObj->loadList, i, &loadContext); - - if ((status == KBrsrSuccess) && (loadContext->transactionId == aTransationId)) - { - loadContext->loadObserver = aLoadObserver; - return KBrsrSuccess; - } - } - - return KBrsrNotFound; - } - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_DocumentRoot_DeleteRequests (NW_HED_DocumentRoot_t* thisObj, - NW_HED_DocumentNode_t* childNode) - { - NW_ADT_Vector_Metric_t index; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (childNode, &NW_HED_DocumentNode_Class)); - - /* iterate through the load list canceling all requests belonging to the - childNode */ - index = NW_ADT_Vector_GetSize (thisObj->loadList); - while (index-- > 0) - { - TBrowserStatusCode status; - NW_HED_DocumentRoot_LoadContext_t* loadContext; - - loadContext = NULL; - status = NW_ADT_Vector_GetElementAt (thisObj->loadList, index, &loadContext); - NW_ASSERT (status == KBrsrSuccess); - if (loadContext->owner == childNode) - { - /* cancel the load */ - status = - NW_HED_Loader_DeleteLoad (thisObj->loader, loadContext->transactionId, - NULL); - if(status == KBrsrSuccess) - { - /* remove the entry from the loadList */ - status = NW_ADT_DynamicVector_RemoveAt (thisObj->loadList, index); - NW_ASSERT (status == KBrsrSuccess); - - /* free the load context */ - NW_Mem_Free (loadContext); - loadContext = NULL; - } - } - } - } - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -NW_HED_DocumentRoot_GetURL (NW_HED_DocumentRoot_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - if (thisObj->childNode != NULL) { - return NW_HED_ContentHandler_GetURL (thisObj->childNode); - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_UrlRequest_t* -NW_HED_DocumentRoot_GetUrlRequest (NW_HED_DocumentRoot_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - if (thisObj->childNode != NULL) { - return NW_HED_ContentHandler_GetUrlRequest (thisObj->childNode); - } - return NULL; -} - -/* ------------------------------------------------------------------------- - If *contextId is zero the documentRoot pick a value that is unused at the - time of the call (starting at the lowest possible number greater than - 100), otherwise the given contextId is used. - ---------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_AddContext (NW_HED_DocumentRoot_t* thisObj, - NW_HED_Context_t* context, - NW_Int8 *contextId) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - NW_ASSERT (context != NULL); - NW_ASSERT (contextId != NULL); - - /* if need be pick an id */ - if (contextId == NW_HED_DocumentRoot_ContextPickId) { - NW_Int8 id = 99; /* TODO change this to a define and move with - other context-id defs */ - - do { - id++; - context = NW_HED_DocumentRoot_GetContext (thisObj, id); - } while (context != NULL); - - *contextId = id; - } - - /* add the context */ - return NW_ADT_Map_Set (thisObj->contextMap, contextId, &context); -} - -/* ------------------------------------------------------------------------- - Removes the context from the document. Note the context is not freed - by this method. - ---------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_RemoveContext (NW_HED_DocumentRoot_t* thisObj, - NW_Int8 contextId) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - return NW_ADT_Map_Remove (thisObj->contextMap, &contextId); -} - -/* ------------------------------------------------------------------------- - Returns the context of the given contextId - ---------------------------------------------------------------------- */ -NW_HED_Context_t* -NW_HED_DocumentRoot_GetContext (NW_HED_DocumentRoot_t* thisObj, - NW_Int8 contextId) -{ - NW_HED_Context_t* context; - void** valuePtr; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* attempt to lookup the child ContentHandler for the key fetch a - pointer to the value from the map Returns NULL if item doesn't - exist. */ - valuePtr = NW_ADT_Map_GetUnsafe (thisObj->contextMap, &contextId); - - /* use byte-wise copy to get the unaligned data at valuePtr into the - context pointer */ - if (valuePtr != NULL) - { - (void) NW_Mem_memcpy (&context, valuePtr, sizeof context); - } - else - { - /* no context exists for the given key */ - context = NULL; - } - return context; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_SetDocumentListener (NW_HED_DocumentRoot_t* thisObj, - MHEDDocumentListener* documentListener) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - thisObj->documentListener = documentListener; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_HandleIntraPageNavigationStarted (NW_HED_DocumentRoot_t* thisObj) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* reset the documentStatus and set the loading flag */ - thisObj->documentErrorClass = BRSR_STAT_CLASS_NONE; - thisObj->documentError = KBrsrSuccess; - thisObj->isIntraPageNav++; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (NW_HED_DocumentRoot_t* thisObj) -{ - NW_Int16 errorClass; - NW_WaeError_t error; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* reset the loading flag */ - thisObj->isIntraPageNav--; - - /* reset the documentStatus and reset the loading flag */ - errorClass = thisObj->documentErrorClass; - error = thisObj->documentError; - - thisObj->documentErrorClass = BRSR_STAT_CLASS_NONE; - thisObj->documentError = KBrsrSuccess; - - /* if the navigation occurred with errors... */ - if (error != KBrsrSuccess) { - (void)thisObj->documentListener->ReportError (thisObj, errorClass, error, NW_HED_DocumentRoot_RestorePrev); - } - - else { - if (thisObj->childNode != NULL) { - (void) NW_HED_DocumentNode_IntraPageNavigationCompleted (thisObj->childNode); - } - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_CollectNumbers (NW_HED_DocumentRoot_t *thisObj, - NW_ADT_DynamicVector_t *dynamicVector) -{ - NW_HED_TreeVisitor_t treeVisitor; - - NW_TRY (status) { - /* initialize the tree visitor */ - status = NW_HED_TreeVisitor_Initialize (&treeVisitor, thisObj); - NW_THROW_ON_ERROR (status); - - /* iterate over the document tree */ - while (NW_HED_TreeVisitor_HasNext (&treeVisitor)) { - NW_HED_DocumentNode_t* documentNode; - NW_HED_INumberCollector_t* numberCollector; - - /* get the next document node in the tree */ - (void) NW_HED_TreeVisitor_GetNext (&treeVisitor, &documentNode); - - /* does it implement the INumberCollector interface? */ - numberCollector = (NW_HED_INumberCollector_t*) - NW_Object_QueryInterface (documentNode, &NW_HED_INumberCollector_Class); - if (numberCollector == NULL) { - continue; - } - - /* invoke the collect method on the interface implementation */ - status = - NW_HED_INumberCollector_Collect (numberCollector, dynamicVector); - NW_THROW_ON_ERROR (status); - } - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Terminate (&treeVisitor); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_HED_DocumentRoot_GetViewImageList (NW_HED_DocumentRoot_t *thisObj, - NW_ADT_DynamicVector_t *dynamicVector) -{ - NW_HED_TreeVisitor_t treeVisitor; - - NW_TRY (status) { - /* initialize the tree visitor */ - status = NW_HED_TreeVisitor_Initialize (&treeVisitor, thisObj); - NW_THROW_ON_ERROR (status); - - /* iterate over the document tree */ - while (NW_HED_TreeVisitor_HasNext (&treeVisitor)) - { - NW_HED_DocumentNode_t* documentNode; - NW_HED_IImageViewer_t* imageViewer; - - /* get the next document node in the tree */ - (void) NW_HED_TreeVisitor_GetNext (&treeVisitor, &documentNode); - - /* does it implement the IImageViewer interface? */ - imageViewer = (NW_HED_IImageViewer_t*) - NW_Object_QueryInterface (documentNode, &NW_HED_IImageViewer_Class); - if (imageViewer == NULL) { - continue; - } - - /* invoke the collect method on the interface implementation */ - status = NW_HED_IImageViewer_GetImage (imageViewer, dynamicVector); - NW_THROW_ON_ERROR (status); - } - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Terminate (&treeVisitor); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ShowImages(NW_HED_DocumentRoot_t *thisObj) -{ - NW_HED_TreeVisitor_t treeVisitor; - - NW_TRY (status) { - /* initialize the tree visitor */ - status = NW_HED_TreeVisitor_Initialize (&treeVisitor, thisObj); - NW_THROW_ON_ERROR (status); - - /* iterate over the document tree */ - while (NW_HED_TreeVisitor_HasNext (&treeVisitor)) - { - NW_HED_DocumentNode_t* documentNode; - NW_HED_IImageViewer_t* imageViewer; - - /* get the next document node in the tree */ - (void) NW_HED_TreeVisitor_GetNext (&treeVisitor, &documentNode); - - /* does it implement the IImageViewer interface? */ - imageViewer = (NW_HED_IImageViewer_t*) - NW_Object_QueryInterface (documentNode, &NW_HED_IImageViewer_Class); - if (imageViewer == NULL) { - continue; - } - - /* invoke the collect method on the interface implementation */ - status = NW_HED_IImageViewer_ShowImages(imageViewer); - NW_THROW_ON_ERROR (status); - } - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Terminate (&treeVisitor); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DocumentRoot_t* -NW_HED_DocumentRoot_New (NW_HED_MimeTable_t* mimeTable, - NW_HED_AppServices_t* appServices, - void* browserAppCtx) -{ - return (NW_HED_DocumentRoot_t*) - NW_Object_New (&NW_HED_DocumentRoot_Class, NULL, mimeTable, - appServices, browserAppCtx); -} -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoaderListener_LoadProgressOn (NW_HED_ILoaderListener_t *loaderListener, - NW_Uint16 transactionId) - { - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (loaderListener, - &NW_HED_ILoaderListener_Class)); - - /* obtain the implementer */ - thisObj = (NW_HED_DocumentRoot_t*)NW_Object_Interface_GetImplementer (loaderListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* notify the MHEDDocumentListener */ - if (thisObj->documentListener != NULL) - { - (void)thisObj->documentListener->LoadProgressOn (transactionId); - } - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_ILoaderListener_LoadProgressOff (NW_HED_ILoaderListener_t *loaderListener, - NW_Uint16 transactionId) - { - NW_HED_DocumentRoot_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (loaderListener, - &NW_HED_ILoaderListener_Class)); - - /* obtain the implementer */ - thisObj = (NW_HED_DocumentRoot_t*)NW_Object_Interface_GetImplementer (loaderListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* notify the MHEDDocumentListener */ - if (thisObj->documentListener != NULL) - { - (void)thisObj->documentListener->LoadProgressOff (transactionId); - } - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_DocumentRoot_DocumentDisplayed (NW_HED_DocumentRoot_t* thisObj) -{ - TBrowserStatusCode status = KBrsrSuccess; - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_DocumentRoot_Class)); - - /* Notify the content handler that the contents have been displayed. - This is necessary to support features like XHTML META refresh. */ - if (thisObj->childNode != NULL && - NW_Object_IsInstanceOf (thisObj->childNode, &NW_HED_CompositeContentHandler_Class) ) { - status = NW_HED_CompositeContentHandler_DocumentDisplayed (thisObj->childNode); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_DocumentRoot_IsContextSwitchPending (NW_HED_DocumentRoot_t* thisObj) -{ - // If a top-level load is in progress and it's still on the first chunk then - // a context switch is pending. - if (thisObj->isLoading && thisObj->isTopLevelRequest && (thisObj->chunkIndex == 0)) { - return NW_TRUE; - } - // A cancel in progress on a top-level load after the first chunk implies a - // context switch. - if (thisObj->isCancelling && thisObj->isTopLevelRequest && (thisObj->chunkIndex != 0)) { - return NW_TRUE; - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -void -NW_HED_DocumentRoot_SetHistoryControl(NW_HED_DocumentRoot_t* thisObj, CWmlControl* aWmlControl) - { - SetOssHistoryControl( thisObj->historyStack, aWmlControl ); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDEventHandler.cpp --- a/webengine/wmlengine/src/hed/src/HEDEventHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_hedeventhandleri.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_EventHandler_Class_t NW_HED_EventHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_EventHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_EventHandler_t), - /* construct */ _NW_HED_EventHandler_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_EventHandler */ - /* processEvent */ _NW_HED_EventHandler_ProcessEvent - }, - { /* NW_HED_EventHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_EventHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_EventHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_EventHandlerOf (dynamicObject); - - /* initialize our member variables */ - thisObj->documentNode = va_arg (*argp, NW_HED_DocumentNode_t*); - thisObj->context = va_arg (*argp, void*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_HED_EventHandler_ProcessEvent (NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_HED_EventHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_EventHandlerOf (eventHandler); - - /* simply call the stored DocumentNode's 'ProcessEvent' method */ - return NW_HED_DocumentNode_ProcessEvent (thisObj->documentNode, box, - event, thisObj->context); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_EventHandler_t* -NW_HED_EventHandler_New (NW_HED_DocumentNode_t* documentNode, - void* context) -{ - return (NW_HED_EventHandler_t*) - NW_Object_New (&NW_HED_EventHandler_Class, documentNode, context); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDICompositeNode.cpp --- a/webengine/wmlengine/src/hed/src/HEDICompositeNode.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_icompositenodei.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_ICompositeNode_Class_t NW_HED_ICompositeNode_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Secondary_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_HED_ICompositeNode */ - /* removeChild */ NULL, - /* getChildren */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDIFormFiller.cpp --- a/webengine/wmlengine/src/hed/src/HEDIFormFiller.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2002 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_iformfilleri.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -const NW_HED_IFormFiller_Class_t NW_HED_IFormFiller_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ 0 - }, - { /* NW_HED_IFormFiller */ - /* ECMLExists */ NULL, - /* fillAll */ NULL, - /* fillOne */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HEDTreeVisitor.cpp --- a/webengine/wmlengine/src/hed/src/HEDTreeVisitor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_treevisitori.h" -#include "nw_hed_compositecontenthandler.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_TreeVisitor_Class_t NW_HED_TreeVisitor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_TreeVisitor_t), - /* construct */ _NW_HED_TreeVisitor_Construct, - /* destruct */ _NW_HED_TreeVisitor_Destruct - }, - { /* NW_HED_TreeVisitor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_TreeVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_HED_TreeVisitor_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_HED_TreeVisitor_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_HED_TreeVisitorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->rootNode = va_arg (*argList, NW_HED_DocumentNode_t*); - if (!NW_Object_IsInstanceOf (thisObj->rootNode, - &NW_HED_DocumentNode_Class)) { - return KBrsrBadInputParam; - } - thisObj->currentNode = thisObj->rootNode; - - return KBrsrSuccess; -} - -void -_NW_HED_TreeVisitor_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_TreeVisitor_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_HED_TreeVisitor_Class)); - - /* for convenience */ - thisObj = NW_HED_TreeVisitorOf (dynamicObject); - - if (thisObj->childIterator != NULL) { - NW_Object_Delete (thisObj->childIterator); - thisObj->childIterator = NULL; - } -} -/* ------------------------------------------------------------------------- * - NW_HED_TreeVisitor methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_HED_TreeVisitor_HasNext (NW_HED_TreeVisitor_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_TreeVisitor_Class)); - - return (NW_Bool) (thisObj->currentNode == NULL ? NW_FALSE : NW_TRUE); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_TreeVisitor_GetNext (NW_HED_TreeVisitor_t* thisObj, - NW_HED_DocumentNode_t** documentNode) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_TreeVisitor_Class)); - NW_ASSERT (documentNode != NULL); - - NW_TRY (status) { - - /* set the 'documentNode' with the current node */ - NW_THROW_ON_NULL (thisObj->currentNode, status, KBrsrNotFound); - *documentNode = thisObj->currentNode; - - /* does the node have children */ - status = - NW_HED_TreeVisitor_NextSibling (thisObj, thisObj->currentNode, NULL); - if (status != KBrsrNotFound) { - NW_THROW_ON_ERROR (status); - NW_THROW_SUCCESS (status); - } - - /* climb the tree looking for siblings */ - while (status != KBrsrSuccess) { - NW_HED_DocumentNode_t* parentNode; - - /* we're done if the current node is the root node */ - if (thisObj->currentNode == thisObj->rootNode) { - thisObj->currentNode = NULL; - break; - } - - /* get the next sibling */ - parentNode = NW_HED_DocumentNode_GetParentNode (thisObj->currentNode); - status = NW_HED_TreeVisitor_NextSibling (thisObj, parentNode, - thisObj->currentNode); - if (status != KBrsrSuccess) { - if (status != KBrsrNotFound) { - NW_THROW (status); - } - - thisObj->currentNode = parentNode; - } - } - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_TreeVisitor_NextSibling (NW_HED_TreeVisitor_t* thisObj, - NW_HED_DocumentNode_t* parentNode, - NW_HED_DocumentNode_t* node) -{ - NW_TRY (status) { - NW_HED_DocumentNode_t* documentNode; - - /* if there is no childIterator cached, we need to get one from our - parent */ - if (thisObj->childIterator == NULL) { - NW_HED_ICompositeNode_t* compositeNode; - - /* get the childIterator */ - compositeNode = (NW_HED_ICompositeNode_t*) - NW_Object_QueryInterface (parentNode, &NW_HED_ICompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - status = NW_HED_ICompositeNode_GetChildren (compositeNode, - &thisObj->childIterator); - NW_THROW_ON_ERROR (status); - - /* find out position in the iterator */ - if (node != NULL) { - while (NW_ADT_Iterator_HasMoreElements (thisObj->childIterator)) { - - status = NW_ADT_Iterator_GetNextElement (thisObj->childIterator, - &documentNode); - NW_THROW_ON_ERROR (status); - if (documentNode == node) { - break; - } - } - } - } - - /* do we have any siblings? */ - status = - NW_ADT_Iterator_GetNextElement (thisObj->childIterator, &documentNode); - if (status == KBrsrNotFound) { - NW_Object_Delete (thisObj->childIterator); - thisObj->childIterator = NULL; - NW_THROW (status); - } - NW_THROW_ON_ERROR (status); - - /* set the current node */ - thisObj->currentNode = documentNode; - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_TreeVisitor_Initialize (NW_HED_TreeVisitor_t* treeVisitor, - NW_HED_DocumentNode_t* rootNode) -{ - return NW_Object_Initialize (&NW_HED_TreeVisitor_Class, treeVisitor, - rootNode); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_TreeVisitor_t* -_NW_HED_TreeVisitor_New (NW_HED_DocumentNode_t* rootNode) -{ - return (NW_HED_TreeVisitor_t*) - NW_Object_New (&NW_HED_TreeVisitor_Class, rootNode); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HistoryEntry.c --- a/webengine/wmlengine/src/hed/src/HistoryEntry.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,297 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_historyentryi.h" - -#include "NW_Text_Abstract.h" -#include "nw_adt_resizablevector.h" -#include "nw_text_ucs2.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_HistoryEntry_NewContentData (NW_HED_HistoryEntry_t* thisObj) -{ - TBrowserStatusCode status = KBrsrOutOfMemory; - - if (thisObj->contentData == NULL) { - NW_THROWIF_NULL (thisObj->contentData = NW_Object_Shared_New (NULL)); - NW_THROWIF_ERROR (status = NW_Object_Shared_Reserve (thisObj->contentData)); - } - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_Object_Delete (thisObj->contentData); - thisObj->contentData = NULL; - - return status; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_HistoryEntry_Class_t NW_HED_HistoryEntry_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_HistoryEntry_t), - /* construct */ _NW_HED_HistoryEntry_Construct, - /* destruct */ _NW_HED_HistoryEntry_Destruct - }, - { /* NW_HED_HistoryEntry */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_HistoryEntry_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_HistoryEntry_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_HistoryEntry_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_HED_HistoryEntryOf (dynamicObject); - - /* set the member variables */ - thisObj->urlRequest = (NW_HED_UrlRequest_t*) va_arg (*argp, const NW_HED_UrlRequest_t*); - NW_ASSERT (thisObj->urlRequest != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->urlRequest, &NW_HED_UrlRequest_Class)); - - thisObj->urlResponse = (NW_HED_UrlResponse_t*) va_arg (*argp, const NW_HED_UrlResponse_t*); - NW_ASSERT (thisObj->urlResponse != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->urlResponse, &NW_HED_UrlResponse_Class)); - - thisObj->contentData = NULL; - - thisObj->pageTitle = NULL; - thisObj->activeBoxId = 0; - thisObj->docPosition.x = 0; - thisObj->docPosition.y = 0; - /* - ** create the NW_Object_Shared that allows us to treat history-entry as a - ** reference counted obj. The weird thing about this is that thisObj points - ** to thisObj->sharingObject which in turn points to thisObj. This is on - ** purpose... When thisObj->sharingObject is released for the last time it - ** WILL delete "thisObj". - */ - thisObj->sharingObject = NW_Object_Shared_New (NW_Object_DynamicOf (thisObj)); - - if(thisObj->sharingObject == NULL) return KBrsrOutOfMemory; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_HistoryEntry_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_HistoryEntry_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_HistoryEntry_Class)); - - /* for convenience */ - thisObj = NW_HED_HistoryEntryOf (dynamicObject); - - /* deallocate the member variables */ - NW_Object_Delete (thisObj->urlRequest); - NW_Object_Delete (thisObj->urlResponse); - - NW_Mem_Free(thisObj->pageTitle); - - if (thisObj->contentData != NULL) { - (void) NW_Object_Shared_Release (thisObj->contentData); - } -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryEntry_AdoptContentData (NW_HED_HistoryEntry_t* thisObj, - NW_Object_Dynamic_t* contentData) -{ - TBrowserStatusCode status; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - - /* if need be create the shared object */ - if (thisObj->contentData == NULL) { - NW_THROWIF_ERROR (status = NW_HED_HistoryEntry_NewContentData (thisObj)); - } - - /* adopt the contentData */ - NW_THROWIF_ERROR (status = NW_Object_Shared_AdoptObject (thisObj->contentData, contentData)); - - return KBrsrSuccess; - -NW_CATCH_ERROR - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Object_Dynamic_t* -NW_HED_HistoryEntry_OrphanContentData (NW_HED_HistoryEntry_t* thisObj) -{ - NW_Object_Dynamic_t* contentData = NULL; - - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - - if (thisObj->contentData != NULL) { - (void) NW_Object_Shared_OrphanObject (thisObj->contentData, &contentData); - } - - return contentData; -} - -/* ------------------------------------------------------------------------- */ -NW_Object_Shared_t* -NW_HED_HistoryEntry_GetContentDataHolder (NW_HED_HistoryEntry_t* thisObj) -{ - /* parameter assertions */ - NW_ASSERT (thisObj != NULL); - - /* if the contentData object hasn't been created, create it */ - if (thisObj->contentData == NULL) { - NW_HED_HistoryEntry_NewContentData (thisObj); - } - - return thisObj->contentData; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryEntry_Clone (const NW_HED_HistoryEntry_t* thisObj) -{ - NW_HED_UrlRequest_t* urlReq = NULL; - NW_HED_UrlResponse_t* urlResp = NULL; - NW_HED_HistoryEntry_t* newEntry = NULL; - - NW_THROWIF_NULL (urlReq = NW_HED_UrlRequest_Clone (thisObj->urlRequest)); - NW_THROWIF_NULL (urlResp = NW_HED_UrlResponse_Clone (thisObj->urlResponse)); - NW_THROWIF_NULL (newEntry = NW_HED_HistoryEntry_New (urlReq, urlResp)); - - /* - ** note that contentData is not copied, this is on purpose. The cloned - ** entry must point to the same shared-object. - */ - - if (thisObj->contentData != NULL) { - newEntry->contentData = thisObj->contentData; - (void) NW_Object_Shared_Reserve (newEntry->contentData); - } - - return newEntry; - -NW_CATCH_ERROR - NW_Object_Delete (urlReq); - NW_Object_Delete (urlResp); - - return NULL; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryEntry_Reserve (NW_HED_HistoryEntry_t* thisObj) -{ - return NW_Object_Shared_Reserve (thisObj->sharingObject); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_HistoryEntry_Release (NW_HED_HistoryEntry_t* thisObj) -{ - return NW_Object_Shared_Release (thisObj->sharingObject); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryEntry_SetPageTitle(NW_HED_HistoryEntry_t* entry, NW_Ucs2* pageTitle) -{ - if(entry->pageTitle != NULL) - { - NW_Mem_Free(entry->pageTitle); - entry->pageTitle = NULL; - } - entry->pageTitle = NW_Str_Newcpy(pageTitle); - if(entry->pageTitle == NULL) return KBrsrOutOfMemory; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -NW_HED_HistoryEntry_SetDocPosition(NW_HED_HistoryEntry_t* entry, - NW_GDI_Point2D_t* position) -{ - entry->docPosition.x = position->x; - entry->docPosition.y = position->y; -} - -/* ------------------------------------------------------------------------- */ -void -NW_HED_HistoryEntry_GetDocPosition(NW_HED_HistoryEntry_t* entry, - NW_GDI_Point2D_t* position) -{ - position->x = entry->docPosition.x; - position->y = entry->docPosition.y; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryEntry_New (NW_HED_UrlRequest_t* urlRequest, NW_HED_UrlResponse_t* urlResponse) -{ - NW_ASSERT (urlRequest); - - return (NW_HED_HistoryEntry_t*) - NW_Object_New (&NW_HED_HistoryEntry_Class, urlRequest, urlResponse); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HistoryStack.cpp --- a/webengine/wmlengine/src/hed/src/HistoryStack.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_historystacki.h" - -#include "nw_adt_fixedvector.h" -#include "nwx_logger.h" -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -#include "StringUtils.h" -#include "nwx_string.h" - -#include "BrCtl.h" -#include "WmlControl.h" -#include "HistoryController.h" -#include "HistoryStack.h" -#include "BrCtlDefs.h" -#include "HistoryEntry.h" -#include "WmlInterface.h" - -class CWmlControl; -/* ------------------------------------------------------------------------- * - constants - * ------------------------------------------------------------------------- */ -#define NW_HED_HistoryStack_StackSize ((NW_HED_HistoryStack_Metric_t) 20) - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_DeleteEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Metric_t index) -{ - NW_HED_HistoryEntry_t* entry = NULL; - if(index >= 0) - { - entry = NW_HED_HistoryStack_GetEntryByIndex( thisObj, index ); - thisObj->iWmlCtrl->HistoryController().deleteEntry( index ); - } - return entry; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryStack_Metric_t -NW_HED_HistoryStack_GetIndex (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction) -{ - NW_HED_HistoryStack_Metric_t ind; - ind = thisObj->iWmlCtrl->HistoryController().index( KimonoToOssDirection( direction ) ); - return ind; -} - -/* ------------------------------------------------------------------------- */ -const -NW_HED_HistoryStack_Class_t NW_HED_HistoryStack_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_HistoryStack_t), - /* construct */ _NW_HED_HistoryStack_Construct, - /* destruct */ _NW_HED_HistoryStack_Destruct - }, - { /* NW_HED_HistoryStack */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_HistoryStack_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_HistoryStack_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_HistoryStack_Class)); - NW_ASSERT (argp != NULL); - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (argp); - - /* for convenience */ - thisObj = NW_HED_HistoryStackOf (dynamicObject); - - // create the history-entry vector - thisObj->vector = (NW_ADT_DynamicVector_t*) - NW_ADT_FixedVector_New (sizeof (NW_HED_HistoryEntry_t*), - NW_HED_HistoryStack_StackSize); - thisObj->current = -1; - - if (!thisObj->vector) { - return KBrsrOutOfMemory; - } - - thisObj->iReason = NW_HED_UrlRequest_Reason_DocLoad; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_HistoryStack_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_HistoryStack_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_HistoryStack_Class)); - - /* for convenience */ - thisObj = NW_HED_HistoryStackOf (dynamicObject); - - /* deallocate our history-entry vector */ - NW_Object_Delete (thisObj->vector); - //delete iStackUtility; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryStack_SetCurrent(NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction) -{ - thisObj->iWmlCtrl->HistoryController().setCurrentL( KimonoToOssDirection( direction ) ); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryStack_SetCurrentEntry(NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* entry) -{ - int index = NW_HED_HistoryStack_GetIndexByEntry (thisObj, entry); - if(index > 0) - { - thisObj->iWmlCtrl->HistoryController().setCurrentIndex(index); - return KBrsrSuccess; - } - else - { - return KBrsrFailure; - } -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_GetEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction) -{ - NW_HED_HistoryEntry_t* kEntry = NULL; - THistoryStackDirection entryDir = KimonoToOssDirection(direction); - int ind = thisObj->iWmlCtrl->HistoryController().index(EHistoryStackDirectionCurrent); - if( ind < 0 ) - { - return kEntry; - } - else - { - HistoryEntry* entry = NULL; - if(entryDir == EHistoryStackDirectionPrevious) - { - entry = thisObj->iWmlCtrl->HistoryController().entryByIndex(ind -1); - } - else if(entryDir == EHistoryStackDirectionNext) - { - entry = thisObj->iWmlCtrl->HistoryController().entryByIndex(ind + 1); - } - else - { - entry = thisObj->iWmlCtrl->HistoryController().entry(EHistoryStackDirectionCurrent); - } - if(entry) - { - HBufC16* reqDes = NULL; - - TUint reqLength = entry->requestUrl().Length(); - reqDes = HBufC16::New(reqLength + 1); - if (reqDes) - { - TPtr urlPtr(reqDes->Des()); - urlPtr.Copy(entry->requestUrl()); - urlPtr.ZeroTerminate(); - - NW_Text_t* textReqUrl = NW_Text_New (HTTP_iso_10646_ucs_2, (void*)urlPtr.Ptr(), urlPtr.Length(), NW_TRUE); - - if (textReqUrl) - { - NW_HED_UrlRequest_t* urlReq = NW_HED_UrlRequest_New (textReqUrl, NW_URL_METHOD_GET, NULL, NULL, thisObj->iReason, NW_HED_UrlRequest_LoadNormal, 1); - - const NW_Ucs2* uri = (const NW_Ucs2*)textReqUrl->storage; - NW_Uint8 *aBody = NULL; - NW_Uint32 aBodyLength = 0; - void *aHeaders = NULL; - NW_Uint8 *aContentTypeString = NULL; - NW_Uint8 *aContentLocationString = NULL; - NW_Bool aNoStore = EFalse; - NW_Uint8 *aBoundaryString = NULL; - NW_Ucs2 *aLastModified = NULL; - NW_Uint16 aCharset = 0; - NW_Uint8 *aCharsetString = 0; - NW_Uint32 aHttpStatus = 200 ; - NW_Uint16 aTransId = 0; - NW_Uint32 aContentLength = 0; - - NW_Url_Resp_t* respUrl = UrlLoader_UrlResponseNew(uri, - aBody, - aBodyLength, - aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - NW_URL_METHOD_GET, - aTransId, - aContentLength); - - NW_HED_UrlResponse_t* urlResp = NW_HED_UrlResponse_New (respUrl); - kEntry = NW_HED_HistoryEntry_New (urlReq, urlResp); - } - } - } - return kEntry; - } -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_RemoveEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryStack_Direction_t direction) -{ - NW_HED_HistoryStack_Metric_t index; - // parameter assertions - NW_ASSERT (thisObj != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_HistoryStack_Class)); - - index = NW_HED_HistoryStack_GetIndex (thisObj, direction); - - // remove the entry - return NW_HED_HistoryStack_DeleteEntry (thisObj, index); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryStack_InsertEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry, - NW_HED_HistoryStack_Location_t /*location*/) -{ - TPtrC formContentType(KNullDesC); - WebCore::FormData* formData = NULL; - TInt reqLength = historyEntry->urlRequest->url->characterCount; - TInt respLength = historyEntry->urlResponse->url->characterCount; - - if (NW_Asc_strlen((char *)historyEntry->urlRequest->url->storage) == 1 ) { // 16 bit - HBufC* urlreq = NULL; - HBufC* urlresp = NULL; - HBufC8* urlResponse8 = NULL; - HBufC8* urlRequest8 = NULL; - - urlreq = HBufC::New(reqLength + 1); - if (urlreq) { - TPtr urlReq16(urlreq->Des()); - urlReq16.Copy((TUint16*) historyEntry->urlRequest->url->storage, reqLength); - urlReq16.ZeroTerminate(); - - if (!thisObj->iWmlCtrl->HistoryController().containsItemForURL((TUint16*)urlReq16.Ptr())) { - urlresp = HBufC::New(respLength + 1); - if (urlresp) { - TPtr urlResp16(urlresp->Des()); - urlResp16.Copy((TUint16*)historyEntry->urlResponse->url->storage, respLength); - urlResp16.ZeroTerminate(); - - urlResponse8 = HBufC8::New(urlResp16.Length() + 1); - if (urlResponse8) { - TPtr8 url8RespPtr(urlResponse8->Des()); - url8RespPtr.Copy(urlResp16); - url8RespPtr.ZeroTerminate(); - - urlRequest8 = HBufC8::New(urlReq16.Length() + 1); - if (urlRequest8) { - TPtr8 url8ReqPtr(urlRequest8->Des()); - url8ReqPtr.Copy(urlReq16); - url8ReqPtr.ZeroTerminate(); - - thisObj->iWmlCtrl->HistoryController().insert(url8ReqPtr, url8RespPtr, formContentType, formData); - thisObj->iWmlCtrl->HistoryController().setCurrentEntryTitle(urlReq16); - } - } - } - } - } - delete urlreq; - delete urlresp; - delete urlResponse8; - delete urlRequest8; - } - else { // 8 bit - HBufC* urlRequest16 = HBufC::NewL(reqLength + 1); - HBufC8* urlresp = NULL; - HBufC8* urlreq = NULL; - if (urlRequest16) { - TPtr urlRequest16Ptr(urlRequest16->Des()); - urlRequest16Ptr.Copy((unsigned short *)historyEntry->urlRequest->url->storage, reqLength); - urlRequest16Ptr.ZeroTerminate(); - - if (!thisObj->iWmlCtrl->HistoryController().containsItemForURL( urlRequest16->Des().Ptr() ) ) { - urlresp = HBufC8::NewL(respLength + 1); - if (urlresp) { - TPtr8 ptrResp(urlresp->Des()); - ptrResp.Copy((TUint8*) historyEntry->urlResponse->url->storage, respLength); - ptrResp.ZeroTerminate(); - - urlreq = HBufC8::NewL(reqLength + 1); - if (urlreq) { - TPtr8 ptrReq(urlreq->Des()); - ptrReq.Copy((TUint8*) historyEntry->urlRequest->url->storage, reqLength); - ptrReq.ZeroTerminate(); - - thisObj->iWmlCtrl->HistoryController().insert(ptrReq, ptrResp, formContentType, formData); - thisObj->iWmlCtrl->HistoryController().setCurrentEntryTitle(urlRequest16Ptr); - } - } - } - } - delete urlresp; - delete urlreq; - delete urlRequest16; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryStack_PushEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry) - { - return NW_HED_HistoryStack_InsertEntry (thisObj, historyEntry, - NW_HED_HistoryStack_Loacation_AtEnd); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryStack_DeleteAll (NW_HED_HistoryStack_t* thisObj) -{ - thisObj->iWmlCtrl->HistoryController().clearHistoryList(); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_HistoryStack_IsUrlinHistory (NW_HED_HistoryStack_t* thisObj, - NW_HED_UrlRequest_t* urlRequest) -{ - TPtrC16 url( (TUint16*) urlRequest->url->storage ); - return thisObj->iWmlCtrl->HistoryController().containsItemForURL(url); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -NW_HED_HistoryStack_Length(NW_HED_HistoryStack_t* thisObj) -{ - return thisObj->iWmlCtrl->HistoryController().historyLength(); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryEntry_t* -NW_HED_HistoryStack_GetEntryByIndex (NW_HED_HistoryStack_t* thisObj,NW_Uint8 historyIndex) -{ - NW_HED_HistoryEntry_t* kEntry = NULL; - HistoryEntry* entry = thisObj->iWmlCtrl->HistoryController().entryByIndex(historyIndex); - if(entry) - { - NW_Text_t* textReqUrl = NW_Text_New (HTTP_iso_10646_ucs_2, - (void*) thisObj->iWmlCtrl->HistoryController().requestUrl().Ptr(), - (NW_Text_Length_t)thisObj->iWmlCtrl->HistoryController().requestUrl().Length(), - NW_FALSE); - - NW_Text_t* textResUrl = NW_Text_New (HTTP_iso_10646_ucs_2, - (void*) thisObj->iWmlCtrl->HistoryController().responseUrl().Ptr(), - (NW_Text_Length_t)thisObj->iWmlCtrl->HistoryController().responseUrl().Length() + 1, - NW_FALSE); - - - //urlReq - NW_HED_UrlRequest_t* urlReq = NW_HED_UrlRequest_New (textReqUrl, NW_URL_METHOD_GET, NULL, NULL, 1, NW_HED_UrlRequest_LoadNormal, 1); - - NW_Ucs2 *aUri = (NW_Ucs2*)textResUrl->storage; - NW_Uint8 *aBody = NULL; - NW_Uint32 aBodyLength = 0; - void *aHeaders = NULL; - NW_Uint8 *aContentTypeString = NULL; - NW_Uint8 *aContentLocationString = NULL; - NW_Bool aNoStore = EFalse; - NW_Uint8 *aBoundaryString = NULL; - NW_Ucs2 *aLastModified = NULL; - NW_Uint16 aCharset = 0; - NW_Uint8 *aCharsetString = 0; - NW_Uint32 aHttpStatus = 200 ; - NW_Uint16 aTransId = 0; - NW_Uint32 aContentLength = 0; - //urlResp - NW_Url_Resp_t* respUrl = UrlLoader_UrlResponseNew((const NW_Ucs2*)aUri, - aBody, - aBodyLength, - aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - NW_URL_METHOD_GET, - aTransId, - aContentLength); - - NW_HED_UrlResponse_t* urlResp = NW_HED_UrlResponse_New (respUrl); - //kimono entry - kEntry = NW_HED_HistoryEntry_New (urlReq, urlResp); - } - return kEntry; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_HistoryStack_ValidateEntry (const NW_HED_HistoryEntry_t* historyEntry) - { - // Entry is valid if the method is not NW_URL_METHOD_DATA - // Data loads should not be saved in History stack, because we - // do not keep the data - NW_Uint8 method; - NW_ASSERT (historyEntry != NULL); - method = NW_HED_UrlRequest_GetMethod(historyEntry->urlRequest); - return (NW_Bool)(method != NW_URL_METHOD_DATA); - } - -/* ------------------------------------------------------------------------- */ -NW_Int8 -NW_HED_HistoryStack_GetIndexByEntry (NW_HED_HistoryStack_t* thisObj, - NW_HED_HistoryEntry_t* historyEntry) - { - // Return the index of a given entry, or -1 if the entry could not be found - HistoryEntry* entry = NULL; - TInt size = thisObj->iWmlCtrl->HistoryController().historyLength(); - - for (TInt i = 0; i < size; i++) - { - entry = thisObj->iWmlCtrl->HistoryController().entryByIndex(i); - if ( entry->requestUrl().Ptr() == historyEntry->urlRequest->url->storage ) - { - return i; - } - } - - return -1; - - } - -/* ------------------------------------------------------------------------- */ -void SetOssHistoryControl( NW_HED_HistoryStack_t* thisObj, CWmlControl* aWmlControl ) - { - thisObj->iWmlCtrl = aWmlControl; - } - - -void SetUrlRequestReason(NW_HED_HistoryStack_t* thisObj, TInt aReason) - { - thisObj->iReason = aReason; - } - - -void SetPossibleWmlOEB(NW_HED_HistoryStack_t* thisObj, NW_Bool aFlag) - { - thisObj->iWmlCtrl->HistoryController().setPossibleWmlOEB(aFlag); - } - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryStack_t* -NW_HED_HistoryStack_New (void) -{ - return (NW_HED_HistoryStack_t*) NW_Object_New (&NW_HED_HistoryStack_Class); -} - -/* ------------------------------------------------------------------------- */ -THistoryStackDirection KimonoToOssDirection( - NW_HED_HistoryStack_Direction_t aDirection ) - { - THistoryStackDirection direction = EHistoryStackDirectionCurrent; - - switch( aDirection ) - { - case NW_HED_HistoryStack_Direction_Next: - { - direction = EHistoryStackDirectionNext; - break; - } - case NW_HED_HistoryStack_Direction_Previous: - { - direction = EHistoryStackDirectionPrevious; - break; - } - case NW_HED_HistoryStack_Direction_Current: - default: - { - direction = EHistoryStackDirectionCurrent; - break; - } - } - return direction; - } - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/HistoryVisitor.cpp --- a/webengine/wmlengine/src/hed/src/HistoryVisitor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_historyvisitori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -const -NW_HED_HistoryVisitor_Class_t NW_HED_HistoryVisitor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_HistoryVisitor_t), - /* construct */ _NW_HED_HistoryVisitor_Construct, - /* destruct */ _NW_HED_HistoryVisitor_Destruct - }, - { /* NW_HED_HistoryVisitor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_HistoryVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_HistoryVisitor_t* thisObj; - NW_HED_HistoryVisitor_Location_t location; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_HistoryVisitor_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_HED_HistoryVisitorOf (dynamicObject); - - /* get the stack */ - thisObj->stack = (NW_HED_HistoryStack_t*) va_arg (*argp, const NW_HED_HistoryStack_t*); - if ((thisObj->stack == NULL) || (NW_Object_IsInstanceOf (thisObj->stack, - &NW_HED_HistoryStack_Class) == NW_FALSE)) { - return KBrsrFailure; - } - - /* set the starting position */ - location = (NW_HED_HistoryVisitor_Location_t) va_arg (*argp, TInt); - - if (location == NW_HED_HistoryVisitor_Loacation_AtBeginning) { - thisObj->current = 0; - } - - else if (location == NW_HED_HistoryVisitor_Loacation_AtEnd) { - thisObj->current = (NW_HED_HistoryStack_Metric_t) (NW_ADT_Vector_GetSize (thisObj->stack->vector) - 1); - } - - else if (location == NW_HED_HistoryVisitor_Loacation_Current) { - thisObj->current = thisObj->stack->current; - } - - else { - return KBrsrFailure; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_HistoryVisitor_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_REQUIRED_PARAM (dynamicObject); - - /* Nothing needs to be done */ -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_HistoryEntry_t* - NW_HED_HistoryVisitor_Prev (NW_HED_HistoryVisitor_t* thisObj) -{ - return NW_HED_HistoryStack_GetEntry( thisObj->stack, NW_HED_HistoryStack_Direction_Previous ); -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_HistoryEntry_t* -NW_HED_HistoryVisitor_Next (NW_HED_HistoryVisitor_t* thisObj) -{ - return NW_HED_HistoryStack_GetEntry( thisObj->stack, NW_HED_HistoryStack_Direction_Next ); -} - -/* ------------------------------------------------------------------------- */ -const NW_HED_HistoryEntry_t* -NW_HED_HistoryVisitor_Current (NW_HED_HistoryVisitor_t* thisObj) -{ - return NW_HED_HistoryStack_GetEntry( thisObj->stack, NW_HED_HistoryStack_Direction_Current ); -} -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_HistoryVisitor_Initialize (NW_HED_HistoryVisitor_t* thisObj, - NW_HED_HistoryStack_t* stack, - NW_HED_HistoryVisitor_Location_t location) -{ - return NW_Object_Initialize (&NW_HED_HistoryVisitor_Class, thisObj, - stack, location); -} - - -/* ------------------------------------------------------------------------- */ -NW_HED_HistoryVisitor_t* -NW_HED_HistoryVisitor_New (NW_HED_HistoryStack_t* stack, - NW_HED_HistoryVisitor_Location_t location) -{ - return (NW_HED_HistoryVisitor_t*) NW_Object_New (&NW_HED_HistoryVisitor_Class, - stack, location); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/IImageViewer.c --- a/webengine/wmlengine/src/hed/src/IImageViewer.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_iimagevieweri.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_IImageViewer_Class_t NW_HED_IImageViewer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ 0 - }, - { /* NW_HED_IImageViewer */ - /* getImage */ NULL, - /* showImage */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/ILoadRecipient.c --- a/webengine/wmlengine/src/hed/src/ILoadRecipient.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_iloadrecipienti.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Core_Class_t NW_HED_ILoadRecipient_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/ILoaderListener.c --- a/webengine/wmlengine/src/hed/src/ILoaderListener.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_iloaderlisteneri.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Core_Class_t NW_HED_ILoaderListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/INumberCollector.c --- a/webengine/wmlengine/src/hed/src/INumberCollector.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_inumbercollectori.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_INumberCollector_Class_t NW_HED_INumberCollector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ 0 - }, - { /* NW_HED_INumberCollector */ - /* collect */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/Loader.c --- a/webengine/wmlengine/src/hed/src/Loader.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,948 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_loaderi.h" - -#include "nw_adt_resizablevector.h" -#include "nw_text_ucs2.h" -#include "nw_hed_urlrequest.h" -#include "nwx_ctx.h" -#include "nwx_url_utils.h" -#include "urlloader_urlloaderint.h" -#include "nwx_string.h" -#include "nwx_logger.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - -#include <e32def.h> - - -/* ------------------------------------------------------------------------- */ - -/* Static data not permitted in Epoc. For now it's been moved to the - * loader context; it would be better off in a class. - */ -#ifdef NOT_DEFINED - // #ifdef __WINS__ -static NW_ADT_DynamicVector_t* NW_HED_Loader_LoadQueue = NULL; - #pragma message (__FILE__ "32: Resolve global static data problem for NW_HED_LoaderQueue"); - #else - //lint --e{752} Info -- local declarator not referenced -// static const NW_ADT_DynamicVector_t* const NW_HED_Loader_LoadQueue = NULL; -#endif - -/* Methods to store & retrieve loader queue from the context. - * These should be moved out of the context & into a class - * if possible. - */ -void StoreNW_HED_Loader_LoadQueue(NW_ADT_DynamicVector_t* q); -NW_ADT_DynamicVector_t* GetNW_HED_Loader_LoadQueue(void); - -/* ------------------------------------------------------------------------- * - private static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_HED_Loader_IsTopLevelRequest (const NW_HED_UrlRequest_t* urlRequest) -{ - return NW_HED_UrlRequest_IsTopLevelRequest(urlRequest); -} - -/* ------------------------------------------------------------------------- */ -static -NW_HED_Loader_LoadQEntry_t* -NW_HED_Loader_GetLoadQueueLoadEntry(NW_Uint16 transactionId) -{ - NW_HED_Loader_LoadQEntry_t* entry = NULL; - NW_ADT_Vector_Metric_t numLoadQEntries; - NW_ADT_Vector_Metric_t index; - NW_ADT_DynamicVector_t* loadQueue = NULL; - NW_Bool found = NW_FALSE; - - loadQueue = GetNW_HED_Loader_LoadQueue(); - - if(loadQueue == NULL) { - return entry; - } - - /* find the Loader that initiated the load request in our LoadQueue */ - numLoadQEntries = NW_ADT_Vector_GetSize (loadQueue); - for (index = 0; index < numLoadQEntries; index++) { - /* get a pointer to the entry in the LoadQueue table */ - entry = (NW_HED_Loader_LoadQEntry_t*) - NW_ADT_Vector_ElementAt (loadQueue, index); - NW_ASSERT (entry != NULL); - - /* if we find a match we break out of the loop */ - if (!NW_Mem_memcmp (&entry->transactionId, &transactionId, - sizeof (transactionId))) { - found = NW_TRUE; - break; - } - } - if( found != NW_TRUE ) - { - entry = NULL; - } - - return entry; -} - -/* ------------------------------------------------------------------------- */ -/***************************************************************** - - Name: NW_HED_Loader_LocateUrl - - Description: Locates URL - - Parameters: url - url to be located - transactionId (OUT) - If the url was located, the transaction - of corresponsing url - - Return Value: KBrsrSuccess - KBrsrNotFound - -*****************************************************************/ -static -TBrowserStatusCode -NW_HED_Loader_LocateUrl(NW_Text_t* aUrl, NW_Uint16* aTransactionId, - NW_HED_ILoadRecipient_t* aLoadRecipient) - { - NW_ADT_DynamicVector_t* loadQueue = NULL; - NW_HED_Loader_LoadQEntry_t* entry = NULL; - NW_ADT_Vector_Metric_t numLoadQEntries; - NW_ADT_Vector_Metric_t index; - - *aTransactionId = 0; - loadQueue = GetNW_HED_Loader_LoadQueue(); - if (loadQueue == NULL) - { - return KBrsrNotFound; - } - - numLoadQEntries = NW_ADT_Vector_GetSize (loadQueue); - for (index = 0; index < numLoadQEntries; index++) - { - NW_HED_Loader_Context_t* context; - - // Get a pointer to the entry in the LoadQueue table - entry = (NW_HED_Loader_LoadQEntry_t*) - NW_ADT_Vector_ElementAt (loadQueue, index); - NW_ASSERT (entry != NULL); - if (entry == NULL) - { - // We found an invalid entry, get the next entry - NW_LOG3(NW_LOG_LEVEL5, "NW_HED_Loader_LocateUrl entry=NULL tId=%d %i of %i", - aTransactionId, index, numLoadQEntries); - return KBrsrNotFound; - } - - context = (NW_HED_Loader_Context_t*)(entry->clientData); - - // Do we have a valid context->urlRequest->url pointer - if (context == NULL || context->urlRequest == NULL || - context->urlRequest->url == NULL || context->loadRecipient == NULL) - { - // We found an invalid entry, get the next entry - NW_LOG3(NW_LOG_LEVEL5, "NW_HED_Loader_LocateUrl context has a NULL pointer tId=%d %i of %i", - aTransactionId, index, numLoadQEntries); - continue; - } - - // If we find a match we break out of the loop - if (!NW_Text_Compare(context->urlRequest->url, aUrl) && - (context->loadRecipient == aLoadRecipient)) - { - *aTransactionId = entry->transactionId; - return KBrsrSuccess; - } - } // end of for-loop - - return KBrsrNotFound; - } - -/* ------------------------------------------------------------------------- */ - -static -TBrowserStatusCode -NW_HED_Loader_PartialRespCallback( TBrowserStatusCode loadStatus, - NW_Uint16 transactionId, - NW_Int32 chunkIndex, - void* loadContext, - NW_Url_Resp_t* response ) - { - NW_TRY( status ) - { - NW_HED_Loader_LoadQEntry_t* entry; - NW_HED_Loader_Context_t* context; - NW_HED_Loader_t* thisObj = NW_HED_LoaderOf( loadContext ); - NW_ADT_DynamicVector_t* loadQueue = NULL; - NW_Bool ignoreResponse = NW_FALSE; - const NW_Text_t* newUrl = NULL; - - NW_ASSERT( thisObj != NULL ); - - entry = NW_HED_Loader_GetLoadQueueLoadEntry( transactionId ); - - if( entry != NULL ) - { - // extract the values from the entry - (void) NW_Mem_memcpy( &context, &entry->clientData, sizeof( context ) ); - NW_ASSERT( context != NULL ); - - // pre-pcoessing. - - // if the entry was cancelled in the meantime - if( entry->loadStatus == KBrsrCancelled ) - { - loadStatus = KBrsrCancelled; - } - // or if the transaction was cancelled by the document root - // due to bad content etc - else if( entry->loadStatus == KBrsrFailure ) - { - ignoreResponse = NW_TRUE; - } - - - if(chunkIndex == 0) - { - //R->change the urlRequest with the urlResponse - newUrl = NW_Text_New (HTTP_iso_10646_ucs_2, response->uri, NW_Str_Strlen(response->uri), 0); - status = NW_HED_UrlRequest_UpdateUrl (context->urlRequest, newUrl); - - } - - // final chunk - if( chunkIndex == -1 ) - { - TBrowserStatusCode tempStatus = KBrsrSuccess; - if (tempStatus) {}; // fix warning - NW_LOG1(NW_LOG_LEVEL5, "NW_HED_Loader_PartialRespCallback chunkIndex == -1 %d", transactionId ); - // remove the entry from the LoadQueue - loadQueue = GetNW_HED_Loader_LoadQueue(); - tempStatus = NW_ADT_DynamicVector_RemoveElement( loadQueue, (void*)entry ); - NW_ASSERT( tempStatus == KBrsrSuccess ); - - // remove the transaction from the requestList - tempStatus = NW_ADT_DynamicVector_RemoveElement ( thisObj->requestList, &transactionId ); - NW_ASSERT( tempStatus == KBrsrSuccess); - } - - // if the top level transaction was cancelled by the document root due to bad content etc - // then we should not pass on the cancelled transaction as all associated resources has - // already been released. - if( ignoreResponse == NW_FALSE && (loadStatus != 03 && loadStatus >= 0) ) - { - // notify the LoadRecipient of the partial load transaction - status = NW_HED_ILoadRecipient_ProcessPartialLoad( context->loadRecipient, loadStatus, - transactionId, chunkIndex, response, context->urlRequest, context->clientData ); - } - else - { - UrlLoader_UrlResponseDelete( response ); - } - - // post-processing - if( chunkIndex == -1 ) - { - // Loading has finished - // this call send EEventUrlLoadingFinished - // should be called before NW_HED_ILoaderListener_IsLoading(,,NW_FALSE) - // where EEventLoadFinished will be sent - (void)NW_HED_ILoaderListener_LoadProgressOff(thisObj->loaderListener, transactionId); - - // ToDo: Maybe more check is needed here? - // when testing file://BrCtlTest/test10.htm, - // markup load finishes before object request was generated from ObjectElementHandler - // so EEventLoadFinished is sent too early - // maybe we can check rootbox->renderingState == NW_LMgr_RootBox_RenderComplete; - // when test10.htm is loaded onto waplabdc network, the senario above didn't happen - // let the listener know that we are all set with loading. - if( NW_ADT_Vector_GetSize( thisObj->requestList ) == 0 && - thisObj->loaderListener != NULL ) - { - NW_HED_ILoaderListener_IsLoading( thisObj->loaderListener, thisObj, NW_FALSE ); - } - - // clean-up context - NW_Mem_Free( context ); - } - } - // no valid entry can be found in the load queue - else - { - NW_LOG2(NW_LOG_LEVEL5, "NW_HED_Loader_PartialRespCallback lurking chunk transID=%d chunkIndex=%d", transactionId, chunkIndex ); - // clean-up response - UrlLoader_UrlResponseDelete( response ); - status = KBrsrSuccess; - } - _NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -OssPartialRespCallback( TBrowserStatusCode aLoadStatus, - NW_Uint16 aTransactionId, - NW_Int32 aChunkIndex, - void* aLoadContext, - NW_Url_Resp_t* aResponse ) -{ - return NW_HED_Loader_PartialRespCallback(aLoadStatus,aTransactionId,aChunkIndex,aLoadContext,aResponse); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_Loader_PushLoad (void* clientData, - NW_Uint16* transactionId) -{ - NW_HED_Loader_LoadQEntry_t* loadQEntry; - NW_ADT_DynamicVector_t* loadQueue = NULL; - - /* make sure that the LoadQueue is initialized */ - loadQueue = GetNW_HED_Loader_LoadQueue(); - - if (loadQueue == NULL) { - StoreNW_HED_Loader_LoadQueue((NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_HED_Loader_LoadQEntry_t), - 8, 4)); - } - - loadQueue = GetNW_HED_Loader_LoadQueue(); - if (loadQueue == NULL) { - return KBrsrOutOfMemory; - } - - /* create a new entry to the load queue and initialize it */ - loadQEntry = (NW_HED_Loader_LoadQEntry_t*) - NW_ADT_DynamicVector_InsertAt (loadQueue, NULL, NW_ADT_Vector_AtEnd); - if (loadQEntry == NULL) { - return KBrsrOutOfMemory; - } - - /* copy the clientData and transactionId */ - (void) NW_Mem_memcpy (&loadQEntry->clientData, &clientData, - sizeof (loadQEntry->clientData)); - - (void) NW_Mem_memcpy (&loadQEntry->transactionId, transactionId, - sizeof (loadQEntry->transactionId)); - - loadQEntry->loadStatus = KBrsrSuccess; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_HED_Loader_StartRequestHelper (NW_HED_Loader_t* thisObj, - const NW_HED_UrlRequest_t* urlRequest, - void* clientData, - NW_Uint16* transactionId, void* aLoadContext) -{ - TBrowserStatusCode status; - const NW_Ucs2 *url; - NW_Http_Header_t *header = NULL; - NW_Buffer_t *data = NULL; - NW_Cache_Mode_t cacheMode; - NW_Uint8 method; - NW_Uint8 loadType; - NW_Uint8* dataBuf = NULL; - NW_Uint32 dataLen = 0; - - if (NW_HED_UrlRequest_GetHeader (urlRequest) != NULL) { - header = (NW_Http_Header_t*)UrlLoader_HeadersCopy (NW_HED_UrlRequest_GetHeader (urlRequest)); //R->ul - } - - if (NW_HED_UrlRequest_GetBody (urlRequest) != NULL) { - data = NW_Buffer_New (0); - if (data == NULL) - return KBrsrOutOfMemory; - - /* The buffer copy can fails if file to be loaded is too big */ - - if( NW_Buffer_CopyBuffers (data, NW_HED_UrlRequest_GetBody (urlRequest)) != KBrsrSuccess) - { - return KBrsrOutOfMemory; - } - dataBuf = data->data; - dataLen = data->length; - } - - /* initiate the load with the Loader subsystem */ - url = NW_HED_UrlRequest_GetRawUrl (urlRequest); - method = NW_HED_UrlRequest_GetMethod (urlRequest); - loadType = NW_HED_UrlRequest_GetLoadType(urlRequest); - cacheMode = (NW_Cache_Mode_t) NW_HED_UrlRequest_GetCacheMode (urlRequest); - - status = UrlLoader_Request(url, header, dataBuf, dataLen, method, transactionId, - thisObj, NW_HED_Loader_PartialRespCallback, cacheMode, NW_DEFAULTHEADERS_ALL, loadType, - NW_HED_Loader_IsTopLevelRequest(urlRequest), NW_FALSE, urlRequest->reason, aLoadContext ); - - NW_Buffer_FreeNotData(data); - if (status == KBrsrSuccess) { - status = NW_HED_Loader_PushLoad(clientData, transactionId); - } - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_HED_Loader_Class_t NW_HED_Loader_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_Loader_t), - /* construct */ _NW_HED_Loader_Construct, - /* destruct */ _NW_HED_Loader_Destruct - }, - { /* NW_HED_Loader */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_Loader_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_HED_Loader_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_Loader_Class)); - NW_ASSERT (argList != NULL); - - NW_TRY (status) { - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (argList); - - /* for convenience */ - thisObj = NW_HED_LoaderOf (dynamicObject); - - /* initialize the member variables */ - thisObj->requestList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_Uint16), 8, 4); - - NW_THROW_OOM_ON_NULL (thisObj->requestList, status); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_Loader_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_Loader_t* thisObj; - - /* for convenience */ - thisObj = NW_HED_LoaderOf (dynamicObject); - - /* delete our dynamic members */ - NW_Object_Delete (thisObj->requestList); - - /* clear the reqest list*/ - NW_Object_Delete(GetNW_HED_Loader_LoadQueue()); - StoreNW_HED_Loader_LoadQueue(NULL); -} - -/* ------------------------------------------------------------------------- */ -/* the caller retains ownership of url */ -TBrowserStatusCode -NW_HED_Loader_StartLoad (NW_HED_Loader_t* thisObj, - const NW_Text_t* url, - NW_Uint8 reason, - NW_HED_ILoadRecipient_t* loadRecipient, - void* clientData, - NW_Uint16* transactionId, - NW_Uint8 loadType, - NW_Cache_Mode_t cacheMode) -{ - NW_HED_UrlRequest_t* urlRequest = NULL; - - NW_TRY (status) { - urlRequest = - NW_HED_UrlRequest_New ((NW_Text_t*) url, NW_URL_METHOD_GET, NULL, NULL, - reason, NW_HED_UrlRequest_LoadNormal, loadType); - NW_THROW_OOM_ON_NULL (urlRequest, status); - NW_HED_UrlRequest_SetCacheMode(urlRequest, cacheMode); - - status = NW_HED_Loader_StartRequest (thisObj, urlRequest, loadRecipient, - clientData, transactionId, NULL ); - if( status == KBrsrCancelled ) - { - // status == KBrsrCancelled means virtual request - // do not handle as error - status = KBrsrSuccess; - } - NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { - NW_Object_Delete (urlRequest); - } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -/* upon success the ownership of urlRequest is passed to this method. - The ownership is returned back if load was not successful */ -TBrowserStatusCode -NW_HED_Loader_StartRequest (NW_HED_Loader_t* thisObj, - const NW_HED_UrlRequest_t* urlRequest, - NW_HED_ILoadRecipient_t* loadRecipient, - void* clientData, - NW_Uint16* transactionId, void* aLoadContext ) -{ - NW_HED_Loader_Context_t* context = NULL; - NW_Ucs2* dest = NULL; - - NW_TRY (status) - { - void *entry; - NW_Text_t* safeUrl = NULL; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded; - NW_Text_Length_t charCount; - const NW_Ucs2* origUrl = NULL; - NW_Ucs2* escapedUrl = NULL; - NW_Url_Schema_t schema = NW_SCHEMA_INVALID; - - /* Search for Url Request URL - If found delete url request set - tansaction id and return*/ - - /* For Kimono this is only for embedded loads */ - if ((urlRequest->reason == NW_HED_UrlRequest_Reason_DocLoadChild) && - (urlRequest->loadType != NW_UrlRequest_Type_Plugin)) - { - status = NW_HED_Loader_LocateUrl(urlRequest->url, transactionId, loadRecipient ); - if (status == KBrsrSuccess){ - NW_Object_Delete((NW_HED_UrlRequest_t*)urlRequest); - NW_LOG1(NW_LOG_LEVEL4, "Loader:LocateUrl successful %d", transactionId); - // actually the request has not been cancelled but there is no better - // way to tell that it is a virtual request. - return KBrsrCancelled; - } - } - - /* allocate and initialize the Context */ - context = (NW_HED_Loader_Context_t*)NW_Mem_Malloc (sizeof (*context)); - NW_THROW_OOM_ON_NULL (context, status); - - /* get the orig url as a ucs2 string */ - origUrl = NW_HED_UrlRequest_GetRawUrl (urlRequest); - NW_THROW_OOM_ON_NULL(origUrl, status); - -//??? RFD: Need to fix this section of code to: -// Determine up-front: -// 1. what encoding to use -// 2. whether or not to UTF-8 encode -// 3. whether or not to escape-encode, which is based on things like the shema -// (WTAI does not encode) and WML (which allows parts of the URL, such as -// form fields, I think, to optionally be escaped), and then there's -// something about chars after the # char, which I need to find out more about. -// 4. determine endianess if encoding is 2-bytes and not being UTF-8 encoded -// (The endianness is important for 2-byte chars whether or not they are -// escape-encoded.) -// 5. whether or not escape using "wise" or "unwise" -// Determining these things will depend on the schema, the original charset, -// whether orginal charset was explicitely specified or not, endianess, etc. -// WTAI schema, for example, uses UCS2 without encoding, whithout escaping, little endian. -// -// Then convert using the info determined above: -// If UTF8 encoding: -// 1. UTF8 encode -// 2. escape-encode (wise or unwise) -// If NOT UTF8 encoding: -// 1. convert unicode to target charset (which parts of the URL does this -// apply to? Don't want to convert 'http:' to foreign charset for example.) -// 2. if target charset is 2-bytes, then convert endianess -// 3. if escape-encoding then escape using "wise" or "unwise" - - - /* ensure that the url is escaped correctly */ - escapedUrl = NW_Str_New(NW_Url_EscapeUnwiseLen(origUrl)); - NW_THROW_OOM_ON_NULL(escapedUrl, status); - NW_Url_EscapeUnwise(origUrl, escapedUrl); - - NW_Url_GetSchemeNoValidation(escapedUrl, &schema); - - /* Resolve any 8 or 16-bit characters */ - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (urlRequest->url, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - - if (schema != NW_SCHEMA_WTAI) { - /* It's not clear why NW_Url_ConvertUnicode() is called. - * For phonebook you end up converting content a second time, - * leading to an incorrect result, so call has been removed for tel and mailto. - * Maybe we should remove call entirely? - */ -//??? RFD: The dest results of ConvertUnicode is not UCS2 and therefore the type of dest is wrong. It is 2-bytes per char but it's not UCS2. It's been converted. - status = NW_Url_ConvertUnicode(storage , &dest ); - NW_THROW_OOM_ON_NULL (dest, status); - safeUrl = NW_Text_New (HTTP_iso_10646_ucs_2, dest, - NW_Str_Strlen(dest), - 0); - } else { - safeUrl = NW_Text_New (HTTP_iso_10646_ucs_2, storage, - NW_Str_Strlen(storage), - 0); - } - - NW_THROW_OOM_ON_NULL (safeUrl, status); - if (freeNeeded) { - NW_Mem_Free(storage); - } - - // The UrlRequest needs to hold a copy of the url. - status = NW_HED_UrlRequest_UpdateUrl ( (NW_HED_UrlRequest_t*)urlRequest, safeUrl); - _NW_THROW_ON_ERROR(status); - - context->urlRequest = (NW_HED_UrlRequest_t*) urlRequest; - context->loadRecipient = loadRecipient; - context->clientData = clientData; - - /* execute the load */ - status = NW_HED_Loader_StartRequestHelper (thisObj, - (NW_HED_UrlRequest_t*) urlRequest, - context, transactionId, aLoadContext ); - if (status == KBrsrSuccess && schema == NW_SCHEMA_WTAI) { - status = KBrsrCancelled; - } - _NW_THROW_ON_ERROR(status); - - NW_LOG1(NW_LOG_LEVEL5, "NW_HED_Loader_StartRequest %d", *transactionId ); - /* insert the transactionId into the requestList */ - entry = NW_ADT_DynamicVector_InsertAt (thisObj->requestList, transactionId, - NW_ADT_Vector_AtEnd); - if (entry == NULL) { - status = - NW_HED_Loader_DeleteLoad (thisObj, *transactionId,NULL); - _NW_THROW_ON_ERROR( status); - } - - // only send EEventNewContentStart when this is the top level request - if ( NW_ADT_Vector_GetSize (thisObj->requestList) == 1 && - thisObj->loaderListener != NULL ) - { - NW_HED_ILoaderListener_IsLoading (thisObj->loaderListener, thisObj, - NW_TRUE); - } - - /* Loading has started. Fine. Now it's time to tell application to start to poll - response status */ - (void)NW_HED_ILoaderListener_LoadProgressOn(thisObj->loaderListener, *transactionId); - - NW_CATCH (status) { - NW_Mem_Free(context); - } - - NW_FINALLY { - NW_Str_Delete (escapedUrl); - if (dest != NULL) { - NW_Mem_Free(dest); - } - NW_Mem_Free(safeUrl); - return status; - } - - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_Vector_Metric_t -NW_HED_Loader_GetRequestListSize (NW_HED_Loader_t* thisObj) -{ - NW_ADT_Vector_Metric_t numRequests; - - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - numRequests = NW_ADT_Vector_GetSize( thisObj->requestList ); - - return numRequests; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Loader_GetLoaderEntry (NW_HED_Loader_t* thisObj, - NW_Uint16 transactionId, - NW_HED_Loader_LoadQEntry_t** entry) -{ - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - NW_TRY (status) { - NW_ADT_Vector_Metric_t index; - - index = NW_ADT_Vector_GetElementIndex (thisObj->requestList, &transactionId); - if (index == NW_ADT_Vector_AtEnd) { - NW_THROW_STATUS (status, KBrsrBadInputParam); - } - - *entry = NW_HED_Loader_GetLoadQueueLoadEntry(transactionId); - if (*entry == NULL) { - NW_THROW_STATUS (status, KBrsrNotFound); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Loader_DeleteLoad (NW_HED_Loader_t* thisObj, - NW_Uint16 transactionId, - void* clientData) -{ - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - NW_TRY (status) { - NW_HED_Loader_LoadQEntry_t *entry; - NW_HED_Loader_Context_t* context; - NW_ADT_DynamicVector_t* hedLoadQueue = NULL; - - /* ensure that the transaction id is legal for this loader object */ - status = NW_HED_Loader_GetLoaderEntry (thisObj, transactionId, &entry); - _NW_THROW_ON_ERROR( status ); - - /* instruct the loader subsystem to cancel the load */ - if (entry->loadStatus != KBrsrCancelled) { - entry->loadStatus = KBrsrCancelled; - - //UrlLoader_Cancel(transactionId); - if (clientData != NULL) { - *(void**) clientData = NULL; - } - } - else { - /* get the load context and extract the client data if necessary and free - the load context */ - (void) NW_Mem_memcpy (&context, &entry->clientData, sizeof (context)); - if (clientData != NULL) { - *(void**) clientData = context->clientData; - } - NW_Object_Delete (context->urlRequest); - NW_Mem_Free (context); - } - - - /* remove the entry from the load queue */ - hedLoadQueue = GetNW_HED_Loader_LoadQueue(); - NW_ASSERT(hedLoadQueue); - /*Ignore the status as the entry could be removed in CancelRequest from HedLoadQueue*/ - status = NW_ADT_DynamicVector_RemoveElement (hedLoadQueue, - (void*) entry); - - - /* remove the transaction id entry from the loader */ - status = - NW_ADT_DynamicVector_RemoveElement (thisObj->requestList, &transactionId); - NW_LOG1(NW_LOG_LEVEL5, "NW_HED_Loader_DeleteLoad %d", transactionId ); - - /* if this was the last outstanding request - notify the ILoaderListener */ - if (NW_ADT_Vector_GetSize (thisObj->requestList) == 0 && - thisObj->loaderListener != NULL) { - NW_HED_ILoaderListener_IsLoading (thisObj->loaderListener, thisObj, - NW_FALSE); - } - NW_THROW_ON_ERROR (status); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - - -TBrowserStatusCode -NW_HED_Loader_RemoveTransFromLoadList( NW_HED_Loader_t* thisObj, NW_Uint16 transactionId ) - { - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - NW_TRY(status) - { - NW_HED_Loader_LoadQEntry_t *entry; - NW_ADT_DynamicVector_t* hedLoadQueue = NULL; - - /* ensure that the transaction id is legal for this loader object */ - status = NW_HED_Loader_GetLoaderEntry (thisObj, transactionId, &entry); - if (status == KBrsrSuccess) - { - /* remove the entry from the load queue */ - hedLoadQueue = GetNW_HED_Loader_LoadQueue(); - NW_ASSERT(hedLoadQueue); - /*Ignore the status as the entry could be removed in CancelRequest from HedLoadQueue*/ - status = NW_ADT_DynamicVector_RemoveElement (hedLoadQueue, - (void*) entry); - - /* remove the transaction id entry from the loader */ - status = - NW_ADT_DynamicVector_RemoveElement (thisObj->requestList, &transactionId); - NW_LOG1(NW_LOG_LEVEL5, "NW_HED_Loader_RemoveTransFromLoadList %d", transactionId ); - - /* if this was the last outstanding request - notify the ILoaderListener */ - if (NW_ADT_Vector_GetSize (thisObj->requestList) == 0 && - thisObj->loaderListener != NULL) - { - NW_HED_ILoaderListener_IsLoading (thisObj->loaderListener, thisObj, NW_FALSE); - } - _NW_THROW_ON_ERROR( status ); - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Loader_CancelLoad (NW_HED_Loader_t* thisObj, - NW_Uint16 transactionId, TBrowserStatusCode cancelReason ) -{ - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - NW_TRY (status) { - NW_HED_Loader_LoadQEntry_t* entry = NULL; - - status = NW_HED_Loader_GetLoaderEntry (thisObj, transactionId, &entry); - _NW_THROW_ON_ERROR( status ); - - if (entry->loadStatus != KBrsrCancelled) { - entry->loadStatus = cancelReason; - //UrlLoader_Cancel(transactionId); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_Loader_CancelAllLoads (NW_HED_Loader_t* thisObj) -{ - NW_ADT_Vector_Metric_t numRequests; - NW_Int32 index; - NW_HED_Loader_LoadQEntry_t* loadQEntry = NULL; - - /* paramater assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_HED_Loader_Class)); - - /* ensure that the supplied transactionId is valid for this Loader object */ - numRequests = NW_HED_Loader_GetRequestListSize (thisObj); - if (numRequests == 0) { - return KBrsrSuccess; - } - for (index = numRequests - 1; index >= 0; index--) { - NW_Uint16* entry; - - entry = (NW_Uint16*) - NW_ADT_Vector_ElementAt (thisObj->requestList, NW_UINT16_CAST(index)); - if(entry){ - loadQEntry = NW_HED_Loader_GetLoadQueueLoadEntry (*entry); - if ((loadQEntry)&&(loadQEntry->loadStatus != KBrsrCancelled)) { - - loadQEntry->loadStatus = KBrsrCancelled; - //UrlLoader_Cancel(*entry); - - } - } - } - - /* successfull completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_Loader_t* -NW_HED_Loader_New (void) -{ - return (NW_HED_Loader_t*) NW_Object_New (&NW_HED_Loader_Class); -} - -/* Methods to store & retrieve loader queue from the context. - * These should be moved out of the context & into a class - * if possible. - */ -void StoreNW_HED_Loader_LoadQueue(NW_ADT_DynamicVector_t* q) -{ - NW_Ctx_Set(NW_CTX_HED_LOAD_QUEUE, 0, q); -} - -NW_ADT_DynamicVector_t* GetNW_HED_Loader_LoadQueue() -{ - return (NW_ADT_DynamicVector_t*)NW_Ctx_Get(NW_CTX_HED_LOAD_QUEUE, 0); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/MakeSrc --- a/webengine/wmlengine/src/hed/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_hed_src_lib.a - - -SUBDIRS = . isa - -SUBMAKES = MakeSrc2 MakeIsa - -OBJS = rbTempest_hed_src_src2_lib.a \ - isa/rbTempest_hed_src_isa_lib.a - -SRCS = - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE_RECURSIVE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/MakeSrc2 --- a/webengine/wmlengine/src/hed/src/MakeSrc2 Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc2 -TARGET = rbTempest_hed_src_src2_lib.a - - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = ChildIterator.c \ - CompositeContentHandler.c \ - CompositeNode.c \ - ContentDispatcher.c \ - ContentHandler.c \ - Context.c \ - ContextVisitor.c \ - DocumentNode.c \ - DocumentRoot.c \ - DomHelper.c \ - DomTree.c \ - EntitySet.c \ - HEDEventHandler.c \ - HistoryEntry.c \ - HistoryStack.c \ - ICompositeNode.c \ - IDispatchListener.c \ - IDocumentListener.c \ - ILoadRecipient.c \ - ILoaderListener.c \ - INumberCollector.c \ - Loader.c \ - MimeTable.c \ - TreeVisitor.c \ - UrlRequest.c \ - UrlResponse.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/MimeTable.cpp --- a/webengine/wmlengine/src/hed/src/MimeTable.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_mimetablei.h" -#include "nwx_http_defs.h" -#include "nwx_string.h" -#include "nw_imagech_epoc32contenthandler.h" -#include <e32std.h> - -#include <stdarg.h> - -static -NW_Bool NW_HED_MimeTable_IsImageContentType(NW_Http_ContentTypeString_t contentTypeString) - { - NW_Int32 pos = -1; - NW_Bool imageType = NW_FALSE; - - pos = NW_Asc_Strchr((char*)contentTypeString, '/'); - if(pos != -1) - { - if( NW_Asc_strnicmp((char*)contentTypeString, (char*)HTTP_image_string, pos) == 0 ) - { - imageType = NW_TRUE; - } - } - return imageType; - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_MimeTable_Class_t NW_HED_MimeTable_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_HED_MimeTable */ - /* numEntries */ 0, - /* entries */ NULL, - /* createContentHandler */ _NW_HED_MimeTable_CreateContentHandler - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_ContentHandler_t* -_NW_HED_MimeTable_CreateContentHandler (const NW_HED_MimeTable_t* mimeTable, - NW_HED_DocumentNode_t* parent, - NW_Http_ContentTypeString_t contentTypeString, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Bool isTopLevel) - { - NW_ASSERT( mimeTable != NULL ); - NW_ASSERT( parent != NULL ); - NW_ASSERT( urlRequest != NULL ); - - NW_Uint32 numEntries; - NW_Uint16 index; - NW_Bool respNoStore = NW_FALSE; - NW_HED_ContentHandler_t* contentHandler = NULL; - - if (response) - { - respNoStore = response->noStore; - } - if( NW_HED_MimeTable_IsImageContentType( contentTypeString ) || - ( urlRequest->loadType == NW_UrlRequest_Type_Image) ) - { - if( !isTopLevel ) - { - contentHandler = (NW_HED_ContentHandler_t*) - NW_Object_New ((NW_Object_Dynamic_Class_t*) &NW_ImageCH_Epoc32ContentHandler_Class, - parent, urlRequest, respNoStore); - } - } - else - { - // Hotmail bug workaround: - // Hotmail sends a response with content type text/vnd.wap.wml, but the response - // contains script and meta elements - TUint len = 6; // size of <html> - if (response != NULL && response->body != NULL && response->body->data != NULL && - response->body->length > 6 && response->contentTypeString != NULL) - { - TPtrC8 wmlPtr((TUint8*)HTTP_text_vnd_wap_wml_string); - if (wmlPtr.CompareF(TPtrC8(response->contentTypeString)) == 0) - { - _LIT8(KhtmlTag, "<html>"); - TPtr8 ptr(response->body->data, len, len); - if (ptr.CompareF(KhtmlTag()) == 0) - { - contentTypeString = (NW_Uint8*)HTTP_text_html_string; - } - } - } - - // traverse the MimeTable entries one by one looking for a match for - // the supplied content type - numEntries = NW_HED_MimeTable_GetClassPart (mimeTable).numEntries; - - for( index = 0; index < numEntries; index++ ) - { - const NW_HED_MimeTable_Entry_t* entry; - - entry = &NW_HED_MimeTable_GetClassPart (mimeTable).entries[index]; - if( ( NW_Asc_stricmp((char*)entry->contentTypeString, (char*)contentTypeString)) == 0 && - (!isTopLevel || entry->acceptTopLevel)) - { - contentHandler = (NW_HED_ContentHandler_t*) - NW_Object_New ((NW_Object_Dynamic_Class_t*) entry->objClass, parent, urlRequest, respNoStore); - break; - } - } - } - // if no match were found we return NULL - return contentHandler; - } - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_MimeTable_IsSupportedContent(NW_HED_MimeTable_t* mimeTable, - NW_Http_ContentTypeString_t contentTypeString, - NW_Bool isTopLevel) -{ - NW_Uint32 numEntries; - NW_Uint16 index; - - /* traverse the MimeTable entries one by one looking for a match for - the supplied content type */ - numEntries = NW_HED_MimeTable_GetClassPart (mimeTable).numEntries; - for (index = 0; index < numEntries; index++) { - const NW_HED_MimeTable_Entry_t* entry; - - entry = &NW_HED_MimeTable_GetClassPart (mimeTable).entries[index]; - if ((0 == NW_Asc_stricmp((char*)entry->contentTypeString, (char*)contentTypeString)) && - (!isTopLevel || entry->acceptTopLevel)) { - return NW_TRUE; - } - } - - /* if no match were found we return NULL */ - return NW_FALSE; - -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/TextReverse.cpp --- a/webengine/wmlengine/src/hed/src/TextReverse.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reverse ISO-8859-8 text -* -*/ - - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include "TextReverse.h" -#include <bidivisual.h> -#include "nwx_settings.h" -#include "nwx_statuscodeconvert.h" -#include "BrsrStatusCodes.h" - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -void ReverseTextL(NW_String_t* toString, NW_String_t* fromString) - { - const TInt additionalCharsLen = 4; - NW_ASSERT(toString != NULL); - NW_ASSERT(fromString != NULL); - // Get the storage we know it is UCS2 encoded - TUint16* stringToReverse = (TUint16*)NW_String_getStorage(fromString); - TUint stringLen = NW_String_getByteCount(fromString) / (sizeof (TUint16)); - if (stringToReverse[stringLen - 1] == 0) - { - stringLen--; - } - if (stringLen > 0) - { - TPtrC fromStringPtr(stringToReverse, stringLen); - TUint16* reversedString = new(ELeave) TUint16 [stringLen + additionalCharsLen]; - CleanupStack::PushL(reversedString); - TPtr reversedStringPtr(reversedString, stringLen + additionalCharsLen); - - TBidirectionalState::TRunInfo aRunInfoArray; - TBidirectionalState::TRunInfo *mRunInfoArray = NULL; - TBidiLogicalToVisual *bdLtoV = new(ELeave) TBidiLogicalToVisual(fromStringPtr, &aRunInfoArray, 1); - TInt runArrayCount = bdLtoV->Reorder(); - delete bdLtoV; - - mRunInfoArray = new(ELeave) TBidirectionalState::TRunInfo [runArrayCount]; - CleanupStack::PushL(mRunInfoArray); - bdLtoV = new TBidiLogicalToVisual(fromStringPtr, mRunInfoArray, runArrayCount); - CleanupStack::PushL(bdLtoV); - bdLtoV->Reorder(); - - bdLtoV->GetVisualLine(reversedStringPtr, 0, stringLen, 0xFFFF); - reversedStringPtr.ZeroTerminate(); - - if (StatusCodeConvert(NW_String_ucs2CharToString (toString, reversedString, HTTP_iso_10646_ucs_2)) != KBrsrSuccess) - { - User::Leave(KErrNoMemory); - } - - CleanupStack::PopAndDestroy(3); // bdLtoV, mRunInfoArray, reversedString - } - else - { - // transfer ownership - NW_String_shallowCopy(toString, fromString); - NW_String_clearUserOwnsStorage(fromString); - } - } - - -TBrowserStatusCode ReverseText(NW_String_t* string) - { - NW_ASSERT(string != NULL); - NW_String_t toString; - TBrowserStatusCode status = KBrsrSuccess; - // Try to reverse only iso-8859-8 - if (NW_Settings_GetOriginalEncoding() == HTTP_iso_8859_8) - { - NW_String_initialize (&toString, NULL, 0); - TRAPD(ret, ReverseTextL(&toString, string)); - if (ret != KErrNone) - { - status = KBrsrOutOfMemory; - } - else - { - //transfer ownership back to the original string - if (NW_String_getUserOwnsStorage(string)) - { - NW_String_deleteStorage(string); - } - - NW_String_shallowCopy(string, &toString); - NW_String_clearUserOwnsStorage(&toString); - } - } - return status; - } - - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/UrlRequest.c --- a/webengine/wmlengine/src/hed/src/UrlRequest.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,350 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_urlrequesti.h" - -#include "nw_text_ucs2.h" -#include "urlloader_urlloaderint.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static void NW_HED_UrlRequest_DeleteUrl (NW_HED_UrlRequest_t *thisObj) -{ - NW_Object_Delete (thisObj->url); - - if (thisObj->ownRawUrl) - NW_Mem_Free ((NW_Ucs2*) thisObj->rawUrl); - - thisObj->url = NULL; - thisObj->rawUrl = NULL; - thisObj->ownRawUrl = NW_FALSE; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_UrlRequest_Class_t NW_HED_UrlRequest_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_UrlRequest_t), - /* construct */ _NW_HED_UrlRequest_Construct, - /* destruct */ _NW_HED_UrlRequest_Destruct - }, - { /* NW_HED_UrlRequest */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_UrlRequest_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_UrlRequest_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_UrlRequest_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_HED_UrlRequestOf (dynamicObject); - - /* set the member variables */ - thisObj->url = (NW_Text_t*) va_arg (*argp, const NW_Text_t*); - NW_ASSERT (thisObj->url != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->url, &NW_Text_Abstract_Class)); - - thisObj->url = NW_Text_Copy (thisObj->url, NW_TRUE); - if (!thisObj->url) { - status = KBrsrOutOfMemory; - } - - thisObj->method = (NW_Uint8) va_arg (*argp, NW_Uint32); - thisObj->header = (NW_Http_Header_t*) va_arg (*argp, NW_Http_Header_t*); - thisObj->body = (NW_Buffer_t*) va_arg (*argp, const NW_Buffer_t*); - thisObj->reason = (NW_Uint8) va_arg (*argp, NW_Uint32); - thisObj->loadMode = (NW_HED_UrlRequest_LoadMode_t) va_arg (*argp, NW_HED_UrlRequest_LoadMode_t); - thisObj->loadType = (NW_Uint8) va_arg (*argp, NW_Uint32); - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_UrlRequest_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_UrlRequest_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_UrlRequest_Class)); - - /* for convenience */ - thisObj = NW_HED_UrlRequestOf (dynamicObject); - - NW_HED_UrlRequest_DeleteUrl (thisObj); - UrlLoader_HeadersFree (thisObj->header); - NW_Buffer_Free (thisObj->body); -} - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_UrlRequest_UpdateUrl (NW_HED_UrlRequest_t* thisObj, const NW_Text_t* newUrl) -{ - NW_Text_t* url; - TBrowserStatusCode status = KBrsrSuccess; - - url = NW_Text_Copy (newUrl, NW_TRUE); - if (url) { - /* delete the old value */ - NW_HED_UrlRequest_DeleteUrl (thisObj); - - thisObj->url = url; - } - else { - status = KBrsrOutOfMemory; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -NW_HED_UrlRequest_GetUrl (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - NW_ASSERT (thisObj->url); - - return thisObj->url; -} - -/* ------------------------------------------------------------------------- */ -const NW_Ucs2* -NW_HED_UrlRequest_GetRawUrl (const NW_HED_UrlRequest_t* thisObj) -{ - NW_Text_Length_t length; - NW_HED_UrlRequest_t* uReq = (NW_HED_UrlRequest_t*) thisObj; - - if (uReq->rawUrl != NULL) - return uReq->rawUrl; - - /* convert the url to Unicode and get the storage */ - uReq->rawUrl = (NW_Ucs2*) NW_Text_GetUCS2Buffer (uReq->url, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - &length, &uReq->ownRawUrl); - - return uReq->rawUrl; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -NW_HED_UrlRequest_GetMethod (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->method; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -NW_HED_UrlRequest_GetLoadType (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->loadType; -} - -/* ------------------------------------------------------------------------- */ -const NW_Http_Header_t* -NW_HED_UrlRequest_GetHeader (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->header; -} - -/* ------------------------------------------------------------------------- */ -const NW_Buffer_t* -NW_HED_UrlRequest_GetBody (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->body; -} - -/* ------------------------------------------------------------------------- */ -NW_Cache_Mode_t -NW_HED_UrlRequest_GetCacheMode (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->cacheMode; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_UrlRequest_IsTopLevelRequest (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return (NW_Bool) (thisObj->reason != NW_HED_UrlRequest_Reason_DocLoadChild && thisObj->reason != NW_HED_UrlRequest_Reason_DocLoadHead); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_UrlRequest_IsHistoricRequest (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - switch (thisObj->reason) - { - case NW_HED_UrlRequest_Reason_ShellPrev: - case NW_HED_UrlRequest_Reason_ShellNext: - case NW_HED_UrlRequest_Reason_ShellReload: - case NW_HED_UrlRequest_Reason_DocPrev: - case NW_HED_UrlRequest_Reason_RestorePrev: - case NW_HED_UrlRequest_Reason_RestoreNext: - return NW_TRUE; - - case NW_HED_UrlRequest_Reason_ShellLoad: - case NW_HED_UrlRequest_Reason_DocLoad: - case NW_HED_UrlRequest_Reason_DocLoadChild: - case NW_HED_UrlRequest_Reason_Undefined: - return NW_FALSE; - } - - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_UrlRequest_Equal (const NW_HED_UrlRequest_t* urlRequest1, - const NW_HED_UrlRequest_t* urlRequest2) -{ - /* TODO update to check more than just the url */ - return (NW_Bool) (NW_Text_Compare (urlRequest1->url, - urlRequest2->url) ? NW_FALSE : NW_TRUE); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_UrlRequest_SetMethod (NW_HED_UrlRequest_t* thisObj, NW_Uint8 method) -{ - NW_ASSERT (thisObj); - - thisObj->method = method; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_UrlRequest_SetReason (NW_HED_UrlRequest_t* thisObj, NW_Uint8 reason) -{ - NW_ASSERT (thisObj); - - thisObj->reason = reason; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_UrlRequest_SetCacheMode (NW_HED_UrlRequest_t* thisObj, NW_Cache_Mode_t cacheMode) -{ - NW_ASSERT (thisObj); - - thisObj->cacheMode = cacheMode; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -NW_HED_UrlRequest_GetReason (const NW_HED_UrlRequest_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->reason; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlRequest_t* -NW_HED_UrlRequest_Clone (const NW_HED_UrlRequest_t* thisObj) -{ - NW_Http_Header_t* header = NULL; - NW_Buffer_t* body = NULL; - NW_HED_UrlRequest_t* urlReq; - - if (thisObj->header != NULL) { -//R->ul NW_THROWIF_NULL (header = UrlLoader_HeadersCopy (thisObj->header)); - } - - if (thisObj->body != NULL) - { - NW_THROWIF_NULL (body = NW_Buffer_New (0)); - NW_THROWIF_ERROR (NW_Buffer_CopyBuffers (body, thisObj->body)); - } - - NW_THROWIF_NULL (urlReq = NW_HED_UrlRequest_New (thisObj->url, thisObj->method, - header, body, thisObj->reason, thisObj->loadMode, thisObj->loadType)); - - return urlReq; - -NW_CATCH_ERROR - UrlLoader_HeadersFree (header); - NW_Buffer_Free (body); - - return NULL; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlRequest_t* -NW_HED_UrlRequest_New (NW_Text_t* url, NW_Uint8 method, - NW_Http_Header_t* header, NW_Buffer_t* body, NW_Uint8 reason, NW_HED_UrlRequest_LoadMode_t loadMode, NW_Uint8 loadType) -{ - NW_ASSERT (url); - - return (NW_HED_UrlRequest_t*) NW_Object_New (&NW_HED_UrlRequest_Class, - url, (NW_Uint32)method, header, body, (NW_Uint32)reason, loadMode, (NW_Uint32)loadType); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/UrlResponse.c --- a/webengine/wmlengine/src/hed/src/UrlResponse.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,235 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_urlresponsei.h" - -#include "nw_text_ucs2.h" -#include <nwx_string.h> -#include "BrsrStatusCodes.h" - -/* -** TODO make subclasses of this to store XHTML and WML1.x relevant response info -*/ - -/* ------------------------------------------------------------------------- * - private static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static void NW_HED_UrlResponse_DeleteUrl (NW_HED_UrlResponse_t *thisObj) -{ - NW_Object_Delete (thisObj->url); - - if (thisObj->ownRawUrl) - NW_Mem_Free ((NW_Ucs2*) thisObj->rawUrl); - - thisObj->url = NULL; - thisObj->rawUrl = NULL; - thisObj->ownRawUrl = NW_FALSE; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_HED_UrlResponse_Class_t NW_HED_UrlResponse_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_HED_UrlResponse_t), - /* construct */ _NW_HED_UrlResponse_Construct, - /* destruct */ _NW_HED_UrlResponse_Destruct - }, - { /* NW_HED_UrlResponse */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_HED_UrlResponse_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_HED_UrlResponse_t* thisObj; - const NW_Url_Resp_t* response; - NW_Text_UCS2_t temp; - const NW_Text_t* url; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_UrlResponse_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_HED_UrlResponseOf (dynamicObject); - - /* set the member variables -- either response or url should be non-NULL */ - response = (const NW_Url_Resp_t*) va_arg (*argp, const NW_Url_Resp_t*); - url = (const NW_Text_t*) va_arg (*argp, const NW_Text_t*); - - if (response != NULL) { - if (response->uri == NULL) { - return KBrsrUnexpectedError; - } - - /* TODO what should be done if response->redirected is set? */ - - NW_Text_UCS2_Initialize (&temp, response->uri, 0, 0); - thisObj->url = NW_Text_Copy (&temp, NW_TRUE); - if (!thisObj->url) { - return KBrsrOutOfMemory; - } - } else if (url != NULL) { - thisObj->url = (NW_Text_t*) url; - } else { - status = KBrsrFailure; - } - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_HED_UrlResponse_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_HED_UrlResponse_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_HED_UrlResponse_Class)); - - /* for convenience */ - thisObj = NW_HED_UrlResponseOf (dynamicObject); - - NW_HED_UrlResponse_DeleteUrl (thisObj); -} - -/* ------------------------------------------------------------------------- * - final functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -NW_HED_UrlResponse_GetUrl (const NW_HED_UrlResponse_t* thisObj) -{ - NW_ASSERT (thisObj); - - return thisObj->url; -} - -/* ------------------------------------------------------------------------- */ -const NW_Ucs2* -NW_HED_UrlResponse_GetRawUrl (const NW_HED_UrlResponse_t* thisObj) -{ - NW_Text_Length_t length; - NW_HED_UrlResponse_t* uReq = (NW_HED_UrlResponse_t*) thisObj; - - NW_ASSERT (thisObj); - - if (uReq->rawUrl != NULL) { - return uReq->rawUrl; - } - - /* convert the url to Unicode and get the storage */ - uReq->rawUrl = - (NW_Ucs2*) NW_Text_GetUCS2Buffer (uReq->url, NW_Text_Flags_Aligned, - &length, &uReq->ownRawUrl); - - return uReq->rawUrl; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_HED_UrlResponse_UpdateUrl (NW_HED_UrlResponse_t* thisObj, const NW_Text_t* newUrl) -{ - NW_Text_t* url; - TBrowserStatusCode status = KBrsrSuccess; - - url = NW_Text_Copy (newUrl, NW_TRUE); - if (url) { - /* delete the old value */ - NW_HED_UrlResponse_DeleteUrl (thisObj); - - thisObj->url = url; - } - else { - status = KBrsrOutOfMemory; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_HED_UrlResponse_Equal (const NW_HED_UrlResponse_t* urlResponse1, - const NW_HED_UrlResponse_t* urlResponse2) -{ - NW_ASSERT (urlResponse1); - NW_ASSERT (urlResponse2); - - return (NW_Bool) (NW_Text_Compare (urlResponse1->url, - urlResponse2->url) ? NW_FALSE : NW_TRUE); -} - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlResponse_t* -NW_HED_UrlResponse_Clone (const NW_HED_UrlResponse_t* thisObj) -{ - NW_Text_t* url = NULL; - NW_HED_UrlResponse_t* urlResp; - - NW_THROWIF_NULL (url = NW_Text_Copy (thisObj->url, NW_FALSE)); - - urlResp = (NW_HED_UrlResponse_t*) NW_Object_New (&NW_HED_UrlResponse_Class, NULL, url); - NW_THROWIF_NULL (urlResp); - - return urlResp; - -NW_CATCH_ERROR - NW_Object_Delete (url); - - return NULL; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_HED_UrlResponse_t* -NW_HED_UrlResponse_New (const NW_Url_Resp_t* response) -{ - NW_ASSERT (response); - - return (NW_HED_UrlResponse_t*) NW_Object_New (&NW_HED_UrlResponse_Class, - response, NULL); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/contentLoader.cpp --- a/webengine/wmlengine/src/hed/src/contentLoader.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,217 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// This module forwards content that is not handled by the browser to the OS -// document handler. - -#include <e32base.h> -#include <AiwVariant.h> -#include <apmstd.h> // for TDataType -#include <ErrorUI.h> // for Series60 error notes -#include <eikenv.h> -#include "nwx_http_defs.h" -#include "contentLoader.h" -#include "MVCShell.h" -#include "BrsrStatusCodes.h" -#include <BrCtlSpecialLoadObserver.h> -#include "StringUtils.h" - -// CONSTANTS - -CContentLoader::CContentLoader( CEikProcess* aProcess ) - { - iFileName = NULL; - iProcess = aProcess; // For embedding. - } - -CContentLoader::~CContentLoader() - { - if (iFileName != NULL) - { - iRfs.Delete(*iFileName); - delete iFileName; - iFileName = NULL; - } - } - -void CContentLoader::SetMimeTypeL( TUint8* aContentType, TDes8& aMimetype ) - { - - __ASSERT_DEBUG(aContentType != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - - - //lint -e{774} Boolean within 'if' always evaluates to True - if ((aContentType != NULL) && - (NW_Asc_strlen((char*)aContentType) <= (NW_Uint32)aMimetype.MaxLength())) - { - aMimetype.Copy(aContentType); - } - else - { - User::Leave(KBrsrWmlbrowserBadContentType); - } - } - - -void CContentLoader::HandleL( HBufC* aUrl, HBufC8* aCharset, HBufC8* aContentType, - struct NW_HED_DocumentRoot_s* aDocRoot, - const TDesC& aFileName, TBool* aNeedDelete ) - { - __ASSERT_DEBUG(aContentType != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - __ASSERT_DEBUG(aNeedDelete != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - *aNeedDelete = NW_TRUE; - - //lint -e{550} Symbol not accessed - NW_REQUIRED_PARAM(aUrl); - - /* if embedded browser, let the embedding app deal with the unsupported content */ - CShell* shell = (CShell*)aDocRoot->browserApp_Ctx; - /* Add the AP Id to the parameter list */ - __ASSERT_DEBUG(shell != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - - // these arrays are pushed into CleanupStack in case leave - // if no leave, they will be freed below - RArray<TUint>* aTypeArray = new (ELeave) RArray<TUint>(4); - CleanupStack::PushL(aTypeArray); - - CDesCArrayFlat* aDesArray = new (ELeave) CDesCArrayFlat(4); - CleanupStack::PushL(aDesArray); - - TPtrC url16 = aUrl->Des(); - User::LeaveIfError(aTypeArray->Append(EParamRequestUrl)); - aDesArray->AppendL(url16); - - TDesC16* stringDes; - if (aCharset != NULL) - { - stringDes = StringUtils::CopyTDesC8ToTDesC16(aCharset->Des()); - if (stringDes) - { - CleanupStack::PushL(stringDes); - User::LeaveIfError(aTypeArray->Append(EParamCharset)); - aDesArray->AppendL(*stringDes); - CleanupStack::Pop(stringDes); - } - } - - if (aContentType != NULL) - { - stringDes = StringUtils::CopyTDesC8ToTDesC16(aContentType->Des()); - if (stringDes) - { - CleanupStack::PushL(stringDes); - User::LeaveIfError(aTypeArray->Append(EParamReceivedContentType)); - aDesArray->AppendL(*stringDes); - CleanupStack::Pop(stringDes); - } - } - - User::LeaveIfError(aTypeArray->Append(EParamLocalFileName)); - aDesArray->AppendL(aFileName); - - shell->HandleDownloadL(aTypeArray, aDesArray); - iFileName = aFileName.AllocL(); - *aNeedDelete = NW_FALSE; - - // No leave, so pop here and clean up - CleanupStack::Pop(aDesArray); - CleanupStack::Pop(aTypeArray); - - // cleanup arrays - if (aTypeArray) - { - // Closes the array and frees all memory allocated to the array - aTypeArray->Close(); - delete aTypeArray; - } - - if (aDesArray) - { - // Deletes all descriptors from the array and frees the memory allocated to the array buffer - aDesArray->Reset(); - delete aDesArray; - } -} - - -/* - * HandleContent - * - * External C function used to forward content not handled by the - * browser to the OS document handler - * - * Parameters: - * aResponse - Response data to handle - * - * Returns: - * Status code - */ -TBrowserStatusCode HandleContent(HBufC* aUrl, HBufC8* aCharset, HBufC8* aContentType, - struct NW_HED_DocumentRoot_s* aDocRoot, - const TDesC& aFileName, TBool* aNeedDelete) - { - TBrowserStatusCode status = KBrsrSuccess; - TInt error = KErrNone; - - __ASSERT_DEBUG(aDocRoot != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - CShell* shell = (CShell*)aDocRoot->browserApp_Ctx; - __ASSERT_DEBUG(shell != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - CContentLoader *contentLoader = shell->iContentLoader; - __ASSERT_DEBUG(contentLoader != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - - // Send to the browser's CContentLoader object. - TRAP(error, contentLoader->HandleL(aUrl, aCharset, aContentType, aDocRoot, aFileName, aNeedDelete)); - if ( error != KErrNone && error != KLeaveWithoutAlert ) - { - switch(error ) - { - case KErrNoMemory: - status = KBrsrOutOfMemory; - break; - case KBrsrWmlbrowserBadContentType: - status = KBrsrWmlbrowserBadContentType; - break; - default: - // All other errors get passed along to the error handler as is. - // There are many possible errors such as corrupt DRM files, etc. - status = KBrsrFailure; - break; - } - NW_ASSERT(aDocRoot->appServices != NULL); - (void) aDocRoot->appServices->errorApi.notifyError (NULL, error, NULL, NULL); - } - - return status; - } - -void DeletePrevContentL(struct NW_HED_DocumentRoot_s* aDocRoot) - { - __ASSERT_DEBUG(aDocRoot != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - CShell* shell = (CShell*)aDocRoot->browserApp_Ctx; - __ASSERT_DEBUG(shell != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - CContentLoader *contentLoader = shell->iContentLoader; - __ASSERT_DEBUG(contentLoader != NULL, User::Panic( _L("ContentLoader"), KErrArgument) ); - - contentLoader->iRfs = shell->iRfs; // Pass reference to RFs, needed in the deconstructor - if (contentLoader->iFileName != NULL) - { - contentLoader->iRfs.Delete(*contentLoader->iFileName); - delete contentLoader->iFileName; - contentLoader->iFileName = NULL; - } - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/hed/src/urlloader_urlresponse.cpp --- a/webengine/wmlengine/src/hed/src/urlloader_urlresponse.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Creating and deleting of url response -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include "urlloader_urlresponse.h" - -//R->ul #include "urlloader_urlloaderint.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// UrlLoader_UrlResponseNew -// Create a url response structure -// ----------------------------------------------------------------------------- -// -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - NW_Uint8 *aContentTypeString, - NW_Uint8 *aContentLocationString, - NW_Bool aNoStore, - NW_Uint8 *aBoundaryString, - NW_Ucs2 *aLastModified, - NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength) -{ - NW_Buffer_t* buffer = NULL; - NW_Url_Resp_t* resp = NULL; - NW_Ucs2* uri = NULL; - - buffer = new NW_Buffer_t; - resp = new NW_Url_Resp_t; - uri = new NW_Ucs2 [(User::StringLength(aUri) + 1)]; - - //lint -e{774} Boolean always evaluates to False - if (buffer == NULL || resp == NULL || uri == NULL) - { - delete buffer; - delete resp; - delete uri; - return NULL; - } - - Mem::Copy(uri, aUri, (User::StringLength(aUri) + 1) * sizeof(NW_Ucs2)); - resp->uri = uri; - resp->body = buffer; - resp->body->data = aBody; - resp->body->length = aBodyLength; - resp->body->allocatedLength = aBodyLength; - resp->headers = aHeaders; - resp->contentTypeString = aContentTypeString; - resp->contentTypeString16 = NULL; - resp->contentLocationString = aContentLocationString; - resp->noStore = aNoStore; - resp->boundary = aBoundaryString; - resp->lastModified = aLastModified; - resp->charset = aCharset; - resp->charsetString = aCharsetString; - resp->httpStatus = aHttpStatus; - resp->method = aMethod; - resp->transId = aTransId; - resp->certInfo = NULL; - resp->contentLength = aContentLength; - return resp; -} - - -// ----------------------------------------------------------------------------- -// UrlLoader_UrlResponseDelete -// Free a url response structure -// ----------------------------------------------------------------------------- -// -void UrlLoader_UrlResponseDelete(NW_Url_Resp_t* aResp) -{ - if (aResp != NULL) - { - delete aResp->uri; - if (aResp->body != NULL && aResp->body->length > 0) - delete aResp->body->data; - delete aResp->body; - //UrlLoader_HeadersFree(aResp->headers); - delete aResp->contentTypeString; - delete aResp->contentTypeString16; - delete aResp->contentLocationString; - delete aResp->boundary; - delete aResp->lastModified; - delete aResp->charsetString; - delete aResp; - } -} - - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/include/CHtmlpParser.h --- a/webengine/wmlengine/src/htmlp/include/CHtmlpParser.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,511 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -/** ----------------------------------------------------------------------- ** - @package: NW_HTMLP - - @synopsis: default - - @description: HTML Parser - - ** ----------------------------------------------------------------------- **/ -#ifndef CHTMLP_PARSER_H -#define CHTMLP_PARSER_H - -#include <e32base.h> -#include "nw_htmlp_lexer.h" -#include "BrsrStatusCodes.h" -#include "nwx_buffer.h" -#include "nw_encoder_wbxmlwriter.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Next two govern allocation/reallocation of the open element stack. */ -#ifndef NW_HTMLP_OPEN_ELEMENT_INITIAL_STACK_CAPACITY -#define NW_HTMLP_OPEN_ELEMENT_INITIAL_STACK_CAPACITY 16 -#endif -#ifndef NW_HTMLP_OPEN_ELEMENT_STACK_GROW_BY -#define NW_HTMLP_OPEN_ELEMENT_STACK_GROW_BY 8 -#endif - -//Non DTD elements are not found in the HTMLP dictionary and index is stored in -//the upper 16 bits. - -#ifndef NW_HTMLP_DTD_ElementTableMask -#define NW_HTMLP_DTD_ElementTableMask 0xffff0000 -#endif - -//Initialize the Non DTD value as actual index will always be greated than this. - -#ifndef NW_HTMLP_DTD_ElementTableInit -#define NW_HTMLP_DTD_ElementTableInit 0x00009999 -#endif - - typedef struct { - void* contentHandler; - void* response; -} NW_Htmlp_CharsetConvContext; - - -/* RME Documentation tools do not support callback syntax. */ -/* * ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_EventCallbacks - - @synopsis: default - - @scope: public - @variables: - TBrowserStatusCode (*beginDocumentCB) (NW_HTMLP_Lexer_t*, void*) - default - - TBrowserStatusCode (*endDocumentCB) (NW_HTMLP_Lexer_t*, NW_Bool failed, void*) - default - - TBrowserStatusCode (*startTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - void*) - default - - TBrowserStatusCode (*endTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - NW_Bool emptyTag, void*) - default - - TBrowserStatusCode (*contentCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*) - default - - TBrowserStatusCode (*cdataCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*) - default - - TBrowserStatusCode (*attributeStartCB) (void*) - default - - TBrowserStatusCode (*attributeNameAndValueCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pName, - NW_Bool missingValue, - const NW_HTMLP_Interval_t* pValue, - void*) - default - - TBrowserStatusCode (*attributesEndCB) (NW_Uint32 attributeCount, void*) - default - - void* pClientPointer - Passed back in each callback. - - @description: default - ** ----------------------------------------------------------------------- **/ -typedef struct NW_HTMLP_EventCallbacks_s { - TBrowserStatusCode (*beginDocumentCB) (NW_HTMLP_Lexer_t*, void*); - - TBrowserStatusCode (*endDocumentCB) (NW_HTMLP_Lexer_t*, TBrowserStatusCode e, void*); - TBrowserStatusCode (*startTagCB) (NW_Uint8 byteCount, const NW_Uint8* pBuf, - void*, NW_Bool isLiteral); - TBrowserStatusCode (*endTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - NW_Bool emptyTag, void*); - TBrowserStatusCode (*contentCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*); - TBrowserStatusCode (*cdataCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*); - TBrowserStatusCode (*attributeStartCB) (void*); - // cp_count to track the attribute code page switch count. - TBrowserStatusCode (*attributeNameAndValueCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pName, - NW_Bool missingValue, - const NW_HTMLP_Interval_t* pValue, - void*, - NW_Uint32* cp_count); - TBrowserStatusCode (*attributesEndCB) (NW_Uint32 attributeCount, void*); - // cp_count to track the attribute code page switch count. - TBrowserStatusCode (*piFormCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pPITarget, - const NW_HTMLP_Interval_t* pArguments, - void*, - NW_Uint32* cp_count); - void* pClientPointer; /* passed back in each callback */ - - - TBrowserStatusCode (*charsetConvertCallback) (void* context, - NW_Uint32 charsetLength, - NW_Uint32 charsetOffset, - NW_Buffer_t* body, - NW_Int32* numUnconvertible, - NW_Int32* indexFirstUnconvertible, - NW_Buffer_t** outBuf, - NW_Uint32 *selectedCharset); - void* charsetContext; - -} NW_HTMLP_EventCallbacks_t; - -/* Added for handling special cases for elements. It is good idea to document - * each special case here. In other words, this is small state machine to handle - * all such cases. - * - - * - * 1) <script> : Consume all the contents inside the <script> element as it is. - * - * - * 2) <a> : The <a> can have "href" and other attributes. If "href" attribute is - * present then allow different formats of attributes - * e.g. href="www.nokia.com/" or 'www.nokia.com/' or www.nokia.com/ as - * part of the attribute value. Note, when no quotes are there then also - * '/' is part of the attribute value. - * 3) <title> : If <title> is closed by the mis-spelled end tag. The syntax of the - * <title> tag is "<title> contents ". If there is start tag - * is found then any closing tag after this can be assumed as - * end tag. - * - * 4) : The tag has the "href" attribute only. If the value of the - * "href" attribute is not enclosed in the quotes then in case of - * realtive URLs - * (e.g. - * The last "/" forword slash is treated as EMPTY end tag but this is not - * true. If "/" is dropped then relative URLs are not formed correctly - * and page displaying error is obtained. For this case look for ">" - * only for end of tag. - * - * - */ - -/** ----------------------------------------------------------------------- ** - @enum: NW_HTMLP_ElementContentType - - @synopsis: Special case handling cases - - @scope: public - - ** ----------------------------------------------------------------------- **/ -typedef enum NW_HTMLP_SPL_Elem_Type_e { - NW_HTMLP_SPL_NONE, //No special handling required - NW_HTMLP_SPL_SCRIPT, //To handle script - NW_HTMLP_SPL_NOSCRIPT, //To handle noscript - NW_HTMLP_SPL_ANCHOR_ATTR, //To handle attr val inside - NW_HTMLP_SPL_META, //To handle meta element - NW_HTMLP_SPL_BODY, //To handle body start - NW_HTMLP_SPL_TITLE, //To handle mis-spelled - NW_HTMLP_SPL_BASE_ATTR //To handle "href" attr val inside -} NW_HTMLP_SPL_Elem_Type_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_SPL_Elem_Handling - - @synopsis: Handles special cases for the element tags - - @scope: public - - @description: Handles special cases for the element tags - ** ----------------------------------------------------------------------- **/ - -typedef struct NW_HTMLP_SPL_Elem_Handling_s -{ - NW_Bool splHandle; - NW_Ucs2 tagName[128]; - NW_HTMLP_SPL_Elem_Type_t type; -}NW_HTMLP_SPL_Elem_Handling_t; - -typedef struct NW_HTMLP_ElementParseState_s { - NW_HTMLP_ElementTableIndex_t* pOpenElementStack; - - /* points to stack top, needs to be int so -1 indicates empty */ - NW_Int32 openElementStackPointer; - - /* size in entries when originally malloc'ed, int32 like SP */ - NW_Int32 openElementStackCapacity; - - /* true only when in open element with content type tag PCDATA */ - NW_Bool inPCDATA; - - /* read position at end of element start, used to skip over newlines - after element start */ - NW_Uint32 readPosition; - -} NW_HTMLP_ElementParseState_t; - - -/** ----------------------------------------------------------------------- ** - @class: CHtmlpParser - - @synopsis: parser of a document or segment of a document. - - @description: parser of a document or segment of a document. - ** ----------------------------------------------------------------------- **/ -class CHtmlpParser : public CBase -{ -public: - - /** ----------------------------------------------------------------------- ** - @function: NewL - @synopsis: public constructor to create a new CHtmlpParser object. - @description: public constructor to create a new CHtmlpParser object. - @returns: newly created CHtmlpParser object. - ** ----------------------------------------------------------------------- **/ - static CHtmlpParser* NewL( - NW_Uint32 inputByteCount, - NW_Uint8* pInputBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Uint32 encoding, - NW_Bool consumeSpaces, - void * parser, - NW_Bool isScript); - - /** ----------------------------------------------------------------------- ** - @function: ~CHtmlpParser - @synopsis: public destructor. - @description: public destructor. - ** ----------------------------------------------------------------------- **/ - ~CHtmlpParser(); - - /** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Parse - @synopsis: Initiates parse of document. - @description: Initiates parse of document. - @returns: TBrowserStatusCode - Status of operation. - [KBrsrSuccess] Buffer parsed. - [KBrsrFailure] Parse failed. - [KBrsrOutOfMemory] Ran out of memory parsing the document. - ** ----------------------------------------------------------------------- **/ - TBrowserStatusCode NW_HTMLP_Parse(NW_Bool isFirstSegment, NW_Bool docComplete, NW_Bool needCharsetDetect); - - NW_Buffer_t* getLastTextBuf(); - - NW_Int32 getLastValid(); - - NW_Uint32 getCodePageSwitchCount(); - - NW_Uint32 getElementCount(); - - NW_Buffer_t* getPreviousValidOutput(); - - NW_HTMLP_EventCallbacks_t * getEventCallbacks(); - - NW_HTMLP_Lexer_t* getLexer(); - - TBrowserStatusCode appendVisitedHeadText(NW_Byte* new_data, NW_Uint32 new_len); - - NW_Buffer_t* getVisitedHeadText(); - -// For WML purposes, return the status of checking the attribute or element name -// in the appropriate dictionary. - TBrowserStatusCode NW_HTMLP_ValidateWMLAttribute(NW_HTMLP_Lexer_t* pL,const NW_HTMLP_Interval_t* pI_name,void* pV); - - NW_Bool iRestarted; - NW_Bool iIsHtml; - NW_WBXML_Writer_t * iWbxmlWriter; - NW_Int32 iOrigEncoding; - NW_Buffer_t* iLeftBytes; // single byte left from last chunk, for (multibyte encodings) - NW_Bool iIsScript; - - NW_Bool iTrackingUnTerminatedComment; - -private: - - /* the lexer */ - NW_HTMLP_Lexer_t* iLexer; - - /* Callback structure and parser state.*/ - NW_HTMLP_EventCallbacks_t* iCBs; - - NW_HTMLP_SPL_Elem_Handling_t* iSPLElemHandling; - - NW_HTMLP_ElementParseState_t* iElementParseState; - - NW_HTMLP_ElementParseState_t* iLastValidStack; - - /* last text content parsed by parser for previous segment */ - NW_Buffer_t* iLastTextBuf; - - /* point to right after the last trustable item in the generated output WBXML buffer */ - NW_Int32 iLastValid; - - /* previously processed segements */ - /* NW_Uint8* iPreviousOutputBuffer;*/ - - NW_Buffer_t* iPreviousValidOutput; - - NW_Bool iConsumeSpaces; - - NW_Int32 iLastTextBegin; /* offset of '<' within consumeContent or begining of the last piece text if there is no '<' */ - - // members related to code page switches - // iCurrentXX records the current state that wbxml writer passed, incld those that may be discarded from wbxml buffer later - // iValidXX records the state that is valid, never includes those cp switches that may be discarded later - NW_Uint8 iCurrentTagCP; - NW_Uint8 iValidTagCP; - - NW_Uint8 iCurrentAttrCP; - NW_Uint8 iValidAttrCP; - - NW_Uint32 iValidCPCount; - NW_Uint32 iCurrentCPCount; - // end of code page switch members - - NW_Buffer_t* iVisitedHeadText; - - NW_Int32 iLastScriptStart; - - NW_Bool iNeedCharsetDetect; - - NW_Bool iHasForm; - NW_Bool iWithinNoscript; - - NW_Bool firstSegment; - NW_Bool htmlTagFound; - NW_Bool iDocComplete; - - /* private constructor, called from NewL*/ - CHtmlpParser( NW_Bool consumeSpaces); - void ConstructL(NW_Uint32 inputByteCount, - NW_Uint8* pInputBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Uint32 encoding, - NW_Bool isScript); - - TBrowserStatusCode NW_HTMLP_IfExistsConsumeKeywordCase( - NW_HTMLP_Interval_t* pI, - NW_Uint32 asciiCharCount, - const NW_Uint8* pKeyword, - NW_Bool CaseSensitive, - NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfExistsConsumeKeyword( - NW_HTMLP_Interval_t* pI, - NW_Uint32 asciiCharCount, - const NW_Uint8* pKeyword, - NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_SkipSpace(); - - TBrowserStatusCode NW_HTMLP_SkipJunk(); - - TBrowserStatusCode NW_HTMLP_SkipCRLF(); - - TBrowserStatusCode NW_HTMLP_ParseName(NW_Bool* pMatch, NW_HTMLP_Interval_t* pI); - - TBrowserStatusCode NW_HTMLP_FinishComment(NW_Bool* pMatch, NW_Bool imodeComment, - NW_Bool looseComment); - - TBrowserStatusCode NW_HTMLP_FinishCdata(NW_HTMLP_Interval_t* pInterval, NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_FinishDoctype(NW_Bool* pMatch, NW_HTMLP_Interval_t* doctypeInterval); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeComment(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumePi(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeCdata(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_HandleSpecialCases(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeDoctype(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_ConsumeContent(NW_Bool* pMatch); - - - /* handle attributes */ - void NW_HTMLP_SPL_Elem_Handle_Attr(NW_HTMLP_Interval_t* pI_name, NW_Bool* splAttrFound); - - TBrowserStatusCode NW_HTMLP_CheckTagEndOrSpace (NW_Bool* aMatch); - - TBrowserStatusCode NW_HTMLP_CheckTagEnd (NW_Bool* aMatch); - - TBrowserStatusCode NW_HTMLP_AttributeValueConsume(NW_Bool* pMissingValue, - NW_HTMLP_Interval_t* pI, - NW_Bool* pMatch,NW_Bool splAttrFound); - - TBrowserStatusCode NW_HTMLP_AttributeNameAndValueConsume(NW_HTMLP_Interval_t* pI_name, - NW_Bool* pMissingValue, - NW_HTMLP_Interval_t* pI_attvalue, - NW_Bool* pMatch, - NW_HTMLP_SPL_Elem_Handling_t* splElem); - - - TBrowserStatusCode NW_HTMLP_IfExistsConsumeMinEmptyElementSyntax(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeAttributes( - NW_Bool* pMatch, - NW_Bool* pIsEmptyTagEnd, - const struct NW_HTMLP_EventCallbacks_s* pCB, - NW_HTMLP_SPL_Elem_Handling_t* splElem); - - NW_HTMLP_ElementDescriptionConst_t* NW_HTMLP_ElementFindTagFromDoc( - NW_HTMLP_Interval_t* pI, - NW_HTMLP_ElementTableIndex_t* pIndex); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeElementEnd(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_IfLegalConsumeElementStart(NW_Bool* pMatch); - - TBrowserStatusCode NW_HTMLP_ElementParseState_ExplicitClosing( - NW_HTMLP_ElementTableIndex_t index, - NW_HTMLP_ElementDescriptionConst_t* pElement); - - TBrowserStatusCode NW_HTMLP_ElementParseState_ImpliedClosings(NW_HTMLP_ElementDescriptionConst_t* pElement); - - TBrowserStatusCode NW_HTMLP_ElementParseState_CloseAll(); - - void NW_HTMLP_SPL_Elem_Initialize(); - - void NW_HTMLP_SPL_Elem_Setup(NW_HTMLP_ElementTableIndex_t elementIndex, NW_Bool findCharset); - /* element stack operations */ - - TBrowserStatusCode NW_HTMLP_ElementParseState_New(); - - TBrowserStatusCode NW_HTMLP_ElementParseState_Push(NW_HTMLP_ElementTableIndex_t index); - - NW_HTMLP_ElementTableIndex_t NW_HTMLP_ElementParseState_Pop(); - - void NW_HTMLP_ElementParseState_Delete(NW_HTMLP_ElementParseState_t** ppS); - - TBrowserStatusCode NW_HTMLP_BR_SPL_Handle(); - - TBrowserStatusCode NW_HTMLP_ElementParseState_Clone(NW_HTMLP_ElementParseState_t** ppS); - - TBrowserStatusCode setValidMarks(); - - TBrowserStatusCode commitValidMarks(); - - TBrowserStatusCode NW_HTMLP_SPL_Elem_Handle_xml_charset(); - - TBrowserStatusCode NW_HTMLP_SPL_Elem_Handle_Meta(NW_HTMLP_Interval_t* pI_name, - NW_HTMLP_Interval_t* pI_attvalue, - NW_HTMLP_SPL_Elem_Handling_t* splElem); - - TBrowserStatusCode NW_HTMLP_SPL_Elem_Handle_BodyStart(NW_HTMLP_ElementDescriptionConst_t* pElement); - - TBrowserStatusCode NW_HTMLP_SPL_Elem_Before_HTML_tag(NW_HTMLP_Lexer_t* pL, const NW_HTMLP_Interval_t* pI_content, - NW_Bool* onlySplChar); - - void updateCurrentCP(); - void updateCurrentCP(NW_Uint32 switches); -}; - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -/* CHTMLP_PARSER_H */ -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/include/nw_htmlp_dict.h --- a/webengine/wmlengine/src/htmlp/include/nw_htmlp_dict.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/** ----------------------------------------------------------------------- ** - @package: NW_HTMLP - - @synopsis: default - - @description: default - - ** ----------------------------------------------------------------------- **/ - -#ifndef NW_HTMLP_DICT_H -#define NW_HTMLP_DICT_H - -#include "nwx_defs.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** ----------------------------------------------------------------------- ** - @typedef: NW_HTMLP_ElementTableIndex - - @synopsis: Index. - - @scope: public - @type: NW_Uint32 - - @description: The lower sixteen bits are used to store the index of the - dictionary elements(0xefff) and upper 16 bits are zero in this case. - The UPPER 16 bits(from 0xffff0000) are for DTD elements index - and lower are zero in this. - ** ----------------------------------------------------------------------- **/ -typedef NW_Uint32 NW_HTMLP_ElementTableIndex_t; - - -/** ----------------------------------------------------------------------- ** - @enum: NW_HTMLP_ElementContentType - - @synopsis: Element description to limit element content. - - @scope: public - - @names: - [ANY] - Element may contain document content mixed with markup. - - [EMPTY] - Element has no content of any kind. - - [PCDATA] - Element may contain document content but no markup. - - [PLAINTEXT] - Element contains the rest of the file as document text. - - @description: Element description to limit element content. - ** ----------------------------------------------------------------------- **/ -typedef enum NW_HTMLP_ElementContentType_e { - ANY, EMPTY, PCDATA, PLAINTEXT -} NW_HTMLP_ElementContentType_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_ElementDescription - - @synopsis: Element description. - - @scope: public - @variables: - const NW_Uint8* const tag - Pointer to element name. - - const NW_HTMLP_ElementTableIndex_t* const closes - Closes indicator. - - const NW_HTMLP_ElementTableIndex_t* const blocks - Blocks indicator. - - NW_HTMLP_ElementContentType_t contentType - Content type. - NW_BOOL splyHandling - If some special handling of the tags are required. - - @description: Element description. - ** ----------------------------------------------------------------------- **/ -typedef const struct NW_HTMLP_ElementDescription_s { - const NW_Uint8* tag; - const NW_HTMLP_ElementTableIndex_t* closes; - const NW_HTMLP_ElementTableIndex_t* blocks; - NW_HTMLP_ElementContentType_t contentType; - NW_Bool splHandling; -}NW_HTMLP_ElementDescriptionConst_t; - -extern const NW_HTMLP_ElementTableIndex_t NW_HTMLP_ElementTableCount; -extern NW_HTMLP_ElementDescriptionConst_t NW_HTMLP_ElementDescriptionTable[]; - -/* - * Access routines to get pointers to NW_HTMLP_ElementDescriptionTable & - * NW_HTMLP_ElementTableCount from outside the XmlParserDLL - */ -NW_HTMLP_ElementDescriptionConst_t* NW_HTMLP_Get_ElementDescriptionTable(); -NW_HTMLP_ElementTableIndex_t NW_HTMLP_Get_ElementTableCount(); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -/* NW_HTMLP_DICT_H */ -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/include/nw_htmlp_html_dict.h --- a/webengine/wmlengine/src/htmlp/include/nw_htmlp_html_dict.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/** ----------------------------------------------------------------------- ** - @package: NW_HTMLP - - @synopsis: default - - @description: default - - ** ----------------------------------------------------------------------- **/ - -#ifndef NW_HTMLP_HTML_DICT_H -#define NW_HTMLP_HTML_DICT_H - -#include "nwx_defs.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -/* - USE LOWER CASE CHARACTERS IN TAG NAME STRINGS! -*/ - -#define HTMLP_HTML_TAG_INDEX_A 0 - -#define HTMLP_HTML_TAG_INDEX_ABBR (HTMLP_HTML_TAG_INDEX_A + 1) - -#define HTMLP_HTML_TAG_INDEX_ACRONYM (HTMLP_HTML_TAG_INDEX_ABBR + 1) - -#define HTMLP_HTML_TAG_INDEX_ADDRESS (HTMLP_HTML_TAG_INDEX_ACRONYM + 1) - -#define HTMLP_HTML_TAG_INDEX_AREA (HTMLP_HTML_TAG_INDEX_ADDRESS + 1) - -#define HTMLP_HTML_TAG_INDEX_B (HTMLP_HTML_TAG_INDEX_AREA + 1) - -#define HTMLP_HTML_TAG_INDEX_BASE (HTMLP_HTML_TAG_INDEX_B + 1) - -#define HTMLP_HTML_TAG_INDEX_BIG (HTMLP_HTML_TAG_INDEX_BASE + 1) - -#define HTMLP_HTML_TAG_INDEX_BLINK (HTMLP_HTML_TAG_INDEX_BIG + 1) - -#define HTMLP_HTML_TAG_INDEX_BLOCKQUOTE (HTMLP_HTML_TAG_INDEX_BLINK + 1) - -#define HTMLP_HTML_TAG_INDEX_BODY (HTMLP_HTML_TAG_INDEX_BLOCKQUOTE + 1) - -#define HTMLP_HTML_TAG_INDEX_BR (HTMLP_HTML_TAG_INDEX_BODY + 1) - -#define HTMLP_HTML_TAG_INDEX_BUTTON (HTMLP_HTML_TAG_INDEX_BR +1) - -#define HTMLP_HTML_TAG_INDEX_CAPTION (HTMLP_HTML_TAG_INDEX_BUTTON + 1) - -#define HTMLP_HTML_TAG_INDEX_CENTER (HTMLP_HTML_TAG_INDEX_CAPTION + 1) - -#define HTMLP_HTML_TAG_INDEX_CITE (HTMLP_HTML_TAG_INDEX_CENTER + 1) - -#define HTMLP_HTML_TAG_INDEX_CODE (HTMLP_HTML_TAG_INDEX_CITE + 1) - -#define HTMLP_HTML_TAG_INDEX_DD (HTMLP_HTML_TAG_INDEX_CODE + 1) - -#define HTMLP_HTML_TAG_INDEX_DEL (HTMLP_HTML_TAG_INDEX_DD +1) - -#define HTMLP_HTML_TAG_INDEX_DFN (HTMLP_HTML_TAG_INDEX_DEL + 1) - -#define HTMLP_HTML_TAG_INDEX_DIR (HTMLP_HTML_TAG_INDEX_DFN + 1) - -#define HTMLP_HTML_TAG_INDEX_DIV (HTMLP_HTML_TAG_INDEX_DIR + 1) - -#define HTMLP_HTML_TAG_INDEX_DL (HTMLP_HTML_TAG_INDEX_DIV + 1) - -#define HTMLP_HTML_TAG_INDEX_DT (HTMLP_HTML_TAG_INDEX_DL + 1) - -#define HTMLP_HTML_TAG_INDEX_EM (HTMLP_HTML_TAG_INDEX_DT + 1) - -#define HTMLP_HTML_TAG_INDEX_EMBED (HTMLP_HTML_TAG_INDEX_EM + 1) - -#define HTMLP_HTML_TAG_INDEX_FIELDSET (HTMLP_HTML_TAG_INDEX_EMBED + 1) - -#define HTMLP_HTML_TAG_INDEX_FONT (HTMLP_HTML_TAG_INDEX_FIELDSET + 1) - -#define HTMLP_HTML_TAG_INDEX_FORM (HTMLP_HTML_TAG_INDEX_FONT + 1) - -#define HTMLP_HTML_TAG_INDEX_FRAME (HTMLP_HTML_TAG_INDEX_FORM + 1) - -#define HTMLP_HTML_TAG_INDEX_FRAMESET (HTMLP_HTML_TAG_INDEX_FRAME + 1) - -#define HTMLP_HTML_TAG_INDEX_H1 (HTMLP_HTML_TAG_INDEX_FRAMESET + 1) - -#define HTMLP_HTML_TAG_INDEX_H2 (HTMLP_HTML_TAG_INDEX_H1 + 1) - -#define HTMLP_HTML_TAG_INDEX_H3 (HTMLP_HTML_TAG_INDEX_H2 + 1) - -#define HTMLP_HTML_TAG_INDEX_H4 (HTMLP_HTML_TAG_INDEX_H3 + 1) - -#define HTMLP_HTML_TAG_INDEX_H5 (HTMLP_HTML_TAG_INDEX_H4 + 1) - -#define HTMLP_HTML_TAG_INDEX_H6 (HTMLP_HTML_TAG_INDEX_H5 + 1) - -#define HTMLP_HTML_TAG_INDEX_HEAD (HTMLP_HTML_TAG_INDEX_H6 + 1) - -#define HTMLP_HTML_TAG_INDEX_HR (HTMLP_HTML_TAG_INDEX_HEAD + 1) - -#define HTMLP_HTML_TAG_INDEX_HTML (HTMLP_HTML_TAG_INDEX_HR + 1) - -#define HTMLP_HTML_TAG_INDEX_I (HTMLP_HTML_TAG_INDEX_HTML + 1) - -#define HTMLP_HTML_TAG_INDEX_IFRAME (HTMLP_HTML_TAG_INDEX_I + 1) - -#define HTMLP_HTML_TAG_INDEX_IMG (HTMLP_HTML_TAG_INDEX_IFRAME + 1) - -#define HTMLP_HTML_TAG_INDEX_INPUT (HTMLP_HTML_TAG_INDEX_IMG + 1) - -#define HTMLP_HTML_TAG_INDEX_INS (HTMLP_HTML_TAG_INDEX_INPUT +1) - -#define HTMLP_HTML_TAG_INDEX_KBD (HTMLP_HTML_TAG_INDEX_INS + 1) - -#define HTMLP_HTML_TAG_INDEX_LABEL (HTMLP_HTML_TAG_INDEX_KBD + 1) - -#define HTMLP_HTML_TAG_INDEX_LI (HTMLP_HTML_TAG_INDEX_LABEL + 1) - -#define HTMLP_HTML_TAG_INDEX_LINK (HTMLP_HTML_TAG_INDEX_LI + 1) - -#define HTMLP_HTML_TAG_INDEX_MAP (HTMLP_HTML_TAG_INDEX_LINK + 1) - -#define HTMLP_HTML_TAG_INDEX_MARQUEE (HTMLP_HTML_TAG_INDEX_MAP + 1) - -#define HTMLP_HTML_TAG_INDEX_MENU (HTMLP_HTML_TAG_INDEX_MARQUEE + 1) - -#define HTMLP_HTML_TAG_INDEX_META (HTMLP_HTML_TAG_INDEX_MENU + 1) - -#define HTMLP_HTML_TAG_INDEX_NOBR (HTMLP_HTML_TAG_INDEX_META + 1) - -#define HTMLP_HTML_TAG_INDEX_NOEMBED (HTMLP_HTML_TAG_INDEX_NOBR + 1) - -#define HTMLP_HTML_TAG_INDEX_NOFRAMES (HTMLP_HTML_TAG_INDEX_NOEMBED + 1) - -#define HTMLP_HTML_TAG_INDEX_NOSCRIPT (HTMLP_HTML_TAG_INDEX_NOFRAMES + 1) - -#define HTMLP_HTML_TAG_INDEX_OBJECT (HTMLP_HTML_TAG_INDEX_NOSCRIPT + 1) - -#define HTMLP_HTML_TAG_INDEX_OL (HTMLP_HTML_TAG_INDEX_OBJECT + 1) - -#define HTMLP_HTML_TAG_INDEX_OPTGROUP (HTMLP_HTML_TAG_INDEX_OL + 1) - -#define HTMLP_HTML_TAG_INDEX_OPTION (HTMLP_HTML_TAG_INDEX_OPTGROUP + 1) - -#define HTMLP_HTML_TAG_INDEX_P (HTMLP_HTML_TAG_INDEX_OPTION + 1) - -#define HTMLP_HTML_TAG_INDEX_PARAM (HTMLP_HTML_TAG_INDEX_P + 1) - -#define HTMLP_HTML_TAG_INDEX_PLAINTEXT (HTMLP_HTML_TAG_INDEX_PARAM + 1) - -#define HTMLP_HTML_TAG_INDEX_PRE (HTMLP_HTML_TAG_INDEX_PLAINTEXT + 1) - -#define HTMLP_HTML_TAG_INDEX_Q (HTMLP_HTML_TAG_INDEX_PRE + 1) - -#define HTMLP_HTML_TAG_INDEX_S (HTMLP_HTML_TAG_INDEX_Q + 1) - -#define HTMLP_HTML_TAG_INDEX_SAMP (HTMLP_HTML_TAG_INDEX_S + 1) - -#define HTMLP_HTML_TAG_INDEX_SCRIPT (HTMLP_HTML_TAG_INDEX_SAMP + 1) - -#define HTMLP_HTML_TAG_INDEX_SELECT (HTMLP_HTML_TAG_INDEX_SCRIPT + 1) - -#define HTMLP_HTML_TAG_INDEX_SMALL (HTMLP_HTML_TAG_INDEX_SELECT + 1) - -#define HTMLP_HTML_TAG_INDEX_SPAN (HTMLP_HTML_TAG_INDEX_SMALL + 1) - -#define HTMLP_HTML_TAG_INDEX_STRIKE (HTMLP_HTML_TAG_INDEX_SPAN + 1) - -#define HTMLP_HTML_TAG_INDEX_STRONG (HTMLP_HTML_TAG_INDEX_STRIKE + 1) - -#define HTMLP_HTML_TAG_INDEX_STYLE (HTMLP_HTML_TAG_INDEX_STRONG + 1) - -#define HTMLP_HTML_TAG_INDEX_SUB (HTMLP_HTML_TAG_INDEX_STYLE +1) - -#define HTMLP_HTML_TAG_INDEX_SUP (HTMLP_HTML_TAG_INDEX_SUB +1) - -#define HTMLP_HTML_TAG_INDEX_TABLE (HTMLP_HTML_TAG_INDEX_SUP + 1) - -#define HTMLP_HTML_TAG_INDEX_TD (HTMLP_HTML_TAG_INDEX_TABLE + 1) - -#define HTMLP_HTML_TAG_INDEX_TEXTAREA (HTMLP_HTML_TAG_INDEX_TD + 1) - -#define HTMLP_HTML_TAG_INDEX_TH (HTMLP_HTML_TAG_INDEX_TEXTAREA + 1) - -#define HTMLP_HTML_TAG_INDEX_TITLE (HTMLP_HTML_TAG_INDEX_TH + 1) - -#define HTMLP_HTML_TAG_INDEX_TR (HTMLP_HTML_TAG_INDEX_TITLE + 1) - -#define HTMLP_HTML_TAG_INDEX_TT (HTMLP_HTML_TAG_INDEX_TR +1) - -#define HTMLP_HTML_TAG_INDEX_U (HTMLP_HTML_TAG_INDEX_TT + 1) - -#define HTMLP_HTML_TAG_INDEX_UL (HTMLP_HTML_TAG_INDEX_U + 1) - -#define HTMLP_HTML_TAG_INDEX_VAR (HTMLP_HTML_TAG_INDEX_UL + 1) - -#define HTMLP_HTML_TAG_INDEX_WMLcVALUEdOF (HTMLP_HTML_TAG_INDEX_VAR + 1) - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -/* NW_HTMLP_HTML_DICT_H */ -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/include/nw_htmlp_lexer.h --- a/webengine/wmlengine/src/htmlp/include/nw_htmlp_lexer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,778 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/** ----------------------------------------------------------------------- ** - @package: NW_HTMLP - - @synopsis: default - - @description: default - - ** ----------------------------------------------------------------------- **/ - -/* -Lexer for HTML parser. -*/ - -#ifndef NW_HTMLP_LEXER_H -#define NW_HTMLP_LEXER_H - - -#include "nw_htmlp_dict.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** ----------------------------------------------------------------------- ** - @enum: NW_HTMLP_Endianness - - @synopsis: Endian indication. - - @scope: public - @names: - [NW_NATIVE_ENDIAN] - Use native endianness. - - [NW_BIG_ENDIAN] - The leftmost bytes (those with a lower address) are - most significant. - - [NW_LITTLE_ENDIAN] - The rightmost bytes (those with a higher address) are - most significant - - @description: Endian indication. - ** ----------------------------------------------------------------------- **/ -typedef enum NW_HTMLP_Endianness_e{ - NW_NATIVE_ENDIAN, - NW_BIG_ENDIAN, - NW_LITTLE_ENDIAN -} NW_HTMLP_Endianness_t; - -/* Deprecated - Here for backwards compatibility */ -typedef enum NW_HTMLP_Endianness_e NW_Endianness_t; - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_LineColumn - - @synopsis: Line and column cursor. - - @scope: public - @variables: - NW_Uint32 crCount - Carriage return count. - - NW_Uint32 lfCount - Line feed count. - - NW_Uint32 charsSinceLastCR - Chars since last CR - - NW_Uint32 charsSinceLastLF - Chars since last LF - - @description: Line and column cursor. - ** ----------------------------------------------------------------------- **/ -typedef struct NW_HTMLP_LineColumn_s { - NW_Uint32 crCount; - NW_Uint32 lfCount; - NW_Uint32 charsSinceLastCR; - NW_Uint32 charsSinceLastLF; - -} NW_HTMLP_LineColumn_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_Lexer_Position - - @synopsis: Lexer position state. - - @scope: public - @variables: - NW_Uint32 readPosition - Read position. - - NW_Uint32 charPosition - Character position. - - NW_Uint32 crCount - CR count. - - NW_Uint32 lfCount - LF count. - - NW_Uint32 charsSinceLastCR - Chars since last CR. - - NW_Uint32 charsSinceLastLF - Chars since last LF. - - NW_Bool end - End. - - @description: This struct holds all information relevant to saving and - restoring the lexer's read position. It encapsulates - discrete bits of information and is not used otherwise. - ** ----------------------------------------------------------------------- **/ -typedef struct NW_HTMLP_Lexer_Position_s { - NW_Uint32 readPosition; - NW_Uint32 charPosition; - NW_Uint32 crCount; - NW_Uint32 lfCount; - NW_Uint32 charsSinceLastCR; - NW_Uint32 charsSinceLastLF; - NW_Bool end; -} NW_HTMLP_Lexer_Position_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_Lexer - - @synopsis: Lexer state. - - @scope: volatile - @variables: - NW_Uint32 encoding - Encoding. - - NW_Endianness_t endianness - Big endian, little endian or native. - - NW_Uint32 readPosition - Read position. - - NW_Uint32 charPosition - Character position. - - NW_HTMLP_LineColumn_t lineColumn - Line column position. - - NW_Uint32 byteCount - Byte count. - - NW_Uint8* pBuf - Buffer size. - - NW_Bool end - End. - - NW_HTMLP_ElementTableIndex_t elementCount - Element count. - - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary - Element dictionary. - - @description: Users of the lexer should not look directly inside this - structure. Instead, use access functions and macros. - ** ----------------------------------------------------------------------- **/ -typedef volatile struct NW_HTMLP_Lexer_s { - /* character set and encoding currently applicable */ - NW_Uint32 encoding; - NW_Endianness_t endianness; - - /* current read position in pBuf, this is a byte index */ - NW_Uint32 readPosition; - - /* like readPosition but in terms of characters not bytes */ - NW_Uint32 charPosition; - - /* information to track line and column position in text */ - NW_HTMLP_LineColumn_t lineColumn; - - /* text is stored in pBuf which is byteCount bytes long */ - NW_Uint32 byteCount; - NW_Uint8* pBuf; - - /* similar to EOF detection */ - NW_Bool end; - - /* count of entries in the element description dictionary */ - NW_HTMLP_ElementTableIndex_t elementCount; - - /* pointer to the element description dictionary */ - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary; - -} NW_HTMLP_Lexer_t; - - -/** ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_Interval_t - - @synopsis: Interval state. - - @scope: public - @variables: - NW_Uint32 start - Start position. - - NW_Uint32 stop - Stop position. - - NW_Uint32 charStart - Start character. - - NW_Uint32 charStop - Stop character. - - @description: Users of the this structure should use use the defined - access functions and macros where appropriate. - - This structure holds byte indicies defining a - substring in the text buffer. If the text is "this is - a sample" and the interval has start = 0, stop = 4, - then the substring is "this". Byte length is stop - - start. If both values are UINT_MAX, then these are - sentinel values meaning the interval has been - initializaed but not defined. If both values are the - same, it means start has been set but stop hasn't been - set. - - Because characters may be encoded in a variable number - of bytes, a separate but parallel set of numbers - tracks character counts and "positions". - - Note: Along with an interval, you may also need to - record the encoding that applies when working with - mixed character sets and encodings. - ** ----------------------------------------------------------------------- **/ -typedef struct NW_HTMLP_Interval_s { - /* the byte indices */ - NW_Uint32 start; - NW_Uint32 stop; - - /* the char indices */ - NW_Uint32 charStart; - NW_Uint32 charStop; - -} NW_HTMLP_Interval_t; - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_InitFromBuffer - - @synopsis: Initialize lexer from a buffer. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint32 byteCount - Byte count. - - [in] NW_Uint8* pBuf - Buffer. - - [in] NW_HTMLP_ElementTableIndex_t elementCount - Element count. - - [in] NW_HTMLP_ElementDescriptionConst_t* pElementDictionary - Element dictionary. - - @description: Initialize lexer from a buffer. Does not copy the buffer. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - initialized - - [KBrsrFailure] - initialization failed - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_InitFromBuffer(NW_HTMLP_Lexer_t* pL, - NW_Uint32 byteCount, - NW_Uint8* pBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary); - -#define NW_HTMLP_Lexer_GetEncoding(pL) ((const)((NW_HTMLP_Lexer_t*)pL)->encoding) -#define NW_HTMLP_Lexer_SetEncoding(pL, e) ((pL)->encoding = (e)) - -#define NW_HTMLP_Lexer_GetEndianness(pL) ((const)((NW_HTMLP_Lexer_t*)pL)->endianness) -#define NW_HTMLP_Lexer_SetEndianness(pL, e) ((pL)->endianness = (e)) - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_DataAddressFromBuffer - - @synopsis: Create data address from offset. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - Lexer. - - [in] NW_Uint32 byteIndex - Byte index. - - [in] NW_Uint32* pByteCount - Byte count. - - [out] NW_Uint8** ppData - Pointer into buffer. - - @description: Returns a pointer in *ppData into pBuf at some byte position - and byte count. Byte count is truncated to fit in pBuf if required. - - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Address created. - - [KBrsrFailure] - Index out of bounds. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_DataAddressFromBuffer(NW_HTMLP_Lexer_t* pL, - NW_Uint32 byteIndex, - NW_Uint32* pByteCount, - NW_Uint8** ppData); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_GetPosition - - @synopsis: Gets position state. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_HTMLP_Lexer_Position_t* pPosition - Current position. - - @description: Provides everything needed to save (and then restore) current - read position. - - ** ----------------------------------------------------------------------- **/ -void NW_HTMLP_Lexer_GetPosition(NW_HTMLP_Lexer_t* pL, NW_HTMLP_Lexer_Position_t* pPosition); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_SetPosition - - @synopsis: Set position in lexer. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_HTMLP_Lexer_Position_t* pPosition - Desired position. - - @description: Setting the position (similar to seeking in a file) is - in general not possible without reading the characters - (usually reading forward) because character encoding - may use a variable numbers of bytes per character. If - you need to save and restore a position, say because - you have defined an interval, then use this function. - Setting the position to a misaligned location will not - always be caught immediately. You must also save and set - line and column with position. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Position set. - - [KBrsrFailure] - Index out of bounds. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_SetPosition(NW_HTMLP_Lexer_t* pL, NW_HTMLP_Lexer_Position_t* pPosition); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_GetLineColumn - - @synopsis: Get line column. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_Uint32* pLine - Line position. - - [out] NW_Uint32* pColumn - Column position. - - @description: Returns an estimate of the current line and column position - in the text. It is an estimate because it has to guess at - what the intended line ending sequence is using a count of - CR and LF characters. Line and Column indices are 1-based - not 0-based. - ** ----------------------------------------------------------------------- **/ -void NW_HTMLP_Lexer_GetLineColumn(NW_HTMLP_Lexer_t* pL, - NW_Uint32* pLine, - NW_Uint32* pColumn); - -#define NW_HTMLP_Lexer_AtEnd(pL) (((NW_HTMLP_Lexer_t*)pL)->end == NW_TRUE) - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_PeekOffset - - @synopsis: default - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint32 offsetCharCount - Offset into buffer. - - [out] NW_Uint32* pChar - Character position of cursor. - - [out] NW_Bool* pEOF - NW_TRUE if at end of buffer, otherwise NW_FALSE. - - @description: Fails on encountering illegal char anywhere from current - read position to offset position or if position is illegal - (e.g., past end). Leaves read position unchanged. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Position returned. - - [KBrsrFailure] - Index out of bound or invalid character. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_PeekOffset(NW_HTMLP_Lexer_t* pL, - NW_Uint32 offsetCharCount, - NW_Uint32* pChar, - NW_Bool* pEOF); - -#define NW_HTMLP_Lexer_Peek(pL, pChar, pEOF) NW_HTMLP_Lexer_PeekOffset((pL), 0, (pChar), pEOF) - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_AdvanceOffset - - @synopsis: Advance offset. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint32 offsetCharCount - Offset to advance. - - @description: Fails on encountering illegal char anywhere from current - read position to offset position or if position is illegal - (e.g., past end). Moves read position to current + offset. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Position advanced. - - [KBrsrFailure] - Index out of bound or invalid character. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_AdvanceOffset(NW_HTMLP_Lexer_t* pL, - NW_Uint32 offsetCharCount); - -#define NW_HTMLP_Lexer_Advance(pL) NW_HTMLP_Lexer_AdvanceOffset((pL), 1) - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_AsciiCharCompare - - @synopsis: Compare character. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint8 c - Character to compare. - - [out] NW_Bool* pMatch - NW_TRUE if characters match, otherwise NW_FALSE. - - @description: *pMatch is NW_TRUE if ASCII character c matches Reader - char in its encoding. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Characters were compared. pMatch has results. - - [KBrsrFailure] - Characters were not compared. Index out of bound or - invalid character. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiCharCompare(NW_HTMLP_Lexer_t* pL, - NW_Uint8 c, - NW_Bool* pMatch); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_AsciiStringCompare - - @synopsis: default - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint32 asciiCharCount - Character count for comparison. - - [in] const NW_Uint8* pString - Characters to compare. - - [out] NW_Bool* pMatch - NW_TRUE if string matches. - - @description: *pMatch is NW_TRUE if ASCII string matches buffer text - (in charset and encoding). - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Strings were compared. pMatch has results. - - [KBrsrFailure] - Strings were not compared. Index out of bound or - invalid character. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiStringCompare(NW_HTMLP_Lexer_t* pL, - NW_Uint32 asciiCharCount, - const NW_Uint8* pString, - NW_Bool* pMatch); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_AsciiStringCompareCase - - @synopsis: default - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [in] NW_Uint32 asciiCharCount - Character count for comparison. - - [in] const NW_Uint8* pString - Characters to compare. - - [in] NW_Bool CaseSensitive - Compare with case sensitive or not - - [out] NW_Bool* pMatch - NW_TRUE if string matches. - - @description: *pMatch is NW_TRUE if ASCII string matches buffer text - (in charset and encoding). - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Strings were compared. pMatch has results. - - [KBrsrFailure] - Strings were not compared. Index out of bound or - invalid character. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiStringCompareCase(NW_HTMLP_Lexer_t* pL, - NW_Uint32 asciiCharCount, - const NW_Uint8* pString, - NW_Bool CaseSensitive, - NW_Bool* pMatch); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_IsSpace - - @synopsis: Checks for space. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_Bool* pMatch - NW_TRUE if a space, otherwise NW_FALSE. - - @description: Checks for space. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Character checked. - - [KBrsrFailure] - Character not checked. Cursor at end of file. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_IsSpace(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch); - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_IsCRLF - - @synopsis: Checks for CR or LF. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_Bool* pMatch - NW_TRUE if a CR or LF, otherwise NW_FALSE. - - @description: Checks for CR or LF. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Character checked. - - [KBrsrFailure] - Character not checked. Cursor at end of file. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_IsCRLF(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch); - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_IsAsciiLetter - - @synopsis: Checks for letter. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_Bool* pMatch - NW_TRUE if a letter, otherwise NW_FALSE. - - @description: Checks for letter. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Character checked. - - [KBrsrFailure] - Character not checked. Cursor at end of file. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_IsAsciiLetter(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch); - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Lexer_IsAsciiDigit - - @synopsis: Checks for digit. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* pL - The lexer. - - [out] NW_Bool* pMatch - NW_TRUE if an ASCII digit, otherwise NW_FALSE. - - @description: Checks for ASCII digit. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Character checked. - - [KBrsrFailure] - Character not checked. Cursor at end of file. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Lexer_IsAsciiDigit(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch); - - -/* Interval Functions */ - -/* Always initialize the interval. */ -#define NW_HTMLP_Interval_Init(pI) \ -((pI)->start = (pI)->stop = (pI)->charStart = (pI)->charStop = NW_UINT32_MAX) - -/* Useful in error tests and asserts. */ -#define NW_HTMLP_Interval_IsWellFormed(pI) \ -(((pI)->stop > (pI)->start) && ((pI)->charStop > (pI)->charStart)) - -/* Sets start, stop, charStart, charStop to current read position. */ -void NW_HTMLP_Interval_Start(NW_HTMLP_Interval_t* pI, NW_HTMLP_Lexer_t* pL); - -/* Sets stop to current reader position. */ -void NW_HTMLP_Interval_Stop(NW_HTMLP_Interval_t* pI, NW_HTMLP_Lexer_t* pL); - -#define NW_HTMLP_Interval_ByteCount(pI) ((pI)->stop - (pI)->start) -#define NW_HTMLP_Interval_CharCount(pI) ((pI)->charStop - (pI)->charStart) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -/* NW_HTMLP_LEXER_H */ -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/include/nw_htmlp_parser.h --- a/webengine/wmlengine/src/htmlp/include/nw_htmlp_parser.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -/** ----------------------------------------------------------------------- ** - @package: NW_HTMLP - - @synopsis: default - - @description: HTML Parser - - ** ----------------------------------------------------------------------- **/ -#ifndef NW_HTMLP_PARSER_H -#define NW_HTMLP_PARSER_H - - -#include "nw_htmlp_lexer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Next two govern allocation/reallocation of the open element stack. */ -#ifndef NW_HTMLP_OPEN_ELEMENT_INITIAL_STACK_CAPACITY -#define NW_HTMLP_OPEN_ELEMENT_INITIAL_STACK_CAPACITY 16 -#endif -#ifndef NW_HTMLP_OPEN_ELEMENT_STACK_GROW_BY -#define NW_HTMLP_OPEN_ELEMENT_STACK_GROW_BY 8 -#endif - -/* RME Documentation tools do not support callback syntax. */ -/* * ----------------------------------------------------------------------- ** - @struct: NW_HTMLP_EventCallbacks - - @synopsis: default - - @scope: public - @variables: - TBrowserStatusCode (*beginDocumentCB) (NW_HTMLP_Lexer_t*, void*) - default - - TBrowserStatusCode (*endDocumentCB) (NW_HTMLP_Lexer_t*, NW_Bool failed, void*) - default - - TBrowserStatusCode (*startTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - void*) - default - - TBrowserStatusCode (*endTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - NW_Bool emptyTag, void*) - default - - TBrowserStatusCode (*contentCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*) - default - - TBrowserStatusCode (*cdataCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*) - default - - TBrowserStatusCode (*attributeStartCB) (void*) - default - - TBrowserStatusCode (*attributeNameAndValueCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pName, - NW_Bool missingValue, - const NW_HTMLP_Interval_t* pValue, - void*) - default - - TBrowserStatusCode (*attributesEndCB) (NW_Uint32 attributeCount, void*) - default - - void* pClientPointer - Passed back in each callback. - - @description: default - ** ----------------------------------------------------------------------- **/ -struct NW_HTMLP_EventCallbacks_s { - TBrowserStatusCode (*beginDocumentCB) (NW_HTMLP_Lexer_t*, void*); - TBrowserStatusCode (*endDocumentCB) (NW_HTMLP_Lexer_t*, NW_Bool failed, void*); - TBrowserStatusCode (*startTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - void*); - TBrowserStatusCode (*endTagCB) (NW_Uint8 asciiCharCount, const NW_Uint8* pBuf, - NW_Bool emptyTag, void*); - TBrowserStatusCode (*contentCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*); - TBrowserStatusCode (*cdataCB) (NW_HTMLP_Lexer_t*, const NW_HTMLP_Interval_t*, - void*); - TBrowserStatusCode (*attributeStartCB) (void*); - TBrowserStatusCode (*attributeNameAndValueCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pName, - NW_Bool missingValue, - const NW_HTMLP_Interval_t* pValue, - void*); - TBrowserStatusCode (*attributesEndCB) (NW_Uint32 attributeCount, void*); - TBrowserStatusCode (*piFormCB) (NW_HTMLP_Lexer_t*, - const NW_HTMLP_Interval_t* pPITarget, - const NW_HTMLP_Interval_t* pArguments, - void*); - void* pClientPointer; /* passed back in each callback */ -}; - - -/** ----------------------------------------------------------------------- ** - @function: NW_HTMLP_Parse - - @synopsis: Initiates parse of document. - - @scope: public - - @parameters: - [in] NW_HTMLP_Lexer_t* lexer - The lexer. - - [in] const struct NW_HTMLP_EventCallbacks_s* pCB - Callback structure and parser state. - - @description: Initiates parse of document. - - @returns: TBrowserStatusCode - Status of operation. - - [KBrsrSuccess] - Buffer parsed. - - [KBrsrFailure] - Parse failed. - - [KBrsrOutOfMemory] - Ran out of memory parsing the document. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode NW_HTMLP_Parse(NW_HTMLP_Lexer_t* lexer, - const struct NW_HTMLP_EventCallbacks_s* pCB, - NW_Bool consumeSpaces); - -/* Added for handling special cases for elements. It is good idea to document - * each special case here. In other words, this is small state machine to handle - * all such cases. - * - - * - * 1) " len 9 */ - -#define NW_HTMLP_String_EndScriptLength 9 -static -const NW_Uint8 NW_HTMLP_String_EndScript[NW_HTMLP_String_EndScriptLength] = - { - '<', '/','s','c','r','i','p','t','>' - }; - -// =" or =' len 2 -#define NW_HTMLP_String_EqualQuoteLength 2 -static -const NW_Uint8 NW_HTMLP_String_EqualDblQuote[NW_HTMLP_String_EqualQuoteLength] = - { - '=', '\"' - }; -static -const NW_Uint8 NW_HTMLP_String_EqualSngQuote[NW_HTMLP_String_EqualQuoteLength] = - { - '=', '\'' - }; - -// TODO: Throughout this class iCBs is checked against null. It appears that iCBs is -// created in the constructor and not deallocated until the destructor. If -// this is the case all of the iCBs null check should be removed. - -//lint -esym(794, CHtmlpParser::iCBs) Conceivable use of null pointer - -/* constructors and destructor of CHtmlpParser */ - -CHtmlpParser* CHtmlpParser::NewL( - NW_Uint32 inputByteCount, - NW_Uint8* pInputBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Uint32 encoding, - NW_Bool consumeSpaces, - void * parser, - NW_Bool isScript) - { - CHtmlpParser * self = (CHtmlpParser *)parser; - if (!self) - { - self = new (ELeave) CHtmlpParser(consumeSpaces); - CleanupStack::PushL(self); - self->ConstructL(inputByteCount, pInputBuf, elementCount, pElementDictionary, encoding, isScript); - CleanupStack::Pop(); //instance - return self; - } - else - { - User::LeaveIfError( - NW_HTMLP_Lexer_InitFromBuffer(self->iLexer, inputByteCount, pInputBuf, elementCount, pElementDictionary)); - NW_HTMLP_Lexer_SetEncoding(self->iLexer, encoding); - return self; - } - } - -CHtmlpParser::CHtmlpParser( NW_Bool consumeSpaces) - { - iLastTextBuf = NULL; - iLastValid = -1; - iPreviousValidOutput = NULL; - iConsumeSpaces = consumeSpaces; - iRestarted = NW_FALSE; - iWithinNoscript = NW_FALSE; - } - -void CHtmlpParser::ConstructL(NW_Uint32 inputByteCount, - NW_Uint8* pInputBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Uint32 encoding, - NW_Bool isScript) - { - iSPLElemHandling = (NW_HTMLP_SPL_Elem_Handling_t*)NW_Mem_Malloc(sizeof(NW_HTMLP_SPL_Elem_Handling_t)); - User::LeaveIfNull( iSPLElemHandling ); - - NW_HTMLP_ElementParseState_New(); - User::LeaveIfNull( iElementParseState ); - - iCBs = (NW_HTMLP_EventCallbacks_t*)NW_Mem_Malloc(sizeof(NW_HTMLP_EventCallbacks_t)); - User::LeaveIfNull( iCBs ); - NW_Mem_memset(iCBs, 0, sizeof(NW_HTMLP_EventCallbacks_t)); - - iLexer = (NW_HTMLP_Lexer_t* )NW_Mem_Malloc(sizeof(NW_HTMLP_Lexer_t)); - /* Reregister the document text with the Reader in preparation for parsing. */ - User::LeaveIfError( - NW_HTMLP_Lexer_InitFromBuffer(iLexer, inputByteCount, pInputBuf, elementCount, pElementDictionary)); - - NW_HTMLP_Lexer_SetEncoding(iLexer, encoding); - - /* Null out all WBXML generation callback addresses. */ - NW_Mem_memset(iCBs, 0, sizeof(NW_HTMLP_EventCallbacks_t)); - - iOrigEncoding = -1; - iLeftBytes = NULL; - iIsScript = isScript; - } - -CHtmlpParser::~CHtmlpParser() - { - NW_Mem_Free(iSPLElemHandling); - - if (iElementParseState) - { - NW_HTMLP_ElementParseState_Delete(&iElementParseState); - } - if (iLastValidStack) - { - NW_HTMLP_ElementParseState_Delete(&iLastValidStack); - } - - if (iCBs->charsetContext) - { - NW_Mem_Free(iCBs->charsetContext); - } - NW_Mem_Free(iCBs); - - NW_Mem_Free ((void *)iLexer); - NW_Buffer_Free(iLastTextBuf); - NW_Buffer_Free(iPreviousValidOutput); - NW_Buffer_Free(iVisitedHeadText); - } - - - /* - on entry: lexer read position is at the first character of keyword - on return: If matched keyword, then *pMatch == NW_TRUE, interval marks - .........: keyword in doc and lexer read position is just after keyword. - .........: NOTE: Keyword match just means the string of keyword chars - .........: exists at the read position so it does not mean that the keyword - .........: is delimited at the end---it might be followed by more name chars. - .........: If did not match keyword, then *pMatch == NW_FALSE and lexer - .........: read position is unchanged from on entry. - eof handling: if encounters EOF while attempting operation then returns - ............: *pMatch == NW_FALSE and KBrsrSuccess - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified -*/ -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfExistsConsumeKeywordCase(NW_HTMLP_Interval_t* pI, - NW_Uint32 asciiCharCount, - const NW_Uint8* pKeyword, - NW_Bool CaseSensitive, - NW_Bool* pMatch) - { - NW_HTMLP_Lexer_Position_t position; - TBrowserStatusCode e; - NW_Bool match; - - *pMatch = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - NW_HTMLP_Interval_Init(pI); - e = NW_HTMLP_Lexer_AsciiStringCompareCase(iLexer, asciiCharCount, pKeyword, CaseSensitive, &match); - if (e == KBrsrSuccess) { - if (match == NW_TRUE) { - NW_HTMLP_Interval_Start(pI, iLexer); - e = NW_HTMLP_Lexer_AdvanceOffset(iLexer, asciiCharCount); - if (BRSR_STAT_IS_FAILURE(e)) { - NW_HTMLP_Interval_Init(pI); - return e; - } - NW_HTMLP_Interval_Stop(pI, iLexer); - *pMatch = NW_TRUE; - } else { - NW_HTMLP_Lexer_SetPosition(iLexer, &position); - } - } - return e; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfExistsConsumeKeyword(NW_HTMLP_Interval_t* pI, - NW_Uint32 asciiCharCount, - const NW_Uint8* pKeyword, - NW_Bool* pMatch) - { - - return NW_HTMLP_IfExistsConsumeKeywordCase( pI, - asciiCharCount, - pKeyword, - NW_TRUE, - pMatch); - } - - /* - on entry: no assumptions - on return: Lexer read position moved ahead until character at current - .........: read position is not whitespace. Return value is KBrsrSuccess. - eof handling: if encounters EOF then stops at that point and returns - ............: KBrsrSuccess - on error return: return value is not KBrsrSuccess and lexer read position - ...............: is unspecified -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_SkipSpace() - { - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool match = NW_FALSE; - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - e = NW_HTMLP_Lexer_IsSpace(iLexer, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } else { - break; - } - } - return e; - } - - /* - on entry: no assumptions - on return: Lexer read position moved ahead until character at current - .........: read position is not whitespace or a 'junk' character. - .........: The junk characters were found on live websites. - .........: Return value is KBrsrSuccess. - eof handling: if encounters EOF then stops at that point and returns - ............: KBrsrSuccess - on error return: return value is not KBrsrSuccess and lexer read position - ...............: is unspecified -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_SkipJunk() -{ -TBrowserStatusCode e = KBrsrSuccess; -NW_Bool match = NW_FALSE; - -while (!NW_HTMLP_Lexer_AtEnd(iLexer)) - { - - e = NW_HTMLP_Lexer_IsSpace(iLexer, &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - - if (match == NW_FALSE) - { - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, ';', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - - if (match == NW_FALSE) - { - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '+', &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - - if (match == NW_TRUE) - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - else - { - break; - } - } -return e; -} - - /* - on entry: no assumptions - on return: Lexer read position moved ahead until character at current - .........: read position is not CR or LF. Return value is KBrsrSuccess. - eof handling: if encounters EOF then stops at that point and returns - ............: KBrsrSuccess - on error return: return value is not KBrsrSuccess and lexer read position - ...............: is unspecified -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_SkipCRLF() - { - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool match = NW_FALSE; - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - e = NW_HTMLP_Lexer_IsCRLF(iLexer, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } else { - break; - } - } - return e; - } - - /* - A name (e.g., tag name) matches the pattern "[a-zA-Z][a-zA-Z0-9.-_:]*\s" - Assumes starting read position is at the first character of name. - On return: *pMatch = NW_TRUE if found name, NW_FALSE if no name parsed - On return: If *pMatch == NW_TRUE, then *pI marks the name. - - TBD: loosen this up to allow the pattern [a-zA-Z][^/?]*\s - don't allow ? due to ?> on PI forms - don't allow / due to /> on empty element -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ParseName(NW_Bool* pMatch, - NW_HTMLP_Interval_t* pI) - { - NW_HTMLP_Lexer_Position_t position; - TBrowserStatusCode sl = KBrsrSuccess; - NW_Bool isLetter = NW_FALSE; - TBrowserStatusCode sd = KBrsrSuccess; - NW_Bool isDigit = NW_FALSE; - TBrowserStatusCode sp = KBrsrSuccess; - NW_Bool isPeriod = NW_FALSE; - TBrowserStatusCode sh = KBrsrSuccess; - NW_Bool isHyphen = NW_FALSE; - TBrowserStatusCode su = KBrsrSuccess; - NW_Bool isUnderscore = NW_FALSE; - TBrowserStatusCode sc = KBrsrSuccess; - NW_Bool isColon = NW_FALSE; - TBrowserStatusCode s = KBrsrSuccess; - - *pMatch = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - NW_HTMLP_Interval_Init(pI); - sl = NW_HTMLP_Lexer_IsAsciiLetter(iLexer, &isLetter); - if (!BRSR_STAT_IS_FAILURE(sl)) { - if (isLetter) { - NW_HTMLP_Interval_Start(pI, iLexer); - while ((!BRSR_STAT_IS_FAILURE(sl) && !BRSR_STAT_IS_FAILURE(su) - && !BRSR_STAT_IS_FAILURE(sc) && !BRSR_STAT_IS_FAILURE(sd) - && !BRSR_STAT_IS_FAILURE(sp) && !BRSR_STAT_IS_FAILURE(sh) - && !BRSR_STAT_IS_FAILURE(s)) - && (isLetter || isDigit || isPeriod || isHyphen - || isUnderscore || isColon)) { - s = NW_HTMLP_Lexer_Advance(iLexer); - sl = NW_HTMLP_Lexer_IsAsciiLetter(iLexer, &isLetter); - sd = NW_HTMLP_Lexer_IsAsciiDigit(iLexer, &isDigit); - sp = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '.', &isPeriod); - sh = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '-', &isHyphen); - su = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '_', &isUnderscore); - sc = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, ':', &isColon); - } - NW_HTMLP_Interval_Stop(pI, iLexer); - *pMatch = NW_TRUE; - } - } - if (BRSR_STAT_IS_FAILURE(sl) || BRSR_STAT_IS_FAILURE(su) - || BRSR_STAT_IS_FAILURE(sc) || BRSR_STAT_IS_FAILURE(sd) - || BRSR_STAT_IS_FAILURE(sp) || BRSR_STAT_IS_FAILURE(sh) - || BRSR_STAT_IS_FAILURE(s)) { - return KBrsrFailure; - } - if (*pMatch == NW_FALSE) { - s = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - } - return KBrsrSuccess; - } - - /* - on entry: lexer read position is just after '' - (no whitespace allowed between '--' and '>' as in specification) - "imode" where comments ends at "->" - "loose" where comment ends at first '>' - First apply "strict" and if that fails to match, then apply "loose". - - Note: This is slightly different than the specifications but conforms - to common browser behavior. */ - - *pMatch = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - - if(looseComment) - { - pKeyword =(NW_Uint8*)&NW_HTMLP_String_TagEnd; - count = NW_HTMLP_String_TagEndLength; - } - else if(imodeComment) - { - pKeyword = (NW_Uint8*) &NW_HTMLP_String_ImodeCommentStop; - count = NW_HTMLP_String_ImodeCommentStopLength; - } - else - { - pKeyword = (NW_Uint8*) &NW_HTMLP_String_CommentStop; - count = NW_HTMLP_String_CommentStopLength; - pKeyword2 = (NW_Uint8*) &NW_HTMLP_String_Comment2Stop; - count2 = NW_HTMLP_String_Comment2StopLength; - - } - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) - { - // If the loose, imode, or normal end-comment is found comsume - // it and set pMatch to true. - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, count, - pKeyword, &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - status = e; - break; - } - - if (match == NW_TRUE) - { - *pMatch = NW_TRUE; - break; - } - - // If the "--!>" end-comment is found comsume it and set - // pMatch to true. - if (pKeyword2) - { - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, count2, - pKeyword2, &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - status = e; - break; - } - } - if (match == NW_TRUE) - { - *pMatch = NW_TRUE; - break; - } - - // As it searches for the end-comment it also keeps track of - // the first embeded tag. This tag is later used to force end - // the comment if it reaches the end of the file before finding - // a end-comment. - if (!foundFirstElement) - { - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - status = e; - break; - } - if (match == NW_TRUE) - { - foundFirstElement = NW_TRUE; - NW_HTMLP_Lexer_GetPosition(iLexer, &fistElementPosition); - } - } - - // Otherwise advance a char and test for end-comment again. - e = NW_HTMLP_Lexer_Advance(iLexer); - - if (BRSR_STAT_IS_FAILURE(e)) - { - status = e; - break; - } - }/*end while*/ - - - // If end-comment wasn't found in this block, it may be missing. - if ((match == NW_FALSE) && NW_HTMLP_Lexer_AtEnd(iLexer) && foundFirstElement) - { - // If the document is completed then terminate the comment just - // before the first start tag after begin-comment. - if (iDocComplete) - { - NW_HTMLP_Lexer_SetPosition(iLexer, &fistElementPosition); - *pMatch = NW_TRUE; - } - - // Otherwise note that we may be tracking a unterminated comment. - else - { - iTrackingUnTerminatedComment = NW_TRUE; - } - } - - - return status; - } - - - /* - on entry: assumes lexer read position is character following ''. - .........: If did not consume CDATA, then *pMatch == NW_FALSE and - .........: lexer read position is unspecified. - .........: In either case return value is KBrsrSuccess. - eof handling: if encounters EOF while attempting operation then returns - ............: *pMatch == NW_FALSE and KBrsrSuccess with lexer read - ............: position at EOF - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_FinishCdata(NW_HTMLP_Interval_t* pInterval, - NW_Bool* pMatch) - { - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_Bool match; - - *pMatch = NW_FALSE; - NW_HTMLP_Interval_Start(pInterval, iLexer); - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - NW_HTMLP_Interval_Stop(pInterval, iLexer); - /* end with match if see ']]>' */ - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_CdataStopLength, - NW_HTMLP_String_CdataStop, - &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - *pMatch = NW_TRUE; - break; - } - /* advance */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - return KBrsrSuccess; - } - - /* - on entry: assumes lexer read position is character following ''. - .........: If did not consume a DOCTYPE, then *pMatch == NW_FALSE and - .........: lexer read position is unspecified. - .........: In either case return value is KBrsrSuccess. - eof handling: if encounters EOF while attempting operation then returns - ............: *pMatch == NW_FALSE and KBrsrSuccess with lexer read - ............: position at EOF - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_FinishDoctype(NW_Bool* pMatch, - NW_HTMLP_Interval_t* doctypeInterval) - { - /* Because DOCTYPE attributes may include strings and inside these strings - the characters '>' and '<' may be used, strings must be parsed. Strings are - quoted either with '\'' or '\"'. */ - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_HTMLP_Interval_t arguments; - NW_HTMLP_Lexer_Position_t position; - - *pMatch = NW_FALSE; - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - NW_HTMLP_Interval_Start(&arguments, iLexer); - *pMatch = NW_FALSE; - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - /* end with match if see '>' */ - NW_HTMLP_Interval_Stop(&arguments, iLexer); /* keep moving along end */ - - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_TagEndLength, - NW_HTMLP_String_TagEnd, - pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE){ - if ((iCBs != NULL) && (iCBs->piFormCB != NULL)) { - NW_Uint32 cp_cnt = 0; - e = (*(iCBs->piFormCB))(iLexer, doctypeInterval, &arguments, iCBs->pClientPointer, &cp_cnt); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - updateCurrentCP(cp_cnt); - } - break; - } - /* advance */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if (*pMatch == NW_FALSE) { - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - return KBrsrSuccess; - } - - /* - on entry: lexer read position is at '<' - on return: If consumed a comment, then *pMatch == NW_TRUE and - .........: lexer read position is just after closing '>'. - .........: If did not consume a comment, then *pMatch == NW_FALSE and - .........: lexer read position is unchanged. - .........: In either case return value is KBrsrSuccess. - .........: There are three types of comments are handled here: - .........: (1) Exact syntax comment ( ) - .........: (2) Imode Comments ( ) - .........: (3) Loose Comments ( ) - .........: Note: Loose Comments must avoid consuming and . - eof handling: if encounters EOF while attempting operation then returns - ............: *pMatch == NW_FALSE and KBrsrSuccess with lexer read - ............: position unchanged - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeComment(NW_Bool* pMatch) - { - NW_HTMLP_Lexer_Position_t position; - NW_HTMLP_Interval_t interval; - TBrowserStatusCode e; - NW_Bool match; - NW_Bool imodeComment = NW_FALSE; - NW_Bool looseComment = NW_FALSE; - NW_Bool isNotComment = NW_FALSE; - - iTrackingUnTerminatedComment = NW_FALSE; - *pMatch = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - - // Check first for correct syntax comments. - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_CommentStartLength, - NW_HTMLP_String_CommentStart, - &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - - // Check for IMode type of comments. - if (match == NW_FALSE) - { - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_ImodeCommentStartLength, - NW_HTMLP_String_ImodeCommentStart, - &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match == NW_TRUE) - imodeComment = NW_TRUE; - } - - - // Check for '. - .........: If did not consume a PI, then *pMatch == NW_FALSE and - .........: lexer read position is unchanged - eof handling: if encounters EOF while attempting operation then returns - ............: *pMatch == NW_FALSE and KBrsrSuccess with lexer read - ............: position unchanged - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumePi(NW_Bool* pMatch) - { - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_HTMLP_Interval_t name; - NW_HTMLP_Interval_t arguments; - NW_HTMLP_Lexer_Position_t position; - NW_Bool isXml = NW_FALSE; - - /* The XML spec says that PI forms may not use '?>' anywhere except to end - the PI form. This means that quoted strings should not be recognized, but - this may be something that should be relaxed. */ - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_PiFormStartLength, - NW_HTMLP_String_PiFormStart, - pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - /* parse PITarget */ - e = NW_HTMLP_ParseName(pMatch, &name); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - /* Find xml charset definition */ - if (iNeedCharsetDetect && (name.charStop - name.charStart == 3)) - { - static const NW_Ucs2 xmlStr[] = {'x','m','l','\0'}; - - if (NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + name.start), (const NW_Byte*)xmlStr, NW_Str_Strlen(xmlStr)*sizeof(NW_Ucs2)) == 0) - { - isXml = NW_TRUE; - } - } - /* skip any whitespace */ - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - NW_HTMLP_Interval_Start(&arguments, iLexer); - *pMatch = NW_FALSE; - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - /* End with match if see '?>' */ - NW_HTMLP_Interval_Stop(&arguments, iLexer); /* keep moving along end */ - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_PiFormStopLength, - NW_HTMLP_String_PiFormStop, - pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - if ((iCBs != NULL) && (iCBs->piFormCB != NULL)) { - NW_Uint32 cp_cnt = 0; - e = (*(iCBs->piFormCB))(iLexer, &name, &arguments, iCBs->pClientPointer, &cp_cnt); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - updateCurrentCP(cp_cnt); - } - break; - } - /* advance */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - - if (isXml) - { - e = NW_HTMLP_SPL_Elem_Handle_xml_charset(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - - } - } - } - if (*pMatch == NW_FALSE) { - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - return KBrsrSuccess; - } - - /* - assumes read position is at "<" - on return: *pMatch == NW_TRUE if consumed a well-formed CDATA - if *pMatch == NW_FALSE then read position is unchanged - */ - TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeCdata(NW_Bool* pMatch) - { - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_HTMLP_Lexer_Position_t position; - - /* If element is ill-formed: - 1. save location before opening markup - 2. if processing reaches end of doc before ending element, - then reset to starting markup and return with *pMatch == NW_FALSE */ - - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_CdataStartLength, - NW_HTMLP_String_CdataStart, - pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - e = NW_HTMLP_FinishCdata(&interval, pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_FALSE) { - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } else { - if (iCBs->cdataCB != NULL) { - e = (*(iCBs->cdataCB))(iLexer, &interval, iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - } - return KBrsrSuccess; - } - - /* - assumes read position is at "<". This is used to handle the - special case such as when comments appears inside the script - element. - - on return: *pMatch == NW_TRUE if consumed comment type - if *pMatch == NW_FALSE then read position is unchanged - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_HandleSpecialCases(NW_Bool* pMatch) - { - TBrowserStatusCode e; - - *pMatch = NW_FALSE; - - if(iSPLElemHandling->splHandle == NW_TRUE) - { - switch(iSPLElemHandling->type) - { - case NW_HTMLP_SPL_SCRIPT: - - //Don't loose the contents inside the script as ECMA script - //requires these. Also, at the same time consume all of these - //so that funny characters are not appreared on the screen. - //A counter is used for this purpose that will keep track - //of all open/close comments ("<--" and "-->" inside the script). - // It has been found that there can be nested comments inside the - // element. - - if(!NW_HTMLP_Lexer_AtEnd(iLexer) ) - { - NW_Int32 iCommentCnt = 0; - NW_HTMLP_Interval_t interval; - NW_HTMLP_Interval_t intervalTotal; - TBrowserStatusCode s_hyphen = KBrsrSuccess; //Hypen - NW_Bool isHyphen = NW_FALSE; - TBrowserStatusCode s_lt = KBrsrSuccess; // '<' for starting tag - NW_Bool isLT = NW_FALSE; - NW_Bool isStartComment = NW_FALSE; - NW_Bool isEndComment = NW_FALSE; - NW_Bool isEndScript = NW_FALSE; - NW_Bool isTrueEndScript = NW_FALSE; - NW_Uint32 scriptContentLen = 0; - - NW_HTMLP_Interval_Start(&intervalTotal, iLexer); - - do - { - - - //Check comment starting ("") - // (3) End tag ("/script") outside comment. If it is - // inside then we don't do anything. Keep reading the - // data. - - - - while ( (!NW_HTMLP_Lexer_AtEnd(iLexer)) && - !BRSR_STAT_IS_FAILURE(s_lt) && - !BRSR_STAT_IS_FAILURE(s_hyphen) && - (!isHyphen && !isLT) - ) - { - - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - - s_hyphen = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '-', &isHyphen); - s_lt = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &isLT); - }//end while - - - if( BRSR_STAT_IS_FAILURE(s_hyphen) || BRSR_STAT_IS_FAILURE(s_lt) ) - { - return KBrsrFailure; - } - - - if(isLT == NW_TRUE) //Starting '<' - { - isLT = NW_FALSE; //For next cycle - //Check for another starting comment will be taken care in - //beginning of loop. - - //Check for end script tag - - e = NW_HTMLP_Lexer_AsciiStringCompareCase(iLexer, - NW_HTMLP_String_EndScriptLength, - NW_HTMLP_String_EndScript,NW_FALSE, - &isEndScript); - - - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - - - /* Not actual */ - - if(isEndScript == NW_TRUE && (iCommentCnt >= 1) ) - { - //The end tag might be in comment, skip - e = NW_HTMLP_Lexer_AdvanceOffset(iLexer, - NW_HTMLP_String_EndScriptLength); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - continue; - } - else if(isEndScript == NW_TRUE && (iCommentCnt == 0)) - { - //Actual end of the , so we return - isTrueEndScript = NW_TRUE; - NW_HTMLP_Interval_Stop(&intervalTotal, iLexer); - *pMatch = NW_TRUE; - break; - } - }//end if(s_lt == NW_TRUE) //Starting '<' - - if(isHyphen == NW_TRUE) - { - isHyphen = NW_FALSE; //For next cycle - //Check for end of comments "-->" - e = NW_HTMLP_IfExistsConsumeKeyword(&interval, - NW_HTMLP_String_CommentStopLength, - NW_HTMLP_String_CommentStop, - &isEndComment); - - - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - - if( (isEndComment == NW_TRUE) && (iCommentCnt > 0) ) - { - iCommentCnt--; - /*For next cycle */ - s_hyphen = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '-', &isHyphen); - s_lt = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &isLT); - }//end if(isEndComment == NW_TRUE) - }//end if(isHyphen == NW_TRUE) - - } while (!NW_HTMLP_Lexer_AtEnd(iLexer)); - - //Now make call back to write these contents as whole. - //The end of tag will be handled separately in main routine. - - - scriptContentLen = NW_HTMLP_Interval_ByteCount(&intervalTotal); - - if( (isTrueEndScript == NW_TRUE) && (scriptContentLen > 0) ) - { - if (iCBs->contentCB != NULL) - { - - e = (*(iCBs->contentCB))(iLexer, &intervalTotal, iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - iElementParseState->readPosition = iLexer->readPosition; - }//end if(isTrueEndScript == NW_TRUE) - else - { - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - } - } //if(!NW_HTMLP_Lexer_AtEnd(iLexer) ) - - break; - default: - break; - }//end swicth() - }//end if(iSPLElemHandling->splHandle == NW_TRUE) - - return KBrsrSuccess; -} - -/* -assumes read position is at "<" -on return: *pMatch == NW_TRUE if consumed a well-formed DOCTYPE -if *pMatch == NW_FALSE then read position is unchanged -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeDoctype(NW_Bool* pMatch) - { - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_HTMLP_Lexer_Position_t position; - NW_HTMLP_Interval_t doctypeInterval; - - /* If element is ill-formed: - 1. save location before opening markup - 2. if processing reaches end of doc before ending element, - then reset to starting markup and return with *pMatch == NW_FALSE */ - - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - NW_HTMLP_Interval_Start(&doctypeInterval, iLexer); - - e = NW_HTMLP_IfExistsConsumeKeywordCase(&interval, - NW_HTMLP_String_DoctypeStartLength, - NW_HTMLP_String_DoctypeStart, - NW_FALSE, - pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - NW_HTMLP_Interval_Stop(&doctypeInterval, iLexer); - e = NW_HTMLP_FinishDoctype(pMatch, &doctypeInterval); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_FALSE) { - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - return KBrsrSuccess; - } - - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_SPL_Elem_Before_HTML_tag(NW_HTMLP_Lexer_t* pL, const NW_HTMLP_Interval_t* pI_content, - NW_Bool* onlySplChar) -{ - NW_Uint32 length; - NW_Uint32 byteLength; - NW_Uint8* pContent; - TBrowserStatusCode s; - NW_Uint32 i =0; - - *onlySplChar = NW_FALSE; - - if (!NW_HTMLP_Interval_IsWellFormed(pI_content)) - { - return KBrsrFailure; - } - - length = pI_content->stop - pI_content->start; - byteLength = length; - - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pI_content->start, - &byteLength, - &pContent); - if (BRSR_STAT_IS_FAILURE(s)) - { - return s; - } - - if (byteLength != length) - { - return KBrsrFailure; - } - - for(i=0; i < byteLength; i++) - { - - if(pContent[i] <= 0x20) - { - continue; - } - else - { - break; - } - }//end for(..) - - if(i == byteLength ) - { - *onlySplChar = NW_TRUE; - } - - return KBrsrSuccess; - -}//end CHtmlpParser::NW_HTMLP_SPL_Elem_Before_HTML_tag - - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ConsumeContent(NW_Bool* pMatch) - { - TBrowserStatusCode e; - NW_HTMLP_Interval_t interval; - NW_Bool match, matchspace, hasTable, hasTr, hasTd, hasPre, hasCaption, - allSpaces; // if the comment only contains white spaces - NW_Int32 i; - - *pMatch = NW_FALSE; - - hasTable = hasTr = hasTd = hasPre = hasCaption = NW_FALSE; - allSpaces = NW_TRUE; - - if (NW_HTMLP_Lexer_AtEnd(iLexer)) - return KBrsrSuccess; - /* if just after element start then skip one line break if found */ - if (iElementParseState->readPosition == iLexer->readPosition) { - /* skip over one instance of line break: 0xd, 0xa, or 0xd+0xa */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, 0xd, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) { - return KBrsrSuccess; - } - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, 0xa, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) { - return KBrsrSuccess; - } - /* Did we advance over anything? */ - if (iElementParseState->readPosition != iLexer->readPosition) { - /* check at new beginning for possible start of markup */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - return KBrsrSuccess; - } - } - } - - for (i = 0; iIsHtml && (i <= iElementParseState->openElementStackPointer); i++) - { - switch ((iElementParseState->pOpenElementStack)[i]) - { - case HTMLP_HTML_TAG_INDEX_TABLE: - hasTable = NW_TRUE; - hasTr = hasTd = NW_FALSE; - break; - case HTMLP_HTML_TAG_INDEX_TR: - hasTr = NW_TRUE; - hasTd = NW_FALSE; - break; - case HTMLP_HTML_TAG_INDEX_TD: - case HTMLP_HTML_TAG_INDEX_TH: - hasTd = NW_TRUE; - break; - case HTMLP_HTML_TAG_INDEX_PRE: - hasPre = NW_TRUE; - break; - case HTMLP_HTML_TAG_INDEX_CAPTION: - hasCaption = NW_TRUE; - break; - - } - } - - NW_HTMLP_Interval_Start(&interval, iLexer); - do - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - match = NW_FALSE; - if (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - // temporary hack for "my yahoo" page containing 0 byte in text - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, 0x0, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match) - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - return KBrsrSuccess; - } - /* look for start of markup */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (!match) - { - e = NW_HTMLP_Lexer_IsSpace(iLexer, &matchspace); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (!matchspace) - allSpaces = NW_FALSE; - } - - } - if (NW_HTMLP_Lexer_AtEnd(iLexer) || (match == NW_TRUE)) { - NW_HTMLP_Interval_Stop(&interval, iLexer); - *pMatch = NW_TRUE; - /* set the mark (iLastInvlid) in the output so that the start of the invalid dom can be recorded - for input buffer, we remember this text (iLastTextBuf) so it can be inserted at - begining of the next segment */ - if (NW_HTMLP_Lexer_AtEnd(iLexer) && !iDocComplete) - { - iLastTextBegin = interval.start; - if (iLastScriptStart == -1) - setValidMarks(); - } - else - { - if (hasTable && !hasCaption && (hasPre || !allSpaces)) - { - if ((!hasTr) && (iCBs->startTagCB)) - { - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TR].tag[0], - &((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TR].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if ((!hasTd) && (iCBs->startTagCB)) - { - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TD].tag[0], - &((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TD].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - /* content callback */ - if (iCBs->contentCB != NULL && (iLastTextBegin == -1)) - { - /*Handle special case for any content before tag. This causes - *the false page switch so be careful. - */ - if( (firstSegment == NW_TRUE) && (htmlTagFound == NW_FALSE) ) - { - NW_Bool onlySplChar; - e = NW_HTMLP_SPL_Elem_Before_HTML_tag(iLexer, &interval,&onlySplChar); - if( (e == KBrsrSuccess) && (onlySplChar == NW_TRUE) ) - { - return KBrsrSuccess; - } - } - e = (*(iCBs->contentCB))(iLexer, &interval, iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } /*end if (iCBs->contentCB != NULL && (iLastTextBegin == -1))*/ - } - - break; - } - } while (!NW_HTMLP_Lexer_AtEnd(iLexer)); - - if (hasTable && !hasCaption && (hasPre || !allSpaces)) - { - if ((!hasTd) && (iCBs->endTagCB)) - { - e = (*(iCBs->endTagCB))((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TD].tag[0], &((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TD].tag[1]), NW_FALSE, /* not empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if ((!hasTr) && (iCBs->endTagCB)) - { - e = (*(iCBs->endTagCB))((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TR].tag[0], &((iLexer->pElementDictionary)[HTMLP_HTML_TAG_INDEX_TR].tag[1]), NW_FALSE, /* not empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - - return KBrsrSuccess; -} - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_CheckTagEndOrSpace (NW_Bool* aMatch) - { - TBrowserStatusCode e; - - e = NW_HTMLP_Lexer_IsSpace(iLexer, aMatch); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (*aMatch) - { - return e; - } - - e = NW_HTMLP_Lexer_AsciiStringCompare (iLexer, - NW_HTMLP_String_MiniEndLength, - NW_HTMLP_String_MiniEnd, - aMatch); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (*aMatch) - { - return e; - } - - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', aMatch); - return e; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_CheckTagEnd (NW_Bool* aMatch) - { - TBrowserStatusCode e; - - e = NW_HTMLP_Lexer_AsciiStringCompare (iLexer, - NW_HTMLP_String_MiniEndLength, - NW_HTMLP_String_MiniEnd, - aMatch); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (*aMatch) - { - return e; - } - - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', aMatch); - return e; - } - - /* - on entry: assumes lexer position is just after '=' - on return: If consumed a value, then *pMatch == NW_TRUE and - .........: lexer read position is just after last value - .........: related char: if quotes are used then it - .........: is the character just after the closing quote. - .........: If no value is consumed then *pMatch == NW_FALSE - .........: and lexer read position is unchanged. - .........: In either case return value is KBrsrSuccess. - .........: When *pMatch == NW_TRUE then the interval bounds the - .........: value and does not include enclosing quote chars, if used. - .........: NOTE: Interval may be zero length if value is the empty - .........: string or value is missing. To differentiate the two the - .........: out param *pMissingValue, if true indicates a missing value. - .........: *pMissingValue is only valid if *pMatch == NW_TRUE. - eof handling: If encounters EOF while attempting operation, then returns - ............: *pMatch == NW_FALSE if value is not well-formed with lexer read - ............: position unchanged, or *pMatch == NW_TRUE if value is well-formed - ............: with lexer read position at EOF. - ............: In either case, return value is KBrsrSuccess. - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE, - ...............: *pMissingValue and lexer read position is unspecified -*/ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_AttributeValueConsume(NW_Bool* pMissingValue, - NW_HTMLP_Interval_t* pI, - NW_Bool* pMatch,NW_Bool splAttrFound) - { - /* - If no quotes are used around the value, then value is delimited by - whitespace (not including CR/LF) or on encountering either "/>" or '>'. - This differs from the HTML 4.01 specification which states: - - "The attribute value may only contain letters (a-z and A-Z), - digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), - underscores (ASCII decimal 95), and colons (ASCII decimal 58)." - - However, most browsers follow a looser syntax such as the one implemented - here. To see this, try browsing this weird doc: - the link - - Otherwise, the value may be any quoted string not containing the - quotation mark used as a delimiter for that string. - */ - - NW_HTMLP_Lexer_Position_t position; - TBrowserStatusCode e; - NW_Bool match; - NW_Bool skippingSpace; - // added for bug DCAN-5Q9PK8 - // quotedValue is True in the case: attrName='attrVal' - // quotedValue is False in the case: attrName=attr'xxx'Val - NW_Bool quotedValue = NW_FALSE; - // used only after a Quote is find - NW_HTMLP_Lexer_Position_t spaceBfEqualQuo; - // set to TRUE only when NW_HTMLP_Lexer_GetPosition(iLexer, &spaceBfEqualQuo) is called - NW_Bool spaceBfEqualQuoSet = NW_FALSE; - // match for double quote - NW_Bool matchD; - // match for single quote - NW_Bool matchS; - // quote could be double " or single ' - NW_Uint8 quote = 0; - // set to NW_TRUE when value consumed - NW_Bool valConsumed = NW_FALSE; - - *pMatch = NW_FALSE; - *pMissingValue = NW_TRUE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - - /* optional whitespace */ - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - NW_HTMLP_Interval_Start(pI, iLexer); - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - /* optional CRs or LFs */ - e = NW_HTMLP_SkipCRLF(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* end with match if see '>' */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - NW_HTMLP_Interval_Stop(pI, iLexer); - *pMatch = NW_TRUE; - break; - } - /* end with match if see "/>" */ - if(splAttrFound != NW_TRUE) - { - e = NW_HTMLP_Lexer_AsciiStringCompare(iLexer, NW_HTMLP_String_MiniEndLength, - NW_HTMLP_String_MiniEnd, - &match); - } - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - NW_HTMLP_Interval_Stop(pI, iLexer); - *pMatch = NW_TRUE; - break; - } - /* end with match if see whitespace */ - e = NW_HTMLP_Lexer_IsSpace(iLexer, &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - NW_HTMLP_Interval_Stop(pI, iLexer); - *pMatch = NW_TRUE; - break; - } - matchD = NW_FALSE; - matchS = NW_FALSE; - // check for string beginning with double quote '\"' - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '\"', &matchD); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - // check for string beginning with single quote '\'' - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '\'', &matchS); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (matchD) - { - match = NW_TRUE; - quote = '\"'; - } - else if (matchS) - { - match = NW_TRUE; - quote = '\''; - } - if (match) - { - *pMissingValue = NW_FALSE; - if (iLexer->readPosition == pI->start) - { - quotedValue = NW_TRUE; - } - e= NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - // skip leading white space in quoted attribute value - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - NW_HTMLP_Interval_Start(pI, iLexer); - // begin with zero length interval - NW_HTMLP_Interval_Stop(pI, iLexer); - skippingSpace = NW_FALSE; - do - { - /* optional CRs or LFs */ - e = NW_HTMLP_SkipCRLF(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) - { - // not well-formed at EOF - return KBrsrSuccess; - } - if (!skippingSpace) - { - NW_HTMLP_Interval_Stop(pI, iLexer); - } - e = NW_HTMLP_Lexer_IsSpace(iLexer, &skippingSpace); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - ////////////////////////////////////////////////////////////////////////////////// - // update spaceBfEqualQuo once new space is found - if (skippingSpace) - { - NW_HTMLP_Lexer_GetPosition(iLexer, &spaceBfEqualQuo); - spaceBfEqualQuoSet = NW_TRUE; - } - ////////////////////////////////////////////////////////////////////////////////// - // for the case Renew driver's license - // quote is part of real content - // stop parsing value if seeing > or /> - // however, this is checked only when it's unquoted value - // in the case , which is quoted value - // NW_HTMLP_CheckTagEnd shouldn't be called - if (!quotedValue) - { - e = NW_HTMLP_CheckTagEnd (&match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match) - { - // value consumed - valConsumed = NW_TRUE; - break; - } - } - ////////////////////////////////////////////////////////////////////////////////// - // special handling the case: name1="val1 name2="val2" - // if seeing =", we can assume that the ending quote for the value is missing - if (matchD) - { - e = NW_HTMLP_Lexer_AsciiStringCompare (iLexer, - NW_HTMLP_String_EqualQuoteLength, - NW_HTMLP_String_EqualDblQuote, - &match); - } - else if (matchS) - { - e = NW_HTMLP_Lexer_AsciiStringCompare (iLexer, - NW_HTMLP_String_EqualQuoteLength, - NW_HTMLP_String_EqualSngQuote, - &match); - } - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match) - { - if (spaceBfEqualQuoSet) - { - // set the lexer to the position of the right most space before =" - NW_HTMLP_Lexer_SetPosition (iLexer, &spaceBfEqualQuo); - } - else - { - ////////////////////////////////////////////////////////////////////////////////// - // special handling the case: b - // if seeing =' and spaceBfEqualQuo is not set, - // we can assume that consumption of value is over - // important to advance two steps so iLexer will point to '>' - e = NW_HTMLP_Lexer_Advance(iLexer); - NW_HTMLP_Interval_Stop(pI, iLexer); - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - // value consumed - valConsumed = NW_TRUE; - break; - } - ////////////////////////////////////////////////////////////////////////////////// - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, quote, &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match) // to handle the attrbite="value"" case - { - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, quote, &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match) - { - e = NW_HTMLP_Lexer_Advance(iLexer); - } - valConsumed = NW_TRUE; - } - ////////////////////////////////////////////////////////////////////////////////// - } while (!valConsumed); - - *pMatch = NW_TRUE; - // two cases would break out the above do-while loop: either quotedValue is true or false - // true quotedValue means value consumed finished, we should break the outter loop as well - // speical case: where iLexer is pointing to s after ' - // this is true quotedValue, we consume value right after driver as IE does so - // ignore the part of: s license' - if (quotedValue) - { - break; - } - - ////////////////////////////////////////////////////////////////////////////////// - // false quotedValue needs more check before deciding breaking the outter loop or not - // case: - // continue to parse the attribute value if check fails - e = NW_HTMLP_CheckTagEndOrSpace (&match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match) - { - break; - } - else - { - // avoid calling NW_HTMLP_Lexer_Advance below, since we have called it - continue; - } - ////////////////////////////////////////////////////////////////////////////////// - } // end of match==NW_TRUE of either ' or " - - /* advance in unquoted value */ - *pMissingValue = NW_FALSE; - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } /* end of loop */ - /* catch EOF for values without quotes */ - if (NW_HTMLP_Lexer_AtEnd(iLexer)) { - *pMatch = NW_TRUE; - NW_HTMLP_Interval_Stop(pI, iLexer); - } - return KBrsrSuccess; -} - -/* -on entry: Function parses the name and comapre for "href" tag. If found then -........: *splAttrFound=TRUE otherwise false. -on return: void - - */ - - void CHtmlpParser::NW_HTMLP_SPL_Elem_Handle_Attr(NW_HTMLP_Interval_t* pI_name, - NW_Bool* splAttrFound) - { - NW_Uint32 length; - NW_Uint32 nameLength; - NW_Uint8* pName; - NW_Ucs2 c_ucs2; - NW_Uint32 i; - NW_Int32 bytesRead; - TBrowserStatusCode s; - static const NW_Ucs2 hrefStr[] = {'h','r','e','f','\0'}; - - *splAttrFound = NW_FALSE; - - if (!NW_HTMLP_Interval_IsWellFormed(pI_name)) { - return; - } - - /* var name setup */ - - length = NW_HTMLP_Interval_ByteCount(pI_name); - nameLength = length; /* byte count */ - s = NW_HTMLP_Lexer_DataAddressFromBuffer(iLexer, pI_name->start, - &nameLength, &pName); - if (BRSR_STAT_IS_FAILURE(s)) { - return; - } - if (nameLength != length) { - return; - } - - nameLength = NW_HTMLP_Interval_CharCount(pI_name); /* char count */ - - /* force attribute name to lower case for A-Z only, - this alters the doc in-place */ - - /* FUTURE: unfortunately, there is no writeChar to go with the readChar - so the work around until there is better encoding support is to only - work with ASCII, 8859-1, UTF-8 and UCS-2. In these encodings we can - handle writing because only UCS-2 uses two bytes for an ASCII char. */ - NW_ASSERT((iLexer->encoding == HTTP_us_ascii) - || (iLexer->encoding == HTTP_iso_8859_1) - || (iLexer->encoding == HTTP_utf_8) - || (iLexer->encoding == HTTP_iso_10646_ucs_2)); - if (!((iLexer->encoding == HTTP_us_ascii) - || (iLexer->encoding == HTTP_iso_8859_1) - || (iLexer->encoding == HTTP_utf_8) - || (iLexer->encoding == HTTP_iso_10646_ucs_2))) { - return; - } - for (i = 0; i < length;) { - bytesRead = NW_String_readChar(&(pName[i]), &c_ucs2, iLexer->encoding); - if (bytesRead == -1) { - return; - } - /* force doc ascii uppercase to lowercase */ - if ((c_ucs2 >= (NW_Ucs2)'A') && (c_ucs2 <= (NW_Ucs2)'Z')) { - c_ucs2 += 0x20; /* offset in ascii from upper to lower */ - } - if (iLexer->encoding == HTTP_iso_10646_ucs_2) { - NW_ASSERT(bytesRead == 2); - /* accomodate either endianness */ - if (pName[i] == 0) { - pName[i+1] = (NW_Uint8)c_ucs2; - } else { - pName[i] = (NW_Uint8)c_ucs2; - } - } else { - NW_ASSERT(bytesRead == 1); - NW_ASSERT((iLexer->encoding == HTTP_us_ascii) - || (iLexer->encoding == HTTP_iso_8859_1) - || (iLexer->encoding == HTTP_utf_8)); - pName[i] = (NW_Uint8)c_ucs2; - } - i += bytesRead; - }//end for(..) - - if (NW_Byte_Strnicmp((const NW_Byte*)pName, (const NW_Byte*)hrefStr, NW_Str_Strlen(hrefStr)*sizeof(NW_Ucs2)) == 0) - { - *splAttrFound = NW_TRUE; - } - - return; - }//end NW_HTMLP_SPL_Elem_Handle_Attr(..) - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_SPL_Elem_Handle_Meta(NW_HTMLP_Interval_t* pI_name, - NW_HTMLP_Interval_t* pI_attvalue, - NW_HTMLP_SPL_Elem_Handling_t* splElem) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Int32 numUnconvertible, indexFirstUnconvertible; - NW_Buffer_t* outBuf; - NW_Bool charsetSpecified = NW_FALSE; - - NW_ASSERT(iLexer != NULL); - NW_ASSERT(pI_name != NULL); - NW_ASSERT(pI_attvalue != NULL); - NW_ASSERT(splElem != NULL); - - NW_Uint32 i = pI_attvalue->start; - if (iCBs == NULL) - return status; - switch (splElem->type) { - case NW_HTMLP_SPL_META: - { - /* After detecting meta, try to detect content=... */ - static const NW_Ucs2 attrNameStr[] = {'c','o','n','t','e','n','t','\0'}; - static const NW_Ucs2 attrValStr[] = {'c','h','a','r','s','e','t','=','\0'}; - - /* Assuming latin-1 charset. If it was not latin-1, no need to look for meta charset */ - if (pI_name->charStop - pI_name->charStart == NW_Str_Strlen(attrNameStr) && /* check that the attribute name is content */ - NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + pI_name->start), (const NW_Byte*)attrNameStr, NW_Str_Strlen(attrNameStr)*sizeof(NW_Ucs2)) == 0) - { - while (i <= pI_attvalue->stop - NW_Str_Strlen(attrValStr)*sizeof(NW_Ucs2)) /* Find charset in the attribute value */ - { - if (NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + i), (const NW_Byte*)attrValStr, NW_Str_Strlen(attrValStr)*sizeof(NW_Ucs2)) == 0) - { - i += NW_Str_Strlen(attrValStr)*sizeof(NW_Ucs2); // Move after charset= - charsetSpecified = NW_TRUE; - break; - } - i += sizeof(NW_Ucs2); - } - } - // street html support: - // handle case - // in this case, attrName = charset and attrVal = xxxx - else if (pI_name->charStop - pI_name->charStart == NW_Str_Strlen(attrValStr) - 1 && /* check that the attribute name is charset */ - NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + pI_name->start), (const NW_Byte*)attrValStr, (NW_Str_Strlen(attrValStr) -1)*sizeof(NW_Ucs2)) == 0) - { - charsetSpecified = NW_TRUE; - } - - // if we found the structure in meta that indicate charset specification, - // call charsetConvertCallback to perform the charset lookup. - if (charsetSpecified) - { - NW_Buffer_t body; - NW_Uint32 selectedCharset; - NW_ASSERT(iCBs->charsetConvertCallback != NULL); - NW_ASSERT(iCBs->charsetContext != NULL); - - /* Set the buffer that needs to be converted */ - body.data = iLexer->pBuf; - body.allocatedLength = iLexer->byteCount; - body.length = iLexer->byteCount; - - /* In case of empty charset declaration */ - if ( pI_attvalue->stop - i == 0) - { - status = KBrsrSuccess; - goto finish_handleMeta; - } - status = iCBs->charsetConvertCallback(iCBs->charsetContext, pI_attvalue->stop - i, i, &body, - &numUnconvertible, &indexFirstUnconvertible, &outBuf, - &selectedCharset); - - if (status != KBrsrSuccess) - { - goto finish_handleMeta; - } - /* Was the buffer converted? */ - NW_HTMLP_Lexer_SetEncoding(iLexer, selectedCharset); - iOrigEncoding = selectedCharset; - status = KBrsrRestartParsing; - goto finish_handleMeta; - } // if (charsetSpecified) - break; - } // case NW_HTMLP_SPL_META - default: - break; - } //switch (splElem->type) -finish_handleMeta: - return status; - } - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_SPL_Elem_Handle_xml_charset() - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Int32 numUnconvertible, indexFirstUnconvertible; - NW_Buffer_t* outBuf = NULL; - NW_Uint32 i; - static const NW_Ucs2 encodingStr[] = {'e','n','c','o','d','i','n','g','=','\0'}; - NW_Uint32 encodingLen = NW_Str_Strlen(encodingStr)*sizeof(NW_Ucs2); - - if (NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + iLexer->readPosition), (const NW_Byte*)encodingStr, encodingLen) == 0 && - (iLexer->pBuf[iLexer->readPosition + encodingLen] == '"' || - iLexer->pBuf[iLexer->readPosition + encodingLen] == '\'')) - { - NW_Buffer_t body; - NW_Uint32 selectedCharset; - NW_ASSERT(iCBs->charsetConvertCallback != NULL); - NW_ASSERT(iCBs->charsetContext != NULL); - for (i = iLexer->readPosition + encodingLen + sizeof(NW_Ucs2); - i < iLexer->byteCount && iLexer->pBuf[i] != '"' && iLexer->byteCount && iLexer->pBuf[i] != '\'' && iLexer->pBuf[i] != '?'; - i += sizeof(NW_Ucs2)) - ; - if (((iLexer->pBuf[i] == '"') || (iLexer->pBuf[i] == '\'')) && i > iLexer->readPosition + encodingLen) - { - encodingLen += sizeof(NW_Ucs2); //Skip the quotes - /* Set the buffer that needs to be converted */ - body.data = iLexer->pBuf; - body.allocatedLength = iLexer->byteCount; - body.length = iLexer->byteCount; - - /* In case of empty XML declaration, ignore it */ - if (i - iLexer->readPosition - encodingLen ==0) - { - status = KBrsrSuccess; - goto finish_xml_charset; - } - status = iCBs->charsetConvertCallback(iCBs->charsetContext, i - iLexer->readPosition - encodingLen, iLexer->readPosition + encodingLen, &body, - &numUnconvertible, &indexFirstUnconvertible, &outBuf, &selectedCharset); - if (status != KBrsrSuccess) - { - goto finish_xml_charset; - } - - NW_HTMLP_Lexer_SetEncoding(iLexer, selectedCharset); - iOrigEncoding = selectedCharset; - status = KBrsrRestartParsing; - goto finish_xml_charset; - } - } -finish_xml_charset: - return status; - } - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_SPL_Elem_Handle_BodyStart(NW_HTMLP_ElementDescriptionConst_t* pElement) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Int32 numUnconvertible, indexFirstUnconvertible; - NW_Buffer_t * outBuf = NULL; - - NW_REQUIRED_PARAM( pElement ); - - NW_ASSERT(iLexer != NULL); - NW_ASSERT(pElement != NULL); - - - NW_Buffer_t body; - NW_Uint32 selectedCharset = 0; - NW_ASSERT(iCBs->charsetConvertCallback != NULL); - NW_ASSERT(iCBs->charsetContext != NULL); - - /* Set the buffer that needs to be converted */ - body.data = iLexer->pBuf; - body.allocatedLength = iLexer->byteCount; - body.length = iLexer->byteCount; - status = iCBs->charsetConvertCallback(iCBs->charsetContext, 0, 0, &body, - &numUnconvertible, &indexFirstUnconvertible, &outBuf, &selectedCharset); - - if (status != KBrsrSuccess) - { - return status; - } - /* Was the buffer converted? */ - NW_HTMLP_Lexer_SetEncoding(iLexer, selectedCharset); - iOrigEncoding = selectedCharset; - return KBrsrRestartParsing; - - } - - /* - on entry: assumes lexer read position is in whitespace or at first character - ........: of an attribute name - on return: If consumes an attribute with (optional) value, then *pMatch == NW_TRUE - .........: and lexer read position is just after the attribute value pair - .........: which could be whitespace, a '>', or EOF. - .........: If no attribute with (optional) value consumed, then - .........: *pMatch == NW_FALSE and lexer read position unchanged. - .........: In either case return value is KBrsrSuccess. - .........: When *pMatch == NW_TRUE then the *pI_name bounds the attribute name - .........: and pI_value bounds the value which does not include enclosing quote - .........: chars, if used. - .........: NOTE: *pI_value may be zero length if value is the empty - .........: string or value is missing. To differentiate the two the - .........: out param *pMissingValue, if true indicates a missing value. - .........: *pMissingValue is only valid if *pMatch == NW_TRUE. - eof handling: If encounters EOF while attempting operation, then returns - ............: *pMatch == NW_FALSE only if result up to EOF could not form either - ............: a name without a value or a value that is not well-formed. - ............: If *pMatch == NW_FALSE on EOF then lexer read position is unchanged, - ............: If *pMatch == NW_TRUE on EOF then with lexer read position at EOF. - ............: In either case, return value is KBrsrSuccess. - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE, - ...............: *pMissingValue and lexer read position is unspecified - */ - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_AttributeNameAndValueConsume( - NW_HTMLP_Interval_t* pI_name, - NW_Bool* pMissingValue, - NW_HTMLP_Interval_t* pI_attvalue, - NW_Bool* pMatch, - NW_HTMLP_SPL_Elem_Handling_t* splElem) - { - /* - Looks for the following patterns: - 1. name (form with no value) - 2. name= (form with missing value, degenerate but accepted) - 3. name=value (unquoted value) - 4. name='value' (single quoted value) - 5. name="value" (double quoted value) - - The forms are terminated by: matching quotes, whitespace, "/>", '>' or EOF. - */ - NW_HTMLP_Lexer_Position_t position; - TBrowserStatusCode e; - NW_Bool match; - NW_Bool splAttrFound = NW_FALSE; - - *pMatch = NW_FALSE; - *pMissingValue = NW_TRUE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - - NW_HTMLP_Interval_Init(pI_name); - NW_HTMLP_Interval_Init(pI_attvalue); - - /* optional whitespace */ - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - /* Name */ - e = NW_HTMLP_ParseName(&match, pI_name); - if (BRSR_STAT_IS_FAILURE(e)) { - return KBrsrFailure; - } - if (match == NW_FALSE) { - // added check for quote if attr name is not present, if - // quote is next, skip to after next quote - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '\"', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - // skip to next quote - if (match== NW_TRUE) - { - match = NW_FALSE; - do { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) { - return KBrsrSuccess; - } - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '\"', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } while (match == NW_FALSE); - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - *pMatch = NW_TRUE; - return KBrsrSuccess; - } - else - { - return KBrsrSuccess; - } - } - - if(splElem && (splElem->splHandle == NW_TRUE)) - { - if( (splElem->type == NW_HTMLP_SPL_ANCHOR_ATTR ) || - (splElem->type == NW_HTMLP_SPL_BASE_ATTR) ) - { - NW_HTMLP_SPL_Elem_Handle_Attr(pI_name,&splAttrFound); - } - }//endif if(splElem && (splElem->splHandle == NW_TRUE)) - - - /* optional whitespace */ - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* '=' */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '=', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - e = NW_HTMLP_AttributeValueConsume(pMissingValue, pI_attvalue, &match,splAttrFound); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if(splElem && (splElem->splHandle == NW_TRUE)) - { - if( splElem->type == NW_HTMLP_SPL_META ) - { - e = NW_HTMLP_SPL_Elem_Handle_Meta(pI_name,pI_attvalue, splElem); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - }//endif if(splElem && (splElem->splHandle == NW_TRUE)) - - if (match == NW_FALSE) { - return KBrsrSuccess; - } - } - *pMatch = NW_TRUE; - return KBrsrSuccess; -} - -/* -on entry: no assumptions about lexer read position -on return: If finds a match for regular expression "/\s*>", -.........: then *pMatch == NW_TRUE and the lexer read position -.........: is just after the '>' and return value is KBrsrSuccess. -eof handling: If encounters EOF while attempting operation, then -............: *pMatch == NW_FALSE and return value is KBrsrSuccess. -on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE -...............: and lexer read position is unspecified -*/ -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfExistsConsumeMinEmptyElementSyntax(NW_Bool* pMatch) - { - NW_HTMLP_Lexer_Position_t position; - NW_Bool match; - TBrowserStatusCode e; - - *pMatch = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '/', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', pMatch); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (*pMatch == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - } else { - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - } - } - return e; - } - - /* - on entry: assumes lexer read position is in whitespace or at first character - ........: of an attribute name - ........: This function special cases the callback pointer. It *iCBs == NULL, - ........: then no callbacks are done. This is so that attribute lists on - ........: unknown tags and on end tags can be consumed but ignored. - on return: If either the attribute list is well-formed, including an empty - .........: attribute list, then *pMatch == NW_TRUE and the lexer read position - .........: is just after the closing '>' or '/>' (for xhtml empty tag processing). - .........: If the end is '/>', then *pIsEmptyTagEnd == NW_TRUE. - .........: If no attribute list is consumed, due a malformed attribute - .........: name or value, then *pMatch == NW_FALSE, *pIsEmptyTagEnd == NW_FALSE - .........: and the lexer read position is unchanged. - .........: In either case return value is KBrsrSuccess. - eof handling: If encounters EOF while attempting operation, then - ............: *pMatch == NW_FALSE and return value is KBrsrSuccess. - on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE - ...............: and lexer read position is unspecified -*/ -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeAttributes( - NW_Bool* pMatch, - NW_Bool* pIsEmptyTagEnd, - const struct NW_HTMLP_EventCallbacks_s* pCBs, - NW_HTMLP_SPL_Elem_Handling_t* splElem) - { - NW_HTMLP_Interval_t I_attName; - NW_HTMLP_Interval_t I_attValue; - NW_HTMLP_Lexer_Position_t position; - NW_Uint32 attributeCount; - TBrowserStatusCode e; - NW_Bool missingValue; - NW_Bool match; - NW_Uint32 cp_cnt; - NW_Bool malformated = NW_FALSE; - - *pMatch = NW_FALSE; - *pIsEmptyTagEnd = NW_FALSE; - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - - for (attributeCount = 0;;) { - - /* optional space and junk. */ - e = NW_HTMLP_SkipJunk(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - /* try '>' end */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - *pMatch = NW_TRUE; - break; - } - else if (NW_HTMLP_Lexer_AtEnd(iLexer)) - { - return KBrsrSuccess; - } - /* try /\s*> end */ - e = NW_HTMLP_IfExistsConsumeMinEmptyElementSyntax(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_TRUE) { - *pMatch = NW_TRUE; - *pIsEmptyTagEnd = NW_TRUE; - break; - } - /* look for attributes */ - e = NW_HTMLP_AttributeNameAndValueConsume(&I_attName, &missingValue, - &I_attValue, &match, splElem); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - // street html support, if parsing attr nv pair fails and - // it's not end of buffer yet, that indicates that it's likely - // to be a mal-formated attr list. In this case, we want to - // advance to where the end tag is. - if (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - do { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) { - return KBrsrSuccess; - } - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '>', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } while (match == NW_FALSE); - if (match) - malformated = NW_TRUE; - } - else - return KBrsrSuccess; - } - // if I_AttName byte count is 0, that means we don't - // have attr name but an attr value within quote. - if (NW_HTMLP_Interval_ByteCount(&I_attName) !=0 && !malformated) - { - if (!iIsHtml && pCBs != NULL && (pCBs->attributeStartCB != NULL)) { // the content is WML - e = NW_HTMLP_ValidateWMLAttribute(iLexer, &I_attName, - pCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - continue; // attempt to get the NEXT attribute - } - } - attributeCount++; - /* note: attribute value may be zero length interval */ - if ((pCBs != NULL) && (pCBs->attributeStartCB != NULL)) { - e = (*(pCBs->attributeStartCB))(pCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (pCBs->attributeNameAndValueCB != NULL) { - e = (*(pCBs->attributeNameAndValueCB))(iLexer, &I_attName, - missingValue, &I_attValue, - pCBs->pClientPointer, &cp_cnt); - updateCurrentCP(cp_cnt); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - } - } /* end of loop */ - if ((attributeCount > 0) && (*pMatch == NW_TRUE)) { - if ((pCBs != NULL) && (pCBs->attributesEndCB != NULL)) { - e = (*(pCBs->attributesEndCB))(attributeCount, pCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - return KBrsrSuccess; -} - -NW_HTMLP_ElementDescriptionConst_t* CHtmlpParser::NW_HTMLP_ElementFindTagFromDoc( - NW_HTMLP_Interval_t* pI, - NW_HTMLP_ElementTableIndex_t* pIndex) - { - NW_Uint8* pTagInDoc; - NW_Uint32 byteCount; - NW_Uint32 charCount; - NW_Int32 bytesRead; - NW_Uint32 j; - NW_Int32 tagIndex; - NW_Ucs2 c_ucs2; - NW_HTMLP_ElementTableIndex_t i; - TBrowserStatusCode e; - NW_Bool match = NW_FALSE; - - byteCount = NW_HTMLP_Interval_ByteCount(pI); - e = NW_HTMLP_Lexer_DataAddressFromBuffer(iLexer, pI->start, - &byteCount, - &pTagInDoc); - if (BRSR_STAT_IS_FAILURE(e)) { - return NULL; - } - NW_ASSERT(byteCount == NW_HTMLP_Interval_ByteCount(pI)); - if (byteCount != NW_HTMLP_Interval_ByteCount(pI)) { - return NULL; - } - charCount = NW_HTMLP_Interval_CharCount(pI); - for (i = 0; i < iLexer->elementCount; i++) { - match = NW_FALSE; - if (charCount == (iLexer->pElementDictionary)[i].tag[0]) { - match = NW_TRUE; - tagIndex = 0; - for (j = 0; j < charCount; j++) { - bytesRead = NW_String_readChar(&(pTagInDoc[tagIndex]), - &c_ucs2, iLexer->encoding); - if (bytesRead == -1) { - return NULL; - } - tagIndex += bytesRead; - /* force doc ascii uppercase to lowercase */ - if ((c_ucs2 >= (NW_Ucs2)'A') && (c_ucs2 <= (NW_Ucs2)'Z')) { - c_ucs2 += 0x20; /* offset in ascii from upper to lower */ - } - if (c_ucs2 != (NW_Ucs2)((iLexer->pElementDictionary)[i].tag[j+1])) { - match = NW_FALSE; - break; - } - } - } - if (match == NW_TRUE) { - break; - } - } - *pIndex = i; - if (match == NW_TRUE) { - return &((iLexer->pElementDictionary)[i]); - } else { - return NULL; - } - } - - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_New() - { - iElementParseState = ((NW_HTMLP_ElementParseState_t*) - NW_Mem_Malloc(sizeof(NW_HTMLP_ElementParseState_t))); - if (iElementParseState == NULL) { - return KBrsrOutOfMemory; - } - iElementParseState->openElementStackPointer = -1; - iElementParseState->openElementStackCapacity = NW_HTMLP_OPEN_ELEMENT_INITIAL_STACK_CAPACITY; - iElementParseState->pOpenElementStack = ((NW_HTMLP_ElementTableIndex_t*) - NW_Mem_Malloc(sizeof(NW_HTMLP_ElementTableIndex_t) - * iElementParseState->openElementStackCapacity)); - if (iElementParseState->pOpenElementStack == NULL) { - NW_Mem_Free(iElementParseState); - iElementParseState = NULL; - return KBrsrOutOfMemory; - } - iElementParseState->inPCDATA = NW_FALSE; - iElementParseState->readPosition = 0; - return KBrsrSuccess; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_Clone(NW_HTMLP_ElementParseState_t** ppS) - { - NW_Int32 sp; - NW_HTMLP_ElementParseState_Delete(ppS); - *ppS = ((NW_HTMLP_ElementParseState_t*) - NW_Mem_Malloc(sizeof(NW_HTMLP_ElementParseState_t))); - if (*ppS == NULL) { - return KBrsrOutOfMemory; - } - **ppS = *iElementParseState; - (*ppS)->pOpenElementStack = ((NW_HTMLP_ElementTableIndex_t*) - NW_Mem_Malloc(sizeof(NW_HTMLP_ElementTableIndex_t) - * (*ppS)->openElementStackCapacity)); - - if ((*ppS)->pOpenElementStack == NULL) { - NW_Mem_Free(*ppS); - *ppS = NULL; - return KBrsrOutOfMemory; - } - - for (sp = 0; sp <= iElementParseState->openElementStackPointer; sp++) { - (*ppS)->pOpenElementStack[sp] = iElementParseState->pOpenElementStack[sp]; - } - return KBrsrSuccess; - } - -void CHtmlpParser::NW_HTMLP_ElementParseState_Delete(NW_HTMLP_ElementParseState_t** ppS) - { - if (*ppS) - NW_Mem_Free((*ppS)->pOpenElementStack); - NW_Mem_Free(*ppS); - *ppS = NULL; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_Push(NW_HTMLP_ElementTableIndex_t index) - { - NW_ASSERT(iElementParseState->openElementStackPointer >= -1); - NW_ASSERT(iElementParseState->openElementStackPointer < iElementParseState->openElementStackCapacity); - - iElementParseState->openElementStackPointer += 1; - - if (iElementParseState->openElementStackPointer == iElementParseState->openElementStackCapacity) { - /* realloc stack */ - NW_Int32 newStackCapacity = (iElementParseState->openElementStackCapacity - + NW_HTMLP_OPEN_ELEMENT_STACK_GROW_BY); - NW_HTMLP_ElementTableIndex_t* pNewStack - = ((NW_HTMLP_ElementTableIndex_t*) - NW_Mem_Malloc(sizeof(NW_HTMLP_ElementTableIndex_t) * newStackCapacity)); - if (pNewStack == NULL) { - return KBrsrOutOfMemory; - } - NW_Mem_memcpy(pNewStack, iElementParseState->pOpenElementStack, (sizeof(NW_HTMLP_ElementTableIndex_t) - * iElementParseState->openElementStackCapacity)); - NW_Mem_Free(iElementParseState->pOpenElementStack); - iElementParseState->pOpenElementStack = pNewStack; - iElementParseState->openElementStackCapacity = newStackCapacity; - } - - (iElementParseState->pOpenElementStack)[iElementParseState->openElementStackPointer] = index; - - return KBrsrSuccess; - } - -NW_HTMLP_ElementTableIndex_t CHtmlpParser::NW_HTMLP_ElementParseState_Pop() - { - NW_ASSERT(iElementParseState->openElementStackPointer >= 0); - NW_ASSERT(iElementParseState->openElementStackPointer < iElementParseState->openElementStackCapacity); - - if (iElementParseState->openElementStackPointer >= 0) { - return (iElementParseState->pOpenElementStack)[iElementParseState->openElementStackPointer--]; - } - /* BUG: this is a bogus value but something needs to be returned */ - return 0; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_ImpliedClosings(NW_HTMLP_ElementDescriptionConst_t* pElement) - { - const NW_Uint8* pBuf; - NW_Int32 sp; - NW_Uint32 i; - NW_HTMLP_ElementTableIndex_t stackTopElement; - TBrowserStatusCode e; - NW_Uint8 l; - - if ((pElement == NULL) || (pElement->closes == NULL)) { - return KBrsrSuccess; - } - /* Logic here is that if the close list says close something on the open - element stack, no matter the position on the open element stack then close - all elements through the one matched on the open element stack. Repeat - until there is nothing on the open element stack that matches an item in - the closes list. However, abort if item on element stack is in blocks list. */ - for (sp = iElementParseState->openElementStackPointer; sp >= 0; sp--) { - /* check blocks, if any */ - if (pElement->blocks != NULL) { - for (i = 0; i < pElement->blocks[0]; i++) { - if (pElement->blocks[i+1] == iElementParseState->pOpenElementStack[sp]) { - return KBrsrSuccess; - } - } - } - /* check closes */ - for (i = 0; i < pElement->closes[0]; i++) { - if (pElement->closes[i+1] == iElementParseState->pOpenElementStack[sp]) { - while (sp <= iElementParseState->openElementStackPointer) { - stackTopElement = NW_HTMLP_ElementParseState_Pop(); - if(stackTopElement < NW_HTMLP_DTD_ElementTableMask) - { - /* end tag callback (close element) */ - l = (iLexer->pElementDictionary)[stackTopElement].tag[0]; - pBuf = &((iLexer->pElementDictionary)[stackTopElement].tag[1]); - if (iCBs->endTagCB != NULL) - { - e = (*(iCBs->endTagCB))(l, pBuf, NW_FALSE, /* not empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - }//end if(stackTopElement < NW_HTMLP_DTD_ElementTableMask) - }//end while(..) - }//end if(..) - }//end for(..) - } - return KBrsrSuccess; - } - -//In this function if(index >= NW_HTMLP_DTD_ElementTableMask) that implies that -//do closing of the Non DTD tag and use parameter "tagInterval" to find the -//name. So, parameter "index" is used to distinguish between the dictionary and -//non-dictionary elements. - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_ExplicitClosing( - NW_HTMLP_ElementTableIndex_t index, - NW_HTMLP_ElementDescriptionConst_t* pElement) - { - const NW_Uint8* pBuf; - NW_Int32 sp; - NW_HTMLP_ElementTableIndex_t stackTopElement; - TBrowserStatusCode e = KBrsrSuccess; - NW_Uint8 l; - - // pElement is NULL case of Non DTD Elements. - - if(index < NW_HTMLP_DTD_ElementTableMask) - { - if( pElement == NULL) - { - return KBrsrSuccess; - } - } - - /* ignore the html and body close tags since there may be more than one of them */ - if (iIsHtml && (index == HTMLP_HTML_TAG_INDEX_HTML || index == HTMLP_HTML_TAG_INDEX_BODY)) - return KBrsrSuccess; - - /* If matching oe on stack at any position, then close all open - through and including match. If no matching oe on stack then - ignore end tag. */ - for (sp = iElementParseState->openElementStackPointer; sp >= 0; sp--) { - if((iIsHtml && index == HTMLP_HTML_TAG_INDEX_TD) && - (iElementParseState->pOpenElementStack[sp] == HTMLP_HTML_TAG_INDEX_TR || - iElementParseState->pOpenElementStack[sp] == HTMLP_HTML_TAG_INDEX_TABLE)) - { - break; - } - if((iIsHtml && index == HTMLP_HTML_TAG_INDEX_TR) && - (iElementParseState->pOpenElementStack[sp] == HTMLP_HTML_TAG_INDEX_TD || - iElementParseState->pOpenElementStack[sp] == HTMLP_HTML_TAG_INDEX_TABLE)) - { - break; - } - if (index == iElementParseState->pOpenElementStack[sp]) { - while (sp <= iElementParseState->openElementStackPointer) - { - stackTopElement = NW_HTMLP_ElementParseState_Pop(); - - if(stackTopElement < NW_HTMLP_DTD_ElementTableMask) - { - /* end tag callback (close element) */ - l = (iLexer->pElementDictionary)[stackTopElement].tag[0]; - pBuf = &((iLexer->pElementDictionary)[stackTopElement].tag[1]); - if (iCBs->endTagCB != NULL) { - e = (*(iCBs->endTagCB))(l, pBuf, NW_FALSE, /* not empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - }//end if(stackTopElement < NW_HTMLP_DTD_ElementTableMask) - }//end while - /* stop when first match found */ - break; - } - } - return KBrsrSuccess; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ElementParseState_CloseAll() - { - NW_HTMLP_ElementTableIndex_t stackTopElement; - const NW_Uint8* pBuf; - NW_Int32 sp; - TBrowserStatusCode e; - NW_Uint8 l; - - for (sp = iElementParseState->openElementStackPointer; sp >= 0; sp--) - { - stackTopElement = NW_HTMLP_ElementParseState_Pop(); - - if(stackTopElement < NW_HTMLP_DTD_ElementTableMask) - { - - /* end tag callback (close element) */ - l = (iLexer->pElementDictionary)[stackTopElement].tag[0]; - pBuf = &((iLexer->pElementDictionary)[stackTopElement].tag[1]); - if (iCBs->endTagCB != NULL) { - e = (*(iCBs->endTagCB))(l, pBuf, NW_FALSE, /* not empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - }//end for - - return KBrsrSuccess; - } - - /* -reset all the special element handling */ -void CHtmlpParser::NW_HTMLP_SPL_Elem_Initialize() - { - NW_Mem_memset(iSPLElemHandling->tagName,0,128); - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - iSPLElemHandling->splHandle = NW_FALSE; - } - - /* - on entry: This function checks if any spcial handling is required for the - ........: the elements if so then set the flag for the this and copy the - ........: tag name for the latter use. - ........: - ........: - on return: void - -*/ -void CHtmlpParser::NW_HTMLP_SPL_Elem_Setup(NW_HTMLP_ElementTableIndex_t elementIndex, - NW_Bool findCharset) - { - NW_ASSERT(iSPLElemHandling->type == NW_HTMLP_SPL_NONE); - NW_ASSERT(iSPLElemHandling->splHandle == NW_FALSE); - - iSPLElemHandling->splHandle = NW_TRUE; - if (iIsHtml) - { - switch (elementIndex) - { - case HTMLP_HTML_TAG_INDEX_A: - iSPLElemHandling->type = NW_HTMLP_SPL_ANCHOR_ATTR; - break; - case HTMLP_HTML_TAG_INDEX_META: - if (findCharset) - iSPLElemHandling->type = NW_HTMLP_SPL_META; - break; - case HTMLP_HTML_TAG_INDEX_SCRIPT: - iSPLElemHandling->type = NW_HTMLP_SPL_SCRIPT; - break; - case HTMLP_HTML_TAG_INDEX_NOSCRIPT: - iSPLElemHandling->type = NW_HTMLP_SPL_NOSCRIPT; - break; - case HTMLP_HTML_TAG_INDEX_BODY: - iSPLElemHandling->type = NW_HTMLP_SPL_BODY; - break; - case HTMLP_HTML_TAG_INDEX_TITLE: - iSPLElemHandling->type = NW_HTMLP_SPL_TITLE; - break; - case HTMLP_HTML_TAG_INDEX_BASE: - iSPLElemHandling->type = NW_HTMLP_SPL_BASE_ATTR; - break; - default: - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - } - } - else - { - switch (elementIndex) - { - case HTMLP_WML_TAG_INDEX_A: - iSPLElemHandling->type = NW_HTMLP_SPL_ANCHOR_ATTR; - break; - case HTMLP_WML_TAG_INDEX_META: - if (findCharset) - iSPLElemHandling->type = NW_HTMLP_SPL_META; - break; - default: - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - } - } - }//end NW_HTMLP_SPL_Elem_Setup() - - -/* - * Function to handle the special case after
element. If the lot of - * spaces are there in the document after the
then this gives - * the false code page switch. - */ - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_BR_SPL_Handle() -{ - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool match = NW_TRUE; - NW_Bool matchSpl = NW_TRUE; - - while(match) - { - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, 0x0, &matchSpl); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (matchSpl == NW_FALSE) - { - // check for '0xa' for "nl" - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, 0xa, &matchSpl); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - - if( (matchSpl == NW_TRUE) && !NW_HTMLP_Lexer_AtEnd(iLexer) ) - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - else - { - match = NW_FALSE; - } - }//end while - - return e; - -}//end CHtmlpParser::NW_HTMLP_BR_SPL_Handle() - - - TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeElementStart(NW_Bool* pMatch) - { - TBrowserStatusCode e = KBrsrSuccess; - NW_HTMLP_Interval_t interval; - NW_Bool match; - NW_Bool emptyElement; - NW_HTMLP_Lexer_Position_t position; - NW_HTMLP_Lexer_Position_t startPosition; - NW_HTMLP_Lexer_Position_t positionAttributeList; - NW_HTMLP_ElementDescriptionConst_t* pElement; - NW_HTMLP_ElementTableIndex_t elementIndex; - NW_HTMLP_ElementTableIndex_t insertedIndex = 0; - NW_Bool inserted = NW_FALSE; - NW_Bool hasTable, hasTr, hasTd, needTable, needTr, needTd; - NW_Int32 i; - - *pMatch = NW_FALSE; - hasTable = hasTr = hasTd = needTr = needTd = needTable =NW_FALSE; - - NW_HTMLP_SPL_Elem_Initialize(); - NW_HTMLP_Interval_Init(&interval); - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - NW_HTMLP_Lexer_GetPosition(iLexer, &startPosition); - /* advance past '<' */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* get tag */ - e = NW_HTMLP_ParseName(&match, &interval); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - // This isn't a start tag of an element. - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '%', &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (match == NW_TRUE) - { - // if page contains <%response.cachecontrol=public%>... - // ignore <%response.cachecontrol=public%> - // for more detail, see JHAN-5XSR7Y - // if tag starts with <%, then ignore it by forcing match to NW_TRUE, - // and setting iLexer position to where <% ends - do - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (NW_HTMLP_Lexer_AtEnd(iLexer)) - { - /* not well-formed at EOF */ - match = NW_TRUE; - return KBrsrSuccess; - } - e = NW_HTMLP_Lexer_AsciiCharCompare (iLexer, '>', &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } while (!match); - NW_HTMLP_Lexer_Advance(iLexer); - } - else - { - // no <% found - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - return KBrsrSuccess; - } - - // look up the tag in our table and convert from using an interval to - // a table entry - pElement = NW_HTMLP_ElementFindTagFromDoc(&interval, &elementIndex); - - // If tag is unknown, consume it, ignoring it as though it wasn't - // there. Only the tag is consumed. Everything between it and its - // closing tag are kept and processed as if the tag weren't there - // in the first place. - if (!pElement) - { - match = NW_FALSE; - do - { - if (NW_HTMLP_Lexer_AtEnd(iLexer)) - { - // This could be illegal tag or end of chunk in the middle of a tag - if (!iDocComplete) - { - TInt lastTextLen = iLexer->byteCount - startPosition.readPosition; - - iLastTextBuf = (NW_Buffer_t *)NW_Buffer_New(lastTextLen); - if (iLastTextBuf == NULL) { - return KBrsrOutOfMemory; - } - else - { - (void)NW_Mem_memcpy(iLastTextBuf->data, iLexer->pBuf + startPosition.readPosition, lastTextLen); - iLastTextBuf->length = lastTextLen; - } - } - match = NW_TRUE; - return KBrsrSuccess; - } - e = NW_HTMLP_Lexer_AsciiCharCompare (iLexer, '>', &match); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } while (!match); - *pMatch = NW_TRUE; - return KBrsrSuccess; - } - - - if (iIsHtml && elementIndex == HTMLP_HTML_TAG_INDEX_NOSCRIPT) - { - if (iWithinNoscript) - { - // already within the noscript, treat this noscript as - e = NW_HTMLP_IfLegalConsumeAttributes(&match, &emptyElement, NULL, NULL); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) - { - /* This is a malformed attribute list. */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - *pMatch = NW_FALSE; - return KBrsrSuccess; - } - - e = NW_HTMLP_ElementParseState_ExplicitClosing(elementIndex, pElement); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - iWithinNoscript = NW_FALSE; - *pMatch = NW_TRUE; - iElementParseState->readPosition = iLexer->readPosition; - return KBrsrSuccess; - } - else - { - // set within noscript to be true - iWithinNoscript = NW_TRUE; - } - } - - /* Some contents are there before the tags. Flag to handle these contents. Special case - * for handling the page switch. This is checked in the first segment only. - */ - - if( iIsHtml && firstSegment && iCBs->startTagCB && (elementIndex == HTMLP_HTML_TAG_INDEX_HTML) ) - { - htmlTagFound = NW_TRUE; - } - - //If some special handling of the element is required. - if(pElement && (pElement->splHandling == NW_TRUE) ) - { - NW_HTMLP_SPL_Elem_Setup(elementIndex, iNeedCharsetDetect); - - if (iSPLElemHandling->type == NW_HTMLP_SPL_SCRIPT) - { - iLastScriptStart = position.readPosition; - setValidMarks(); - } - else if(iSPLElemHandling->type == NW_HTMLP_SPL_NOSCRIPT ) - { - iLastScriptStart = position.readPosition; - setValidMarks(); - } - else if (iSPLElemHandling->type == NW_HTMLP_SPL_BODY) - { - if (iNeedCharsetDetect) - { - e = NW_HTMLP_SPL_Elem_Handle_BodyStart(pElement); - return e; - } - } - } - - /* - now have a tag but must check attribute list before executing callbacks - */ - - /* first pass over attribute list just checks syntax and is - done without callbacks */ - NW_HTMLP_Lexer_GetPosition(iLexer, &positionAttributeList); - e = NW_HTMLP_IfLegalConsumeAttributes(&match, &emptyElement, NULL, iSPLElemHandling); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - /* This is a malformed attribute list. */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - return KBrsrSuccess; - } - - /* do implied closing of open elements */ - e = NW_HTMLP_ElementParseState_ImpliedClosings(pElement); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* tag CB */ - if (iCBs->startTagCB != NULL) - { - // first handle the case of insert necessary tr or td - if (iIsHtml) - { - for (i = 0; i <= iElementParseState->openElementStackPointer; i++) - { - switch ((iElementParseState->pOpenElementStack)[i]) - { - case HTMLP_HTML_TAG_INDEX_TABLE: - hasTable = NW_TRUE; - hasTr = hasTd = NW_FALSE; - break; - case HTMLP_HTML_TAG_INDEX_TR: - hasTr = NW_TRUE; - hasTd = NW_FALSE; - break; - case HTMLP_HTML_TAG_INDEX_TD: - case HTMLP_HTML_TAG_INDEX_TH: - hasTd = NW_TRUE; - break; - } - } - } - else - { // !iIsHtml == WML content - // if content is WML make sure , and
are present or needed. - // if one or more is needed, they will be added to stack (openElementStack), below. - for (i = 0; i <= iElementParseState->openElementStackPointer; i++) - { - switch ((iElementParseState->pOpenElementStack)[i]) - { - case HTMLP_WML_TAG_INDEX_TABLE: - hasTable = NW_TRUE; - hasTr = hasTd = NW_FALSE; - break; - case HTMLP_WML_TAG_INDEX_TR: - hasTr = NW_TRUE; - hasTd = NW_FALSE; - break; - case HTMLP_WML_TAG_INDEX_TD: - hasTd = NW_TRUE; - break; - } - } - } - if (hasTable) - { - if ( (iIsHtml && (elementIndex == HTMLP_HTML_TAG_INDEX_TD || elementIndex == HTMLP_HTML_TAG_INDEX_TH)) - || (!iIsHtml && (elementIndex == HTMLP_WML_TAG_INDEX_TD)) ) - { - if (!hasTr) - needTr = NW_TRUE; - } - /* try to use the form direct under the table, because it's very comman and table - do handles it */ - else if ( iIsHtml && (elementIndex != HTMLP_HTML_TAG_INDEX_TR - && elementIndex != HTMLP_HTML_TAG_INDEX_FORM - && elementIndex != HTMLP_HTML_TAG_INDEX_CAPTION) ) - { - if (!hasTr) - needTr = NW_TRUE; - if (!hasTd) - needTd = NW_TRUE; - } - } - else - { - if ( (iIsHtml && elementIndex == HTMLP_HTML_TAG_INDEX_TD) - || (!iIsHtml && elementIndex == HTMLP_WML_TAG_INDEX_TD) ) - { - needTable = NW_TRUE; - - if (!hasTr) - needTr = NW_TRUE; - } - else if ( (iIsHtml && elementIndex == HTMLP_HTML_TAG_INDEX_TR) - || (!iIsHtml && elementIndex == HTMLP_WML_TAG_INDEX_TR) ) - needTable = NW_TRUE; - } - if (needTable) - { - TUint16 temp = HTMLP_HTML_TAG_INDEX_TABLE; - if (!iIsHtml) { - temp = HTMLP_WML_TAG_INDEX_TABLE; - } - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[temp].tag[0], - &((iLexer->pElementDictionary)[temp].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - e = NW_HTMLP_ElementParseState_Push(temp); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if (needTr) - { - TUint16 temp = HTMLP_HTML_TAG_INDEX_TR; - if (!iIsHtml) { - temp = HTMLP_WML_TAG_INDEX_TR; - } - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[temp].tag[0], - &((iLexer->pElementDictionary)[temp].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - e = NW_HTMLP_ElementParseState_Push(temp); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - if (needTd) - { - TUint16 temp = HTMLP_HTML_TAG_INDEX_TD; - if (!iIsHtml) { - temp = HTMLP_WML_TAG_INDEX_TD; - } - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[temp].tag[0], - &((iLexer->pElementDictionary)[temp].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - - } - e = NW_HTMLP_ElementParseState_Push(temp); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - - if (iIsHtml) - { - switch (elementIndex) - { - case HTMLP_HTML_TAG_INDEX_FORM: - if (!iHasForm) - { - iHasForm = NW_TRUE; - } - break; - case HTMLP_HTML_TAG_INDEX_INPUT: - case HTMLP_HTML_TAG_INDEX_SELECT: - case HTMLP_HTML_TAG_INDEX_TEXTAREA: - case HTMLP_HTML_TAG_INDEX_LABEL: - case HTMLP_HTML_TAG_INDEX_FIELDSET: - // if the content is from script, no need to create fake form element - // this is due to some live web site page (such as mlb.com) where the - // input controls are in script, but form is outside the script. - if (!iHasForm && !iIsScript) - { - inserted = NW_TRUE; - insertedIndex = HTMLP_HTML_TAG_INDEX_FORM; - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[insertedIndex].tag[0], - &((iLexer->pElementDictionary)[insertedIndex].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - iHasForm = NW_TRUE; - } - } - } - - if (pElement) - { - e = (*(iCBs->startTagCB))((iLexer->pElementDictionary)[elementIndex].tag[0], - &((iLexer->pElementDictionary)[elementIndex].tag[1]), - iCBs->pClientPointer, NW_FALSE); - updateCurrentCP(); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - } - - /* reposition for a second pass over attribute list */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &positionAttributeList); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* second pass over attribute list with callbacks */ - e = NW_HTMLP_IfLegalConsumeAttributes(&match, &emptyElement, iCBs, iSPLElemHandling); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - /* Something is unexpectedly wrong. We just did a second - pass over the attribute list (this time with callbacks enabled) and - it should always match because the first pass results check should - have caught a syntax error */ - return KBrsrFailure; - } - - /* accept this opening markup */ - - if (inserted) - { - e = NW_HTMLP_ElementParseState_Push( insertedIndex ); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - - /* Sometimes spaces (0x00) after
tag gives false switch - * code page in the wbxml buffer. - */ - - if(pElement && (elementIndex == HTMLP_HTML_TAG_INDEX_BR) && (iIsHtml == NW_TRUE) ) - { - e = NW_HTMLP_BR_SPL_Handle(); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - - if (pElement && (pElement->contentType != EMPTY) && (emptyElement != NW_TRUE)) - { - e = NW_HTMLP_ElementParseState_Push(elementIndex); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - if (pElement->contentType == PCDATA) - { - iElementParseState->inPCDATA = NW_TRUE; - } - } - - if (pElement && (pElement->contentType == EMPTY) || (emptyElement == NW_TRUE) ) - { - /* This takes care of Empty DTD element Tags closing */ - if (iCBs->endTagCB != NULL) - { - e = (*(iCBs->endTagCB))(0, NULL, NW_TRUE, /* empty */ - iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - } - /* handler */ - if (pElement && (pElement->contentType == PLAINTEXT ) ) - { - NW_HTMLP_Interval_Start(&interval, iLexer); - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) - { - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - - NW_HTMLP_Interval_Stop(&interval, iLexer); - if (iCBs->contentCB != NULL) - { - e = (*(iCBs->contentCB))(iLexer, &interval, iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - } - } - *pMatch = NW_TRUE; - iElementParseState->readPosition = iLexer->readPosition; - return KBrsrSuccess; -}//end CHtmlpParser::NW_HTMLP_IfLegalConsumeElementStart(NW_Bool* pMatch) - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_IfLegalConsumeElementEnd(NW_Bool* pMatch) - { - NW_HTMLP_Interval_t interval; - NW_HTMLP_Lexer_Position_t position; - NW_HTMLP_ElementDescriptionConst_t* pElement; - NW_HTMLP_ElementTableIndex_t elementIndex; - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool match; - NW_Bool emptyElement; - - *pMatch = NW_FALSE; - NW_HTMLP_Interval_Init(&interval); - NW_HTMLP_Lexer_GetPosition(iLexer, &position); - /* advance past '<' */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* check for '/' */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '/', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - - if (match == NW_FALSE) { - /* This isn't an end tag of an element. */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - return KBrsrSuccess; - } - - /* advance past '/' */ - e = NW_HTMLP_Lexer_Advance(iLexer); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - /* get tag */ - e = NW_HTMLP_ParseName(&match, &interval); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - /* This isn't a start tag of an element. */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - return KBrsrSuccess; - } - - /* look up the tag in our table and convert from using - an interval to a table entry */ - pElement = NW_HTMLP_ElementFindTagFromDoc(&interval, &elementIndex); - - /* If end of head, and charset was not detected, need to default to variant specific, - and do the conversion now */ - if(pElement && (pElement->splHandling == NW_TRUE) ) - { - if (iIsHtml) - { - if( elementIndex == HTMLP_HTML_TAG_INDEX_SCRIPT) - { - iLastScriptStart = -1; - } - else if(elementIndex == HTMLP_HTML_TAG_INDEX_NOSCRIPT) - { - iLastScriptStart = -1; - iWithinNoscript = NW_FALSE; - } - } - } - - - /* like normal attribute list parse but don't use callbacks */ - e = NW_HTMLP_IfLegalConsumeAttributes(&match, &emptyElement, NULL, NULL); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (match == NW_FALSE) { - /* This is a malformed attribute list. */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - return KBrsrSuccess; - } - /* Catch PCDATA mode */ - if (iElementParseState->inPCDATA == NW_TRUE) - { - NW_ASSERT(iElementParseState->openElementStackPointer >= 0); - NW_ASSERT(iElementParseState->openElementStackPointer < iElementParseState->openElementStackCapacity); - if ((pElement != NULL) - && (elementIndex==(iElementParseState->pOpenElementStack)[iElementParseState->openElementStackPointer])) - { - iElementParseState->inPCDATA = NW_FALSE; - if( (iSPLElemHandling->splHandle == NW_TRUE) && - (iSPLElemHandling->type == NW_HTMLP_SPL_TITLE) ) - { - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - } - } - else if( (iSPLElemHandling->splHandle == NW_TRUE) && - (iSPLElemHandling->type == NW_HTMLP_SPL_TITLE) ) - { - /*Handle mis-spelled </title> end tag */ - iElementParseState->inPCDATA = NW_FALSE; - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - } - else - { - /* reject this ending markup as not matching open element */ - e = NW_HTMLP_Lexer_SetPosition(iLexer, &position); - if (BRSR_STAT_IS_FAILURE(e)) - { - return e; - } - return KBrsrSuccess; - } - } //end if (iElementParseState->inPCDATA == NW_TRUE) - - /* unknown tag filter */ - if (pElement != NULL) { - e = NW_HTMLP_ElementParseState_ExplicitClosing(elementIndex, pElement); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - } - - *pMatch = NW_TRUE; - return KBrsrSuccess; -} - -TBrowserStatusCode CHtmlpParser::setValidMarks() - { - NW_HTMLP_ElementParseState_Clone(&iLastValidStack); - if (iWbxmlWriter) - { - iLastValid = ((NW_HTMLP_WbxmlEncoder_t*)iCBs->pClientPointer)->pE->index; - iValidTagCP = iCurrentTagCP; - iValidAttrCP = iCurrentAttrCP; - iValidCPCount = iCurrentCPCount; - } - return KBrsrSuccess; - } - -TBrowserStatusCode CHtmlpParser::commitValidMarks() - { - NW_Buffer_t * tmp_buf = NULL; - NW_Uint32 lastTextLen = 0; - NW_Uint32 previousBufLen = 0; - - /* trim the output if necessary */ - if (iWbxmlWriter && iWbxmlWriter->index != (NW_Uint32)iLastValid) - iWbxmlWriter->index = iLastValid; - iElementParseState->openElementStackPointer = iLastValidStack->openElementStackPointer; - iElementParseState->readPosition = iLastValidStack->readPosition; - - /* reform the valid output */ - if (iPreviousValidOutput) - iLastValid += iPreviousValidOutput->length; - - // only generate output wbxml buffer when real parsing starts - if (!iNeedCharsetDetect) - { - tmp_buf = iPreviousValidOutput; - iPreviousValidOutput = NW_Buffer_New(iLastValid); - if (!iPreviousValidOutput) - { - return KBrsrOutOfMemory; - } - if (tmp_buf) - { - previousBufLen = tmp_buf->length; - (void)NW_Mem_memcpy(iPreviousValidOutput->data, tmp_buf->data, previousBufLen); - } - (void)NW_Mem_memcpy(iPreviousValidOutput->data + previousBufLen, - iWbxmlWriter->pBuf, - iLastValid - previousBufLen); - iPreviousValidOutput->length = iLastValid; - - if (tmp_buf) - NW_Buffer_Free(tmp_buf); - } - - /* record the last text kept from the chunk */ - if (iLastScriptStart != -1) - { - iLastTextBegin = iLastScriptStart; - } - - if (iLastTextBegin != -1) - { - lastTextLen = iLexer->byteCount - iLastTextBegin; - - iLastTextBuf = (NW_Buffer_t *)NW_Buffer_New(lastTextLen); - if (iLastTextBuf == NULL) { - return KBrsrOutOfMemory; - } - else - { - (void)NW_Mem_memcpy(iLastTextBuf->data, iLexer->pBuf + iLastTextBegin, lastTextLen); - iLastTextBuf->length = lastTextLen; - } - } - return KBrsrSuccess; - } - -NW_Buffer_t* CHtmlpParser::getLastTextBuf() - { - return iLastTextBuf; - } - -NW_Int32 CHtmlpParser::getLastValid() - { - return iLastValid; - } - -NW_Uint32 CHtmlpParser::getCodePageSwitchCount() - { - return iValidCPCount; - } - -NW_Buffer_t* CHtmlpParser::getPreviousValidOutput() - { - return iPreviousValidOutput; - } - -NW_HTMLP_EventCallbacks_t * CHtmlpParser::getEventCallbacks() - { - return iCBs; - } - -NW_HTMLP_Lexer_t* CHtmlpParser::getLexer() - { - return iLexer; - } - -TBrowserStatusCode CHtmlpParser::NW_HTMLP_Parse(NW_Bool isFirstSegment, - NW_Bool docComplete, NW_Bool needCharsetDetect) - { - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool match = NW_FALSE; - - iDocComplete = docComplete; - iNeedCharsetDetect = needCharsetDetect; - if (iNeedCharsetDetect) - { - NW_ASSERT(iCBs->charsetConvertCallback); - NW_ASSERT(iCBs->charsetContext); - } - if (isFirstSegment) - { - // initialize iIsHtml - iIsHtml = NW_FALSE; - iHasForm = NW_FALSE; - firstSegment = NW_TRUE; - htmlTagFound = NW_FALSE; - if (iLexer->pElementDictionary == NW_HTMLP_Get_ElementDescriptionTable()) - { - iIsHtml = NW_TRUE; - } - if (iLastValidStack) - { - NW_HTMLP_ElementParseState_Delete(&iLastValidStack); - NW_HTMLP_ElementParseState_New(); - } - } - else - { - firstSegment = NW_FALSE; - htmlTagFound = NW_FALSE; - } - - if ((iLexer == NULL) || (iCBs == NULL)) { - return KBrsrFailure; - } - - iSPLElemHandling->splHandle = NW_FALSE; - iSPLElemHandling->type = NW_HTMLP_SPL_NONE; - - NW_Buffer_Free(iLastTextBuf); - iLastTextBuf = NULL; - - if (iCBs->pClientPointer != NULL) - { - iWbxmlWriter = ((NW_HTMLP_WbxmlEncoder_t*)iCBs->pClientPointer)->pE; - iWbxmlWriter->tagCodePage = iValidTagCP; - iWbxmlWriter->attributeCodePage = iValidAttrCP; - // WLIU_DEBUG: iWbxmlWriter->cp_count = iValidCPCount; - iCurrentTagCP = iValidTagCP; - iCurrentAttrCP = iValidAttrCP; - iCurrentCPCount = iValidCPCount; - } - - if (iLastValidStack) - { - iElementParseState = iLastValidStack; - iLastValidStack = NULL; - } - - iLastTextBegin = -1; - iLastScriptStart = -1; - - /* start of document callback */ - if (isFirstSegment && iCBs->beginDocumentCB != NULL) { - e = (*(iCBs->beginDocumentCB))(iLexer, iCBs->pClientPointer); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - } - /* ignore any leading whitespace */ - e = NW_HTMLP_SkipSpace(); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - - while (!NW_HTMLP_Lexer_AtEnd(iLexer)) { - - if (iConsumeSpaces) - { - /* Consume spaces between tags only for WML text */ - e = NW_HTMLP_SkipSpace(); - } - - /* Take care of special cases */ - - e = NW_HTMLP_HandleSpecialCases(&match); - - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - /* look for start of markup */ - e = NW_HTMLP_Lexer_AsciiCharCompare(iLexer, '<', &match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - - e = NW_HTMLP_IfLegalConsumeElementEnd(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - if (iElementParseState->inPCDATA == NW_FALSE) - { - e = NW_HTMLP_IfLegalConsumeComment(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - e = NW_HTMLP_IfLegalConsumeDoctype(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - e = NW_HTMLP_IfLegalConsumePi(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - e = NW_HTMLP_IfLegalConsumeCdata(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - - e = NW_HTMLP_IfLegalConsumeElementStart(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - if (match == NW_TRUE) { - continue; - } - } - } - - /* process character data up to start of possible markup '<' */ - e = NW_HTMLP_ConsumeContent(&match); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - } - - if (iLastValid == -1 && iWbxmlWriter) - { - iLastValid = iWbxmlWriter->index; - } - - /* remember the valid stack before close all is called */ - if ((iLastScriptStart == -1) && (iLastTextBegin == -1)) - { - setValidMarks(); - } - commitValidMarks(); - - e = NW_HTMLP_ElementParseState_CloseAll(); - if (BRSR_STAT_IS_FAILURE(e)) { - goto htmlp_parse_error; - } - - /* end of document callback */ - if (iCBs->endDocumentCB != NULL /*&& e != KBrsrRestartParsing*/) - { - e = (*(iCBs->endDocumentCB))(iLexer, e, iCBs->pClientPointer); - } - -htmlp_parse_error: - - NW_HTMLP_ElementParseState_Delete(&iElementParseState); - if (e == KBrsrRestartParsing) - { - NW_HTMLP_ElementParseState_Delete(&iLastValidStack); - iLastValidStack = NULL; - NW_HTMLP_ElementParseState_New(); - } - - // iVisitedHeadText is no longer needed unless it is tracking an - // unterminated comment. In this cases iVisitedHeadText is needed - // because NW_HTMLP_NotifyDocComplete calls NW_HTHMLP_RealParse - // which needs it. - if (isFirstSegment && iRestarted && !iTrackingUnTerminatedComment) - { - NW_Buffer_Free(iVisitedHeadText); - iVisitedHeadText = NULL; - } - - return e; -} - -TBrowserStatusCode CHtmlpParser::appendVisitedHeadText(NW_Byte* new_data, NW_Uint32 new_len) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Buffer_t * tmp_buf; - NW_Uint32 old_len = 0; - - tmp_buf = iVisitedHeadText; - if (tmp_buf) - old_len = tmp_buf->length; - iVisitedHeadText = NULL; - iVisitedHeadText = (NW_Buffer_t *)NW_Buffer_New(old_len + new_len); - if (!iVisitedHeadText) - { - status = KBrsrOutOfMemory; - goto cleanup; - } - - if (tmp_buf) - { - (void)NW_Mem_memcpy(iVisitedHeadText->data, tmp_buf->data, old_len); - } - (void)NW_Mem_memcpy(iVisitedHeadText->data + old_len, new_data, new_len); - iVisitedHeadText->length = old_len + new_len; - -cleanup: - NW_Buffer_Free(tmp_buf); - return status; - } - -NW_Buffer_t* CHtmlpParser::getVisitedHeadText() - { - return iVisitedHeadText; - } - -void CHtmlpParser::updateCurrentCP() - { - if (iCurrentTagCP != iWbxmlWriter->tagCodePage) - { - // WLIU_DEBUG: NW_ASSERT(iCurrentCPCount == iWbxmlWriter->cp_count -1); - iCurrentCPCount++; - iCurrentTagCP = iWbxmlWriter->tagCodePage; - } - else if(iCurrentAttrCP != iWbxmlWriter->attributeCodePage) - { - // WLIU_DEBUG: NW_ASSERT(iCurrentCPCount == iWbxmlWriter->cp_count -1); - iCurrentCPCount++; - iCurrentAttrCP = iWbxmlWriter->attributeCodePage; - } - } - -void CHtmlpParser::updateCurrentCP(NW_Uint32 switches) - { - if (switches != 0) - { - iCurrentCPCount += switches; - iCurrentTagCP = iWbxmlWriter->tagCodePage; - iCurrentAttrCP = iWbxmlWriter->attributeCodePage; - } - // WLIU_DEBUG: NW_ASSERT(iCurrentCPCount == iWbxmlWriter->cp_count); - - } - -#else - -void FeaRmeNoHTMLParser_htmlp_parser(){ - int i = 0; - i+=1; - } -#endif /* FEA_RME_NOHTMLPARSER */ - - - -// For WML purposes, which requires stricter checking of DTD, than HTML, -// return the status of checking the attribute name -// against the appropriate attribute dictionary. -TBrowserStatusCode CHtmlpParser::NW_HTMLP_ValidateWMLAttribute( - NW_HTMLP_Lexer_t* apL, - const NW_HTMLP_Interval_t* apI_name, - void* apV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)apV; - NW_WBXML_Writer_t* pW = pTE->pE; - NW_Uint32 length; - NW_Uint32 nameLength; - NW_Uint32 sizeChar = 1; - NW_Uint8* pName; - TBrowserStatusCode s; - - NW_ASSERT(!iIsHtml); - - // make sure can handle the encoding used - if (!((pTE->encoding == HTTP_us_ascii) - || (pTE->encoding == HTTP_iso_8859_1) - || (pTE->encoding == HTTP_utf_8) - || (pTE->encoding == HTTP_iso_10646_ucs_2))) { - return KBrsrFailure; - } - - // establish the size of a character - if (apL->encoding == HTTP_iso_10646_ucs_2) { - sizeChar = 2; - } - - // name well-formed? - if (!NW_HTMLP_Interval_IsWellFormed(apI_name)) { - return KBrsrFailure; - } - - // var name setup - length = NW_HTMLP_Interval_ByteCount(apI_name); - nameLength = length; // byte count - s = NW_HTMLP_Lexer_DataAddressFromBuffer(apL, apI_name->start, - &nameLength, &pName); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (nameLength != length) { - return KBrsrFailure; - } - nameLength = NW_HTMLP_Interval_CharCount(apI_name); // char count - - // copy the name into a zero terminated string for dictionary checking - NW_Uint8* pByteName = NULL; - NW_String_t nameString; - pByteName = (NW_Uint8*)NW_Mem_Malloc( length + sizeChar ); // allocating bytes - if (!pByteName) { - return KBrsrOutOfMemory; - } - NW_Mem_memset(pByteName, NULL, length + sizeChar); // enough extra space for terminating null characters - NW_Mem_memcpy(pByteName, pName, length); - NW_String_initialize( &nameString, pByteName, pTE->encoding); - NW_Int16 retVal = -1; // initialize return to be -1 (meaning: attribute not found) - retVal = NW_WBXML_Dictionary_getAttributeToken( pW->pAttributeDictionary, //NW_WBXML_Dictionary_t* dictionary, - &nameString, //const NW_String_t* pNameString, - pTE->encoding, //NW_Uint32 encoding, - NW_FALSE ); //NW_Bool matchCase - NW_Mem_Free( pByteName); - pByteName = NULL; - - // the attribute was not found in the dictionary - as this is for WML - send back bad content message - if (retVal == -1) { - return KBrsrWmlbrowserBadContent; - } - - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/src/htmlp_dict.cpp --- a/webengine/wmlengine/src/htmlp/src/htmlp_dict.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,470 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef FEA_RME_NOHTMLPARSER - - -#include "nwx_defs.h" -#include "CHtmlpParser.h" -#include "nw_htmlp_html_dict.h" -/* -must keep tags alphabetized by name - -the form for the index define value is previous_tag + 1, -except for 0'th index - -static const NW_Uint8 htmlp_tag_[] = {}; -#define HTMLP_HTML_TAG_INDEX_ HTMLP_HTML_TAG_INDEX_ + 1 -*/ - -static const NW_Uint8 NW_HTMLP_tag_A[] = {1, 'a'}; - -static const NW_Uint8 NW_HTMLP_tag_ABBR[] = {4, 'a','b','b','r'}; - -static const NW_Uint8 NW_HTMLP_tag_ACRONYM[] -= {7, 'a','c','r','o', 'n', 'y', 'm'}; - -static const NW_Uint8 NW_HTMLP_tag_ADDRESS[] -= {7, 'a','d','d','r', 'e', 's', 's'}; - -static const NW_Uint8 NW_HTMLP_tag_AREA[] -= {4, 'a','r','e','a'}; - -static const NW_Uint8 NW_HTMLP_tag_B[] = {1, 'b'}; - -static const NW_Uint8 NW_HTMLP_tag_BASE[] = {4, 'b','a','s','e'}; - -static const NW_Uint8 NW_HTMLP_tag_BIG[] = {3, 'b','i','g'}; - -static const NW_Uint8 NW_HTMLP_tag_BLINK[] = {5, 'b', 'l', 'i','n','k'}; - -static const NW_Uint8 NW_HTMLP_tag_BLOCKQUOTE[] -= {10, 'b','l','o','c','k','q','u','o','t','e'}; - -static const NW_Uint8 NW_HTMLP_tag_BODY[] = {4, 'b','o','d','y'}; - -static const NW_Uint8 NW_HTMLP_tag_BR[] = {2, 'b','r'}; - -static const NW_Uint8 NW_HTMLP_tag_BUTTON[] = {6,'b','u','t','t','o','n'}; - -static const NW_Uint8 NW_HTMLP_tag_CAPTION[] -= {7, 'c','a','p','t','i','o', 'n'}; - -static const NW_Uint8 NW_HTMLP_tag_CENTER[] = {6, 'c','e','n','t','e','r'}; - -static const NW_Uint8 NW_HTMLP_tag_CITE[] = {4, 'c','i', 't','e'}; - -static const NW_Uint8 NW_HTMLP_tag_CODE[] = {4, 'c','o', 'd','e'}; - -static const NW_Uint8 NW_HTMLP_tag_DD[] = {2, 'd','d'}; - -static const NW_Uint8 NW_HTMLP_tag_DEL[] = {3,'d','e','l'}; - -static const NW_Uint8 NW_HTMLP_tag_DFN[] = {3, 'd','f','n'}; - -static const NW_Uint8 NW_HTMLP_tag_DIR[] = {3, 'd','i','r'}; - -static const NW_Uint8 NW_HTMLP_tag_DIV[] = {3, 'd','i','v'}; - -static const NW_Uint8 NW_HTMLP_tag_DL[] = {2, 'd','l'}; - -static const NW_Uint8 NW_HTMLP_tag_DT[] = {2, 'd','t'}; - -static const NW_Uint8 NW_HTMLP_tag_EM[] = {2, 'e','m'}; - -static const NW_Uint8 NW_HTMLP_tag_EMBED[] = {5, 'e','m','b','e','d'}; - -static const NW_Uint8 NW_HTMLP_tag_FIELDSET[] = {8, 'f','i','e','l','d','s','e','t'}; - -static const NW_Uint8 NW_HTMLP_tag_FONT[] = {4, 'f','o','n','t'}; - -static const NW_Uint8 NW_HTMLP_tag_FORM[] = {4, 'f','o','r','m'}; - -static const NW_Uint8 NW_HTMLP_tag_FRAME[] = {5, 'f','r','a','m','e'}; - -static const NW_Uint8 NW_HTMLP_tag_FRAMESET[] = {8, 'f','r','a','m','e','s','e','t'}; - -static const NW_Uint8 NW_HTMLP_tag_H1[] = {2, 'h','1'}; - -static const NW_Uint8 NW_HTMLP_tag_H2[] = {2, 'h','2'}; - -static const NW_Uint8 NW_HTMLP_tag_H3[] = {2, 'h','3'}; - -static const NW_Uint8 NW_HTMLP_tag_H4[] = {2, 'h','4'}; - -static const NW_Uint8 NW_HTMLP_tag_H5[] = {2, 'h','5'}; - -static const NW_Uint8 NW_HTMLP_tag_H6[] = {2, 'h','6'}; - -static const NW_Uint8 NW_HTMLP_tag_HEAD[] = {4, 'h','e','a','d'}; - -static const NW_Uint8 NW_HTMLP_tag_HR[] = {2, 'h','r'}; - -static const NW_Uint8 NW_HTMLP_tag_HTML[] = {4, 'h','t','m','l'}; - -static const NW_Uint8 NW_HTMLP_tag_I[] = {1, 'i'}; - -static const NW_Uint8 NW_HTMLP_tag_IFRAME[] = {6, 'i','f','r','a','m','e'}; - -static const NW_Uint8 NW_HTMLP_tag_IMG[] = {3, 'i','m','g'}; - -static const NW_Uint8 NW_HTMLP_tag_INPUT[] = {5, 'i','n','p','u','t'}; - -static const NW_Uint8 NW_HTMLP_tag_INS[] = {3, 'i','n','s'}; - -static const NW_Uint8 NW_HTMLP_tag_KBD[] = {3, 'k','b','d'}; - -static const NW_Uint8 NW_HTMLP_tag_LABEL[] = {5, 'l','a','b','e','l'}; - -static const NW_Uint8 NW_HTMLP_tag_LI[] = {2, 'l','i'}; - -static const NW_Uint8 NW_HTMLP_tag_LINK[] = {4, 'l','i','n','k'}; - -static const NW_Uint8 NW_HTMLP_tag_MAP[] -= {3, 'm','a','p'}; - -static const NW_Uint8 NW_HTMLP_tag_MARQUEE[] -= {7, 'm','a','r', 'q', 'u', 'e', 'e'}; - -static const NW_Uint8 NW_HTMLP_tag_MENU[] = {4, 'm','e','n','u'}; - -static const NW_Uint8 NW_HTMLP_tag_META[] = {4, 'm','e','t','a'}; - -static const NW_Uint8 NW_HTMLP_tag_NOBR[] = {4, 'n','o','b','r'}; - -static const NW_Uint8 NW_HTMLP_tag_NOEMBED[] = {7, 'n','o','e','m','b','e','d'}; - -static const NW_Uint8 NW_HTMLP_tag_NOFRAMES[] -= {8, 'n','o','f','r','a','m','e','s'}; - -static const NW_Uint8 NW_HTMLP_tag_NOSCRIPT[] -= {8, 'n','o','s','c','r','i','p','t'}; - -static const NW_Uint8 NW_HTMLP_tag_OBJECT[] = {6, 'o','b','j','e','c','t'}; - -static const NW_Uint8 NW_HTMLP_tag_OL[] = {2, 'o','l'}; - -static const NW_Uint8 NW_HTMLP_tag_OPTGROUP[] -= {8, 'o','p','t','g','r','o', 'u', 'p'}; - -static const NW_Uint8 NW_HTMLP_tag_OPTION[] = {6, 'o','p','t','i','o','n'}; - -static const NW_Uint8 NW_HTMLP_tag_P[] = {1, 'p'}; - -static const NW_Uint8 NW_HTMLP_tag_PARAM[] = {5, 'p', 'a', 'r', 'a', 'm'}; - -static const NW_Uint8 NW_HTMLP_tag_PLAINTEXT[] -= {9, 'p','l','a','i','n','t','e','x','t'}; - -static const NW_Uint8 NW_HTMLP_tag_PRE[] = {3, 'p','r','e'}; - -static const NW_Uint8 NW_HTMLP_tag_Q[] = {1, 'q'}; - -static const NW_Uint8 NW_HTMLP_tag_S[] = {1, 's'}; - -static const NW_Uint8 NW_HTMLP_tag_SAMP[] = {4, 's','a','m', 'p'}; - -static const NW_Uint8 NW_HTMLP_tag_SCRIPT[] = {6, 's','c','r','i','p','t'}; - -static const NW_Uint8 NW_HTMLP_tag_SELECT[] = {6, 's','e','l','e','c','t'}; - -static const NW_Uint8 NW_HTMLP_tag_SMALL[] = {5, 's','m','a','l','l'}; - -static const NW_Uint8 NW_HTMLP_tag_SPAN[] = {4, 's','p','a','n'}; - -static const NW_Uint8 NW_HTMLP_tag_STRIKE[] = {6, 's','t','r','i','k','e'}; - -static const NW_Uint8 NW_HTMLP_tag_STRONG[] = {6, 's','t','r','o','n','g'}; - -static const NW_Uint8 NW_HTMLP_tag_STYLE[] = {5, 's','t','y','l','e'}; - -static const NW_Uint8 NW_HTMLP_tag_SUB[] = {3,'s','u','b'}; - -static const NW_Uint8 NW_HTMLP_tag_SUP[] = {3,'s','u','p'}; - -static const NW_Uint8 NW_HTMLP_tag_TABLE[] = {5, 't','a','b','l','e'}; - -static const NW_Uint8 NW_HTMLP_tag_TD[] = {2, 't','d'}; - -static const NW_Uint8 NW_HTMLP_tag_TEXTAREA[] -= {8, 't','e','x','t','a','r','e','a'}; - -static const NW_Uint8 NW_HTMLP_tag_TH[] = {2, 't','h'}; - -static const NW_Uint8 NW_HTMLP_tag_TITLE[] = {5, 't','i','t','l','e'}; - -static const NW_Uint8 NW_HTMLP_tag_TR[] = {2, 't','r'}; - -static const NW_Uint8 NW_HTMLP_tag_TT[] = {2, 't','t'}; - -static const NW_Uint8 NW_HTMLP_tag_U[] = {1, 'u'}; - -static const NW_Uint8 NW_HTMLP_tag_UL[] = {2, 'u','l'}; - -static const NW_Uint8 NW_HTMLP_tag_VAR[] = {3, 'v','a','r'}; - -static const NW_Uint8 NW_HTMLP_tag_WMLcVALUEdOF[] -= {12 ,'w','m','l',':','v','a','l','u','e','-','o','f'}; - - -/* NOTE: The order in these next lists is not important. */ - -/* Don't allow another <a> tag before closing the earlier one */ - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_only_a[] -= {1, - HTMLP_HTML_TAG_INDEX_A}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_only_head[] -= {1, - HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_list_items[] -= {4, - HTMLP_HTML_TAG_INDEX_DD, HTMLP_HTML_TAG_INDEX_DT, HTMLP_HTML_TAG_INDEX_LI, - HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_list_items[] -= {5, - HTMLP_HTML_TAG_INDEX_DIR, HTMLP_HTML_TAG_INDEX_DL, HTMLP_HTML_TAG_INDEX_MENU, - HTMLP_HTML_TAG_INDEX_OL, HTMLP_HTML_TAG_INDEX_UL}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_TR[] -= {2, - HTMLP_HTML_TAG_INDEX_TR, HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_TR[] -= {1, - HTMLP_HTML_TAG_INDEX_TABLE}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_TD_TH[] -= {4, - HTMLP_HTML_TAG_INDEX_CAPTION, HTMLP_HTML_TAG_INDEX_TD, HTMLP_HTML_TAG_INDEX_TH, - HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_TD_TH[] -= {2, - HTMLP_HTML_TAG_INDEX_TABLE, HTMLP_HTML_TAG_INDEX_TR}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_OPTGROUP[] -= {3, - HTMLP_HTML_TAG_INDEX_OPTGROUP, HTMLP_HTML_TAG_INDEX_HEAD, HTMLP_HTML_TAG_INDEX_OPTION}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_OPTGROUP[] -= {1, - HTMLP_HTML_TAG_INDEX_SELECT}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_OPTION[] -= {2, - HTMLP_HTML_TAG_INDEX_OPTION, HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_OPTION[] -= {2, - HTMLP_HTML_TAG_INDEX_SELECT, HTMLP_HTML_TAG_INDEX_OPTGROUP}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_closes_P[] -= {2, - HTMLP_HTML_TAG_INDEX_P, HTMLP_HTML_TAG_INDEX_HEAD}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_P[] -= {37, - HTMLP_HTML_TAG_INDEX_A, HTMLP_HTML_TAG_INDEX_ADDRESS, HTMLP_HTML_TAG_INDEX_BLOCKQUOTE, - HTMLP_HTML_TAG_INDEX_BODY, HTMLP_HTML_TAG_INDEX_CAPTION, HTMLP_HTML_TAG_INDEX_CENTER, - HTMLP_HTML_TAG_INDEX_CODE, HTMLP_HTML_TAG_INDEX_DD, HTMLP_HTML_TAG_INDEX_DIR, - HTMLP_HTML_TAG_INDEX_DIV, HTMLP_HTML_TAG_INDEX_DL, HTMLP_HTML_TAG_INDEX_DT, - HTMLP_HTML_TAG_INDEX_FONT, HTMLP_HTML_TAG_INDEX_FORM, HTMLP_HTML_TAG_INDEX_H1, - HTMLP_HTML_TAG_INDEX_H2, HTMLP_HTML_TAG_INDEX_H3, HTMLP_HTML_TAG_INDEX_H4, - HTMLP_HTML_TAG_INDEX_H5, HTMLP_HTML_TAG_INDEX_H6, HTMLP_HTML_TAG_INDEX_FIELDSET, - HTMLP_HTML_TAG_INDEX_LABEL, HTMLP_HTML_TAG_INDEX_LI, HTMLP_HTML_TAG_INDEX_MARQUEE, - HTMLP_HTML_TAG_INDEX_MENU, HTMLP_HTML_TAG_INDEX_OBJECT, HTMLP_HTML_TAG_INDEX_OL, - HTMLP_HTML_TAG_INDEX_OPTGROUP, HTMLP_HTML_TAG_INDEX_OPTION, HTMLP_HTML_TAG_INDEX_PRE, - HTMLP_HTML_TAG_INDEX_SELECT, HTMLP_HTML_TAG_INDEX_SPAN, HTMLP_HTML_TAG_INDEX_TABLE, - HTMLP_HTML_TAG_INDEX_TD, HTMLP_HTML_TAG_INDEX_TH, HTMLP_HTML_TAG_INDEX_TR, - HTMLP_HTML_TAG_INDEX_UL}; - -static const NW_HTMLP_ElementTableIndex_t NW_HTMLP_blocks_A[] -= {37, - HTMLP_HTML_TAG_INDEX_ADDRESS, HTMLP_HTML_TAG_INDEX_BLOCKQUOTE, - HTMLP_HTML_TAG_INDEX_BODY, HTMLP_HTML_TAG_INDEX_CAPTION, HTMLP_HTML_TAG_INDEX_CENTER, - HTMLP_HTML_TAG_INDEX_CODE, HTMLP_HTML_TAG_INDEX_DD, HTMLP_HTML_TAG_INDEX_DIR, - HTMLP_HTML_TAG_INDEX_DIV, HTMLP_HTML_TAG_INDEX_DL, HTMLP_HTML_TAG_INDEX_DT, - HTMLP_HTML_TAG_INDEX_FONT, HTMLP_HTML_TAG_INDEX_FORM, HTMLP_HTML_TAG_INDEX_H1, - HTMLP_HTML_TAG_INDEX_H2, HTMLP_HTML_TAG_INDEX_H3, HTMLP_HTML_TAG_INDEX_H4, - HTMLP_HTML_TAG_INDEX_H5, HTMLP_HTML_TAG_INDEX_H6, HTMLP_HTML_TAG_INDEX_FIELDSET, - HTMLP_HTML_TAG_INDEX_LABEL, HTMLP_HTML_TAG_INDEX_LI, HTMLP_HTML_TAG_INDEX_MARQUEE, - HTMLP_HTML_TAG_INDEX_MENU, HTMLP_HTML_TAG_INDEX_OBJECT, HTMLP_HTML_TAG_INDEX_OL, - HTMLP_HTML_TAG_INDEX_OPTGROUP, HTMLP_HTML_TAG_INDEX_OPTION, HTMLP_HTML_TAG_INDEX_P, - HTMLP_HTML_TAG_INDEX_PRE, - HTMLP_HTML_TAG_INDEX_SELECT, HTMLP_HTML_TAG_INDEX_SPAN, HTMLP_HTML_TAG_INDEX_TABLE, - HTMLP_HTML_TAG_INDEX_TD, HTMLP_HTML_TAG_INDEX_TH, HTMLP_HTML_TAG_INDEX_TR, - HTMLP_HTML_TAG_INDEX_UL}; - - - -/* must keep alphabetized by tag name - * */ - -/* In some sites, <a> tag can occur inside the <head> elements. So, - * NW_HTMLP_closes_only_head is removed from the <a> element list. - */ - -NW_HTMLP_ElementDescriptionConst_t NW_HTMLP_ElementDescriptionTable[] = { -/* tag closes blocks contentType splHandling */ - {NW_HTMLP_tag_A, NW_HTMLP_closes_only_a, NW_HTMLP_blocks_A, ANY, NW_TRUE}, - {NW_HTMLP_tag_ABBR, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_ACRONYM, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_ADDRESS, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_AREA, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_B, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BASE, NULL, NULL, EMPTY, NW_TRUE}, - {NW_HTMLP_tag_BIG, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BLINK, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BLOCKQUOTE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BODY, NW_HTMLP_closes_only_head, NULL, ANY, NW_TRUE}, - {NW_HTMLP_tag_BR, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - - - {NW_HTMLP_tag_BUTTON, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_CAPTION, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_CENTER, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_CITE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_CODE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DD, - NW_HTMLP_closes_list_items, NW_HTMLP_blocks_list_items, ANY, NW_FALSE}, - - - {NW_HTMLP_tag_DEL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_DFN, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DIR, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DIV, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DT, - NW_HTMLP_closes_list_items, NW_HTMLP_blocks_list_items, ANY, NW_FALSE}, - {NW_HTMLP_tag_EM, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_EMBED, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_FIELDSET, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_FONT, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_FORM, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_FRAME, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_FRAMESET, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H1, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H2, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H3, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H4, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H5, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_H6, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_HEAD, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_HR, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_HTML, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_I, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_IFRAME, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_IMG, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_INPUT, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - - {NW_HTMLP_tag_INS, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - - {NW_HTMLP_tag_KBD, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_LABEL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_LI, - NW_HTMLP_closes_list_items, NW_HTMLP_blocks_list_items, ANY, NW_FALSE}, - {NW_HTMLP_tag_LINK, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_MAP, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_MARQUEE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_MENU, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_META, NULL, NULL, EMPTY, NW_TRUE}, - {NW_HTMLP_tag_NOBR, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_NOEMBED, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_NOFRAMES, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_NOSCRIPT, NULL, NULL, ANY, NW_TRUE}, - {NW_HTMLP_tag_OBJECT, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_OL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_OPTGROUP, - NW_HTMLP_closes_OPTGROUP, NW_HTMLP_blocks_OPTGROUP, ANY, NW_FALSE}, - {NW_HTMLP_tag_OPTION, - NW_HTMLP_closes_OPTION, NW_HTMLP_blocks_OPTION, ANY, NW_FALSE}, - {NW_HTMLP_tag_P, - NW_HTMLP_closes_P, NW_HTMLP_blocks_P, ANY, NW_FALSE}, - {NW_HTMLP_tag_PARAM, NW_HTMLP_closes_only_head, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_PLAINTEXT, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_PRE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_Q, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_S, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_SAMP, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SCRIPT, NULL, NULL, PCDATA, NW_TRUE}, - {NW_HTMLP_tag_SELECT, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SMALL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SPAN , NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_STRIKE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_STRONG, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_STYLE, NULL, NULL, PCDATA, NW_FALSE}, - - {NW_HTMLP_tag_SUB, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SUP, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - - {NW_HTMLP_tag_TABLE, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TD, - NW_HTMLP_closes_TD_TH, NW_HTMLP_blocks_TD_TH, ANY, NW_FALSE}, - {NW_HTMLP_tag_TEXTAREA, NW_HTMLP_closes_only_head, NULL, PCDATA, NW_FALSE}, - {NW_HTMLP_tag_TH, - NW_HTMLP_closes_TD_TH, NW_HTMLP_blocks_TD_TH, ANY, NW_FALSE}, - {NW_HTMLP_tag_TITLE, NULL, NULL, PCDATA, NW_TRUE}, - {NW_HTMLP_tag_TR, - NW_HTMLP_closes_TR, NW_HTMLP_blocks_TR, ANY, NW_FALSE}, - - {NW_HTMLP_tag_TT, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - - {NW_HTMLP_tag_U, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_UL, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_VAR, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_WMLcVALUEdOF, NW_HTMLP_closes_only_head, NULL, ANY, NW_FALSE} -}; - - -const NW_HTMLP_ElementTableIndex_t NW_HTMLP_ElementTableCount -= (sizeof(NW_HTMLP_ElementDescriptionTable) - / sizeof(NW_HTMLP_ElementDescriptionConst_t)); - - -/* - * Access routines to get pointers to NW_HTMLP_ElementDescriptionTable & - * NW_HTMLP_ElementTableCount from outside the XmlParserDLL - */ -NW_HTMLP_ElementDescriptionConst_t* NW_HTMLP_Get_ElementDescriptionTable() -{ - return (NW_HTMLP_ElementDescriptionTable); -} - -NW_HTMLP_ElementTableIndex_t NW_HTMLP_Get_ElementTableCount() -{ - return (NW_HTMLP_ElementTableCount); -} - -#else - -void FeaRmeNoHTMLParser_htmlp_dict(){ - int i = 0; - i+=1; -} -#endif /* FEA_RME_NOHTMLPARSER */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/src/htmlp_lexer.c --- a/webengine/wmlengine/src/htmlp/src/htmlp_lexer.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,476 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - -Lexer for HTML parser. - -*/ -#ifndef FEA_RME_NOHTMLPARSER - -#include "nwx_defs.h" -#include "nw_htmlp_lexer.h" -#include "nw_string_char.h" -#include "BrsrStatusCodes.h" - -/* Does not copy the buffer */ -TBrowserStatusCode NW_HTMLP_Lexer_InitFromBuffer(NW_HTMLP_Lexer_t* pL, - NW_Uint32 byteCount, - NW_Uint8* pBuf, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary) -{ - if ((byteCount == 0) || (pBuf == NULL)) { - return KBrsrFailure; - } - pL->encoding = 0; - pL->endianness = NW_NATIVE_ENDIAN; - pL->readPosition = 0; - pL->charPosition = 0; - pL->lineColumn.crCount = 0; - pL->lineColumn.lfCount = 0; - pL->lineColumn.charsSinceLastCR = 0; - pL->lineColumn.charsSinceLastLF = 0; - pL->end = NW_FALSE; - pL->byteCount = byteCount; - pL->pBuf = pBuf; - pL->elementCount = elementCount; - pL->pElementDictionary = pElementDictionary; - return KBrsrSuccess; -} - -/* Returns a pointer in *ppData into pBuf at some byte position -and byte count, byte count is truncated to fit in pBuf if required. */ -TBrowserStatusCode NW_HTMLP_Lexer_DataAddressFromBuffer(NW_HTMLP_Lexer_t* pL, - NW_Uint32 byteIndex, - NW_Uint32* pByteCount, - NW_Uint8** ppData) -{ - NW_ASSERT(byteIndex < pL->byteCount); - NW_ASSERT(*pByteCount <= pL->byteCount); - NW_ASSERT((byteIndex + *pByteCount) <= pL->byteCount); - *ppData = NULL; - if (byteIndex < pL->byteCount) { - *ppData = pL->pBuf + byteIndex; - if ((byteIndex + *pByteCount) > pL->byteCount) { - *pByteCount = pL->byteCount - byteIndex; - } - return KBrsrSuccess; - } - return KBrsrFailure; -} - -/* peekOrAdvance: first arg "advance": peek = NW_FALSE, advance = NW_TRUE */ -static -TBrowserStatusCode NW_HTMLP_Lexer_PeekOrAdvanceOffset(NW_Bool advance, - NW_HTMLP_Lexer_t* pL, - NW_Uint32 offsetCharCount, - NW_Uint32* pC, - NW_Bool* pEOF) -{ - NW_Uint32 i; - NW_Uint32 charCount = 0; - NW_Int32 byteCount = 0; - NW_Uint32 crCount = 0; - NW_Uint32 lfCount = 0; - NW_Uint32 charsPastCR = 0; - NW_Uint32 charsPastLF = 0; - NW_Ucs2 c_ucs2; - NW_Bool resetPastCR = 0; - NW_Bool resetPastLF = 0; - - /* it makes no sense to advance by 0 */ - NW_ASSERT((advance == NW_FALSE) || (offsetCharCount > 0)); - - if (NW_HTMLP_Lexer_AtEnd(pL)) { - *pEOF = NW_TRUE; - return KBrsrSuccess; - } - *pEOF = NW_FALSE; - i = pL->readPosition; - do { - /* It is assumed that this func returns UNICODE code points. */ - byteCount = NW_String_readChar(&(pL->pBuf[i]), - &c_ucs2, pL->encoding); - /* This catches NW_String_readChar() reading past end of buffer - and can be removed when the readChar function does proper - error checking (requires passing in buf length). */ - if ((i + byteCount) > pL->byteCount) { - return KBrsrFailure; - } - *pC = c_ucs2; - if (byteCount == -1) { - return KBrsrFailure; - } - if (charCount == offsetCharCount) { - break; - } - charCount++; - charsPastCR++; - charsPastLF++; - if (c_ucs2 == 0xd /* CR */) { - crCount++; - resetPastCR = 1; - charsPastCR = 0; - } else if (c_ucs2 == 0xa /* LF */) { - lfCount++; - resetPastLF = 1; - charsPastLF = 0; - } - i += byteCount; - if (pL->encoding == HTTP_iso_10646_ucs_2 && - i == (pL->byteCount - 1)) - { - *pEOF = NW_TRUE; - break; - } - if (pL->encoding == HTTP_utf_8 && - (i + 3) > pL->byteCount) - { - *pEOF = NW_TRUE; - break; - } - } while (i < pL->byteCount); - if (i >= pL->byteCount) { - *pEOF = NW_TRUE; - } - if (advance == NW_TRUE) { - if (*pEOF == NW_TRUE) { - pL->readPosition = pL->byteCount; - pL->end = NW_TRUE; - } else { - pL->readPosition = i; - } - pL->charPosition += charCount; - pL->lineColumn.crCount += crCount; - pL->lineColumn.lfCount += lfCount; - if (resetPastCR) { - pL->lineColumn.charsSinceLastCR = charsPastCR; - } else { - pL->lineColumn.charsSinceLastCR += charsPastCR; - } - if (resetPastLF) { - pL->lineColumn.charsSinceLastLF = charsPastLF; - } else { - pL->lineColumn.charsSinceLastLF += charsPastLF; - } - } - return KBrsrSuccess; -} - -TBrowserStatusCode NW_HTMLP_Lexer_PeekOffset(NW_HTMLP_Lexer_t* pL, - NW_Uint32 offsetCharCount, - NW_Uint32* pC, - NW_Bool* pEOF) -{ - return NW_HTMLP_Lexer_PeekOrAdvanceOffset(NW_FALSE, pL, - offsetCharCount, pC, pEOF); -} - -TBrowserStatusCode NW_HTMLP_Lexer_AdvanceOffset(NW_HTMLP_Lexer_t* pL, - NW_Uint32 offsetCharCount) -{ - NW_Uint32 c; - NW_Bool eof; - return NW_HTMLP_Lexer_PeekOrAdvanceOffset(NW_TRUE, pL, - offsetCharCount, &c, &eof); -} - -void NW_HTMLP_Lexer_GetPosition(NW_HTMLP_Lexer_t* pL, NW_HTMLP_Lexer_Position_t* pPosition) -{ - pPosition->readPosition = pL->readPosition; - pPosition->charPosition = pL->charPosition; - pPosition->crCount = pL->lineColumn.crCount; - pPosition->lfCount = pL->lineColumn.lfCount; - pPosition->charsSinceLastCR = pL->lineColumn.charsSinceLastCR; - pPosition->charsSinceLastLF = pL->lineColumn.charsSinceLastLF; - pPosition->end = pL->end; -} - -/* Note: Setting the position (similar to seeking in a file) is in general -not possible without reading the characters (usually reading forward) because -character encoding may use a variable numbers of bytes per character. This is -here so that if you have defined a valid interval, then you can reposition to -the beginning of the interval. Setting to the position to a bad value will -not always be caught immediately. Don't forget to also save and set line -and column with position. */ -TBrowserStatusCode NW_HTMLP_Lexer_SetPosition(NW_HTMLP_Lexer_t* pL, NW_HTMLP_Lexer_Position_t* pPosition) -{ - if ((pPosition->readPosition > pL->byteCount) - || (pPosition->end && (pPosition->readPosition != pL->byteCount))) { - return KBrsrFailure; - } - pL->readPosition = pPosition->readPosition; - pL->charPosition = pPosition->charPosition; - pL->lineColumn.crCount = pPosition->crCount; - pL->lineColumn.lfCount = pPosition->lfCount; - pL->lineColumn.charsSinceLastCR = pPosition->charsSinceLastCR; - pL->lineColumn.charsSinceLastLF = pPosition->charsSinceLastLF; - pL->end = pPosition->end; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_HTMLP_Lexer_IsSpace(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch) -{ - NW_Uint32 c; - TBrowserStatusCode e; - NW_Bool eof; - - *pMatch = NW_FALSE; - e = NW_HTMLP_Lexer_Peek(pL, &c, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (eof == NW_TRUE) { - return KBrsrSuccess; - } - /* "space" is defined in HTML to be the following codepoints: - 0x20 (space), 0x9 (tab), 0xc (form feed), 0x200b (zero-width space), - 0xd (cr), 0xa (lf) */ - if ((c == 0x20U) || (c == 0x9U) || (c == 0xcU) - || (c== 0x200bU) || (c == 0xdU) || (c == 0xaU)) { - *pMatch = NW_TRUE; - } - return KBrsrSuccess; -} - -TBrowserStatusCode NW_HTMLP_Lexer_IsCRLF(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch) -{ - NW_Uint32 c; - TBrowserStatusCode e; - NW_Bool eof; - - *pMatch = NW_FALSE; - e = NW_HTMLP_Lexer_Peek(pL, &c, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (eof == NW_TRUE) { - return KBrsrSuccess; - } - /* 0xd (CR), 0xa (LF) */ - if ((c == 0xdU) || (c == 0xaU)) { - *pMatch = NW_TRUE; - } - return KBrsrSuccess; -} - -/* on return: *pMatch == NW_TRUE if character is in [a-zA-Z] */ -TBrowserStatusCode NW_HTMLP_Lexer_IsAsciiLetter(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch) -{ - NW_Uint32 c; - TBrowserStatusCode e; - NW_Bool eof; - - *pMatch = NW_FALSE; - e = NW_HTMLP_Lexer_Peek(pL, &c, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (eof == NW_TRUE) { - return KBrsrSuccess; - } - if ( ( (c >= (NW_Uint32)'a') && (c <= (NW_Uint32)'z') ) - || ( (c >= (NW_Uint32)'A') && (c <= (NW_Uint32)'Z') ) ) { - *pMatch = NW_TRUE; - } - return KBrsrSuccess; -} - -/* on return: *pMatch == NW_TRUE if character is in [0-9] */ -TBrowserStatusCode NW_HTMLP_Lexer_IsAsciiDigit(NW_HTMLP_Lexer_t* pL, NW_Bool* pMatch) -{ - NW_Uint32 c; - TBrowserStatusCode e; - NW_Bool eof; - - *pMatch = NW_FALSE; - e = NW_HTMLP_Lexer_Peek(pL, &c, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (eof == NW_TRUE) { - return KBrsrSuccess; - } - if ((c >= (NW_Uint32)'0') && (c <= (NW_Uint32)'9')) { - *pMatch = NW_TRUE; - } - return KBrsrSuccess; -} - -/* *pMatch is NW_TRUE iff ASCII string matches the text in its encoding */ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiCharCompare(NW_HTMLP_Lexer_t* pL, - NW_Uint8 asciiChar, - NW_Bool* pMatch) -{ - NW_Uint32 c_text; - TBrowserStatusCode e; - NW_Bool eof; - - *pMatch = NW_FALSE; - e = NW_HTMLP_Lexer_Peek(pL, &c_text, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - return e; - } - if (eof == NW_TRUE) { - return KBrsrSuccess; - } - if (c_text == asciiChar) { - *pMatch = NW_TRUE; - } - return KBrsrSuccess; -} - -/* -on entry: no assumptions -on return: If matched string, then *pMatch == NW_TRUE. -.........: If did not match string, then *pMatch == NW_FALSE. -.........: In either case, lexer read position is unchanged -eof handling: if encounters EOF while attempting operation then returns -............: *pMatch == NW_FALSE and KBrsrSuccess, and -............: lexer read position is unchanged -on error return: return value is not KBrsrSuccess, *pMatch == NW_FALSE -...............: and lexer read position is unchanged -*/ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiStringCompare(NW_HTMLP_Lexer_t* pL, - NW_Uint32 asciiCharCount, - const NW_Uint8* pString, - NW_Bool* pMatch) -{ - return NW_HTMLP_Lexer_AsciiStringCompareCase(pL, - asciiCharCount, - pString, - NW_TRUE, - pMatch); -} - -/* perform the same functionality as NW_HTMLP_Lexer_AsciiStringCompareCase - except for the ability to perform both case insensitive check and - case sensitive check -*/ -TBrowserStatusCode NW_HTMLP_Lexer_AsciiStringCompareCase(NW_HTMLP_Lexer_t* pL, - NW_Uint32 asciiCharCount, - const NW_Uint8* pString, - NW_Bool CaseSensitive, - NW_Bool* pMatch) -{ - NW_Uint32 c_text; - NW_Uint32 i; - TBrowserStatusCode e = KBrsrSuccess; - NW_Bool eof; - - *pMatch = NW_FALSE; - NW_ASSERT(asciiCharCount); - for (i = 0; i < asciiCharCount; i++) { - - e = NW_HTMLP_Lexer_PeekOffset(pL, i, &c_text, &eof); - if (BRSR_STAT_IS_FAILURE(e)) { - break; - } - if (eof == NW_TRUE) { - break; - } - if (c_text != pString[i]) { - if (!CaseSensitive) - { - if (c_text + 'A' - 'a' == pString[i]) //Small case to Upper - continue; - if(c_text + 'a' - 'A' == pString[i]) //Upper case to small - continue; - } - break; - } - } - if (i == asciiCharCount) { - *pMatch = NW_TRUE; - } - return e; -} - -/* Sets start, stop, charStart, charStop to current read position. */ -void NW_HTMLP_Interval_Start(NW_HTMLP_Interval_t* pI, NW_HTMLP_Lexer_t* pL) -{ - /* set both start and stop for safety in later use */ - pI->start = pI->stop = pL->readPosition; - pI->charStart = pI->charStop = pL->charPosition; -} - -/* Sets stop to current reader position. */ -void NW_HTMLP_Interval_Stop(NW_HTMLP_Interval_t* pI, NW_HTMLP_Lexer_t* pL) -{ - pI->stop = pL->readPosition; - pI->charStop = pL->charPosition; -} - -/* Returns an estimate of the current line and column position in the text. -It is an estimate because it has to guess at what the intended line ending -sequence is using a count of CR and LF characters. Line and Column indices -are 1-based not 0-based. */ -void -NW_HTMLP_Lexer_GetLineColumn(NW_HTMLP_Lexer_t* pT, NW_Uint32* pLine, - NW_Uint32* pColumn) -{ - NW_Uint32 crCount, lfCount, charsSinceCR, charsSinceLF; - crCount = pT->lineColumn.crCount; - lfCount = pT->lineColumn.lfCount; - charsSinceCR = pT->lineColumn.charsSinceLastCR; - charsSinceLF = pT->lineColumn.charsSinceLastLF; - if (crCount == lfCount) { - /* assume CR, LF, DOS style */ - /* use a bias in favor of CR followed by LF - which will give the correct column for DOS */ - *pLine = lfCount + 1; - *pColumn = charsSinceLF + 1; - } else if (lfCount == 0) { - /* assume CR only, Unix style */ - *pLine = crCount + 1; - *pColumn = charsSinceCR + 1; - } else if (crCount == 0) { - /* assume LF only, Mac style */ - *pLine = lfCount + 1; - *pColumn = charsSinceLF + 1; - } else { - /* an unclear situation so use - thresholds on the ratio to guess */ - NW_Uint32 ratio; - ratio = ((crCount * 100) / lfCount); - if (ratio > 300) {/* more than 3 to 1 crCount to lfCount */ - /* assume CR only, Unix style */ - *pLine = crCount + 1; - *pColumn = charsSinceCR + 1; - } else if (ratio < 33) {/* less than 1 to 3 crCount to lfCount */ - /* assume LF only, Mac style */ - *pLine = lfCount + 1; - *pColumn = charsSinceLF + 1; - } else { - /* assume CR, LF, DOS style */ - /* use a bias in favor of CR, LF sequence (DOS style) - which will give the correct column */ - *pLine = lfCount + 1; - *pColumn = charsSinceLF + 1; - } - } -} -#else - -void FeaRmeNoHTMLParser_htmlp_lexer(){ - int i = 0; - i+=1; -} -#endif /* FEA_RME_NOHTMLPARSER */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/src/htmlp_to_wbxml.cpp --- a/webengine/wmlengine/src/htmlp/src/htmlp_to_wbxml.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1773 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_defs.h" -#include "nw_encoder_wbxmlwriter.h" -#include "CHtmlpParser.h" -#include "nw_htmlp_to_wbxml.h" -#include "nw_htmlp_dict.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_statuscodeconvert.h" -#include "BrsrStatusCodes.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" -#include "nw_encoder_stringtable.h" -#include "nwx_logger.h" -#include "nwx_http_defs.h" - -//lint -save -esym(1401, TSignal::iStatus) not initialized by constructor -#include <flogger.h> -//lint -restore - -/* When encoding is UCS-2, the parser has changed the byte order to -native, however, the WBXML should be written in network (i.e., big -endian) order. The way this is done is to change the byte order -in-place to network order, write the WBXML, and then put the byte -order back to native in-place. */ -static -void -NW_HTMLP_WbxmlEncoder_Ucs2NativeToNetworkByteOrder(NW_Uint32 byteCount, - NW_Uint8* pBuf) -{ - NW_Uint32 i; - NW_Uint16 c_ucs2 = 1; - - if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */ - for (i = 0; i < byteCount; i += 2) { - (void)NW_Mem_memcpy(&c_ucs2, pBuf + i, sizeof(NW_Uint16)); - pBuf[i] = (NW_Uint8)((c_ucs2 >> 8) & 0xff); - pBuf[i+1] = (NW_Uint8)(c_ucs2 & 0xff); - } - } -} - -static -void -NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder(NW_Uint32 byteCount, - NW_Uint8* pBuf) -{ - NW_Uint32 i; - NW_Uint16 c_ucs2 = 1; - - if ((byteCount & 1) == 1) - byteCount--; - if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */ - for (i = 0; i < byteCount; i += 2) { - /* this is a clever trick: pick up bytes in big endian order, - force the result to memory via taking address of result which - will put the 16-bits into native byte order, then copy the - result over the original bytes */ - c_ucs2 = (NW_Uint16)((pBuf[i] << 8) | pBuf[i+1]); - (void)NW_Mem_memcpy(pBuf + i, &c_ucs2, sizeof(NW_Uint16)); - } - } -} - -/* end of line normalization replaces DOS or Mac style end of line -with Unix style end of line. If no normalization is needed, then on -return *ppTextOut == pTextIn (i.e., no malloc was done), otherwise you -need to call NW_Mem_Free(*ppTextOut) when you are done with the output -NOTE: only works for native byte order! -*/ -static -TBrowserStatusCode -NW_HTMLP_WbxmlEncoder_EndOfLineNormalization(NW_Uint32 encoding, - NW_Uint32* pCharCount, - NW_Uint32* pByteCount, - const NW_Uint8* pTextIn, - NW_Uint8** ppTextOut) -{ - NW_Uint32 i; - NW_Uint32 j; - NW_Uint32 elideCharCount; - NW_Uint32 elideByteCount; - NW_Int32 byteCount; - NW_Ucs2 cUCS2; - NW_Uint8 crHit; - NW_Uint8 needsNormalization = 0; - - /* the output is the input unless it must be normalized */ - *ppTextOut = (NW_Uint8*)pTextIn; - - /* scan to count #xD's that need translating */ - elideCharCount = 0; - elideByteCount = 0; - crHit = 0; - for (i = 0; i < *pByteCount; i += byteCount) { - byteCount = NW_String_readChar((NW_Uint8*)&(pTextIn[i]), &cUCS2, encoding); - if (byteCount < 0) { - return KBrsrFailure; - } - /* catch DOS 0xd 0xa eol */ - if (crHit && (cUCS2 == 0xa)) { - elideCharCount++; - elideByteCount += byteCount; - } - if (cUCS2 == 0xd) { - needsNormalization = 1; - crHit = 1; - } else { - crHit = 0; - } - } - if (needsNormalization) { - /* alloc a new string */ - *ppTextOut = (NW_Uint8*)NW_Mem_Malloc(*pByteCount - elideByteCount); - if (*ppTextOut == NULL) { - *ppTextOut = (NW_Uint8*)pTextIn; - return KBrsrOutOfMemory; - } - - /* make a normalized copy of input */ - crHit = 0; - j = 0; - for (i = 0; i < *pByteCount; i += byteCount) { - byteCount = NW_String_readChar((NW_Uint8*)&(pTextIn[i]), &cUCS2, encoding); - if (byteCount < 0) { - NW_Mem_Free(*ppTextOut); - *ppTextOut = (NW_Uint8*)pTextIn; - return KBrsrFailure; - } - /* check that readChar isn't trying to read off end of buffer */ - NW_ASSERT((i + byteCount - 1) < *pByteCount); - if (cUCS2 == 0xd) { - crHit = 1; - if (byteCount == 1) { - (*ppTextOut)[j++] = 0xa; - } else if (byteCount == 2) { - /* this looks odd but takes into account either endianess */ - if (pTextIn[i] == 0xd) { - (*ppTextOut)[j++] = (NW_Uint8)0xa; - (*ppTextOut)[j++] = 0; - } else { - (*ppTextOut)[j++] = 0; - (*ppTextOut)[j++] = (NW_Uint8)0xa; - } - } else { - NW_ASSERT(byteCount <= 2); /* code bug, force debug stop here */ - NW_Mem_Free(*ppTextOut); - *ppTextOut = (NW_Uint8*)pTextIn; - return KBrsrFailure; - } - } else { - if (!(crHit && (cUCS2 == 0xa))) { - (void)NW_Mem_memcpy(&((*ppTextOut)[j]), &(pTextIn[i]), byteCount); - j += byteCount; - } - crHit = 0; - } - } - *pByteCount -= elideByteCount; - *pCharCount -= elideCharCount; - } - return KBrsrSuccess; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_New(NW_Uint32 publicID, - NW_Uint32 encoding, void** ppV) -{ - NW_WBXML_Dictionary_t* pDictionary; - NW_HTMLP_WbxmlEncoder_t** ppTE = (NW_HTMLP_WbxmlEncoder_t**)ppV; - *ppTE = (NW_HTMLP_WbxmlEncoder_t*)NW_Mem_Malloc(sizeof(NW_HTMLP_WbxmlEncoder_t)); - if (*ppTE == NULL) { - return KBrsrOutOfMemory; - } - (*ppTE)->lastTagTokenIndex = 0; - (*ppTE)->publicID = publicID; - (*ppTE)->encoding = encoding; - (*ppTE)->pE = (NW_WBXML_Writer_t *)NW_Mem_Malloc(sizeof(NW_WBXML_Writer_t)); - if ((*ppTE)->pE == NULL) { - NW_Mem_Free(*ppTE); - *ppTE = NULL; - return KBrsrOutOfMemory; - } - /* Note that we only have access to one dictionary and we - should really have two: one for tags and one for attributes. */ - pDictionary = NW_WBXML_Dictionary_getByPublicId((*ppTE)->publicID); - - NW_WBXML_Writer_Initialize((*ppTE)->pE, - 0 /* byte count */, - NULL, NULL, /* no mem needed for sizing */ - pDictionary, pDictionary, - NULL, NULL, NULL, NULL, NULL, - NW_TRUE /* do sizing only */); - return KBrsrSuccess; -} - -static -void NW_HTMLP_WbxmlEncoder_SetToWrite( - NW_HTMLP_WbxmlEncoder_t* pTE, - NW_Uint32 byteLength, NW_Uint8* pBuf, - NW_WBXML_Writer_GrowBuf_t growBufCallback) -{ - if( (pTE->publicID == NW_xhtml_1_0_PublicId) && - ( CXML_Additional_Feature_Supprted() & CXML_DTD_SUPPORT_ON) ) - { - NW_Encoder_StringTable_t* strTable = NW_Encoder_StringTable_new(); - - - NW_WBXML_Writer_Initialize(pTE->pE, - byteLength, pBuf, - growBufCallback, - pTE->pE->pTagDictionary, - pTE->pE->pAttributeDictionary, - NW_Encoder_StringTable_getStringTableOffset, - NW_Encoder_StringTable_addToStringTable, - strTable, - NW_Encoder_StringTable_StringTableIterateInit, - NW_Encoder_StringTable_StringTableIterateNext, - NW_FALSE /* do sizing only */); - } - else - { - NW_WBXML_Writer_Initialize(pTE->pE, - byteLength, pBuf, - growBufCallback, - pTE->pE->pTagDictionary, - pTE->pE->pAttributeDictionary, - NULL, NULL, NULL, NULL, NULL, - NW_FALSE /* don't do sizing, write */); -} -} - -static -void NW_HTMLP_WbxmlEncoder_Delete(void* pV) -{ - if (pV) - { - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - NW_Mem_Free(pE); /* note that this doesn't free WBXML buf and string table*/ - NW_Mem_Free(pTE); -} -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_BeginDocumentCB(NW_HTMLP_Lexer_t* pL, - void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - - NW_REQUIRED_PARAM(pL); - - /* Note: We do not build a string table because it isn't clear if - it is worthwhile. */ - - return StatusCodeConvert(NW_WBXML_Writer_Header(pE, 3 /* wbxml version */, - pTE->publicID, pTE->encoding, - 0 /* string table byte count */)); -} - -// The function writes the start of tag for elements name in the dictionary -// as well as non DTD elements. If the element is in the HTML dictionary then -// ASCII encoding is passed and corresponding token is written the WBXML buffer. -// If it is non dictionary element name then actual encoding is passed and WBXML -// encoder takes care of this. Note, inside the HTML parser coding is always -// UCs-2 so it is safe to assume charcount = bytecount/2. - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_StartTagCB( - NW_Uint8 byteCount, - const NW_Uint8* pBuf, - void* pV, NW_Bool isLiteral) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - TBrowserStatusCode s; - - if(isLiteral == NW_FALSE) - { - s = StatusCodeConvert(NW_WBXML_Writer_TagString(pE, HTTP_us_ascii, byteCount, - byteCount, (NW_Uint8*)pBuf, - &(pTE->lastTagTokenIndex))); - } - else - { - // - //For handling the literals or non dictionary elements. - // - s = StatusCodeConvert(NW_WBXML_Writer_TagString(pE, HTTP_iso_10646_ucs_2, - byteCount/2, byteCount, (NW_Uint8*)pBuf, - &(pTE->lastTagTokenIndex))); - } - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - /* default to content but erase if see empty tag end */ - return StatusCodeConvert(NW_WBXML_Writer_TagSetContentFlag(pE, pTE->lastTagTokenIndex)); -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_AttributeStartCB(void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - return StatusCodeConvert(NW_WBXML_Writer_TagSetAttributesFlag(pE, pTE->lastTagTokenIndex)); -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_AttributeNameAndValueCB( - NW_HTMLP_Lexer_t* pL, - const NW_HTMLP_Interval_t* pI_name, - NW_Bool missingValue, - const NW_HTMLP_Interval_t* pI_value, - void* pV, - NW_Uint32* cp_cnt) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - NW_Uint32 length; - NW_Uint32 nameLength; - NW_Uint8* pName; - NW_Uint32 valueByteLength; - NW_Uint32 valueCharCount; - NW_Uint8* pValue; - NW_Uint8* pValueCopy = NULL; - NW_Uint32 i; - NW_Int32 bytesRead; - NW_Ucs2 c_ucs2; - TBrowserStatusCode s; - - if (!NW_HTMLP_Interval_IsWellFormed(pI_name)) { - return KBrsrFailure; - } - - /* var name setup */ - length = NW_HTMLP_Interval_ByteCount(pI_name); - nameLength = length; /* byte count */ - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pI_name->start, - &nameLength, &pName); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (nameLength != length) { - return KBrsrFailure; - } - nameLength = NW_HTMLP_Interval_CharCount(pI_name); /* char count */ - - /* force attribute name to lower case for A-Z only, - this alters the doc in-place */ - - /* FUTURE: unfortunately, there is no writeChar to go with the readChar - so the work around until there is better encoding support is to only - work with ASCII, 8859-1, UTF-8 and UCS-2. In these encodings we can - handle writing because only UCS-2 uses two bytes for an ASCII char. */ - NW_ASSERT((pL->encoding == HTTP_us_ascii) - || (pL->encoding == HTTP_iso_8859_1) - || (pL->encoding == HTTP_utf_8) - || (pL->encoding == HTTP_iso_10646_ucs_2)); - if (!((pL->encoding == HTTP_us_ascii) - || (pL->encoding == HTTP_iso_8859_1) - || (pL->encoding == HTTP_utf_8) - || (pL->encoding == HTTP_iso_10646_ucs_2))) { - return KBrsrFailure; - } - for (i = 0; i < length;) { - bytesRead = NW_String_readChar(&(pName[i]), &c_ucs2, pL->encoding); - if (bytesRead == -1) { - return KBrsrFailure; - } - /* force doc ascii uppercase to lowercase */ - if ((c_ucs2 >= (NW_Ucs2)'A') && (c_ucs2 <= (NW_Ucs2)'Z')) { - c_ucs2 += 0x20; /* offset in ascii from upper to lower */ - } - if (pL->encoding == HTTP_iso_10646_ucs_2) { - NW_ASSERT(bytesRead == 2); - /* accomodate either endianness */ - if (pName[i] == 0) { - pName[i+1] = (NW_Uint8)c_ucs2; - } else { - pName[i] = (NW_Uint8)c_ucs2; - } - } else { - NW_ASSERT(bytesRead == 1); - NW_ASSERT((pL->encoding == HTTP_us_ascii) - || (pL->encoding == HTTP_iso_8859_1) - || (pL->encoding == HTTP_utf_8)); - pName[i] = (NW_Uint8)c_ucs2; - } - i += bytesRead; - } - - /* value setup */ - if (missingValue == NW_TRUE) { - /* assume this attribute is a boolean and force the value - to be the same as the attribute name */ - pI_value = pI_name; - } - length = NW_HTMLP_Interval_ByteCount(pI_value); - valueByteLength = length; - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pI_value->start, - &valueByteLength, &pValue); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (valueByteLength != length) { - return KBrsrFailure; - } - valueCharCount = NW_HTMLP_Interval_CharCount(pI_value); - if (pL->encoding == HTTP_iso_10646_ucs_2) { - // in the case that name and value are same thing (e.g "noshade") - // we have to make an extra copy of pValue, since only pValue needs to - // be converted to big endian - if (pValue == pName) - { - pValueCopy = (NW_Byte*)NW_Mem_Malloc(valueByteLength); - if (pValueCopy == NULL) - return KBrsrOutOfMemory; - (void)NW_Mem_memcpy(pValueCopy, pValue, valueByteLength); - pValue = pValueCopy; - } - NW_HTMLP_WbxmlEncoder_Ucs2NativeToNetworkByteOrder(valueByteLength, - pValue); - } - - // !!! Note, pValue is epected to be UCS2 and big endian!!! - // - // The rest of the code you see around here that checks the encoding is code - // that has not been cleaned up properly since the conversion to always use - // UCS2. - // - // Make a copy of the value, if it's not already a copy, and remove - // extraneous CRs and LFs. - if (!pValueCopy) { - pValueCopy = (NW_Byte*)NW_Mem_Malloc(valueByteLength); - if (pValueCopy == NULL) - return KBrsrOutOfMemory; - (void)NW_Mem_memcpy(pValueCopy, pValue, valueByteLength); - pValue = pValueCopy; - } - NW_Ucs2* pSrc = (NW_Ucs2*)pValue; - NW_Ucs2* pDst = pSrc; - NW_Uint32 newCharCount = 0; - for (i = 0; i < valueCharCount; i++) { - c_ucs2 = *pSrc; - // Check for big endian CRs and LFs. - if ((c_ucs2 != 0x0d00) && (c_ucs2 != 0x0a00)) { - *pDst++ = c_ucs2; - newCharCount++; - } - pSrc++; - } - valueCharCount = newCharCount; - // Byte count is always twice the char count since chars are always UCS2. - valueByteLength = valueCharCount << 1; - - // !!! Note, here we expect pName to be little Endian and pValue to be big endian!!! - s = StatusCodeConvert(NW_WBXML_Writer_AttributeAndValue2(pE, pTE->encoding, nameLength, - pName, valueCharCount, - valueByteLength, pValue, cp_cnt)); - if (BRSR_STAT_IS_FAILURE(s)) { - goto finish_attrNameVal; - } - if (pL->encoding == HTTP_iso_10646_ucs_2) { - NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder(valueByteLength, - pValue); - } - s = KBrsrSuccess; -finish_attrNameVal: - if (pValueCopy != 0) - NW_Mem_Free(pValueCopy); - return s; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_AttributesEndCB(NW_Uint32 attributeCount, - void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - TBrowserStatusCode s = KBrsrSuccess; - /* if there were any attributes, then must write end token */ - if (attributeCount) { - s = StatusCodeConvert(NW_WBXML_Writer_End(pE)); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - } - return s; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_CoreTextHandler(NW_Uint32 encoding, - NW_Uint32 charCount, - NW_Uint32 byteLength, - NW_Uint8* pText, - NW_WBXML_Writer_t* pE) -{ - NW_Uint8* pNormalizedText; - TBrowserStatusCode s; - - s = NW_HTMLP_WbxmlEncoder_EndOfLineNormalization(encoding, - &charCount, - &byteLength, - pText, - &pNormalizedText); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (encoding == HTTP_iso_10646_ucs_2) { - NW_HTMLP_WbxmlEncoder_Ucs2NativeToNetworkByteOrder(byteLength, - pNormalizedText); - } - s = StatusCodeConvert(NW_WBXML_Writer_Text(pE, encoding, byteLength, pNormalizedText)); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (pText == pNormalizedText) { - if (encoding == HTTP_iso_10646_ucs_2) { - NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder(byteLength, - pNormalizedText); - } - } else { - NW_Mem_Free(pNormalizedText); - } - return KBrsrSuccess; -} - -/* - * Handles the special case of all NULLs in the content. All NULLs would cause - * false code page switch. It is important that this function not filter out - * whitespace chars (0x09, 0x0A, 0x0D, 0x20, ...) as it had done in the past - * by filtering out all control chars (<= 0x20). It only needs to check for - * NULLs, which is the only thing that can cause a code-page switch. - */ -static void NW_HTMLP_SPL_Handle( - NW_Uint32 charLength, NW_Ucs2* pContent, NW_Bool* onlySplChar) -{ - *onlySplChar = NW_TRUE; - for (NW_Uint32 i = 0; i < charLength; i++, pContent++) - { - if (*pContent) - { - *onlySplChar = NW_FALSE; - break; - } - } - return; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_ContentCB( - NW_HTMLP_Lexer_t* pL, - const NW_HTMLP_Interval_t* pI_content, - void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - TBrowserStatusCode s; - NW_Uint32 length; - NW_Uint32 byteLength; - NW_Uint32 charCount; - NW_Uint8* pContent; - NW_Bool onlySplChar; - - if (!NW_HTMLP_Interval_IsWellFormed(pI_content)) { - return KBrsrFailure; - } - length = pI_content->stop - pI_content->start; - byteLength = length; - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pI_content->start, - &byteLength, - &pContent); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (byteLength != length) { - return KBrsrFailure; - } - - /* A NULL char in the contents can sometimes cause false code-page switch. - * Therefore, do not write them in the WBXML buffer. - */ - NW_ASSERT((byteLength & 0x0001) == 0); // byte count must be even (always UCS2) - NW_HTMLP_SPL_Handle((byteLength >> 1), (NW_Ucs2*)pContent, &onlySplChar); - - if(onlySplChar == NW_TRUE) - { - return KBrsrSuccess; - } - - charCount = pI_content->charStop - pI_content->charStart; - - - return NW_HTMLP_WbxmlEncoder_CoreTextHandler(pL->encoding, - charCount, - byteLength, - pContent, - pE); -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_EndTagCB( - NW_Uint8 asciiCharCount, - const NW_Uint8* pBuf, - NW_Bool emptyTag, - void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - TBrowserStatusCode s; - NW_REQUIRED_PARAM(asciiCharCount); - NW_REQUIRED_PARAM(pBuf); - if (emptyTag) { - s = StatusCodeConvert(NW_WBXML_Writer_TagClearContentFlag(pE, pTE->lastTagTokenIndex)); - } else { - s = StatusCodeConvert(NW_WBXML_Writer_End(pE)); - } - return s; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_CdataCB( - NW_HTMLP_Lexer_t* pL, - const NW_HTMLP_Interval_t* pI_cdata, - void* pV) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - NW_Uint8* pText; - NW_Uint8* pQuotedText; - NW_Uint8* pSrc; - NW_Uint8* pDest; - NW_Uint32 encoding = pL->encoding; - NW_Uint32 length; - NW_Uint32 byteLength; - NW_Uint32 charCount; - NW_Uint32 ampCount; - NW_Uint32 i; - NW_Uint32 j; - NW_Ucs2 cUCS2; - TBrowserStatusCode s; - - /* code only supports the following charset values */ - NW_ASSERT((encoding == HTTP_us_ascii) - || (encoding == HTTP_iso_8859_1) - || (encoding == HTTP_utf_8) - || (encoding == HTTP_iso_10646_ucs_2)); - - charCount = pI_cdata->charStop - pI_cdata->charStart; - length = pI_cdata->stop - pI_cdata->start; - if (length < 1) { - return KBrsrSuccess; - } - byteLength = length; - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pI_cdata->start, - &byteLength, - &pText); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (byteLength != length) { - return KBrsrFailure; - } - - /* Cdata is not supposed to have any entity expansion done on it. - Since we don't alter the original document text in general, we - have done the entity expansion outside of cXML. Therefore, we - must quote any ampersands in the Cdata to prevent later entity - expansion. */ - - /* count ampersands */ - pSrc = pText; - ampCount = 0; - for (i = 0; i < charCount; i++) { - j = (NW_Uint32)NW_String_readChar(pSrc, &cUCS2, pL->encoding); - pSrc += j; - /* don't need to check j < 1, text has already been validated */ - if (cUCS2 == '&') { - ampCount++; - } - } - - pQuotedText = pText; - if (ampCount) { - /* allocate a new buffer - - need incremental length for: & => &amp; - start with single byte charset value */ - ampCount *= 4; - /* double for ucs2 */ - if (pL->encoding == HTTP_iso_10646_ucs_2) { - ampCount *= 2; - } - pQuotedText = (NW_Uint8*)NW_Mem_Malloc(byteLength + ampCount); - if (pQuotedText == NULL) { - return KBrsrOutOfMemory; - } - - /* copy and quote ampersands */ - pSrc = pText; - pDest = pQuotedText; - for (i = 0; i < charCount; i++) { - j = (NW_Uint32)NW_String_readChar(pSrc, &cUCS2, encoding); - /* don't need to check for byteCount < 1, text has already been - validated */ - NW_Mem_memcpy(pDest, pSrc, j); - pSrc += j; - pDest += j; - if (cUCS2 == '&') { - if (encoding == HTTP_iso_10646_ucs_2) { - /* double byte */ - *((NW_Uint16*)pDest) = 'a'; - *((NW_Uint16*)(pDest + 2)) = 'm'; - *((NW_Uint16*)(pDest + 4)) = 'p'; - *((NW_Uint16*)(pDest + 6)) = ';'; - pDest += 8; - } else { - /* single byte encodings */ - NW_Mem_memcpy(pDest, "amp;", 4); - pDest += 4; - } - } - } - byteLength += ampCount; - if (pL->encoding == HTTP_iso_10646_ucs_2) { - charCount += (ampCount / 2); - } else { - charCount = byteLength; - } - } - - /* output the text */ - s = NW_HTMLP_WbxmlEncoder_CoreTextHandler(pL->encoding, - charCount, - byteLength, - pQuotedText, - pE); - if (pQuotedText != pText) { - NW_Mem_Free(pQuotedText); - } - return s; -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_PiFormCB(NW_HTMLP_Lexer_t* pL, - const NW_HTMLP_Interval_t* pPITarget, - const NW_HTMLP_Interval_t* pArguments, - void* pV, - NW_Uint32* cp_cnt) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*)pV; - NW_WBXML_Writer_t* pE = pTE->pE; - NW_Uint32 length; - NW_Uint32 pitargetByteCount; - NW_Uint32 pitargetCharCount; - NW_Uint8* pPITargetData; - NW_Uint32 argumentsByteCount; - NW_Uint32 argumentsCharCount; - NW_Uint8* pArgumentsData; - TBrowserStatusCode s; - - /* prepare PITarget */ - length = NW_HTMLP_Interval_ByteCount(pPITarget); - if (length < 1) { - return KBrsrSuccess; - } - pitargetByteCount = length; - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pPITarget->start, - &length, - &pPITargetData); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (pitargetByteCount != length) { - return KBrsrFailure; - } - pitargetCharCount = NW_HTMLP_Interval_CharCount(pPITarget); - - /* prepare Arguements */ - argumentsByteCount = argumentsCharCount = 0; - pArgumentsData = NULL; - length = NW_HTMLP_Interval_ByteCount(pArguments); - if (length > 0) { - argumentsByteCount = length; - s = NW_HTMLP_Lexer_DataAddressFromBuffer(pL, pArguments->start, - &length, - &pArgumentsData); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (argumentsByteCount != length) { - return KBrsrFailure; - } - argumentsCharCount = NW_HTMLP_Interval_CharCount(pArguments); - } - - /* start PI sequence */ - s = StatusCodeConvert(NW_WBXML_Writer_PI(pE)); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (pL->encoding == HTTP_iso_10646_ucs_2) { - NW_HTMLP_WbxmlEncoder_Ucs2NativeToNetworkByteOrder(argumentsByteCount, - pArgumentsData); - } - s = StatusCodeConvert(NW_WBXML_Writer_AttributeAndValue2(pE, pTE->encoding, - pitargetCharCount, pPITargetData, - argumentsCharCount, - argumentsByteCount, pArgumentsData, cp_cnt)); - if (BRSR_STAT_IS_FAILURE(s)) { - return s; - } - if (pL->encoding == HTTP_iso_10646_ucs_2) { - NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder(argumentsByteCount, - pArgumentsData); - } - return StatusCodeConvert(NW_WBXML_Writer_End(pE)); -} - -static -TBrowserStatusCode NW_HTMLP_WbxmlEncoder_EndDocumentCB(NW_HTMLP_Lexer_t* pL, - TBrowserStatusCode e, - void* pV) -{ - /* When debugging, this func provides a place to capture the final WBXML. */ - NW_REQUIRED_PARAM(pL); - - if (e != KBrsrSuccess) - { - return e; - } - - NW_REQUIRED_PARAM(pV); - return KBrsrSuccess; -} - -static -void NW_HTHMLP_StrTbl(NW_HTMLP_EventCallbacks_t* eventCBs, - void** WBXMLEncStrTbl) -{ - NW_HTMLP_WbxmlEncoder_t* pTE = (NW_HTMLP_WbxmlEncoder_t*) eventCBs->pClientPointer; - - //Keep the copy of the WBXML string table, so that it can be added to the - //DOM later. - if( ( (NW_Bool) (CXML_Additional_Feature_Supprted() & CXML_DTD_SUPPORT_ON) ) && - (pTE->publicID == NW_xhtml_1_0_PublicId) ) - { - NW_Uint32 stringTableByteCount = 0; - NW_Encoder_StringTable_t* strTable = (NW_Encoder_StringTable_t*) - ((NW_HTMLP_WbxmlEncoder_t*)eventCBs->pClientPointer)->pE->pStringTableObject; - if(strTable) - { - stringTableByteCount = NW_Encoder_StringTable_getTotalBytes(strTable); - if( (stringTableByteCount == 0) || (WBXMLEncStrTbl == NULL) ) - { - //Empty Table - NW_Encoder_StringTable_delete(strTable); - if(WBXMLEncStrTbl) - { - *WBXMLEncStrTbl = NULL; - } - } - else - { - if(WBXMLEncStrTbl) - { - *WBXMLEncStrTbl = (void*) strTable; - } - }//end else - }//end if(strTable) - else - { - if(WBXMLEncStrTbl) - { - *WBXMLEncStrTbl = NULL; - } - } - }//end if((NW_Bool) CXML_Additional_Feature_Supprted() ) - else - { - if(WBXMLEncStrTbl) - { - *WBXMLEncStrTbl = NULL; - } - } - return; -}//end NW_HTHMLP_StrTbl() - - -// install the event callbacks for real parsing -static void installEventCBs(NW_HTMLP_EventCallbacks_t* eventCBs) -{ - eventCBs->beginDocumentCB = NW_HTMLP_WbxmlEncoder_BeginDocumentCB; - eventCBs->endDocumentCB = NW_HTMLP_WbxmlEncoder_EndDocumentCB; - eventCBs->startTagCB = NW_HTMLP_WbxmlEncoder_StartTagCB; - eventCBs->endTagCB = NW_HTMLP_WbxmlEncoder_EndTagCB; - eventCBs->contentCB = NW_HTMLP_WbxmlEncoder_ContentCB; - eventCBs->cdataCB = NW_HTMLP_WbxmlEncoder_CdataCB; - eventCBs->attributeStartCB = NW_HTMLP_WbxmlEncoder_AttributeStartCB; - eventCBs->attributeNameAndValueCB - = NW_HTMLP_WbxmlEncoder_AttributeNameAndValueCB; - eventCBs->attributesEndCB = NW_HTMLP_WbxmlEncoder_AttributesEndCB; - eventCBs->piFormCB = NW_HTMLP_WbxmlEncoder_PiFormCB; -} - -static TBrowserStatusCode NW_HTHMLP_RealParse(CHtmlpParser * parser, - NW_Bool docComplete, void** WBXMLEncStrTbl); - -TBrowserStatusCode NW_HTMLP_NotifyDocComplete(void * pParser, NW_Uint32* encoding, - void** WBXMLEncStrTbl, NW_HTMLP_NotifyDocCompleteCB* callBack, void* callBackContext) - { - CHtmlpParser* parser = (CHtmlpParser *) pParser; - NW_Uint8* pWbxmlNewBuf = NULL; - NW_Buffer_t* residueWbxml = NULL; - TBrowserStatusCode s = KBrsrSuccess; - - // If parser is NULL nothing else needs to be done. - if (parser == NULL) - { - return s; - } - - // If the previous wbxml buffer was not generated (meaning - // the real parsing never started) or it needs to fix up an unterminated comment then - // parse it (again) and extract the convert wbxml. - if (!parser->getPreviousValidOutput() || parser->iTrackingUnTerminatedComment) - { - s = NW_HTHMLP_RealParse(parser, NW_TRUE, WBXMLEncStrTbl); - - if (BRSR_STAT_IS_SUCCESS(s) && parser->iWbxmlWriter->index) - { - pWbxmlNewBuf = (NW_Uint8*)NW_Mem_Malloc(parser->iWbxmlWriter->index); - if (pWbxmlNewBuf != NULL) - { - // Copy data from pWbxmlBuf to pWbxmlNewBuf. - (void)NW_Mem_memcpy(pWbxmlNewBuf, parser->iWbxmlWriter->pBuf, parser->iWbxmlWriter->index); - - // Free pWbxmlBuf. - NW_Mem_Free(parser->iWbxmlWriter->pBuf); - residueWbxml = (NW_Buffer_t*)NW_Mem_Malloc(sizeof(NW_Buffer_t)); - residueWbxml->data = pWbxmlNewBuf; - residueWbxml->length = parser->iWbxmlWriter->index; - *encoding = parser->getLexer()->encoding; - } - else - { - s = KBrsrOutOfMemory; - } - } - } - - if (BRSR_STAT_IS_SUCCESS(s) && residueWbxml) - { - s = (*callBack)(callBackContext, residueWbxml, *encoding, - parser->getCodePageSwitchCount(), parser->getLastValid(), *WBXMLEncStrTbl); - - residueWbxml = NULL; - } - - // Release parser - NW_HTMLP_EventCallbacks_t* eventCBs = parser->getEventCallbacks(); - if (eventCBs) - { - if (eventCBs->pClientPointer) - { - NW_Mem_Free(((NW_HTMLP_WbxmlEncoder_t*)(eventCBs->pClientPointer))->pE); - } - NW_Mem_Free(eventCBs->pClientPointer); - } - delete parser; - return s; - } - -TBrowserStatusCode HTMLP_HtmlToWbxml(NW_Buffer_t* pInBuf, - NW_Uint32 encoding, NW_Uint8 byteOrder, - NW_Buffer_t** ppOutBuf, NW_Uint32* pLine, - NW_Uint32 publicID, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Bool consumeSpaces, - NW_Bool needCharsetDetect, - void* charsetConvertContext, - NW_HTMLP_CharsetConvertCB* charsetConvertCallback, - NW_Bool isScript) -{ - NW_Int32 lastValid = 0; - NW_Uint32 cp_count = 0; - void* pParser = 0; - return NW_HTMLP_SegToWbxml(pInBuf, encoding, byteOrder, ppOutBuf, pLine, publicID, elementCount, - pElementDictionary, consumeSpaces, needCharsetDetect, NW_TRUE, NW_TRUE, &lastValid, &pParser, &cp_count, - charsetConvertContext, charsetConvertCallback, NULL, isScript); -} - - -TBrowserStatusCode NW_HTMLP_SegToWbxml(NW_Buffer_t* pInBuf, - NW_Uint32 encoding, - NW_Uint8 byteOrder, - NW_Buffer_t** ppOutBuf, - NW_Uint32* pLine, - NW_Uint32 publicID, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Bool consumeSpaces, - NW_Bool needCharsetDetect, /* need to detect charset or not */ - NW_Bool isFirstSegment, /* is this the first segment of a document? */ - NW_Bool isLastSegment, /* is this the last segment of a document? */ - NW_Int32 *pLastValid, - void** ppParser, - NW_Uint32 *pCodePageSwitchCount, - void* charsetConvertContext, - NW_HTMLP_CharsetConvertCB* charsetConvertCallback, - void** WBXMLEncStrTbl, - NW_Bool isScript) -{ - NW_Uint8* pWbxmlBuf = NULL; // wbxml buffer as output - NW_Uint32 wbxmlBufLength = 0; // wbxml buffer's length - NW_Uint32 allocatedLength = 0; - TBrowserStatusCode s = KBrsrSuccess; - NW_Buffer_t* lastTextBuff = NULL; // last piece of text left from previous chunck - NW_Uint32 lastTextBuffLen = 0; // length of lastTextBuff - NW_Buffer_t* previousValidOutput = NULL; // previously generated wbxml buffer, not including the manually added close tags - NW_Uint32 previousValidOutputLen = 0; // length of previousValidOutput - NW_Buffer_t* visitedHeadText = NULL; // concatinated web content segment that has been visited by fake parse - // should be original content (without charconv) - CHtmlpParser * parser = NULL; // the parser instance that can be reused for parsing continuous chunks - NW_Bool in_parse = NW_FALSE; - NW_Bool freeNeeded = NW_FALSE; - NW_HTMLP_EventCallbacks_t* eventCBs = NULL; - NW_Int32 numUnconvertible, indexFirstUnconvertible; - NW_Buffer_t * origBuf = NULL; // left bytes + incoming buffer (before charconv) - NW_Buffer_t* newInBuf = NULL; // left bytes + incoming buffer (after charconv) - NW_Uint8* docStartAddress = NULL; // web content segment that parser needs to parse - // i.e. previousLeftText + left bytes + incoming buffer (after charconv) - NW_Uint32 docByteLength = 0; // web content segment length - NW_Uint32 numLeftBytes = 0; // indicate if number of bytes left from incomplete multi-byte character - - NW_Byte* restoreInData = pInBuf->data; - *pLine = 0; - *ppOutBuf = NULL; - - if(WBXMLEncStrTbl) - { - *WBXMLEncStrTbl = NULL; - } - - - NW_ASSERT(ppParser); - - // make sure sender sends along charsetConvertCallback and charsetConvertContext - // if encoding is not ucs2 (in this case charset transcoding is needed - // or need charset detection (in this case charset determination is needed - if (encoding != HTTP_iso_10646_ucs_2 || needCharsetDetect) - { - NW_ASSERT(charsetConvertCallback); - NW_ASSERT(charsetConvertContext); - } - - if ((pInBuf == NULL) || (ppOutBuf == NULL) || (pLine == NULL)) { - return KBrsrBufferTooSmall; - } - if ((pInBuf->length == 0) || (pInBuf->data == NULL)) { - return KBrsrBufferTooSmall; - } - - origBuf = pInBuf; // initialize origBuf to pInBuf, later may need to insert left bytes - - if (!isFirstSegment) - { - // if it's not the first segement, make sure that parser instance is passed in - NW_ASSERT(*ppParser); - parser = (CHtmlpParser *) *ppParser; - - // since content handler does not know if charset is detected by parser from previous chunk, - // check if parser's iOrigEncoding is set. - if (needCharsetDetect && parser->iOrigEncoding != -1) - { - encoding = parser->iOrigEncoding; - needCharsetDetect = NW_FALSE; - } - - /* get the last text from previous segment and append it the current segment */ - lastTextBuff = parser->getLastTextBuf(); - if (lastTextBuff) - lastTextBuffLen = lastTextBuff->length; - previousValidOutput = parser->getPreviousValidOutput(); - if (previousValidOutput) - previousValidOutputLen = previousValidOutput->length; - - - // if there were some bytes left by the incomplete character, insert them in the origBuf - if (parser->iLeftBytes != NULL) - { - - origBuf = (NW_Buffer_t *)NW_Buffer_New(pInBuf->length + parser->iLeftBytes->length); - if (origBuf == NULL) - { - s = KBrsrOutOfMemory; - goto handle_error; - } - NW_Mem_memcpy(origBuf->data, parser->iLeftBytes->data, parser->iLeftBytes->length); - NW_Mem_memcpy(origBuf->data + 1, pInBuf->data, pInBuf->length); - origBuf->length = pInBuf->length + parser->iLeftBytes->length; - NW_Buffer_Free(parser->iLeftBytes); - parser->iLeftBytes = NULL; - } - } - - // if needed, do the charset conversion - newInBuf = origBuf; // initialize outBuf to same as origBuf, i.e. left bytes - - if (encoding == HTTP_iso_10646_ucs_2) - { - if (origBuf->length & 1) - { - origBuf->length--; - numLeftBytes = 1; - } - } - - // now try to convert the web content buffer to UCS2 encoded content - if (encoding != HTTP_iso_10646_ucs_2) - { - // to get rid of BOM for encodings other than UCS2 - s = NW_HTMLP_HandleBOM(encoding, byteOrder, &(origBuf->data), &(origBuf->length)); - if (s != KBrsrSuccess) - goto handle_error; - - numUnconvertible = 0; - indexFirstUnconvertible = -1; - - s = charsetConvertCallback(charsetConvertContext, 0, 0, origBuf, &numUnconvertible, - &indexFirstUnconvertible, &newInBuf, &encoding); - byteOrder = NW_BYTEORDER_BIG_ENDIAN; - if (s != KBrsrSuccess) - { - // if encoding was indicated as utf-8 but the conversion to UCS2 failed, that probably means - // it's actually Latin-1 (a lot of Finish pages are in this case, so an assumption is made - // and content is converted from Latin-1 to UCS2. - if (encoding == HTTP_utf_8 || s == KBrsrMvcConverterNotFound) - { - if (s == KBrsrMvcConverterNotFound) - { - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, charsetConvertCallback returns ConverterNotFound status while converting from encoding: %x", encoding); - } - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, failed while converting from encoding: %x, now treat text as latin-1 and retry.", encoding); - encoding = HTTP_iso_8859_1; - s = charsetConvertCallback(charsetConvertContext, 0, 0, origBuf, &numUnconvertible, - &indexFirstUnconvertible, &newInBuf, &encoding); - byteOrder = NW_BYTEORDER_BIG_ENDIAN; - if (s != KBrsrSuccess) - goto handle_error; - else if (parser) - { - parser->iOrigEncoding = HTTP_iso_8859_1; - } - } - else - { - goto handle_error; - } - } - NW_ASSERT(newInBuf); - - // check for unconvertable bytes for possible last imcomplete character at end of chunk - if (numUnconvertible && indexFirstUnconvertible >= (NW_Int32)(origBuf->length-2)) - { - //pInBuf->length -= numUnconvertible; - numLeftBytes = numUnconvertible; - } - } - - if (origBuf != pInBuf && origBuf != newInBuf) - { - NW_Buffer_Free(origBuf); - origBuf = NULL; - } - - // this time it will perform the byte conversion - s = NW_HTMLP_HandleBOM(HTTP_iso_10646_ucs_2, byteOrder, &(newInBuf->data), &(newInBuf->length)); - if (s != KBrsrSuccess) - goto handle_error; - - docByteLength = newInBuf->length + lastTextBuffLen; - if (lastTextBuff) - { - docStartAddress = (NW_Uint8*)NW_Mem_Malloc(docByteLength); - if (!docStartAddress) - { - s = KBrsrOutOfMemory; - goto handle_error; - } - freeNeeded = NW_TRUE; - (void)NW_Mem_memcpy(docStartAddress, lastTextBuff->data, lastTextBuff->length); - (void)NW_Mem_memcpy(docStartAddress + lastTextBuff->length, newInBuf->data, newInBuf->length); - } - else - { - docStartAddress = newInBuf->data; - } - - /* malloc the output buffer */ - *ppOutBuf = (NW_Buffer_t*)NW_Mem_Malloc(sizeof(NW_Buffer_t)); - if (*ppOutBuf == NULL) { - s = KBrsrOutOfMemory; - goto handle_error; - } - - (*ppOutBuf)->length = 0; - (*ppOutBuf)->allocatedLength = 0; - (*ppOutBuf)->data = NULL; - - /* Create new buffer to write to, only when real parsing start */ - if (!needCharsetDetect) - { - /* ASSUMPTION: the wbxmlBufLength is <= the document length + 1000bytes*/ - wbxmlBufLength = docByteLength + previousValidOutputLen + 1000; - - /* Create new buffer to write to */ - pWbxmlBuf = (NW_Uint8*)NW_Mem_Malloc(wbxmlBufLength); - if (pWbxmlBuf == NULL) { - s = KBrsrOutOfMemory; - goto handle_error; - } - else if (previousValidOutput) - { - (void)NW_Mem_memcpy(pWbxmlBuf, previousValidOutput->data, previousValidOutputLen); - } - } - - /* Parse and generate WBXML. */ - TRAP(s, parser = CHtmlpParser::NewL(docByteLength, docStartAddress, elementCount, - pElementDictionary, HTTP_iso_10646_ucs_2, consumeSpaces, parser, isScript)); - if (s != KBrsrSuccess) - goto handle_error; - *ppParser = parser; - - if (numLeftBytes) - { - // allocate a new buffer to hold bytes for incomplete characters and keep it in parser - parser->iLeftBytes = NW_Buffer_New(numLeftBytes); - (void)NW_Mem_memcpy(parser->iLeftBytes->data, pInBuf->data + pInBuf->length - numLeftBytes, numLeftBytes); - parser->iLeftBytes->length = numLeftBytes; - } - - // append the plain web content segement to visitedHeadText - if (needCharsetDetect) - { - parser->appendVisitedHeadText(pInBuf->data, pInBuf->length); - } - - if (isFirstSegment && !needCharsetDetect) - { - parser->iOrigEncoding = encoding; - } - - eventCBs = parser->getEventCallbacks(); - // if charsetConvertCallback is set, we don't actually generate wbxml output, - // instead, we keep all other callbacks to be null - if (!needCharsetDetect && isFirstSegment) - { - installEventCBs(eventCBs); - } - - /* The following are not WBXML callbacks, but CompositeContentHandler callback and context */ - eventCBs->charsetConvertCallback = charsetConvertCallback; - if (charsetConvertContext ) - { - NW_Htmlp_CharsetConvContext * ctx = (NW_Htmlp_CharsetConvContext*)eventCBs->charsetContext; - if (ctx == NULL) - { - // create a ctx instance so that it will persists for next chunks as well - ctx = (NW_Htmlp_CharsetConvContext *)NW_Mem_Malloc(sizeof(NW_Htmlp_CharsetConvContext)); - if (!ctx) - { - s = KBrsrOutOfMemory; - goto handle_error; - } - } - - ctx->contentHandler = ((NW_Htmlp_CharsetConvContext*)charsetConvertContext)->contentHandler; - ctx->response = ((NW_Htmlp_CharsetConvContext*)charsetConvertContext)->response; - eventCBs->charsetContext = ctx; - } - else - { - NW_Mem_Free(eventCBs->charsetContext); - eventCBs->charsetContext = charsetConvertContext; - } - /* The encoder contains a WBXML_Writer that defaults to a sizing pass. */ - if (!needCharsetDetect) - { - NW_HTMLP_WbxmlEncoder_New(publicID, HTTP_iso_10646_ucs_2, &(eventCBs->pClientPointer)); - if (!eventCBs->pClientPointer) - { - s = KBrsrOutOfMemory; - goto handle_error; - } - - NW_HTMLP_WbxmlEncoder_SetToWrite( - (NW_HTMLP_WbxmlEncoder_t*)eventCBs->pClientPointer, - wbxmlBufLength, pWbxmlBuf + previousValidOutputLen, NULL /* no growth callback */); - } - - in_parse = NW_TRUE; - s = parser->NW_HTMLP_Parse(isFirstSegment, isLastSegment, needCharsetDetect); - if (s != KBrsrSuccess && s != KBrsrRestartParsing) - goto handle_error; - in_parse = NW_FALSE; - - if (freeNeeded) - { - NW_Mem_Free(docStartAddress); - docStartAddress = 0; - } - if (newInBuf != pInBuf) - { - NW_Buffer_Free(newInBuf); - newInBuf = NULL; - } - - /* if status is restartParsing, restart parse from document start with all CBs set */ - if (s == KBrsrRestartParsing) - { - numLeftBytes = 0; - - parser->iRestarted = NW_TRUE; - encoding = parser->getLexer()->encoding; - visitedHeadText = parser->getVisitedHeadText(); - - // if needed, do the charset conversion - newInBuf = visitedHeadText; // initialize outBuf to same as origBuf - - if (encoding == HTTP_iso_10646_ucs_2) - { - if (visitedHeadText->length & 1) - { - newInBuf = visitedHeadText; - newInBuf->length--; - numLeftBytes = 1; - parser->iLeftBytes = NW_Buffer_New(numLeftBytes); - (void)NW_Mem_memcpy(parser->iLeftBytes->data, - visitedHeadText->data + visitedHeadText->length - numLeftBytes, - numLeftBytes); - parser->iLeftBytes->length = numLeftBytes; - } - } - else - { - // remove the possible BOM bytes - numUnconvertible = 0; - indexFirstUnconvertible = -1; - s = NW_HTMLP_HandleBOM(encoding, byteOrder, &(visitedHeadText->data), &(visitedHeadText->length)); - if (s != KBrsrSuccess) - goto handle_error; - - s = charsetConvertCallback(charsetConvertContext, 0, 0, visitedHeadText, &numUnconvertible, - &indexFirstUnconvertible, &newInBuf, &encoding); - byteOrder = NW_BYTEORDER_BIG_ENDIAN; - if (s != KBrsrSuccess) - { - if (encoding == HTTP_utf_8 || s == KBrsrMvcConverterNotFound) - { - if (s == KBrsrMvcConverterNotFound) - { - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, charsetConvertCallback returns ConverterNotFound status while converting from encoding: %x", encoding); - } - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, failed while converting from encoding: %x, now treat text as latin-1 and retry.", encoding); - encoding = HTTP_iso_8859_1; - s = charsetConvertCallback(charsetConvertContext, 0,0, origBuf, &numUnconvertible, &indexFirstUnconvertible, - &newInBuf, &encoding); - byteOrder = NW_BYTEORDER_BIG_ENDIAN; - if (s!= KBrsrSuccess) - goto handle_error; - else if (parser) - { - parser->iOrigEncoding = HTTP_iso_8859_1; - } - } - else - { - goto handle_error; - } - NW_ASSERT(newInBuf); - } - else if (numUnconvertible && indexFirstUnconvertible >= (NW_Int32)(visitedHeadText->length-2)) - { - numLeftBytes = numUnconvertible; - //visitedHeadText->length -= numLeftBytes; - if (numLeftBytes) - { - // allocate a new buffer to hold bytes for incomplete characters and keep it in parser - parser->iLeftBytes = NW_Buffer_New(numLeftBytes); - (void)NW_Mem_memcpy(parser->iLeftBytes->data, - visitedHeadText->data + visitedHeadText->length - numLeftBytes, - numLeftBytes); - parser->iLeftBytes->length = numLeftBytes; - } - } - } - NW_ASSERT(newInBuf); - - s = NW_HTMLP_HandleBOM(HTTP_iso_10646_ucs_2, byteOrder, &(newInBuf->data), &(newInBuf->length)); - if (s != KBrsrSuccess) - goto handle_error; - - - wbxmlBufLength = newInBuf->length + 1000; - pWbxmlBuf = (NW_Uint8*)NW_Mem_Malloc(wbxmlBufLength); - if (pWbxmlBuf == NULL) { - s = KBrsrOutOfMemory; - goto handle_error; - } - - TRAP(s, parser = CHtmlpParser::NewL(newInBuf->length, newInBuf->data, elementCount, - pElementDictionary, HTTP_iso_10646_ucs_2, consumeSpaces, parser, isScript)); - *ppParser = parser; - if (s != KBrsrSuccess) - goto handle_error; - - // now that real parse starts, set all the CBs, and reset charsetConvertCB - installEventCBs(eventCBs); - - //eventCBs->charsetConvertCallback = NULL; - //eventCBs->charsetContext = NULL; - - // now recreate and set the encode and writer - NW_HTMLP_WbxmlEncoder_New(publicID, HTTP_iso_10646_ucs_2, &(eventCBs->pClientPointer)); - if (!eventCBs->pClientPointer) - { - s = KBrsrOutOfMemory; - goto handle_error; - } - NW_HTMLP_WbxmlEncoder_SetToWrite( - (NW_HTMLP_WbxmlEncoder_t*)eventCBs->pClientPointer, - wbxmlBufLength, pWbxmlBuf, NULL /* no growth callback needed */); - - in_parse = NW_TRUE; - s = parser->NW_HTMLP_Parse(NW_TRUE, isLastSegment, NW_FALSE); - if (s != KBrsrSuccess) - goto handle_error; - in_parse = NW_FALSE; - - if (newInBuf != visitedHeadText) - { - NW_Buffer_Free(newInBuf); - newInBuf = NULL; - } - } - - allocatedLength = wbxmlBufLength; - // only when real parse starts, do we generate wbxml buffer - if (allocatedLength) - { - wbxmlBufLength = previousValidOutputLen + - ((NW_HTMLP_WbxmlEncoder_t*)eventCBs->pClientPointer)->pE->index; - } - if (wbxmlBufLength < allocatedLength) - { - NW_Uint8* pWbxmlNewBuf; - - pWbxmlNewBuf = (NW_Uint8*)NW_Mem_Malloc(wbxmlBufLength); - if (pWbxmlNewBuf != NULL) - { - /* copy data from pWbxmlBuf to pWbxmlNewBuf */ - (void)NW_Mem_memcpy(pWbxmlNewBuf, pWbxmlBuf, wbxmlBufLength); - /* free pWbxmlBuf */ - NW_Mem_Free(pWbxmlBuf); - pWbxmlBuf = pWbxmlNewBuf; - allocatedLength = wbxmlBufLength; - } - else - { - s = KBrsrOutOfMemory; - goto handle_error; - } - } - - if (wbxmlBufLength != NULL) - { - (*ppOutBuf)->length = wbxmlBufLength; - (*ppOutBuf)->allocatedLength = allocatedLength; - (*ppOutBuf)->data = pWbxmlBuf; - - NW_HTHMLP_StrTbl(eventCBs, WBXMLEncStrTbl); - - }//end if (wbxmlBufLength != NULL) - else - { - NW_Buffer_Free(*ppOutBuf); - *ppOutBuf = NULL; - s = KBrsrBufferTooSmall; - } - NW_HTMLP_WbxmlEncoder_Delete(eventCBs->pClientPointer); - eventCBs->pClientPointer = NULL; - -#ifdef _DEBUG1 -if (*ppOutBuf) - RFileLogger::HexDump( _L("Browser"), _L("Wbxml_buffer.txt"), EFileLoggingModeAppend, - NULL, NULL, (*ppOutBuf)->data, (*ppOutBuf)->length ); -#endif // _DEBUG1 - - *pLastValid = parser->getLastValid(); - *pCodePageSwitchCount = parser->getCodePageSwitchCount(); - //set the lexer's encoding the original foreign encoding so next parse would know. - parser->getLexer()->encoding = encoding; - - if (isLastSegment) - { - delete parser; - *ppParser = NULL; - } - pInBuf->data = restoreInData; - return s; -handle_error: - NW_Mem_Free(*ppOutBuf); - *ppOutBuf = NULL; - NW_Mem_Free(pWbxmlBuf); - if ( in_parse) - { - NW_Uint32 column; - NW_HTMLP_Lexer_GetLineColumn(parser->getLexer(), pLine, &column); - NW_LOG2(NW_LOG_LEVEL1, "HTML Parse error: line %d column %d\n", - NW_INT32_CAST(*pLine), NW_INT32_CAST(column)); - } - delete parser; - *ppParser = NULL; - parser = NULL; - if (freeNeeded) - { - if (docStartAddress && (docByteLength > pInBuf->length)) - { - NW_Mem_Free(docStartAddress); - } - } - pInBuf->data = restoreInData; - return s; -} - -TBrowserStatusCode NW_HTMLP_HtmlToWbxml(NW_Buffer_t* pInBuf, NW_Uint32 encoding, - NW_Uint8 byteOrder, - NW_Buffer_t** ppOutBuf, NW_Uint32* pLine, - NW_Uint32 publicID, - NW_HTMLP_ElementTableIndex_t elementCount, - NW_HTMLP_ElementDescriptionConst_t* pElementDictionary, - NW_Bool consumeSpaces, - NW_Bool needCharsetDetect, - void* charsetConvertContext, - NW_HTMLP_CharsetConvertCB* charsetConvertCallback, - NW_Bool isScript) -{ - TBrowserStatusCode status; - - status = HTMLP_HtmlToWbxml(pInBuf, encoding, byteOrder, ppOutBuf, pLine, publicID, elementCount, - pElementDictionary, consumeSpaces, needCharsetDetect, charsetConvertContext, - charsetConvertCallback, isScript); - - if (status == KBrsrRestartParsing || *ppOutBuf == NULL) - { - status = HTMLP_HtmlToWbxml(pInBuf, encoding, byteOrder, ppOutBuf, pLine, publicID, elementCount, - pElementDictionary, consumeSpaces, NW_FALSE, charsetConvertContext, charsetConvertCallback, isScript); - -#ifdef _DEBUG1 - if (*ppOutBuf) - { - RFileLogger::HexDump( _L("Browser"), _L("ParserDump.txt"), EFileLoggingModeAppend, - NULL, NULL, (*ppOutBuf)->data, (*ppOutBuf)->length ); - } -#endif // _WINS_ - } - return status; -} - - -// For UTF-8 and UCS-2 handle BOM (byte order mark) -- remove BOM. Also, for UCS-2, handle -// network (big endian) to native (little endian) byte order conversion. -TBrowserStatusCode NW_HTMLP_HandleBOM(NW_Uint32 encoding, NW_Uint8 byteOrder, - NW_Byte** pDocStartAddress, NW_Uint32* pDocByteLength) -{ - NW_Byte* docStartAddress = *pDocStartAddress; - NW_Uint32 docByteLength = *pDocByteLength; - - if (encoding == HTTP_utf_8) - { - // Look for BOM and remove if found - if (docByteLength >= 3) - { - if ((docStartAddress[0] == 0xef) && - (docStartAddress[1] == 0xbb) && - (docStartAddress[2] == 0xbf)) - { - docByteLength -= 3; - docStartAddress += 3; - } - } - } - else if (encoding == HTTP_iso_10646_ucs_2) - { - // Verify the doc has an even number of bytes, check LSB != 1. - if ((docByteLength & 1) == 1) - { - return KBrsrFailure; - } - - // Remove the BOM if present. - if (docByteLength >= 2) - { - if ((docStartAddress[0]== 0xff && docStartAddress[1] == 0xfe) - || (docStartAddress[0]== 0xfe && docStartAddress[1] == 0xff)) - { - docByteLength -= 2; - docStartAddress += 2; - } - } - - // Convert to little-endian (native byte order) if content is big-endian. - if (byteOrder == NW_BYTEORDER_BIG_ENDIAN) - { - // Make sure there is something to convert. - if (docByteLength >= 2) - { - // Sanity check before converting. Make sure the data looks like big - // endian. This is very rudimentary and does not guarantee that it is - // big endian but on a percentage basis will cover a lot. - NW_ASSERT(docStartAddress[1] != 0); - - // Convert the bytes. - NW_HTMLP_WbxmlEncoder_Ucs2NetworkToNativeByteOrder( - docByteLength, docStartAddress); - } - } - } - - // Verify there is some doc remaining after BOM processing */ - if (docByteLength == 0) - { - return KBrsrFailure; - } - *pDocStartAddress = docStartAddress; - *pDocByteLength = docByteLength; - return KBrsrSuccess; -} - -static TBrowserStatusCode NW_HTHMLP_RealParse(CHtmlpParser * parser, NW_Bool docComplete, - void** WBXMLEncStrTbl) -{ - NW_Uint32 encoding; - NW_Buffer_t* visitedHeadText = NULL; - NW_Buffer_t* newInBuf = NULL; // ucs2 after convert the visited text - NW_Uint32 wbxmlBufLength = 0; - NW_Uint8* pWbxmlBuf = NULL; - NW_HTMLP_EventCallbacks_t* eventCBs = NULL; - TBrowserStatusCode s = KBrsrSuccess; - NW_HTMLP_Lexer_t* pL = NULL; - NW_Int32 numUnconvertible, indexFirstUnconvertible; - - NW_ASSERT(parser); - - pL = parser->getLexer(); - - parser->iRestarted = NW_TRUE; - encoding = parser->getLexer()->encoding; - visitedHeadText = parser->getVisitedHeadText(); - if (!visitedHeadText) - { - s = KBrsrFailure; - goto cleanup; - } - newInBuf = visitedHeadText; - - eventCBs = parser->getEventCallbacks(); - - NW_ASSERT(eventCBs->charsetConvertCallback); - NW_ASSERT(eventCBs->charsetContext); - - // if the encoding coming is anything other than ucs2, we need to do - // the char conversion. - if (encoding != HTTP_iso_10646_ucs_2) - { - numUnconvertible = 0; - indexFirstUnconvertible = -1; - s = NW_HTMLP_HandleBOM(encoding, NW_BYTEORDER_SINGLE_BYTE, &(visitedHeadText->data), &(visitedHeadText->length)); - if (s != KBrsrSuccess) - goto cleanup; - - s = eventCBs->charsetConvertCallback(eventCBs->charsetContext, 0, 0, visitedHeadText, &numUnconvertible, - &indexFirstUnconvertible, &newInBuf, &encoding); - if (s != KBrsrSuccess) - { - if (encoding == HTTP_utf_8 || s == KBrsrMvcConverterNotFound) - { - if (s == KBrsrMvcConverterNotFound) - { - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, charsetConvertCallback returns ConverterNotFound status while converting from encoding: %x", encoding); - } - NW_LOG1(NW_LOG_LEVEL2, "SegToWbxml, failed while converting from encoding: %x, now treat text as latin-1 and retry.", encoding); - encoding = HTTP_iso_8859_1; - s = eventCBs->charsetConvertCallback(eventCBs->charsetContext, 0,0, visitedHeadText, &numUnconvertible, &indexFirstUnconvertible, - &newInBuf, &encoding); - if (s!= KBrsrSuccess) - goto cleanup; - else if (parser) - { - parser->iOrigEncoding = HTTP_iso_8859_1; - } - } - else - { - goto cleanup; - } - } - } - NW_ASSERT(newInBuf); - s = NW_HTMLP_HandleBOM(HTTP_iso_10646_ucs_2, NW_BYTEORDER_BIG_ENDIAN, &(newInBuf->data), &(newInBuf->length)); - if (s != KBrsrSuccess) - goto cleanup; - - wbxmlBufLength = newInBuf->length + 1000; // add additional 50 bytes so that plaintext (without tags) can be handled - pWbxmlBuf = (NW_Uint8*)NW_Mem_Malloc(wbxmlBufLength); - if (pWbxmlBuf == NULL) { - s = KBrsrOutOfMemory; - goto cleanup; - } - - TRAP(s, parser = CHtmlpParser::NewL(newInBuf->length, newInBuf->data, pL->elementCount, - pL->pElementDictionary, HTTP_iso_10646_ucs_2, parser->iIsHtml?NW_FALSE:NW_TRUE, parser, parser->iIsScript)); - if (s != KBrsrSuccess) - goto cleanup; - - // now that real parse starts, set all the CBs, and reset charsetConvertCB - installEventCBs(eventCBs); - - // now recreate and set the encode and writer - NW_HTMLP_WbxmlEncoder_New(parser->iIsHtml?NW_xhtml_1_0_PublicId:NW_Wml_1_3_PublicId, - HTTP_iso_10646_ucs_2, &(eventCBs->pClientPointer)); - if (!eventCBs->pClientPointer) - { - s = KBrsrOutOfMemory; - goto cleanup; - } - NW_HTMLP_WbxmlEncoder_SetToWrite( - (NW_HTMLP_WbxmlEncoder_t*)eventCBs->pClientPointer, - wbxmlBufLength, pWbxmlBuf, NULL /* no growth callback needed */); - - s = parser->NW_HTMLP_Parse(NW_TRUE, docComplete, NW_FALSE); - if (s != KBrsrSuccess) - goto cleanup; - - NW_HTHMLP_StrTbl(eventCBs, WBXMLEncStrTbl); - -cleanup: - if (newInBuf != visitedHeadText) - { - NW_Buffer_Free(newInBuf); - } - return s; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/htmlp/src/htmlp_wml_dict.cpp --- a/webengine/wmlengine/src/htmlp/src/htmlp_wml_dict.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef FEA_RME_NOHTMLPARSER - - -#include "nwx_defs.h" -#include "CHtmlpParser.h" -#include "nw_htmlp_wml_dict.h" - - - -/* must keep alphabetized by tag name */ -NW_HTMLP_ElementDescriptionConst_t NW_HTMLP_WML_ElementDescriptionTable[] = { - {NW_HTMLP_tag_A, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_ACCESS, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_ANCHOR, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_B, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BIG, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_BR, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_CARD, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_DO, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_EM, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_FIELDSET, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_GO, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_HEAD, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_I, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_IMG, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_INPUT, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_META, NULL, NULL, EMPTY, NW_TRUE}, - {NW_HTMLP_tag_NOOP, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_ONEVENT, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_OPTGROUP, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_OPTION, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_P, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_POSTFIELD, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_PRE, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_PREV, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_REFRESH, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SELECT, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_SETVAR, NULL, NULL, EMPTY, NW_FALSE}, - {NW_HTMLP_tag_SMALL, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_STRONG, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TABLE, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TD, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TEMPLATE, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TIMER, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_TR, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_U, NULL, NULL, ANY, NW_FALSE}, - {NW_HTMLP_tag_WML, NULL, NULL, ANY, NW_FALSE} -}; - -const NW_HTMLP_ElementTableIndex_t NW_HTMLP_WML_ElementTableCount -= (sizeof(NW_HTMLP_WML_ElementDescriptionTable) - / sizeof(NW_HTMLP_ElementDescriptionConst_t)); - -/* - * Access routines to get pointers to NW_HTMLP_WML_ElementDescriptionTable & - * NW_HTMLP_WML_ElementTableCount from outside the XmlParserDLL - */ -NW_HTMLP_ElementDescriptionConst_t* NW_HTMLP_Get_WML_ElementDescriptionTable() -{ - return (NW_HTMLP_WML_ElementDescriptionTable); -} - -NW_HTMLP_ElementTableIndex_t NW_HTMLP_Get_WML_ElementTableCount() -{ - return (NW_HTMLP_WML_ElementTableCount); -} - -#else - -/* Not sure why this func is here but I made it static. Shaun Keller */ -static -void FeaRmeNoHTMLParser_htmlp_dict(){ - int i = 0; - i+=1; -} -#endif /* FEA_RME_NOHTMLPARSER */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/Epoc32ImageDecoder.h --- a/webengine/wmlengine/src/image/include/Epoc32ImageDecoder.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* CEpoc32ImageDecoder class - * - * Every non-canned image has an image decoder associated with it. This is opened - * when the image is created in order to get the size. This is an asynchronous - * operation; "MiuoOpenComplete" is called when the opening is complete. - * - * The first time an image is displayed, "Decode" is called, which starts the - * asynchrounous decoding process. When this completes, the image object is - * updated with the decoded image, which then causes the new image to be - * displayed. - * - * A decode is also done every time the frame number of an animated image is - * changed. - */ - -#ifndef EPOC32IMAGEDECODER_H -#define EPOC32IMAGEDECODER_H - -// INCLUDES - -#include <e32base.h> -#include <imageconversion.h> - -#include "nw_image_epoc32simpleimage.h" - -// FORWARD DECLARATIONS -// #define INCREMENTAL_IMAGE_ON - -class CFbsBitmap; - -// CLASS DECLARATION - -class CEpoc32ImageDecoder : public CActive - { - public: - static CEpoc32ImageDecoder* NewL(NW_Image_Epoc32Simple_t* aImage); - void ConstructL(); - void RunL(); - void DoCancel() {iImageConverter->Cancel();} - - virtual ~CEpoc32ImageDecoder(); - - /*! - @function Decode - @discussion Opens data into fbsBitmap. - */ - void Open(); - - /*! - @function Decode - @discussion Converts data into fbsBitmap. - */ - TInt Decode(); - - NW_Bool IncrementImage(NW_Bool& startingFrameSequenceOver); - - /*! - @function PartialNextChunkL - @discussion new chunk of raw data - */ - void PartialNextChunkL( NW_Buffer_t* aNextChunk ); - - /*! - @function ImageDataComplete - @discussion end of raw data - */ - void ImageDataComplete(); - - - /*! - @function ResetImage - @discussion display the last frame of an animated image - */ - void ResetImage(); - - /*! - @function Finished - @discussion Finished animating image. - */ - TBool Finished(); - - - inline void SetImageHasNotBeenOpened (NW_Bool aImageHasNotBeenOpened) { iImageHasNotBeenOpened = aImageHasNotBeenOpened; } - - enum TDecoderState - { - ID_IDLE = 0, - ID_INITIALIZING, - ID_DECODING, - // state added to check if the decoding is already complete - ID_DECODE_COMPLETE - }; - /* - @function getDecoderState - @discussion Return the current state of the decoder - */ - - inline TDecoderState getDecoderState() { return iState; } - - private: - - void DoDecodeL(); - - CEpoc32ImageDecoder(NW_Image_Epoc32Simple_t* aImage); - - /*! - @function OpenComplete - - @discussion Called when the image file has been opened - */ - void OpenComplete(); - - /*! - @function ConvertComplete - - @discussion Called when conversion process performed on the bitmap is complete - */ - void ConvertComplete(); - - /*! - @function CreateComplete - - @discussion Called when the file in which the bitmap is to be saved has been created - */ - void CreateComplete( TInt aError ); - - TDisplayMode GetDisplayMode( TFrameInfo& aFrameInfo ); - - void CheckAnimation(); - void DeleteImageConverterBitmapMask(); - TInt16 GetLoopCount(); - - /* - * imageSizeCheck: This compares the original image size with - * that specified in the <img src = ".." width="" height="">. Then - * creates bit map accordingly. The value is return true if the - * <img> tag attribute values need to be used. - */ - - NW_Bool ImageSizeCheck(TSize iFrameInfoOverallSize, TSize* sizeSet); - TInt ImgAttrInfo(); - TInt CheckForDRMImage(); - - private: - enum TDecoderState iState; // Current decoder operation - - CBufferedImageDecoder* iImageConverter; // Connection to media server - - NW_Image_Epoc32Simple_t* iImage;// OOC image - TPtrC8 iImageDataPtr; // Raw unconverted image data - TFrameInfo iFrameInfo; // Info about image from media server - NW_Bool iIsAnimated; // NW_TRUE if more than one frame in image - TUint iCurrentFrame; // Number of current frame displayed - CFbsBitmap* iBitmap; // Decoded bitmap - CFbsBitmap* iMask; // Decoded bitmap mask - NW_Bool iImageHasNotBeenOpened; // NW_TRUE the first time an image is opened - TBool iMoreData; // iMoreData - TBool iFirstFrameComplete; // first frame complete - TBool iRawDataComplete; // we've got all the raw data - RFs iRfs; // A dummy parameter required by the Symbian API - TUint8 *iDRMOutBuf; //Outputput buffer for the DRM decryption. - TBool iFinished; // Finished animating image. - }; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/NW_Image_EXPORT.h --- a/webengine/wmlengine/src/image/include/NW_Image_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Image_EXPORT_h_ -#define _NW_Image_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_IMAGE_EXPORT -#ifdef NW_IMPORT -#define NW_IMAGE_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_IMAGE_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_IMAGE_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Image_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/NW_Image_ImageFactory.h --- a/webengine/wmlengine/src/image/include/NW_Image_ImageFactory.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_Image_ImageFactory_h -#define NW_Image_ImageFactory_h - - - - -#include "nw_object_core.h" -#include "nw_image_abstractimage.h" -#include <nwx_buffer.h> -#include <nwx_http_header.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_ImageFactory_Class_s NW_Image_ImageFactory_Class_t; -typedef struct NW_Image_ImageFactory_s NW_Image_ImageFactory_t; - -typedef struct NW_Image_ImageFactory_MimeTableEntry_s NW_Image_ImageFactory_MimeTableEntry_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Image_AbstractImage_t* -(*NW_Image_ImageFactory_CreateImage_t)(const NW_Image_ImageFactory_t* imageFactory, - NW_Http_ContentTypeString_t contentTypeString, - NW_Buffer_t* imageData); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_ImageFactory_ClassPart_s { - const NW_Image_ImageFactory_MimeTableEntry_t* mimeTable; - NW_Uint16 numEntries; - NW_Image_ImageFactory_CreateImage_t createImage; -} NW_Image_ImageFactory_ClassPart_t; - -struct NW_Image_ImageFactory_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Image_ImageFactory_ClassPart_t NW_Image_ImageFactory; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_ImageFactory_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_ImageFactory_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_ImageFactory)) - -#define NW_Image_ImageFactoryOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_ImageFactory)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_ImageFactory_Class_t NW_Image_ImageFactory_Class; -NW_IMAGE_EXPORT const NW_Image_ImageFactory_t NW_Image_ImageFactory; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#define NW_Image_ImageFactory_CreateImage(_imageFactory, _contentTypeString, _imageData) \ - (NW_Object_Invoke ((_imageFactory), NW_Image_ImageFactory, createImage) \ - ((_imageFactory), (_contentTypeString), (_imageData))) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_Image_ImageFactory_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/NW_Image_ImageFactoryI.h --- a/webengine/wmlengine/src/image/include/NW_Image_ImageFactoryI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_Image_ImageFactoryI_h -#define NW_Image_ImageFactoryI_h - - -#include "nw_object_corei.h" -#include "NW_Image_ImageFactory.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected data types - * ------------------------------------------------------------------------- */ -struct NW_Image_ImageFactory_MimeTableEntry_s { - NW_Http_ContentTypeString_t contentTypeString; - NW_Image_AbstractImage_Class_t* objClass; -}; - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Image_ImageFactory_GetMimeTable(_imageFactory) \ - (NW_Image_ImageFactory_GetClassPart (_imageFactory).mimeTable) - -#define NW_Image_ImageFactory_GetNumEntries(_imageFactory) \ - (NW_Image_ImageFactory_GetClassPart (_imageFactory).numEntries) - -NW_IMAGE_EXPORT -NW_Image_AbstractImage_t* -_NW_Image_ImageFactory_CreateImage (const NW_Image_ImageFactory_t* imageFactory, - NW_Http_ContentTypeString_t contentTypeString, - NW_Buffer_t* imageData); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_Image_ImageFactoryI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_abstractimage.h --- a/webengine/wmlengine/src/image/include/nw_image_abstractimage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_ABSTRACTIMAGE_H -#define NW_IMAGE_ABSTRACTIMAGE_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "nw_gdi_types.h" -#include "BrsrTypes.h" -#include "nw_image_imageobserver.h" - -#include "NW_Image_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - constants - * ------------------------------------------------------------------------- */ -#define NW_Image_AbstractImage_SuppressDupReformats_Start 0 -#define NW_Image_AbstractImage_SuppressDupReformats_Stop 1 -#define NW_Image_AbstractImage_SuppressDupReformats_Continue 2 -#define NW_Image_AbstractImage_SuppressDupReformats_Default 3 - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_AbstractImage_Class_s NW_Image_AbstractImage_Class_t; -typedef struct NW_Image_AbstractImage_s NW_Image_AbstractImage_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_GetSize_t) (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_Draw_t) ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location); -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_DrawScaled_t) (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_DrawInRect_t) (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size, - const NW_GDI_Rectangle_t* rect); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_IncrementImage_t) (NW_Image_AbstractImage_t* image); - -typedef -NW_Int16 -(*NW_Image_AbstractImage_GetLoopCount_t) (NW_Image_AbstractImage_t* image); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_SetLoopCount_t) (NW_Image_AbstractImage_t* image, NW_Uint16 loopCount); - -typedef -NW_Uint32 -(*NW_Image_AbstractImage_GetDelay_t) (NW_Image_AbstractImage_t* image); - -typedef -NW_Bool -(*NW_Image_AbstractImage_IsAnimated_t) (NW_Image_AbstractImage_t* image); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_SetImageObserver_t) ( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer); -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_RemoveImageObserver_t) ( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ); - -typedef -void -(*NW_Image_AbstractImage_ImageOpened_t) ( NW_Image_AbstractImage_t* image, NW_Bool failed, - NW_Int16 suppressDupReformats); - -typedef -void -(*NW_Image_AbstractImage_ImageSizeChanged_t) ( NW_Image_AbstractImage_t* image ); - -typedef -void -(*NW_Image_AbstractImage_ImageDecoded_t) ( NW_Image_AbstractImage_t* image, - NW_Bool failed); - -typedef -void -(*NW_Image_AbstractImage_ImageOpenStarted_t) ( NW_Image_AbstractImage_t* image ); - -typedef -TBrowserStatusCode -(*NW_Image_AbstractImage_ForceImageDecode_t) ( NW_Image_AbstractImage_t* image ); - - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_AbstractImage_ClassPart_s { - NW_Image_AbstractImage_GetSize_t getSize; - NW_Image_AbstractImage_Draw_t draw; - NW_Image_AbstractImage_DrawScaled_t drawScaled; - NW_Image_AbstractImage_DrawInRect_t drawInRect; - NW_Image_AbstractImage_IncrementImage_t incrementImage; - NW_Image_AbstractImage_GetLoopCount_t getLoopCount; - NW_Image_AbstractImage_SetLoopCount_t setLoopCount; - NW_Image_AbstractImage_GetDelay_t getDelay; - NW_Image_AbstractImage_IsAnimated_t isAnimated; - NW_Image_AbstractImage_SetImageObserver_t setImageObserver; - NW_Image_AbstractImage_RemoveImageObserver_t removeImageObserver; - NW_Image_AbstractImage_ImageOpened_t imageOpened; - NW_Image_AbstractImage_ImageSizeChanged_t imageSizeChanged; - NW_Image_AbstractImage_ImageDecoded_t imageDecoded; - NW_Image_AbstractImage_ImageOpenStarted_t imageOpenStarted; - NW_Image_AbstractImage_ForceImageDecode_t forceImageDecode; -} NW_Image_AbstractImage_ClassPart_t; - -struct NW_Image_AbstractImage_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_AbstractImage_ClassPart_t NW_Image_AbstractImage; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_AbstractImage_s { - NW_Object_Dynamic_t super; - - /*member variables*/ - /*for animated images*/ - NW_Bool isAnimated; - NW_Uint32 delay; - NW_Int16 loopCount; - NW_ADT_DynamicVector_t* imageObserverList; /* image observer list */ - NW_Bool isOpening; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_AbstractImage_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_AbstractImage)) - -#define NW_Image_AbstractImageOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_AbstractImage)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_AbstractImage_Class_t NW_Image_AbstractImage_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Image_AbstractImage_GetSize(_image, _size) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, getSize) \ - ((_image), (_size))) - -#define NW_Image_AbstractImage_Draw(_image, _deviceContext, _location) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, draw) \ - ((_image), (_deviceContext), (_location))) - -#define NW_Image_AbstractImage_DrawScaled(_image, _deviceContext, _location, _size) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, drawScaled) \ - ((_image), (_deviceContext), (_location), (_size))) - -#define NW_Image_AbstractImage_DrawInRect(_image, _deviceContext, _location, _size, _rect) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, drawInRect) \ - ((_image), (_deviceContext), (_location), (_size), (_rect))) - -#define NW_Image_AbstractImage_IncrementImage(_image) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, incrementImage) \ - ((_image))) - -#define NW_Image_AbstractImage_GetLoopCount(_image) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, getLoopCount) \ - ((_image))) - -#define NW_Image_AbstractImage_SetLoopCount(_image, _loopCount) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, setLoopCount) \ - ((_image), (_loopCount))) - -#define NW_Image_AbstractImage_GetDelay(_image) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, getDelay) \ - ((_image))) - -#define NW_Image_AbstractImage_IsAnimated(_image) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, isAnimated) \ - ((_image))) - -#define NW_Image_AbstractImage_SetImageObserver( _image, _observer ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, setImageObserver) \ - ( ( _image ), (_observer ) ) ) - -#define NW_Image_AbstractImage_RemoveImageObserver( _image, _observer ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, removeImageObserver) \ - ( ( _image ), (_observer ) ) ) - -#define NW_Image_AbstractImage_ImageOpened( _image, _failed, _suppressDupReformats ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, imageOpened) \ - ( ( _image ), ( _failed ), (_suppressDupReformats) ) ) - -#define NW_Image_AbstractImage_ImageSizeChanged( _image ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, imageSizeChanged) \ - ( ( _image ) ) ) - -#define NW_Image_AbstractImage_ImageDecoded( _image, _failed ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, imageDecoded) \ - ( ( _image ), ( _failed ) ) ) - -#define NW_Image_AbstractImage_ImageOpenStarted( _image ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, imageOpenStarted) \ - ( ( _image ) ) ) - -#define NW_Image_AbstractImage_ForceImageDecode( _image ) \ - (NW_Object_Invoke ((_image), NW_Image_AbstractImage, forceImageDecode) \ - ( ( _image ) ) ) - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT -TBrowserStatusCode -NW_Image_AbstractImage_DecrementLoopCount(NW_Image_AbstractImage_t* image); - -NW_IMAGE_EXPORT -void -NW_Image_AbstractImage_ImageDestroyed( NW_Image_AbstractImage_t* image ); - -NW_Bool -NW_Image_AbstractImage_IsVisible(NW_Image_AbstractImage_t* aImage); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_ABSTRACTIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_abstractimagei.h --- a/webengine/wmlengine/src/image/include/nw_image_abstractimagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_ABSTRACTIMAGEI_H -#define NW_IMAGE_ABSTRACTIMAGEI_H - -#include "nw_object_dynamici.h" -#include "nw_image_abstractimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_AbstractImage_Construct( NW_Object_Dynamic_t* dynamicObject, - va_list *argp); - -NW_IMAGE_EXPORT -void -_NW_Image_AbstractImage_Destruct( NW_Object_Dynamic_t* dynamicObject ); - -extern -TBrowserStatusCode -_NW_Image_AbstractImage_IncrementImage(NW_Image_AbstractImage_t* image); - -extern -NW_Int16 -_NW_Image_AbstractImage_GetLoopCount(NW_Image_AbstractImage_t* image); - -extern -TBrowserStatusCode -_NW_Image_AbstractImage_SetLoopCount(NW_Image_AbstractImage_t* image, NW_Uint16 loopCount); - -extern -NW_Uint32 -_NW_Image_AbstractImage_GetDelay(NW_Image_AbstractImage_t* image); - -extern -NW_Bool -_NW_Image_AbstractImage_IsAnimated(NW_Image_AbstractImage_t* image); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_AbstractImage_SetImageObserver( NW_Image_AbstractImage_t* epocImage, - NW_Image_IImageObserver_t* observer ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_AbstractImage_RemoveImageObserver( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ); - -NW_IMAGE_EXPORT -void -_NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImage_t* image, NW_Bool failed, - NW_Int16 suppressDupReformats ); - - -NW_IMAGE_EXPORT -void -_NW_Image_AbstractImage_ImageSizeChanged( NW_Image_AbstractImage_t* image ); - -NW_IMAGE_EXPORT -void -_NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImage_t* image, - NW_Bool failed); - -NW_IMAGE_EXPORT -void -_NW_Image_AbstractImage_ImageOpenStarted( NW_Image_AbstractImage_t* image ); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_ABSTRACTIMAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_cannedimages.h --- a/webengine/wmlengine/src/image/include/nw_image_cannedimages.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_CANNEDIMAGES_H -#define NW_IMAGE_CANNEDIMAGES_H - -#include "nw_object_dynamic.h" -#include "nw_image_abstractimage.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ - -#define NW_Image_Invalid 0 -#define NW_Image_Square 1 -#define NW_Image_Disc 2 -#define NW_Image_Circle 3 -#define NW_Image_Missing 4 -#define NW_Image_Broken 5 -#define NW_Image_SelectArrow 6 -#define NW_Image_Object 7 -#define NW_Image_SelectFile 8 -#define NW_Image_ImageMap 9 - -#define NW_Image_NumberOfCannedImages 9 - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_CannedImages_Class_s NW_Image_CannedImages_Class_t; -typedef struct NW_Image_CannedImages_s NW_Image_CannedImages_t; - -typedef struct NW_Image_CannedImages_Entry_s NW_Image_CannedImages_Entry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_CannedImages_ClassPart_s { - NW_Uint8 numEntries; - const NW_Image_CannedImages_Entry_t* entries; -} NW_Image_CannedImages_ClassPart_t; - -struct NW_Image_CannedImages_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_CannedImages_ClassPart_t NW_Image_CannedImages; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_CannedImages_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_Image_AbstractImage_t* dictionary[NW_Image_NumberOfCannedImages]; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_CannedImages_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_CannedImages)) - -#define NW_Image_CannedImagesOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_CannedImages)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_CannedImages_Class_t NW_Image_CannedImages_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT -const NW_Image_AbstractImage_t* -NW_Image_CannedImages_GetImage (NW_Image_CannedImages_t* cannedImages, - NW_Int8 imageId); -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_Image_CannedImages_t* -NW_Image_CannedImages_New(); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_CANNEDIMAGES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_cannedimagesi.h --- a/webengine/wmlengine/src/image/include/nw_image_cannedimagesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_CANNEDIMAGESI_H -#define NW_IMAGE_CANNEDIMAGESI_H - -#include "nw_object_dynamici.h" -#include "nw_image_cannedimages.h" -#include "nw_image_epoc32simpleimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_Image_CannedImages_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp); - -extern -void -_NW_Image_CannedImages_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_Image_CannedImages_Entry_s { - NW_Int8 imageId; - const NW_Image_Epoc32Simple_t* image; -}; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_CANNEDIMAGESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_epoc32cannedimage.h --- a/webengine/wmlengine/src/image/include/nw_image_epoc32cannedimage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_EPOC32CANNEDIMAGE_H -#define NW_IMAGE_EPOC32CANNEDIMAGE_H - -#include "nw_image_epoc32simpleimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Epoc32Canned_Class_s NW_Image_Epoc32Canned_Class_t; -typedef struct NW_Image_Epoc32Canned_s NW_Image_Epoc32Canned_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Epoc32Canned_ClassPart_s { - void** unused; -} NW_Image_Epoc32Canned_ClassPart_t; - -struct NW_Image_Epoc32Canned_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_AbstractImage_ClassPart_t NW_Image_AbstractImage; - NW_Image_Epoc32Simple_ClassPart_t NW_Image_Epoc32Simple; - NW_Image_Epoc32Canned_ClassPart_t NW_Image_Epoc32Canned; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_Epoc32Canned_s { - NW_Image_Epoc32Simple_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_Epoc32Canned_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_Epoc32Canned)) - -#define NW_Image_Epoc32CannedOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_Epoc32Canned)) - -#define NW_Image_Epoc32Canned_GetData(_object) \ - ((NW_Image_Epoc32CannedOf(_object))->data) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_Epoc32Canned_Class_t NW_Image_Epoc32Canned_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -NW_Image_Epoc32Canned_Destroy(NW_Image_AbstractImage_t* image); - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_Image_Epoc32Canned_t* -NW_Image_Epoc32Canned_New (NW_GDI_Dimension3D_t size, - const void* data, - const void* mask, - NW_Bool invertedMask, - NW_Bool isTransparent, - TImageType imageType, - const void* rawData, - NW_Int32 length); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_EPOC32SIMPLEIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_epoc32cannedimagei.h --- a/webengine/wmlengine/src/image/include/nw_image_epoc32cannedimagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_EPOC32CANNEDIMAGEI_H -#define NW_IMAGE_EPOC32CANNEDIMAGEI_H - -#include "nw_image_epoc32simpleimagei.h" -#include "nw_image_epoc32cannedimage.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -void -_NW_Image_Epoc32Canned_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_EPOC32SIMPLEIMAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_epoc32simpleimage.h --- a/webengine/wmlengine/src/image/include/nw_image_epoc32simpleimage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_EPOC32SIMPLEIMAGE_H -#define NW_IMAGE_EPOC32SIMPLEIMAGE_H - -#include "nw_image_abstractimage.h" -#include "nw_hed_documentnode.h" -#include "BrsrStatusCodes.h" -#include "ImageUtils.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Epoc32Simple_Class_s NW_Image_Epoc32Simple_Class_t; -typedef struct NW_Image_Epoc32Simple_s NW_Image_Epoc32Simple_t; - -typedef -TBrowserStatusCode -(*NW_Image_Epoc32Simple_PartialNextChunk_t) ( NW_Image_AbstractImage_t* image, NW_Buffer_t* nextChunk ); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Epoc32Simple_ClassPart_s { - NW_Image_Epoc32Simple_PartialNextChunk_t partialNextChunk; -} NW_Image_Epoc32Simple_ClassPart_t; - -struct NW_Image_Epoc32Simple_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_AbstractImage_ClassPart_t NW_Image_AbstractImage; - NW_Image_Epoc32Simple_ClassPart_t NW_Image_Epoc32Simple; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_Epoc32Simple_s { - NW_Image_AbstractImage_t super; - - /* member variables */ - void* decoder; /* CEpoc32ImageDecoder */ - NW_GDI_Dimension3D_t size; /* size of image */ - const void* bitmap; /* image to display */ - const void* mask; /* bitmap mask */ - NW_Bool invertedMask; /* ETrue if mask is inverted, else EFalse */ - TImageType imageType; /* images that Symbian can't recognize */ - void* rawData; /* undecoded image data */ - NW_Int32 rawDataLength; /* undecoded image data length */ - NW_Bool needsDecode; /* NW_TRUE if object needs decode before display */ - NW_Uint32 prevFlags; /* Frame info flags from previous image decode */ - NW_GDI_Color_t prevBackColor; /* background color from previous image frame */ - NW_GDI_Rectangle_t prevRect; /* topleft x,y and the size of previous image frame*/ - NW_ADT_DynamicVector_t* docNodeList; /* Image content handler List */ - NW_Bool imageDecoding; /* partial image decoding */ - NW_Int32 srcWidth; /* Width found in the HTML <img> if any */ - NW_Int32 srcHeight; /* Height found in the HTML <img>if any */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_Epoc32Simple_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_Epoc32Simple)) - -#define NW_Image_Epoc32SimpleOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_Epoc32Simple)) - -#define NW_Image_Epoc32Simple_GetData(_object) \ - ((NW_Image_Epoc32SimpleOf(_object))->data) - -#define NW_Image_Epoc32Simple_GetRawData(_object) \ - ((NW_Image_Epoc32SimpleOf(_object))->rawData) - -#define NW_Image_Epoc32Simple_GetRawDataLength(_object) \ - ((NW_Image_Epoc32SimpleOf(_object))->rawDataLength) - -#define NW_Image_Epoc32Simple_PartialNextChunk( _image, _buffer ) \ - (NW_Object_Invoke ((_image), NW_Image_Epoc32Simple, partialNextChunk) \ - ( ( _image ), ( _buffer ) ) ) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_Epoc32Simple_Class_t NW_Image_Epoc32Simple_Class; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_Image_Epoc32Simple_t* -NW_Image_Epoc32Simple_New (NW_GDI_Dimension3D_t size, - const void* data, - const void* mask, - NW_Bool invertedMask, - NW_Bool isTransparent, - TImageType imageType, - void* rawData, - NW_Int32 length, - NW_HED_DocumentNode_t* documentNode); - -TBrowserStatusCode -NW_Image_Epoc32Simple_SetSize (NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* aSize); - -TBrowserStatusCode -NW_Image_Epoc32Simple_SetAnimation(NW_Image_AbstractImage_t* image, - NW_Bool isAnimated, - NW_Uint32 delay ); - -void -NW_Image_Epoc32Simple_SetBitmap(NW_Image_Epoc32Simple_t* image, - void* bitmap, - void* mask, - NW_Int32 frameNum, - void* frameInfo, - NW_Bool frameIsReady ); - -void NW_Image_Epoc32Simple_DestroyRawData( NW_Image_Epoc32Simple_t* aImage ); - -TBrowserStatusCode -NW_Image_Epoc32Simple_AddDocNode(NW_Image_Epoc32Simple_t* epocImage, - NW_HED_DocumentNode_t* documentNode); - -void -NW_Image_Epoc32Simple_OutOfView( NW_Image_Epoc32Simple_t* aEpocImage ); - -TBrowserStatusCode -NW_Image_Epoc32Simple_Initialize( NW_Image_Epoc32Simple_t* thisObj ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_EPOC32SIMPLEIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_epoc32simpleimagei.h --- a/webengine/wmlengine/src/image/include/nw_image_epoc32simpleimagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_EPOC32SIMPLEIMAGEI_H -#define NW_IMAGE_EPOC32SIMPLEIMAGEI_H - -#include "nw_image_abstractimagei.h" -#include "nw_image_epoc32simpleimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_Image_Epoc32Simple_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp); - -extern -void -_NW_Image_Epoc32Simple_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_PartialNextChunk( NW_Image_AbstractImage_t* image, - NW_Buffer_t* nextChunk ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_GetSize (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_Draw ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_DrawScaled ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_DrawInRect ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size, - const NW_GDI_Rectangle_t* rect); - - -NW_IMAGE_EXPORT -void -_NW_Image_Epoc32SimpleImage_ImageOpened( NW_Image_AbstractImage_t* aAbstractImage, NW_Bool aFailed, - NW_Int16 aSuppressDupReformats ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_IncrementImage(NW_Image_AbstractImage_t* image); - - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_Epoc32Simple_ForceImageDecode( NW_Image_AbstractImage_t* image ); - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Image_Epoc32Simple_Scale(NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Dimension3D_t* size); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_EPOC32SIMPLEIMAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_iimageobserver.h --- a/webengine/wmlengine/src/image/include/nw_image_iimageobserver.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_IIMAGEOBSERVER_H -#define NW_IMAGE_IIMAGEOBSERVER_H - - - -#include "NW_LMgr_EXPORT.h" -#include "nw_object_interface.h" -#include "nw_object_dynamic.h" -#include "nw_image_imageobserver.h" -#include "nw_image_abstractimage.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -void -(*NW_Image_IImageObserver_ImageOpened_t) ( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ); - -typedef -void -(*NW_Image_IImageObserver_SizeChanged_t) ( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -typedef -void -(*NW_Image_IImageObserver_ImageOpeningStarted_t) ( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -typedef -void -(*NW_Image_IImageObserver_ImageDecoded_t) ( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed); -typedef -void -(*NW_Image_IImageObserver_ImageDestroyed_t) ( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -typedef -NW_Bool -(*NW_Image_IImageObserver_IsVisible_t) ( NW_Image_IImageObserver_t* aImageObserver); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_IImageObserver_ClassPart_s { - NW_Image_IImageObserver_ImageOpened_t imageOpened; - NW_Image_IImageObserver_SizeChanged_t sizeChanged; - NW_Image_IImageObserver_ImageOpeningStarted_t imageOpeningStarted; - NW_Image_IImageObserver_ImageDecoded_t imageDecoded; - NW_Image_IImageObserver_ImageDestroyed_t imageDestroyed; - NW_Image_IImageObserver_IsVisible_t isVisible; -} NW_Image_IImageObserver_ClassPart_t; - -struct NW_Image_IImageObserver_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_Image_IImageObserver_ClassPart_t NW_Image_IImageObserver; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Image_IImageObserver_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_IImageObserver_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Image_IImageObserver)) - -#define NW_Image_IImageObserverOf(object) \ - (NW_Object_Cast (object, NW_Image_IImageObserver)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_Image_IImageObserver_Class_t NW_Image_IImageObserver_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Image_IImageObserver_ImageOpened( _imageObserver, _abstractImage, _failed, _suppressDupReformats ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, imageOpened ) \ - ( (_imageObserver), (_abstractImage), (_failed), (_suppressDupReformats) )) - -#define NW_Image_IImageObserver_SizeChanged( _imageObserver, _abstractImage ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, sizeChanged ) \ - ( (_imageObserver), (_abstractImage) )) - -#define NW_Image_IImageObserver_ImageOpeningStarted( _imageObserver, _abstractImage ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, imageOpeningStarted ) \ - ( (_imageObserver), (_abstractImage) )) - -#define NW_Image_IImageObserver_ImageDecoded( _imageObserver, _abstractImage, _failed ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, imageDecoded ) \ - ( (_imageObserver), (_abstractImage), (_failed) )) - -#define NW_Image_IImageObserver_ImageDestroyed( _imageObserver, _abstractImage ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, imageDestroyed ) \ - ( (_imageObserver), (_abstractImage) )) - -#define NW_Image_IImageObserver_IsVisible( _imageObserver ) \ - (NW_Object_Invoke ( _imageObserver, NW_Image_IImageObserver, isVisible ) \ - ( (_imageObserver) )) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_IIMAGEOBSERVER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_iimageobserveri.h --- a/webengine/wmlengine/src/image/include/nw_image_iimageobserveri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_IIMAGEOBSERVERI_H -#define NW_IMAGE_IIMAGEOBSERVERI_H - - -#include "nw_object_interfacei.h" -#include "nw_image_iimageobserver.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_IIMAGEOBSERVERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_imageobserver.h --- a/webengine/wmlengine/src/image/include/nw_image_imageobserver.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_IMAGEOBSERVER_H -#define NW_IMAGE_IMAGEOBSERVER_H - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_IImageObserver_Class_s NW_Image_IImageObserver_Class_t; -typedef struct NW_Image_IImageObserver_s NW_Image_IImageObserver_t; - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_IMAGEOBSERVER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_virtualimage.h --- a/webengine/wmlengine/src/image/include/nw_image_virtualimage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_VIRTUALIMAGE_H -#define NW_IMAGE_VIRTUALIMAGE_H - -#include "nw_image_abstractimage.h" -#include "nw_image_iimageobserver.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Virtual_Class_s NW_Image_Virtual_Class_t; -typedef struct NW_Image_Virtual_s NW_Image_Virtual_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Image_Virtual_ClassPart_s { - void** unused; -} NW_Image_Virtual_ClassPart_t; - -struct NW_Image_Virtual_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Image_AbstractImage_ClassPart_t NW_Image_AbstractImage; - NW_Image_Virtual_ClassPart_t NW_Image_Virtual; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Image_Virtual_s { - NW_Image_AbstractImage_t super; - - /* member variables */ - NW_Image_AbstractImage_t* image; - // whenever the virtual image is set to be observed, it - // must set to observ its simple image - NW_Image_IImageObserver_t NW_Image_IImageObserver; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Image_Virtual_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Image_Virtual)) - -#define NW_Image_VirtualOf(_object) \ - (NW_Object_Cast ((_object), NW_Image_Virtual)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT const NW_Image_Virtual_Class_t NW_Image_Virtual_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT -NW_Image_Virtual_t* -NW_Image_Virtual_New (NW_Image_AbstractImage_t* image); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_VIRTUALIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/include/nw_image_virtualimagei.h --- a/webengine/wmlengine/src/image/include/nw_image_virtualimagei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGE_VIRTUALIMAGEI_H -#define NW_IMAGE_VIRTUALIMAGEI_H - -#include "nw_image_abstractimagei.h" -#include "nw_image_virtualimage.h" -#include "nw_image_iimageobserveri.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_Object_Class_t* const _NW_Image_VirtualImage_InterfaceList[]; -NW_LMGR_EXPORT const NW_Image_IImageObserver_Class_t _NW_Image_VirtualImage_ImageObserver_Class; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_Destruct( NW_Object_Dynamic_t* dynamicObject ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_GetSize (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_Draw ( NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location); - -TBrowserStatusCode -_NW_Image_VirtualImage_DrawScaled(NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size); -TBrowserStatusCode -_NW_Image_VirtualImage_DrawInRect(NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size, - const NW_GDI_Rectangle_t* rect); - -extern -TBrowserStatusCode -_NW_Image_VirtualImage_IncrementImage(NW_Image_AbstractImage_t* image); - -extern -NW_Int16 -_NW_Image_VirtualImage_GetLoopCount(NW_Image_AbstractImage_t* image); - -extern -TBrowserStatusCode -_NW_Image_VirtualImage_SetLoopCount(NW_Image_AbstractImage_t* image, NW_Uint16 loopCount); - -extern -NW_Uint32 -_NW_Image_VirtualImage_GetDelay(NW_Image_AbstractImage_t* image); - -extern -NW_Bool -_NW_Image_VirtualImage_IsAnimated(NW_Image_AbstractImage_t* image); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_SetImageObserver( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_RemoveImageObserver( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ); - -NW_IMAGE_EXPORT -TBrowserStatusCode -_NW_Image_VirtualImage_ForceImageDecode( NW_Image_AbstractImage_t* image ); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed); - -NW_IMAGE_EXPORT -void -_NW_Image_VirtualImage_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ); - -NW_Bool -_NW_Image_VirtualImage_IImageObserver_IsVisible(NW_Image_IImageObserver_t* aImageObserver); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGE_VIRTUALIMAGEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/Epoc32CannedImage.cpp --- a/webengine/wmlengine/src/image/src/Epoc32CannedImage.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_image_epoc32cannedimagei.h" - -#include "nw_gdi_types.h" - -#include <fbs.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Image_Epoc32Canned_Class_t NW_Image_Epoc32Canned_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_Epoc32Simple_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Image_Epoc32Canned_t), - /* construct */ _NW_Image_Epoc32Simple_Construct, - /* destruct */ _NW_Image_Epoc32Canned_Destruct - }, - { /* NW_Image_Abstract */ - /* getSize */ _NW_Image_Epoc32Simple_GetSize, - /* draw */ _NW_Image_Epoc32Simple_Draw, - /* drawScaled */ _NW_Image_Epoc32Simple_DrawScaled, - /* drawInRect */ _NW_Image_Epoc32Simple_DrawInRect, - /* incrementImage */ _NW_Image_Epoc32Simple_IncrementImage, - /* getLoopCount */ _NW_Image_AbstractImage_GetLoopCount, - /* setLoopCount */ _NW_Image_AbstractImage_SetLoopCount, - /* getDelay */ _NW_Image_AbstractImage_GetDelay, - /* isAnimated */ _NW_Image_AbstractImage_IsAnimated, - /* setImageObserver */ NULL, - /* removeImageObserver */ NULL, - /* imageOpened */ NULL, - /* imageSizeChanged */ NULL, - /* imageDecoded */ NULL, - /* imageOpenStarted */ NULL, - /* forceImageDecode */ NULL - }, - { /* NW_Image_Simple */ - /* partialNextChunk */ NULL - }, - { /* NW_Image_Canned */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_Epoc32Canned_Destruct (NW_Object_Dynamic_t* /*dynamicObject*/) -{ -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Image_Epoc32Canned_Destroy(NW_Image_AbstractImage_t* image) -{ - NW_Image_Epoc32Simple_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Epoc32Simple_Class)); - - /* for convenience */ - thisObj = NW_Image_Epoc32SimpleOf (image); - - delete (void*)thisObj->rawData; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Image_Epoc32Canned_t* -NW_Image_Epoc32Canned_New (NW_GDI_Dimension3D_t size, - const void* data, - const void* mask, - NW_Bool invertedMask, - NW_Bool isTransparent, - TImageType imageType, - const void* rawData, - NW_Int32 length) -{ - //lint -e{437} Passing struct to ellipsis - return (NW_Image_Epoc32Canned_t*) NW_Object_New (&NW_Image_Epoc32Canned_Class, - size, - data, - mask, - invertedMask, - isTransparent, - imageType, - rawData, - length, - NULL); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/Epoc32CannedImages.cpp --- a/webengine/wmlengine/src/image/src/Epoc32CannedImages.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,279 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_image_cannedimagesi.h" -#include "nw_image_epoc32cannedimage.h" -#include "nw_text_ascii.h" - -#include <fbs.h> -#include <nw_browser_browserimages.h> -#include "BrsrStatusCodes.h" - -static TBrowserStatusCode -NW_Image_CannedImages_CreateDictionary(NW_Image_CannedImages_t* thisObj); - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -static const -TUint NW_Image_CannedImages_Dictionary[NW_Image_NumberOfCannedImages*2]= - { - qgn_prop_wml_square, // NW_Image_Square - qgn_prop_wml_disc, // NW_Image_Disc - qgn_prop_wml_circle, // NW_Image_Circle - qgn_prop_wml_image_not_shown, // NW_Image_Missing - qgn_prop_wml_image_not_shown, // NW_Image_Broken - qgn_prop_wml_selectarrow, // NW_Image_SelectArrow - qgn_prop_wml_object, // NW_Image_Object - qgn_prop_wml_selectfile, // NW_Image_SelectFile - qgn_prop_wml_image_map, // NW_Image_ImageMap - /* masks */ - qgn_prop_wml_square_mask, - qgn_prop_wml_disc_mask, - qgn_prop_wml_circle_mask, - qgn_prop_wml_image_not_shown_mask, - qgn_prop_wml_image_not_shown_mask, - qgn_prop_wml_selectarrow_mask, - qgn_prop_wml_object_mask, - qgn_prop_wml_selectfile_mask, - qgn_prop_wml_image_map_mask - }; - -/* ------------------------------------------------------------------------- */ -const -NW_Image_CannedImages_Class_t NW_Image_CannedImages_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Image_CannedImages_t), - /* construct */ _NW_Image_CannedImages_Construct, - /* destruct */ _NW_Image_CannedImages_Destruct - }, - { /* NW_CannedImages */ - /* numEntries */ 0, - /* entries */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_Image_CannedImages_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp) -{ - NW_Image_CannedImages_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Image_CannedImages_Class)); - NW_REQUIRED_PARAM (argp); - - - /* for convenience */ - thisObj = NW_Image_CannedImagesOf (dynamicObject); - - /* load all images from the MBM file */ - NW_Image_CannedImages_CreateDictionary(thisObj); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_CannedImages_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_Image_CannedImages_t* thisObj; - NW_Uint8 ii; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Image_CannedImages_Class)); - - /* for convenience */ - thisObj = NW_Image_CannedImagesOf (dynamicObject); - - /* deallocate our dynamic memory */ - - /* remove all loaded images in the dictionary */ - for (ii=0; ii<NW_Image_NumberOfCannedImages; ii++) - { - if (thisObj->dictionary[ii]!=NULL) - { - NW_Object_Delete(thisObj->dictionary[ii]); - thisObj->dictionary[ii]=NULL; - } - } -} - - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Image_AbstractImage_t* -NW_Image_CannedImages_GetImage (NW_Image_CannedImages_t* thisObj, - NW_Int8 imageId) -{ - const NW_Image_AbstractImage_t* image = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Image_CannedImages_Class)); - NW_REQUIRED_PARAM(thisObj); - - if (imageId>NW_Image_Invalid && imageId<=NW_Image_NumberOfCannedImages) - { - /* imageId-1 because we're skipping NW_Image_Invalid */ - image=thisObj->dictionary[imageId-1]; - } - - /* return the image if found, otherwise NULL */ - return image; -} - -TBrowserStatusCode -NW_Image_CannedImages_CreateDictionary(NW_Image_CannedImages_t* thisObj) -{ - TFileName mbmDrive; - HBufC* mbmFile = NULL; - CFbsBitmap* bitmap = NULL; - CFbsBitmap* mask = NULL; - TParse parse; - NW_Uint8 ii; - - /* get the drive letter - MBM is on the same drive as this DLL */ - Dll::FileName( mbmDrive ); - parse.Set( mbmDrive, NULL, NULL ); - mbmDrive = parse.Drive(); - - NW_TRY(status) - { - /* allocate memory for MBM file name */ - mbmFile = HBufC::New( KMaxFileName ); - NW_THROW_OOM_ON_NULL(mbmFile, status); - - /* assemble the MBM file name */ - TPtr ptr( mbmFile->Des() ); - ptr.Append( mbmDrive ); - - TFileName KBrowserBitmapsFolder; - //_LIT(KDC_APP_BITMAP_DIR,"\\resource\\apps\\localisablefiles\\"); // Bitmap files (.mbm) - - KBrowserBitmapsFolder += KDC_APP_BITMAP_DIR; - KBrowserBitmapsFolder += KBrowserBitmapsName; - KBrowserBitmapsFolder.ZeroTerminate(); - - ptr.Append( KBrowserBitmapsFolder ); - - /* load canned images from MBM file into the dictionary */ - for (ii=0; ii<NW_Image_NumberOfCannedImages; ii++) - { - TInt error; - - /* allocate a bitmap object */ - bitmap = NULL; - bitmap = new CFbsBitmap(); - NW_THROW_OOM_ON_NULL(bitmap, status); - - /* load an image from the MBM file */ - error = bitmap->Load( mbmFile->Des(), - NW_Image_CannedImages_Dictionary[ii] ); - if (error!=KErrNone) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - - /* load the mask if it exist */ - mask = NULL; - if (NW_Image_CannedImages_Dictionary[ii+NW_Image_NumberOfCannedImages]) - { - /* allocate a mask object */ - mask = new CFbsBitmap(); - NW_THROW_OOM_ON_NULL(mask, status); - - /* load an image from the MBM file */ - error = mask->Load( mbmFile->Des(), - NW_Image_CannedImages_Dictionary[ii+NW_Image_NumberOfCannedImages] ); - if (error!=KErrNone) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - - /* create KM image object to hold the loaded image */ - NW_GDI_Dimension3D_t gdiSize; - TSize size = bitmap->SizeInPixels(); - - gdiSize.width = (NW_GDI_Metric_t)size.iWidth; - gdiSize.height = (NW_GDI_Metric_t)size.iHeight; - gdiSize.depth = 1; - - NW_Image_Epoc32Canned_t* simpleImage = - NW_Image_Epoc32Canned_New (gdiSize, - bitmap, - mask, - NW_TRUE, - NW_FALSE, - ERecognizedImage, - NULL, - 0); - NW_THROW_OOM_ON_NULL(simpleImage, status); - - thisObj->dictionary[ii] = NW_Image_AbstractImageOf( simpleImage ); - } - } - NW_CATCH(status) - { - delete bitmap; - /* remove all loaded images in the dictionary */ - for (ii=0; ii<NW_Image_NumberOfCannedImages; ii++) - { - if (thisObj->dictionary[ii]!=NULL) - { - NW_Image_Epoc32Canned_Destroy(thisObj->dictionary[ii]); - NW_Object_Delete(thisObj->dictionary[ii]); - thisObj->dictionary[ii]=NULL; - } - } - } - NW_FINALLY - { - /* Delete folder buffer */ - delete mbmFile; - - return status; - } - NW_END_TRY -} - -NW_Image_CannedImages_t* -NW_Image_CannedImages_New() -{ - return (NW_Image_CannedImages_t*) - NW_Object_New (&NW_Image_CannedImages_Class); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/Epoc32ImageDecoder.cpp --- a/webengine/wmlengine/src/image/src/Epoc32ImageDecoder.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1280 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* CEpoc32ImageDecoder class - * - * Every non-canned image has an image decoder associated with it. This is opened - * when the image is created in order to get the size. This is an asynchronous - * operation; "OpenComplete" is called when the opening is complete. - * - * The first time an image is displayed, "Decode" is called, which starts the - * asynchrounous decoding process. When this completes, the image object is - * updated with the decoded image, which then causes the new image to be - * displayed. - * - * A decode is also done every time the frame number of an animated image is - * changed. - */ -#include <bitdev.h> -#include <e32math.h> -#include "Epoc32ImageDecoder.h" -#include "nw_hed_contenthandler.h" -#include "nwx_logger.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" -#include "MVCShell.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_statuscodeconvert.h" -#include "nw_dom_attribute.h" -#include "nw_dom_element.h" -#include "Oma2Agent.h" -#include "nwx_ctx.h" - - - -/* The Media server seems to return a value larger than this if the animation - * should end; it is 0xffff x 10; I'm not sure if this is significant. I didn't - * find any documentation for this. */ -#define MAXIMUM_DELAY 655350 - -_LIT8(KWbmpMimeType, "image/vnd.wap.wbmp"); -_LIT8(KOtaMimeType, "image/vnd.nokia.ota-bitmap"); - -/* ------------------------------------------------------------------------- */ - -/* find context box for finding the DOM Tree */ -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_LMgr_ImageCH_Epoc32ContentHandler_FindContextBox_Decoder( NW_HED_DocumentNode_t* documentNode, - void* context ) - { - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* contextBox = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - - box = NW_HED_ContentHandlerOf( documentNode )->boxTree; - if(NW_LMgr_BoxVisitor_Initialize( &boxVisitor, box ) != KBrsrSuccess ) - { - return NULL; - } - while( ( box = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, 0 ) ) != NULL ) - { - if( ( NW_Object_IsInstanceOf( box, &NW_LMgr_ContainerBox_Class ) && - !NW_Object_IsInstanceOf( box->propList, &NW_LMgr_SlavePropertyList_Class ) ) - || NW_Object_IsClass( box, &NW_FBox_ImageButtonBox_Class ) - || NW_Object_IsDerivedFrom( box, &NW_LMgr_ImgContainerBox_Class ) ) - { - NW_LMgr_PropertyValueType_t type = NW_CSS_ValueType_Object; - NW_LMgr_PropertyValue_t value; - if( NW_LMgr_Box_GetPropertyValue( box, NW_CSS_Prop_elementId, type, &value ) == KBrsrSuccess ) - { - if( type == NW_CSS_ValueType_Object && value.object == context || - type == NW_CSS_ValueType_Integer && value.integer == NW_INT32_CAST(context) ) - { - // We found a box that has element Id same as context - contextBox = box; - break; - } - } - } - } - return contextBox; - } - - /* - * Get <img> attribute information from the box tree - * -*/ - -TInt CEpoc32ImageDecoder::ImgAttrInfo() - { - NW_Image_AbstractImage_t* abstractImage = NULL; - NW_Image_IImageObserver_t* imageObserver = NULL; - NW_ImageCH_Epoc32ContentHandler_t* imgaeCHContentHandler = NULL; - NW_HED_DocumentNode_t* documentNode = NULL; - NW_LMgr_Box_t* cannedImageBox = NULL; - NW_ADT_Vector_Metric_t numItems; - TBrowserStatusCode status; - TInt error = KErrNone; - - abstractImage = NW_Image_AbstractImageOf( iImage ); - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( abstractImage->imageObserverList ) ); - if(numItems > 0) - { - imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( abstractImage->imageObserverList ), 0 );//Take first one as this is prossed - - NW_ASSERT( imageObserver ); - - imgaeCHContentHandler = (NW_ImageCH_Epoc32ContentHandler_t*)NW_Object_Interface_GetImplementer( imageObserver ); - - if(NW_Object_IsInstanceOf( imgaeCHContentHandler, &NW_ImageCH_Epoc32ContentHandler_Class ) ) - { - documentNode = NW_HED_DocumentNodeOf( imgaeCHContentHandler )->parent; - - cannedImageBox= - NW_LMgr_ImageCH_Epoc32ContentHandler_FindContextBox_Decoder( documentNode, imgaeCHContentHandler->context ); - } - }/*end if(numItems > 0)*/ - - if(cannedImageBox) - { - - NW_LMgr_PropertyValue_t value; - value.object = NULL; - - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf( cannedImageBox ), NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - - if (value.object) - { - - NW_Uint16 nodeToken; - NW_Uint16 attrToken = 0; - NW_DOM_AttributeListIterator_t listIter; - NW_DOM_AttributeHandle_t attrHandle; - NW_String_t attrValueStr; - NW_Uint32 attrEncoding; - NW_Ucs2 *ucs2AttrVal = NULL; - NW_DOM_ElementNode_t* elementNode = (NW_DOM_ElementNode_t*)value.object; - nodeToken = NW_DOM_Node_getNodeToken(elementNode); - if(nodeToken == NW_XHTML_ElementToken_img) - { - if (NW_DOM_ElementNode_hasAttributes(elementNode) ) - { - /* Go through all the attributes and check for height and width */ - - status = StatusCodeConvert(NW_DOM_ElementNode_getAttributeListIterator(elementNode, &listIter) ); - - - if(status == KBrsrSuccess) - { - while (NW_DOM_AttributeListIterator_getNextAttribute(&listIter, &attrHandle) - == NW_STAT_WBXML_ITERATE_MORE) - { - attrToken = NW_DOM_AttributeHandle_getToken(&attrHandle); - if( (attrToken == NW_XHTML_AttributeToken_width) || - (attrToken == NW_XHTML_AttributeToken_height) ) - { - attrEncoding = NW_DOM_AttributeHandle_getEncoding(&attrHandle); - status = StatusCodeConvert(NW_DOM_AttributeHandle_getValue(&attrHandle, &attrValueStr) ); - - if(status != KBrsrSuccess) - { - error = KErrGeneral; - goto imgAttrInfoFinal; - } - status = StatusCodeConvert( NW_String_stringToUCS2Char(&attrValueStr, attrEncoding, &ucs2AttrVal) ); - - if(status != KBrsrSuccess) - { - error = KErrGeneral; - goto imgAttrInfoFinal; - } - - if(attrToken == NW_XHTML_AttributeToken_width) - { - iImage->srcWidth = NW_Str_Atoi(ucs2AttrVal); - } - else if(attrToken == NW_XHTML_AttributeToken_height) - { - iImage->srcHeight = NW_Str_Atoi(ucs2AttrVal); - } - - if(NW_String_getStorage(&attrValueStr) != NULL) - { - NW_String_deleteStorage(&attrValueStr); - } - - if(ucs2AttrVal != NULL) - { - NW_Mem_Free(ucs2AttrVal); - } - } - }/*end while*/ - - }/*end if(status == KBrsrSuccess)*/ - else - { - error = KErrGeneral; - goto imgAttrInfoFinal; - } - - } /*end if (NW_DOM_ElementNode_hasAttributes(elementNode) )*/ - }/*end if(nodeToken == NW_XHTML_ElementToken_img)*/ - - - }/*end if(value.object) */ - }/*end if(cannedImageBox)) */ -imgAttrInfoFinal: - - if( cannedImageBox ) - { - // scale images if they are wider than the screen width in small screen mode - // do not scale if image size is specified by the markup - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( cannedImageBox ); - NW_ASSERT( rootBox != NULL ); - // image scaling only applies to small screen layout - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext( rootBox ); - NW_ASSERT( deviceContext != NULL ); - const NW_GDI_Rectangle_t* rectangle = deviceContext->DisplayBounds(); - // check if the image is scalable. if the width/height proporition is bigger - // than 10, then we do not scale no matter how big the image is - TInt imagProp = Max( iFrameInfo.iOverallSizeInPixels.iHeight / iFrameInfo.iOverallSizeInPixels.iWidth, - iFrameInfo.iOverallSizeInPixels.iWidth / iFrameInfo.iOverallSizeInPixels.iHeight ); - // - if( imagProp < 10 && - iFrameInfo.iOverallSizeInPixels.iWidth > rectangle->dimension.width ) - { - // scale the image down close to the screen width - // - // As per Symbian code, the height and width can't be reduced more - // than 1/8 th of original size. It is found that Symbian currently - // handling size 1/8, 1/4, 1/2 or original frame size correctly. Also, - // width and height need to reduce in ratio (e.g. if width is reduced by half then - // height need to reduce by half). So,used the following alogorithm. - - TInt halfHeight = (iFrameInfo.iOverallSizeInPixels.iHeight + 1)/2; - TInt halfWidth = (iFrameInfo.iOverallSizeInPixels.iWidth + 1)/2; - TInt oneFourHeight = (iFrameInfo.iOverallSizeInPixels.iHeight + 3)/4; - TInt oneFourWidth = (iFrameInfo.iOverallSizeInPixels.iWidth + 3)/4; - TInt oneEightHeight = (iFrameInfo.iOverallSizeInPixels.iHeight + 7)/8; - TInt oneEightWidth = (iFrameInfo.iOverallSizeInPixels.iWidth + 7)/8; - - if( rectangle->dimension.width > halfWidth) - { - iImage->srcHeight = iFrameInfo.iOverallSizeInPixels.iHeight; - iImage->srcWidth = iFrameInfo.iOverallSizeInPixels.iWidth; - } - else - { - if( rectangle->dimension.width > oneFourWidth) - { - iImage->srcHeight = halfHeight; - iImage->srcWidth = halfWidth; - } - else if( rectangle->dimension.width > oneEightWidth) - { - iImage->srcHeight = oneFourHeight; - iImage->srcWidth = oneFourWidth; - } - else - { - iImage->srcHeight = oneEightHeight; - iImage->srcWidth = oneEightWidth; - } - } - } - } - } - return error; - - }/*end IMG_ATTR_INFO()*/ - -/* - * NewL - * - * Creates a new CEpoc32ImageDecoder object - * - * Parameters: - * aImage: associated OOC image object - * - * Returns: - * New image decoder - */ -CEpoc32ImageDecoder* CEpoc32ImageDecoder::NewL(NW_Image_Epoc32Simple_t* aImage) -{ - - CEpoc32ImageDecoder* self = new (ELeave) CEpoc32ImageDecoder(aImage); - CleanupStack::PushL(self); - self->ConstructL(); - - CleanupStack::Pop(); //self - - return self; -} - -/* - * ConstructL - * - * Creates image converter, wait object, and opens connection - * to image converter. - */ -void CEpoc32ImageDecoder::ConstructL() - { - CActiveScheduler::Add( this ); - // open is called by whoever intialized this dedoder. This changes was introduced by - // the "image open started - open completed" queueing functionality. - // OpenL(); - // CreateComplete(); - } - -/* - * CEpoc32ImageDecoder::CEpoc32ImageDecoder - * - * Constructor - */ -CEpoc32ImageDecoder::CEpoc32ImageDecoder(NW_Image_Epoc32Simple_t* aImage) : CActive ( CActive::EPriorityLow + 1 ), - iState(ID_IDLE), - iImageConverter(NULL), - iImage(aImage), - iImageDataPtr((const TUint8 *)NW_Image_Epoc32Simple_GetRawData(aImage), NW_Image_Epoc32Simple_GetRawDataLength(aImage)), - iIsAnimated(NW_FALSE), - iCurrentFrame(0), - iBitmap(NULL), - iMask(NULL), - iImageHasNotBeenOpened(NW_TRUE), - iMoreData( EFalse ), - iFirstFrameComplete( EFalse ), - iRawDataComplete( EFalse ), - iDRMOutBuf(NULL), - iFinished(EFalse) - { - } - - - -void CEpoc32ImageDecoder::DeleteImageConverterBitmapMask() - { - if (iImageConverter != NULL) - { - /* Closing image converter. Cancels any outstanding operation */ - iImageConverter->Cancel(); - delete iImageConverter; - iImageConverter = NULL; - } - delete iBitmap; - delete iMask; - iBitmap = NULL; - iMask = NULL; - // call shell to do some compress on heap ( prevent memory fregmentation ) - CShell* shellInstance = REINTERPRET_CAST(CShell*, (NW_Ctx_Get(NW_CTX_BROWSER_APP, 0))); - NW_ASSERT( shellInstance != NULL ); - shellInstance->StartIdle(); - } - - -/* - * CEpoc32ImageDecoder::CEpoc32ImageDecoder - * - * Destructor. Closes image converter, stops wait object, frees - * data. - */ -CEpoc32ImageDecoder::~CEpoc32ImageDecoder() - { - Cancel(); - DeleteImageConverterBitmapMask(); - delete[] iDRMOutBuf; - iDRMOutBuf = NULL; - } - - - -/* - * Function for handling the DRM images. - * This function checks if image is DRM - * then handle this. - * - * - */ - -TInt CEpoc32ImageDecoder::CheckForDRMImage() -{ - TInt error = KErrNone; - using namespace ContentAccess; - RArray<ContentAccess::TAgent> agents; - TInt i; - HBufC8 *DRMInBuf; - TPtr8 ptrInBuf(NULL,0,0); - TInt inBufLen = 0; - TRequestStatus status; - TInt contentMgrErr = KErrNone; - TAgent agentDRM; - TInt drmDeCryptBufLen = 0; - - if(iDRMOutBuf != NULL) - { - delete iDRMOutBuf; - iDRMOutBuf = NULL; - } - - drmDeCryptBufLen = iImageDataPtr.Size()+256; - iDRMOutBuf = new (ELeave) TUint8[drmDeCryptBufLen]; - - - //One more byte than the original buffer for DRM code - inBufLen = iImageDataPtr.Size() + 1; - DRMInBuf = HBufC8::NewL(inBufLen + 1); - - ptrInBuf.Set(DRMInBuf->Des() ); - ptrInBuf.Append(EView); - ptrInBuf.Append( (const TUint8 *) iImageDataPtr.Ptr(), iImageDataPtr.Size()); - TPtr8 ptrOutBuf(iDRMOutBuf,0, drmDeCryptBufLen ); - - ContentAccess::CManager* manager = - (ContentAccess::CManager*) NW_Ctx_Get(NW_CTX_CONT_ACCESS_MGR, 0); - - manager->ListAgentsL( agents ); - - for (i = 0; i < agents.Count(); i++) - { - if (agents[i].Name().Compare(KOmaDrm2AgentName) == 0) - { - agentDRM = agents[i]; - break; - } - } - - - manager->AgentSpecificCommand( agentDRM, EBufferContainsOma1Dcf, - iImageDataPtr ,ptrOutBuf, status); - - User::WaitForRequest(status); - - if(status == KErrNone) - { - //Now decrypt the buffer. - contentMgrErr = manager->AgentSpecificCommand( agentDRM, EDecryptOma1DcfBuffer, - ptrInBuf,ptrOutBuf); - if(contentMgrErr == KErrNone) - { - iImageDataPtr.Set((const TUint8*) ptrOutBuf.Ptr(),ptrOutBuf.Size()); - delete iImageConverter; - iImageConverter = NULL; - TRAP(error, iImageConverter = CBufferedImageDecoder::NewL(iRfs)) - if(error == KErrNone) - { - TRAP(error, iImageConverter->OpenL(iImageDataPtr)); - } - } - else - { - error = contentMgrErr; - } - - } - agents.Close(); - delete DRMInBuf; - DRMInBuf = NULL; - - return error; -} - - -/* - * Open - * - * Returns: - * - */ -void CEpoc32ImageDecoder::Open() - { - TInt error = KErrNone; - - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::Open started"); - if (iImageHasNotBeenOpened && iImage) - { - // inform the observer - NW_Image_AbstractImage_ImageOpenStarted(NW_Image_AbstractImageOf(iImage)); - } - - // create image converter - if (!iImageConverter) - { - // Symbian API requires a handle to RFs, but it is never used. - // iRFs is not connected to the server - iImageDataPtr.Set((const TUint8 *)NW_Image_Epoc32Simple_GetRawData(iImage), - NW_Image_Epoc32Simple_GetRawDataLength(iImage)); - - if (iImage->imageType == EWbmpImage) - { - // We have a WBMP image - TRAP(error, iImageConverter = CBufferedImageDecoder::NewL(iRfs)) - if (error == KErrNone) - { - TRAP(error, iImageConverter->OpenL(iImageDataPtr, KWbmpMimeType())); - if(error != KErrNone) - { - error = CheckForDRMImage(); - } /*end if(error != KErrNone)*/ - } - }/*end if (iImage->imageType == EWbmpImage)*/ - else if (iImage->imageType == EOtaImage) - { - // We have a OTA image - TRAP(error, iImageConverter = CBufferedImageDecoder::NewL(iRfs)) - if (error == KErrNone) - { - TRAP(error, iImageConverter->OpenL(iImageDataPtr, KOtaMimeType())); - if(error != KErrNone) - { - error = CheckForDRMImage(); - } /*end if(error != KErrNone)*/ - } - } /*end else if (iImage->imageType == EOtaImage)*/ - else - { - TRAP(error, iImageConverter = CBufferedImageDecoder::NewL(iRfs)) - if (error == KErrNone) - { - - TRAP(error, iImageConverter->OpenL(iImageDataPtr)); - - if(error != KErrNone) - { - error = CheckForDRMImage(); - } /*end if(error != KErrNone)*/ - } /*end if (error == KErrNone)*/ - } /*end else*/ - - // check if open completed - if (error == KErrNone && !iImageConverter->ValidDecoder()) - { - error = KErrUnderflow; - } - CreateComplete(error); - } - else if (!iImageConverter->ValidDecoder()) - { - CreateComplete(KErrUnderflow); - } - else - { - CreateComplete(KErrNone); - } - } - -/* - * Decode - * - * Non-leaving version of DoDecodeL - * - * Returns: - * KErrNone on success, error code otherwise. - */ -TInt CEpoc32ImageDecoder::Decode() - { - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::Decode started"); - TInt error = KErrNone; - if( !iImageConverter ) - { - // no converter - Open(); - } - else if( !iImageConverter->ValidDecoder() ) - { - // no decoder - // check if the decoder is being created - // if not then call open again. - if( !IsActive() ) - { - CreateComplete( KErrUnderflow ); - } - } - else if (iState == ID_IDLE) - { - TRAP(error, DoDecodeL()); - } - if (error != KErrNone) - { - DeleteImageConverterBitmapMask(); - } - return error; -} - -/* - * imageSizeCheck - * - * Check the size of the image and take actions accordingly - */ - - - NW_Bool CEpoc32ImageDecoder::ImageSizeCheck(TSize aFrameInfoOverallSize, TSize* currSize) - { - NW_Bool reSizing = NW_FALSE; - - /* As per Symbian code, the height and width can't be reduced more - than 1/8 th of original size. It is found that Symbian currently - handling size 1/8, 1/4, 1/2 or original frame size correctly. Also, - width and height need to reduce in ratio (e.g. if width is reduced by half then - height need to reduce by half). So,used the following alogorithm. - */ - - TInt halfHeight = (aFrameInfoOverallSize.iHeight + 1)/2; - TInt halfWidth = (aFrameInfoOverallSize.iWidth + 1)/2; - TInt oneFourHeight = (aFrameInfoOverallSize.iHeight + 3)/4; - TInt oneFourWidth = (aFrameInfoOverallSize.iWidth + 3)/4; - TInt oneEightHeight = (aFrameInfoOverallSize.iHeight + 7)/8; - TInt oneEightWidth = (aFrameInfoOverallSize.iWidth + 7)/8; - - - if( (iImage->srcWidth > 0) && (iImage->srcHeight > 0) ) - { - reSizing = NW_TRUE; - - if( (iImage->srcHeight > halfHeight) || (iImage->srcWidth > halfWidth)) - { - currSize->iHeight = aFrameInfoOverallSize.iHeight; - currSize->iWidth = aFrameInfoOverallSize.iWidth; - } - else if( (iImage->srcHeight > oneFourHeight) || (iImage->srcWidth > oneFourWidth) ) - { - currSize->iHeight = halfHeight; - currSize->iWidth = halfWidth; - } - else if( (iImage->srcHeight > oneEightHeight) || (iImage->srcWidth > oneEightWidth) ) - { - currSize->iHeight = oneFourHeight; - currSize->iWidth = oneFourWidth; - } - else - { - /*Can't be less than 1/8th of size */ - currSize->iHeight = oneEightHeight; - currSize->iWidth = oneEightWidth; - } - - - } /*end if( (iImage->srcWidth > 0) && (iImage->srcHeight > 0) )*/ -//finalImageSize: - return reSizing; - - } -/* - * DoDecodeL - * - * Starts decoding image. When completed, the function "ConvertComplete" - * will be called. - * - * Returns: - * KErrNone on success, error code otherwise. - */ -void CEpoc32ImageDecoder::DoDecodeL() -{ - TInt error; - NW_Bool actualSizing; - TSize currSize; - - - // check animation only if we've got all the data - if( iRawDataComplete ) - { - CheckAnimation(); - } - - actualSizing = ImageSizeCheck(iFrameInfo.iOverallSizeInPixels, &currSize); - - iBitmap = new (ELeave) CFbsBitmap(); - - if(actualSizing == NW_TRUE) - { - error = iBitmap->Create( currSize, GetDisplayMode(iFrameInfo) ); - } - else - { - error = iBitmap->Create( iFrameInfo.iOverallSizeInPixels, GetDisplayMode(iFrameInfo) ); - } - - if(error != KErrNone) - { - User::LeaveIfError(error); - } - - if ( iFrameInfo.iFlags & TFrameInfo::ETransparencyPossible ) - { - iMask = new (ELeave) CFbsBitmap(); - - TSize imageSize = actualSizing ? (currSize) : (iFrameInfo.iOverallSizeInPixels); - - // A mask cannot have a color. See comment in ImageConversionPriv.cpp - if (iFrameInfo.iFlags & TFrameInfo::EAlphaChannel) - { - User::LeaveIfError(iMask->Create( imageSize, EGray256)); - } - else - { - User::LeaveIfError(iMask->Create( imageSize, EGray2)); - } - - iImageConverter->Convert(&iStatus, *iBitmap, *iMask, iCurrentFrame); - SetActive(); - iState = ID_DECODING; - } - else - { - iMask = NULL; - iImageConverter->Convert(&iStatus, *iBitmap, iCurrentFrame); - SetActive(); - iState = ID_DECODING; - } -} - - -/* - * GetLoopCount - * - * Checks for presence of a netscape 2.0 extension header which - * contains a loop count. If a loop count value is found, then - * use that value to determine the loop count, otherwise default to - * looping 1x. - * - * This code maps loop counts as they are expressed in image files (both - * with and without the netscape 2.0 extension header present) to a - * loop count that can be used internally. - * - * Specifically for animated images, - * - * if the netscape 2.0 extension header is present, - * an extension header value of 0 maps to -1 (infinite loop) - * an extension header value of N maps to N+1 - * - * if the extension header is not present, - * set loop count to 1 (same behavior as IE or opera) - * - * For non-animated images, loop count is set to 0. - * - */ -TInt16 CEpoc32ImageDecoder::GetLoopCount() -{ - if(!iIsAnimated) - { - return 0; /* no animation = no looping */ - } - - /* have a loop, figure out count */ - - /* first see if have a netscape 2.0 extension header */ - TInt16 loopCountFromFile=0; - const TUint8 extString[] = { 'N', 'E', 'T', 'S', 'C', 'A', 'P','E','2','.','0','\3','\1' }; - const TInt sizeofextString = sizeof(extString); - - TPtrC8 rawDataPtr((TUint8*)iImage->rawData, iImage->rawDataLength); - TInt offset = rawDataPtr.Find(extString, sizeofextString); - if(offset != KErrNotFound) - { - /* found a header, get the loop count - - (the loop count is in the 2 bytes following the header string listed above, - stored low byte then high byte) - */ - loopCountFromFile = (TInt16)((rawDataPtr[offset+sizeofextString+1] * 256) + - rawDataPtr[offset+sizeofextString]); - if(loopCountFromFile != 0) - { - return ++loopCountFromFile; /* +1 to make it 1 based rather than 0 based */ - } - else - { - /* 0 indicates infinite - map to internal loop count infinite value */ - return -1; - } - } - else - { - /* no header found, assume 1x thru loop */ - return 1; - } -} - - -/* - * CheckAnimation - * - * Checks to see if an image is animated, then notifies the owner - * (an NW_Image_Epoc32Simple object). - */ -void CEpoc32ImageDecoder::CheckAnimation() -{ - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::CheckAnimation started"); - - // check if the header needs further processing - if( !iImageConverter->IsImageHeaderProcessingComplete() ) - { - iImageConverter->ContinueProcessingHeaderL(); - } - - /* Get the current frame information from the image converter */ - iFrameInfo = iImageConverter->FrameInfo( iCurrentFrame ); - - /* FrameCount() doesn't return number of frames, it returns the - * number of frames it has discovered so far - we won't know if - * it's animated until after the first frame is converted. - */ - TUint frames = iImageConverter->FrameCount(); - NW_LOG2(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::CheckAnimation: iIsAnimated = %d frameCount = %d", ((TInt)((iIsAnimated)?1:0)), frames); - if( ( iIsAnimated || (frames > 1)) && !iFinished) - { - TInt64 delay = iFrameInfo.iDelay.Int64() / TInt64(1000); - NW_Int32 delay32 = I64INT(delay); - - iIsAnimated = (delay32 < MAXIMUM_DELAY); - - NW_Image_Epoc32Simple_SetAnimation(NW_Image_AbstractImageOf(iImage), iIsAnimated, - delay32 ); - } - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::CheckAnimation ending"); -} - -/* - * IncrementImage - * - * Called on an animated image to display the next image. - * - * Returns: - * Sets startingFrameSequenceOver to T if the frame sequence - * is started over otherwise it is set to F. - * - * KErrNone on success, error code otherwise. - */ -NW_Bool CEpoc32ImageDecoder::IncrementImage(NW_Bool& startingFrameSequenceOver) -{ - if(iImageConverter != NULL) - { - - startingFrameSequenceOver = NW_FALSE; - - /* Don't do anything if we are in the process of decoding an image. */ - if (iState != ID_IDLE || iImageConverter == NULL) - { - return NW_FALSE; - } - - /* Increment the image. */ - iCurrentFrame++; - - /* If reached the end, go back to the beginning. Note, the method - * "FrameCount" returns the number of frames discovered so far. - */ - if (iCurrentFrame >= (TUint)iImageConverter->FrameCount()) - { - iCurrentFrame = 0; - startingFrameSequenceOver = NW_TRUE; - } - - return NW_TRUE; -} - else - { - return NW_FALSE; - } -} - - -/* - * PartialNextChunkL - * new chunk of raw data - */ -void CEpoc32ImageDecoder::PartialNextChunkL( NW_Buffer_t* aNextChunk ) - { - // append the incoming raw data to the image converter's buffer - if( iImageConverter ) - { - TPtrC8 nextChunk; - nextChunk.Set( aNextChunk->data, aNextChunk->length ); - - iImageConverter->AppendDataL( nextChunk ); - - // convert the first frame and wait for all the raw data - // if the image is animated - if( !iFirstFrameComplete ) - { - // if the converter is busy then just set the flag indicating - // that we received more raw data - if( iState == ID_IDLE ) - { - // check if the decoder has already been created - if( iImageConverter->ValidDecoder() ) - { - TRequestStatus* status = &iStatus; - iState = ID_DECODING; - // more image data - iImageConverter->ContinueConvert( status ); - SetActive(); - } - else - { - // no decoder means not enough info came in. let's continue open. - iState = ID_INITIALIZING; - TRAPD( error, iImageConverter->ContinueOpenL() ); - if( error != KErrNone ) - { - // if ContinueOpenL leaves we need to inform the observer that the open failed - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( iImage ), NW_TRUE, - NW_Image_AbstractImage_SuppressDupReformats_Default ); - User::Leave( error ); - } - CreateComplete( iImageConverter->ValidDecoder() ? KErrNone : KErrUnderflow ); - } - } - else - { - // converter is busy - iMoreData = ETrue; - } - } - } - } - - -/* - * ImageDataComplete - * end of raw data - */ -void CEpoc32ImageDecoder::ImageDataComplete() - { - // this function checks if an image needs further processing - // ( for examp if an animated image comes in multiple chunks ) - iRawDataComplete = ETrue; - -#ifdef INCREMENTAL_IMAGE_ON - // check if the imageconverter is available and get the converting status - if( iImageConverter ) - { - // return if the converter is busy - if( iState == ID_IDLE && iFirstFrameComplete ) - { - // no more data. let's check if the image is animated - CheckAnimation(); - - // If it's not animated, there is no further use for the converter - if( !iIsAnimated ) - { - delete iImageConverter; - iImageConverter = NULL; - } - else - { - // set loop count - NW_Image_AbstractImage_SetLoopCount( NW_Image_AbstractImageOf( iImage ), - GetLoopCount() ); - // fake image decode forces the image box to refresh. - // otherwise the animation just does not start up - // inform the observers - NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImageOf( iImage ), NW_FALSE ); - } - } - } -#else // INCREMENTAL_IMAGE_ON - Open(); -#endif // INCREMENTAL_IMAGE_ON - } - -/* - * ConvertComplete - * - * Image decode has completed. Transfers ownership of the bitmaps - * back to the OOC image object, which causes the image to be drawn. - * - * Parameters: - * aError: Error code from conversion - */ -void CEpoc32ImageDecoder::ConvertComplete() - { - iState = ID_IDLE; - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::ConvertComplete started"); - - switch (iStatus.Int()) - { - case KErrNone: - { - if( iBitmap ) - { - // check animation only if we've got all the data - if( iRawDataComplete ) - { - NW_LOG1(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::ConvertComplete: Calling CheckAnimation. iFirstFrameComplete = %d", ((TInt)((iFirstFrameComplete)?1:0))); - - CheckAnimation(); - // set loop if the data are already complete and - // this is the first frame as it means that - // the last chunk came in while we were busy either - // with opening or with decoding the first frame - if( !iFirstFrameComplete ) - { - // set loop count - NW_Image_AbstractImage_SetLoopCount( NW_Image_AbstractImageOf( iImage ), - GetLoopCount() ); - } - } - /* Transfer ownership of bitmaps to OOC object */ - NW_Image_Epoc32Simple_SetBitmap(iImage, (void*)iBitmap, (void*)iMask, iCurrentFrame, (void*)&iFrameInfo, NW_TRUE ); - // inform the observers - NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImageOf( iImage ), NW_FALSE ); - // Transfer ownership of Bitmap and mask to OOC - iBitmap = NULL; - iMask = NULL; - iFirstFrameComplete = ETrue; - // - if( iIsAnimated == NW_FALSE ) - { - // Set the decode state after decoding complete - iState = ID_DECODE_COMPLETE; - DeleteImageConverterBitmapMask(); - } - } - break; - } - case KErrUnderflow: - { - - // When converting the operation can complete with KErrUnderflow, if there is - // insufficient information in the descriptor. In this situation, ContinueConvert() - // should be called repeatedly until the descriptor has accumulated enough information - // for ContinueConvert() to complete with KErrNone - - if( iBitmap ) - { - // partial image decoding - NW_Image_Epoc32Simple_SetBitmap(iImage, (void*)iBitmap, (void*)iMask, iCurrentFrame, (void*)&iFrameInfo, NW_FALSE ); - // DO NOT transfer ownership of Bitmap and mask to OOC - NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImageOf( iImage ), NW_FALSE ); - } - // check if more data is available - if( iMoreData ) - { - iState = ID_DECODING; - TRequestStatus* status = &iStatus; - iImageConverter->ContinueConvert( status ); - SetActive(); - iMoreData = EFalse; - } - break; - } - default: - { - DeleteImageConverterBitmapMask(); - break; - } - } - } - -/* - * OpenComplete - * - * Image open has completed. Tell the OOC image object of the image dimensions, - * and trigger the synchronous OpenL to continue. - * - * Parameters: - * aError: Error code from conversion - */ -void CEpoc32ImageDecoder::OpenComplete() - { - NW_GDI_Dimension3D_s size; - iState = ID_IDLE; - TSize currSize; - - - NW_LOG0(NW_LOG_LEVEL5, "CEpoc32ImageDecoder::OpenComplete started"); - switch( iStatus.Int() ) - { - case KErrNone: - { - iFrameInfo = iImageConverter->FrameInfo( iCurrentFrame ); - if(iImage->bitmap == NULL ){ - TInt error; - NW_Bool actualSizing; - TFrameInfo aFrameInfo = iImageConverter->FrameInfo(0); - actualSizing = ImageSizeCheck(aFrameInfo.iOverallSizeInPixels, &currSize); - - CFbsBitmap* pDestBitmap = new (ELeave) CFbsBitmap(); - if(actualSizing == NW_TRUE) { - error = pDestBitmap->Create( currSize, GetDisplayMode(aFrameInfo) ); - } - else{ - error = pDestBitmap->Create( aFrameInfo.iOverallSizeInPixels, GetDisplayMode(aFrameInfo) ); - } - iImage->bitmap = pDestBitmap; - if(iImage->mask == NULL && aFrameInfo.iFlags & TFrameInfo::ETransparencyPossible ){ - CFbsBitmap* pDestMask = new (ELeave) CFbsBitmap(); - TSize imageSize = actualSizing ? (currSize) : (aFrameInfo.iOverallSizeInPixels); - // A mask cannot have a color. See comment in ImageConversionPriv.cpp - if (aFrameInfo.iFlags & TFrameInfo::EAlphaChannel){ - User::LeaveIfError(pDestMask->Create( imageSize, EGray256)); - } - else{ - User::LeaveIfError(pDestMask->Create( imageSize, EGray2)); - } - iImage->mask = pDestMask; - } - } - - if( iImageHasNotBeenOpened ) - { - iImageHasNotBeenOpened = NW_FALSE; - size.depth = 1; - - ImgAttrInfo(); - - NW_Bool actualSizing = ImageSizeCheck(iFrameInfo.iOverallSizeInPixels, &currSize); - - - // default value of srcHeight and srcWidth; they will change is image is scaled - iImage->srcHeight = iFrameInfo.iOverallSizeInPixels.iHeight; - iImage->srcWidth = iFrameInfo.iOverallSizeInPixels.iWidth; - // set the original size - size.width = iFrameInfo.iOverallSizeInPixels.iWidth; - size.height = iFrameInfo.iOverallSizeInPixels.iHeight; - // - NW_Image_Epoc32Simple_SetSize(NW_Image_AbstractImageOf(iImage), &size); - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( iImage ), NW_FALSE, - NW_Image_AbstractImage_SuppressDupReformats_Default ); - // image open can force decoding. - //lint -e{774} Boolean within 'if' always evaluates to True - // iImageHasNotBeenOpened set to TRUE from NW_LMgr_ImageCH_Epoc32ContentHandler_HandleValidImageBox - // under special condition; do NOT delete iImageConverter in that case - if( !iImageHasNotBeenOpened && iState != ID_DECODING ) - { - DeleteImageConverterBitmapMask(); - } - } - else - { - TRAPD(error, DoDecodeL()); - if (error != KErrNone) - { - DeleteImageConverterBitmapMask(); - NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImageOf( iImage ), NW_TRUE ); - } - } - break; - } - case KErrUnderflow: - { - - // When opening the operation can complete with KErrUnderflow, if there is - // insufficient information in the descriptor. In this situation, ContinueOpen() - // should be called repeatedly until the descriptor has accumulated enough information - // for ContinueOpen() to complete with KErrNone - - // inform the observers - if( iMoreData ) - { - iState = ID_INITIALIZING; - TRAPD( error, iImageConverter->ContinueOpenL() ); - if( error != KErrNone ) - { - // if ContinueOpenL leaves we need to inform the observer that the open failed - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( iImage ), NW_TRUE, - NW_Image_AbstractImage_SuppressDupReformats_Default ); - User::Leave( error ); - } - CreateComplete( iImageConverter->ValidDecoder() ? KErrNone : KErrUnderflow ); - iMoreData = EFalse; - } - else //If there is no more data under the KErrUnderflow, it is an error such as corrupted data - { - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( iImage ), NW_TRUE, - NW_Image_AbstractImage_SuppressDupReformats_Default ); - } - - break; - } - default: - { - // we failed to open the image. let the observer know about it. - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( iImage ), NW_TRUE, - NW_Image_AbstractImage_SuppressDupReformats_Default ); - break; - } - } - } - -/* - * CreateComplete - * - * - */ -void CEpoc32ImageDecoder::CreateComplete( TInt aError ) -{ - TRequestStatus* status = &iStatus; - iState = ID_INITIALIZING; - User::RequestComplete( status, aError ); - SetActive(); -} - -/* - * GetDisplayMode - * - * Calculates display mode copying the logic from the image viewer - */ -TDisplayMode CEpoc32ImageDecoder::GetDisplayMode( TFrameInfo& aFrameInfo ) -{ - if( aFrameInfo.iFlags & TFrameInfo::ECanDither ) - { - if( aFrameInfo.iFrameDisplayMode < EColor64K ) - { - return aFrameInfo.iFrameDisplayMode; - } - else - { // This should come from settings - return EColor4K; - } - } - else - { - return aFrameInfo.iFrameDisplayMode; - } - } - -void CEpoc32ImageDecoder::RunL() - { - switch (iState) - { - case ID_INITIALIZING: - { - OpenComplete(); - break; - } - case ID_DECODING: - { - ConvertComplete(); - break; - } - default: - { - NW_ASSERT(0); - } - } - } - - -/* - * ResetImage - * - * Called on an animated image to display the last frame. -*/ -void CEpoc32ImageDecoder::ResetImage() -{ - iIsAnimated = NW_FALSE; - iCurrentFrame = (TUint)iImageConverter->FrameCount() - 1; - iFinished = ETrue; -} - -TBool CEpoc32ImageDecoder::Finished() -{ - return iFinished; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp --- a/webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,877 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "nw_image_epoc32simpleimagei.h" -#include "Epoc32ImageDecoder.h" -#include "nw_lmgr_rootbox.h" -#include "nw_hed_documentroot.h" -#include "HEDDocumentListener.h" -#include "nw_hed_contenthandler.h" -#include "nw_image_iimageobserver.h" -#include "nw_adt_resizablevector.h" -#include "GDIDevicecontext.h" - -#include "nw_gdi_types.h" - -#include <fbs.h> -#include <bitdev.h> -#include "BrsrStatusCodes.h" -#include "nwx_logger.h" -#include "MemoryManager.h" - - -// Forward declaration which can't be put inside header file without breaking -// compilation of OOC files. - -TBrowserStatusCode -scaleBitmap( CFbsBitmap* bitmap, CFbsBitmap** scaledBitmap, TRect* rect ); - - -void -_NW_Image_Epoc32SimpleImage_ImageOpened( NW_Image_AbstractImage_t* aAbstractImage, NW_Bool aFailed, - NW_Int16 aSuppressDupReformats ) - { - // add the image to out of view list - NW_Image_Epoc32Simple_t* thisObj = NW_Image_Epoc32SimpleOf (aAbstractImage); - - if (thisObj->docNodeList) - { - NW_HED_DocumentNode_t* docNode = - *(NW_HED_DocumentNode_t**)NW_ADT_Vector_ElementAt(thisObj->docNodeList, 0); - NW_ASSERT(docNode); - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode(docNode); - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(docRoot); - NW_LMgr_RootBox_AddToOutOfViewList(rootBox, aAbstractImage); - } - _NW_Image_AbstractImage_ImageOpened(aAbstractImage, aFailed, aSuppressDupReformats ); - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Image_Epoc32Simple_Class_t NW_Image_Epoc32Simple_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_AbstractImage_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Image_Epoc32Simple_t), - /* construct */ _NW_Image_Epoc32Simple_Construct, - /* destruct */ _NW_Image_Epoc32Simple_Destruct - }, - { /* NW_Image_Abstract */ - /* getSize */ _NW_Image_Epoc32Simple_GetSize, - /* draw */ _NW_Image_Epoc32Simple_Draw, - /* drawScaled */ _NW_Image_Epoc32Simple_DrawScaled, - /* drawInRect */ _NW_Image_Epoc32Simple_DrawInRect, - /* incrementImage */ _NW_Image_Epoc32Simple_IncrementImage, - /* getLoopCount */ _NW_Image_AbstractImage_GetLoopCount, - /* setLoopCount */ _NW_Image_AbstractImage_SetLoopCount, - /* getDelay */ _NW_Image_AbstractImage_GetDelay, - /* isAnimated */ _NW_Image_AbstractImage_IsAnimated, - /* setImageObserver */ _NW_Image_AbstractImage_SetImageObserver, - /* removeImageObserver */ _NW_Image_AbstractImage_RemoveImageObserver, - /* imageOpened */ _NW_Image_Epoc32SimpleImage_ImageOpened, - /* imageSizeChanged */ _NW_Image_AbstractImage_ImageSizeChanged, - /* imageDecoded */ _NW_Image_AbstractImage_ImageDecoded, - /* imageOpenStarted */ _NW_Image_AbstractImage_ImageOpenStarted, - /* forceImageDecode */ _NW_Image_Epoc32Simple_ForceImageDecode - }, - { /* NW_Image_Simple */ - /* partialNextChunk */ _NW_Image_Epoc32Simple_PartialNextChunk - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_Image_Epoc32Simple_Construct (NW_Object_Dynamic_t* dynamicObject, va_list *argp) - { - NW_TRY(status) - { - NW_Image_Epoc32Simple_t* thisObj; - NW_HED_DocumentNode_t* documentNode; - - // parameter assertion block - NW_ASSERT(NW_Object_IsInstanceOf(dynamicObject, &NW_Image_Epoc32Simple_Class)); - NW_ASSERT(argp != NULL); - - // for convenience - thisObj = NW_Image_Epoc32SimpleOf (dynamicObject); - - // initialize the member variables - // Won't know if image is animated until after it is opened by decoder - NW_Image_AbstractImageOf(thisObj)->isAnimated = NW_FALSE; - thisObj->prevFlags = 0; - thisObj->needsDecode = NW_FALSE; - thisObj->imageDecoding = NW_FALSE; - - NW_GDI_Dimension3D_t size = va_arg (*argp, NW_GDI_Dimension3D_t); - thisObj->size = size; - - const void* bitmap = va_arg (*argp, const void*); - thisObj->bitmap = bitmap; - - const void* mask = va_arg (*argp, const void*); - thisObj->mask = mask; - - thisObj->invertedMask = (NW_Bool)va_arg (*argp, NW_Uint32); - - // "isTransparent" doesn't appear to be used by any Epoc code - NW_Bool isTransparent = (NW_Bool)va_arg (*argp, NW_Uint32); - (void)isTransparent; - - // Do we have a image type that isn't recognized by Symbian, but we handle - thisObj->imageType = (TImageType)va_arg (*argp, NW_Uint32); - - // in order to make sure that we take rawData ownership, - // the code should not leave before this point. - thisObj->rawData = va_arg (*argp, void*); - thisObj->rawDataLength = va_arg (*argp, NW_Int32); - - documentNode = va_arg (*argp, NW_HED_DocumentNode_t*); - if (documentNode) - { - thisObj->docNodeList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof(void*), 10, 5 ); - // OOM check - NW_THROW_OOM_ON_NULL(thisObj->docNodeList, status); - - NW_THROW_OOM_ON_NULL(NW_ADT_DynamicVector_InsertAt(thisObj->docNodeList, - &documentNode, NW_ADT_Vector_AtEnd), status); - } - - // If the image is not provided, it needs to be converted from the raw data. - // Construct an image decoder to do this. - if (!thisObj->bitmap) - { - TRAPD(err, thisObj->decoder = CEpoc32ImageDecoder::NewL(thisObj)); - if (err == KErrNoMemory) - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - else if (err != KErrNone) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - - thisObj->srcHeight = 0; - thisObj->srcWidth = 0; - - // and finally invoke our superclass constructor - status = _NW_Image_AbstractImage_Construct(dynamicObject, argp); - - _NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_Epoc32Simple_Destruct (NW_Object_Dynamic_t* dynamicObject) - { - NW_Image_Epoc32Simple_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Image_Epoc32Simple_Class)); - - /* for convenience */ - thisObj = NW_Image_Epoc32SimpleOf (dynamicObject); - - // first notify the observers on the destroy event - NW_Image_AbstractImage_ImageDestroyed( NW_Image_AbstractImageOf( thisObj ) ); - - /* Delete decoder, rawData & images */ - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, thisObj->decoder); - delete decoder; - - NW_Image_Epoc32Simple_DestroyRawData( thisObj ); - - if( thisObj->docNodeList ) - { - NW_Object_Delete(thisObj->docNodeList); - } - - // image ownership is transfered when decoding completes. - if( thisObj->imageDecoding == NW_FALSE ) - { - CFbsBitmap* oldBitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)thisObj->bitmap); - delete oldBitmap; - CFbsBitmap* oldMask = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)thisObj->mask); - delete oldMask; - } - } - - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_PartialNextChunk( NW_Image_AbstractImage_t* image, - NW_Buffer_t* nextChunk ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Image_Epoc32Simple_t* thisObj; - - NW_ASSERT( NW_Object_IsInstanceOf( image, &NW_Image_Epoc32Simple_Class ) ); - - thisObj = NW_Image_Epoc32SimpleOf( image ); - NW_ASSERT( thisObj->decoder!= NULL ); - - // buffer chunks - void* tempBuffer; - tempBuffer = NW_Mem_Malloc( thisObj->rawDataLength + nextChunk->length ); - if( tempBuffer != NULL ) - { - // copy old buffer - NW_Mem_memcpy( tempBuffer, thisObj->rawData, thisObj->rawDataLength ); - // free old buffer - NW_Mem_Free( thisObj->rawData ); - // copy new chunk - NW_Mem_memcpy( ((NW_Byte*)tempBuffer) + thisObj->rawDataLength, - nextChunk->data, nextChunk->length ); - // set new buffer` - thisObj->rawData = tempBuffer; - // update length info - thisObj->rawDataLength+= nextChunk->length; - -#ifdef INCREMENTAL_IMAGE_ON - CEpoc32ImageDecoder* decoder = STATIC_CAST( CEpoc32ImageDecoder*, thisObj->decoder ); - - TRAPD( error, decoder->PartialNextChunkL( nextChunk ) ); - - if( error == KErrNoMemory ) - { - status = KBrsrOutOfMemory; - } - else if( error != KErrNone ) - { - status = KBrsrFailure; - } -#endif // INCREMENTAL_IMAGE_ON - - } - else - { - status = KBrsrOutOfMemory; - } - // release chunk - NW_Buffer_Free( nextChunk ); - - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_GetSize (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Epoc32Simple_Class)); - NW_ASSERT (size != NULL); - - /* set the size and return */ - *size = NW_Image_Epoc32SimpleOf (image)->size; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_Draw (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location) -{ - return NW_Image_AbstractImage_DrawInRect (image, deviceContext, location, NULL, NULL); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_DrawScaled (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size) -{ - return NW_Image_AbstractImage_DrawInRect (image, deviceContext, location, size, NULL); -} - -/* ------------------------------------------------------------------------- - * Function: _NW_Image_Epoc32Simple_DrawInRect - * Description: Draw scaled image on a certain location within a rectangle. - * - * @param image: the simple image to be drawn - * @param deviceContext: the device context object. - * @param location: the top-left point to start drawing - * @param size: the size to scale the image to. - * @param rect: the rectangle to draw the image within - * - * note: Both the parameters size and rect could be NULL. - * If the size is NULL, the image is not scaled before being drawn. - * If the rect is NULL, draw the entire image. -*/ -TBrowserStatusCode -_NW_Image_Epoc32Simple_DrawInRect (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size, - const NW_GDI_Rectangle_t* rect) -{ - NW_Image_Epoc32Simple_t* thisObj; - NW_GDI_ImageBlock_t imageBlock; - NW_GDI_Rectangle_t cropRect; - NW_Bool imageScaled = NW_FALSE; - NW_Bool imageOverlapped = NW_FALSE; - NW_GDI_Rectangle_t overlap; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Epoc32Simple_Class)); - NW_ASSERT (location != NULL); - - /* for convenience */ - thisObj = NW_Image_Epoc32SimpleOf (image); - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, thisObj->decoder); - - /* If there is a decoder, then the image needs to be decoded before displaying - * if not done already, or if "needsDecode" (animated image has moved on to - * next frame). Also, image is to be decoded based on the state of the decoder - */ - if (decoder != NULL && (thisObj->bitmap == NULL || thisObj->needsDecode || - (decoder->getDecoderState() != CEpoc32ImageDecoder::ID_DECODE_COMPLETE)&& - (decoder->getDecoderState() != CEpoc32ImageDecoder::ID_DECODING))) - { - decoder->Decode(); - } - - /* If there is already a bitmap, draw it. When the results of the decode operation - * come back this function will be called again; then there should be a bitmap. - */ - if( thisObj->bitmap ) - { - imageBlock.colPalette.data = NULL; - imageBlock.conversionStatus = NW_GDI_Image_ConversionRequired; - imageBlock.size = thisObj->size; - imageBlock.data = thisObj->bitmap; - imageBlock.mask = thisObj->mask; - imageBlock.invertedMask = thisObj->invertedMask; - - /* check if scaling required */ - if( size ) - { - // if the image is scaled for some reason, then we have to make sure - // that we are having the right size of it. - CFbsBitmap* realBitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)thisObj->bitmap); - TSize bitmapRealSize = realBitmap->SizeInPixels(); - - if( thisObj->size.width != size->width || thisObj->size.height != size->height || - bitmapRealSize.iWidth != size->width || bitmapRealSize.iHeight != size->height ) - { - NW_GDI_ImageBlock_t scaledImageBlock; - - // scale current data - status = deviceContext->ScaleImage ( size, &imageBlock, &scaledImageBlock); - - if (status == KBrsrSuccess) - { - imageScaled = NW_TRUE; - imageBlock.data = scaledImageBlock.data; - imageBlock.mask = scaledImageBlock.mask; - imageBlock.size = *size; - } - } - } - - /* if the parameter rect is NULL, we want to draw the entire image, - else we only want to draw the overlap of image and the showing rectangle */ - if (rect == NULL) - { - cropRect.point.x = 0; - cropRect.point.y = 0; - cropRect.dimension.width = imageBlock.size.width; - cropRect.dimension.height = imageBlock.size.height; - } - else - { - /* now based on the overlap of imageblock and showing rectangle, - calculate the crop rectangle which is used to crop the image, the - difference between the overlap and crop image is: crop image's - coordinates are relative to image not absolute. - example (as x, y, width, height) - rect (10, 10, 50, 50) - image (30, 30, 40, 40) - overlap area (30, 30, 30, 30) - crop rectangle ( 0, 0, 30, 30) - */ - imageOverlapped = TRUE; - overlap.point.x = (location->x > rect->point.x) ? location->x : rect->point.x; - overlap.point.y = (location->y > rect->point.y) ? location->y : rect->point.y; - - if (location->x + imageBlock.size.width > rect->point.x + rect->dimension.width) - overlap.dimension.width = rect->point.x + rect->dimension.width - overlap.point.x; - else - overlap.dimension.width = location->x + imageBlock.size.width - overlap.point.x; - - if (location->y + imageBlock.size.height > rect->point.y + rect->dimension.height) - overlap.dimension.height = rect->point.y + rect->dimension.height - overlap.point.y; - else - overlap.dimension.height = location->y + imageBlock.size.height - overlap.point.y; - - cropRect.point.x = overlap.point.x - location->x; - cropRect.point.y = overlap.point.y - location->y; - cropRect.dimension = overlap.dimension; - - /* if the rectangle and the image location does not overlap, return*/ - if (overlap.dimension.height <= 0 || overlap.dimension.width <= 0) - return KBrsrSuccess; - - /* if the rectangle and the image location does not overlap, return - if (rect->point.x > location->x + imageBlock.size.width || - rect->point.y > location->y + imageBlock.size.height || - location->x > rect->point.x + rect->dimension.width || - location->y > rect->point.y + rect->dimension.height) - return KBrsrSuccess; - - if (rect->point.x < location->x) - { - cropRect.point.x = 0; - cropRect.dimension.width = rect->point.x + rect->dimension.width - location->x ; - } - else - { - cropRect.point.x = rect->point.x - location->x; - cropRect.dimension.width = location->x + imageBlock.size.width - rect->point.x; - } - if (rect->point.y < location->y) - { - cropRect.point.y = 0; - cropRect.dimension.height = rect->point.y + rect->dimension.height - location->y; - } - else - { - cropRect.point.y = rect->point.y - location->y; - cropRect.dimension.width = location->y + imageBlock.size.height - rect->->point.y; - } - } - */ - /* do the draw */ - - } - - if (imageOverlapped) - deviceContext->DrawImage (&overlap.point, - &cropRect, - &imageBlock); - else - deviceContext->DrawImage (location, - &cropRect, - &imageBlock); - if (imageScaled) - { - CFbsBitmap* bitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)imageBlock.data); - delete bitmap; - CFbsBitmap* mask = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)imageBlock.mask); - delete mask; - } - } - return status; -} - -/* ------------------------------------------------------------------------- */ -/* _NW_Image_Epoc32Simple_IncrementImage - * - * Called on an animated image to cause it to move on to the next image. - * Tells the decoder to go to the next image, and sets "needsDecode" to - * NW_TRUE so that the decode will be done on the next attempt to draw. - */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_IncrementImage(NW_Image_AbstractImage_t* image) -{ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Epoc32Simple_Class)); - - NW_Bool startingFrameSequenceOver=NW_FALSE; - - /* for convenience */ - NW_Image_Epoc32Simple_t* thisObj = NW_Image_Epoc32SimpleOf (image); - - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, thisObj->decoder); - - if (decoder) - { - if (decoder->IncrementImage(startingFrameSequenceOver)) - { - /* update loop count if starting frame sequence again */ - if(startingFrameSequenceOver == NW_TRUE) - { - if(image->loopCount != -1) - { - image->loopCount--; - } - } - } - thisObj->needsDecode = NW_TRUE; - return KBrsrSuccess; - } - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Image_Epoc32Simple_AddDocNode(NW_Image_Epoc32Simple_t* thisObj, - NW_HED_DocumentNode_t* documentNode) -{ - if (NW_ADT_DynamicVector_InsertAt(thisObj->docNodeList, &documentNode, NW_ADT_Vector_AtEnd) == NULL) - return KBrsrOutOfMemory; - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Image_Epoc32Simple_Initialize( NW_Image_Epoc32Simple_t* thisObj ) - { - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Epoc32Simple_Class ) ); - // let the decoder know that we've got all the raw data - if( thisObj->decoder ) - { - CEpoc32ImageDecoder* decoder = STATIC_CAST( CEpoc32ImageDecoder*, thisObj->decoder ); - decoder->ImageDataComplete(); - status = KBrsrSuccess; - } - - return status; - } - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Image_Epoc32Simple_t* -NW_Image_Epoc32Simple_New (NW_GDI_Dimension3D_t size, - const void* data, - const void* mask, - NW_Bool invertedMask, - NW_Bool isTransparent, - TImageType imageType, - void* rawData, - NW_Int32 length, - NW_HED_DocumentNode_t* documentNode) -{ - //lint -e{437} Passing struct to ellipsis - return (NW_Image_Epoc32Simple_t*) NW_Object_New (&NW_Image_Epoc32Simple_Class, - size, - data, - mask, - (NW_Uint32)invertedMask, - (NW_Uint32)isTransparent, - (NW_Uint32)imageType, - rawData, - length, - documentNode); -} - - -/* ------------------------------------------------------------------------- */ -/* NW_Image_Epoc32Simple_SetSize - * - * Called when the image has been opened by the image decoder. Sets the - * (unscaled) image size. - */ -TBrowserStatusCode -NW_Image_Epoc32Simple_SetSize (NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* aSize) -{ - NW_Image_Epoc32Simple_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Epoc32Simple_Class)); - NW_ASSERT (aSize != NULL); - - /* for convenience */ - thisObj = NW_Image_Epoc32SimpleOf (image); - - // we have to inform observers about the size change. - NW_GDI_Dimension3D_s oldSize = thisObj->size; - // set the size - thisObj->size = *aSize; - // first check if the previous size was valid. - if( oldSize.width != 0 && thisObj->size.height != 0 ) - { - // check if the size has changed at all - if( oldSize.width != aSize->width || - oldSize.height != aSize->height ) - { - NW_Image_AbstractImage_ImageSizeChanged( NW_Image_AbstractImageOf( thisObj ) ); - } - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_Epoc32Simple_ForceImageDecode( NW_Image_AbstractImage_t* epocImage ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Image_Epoc32Simple_t* thisObj; - - NW_ASSERT( epocImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( epocImage, &NW_Image_Epoc32Simple_Class ) ); - - thisObj = NW_Image_Epoc32SimpleOf( epocImage ); - - CEpoc32ImageDecoder* decoder = STATIC_CAST( CEpoc32ImageDecoder*, thisObj->decoder ); - status = decoder->Decode(); - - return status; -} - - -/* ------------------------------------------------------------------------- */ -/* NW_Image_Epoc32Simple_SetAnimation - * - * Calling this function implies that the image is animated. It sets the delay - * time, and notes that the image is animated. - */ -TBrowserStatusCode -NW_Image_Epoc32Simple_SetAnimation(NW_Image_AbstractImage_t* image, - NW_Bool isAnimated, - NW_Uint32 delay ) -{ - image->isAnimated = isAnimated; - image->delay = delay; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -/* NW_Image_Epoc32Simple_SetBitmapL - * - * Called by the image decoder when it has finished processing. Sets the bitmap - * data, then forces a redraw. - * - * Parameters: - * image: this object - * bitmap: new bitmap to display - * mask: new bitmap mask - * frameNum: Current frame number (if animated) - * frameInfo: Details about current frame - * frameIsReady: the frame is fully decoded - */ -static -void -NW_Image_Epoc32Simple_SetBitmapL(NW_Image_Epoc32Simple_t* image, - CFbsBitmap* bitmap, - CFbsBitmap* mask, - NW_Int32 frameNum, - TFrameInfo* frameInfo, - NW_Bool frameIsReady ) - { - if( frameIsReady == NW_TRUE ) - { - // if the image has just been decoded, then image->bitmap is same as bitmap - // init image->bitmap to NULL. - if( image->imageDecoding == NW_TRUE ) - { - image->bitmap = NULL; - image->mask = NULL; - image->imageDecoding = NW_FALSE; - } - CFbsBitmap* existingBitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)image->bitmap); - CFbsBitmap* existingMask = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)image->mask); - - // If there is transparency but no disposal property defined, then assume - // the disposal property ELeaveInPlace. - if( (frameInfo->iFlags & TFrameInfo::ETransparencyPossible) && - !(image->prevFlags & (TFrameInfo::ERestoreToBackground | TFrameInfo::ERestoreToPrevious)) ) - { - image->prevFlags |= TFrameInfo::ELeaveInPlace; - } - - // If there is an existing bitmap, then it must be animated. If the previous - // frame had the flag "ELeaveInPlace", then the new bitmap must be rendered - // on top of the old one for things to work properly. This does not apply to - // the first frame when the animation goes back to the start (frameNum == 0). - TPoint aStartPoint(0,0); - if (existingBitmap != NULL && (image->prevFlags & TFrameInfo::ELeaveInPlace) && - (frameNum > 0 || frameInfo->iFrameCoordsInPixels.iTl != aStartPoint)){ - // Push mask & bitmap on the cleanup stack to make sure they get deleted. - CleanupStack::PushL(mask); - CleanupStack::PushL(bitmap); - - // Render new bitmap on top of old bitmap. - CFbsBitGc* bitmapContext=NULL; - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(existingBitmap); - CleanupStack::PushL(bitmapDevice); - User::LeaveIfError(bitmapDevice->CreateContext(bitmapContext)); - CleanupStack::PushL(bitmapContext); - if(frameNum == 0) - bitmapContext->Clear(); - if (mask == NULL) - bitmapContext->BitBlt(frameInfo->iFrameCoordsInPixels.iTl, bitmap, frameInfo->iFrameCoordsInPixels.Size()); - else - bitmapContext->BitBltMasked(frameInfo->iFrameCoordsInPixels.iTl, bitmap, frameInfo->iFrameCoordsInPixels.Size(), mask, EFalse); - - // Delete device, context & bitmap - CleanupStack::PopAndDestroy(3); - - // If both masks exist, draw the new on top of the old. - if (existingMask != NULL && mask != NULL) - { - CFbsBitGc* maskContext=NULL; - CFbsBitmapDevice* maskDevice = CFbsBitmapDevice::NewL(existingMask); - CleanupStack::PushL(maskDevice); - User::LeaveIfError(maskDevice->CreateContext(maskContext)); - CleanupStack::PushL(maskContext); - maskContext->BitBltMasked(frameInfo->iFrameCoordsInPixels.iTl, mask, frameInfo->iFrameCoordsInPixels.Size(), mask, EFalse); - CleanupStack::PopAndDestroy(2); - delete mask; - } - else if (mask != NULL) - { - // If the first image had no mask, then after that we would have to fill in the whole frame - // anyway, so there is no point keeping a mask. - delete mask; - } - // Pop mask from cleanup stack - CleanupStack::Pop(); - } - else - { - // The new bitmap and mask have no dependancy on the old; just replace the old - // with the new. - if(image->bitmap){ - TInt bitmapHandle = bitmap->Handle(); - CFbsBitmap* pBitmap = (CFbsBitmap*)image->bitmap; - pBitmap->Duplicate(bitmapHandle); - } - else{ - image->bitmap = bitmap; - } - - if(image->mask){ - TInt bitmapHandle = mask->Handle(); - CFbsBitmap* pBitmask = (CFbsBitmap*)image->mask; - pBitmask->Duplicate(bitmapHandle); - } - else{ - image->mask = mask; - } - } - image->needsDecode = NW_FALSE; - image->prevFlags = frameInfo->iFlags; - } - else - { - image->imageDecoding = NW_TRUE; - image->bitmap = bitmap; - image->mask = mask; - } - } - -/* ------------------------------------------------------------------------- */ -/* NW_Image_Epoc32Simple_DestroyRawData - * -*/ -void NW_Image_Epoc32Simple_DestroyRawData( NW_Image_Epoc32Simple_t* aImage ) - { - NW_ASSERT( aImage != NULL ); - - if( aImage->rawData ) - { - delete aImage->rawData ; - aImage->rawData = NULL; - } - } - -/* ------------------------------------------------------------------------- */ -/* NW_Image_Epoc32Simple_SetBitmap - * - * Non-leaving version of function "NW_Image_Epoc32Simple_SetBitmap". Called by - * the image decoder when it has finished processing. Sets the bitmap data, - * then forces a redraw. Parameters are "void*" so that OOC files can include - * header file. - * - * Parameters: - * image: this object - * bitmap: new bitmap to display - * mask: new bitmap mask - * frameNum: Current frame number (if animated) - * frameInfo: Details about current frame - */ -void -NW_Image_Epoc32Simple_SetBitmap(NW_Image_Epoc32Simple_t* image, - void* bitmap, - void* mask, - NW_Int32 frameNum, - void* frameInfo, - NW_Bool frameIsReady ) -{ - TInt err; - TRAP(err, NW_Image_Epoc32Simple_SetBitmapL(image, - (CFbsBitmap*)bitmap, - (CFbsBitmap*)mask, - frameNum, - (TFrameInfo*)frameInfo, - frameIsReady)); -} - -// first we check if image is visible, we go through the observer list for that. -// Observer knows which image is visible. If image is not visible, then we -// delete the image which is out of view. In case that the decoding is still going on -// we cancel the decoding for out of view image -void -NW_Image_Epoc32Simple_OutOfView( NW_Image_Epoc32Simple_t* aEpocImage ) - { - NW_Bool isVisible = NW_Image_AbstractImage_IsVisible(NW_Image_AbstractImageOf(aEpocImage)); - if(( aEpocImage->imageDecoding == NW_FALSE ) && (aEpocImage->bitmap) && (!isVisible)) - { - // delet the image bitmap - CFbsBitmap* oldBitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)aEpocImage->bitmap); - delete oldBitmap; - aEpocImage->bitmap = NULL; - CFbsBitmap* oldMask = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)aEpocImage->mask); - delete oldMask; - aEpocImage->mask = NULL; - } - else if ( aEpocImage->imageDecoding ) - { - // cancel decoding - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, aEpocImage->decoder); - decoder->Cancel(); - } - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/IMAGEAbstractImage.cpp --- a/webengine/wmlengine/src/image/src/IMAGEAbstractImage.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,488 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_image_abstractimagei.h" -#include "nw_adt_resizablevector.h" -#include "nw_adt_vector.h" -#include "nw_image_iimageobserver.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Image_AbstractImage_Class_t NW_Image_AbstractImage_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Image_AbstractImage_t), - /* construct */ _NW_Image_AbstractImage_Construct, - /* destruct */ _NW_Image_AbstractImage_Destruct - }, - { /* NW_Image_Abstract */ - /* getSize */ NULL, - /* draw */ NULL, - /* drawScaled */ NULL, - /* drawInRect */ NULL, - /* incrementImage */ NULL, - /* getLoopCount */ _NW_Image_AbstractImage_GetLoopCount, - /* setLoopCount */ _NW_Image_AbstractImage_SetLoopCount, - /* getDelay */ _NW_Image_AbstractImage_GetDelay, - /* isAnimated */ _NW_Image_AbstractImage_IsAnimated, - /* setImageObserver */ _NW_Image_AbstractImage_SetImageObserver, - /* removeImageObserver */ _NW_Image_AbstractImage_RemoveImageObserver, - /* imageOpened */ _NW_Image_AbstractImage_ImageOpened, - /* imageSizeChanged */ _NW_Image_AbstractImage_ImageSizeChanged, - /* imageDecoded */ _NW_Image_AbstractImage_ImageDecoded, - /* imageOpenStarted */ _NW_Image_AbstractImage_ImageOpenStarted, - /* forceImageDecode */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_AbstractImage_Construct(NW_Object_Dynamic_t* dynamicObject, - va_list *argp) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Image_AbstractImage_t* thisObj; - - NW_REQUIRED_PARAM( argp ); - /* parameter assertion block */ - NW_ASSERT( NW_Object_IsInstanceOf( dynamicObject, &NW_Image_AbstractImage_Class ) ); - thisObj = NW_Image_AbstractImageOf( dynamicObject ); - - thisObj->imageObserverList = (NW_ADT_DynamicVector_t*)NW_ADT_ResizableVector_New( sizeof( NW_ADT_DynamicVector_t* ), 10, 5 ); - if( thisObj->imageObserverList == NULL ) - { - status = KBrsrOutOfMemory; - } - thisObj->isOpening = NW_FALSE; - - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_AbstractImage_Destruct( NW_Object_Dynamic_t* dynamicObject ) - { - NW_Image_AbstractImage_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT( NW_Object_IsInstanceOf( dynamicObject, &NW_Image_AbstractImage_Class ) ); - - /* for convenience */ - thisObj = NW_Image_AbstractImageOf( dynamicObject ); - - if( thisObj->imageObserverList ) - { - // and delete it - NW_Object_Delete( thisObj->imageObserverList ); - } - } - - -/* ------------------------------------------------------------------------- */ -NW_Int16 -_NW_Image_AbstractImage_GetLoopCount(NW_Image_AbstractImage_t* image) -{ - return image->loopCount; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_AbstractImage_SetLoopCount(NW_Image_AbstractImage_t* image, NW_Uint16 loopCount) -{ - image->loopCount = loopCount; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_Image_AbstractImage_GetDelay(NW_Image_AbstractImage_t* image) -{ - - return image->delay; - -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Image_AbstractImage_IsAnimated(NW_Image_AbstractImage_t* image) -{ - return image->isAnimated; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_AbstractImage_IncrementImage(NW_Image_AbstractImage_t* image) -{ - NW_REQUIRED_PARAM(image); - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_AbstractImage_SetImageObserver( NW_Image_AbstractImage_t* abstractImage, - NW_Image_IImageObserver_t* observer ) -{ - NW_Image_AbstractImage_t* thisObj; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( observer != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - if( NW_ADT_DynamicVector_InsertAt( thisObj->imageObserverList, &observer, - NW_ADT_Vector_AtEnd ) == NULL ) - { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_AbstractImage_RemoveImageObserver( NW_Image_AbstractImage_t* abstractImage, - NW_Image_IImageObserver_t* observer ) - { - NW_Image_AbstractImage_t* thisObj; - TBrowserStatusCode status = KBrsrFailure; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( observer != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // lookup the observer list and remove if one matches - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver == observer ) - { - status = NW_ADT_DynamicVector_RemoveAt( thisObj->imageObserverList, index ); - break; - } - } - return status; - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImage_t* abstractImage, NW_Bool failed, - NW_Int16 suppressDupReformats ) - { - NW_Image_AbstractImage_t* thisObj; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t newNumItems; - NW_ADT_Vector_Metric_t index; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - thisObj->isOpening = NW_FALSE; - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // inform all the observers about the image open event. - // It usually involves image replacement ( from broken image to valid image) - // It can also involve relayout event. see the actual implementation of it. - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver ) - { - // - // Given the comment above, suppressDupReformats is set to start, continue, or stop. - // During the first interation of this loop it "starts" suppressing reformats - // until the last interation. Image observers in the same format-box are only - // reformated once. These reformats are triggered when the current image - // observer is in a different flow-box or it reaches the end of the loop. - // - // This helps speed up the special case when an image is duplicated many times - // within the same document. - // - // See the comment about "iSuppressDupReformats" in NW_MVC_View_ReformatBox - // for more information. - // - if (numItems > 1) - { - if (index == 0) - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Start; - } - else if (index == (numItems - 1)) - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Stop; - } - else - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Continue; - } - } - - NW_Image_IImageObserver_ImageOpened( imageObserver, thisObj, failed, - suppressDupReformats ); - - // refresh numItems as at CSS level, imageOpened() can end up deleteing some - // items from this list. - newNumItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - if( numItems != newNumItems ) - { - // check if the item was deleted behind the index since if it was not -so the deleted - // item was ahead in the queue then we need to update the index. - numItems = newNumItems; - if( index < newNumItems ) - { - NW_Image_IImageObserver_t* newImageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - - if( imageObserver != newImageObserver ) - { - index--; - } - } - } - } - } - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_AbstractImage_ImageSizeChanged( NW_Image_AbstractImage_t* abstractImage ) - { - NW_Image_AbstractImage_t* thisObj; - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t numItems; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // inform all the observers about the size chage event. - // It involves relayout event on the entire tree - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver ) - { - NW_Image_IImageObserver_SizeChanged( imageObserver, thisObj ); - // refresh numItems as at CSS level, imageOpened() can end up deleteing some - // items from this list. - // numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - } - } - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_AbstractImage_ImageOpenStarted( NW_Image_AbstractImage_t* abstractImage ) - { - NW_Image_AbstractImage_t* thisObj; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - thisObj->isOpening = NW_TRUE; - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // inform all the observers about the image decode event - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver ) - { - NW_Image_IImageObserver_ImageOpeningStarted( imageObserver, NW_Image_AbstractImageOf( thisObj ) ); - } - } - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed ) - { - NW_Image_AbstractImage_t* thisObj; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( abstractImage, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_AbstractImageOf( abstractImage ); - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // inform all the observers about the image decode event - // it involves refresh event on the image box - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver ) - { - NW_Image_IImageObserver_ImageDecoded( imageObserver, thisObj, failed ); - } - } -} - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Image_AbstractImage_DecrementLoopCount(NW_Image_AbstractImage_t* image) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Int16 loopCount; - - loopCount = NW_Image_AbstractImage_GetLoopCount(image); - if (loopCount > 0) { - loopCount--; - status = NW_Image_AbstractImage_SetLoopCount(image, loopCount); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -void -NW_Image_AbstractImage_ImageDestroyed( NW_Image_AbstractImage_t* image ) - { - NW_Image_AbstractImage_t* thisObj; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - NW_ASSERT( image != NULL ); - - thisObj = NW_Image_AbstractImageOf( image ); - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( thisObj->imageObserverList ) ); - // forward destroy event to the observers - for( index = 0; index < numItems; index++ ) - { - // - // Given the comment above, suppressDupReformats is set to start, continue, or stop. - // During the first interation of this loop it "starts" suppressing reformats - // until the last interation. Image observers in the same format-box are only - // reformated once. These reformats are triggered when the current image - // observer is in a different flow-box or it reaches the end of the loop. - // - // This helps speed up the special case when an image is duplicated many times - // within the same document. - // - // See the comment about "iSuppressDupReformats" in NW_MVC_View_ReformatBox - // for more information. - // - NW_Int16 suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Default; - - if (numItems > 1) - { - if (index == 0) - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Continue; - } - else if (index == (numItems - 1)) - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Stop; - } - else - { - suppressDupReformats = NW_Image_AbstractImage_SuppressDupReformats_Continue; - } - } - - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( thisObj->imageObserverList ), index ); - - if( imageObserver ) - { - if( thisObj->isOpening == NW_TRUE ) - { - NW_Image_IImageObserver_ImageOpened( imageObserver, thisObj, NW_TRUE, - suppressDupReformats ); - } - NW_Image_IImageObserver_ImageDestroyed( imageObserver, NW_Image_AbstractImageOf( thisObj ) ); - } - } - } - -// Check from all the observers if the image is visible -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Image_AbstractImage_IsVisible(NW_Image_AbstractImage_t* aImage) - { - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - NW_Bool isVisible = NW_FALSE; - - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( aImage->imageObserverList ) ); - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( aImage->imageObserverList ), index ); - - if( imageObserver ) - { - isVisible = NW_Image_IImageObserver_IsVisible(imageObserver); - } - if (isVisible) - { - break; - } - } - return isVisible; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/IMAGEFactory.cpp --- a/webengine/wmlengine/src/image/src/IMAGEFactory.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Image_ImageFactoryI.h" -#include "nwx_string.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Image_ImageFactory_Class_t NW_Image_ImageFactory_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Image_ImageFactory */ - /* mimeTable */ NULL, - /* numEntries */ 0, - /* createImage */ _NW_Image_ImageFactory_CreateImage - } -}; - -/* ------------------------------------------------------------------------- * - convenience function - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Image_AbstractImage_t* -_NW_Image_ImageFactory_CreateImage (const NW_Image_ImageFactory_t* imageFactory, - NW_Http_ContentTypeString_t contentTypeString, - NW_Buffer_t* imageData) -{ - const NW_Image_ImageFactory_MimeTableEntry_t* mimeTable; - NW_Uint16 numEntries; - NW_Uint16 index; - - /* lookup the contentType and create an appropriate image object */ - mimeTable = NW_Image_ImageFactory_GetMimeTable (imageFactory); - numEntries = NW_Image_ImageFactory_GetNumEntries (imageFactory); - for (index = 0; index < numEntries; index++) { - if (0 == NW_Asc_stricmp((char*)mimeTable[index].contentTypeString, (char*)contentTypeString)) { - return (NW_Image_AbstractImage_t*) NW_Object_New (mimeTable[index].objClass, imageData); - } - } - - /* no image format registered for the supplied mimeType */ - return NULL; -} - -/* ------------------------------------------------------------------------- */ -const NW_Image_ImageFactory_t NW_Image_ImageFactory = { - { &NW_Image_ImageFactory_Class } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/IMAGEVirtualImage.cpp --- a/webengine/wmlengine/src/image/src/IMAGEVirtualImage.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,514 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_image_virtualimagei.h" -#include "BrsrStatusCodes.h" -#include "nw_image_virtualimage.h" -#include "nw_object_interface.h" -#include "GDIDevicecontext.h" - -NW_Bool -_NW_Image_VirtualImage_IImageObserver_IsVisible(NW_Image_IImageObserver_t* aImageObserver) - { - NW_Image_Virtual_t* thisObj; - - // parameter assertion block - NW_ASSERT( aImageObserver != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( aImageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( aImageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // forward this event to our observer - return NW_Image_AbstractImage_IsVisible( NW_Image_AbstractImageOf( thisObj )); - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Image_Virtual_Class_t NW_Image_Virtual_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_AbstractImage_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_Image_VirtualImage_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Image_Virtual_t), - /* construct */ _NW_Image_VirtualImage_Construct, - /* destruct */ _NW_Image_VirtualImage_Destruct - }, - { /* NW_Image_Abstract */ - /* getSize */ _NW_Image_VirtualImage_GetSize, - /* draw */ _NW_Image_VirtualImage_Draw, - /* drawScaled */ _NW_Image_VirtualImage_DrawScaled, - /* drawInRect */ _NW_Image_VirtualImage_DrawInRect, - /* incrementImage */ _NW_Image_VirtualImage_IncrementImage, - /* getLoopCount */ _NW_Image_VirtualImage_GetLoopCount, - /* setLoopCount */ _NW_Image_VirtualImage_SetLoopCount, - /* getDelay */ _NW_Image_VirtualImage_GetDelay, - /* isAnimated */ _NW_Image_VirtualImage_IsAnimated, - /* setImageObserver */ _NW_Image_VirtualImage_SetImageObserver, - /* removeImageObserver */ _NW_Image_VirtualImage_RemoveImageObserver, - /* imageOpened */ _NW_Image_AbstractImage_ImageOpened, - /* imageSizeChanged */ _NW_Image_AbstractImage_ImageSizeChanged, - /* imageDecoded */ _NW_Image_AbstractImage_ImageDecoded, - /* imageOpenStarted */ _NW_Image_AbstractImage_ImageOpenStarted, - /* forceImageDecode */ _NW_Image_VirtualImage_ForceImageDecode - }, - { /* NW_Image_Virtual */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_Image_VirtualImage_InterfaceList[] = { - &_NW_Image_VirtualImage_ImageObserver_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Image_IImageObserver_Class_t _NW_Image_VirtualImage_ImageObserver_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Image_IImageObserver_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof( NW_Image_Virtual_t, NW_Image_IImageObserver ) - }, - { /* NW_Image_IImageObserver */ - /* imageOpened */ _NW_Image_VirtualImage_IImageObserver_ImageOpened, - /* sizeChanged */ _NW_Image_VirtualImage_IImageObserver_SizeChanged, - /* imageOpeningStarted */ _NW_Image_VirtualImage_IImageObserver_ImageOpeningStarted, - /* imageDecoded */ _NW_Image_VirtualImage_IImageObserver_ImageDecoded, - /* imageDestroyed */ _NW_Image_VirtualImage_IImageObserver_ImageDestroyed, - /* isVisible */ _NW_Image_VirtualImage_IImageObserver_IsVisible - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- * - NW_Image_VirtualImage_ImageObserver implementation - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_IImageObserver_ImageOpened( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed, - NW_Int16 suppressDupReformats ) - { - NW_Image_Virtual_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // forward this event to our observer - NW_Image_AbstractImage_ImageOpened( NW_Image_AbstractImageOf( thisObj ), failed, - suppressDupReformats ); - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_IImageObserver_SizeChanged( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_Image_Virtual_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // forward this event to our observer - NW_Image_AbstractImage_ImageSizeChanged( NW_Image_AbstractImageOf( thisObj ) ); - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_IImageObserver_ImageOpeningStarted( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_Image_Virtual_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // forward this event to our observer - NW_Image_AbstractImage_ImageOpenStarted( NW_Image_AbstractImageOf( thisObj ) ); - } - - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_IImageObserver_ImageDecoded( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage, - NW_Bool failed) - { - NW_Image_Virtual_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // forward this event to our observer - NW_Image_AbstractImage_ImageDecoded( NW_Image_AbstractImageOf( thisObj ), failed ); - } - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_IImageObserver_ImageDestroyed( NW_Image_IImageObserver_t* imageObserver, - NW_Image_AbstractImage_t* abstractImage ) - { - NW_Image_Virtual_t* thisObj; - - NW_REQUIRED_PARAM( abstractImage ); - - // parameter assertion block - NW_ASSERT( imageObserver != NULL ); - NW_ASSERT( abstractImage != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( imageObserver, - &_NW_Image_VirtualImage_ImageObserver_Class ) ); - // obtain the implementer - thisObj = (NW_Image_Virtual_t*)NW_Object_Interface_GetImplementer( imageObserver ); - NW_ASSERT( NW_Object_IsInstanceOf( thisObj, &NW_Image_Virtual_Class ) ); - - // dont forward image destroy event to our observer as destroy event is sent by - // this->destructor - thisObj->image = NULL; - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list *argp) -{ - NW_Image_Virtual_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT( dynamicObject != NULL ); - NW_ASSERT( argp != NULL ); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Image_Virtual_Class)); - - /* for convenience */ - thisObj = NW_Image_VirtualOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_Image_AbstractImage_Construct( dynamicObject, argp ); - - if( status != KBrsrSuccess ) - { - return status; - } - - /* initialize the member variables */ - thisObj->image = va_arg (*argp, NW_Image_AbstractImage_t*); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->image, &NW_Image_AbstractImage_Class)); - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Image_VirtualImage_Destruct( NW_Object_Dynamic_t* dynamicObject ) -{ - NW_Image_Virtual_t* thisObj; - NW_Image_AbstractImage_t* superObject; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - /* parameter assertions */ - NW_ASSERT( dynamicObject != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( dynamicObject, &NW_Image_Virtual_Class ) ); - - /* for convenience */ - thisObj = NW_Image_VirtualOf( dynamicObject ); - - superObject = NW_Image_AbstractImageOf( dynamicObject ); - - // first notify the observers on the destroy event - NW_Image_AbstractImage_ImageDestroyed( NW_Image_AbstractImageOf( thisObj ) ); - - // stop observing - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( superObject->imageObserverList ) ); - // lookup the observer list and remove them all - for( index = 0; index < numItems; index++ ) - { - NW_Image_IImageObserver_t* imageObserver = *(NW_Image_IImageObserver_t**) - NW_ADT_Vector_ElementAt( NW_ADT_VectorOf( superObject->imageObserverList ), index ); - NW_ASSERT( imageObserver ); - - if( imageObserver ) - { - _NW_Image_VirtualImage_RemoveImageObserver( NW_Image_AbstractImageOf( thisObj ), imageObserver ); - } - // updatet numItems as it might be changing - numItems = NW_ADT_Vector_GetSize( NW_ADT_VectorOf( superObject->imageObserverList ) ); - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_GetSize (const NW_Image_AbstractImage_t* image, - NW_GDI_Dimension3D_t* size) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Virtual_Class)); - NW_ASSERT (size != NULL); - - /* invoke the alias Image method */ - return NW_Image_AbstractImage_GetSize (NW_Image_VirtualOf (image)->image, size); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_Draw (NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Virtual_Class)); - NW_ASSERT (location != NULL); - - /* invoke the alias Image method */ - return NW_Image_AbstractImage_Draw (NW_Image_VirtualOf (image)->image, deviceContext, - location); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_DrawScaled(NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Virtual_Class)); - NW_ASSERT (location != NULL); - NW_ASSERT (size != NULL); - - /* invoke the alias Image method */ - return NW_Image_AbstractImage_DrawScaled (NW_Image_VirtualOf (image)->image, deviceContext, - location, size); -} - -/* ------------------------------------------------------------------------- - * Function: _NW_Image_VirtualImage_DrawInRect - * Description: Draw scaled image on a certain location within a rectangle. - * - * @param image: the virtual image to be drawn - * @param deviceContext: the device context object. - * @param location: the top-left point to start drawing - * @param size: the size to scale the image to. - * @param rect: the rectangle to draw the image within - * - * note: Both the parameters size and rect could be NULL. - * If the size is NULL, the image is not scaled before being drawn. - * If the rect is NULL, draw the entire image. - */ -TBrowserStatusCode -_NW_Image_VirtualImage_DrawInRect(NW_Image_AbstractImage_t* image, - CGDIDeviceContext* deviceContext, - const NW_GDI_Point2D_t* location, - const NW_GDI_Dimension3D_t* size, - const NW_GDI_Rectangle_t* rect) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_Virtual_Class)); - NW_ASSERT (location != NULL); - - /* invoke the alias Image method */ - return NW_Image_AbstractImage_DrawInRect (NW_Image_VirtualOf (image)->image, deviceContext, - location, size, rect); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_IncrementImage(NW_Image_AbstractImage_t* image) -{ - return NW_Image_AbstractImage_IncrementImage(NW_Image_VirtualOf (image)->image); -} - -/* ------------------------------------------------------------------------- */ -NW_Int16 -_NW_Image_VirtualImage_GetLoopCount(NW_Image_AbstractImage_t* image) -{ - return NW_Image_AbstractImage_GetLoopCount(NW_Image_VirtualOf (image)->image); -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_SetLoopCount(NW_Image_AbstractImage_t* image, NW_Uint16 loopCount) -{ - return NW_Image_AbstractImage_SetLoopCount(NW_Image_VirtualOf (image)->image, loopCount); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_Image_VirtualImage_GetDelay(NW_Image_AbstractImage_t* image) -{ - - return NW_Image_AbstractImage_GetDelay(NW_Image_VirtualOf (image)->image); - -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Image_VirtualImage_IsAnimated(NW_Image_AbstractImage_t* image) -{ - return NW_Image_AbstractImage_IsAnimated(NW_Image_VirtualOf (image)->image); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_SetImageObserver( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ) -{ - NW_Image_Virtual_t* thisObj; - TBrowserStatusCode status = KBrsrFailure; - - // parameter assertion block - NW_ASSERT( image != NULL ); - NW_ASSERT( observer != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( image, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_VirtualOf( image ); - - // invoke superclass function - _NW_Image_AbstractImage_SetImageObserver( NW_Image_AbstractImageOf( image ), observer ); - - // since virtual image just points to a "real" image, we - // need to observ that "real" image and forward each and every event which - // happens to that image back to our observer as it had happened to this - // virtual image - if( thisObj->image != NULL ) - { - status = NW_Image_AbstractImage_SetImageObserver( - NW_Image_AbstractImageOf( thisObj->image ), - &thisObj->NW_Image_IImageObserver ); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_RemoveImageObserver( NW_Image_AbstractImage_t* image, - NW_Image_IImageObserver_t* observer ) -{ - NW_Image_Virtual_t* thisObj; - TBrowserStatusCode status = KBrsrFailure; - - // parameter assertion block - NW_ASSERT( image != NULL ); - NW_ASSERT( observer != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( image, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_VirtualOf( image ); - - // virtual image points to one "real" image, we need to - // remove observer from that image too - if( thisObj->image != NULL ) - { - status = NW_Image_AbstractImage_RemoveImageObserver( - NW_Image_AbstractImageOf( thisObj->image ), - &thisObj->NW_Image_IImageObserver ); - } - // invoke superclass function - status = _NW_Image_AbstractImage_RemoveImageObserver( NW_Image_AbstractImageOf( image ), observer ); - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Image_VirtualImage_ForceImageDecode( NW_Image_AbstractImage_t* image ) -{ - NW_Image_Virtual_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - // parameter assertion block - NW_ASSERT( image != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( image, &NW_Image_AbstractImage_Class ) ); - - thisObj = NW_Image_VirtualOf( image ); - - // force the "real" image to decode - if( thisObj->image != NULL ) - { - status = NW_Image_AbstractImage_ForceImageDecode( thisObj->image ); - } - - return status; -} -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Image_Virtual_t* -NW_Image_Virtual_New (NW_Image_AbstractImage_t* image) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (image, &NW_Image_AbstractImage_Class)); - - /* instantiate and return the VirtualImage */ - return (NW_Image_Virtual_t*) NW_Object_New (&NW_Image_Virtual_Class, image); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/image/src/nw_image_iimageobserver.cpp --- a/webengine/wmlengine/src/image/src/nw_image_iimageobserver.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_image_iimageobserveri.h" - -/* ------------------------------------------------------------------------- */ -const -NW_Image_IImageObserver_Class_t NW_Image_IImageObserver_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ 0 - }, - { /* NW_Image_IImageObserver */ - /* imageOpened */ NULL, - /* sizeChanged */ NULL, - /* imageOpeningStarted */ NULL, - /* imageDecoded */ NULL, - /* imageDestroyed */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/inc/BrowserEngineVariant.hrh --- a/webengine/wmlengine/src/inc/BrowserEngineVariant.hrh Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains all the declarations to variate locally -* whole Messaging subsystem -* -* -*/ - - -#ifndef BROWSERENGINEVARIANT_HRH -#define BROWSERENGINEVARIANT_HRH - - -/* -* Comment the meaning of the each setting value here well !! -* What is the SD file and setting used for values, e.g. -*/ - -// BrowserEngine related values are in 0x101F861B.ini -//setting "R-BrEng" - -//For furure usage. N.B we use the defines for masking out the setting -//#define KBrowserAnotherFeat 0x01 - - - -// If, for some good reason, you need compile time variation per -// release use the release flags. This file is the only place to use the -// release flags ! However, think hard why you can not use SD setting !!! -// -#if defined (__SERIES60_20__) -//const TInt KSomeCompileTimeConstantValue = 1; -#elif defined (____SERIES60_21__) -//const TInt KSomeCompileTimeConstantValue = 2; -#endif - -#endif // BROWSERENGINEVARIANT_HRH diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/BoxFormat.h --- a/webengine/wmlengine/src/lmgr/include/BoxFormat.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,335 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef BOX_FORMATTER_H -#define BOX_FORMATTER_H - -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) - - -//#include "nw_lmgr_posflowbox.h" -#include "nw_lmgr_flowbox.h" -#include "nw_lmgr_formatcontext.h" -#include "nw_fbox_inputbox.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nwx_settings.h" -#include "BrsrStatusCodes.h" -#include "nw_lmgr_emptybox.h" -#include "nw_lmgr_rulebox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_listbullets.h" -#include "nw_image_virtualimage.h" -#include "nw_image_cannedimages.h" -#include "nw_fbox_formbox.h" -#include "nwx_string.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "LMgrObjectBoxOOC.h" -#include "nwx_settings.h" - -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -void PartialFormatL(NW_LMgr_Box_t* aFormatBox, TBool aDocumentComplete); -void FormatL(NW_LMgr_Box_t* aFormatBox, - NW_LMgr_ContainerBox_t *containerBox, - NW_LMgr_FormatContext_t* aContext); - - -class TLMgr_BoxFormatter - { - public: - // check if they have to be virtual functions - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFormat(NW_LMgr_Box_t* flow, - NW_LMgr_ContainerBox_t *whose, - NW_LMgr_FormatContext_t* parentContext); - - virtual TBrowserStatusCode - NW_LMgr_FlowBox_PostFormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - virtual TBrowserStatusCode NW_LMgr_FlowBox_FormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_FlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) ; - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_FlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - //virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFlowFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_NewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine); - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_ListItem(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context); - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_DirectKey(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context); - - // public function - TBrowserStatusCode - NW_LMgr_BidiFlowBox_Flush(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, NW_Bool addLineSpacing); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_AdvanceToClear(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_LMgr_PropertyValueToken_t clearToken); - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_AdvanceToClearReformat(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_LMgr_PropertyValueToken_t clearToken); - - NW_GDI_Metric_t - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_FlushInlineContainers(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext); - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_ReformatLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext); - - NW_LMgr_Box_t* - NW_LMgr_BidiFlowBox_GetFirstBlock(NW_LMgr_Box_t* flow); - - NW_LMgr_Box_t* - NW_LMgr_BidiFlowBox_GetLastBlock(NW_LMgr_Box_t* flow); - - NW_Bool IsClosedTop(NW_LMgr_Box_t *box); - - NW_Bool IsClosedBottom(NW_LMgr_Box_t *box); - - TBrowserStatusCode NW_LMgr_BidiFlowBox_CollapseMargins(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* parentContext, NW_ADT_Vector_Metric_t index); - - NW_GDI_Metric_t NW_LMgr_FlowBox_GetLineStart(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_GDI_Metric_t where); - - NW_GDI_Metric_t NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_GDI_Metric_t where); - - NW_Bool NW_LMgr_BidiFlowBox_AtNewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext); - - void NW_LMgr_BidiFlowBox_GetConstraint(NW_LMgr_Box_t *flow, - NW_LMgr_FormatContext_t *parentContext, - NW_GDI_Metric_t *constraint); - - void - NW_LMgr_BidiFlowBox_GetBlockMargins (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t *parentContext, - NW_LMgr_FrameInfo_t *margin); - - void - NW_LMgr_BidiFlowBox_PlaceChild(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - void - NW_LMgr_BidiFlowBox_PlaceChildAt(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_GDI_Metric_t x, - NW_GDI_Metric_t y); - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleInlineContainer(NW_LMgr_Box_t* flow, - NW_LMgr_ContainerBox_t* container, - NW_LMgr_FormatContext_t* parentContext); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleInlineContainerPost(NW_LMgr_Box_t* flow, - NW_LMgr_ContainerBox_t* container, - NW_LMgr_FormatContext_t* parentContext); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleBlock (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleBlockPost (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - TBrowserStatusCode - NW_LMgr_BidiFlowBox_PlaceFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t *box, - NW_LMgr_FormatContext_t* parentContext); - - TBrowserStatusCode NW_LMgr_BidiFlowBox_HandleFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - TBrowserStatusCode - NW_LMgr_BidiFlowBox_HandleBreak(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - NW_LMgr_Box_t* NW_LMgr_BidiFlowBox_GetMarker(NW_LMgr_Box_t* flowBox, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context, - NW_LMgr_PropertyValueToken_t* markerVerticalAlign, - NW_Bool* style); - NW_LMgr_Box_t* NW_LMgr_BidiFlowBox_GetDirectKeyMarker(NW_LMgr_Box_t* item); - NW_Image_AbstractImage_t* NW_LMgr_BidiFlowBox_GetListStyleImage(NW_LMgr_Box_t* flowBox, - NW_LMgr_PropertyValueToken_t token); - - TBrowserStatusCode NW_LMgr_BidiFlowBox_Initialize(NW_LMgr_BidiFlowBox_t *flow); - TBrowserStatusCode NW_LMgr_BidiFlowBox_InitializeSSL(NW_LMgr_BidiFlowBox_t *flow); - TBrowserStatusCode NW_LMgr_BidiFlowBox_GetListMargin(NW_LMgr_FlowBox_t* flowBox); - TBrowserStatusCode NW_LMgr_ResizeToFloat(NW_LMgr_Box_t* flow, NW_LMgr_FormatContext_t* parentContext); - }; - - -class TLMgr_Marquee_Box_Formatter:public TLMgr_BoxFormatter - { -public: - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_FlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) ; - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_FlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - //virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_PostFlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - // virtual function - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_ListItem(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context); - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_DirectKey(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context); - - }; - - -class TLMgr_StaticCell_Box_Formatter:public TLMgr_BoxFormatter - { - public: - - virtual TBrowserStatusCode - NW_LMgr_FlowBox_FormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - virtual TBrowserStatusCode - NW_LMgr_BidiFlowBox_NewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine); - virtual TBrowserStatusCode - NW_LMgr_FlowBox_PostFormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext); - - - }; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/BoxFormatHandler.h --- a/webengine/wmlengine/src/lmgr/include/BoxFormatHandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,337 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class handles formatting of the boxes , refreshes the boxe on the postformatting, - adds the active boxes to the tab list -* -*/ - -#ifndef BOX_FORMAT_HANDLER_H -#define BOX_FORMAT_HANDLER_H - -#include "e32base.h" -#include "cstack.h" -#include "nw_gdi_utils.h" -#include "BoxFormat.h" - -// INCLUDES - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - - -/** -* The class handles formatting of the boxes , refreshes the boxe on the postformatting, -* adds the active boxes to the tab list -* -* @lib lmgr.lib -*/ -class CLMgr_BoxFormatHandler: public CActive - { - public: - /** - * A two phase constructor that constructs and initializes CLMgr_BoxFormatHandler class - * leaves KErrNoMemory if out of memory - * @param aRootBox - flowBox to be formatted - * @param aSelectiveFormatting is ETrue if only a flowBox and its children needs to be formatted - * @return CLMgr_BoxFormatHandler* - pointer to the instance of class CLMgr_BoxFormatHandler - */ - static CLMgr_BoxFormatHandler* NewL(NW_LMgr_Box_t* aRootBox, - TBool aSelectiveFormatting); - /** - * the method is called from view to format box tree - */ - void PartialFormatL( CActive::TPriority aPriority ); - - /** - * the method is called from view after the partialFormat is called - * for the last chunk - */ - void PageLoadCompleted(); - - TBrowserStatusCode Collapse( NW_LMgr_FlowBox_t* aContainingFlow, NW_Bool aCollapseAnonymous ); - /** - * the method clears the formatting context . - * The formatting context includes the formatting stack and the current format box - */ - void ClearFormattingContext(); - - /** - * initializes the flowbox and its children - * @param - flowbox and its children to be initialized - * @return - returns KBrsrSuccess if no error - */ - TBrowserStatusCode InitializeBox(NW_LMgr_BidiFlowBox_t *flow); - - /** - * initializes the flowbox and its children in small screen mode - * @param - flowbox and its children to be initialized - * @return - returns KBrsrSuccess if no error - */ - TBrowserStatusCode InitializeBoxSSL(NW_LMgr_BidiFlowBox_t *flow); - - /** - * set the background format flag to true which means that - * the next format is a background format - */ - inline void SetBackgroundFormat() { iBackgroundFormat = ETrue; } - - /** - * This function returns true if the current format is a background format - */ - inline TBool BackgroundFormat() { return iBackgroundFormat; } - - /** - * Destructor- deletes format stack and - * removes the instance from CActiveScheduler - */ - ~CLMgr_BoxFormatHandler(); - - /** - * - * adds the box to the tab list - * @param box - the box to be added to the tab list - * @return - returns KBrsrOutOfMemory if OOM - */ - TBrowserStatusCode AddTabItem(NW_LMgr_Box_t *box); - - /** - * - * returns last formatted box - * @return - last formatted box of the box tree - */ - NW_LMgr_Box_t* GetLastFormattedBox() - { - return iFormatBox; - } - /** - * - * sets the last box to be formatted from the boxtee - * @param aLastBoxToFormat - the last box to be formatted from the boxtee - */ - void SetLastBoxToFormatL(NW_LMgr_Box_t *aLastBoxToFormat) - { - iLastBoxToFormat = aLastBoxToFormat; - } - - /** - * - * overriddes Active virtual function . The method formats a flowbox ( including its children) - * or a leaf box - * leaves if OOM - */ - void RunL(); - - /** - * overriddes Active virtual function - * Clears the formatting context, if the formatting is cancelled - */ - void DoCancel(); - - /** - * overriddes Active virtual function - * Clears the formatting context, incase if any error - */ - TInt RunError(TInt aError); - - /** - * sets the root box on the format handler (generally used if the - * root box changes, but the format handler is the same) - */ - void SetRootBox(NW_LMgr_Box_t* aRootBox); - TBool GetFormattingComplete(){return iFormattingCompleted;}; - - private: - // auxiallary class to contain ,enable copying and deleting of FormatContexts - - class CFormatStackContext: public CBase - { - public: - CFormatStackContext(CLMgr_BoxFormatHandler* aBoxFormatHandler); - static void CleanupStackContext(TAny* aFormatStackContext); - - CFormatStackContext(const CFormatStackContext& aFormatStackContext); - ~CFormatStackContext(); - // formatbox - box to be formatted - NW_LMgr_Box_t *iBox; - // parent box of iBox - NW_LMgr_Box_t *iParentFormatBox; - // context to format iBox - NW_LMgr_FormatContext_t* iParentContext; - // used to calculate rootBox temp height after formatting part of box tree - NW_GDI_Dimension2D_t iTempDimensions ; - // is ETrue if page load is completed - TBool iPageLoadCompleted; - // reference to the containing class - CLMgr_BoxFormatHandler* iBoxFormatHandler;// has - }; - private: - /** - * Constructor - **/ - CLMgr_BoxFormatHandler(); - /** - * Initializes CLMgr_BoxFormatHandler , creates stack to handle formatting - * and adds the CLMgr_BoxFormatHandler instance to ActiveScheduler - * @param aRootBox - flowbox to be formatted - * @param aSelectiveFormatting- is ETrue if only aRootBox and its children need - to be formatted - **/ - void ConstructL(NW_LMgr_Box_t* aRootBox, - TBool aSelectiveFormatting); - - /** - * Formats iFormatBox (the current box to be formatted ) and all the boxes to - * the left subtree iFormatBox - * Leaves with KErrNoMemory if OOM - **/ - void HandlePartialFormatL(); - /** - * Finds the format context of the next box of aFormatBox to be formatted - * If the aFormatBox is NULL , then a new FormatContext is created on rootbox and - * the child of the rootbox becomes the next box to be formattec - * Leaves with KErrNoMemory if OOM - **/ - void FindFormatContextL(NW_LMgr_Box_t* aFormatBox); - /** - * The method is called after the formatting all the chunks and no more - * chunks are available for the page. The method does post formatting of all - * the boxes on the stack and calls the formatting completed on IBoxTreeListener - **/ - void HandlePageLoadCompletedL(); - /** - * The method handles post formatting on a box - * @param CFormatStackContext- Formatting context instance to be post formatted - **/ - void PostFormatL(CFormatStackContext& ); - /** - * The method clears all the items on the format stack and sets the current box to - * formatted to NULL - **/ - void ClearFormatStack(); - /** - * The method returns the BoxFormatter instance based on the box type - * @param aBox the box to find the formatter . - * @return TLMgr_BoxFormatter instance that can handle formatting of aBox - **/ - TLMgr_BoxFormatter& GetBoxFormatter(NW_LMgr_Box_t* aBox); - - /** - * The method returns the last box of the boxtree - * @return the last box of the boxtree - **/ - - NW_LMgr_Box_t* GetLastBox(); - - /** - * The method returns dimensions of aBox by the aBox childrens height and width - * @return NW_GDI_Dimension2D_t - dimensions of the aBox - **/ - NW_GDI_Dimension2D_t CalculateBoxTempBounds(NW_LMgr_Box_t* aBox ); - - /** - * The method normalizes the box on the box tree - * @param box - box to be normalized - * @return void - **/ - void InitBoxL(NW_LMgr_Box_t *aBox); - - /** - * The method refreshes the box after the box is post formatted - * @return void - * @param box - box to be refresed - **/ - void RefreshBoxL(NW_LMgr_Box_t *aBox ); - - /** - * This method adds the children boxes which are instances of active boxes - * to the tab list - * @param box - box to be added - **/ - void AddTabItemL( NW_LMgr_Box_t *aBox ); - - /** - * This method is called from AddTabItemL to add tabitems - * containeed in container box subtree - **/ - void AddSubTreeTabItemsL(NW_LMgr_Box_t *aBox); - - /** - * This method is called from PartialFormatL to initialize the rootbox - * It sets the body box and initializes the display bounds - **/ - void InitRootBox(); - - /** - * This method appends the NW_LMgr_FormatContext_t* object to the array of pointers - * iFormatContextRef. - **/ - void AppendFormatContextL(NW_LMgr_FormatContext_t* aLMgr_FormatContext_t); - - /** - * This method updates the display bounds on a formatted subtree - **/ - void UpdateDisplayBounds( NW_LMgr_Box_t* aBox ); - - private: - // friends - friend class CFormatStackContext; - - private: - // members - // formatted flowboxes are added to the stack(iFormatStack) to be postformatted after - // formatting the flowboxes children - CStack<CFormatStackContext, ETrue>* iFormatStack; - // default box formatter - TLMgr_BoxFormatter iTLMgr_BoxFormatter; - // marquee box formatter - TLMgr_Marquee_Box_Formatter iTLMgr_Marquee_Box_Formatter; - // Table cell or table row box formatter - TLMgr_StaticCell_Box_Formatter iTLMgr_StaticCell_Box_Formatter; - - // Last box to be formatted from the boxtree - NW_LMgr_Box_t *iLastBoxToFormat ; - // RootBox reference - NW_LMgr_Box_t *iRootBox; - - // The current flowbox used to format iFormatBox - NW_LMgr_Box_t* iCurrentFlowBox ; - // The current format context used to format iFormatBox - NW_LMgr_FormatContext_t* iCurrentFormatContext; - // The box to be formatted - NW_LMgr_Box_t* iFormatBox; - // is ETrue if the box that is formatted is split - TBool iContainerSplit; - // is ETrue if part of the tree is to be formatted - TBool iSelectiveFormatting; - // is ETrue if PartialFormatL method is called for the last chunk - TBool iPageLoadCompleted; - TBool iFormattingCompleted; - CArrayPtrFlat<NW_LMgr_FormatContext_t>* iFormatContextRef; - // the following 2 members are used to normalize the boxtree - TBool iFirstBr; - TBool iSecondBr; - TBool iBackgroundFormat; - CActive::TPriority iFormattingPriority; - }; - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/BoxRender.h --- a/webengine/wmlengine/src/lmgr/include/BoxRender.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef BOX_RENDER_H -#define BOX_RENDER_H - -#include "nw_gdi_utils.h" -#include "nw_lmgr_box.h" -#include "nw_lmgr_rootbox.h" - -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define NO_CHILDREN 0 -#define DRAW_CHILDREN 1 -#define NOT_DRAW_CHILDREN 2 - -TBrowserStatusCode -BoxRender_Render ( NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool hasFocus, - NW_LMgr_RootBox_t* rootBox ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrAnonBlock.h --- a/webengine/wmlengine/src/lmgr/include/LMgrAnonBlock.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the anonymous block box -* See CSS2 Spec from WWW.W3C.ORG (page 98) -* -*/ - -#ifndef _LMGRANONBLOCK_H -#define _LMGRANONBLOCK_H - -#include "nw_lmgr_bidiflowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Bidi Flow boxes manage bidirectional flows */ - -typedef struct LMgrAnonBlock_s LMgrAnonBlock_t; - -typedef struct LMgrAnonBlock_ClassPart_s { - void** unused; /* empty class part */ -} LMgrAnonBlock_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct LMgrAnonBlock_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - LMgrAnonBlock_ClassPart_t LMgrAnonBlock; -} LMgrAnonBlock_Class_t; - -/* ------------------------------------------------------------------------- */ -struct LMgrAnonBlock_s { - NW_LMgr_BidiFlowBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define LMgrAnonBlock_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, LMgrAnonBlock)) - - -#define LMgrAnonBlockOf(_object) \ -((LMgrAnonBlock_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const LMgrAnonBlock_Class_t LMgrAnonBlock_Class; - -NW_LMGR_EXPORT -TBrowserStatusCode -LMgrAnonBlock_Collapse (LMgrAnonBlock_t* aAnonBlock); - -NW_LMGR_EXPORT -LMgrAnonBlock_t* -LMgrAnonBlock_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrAnonTableBox.h --- a/webengine/wmlengine/src/lmgr/include/LMgrAnonTableBox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the anonymous table box -* that wraps the caption and the table - See CSS2 Spec from WWW.W3C.ORG (page 251) -* -*/ - -#ifndef _LMGRANONTABLEBOX_H -#define _LMGRANONTABLEBOX_H - -#include "LMgrAnonBlock.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Bidi Flow boxes manage bidirectional flows */ - -typedef struct LMgrAnonTableBox_s LMgrAnonTableBox_t; - -typedef struct LMgrAnonTableBox_ClassPart_s { - void** unused; /* empty class part */ -} LMgrAnonTableBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct LMgrAnonTableBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - LMgrAnonBlock_ClassPart_t LMgrAnonBlock; - LMgrAnonTableBox_ClassPart_t LMgrAnonTableBox; -} LMgrAnonTableBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct LMgrAnonTableBox_s { - LMgrAnonBlock_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define LMgrAnonTableBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, LMgrAnonTableBox)) - - -#define LMgrAnonTableBoxOf(_object) \ -((LMgrAnonTableBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const LMgrAnonTableBox_Class_t LMgrAnonTableBox_Class; - - -NW_LMGR_EXPORT -LMgrAnonTableBox_t* -LMgrAnonTableBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrBoxDestructionListener.h --- a/webengine/wmlengine/src/lmgr/include/LMgrBoxDestructionListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides a means for a box to notify its listener when it is deleted. -* -*/ - - - -#ifndef MLMGRBOXDESTRUCTIONLISTENER_H -#define MLMGRBOXDESTRUCTIONLISTENER_H - - -// CLASS DECLARATION - -class MLMgrBoxDestructionListener - { - public: - /** - * Notify the listener that the box has been destroyed. - * - * @return void - */ - virtual void Destroyed() = 0; - }; - -#endif // MLMGRBOXDESTRUCTIONLISTENER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrBoxTreeListener.h --- a/webengine/wmlengine/src/lmgr/include/LMgrBoxTreeListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef LMGRBOXTREELISTENER_H -#define LMGRBOXTREELISTENER_H - -// INCLUDES -#include <e32std.h> -#include <e32base.h> - -#include "BrsrTypes.h" -#include "nwx_defs.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Base class for. -* -* @lib lmgr.lib -* @since 2.6 -*/ -class MBoxTreeListener -{ - - public: - /** - * - * @since 2.6 - * @param - * @return CGDIDeviceContext* - */ - virtual CGDIDeviceContext* GetDeviceContext () = 0; - - /** - * - * @since 2.6 - * @param - * @return NW_LMgr_Box_t* - */ - virtual NW_LMgr_Box_t* GetCurrentBox () = 0; - - /** - * - * @since 2.6 - * @param box - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode ReformatBox (NW_LMgr_Box_t* box) = 0; - - /** - * - * @since 2.6 - * @param - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode BoxTreeListenerRelayout (NW_Bool createTabList) = 0; - - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void BoxTreeDestroyed () = 0; - - /** - * - * @since 2.6 - * @param box - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode Refresh (NW_LMgr_Box_t* box) = 0; - - /** - * - * @since 2.6 - * @param - * @return void* - */ - virtual void* GetParentWindow () = 0; - - /** - * - * @since 2.6 - * @param drawNow - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode RedrawDisplay (NW_Bool drawNow) = 0; - - /** - * - * @since 2.6 - * @param - * @return NW_LMgr_Box_t* - */ - virtual NW_LMgr_Box_t* GetInFocusBox () const = 0; - - /** - * - * @since 2.6 - * @param collapseAnonymous - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode Collapse (NW_LMgr_FlowBox_t* containingFlow, NW_Bool collapseAnonymous) = 0; - - /** - * - * @since 2.6 - * @param createTabList - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode FormatBoxTree (NW_Bool createTabList) = 0; - - /** - * - * @since 2.6 - * @param box - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode GotoBox (NW_LMgr_Box_t* box) = 0; - - /** - * - * @since 2.6 - * @param box - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode BoxTreeListenerAppendTabItem (NW_LMgr_Box_t* box) = 0; - - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void FormattingComplete () = 0; - - /** - * - * @since 2.6 - * @param status - * @return void - */ - virtual void HandleError (TBrowserStatusCode status) = 0; - - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void StartCSSApply () = 0; - - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void EnableSuppressDupReformats (NW_Int16 state) = 0; - - /** - * - * @since 2.6 - * @param - * @return NW_Bool - */ - virtual NW_Bool IsForcedReformatNeeded () = 0; - - /** - * - * @since 2.6 - * @param - * @return void - */ - virtual void ForcedReformatNeeded () = 0; - - /** - * - * @since 3.0 - * @param - * @return NW_TRUE if formatting was done, and NW_FALSE if not - */ - virtual NW_Bool FormatPositionedBoxes () = 0; - - -}; - -#endif // LMGRBOXTREELISTENER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrMarkerImage.h --- a/webengine/wmlengine/src/lmgr/include/LMgrMarkerImage.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the marker box -* -*/ - -#ifndef _LMGRMARKERIMAGE_H -#define _LMGRMARKERIMAGE_H - -#include "nw_lmgr_animatedimagebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - -typedef struct LMgrMarkerImage_ClassPart_s { - void** unused; -} LMgrMarkerImage_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct LMgrMarkerImage_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ImgContainerBox_ClassPart_t NW_LMgr_ImgContainerBox; - NW_LMgr_AnimatedImageBox_ClassPart_t NW_LMgr_AnimatedImageBox; - LMgrMarkerImage_ClassPart_t LMgrMarkerImage; -} LMgrMarkerImage_Class_t; - -/* ------------------------------------------------------------------------- */ - -typedef struct LMgrMarkerImage_s -{ - NW_LMgr_AnimatedImageBox_t super; -} LMgrMarkerImage_t; - -/* ------------------------------------------------------------------------- */ -#define LMgrMarkerImage_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, LMgrMarkerImage)) - - -#define LMgrMarkerImageOf(_object) \ -((LMgrMarkerImage_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const LMgrMarkerImage_Class_t LMgrMarkerImage_Class; - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -LMgrMarkerImage_t* -LMgrMarkerImage_New (NW_ADT_Vector_Metric_t numProperties, NW_Image_AbstractImage_t* aVirtualImage, - NW_Text_t* aAltText, NW_Bool aBrokenImage ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _LMGRMARKERIMAGE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrMarkerText.h --- a/webengine/wmlengine/src/lmgr/include/LMgrMarkerText.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the marker box -* -*/ - -#ifndef _LMgrMarkerTextTEXT_H -#define _LMgrMarkerTextTEXT_H - -#include "nw_lmgr_textbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - -typedef struct LMgrMarkerText_ClassPart_s { - void** unused; -} LMgrMarkerText_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct LMgrMarkerText_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_AbstractTextBox_ClassPart_t NW_LMgr_AbstractTextBox; - NW_LMgr_TextBox_ClassPart_t NW_LMgr_TextBox; - LMgrMarkerText_ClassPart_t LMgrMarkerText; -} LMgrMarkerText_Class_t; - -/* ------------------------------------------------------------------------- */ - -typedef struct LMgrMarkerText_s -{ - NW_LMgr_TextBox_t super; -} LMgrMarkerText_t; - -/* ------------------------------------------------------------------------- */ -#define LMgrMarkerText_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, LMgrMarkerText)) - - -#define LMgrMarkerTextOf(_object) \ -((LMgrMarkerText_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const LMgrMarkerText_Class_t LMgrMarkerText_Class; - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -LMgrMarkerText_t* -LMgrMarkerText_New (NW_ADT_Vector_Metric_t numProperties, - NW_Text_t* aText); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXTBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrObjectBox.h --- a/webengine/wmlengine/src/lmgr/include/LMgrObjectBox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,338 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides a means for PluginInst's to communicate with thier owner -* -*/ - - - -#ifndef CPLUGINBOX_H -#define CPLUGINBOX_H - -// INCLUDES -#include <e32def.h> -#include <e32base.h> - -#include "nw_gdi_types.h" -#include "nw_lmgr_propertylist.h" -#include "GDIDevicecontext.h" - -// FORWARD DECLARATIONS -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_LMgr_RootBox_s NW_LMgr_RootBox_t; -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; -typedef struct NW_LMgr_FormatContext_s NW_LMgr_FormatContext_t; -typedef struct NW_LMgr_EventHandler_s NW_LMgr_EventHandler_t; -typedef struct NW_Text_Abstract_s NW_Text_t; -typedef struct NW_Image_AbstractImage_s NW_Image_AbstractImage_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -class CCoeControl; -class MLMgrObjectBoxListener; -class MLMgrBoxDestructionListener; - -// CLASS DECLARATION - -// TODO: This class should be derived from CMediaBox once the browser is -// converted to c++. - -class CLMgrObjectBox : public CBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * - * @param aBox the NW_LMgr_NpiBox it is managing. - */ - static CLMgrObjectBox* NewL(NW_LMgr_Box_t* aBox); - - /** - * Creates a NPI box-tree, an active container box with a single NPI box as a child. - * - * @param aEventHandler the active container box's event handler. - * @param aPluginContainerBox upon success, an active container box. - * @param aPluginBox upon success, the new NPI Box - * @return TBrowserStatusCode - */ - static TBrowserStatusCode NewBox(NW_LMgr_EventHandler_t* aEventHandler, - NW_LMgr_Box_t** aPluginContainerBox, NW_LMgr_Box_t** aPluginBox); - - /** - * Destructor. - */ - virtual ~CLMgrObjectBox(); - - - public: // New Methods - /** - * Allows the box to be placed on the on a new line and grows - * the box to the width of "space" if the box doesn't have - * a width property. - * - * @param aSpace the amount of space available on the line. - * @param aSplitBox not used. - * @param aFlags LMgr split flags. - * @return KBrsrLmgrNoSplit, KBrsrSuccess - */ - virtual TBrowserStatusCode Split(NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, NW_Uint8 aFlags); - - /** - * Calculates the minimum size needed for the box. - * - * @param aSize the size of the box. - * @return void - */ - virtual void GetMinimumContentSize(NW_GDI_Dimension2D_t& aSize); - - /** - * Draws the border, background and place holder (while the place - * holder is shown). - * - * @param aDeviceContext the device context used for drawing. - * @param aHasFocus whether the box has focus. - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode Draw(const CGDIDeviceContext& aDeviceContext, - NW_Bool aHasFocus); - - /** - * If necessary it positions the CPluginInst to match the box's - * bounds and renders the box. - * - * @param aDeviceContext the device context used for drawing. - * @param aClipRect the current clip rect. - * @param aCurrentBox the current box. - * @param aCurrentBox flags used during rendering. - * @param aHasFocus whether the box has focus. - * @param aSkipChildren whether the children should be skipped. - * @param aRootBox the root box. - * @return TBrowserStatusCode - */ - virtual TBrowserStatusCode Render(const CGDIDeviceContext& aDeviceContext, - const NW_LMgr_RootBox_t& aRootBox, const NW_GDI_Rectangle_t& aClipRect, - const NW_LMgr_Box_t* aCurrentBox, NW_Uint8 aFlags, NW_Bool& aHasFocus, - NW_Bool& aSkipChildren); - - /** - * Set the box's listener - * - * @param aListener the listener - * @return void - */ - void SetBoxListener(MLMgrObjectBoxListener* aListener); - - /** - * Adds a box destruction listener. - * - * @param aListener the listener - * @return void - */ - void AddBoxDestructionListenerL(MLMgrBoxDestructionListener* aListener); - - /** - * Removes a box destruction listener. - * - * @param aListener the listener - * @return void - */ - void RemoveBoxDestructionListener(MLMgrBoxDestructionListener* aListener); - - /** - * Sets the place holder text. - * - * @param aText - * @return void - */ - void SetPlaceHolderTextL(const TDesC& aNewText); - - /** - * Set the place-holder text to the given resource id. - * - * @param aResourceId the string's resource id. - * - * @return void - */ - void SetPlaceHolderTextL(TInt aResourceId); - - /** - * Removes the place holder's text and image. - * - * @return void - */ - void RemovePlaceHolder(void); - - /** - * Returns ETrue if the place holder is being shown. - * - * @return ETure or EFalse - */ - TBool IsShowingPlaceHolder(void); - - /** - * Returns if the plugin is active or not. - * - * @param . - * @return if the plugin is active or not. - */ - TBool IsActive() const; - - /** - * Each CLMgrObjectBox is contained in a container-box. In order to identify the - * plugin box associated with a given elementNode the NW_CSS_Prop_elementId - * CSS property is applied, where the property value equals the element-node. - * FindBoxTree returns the box that contains a NW_CSS_Prop_elementId with a - * value matching aBoxKey. - * - * @param aBoxTree the box-tree of the enclosing content handler. - * @param aBoxKey a pointer to the associated element-node. - * @return the CLMgrObjectBox's container-box. - */ - static NW_LMgr_Box_t* FindBoxTree(const NW_LMgr_Box_t& aBoxTree, - void* aBoxKey); - - /** - * Each CLMgrObjectBox is contained in a container-box. FindObjectBox finds - * and returns the first NW_LMgr_NpiBox found in aBoxTree. - * - * @param aBoxTree the CLMgrObjectBox's container-box. - * @return the NW_LMgr_NpiBox. - */ - static NW_LMgr_Box_t* FindObjectBox(const NW_LMgr_Box_t& aBoxTree); - - /** - * Returns the given property as a descriptor. - * - * @param aBoxTree the CLMgrObjectBox's container-box. - * @return the NW_LMgr_NpiBox. - */ - static TDesC* GetTextProperty(const NW_LMgr_Box_t& aBox, - NW_LMgr_PropertyName_t aProperty); - - /** - * Returns the view infrastructure's CCoeControl associated the given root-box. - * - * @param aRootBox a root-box. - * @return the CCoeControl associated the given root-box. - */ - static CCoeControl* GetParentWindow(const NW_LMgr_RootBox_t& aRootBox); - - /** - * Returns the OOC ObjectBox. - * - * @param . - * @return the OOC ObjectBox. - */ - NW_LMgr_Box_t* Box(){return iBox;} - - - private: // Private Methods - /** - * C++ default constructor. - */ - CLMgrObjectBox(NW_LMgr_Box_t* aBox); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(void); - - /** - * Returns the view infrastructure's CCoeControl associated with this instance. - * - * @return the CCoeControl associated with this instance. - */ - CCoeControl* GetParentWindow(void); - - /** - * Shows, sizes, and locates the CPluginInst or place holder to correspond with - * the box. - * - * @param aLocation where the PluginInst should be placed - * @param aSize the size the PluginInst or place holder should be. - * @return void - */ - void AttachPluginInst(const NW_GDI_Point2D_s& aLocation, - const NW_GDI_Dimension2D_t& aSize); - - /** - * Detaches the CPluginInst from its parent. - * - * @param void - * @return void - */ - void DetachPluginInst(void); - - /** - * Adjusts the location and size of the PluginInst or place holder so it matches iBox's - * bounds. - * - * @param aDeviceContext the device context used for drawing. - * @return void - */ - void SyncPluginInstBounds(const CGDIDeviceContext& aDeviceContext); - - /** - * Implements the the NPI handling rules for vertical layout - * 1. Scale the box maintaining the aspect ratio if width is greater than display width - * 2. Scale the box maintaining the aspect ratio if height is greater than display height - * 3. If box is too small it doesn't participate in the layout. - * - * @param aOrigSize the original size of the box - * @param aNewSize the new size of the box - * @return void - */ - void HandleVerticalLayout(const NW_GDI_Dimension2D_t& aOrigSize, - NW_GDI_Dimension2D_t& aNewSize); - - /** - * Creates a copy of aText such that it width is <= aAvailableSpace -- truncating as necessary. - * - * @param aText the string to be copied. - * @param aDeviceContext the device context used for drawing. - * @param aAvailableSpace the amount of space available -- the size aText must fit in. - * @param aAddDots if true "..." will be appended if aText needs to be clipped. - * @return a copy of aText whos width is <= aAvailableSpace. - */ - TDesC* ClipText(const TDesC& aText, const CGDIDeviceContext& aDeviceContext, - NW_GDI_Metric_t aAvailableSpace, TBool aAddDots); - - - private: // Data - NW_LMgr_Box_t* iBox; - CCoeControl* iPluginInst; - TBool iPluginAttached; - TBool iInHyperLink; - - TBool iShowingPlaceHolder; - const NW_Image_AbstractImage_t* iPlaceHolderImage; - TDesC* iOrigPlaceHolderText; - TDesC* iPlaceHolderText; - TBool iCalculatePlaceHolderClip; - - TBool iForceSyncPluginInst; - NW_GDI_Point2D_t iLocation; - NW_GDI_Dimension2D_t iSize; - - MLMgrObjectBoxListener* iBoxListener; - RPointerArray<MLMgrBoxDestructionListener> iDestructionListeners; - }; - -#endif // CPLUGINBOX_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrObjectBoxListener.h --- a/webengine/wmlengine/src/lmgr/include/LMgrObjectBoxListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides a means for a CLMgrObjectBox to communicate with its owner. -* -*/ - - - -#ifndef MLMGROBJECTBOXLISTENER_H -#define MLMGROBJECTBOXLISTENER_H - -// INCLUDES -#include <e32def.h> - -#include "LMgrBoxDestructionListener.h" - -// FORWARD DECLARATIONS - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_GDI_Rectangle_s NW_GDI_Rectangle_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -// CLASS DECLARATION - -class MLMgrObjectBoxListener : public MLMgrBoxDestructionListener - { - public: - /** - * Notifies the listener of the box's size and location. - * - * @since 2.6 - * @param aBounds the bounds of the box. - * @return The error code from the plugin - */ - virtual TBrowserStatusCode SetExtent(const NW_GDI_Rectangle_t& aBounds) = 0; - - /** - * Notifies the listener to redraw - * - * @since 2.6 - * @param - * @return The error code from the plugin - */ - virtual TBrowserStatusCode RefreshPlugin() = 0; - - - /** - * Notifies the listener of whether the box is visible or not. - * - * @since 2.6 - * @param aVisible whether the box is visible or not. - * @return void - */ - virtual void MakeVisible(TBool aVisible) = 0; - - /** - * Returns if the plugin is active or not - * @since 2.6 - * @param. - * @return Returns if the object is active or not - */ - virtual TBool IsActive() const = 0; - }; - -#endif // MLMGROBJECTBOXLISTENER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrObjectBoxOOC.h --- a/webengine/wmlengine/src/lmgr/include/LMgrObjectBoxOOC.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_OBJECTBOX_H -#define NW_LMGR_OBJECTBOX_H - -#include "nw_lmgr_mediabox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ObjectBox_Class_s NW_LMgr_ObjectBox_Class_t; -typedef struct NW_LMgr_ObjectBox_s NW_LMgr_ObjectBox_t; - -/* ------------------------------------------------------------------------- */ -class CLMgrObjectBox; -class MLMgrObjectBoxListener; -class CCoeControl; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ObjectBox_ClassPart_s - { - void** unused; - } NW_LMgr_ObjectBox_ClassPart_t; - -struct NW_LMgr_ObjectBox_Class_s - { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ObjectBox_ClassPart_t NW_LMgr_ObjectBox; - }; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_ObjectBox_s - { - NW_LMgr_MediaBox_t super; - - /* PRIVATE memeber fields */ - CLMgrObjectBox* iObjectBox; - }; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_ObjectBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ObjectBox)) - -#define NW_LMgr_ObjectBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ObjectBox)) - -#define NW_LMgr_ObjectBox_GetObjectBox(_box) \ - (((NW_LMgr_ObjectBox_t&) (_box)).iObjectBox) - -/*------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_ObjectBox_Class_t NW_LMgr_ObjectBox_Class; - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_ObjectBox_IsActive(NW_LMgr_Box_t* box); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_ObjectBox_t* -NW_LMgr_ObjectBox_New(NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_OBJECTBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/LMgrObjectBoxOOCi.h --- a/webengine/wmlengine/src/lmgr/include/LMgrObjectBoxOOCi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_OBJECTBOXI_H -#define NW_LMGR_OBJECTBOXI_H - -#include "nw_lmgr_mediaboxi.h" -#include "LMgrObjectBoxOOC.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual methods implementation declarations - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ObjectBox_Construct(NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ObjectBox_Destruct(NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ObjectBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ObjectBox_GetMinimumContentSize(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ObjectBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ObjectBox_Draw(NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/NW_LMgr_EXPORT.h --- a/webengine/wmlengine/src/lmgr/include/NW_LMgr_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_LMgr_EXPORT_h_ -#define _NW_LMgr_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_LMGR_EXPORT -#ifdef NW_IMPORT -#define NW_LMGR_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_LMGR_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_LMGR_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_LMgr_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/NW_LMgr_IEventListener.h --- a/webengine/wmlengine/src/lmgr/include/NW_LMgr_IEventListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_IEventListener_h -#define NW_LMgr_IEventListener_h - -#include "nw_object_interface.h" -#include "nw_evt_event.h" -#include "NW_LMgr_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_IEventListener_Class_s NW_LMgr_IEventListener_Class_t; -typedef struct NW_LMgr_IEventListener_s NW_LMgr_IEventListener_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Uint8 -(*NW_LMgr_IEventListener_ProcessEvent_t) (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_IEventListener_ClassPart_s { - NW_LMgr_IEventListener_ProcessEvent_t processEvent; -} NW_LMgr_IEventListener_ClassPart_t; - -struct NW_LMgr_IEventListener_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_LMgr_IEventListener_ClassPart_t NW_LMgr_IEventListener; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_LMgr_IEventListener_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_IEventListener_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_IEventListener)) - -#define NW_LMgr_IEventListenerOf(object) \ - (NW_Object_Cast (object, NW_LMgr_IEventListener)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_IEventListener_Class_t NW_LMgr_IEventListener_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_IEventListener_ProcessEvent(_eventListener, _event) \ - (NW_Object_Invoke(_eventListener, NW_LMgr_IEventListener, processEvent) \ - (NW_LMgr_IEventListenerOf (_eventListener), NW_Evt_EventOf (_event))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_IEventListener_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/NW_LMgr_IEventListenerI.h --- a/webengine/wmlengine/src/lmgr/include/NW_LMgr_IEventListenerI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_IEventListenerI_h -#define NW_LMgr_IEventListenerI_h - - -#include "nw_object_interfacei.h" -#include "NW_LMgr_IEventListener.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_IEventListenerI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/ObjectUtils.h --- a/webengine/wmlengine/src/lmgr/include/ObjectUtils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,298 +0,0 @@ -/* -* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Performs a set of util methods related to objects. -* -*/ - - - -#ifndef OBJECTUTILS_H -#define OBJECTUTILS_H - -// INCLUDES -#include <e32def.h> -#include <badesca.h> - -#include "nwx_defs.h" -#include "nw_dom_element.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; -typedef struct NW_HED_DomHelper_s NW_HED_DomHelper_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -class CBrCtlObjectInfo; - -// CLASS DECLARATION - -class ObjectUtils - { - public: // Datatypes - typedef enum - { - EHandlerImage, - EHandlerPlugin, - EHandlerExternalApp, - EHandlerAny - } THandlerType; - - - public: // Constructors and destructor - /** - * Destructor. - */ - ~ObjectUtils(); - - - public: // New Methods - /** - * Returns ETrue if aBox is an object box. - * - * @param aBox a box. - * @param aOnlyIfPlaceHolder if true this method will only return true - * if the box is showing its place-holder (not an active plugin). - * Otherwise it was true true if it an object-box. - * - * @return ETrue or EFalse. - */ - static TBool IsObjectBox(const NW_LMgr_Box_t& aBox, TBool aOnlyIfPlaceHolder); - - /** - * Returns ETrue if aBox is an object box in the pre-active state. - * - * @param aBox a box. - * - * @return ETrue or EFalse. - */ - static TBool IsDownloadedObjectBox(const NW_LMgr_Box_t& aBox); - - /** - * Gets the following information about the object's resource: whether a third party - * plugin or external application can open the resource, the size of the resource, - * the mime-type of the resource, and the name of the plugin or application to - * be used to open the resource. - * - * @param aBox the object's associated box. - * @param aBrCtlObjectInfo, upon completion it holds the info about the object. - * - * @return void. - */ - static void GetBrCtlObjectInfoL(const NW_LMgr_Box_t& aBox, CBrCtlObjectInfo& aBrCtlObjectInfo); - - /** - * Determines whether a given content-type of dot-extension has a cooresponding - * plugin or external application. aContentType and aUrl can be NULL, but at least - * one must be non-NULL (otherwise it will always return EFalse). If aHandlerType - * is EPlugin then it returns ETrue only if their is a supported plugin. If aHandlerType - * is EExternalApp then it returns ETrue only if their is a supported external - * application. If aHandlerType is EBoth then it returns ETrue only if their is a - * supported plugin or external application. - * - * @param aContentType the content type to compare against, may be NULL. - * @param aUrl the url to extract the dot-extension and to compare against, may be NULL. - * @param aHandlerType the type of handler to consider. - * - * @return ETrue or EFalse. - */ - static TBool IsSupported(const TDesC* aContentType, const TDesC* aUrl, - THandlerType aHandlerType); - - /** - * Returns ETrue if plugin support is enabled. - * - * @return ETrue or EFalse. - */ - static TBool Enabled(); - - /** - * Extracts the attribute's names and values from the given aElementNode. - * - * @param aDomHelper the caller's DomHelper, used to interact with its - * dom-tree. - * @param aElementNode the element to extract attributes from. - * @param aNameArray the attribute names. - * @param aValueArray the attribute values. - * - * @return void - */ - static void GetAttributesL(const NW_HED_DomHelper_t& aDomHelper, - const NW_DOM_ElementNode_t& aElementNode, CDesCArray** aNameArray, - CDesCArray** aValueArray); - - /** - * Extracts the <param> tag attribute's name and value from the given aElementNode. - * - * @param aDomHelper the caller's DomHelper, used to interact with its - * dom-tree. - * @param aElementNode the element to extract attributes from. - * @param aNameArray the attribute names. - * @param aValueArray the attribute values. - * - * @return void - */ - static void GetParamAttributesL(const NW_HED_DomHelper_t& aDomHelper, - const NW_DOM_ElementNode_t& aElementNode, CDesCArray** aNameArray, - CDesCArray** aValueArray); - - /** - * Given a name and value array attained from GetAttributesL it returns - * a copy of the attribute value associated with the given name. Upon - * success the caller adopts aValue. aValue is set to NULL if no - * attribute with the given name is present. - * - * @param aNameArray the attribute names. - * @param aValueArray the attribute values. - * @param aName the name of the attribute to be extracted. - * @param aValue upon success it contains a copy of the attribute value or - * NULL if the attribute wasn't present. - * - * @return void - */ - static void GetAttributeValueL(const CDesCArray& aNameArray, - const CDesCArray& aValueArray, const TDesC& aName, TDesC** aValue); - - /** - * Given a name and value array this method inserts name/value pair to array. - * If the name already is in the array, replace value - * by deleting old pair and adding new pair - * - * @param aNameArray the attribute names. - * @param aValueArray the attribute values. - * @param aName the name of the attribute to be replaced. - * @param aValue the value of the attribute to be replaced. - * - * @return void - */ - static void SetAttributeValueL( CDesCArray& aNameArray, - CDesCArray& aValueArray, const TDesC& aName, const TDesC& aValue); - - /** - * Given a name and value array this method remove name/value pair from array. - * If the name is not found in the array, do nothing - * - * @param aNameArray the attribute names. - * @param aValueArray the attribute values. - * @param aName the name of the attribute to be removed. - * - * @return void - */ - static void ObjectUtils::RemoveAttributeL( CDesCArray& aNameArray, - CDesCArray& aValueArray, const TDesC& aName ); - - /** - * Returns the content type associated with the given class-id. - * - * @param aClassId the classid to lookup. - * - * @return the associated content type of NULL if no association exists. - */ - static TDesC* ObjectUtils::GetAssociatedContentType(const TDesC& aClassId); - - /** - * Returns the source param name associated with the given class-id. - * - * @param aClassId the classid to lookup. - * - * @return the associated source param name of NULL if no association exists. - */ - static TDesC* ObjectUtils::GetAssociatedSourceParamName(const TDesC& aClassId); - - /** - * General purpose panic function for Object related errors. - * - * @since 2.6 - * @param aError The reason for panic. Could be left out. - * @return void - */ - static void Panic(TInt aError = KErrNone); - - /** - * General purpose panic function for Object related errors. - * - * @since 2.8 - * @param aUrl The uri with file name and extension. - * @return the content type of the uri - */ - static HBufC* ObjectUtils::GetContentTypeByUrl(const TDesC* aUri); - - private: // Private Methods - /** - * C++ default constructor. - */ - ObjectUtils(); - - /** - * Returns the name of the plugin that supports the given content-type or - * dot-extension otherwise NULL if no plugin support this type. aContentType - * and aUrl can be NULL, but at least one must be non-NULL (otherwise it will - * always return EFalse). The caller adopts the result. - * - * @param aContentType the content type to compare against, may be NULL. - * @param aUrl the url to compare against, may be NULL. - * - * @return The name of the plugin or NULL - */ - static TDesC* GetPluginNameL(const TDesC* aContentType, - const TDesC* aUrl); - - /** - * Returns the name of the external application that supports the given - * content-type or NULL if no application support this type. - * The caller adopts the result. - * - * @return The name of the application or NULL - */ - static TDesC* GetExternalAppNameL(const TDesC* aContentType); - - /** - * Returns ETrue if the content-type or dot-extension is a supported image type. - * aContentType and aUrl can be NULL, but at least one must be non-NULL (otherwise - * it will always return EFalse). - * - * @param aContentType the content type to compare against, may be NULL. - * @param aUrl the url to compare against, may be NULL. - * - * @return ETrue if its a supported image type. - */ - static TBool IsImageSupported(const TDesC* aContentType, const TDesC* aUrl); - - /** - * Returns the cooresponding value (either source-param-name or content-type) - * given the class-id. - * - * @param aClassId the class-id used to map to the requested value. - * @param aValueSelector used to select the cooresponding value - * (either KParamName or KContentType) - * @return the value or NULL on out of memory. - */ - static TDesC* ObjectUtils::GetClassidAssociation(const TDesC& aClassId, - TInt aValueSelector); - }; - -#endif // OBJECTUTILS_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_abstracttextbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_abstracttextbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ABSTRACTTEXTBOX_H -#define NW_ABSTRACTTEXTBOX_H - -#include "nw_lmgr_mediabox.h" -#include "NW_Text_Abstract.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AbstractTextBox_Class_s NW_LMgr_AbstractTextBox_Class_t; -typedef struct NW_LMgr_AbstractTextBox_s NW_LMgr_AbstractTextBox_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Text_t* -(*NW_LMgr_AbstractTextBox_GetText_t)(NW_LMgr_AbstractTextBox_t *box); - -typedef -NW_Text_Length_t -(*NW_LMgr_AbstractTextBox_GetStart_t)(NW_LMgr_AbstractTextBox_t *box); - -typedef struct NW_LMgr_AbstractTextBox_ClassPart_s { - NW_LMgr_AbstractTextBox_GetText_t getText; - NW_LMgr_AbstractTextBox_GetStart_t getStart; -} NW_LMgr_AbstractTextBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_AbstractTextBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_AbstractTextBox_ClassPart_t NW_LMgr_AbstractTextBox; -}; - -/* ------------------------------------------------------------------------- */ - -struct NW_LMgr_AbstractTextBox_s { - NW_LMgr_MediaBox_t super; - NW_Text_Length_t length; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_AbstractTextBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_AbstractTextBox)) - - -#define NW_LMgr_AbstractTextBoxOf(_object) \ -((NW_LMgr_AbstractTextBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_AbstractTextBox_Class_t NW_LMgr_AbstractTextBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_AbstractTextBox_CompressLeading(_box) \ - ((_box)->length = (NW_Uint16)((_box)->length | 0x8000)) -#define NW_LMgr_AbstractTextBox_CompressTrailing(_box) \ - ((_box)->length = (NW_Uint16)((_box)->length | 0x4000)) -#define NW_LMgr_AbstractTextBox_PreserveLeading(_box) \ - ((_box)->length = (NW_Uint16)((_box)->length & 0x8000)) -#define NW_LMgr_AbstractTextBox_PreserveTrailing(_box) \ - ((_box)->length = (NW_Uint16)((_box)->length & 0x4000)) -#define NW_LMgr_AbstractTextBox_IsCompressedLeading(_box) \ - ((NW_Uint16)((_box)->length & 0x8000) ? NW_TRUE : NW_FALSE) -#define NW_LMgr_AbstractTextBox_IsCompressedTrailing(_box) \ - ((NW_Uint16)((_box)->length & 0x4000) ? NW_TRUE : NW_FALSE) -#define NW_LMgr_AbstractTextBox_GetLength(_box) \ - ((NW_Uint16)((_box)->length & 0x3fff)) -#define NW_LMgr_AbstractTextBox_SetLength(_box, _length) \ - ((_box)->length = (NW_Uint16)(((_box)->length & 0xc000) + ((_length) & 0x3fff))) -#define NW_LMgr_AbstractTextBox_GetText(_object) \ - (NW_LMgr_AbstractTextBox_GetClassPart (_object).getText ((_object))) -#define NW_LMgr_AbstractTextBox_GetStart(_object) \ - (NW_LMgr_AbstractTextBox_GetClassPart (_object).getStart ((_object))) - - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetDimensions (NW_LMgr_AbstractTextBox_t* box, NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetMinimumSizeByWord (NW_LMgr_AbstractTextBox_t* box, NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetWS (NW_LMgr_AbstractTextBox_t *textBox, - NW_Bool *hasLeading, - NW_Bool *hasTrailing, - NW_Bool *endsInNewline); - -NW_LMGR_EXPORT -NW_Text_t* -NW_LMgr_AbstractTextBox_GetDisplayText (NW_LMgr_AbstractTextBox_t* textBox, - NW_Bool skipWS); -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_AbstractTextBox_IsBlank (NW_LMgr_AbstractTextBox_t* textBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_AbstractTextBox_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_abstracttextboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_abstracttextboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ABSTRACTTEXTBOXI_H -#define NW_ABSTRACTTEXTBOXI_H - -#include "nw_lmgr_mediaboxi.h" -#include "nw_lmgr_abstracttextbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Text box overrides */ - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -NW_LMGR_EXPORT -void -_NW_LMgr_AbstractTextBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -NW_Bool -_NW_LMgr_AbstractTextBox_HasTrailingWS(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TextBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags); -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_AbstractTextBox_GetBaseline (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AbstractTextBox_TrimDisplayText (NW_LMgr_AbstractTextBox_t* textBox, - NW_Text_t* displayText); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ABSTRACTTEXTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_accesskey.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_accesskey.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACCESSKEY_H -#define NW_LMGR_ACCESSKEY_H - -#include "nw_object_dynamic.h" -#include "nw_text_ucs2.h" -#include "nw_adt_dynamicvector.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AccessKey_Class_s NW_LMgr_AccessKey_Class_t; -typedef struct NW_LMgr_AccessKey_s NW_LMgr_AccessKey_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -typedef -NW_Bool -(*NW_LMgr_AccessKey_IsValidForOptionsList_t) (NW_LMgr_AccessKey_t* accessKey, - NW_Uint32 val); - -typedef -NW_Bool -(*NW_LMgr_AccessKey_IsValidKeyPress_t) (NW_LMgr_AccessKey_t* accessKey, - NW_Uint32 val); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AccessKey_ClassPart_s { - NW_LMgr_AccessKey_IsValidForOptionsList_t isValidForOptionsList; - NW_LMgr_AccessKey_IsValidKeyPress_t isValidKeyPress; -} NW_LMgr_AccessKey_ClassPart_t; - -struct NW_LMgr_AccessKey_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_AccessKey_ClassPart_t NW_LMgr_AccessKey; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_AccessKey_s { - NW_Object_Dynamic_t super; - - NW_ADT_DynamicVector_t* valueList; - NW_Text_t* label; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_AccessKey_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_AccessKey)) - -#define NW_LMgr_AccessKeyOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_AccessKey)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_AccessKey_Class_t NW_LMgr_AccessKey_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AccessKey_SetFromTextAttr(NW_LMgr_AccessKey_t* accessKey, - NW_Text_t* val); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_AccessKey_AddVal(NW_LMgr_AccessKey_t* accessKey, - NW_Ucs2* val, - NW_Bool andOp); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_AccessKey_MatchKey(NW_LMgr_AccessKey_t* accessKey, - NW_Uint32 v, - NW_Bool isControlKey); - -NW_Bool -NW_LMgr_AccessKey_GetDirectKey(NW_LMgr_AccessKey_t* accessKey, - NW_Uint32 *v); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_AccessKey_SetAvailableKey(NW_LMgr_AccessKey_t* accessKey, - NW_ADT_DynamicVector_t* activeBoxList); - -#define NW_LMgr_AccessKey_GetSupportedKeys(_accesskey) \ - (NW_LMgr_AccessKeyOf(_accesskey)->valueList) - -#define NW_LMgr_AccessKey_IsValidForOptionsList(_accesskey, _val) \ - (NW_Object_Invoke (_accesskey, NW_LMgr_AccessKey, isValidForOptionsList) \ - ((_accesskey), (_val))) - -#define NW_LMgr_AccessKey_IsValidKeyPress(_accesskey, _val) \ - (NW_Object_Invoke (_accesskey, NW_LMgr_AccessKey, isValidKeyPress) \ - ((_accesskey), (_val))) - -#define NW_LMgr_AccessKey_GetLabel(_accesskey) \ - (NW_LMgr_AccessKeyOf(_accesskey)->label) - -#define NW_LMgr_AccessKey_SetLabel(_accesskey, _label) \ - (NW_LMgr_AccessKeyOf(_accesskey)->label = _label) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMgr_AccessKey_t* -NW_LMgr_AccessKey_New(); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACCESSKEY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_accesskeyi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_accesskeyi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACCESSKEYI_H -#define NW_LMGR_ACCESSKEYI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_accesskey.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AccessKey_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_AccessKey_Destruct (NW_Object_Dynamic_t* dynamicObject); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACCESSKEYI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_action.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_action.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTION_H -#define NW_LMGR_ACTION_H - -#include "nw_object_dynamic.h" -#include "NW_Text_Abstract.h" -#include "NW_LMgr_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Action_Class_s NW_LMgr_Action_Class_t; -typedef struct NW_LMgr_Action_s NW_LMgr_Action_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -void -(*NW_LMgr_Action_Invoke_t) (NW_LMgr_Action_t* Action); - -typedef -const NW_Text_t* -(*NW_LMgr_Action_GetLabel_t) (NW_LMgr_Action_t* Action); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Action_ClassPart_s { - NW_LMgr_Action_Invoke_t invoke; - NW_LMgr_Action_GetLabel_t getLabel; -} NW_LMgr_Action_ClassPart_t; - -struct NW_LMgr_Action_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Action_ClassPart_t NW_LMgr_Action; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_Action_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_Action_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_Action)) - -#define NW_LMgr_ActionOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_Action)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_Action_Class_t NW_LMgr_Action_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_Action_Invoke(_action) \ - (NW_LMgr_Invoke (_action, NW_LMgr_Action, invoke) \ - (_action)) - -#define NW_LMgr_Action_GetLabel(_action) \ - (NW_LMgr_Invoke (_action, NW_LMgr_Action, getLabel) \ - (_action)) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTION_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_actioni.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_actioni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIONI_H -#define NW_LMGR_ACTIONI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_action.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIONI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_actiontablebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_actiontablebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIONTABLEBOX_H -#define NW_LMGR_ACTIONTABLEBOX_H - - -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_action.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActionTableBox_Class_s NW_LMgr_ActionTableBox_Class_t; -typedef struct NW_LMgr_ActionTableBox_s NW_LMgr_ActionTableBox_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActionTableBox_ClassPart_s { - void** unused; -} NW_LMgr_ActionTableBox_ClassPart_t; - -struct NW_LMgr_ActionTableBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_ActiveContainerBox_ClassPart_t NW_LMgr_ActiveContainerBox; - NW_LMgr_ActionTableBox_ClassPart_t NW_LMgr_ActionTableBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_LMgr_ActionTableBox_s { - NW_LMgr_ActiveContainerBox_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* actionTable; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ActionTableBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ActionTableBox)) - -#define NW_LMgr_ActionTableBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ActionTableBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_ActionTableBox_Class_t NW_LMgr_ActionTableBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ActionTableBox_NewActionIterator(_actionTableBox) \ - (NW_ADT_VectorIterator_New ( \ - NW_LMgr_ActionTableBoxOf(_actionTableBox)->actionTable, 0, \ - NW_ADT_Vector_AtEnd, NW_ADT_IteratorDirection_Increment)) - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_ActionTableBox_t* -NW_LMgr_ActionTableBox_New (); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIONTABLEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_actiontableboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_actiontableboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIONTABLEBOXI_H -#define NW_LMGR_ACTIONTABLEBOXI_H - - -#include "nw_lmgr_activecontainerboxi.h" -#include "nw_lmgr_actiontablebox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIONTABLEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_activebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_activebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ACTIVEBOX_H -#define NW_ACTIVEBOX_H - -#include "nw_lmgr_box.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActiveBox_Class_s NW_LMgr_ActiveBox_Class_t; -typedef struct NW_LMgr_ActiveBox_s NW_LMgr_ActiveBox_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActiveBox_ClassPart_s { - void** unused; -} NW_LMgr_ActiveBox_ClassPart_t; - -struct NW_LMgr_ActiveBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_LMgr_ActiveBox_s { - NW_LMgr_Box_t super; - - /* implemented interfaces */ - NW_LMgr_IEventListener_t NW_LMgr_IEventListener; - - /* member variables */ - NW_LMgr_EventHandler_t* eventHandler; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ActiveBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ActiveBox)) - -#define NW_LMgr_ActiveBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ActiveBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_ActiveBox_Class_t NW_LMgr_ActiveBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_ACTIVEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_activeboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_activeboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ACTIVEBOXI_H -#define NW_ACTIVEBOXI_H - - - -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_activebox.h" -#include "NW_LMgr_IEventListenerI.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ActiveBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ActiveBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -NW_Uint8 -_NW_LMgr_ActiveBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_activecontainerbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_activecontainerbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIVECONTAINERBOX_H -#define NW_LMGR_ACTIVECONTAINERBOX_H - - -#include <nw_dom_node.h> -#include "nw_lmgr_containerbox.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_sound.h" -#include "nw_sound_contenthandler.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef enum NW_LMgr_ActiveContainerBox_ActionType_e -{ - NW_LMgr_ActionType_OpenLink = 0, - NW_LMgr_ActionType_DialNumber, - NW_LMgr_ActionType_SendMail, - NW_LMgr_ActionType_OpenObject, - NW_LMgr_ActionType_ActivateObject -}NW_LMgr_ActiveContainerBox_ActionType_t; - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActiveContainerBox_Class_s NW_LMgr_ActiveContainerBox_Class_t; -typedef struct NW_LMgr_ActiveContainerBox_s NW_LMgr_ActiveContainerBox_t; - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ActiveContainerBox_ClassPart_s { - void** unused; -} NW_LMgr_ActiveContainerBox_ClassPart_t; - -struct NW_LMgr_ActiveContainerBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_ActiveContainerBox_ClassPart_t NW_LMgr_ActiveContainerBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_LMgr_ActiveContainerBox_s { - NW_LMgr_ContainerBox_t super; - - /* implemented interfaces */ - NW_LMgr_IEventListener_t NW_LMgr_IEventListener; - - /* member variables */ - NW_LMgr_EventHandler_t* eventHandler; - NW_Text_t* iName; - NW_Text_t* hrefAttr; - NW_LMgr_ActiveContainerBox_ActionType_t actionType; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ActiveContainerBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ActiveContainerBox)) - -#define NW_LMgr_ActiveContainerBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ActiveContainerBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_ActiveContainerBox_Class_t NW_LMgr_ActiveContainerBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ActiveContainerBox_GetActionType(_object) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_ActiveContainerBox_ActionType_t) \ - NW_LMgr_ActiveContainerBoxOf(_object)->actionType) - -#define NW_LMgr_ActiveContainerBox_SetActionType(_object, _actionType) \ - ((void) (NW_LMgr_ActiveContainerBoxOf(_object)->actionType = _actionType)) - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/** -* Creates a new file selection box. -* @param aNumProperties ?description (not used) -* @param aEventHandler Event handler for this box. -* @param aActionType type of action to be taken when link is activated. -* @return Pointer to new active container box structure or null if failure. -* Caller assumes ownership of memory and must deallocate but not until -* after calling the OOC destructor. -*/ -NW_LMGR_EXPORT -NW_LMgr_ActiveContainerBox_t* -NW_LMgr_ActiveContainerBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_ActiveContainerBox_ActionType_t aActionType); - -/** -* Sets the name of this active container box. The name is used by ECMA script. -* @since 2.8 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aName value of name attribute for this element or NULL if none. -* @param aTakeOwnershipOfNameObject flag indicating whether ownership of the -* name object passed is transferred to this object. -* @return none -*/ -void -NW_LMgr_ActiveContainerBox_SetName( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_Text_t* aName, NW_Bool aTakeOwnershipOfNameObject ); - -/** -* Sets the soundstart state of this active container box. Soundstart is a -* proprietary customer feature of anchor tags. The soundstart state is stored -* as CSS properties of this box. Note, the soundstart src URL is NOT set. -* @since 2.8 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aElementNode address of the DOM node for this element. -* @param aSoundstartState contains soundstart state values to set as CSS -* properties. -* @return Browser status code: -* KBrsrSuccess for success, -* KBrsrOutOfMemory if out of memory, -* otherwise, one of the other KBrsr... error codes. -*/ -TBrowserStatusCode -NW_LMgr_ActiveContainerBox_SetSoundstartState( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_DOM_ElementNode_t* aElementNode, TSoundstartState* aSoundstartState ); - -/** -* Gets the soundstart state from this active container box, if present. -* Soundstart is a proprietary customer feature of anchor tags. The soundstart -* state is stored as CSS properties of this box. Note, the soundstart src URL -* is NOT stored and is returned as NULL in the soundstartState structure. -* @since 2.8 -* @param aThisObj Ptr to the OOC class structure for this class. -* @param aSoundCH Ptr to destination into which the ptr to the sound content -* handler is returned. -* @param aSoundstartState returned soundstart state values obtained from CSS -* properties of this box. -* @return Browser status code: -* KBrsrSuccess for success, -* KBrsrOutOfMemory if out of memory, -* KBrsrNotFound if no soundstart for this box, -* otherwise, one of the other KBrsr... error codes. -*/ -TBrowserStatusCode -NW_LMgr_ActiveContainerBox_GetSoundstartState( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_Sound_ContentHandler_t** aSoundCH, TSoundstartState* aSoundstartState ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIVECONTAINERBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_activecontainerboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_activecontainerboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIVECONTAINERBOXI_H -#define NW_LMGR_ACTIVECONTAINERBOXI_H - - - -#include "nw_lmgr_containerboxi.h" -#include "nw_lmgr_activecontainerbox.h" -#include "NW_LMgr_IEventListenerI.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ActiveContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ActiveContainerBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -_NW_LMgr_ActiveContainerBox_Clone (NW_LMgr_Box_t* thisObj); - -NW_LMGR_EXPORT -NW_Uint8 -_NW_LMgr_ActiveContainerBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIVECONTAINERBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageaggregate.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageaggregate.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_AnimatedImageAggregate_H -#define NW_LMgr_AnimatedImageAggregate_H - -#include "NW_LMgr_EXPORT.h" -#include "nw_object_aggregate.h" -#include "nw_system_timer.h" -#include "nw_image_abstractimage.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AnimatedImageAggregate_Class_s NW_LMgr_AnimatedImageAggregate_Class_t; -typedef struct NW_LMgr_AnimatedImageAggregate_s NW_LMgr_AnimatedImageAggregate_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_LMgr_AnimatedImageAggregate_Animate_t) (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -typedef -NW_Image_AbstractImage_t* -(*NW_LMgr_AnimatedImageAggregate_GetImage_t) (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -typedef -TBrowserStatusCode -(*NW_LMgr_AnimatedImageAggregate_StartTimer_t) (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AnimatedImageAggregate_ClassPart_s { - NW_LMgr_AnimatedImageAggregate_Animate_t animate; - NW_LMgr_AnimatedImageAggregate_GetImage_t getImage; - NW_LMgr_AnimatedImageAggregate_StartTimer_t startTimer; -} NW_LMgr_AnimatedImageAggregate_ClassPart_t; - -struct NW_LMgr_AnimatedImageAggregate_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; - NW_LMgr_AnimatedImageAggregate_ClassPart_t NW_LMgr_AnimatedImageAggregate; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_AnimatedImageAggregate_s { - NW_Object_Aggregate_t super; - - /* member variables */ - NW_Bool started; - NW_System_Timer_t* timer; - NW_Uint32 nowHigh; - NW_Uint32 nowLow; - NW_Bool nowSet; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_AnimatedImageAggregate_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_AnimatedImageAggregate)) - -#define NW_LMgr_AnimatedImageAggregateOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_AnimatedImageAggregate)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_AnimatedImageAggregate_Class_t NW_LMgr_AnimatedImageAggregate_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_AnimatedImageAggregate_Animate(_object) \ - (NW_Object_Invoke ((_object), NW_LMgr_AnimatedImageAggregate, animate) \ - ((_object))) - -#define NW_LMgr_AnimatedImageAggregate_GetImage(_object) \ - (NW_Object_Invoke ((_object), NW_LMgr_AnimatedImageAggregate, getImage) \ - ((_object))) - - -#define NW_LMgr_AnimatedImageAggregate_StartTimer(_object) \ - (NW_Object_Invoke ((_object), NW_LMgr_AnimatedImageAggregate, startTimer) \ - ((_object))) - - -TBrowserStatusCode -NW_LMgr_AnimatedImageAggregate_CreateTimer (NW_LMgr_AnimatedImageAggregate_t* thisObj, - NW_Uint32 delay); -void -NW_LMgr_AnimatedImageAggregate_DestroyTimer (NW_LMgr_AnimatedImageAggregate_t* thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_AnimatedImageAggregate_H */ - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageaggregatei.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageaggregatei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_AnimatedImageAggregateI_H -#define NW_LMgr_AnimatedImageAggregateI_H - -#include "nw_object_aggregatei.h" -#include "nw_lmgr_animatedimageaggregate.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -void -_NW_LMgr_AnimatedImageAggregate_Destruct (NW_Object_Aggregate_t* aggregate); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AnimatedImageAggregate_Animate (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AnimatedImageAggregate_StartTimer (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_AnimatedImageAggregateI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimagebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimagebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ANIMATEDIMAGEBOX_H -#define NW_ANIMATEDIMAGEBOX_H - -#include "nw_lmgr_imgcontainerboxi.h" -#include "nw_image_abstractimage.h" -#include "nw_lmgr_animatedimageaggregate.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct NW_LMgr_AnimatedImageBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_AnimatedImageBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AnimatedImageBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ImgContainerBox_ClassPart_t NW_LMgr_ImgContainerBox; - NW_LMgr_AnimatedImageBox_ClassPart_t NW_LMgr_AnimatedImageBox; -} NW_LMgr_AnimatedImageBox_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_AnimatedImageBox_s { - NW_LMgr_ImgContainerBox_t super; - - /* implemented aggregate */ - NW_LMgr_AnimatedImageAggregate_t NW_LMgr_AnimatedImageAggregate; - - NW_Bool iIsSuspended; - -} NW_LMgr_AnimatedImageBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_AnimatedImageBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_AnimatedImageBox)) - -#define NW_LMgr_AnimatedImageBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_AnimatedImageBox)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_AnimatedImageBox_Class_t NW_LMgr_AnimatedImageBox_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -void -NW_LMgr_AnimatedImageBox_Suspend (NW_LMgr_AnimatedImageBox_t* aAnimatedBox); - -void -NW_LMgr_AnimatedImageBox_Resume (NW_LMgr_AnimatedImageBox_t* aAnimatedBox); - -NW_LMGR_EXPORT -NW_LMgr_AnimatedImageBox_t* -NW_LMgr_AnimatedImageBox_New (NW_ADT_Vector_Metric_t numProperties, NW_Image_AbstractImage_t* virtualImage, - NW_Text_t* altText, NW_Bool brokenImage ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_IMAGEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_animatedimageboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_ANIMATEDIMAGEBOXI_H -#define NW_ANIMATEDIMAGEBOXI_H - -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_mediaboxi.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - protected static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_AnimatedImageAggregate_Class_t NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_Class; -NW_LMGR_EXPORT const NW_Object_Class_t* const _NW_LMgr_AnimatedImageBox_SecondaryList[]; - -/* ------------------------------------------------------------------------- * - protected method prototype(s) - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AnimatedImageBox_Construct (NW_Object_Dynamic_t* dynamicObject, va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_AnimatedImageBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AnimatedImageBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -/* Animation aggregate */ -NW_LMGR_EXPORT -NW_Image_AbstractImage_t* -_NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_GetImage (NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_ANIMATEDIMAGEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_areabox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_areabox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,225 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the <area> tag -* -*/ - - -#ifndef NW_AREABOX_H -#define NW_AREABOX_H - -// INCLUDES -#include "nw_lmgr_activebox.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_lmgr_imagemapbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -// DATA TYPES -typedef enum NW_LMGR_AreaBoxShape_Type_e{ - NW_LMGR_ABS_RECT, - NW_LMGR_ABS_CIRC, - NW_LMGR_ABS_POLY -}NW_LMGR_AreaBoxShape_Type_t; - -// ------------------------------------------------------------------------- -// forward declarations -// ------------------------------------------------------------------------- -typedef struct NW_LMgr_AreaBox_Class_s NW_LMgr_AreaBox_Class_t; -typedef struct NW_LMgr_AreaBox_s NW_LMgr_AreaBox_t; - -// ------------------------------------------------------------------------- -// class declaration -// ------------------------------------------------------------------------- -typedef struct NW_LMgr_AreaBox_ClassPart_s { - void** unused; -} NW_LMgr_AreaBox_ClassPart_t; - -struct NW_LMgr_AreaBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ActiveBox_ClassPart_t NW_LMgr_ActiveBox; - NW_LMgr_AreaBox_ClassPart_t NW_LMgr_AreaBox; -}; - -// ------------------------------------------------------------------------- -// object declaration -// ------------------------------------------------------------------------- -struct NW_LMgr_AreaBox_s { - NW_LMgr_ActiveBox_t super; - - // implemented interface - NW_LMgr_IEventListener_t NW_LMgr_IEventListener; - - // member variables - NW_LMgr_EventHandler_t* eventHandler; - - NW_LMgr_ImageMapBox_t* iImageMapBox; - - NW_Text_t* iCoordsText; - NW_Text_t* iShapeText; - NW_Text_t* iAltText; - NW_Text_t* iHRefText; - - NW_Ucs2* iString; - NW_GDI_Rectangle_t iComboBounds; - - NW_Bool iIsInvalid; - - NW_LMGR_AreaBoxShape_Type_t iShape; -}; - -// ------------------------------------------------------------------------- -// convenience macros -// ------------------------------------------------------------------------- -#define NW_LMgr_AreaBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_AreaBox)) - -#define NW_LMgr_AreaBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_AreaBox)) - -// ------------------------------------------------------------------------- -// global static data -// ------------------------------------------------------------------------- -NW_LMGR_EXPORT const NW_LMgr_AreaBox_Class_t NW_LMgr_AreaBox_Class; - -// ------------------------------------------------------------------------- -// public methods -// ------------------------------------------------------------------------- - -/** -* NW_LMgr_AreaBox_New -* @desc Method to return a new NW_LMgr_AreaBox_t object -* @param NW_ADT_Vector_Metric_t aNumProperties: number of arguments in the parameter list -* @param NW_LMgr_EventHandler_t* aEventHandler: pointer to the eventHandler associated -* with this box -* @param NW_LMgr_ImageMapBox_t* aImageMapBox: the parent image map box to which this area -* box belongs -* @param NW_Text_t* aShapeText: pointer to the string which holds the shape name -* @param NW_Text_t* aCoordsText: pointer to the string which holds the coordinates of this area -* @param NW_Text_t* aAltText: pointer to the string which holds the alternate text for this area -* @param NW_Text_t* aHRefText: pointer to the href string associated with this area -* @return NW_LMgr_AreaBox_t*: pointer to a NW_LMgr_AreaBox_t object -*/ -NW_LMgr_AreaBox_t* -NW_LMgr_AreaBox_New (NW_ADT_Vector_Metric_t aNumProperties, - NW_LMgr_EventHandler_t* aEventHandler, - NW_LMgr_ImageMapBox_t* aImageMapBox, - NW_Text_t* aShapeText, - NW_Text_t* aCoordsText, - NW_Text_t* aAltText, - NW_Text_t* aHRefText); - -/** -* NW_LMgr_AreaBox_GetBounds -* @description This method "overrides" the non-virtual method 'GetBounds' off the base -* NW_LMgr_Box_t class. We need to override GetBounds because the bounds of the area box are -* only relative to it's parent image box bounds. For all the calculations used in the view, -* return the bounds of the area box _plus_ the bounds of the parent image box so that the -* we want to correct actions are performed when manipulating the view. -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to retreive the bounds of -* @return NW_GDI_Rectangle_t*: pointer to a NW_GDI_Rectangle_t which is the addition of the -* area box bounds _plus_ the image map box bounds. -*/ -NW_GDI_Rectangle_t -NW_LMgr_AreaBox_GetBounds (NW_LMgr_Box_t* aBox); - -/** -* NW_LMgr_AreaBox_SetBounds -* @description This method "overrides" the non-virtual method 'SetBounds' off the base -* NW_LMgr_Box_t class. -* @param NW_LMgr_Box_t* box: pointer to the box you want to set the bounds of -* @param NW_GDI_Rectangle_t: NW_GDI_Rectangle_t which is the addition of the -* area box bounds _plus_ the image map box bounds. -*/ -void -NW_LMgr_AreaBox_SetBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aBoxBounds ); - -/** -* NW_LMgr_AreaBox_GetRootBox -* @description This method "overrides" the non-virtual method 'GetRootBox' off the base -* NW_LMgr_Box_t class. We need to override GetRootBox because the area box is not in the box -* tree (only its associated image map box parent is) so it does not have its own root box. -* Instead we need to return the root box of the image map box parent. -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to retreive the root box of -* @return NW_LMgr_RootBox_t*: the root box of our parent image map box because this area box -* doesn have one of its own. -*/ -NW_LMgr_RootBox_t* -NW_LMgr_AreaBox_GetRootBox (NW_LMgr_Box_t* aBox); - -/** -* NW_LMgr_AreaBox_GetParentImageMapBox -* @description This method returns a pointer to this area box's parent image map box -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to retrieve the parent image map -* box of -* @return NW_LMgr_ImageMapBox_t*: pointer to this area box's parent image map box -*/ -NW_LMgr_ImageMapBox_t* -NW_LMgr_AreaBox_GetParentImageMapBox (NW_LMgr_Box_t* aBox); - -/** -* NW_LMgr_AreaBox_SetParentImageMapBox -* @description This method sets this area box's parent image map box -* @param NW_LMgr_AreaBox_t* aAreaBox: pointer to the box you want to set the parent image map -* box of -* @param NW_LMgr_ImageMapBox_t* aParentImageMapBox: pointer to the image map box parent -* @return void -*/ -void -NW_LMgr_AreaBox_SetParentImageMapBox (NW_LMgr_AreaBox_t* aAreaBox, NW_LMgr_ImageMapBox_t* aParentImageMapBox); - -/** -* NW_LMgr_AreaBox_IsValidAreaBox -* @description This method returns TRUE if the area box is valid (i.e the coordinates check out) -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to see is valid -* @return NW_Bool: TRUE if the area box is valid, FALSE otherwise -*/ -NW_Bool -NW_LMgr_AreaBox_IsInvalidAreaBox (NW_LMgr_Box_t* aBox); - -/** -* NW_LMgr_AreaBox_Copy -* @description Will return a new box which is a copy of the area box passed in as the first -* parameter. The caller of this method is responsible for deleting the newly created -* area box. This method is mainly used when making a copy of the area box array -* @param NW_LMgr_AreaBox_t* aBox: the original box you want to copy -* @param NW_LMgr_AreaBox_t** aNewBox: address of a pointer to a area box object -* @return TBrowserStatusCode -*/ -TBrowserStatusCode -NW_LMgr_AreaBox_Copy(NW_LMgr_AreaBox_t* aBox, NW_LMgr_AreaBox_t** aNewBox); - -/** -* NW_LMgr_AreaBox_DisplayAltText -* @description This method is called to display alt-text associated with the area box -* if the image map box image is broken. -* @param NW_LMgr_AreaBox_t* aBox: the area box which you want to display the alt text for -* @param CGDIDeviceContext* aDeviceContext: pointer to the device context -* @return TBrowserStatusCode -*/ -TBrowserStatusCode -NW_LMgr_AreaBox_DisplayAltText(NW_LMgr_AreaBox_t* aAreaBox, - CGDIDeviceContext* aDeviceContext); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_AREABOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_areaboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_areaboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the <area> tag -* -*/ - - -#ifndef NW_AREABOXI_H -#define NW_AREABOXI_H - -// INCLUDES -#include "nw_lmgr_activeboxi.h" -#include "nw_lmgr_areabox.h" -#include "NW_LMgr_IEventListenerI.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_AreaBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_AreaBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -NW_Uint8 -_NW_LMgr_AreaBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif // NW_AREABOXI_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_bidiflowbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_bidiflowbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BIDIFLOWBOX_H -#define NW_BIDIFLOWBOX_H - -#include "nw_lmgr_flowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Bidi Flow boxes manage bidirectional flows */ - -typedef struct NW_LMgr_BidiFlowBox_s NW_LMgr_BidiFlowBox_t; - -typedef struct NW_LMgr_BidiFlowBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_BidiFlowBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_BidiFlowBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; -} NW_LMgr_BidiFlowBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_BidiFlowBox_s { - NW_LMgr_FlowBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_BidiFlowBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_BidiFlowBox)) - - -#define NW_LMgr_BidiFlowBoxOf(_object) \ -((NW_LMgr_BidiFlowBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_BidiFlowBox_Class_t NW_LMgr_BidiFlowBox_Class; - - -NW_LMGR_EXPORT -NW_LMgr_BidiFlowBox_t* -NW_LMgr_BidiFlowBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_bidiflowboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_bidiflowboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BIDIFLOWBOXI_H -#define NW_BIDIFLOWBOXI_H - -#include "nw_lmgr_flowboxi.h" -#include "nw_lmgr_bidiflowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Protected methods */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_BidiFlowBox_HandleInline(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_BidiFlowBox_HandleInlineContainer(NW_LMgr_FlowBox_t* flow, - NW_LMgr_ContainerBox_t* container, - NW_LMgr_FormatContext_t* context); - -/* LRFlow box overrides */ - -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_FormatChildren(NW_LMgr_FormatBox_t* format, - NW_LMgr_ContainerBox_t *whose, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_FlowInline(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_FlowBlock(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_ListItem(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_Float(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); -NW_LMGR_EXPORT TBrowserStatusCode -_NW_LMgr_BidiFlowBox_NewLine(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t newLine, - NW_Bool indentNewLine); - -NW_LMGR_EXPORT TBrowserStatusCode -NW_LMgr_BidiFlowBox_Flush(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, NW_Bool addLineSpacing); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BIDIFLOWBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_box.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_box.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,522 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_BOX_H -#define NW_LMGR_BOX_H - -#include "nw_lmgr_formatcontext.h" -#include "nw_object_dynamic.h" -#include "nw_lmgr_propertylist.h" -#include "nw_gdi_types.h" -#include "BrsrTypes.h" -#include "nw_adt_vector.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Box_Class_s NW_LMgr_Box_Class_t; - -typedef struct NW_LMgr_RootBox_s NW_LMgr_RootBox_t; - -/* ------------------------------------------------------------------------- * - public type definitions - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_FrameInfo_s { - NW_Int32 left; - NW_Int32 right; - NW_Int32 top; - NW_Int32 bottom; -} NW_LMgr_FrameInfo_t; - -enum TLMgrFrameSide - { - ELMgrFrameLeft = 0x01, - ELMgrFrameRight = 0x02, - ELMgrFrameTop = 0x04, - ELMgrFrameBottom = 0x08, - ELMgrFrameAll = ELMgrFrameLeft | ELMgrFrameRight | ELMgrFrameTop | ELMgrFrameBottom - }; - -#define NW_LMgr_FrameInfo_Auto (NW_Int32)0x10000 -#define NW_LMgr_FrameInfo_AutoMargin (NW_Int32)0x00000 -#define NW_LMgr_Box_MinBorderWidth 1 -#define NW_LMgr_Box_MediumBorderWidth 2 -#define NW_LMgr_Box_MaxBorderWidth 3 - - -/* ------------------------------------------------------------------------- * - virtual methods type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Split_t)(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags); -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Resize_t)(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_PostResize_t)(NW_LMgr_Box_t* box); - - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_GetMinimumContentSize_t)(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -typedef -NW_Bool -(*NW_LMgr_Box_HasFixedContentSize_t)(NW_LMgr_Box_t *box); - - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Constrain_t)(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Draw_t) (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Render_t) (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); - -typedef -NW_GDI_Metric_t -(*NW_LMgr_Box_GetBaseline_t)(NW_LMgr_Box_t* box); - -typedef -TBrowserStatusCode -(*NW_LMgr_Box_Shift_t)(NW_LMgr_Box_t* box, NW_GDI_Point2D_t *delta); - -typedef -NW_LMgr_Box_t* -(*NW_LMgr_Box_Clone_t)(NW_LMgr_Box_t* box); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Box_ClassPart_s { - NW_LMgr_Box_Split_t split; - NW_LMgr_Box_Resize_t resize; - NW_LMgr_Box_PostResize_t postResize; - NW_LMgr_Box_GetMinimumContentSize_t getMinimumContentSize; - NW_LMgr_Box_HasFixedContentSize_t hasFixedContentSize; - NW_LMgr_Box_Constrain_t constrain; - NW_LMgr_Box_Draw_t draw; - NW_LMgr_Box_Render_t render; - NW_LMgr_Box_GetBaseline_t getBaseline; - NW_LMgr_Box_Shift_t shift; - NW_LMgr_Box_Clone_t clone; -} NW_LMgr_Box_ClassPart_t; - -struct NW_LMgr_Box_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; -}; - - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_Box_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_Box)) - -#define NW_LMgr_BoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_Box)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_Box_Class_t NW_LMgr_Box_Class; - -/* ------------------------------------------------------------------------- */ -/* Public macros - */ - -#define NW_LMGR_FLOOR_DIV2(x) ((NW_GDI_Metric_t) (x >> 1)) -#define NW_LMGR_CEIL_DIV2(x) ((NW_GDI_Metric_t) ((x + x % 2) >> 1)) - -/* ------------------------------------------------------------------------- * - TODO: replace these with platform-specific values - * ------------------------------------------------------------------------- */ - -#define NW_LMGR_BOX_MIN_WIDTH (NW_GDI_Metric_t)10 -#define NW_LMGR_BOX_MIN_HEIGHT (NW_GDI_Metric_t)15 - -/* Flags */ - -typedef enum NW_LMgr_Box_SplitFlags_e { - NW_LMgr_Box_SplitFlags_AtNewLine = 0x01, - NW_LMgr_Box_SplitFlags_NoPendingWS = 0x02, - NW_LMgr_Box_SplitFlags_Nowrap = 0x04 -} NW_LMgr_Box_SplitFlags_t; - -enum { - NW_LMgr_Box_Flags_DrawFloats = 0x01 -}; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_RootBox_t* -_NW_LMgr_Box_GetRootBox (NW_LMgr_Box_t* box); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_Box_Split(_object, _space, _split, _flags) \ - (NW_LMgr_Box_GetClassPart (_object).split ((_object), (_space), (_split), (_flags))) - -#define NW_LMgr_Box_Resize(_object, _context) \ - (NW_LMgr_Box_GetClassPart (_object).resize ((_object),(_context))) - -#define NW_LMgr_Box_PostResize(_object) \ - (NW_LMgr_Box_GetClassPart (_object).postResize (_object)) - - -#define NW_LMgr_Box_GetMinimumContentSize(_object, _size) \ - (NW_LMgr_Box_GetClassPart (_object).getMinimumContentSize ((_object), (_size))) - -#define NW_LMgr_Box_HasFixedContentSize(_object) \ - (NW_LMgr_Box_GetClassPart (_object).hasFixedContentSize (_object)) - -#define NW_LMgr_Box_Constrain(_object, _constraint) \ - (NW_LMgr_Box_GetClassPart (_object).constrain ((_object), (_constraint))) - -#define NW_LMgr_Box_GetBaseline(_object) \ - (NW_LMgr_Box_GetClassPart (_object).getBaseline (_object)) - -#define NW_LMgr_Box_Shift(_object, _shift) \ - (NW_LMgr_Box_GetClassPart (_object).shift ((_object), (_shift))) - -#define NW_LMgr_Box_Clone(_object) \ - (NW_LMgr_Box_GetClassPart (_object).clone ((_object))) - -#define NW_LMgr_Box_Draw(_object, _deviceContext, _hasFocus) \ - (NW_LMgr_Box_GetClassPart(_object). \ - draw ((_object), (_deviceContext), (_hasFocus))) - -#define NW_LMgr_Box_Render(_object, _deviceContext, _clipRect, _currentBox, _flags, _hasFocus, _skipChildren, _rootBox ) \ - (NW_LMgr_Box_GetClassPart(_object). \ - render ((_object), (_deviceContext), (_clipRect), (_currentBox), (_flags), (_hasFocus), (_skipChildren), (_rootBox) )) - -#define NW_LMgr_Box_GetParent(_object) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_ContainerBox_t*) NW_LMgr_BoxOf (_object)->parent) - -#define NW_LMgr_Box_PropListGet(_box) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_PropertyList_t*) (_box)->propList) - -#define NW_LMgr_Box_SetPropList(_object, _propList) \ - (((_object)->propList = (_propList)), KBrsrSuccess) - -#define NW_LMgr_Box_SetParent(_box, _parent) \ - ((_box)->parent = (_parent)) - -#define NW_LMgr_Box_GetRootBox(_box) \ - (_NW_LMgr_Box_GetRootBox (NW_LMgr_BoxOf (_box))) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetRawProperty(NW_LMgr_Box_t *box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetPropertyFromList(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetPropertyValue (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_PropertyValueType_t type, - NW_LMgr_PropertyValue_t* value); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_RemoveProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_RemovePropertyWithoutDelete (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_SetProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetMinimumSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_Box_HasFixedWidth(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_Box_HasFixedHeight(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_GetMargins(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *margins, - NW_LMgr_FrameInfo_t *isAuto, - NW_Int8 aFrameSide ); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_GetPadding(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *padding, - NW_Int8 aFrameSide ); - -NW_LMGR_EXPORT -NW_Int32 -NW_LMgr_Box_GetModelProp(NW_LMgr_Box_t *box, NW_LMgr_PropertyName_t propName); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetSizeProperties(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_ApplyFontProps (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -CGDIFont* -NW_LMgr_Box_GetFont (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_Box_GetEm (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_Box_GetEx (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_GetBorderWidth(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *borderWidth, - NW_Int8 aFrameSide ); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_GetBorderColor(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *borderColor); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_GetBorderStyle(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *borderStyle, - NW_Int8 aFrameSide ); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_Box_FindBoxOfClass (NW_LMgr_Box_t* box, - const NW_Object_Class_t* theClass, - NW_Bool derived); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_Detach (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_Refresh (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_DrawBorder (NW_GDI_Rectangle_t bounds, - CGDIDeviceContext* deviceContext, - NW_LMgr_FrameInfo_t* borderWidth, - NW_LMgr_FrameInfo_t* borderStyle, - NW_LMgr_FrameInfo_t* borderColor); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_DrawBackground (NW_LMgr_Box_t* box, - NW_LMgr_ContainerBox_t* parent, - CGDIDeviceContext* deviceContext); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_GetInnerRectangle(NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* innerRectangle); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_InvalidateBoxTree(NW_LMgr_Box_t* box, NW_LMgr_Box_t* boxWithFocus); - -NW_Bool -NW_LMgr_Box_GetVisibleBounds(const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_Predraw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_LMGR_EXPORT -void -NW_LMgr_Box_SetHasFocus(NW_LMgr_Box_t* box, NW_Bool hasFocus); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_Box_HasFocus(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_Bool -NW_LMgr_Box_Update_RenderCache (NW_LMgr_RootBox_t* rootBox, - NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* realClip, - void ***ptr); - - - -/** -* NW_LMgr_Box_GetFormatBounds -* @description This method returns the format bounds of the box. Note that this bounds could -* differ from display bounds. Format bounds are mainly used by the format code so functions like -* resize and GetMinimumHeight should use format bounds while Render and Draw should use -* display bounds instead. Display bounds get updated during the format. When a box gets fully formatted, -* the format bounds get transfered to the display bounds by calling NW_LMgr_Box_UpdateDisplayBounds. -* -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to retrieve the bounds -* -* @return NW_GDI_Rectangle_t: format bounds -*/ -NW_LMGR_EXPORT -NW_GDI_Rectangle_t -NW_LMgr_Box_GetFormatBounds( NW_LMgr_Box_t* aBox ); - -/** -* NW_LMgr_Box_SetFormatBounds -* @description This method sets the format bounds on the box. Note that this bounds could -* differ from display bounds. see NW_LMgr_Box_GetFormatBounds comment above for more info -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to set the bounds -* @param NW_GDI_Rectangle_t aFormatBounds: format bounds* -* @return void -*/ -NW_LMGR_EXPORT -void NW_LMgr_Box_SetFormatBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aFormatBounds ); - -/** -* NW_LMgr_Box_GetDisplayBounds -* @description This method returns the display bounds on the box. Note that this bounds could -* differ from format bounds. see NW_LMgr_Box_GetFormatBounds comment above for more info -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to retrieve the bounds -* -* @return NW_GDI_Rectangle_t : display bounds -*/ -NW_LMGR_EXPORT -NW_GDI_Rectangle_t -NW_LMgr_Box_GetDisplayBounds( NW_LMgr_Box_t* aBox ); - -/** -* NW_LMgr_Box_UpdateDisplayBounds -* @description This method sets the display bounds on the box. Note that this bounds could -* differ from format bounds. see NW_LMgr_Box_GetFormatBounds comment above for more info -* @param NW_LMgr_Box_t* aBox: pointer to the box you want to set the bounds -* @param NW_GDI_Rectangle_t aDisplayBounds: display bounds -* -* @return void -*/ -NW_LMGR_EXPORT -void -NW_LMgr_Box_UpdateDisplayBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aDisplayBounds ); - -const NW_Int8* -NW_LMgr_Box_GetBoxType (NW_LMgr_Box_t *box); - -/** -* NW_LMgr_Box_UpdateContainerBodyBox -* @description This method updates hight for displaybounds and formatbounds -* of bodybox container to take into account body bottommargin. -* it is called only once after page load complete -* @param NW_LMgr_RootBox_t* aRootBox: pointer to the rootBox -* -* @return void -*/ -void NW_LMgr_Box_UpdateContainerBodyBox( NW_LMgr_RootBox_t* aRootBox ); - -const NW_Int8* -NW_LMgr_Box_GetBoxType (NW_LMgr_Box_t *box); - -#ifdef _DEBUG - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_DumpBoxTree(NW_LMgr_Box_t* box); - -#endif /* _DEBUG */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_Box_Initialize (NW_LMgr_Box_t* box, - NW_ADT_Vector_Metric_t numProperties); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_Box_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOX_H */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_box_defn.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_box_defn.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_BOX_DEFN_H -#define NW_LMGR_BOX_DEFN_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_propertylist.h" -#include "nw_gdi_types.h" -#include "nw_adt_vector.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; -typedef struct NW_LMgr_ContainerBox_s NW_LMgr_ContainerBox_t; - - -/* ------------------------------------------------------------------------- * - object definition - * ------------------------------------------------------------------------- */ -struct NW_LMgr_Box_s{ - NW_Object_Dynamic_t super; - - /* member variables */ - // format uses format bounds - NW_GDI_Rectangle_t iFormatBounds; - // rendering uses display bounds. These two bounds could be different, - // while the page is being formatted. - NW_GDI_Rectangle_t iDisplayBounds; - NW_LMgr_PropertyList_t* propList; - NW_LMgr_ContainerBox_t* parent; - // rootBox must be accessed only via NW_LMgr_Box_GetRootBox - // as if it is NULL, then it gets the rootBox from its parent. - // ZAL: temp: change it back to NW_LMgr_RootBox_t* - void* rootBox; - NW_Bool hasFocus; -}; - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOX_H */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_box_format.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_box_format.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_BOX_FORMAT_H -#define NW_LMGR_BOX_FORMAT_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_propertylist.h" -#include "nw_adt_vector.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -//typedef struct NW_LMgr_Box_FormatChildren_s NW_LMgr_Box_FormatChildren_t; - extern struct NW_LMgr_Box_FormatChildren_s NW_LMgr_Box_FormatChildren_t; - -struct NW_LMgr_Box_FormatChildren_s { - NW_Bool formatChildren; /* is NW_TRUE if the box has the children to be formatted*/ - NW_LMgr_Box_t* formatBox;/* the formatbox to be used to format the children*/ - NW_LMgr_FormatContext_t* newFormatContext;/* new formatcontext to be used to format the children*/ - NW_Uint8 referenceCount; -}; - -#ifdef __cplusplus -}; // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOX_FORMAT_H*/ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_boxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_boxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BOXI_H -#define NW_BOXI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_box.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual methods implementation declaration - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -NW_LMGR_EXPORT -void -_NW_LMgr_Box_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_PostResize(NW_LMgr_Box_t* box); - - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -NW_Bool -_NW_LMgr_Box_HasFixedContentSize(NW_LMgr_Box_t *box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_Box_GetBaseline(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_Shift (NW_LMgr_Box_t* box, - NW_GDI_Point2D_t *delta); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -_NW_LMgr_Box_Clone (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_Bool -_NW_LMgr_Box_HasTrailingWS(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_Box_ConserveLeadingWS(NW_LMgr_Box_t* box, NW_Bool conserveWS); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_boxvisitor.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_boxvisitor.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_BOXVISITOR_H -#define NW_LMGR_BOXVISITOR_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_box.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_BoxVisitor_Class_s NW_LMgr_BoxVisitor_Class_t; -typedef struct NW_LMgr_BoxVisitor_s NW_LMgr_BoxVisitor_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_BoxVisitor_ClassPart_s { - void** unused; -} NW_LMgr_BoxVisitor_ClassPart_t; - -struct NW_LMgr_BoxVisitor_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_BoxVisitor_ClassPart_t NW_LMgr_BoxVisitor; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_BoxVisitor_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_LMgr_Box_t* rootBox; - NW_LMgr_Box_t* currentBox; -}; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_BoxVisitor_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_BoxVisitor)) - -#define NW_LMgr_BoxVisitorOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_BoxVisitor)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_BoxVisitor_Class_t NW_LMgr_BoxVisitor_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_BoxVisitor_GetRootBox(_boxVisitor) \ - (*((NW_LMgr_Box_t* const*) &(_boxVisitor))->rootBox) - -#define NW_LMgr_BoxVisitor_GetCurrentBox(_boxVisitor) \ - (*((NW_LMgr_Box_t* const*) &(_boxVisitor))->currentBox) - -#define NW_LMgr_BoxVisitor_SetCurrentBox(_boxVisitor, _box) \ - (((_boxVisitor)->currentBox = (_box)), KBrsrSuccess) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_BoxVisitor_SetRootBox (NW_LMgr_BoxVisitor_t* BoxVisitor, - NW_LMgr_Box_t* rootBox); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_BoxVisitor_NextBox (NW_LMgr_BoxVisitor_t* BoxVisitor, - NW_Bool* skipChildren); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_BoxVisitor_Initialize (NW_LMgr_BoxVisitor_t* boxVisitor, - NW_LMgr_Box_t* rootBox); - -NW_LMGR_EXPORT -NW_LMgr_BoxVisitor_t* -NW_LMgr_BoxVisitor_New (NW_LMgr_Box_t* rootBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOXVISITOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_boxvisitori.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_boxvisitori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_BOXVISITORI_H -#define NW_LMGR_BOXVISITORI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_boxvisitor.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_BoxVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOXVISITORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_breakbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_breakbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BREAKBOX_H -#define NW_BREAKBOX_H - -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Line boxes are currently implemented as if they were simply container boxes. - * However, they have not been subclassed from container because they can, and - * will eventually be, implemented in a much more light-weight manner - */ - -typedef struct NW_LMgr_BreakBox_s NW_LMgr_BreakBox_t; - - -/* Class declarations -------------------------------------------------------*/ - -typedef struct NW_LMgr_BreakBox_ClassPart_s { - void** unused; -} NW_LMgr_BreakBox_ClassPart_t; - -typedef struct NW_LMgr_BreakBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_BreakBox_ClassPart_t NW_LMgr_BreakBox; -} NW_LMgr_BreakBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_BreakBox_s { - NW_LMgr_Box_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_BreakBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_BreakBox)) - -#define NW_LMgr_BreakBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_BreakBox)) - -/* ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -NW_LMgr_BreakBox_t* -NW_LMgr_BreakBox_New (NW_ADT_Vector_Metric_t numProperties); - -#define NW_LMgr_BreakBox_Delete(_object) \ - NW_Object_Delete (NW_Object_DynamicOf (_object)) - -NW_LMGR_EXPORT const NW_LMgr_BreakBox_Class_t NW_LMgr_BreakBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_breakboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_breakboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_BREAKBOXI_H -#define NW_BREAKBOXI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_breakbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_BreakBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_BreakBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_BreakBox_Resize(NW_LMgr_Box_t *box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_BreakBox_Constrain(NW_LMgr_Box_t *box, - NW_GDI_Metric_t constraint); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_BreakBox_GetBaseline(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_BreakBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_containerbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_containerbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CONTAINERBOX_H -#define NW_CONTAINERBOX_H - -#include "nw_lmgr_box.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Container boxes are boxes with children */ -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ContainerBox_Class_s NW_LMgr_ContainerBox_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ContainerBox_ClassPart_s { - void** unused; -} NW_LMgr_ContainerBox_ClassPart_t; - -struct NW_LMgr_ContainerBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_ContainerBox_s { - NW_LMgr_Box_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* children; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_ContainerBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ContainerBox)) - -#define NW_LMgr_ContainerBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ContainerBox)) - -/* Final Methods ---------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChildAt (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_ADT_Vector_Metric_t where); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBox_t* containerBox, - NW_LMgr_Box_t* child); - -NW_LMGR_EXPORT -NW_ADT_Vector_Metric_t -NW_LMgr_ContainerBox_GetChildCount (NW_LMgr_ContainerBox_t* containerBox); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBox_t* containerBox, - NW_ADT_Vector_Metric_t index); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_ContainerBox_SplitAtIndex (NW_LMgr_ContainerBox_t* container, - NW_ADT_Vector_Metric_t index); - - -#define NW_LMgr_ContainerBox_GetChildren(_containerBox) \ - ((const NW_ADT_Vector_t*) (_containerBox)->children) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_LMgr_Box_t* where); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChildAft (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_LMgr_Box_t* where); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_AppendChildrenOf (NW_LMgr_ContainerBox_t* container, - NW_LMgr_ContainerBox_t* source); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_ReplaceChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* originalChild, - NW_LMgr_Box_t* newChild); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_RemoveChild (NW_LMgr_ContainerBox_t* containerBox, - NW_LMgr_Box_t* child); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_RemoveChildren (NW_LMgr_ContainerBox_t* thisObj); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_DeleteChildren (NW_LMgr_ContainerBox_t* thisObj); - -NW_LMGR_EXPORT -NW_ADT_Vector_Metric_t -NW_LMgr_ContainerBox_GetChildIndex (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_ResizeToChildren(NW_LMgr_ContainerBox_t* container); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_Initialize(NW_LMgr_ContainerBox_t *container); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_InitializeSSL(NW_LMgr_ContainerBox_t *container); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ContainerBox_Collapse (NW_LMgr_ContainerBox_t* thisObj); - -NW_Bool NW_LMgr_ContainerBox_IsLastChild(NW_LMgr_Box_t* box); - -#define NW_LMgr_ContainerBox_GetBoxVisitor(_container) \ - (NW_LMgr_BoxVisitor_New (NW_LMgr_BoxOf(_container))) - -/*-------------------------------------------------------------------------*/ -NW_LMGR_EXPORT const NW_LMgr_ContainerBox_Class_t NW_LMgr_ContainerBox_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_ContainerBox_t* -NW_LMgr_ContainerBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CONTAINERBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_containerbox_defn.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_containerbox_defn.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ACTIVECONTAINERBOX_DEFN_H -#define NW_LMGR_ACTIVECONTAINERBOX_DEFN_H - - - -#include "nw_lmgr_containerbox.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -struct NW_LMgr_ContainerBox_s { - NW_LMgr_Box_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* children; -}; - -#ifdef __cplusplus -}; // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ACTIVECONTAINERBOX_DEFN_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_containerboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_containerboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CONTAINERBOXI_H -#define NW_CONTAINERBOXI_H - -#include "nw_lmgr_box.h" -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_containerbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual methods implementation declarations - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ContainerBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ContainerBox_Resize (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ContainerBox_Shift (NW_LMgr_Box_t* box, - NW_GDI_Point2D_t *delta); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ContainerBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); -NW_LMGR_EXPORT -NW_LMgr_Box_t* -_NW_LMgr_ContainerBox_Clone (NW_LMgr_Box_t* thisObj); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_ContainerBox_GetBaseline(NW_LMgr_Box_t* box); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_cssproperties.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_cssproperties.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,363 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_CSSPROPERTIES_H -#define NW_CSSPROPERTIES_H - -#include "nwx_defs.h" -#include "nw_lmgr_propertylist.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Property names are encoded in a single NW_Byte. Two bits are inheritance flags, - * and the rest specify the property itself. This should be sufficient space - * to encode all of the properties specified by the CSS mobile profile. - */ - -/* The top bit of a property name signifies that it is inherited normally */ - -#define NW_CSS_PropInherit ((NW_LMgr_PropertyName_t) 0x80) - -#define NW_CSS_CachedProperty_Num 14 - -/* ----Property name tokens-------------------------------------------------------- */ - -/* Non-inherited properties */ - -//!!! cached non-inherited properties !!! -#define NW_CSS_Prop_padding ((NW_LMgr_PropertyName_t) 1) -#define NW_CSS_Prop_display ((NW_LMgr_PropertyName_t) 2) -#define NW_CSS_Prop_borderWidth ((NW_LMgr_PropertyName_t) 3) -#define NW_CSS_Prop_sibling ((NW_LMgr_PropertyName_t) 4) -#define NW_CSS_Prop_borderStyle ((NW_LMgr_PropertyName_t) 5) -#define NW_CSS_Prop_float ((NW_LMgr_PropertyName_t) 6) -//!!! end of cached non-inherited properties !!! - -//!!! non-cached non-inherited properties!!! numbering MUST start with the last cached inherited ID + 1 -#define NW_CSS_Prop_borderColor ((NW_LMgr_PropertyName_t) 15) -#define NW_CSS_Prop_overflow ((NW_LMgr_PropertyName_t) 16) -#define NW_CSS_Prop_leftPadding ((NW_LMgr_PropertyName_t) 17) -#define NW_CSS_Prop_rightPadding ((NW_LMgr_PropertyName_t) 18) -#define NW_CSS_Prop_topPadding ((NW_LMgr_PropertyName_t) 19) -#define NW_CSS_Prop_bottomPadding ((NW_LMgr_PropertyName_t) 20) -#define NW_CSS_Prop_margin ((NW_LMgr_PropertyName_t) 21) -#define NW_CSS_Prop_leftMargin ((NW_LMgr_PropertyName_t) 22) -#define NW_CSS_Prop_rightMargin ((NW_LMgr_PropertyName_t) 23) -#define NW_CSS_Prop_topMargin ((NW_LMgr_PropertyName_t) 24) -#define NW_CSS_Prop_bottomMargin ((NW_LMgr_PropertyName_t) 25) -#define NW_CSS_Prop_pageBreakAfter ((NW_LMgr_PropertyName_t) 26) -#define NW_CSS_Prop_height ((NW_LMgr_PropertyName_t) 27) -#define NW_CSS_Prop_width ((NW_LMgr_PropertyName_t) 28) -#define NW_CSS_Prop_backgroundColor ((NW_LMgr_PropertyName_t) 29) -#define NW_CSS_Prop_clear ((NW_LMgr_PropertyName_t) 30) -#define NW_CSS_Prop_leftBorderWidth ((NW_LMgr_PropertyName_t) 31) -#define NW_CSS_Prop_rightBorderWidth ((NW_LMgr_PropertyName_t) 32) -#define NW_CSS_Prop_topBorderWidth ((NW_LMgr_PropertyName_t) 33) -#define NW_CSS_Prop_bottomBorderWidth ((NW_LMgr_PropertyName_t) 34) -#define NW_CSS_Prop_leftBorderColor ((NW_LMgr_PropertyName_t) 35) -#define NW_CSS_Prop_rightBorderColor ((NW_LMgr_PropertyName_t) 36) -#define NW_CSS_Prop_topBorderColor ((NW_LMgr_PropertyName_t) 37) -#define NW_CSS_Prop_bottomBorderColor ((NW_LMgr_PropertyName_t) 38) -#define NW_CSS_Prop_leftBorderStyle ((NW_LMgr_PropertyName_t) 39) -#define NW_CSS_Prop_rightBorderStyle ((NW_LMgr_PropertyName_t) 40) -#define NW_CSS_Prop_topBorderStyle ((NW_LMgr_PropertyName_t) 41) -#define NW_CSS_Prop_bottomBorderStyle ((NW_LMgr_PropertyName_t) 42) -#define NW_CSS_Prop_border ((NW_LMgr_PropertyName_t) 43) -#define NW_CSS_Prop_borderTop ((NW_LMgr_PropertyName_t) 44) -#define NW_CSS_Prop_borderRight ((NW_LMgr_PropertyName_t) 45) -#define NW_CSS_Prop_borderBottom ((NW_LMgr_PropertyName_t) 46) -#define NW_CSS_Prop_borderLeft ((NW_LMgr_PropertyName_t) 47) -#define NW_CSS_Prop_rowSpan ((NW_LMgr_PropertyName_t) 48) /* Non-standard */ -#define NW_CSS_Prop_colSpan ((NW_LMgr_PropertyName_t) 49) /* Non-standard */ -#define NW_CSS_Prop_captionSide ((NW_LMgr_PropertyName_t) 50) -#define NW_CSS_Prop_flags ((NW_LMgr_PropertyName_t) 51) /* Internal */ -#define NW_CSS_Prop_accesskey ((NW_LMgr_PropertyName_t) 52) /* -wap-accesskey */ -#define NW_CSS_Prop_inputFormat ((NW_LMgr_PropertyName_t) 53) /* -wap-input-format */ -#define NW_CSS_Prop_inputRequired ((NW_LMgr_PropertyName_t) 54) /* -wap-input-required */ -#define NW_CSS_Prop_flowBaseline ((NW_LMgr_PropertyName_t) 55) /* Internal */ -#define NW_CSS_Prop_listValue ((NW_LMgr_PropertyName_t) 56) /* Internal, used by IMODE */ -#define NW_CSS_Prop_focusBehavior ((NW_LMgr_PropertyName_t) 57) /* Internal */ -#define NW_CSS_Prop_background ((NW_LMgr_PropertyName_t) 58) -#define NW_CSS_Prop_marqueeStyle ((NW_LMgr_PropertyName_t) 59) -#define NW_CSS_Prop_marqueeLoop ((NW_LMgr_PropertyName_t) 60) -#define NW_CSS_Prop_marqueeDir ((NW_LMgr_PropertyName_t) 61) -#define NW_CSS_Prop_marqueeSpeed ((NW_LMgr_PropertyName_t) 62) -#define NW_CSS_Prop_marqueeAmount ((NW_LMgr_PropertyName_t) 63) -#define NW_CSS_Prop_tableAlign ((NW_LMgr_PropertyName_t) 64) /* Internal, used by IMODE */ -#define NW_CSS_Prop_cellPadding ((NW_LMgr_PropertyName_t) 65) /* Internal, used by IMODE */ -#define NW_CSS_Prop_imodeQuotes ((NW_LMgr_PropertyName_t) 66) /* Internal, used by IMODE */ -#define NW_CSS_Prop_noshade ((NW_LMgr_PropertyName_t) 67) /* Internal, used by IMODE */ -#define NW_CSS_Prop_backgroundImage ((NW_LMgr_PropertyName_t) 68) -#define NW_CSS_Prop_backgroundRepeat ((NW_LMgr_PropertyName_t) 69) -#define NW_CSS_Prop_backgroundPosition ((NW_LMgr_PropertyName_t) 70) -#define NW_CSS_Prop_backgroundAttachment ((NW_LMgr_PropertyName_t) 71) -#define NW_CSS_Prop_backgroundPosition_x ((NW_LMgr_PropertyName_t) 72) -#define NW_CSS_Prop_backgroundPosition_y ((NW_LMgr_PropertyName_t) 73) -#define NW_CSS_Prop_contentLength ((NW_LMgr_PropertyName_t) 74) /* Internal */ -#define NW_CSS_Prop_contentType ((NW_LMgr_PropertyName_t) 75) /* Internal */ - - -/* application-defined non-inherited properties */ -#define NW_CSS_Prop_elementId ((NW_LMgr_PropertyName_t) 76) -#define NW_CSS_Prop_tabIndex ((NW_LMgr_PropertyName_t) 77) -#define NW_CSS_Prop_boxName ((NW_LMgr_PropertyName_t) 78) -#define NW_CSS_Prop_listMargin ((NW_LMgr_PropertyName_t) 79) - -// support for JSKY attributes -#define NW_CSS_Prop_directkey ((NW_LMgr_PropertyName_t) 80) -#define NW_CSS_Prop_istyle ((NW_LMgr_PropertyName_t) 81) -#define NW_CSS_Prop_mode ((NW_LMgr_PropertyName_t) 82) - -#define NW_CSS_Prop_verticalAlign ((NW_LMgr_PropertyName_t) 83) -#define NW_CSS_Prop_contentHandlerId ((NW_LMgr_PropertyName_t) 84) - -// support for customer soundstart attributes -#define NW_CSS_Prop_soundstartAction ((NW_LMgr_PropertyName_t) 85) -#define NW_CSS_Prop_soundstartLoop ((NW_LMgr_PropertyName_t) 86) -#define NW_CSS_Prop_soundstartVolume ((NW_LMgr_PropertyName_t) 87) - -// support for CSS position -#define NW_CSS_Prop_position ((NW_LMgr_PropertyName_t) 88) -#define NW_CSS_Prop_left ((NW_LMgr_PropertyName_t) 89) -#define NW_CSS_Prop_right ((NW_LMgr_PropertyName_t) 90) -#define NW_CSS_Prop_top ((NW_LMgr_PropertyName_t) 91) -#define NW_CSS_Prop_bottom ((NW_LMgr_PropertyName_t) 92) - -/* Inherited properties */ - -//!!! cached inherited properties!!! numbering MUST start with the last non-inherited cached ID + 1 -#define NW_CSS_Prop_textAlign ((NW_LMgr_PropertyName_t) 7 | NW_CSS_PropInherit) -#define NW_CSS_Prop_textIndent ((NW_LMgr_PropertyName_t) 8 | NW_CSS_PropInherit) -#define NW_CSS_Prop_textTransform ((NW_LMgr_PropertyName_t) 9 | NW_CSS_PropInherit) -#define NW_CSS_Prop_whitespace ((NW_LMgr_PropertyName_t) 10| NW_CSS_PropInherit) -#define NW_CSS_Prop_visibility ((NW_LMgr_PropertyName_t) 11| NW_CSS_PropInherit) -#define NW_CSS_Prop_lineHeight ((NW_LMgr_PropertyName_t) 12| NW_CSS_PropInherit) -#define NW_CSS_Prop_textDecoration ((NW_LMgr_PropertyName_t) 13| NW_CSS_PropInherit) -#define NW_CSS_Prop_textDirection ((NW_LMgr_PropertyName_t) 14| NW_CSS_PropInherit) /* internal */ -//!!! end of cached inherited properties!!! - - -#define NW_CSS_Prop_fontFamily ((NW_LMgr_PropertyName_t) 15| NW_CSS_PropInherit) -#define NW_CSS_Prop_fontSize ((NW_LMgr_PropertyName_t) 16| NW_CSS_PropInherit) -#define NW_CSS_Prop_fontStyle ((NW_LMgr_PropertyName_t) 17| NW_CSS_PropInherit) -#define NW_CSS_Prop_fontWeight ((NW_LMgr_PropertyName_t) 18| NW_CSS_PropInherit) -#define NW_CSS_Prop_listStyleType ((NW_LMgr_PropertyName_t) 19| NW_CSS_PropInherit) -#define NW_CSS_Prop_listStyleImage ((NW_LMgr_PropertyName_t) 20| NW_CSS_PropInherit) -#define NW_CSS_Prop_color ((NW_LMgr_PropertyName_t) 21| NW_CSS_PropInherit) -#define NW_CSS_Prop_fontVariant ((NW_LMgr_PropertyName_t) 22| NW_CSS_PropInherit) -#define NW_CSS_Prop_listStylePosition ((NW_LMgr_PropertyName_t) 23| NW_CSS_PropInherit) -#define NW_CSS_Prop_font ((NW_LMgr_PropertyName_t) 24| NW_CSS_PropInherit) -#define NW_CSS_Prop_listStyle ((NW_LMgr_PropertyName_t) 25| NW_CSS_PropInherit) -#define NW_CSS_Prop_fontObject ((NW_LMgr_PropertyName_t) 26| NW_CSS_PropInherit) /* internal */ -#define NW_CSS_Prop_blinkState ((NW_LMgr_PropertyName_t) 27| NW_CSS_PropInherit) /* internal */ -#define NW_CSS_Prop_gridModeApplied ((NW_LMgr_PropertyName_t) 28| NW_CSS_PropInherit) /* internal */ -#define NW_CSS_Prop_gridModeOrigWidth ((NW_LMgr_PropertyName_t) 29| NW_CSS_PropInherit) /* internal */ - -/* ----Property value tokens------------------------------------------------------ */ - -#define NW_CSS_PropValue_none ((NW_LMgr_PropertyValueToken_t) 0) -#define NW_CSS_PropValue_left ((NW_LMgr_PropertyValueToken_t) 1) -#define NW_CSS_PropValue_right ((NW_LMgr_PropertyValueToken_t) 2) -#define NW_CSS_PropValue_normal ((NW_LMgr_PropertyValueToken_t) 3) -#define NW_CSS_PropValue_italic ((NW_LMgr_PropertyValueToken_t) 4) -#define NW_CSS_PropValue_bold ((NW_LMgr_PropertyValueToken_t) 5) -#define NW_CSS_PropValue_disc ((NW_LMgr_PropertyValueToken_t) 6) -#define NW_CSS_PropValue_circle ((NW_LMgr_PropertyValueToken_t) 7) -#define NW_CSS_PropValue_square ((NW_LMgr_PropertyValueToken_t) 8) -#define NW_CSS_PropValue_decimal ((NW_LMgr_PropertyValueToken_t) 9) -#define NW_CSS_PropValue_lowerRoman ((NW_LMgr_PropertyValueToken_t) 10) -#define NW_CSS_PropValue_upperRoman ((NW_LMgr_PropertyValueToken_t) 11) -#define NW_CSS_PropValue_lowerAlpha ((NW_LMgr_PropertyValueToken_t) 12) -#define NW_CSS_PropValue_upperAlpha ((NW_LMgr_PropertyValueToken_t) 13) - -#define NW_CSS_PropValue_always ((NW_LMgr_PropertyValueToken_t) 20) -#define NW_CSS_PropValue_avoid ((NW_LMgr_PropertyValueToken_t) 21) -#define NW_CSS_PropValue_center ((NW_LMgr_PropertyValueToken_t) 22) -#define NW_CSS_PropValue_justify ((NW_LMgr_PropertyValueToken_t) 23) -#define NW_CSS_PropValue_underline ((NW_LMgr_PropertyValueToken_t) 24) -#define NW_CSS_PropValue_blink ((NW_LMgr_PropertyValueToken_t) 25) -#define NW_CSS_PropValue_strikeout ((NW_LMgr_PropertyValueToken_t) 26) - -/* Display prop values */ -#define NW_CSS_PropValue_display_inline ((NW_LMgr_PropertyValueToken_t) 27) -#define NW_CSS_PropValue_display_block ((NW_LMgr_PropertyValueToken_t) 28) -#define NW_CSS_PropValue_display_listItem ((NW_LMgr_PropertyValueToken_t) 30) -#define NW_CSS_PropValue_display_marquee ((NW_LMgr_PropertyValueToken_t) 31) - -/* In CSS float is a property, not a value of display */ -#define NW_CSS_PropValue_display_table ((NW_LMgr_PropertyValueToken_t) 32) -#define NW_CSS_PropValue_display_inlineTable ((NW_LMgr_PropertyValueToken_t) 33) - -/* JSKY display value */ -#define NW_CSS_PropValue_display_directKey ((NW_LMgr_PropertyValueToken_t) 34) - -/* Alignment values */ -#define NW_CSS_PropValue_top ((NW_LMgr_PropertyValueToken_t) 36) -#define NW_CSS_PropValue_bottom ((NW_LMgr_PropertyValueToken_t) 37) -#define NW_CSS_PropValue_baseline ((NW_LMgr_PropertyValueToken_t) 38) - -/* additional prop vals */ -#define NW_CSS_PropValue_inherit ((NW_LMgr_PropertyValueToken_t) 39) -#define NW_CSS_PropValue_auto ((NW_LMgr_PropertyValueToken_t) 40) -#define NW_CSS_PropValue_both ((NW_LMgr_PropertyValueToken_t) 41) - -/* visibility prop vals */ -#define NW_CSS_PropValue_visible ((NW_LMgr_PropertyValueToken_t) 43) -#define NW_CSS_PropValue_hidden ((NW_LMgr_PropertyValueToken_t) 44) -#define NW_CSS_PropValue_collapse ((NW_LMgr_PropertyValueToken_t) 45) - -/* white-space prop vals */ -#define NW_CSS_PropValue_pre ((NW_LMgr_PropertyValueToken_t) 46) -#define NW_CSS_PropValue_nowrap ((NW_LMgr_PropertyValueToken_t) 47) - -/* text-transform prop vals */ -#define NW_CSS_PropValue_capitalize ((NW_LMgr_PropertyValueToken_t) 48) -#define NW_CSS_PropValue_uppercase ((NW_LMgr_PropertyValueToken_t) 49) -#define NW_CSS_PropValue_lowercase ((NW_LMgr_PropertyValueToken_t) 50) - -/* font-variant prop vals */ -#define NW_CSS_PropValue_smallcaps ((NW_LMgr_PropertyValueToken_t) 51) - -/* font-weight prop vals */ -#define NW_CSS_PropValue_bolder ((NW_LMgr_PropertyValueToken_t) 52) -#define NW_CSS_PropValue_lighter ((NW_LMgr_PropertyValueToken_t) 53) - -/* border-style vals */ -/* Note: Do not change the order of these values because - the border collapsing algorithm for static tables relies on them */ -#define NW_CSS_PropValue_dotted ((NW_LMgr_PropertyValueToken_t) 54) -#define NW_CSS_PropValue_dashed ((NW_LMgr_PropertyValueToken_t) 55) -#define NW_CSS_PropValue_solid ((NW_LMgr_PropertyValueToken_t) 56) -#define NW_CSS_PropValue_double ((NW_LMgr_PropertyValueToken_t) 57) - -/* font-size prop vals */ -#define NW_CSS_PropValue_xxSmall ((NW_LMgr_PropertyValueToken_t) 58) -#define NW_CSS_PropValue_xSmall ((NW_LMgr_PropertyValueToken_t) 59) -#define NW_CSS_PropValue_small ((NW_LMgr_PropertyValueToken_t) 60) -#define NW_CSS_PropValue_xxLarge ((NW_LMgr_PropertyValueToken_t) 61) -#define NW_CSS_PropValue_xLarge ((NW_LMgr_PropertyValueToken_t) 62) -#define NW_CSS_PropValue_large ((NW_LMgr_PropertyValueToken_t) 63) -#define NW_CSS_PropValue_smaller ((NW_LMgr_PropertyValueToken_t) 64) -#define NW_CSS_PropValue_larger ((NW_LMgr_PropertyValueToken_t) 65) -#define NW_CSS_PropValue_medium ((NW_LMgr_PropertyValueToken_t) 66) - -/* font-style prop vals */ -#define NW_CSS_PropValue_oblique ((NW_LMgr_PropertyValueToken_t) 67) - -/* border width types */ -#define NW_CSS_PropValue_thin ((NW_LMgr_PropertyValueToken_t) 68) -#define NW_CSS_PropValue_thick ((NW_LMgr_PropertyValueToken_t) 69) - -/* list-style-position */ -#define NW_CSS_PropValue_inside ((NW_LMgr_PropertyValueToken_t) 70) - -/* background-color */ -#define NW_CSS_PropValue_transparent ((NW_LMgr_PropertyValueToken_t) 71) - -/* colors */ -#define NW_CSS_PropValue_aqua ((NW_LMgr_PropertyValueToken_t) 72) -#define NW_CSS_PropValue_black ((NW_LMgr_PropertyValueToken_t) 73) -#define NW_CSS_PropValue_blue ((NW_LMgr_PropertyValueToken_t) 74) -#define NW_CSS_PropValue_cyan ((NW_LMgr_PropertyValueToken_t) 75) -#define NW_CSS_PropValue_fuchsia ((NW_LMgr_PropertyValueToken_t) 76) -#define NW_CSS_PropValue_gray ((NW_LMgr_PropertyValueToken_t) 77) -#define NW_CSS_PropValue_green ((NW_LMgr_PropertyValueToken_t) 78) -#define NW_CSS_PropValue_lime ((NW_LMgr_PropertyValueToken_t) 79) -#define NW_CSS_PropValue_maroon ((NW_LMgr_PropertyValueToken_t) 80) -#define NW_CSS_PropValue_navy ((NW_LMgr_PropertyValueToken_t) 81) -#define NW_CSS_PropValue_olive ((NW_LMgr_PropertyValueToken_t) 82) -#define NW_CSS_PropValue_pink ((NW_LMgr_PropertyValueToken_t) 73) -#define NW_CSS_PropValue_purple ((NW_LMgr_PropertyValueToken_t) 84) -#define NW_CSS_PropValue_red ((NW_LMgr_PropertyValueToken_t) 85) -#define NW_CSS_PropValue_silver ((NW_LMgr_PropertyValueToken_t) 86) -#define NW_CSS_PropValue_teal ((NW_LMgr_PropertyValueToken_t) 87) -#define NW_CSS_PropValue_white ((NW_LMgr_PropertyValueToken_t) 88) -#define NW_CSS_PropValue_yellow ((NW_LMgr_PropertyValueToken_t) 89) - -/* additional valign */ -#define NW_CSS_PropValue_middle ((NW_LMgr_PropertyValueToken_t) 101) -#define NW_CSS_PropValue_sub ((NW_LMgr_PropertyValueToken_t) 102) -#define NW_CSS_PropValue_super ((NW_LMgr_PropertyValueToken_t) 103) - -/* additional liststyleposition */ -#define NW_CSS_PropValue_outside ((NW_LMgr_PropertyValueToken_t) 111) - -/* marquee values */ -#define NW_CSS_PropValue_scroll ((NW_LMgr_PropertyValueToken_t) 121) -#define NW_CSS_PropValue_slide ((NW_LMgr_PropertyValueToken_t) 122) -#define NW_CSS_PropValue_alternate ((NW_LMgr_PropertyValueToken_t) 123) -#define NW_CSS_PropValue_infinite ((NW_LMgr_PropertyValueToken_t) 124) -#define NW_CSS_PropValue_ltr ((NW_LMgr_PropertyValueToken_t) 125) -#define NW_CSS_PropValue_rtl ((NW_LMgr_PropertyValueToken_t) 126) -#define NW_CSS_PropValue_slow ((NW_LMgr_PropertyValueToken_t) 127) -#define NW_CSS_PropValue_fast ((NW_LMgr_PropertyValueToken_t) 128) - -/* focus behaviors */ -#define NW_CSS_PropValue_growBorder ((NW_LMgr_PropertyValueToken_t) 141) -#define NW_CSS_PropValue_altText ((NW_LMgr_PropertyValueToken_t) 142) - -/* Internal border style */ -#define NW_CSS_PropValue_bevelled ((NW_LMgr_PropertyValueToken_t) 151) - -/* Boolean values */ -#define NW_CSS_PropValue_true ((NW_LMgr_PropertyValueToken_t) 161) -#define NW_CSS_PropValue_false ((NW_LMgr_PropertyValueToken_t) 162) - -/* Intenal text decoration value */ -#define NW_CSS_PropValue_blinkUnderline ((NW_LMgr_PropertyValueToken_t) 171) - -/* Background repeat values */ -#define NW_CSS_PropValue_background_repeat ((NW_LMgr_PropertyValueToken_t) 181) -#define NW_CSS_PropValue_background_repeat_x ((NW_LMgr_PropertyValueToken_t) 182) -#define NW_CSS_PropValue_background_repeat_y ((NW_LMgr_PropertyValueToken_t) 183) -#define NW_CSS_PropValue_background_norepeat ((NW_LMgr_PropertyValueToken_t) 184) - -/* Background attachment values */ -#define NW_CSS_PropValue_background_fixed ((NW_LMgr_PropertyValueToken_t) 191) - -/* J-Sky editor input mode values (J-Sky phase2) */ -#define NW_CSS_PropValue_hiragana ((NW_LMgr_PropertyValueToken_t) 211) -#define NW_CSS_PropValue_katakana ((NW_LMgr_PropertyValueToken_t) 212) -#define NW_CSS_PropValue_hankakukana ((NW_LMgr_PropertyValueToken_t) 213) -#define NW_CSS_PropValue_alphabet ((NW_LMgr_PropertyValueToken_t) 214) -#define NW_CSS_PropValue_numeric ((NW_LMgr_PropertyValueToken_t) 215) - -/* CSS position properties */ -#define NW_CSS_PropValue_position_absolute ((NW_LMgr_PropertyValueToken_t) 221) -#define NW_CSS_PropValue_position_relative ((NW_LMgr_PropertyValueToken_t) 222) - -/* internal flags */ -#define NW_CSS_PropValue_flags_clone ((NW_Int32)0x01) -#define NW_CSS_PropValue_flags_wmlTable ((NW_Int32)0x02) -#define NW_CSS_PropValue_flags_floatWidth ((NW_Int32)0x03) /* used to signify when - width is set the float algorithm */ -#define NW_CSS_PropValue_flags_bodyElement ((NW_Int32)0x04) -#define NW_CSS_PropValue_flags_thirdBr ((NW_Int32)0x05) -#define NW_CSS_PropValue_flags_htmlElement ((NW_Int32)0x06) -#define NW_CSS_PropValue_flags_smallScreenPre ((NW_Int32)0x07) - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CSSPROPERTIES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_emptybox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_emptybox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EMPTYBOX_H -#define NW_EMPTYBOX_H - -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Line boxes are currently implemented as if they were simply container boxes. - * However, they have not been subclassed from container because they can, and - * will eventually be, implemented in a much more light-weight manner - */ - -typedef struct NW_LMgr_EmptyBox_s NW_LMgr_EmptyBox_t; - - -/* Class declarations -------------------------------------------------------*/ - -typedef struct NW_LMgr_EmptyBox_ClassPart_s { - void** unused; -} NW_LMgr_EmptyBox_ClassPart_t; - -typedef struct NW_LMgr_EmptyBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_EmptyBox_ClassPart_t NW_LMgr_EmptyBox; -} NW_LMgr_EmptyBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_EmptyBox_s { - NW_LMgr_Box_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_EmptyBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_EmptyBox)) - -#define NW_LMgr_EmptyBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_EmptyBox)) - -/* ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -NW_LMgr_EmptyBox_t* -NW_LMgr_EmptyBox_New (NW_ADT_Vector_Metric_t numProperties); - -#define NW_LMgr_EmptyBox_Delete(_object) \ - NW_Object_Delete (NW_Object_DynamicOf (_object)) - -NW_LMGR_EXPORT const NW_LMgr_EmptyBox_Class_t NW_LMgr_EmptyBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_EMPTYBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_emptyboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_emptyboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_EMPTYBOXI_H -#define NW_EMPTYBOXI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_emptybox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_EmptyBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -void -_NW_LMgr_EmptyBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -TBrowserStatusCode -_NW_LMgr_EmptyBox_GetMinimumContentSize(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size); - -NW_Bool -_NW_LMgr_EmptyBox_HasFixedContentSize(NW_LMgr_Box_t *box); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_epoc32accesskey.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_epoc32accesskey.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_EPOC32ACCESSKEY_H -#define NW_LMGR_EPOC32ACCESSKEY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_lmgr_accesskey.h" - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Epoc32AccessKey_Class_s NW_LMgr_Epoc32AccessKey_Class_t; -typedef struct NW_LMgr_Epoc32AccessKey_s NW_LMgr_Epoc32AccessKey_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_Epoc32AccessKey_ClassPart_s { - void** unused; -}NW_LMgr_Epoc32AccessKey_ClassPart_t; - -struct NW_LMgr_Epoc32AccessKey_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_AccessKey_ClassPart_t NW_LMgr_AccessKey; - NW_LMgr_Epoc32AccessKey_ClassPart_t NW_LMgr_Epoc32AccessKey; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_Epoc32AccessKey_s { - NW_LMgr_AccessKey_t super; - -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_Epoc32AccessKey_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_Epoc32AccessKey)) - -#define NW_LMgr_Epoc32AccessKeyOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_Epoc32AccessKey)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_LMgr_Epoc32AccessKey_Class_t NW_LMgr_Epoc32AccessKey_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_LMGR_EPOC32ACCESSKEY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_epoc32accesskeyi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_epoc32accesskeyi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_EPOC32ACCESSKEYI_H -#define NW_LMGR_EPOC32ACCESSKEYI_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_lmgr_accesskeyi.h" -#include "nw_lmgr_epoc32accesskey.h" - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_Bool -_NW_LMgr_Epoc32AccessKey_IsValidForOptionsList (NW_LMgr_AccessKey_t* accesskey, - NW_Uint32 val); - -extern -NW_Bool -_NW_LMgr_Epoc32AccessKey_IsValidKeyPress (NW_LMgr_AccessKey_t* accesskey, - NW_Uint32 val); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_LMGR_EPOC32ACCESSKEYI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_eventhandler.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_eventhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_EVENTHANDLER_H -#define NW_LMGR_EVENTHANDLER_H - -#include "nw_object_dynamic.h" -#include "nw_evt_event.h" -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_EventHandler_Class_s NW_LMgr_EventHandler_Class_t; -typedef struct NW_LMgr_EventHandler_s NW_LMgr_EventHandler_t; - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -enum { - NW_LMgr_EventNotAbsorbed = 0, - NW_LMgr_EventAbsorbed = 1 -}; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Uint8 -(*NW_LMgr_EventHandler_ProcessEvent_t) (NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_EventHandler_ClassPart_s { - NW_LMgr_EventHandler_ProcessEvent_t processEvent; -} NW_LMgr_EventHandler_ClassPart_t; - -struct NW_LMgr_EventHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_EventHandler_ClassPart_t NW_LMgr_EventHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_EventHandler_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_EventHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_EventHandler)) - -#define NW_LMgr_EventHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_EventHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_EventHandler_Class_t NW_LMgr_EventHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_EventHandler_ProcessEvent(_eventHandler, _activeBox, _event) \ - (NW_LMgr_EventHandler_GetClassPart (_eventHandler). \ - processEvent ((_eventHandler), (_activeBox), (_event))) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_LMGR_EVENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_eventhandleri.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_eventhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_EVENTHANDLERI_H -#define NW_LMGR_EVENTHANDLERI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_eventhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_LMGR_EVENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_flowbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_flowbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FLOWBOX_H -#define NW_FLOWBOX_H - -#include "nw_adt_dynamicvector.h" -#include "nw_lmgr_formatbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* -* Flow boxes manage flows. These are boxes within which other boxes -* can be laid out using some kind of flow: left-right flow, table -* flow, etc. Internally, flow box implementations call the "flowable" -* interface methods on objects to add them to the flow. One could -* actually further subclass to have flow-type flow boxes (LR, top-bottom, -* etc.) and other types (table, etc.). - */ - -typedef struct NW_LMgr_FlowBox_s NW_LMgr_FlowBox_t; - -/* - * This method is used to glue an inline box into the flow. - * This may result in splitting the box over more than one line. - */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FlowBox_FlowInline_t)( NW_LMgr_FlowBox_t *flow, - NW_LMgr_Box_t *box, - NW_LMgr_FormatContext_t *formatContext); - -/* This method is used to put a block box into the flow */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FlowBox_FlowBlock_t)( NW_LMgr_FlowBox_t *flow, - NW_LMgr_Box_t *box, - NW_LMgr_FormatContext_t *formatContext); - -typedef -TBrowserStatusCode -(*NW_LMgr_FlowBox_ListItem_t)( NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t *item, - NW_LMgr_FormatContext_t *context); - -typedef -TBrowserStatusCode -(*NW_LMgr_FlowBox_LFloat_t)( NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t *box, - NW_LMgr_FormatContext_t *context); - -/* This method moves the flow to a new line */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FlowBox_NewLine_t)( NW_LMgr_FlowBox_t *flow, - NW_LMgr_FormatContext_t *context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine); - - -/* Class declarations -------------------------------------------------------*/ - -typedef struct NW_LMgr_FlowBox_ClassPart_s { - void** unused; -} NW_LMgr_FlowBox_ClassPart_t; - -typedef struct NW_LMgr_FlowBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; -} NW_LMgr_FlowBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_FlowBox_s { - NW_LMgr_FormatBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_FlowBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_FlowBox)) - -#define NW_LMgr_FlowBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_FlowBox)) - - /* ------------------------------------------------------------------------- */ - -#define NW_LMgr_FlowBox_FlowInline(_object, _box, _context) \ - (NW_LMgr_FlowBox_GetClassPart (_object).flowInline ((_object), (_box), \ - (_context))) - -#define NW_LMgr_FlowBox_FlowBlock(_object, _box, _context) \ - (NW_LMgr_FlowBox_GetClassPart (_object).flowBlock ((_object), (_box), \ - (_context))) - -#define NW_LMgr_FlowBox_ListItem(_object, _box, _context) \ - (NW_LMgr_FlowBox_GetClassPart (_object).listItem ((_object), (_box), (_context))) - -#define NW_LMgr_FlowBox_LFloat(_object, _box, _context) \ - (NW_LMgr_FlowBox_GetClassPart (_object).lFloat ((_object), (_box), (_context))) - -#define NW_LMgr_FlowBox_NewLine(_object, _context, _delta, _indentNewLine) \ - (NW_LMgr_FlowBox_GetClassPart (_object).newLine ((_object), (_context), (_delta), (_indentNewLine))) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_FlowBox_Class_t NW_LMgr_FlowBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_flowboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_flowboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FLOWBOXI_H -#define NW_FLOWBOXI_H - -#include "nw_lmgr_formatboxi.h" -#include "nw_lmgr_flowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FlowBox_Resize( NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FlowBox_PostResize( NW_LMgr_Box_t* box); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FlowBox_Format( NW_LMgr_FormatBox_t* format, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t *context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FlowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_FlowBox_GetBaseline(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetLineStart(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t where); -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t where); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FLOWBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_formatbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_formatbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FORMATBOX_H -#define NW_FORMATBOX_H - -#include "nw_lmgr_containerbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* - * Format boxes manage formatting. These are boxes within which other - * boxes can be laid out using some kind of formatting algorithm: a - * flow, a table, etc. Format box is an abstract class from which - * various classes of formatter, such as flows and tables, are - * sub-classed. Specific format box classes may only know how to - * format boxes of specific types. - */ - -typedef struct NW_LMgr_FormatBox_s NW_LMgr_FormatBox_t; - -/* This is the fundamental formatting mechanism. Inserts a box into - * the format, placing and sizing it in relation to other boxes and - * the format's borders. The fundamental design assumption of the - * formatting model is that boxes can be added sequentially, one at a - * time to the format, and that the sequence determines, in part, how - * boxes are laid out. This is a pure virtual method that must be - * overridden by format box subclasses. - */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FormatBox_Format_t)(NW_LMgr_FormatBox_t *format, - NW_LMgr_Box_t *box, - NW_LMgr_FormatContext_t *context); - -/* When a container box is added to a format, the format invokes this - * method to recursively format the the children of the container. If - * the added container is a format box, this method is invoked with - * the container as both the first and second arguments. However, - * since not all containers are format boxes, the format may instead - * invoke this method on itself, passing the container as the second - * argument only. This results in the container children being - * formatted within the parent format. This is useful for elements - * like XHTML <a> which do not create a new formatting context for - * their children. - */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FormatBox_FormatChildren_t)(NW_LMgr_FormatBox_t* format, - NW_LMgr_ContainerBox_t *whose, - NW_LMgr_FormatContext_t* context); - -/* Since properties may affect the formatting context (for example, by - * setting flow margins), format boxes provide a method to apply such - * properties. - */ - -typedef -TBrowserStatusCode -(*NW_LMgr_FormatBox_ApplyFormatProps_t)(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); - -/* Class declarations -------------------------------------------------------*/ - -typedef struct NW_LMgr_FormatBox_ClassPart_s { - NW_LMgr_FormatBox_ApplyFormatProps_t applyFormatProps; -} NW_LMgr_FormatBox_ClassPart_t; - -typedef struct NW_LMgr_FormatBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; -} NW_LMgr_FormatBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_FormatBox_s { - NW_LMgr_ContainerBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_FormatBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_FormatBox)) - -#define NW_LMgr_FormatBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_FormatBox)) - - /* ------------------------------------------------------------------------- */ -#define NW_LMgr_FormatBox_Format(_object, _box, _context) \ - (NW_LMgr_FormatBox_GetClassPart (_object).format ((_object), (_box), (_context))) - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_FormatBox_FormatChildren(_object, _whose, _context) \ - (NW_LMgr_FormatBox_GetClassPart (_object).formatChildren ((_object), (_whose), (_context))) - -#define NW_LMgr_FormatBox_ApplyFormatProps(_object, _context) \ - (NW_LMgr_FormatBox_GetClassPart (_object).applyFormatProps ((_object), (_context))) - -/* ---------------------------------------------------------------------------*/ - -NW_LMGR_EXPORT const NW_LMgr_FormatBox_Class_t NW_LMgr_FormatBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_formatboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_formatboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FORMATBOXI_H -#define NW_FORMATBOXI_H - -#include "nw_lmgr_containerboxi.h" -#include "nw_lmgr_formatbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FormatBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FormatBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FormatBox_FormatChildren(NW_LMgr_FormatBox_t* format, - NW_LMgr_ContainerBox_t *whose, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FormatBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FORMATBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_formatcontext.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_formatcontext.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FORMATCONTEXT_H -#define NW_FORMATCONTEXT_H - -#include "nw_lmgr_box_defn.h" -#include "nw_lmgr_linebox_defn.h" -//#include "nw_lmgr_box.h" -#include "nw_gdi_types.h" -#include "nw_object_dynamic.h" -#include "NW_Text_Abstract.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_FormatContext_Class_s NW_LMgr_FormatContext_Class_t; -typedef struct NW_LMgr_FormatContext_s NW_LMgr_FormatContext_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_FormatContext_ClassPart_s { - void** unused; -} NW_LMgr_FormatContext_ClassPart_t; - -struct NW_LMgr_FormatContext_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_FormatContext_ClassPart_t NW_LMgr_FormatContext; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_FormatContext_s { - NW_Object_Dynamic_t super; - - /* Member variables */ - NW_Uint8 flags; - NW_Uint32 listCount; /* Current ordered list item */ - NW_Uint32 itemsHandled; /* The number of list items handled */ - NW_GDI_Metric_t x; /* Layout the next element */ - NW_GDI_Metric_t y; /* starting at x,y (offsets) */ - NW_LMgr_LineBox_t* currentLine; /* Current line buffer */ - NW_Uint16 lineNumber; - NW_GDI_Metric_t startMargin; /* Current margin where formatting starts */ - NW_GDI_Metric_t endMargin; /* Current margin where formatting breaks */ - NW_GDI_Metric_t lineStart; /* Where the current line starts */ - NW_GDI_Metric_t lineEnd; /* Where the current line ends */ - NW_GDI_Metric_t pendingMargin; /* Pending vertical margin */ - NW_GDI_Metric_t pendingInlineMargin; /* Pending inline left margin */ - NW_Bool pendingWhitespace; /* Any pending WS? */ - NW_GDI_FlowDirection_t direction; - NW_ADT_DynamicVector_t *placedFloats; - NW_ADT_DynamicVector_t *pendingFloats; - - NW_Bool formatChildren; /* is NW_TRUE if the box has the children to be formatted*/ - NW_LMgr_Box_t* formatBox;/* the formatbox to be used to format the children*/ - NW_LMgr_FormatContext_t* newFormatContext;/* new formatcontext to be used to format the children*/ - NW_Uint8 referenceCount; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_FormatContext_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_FormatContext)) - -#define NW_LMgr_FormatContextOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_FormatContext)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_FormatContext_Class_t NW_LMgr_FormatContext_Class; - -#define NW_LMgr_FlowCtxt_Flags_trailingWS (NW_Uint8)1 - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -NW_LMgr_FormatContext_t * -NW_LMgr_FormatContext_New(void); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_FORMATCONTEXT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_formatcontexti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_formatcontexti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_FORMATCONTEXTI_H -#define NW_FORMATCONTEXTI_H - - -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_formatcontext.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_FormatContext_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_FormatContext_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_icollapsiblebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_icollapsiblebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_ICollapsibleBox_h -#define NW_LMgr_ICollapsibleBox_h - -#include "nw_object_interface.h" -#include "nw_evt_event.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ICollapsibleBox_Class_s NW_LMgr_ICollapsibleBox_Class_t; -typedef struct NW_LMgr_ICollapsibleBox_s NW_LMgr_ICollapsibleBox_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_LMgr_ICollapsibleBox_Collapse_t) (NW_LMgr_ICollapsibleBox_t* collapsibleBox); - -/* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ICollapsibleBox_ClassPart_s { - NW_LMgr_ICollapsibleBox_Collapse_t collapse; -} NW_LMgr_ICollapsibleBox_ClassPart_t; - -struct NW_LMgr_ICollapsibleBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_LMgr_ICollapsibleBox_ClassPart_t NW_LMgr_ICollapsibleBox; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_LMgr_ICollapsibleBox_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ICollapsibleBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ICollapsibleBox)) - -#define NW_LMgr_ICollapsibleBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ICollapsibleBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_ICollapsibleBox_Class_t NW_LMgr_ICollapsibleBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_ICollapsibleBox_Collapse(_collapsibleBox) \ - (NW_Object_Invoke(_collapsibleBox, NW_LMgr_ICollapsibleBox, collapse) \ - (NW_LMgr_ICollapsibleBoxOf (_collapsibleBox))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_ICollapsibleBox_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_icollapsibleboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_icollapsibleboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMgr_ICollapsibleBoxI_h -#define NW_LMgr_ICollapsibleBoxI_h - - -#include "nw_object_interfacei.h" -#include "nw_lmgr_icollapsiblebox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMgr_IEventListenerI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imagebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imagebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGEBOX_H -#define NW_IMAGEBOX_H - - -#include "nw_image_abstractimage.h" -#include "nw_lmgr_mediabox.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Image boxes hold image content. TODO: These still need to be subclassed */ - -typedef struct NW_LMgr_ImageBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_ImageBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ImageBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ImageBox_ClassPart_t NW_LMgr_ImageBox; -} NW_LMgr_ImageBox_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ImageBox_s { - NW_LMgr_MediaBox_t super; - - NW_Image_AbstractImage_t* image; -} NW_LMgr_ImageBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_ImageBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ImageBox)) - -#define NW_LMgr_ImageBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_ImageBox)) - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_ImageBox_SetImage(_object, _image) \ - ((_object)->image = _image) - -NW_LMGR_EXPORT const NW_LMgr_ImageBox_Class_t NW_LMgr_ImageBox_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_ImageBox_t* -NW_LMgr_ImageBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_Image_AbstractImage_t* image); -void -NW_LMgr_ImageBox_HandleVerticalLayout(NW_LMgr_Box_t *box, NW_GDI_Dimension2D_t *size, NW_LMgr_RootBox_t* rootBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imageboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imageboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMAGEBOXI_H -#define NW_IMAGEBOXI_H - -#include "nw_lmgr_mediaboxi.h" -#include "nw_lmgr_imagebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Image box overrides */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImageBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ImageBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImageBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImageBox_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -TBrowserStatusCode -_NW_LMgr_ImageBox_Resize (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - - -TBrowserStatusCode -_NW_LMgr_ImageBox_Constrain(NW_LMgr_Box_t *box, - NW_GDI_Metric_t constraint); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imagemapbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imagemapbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the handling image maps -* -*/ - - -#ifndef NW_IMAGEMAPBOX_H -#define NW_IMAGEMAPBOX_H - -// INCLUDES -#include <e32def.h> -#include <e32base.h> -#include <bitdev.h> -#include "nw_lmgr_animatedimagebox.h" -#include "nw_object_dynamic.h" -#include "nw_adt_resizablevector.h" -#include "nw_image_abstractimage.h" -#include "NW_LMgr_IEventListener.h" -#include "nw_lmgr_eventhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -// ------------------------------------------------------------------------- -// forward declarations -// ------------------------------------------------------------------------- -typedef struct NW_LMgr_ImageMapBox_Class_s NW_LMgr_ImageMapBox_Class_t; -typedef struct NW_LMgr_ImageMapBox_s NW_LMgr_ImageMapBox_t; - -// ------------------------------------------------------------------------- -// class declaration -// ------------------------------------------------------------------------- -typedef struct NW_LMgr_ImageMapBox_ClassPart_s { - void** unused; -} NW_LMgr_ImageMapBox_ClassPart_t; - -struct NW_LMgr_ImageMapBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ImgContainerBox_ClassPart_t NW_LMgr_ImgContainerBox; - NW_LMgr_AnimatedImageBox_ClassPart_t NW_LMgr_AnimatedImageBox; - NW_LMgr_ImageMapBox_ClassPart_t NW_LMgr_ImageMapBox; -}; - -// ------------------------------------------------------------------------- -// object declaration -// ------------------------------------------------------------------------- -struct NW_LMgr_ImageMapBox_s { - NW_LMgr_AnimatedImageBox_t super; - - // implemented interfaces - NW_LMgr_IEventListener_t NW_LMgr_IEventListener; - NW_LMgr_EventHandler_t* eventHandler; - - // member variables - NW_ADT_DynamicVector_t* iAreaBoxArrayList; - - NW_Image_AbstractImage_t* iImageMapIcon; - NW_Text_t* iUrl; -}; - -// ------------------------------------------------------------------------- -// convenience macros -// ------------------------------------------------------------------------- -#define NW_LMgr_ImageMapBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ImageMapBox)) - -#define NW_LMgr_ImageMapBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ImageMapBox)) - -// ------------------------------------------------------------------------- -// global static data -// ------------------------------------------------------------------------- -NW_LMGR_EXPORT const NW_LMgr_ImageMapBox_Class_t NW_LMgr_ImageMapBox_Class; - -// ------------------------------------------------------------------------- -// public methods -// ------------------------------------------------------------------------- - -/** -* NW_LMgr_ImageMapBox_New -* @desc Method to return a new NW_LMgr_ImageMapBox_t object -* @param NW_ADT_Vector_Metric_t aNumProperties: number of arguments in the -* parameter list -* @param NW_Image_AbstractImage_t* aVirtualImage: the virtual image -* associated with this image box (passed up to the base class) -* @param NW_Text_t* aAltText: pointer to the string which holds the -* alternate text for this image map box (passed up to the base class) -* @param NW_Bool aBrokenImage: a boolean value to determine whether or not -* this image is a broken image (passed up to the base class) -* @param NW_LMgr_EventHandler_t* aEventHandler: pointer to the eventHandler -* associated with this box -* @param NW_Text_t* aUrl: pointer to the string which holds the -* url associated with the image -* @return NW_LMgr_AreaBox_t*: pointer to a NW_LMgr_ImageMapBox_t object -*/ -NW_LMgr_ImageMapBox_t* -NW_LMgr_ImageMapBox_New (NW_ADT_Vector_Metric_t aNumProperties, - NW_Image_AbstractImage_t* aVirtualImage, - NW_Text_t* aAltText, - NW_Bool aBrokenImage, - NW_LMgr_EventHandler_t* aEventHandler, - NW_Text_t* aUrl); - -/** -* NW_LMgr_ImageMapBox_GetAreaBoxList -* @description This method returns a pointer to the image map box's area -* box list -* @param NW_LMgr_ImageMapBox_t*: pointer to the image map box for which -* you want to retrieve the area box list -* @return NW_ADT_DynamicVector_t*: pointer to a NW_ADT_DynamicVector_t -* (area box list) -*/ -NW_ADT_DynamicVector_t* -NW_LMgr_ImageMapBox_GetAreaBoxList (NW_LMgr_ImageMapBox_t* aImageMapBox); - -/** -* NW_LMgr_ImageMapBox_SetAreaBoxList -* @description This method sets the area box list on the image box -* (because it is created elsewhere, but the image map box should own it.) -* @param NW_LMgr_Box_t* box: pointer to the the image map box you want to -* set the area box list on -* @return void -*/ -void -NW_LMgr_ImageMapBox_SetAreaBoxList (NW_LMgr_ImageMapBox_t* aImageMapBox, - NW_ADT_DynamicVector_t* aAreaBoxArrayList); - -/** -* NW_LMgr_ImageMapBox_DrawBorder -* @description This method is called to draw the border for the image map box. -* In the case of small screen mode, a border is drawn around the in focus -* scaled image. In the case of normal layout mode, a border is drawn around -* the in focus area box. -* @param NW_LMgr_Box_t* aBox: the box for which the border is to be drawn -* @param CGDIDeviceContext* aDeviceContext: the device context to be used -* @return TBrowserStatusCode -*/ -TBrowserStatusCode -NW_LMgr_ImageMapBox_DrawBorder(NW_LMgr_Box_t* aBox, - CGDIDeviceContext* aDeviceContext); - -/** -* NW_LMgr_ImageMapBox_Copy -* @description Will return a new box which is a copy of the image map box passed in as -* the first parameter. The caller of this method is responsible for deleting the newly -* created image map box. This method is primarily used for creating -* a box tree node for use in the image map view. -* @param NW_LMgr_Box_t* aBox: the original box you want to copy -* @param NW_LMgr_Box_t** aNewBox: address of a pointer to a image map box object -* @return TBrowserStatusCode -*/ -TBrowserStatusCode -NW_LMgr_ImageMapBox_Copy(NW_LMgr_Box_t* aBox, NW_LMgr_Box_t** aNewBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_IMAGEMAPBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imagemapboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imagemapboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the handling image maps -* -*/ - - -#ifndef NW_IMAGEMAPBOXI_H -#define NW_IMAGEMAPBOXI_H - -// INCLUDES -#include "nw_lmgr_animatedimageboxi.h" -#include "nw_lmgr_imagemapbox.h" -#include "NW_LMgr_IEventListenerI.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -// ------------------------------------------------------------------------- -// virtual methods implementation declarations -// ------------------------------------------------------------------------- -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImageMapBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ImageMapBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImageMapBox_GetMinimumContentSize( NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size ); - -NW_LMGR_EXPORT -NW_Uint8 -_NW_LMgr_ImageMapBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif //NW_IMAGEMAPBOXI_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imgcontainerbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imgcontainerbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMGCONTAINERBOX_H -#define NW_IMGCONTAINERBOX_H - -#include "nw_lmgr_mediabox.h" -#include "nw_image_abstractimage.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Container boxes are boxes with children */ -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ImgContainerBox_Class_s NW_LMgr_ImgContainerBox_Class_t; -typedef struct NW_LMgr_ImgContainerBox_s NW_LMgr_ImgContainerBox_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_ImgContainerBox_ClassPart_s { - void** unused; -} NW_LMgr_ImgContainerBox_ClassPart_t; - -struct NW_LMgr_ImgContainerBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_ImgContainerBox_ClassPart_t NW_LMgr_ImgContainerBox; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_ImgContainerBox_s { - NW_LMgr_MediaBox_t super; - - NW_Bool isBroken; - NW_Text_t* altText; - NW_Image_AbstractImage_t* virtualImage; - NW_Bool iBoxPlaced; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_ImgContainerBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_ImgContainerBox)) - -#define NW_LMgr_ImgContainerBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_ImgContainerBox)) - -/* Final Methods ---------------------------------------------------------- */ - -/*-------------------------------------------------------------------------*/ -NW_LMGR_EXPORT const NW_LMgr_ImgContainerBox_Class_t NW_LMgr_ImgContainerBox_Class; - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ -NW_IMAGE_EXPORT -void -NW_LMgr_ImgContainerBox_ReplaceBrokenImage( NW_LMgr_Box_t* box, NW_Image_AbstractImage_t* image ); - -NW_IMAGE_EXPORT -NW_Bool -NW_LMgr_ImgContainerBox_ImageIsBroken( NW_LMgr_Box_t* box ); - -NW_IMAGE_EXPORT -void -NW_LMgr_ImgContainerBox_ImageIsPlaced( NW_LMgr_Box_t* box ); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_ImgContainerBox_t* -NW_LMgr_ImgContainerBox_New (NW_ADT_Vector_Metric_t numProperties, NW_Image_AbstractImage_t* virtualImage, - NW_Text_t* altText, NW_Bool brokenImage ); - - - -/* ------------------------------------------------------------------------- * - global utility functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ImgBox_DrawContent( NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Image_AbstractImage_t* image, - NW_Bool isBroken, - NW_Text_t* altText, - NW_Uint8 hasFocus); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_ImgContainerBox_DisplayAltText(NW_LMgr_Box_t* box, - NW_Text_t* altText, - CGDIDeviceContext* deviceContext, - NW_GDI_Metric_t space, - NW_GDI_Point2D_t *textPos, - CGDIFont *boxFont); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_CONTAINERBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_imgcontainerboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_imgcontainerboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_IMGCONTAINERBOXI_H -#define NW_IMGCONTAINERBOXI_H - -#include "nw_lmgr_mediaboxi.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual methods implementation declarations - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_ImgContainerBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Split(NW_LMgr_Box_t* box, NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, NW_Uint8 flags); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_GetMinimumContentSize (NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_linebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_linebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LINEBOX_H -#define NW_LINEBOX_H - -#include "nw_lmgr_box.h" -#include "nw_lmgr_linebox_defn.h" -#include "nw_object_dynamic.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - - -/* Class declarations -------------------------------------------------------*/ - -typedef struct NW_LMgr_LineBox_ClassPart_s { - void** unused; -} NW_LMgr_LineBox_ClassPart_t; - -typedef struct NW_LMgr_LineBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_LineBox_ClassPart_t NW_LMgr_LineBox; -} NW_LMgr_LineBox_Class_t; - - - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_LineBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_LineBox)) - -#define NW_LMgr_LineBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_LineBox)) - -/* ---------------------------------------------------------------------------*/ - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_LineBox_Clear(NW_LMgr_LineBox_t *lineBox); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_LineBox_Append(NW_LMgr_LineBox_t *lineBox, - NW_LMgr_Box_t* box, - NW_GDI_FlowDirection_t dir); - -NW_LMGR_EXPORT -NW_ADT_Vector_Metric_t -NW_LMgr_LineBox_GetCount(NW_LMgr_LineBox_t *lineBox); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_LineBox_GetBox(NW_LMgr_LineBox_t *lineBox, NW_ADT_Vector_Metric_t index); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_LineBox_HAlign(NW_LMgr_LineBox_t *lineBox, - NW_LMgr_PropertyValueToken_t type, - NW_GDI_Metric_t space, - NW_GDI_FlowDirection_t dir); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_LineBox_VAlign(NW_LMgr_LineBox_t *lineBox, NW_GDI_Metric_t contextY, - NW_GDI_Metric_t* lineBase, NW_GDI_Metric_t *lineHeight); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -NW_LMgr_LineBox_GetEm(NW_LMgr_LineBox_t *lineBox); - - -/* ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -NW_LMgr_LineBox_t* -NW_LMgr_LineBox_New (void); - -#define NW_LMgr_LineBox_Delete(_object) \ - NW_Object_Delete (NW_Object_DynamicOf (_object)) - -NW_LMGR_EXPORT const NW_LMgr_LineBox_Class_t NW_LMgr_LineBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_linebox_defn.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_linebox_defn.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LINEBOX_DEFN_H -#define NW_LINEBOX_DEFN_H - -#include "nw_lmgr_box_defn.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Line boxes are currently implemented as if they were simply container boxes. - * However, they have not been subclassed from container because they can, and - * will eventually be, implemented in a much more light-weight manner - */ - -typedef struct NW_LMgr_LineBox_s NW_LMgr_LineBox_t; - - - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_LineBox_s { - NW_LMgr_Box_t super; - - /* member variables */ - NW_ADT_DynamicVector_t *line; -}; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_lineboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_lineboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LINEBOXI_H -#define NW_LINEBOXI_H - -#include "nw_lmgr_containerboxi.h" -#include "nw_lmgr_linebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_LineBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -void -_NW_LMgr_LineBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LINEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_listbullets.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_listbullets.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LISTBULLETS_H -#define NW_LISTBULLETS_H - -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Utilities to return numbers as strings for use in ordered list bullets.*/ - -/* Get a number string in a specified format. The currently supported - * formats are limited to "A", "a", "R", "r" and "d". Later we may want to add length - * and decimal point style and location specifiers to the format strings too. - */ - -NW_Ucs2* -NW_LMgr_ListBullets_StringFromUInt(NW_Ucs2 format, NW_Uint32 number); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LISTBULLETS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_marqueebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_marqueebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_LMgr_MarqueeBox_h_ -#define _NW_LMgr_MarqueeBox_h_ - -#include "nw_lmgr_bidiflowbox.h" -#include "nw_system_timer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_MarqueeBox_Class_s NW_LMgr_MarqueeBox_Class_t; -typedef struct NW_LMgr_MarqueeBox_s NW_LMgr_MarqueeBox_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_MarqueeBox_ClassPart_s { - void** unused; -} NW_LMgr_MarqueeBox_ClassPart_t; - -struct NW_LMgr_MarqueeBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_MarqueeBox_ClassPart_t NW_LMgr_MarqueeBox; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_MarqueeBox_s { - NW_LMgr_FormatBox_t super; - - /* Member variables */ - NW_Bool started; - NW_System_Timer_t* timer; - NW_Bool loopFinished; - NW_Uint16 loopCount; - NW_Uint16 pause; - NW_LMgr_PropertyValueToken_t marqueeStyle; - NW_LMgr_PropertyValueToken_t marqueeDir; - NW_GDI_Metric_t marqueeAmount; - NW_Uint16 marqueeSpeed; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_MarqueeBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_MarqueeBox)) - -#define NW_LMgr_MarqueeBoxOf(_object) \ -((NW_LMgr_MarqueeBox_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_MarqueeBox_Class_t NW_LMgr_MarqueeBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_MarqueeBox_Initialize (NW_LMgr_MarqueeBox_t *marquee); - -NW_LMGR_EXPORT -NW_LMgr_MarqueeBox_t* -NW_LMgr_MarqueeBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_LMgr_MarqueeBox_h_ */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_marqueeboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_marqueeboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARQUEEBOXI_H -#define NW_MARQUEEBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_marqueebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_MarqueeBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_MarqueeBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_MarqueeBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARQUEEBOXI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_mediabox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_mediabox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MEDIABOX_H -#define NW_MEDIABOX_H - -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/*-- Media box ----------------------------------------------------------------*/ - -typedef struct NW_LMgr_MediaBox_ClassPart_s { - void** unused; -} NW_LMgr_MediaBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_MediaBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; -} NW_LMgr_MediaBox_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_MediaBox_s { - NW_LMgr_Box_t super; -} NW_LMgr_MediaBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_MediaBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_MediaBox)) - -#define NW_LMgr_MediaBoxOf(_object) \ -((NW_LMgr_MediaBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_MediaBox_Class_t NW_LMgr_MediaBox_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MEDIABOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_mediaboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_mediaboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MEDIABOXI_H -#define NW_MEDIABOXI_H - -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_mediabox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - -NW_Bool -_NW_LMgr_MediaBox_HasFixedContentSize(NW_LMgr_Box_t *box); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MEDIABOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_nobrbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_nobrbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_NOBRBOX_H -#define NW_NOBRBOX_H - -#include "nw_lmgr_containerbox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - -/* Class declarations -------------------------------------------------------*/ -typedef struct NW_LMgr_NobrBox_s NW_LMgr_NobrBox_t; - -typedef struct NW_LMgr_NobrBox_ClassPart_s -{ - void** unused; /* empty class part */ -} NW_LMgr_NobrBox_ClassPart_t; - -typedef struct NW_LMgr_NobrBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_NobrBox_ClassPart_t NW_LMgr_NobrBox; -} NW_LMgr_NobrBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_NobrBox_s { - NW_LMgr_ContainerBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_NobrBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_NobrBox)) - -#define NW_LMgr_NobrBoxOf(_object) \ -((NW_LMgr_NobrBox_t*) (_object)) - -/* ---------------------------------------------------------------------------*/ - -NW_LMGR_EXPORT const NW_LMgr_NobrBox_Class_t NW_LMgr_NobrBox_Class; - -NW_LMGR_EXPORT -NW_LMgr_NobrBox_t* -NW_LMgr_NobrBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_nobrboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_nobrboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_NOBRBOXI_H -#define NW_LMGR_NOBRBOXI_H - -#include "nw_lmgr_containerboxi.h" -#include "nw_lmgr_nobrbox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_NOBRBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_posflowbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_posflowbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_POSFLOWBOX_H -#define NW_POSFLOWBOX_H - -#include "nw_lmgr_flowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Pos Flow boxes keep track the saved positioned boxes */ - -typedef struct NW_LMgr_PosFlowBox_s NW_LMgr_PosFlowBox_t; - -typedef struct NW_LMgr_PosFlowBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_PosFlowBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_PosFlowBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_PosFlowBox_ClassPart_t NW_LMgr_PosFlowBox; -} NW_LMgr_PosFlowBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_PosFlowBox_s { - NW_LMgr_FlowBox_t super; - NW_Int32 iLeft; - NW_Int32 iRight; - NW_Int32 iTop; - NW_Int32 iBottom; - NW_Bool iHasLeft; - NW_Bool iHasRight; - NW_Bool iHasTop; - NW_Bool iHasBottom; - NW_LMgr_Box_t* iContainingBlock; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_PosFlowBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_PosFlowBox)) - - -#define NW_LMgr_PosFlowBoxOf(_object) \ -((NW_LMgr_PosFlowBox_t*) (_object)) - -#define NW_LMgr_PosFlowBox_Split(_object, _space, _split, _flags) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).split ((_object), (_space), (_split), (_flags))) - -#define NW_LMgr_PosFlowBox_Resize(_object, _context) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).resize ((_object),(_context))) - -#define NW_LMgr_PosFlowBox_PostResize(_object) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).postResize (_object)) - - -#define NW_LMgr_PosFlowBox_GetMinimumContentSize(_object, _size) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).getMinimumContentSize ((_object), (_size))) - -#define NW_LMgr_PosFlowBox_HasFixedContentSize(_object) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).hasFixedContentSize (_object)) - -#define NW_LMgr_PosFlowBox_Constrain(_object, _constraint) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).constrain ((_object), (_constraint))) - -#define NW_LMgr_PosFlowBox_Draw(_object, _deviceContext, _hasFocus) \ - (NW_LMgr_PosFlowBox_GetClassPart(_object). \ - draw ((_object), (_deviceContext), (_hasFocus))) - -#define NW_LMgr_PosFlowBox_Render(_object, _deviceContext, _clipRect, _currentBox, _flags, _hasFocus, _skipChildren, _rootBox ) \ - (NW_LMgr_PosFlowBox_GetClassPart(_object). \ - render ((_object), (_deviceContext), (_clipRect), (_currentBox), (_flags), (_hasFocus), (_skipChildren), (_rootBox) )) - -#define NW_LMgr_PosFlowBox_GetBaseline(_object) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).getBaseline (_object)) - -#define NW_LMgr_PosFlowBox_Shift(_object, _shift) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).shift ((_object), (_shift))) - -#define NW_LMgr_PosFlowBox_Clone(_object) \ - (NW_LMgr_PosFlowBox_GetClassPart (_object).clone ((_object))) - -#define NW_LMgr_PosFlowtBox_ApplyFormatProps(_object, _context) \ - (NW_LMgr_PosFlowtBox_GetClassPart (_object).applyFormatProps ((_object), (_context))) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_PosFlowBox_Class_t NW_LMgr_PosFlowBox_Class; - - -NW_LMGR_EXPORT -NW_LMgr_PosFlowBox_t* -NW_LMgr_PosFlowBox_New (NW_ADT_Vector_Metric_t numProperties); - -void NW_LMgr_PosFlowBox_CalculatePosition(NW_LMgr_PosFlowBox_t* aPosFlowBox, NW_LMgr_Box_t* aBox); - -void NW_LMgr_PosFlowBox_AdjustPosition(NW_LMgr_PosFlowBox_t* aPosFlowBox); - -TBrowserStatusCode NW_LMgr_PosFlowBox_AddTabItem(NW_LMgr_PosFlowBox_t* aPosFlowBox); - -TBrowserStatusCode NW_LMgr_PosFlowBox_HandlePostFormat(NW_LMgr_PosFlowBox_t* aPosFlowBox); - -void NW_LMgr_PosFlowBox_AddPositionedBox(NW_LMgr_PosFlowBox_t* aPosFlowBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_posflowboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_posflowboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_POSFLOWBOXI_H -#define NW_POSFLOWBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_flowboxi.h" -#include "nw_lmgr_posflowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual methods implementation declarations - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -void -_NW_LMgr_PosFlowBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_PostResize(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size); - -NW_LMGR_EXPORT -NW_Bool -_NW_LMgr_PosFlowBox_HasFixedContentSize(NW_LMgr_Box_t *box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_PosFlowBox_GetBaseline(NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Shift (NW_LMgr_Box_t* box, - NW_GDI_Point2D_t *delta); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -_NW_LMgr_PosFlowBox_Clone (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_PosFlowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_POSFLOWBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_propertylist.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_propertylist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_PROPERTYLIST_H -#define NW_LMGR_PROPERTYLIST_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_adt_types.h" -#include "NW_LMgr_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_PropertyList_Class_s NW_LMgr_PropertyList_Class_t; -typedef struct NW_LMgr_PropertyList_s NW_LMgr_PropertyList_t; - -/* ------------------------------------------------------------------------- * - value types - * ------------------------------------------------------------------------- */ -typedef NW_Uint8 NW_LMgr_PropertyValueType_t; -#define NW_CSS_ValueType_Integer (NW_Uint8)1 /* integer */ -#define NW_CSS_ValueType_Number (NW_Uint8)2 /* decimal */ -#define NW_CSS_ValueType_Px (NW_Uint8)3 /* integer */ -#define NW_CSS_ValueType_Em (NW_Uint8)4 /* decimal */ -#define NW_CSS_ValueType_Ex (NW_Uint8)5 /* decimal */ -#define NW_CSS_ValueType_In (NW_Uint8)6 /* decimal */ -#define NW_CSS_ValueType_Cm (NW_Uint8)7 /* decimal */ -#define NW_CSS_ValueType_Mm (NW_Uint8)8 /* decimal */ -#define NW_CSS_ValueType_Pt (NW_Uint8)9 /* decimal */ -#define NW_CSS_ValueType_Pc (NW_Uint8)10 /* decimal */ -#define NW_CSS_ValueType_Percentage (NW_Uint8)11 /* decimal */ -#define NW_CSS_ValueType_Token (NW_Uint8)12 /* integer */ -#define NW_CSS_ValueType_Color (NW_Uint8)13 /* integer */ -/* note that no NW_CSS_ValueType other than object derived types may have a - value greater than NW_CSS_ValueType_Object */ -#define NW_CSS_ValueType_Object (NW_Uint8)14 /* object */ -#define NW_CSS_ValueType_Text (NW_Uint8)15 /* object */ -#define NW_CSS_ValueType_Image (NW_Uint8)16 /* object */ -#define NW_CSS_ValueType_Font (NW_Uint8)17 /* object */ -#define NW_CSS_ValueType_Copy (NW_Uint8) 0x80 -//#define NW_CSS_ValueType_Mask (NW_Uint8) 0x7f -#define NW_CSS_ValueType_DefaultStyle (NW_Uint8) 0x40 -#define NW_CSS_ValueType_Mask (NW_Uint8) 0x3f - -/* ------------------------------------------------------------------------- * - pseudo classes - * ------------------------------------------------------------------------- */ -#define NW_CSS_Pseudo_None (NW_LMgr_PropertyName_t)0x0100 -#define NW_CSS_Pseudo_Link (NW_LMgr_PropertyName_t)0x0200 -#define NW_CSS_Pseudo_Visited (NW_LMgr_PropertyName_t)0x0400 -#define NW_CSS_Pseudo_Hover (NW_LMgr_PropertyName_t)0x0800 -#define NW_CSS_Pseudo_Active (NW_LMgr_PropertyName_t)0x1000 -#define NW_CSS_Pseudo_Focus (NW_LMgr_PropertyName_t)0x2000 -#define NW_CSS_Pseudo_FirstLine (NW_LMgr_PropertyName_t)0x4000 - -/* ------------------------------------------------------------------------- * - public types - * ------------------------------------------------------------------------- */ -typedef NW_Uint32 NW_LMgr_PropertyValueToken_t; -typedef NW_Uint16 NW_LMgr_PropertyName_t; - -typedef union NW_LMgr_PropertyValue_s { - NW_Int32 integer; - NW_LMgr_PropertyValueToken_t token; - NW_Float32 decimal; - NW_Object_t* object; -} NW_LMgr_PropertyValue_t; - -typedef struct NW_LMgr_PropertyList_Entry_s { - NW_LMgr_PropertyValue_t value; - NW_Uint8 type; -} NW_LMgr_PropertyList_Entry_t; - -typedef NW_LMgr_PropertyList_Entry_t NW_LMgr_Property_t; - -/* ------------------------------------------------------------------------- * - virtual method definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_LMgr_PropertyList_Get_t) (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry); - -typedef -TBrowserStatusCode -(*NW_LMgr_PropertyList_Set_t) (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - const NW_LMgr_PropertyList_Entry_t* entry); - -typedef -TBrowserStatusCode -(*NW_LMgr_PropertyList_Remove_t) (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key); - -typedef -NW_LMgr_PropertyList_t* -(*NW_LMgr_PropertyList_Clone_t) (const NW_LMgr_PropertyList_t* propertyList); - -typedef -TBrowserStatusCode -(*NW_LMgr_PropertyList_Clear_t) (NW_LMgr_PropertyList_t* propertyList) ; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_PropertyList_ClassPart_s { - NW_LMgr_PropertyList_Get_t get; - NW_LMgr_PropertyList_Set_t set; - NW_LMgr_PropertyList_Remove_t remove; - NW_LMgr_PropertyList_Clone_t clone; - NW_LMgr_PropertyList_Clear_t clear; -} NW_LMgr_PropertyList_ClassPart_t; - -struct NW_LMgr_PropertyList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_PropertyList_ClassPart_t NW_LMgr_PropertyList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_PropertyList_s { - NW_Object_Dynamic_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_PropertyList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_PropertyList)) - -#define NW_LMgr_PropertyListOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_PropertyList)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_PropertyList_Class_t NW_LMgr_PropertyList_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_PropertyList_GetSize(_object) \ - (NW_ADT_Vector_GetSize (NW_LMgr_PropertyListOf (_object)->list)) - -#define NW_LMgr_PropertyList_Get(_object, _key, _entry) \ - (NW_Object_Invoke (_object, NW_LMgr_PropertyList, get) \ - (NW_LMgr_PropertyListOf (_object), (_key), (_entry))) - -#define NW_LMgr_PropertyList_Set(_object, _key, _entry) \ - (NW_Object_Invoke (_object, NW_LMgr_PropertyList, set) \ - (NW_LMgr_PropertyListOf (_object), (_key), (_entry))) - -#define NW_LMgr_PropertyList_Remove(_object, _key) \ - (NW_Object_Invoke (_object, NW_LMgr_PropertyList, remove) \ - (NW_LMgr_PropertyListOf (_object), (_key))) - -#define NW_LMgr_PropertyList_Clone(_propertyList) \ - (NW_Object_Invoke (_propertyList, NW_LMgr_PropertyList, clone) \ - (NW_LMgr_PropertyListOf (_propertyList))) - -#define NW_LMgr_PropertyList_Clear(_object) \ - (NW_Object_Invoke (_object, NW_LMgr_PropertyList, clear) \ - (NW_LMgr_PropertyListOf (_object))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_PROPERTYLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_propertylisti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_propertylisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_PROPERTYLISTI_H -#define NW_LMGR_PROPERTYLISTI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_propertylist.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_PROPERTYLISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_rootbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_rootbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,332 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ROOTBOX_H -#define NW_LMGR_ROOTBOX_H - -#include "nw_lmgr_bidiflowbox.h" -#include "LMgrBoxTreeListener.h" -#include "nw_image_cannedimages.h" -#include "nw_system_timer.h" -#include "nw_hed_appservices.h" -#include "BrsrStatusCodes.h" - -#include "BoxRender.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* The origin in a Right to Left document*/ -#define RIGHT_ORIGIN (0x3FFF) - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_RootBox_Class_s NW_LMgr_RootBox_Class_t; -typedef enum NW_LMgr_RootBox_Rendering_State_e - { - NW_LMgr_RootBox_RenderUninitialized, - NW_LMgr_RootBox_RenderFirstChunk, - NW_LMgr_RootBox_RenderFurtherChunks, - NW_LMgr_RootBox_RenderComplete - } NW_LMgr_RootBox_Rendering_State_t; - -/* ------------------------------------------------------------------------- * - class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_RootBox_ClassPart_s { - void** unused; -} NW_LMgr_RootBox_ClassPart_t; - -struct NW_LMgr_RootBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_RootBox_ClassPart_t NW_LMgr_RootBox; -}; - -/* ------------------------------------------------------------------------- * - object structure - * ------------------------------------------------------------------------- */ -struct NW_LMgr_RootBox_s { - NW_LMgr_BidiFlowBox_t super; - - /* interfaces implemented */ - MBoxTreeListener* boxTreeListener; - - /* The tree extents (calculated during the first Render) */ - NW_GDI_Rectangle_t extents; - NW_Bool calculateExtents; - - /* This holds the real width of the content when it is right aligned */ - NW_GDI_Dimension2D_t scrollRange; - NW_Bool calculateScrollRange; - - /* We cache the boxes that are visible on-screen. */ - NW_ADT_DynamicVector_t *renderedBoxes; - NW_ADT_DynamicVector_t *renderedClips; - NW_Bool renderFromCache; - - /* The box currently in focus */ - NW_LMgr_Box_t *focusBox; - - /* global float vectors used for formatting */ - NW_ADT_DynamicVector_t *placedFloats; /* The floats we've already placed */ - NW_ADT_DynamicVector_t *pendingFloats; /* The pending floats */ - - NW_ADT_DynamicVector_t *positionedAbsObjects; /* The position: absolute objects */ - NW_Bool iPositionedBoxesPlaced; - - /* AppServices */ - NW_HED_AppServices_t *appServices; - - /* The blink vars */ - NW_System_Timer_t* blinkTimer; - NW_Int8 blinkCount; /* i-mode HTML Elements CUIS 28.0 limits blinks to 16 */ - #define NW_ISA_BLINK_LIMIT 16 - NW_Bool blinkState; - NW_Bool isBlinking; - - /* Is the box tree currently visible */ - NW_Bool hasFocus; - - /* Canned images dictionary */ - NW_Image_CannedImages_t* cannedImages; - - NW_LMgr_Box_t* body; - - NW_Int32 outstandingImageOpenings; - NW_Bool needsRelayout; - - /* Flag related to partial rendering: - * markup* are useful only when partialRender is true - */ - NW_Bool partialRender; - NW_LMgr_RootBox_Rendering_State_t renderingState; - - // cache settings to avoid Tls:: calls - NW_Bool iSmallScreenOn; - - NW_Bool iHasGridModeTables; - - // - NW_Bool iWrapEnabled; - // - NW_Int8 iIsPageRTL; - - // out of view listeners - NW_ADT_DynamicVector_t* iOutOfViewListeners; - NW_Int32 iYScrollChange; - -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_RootBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_RootBox)) - -#define NW_LMgr_RootBoxOf(object) \ - (NW_Object_Cast (object, NW_LMgr_RootBox)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_RootBox_Class_t NW_LMgr_RootBox_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_RootBox_GetBoxTreeListener(_rootBox) \ - (NW_LMgr_RootBoxOf (_rootBox)->boxTreeListener) - -#define NW_LMgr_RootBox_SetBoxTreeListener(_rootBox, _boxTreeListener) \ - ((NW_LMgr_RootBoxOf (_rootBox)->boxTreeListener = (_boxTreeListener)), \ - KBrsrSuccess) - -#define NW_LMgr_RootBox_HasFocus(_rootBox) \ - (_rootBox->hasFocus) - -#define NW_LMgr_RootBox_GainFocus(_rootBox) \ - ((_rootBox)->hasFocus = NW_TRUE) - -#define NW_LMgr_RootBox_LoseFocus(_rootBox) \ - ((_rootBox)->hasFocus = NW_FALSE) - -#define NW_LMgr_RootBox_GetAppServices(_rootBox) \ - ((_rootBox)->appServices) - -#define NW_LMgr_RootBox_SetBody(_rootBox, _bodyBox) \ - ((_rootBox)->body = _bodyBox) - -#define NW_LMgr_RootBox_GetBody(_rootBox) \ - ((_rootBox)->body) - -NW_LMGR_EXPORT -CGDIDeviceContext* -NW_LMgr_RootBox_GetDeviceContext (NW_LMgr_RootBox_t* rootBox); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_InvalidateCache(NW_LMgr_RootBox_t *rootBox); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_RootBox_GetCurrentBox (NW_LMgr_RootBox_t* rootBox); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_BoxTreeDestroyed (NW_LMgr_RootBox_t* rootBox); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_RootBox_Refresh(NW_LMgr_RootBox_t* thisObj, NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_RootBox_RedrawNeeded(NW_LMgr_RootBox_t* thisObj, NW_LMgr_Box_t* box); - - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_RootBox_GetExtents (NW_LMgr_RootBox_t* rootBox, - NW_GDI_Dimension2D_t* extents); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_RootBox_InitializeTree(NW_LMgr_RootBox_t *rootBox); - -NW_Bool NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBox_t *rootBox); - -TBrowserStatusCode NW_LMgr_RootBox_GetScrollRange(NW_LMgr_RootBox_t *rootBox, - NW_GDI_Dimension2D_t* scrollRange); - -NW_Int32 NW_LMgr_RootBox_GetRightLimit(NW_LMgr_RootBox_t* rootBox); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_ImageOpeningStarted( NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_ImageOpened( NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_SetNeedsRelayout( NW_LMgr_RootBox_t* rootBox ); - -NW_LMGR_EXPORT -void -NW_LMgr_RootBox_ExtendsCalculationNeeded (NW_LMgr_RootBox_t* rootBox); - -/** -* NW_LMgr_RootBox_SetFocusBox -* @description Sets the focus box for this root box. Used to keep context of the current -* box for a particular root box. -* @param aRootBox: this object -* @param aFocusBox: current active box for this root box -* @return: void -*/ -void -NW_LMgr_RootBox_SetFocusBox (NW_LMgr_RootBox_t* aRootBox, NW_LMgr_Box_t* aFocusBox); - -/** -* NW_LMgr_RootBox_GetFocusBox -* @description Called to retrieve the current active box associated with this -* root box -* @param aRootBox: this object -* @return: TBrowserStatusCode -*/ -NW_LMgr_Box_t* -NW_LMgr_RootBox_GetFocusBox (NW_LMgr_RootBox_t* aRootBox); - -/** -* NW_LMgr_RootBox_Copy -* @description Called to create a copy of a root box given as the first parameter -* @param aOldRootBox: this object you want to create a copy from -* @param aNewRootBox: pointer to a pointer to the newly created root box -* @return: TBrowserStatusCode -*/ -TBrowserStatusCode -NW_LMgr_RootBox_Copy (NW_LMgr_RootBox_t* aOldRootBox, NW_LMgr_RootBox_t** aNewRootBox); - -/** -* NW_LMgr_RootBox_SetSmallScreenOn -* @description Called to cache the small screen setting. By caching this settings, -* we can save a lot on formatting/rendering as we don't call Tls:: functions anymore. -* @param aRootBox: current rootbox -* @param aSmallScreenOn: smallscreen setting -* @return: void -*/ -void -NW_LMgr_RootBox_SetSmallScreenOn( NW_LMgr_RootBox_t* aRootBox, const NW_Bool aSmallScreenOn ); - -/** -* NW_LMgr_RootBox_SetWrapEnabled -* @description Called to cache the wrap enabled setting. By caching this settings, -* we can save a lot on formatting/rendering as we don't call Tls:: functions anymore. -* @param aRootBox: current rootbox -* @param aWrapEnabled: wrap enabled setting -* @return: void -*/ -void -NW_LMgr_RootBox_SetWrapEnabled( NW_LMgr_RootBox_t* aRootBox, const NW_Bool aWrapEnabled ); - -/** -* NW_LMgr_RootBox_GetSmallScreenOn -* @description Called to retrieve the cached small screen setting. -* @param aRootBox: current rootbox -* @return: NW_Bool -*/ -NW_Bool -NW_LMgr_RootBox_GetSmallScreenOn( NW_LMgr_RootBox_t* aRootBox ); - -/** -* NW_LMgr_RootBox_GetWrapEnabled -* @description Called to retrieve the cached wrap enabled setting. -* @param aRootBox: current rootbox -* @return: NW_Bool -*/ -NW_Bool -NW_LMgr_RootBox_GetWrapEnabled( NW_LMgr_RootBox_t* aRootBox ); - -void NW_LMgr_RootBox_OriginChanged( NW_LMgr_RootBox_t* aRootBox, - NW_GDI_Point2D_t* aOldOrigin ); - -TBrowserStatusCode -NW_LMgr_RootBox_AddToOutOfViewList( NW_LMgr_RootBox_t* aRootBox, - NW_Image_AbstractImage_t* aImage ); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_RootBox_t* -NW_LMgr_RootBox_New (NW_HED_AppServices_t* appServices); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ROOTBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_rootboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_rootboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_ROOTBOXI_H -#define NW_LMGR_ROOTBOXI_H - - - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_rootbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RootBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_RootBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RootBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_ROOTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_rulebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_rulebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_RULEBOX_H -#define NW_RULEBOX_H - -#include "nw_lmgr_mediabox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -#define NW_LMGR_RULEBOX_ALIGN_LEFT (NW_GDI_Metric_t)0 -#define NW_LMGR_RULEBOX_ALIGN_CENTER (NW_GDI_Metric_t)1 -#define NW_LMGR_RULEBOX_ALIGN_RIGHT (NW_GDI_Metric_t)2 - -#define NW_LMGR_RULEBOX_COLOR_DGRAY (NW_GDI_Color_t)0x555555 -#define NW_LMGR_RULEBOX_COLOR_LGRAY (NW_GDI_Color_t)0xbbbbbb -#define NW_LMGR_RULEBOX_COLOR_BLACK (NW_GDI_Color_t)0x000000 -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_RuleBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_RuleBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_RuleBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_RuleBox_ClassPart_t NW_LMgr_RuleBox; -} NW_LMgr_RuleBox_Class_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_RuleBox_s { - NW_LMgr_MediaBox_t super; -} NW_LMgr_RuleBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_RuleBox_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_RuleBox)) - -#define NW_LMgr_RuleBoxOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_RuleBox)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_RuleBox_Class_t NW_LMgr_RuleBox_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_RuleBox_t* -NW_LMgr_RuleBox_New (); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_RULEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_ruleboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_ruleboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_RULEBOXI_H -#define NW_RULEBOXI_H - -#include "nw_lmgr_mediaboxi.h" -#include "nw_lmgr_rulebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Rule box overrides */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RuleBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_RuleBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RuleBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RuleBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_RuleBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_RULEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_simplepropertylist.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_simplepropertylist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_SIMPLEPROPERTYLIST_H -#define NW_LMGR_SIMPLEPROPERTYLIST_H - -#ifndef __E32DEF_H__ -#ifdef NULL -#undef NULL -#endif -#include <e32def.h> -#endif - -#include "BrsrStatusCodes.h" -#include "nw_lmgr_propertylist.h" -#include "nw_adt_types.h" -#include "nw_adt_vector.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_SimplePropertyList_Class_s NW_LMgr_SimplePropertyList_Class_t; -typedef struct NW_LMgr_SimplePropertyList_s NW_LMgr_SimplePropertyList_t; - -/* ------------------------------------------------------------------------- * - virtual method definitions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_SimplePropertyList_ClassPart_s { - void** unused; -} NW_LMgr_SimplePropertyList_ClassPart_t; - -struct NW_LMgr_SimplePropertyList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_PropertyList_ClassPart_t NW_LMgr_PropertyList; - NW_LMgr_SimplePropertyList_ClassPart_t NW_LMgr_SimplePropertyList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_SimplePropertyList_s { - NW_LMgr_PropertyList_t super; - - /* member variables */ - void* map; - - // cached properties are not added to the property map - void** iCachedProperty; - - - /* backup property list */ - NW_LMgr_PropertyList_t* backupPropList; - /* DOM node associated with the List */ - NW_Object_t* domNode; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_SimplePropertyList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_SimplePropertyList)) - -#define NW_LMgr_SimplePropertyListOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_SimplePropertyList)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TInt -NW_LMgr_SimplePropertyList_Count (const NW_LMgr_SimplePropertyList_t* propertyList); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_SimplePropertyList_At (const NW_LMgr_SimplePropertyList_t* propertyList, - TInt index, - NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_SimplePropertyList_GetNameAt (const NW_LMgr_SimplePropertyList_t* thisObj, - TInt index, - NW_LMgr_PropertyName_t* name); - -TBrowserStatusCode -NW_LMgr_SimplePropertyList_CopyEntireList(NW_LMgr_SimplePropertyList_t* aOldPropList, - NW_LMgr_SimplePropertyList_t** aNewPropList); - -TBrowserStatusCode -NW_LMgr_SimplePropertyList_MapLookup( NW_LMgr_SimplePropertyList_t* thisObj, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry ); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_SimplePropertyList_RemoveWithoutDelete (NW_LMgr_SimplePropertyList_t* thisObj, - NW_LMgr_PropertyName_t key); - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_SimplePropertyList_Class_t NW_LMgr_SimplePropertyList_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_SimplePropertyList_t* -NW_LMgr_SimplePropertyList_New (NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_SIMPLEPROPERTYLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_simplepropertylisti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_simplepropertylisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_SIMPLEPROPERTYLISTI_H -#define NW_LMGR_SIMPLEPROPERTYLISTI_H - -#include "nw_lmgr_propertylisti.h" -#include "nw_lmgr_simplepropertylist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_SimplePropertyList_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Set (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - const NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key); - -NW_LMGR_EXPORT -NW_LMgr_PropertyList_t* -_NW_LMgr_SimplePropertyList_Clone (const NW_LMgr_PropertyList_t* propertyList); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Clear (NW_LMgr_PropertyList_t* propertyList); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Copy (const NW_LMgr_SimplePropertyList_t* source, - NW_LMgr_PropertyList_t* destination); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_SimplePropertyList_Copy(_source, _destination) \ - (_NW_LMgr_SimplePropertyList_Copy ( \ - NW_LMgr_SimplePropertyListOf (_source), NW_LMgr_PropertyListOf (_destination))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_SIMPLEPROPERTYLISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_slavepropertylist.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_slavepropertylist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_SLAVEPROPERTYLIST_H -#define NW_LMGR_SLAVEPROPERTYLIST_H - -#include "nw_lmgr_propertylist.h" -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_SlavePropertyList_Class_s NW_LMgr_SlavePropertyList_Class_t; -typedef struct NW_LMgr_SlavePropertyList_s NW_LMgr_SlavePropertyList_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_SlavePropertyList_ClassPart_s { - void** unused; -} NW_LMgr_SlavePropertyList_ClassPart_t; - -struct NW_LMgr_SlavePropertyList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_PropertyList_ClassPart_t NW_LMgr_PropertyList; - NW_LMgr_SlavePropertyList_ClassPart_t NW_LMgr_SlavePropertyList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_SlavePropertyList_s { - NW_LMgr_PropertyList_t super; - - /* member variables */ - NW_LMgr_Box_t* siblingBox; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_SlavePropertyList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_SlavePropertyList)) - -#define NW_LMgr_SlavePropertyListOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_SlavePropertyList)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_SlavePropertyList_Class_t NW_LMgr_SlavePropertyList_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_Box_t* -_NW_LMgr_SlavePropertyList_GetMasterBox (const NW_LMgr_SlavePropertyList_t* slavePropertyList); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_SlavePropertyList_GetSiblingBox(_object) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_Box_t*) NW_LMgr_SlavePropertyListOf (_object)->siblingBox) - -#define NW_LMgr_SlavePropertyList_GetMasterBox(_object) \ - (_NW_LMgr_SlavePropertyList_GetMasterBox (NW_LMgr_SlavePropertyListOf (_object))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_SlavePropertyList_GetFirstBox (const NW_LMgr_SlavePropertyList_t* thisObj); - -NW_LMGR_EXPORT -NW_LMgr_SlavePropertyList_t* -NW_LMgr_SlavePropertyList_New (NW_LMgr_Box_t* siblingBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_SLAVEPROPERTYLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_slavepropertylisti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_slavepropertylisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_SLAVEPROPERTYLISTI_H -#define NW_LMGR_SLAVEPROPERTYLISTI_H - -#include "nw_lmgr_propertylisti.h" -#include "nw_lmgr_slavepropertylist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Set (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - const NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key); - -NW_LMGR_EXPORT -NW_LMgr_PropertyList_t* -_NW_LMgr_SlavePropertyList_Clone (const NW_LMgr_PropertyList_t* source); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Clear (NW_LMgr_PropertyList_t* propertyList) ; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_SLAVEPROPERTYLISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_splittextbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_splittextbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_SPLITTEXTBOX_H -#define NW_SPLITTEXTBOX_H - -#include "nw_lmgr_abstracttextbox.h" -#include "NW_Text_Abstract.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Text boxes hold text content.*/ - -typedef struct NW_LMgr_SplitTextBox_ClassPart_s { - void** unused; -} NW_LMgr_SplitTextBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_SplitTextBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_AbstractTextBox_ClassPart_t NW_LMgr_AbstractTextBox; - NW_LMgr_SplitTextBox_ClassPart_t NW_LMgr_SplitTextBox; -} NW_LMgr_SplitTextBox_Class_t; - -/* ------------------------------------------------------------------------- */ - -typedef struct NW_LMgr_SplitTextBox_s { - NW_LMgr_AbstractTextBox_t super; - NW_LMgr_AbstractTextBox_t *prevBox; -} NW_LMgr_SplitTextBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_SplitTextBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_SplitTextBox)) - - -#define NW_LMgr_SplitTextBoxOf(_object) \ -((NW_LMgr_SplitTextBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_SplitTextBox_Class_t NW_LMgr_SplitTextBox_Class; - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_LMgr_SplitTextBox_t* -NW_LMgr_SplitTextBox_New (NW_LMgr_AbstractTextBox_t* textBox, - NW_Text_Length_t length); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_SPLITTEXTBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_splittextboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_splittextboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_SPLITTEXTBOXI_H -#define NW_SPLITTEXTBOXI_H - -#include "nw_lmgr_abstracttextboxi.h" -#include "nw_lmgr_splittextbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Text box overrides */ - -TBrowserStatusCode -_NW_LMgr_SplitTextBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -void -_NW_LMgr_SplitTextBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_Text_t* -_NW_LMgr_SplitTextBox_GetText (NW_LMgr_AbstractTextBox_t *box); - -NW_Text_Length_t -_NW_LMgr_SplitTextBox_GetStart (NW_LMgr_AbstractTextBox_t *box); - -NW_Text_Length_t -_NW_LMgr_SplitTextBox_GetLength (NW_LMgr_AbstractTextBox_t *box); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_SPLITTEXTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLEBOX_H -#define NW_STATICTABLEBOX_H - -#include "nw_lmgr_statictableboxi.h" -#include "nw_lmgr_formatbox.h" -#include "nw_lmgr_statictablecontext.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_StaticTableBox_DefaultCaptionWidth ((NW_GDI_Metric_t)40) -#define NW_LMgr_StaticTableBox_MinimumTableWidth ((NW_GDI_Metric_t)40) - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableBox_s NW_LMgr_StaticTableBox_t; - -typedef enum NW_LMgr_StaticTableBox_AutomaticWidth_PassTypes_e{ - NW_LMgr_StaticTableBox_AutomaticWidth_UndefinedPass, - // NW_LMgr_StaticTableBox_AutomaticWidth_MinimumPass, note: - // minimum pass is eliminated by some performance improvement - NW_LMgr_StaticTableBox_AutomaticWidth_MaximumPass, - NW_LMgr_StaticTableBox_AutomaticWidth_FinalPass - }NW_LMgr_StaticTableBox_AutomaticWidth_PassTypes_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_StaticTableBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_StaticTableBox_ClassPart_t NW_LMgr_StaticTableBox; -} NW_LMgr_StaticTableBox_Class_t; - -/* ------------------------------------------------------------------------- * - private types - * ------------------------------------------------------------------------- */ - -struct NW_LMgr_StaticTableBox_s { - NW_LMgr_FormatBox_t super; - NW_LMgr_StaticTableContext_t *ctx; - NW_LMgr_StaticTableBox_AutomaticWidth_PassTypes_t automaticWidthPass; - NW_Bool needsRelayout; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_StaticTableBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_StaticTableBox)) - - -#define NW_LMgr_StaticTableBoxOf(_object) \ -((NW_LMgr_StaticTableBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_StaticTableBox_GetContext(_table) \ - ((_table)->ctx) -#define NW_LMgr_StaticTableBox_GetRow(_table, _i) \ - (NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(_table), _i)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_StaticTableBox_Class_t NW_LMgr_StaticTableBox_Class; - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -void -NW_LMgr_StaticTableBox_SetAutomaticTableWidthPass( NW_LMgr_StaticTableBox_t* thisObj, - NW_LMgr_StaticTableBox_AutomaticWidth_PassTypes_t passType ); - -NW_LMGR_EXPORT -void -NW_LMgr_StaticTableBox_TableSizeChanged( NW_LMgr_StaticTableBox_t* thisObj ); - -NW_LMGR_EXPORT -void -NW_LMgr_StaticTableBox_UpdatesTableMinMaxWidth( NW_LMgr_StaticTableBox_t* thisObj ); - -NW_LMGR_EXPORT -NW_LMgr_StaticTableBox_t* -NW_LMgr_StaticTableBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictableboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictableboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLEBOXI_H -#define NW_STATICTABLEBOXI_H - -#include "nw_lmgr_formatboxi.h" -#include "nw_lmgr_statictablebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - - - -/* ------------------------------------------------------------------------- * - private macros - * ------------------------------------------------------------------------- */ -#define TABLE_CONTEXT_GET(_ctx, _col, _row) \ - ((_ctx)->cellBoxes[(_row) * ((_ctx)->numCols) + (_col)]) -#define TABLE_CONTEXT_SET(_ctx, _col, _row, _cell) \ - (((_ctx)->cellBoxes[(_row) * ((_ctx)->numCols) + (_col)]) = (_cell)) - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_StaticTableBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Resize(NW_LMgr_Box_t* tableBox, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableBox_PostResize(NW_LMgr_Box_t* tableBox); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLEBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecellbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecellbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLECELLBOX_H -#define NW_STATICTABLECELLBOX_H - -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_statictablebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -typedef struct NW_LMgr_StaticTableCellBox_s NW_LMgr_StaticTableCellBox_t; - -typedef struct NW_LMgr_StaticTableCellBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_StaticTableCellBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableCellBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_StaticTableCellBox_ClassPart_t NW_LMgr_StaticTableCellBox; -} NW_LMgr_StaticTableCellBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_StaticTableCellBox_s { - NW_LMgr_BidiFlowBox_t super; - - /* member variables */ - NW_GDI_Metric_t minWidth; - NW_GDI_Metric_t maxWidth; - NW_GDI_Rectangle_t cellClip; - -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_StaticTableCellBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_StaticTableCellBox)) - - -#define NW_LMgr_StaticTableCellBoxOf(_object) \ -((NW_LMgr_StaticTableCellBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_StaticTableCellBox_Class_t NW_LMgr_StaticTableCellBox_Class; - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -void -NW_LMgr_StaticTableCellBox_GetPadding(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_LMgr_FrameInfo_t *paddingInfo); -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_CalculateBorders(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_Uint16 currentCol, NW_Uint16 currentRow, - NW_Uint16 colSpan, NW_Uint16 rowSpan, - NW_LMgr_StaticTableBorderEdge_t *leftEdge, - NW_LMgr_StaticTableBorderEdge_t *rightEdge, - NW_LMgr_StaticTableBorderEdge_t *topEdge, - NW_LMgr_StaticTableBorderEdge_t *bottomEdge); -NW_LMGR_EXPORT -void -NW_LMgr_StaticTableCellBox_GetBackground(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_LMgr_Property_t *backgroundProp); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_DrawCell(NW_LMgr_StaticTableCellBox_t *thisObj, - CGDIDeviceContext *deviceContext, - NW_Bool hasFocus, - NW_GDI_Rectangle_t *viewBounds, - NW_GDI_Rectangle_t *clipRect); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_Stretch (NW_LMgr_StaticTableCellBox_t *thisObj, - NW_GDI_Rectangle_t *newRect); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_GetMinimumCellSize(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_GDI_Dimension2D_t *minSize); -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_StaticTableCellBox_GetMaxWidth( _cellBox ) \ - ((_cellBox)->maxWidth) -#define NW_LMgr_StaticTableCellBox_SetMaxWidth( _cellBox, _maxWidth ) \ - ((_cellBox)->maxWidth = (_maxWidth)) -#define NW_LMgr_StaticTableCellBox_GetMinWidth( _cellBox ) \ - ((_cellBox)->minWidth) -#define NW_LMgr_StaticTableCellBox_SetMinWidth( _cellBox, _minWidth ) \ - ((_cellBox)->minWidth = (_minWidth)) - - -NW_LMGR_EXPORT -NW_LMgr_StaticTableCellBox_t* -NW_LMgr_StaticTableCellBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLECELLBOX_H */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecellboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecellboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLECELLBOXI_H -#define NW_STATICTABLECELLBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_statictablecellbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_StaticTableCellBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_PostResize(NW_LMgr_Box_t* box); - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Float(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_NewLine(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLECELLBOXI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecontext.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecontext.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_STATICTABLECONTEXT_H -#define NW_LMGR_STATICTABLECONTEXT_H - -#include "nw_object_dynamic.h" -#include "nw_lmgr_box.h" -#include "nw_adt_resizablevector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableContext_Class_s NW_LMgr_StaticTableContext_Class_t; -typedef struct NW_LMgr_StaticTableContext_s NW_LMgr_StaticTableContext_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableContext_ClassPart_s { - void** unused; -} NW_LMgr_StaticTableContext_ClassPart_t; - -struct NW_LMgr_StaticTableContext_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_StaticTableContext_ClassPart_t NW_LMgr_StaticTableContext; -}; - -/* ------------------------------------------------------------------------- */ -typedef enum NW_LMgr_StaticTableBorderSide_e{ - left = 0, - right, - top, - bottom -} NW_LMgr_StaticTableBorderSide_t; - -typedef struct NW_LMgr_StaticTableBorderEdge_s { - NW_Int32 width; - NW_Int32 style; - NW_Int32 color; -} NW_LMgr_StaticTableBorderEdge_t; - -#define NW_LMGR_STATICTABLECONTEXT_CMPEDGE(e1, e2) \ - ((e1.width == e2.width) && (e1.style == e2.style) && (e1.color == e2.color)) - -/* ------------------------------------------------------------------------- */ - -/* The NW_LMgr_StaticTableMapEntry_t corresponds to the following - * bit field: - -union NW_LMgr_StaticTableMapEntry_u { - - struct { - unsigned py : 9; - unsigned px : 9; - unsigned colSpan : 7; - unsigned rowSpan : 7; - } data; - - NW_Uint32 hash; -}; - -*/ - -#define NW_LMGR_STATICTABLESPANENTRY_GETPY(_hash) \ - (NW_Uint16)(((NW_Uint32)(0xff800000) & (_hash)) >> 23) -#define NW_LMGR_STATICTABLESPANENTRY_GETPX(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x007fc000) & (_hash)) >> 14) -#define NW_LMGR_STATICTABLESPANENTRY_GETROWSPAN(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x00003f80) & (_hash)) >> 7) -#define NW_LMGR_STATICTABLESPANENTRY_GETCOLSPAN(_hash) \ - (NW_Uint16)((NW_Uint32)(0x0000007f) & (_hash)) - -#define NW_LMGR_STATICTABLESPANENTRY_INITIALIZE(_hash, _px, _py, _colSpan, _rowSpan) \ - ((_hash) = ((0x1ff & (_py)) << 23) | ((0x1ff & (_px)) << 14) \ - | ((0x7f & (_rowSpan)) << 7) | (0x7f & (_colSpan))) - -/* This is the BorderInfo structure that is used to store a calculated border - * setting. It is referenced by the StaticTableBorderEntry structure above. - */ -typedef struct NW_LMgr_StaticTableBorderInfo_s NW_LMgr_StaticTableBorderInfo_t; - -struct NW_LMgr_StaticTableBorderInfo_s { - NW_LMgr_StaticTableBorderEdge_t edge; - NW_Uint16 count; -}; - - -/* ------------------------------------------------------------------------- */ -#define NW_LMGR_STATICTABLEHEDGEENTRY_GETPY(_hash) \ - (NW_Uint16)(((NW_Uint32)(0xff800000) & (_hash)) >> 23) -#define NW_LMGR_STATICTABLEHEDGEENTRY_GETPX1(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x007fc000) & (_hash)) >> 14) -#define NW_LMGR_STATICTABLEHEDGEENTRY_GETPX2(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x00003fe0) & (_hash)) >> 5) -#define NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(_hash) \ - (NW_Uint16)((NW_Uint32)(0x0000001f) & (_hash)) -#define NW_LMGR_STATICTABLEHEDGEENTRY_SETPX2(_hash, _px2) \ - (_hash = ((_hash & 0xffffc01f) | (((_px2) & 0x1ff) << 5))) - -#define NW_LMGR_STATICTABLEHEDGEENTRY_INITIALIZE(_hash, _py, _px1, _px2, _info) \ - ((_hash) = ((0x1ff & (_py)) << 23) | ((0x1ff & (_px1)) << 14) \ - | ((0x1ff & (_px2)) << 5) | (0x1f & (_info))) - -#define NW_LMGR_STATICTABLEVEDGEENTRY_GETPX(_hash) \ - (NW_Uint16)(((NW_Uint32)(0xff800000) & (_hash)) >> 23) -#define NW_LMGR_STATICTABLEVEDGEENTRY_GETPY1(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x007fc000) & (_hash)) >> 14) -#define NW_LMGR_STATICTABLEVEDGEENTRY_GETPY2(_hash) \ - (NW_Uint16)(((NW_Uint32)(0x00003fe0) & (_hash)) >> 5) -#define NW_LMGR_STATICTABLEVEDGEENTRY_GETINFO(_hash) \ - (NW_Uint16)((NW_Uint32)(0x0000001f) & (_hash)) -#define NW_LMGR_STATICTABLEVEDGEENTRY_SETPY2(_hash, _py2) \ - (_hash = ((_hash & (NW_Uint32)(0xffffc01f)) | (((_py2) & 0x1ff) << 5))) - -#define NW_LMGR_STATICTABLEVEDGEENTRY_INITIALIZE(_hash, _px, _py1, _py2, _info) \ - ((_hash) = ((0x1ff & (_px)) << 23) | ((0x1ff & (_py1)) << 14) \ - | ((0x1ff & (_py2)) << 5) | (0x1f & (_info))) - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_StaticTableContext_s { - - /* Base class */ - NW_Object_Dynamic_t super; - - /* The dimensions of the table */ - NW_ADT_Vector_Metric_t numRows, numCols; - - /* Convenience pointers */ - NW_LMgr_Box_t *tableBox; - - /* Grid mode */ - NW_Int32 gridModeImageCount; - - /* Table map */ - NW_ADT_ResizableVector_t *spans; - NW_ADT_ResizableVector_t *borderInfos; - NW_ADT_ResizableVector_t *horizontalEdges; - NW_ADT_ResizableVector_t *verticalEdges; - NW_Uint16 defaultInfo; - - /* Temporary format vars */ - NW_GDI_Metric_t y; - NW_GDI_Metric_t leftMargin; - NW_GDI_Metric_t contentHeight; - NW_GDI_Metric_t* colConstraints; - - NW_GDI_Metric_t tableMinWidth; - NW_GDI_Metric_t tableMaxWidth; - - - -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_StaticTableContext_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_StaticTableContext)) - -#define NW_LMgr_StaticTableContextOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_StaticTableContext)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_StaticTableContext_Class_t NW_LMgr_StaticTableContext_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_Initialize (NW_LMgr_StaticTableContext_t* thisObj, - NW_LMgr_Box_t* tableBox); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_Cleanup (NW_LMgr_StaticTableContext_t* thisObj); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_LxLyToPxPy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 lx, NW_Uint16 ly, - NW_Uint16 *px, NW_Uint16 *py, - NW_Uint16 *colSpan, NW_Uint16 *rowSpan); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_PxPyToLxLy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_Uint16 *lx, NW_Uint16 *ly); - -#define NW_LMgr_StaticTableContext_GetCellPxPyFromLxLy(_thisObj, _lx, _ly, _px, _py, _colSpan, _rowSpan) \ - NW_LMgr_StaticTableContext_LxLyToPxPy(_thisObj, _lx, _ly, _px, _py, _colSpan, _rowSpan) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_LMgr_Box_t** cellBox); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellPxPyAndSpansFromPtr(NW_LMgr_StaticTableContext_t *thisObj, - NW_LMgr_Box_t* cellBox, - NW_Uint16 *px, NW_Uint16 *py, - NW_Uint16 *colSpan, NW_Uint16 *rowSpan); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellBordersFromPtr( - NW_LMgr_StaticTableContext_t *thisObj, - NW_LMgr_Box_t *cellBox, - NW_LMgr_FrameInfo_t *widthInfo, - NW_LMgr_FrameInfo_t *styleInfo, - NW_LMgr_FrameInfo_t *colorInfo); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindConstraints (NW_LMgr_StaticTableContext_t* thisObj, NW_Bool automaticAlgorithm ); - -/* ------------------------------------------------------------------------- * - accessor methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_StaticTableContext_GetNumCols(_ctx) \ - ((_ctx)->numCols) -#define NW_LMgr_StaticTableContext_SetNumCols(_ctx, _numCols) \ - ((_ctx)->numCols = (_numCols)) -#define NW_LMgr_StaticTableContext_GetNumRows(_ctx) \ - ((_ctx)->numRows) -#define NW_LMgr_StaticTableContext_SetNumRows(_ctx, _numRows) \ - ((_ctx)->numRows = (_numRows)) -#define NW_LMgr_StaticTableContext_GetColConstraint(_ctx, _col) \ - ((_ctx)->colConstraints[_col]) -#define NW_LMgr_StaticTableContext_SetColConstraint(_ctx, _col, _val) \ - ((_ctx)->colConstraints[_col] = (_val)) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -NW_LMgr_StaticTableContext_t* -NW_LMgr_StaticTableContext_New (); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOXVISITOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecontexti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablecontexti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_STATICTABLECONTEXTI_H -#define NW_LMGR_STATICTABLECONTEXTI_H - -#include "nw_object_dynamici.h" -#include "nw_lmgr_statictablecontext.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT -void -_NW_LMgr_StaticTableContext_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_BOXVISITORI_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablerowbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablerowbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLEROWBOX_H -#define NW_STATICTABLEROWBOX_H - -#include "nw_lmgr_formatbox.h" -#include "nw_lmgr_statictablebox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* LR Flow boxes manage left-to-right flows */ - -typedef struct NW_LMgr_StaticTableRowBox_s NW_LMgr_StaticTableRowBox_t; - -typedef struct NW_LMgr_StaticTableRowBox_ClassPart_s { - void** unused; /* empty class part */ -} NW_LMgr_StaticTableRowBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_StaticTableRowBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_StaticTableRowBox_ClassPart_t NW_LMgr_StaticTableRowBox; -} NW_LMgr_StaticTableRowBox_Class_t; - -/* ------------------------------------------------------------------------- */ -struct NW_LMgr_StaticTableRowBox_s { - NW_LMgr_FormatBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_StaticTableRowBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_StaticTableRowBox)) - - -#define NW_LMgr_StaticTableRowBoxOf(_object) \ -((NW_LMgr_StaticTableRowBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_StaticTableRowBox_Class_t NW_LMgr_StaticTableRowBox_Class; - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ - -#define NW_LMgr_StaticTableRowBox_GetContext(_rowBox) \ - (NW_LMgr_StaticTableBoxOf( \ - NW_LMgr_BoxOf(NW_LMgr_BoxOf(_rowBox)->parent)->parent)->ctx) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableRowBox_ConstrainRow (NW_LMgr_StaticTableRowBox_t* rowBox); - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableRowBox_ResizeRow (NW_LMgr_StaticTableRowBox_t* rowBox); -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_StaticTableRowBox_PlaceRow (NW_LMgr_StaticTableRowBox_t* rowBox, - NW_GDI_Metric_t atX, NW_GDI_Metric_t atY); -NW_LMGR_EXPORT -NW_LMgr_StaticTableRowBox_t* -NW_LMgr_StaticTableRowBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLEROWBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablerowboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_statictablerowboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_STATICTABLEROWBOXI_H -#define NW_STATICTABLEROWBOXI_H - -#include "nw_lmgr_formatbox.h" -#include "nw_lmgr_formatboxi.h" -#include "nw_lmgr_statictablerowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -void -_NW_LMgr_StaticTableRowBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -NW_GDI_Metric_t -_NW_LMgr_StaticTableRowBox_GetBaseline(NW_LMgr_Box_t* rowBox); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_PostResizeRow (NW_LMgr_Box_t* box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_ResizeRow (NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context); - - - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext *deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ); -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_STATICTABLEROWBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_textbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_textbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXTBOX_H -#define NW_TEXTBOX_H - -#include "nw_lmgr_abstracttextbox.h" -#include "NW_Text_Abstract.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Text boxes hold text content.*/ - -typedef struct NW_LMgr_TextBox_ClassPart_s { - void** unused; -} NW_LMgr_TextBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_TextBox_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_MediaBox_ClassPart_t NW_LMgr_MediaBox; - NW_LMgr_AbstractTextBox_ClassPart_t NW_LMgr_AbstractTextBox; - NW_LMgr_TextBox_ClassPart_t NW_LMgr_TextBox; -} NW_LMgr_TextBox_Class_t; - -/* ------------------------------------------------------------------------- */ - -typedef struct NW_LMgr_TextBox_s { - NW_LMgr_AbstractTextBox_t super; - NW_Text_t *text; -} NW_LMgr_TextBox_t; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_TextBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_TextBox)) - - -#define NW_LMgr_TextBoxOf(_object) \ -((NW_LMgr_TextBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_TextBox_Class_t NW_LMgr_TextBox_Class; - -/* ------------------------------------------------------------------------- */ -#define NW_LMgr_TextBox_SetText(_object, _text)\ - ((_object)->text = (_text)) - -#define NW_LMgr_TextBox_GetText(_object)\ - ((_object)->text) - -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_TextBox_Collapse (NW_LMgr_TextBox_t* thisObj); -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_TextBox_t* -NW_LMgr_TextBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_Text_t* text); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXTBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_textboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_textboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXTBOXI_H -#define NW_TEXTBOXI_H - -#include "nw_lmgr_abstracttextboxi.h" -#include "nw_lmgr_textbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Text box overrides */ - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TextBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); -NW_LMGR_EXPORT -void -_NW_LMgr_TextBox_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_LMGR_EXPORT -NW_Text_t* -_NW_LMgr_TextBox_GetText (NW_LMgr_AbstractTextBox_t *box); - -NW_LMGR_EXPORT -NW_Text_Length_t -_NW_LMgr_TextBox_GetStart (NW_LMgr_AbstractTextBox_t *box); - -NW_LMGR_EXPORT -NW_Text_Length_t -_NW_LMgr_TextBox_GetLength (NW_LMgr_AbstractTextBox_t *box); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TextBox_ConserveLeadingWS(NW_LMgr_Box_t* box, NW_Bool conserveWS); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXTBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_textutils.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_textutils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXTUTILS_H -#define NW_TEXTUTILS_H - -#include "nw_text_ucs2.h" -#include "nw_gdi_types.h" -#include "BrsrTypes.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Constants */ - -#define NW_LMgr_Text_Flags_SplitAtSpace 0x01 -#define NW_LMgr_Text_Flags_SplitAtHyphen 0x02 -#define NW_LMgr_Text_Flags_SplitAtNewline 0x04 -#define NW_LMgr_Text_Flags_SplitCompressed 0x08 -#define NW_LMgr_Text_Flags_WordWrap 0x10 -#define NW_LMgr_Text_Flags_Truncate 0x20 - -/* Function prototypes */ - -NW_Text_UCS2_t* -NW_LMgr_Text_GetDisplayText (NW_Text_t* text, NW_Bool compressWS); - -TBrowserStatusCode -NW_LMgr_Text_DrawText(NW_GDI_Point2D_t *point, - NW_Text_t *text, - NW_Bool compressWS, - CGDIDeviceContext *deviceContext, NW_Uint16 flag); - -TBrowserStatusCode -NW_LMgr_Text_SplitUnder(NW_Text_t *text, - NW_GDI_Metric_t space, - NW_Text_t* *split, - NW_Uint8 flags, - CGDIDeviceContext* deviceContext); - -TBrowserStatusCode -NW_LMgr_Text_SplitExact(NW_Text_t *text, - NW_GDI_Metric_t space, - NW_Text_t **split, - NW_Uint8 flags, - CGDIDeviceContext* deviceContext); - -TBrowserStatusCode -NW_LMgr_Text_SplitAt(NW_Text_t *text, - NW_Text_t **split, - NW_Uint8 flags); - -TBrowserStatusCode -NW_LMgr_Text_GetSubstringExtent(NW_Text_t *text, - NW_Text_Length_t index, - NW_Bool compressWS, - NW_GDI_Dimension2D_t *extent, - CGDIDeviceContext *deviceContext); - -TBrowserStatusCode -NW_LMgr_Text_GetExtent(NW_Text_t *text, - NW_Bool compressWS, - NW_GDI_Dimension2D_t *extent, - CGDIDeviceContext *deviceContext); - -TBrowserStatusCode -NW_LMgr_Text_SplitAtNewLine (NW_Text_t *text, - NW_GDI_Metric_t space, - NW_Text_t **split, - CGDIDeviceContext* deviceContext); - -NW_Text_t* -NW_LMgr_Text_NonprintableToSpace (NW_Text_t* text); - -TBrowserStatusCode -NW_LMgr_Text_BreakText(NW_Text_t *text, - NW_Text_t *trunctStr, - NW_GDI_Metric_t space, - NW_Uint8 flags, - CGDIDeviceContext *deviceContext, - NW_Text_Length_t *length); -NW_Bool -NW_LMgr_Text_CanSplit(NW_Ucs2 ch, NW_Uint8 flags); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXTUTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_transientpropertylist.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_transientpropertylist.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_TRANSIENTPROPERTYLIST_H -#define NW_LMGR_TRANSIENTPROPERTYLIST_H - -#include "nw_lmgr_simplepropertylisti.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_TransientPropertyList_Class_s NW_LMgr_TransientPropertyList_Class_t; -typedef struct NW_LMgr_TransientPropertyList_s NW_LMgr_TransientPropertyList_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_TransientPropertyList_ClassPart_s { - void** unused; -} NW_LMgr_TransientPropertyList_ClassPart_t; - -struct NW_LMgr_TransientPropertyList_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_PropertyList_ClassPart_t NW_LMgr_PropertyList; - NW_LMgr_SimplePropertyList_ClassPart_t NW_LMgr_SimplePropertyList; - NW_LMgr_TransientPropertyList_ClassPart_t NW_LMgr_TransientPropertyList; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_LMgr_TransientPropertyList_s { - NW_LMgr_SimplePropertyList_t super; - - /* member variables */ - NW_LMgr_PropertyList_t* basePropertyList; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_LMgr_TransientPropertyList_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_LMgr_TransientPropertyList)) - -#define NW_LMgr_TransientPropertyListOf(_object) \ - (NW_Object_Cast (_object, NW_LMgr_TransientPropertyList)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT const NW_LMgr_TransientPropertyList_Class_t NW_LMgr_TransientPropertyList_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_LMgr_TransientPropertyList_GetBasePropertyList(_object) \ - (NW_OBJECT_CONSTCAST(NW_LMgr_PropertyList_t*) \ - NW_LMgr_TransientPropertyListOf (_object)->basePropertyList) - -#define NW_LMgr_TransientPropertyList_Get(_object, _key, _entry) \ - (_NW_LMgr_SimplePropertyList_Get ( \ - NW_LMgr_SimplePropertyListOf (_object), (_key), (_entry))) - -#define NW_LMgr_TransientPropertyList_Set(_object, _key, _entry) \ - (_NW_LMgr_SimplePropertyList_Set ( \ - NW_LMgr_SimplePropertyListOf (_object), (_key), (_entry))) - -#define NW_LMgr_TransientPropertyList_Remove(_object, _key) \ - (_NW_LMgr_SimplePropertyList_Remove ( \ - NW_LMgr_SimplePropertyListOf (_object), (_key))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -NW_LMgr_TransientPropertyList_t* -NW_LMgr_TransientPropertyList_New (NW_Uint16 capacity, - NW_Uint16 increment, - NW_LMgr_PropertyList_t* basePropertyList); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_TRANSIENTPROPERTYLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_transientpropertylisti.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_transientpropertylisti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_TRANSIENTPROPERTYLISTI_H -#define NW_LMGR_TRANSIENTPROPERTYLISTI_H - -#include "nw_lmgr_simplepropertylisti.h" -#include "nw_lmgr_transientpropertylist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key); - -NW_LMGR_EXPORT -NW_LMgr_PropertyList_t* -_NW_LMgr_TransientPropertyList_Clone (const NW_LMgr_PropertyList_t* propertyList); - -NW_LMGR_EXPORT -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Clear (NW_LMgr_PropertyList_t* propertyList) ; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_TRANSIENTPROPERTYLISTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablebox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablebox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLEBOX_H -#define NW_LMGR_VERTICALTABLEBOX_H - -#include "nw_lmgr_bidiflowbox.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableBox_s NW_LMgr_VerticalTableBox_t; - -typedef struct NW_LMgr_VerticalTableBox_ClassPart_s -{ - void** unused; /* empty class part */ -} NW_LMgr_VerticalTableBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableBox_Class_s -{ - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_VerticalTableBox_ClassPart_t NW_LMgr_VerticalTableBox; -} NW_LMgr_VerticalTableBox_Class_t; - -struct NW_LMgr_VerticalTableBox_s -{ - NW_LMgr_BidiFlowBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_VerticalTableBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_VerticalTableBox)) - -#define NW_LMgr_VerticalTableBoxOf(_object) \ -((NW_LMgr_VerticalTableBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_VerticalTableBox_Class_t NW_LMgr_VerticalTableBox_Class; - -NW_LMGR_EXPORT -NW_LMgr_VerticalTableBox_t* -NW_LMgr_VerticalTableBox_New (NW_ADT_Vector_Metric_t numProperties); - -NW_LMGR_EXPORT -NW_LMgr_Box_t* -NW_LMgr_VerticalTableBox_SwitchBox (NW_LMgr_Box_t* box); - -/* specialProperty value is meant to reflect that it is handled differently for - Vertical layout */ -NW_LMGR_EXPORT -TBrowserStatusCode -NW_LMgr_VerticalTableBox_GetPropertyFromList(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property, - NW_Bool* specialProperty); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltableboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltableboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLEBOXI_H -#define NW_LMGR_VERTICALTABLEBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_verticaltablebox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLEBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablecellbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablecellbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLECELLBOX_H -#define NW_LMGR_VERTICALTABLECELLBOX_H - -#include "nw_lmgr_verticaltablebox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableCellBox_s NW_LMgr_VerticalTableCellBox_t; - -typedef struct NW_LMgr_VerticalTableCellBox_ClassPart_s -{ - void** unused; /* empty class part */ -} NW_LMgr_VerticalTableCellBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableCellBox_Class_s -{ - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_VerticalTableCellBox_ClassPart_t NW_LMgr_VerticalTableCellBox; -} NW_LMgr_VerticalTableCellBox_Class_t; - -struct NW_LMgr_VerticalTableCellBox_s -{ - NW_LMgr_BidiFlowBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_VerticalTableCellBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_VerticalTableCellBox)) - -#define NW_LMgr_VerticalTableCellBoxOf(_object) \ -((NW_LMgr_VerticalTableCellBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_VerticalTableCellBox_Class_t NW_LMgr_VerticalTableCellBox_Class; - -NW_LMGR_EXPORT -NW_LMgr_VerticalTableCellBox_t* -NW_LMgr_VerticalTableCellBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLECELLBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablecellboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablecellboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLECELLBOXI_H -#define NW_LMGR_VERTICALTABLECELLBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_verticaltablecellbox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLECELLBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablerowbox.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablerowbox.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLEROWBOX_H -#define NW_LMGR_VERTICALTABLEROWBOX_H - -#include "nw_lmgr_bidiflowbox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableRowBox_s NW_LMgr_VerticalTableRowBox_t; - -typedef struct NW_LMgr_VerticalTableRowBox_ClassPart_s -{ - void** unused; /* empty class part */ -} NW_LMgr_VerticalTableRowBox_ClassPart_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_LMgr_VerticalTableRowBox_Class_s -{ - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_Box_ClassPart_t NW_LMgr_Box; - NW_LMgr_ContainerBox_ClassPart_t NW_LMgr_ContainerBox; - NW_LMgr_FormatBox_ClassPart_t NW_LMgr_FormatBox; - NW_LMgr_FlowBox_ClassPart_t NW_LMgr_FlowBox; - NW_LMgr_BidiFlowBox_ClassPart_t NW_LMgr_BidiFlowBox; - NW_LMgr_VerticalTableRowBox_ClassPart_t NW_LMgr_VerticalTableRowBox; -} NW_LMgr_VerticalTableRowBox_Class_t; - -struct NW_LMgr_VerticalTableRowBox_s -{ - NW_LMgr_BidiFlowBox_t super; -}; - -/* ------------------------------------------------------------------------- */ - -#define NW_LMgr_VerticalTableRowBox_GetClassPart(_object) \ -(NW_Object_GetClassPart(_object, NW_LMgr_VerticalTableRowBox)) - -#define NW_LMgr_VerticalTableRowBoxOf(_object) \ -((NW_LMgr_VerticalTableRowBox_t*) (_object)) - -/* ------------------------------------------------------------------------- */ - -NW_LMGR_EXPORT const NW_LMgr_VerticalTableRowBox_Class_t NW_LMgr_VerticalTableRowBox_Class; - -NW_LMGR_EXPORT -NW_LMgr_VerticalTableRowBox_t* -NW_LMgr_VerticalTableRowBox_New (NW_ADT_Vector_Metric_t numProperties); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLEROWBOX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablerowboxi.h --- a/webengine/wmlengine/src/lmgr/include/nw_lmgr_verticaltablerowboxi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LMGR_VERTICALTABLEROWBOXI_H -#define NW_LMGR_VERTICALTABLEROWBOXI_H - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_verticaltablerowbox.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_VERTICALTABLEROWBOXI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_sound.h --- a/webengine/wmlengine/src/lmgr/include/nw_sound.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines soundstart and background sound types. -* -*/ - - - -#ifndef NW_SOUND_H -#define NW_SOUND_H - -// INCLUDES -#include "BrsrTypes.h" -#include "nwx_defs.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// Soundstart types. Soundstart is a customer proprietary feature of anchor tags. -// Example: -// <a href="some_url" soundstart=select|focus src="soundstart_url" volume=high|middle|low loop=N|infinite> -typedef enum - { - ESoundstartActionOnSelect, - ESoundstartActionOnFocus, - } TSoundstartAction; - -typedef enum - { - ESoundstartVolumeCurrent = 0, // means use current device volume setting - ESoundstartVolumeHigh, - ESoundstartVolumeMiddle, - ESoundstartVolumeLow, - } TSoundstartVolume; - -typedef struct - { - TSoundstartAction action; - NW_Int16 loop; - TSoundstartVolume volume; - NW_Ucs2* url; - } TSoundstartState; - - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/include/nw_sound_contenthandler.h --- a/webengine/wmlengine/src/lmgr/include/nw_sound_contenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines OOC class structures and public method prototypes. -* -*/ - - - -#ifndef NW_SOUND_CONTENTHANDLER_H -#define NW_SOUND_CONTENTHANDLER_H - -// INCLUDES -#include <e32std.h> -#include <nw_dom_node.h> -#include "nw_hed_contenthandler.h" -#include "nw_hed_documentnode.h" -#include "nw_object_base.h" -#include "nw_object_core.h" -#include "nw_object_dynamic.h" -#include "nw_object_object.h" -#include "nw_sound.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -typedef struct NW_Sound_ContentHandler_Class_s NW_Sound_ContentHandler_Class_t; -typedef struct NW_Sound_ContentHandler_s NW_Sound_ContentHandler_t; -class CPluginInst; - -// CLASS DECLARATION - - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - OOC class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Sound_ContentHandler_ClassPart_s - { - void** unused; - } NW_Sound_ContentHandler_ClassPart_t; - -struct NW_Sound_ContentHandler_Class_s - { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_Sound_ContentHandler_ClassPart_t NW_Sound_ContentHandler; - }; - -/* ------------------------------------------------------------------------- * - OOC object declaration - * ------------------------------------------------------------------------- */ -struct NW_Sound_ContentHandler_s - { - NW_HED_ContentHandler_t super; - - // Flag indicating if the content is currently playing. - NW_Bool iContentPlaying; - - // Flag indicating whether or not the content is fully downloaded and ready - // to be played. Also set to false if after the content is ready, it is - // deemed invalid. - NW_Bool iContentReady; - - // Mime type of this content in two different formats - ASCII & UCS2. - HBufC8* iContentTypeAscii8; - HBufC* iContentTypeUcs2; - - // Flag indicating whether or not the content is valid. - NW_Bool iContentValidated; - - // DOM element node for the anchor link that specified this sound content. - // It is used to establish the link between this content handler and the - // active container box for the anchor link. - NW_DOM_ElementNode_t* iElementNode; - - // Plugin for sound. - CPluginInst* iPluginInst; - - // URL for the sound content. - NW_Ucs2* iRequestUrl; - HBufC* iResponseUri; - - // How many active container box set this as SoundCH - NW_Int16 iBoxRefCnt; - }; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Sound_ContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Sound_ContentHandler)) - -#define NW_Sound_ContentHandlerOf(_object) \ - (NW_Object_Cast ((_object), NW_Sound_ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Sound_ContentHandler_Class_t NW_Sound_ContentHandler_Class; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/** -* Starts playing the sound. -* @since 3.0 -* @param aSoundCH ptr to the sound content handler that contains the sound -* to be played. The sound content handler has an API for playing the -* sound and it will be invoked. -* @param aLoop number of times to repeat playing the sound. -* @param aVolume sound volume setting. -* @return Browser status code: -* KBrsrSuccess if successful, -* KBrsrOutOfMemory if no more memory, -* otherwise, any other browser failure. -*/ -extern -TBrowserStatusCode -NW_Sound_ContentHandler_StartPlayingSound( NW_Sound_ContentHandler_t* aSoundCH, - NW_Int16 aLoop, TSoundstartVolume aVolume ); - -/** -* Stops playing the sound. -* @since 3.0 -* @return Browser status code: -* KBrsrSuccess if successful, -* KBrsrOutOfMemory if no more memory, -* otherwise, any other browser failure. -*/ -extern -TBrowserStatusCode -NW_Sound_ContentHandler_StopPlayingSound( NW_Sound_ContentHandler_t* aSoundCH ); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/Action.c --- a/webengine/wmlengine/src/lmgr/src/Action.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_actioni.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_Action_Class_t NW_LMgr_Action_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_Action_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_LMgr_Action */ - /* invoke */ NULL - } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/AreaBox.cpp --- a/webengine/wmlengine/src/lmgr/src/AreaBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,868 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the <area> tag -* -*/ - - - -// INCLUDE FILES -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) -#include "nw_lmgr_areaboxi.h" -#include "nwx_string.h" -#include "nw_gdi_utils.h" -#include "nw_hed_hedeventhandler.h" - -// LOCAL FUNCTION PROTOTYPES -static TBrowserStatusCode -NW_LMgr_AreaBox_InterpretShape(NW_LMgr_AreaBox_t* thisObj); - -static TBrowserStatusCode -NW_LMgr_AreaBox_InterpretCoords(NW_LMgr_AreaBox_t* thisObj); - -static NW_Ucs2* -NW_LMgr_AreaBox_ParseString (NW_LMgr_AreaBox_t* box, NW_Ucs2* string); - -// ============================= INTERFACE CLASS =============================== - -// ----------------------------------------------------------------------------- -static -const -NW_LMgr_IEventListener_Class_t _NW_LMgr_AreaBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_AreaBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_LMgr_AreaBox_IEventListener_ProcessEvent - } -}; - -// ----------------------------------------------------------------------------- -static -const NW_Object_Class_t* const _NW_LMgr_AreaBox_InterfaceList[] = { - &_NW_LMgr_AreaBox_IEventListener_Class, - NULL -}; - -// ========================= INTERFACE FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -NW_Uint8 -_NW_LMgr_AreaBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_LMgr_AreaBox_t* thisObj; - NW_Uint8 ret = 0; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - // obtain the implementer - thisObj = static_cast<NW_LMgr_AreaBox_t*>(NW_Object_Interface_GetImplementer (eventListener)); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_AreaBox_Class)); - - NW_LMgr_Box_Refresh(NW_LMgr_BoxOf(thisObj->iImageMapBox)); - - /* notify the event handler (if there is one) */ - if (thisObj->eventHandler != NULL) - { - ret = NW_LMgr_EventHandler_ProcessEvent (thisObj->eventHandler, - NW_LMgr_BoxOf (thisObj), event); - } - return ret; -} - -// ========================= CLASS DECLARATION ================================= - -// ----------------------------------------------------------------------------- -const -NW_LMgr_AreaBox_Class_t NW_LMgr_AreaBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_AreaBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_AreaBox_t), - /* construct */ _NW_LMgr_AreaBox_Construct, - /* destruct */ _NW_LMgr_AreaBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AreaBox */ - /* unused */ NW_Object_Unused - } -}; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_AreaBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_AreaBox_t* thisObj = NW_LMgr_AreaBoxOf (dynamicObject); - - // invoke our superclass constructor - TBrowserStatusCode status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) - { - return status; - } - - // initialize the member variables - thisObj->eventHandler = va_arg (*argp, NW_LMgr_EventHandler_t*); - - thisObj->iImageMapBox = va_arg (*argp, NW_LMgr_ImageMapBox_t*); - - thisObj->iShapeText = va_arg (*argp, NW_Text_t*); - thisObj->iCoordsText = va_arg (*argp, NW_Text_t*); - thisObj->iAltText = va_arg (*argp, NW_Text_t*); - thisObj->iHRefText = va_arg (*argp, NW_Text_t*); - - thisObj->iShape = NW_LMGR_ABS_RECT; - - thisObj->iIsInvalid = NW_FALSE; - - // InterpretShape and InterpretCoords take the text attribute arguements and - // convert them to the appropriate data types - NW_LMgr_AreaBox_InterpretShape(thisObj); - - if (NW_LMgr_AreaBox_InterpretCoords(thisObj) != KBrsrSuccess) - { - thisObj->iIsInvalid = NW_TRUE; - } - - // successful completion - return status; -} - -// ----------------------------------------------------------------------------- -void -_NW_LMgr_AreaBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_AreaBox_t* thisObj = NW_LMgr_AreaBoxOf (dynamicObject); - - // destroy the EventHandler - NW_Object_Delete (thisObj->eventHandler); - - // destroy the text member variables - if (thisObj->iCoordsText != NULL) - { - NW_Object_Delete (thisObj->iCoordsText); - thisObj->iCoordsText = NULL; - } - - if (thisObj->iShapeText != NULL) - { - NW_Object_Delete (thisObj->iShapeText); - thisObj->iShapeText = NULL; - } - - if (thisObj->iAltText != NULL) - { - NW_Object_Delete (thisObj->iAltText); - thisObj->iAltText = NULL; - } - - if (thisObj->iHRefText != NULL) - { - NW_Object_Delete (thisObj->iHRefText); - thisObj->iHRefText = NULL; - } -} - -// ----------------------------------------------------------------------------- -NW_LMgr_AreaBox_t* -NW_LMgr_AreaBox_New (NW_ADT_Vector_Metric_t aNumProperties, - NW_LMgr_EventHandler_t* aEventHandler, - NW_LMgr_ImageMapBox_t* aImageMapBox, - NW_Text_t* aShapeText, - NW_Text_t* aCoordsText, - NW_Text_t* aAltText, - NW_Text_t* aHRefText) -{ - return (NW_LMgr_AreaBox_t*) NW_Object_New (&NW_LMgr_AreaBox_Class, - aNumProperties, aEventHandler, aImageMapBox, aShapeText, aCoordsText, - aAltText, aHRefText); -} - -// ----------------------------------------------------------------------------- -NW_GDI_Rectangle_t -NW_LMgr_AreaBox_GetBounds (NW_LMgr_Box_t* box) -{ - NW_LMgr_AreaBox_t* thisObj; - NW_GDI_Rectangle_t overlap; - - // for convenience - thisObj = NW_LMgr_AreaBoxOf (box); - - NW_GDI_Rectangle_t areaBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( thisObj ) ); - - NW_GDI_Rectangle_t imageBounds = NW_LMgr_Box_GetDisplayBounds( NW_LMgr_BoxOf( thisObj->iImageMapBox ) ); - - // Calculate the iComboBounds (which is the bounds of the area box relative - // to the screen instead of the image) - thisObj->iComboBounds.point.x = areaBounds.point.x + imageBounds.point.x; - thisObj->iComboBounds.point.y = areaBounds.point.y + imageBounds.point.y; - - thisObj->iComboBounds.dimension = areaBounds.dimension; - - // Now that we know where the area box is on the screen, lets check to make - // sure that the area box overlaps the image box. In the most general case, - // the area box should be contained within the image map box. But in some edge - // cases, flaky web developers might specify bounds for an area that lie outside - // the image map box bounds. So there are three cases to consider - // 1. The area box lies completely outside the image map box. - // In this case we will not display the area box (ignore it) - // 2. The area lies partially in the image map box. - // We will take the resulting overlap as the bounds for our area box - // 3. The area box lies withing the image map box. - // In which case the overlap bounds will equal the area box bounds and all is - // well with the world:-) - // For more information on how NW_GDI_Rectangle_Cross behaves, see the header - // file. - if (NW_GDI_Rectangle_Cross(&(thisObj->iComboBounds), &imageBounds, &overlap)) - { - thisObj->iComboBounds.point.x = overlap.point.x; - thisObj->iComboBounds.point.y = overlap.point.y; - - thisObj->iComboBounds.dimension = overlap.dimension; - } - else - { - thisObj->iComboBounds.point.x = 0; - thisObj->iComboBounds.point.y = 0; - - thisObj->iComboBounds.dimension.height = 0; - thisObj->iComboBounds.dimension.width = 0; - } - - (void) NW_LMgr_Box_UpdateDisplayBounds( NW_LMgr_BoxOf(thisObj), thisObj->iComboBounds ); - return thisObj->iComboBounds; -} - -// ----------------------------------------------------------------------------- -void -NW_LMgr_AreaBox_SetBounds( NW_LMgr_Box_t* /*aBox*/, NW_GDI_Rectangle_t /*aBoxBounds*/ ) - { - // not supported yet - } - -// ----------------------------------------------------------------------------- -NW_LMgr_RootBox_t* -NW_LMgr_AreaBox_GetRootBox (NW_LMgr_Box_t* box) -{ - NW_LMgr_AreaBox_t* thisObj; - - // for convenience - thisObj = NW_LMgr_AreaBoxOf (box); - - return NW_LMgr_Box_GetRootBox(thisObj->iImageMapBox); -} - -// ----------------------------------------------------------------------------- -NW_LMgr_ImageMapBox_t* -NW_LMgr_AreaBox_GetParentImageMapBox (NW_LMgr_Box_t* box) -{ - NW_LMgr_AreaBox_t* thisObj = NW_LMgr_AreaBoxOf (box); - - return thisObj->iImageMapBox; -} - -// ----------------------------------------------------------------------------- -// Function: NW_LMgr_AreaBox_SetParentImageMapBox -// Description: This method sets this area box's parent image map box -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -void -NW_LMgr_AreaBox_SetParentImageMapBox (NW_LMgr_AreaBox_t* aAreaBox, - NW_LMgr_ImageMapBox_t* aImageMapBox) - { - NW_ASSERT(aAreaBox); - NW_ASSERT(aImageMapBox); - - aAreaBox->iImageMapBox = aImageMapBox; - } - -// ----------------------------------------------------------------------------- -NW_Bool -NW_LMgr_AreaBox_IsInvalidAreaBox (NW_LMgr_Box_t* aBox) -{ - NW_LMgr_AreaBox_t* thisObj = NW_LMgr_AreaBoxOf (aBox); - - return thisObj->iIsInvalid; -} - -// ----------------------------------------------------------------------------- -// Function: NW_LMgr_AreaBox_Copy -// Description: Will return a new box which is a copy of the area box -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_AreaBox_Copy(NW_LMgr_AreaBox_t* aBox, NW_LMgr_AreaBox_t** aNewBox) - { - NW_LMgr_AreaBox_t* oldAreaBox = aBox; - NW_LMgr_AreaBox_t* newAreaBox = NULL; - NW_HED_EventHandler_t* eventHandler = NULL; - - NW_ASSERT( oldAreaBox != NULL ); - - NW_TRY( status ) - { - // copy the href and alt text values since each area box has their own copy - // and are responsible for deletion - NW_Text_t* hrefVal = NW_Text_Copy(oldAreaBox->iHRefText, NW_TRUE); - NW_Text_t* altText = NW_Text_Copy(oldAreaBox->iAltText, NW_TRUE); - - // create a new event handler for the new area box - eventHandler = NW_HED_EventHandler_New(NW_HED_EventHandlerOf(oldAreaBox->eventHandler)->documentNode, NW_HED_EventHandlerOf(oldAreaBox->eventHandler)->context ); - NW_THROW_OOM_ON_NULL( eventHandler, status ); - - // create the new area box - newAreaBox = NW_LMgr_AreaBox_New(6, - NW_LMgr_EventHandlerOf(eventHandler), - oldAreaBox->iImageMapBox, - NULL, - NULL, - altText, - hrefVal); - NW_THROW_OOM_ON_NULL( newAreaBox, status ); - - // because we don't have to parse coordinate and shape text values, we can just copy - // the shape and bounds values from the old area box - newAreaBox->iShape = oldAreaBox->iShape; - NW_GDI_Rectangle_t bounds = NW_LMgr_Box_GetFormatBounds(NW_LMgr_BoxOf(oldAreaBox)); - NW_LMgr_Box_SetFormatBounds(NW_LMgr_BoxOf(newAreaBox), bounds); - (void) NW_LMgr_Box_UpdateDisplayBounds( NW_LMgr_BoxOf( newAreaBox ), bounds ); - - // set the pointer to a pointer to point to our new area box - *aNewBox = (NW_LMgr_AreaBox_t*)newAreaBox; - } - NW_CATCH( status ) - { - if (newAreaBox) - { - NW_Object_Delete(newAreaBox); - } - *aNewBox = NULL; - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_LMgr_AreaBox_InterpretShape -// Description: This method will take the textual shape and convert it to one -// of the NW_LMGR_AreaBoxShape_Type_t types. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_AreaBox_InterpretShape(NW_LMgr_AreaBox_t* thisObj) -{ - NW_Ucs2* storage = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded = 0; - - NW_TRY(status) - { - if (thisObj->iShapeText != NULL) - { - // convert NW_Text_t shape name to a NW_Ucs2 in order to use Usc2 string methods - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (thisObj->iShapeText, 0, &length, &freeNeeded); - NW_THROW_OOM_ON_NULL( storage, status ); - - // compare storage string with various string names to determine type - if ((NW_Str_StricmpConst(storage, "rect") == 0) || - (NW_Str_StricmpConst(storage, "rectangle") == 0)) - { - thisObj->iShape = NW_LMGR_ABS_RECT; - } - else if ((NW_Str_StricmpConst(storage, "circ") == 0) || - (NW_Str_StricmpConst(storage, "circle") == 0)) - { - thisObj->iShape = NW_LMGR_ABS_CIRC; - } - else if ((NW_Str_StricmpConst(storage, "poly") == 0) || - (NW_Str_StricmpConst(storage, "polygon") == 0)) - { - thisObj->iShape = NW_LMGR_ABS_POLY; - } - else - { - thisObj->iShape = NW_LMGR_ABS_RECT; - } - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - if (freeNeeded) - { - NW_Mem_Free ((NW_Ucs2*)storage); - } - - return status; - } NW_END_TRY -} - -// ----------------------------------------------------------------------------- -// NW_LMgr_AreaBox_InterpretCoords -// Description: This method will take the coords associated with the area box and -// set the height and width dimensions based on a bounding box (i.e. a bounding -// box which incompasses the "shape" of the area) -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_AreaBox_InterpretCoords(NW_LMgr_AreaBox_t* thisObj) -{ - NW_Ucs2* coordStr = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded = NW_FALSE; - NW_GDI_Rectangle_t bounds; - - NW_TRY(status) - { - bounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( thisObj->iImageMapBox ) ); - - if (thisObj->iCoordsText != NULL) - { - // convert NW_Text_t shape name to a NW_Ucs2 in order to use Usc2 string methods - coordStr = (NW_Ucs2*)NW_Text_GetUCS2Buffer(thisObj->iCoordsText, NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated, &length, &freeNeeded); - NW_THROW_OOM_ON_NULL(coordStr, status); - - switch (thisObj->iShape) - { - case NW_LMGR_ABS_CIRC: - { - NW_Int32 x = 0, y = 0, r = 0; - NW_Ucs2* points[3]; - - // parse the coord values "x,y,r" - for (NW_Uint16 i = 0; i < 3; i++) - { - points[i] = NW_LMgr_AreaBox_ParseString (thisObj, coordStr); - coordStr = NULL; - } - - // convert to numeric values - if (points[0]) - { - x = NW_Str_Atoi(points[0]); - if (x < 0) - { - x = 0; - } - // clean up memory - NW_Mem_Free (points[0]); - } - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - if (points[1]) - { - y = NW_Str_Atoi(points[1]); - - if (y < 0) - { - y = 0; - } - // clean up memory - NW_Mem_Free (points[1]); - } - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - if (points[2]) - { - r = NW_Str_Atoi(points[2]); - - if (r < 0) - { - r = 0; - } - // clean up memory - NW_Mem_Free (points[2]); - } - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - if ((x - r) < 0) - { - bounds.point.x = 0; - - // the width of the circle if it draws outside the image will be x + r - bounds.dimension.width = x + r; - } - else - { - bounds.point.x = x - r; - - // calculate the width dimension by (r * 2) - bounds.dimension.width = (r * 2); - } - - if ((y - r) < 0) - { - bounds.point.y = 0; - - // the height of the circle if it draws outside the image will be y + r - bounds.dimension.height = y + r; - } - else - { - bounds.point.y = y - r; - - // calculate the height dimension by (r * 2) - bounds.dimension.height = (r * 2); - } - - } - break; - - case NW_LMGR_ABS_POLY: - case NW_LMGR_ABS_RECT: - default: - { - NW_Ucs2* point = NULL; - NW_GDI_Metric_t xH = 0, yH = 0; // variables to hold the high values - NW_GDI_Metric_t xL = 0, yL = 0; // variables to hold the low values - NW_GDI_Metric_t temp = 0; - NW_Bool xValue = NW_TRUE; - NW_Bool haveSecondSet = NW_FALSE; // variable used to insure that we have - // at least 2 sets of coordinates - - // parse the coord values "x1,y1,x2,y2,x3,y3,..." - // start with retrieving the first pair of coords - for (NW_Uint16 i = 0; i < 2; i++) - { - if ((point = NW_LMgr_AreaBox_ParseString (thisObj, coordStr)) != NULL) - { - if (xValue) - { - temp = (NW_GDI_Metric_t) NW_Str_Atoi(point); - - // IE and Opera set negative values to 0 - if (temp < 0) - { - temp = 0; - } - - xH = temp; - xL = temp; - xValue = NW_FALSE; - } - else - { - temp = (NW_GDI_Metric_t) NW_Str_Atoi(point); - - // IE and Opera set negative values to 0 - if (temp < 0) - { - temp = 0; - } - - yH = temp; - yL = temp; - xValue = NW_TRUE; - } - // clean up memory - NW_Mem_Free ((NW_Ucs2*)point); - } - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - coordStr = NULL; - } - - // retrieve the remaining coord pairs and compare x and y values to find the - // heighest and lowest x, y values - while ((point = NW_LMgr_AreaBox_ParseString (thisObj, coordStr)) != NULL) - { - haveSecondSet = NW_TRUE; - if (xValue) - { - temp = (NW_GDI_Metric_t) NW_Str_Atoi(point); - - if (temp < 0) - { - temp = 0; - } - - if (temp > xH) - { - xH = temp; - } - else if (temp < xL) - { - xL = temp; - } - - xValue = NW_FALSE; - } - else - { - temp = (NW_GDI_Metric_t) NW_Str_Atoi(point); - - if (temp < 0) - { - temp = 0; - } - - if (temp > yH) - { - yH = temp; - } - else if (temp < yL) - { - yL = temp; - } - - xValue = NW_TRUE; - } - - // clean up memory - NW_Mem_Free ((NW_Ucs2*)point); - } - - // Check to see if we have exited the while loop with a mismatched coordinate - // (i.e xValue without a yValue). If so, assign the missing yValue to 0. - if (!xValue) - { - temp = 0; - - if (temp > yH) - { - yH = temp; - } - else if (temp < yL) - { - yL = temp; - } - } - - // if there was only one set of coordinates, throw an error - if (!haveSecondSet) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // largest x, y values are the bound points - bounds.point.x = xL; - bounds.point.y = yL; - - // calculate the width dimension by finding the largest x value and subtracting the smallest x value - bounds.dimension.width = xH - xL; - // calculate the height dimension by finding the largest y value and subtracting the smallest y value - bounds.dimension.height = yH - yL; - } - break; - } // end switch - (void) NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( thisObj ), bounds ); - (void) NW_LMgr_Box_UpdateDisplayBounds( NW_LMgr_BoxOf( thisObj ), bounds ); - } - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - NW_CATCH (status) - { - if (freeNeeded) - { - NW_Mem_Free ((NW_Ucs2*)coordStr); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -// ----------------------------------------------------------------------------- -// NW_LMgr_AreaBox_ParseString -// Description: This method parses a string looking for numbers(series of digits). -// This method returns a pointer to the number substring. Subsequent calls with -// 'string' set to NULL return the next number series in the string. If there -// is no number found, the method will return NULL. -// ----------------------------------------------------------------------------- -// -NW_Ucs2* -NW_LMgr_AreaBox_ParseString(NW_LMgr_AreaBox_t* box, NW_Ucs2* string) -{ - NW_Ucs2* pStart = NULL; - NW_Ucs2* pEnd = NULL; - NW_Ucs2* returnString = NULL; - NW_Uint32 strlen = 0; - NW_Uint32 sublen = 0; - NW_Bool firstTimeThrough = NW_FALSE; - - if (string != NULL) - { - box->iString = string; - firstTimeThrough = NW_TRUE; - } - - if (box->iString != NULL) - { - // We are trying to find number series within a string - // Positive and negative numbers are acceptable - - // Loop until we either find a digit or a '-', this is the start of the string - NW_Ucs2* tmpString = box->iString; - - while (*tmpString != WAE_ASCII_NULL) - { - // Check to see if we have a '-' character. This character must be followed - // by a digit - if (*tmpString == '-') - { - if (NW_Str_Isdigit(*(tmpString + 1))) - { - pStart = tmpString; - pEnd = tmpString; - tmpString++; - - break; - } - } - else if (NW_Str_Isdigit(*tmpString)) - { - pStart = tmpString; - pEnd = tmpString; - tmpString++; - - break; - } - tmpString++; - } - - // Loop until we find the end of the number - if (pStart != NULL) - { - while (*tmpString != WAE_ASCII_NULL) - { - if (NW_Str_Isdigit(*tmpString)) - { - pEnd = tmpString; - tmpString++; - } - else - { - break; - } - } - /*lint -e{794} Conceivable use of null pointer*/ - pEnd++; - } - - if (pEnd != NULL) - { - sublen = (NW_Uint32)(pEnd - pStart); - - returnString = NW_Str_Substr(pStart, 0, sublen); - - strlen = NW_Str_Strlen(pStart); - - tmpString = NW_Str_Substr(pStart, sublen, strlen - sublen); - - if (!firstTimeThrough) - { - NW_Mem_Free((NW_Ucs2*)box->iString); - } - - box->iString = tmpString; - } - else - { - if (!firstTimeThrough) - { - NW_Mem_Free((NW_Ucs2*)box->iString); - } - - box->iString = NULL; - } - } - return returnString; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_LMgr_AreaBox_DisplayAltText(NW_LMgr_AreaBox_t* aAreaBox, - CGDIDeviceContext* aDeviceContext) - { - NW_TRY(status) - { - CGDIFont* font = NW_LMgr_Box_GetFont (NW_LMgr_BoxOf(aAreaBox->iImageMapBox)); - NW_GDI_Metric_t space = aAreaBox->iComboBounds.dimension.width; - NW_GDI_Point2D_t textPos; - - textPos.x = aAreaBox->iComboBounds.point.x; - textPos.y = aAreaBox->iComboBounds.point.y; - - status = NW_LMgr_ImgContainerBox_DisplayAltText(NW_LMgr_BoxOf(aAreaBox), - aAreaBox->iAltText, - aDeviceContext, - space, - &textPos, - font); - NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/BoxFormat.cpp --- a/webengine/wmlengine/src/lmgr/src/BoxFormat.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3596 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Description : The class handles formatting of the bidiflowbox -* -*/ - - - -#include "cstack.h" -#include "nwx_logger.h" -#include "nw_lmgr_linebox.h" -#include "nw_lmgr_nobrbox.h" -#include "LMgrObjectBoxOOC.h" -#include "nw_gdi_utils.h" -#include "BoxFormat.h" -#include "nw_lmgr_posflowbox.h" -#include "LMgrMarkerText.h" -#include "LMgrMarkerImage.h" -#include "LMgrAnonBlock.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_accesskey.h" -#include "nw_lmgr_verticaltablecellbox.h" - -#define NW_LMgr_maxMarkerLen (NW_Uint8)2 - -const TInt KFlowBoxLineSpacing = 4; - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_FlowBox_FormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t positionVal; - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_PropertyValue_t propertyVal; - NW_LMgr_Box_t *flow; - TBrowserStatusCode status = KBrsrSuccess; - - /* for convenience */ - flow = parentFormatBox; - - positionVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_position, - NW_CSS_ValueType_Token, &positionVal); - if(positionVal.token == NW_CSS_PropValue_position_absolute && - NW_Settings_GetDisableSmallScreenLayout()) - { -// NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); -// NW_ASSERT(rootBox != NULL); - // We have to insert a new box into the tree, to keep track of the positioned subtree - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(box); - - if (!NW_Object_IsInstanceOf(parent, &NW_LMgr_PosFlowBox_Class)) - { - /* - NW_LMgr_PosFlowBox_t* newParent = NW_LMgr_PosFlowBox_New(5); - if (newParent == NULL) - { - return KBrsrOutOfMemory; - } - TInt childIndex = NW_LMgr_ContainerBox_GetChildIndex (parent, box); - NW_ASSERT (childIndex >= 0); - NW_LMgr_ContainerBox_RemoveChild (parent, box); - NW_LMgr_ContainerBox_InsertChildAt (parent, NW_LMgr_BoxOf(newParent), (NW_ADT_Vector_Metric_t)childIndex); - NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(newParent), box); - - NW_LMgr_PropertyValue_t visibilityVal; - visibilityVal.token = NW_CSS_PropValue_visible; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - NW_LMgr_PropertyValue_t displayVal; - displayVal.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &displayVal); - - if ((visibilityVal.token != NW_CSS_PropValue_hidden) && (displayVal.token != NW_CSS_PropValue_none)) - { - NW_LMgr_PosFlowBox_AddPositionedBox(newParent); - //NW_ADT_DynamicVector_InsertAt(rootBox->positionedAbsObjects, &newParent, NW_ADT_Vector_AtEnd); - } - - */ - - // Per CSS2 spec, remove float property, and set display to block: - // 2. Otherwise, ’position’ has the value ’absolute’ or ’fixed’, ’display’ is set to - // ’block’ and ’float’ is set to ’none’. The position of the box will be determined - // by the ’top’, ’right’, ’bottom’ and ’left’ properties and the box’s containing - // block. - NW_LMgr_Property_t prop; - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_none; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_float, &prop); - return KBrsrContinue; - } - } - - /* inline is the default display property value in CSS */ - propertyVal.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &propertyVal); - - floatVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatVal); - - //Floats do not work within tables. The Titan workaround was to - //disable them. The same is done here. Note that this condition is - //tested by looking at the parentFormatBox. (e.g. flow). - if ((floatVal.token != NW_CSS_PropValue_none) && - !(NW_Object_IsClass (flow, &NW_LMgr_StaticTableCellBox_Class)) && - !(NW_Object_IsClass (flow, &NW_LMgr_VerticalTableCellBox_Class)) ) - { - status = NW_LMgr_BidiFlowBox_Float(flow, box, parentContext); - if (status != KBrsrFailure) - { - return status; - } - } - - switch (propertyVal.token) - { - case NW_CSS_PropValue_display_block: - /* This is handle special case Epoc32 boxes */ - if ( ( NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class) ) || - ( NW_Object_IsInstanceOf(box, &NW_LMgr_ActiveContainerBox_Class) ) || - ( NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class) && - NW_LMgr_ImgContainerBox_ImageIsBroken( box ) == NW_TRUE ) ) - { - status = NW_LMgr_BidiFlowBox_FlowInline(flow, box, parentContext); - } - else - { - if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class) || - NW_Object_IsInstanceOf (box, &NW_LMgr_FormatBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleBlock(flow, box, parentContext); - } - //status = NWLMgr_BidiFlowBox_HandleBlock(flow, box, parentContext); - } - break; - case NW_CSS_PropValue_display_inline: - status = NW_LMgr_BidiFlowBox_FlowInline(flow, box, parentContext); - break; - case NW_CSS_PropValue_display_listItem: - if (NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class)) - { - status = NW_LMgr_BidiFlowBox_FlowInline(flow, box, parentContext); - } - else if (NW_Object_IsInstanceOf(box, &NW_LMgr_BidiFlowBox_Class)) - { - status = NW_LMgr_BidiFlowBox_ListItem(flow, box, parentContext); - } - else if (NW_Object_IsInstanceOf(box, &NW_LMgr_FormatBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleBlock(flow, box, parentContext); - } - break; - - case NW_CSS_PropValue_display_directKey: - status = NW_LMgr_BidiFlowBox_DirectKey(flow, box, parentContext); - status = NW_LMgr_BidiFlowBox_FlowInline(flow, box, parentContext); - break; - - case NW_CSS_PropValue_none: - /* Flow boxes can't handle other display types */ - default: - break; - } - - return status; - } - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PostFormat(NW_LMgr_Box_t* flow, - NW_LMgr_ContainerBox_t *whose, - NW_LMgr_FormatContext_t* parentContext) - { - NW_TRY(status) - { - - NW_LMgr_Box_t *flowBox = NW_LMgr_BoxOf(flow); - - - /* If we are formatting someone else's children, carry on, otherwise .. */ - - if (NW_LMgr_ContainerBoxOf(flow) == whose) - { - /* Flush any leftover inline content */ - status = NW_LMgr_BidiFlowBox_Flush(flow, parentContext, NW_TRUE); - _NW_THROW_ON_ERROR(status); - - /* If we are the rootbox, flush all pending floats */ - if (NW_Object_IsClass(flow, &NW_LMgr_RootBox_Class)) - { - status = NW_LMgr_BidiFlowBox_AdvanceToClear(flow, - parentContext, - NW_CSS_PropValue_both); - _NW_THROW_ON_ERROR(status); - } - /* Remove the extra pixels of space from the last line */ - if (parentContext->lineNumber > 0 ) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( flowBox ); - boxBounds.dimension.height = - (NW_GDI_Metric_t)(boxBounds.dimension.height - KFlowBoxLineSpacing); - NW_LMgr_Box_SetFormatBounds( flowBox, boxBounds ); - } - /* Flush the pending vertical margin, if there is one */ - if ((NW_Object_IsClass(flowBox, &NW_LMgr_RootBox_Class)) - || IsClosedBottom(flowBox)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( flowBox ); - boxBounds.dimension.height = - (NW_GDI_Metric_t)(boxBounds.dimension.height + - parentContext->pendingMargin); - NW_LMgr_Box_SetFormatBounds( flowBox, boxBounds ); - } - - } - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - - - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_FlowBox_PostFormatBox(NW_LMgr_Box_t* parentFormatBox, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_PropertyValue_t propertyVal; - NW_LMgr_Box_t *flow; - TBrowserStatusCode status = KBrsrSuccess; - - /* for convenience */ - flow = parentFormatBox; - - floatVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatVal); - - //Floats do not work within tables in Small Screen OFF mode. The - //Titan workaround was to disable them. The same is done here. Note - //that this condition is tested by looking at the parentFormatBox - //(e.g. flow). - // if (floatVal.token != NW_CSS_PropValue_none) - if ((floatVal.token != NW_CSS_PropValue_none) && - !(NW_Object_IsClass (flow, &NW_LMgr_StaticTableCellBox_Class))) - { - return NW_LMgr_BidiFlowBox_PostFlowFloat(flow, box, parentContext); - } - - /* inline is the default display property value in CSS */ - propertyVal.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &propertyVal); - - switch (propertyVal.token) - { - case NW_CSS_PropValue_display_block: - /* This is handle special case Epoc32 boxes */ - if ( ( NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class) ) || - ( NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class) && - NW_LMgr_ImgContainerBox_ImageIsBroken( box ) == NW_TRUE ) ) - { - status = NW_LMgr_BidiFlowBox_PostFlowInline(flow, box, parentContext); - } - else - { - status = NW_LMgr_BidiFlowBox_PostFlowBlock(flow, box, parentContext); - } - break; - case NW_CSS_PropValue_display_inline: - case NW_CSS_PropValue_display_directKey: - status = NW_LMgr_BidiFlowBox_PostFlowInline(flow, box, parentContext); - break; - case NW_CSS_PropValue_display_listItem: - if (NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class)) - { - status = NW_LMgr_BidiFlowBox_PostFlowInline(flow, box, parentContext); - } - else - { - status = NW_LMgr_BidiFlowBox_PostFlowBlock(flow, box, parentContext); - } - break; - case NW_CSS_PropValue_none: - /* Flow boxes can't handle other display types */ - default: - break; - } - - return status; - } - - -/* ----------------------------------------------------------------------------*/ -/* Add an inline box to the flow. - * The typechecking here is done to enforce a box-model schema that - * defines which kinds of boxes can be flowed in each formatting context. - */ - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_FlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_GDI_Metric_t displayWidth; - CGDIDeviceContext* deviceContext; - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - NW_Bool smallScreenOn = NW_LMgr_RootBox_GetSmallScreenOn( rootBox ); - - TBrowserStatusCode status = KBrsrSuccess; - - /* Inline a format */ - if (NW_Object_IsInstanceOf(box, &NW_LMgr_FormatBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - } - - /* Inline a table */ - else if (NW_Object_IsClass(box, &NW_LMgr_StaticTableBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - } - - /* Inline a container of some other kind */ - else if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInlineContainer(flow, NW_LMgr_ContainerBoxOf(box), parentContext); - } - - /* If the box is a split box, we have already formatted it */ - else if (NW_Object_IsInstanceOf (box, &NW_LMgr_SplitTextBox_Class)) - { - status = KBrsrSuccess; - } - - /* Inline a media box */ - else if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - } - - /* Inline a form box */ - else if (NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - - if( smallScreenOn ) - { - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - displayWidth = deviceContext->DisplayBounds()->dimension.width; - if (NW_LMgr_RootBox_IsPageRTL(rootBox)) - { - displayWidth += RIGHT_ORIGIN; - } - - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - if(( boxBounds.point.x + boxBounds.dimension.width) >= displayWidth) - { - boxBounds.dimension.width = displayWidth - boxBounds.point.x - 4; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - } - } - - /* Inline a break box */ - else if (NW_Object_IsClass (box, &NW_LMgr_BreakBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleBreak(flow, box, parentContext); - } - - /* Inline an empty box */ - else if (NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - } - /* Inline a object box */ //R - //else if (ObjectUtils::IsObjectBox (*box, EFalse)) - // { - // status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, parentContext); - // } - /* Otherwise its a schema violation */ - else - { - NW_ASSERT(0); - } - return status; - - } - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PostFlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - - TBrowserStatusCode status = KBrsrSuccess; - - /* Inline a container of some other kind */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleInlineContainerPost(flow, NW_LMgr_ContainerBoxOf(box), parentContext); - } - - return status; - } - -/* ----------------------------------------------------------------------------*/ -/* Add a block formatted box to the flow */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_FlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - TBrowserStatusCode status = KBrsrSuccess; - - if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class) || - NW_Object_IsInstanceOf (box, &NW_LMgr_FormatBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleBlock(flow, box, parentContext); - } - - /* Otherwise its a schema violation */ - else - { - NW_ASSERT(0); - } - - return status; - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PostFlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - TBrowserStatusCode status = KBrsrSuccess; - - if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class) || - NW_Object_IsInstanceOf (box, &NW_LMgr_FormatBox_Class)) - { - status = NW_LMgr_BidiFlowBox_HandleBlockPost(flow, box, parentContext); - } - - return status; - } - -// This method handles the postformatting for the floated object. -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PostFlowFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - TBrowserStatusCode status = KBrsrSuccess; - - if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class) || - NW_Object_IsInstanceOf (box, &NW_LMgr_FormatBox_Class)) - { - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - - if (placedFloats == NULL) - { - return KBrsrLmgrNotClear; - } - - // Add the float to the vector - void *floatPtr = NW_ADT_DynamicVector_InsertAt(placedFloats, &box, NW_ADT_Vector_AtEnd); - if (floatPtr == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - // Reformat any boxes that are already on the line - status = NW_LMgr_BidiFlowBox_ReformatLine(flow, parentContext); - } - } - /* Otherwise its a schema violation */ - else - { - NW_ASSERT(0); - } - - return status; - } - - -/* --------------------------------------------------------------------------*/ -/* Add a float box to the flow */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_ADT_DynamicVector_t *pendingFloats = parentContext->pendingFloats; - NW_ADT_DynamicVector_t *placedFloats = parentContext->pendingFloats; - - NW_TRY(status) - { - /* If the float parentContext is not set, remove the box */ - /* This will be the case if a particular flow does not support - * floats (e.g., table cells) */ - if (pendingFloats == NULL || placedFloats == NULL) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - /* Float the box */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_FormatBox_Class) || - NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_StaticTableBox_Class) || - NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class)) - { - - status = NW_LMgr_BidiFlowBox_HandleFloat(flow, box, parentContext); - if (status == KBrsrLmgrNotClear) - { - NW_THROW_OOM_ON_NULL - (NW_ADT_DynamicVector_InsertAt(pendingFloats, &box, - NW_ADT_Vector_AtEnd), - status); - } - } - else - { /* Otherwise its a schema violation */ - NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_float); - NW_THROW_STATUS(status, KBrsrFailure); - } - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - -/* Update the flow to a new line. This updates the formatting context and takes - * care of any floaters that are either waiting to be placed or are going out - * of scope. - * - * returns: KBrsrSuccess, KBrsrOutOfMemory, KBrsrUnexpectedError - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_NewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine) - { - NW_ADT_Vector_Metric_t floatCount, index; - NW_LMgr_Box_t *floatBox; - NW_ADT_DynamicVector_t *pendingFloats = context->pendingFloats; - - NW_TRY(status) - { - /* Add the delta */ - context->y = (NW_GDI_Metric_t)(context->y + delta); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( flow ); - - boxBounds.dimension.height = (NW_GDI_Metric_t) - boxBounds.dimension.height + delta; - NW_LMgr_Box_SetFormatBounds( flow, boxBounds ); - - /* Reset the whitespace flag */ - context->pendingWhitespace = NW_FALSE; - - /* Update the context */ - context->lineStart = NW_LMgr_FlowBox_GetLineStart(flow, context, - context->y); - context->lineEnd = NW_LMgr_FlowBox_GetLineEnd(flow, context, context->y); - if (context->direction == NW_GDI_FlowDirection_LeftRight) - { - if (indentNewLine) - { - context->x = (NW_GDI_Metric_t)(context->lineStart - + NW_LMgr_FlowBox_GetIndentation(flow, - context)); - } - else - { - context->x = context->lineStart; - } - } - else - { - context->x = (NW_GDI_Metric_t)(context->lineEnd - - NW_LMgr_FlowBox_GetIndentation(flow, - context)); - } - - /* Flush the current line */ - status = NW_LMgr_BidiFlowBox_Flush(flow, context, NW_TRUE); - _NW_THROW_ON_ERROR(status); - - /* If the float context is missing, nothing to do */ - if (pendingFloats == NULL) - { - NW_THROW_SUCCESS(status); - } - - /* Look for any pending floats */ - floatCount = NW_ADT_Vector_GetSize(pendingFloats); - for (index = 0; index < floatCount;) - { - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (pendingFloats, index); - NW_ASSERT(floatBox != NULL); - - status = NW_LMgr_BidiFlowBox_HandleFloat(flow, floatBox, context); - if (status != KBrsrLmgrNotClear) - { - (void)NW_ADT_DynamicVector_RemoveAt(pendingFloats, index); - floatCount--; - } - else - { - index++; - } - } - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - -NW_Image_AbstractImage_t* -TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetListStyleImage(NW_LMgr_Box_t* flowBox, - NW_LMgr_PropertyValueToken_t token) - { - NW_Image_AbstractImage_t *image; - NW_LMgr_RootBox_t* rootBox; - NW_Int8 imageId; - - if (token == 0) - { - return NULL; - } - - /* get the root box */ - rootBox = NW_LMgr_Box_GetRootBox(flowBox); - if (rootBox == NULL) - { - return NULL; - } - - imageId = NW_Image_Invalid; - switch (token) - { - case NW_CSS_PropValue_square: - imageId = NW_Image_Square; - break; - case NW_CSS_PropValue_disc: - imageId = NW_Image_Disc; - break; - case NW_CSS_PropValue_circle: - imageId = NW_Image_Circle; - break; - default: - return NULL; - } - - /* get the image from the canned images dictionary */ - NW_ASSERT(rootBox->cannedImages != NULL); - image = CONST_CAST(NW_Image_AbstractImage_t*, NW_Image_CannedImages_GetImage( rootBox->cannedImages, - imageId )); - - return image; - } - -NW_LMgr_Box_t* TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetMarker(NW_LMgr_Box_t* flowBox, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context, - NW_LMgr_PropertyValueToken_t* markerVerticalAlign, - NW_Bool* style) - { - NW_LMgr_Property_t listProp; - NW_LMgr_Property_t dirProp; - NW_LMgr_PropertyValue_t listImage; - NW_Text_t *bulletText = NULL; - NW_LMgr_Box_t* marker = NULL; - NW_Ucs2 *bulletString = NULL; - NW_Image_AbstractImage_t *image = NULL; - NW_Image_Virtual_t *virtualImage = NULL; - - NW_TRY(status) - { - /* By default Left to Right */ - dirProp.value.token = NW_CSS_PropValue_ltr; - /* Get flow direction */ - dirProp.type = NW_CSS_ValueType_Token; - status = NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(flowBox), NW_CSS_Prop_textDirection, &dirProp); - - /* Set the marker default */ - *markerVerticalAlign = NW_CSS_PropValue_baseline; - - *style = NW_FALSE; - - /* Get the list-style-type property */ - listProp.value.token = NW_CSS_PropValue_disc; - status = NW_LMgr_PropertyList_Get(item->propList, - NW_CSS_Prop_listStyleType, - &listProp); - if ((status == KBrsrNotFound) || (listProp.type & NW_CSS_ValueType_DefaultStyle)) - { - status = NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(item->parent), - NW_CSS_Prop_listStyleType, - &listProp); - } - - /* Get the list-style-image property */ - listImage.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(item), - NW_CSS_Prop_listStyleImage, - NW_CSS_ValueType_Image, &listImage); - - if (listImage.object != NULL) - { - image = (NW_Image_AbstractImage_t*)listImage.object; - } - else - { - /* Look for a canned image */ - image = (NW_Image_AbstractImage_t*) - NW_LMgr_BidiFlowBox_GetListStyleImage(flowBox, listProp.value.token); - - /* Canned images are the only ones that are middle aligned */ - if (image != NULL) - { - /* center the image */ - *markerVerticalAlign = NW_CSS_PropValue_middle; - } - } - - if (image != NULL) - { - NW_GDI_Dimension3D_t size; - - /* Get the virtual image */ - virtualImage = NW_Image_Virtual_New(image); - NW_THROW_OOM_ON_NULL(virtualImage, status); - - /* Get the width of the image, if it is greater than the default left margin - replace the image by the default disc this is to fix bug SQ02061441511 - Vishy 06/19/2002 */ - (void) NW_Image_AbstractImage_GetSize (image, &size); - - // - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( flowBox ); - // - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) && ( size.width < NW_VerticalLayout_MinImageWidth1 || - size.height < NW_VerticalLayout_MinImageHeight1 || - (size.width < NW_VerticalLayout_MinImageWidth2 && size.height > NW_VerticalLayout_MinImageHeight2))) - { - /* ignore the image */ - NW_Object_Delete(virtualImage); - virtualImage = NULL; - - image = (NW_Image_AbstractImage_t*) - NW_LMgr_BidiFlowBox_GetListStyleImage(flowBox, listProp.value.token); - - if (image == NULL) - { - image = (NW_Image_AbstractImage_t*) - NW_LMgr_BidiFlowBox_GetListStyleImage(flowBox, NW_CSS_PropValue_disc); - } - - /* Canned images are the only ones that are middle aligned */ - if (image != NULL) - { - /* center the image */ - *markerVerticalAlign = NW_CSS_PropValue_middle; - /* Get the virtual image */ - virtualImage = NW_Image_Virtual_New(image); - NW_THROW_OOM_ON_NULL(virtualImage, status); - } - } - - /* Associate the image with the box */ - if (virtualImage != NULL) - { - marker = (NW_LMgr_Box_t*) - LMgrMarkerImage_New(1, (NW_Image_AbstractImage_t*)virtualImage, NULL, NW_FALSE ); - NW_THROW_OOM_ON_NULL(marker, status); - // image container takes image ownership - virtualImage = NULL; - } - } - else if (listProp.value.token != NW_CSS_PropValue_none) - { - *style = NW_TRUE; - switch (listProp.value.token) - { - case NW_CSS_PropValue_lowerAlpha: - bulletString = NW_LMgr_ListBullets_StringFromUInt('a', - context->listCount); - break; - case NW_CSS_PropValue_upperAlpha: - bulletString = NW_LMgr_ListBullets_StringFromUInt('A', - context->listCount); - break; - case NW_CSS_PropValue_lowerRoman: - bulletString = NW_LMgr_ListBullets_StringFromUInt('r', - context->listCount); - break; - case NW_CSS_PropValue_upperRoman: - bulletString = NW_LMgr_ListBullets_StringFromUInt('R', - context->listCount); - break; - case NW_CSS_PropValue_decimal: - default: - bulletString = NW_LMgr_ListBullets_StringFromUInt('d', - context->listCount); - *style = NW_FALSE; - break; - } - if (bulletString) - { - bulletText = (NW_Text_t*)NW_Text_UCS2_New(bulletString, - NW_Str_Strlen(bulletString), - NW_Text_Flags_TakeOwnership); - bulletString = NULL; - NW_THROW_OOM_ON_NULL(bulletText, status); - - marker = (NW_LMgr_Box_t*)LMgrMarkerText_New(1, bulletText); - NW_THROW_OOM_ON_NULL(marker, status); - } - else - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - } - NW_CATCH(status) - { - NW_Mem_Free(bulletString); - NW_Object_Delete(bulletText); - NW_Object_Delete(marker); - NW_Object_Delete(virtualImage); - marker = NULL; - } - NW_FINALLY { - /* To fix TI compiler warning */ - (void) status; - return marker; - } - NW_END_TRY - } - -NW_LMgr_Box_t* TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetDirectKeyMarker(NW_LMgr_Box_t* item) - { - NW_LMgr_AccessKey_t* ak; - NW_Uint32 val; - NW_Bool result; - NW_Ucs2 *string = NULL; - NW_Text_t *text = NULL; - NW_LMgr_Box_t* marker = NULL; - NW_LMgr_PropertyValue_t propValue; - - NW_TRY(status) - { - /* Set the marker default */ - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(item), - NW_CSS_Prop_accesskey, - NW_CSS_ValueType_Object, - &propValue); - - if (status == KBrsrSuccess) - { - ak = (NW_LMgr_AccessKey_t*)(propValue.object); - result = NW_LMgr_AccessKey_GetDirectKey (ak, &val); - if (result == NW_TRUE) - { - string = NW_Str_New(NW_LMgr_maxMarkerLen); - NW_THROW_OOM_ON_NULL(string, status); - NW_Str_Strcat(string, (const NW_Ucs2 *) &val); - NW_Str_StrcatConst(string, "."); - } - } - - if (string) - { - text = (NW_Text_t*)NW_Text_UCS2_New(string, - NW_Str_Strlen(string), - NW_Text_Flags_TakeOwnership); - string = NULL; - NW_THROW_OOM_ON_NULL(text, status); - - marker = (NW_LMgr_Box_t*)LMgrMarkerText_New(1, text); - NW_THROW_OOM_ON_NULL(marker, status); - } - else - { - NW_THROW_STATUS(status, KBrsrOutOfMemory); - } - } - NW_CATCH(status) - { - NW_Mem_Free(string); - NW_Object_Delete(text); - NW_Object_Delete(marker); - marker = NULL; - } - NW_FINALLY - { - /* To fix TI compiler warning */ - (void) status; - return marker; - } - NW_END_TRY - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_ListItem(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context) - { - NW_LMgr_ContainerBox_t* markerContainer = NULL; - NW_LMgr_Box_t* marker = NULL; - NW_Bool insidePosition; - NW_LMgr_Property_t prop; - NW_LMgr_Property_t dirProp; - NW_LMgr_PropertyValue_t propValue; - NW_LMgr_PropertyValueToken_t markerVerticalAlign; - NW_GDI_Dimension2D_t extent; - NW_GDI_Metric_t markerOffset = 2; - NW_LMgr_Box_t *currentFlow = NULL; - NW_Bool ownsMarker = NW_TRUE; - NW_Bool styleMarker = NW_FALSE; - NW_GDI_Rectangle_t boundsFlow; - NW_GDI_Metric_t marginFlow, borderFlow, paddingFlow; - - /* Check that the box type is legal */ - if (!NW_Object_IsClass(item, &NW_LMgr_BidiFlowBox_Class)) - { - return KBrsrSuccess; - } - - NW_TRY(status) - { - - // Find the first block element. - // This is where we're going to put the marker. - currentFlow = item; - markerContainer = NW_LMgr_ContainerBoxOf(currentFlow); - currentFlow = (NW_LMgr_Box_t*)NW_LMgr_BidiFlowBox_GetFirstBlock(currentFlow); - if (currentFlow && NW_Object_IsInstanceOf(currentFlow, &NW_LMgr_ContainerBox_Class)) - { - markerContainer = NW_LMgr_ContainerBoxOf(currentFlow); - } - - /* Get list-style-position */ - insidePosition = NW_FALSE; - propValue.token = NW_CSS_PropValue_outside; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(item), - NW_CSS_Prop_listStylePosition, - NW_CSS_ValueType_Token, &propValue); - if (propValue.token == NW_CSS_PropValue_inside) - { - insidePosition = NW_TRUE; - } - - /* If this is the first item, check for any start values */ - if (context->itemsHandled == 0) - { - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), - NW_CSS_Prop_listValue, - NW_CSS_ValueType_Integer, - &propValue); - if (status == KBrsrSuccess) - { - /* Reset the list count */ - context->listCount = propValue.integer - 1; - } - } - - /* Do we have an explicit value set on the item */ - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(item), - NW_CSS_Prop_listValue, - NW_CSS_ValueType_Integer, - &propValue); - if (status == KBrsrSuccess) - { - /* Reset the list count */ - context->listCount = propValue.integer - 1; - } - - /* Get the appropriate marker */ - marker = NW_LMgr_BidiFlowBox_GetMarker(flow, item, context, - &markerVerticalAlign, &styleMarker); - - /* Increment the list count */ - context->listCount = (NW_Uint32)(context->listCount + 1); - - /* Increment the itemsHandled counter */ - context->itemsHandled ++; - - if (marker) - { - // Add the marker to the new cell - status = NW_LMgr_ContainerBox_InsertChildAt(markerContainer, marker, 0); - NW_THROW_ON_ERROR(status); - - // Give up ownership of marker - ownsMarker = NW_FALSE; - - /* Set vertical alignment */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = markerVerticalAlign; - status = NW_LMgr_Box_SetProperty(marker, - NW_CSS_Prop_verticalAlign, &prop); - NW_THROW_ON_ERROR(status); - - /* Size the marker */ - if (NW_Object_IsInstanceOf(marker, &LMgrMarkerText_Class)) - { - status = NW_LMgr_AbstractTextBox_GetDimensions(NW_LMgr_AbstractTextBoxOf(marker), &extent); - } - else - { - status = NW_LMgr_Box_GetMinimumContentSize(marker, &extent); - } - NW_THROW_ON_ERROR(status); - - boundsFlow = NW_LMgr_Box_GetFormatBounds( flow ); - marginFlow = (NW_GDI_Metric_t)(NW_LMgr_Box_GetModelProp(flow, NW_CSS_Prop_leftMargin)); - borderFlow = (NW_GDI_Metric_t)(NW_LMgr_Box_GetModelProp(flow, NW_CSS_Prop_leftBorderWidth)); - paddingFlow = (NW_GDI_Metric_t)(NW_LMgr_Box_GetModelProp(flow, NW_CSS_Prop_leftPadding)); - - /* By default Left to Right */ - dirProp.value.token = NW_CSS_PropValue_ltr; - /* Get flow direction */ - dirProp.type = NW_CSS_ValueType_Token; - status = NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(item), NW_CSS_Prop_textDirection, &dirProp); - - if (dirProp.value.token == NW_CSS_PropValue_ltr) - { - if (!insidePosition) - { - // If the item has a position of "outside": - // according to CSS spec, marker is placed outside the list item; - // adjust startMargin to push list item rightward; - // make the margin of marker negative, so it'll be on the left of the list item - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = (NW_GDI_Metric_t)( - extent.width ); - status = NW_LMgr_Box_SetProperty(marker, - NW_CSS_Prop_leftMargin, &prop); - NW_THROW_ON_ERROR(status); - - // startMargin = start of content block (boundsFlow.point.x+marginFlow+borderFlow+paddingFlow) - // + - // marker width (extent.width) - context->startMargin = (NW_GDI_Metric_t)( boundsFlow.point.x + - marginFlow + borderFlow + paddingFlow + - extent.width ); - } - else - { - /* Offset the marker */ - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = markerOffset; - status = NW_LMgr_Box_SetProperty (marker, - NW_CSS_Prop_rightMargin, &prop); - NW_THROW_ON_ERROR(status); - } - } - else - { /* dirProp.value.token == NW_CSS_PropValue_rtl */ - if (!insidePosition) - { - /* If the item is outside, display it on the left of the list item */ - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = (NW_GDI_Metric_t)( - extent.width ); - status = NW_LMgr_Box_SetProperty(marker, - NW_CSS_Prop_rightMargin, &prop); - NW_THROW_ON_ERROR(status); - - context->startMargin = (NW_GDI_Metric_t)( boundsFlow.point.x + - marginFlow + borderFlow + paddingFlow + - extent.width ); - } - else - { - /* Offset the marker */ - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = markerOffset; - status = NW_LMgr_Box_SetProperty (marker, - NW_CSS_Prop_leftMargin, &prop); - NW_THROW_ON_ERROR(status); - } - } - } - - /* Finally handle the item as a regular block */ - status = NW_LMgr_BidiFlowBox_HandleBlock(flow, item, context); - NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) - { - if (ownsMarker) - { - NW_Object_Delete(marker); - } - } - NW_FINALLY { - return status; - } - NW_END_TRY - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_DirectKey(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* item, - NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_Property_t prop; - NW_LMgr_Box_t* marker = NULL; - NW_LMgr_Box_t *currentFlow = NULL; - NW_GDI_Dimension2D_t extent; - NW_Bool ownsMarker = NW_TRUE; - - /* Check that the box type is legal */ - if (!NW_Object_IsClass(item, &NW_LMgr_ActiveContainerBox_Class)) - { - return KBrsrSuccess; - } - - NW_TRY(status) - { - - // Find the first container element. - // This is where we're going to put the marker. - currentFlow = item; - - /* Get the appropriate marker */ - marker = NW_LMgr_BidiFlowBox_GetDirectKeyMarker(item); - - if (marker) - { - // Add the marker to the new cell - status = NW_LMgr_ContainerBox_InsertChild (NW_LMgr_ContainerBoxOf(flow), marker, currentFlow); - NW_THROW_ON_ERROR(status); - - // Give up ownership of marker - ownsMarker = NW_FALSE; - - /* Set vertical alignment */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_baseline;; - status = NW_LMgr_Box_SetProperty(marker, - NW_CSS_Prop_verticalAlign, &prop); - NW_THROW_ON_ERROR(status); - /* Size the marker */ - status = NW_LMgr_Box_GetMinimumContentSize(marker, &extent); - NW_THROW_ON_ERROR(status); - } - status = NW_LMgr_BidiFlowBox_HandleInline(flow, marker, context); - } - NW_CATCH(status) - { - if ((marker != NULL) && ownsMarker) - { - NW_Object_Delete(marker); - } - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* method to adjust the current line of elements according to - * their alignment. This returns the line height resulting from vertical - * alignment adjustment. - * - * returns: KBrsrSuccess, KBrsrOutOfMemory, KBrsrUnexpectedError - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_Flush(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, NW_Bool addLineSpacing) - { - NW_GDI_Metric_t lineHeight = 0; - NW_GDI_Metric_t lineBase = 0; - NW_LMgr_PropertyValue_t tAlign; - NW_LMgr_Property_t baselineProp; - NW_GDI_Metric_t space; - NW_LMgr_Box_t* lastBox; - NW_ADT_Vector_Metric_t numBoxes; - NW_GDI_Metric_t flowBoxLineSpacing; - - NW_REQUIRED_PARAM(flow); - NW_ASSERT(flow != NULL); - NW_ASSERT(parentContext != NULL); - - numBoxes = NW_LMgr_LineBox_GetCount(parentContext->currentLine); - if (numBoxes == 0) - { - return KBrsrSuccess; /* Nothing to flush */ - } - - NW_TRY(status) - { - /* We should ignore trailing space at EOL */ - lastBox = NW_LMgr_LineBox_GetBox(parentContext->currentLine, (NW_ADT_Vector_Metric_t)(numBoxes - 1)); - if (lastBox != NULL) - { - if (NW_Object_IsInstanceOf(lastBox, &NW_LMgr_AbstractTextBox_Class)) - { - NW_LMgr_AbstractTextBox_CompressTrailing(NW_LMgr_AbstractTextBoxOf(lastBox)); - } - } - - /* Get the available space for the line */ - space = ((NW_GDI_Metric_t) - (parentContext->lineEnd - parentContext->lineStart)); - - /* Get the alignment property, or default to left align if not specified */ - if (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - { - tAlign.token = NW_CSS_PropValue_left; - } - else - { - tAlign.token = NW_CSS_PropValue_right; - } - - (void) NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), - NW_CSS_Prop_textAlign, - NW_CSS_ValueType_Token, &tAlign); - - /* Shift horizontally */ - (void)NW_LMgr_LineBox_HAlign(parentContext->currentLine, tAlign.token, space, - parentContext->direction); - - /* Position boxes vertically according to their alignment props */ - status = NW_LMgr_LineBox_VAlign(parentContext->currentLine, parentContext->y, - &lineBase, &lineHeight); - _NW_THROW_ON_ERROR(status); - - /* Flush any inline containers */ - status = NW_LMgr_BidiFlowBox_FlushInlineContainers(flow, parentContext); - _NW_THROW_ON_ERROR(status); - - /* Clear the line box, we're done */ - status = NW_LMgr_LineBox_Clear(parentContext->currentLine); - _NW_THROW_ON_ERROR(status); - - /* Update the parentContext */ - flowBoxLineSpacing = (addLineSpacing == NW_TRUE ? KFlowBoxLineSpacing : 0); - - parentContext->y = (NW_GDI_Metric_t)(parentContext->y + lineHeight + flowBoxLineSpacing); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( flow ); - boxBounds.dimension.height = - (NW_GDI_Metric_t)( boxBounds.dimension.height + lineHeight + flowBoxLineSpacing); - NW_LMgr_Box_SetFormatBounds( flow, boxBounds ); - - /* Set the baseline on the flow box */ - if (parentContext->lineNumber == 0) - { - baselineProp.type = NW_CSS_ValueType_Px; - baselineProp.value.integer = lineBase; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(flow), - NW_CSS_Prop_flowBaseline, - &baselineProp); - _NW_THROW_ON_ERROR(status); - } - parentContext->lineNumber = (NW_Uint16)(parentContext->lineNumber + 1); - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - - -/* --------------------------------------------------------------------------*/ -/* A method to find the next clear position. */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_AdvanceToClear(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_LMgr_PropertyValueToken_t clearToken) - { - NW_ADT_Vector_Metric_t index, floatCount; - NW_LMgr_PropertyValue_t floatValue; - NW_GDI_Metric_t clearPosition, floatBottom; - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - NW_LMgr_FrameInfo_t margin; - NW_LMgr_Box_t *floatBox; - - NW_REQUIRED_PARAM(flow); - - NW_TRY(status) - { - if (placedFloats == NULL) - { - NW_THROW_SUCCESS(status); - } - if (clearToken == NW_CSS_PropValue_none) - { - NW_THROW_SUCCESS(status); - } - do - { - /* Look for the floats */ - floatCount = NW_ADT_Vector_GetSize(placedFloats); - clearPosition = parentContext->y; - - for (index = 0; index < floatCount; index++) - { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - NW_ASSERT(floatBox != NULL); - - floatValue.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameBottom ); - - if (((floatValue.token == NW_CSS_PropValue_left) - && (clearToken == NW_CSS_PropValue_left)) - || ((floatValue.token == NW_CSS_PropValue_right) - && (clearToken == NW_CSS_PropValue_right)) - || (clearToken == NW_CSS_PropValue_both)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - if (floatBottom > clearPosition) - { - clearPosition = floatBottom; - } - } - } - - if (clearPosition > parentContext->y) - { - status = NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, - (NW_GDI_Metric_t)(clearPosition - - parentContext->y), NW_TRUE); - _NW_THROW_ON_ERROR(status); - } - - /* The newline method might have emitted a pending float. If that was - the case, we should check that we're still clear */ - } - while (floatCount - != NW_ADT_Vector_GetSize(placedFloats)); - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - -/* --------------------------------------------------------------------------*/ -/* A method to find the next clear position during reformatting a line. */ -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_AdvanceToClearReformat(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_LMgr_PropertyValueToken_t clearToken) - { - NW_ADT_Vector_Metric_t index, floatCount; - NW_LMgr_PropertyValue_t floatValue; - NW_GDI_Metric_t clearPosition, floatBottom; - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - NW_LMgr_FrameInfo_t margin; - NW_LMgr_Box_t *floatBox; - NW_GDI_Metric_t delta; - - NW_REQUIRED_PARAM(flow); - - NW_TRY(status) - { - if (placedFloats == NULL) - { - NW_THROW_SUCCESS(status); - } - if (clearToken == NW_CSS_PropValue_none) - { - NW_THROW_SUCCESS(status); - } - do - { - /* Look for the floats */ - floatCount = NW_ADT_Vector_GetSize(placedFloats); - clearPosition = parentContext->y; - - for (index = 0; index < floatCount; index++) - { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - NW_ASSERT(floatBox != NULL); - - floatValue.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameBottom ); - - if (((floatValue.token == NW_CSS_PropValue_left) - && (clearToken == NW_CSS_PropValue_left)) - || ((floatValue.token == NW_CSS_PropValue_right) - && (clearToken == NW_CSS_PropValue_right)) - || (clearToken == NW_CSS_PropValue_both)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - if (floatBottom > clearPosition) - { - clearPosition = floatBottom; - } - } - } - - if (clearPosition > parentContext->y) - { - /*status = NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, - (NW_GDI_Metric_t)(clearPosition - - parentContext->y), NW_TRUE); - _NW_THROW_ON_ERROR(status);*/ - - /* Add the delta */ - - delta = clearPosition - parentContext->y; - - parentContext->y = (NW_GDI_Metric_t)(parentContext->y + delta); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( flow ); - - boxBounds.dimension.height = (NW_GDI_Metric_t) - boxBounds.dimension.height + delta; - NW_LMgr_Box_SetFormatBounds( flow, boxBounds ); - - /* Reset the whitespace flag */ - parentContext->pendingWhitespace = NW_FALSE; - - /* Update the context */ - parentContext->lineStart = NW_LMgr_FlowBox_GetLineStart(flow, parentContext, - parentContext->y); - parentContext->lineEnd = NW_LMgr_FlowBox_GetLineEnd(flow, parentContext, parentContext->y); - if (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - { - parentContext->x = (NW_GDI_Metric_t)(parentContext->lineStart - + NW_LMgr_FlowBox_GetIndentation(flow, - parentContext)); - - } - else - { - parentContext->x = (NW_GDI_Metric_t)(parentContext->lineEnd - - NW_LMgr_FlowBox_GetIndentation(flow, - parentContext)); - } - - /* Flush the current line */ - status = NW_LMgr_BidiFlowBox_Flush(flow, parentContext, NW_TRUE); - _NW_THROW_ON_ERROR(status); - } - - - /* The newline method might have emitted a pending float. If that was - the case, we should check that we're still clear */ - } - while (floatCount - != NW_ADT_Vector_GetSize(placedFloats)); - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } -NW_GDI_Metric_t TLMgr_BoxFormatter::NW_LMgr_FlowBox_GetIndentation(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext) - { - NW_GDI_Metric_t indent = 0; - NW_LMgr_PropertyValue_t tIndent; - NW_LMgr_PropertyValue_t tAlign; - - if (parentContext->lineNumber == 0) - { - /* Get the text alignment */ - tAlign.token = NW_CSS_PropValue_left; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), NW_CSS_Prop_textAlign, - NW_CSS_ValueType_Token, &tAlign); - - if (tAlign.token == NW_CSS_PropValue_left) - { - /* Get the text indent */ - tIndent.integer = 0; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), NW_CSS_Prop_textIndent, - NW_CSS_ValueType_Px, &tIndent); - - indent = (NW_GDI_Metric_t)tIndent.integer; - } - } - return indent; - } - -/* A method that takes care of any inline containers whose children - * were formatted by the flow and are now in the line box. - * The method does two things: (1) if a container did not fit - * entirely on the line, this container is split; (2) all - * containers whose children are in the line box are resized. - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_FlushInlineContainers(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_LineBox_t *lineBox = parentContext->currentLine; - NW_LMgr_PropertyValue_t propValue; - NW_LMgr_Box_t *child = NULL; - NW_LMgr_Box_t *nextSibling = NULL; - NW_LMgr_Box_t *splitBox; - NW_LMgr_ContainerBox_t *parent = NULL; - NW_LMgr_ContainerBox_t *parentTemp; - NW_ADT_Vector_Metric_t childCount; - NW_ADT_Vector_Metric_t childIndex; - NW_ADT_Vector_Metric_t i, boxesOnLine; - NW_ADT_Vector_Metric_t index; - NW_Bool ltr; - - NW_TRY(status) - { - boxesOnLine = NW_LMgr_LineBox_GetCount(parentContext->currentLine); - - // Return if no boxes in the line. - if (boxesOnLine == 0) - { - NW_THROW_SUCCESS(status); - } - - // Determine the direction -- LTR or RTL. - ltr = (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - ? NW_TRUE : NW_FALSE; - - // First, split any containers that did not fit on the line. - - // Get the last box on the line. The index of which depends on - // direction. If LTR, it truely is the last box. If RTL, it's - // reversed and is 0. - index = (NW_ADT_Vector_Metric_t)((ltr) ? (boxesOnLine - 1) : 0); - child = NW_LMgr_LineBox_GetBox(lineBox, index); - - - // Traverse tree up to containing flow and split any inline containers - // found on the way. - parent = NW_LMgr_Box_GetParent(child); - - while (parent && parent != NW_LMgr_ContainerBoxOf(flow)) - { - - // Get the display property. - propValue.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(parent), - NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &propValue); - - // Check that the container is inline. - if (propValue.token == NW_CSS_PropValue_display_inline || propValue.token == NW_CSS_PropValue_display_directKey) - { - - childCount = NW_LMgr_ContainerBox_GetChildCount(parent); - childIndex = NW_LMgr_ContainerBox_GetChildIndex(parent, child); - - //If <br/> tag in <a> and there is empty text before closing - //tags then don't create text box of zero dimension as it will - //not hightlight the anchor text in <a> tag. - - if( (parent && NW_Object_IsInstanceOf( parent, &NW_LMgr_ActiveContainerBox_Class ) ) - && ( child && NW_Object_IsInstanceOf(child, &NW_LMgr_BreakBox_Class) ) ) - { - if (childIndex < childCount - 1) - { - nextSibling = - NW_LMgr_ContainerBox_GetChild (parent,(NW_ADT_Vector_Metric_t) ( childIndex + 1)); - if(nextSibling && NW_Object_IsClass( nextSibling, &NW_LMgr_TextBox_Class ) ) - { - NW_Text_t* aTextData = NW_LMgr_TextBox_GetText(NW_LMgr_TextBoxOf(nextSibling) ); - NW_Text_Length_t len = NW_Text_GetCharCount(aTextData); - NW_Uint32 i =0; - NW_Bool onlySplChar = NW_TRUE; - - - //If there is only special character then don't create split box. - - if(aTextData) - { - NW_Ucs2* storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer (aTextData, 0, NULL, NULL); - - for(i=0; i < len ; i++) - { - - if(storage[i] <= ( (NW_Ucs2) 0x0020) ) - { - continue; - } - else - { - onlySplChar = NW_FALSE; - break; - } - }//end for(..) - }//end if(aTextData) - - if(onlySplChar) - { - //Remove this box from the box tree list, since <br/> is already a whilespace - status = NW_LMgr_ContainerBox_RemoveChild(parent,nextSibling); - _NW_THROW_ON_ERROR(status); - childCount = NW_LMgr_ContainerBox_GetChildCount(parent); - childIndex = NW_LMgr_ContainerBox_GetChildIndex(parent, child); - }//endof onlySplChar - }//endof nextSibling - }//endof childIndex - } - - // If current box is not the last box in the container, - // split the container. - if (childIndex < childCount - 1) - { - - splitBox = - NW_LMgr_ContainerBox_SplitAtIndex(parent, - ((NW_ADT_Vector_Metric_t) - (childIndex + 1))); - NW_THROW_OOM_ON_NULL(splitBox, status); - - // Insert the new box into the parent. - parentTemp = NW_LMgr_Box_GetParent((NW_LMgr_Box_t*)parent); - status = NW_LMgr_ContainerBox_InsertChild(parentTemp, - splitBox, - (NW_LMgr_Box_t*)parent); - _NW_THROW_ON_ERROR(status); - - // Make the split box current. - parent = NW_LMgr_ContainerBoxOf(splitBox); - } - else - { - if (NW_Object_IsClass (child, &NW_LMgr_BreakBox_Class)) - //If the current box is the last box in the container, - //don't split the container nor its parent. - break; - } - }//if (childIndex < childCount - 1) - - // Move one level up. - child = NW_LMgr_BoxOf(parent); - parent = NW_LMgr_Box_GetParent(child); - }//endof while - - // Second, resize all inline container boxes. - - // Iterate through the children, starting from the 'last' one so as to - // properly handle any embedded containers. The actual last one depends - // on the direction -- LTR or RTL. - for (i = 0; i < boxesOnLine; i++) - { - // Determine actual index based on the direction. - index = (NW_ADT_Vector_Metric_t)((ltr) ? ((boxesOnLine - i) - 1) : i); - NW_ASSERT(index < 0x7FFF); - // Get the child. - child = NW_LMgr_LineBox_GetBox(lineBox, index); - // Resize all containers that start with this child. - parent = NW_LMgr_Box_GetParent(child); - - while (parent && parent != NW_LMgr_ContainerBoxOf(flow)) - { - if (NW_Object_IsClass(parent, &NW_LMgr_ContainerBox_Class) || - NW_Object_IsClass(parent, &NW_LMgr_ActiveContainerBox_Class) || - NW_Object_IsClass(parent, &NW_LMgr_NobrBox_Class)) - { - // Only resize if this is the first child. - childIndex = NW_LMgr_ContainerBox_GetChildIndex(parent, child); - if (childIndex == 0) - { - status = NW_LMgr_Box_Resize((NW_LMgr_Box_t*)NW_LMgr_BoxOf(parent), parentContext); - _NW_THROW_ON_ERROR(status); - } - else - { - // The current container was not resized; therefore, - // no point in resizing any parent containers. Break - // so as to not continue climbing up the hierarchy. - break; - } - } - - // Move one level up. - child = NW_LMgr_BoxOf(parent); - parent = NW_LMgr_Box_GetParent(child); - } - } - } - NW_CATCH(status) - {} - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ----------------------------------------------------------------------------*/ -/* method to reformat the line box after a float has been inserted. - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_ReformatLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_LineBox_t *lineBox = parentContext->currentLine; - NW_ADT_Vector_Metric_t index, boxesOnLine; - NW_LMgr_Box_t *childBox; - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf( flow ) ); - - // Reset the parentContext - parentContext->x = - (NW_GDI_Metric_t)(parentContext->lineStart - + NW_LMgr_FlowBox_GetIndentation(flow, parentContext)); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - - deviceContext = NW_LMgr_RootBox_GetDeviceContext( rootBox ); - rectangle = deviceContext->DisplayBounds(); - - // Reformat Line is created after placing floated objects. If we have already - // occupied more than 2/3rd of display width, we want to push next objects on the next line - if ((parentContext->lineEnd - parentContext->lineStart) < (rectangle->dimension.width) / 3) - { - NW_LMgr_PropertyValueToken_t clearToken = - (parentContext->x > (2*rectangle->dimension.width) / 3)? - NW_CSS_PropValue_left: NW_CSS_PropValue_right; - NW_LMgr_BidiFlowBox_AdvanceToClearReformat(flow, parentContext, clearToken); - } - } - - boxesOnLine = NW_LMgr_LineBox_GetCount(parentContext->currentLine); - - /* If there are no boxes in the line, then no work to do */ - if (boxesOnLine == 0) - { - return KBrsrSuccess; - } - - NW_TRY(status) - { - parentContext->currentLine = NW_LMgr_LineBox_New(); - NW_THROW_OOM_ON_NULL(parentContext->currentLine, status); - - /* Reformat each box */ - for (index = 0; index < boxesOnLine; index++) - { - childBox = NW_LMgr_LineBox_GetBox(lineBox, index); - status = NW_LMgr_BidiFlowBox_HandleInline(flow, childBox, parentContext); - _NW_THROW_ON_ERROR(status) - } - - /* Lose the old linebox */ - NW_Object_Delete(lineBox); - } - NW_CATCH(status) - { - if (parentContext->currentLine != NULL) - { - NW_Object_Delete(parentContext->currentLine); - parentContext->currentLine = lineBox; - } - } - NW_FINALLY { - return status; - } - NW_END_TRY - } - - -NW_LMgr_Box_t* TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetFirstBlock(NW_LMgr_Box_t* flow) - { - NW_LMgr_ContainerBox_t *flowContainer = NW_LMgr_ContainerBoxOf(flow); - NW_LMgr_Box_t *child; - NW_LMgr_Box_t *firstBlock = NULL; - NW_LMgr_PropertyValue_t propValue, floatVal; - NW_Uint16 childIndex, childCount; - - childCount = NW_LMgr_ContainerBox_GetChildCount(flowContainer); - for (childIndex = 0; childIndex < childCount; childIndex++) - { - child = NW_LMgr_ContainerBox_GetChild(flowContainer, childIndex ); - - floatVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - if (floatVal.token == NW_CSS_PropValue_none) - { - firstBlock = child; - break; - } - } - - if (firstBlock == NULL) - { - return NULL; - } - else - { - propValue.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(firstBlock, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &propValue); - - if ((propValue.token == NW_CSS_PropValue_display_block) || - (propValue.token == NW_CSS_PropValue_display_listItem)) - { - return firstBlock; - } - else - { - return NULL; - } - } - } - - - -NW_LMgr_Box_t* TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetLastBlock(NW_LMgr_Box_t* flow) - { - NW_LMgr_ContainerBox_t *flowContainer = NW_LMgr_ContainerBoxOf(flow); - NW_LMgr_Box_t *lastBlock = NULL; - NW_Int16 childCount; - NW_Int16 childIndex; - NW_LMgr_PropertyValue_t propValue; - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_Box_t *child; - - childCount = NW_LMgr_ContainerBox_GetChildCount(flowContainer); - - if (childCount == 0) - { - return NULL; - } - else - { - for (childIndex = (NW_Int16)(childCount - 1); childIndex >= 0; childIndex --) - { - child = NW_LMgr_ContainerBox_GetChild(flowContainer, (NW_ADT_Vector_Metric_t)childIndex); - - floatVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - if (floatVal.token == NW_CSS_PropValue_none) - { - lastBlock = child; - } - } - } - - if (lastBlock == NULL) - { - return NULL; - } - else - { - propValue.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(lastBlock, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &propValue); - - if ((propValue.token == NW_CSS_PropValue_display_block) || - (propValue.token == NW_CSS_PropValue_display_listItem)) - { - return lastBlock; - } - else - { - return NULL; - } - } - } - -NW_Bool TLMgr_BoxFormatter::IsClosedTop(NW_LMgr_Box_t *box) - { - return (NW_Bool) - ((NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topPadding) > 0) || - ((NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderWidth) > 0) && - (NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderStyle) != NW_CSS_PropValue_none) && - (NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderStyle) != NW_CSS_PropValue_hidden))); - } - -NW_Bool TLMgr_BoxFormatter::IsClosedBottom(NW_LMgr_Box_t *box) - { - return (NW_Bool) - ((NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomPadding) > 0) || - ((NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderWidth) > 0) && - (NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderStyle) != NW_CSS_PropValue_none) && - (NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderStyle) != NW_CSS_PropValue_hidden))); - } - - -/* ----------------------------------------------------------------------------*/ -/* A method to account for any collapsing margins. We look at - * any block boxes adjacent to the current box and updated the - * format context accordingly. - */ - - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_CollapseMargins(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext, - NW_ADT_Vector_Metric_t index) - { - NW_LMgr_Box_t *current; - NW_GDI_Metric_t topMargin = 0, bottomMargin = 0; - NW_GDI_Metric_t finalPositive = 0, finalNegative = 0, finalMargin = 0; - - /* All boxes sharing a horizontal edge will have their margins collapsed. */ - NW_TRY(status) - { - if ((index == 0) - && (NW_Object_IsInstanceOf(flow, &NW_LMgr_RootBox_Class) - || IsClosedTop(NW_LMgr_BoxOf(flow)))) - { - - finalPositive = finalNegative = finalMargin = 0; - - current = box; - do - { - topMargin = - (NW_GDI_Metric_t)NW_LMgr_Box_GetModelProp(current, - NW_CSS_Prop_topMargin); - - if (topMargin < 0) - { - finalNegative = - (NW_GDI_Metric_t)((finalNegative < -topMargin) - ? -topMargin : finalNegative); - } - else - { - finalPositive = - (NW_GDI_Metric_t)((finalPositive < topMargin) - ? topMargin : finalPositive); - } - - if (IsClosedTop(current) || - (!NW_Object_IsInstanceOf(current, &NW_LMgr_FlowBox_Class))) - { - break; - } - } - while ((current = - NW_LMgr_BidiFlowBox_GetFirstBlock(current)) - != NULL); - - finalMargin = (NW_GDI_Metric_t)(finalPositive - finalNegative); - - /* Advance the current position */ - status = NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, finalMargin, NW_TRUE); - _NW_THROW_ON_ERROR(status); - } - else if (index != 0) - { - - if (parentContext->pendingMargin < 0) - { - finalPositive = 0; - finalNegative = (NW_GDI_Metric_t)( -(parentContext->pendingMargin)); - } - else - { - finalPositive = parentContext->pendingMargin; - finalNegative = 0; - } - - current = box; - do - { - topMargin = - (NW_GDI_Metric_t)NW_LMgr_Box_GetModelProp(current, - NW_CSS_Prop_topMargin); - if (topMargin < 0) - { - finalNegative = (NW_GDI_Metric_t)((finalNegative < -topMargin) - ? -topMargin : finalNegative); - } - else - { - finalPositive = (NW_GDI_Metric_t)((finalPositive < topMargin) - ? topMargin : finalPositive); - } - if (IsClosedTop(current) || - (!NW_Object_IsInstanceOf(current, &NW_LMgr_FlowBox_Class))) - { - break; - } - } - while ((current = - NW_LMgr_BidiFlowBox_GetFirstBlock(current)) - != NULL); - - /* Calculate the collapsed margin */ - finalMargin = (NW_GDI_Metric_t)(finalPositive - finalNegative); - - /* Advance the current position & reset any pending margin */ - status = NW_LMgr_BidiFlowBox_NewLine (flow, parentContext, finalMargin, NW_TRUE); - _NW_THROW_ON_ERROR(status); - parentContext->pendingMargin = 0; - } - - /* Calculate the bottom margin */ - current = box; - do - { - bottomMargin = - (NW_GDI_Metric_t)NW_LMgr_Box_GetModelProp(current, - NW_CSS_Prop_bottomMargin); - - if (current == box) - { - if (bottomMargin < 0) - { - finalPositive = 0; - finalNegative = (NW_GDI_Metric_t)( -bottomMargin); - } - else - { - finalPositive = bottomMargin; - finalNegative = 0; - } - } - else - { - if (bottomMargin < 0) - { - finalNegative = (NW_GDI_Metric_t)((finalNegative < -bottomMargin) - ? -bottomMargin : finalNegative); - } - else - { - finalPositive = (NW_GDI_Metric_t)((finalPositive < bottomMargin) - ? bottomMargin : finalPositive); - } - } - if (IsClosedBottom(current) - || (!NW_Object_IsInstanceOf(current, &NW_LMgr_FlowBox_Class))) - { - break; - } - } - while ((current = - NW_LMgr_BidiFlowBox_GetLastBlock(current)) - != NULL); - - /* Calculate the collapsed margin */ - finalMargin = (NW_GDI_Metric_t)(finalPositive - finalNegative); - - /* Set the parentContext variable */ - parentContext->pendingMargin = finalMargin; - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - - - -/* --------------------------------------------------------------------------*/ -/* Private method to calculate the left margin of the flow at position y. - */ - -NW_GDI_Metric_t TLMgr_BoxFormatter::NW_LMgr_FlowBox_GetLineStart(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_GDI_Metric_t where) - { - NW_ADT_Vector_Metric_t floatCount, index; - NW_GDI_Metric_t leftMargin; - NW_GDI_Metric_t floatRight, floatTop, floatBottom; - NW_LMgr_Box_t *floatBox; - NW_LMgr_PropertyValue_t floatValue; - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - NW_LMgr_FrameInfo_t margin; - - NW_REQUIRED_PARAM(flow); - - leftMargin = parentContext->startMargin; - - if (placedFloats == NULL) - { - return leftMargin; - } - - floatCount = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(placedFloats)); - - for (index = 0; index < floatCount; index++) - { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - if( floatBox != flow ) - { - NW_ASSERT(floatBox != NULL); - - floatValue.integer = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - if (floatValue.token == NW_CSS_PropValue_left) - { - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameTop|ELMgrFrameBottom|ELMgrFrameRight ); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - floatTop = (NW_GDI_Metric_t)(boxBounds.point.y - margin.top); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - floatRight = (NW_GDI_Metric_t)(boxBounds.point.x - + boxBounds.dimension.width - + margin.right); - - if ((where >= floatTop) - && (where < floatBottom) - && (leftMargin < floatRight)) - { - leftMargin = floatRight; - } - } - } - } - return leftMargin; - } - - -/* --------------------------------------------------------------------------*/ -/* Private method to calculate the left margin of the flow at position y. - */ - -NW_GDI_Metric_t TLMgr_BoxFormatter::NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext, - NW_GDI_Metric_t where) - { - NW_ADT_Vector_Metric_t floatCount, index; - NW_GDI_Metric_t rightMargin; - NW_GDI_Metric_t floatLeft, floatTop, floatBottom; - NW_LMgr_Box_t *floatBox; - NW_LMgr_PropertyValue_t floatValue; - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - NW_LMgr_FrameInfo_t margin; - - NW_REQUIRED_PARAM(flow); - - rightMargin = parentContext->endMargin; - - if (placedFloats == NULL) - { - return rightMargin; - } - - floatCount = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(placedFloats)); - - for (index = 0; index < floatCount; index++) - { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - NW_ASSERT(floatBox != NULL); - - if( floatBox != flow ) - { - floatValue.integer = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - if (floatValue.token == NW_CSS_PropValue_right) - { - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameTop|ELMgrFrameBottom|ELMgrFrameLeft ); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - floatTop = (NW_GDI_Metric_t)(boxBounds.point.y - margin.top); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - floatLeft = (NW_GDI_Metric_t)(boxBounds.point.x - - margin.left - 1); - - if ((where >= floatTop) - && (where < floatBottom) - && (rightMargin > floatLeft)) - { - rightMargin = floatLeft; - } - } - } - } - return rightMargin; - } -/* --------------------------------------------------------------------------*/ -/* A method to test whether the flow is at the beginning of a line */ - - -NW_Bool TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_AtNewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* parentContext) - { - NW_REQUIRED_PARAM(flow); - - if (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - { - if (parentContext->x == - parentContext->lineStart + NW_LMgr_FlowBox_GetIndentation(flow, parentContext)) - { - return NW_TRUE; - } - else - { - return NW_FALSE; - } - } - else - { - if (parentContext->x == - parentContext->lineEnd - NW_LMgr_FlowBox_GetIndentation(flow, parentContext)) - { - return NW_TRUE; - } - else - { - return NW_FALSE; - } - } - - } - - - -/* --------------------------------------------------------------------------*/ -/* A method to get the current formatting constraint */ - -void TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetConstraint(NW_LMgr_Box_t *flow, - NW_LMgr_FormatContext_t *parentContext, - NW_GDI_Metric_t *constraint) - { - NW_REQUIRED_PARAM(flow); - - /* Allow the remaining space on the current line for constraint width */ - if (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - { - *constraint = (NW_GDI_Metric_t)(parentContext->lineEnd - parentContext->x); - } - else - { - *constraint = (NW_GDI_Metric_t)(parentContext->x - parentContext->lineStart); - } - - if (*constraint < 0) - { - *constraint = 0; - } - } - -/* ----------------------------------------------------------------------------*/ -/* TODO: Add support for "auto" margins. - */ -void TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetBlockMargins (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t *parentContext, - NW_LMgr_FrameInfo_t *margin) - { - - NW_GDI_Dimension2D_t boxSize; - NW_LMgr_FrameInfo_t boxMargin, isAuto; - - NW_REQUIRED_PARAM(flow); - - /* Rule boxes get special handling */ - if (NW_Object_IsClass(box, &NW_LMgr_RuleBox_Class)) - { - margin->left = margin->right = 0; - return ; - } - - NW_LMgr_Box_GetMargins(box, &boxMargin, &isAuto, ELMgrFrameLeft|ELMgrFrameRight ); - NW_LMgr_Box_GetSizeProperties(box, &boxSize); - - if (boxSize.width <= 0) - { - margin->left = boxMargin.left; - margin->right = boxMargin.right; - } - else - { - if (isAuto.right && isAuto.left) - { - margin->left = (NW_GDI_Metric_t)((parentContext->endMargin - parentContext->startMargin - boxSize.width) / 2); - margin->right = margin->left; - } - else if (isAuto.left) - { - margin->left = (NW_GDI_Metric_t)(parentContext->endMargin - parentContext->startMargin - boxSize.width - boxMargin.right); - margin->right = boxMargin.right; - } - else - { - margin->left = boxMargin.left; - margin->right = (NW_GDI_Metric_t)(parentContext->endMargin - parentContext->startMargin - boxSize.width - boxMargin.left); - } - } - } - -/* ----------------------------------------------------------------------------*/ -/* Private method to place a child box at the current location in the flow. - * Because a child can also be a container, we call the virtual shift method - * to do the placing. It will automatically shift all the children as well. - */ - -void TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PlaceChild(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_REQUIRED_PARAM(flow); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - boxBounds.point.x = parentContext->x; - boxBounds.point.y = parentContext->y; - - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - // This allow it to skip drawing images until they are "placed". - if (NW_Object_IsInstanceOf(box, &NW_LMgr_ImgContainerBox_Class)) - { - NW_LMgr_ImgContainerBox_ImageIsPlaced(box); - } - } - -/* ----------------------------------------------------------------------------*/ -/* Private method to place a child box at a specified location in the flow. - * Because a child can also be a container, we call the virtual shift method - * to do the placing. It will automatically shift all the children as well. - */ - -void TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PlaceChildAt(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_GDI_Metric_t x, - NW_GDI_Metric_t y) - { - NW_REQUIRED_PARAM(flow); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.point.x = x; - boxBounds.point.y = y; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - // This allow it to skip drawing images until they are "placed". - if (NW_Object_IsInstanceOf(box, &NW_LMgr_ImgContainerBox_Class)) - { - NW_LMgr_ImgContainerBox_ImageIsPlaced(box); - } - } - -/* --------------------------------------------------------------------------*/ -/* A protected method to handle formatting of replaceable boxes */ -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t whitespaceVal; - NW_LMgr_PropertyValueToken_t whitespace; - NW_LMgr_ContainerBox_t *parent; - NW_GDI_Metric_t constraint; - NW_LMgr_Box_t* splitBox; - NW_LMgr_RootBox_t* rootBox; - NW_LMgr_FrameInfo_t margin; - NW_Bool finished = NW_FALSE; - NW_Bool hasLeadingWS = NW_FALSE; - NW_Bool hasTrailingWS = NW_FALSE; - NW_Bool endsInNewline = NW_FALSE; - NW_Bool atNewline = NW_FALSE; - NW_Uint8 splitFlags; - NW_Bool wrap = NW_FALSE; - NW_LMgr_PropertyValue_t displayVal; - NW_Bool ltr; - NW_Bool wrapOn; - - NW_TRY(status) - { - // NW_LOG5(NW_LOG_LEVEL5, "HANDLE INLINE ::: flow %x, box %x , context %x, parentcontext y: %d, ht %d", flow, box, - // parentContext, parentContext->y, box->bounds.dimension.height ); - - /* Get the parent of the box */ - parent = NW_LMgr_Box_GetParent(box); - rootBox = NW_LMgr_Box_GetRootBox( box ); - wrapOn = NW_LMgr_RootBox_GetWrapEnabled( rootBox ); - - /* Get the whitespace property */ - whitespaceVal.token = NW_CSS_PropValue_normal; - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), - NW_CSS_Prop_whitespace, - NW_CSS_ValueType_Token, &whitespaceVal); - NW_THROW_ON(status, KBrsrOutOfMemory); - whitespace = whitespaceVal.token; - - /* This var tells us how to treat whitespace */ - if (whitespace == NW_CSS_PropValue_normal) - { - wrap = NW_TRUE; - } - if( wrapOn && (whitespace == NW_CSS_PropValue_nowrap)) - { - NW_LMgr_Box_t *surroundingBlock = NW_LMgr_Box_FindBoxOfClass(box, &NW_LMgr_FlowBox_Class, NW_TRUE); - if (!NW_Object_IsInstanceOf(surroundingBlock, &NW_LMgr_MarqueeBox_Class)) - { - wrap = NW_TRUE; - } - } - if( wrapOn && (whitespace == NW_CSS_PropValue_pre)) - { - wrap = NW_TRUE; - } - NW_LMgr_Box_t *surroundingBlock = NW_LMgr_Box_FindBoxOfClass(box, &NW_LMgr_FlowBox_Class, NW_TRUE); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf( flow ) ); - - if ( wrapOn && !NW_Object_IsInstanceOf(surroundingBlock, &NW_LMgr_MarqueeBox_Class) && - NW_LMgr_RootBox_GetSmallScreenOn( rootBox )) - { - wrap = NW_TRUE; - } - - if (parentContext->direction == NW_GDI_FlowDirection_LeftRight) - { - ltr = NW_TRUE; - } - else - { - ltr = NW_FALSE; - } - - - /* Check whether we are at newline before adding the margin */ - atNewline = NW_LMgr_BidiFlowBox_AtNewLine(flow, parentContext); - - /* Get the box margins */ - NW_LMgr_Box_GetMargins(box, &margin, NULL, ELMgrFrameLeft|ELMgrFrameRight); - - /* Add any pending inline margin */ - if (ltr) - { - parentContext->x = (NW_GDI_Metric_t)(parentContext->x + - margin.left + - parentContext->pendingInlineMargin); - } - else - { - parentContext->x = (NW_GDI_Metric_t)(parentContext->x - - margin.right - - parentContext->pendingInlineMargin); - } - - if (NW_Object_IsInstanceOf(box, &NW_LMgr_AbstractTextBox_Class)) - { - status = NW_LMgr_AbstractTextBox_GetWS(NW_LMgr_AbstractTextBoxOf(box), - &hasLeadingWS, - &hasTrailingWS, - &endsInNewline); - NW_THROW_ON_ERROR(status); - - if (whitespace != NW_CSS_PropValue_pre) - { - if (atNewline) - { - NW_LMgr_AbstractTextBox_CompressLeading(NW_LMgr_AbstractTextBoxOf(box)); - } - else if (parentContext->pendingWhitespace) - { - NW_LMgr_AbstractTextBox_CompressLeading(NW_LMgr_AbstractTextBoxOf(box)); - } - } - } - - /* Get the display property */ - displayVal.token = NW_CSS_PropValue_display_inline; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &displayVal); - NW_THROW_ON(status, KBrsrOutOfMemory); - /* This code deals with the cases for input and textarea boxes with block property */ - if ((displayVal.token == NW_CSS_PropValue_display_block) && - (!atNewline)) - { - (void)NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, 0, NW_TRUE); - } - - - while (!finished) - { - - /* Set the initial constraint used for splitting and sizing boxes */ - NW_LMgr_BidiFlowBox_GetConstraint(flow, parentContext, &constraint); - - /* Get the box to size itself */ - status = NW_LMgr_Box_Resize(box, parentContext); - NW_THROW_ON_ERROR(status); - - splitFlags = 0; - if (atNewline) - { - splitFlags |= NW_LMgr_Box_SplitFlags_AtNewLine; - } - if (!parentContext->pendingWhitespace && - !hasLeadingWS) - { - splitFlags |= NW_LMgr_Box_SplitFlags_NoPendingWS; - } - if (!wrap) - { - splitFlags |= NW_LMgr_Box_SplitFlags_Nowrap; - } - - /* Do the split */ - status = NW_LMgr_Box_Split(box, constraint, &splitBox, splitFlags); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if (status == KBrsrSuccess || (status == KBrsrLmgrNoSplit && (!wrap)) ) - { - - /* If split box is different than NULL, a new split box has been - created; before proceeding we need to insert the new split box - into the flow */ - if (splitBox != NULL) - { - - /* Insert the split box into parent's child list just after the original */ - status = NW_LMgr_ContainerBox_InsertChildAft (parent, splitBox, box); - NW_THROW_ON_ERROR(status); - - /* If the box was split, it needs to resize */ - status = NW_LMgr_Box_Resize (box, parentContext); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - /* For RTL we must modify parentContext beforehand */ - if (!ltr) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - parentContext->x = (NW_GDI_Metric_t) (parentContext->x - boxBounds.dimension.width); - } - - /* The y placement that is set here will get readjusted when - the line is flushed */ - NW_LMgr_BidiFlowBox_PlaceChild(flow, box, parentContext); - - - /* Add split box to current line */ - status = NW_LMgr_LineBox_Append(parentContext->currentLine, box, parentContext->direction); - NW_THROW_ON_ERROR(status); - - /* Update the parentContext to reflect the addition of the new box */ - if (ltr) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - parentContext->x = (NW_GDI_Metric_t) (parentContext->x + boxBounds.dimension.width); - } - - parentContext->pendingInlineMargin = 0; - parentContext->pendingWhitespace = hasTrailingWS; - - - if (splitBox == NULL) - { - /* Now we can add the remaining margin */ - if (ltr) - { - parentContext->x = (NW_GDI_Metric_t) (parentContext->x + margin.right); - } - else - { - parentContext->x = (NW_GDI_Metric_t) (parentContext->x - margin.left); - } - - /* If we are in a pre paragraph, we have to make sure that the text - box did not end in a newline. If it did, we must jump to - the next line. */ - if (endsInNewline) - { - (void)NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, 0, NW_TRUE); - } - - /* We're done */ - finished = NW_TRUE; - } - else - { - /* If the box was split, we must jump to the new line */ - /* pass NW_FALSE because we don't indent the new line */ - status = NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, 0, NW_FALSE); - NW_THROW_ON_ERROR(status); - atNewline = NW_TRUE; - - /* Now handle the split box */ - box = splitBox; - - /* Reset the WS values */ - if (NW_Object_IsInstanceOf(box, &NW_LMgr_AbstractTextBox_Class)) - { - status = NW_LMgr_AbstractTextBox_GetWS(NW_LMgr_AbstractTextBoxOf(box), - &hasLeadingWS, - &hasTrailingWS, - &endsInNewline); - NW_THROW_ON_ERROR(status); - - NW_LMgr_AbstractTextBox_CompressLeading(NW_LMgr_AbstractTextBoxOf(box)); - } - } - } - else - { - /* Jump to newline */ - (void)NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, 0, NW_TRUE); - atNewline = NW_TRUE; - - /* We need to add the margins again, because the split did not succeed. - * If a split has already occurred, we will not redisplay the margins. - * The algorithm will have set the margin values to zero. */ - - if (ltr) - { - parentContext->x = (NW_GDI_Metric_t) (parentContext->x + - parentContext->pendingInlineMargin + - margin.left); - } - else - { - parentContext->x = (NW_GDI_Metric_t) (parentContext->x - - parentContext->pendingInlineMargin - - margin.right); - } - - /* Reinit the WS parentContext */ - parentContext->pendingWhitespace = NW_FALSE; - if (NW_Object_IsInstanceOf(box, &NW_LMgr_AbstractTextBox_Class)) - { - NW_LMgr_AbstractTextBox_CompressLeading(NW_LMgr_AbstractTextBoxOf(box)); - } - } - } - if (displayVal.token == NW_CSS_PropValue_display_block) - { - (void)NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, 0, NW_TRUE); - } - - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } NW_END_TRY; - } - - - -/* --------------------------------------------------------------------------*/ -/* - * A special case to handle containers inline: containers are - * sometimes used as invisible boxes that link together a number of - * children such as the contents of an HTML <a> element. This method - * handles this case: the container children are flowed within - * the parent flow parentContext--hence the box has no visible result in the - * enclosing flow--but the children are maintained in the box tree as - * children of the invisible container. This allows them to be treated - * as a group for such purposes as handling an action (such as the <a> - * element link handler). */ - -/* TODO: We'd really like to get rid of this method so that no special - * casing of containers (requiring runtime type checking) is - * needed. This is actually the "real" container box "resize" - * method. Unfortunately, this requires that the parent parentContext be - * available (since containers don't have their own formatting - * contexts). Currently there is no way to get this since contexts - * aren't attached to objects that use them, so we can't walk up the - * ancestor tree looking for one. - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleInlineContainer(NW_LMgr_Box_t* flow, - NW_LMgr_ContainerBox_t* container, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_EmptyBox_t *emptyBox; - NW_LMgr_Property_t prop; - NW_LMgr_FrameInfo_t margin, padding, borderWidth; - NW_LMgr_PropertyValue_t clearValue; - - NW_TRY(status) - { - - clearValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(container), NW_CSS_Prop_clear, - NW_CSS_ValueType_Token, &clearValue); - - /* Advance to the next clear position, if necessary */ - status = NW_LMgr_BidiFlowBox_AdvanceToClear(flow, parentContext, clearValue.token); - _NW_THROW_ON_ERROR(status); - - /* If the inline container is empty, we'll add an empty box to it - as a placeholder */ - if (NW_LMgr_ContainerBox_GetChildCount(container) == 0) - { - emptyBox = NW_LMgr_EmptyBox_New(1); - NW_THROW_OOM_ON_NULL(emptyBox, status); - - status = NW_LMgr_ContainerBox_AddChild(container, - NW_LMgr_BoxOf(emptyBox)); - _NW_THROW_ON_ERROR(status); - - /* We top-align the box (this is useful for empty anchors that point to - * fragments */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_top; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(emptyBox), - NW_CSS_Prop_verticalAlign, &prop); - _NW_THROW_ON_ERROR(status); - } - - /* Add our left margin to the pending left margin in the parentContext */ - NW_LMgr_Box_GetMargins(NW_LMgr_BoxOf(container), &margin, NULL, ELMgrFrameLeft ); - NW_LMgr_Box_GetPadding(NW_LMgr_BoxOf(container), &padding, ELMgrFrameLeft ); - NW_LMgr_Box_GetBorderWidth(NW_LMgr_BoxOf(container), &borderWidth, ELMgrFrameLeft ); - parentContext->pendingInlineMargin = (NW_GDI_Metric_t) - (parentContext->pendingInlineMargin + margin.left + padding.left - + borderWidth.left); - - /* - * Flow the container children within the enclosing flow. - * Note that the first argument to FlowChildren is the - * enclosing flow and the second argument is the container - * whose children will be flowed within the enclosing flow. - */ - - parentContext->formatChildren = NW_TRUE; - parentContext->formatBox = flow; - parentContext->newFormatContext = parentContext; - parentContext->referenceCount++; - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleInlineContainerPost(NW_LMgr_Box_t* /*flow*/, - NW_LMgr_ContainerBox_t* container, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_FrameInfo_t margin, padding, borderWidth; - - /* If the inline container is empty, we'll add an empty box to it - as a placeholder */ - /* Add our left margin to the pending left margin in the parentContext */ - NW_LMgr_Box_GetMargins(NW_LMgr_BoxOf(container), &margin, NULL, ELMgrFrameRight ); - NW_LMgr_Box_GetPadding(NW_LMgr_BoxOf(container), &padding, ELMgrFrameRight ); - NW_LMgr_Box_GetBorderWidth(NW_LMgr_BoxOf(container), &borderWidth, ELMgrFrameRight ); - - /* - * Flow the container children within the enclosing flow. - * Note that the first argument to FlowChildren is the - * enclosing flow and the second argument is the container - * whose children will be flowed within the enclosing flow. - */ - - /* If we had no displayable children, our margins should be ignored */ - if (parentContext->pendingInlineMargin != 0) - { - parentContext->pendingInlineMargin = 0; - } - else - { - /* Otherwise, we add the right margin */ - parentContext->x = (NW_GDI_Metric_t) (parentContext->x + margin.right - + padding.right + borderWidth.right); - } - - return KBrsrSuccess; - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleBlock (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_GDI_Metric_t constraint; - NW_LMgr_PropertyValue_t clearValue; - NW_LMgr_FrameInfo_t margin; - NW_Bool lineConstraint = NW_TRUE; - NW_LMgr_ContainerBox_t* containerBox; - NW_Uint16 childCount; - NW_Uint16 childIndex; - NW_LMgr_Box_t* childBox; - NW_ADT_Vector_Metric_t index; - NW_LMgr_EmptyBox_t *emptyBox; - - NW_TRY(status) - { - /* Get the "clear" property */ - clearValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_clear, - NW_CSS_ValueType_Token, &clearValue); - - /* This determines what kind of constraint we need */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_FlowBox_Class)) - { - - lineConstraint = NW_FALSE; - - containerBox = NW_LMgr_ContainerBoxOf (box); - childCount = NW_LMgr_ContainerBox_GetChildCount (containerBox); - - //if this flow box doesn't have any child and also it has attribute height, then - //we need to create an empty textbox as its child. The reason is to fix the bug as: - //<div height=xx color=red></div> - //text here - //if we don't create an empty box, there will be overlap between div section and text. - if (childCount == 0) - { - NW_LMgr_Property_t property; - status = NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_height, &property); - if (status == KBrsrSuccess) - { - //creat an empty text box - emptyBox = NW_LMgr_EmptyBox_New(1); - NW_THROW_OOM_ON_NULL(emptyBox, status); - - //add it as the flowbox child - status = NW_LMgr_ContainerBox_AddChild(containerBox, NW_LMgr_BoxOf(emptyBox)); - _NW_THROW_ON_ERROR(status); - } - } - - for (childIndex = 0; childIndex < childCount; childIndex++) - { - - childBox = NW_LMgr_ContainerBox_GetChild (containerBox, childIndex); - if (NW_Object_IsClass (childBox, &NW_LMgr_StaticTableBox_Class)) - { - lineConstraint = NW_TRUE; - } - } - } - - /* Move to new line */ - status = NW_LMgr_BidiFlowBox_NewLine (flow, parentContext, 0, NW_TRUE); - _NW_THROW_ON_ERROR(status); - - /* Get the position of the current block in the flow */ - index = NW_LMgr_ContainerBox_GetChildIndex(NW_LMgr_ContainerBoxOf(flow), box); -// NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf( flow ) ); - -// if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) -// { - // Many times the flow is not the direct parent of the box - // For e.g. <p><span>Foo - // while formatting Foo, flowbox belongs to p and not to span, so - // the box will not be a child of Flow. We want to avoid such cases. - if ((index > 0) && (NW_LMgr_BoxOf(flow) == NW_LMgr_BoxOf(box->parent))) - { - // get the previous sibling - NW_LMgr_Box_t* child = - NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(flow), (NW_ADT_Vector_Metric_t)(index-1)); - NW_ASSERT(child); - - // if previous sibling of this flow box is not of type flow, remove extra line spacing - // that was added in HandleInline of prev sibling. If the tree was normalized, i.e if the prevsibling - // was surrounded by anonymous FlowBox, this subtraction would have occurred in PostFormat - // For e.g <p><img/><div>Bar</div> - // Here PostFormat of the anonymous FlowBox around <img> that was created in Initialize, would - // have removed the extra spacing. But since we do not have anonymous FlowBox, we will have to - // remove it in HandleBlock of div - if (child && !NW_Object_IsInstanceOf(child, &NW_LMgr_FlowBox_Class)) - { - TBool decreaseLineSpacing = ETrue; - - // For e.g. <p> - // <span><div>Foo</div> - // <div>Bar</div> - // </p> - // Here we do not have to remove the extra spacing, even though span is a container box, - // since PostFormat of first div will remove the extra spacing. SO, we look for the - // first child - if (NW_Object_IsInstanceOf(child, &NW_LMgr_ContainerBox_Class)) - { - // if child is a containerbox - check if the last child is a FlowBox, if yes - // don't fo the following, because FlowBox PostFormat will take care of it - childCount = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(child)); - if (childCount > 0) - { - NW_LMgr_Box_t* lastChild = - NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(child), (NW_ADT_Vector_Metric_t)(childCount-1)); - if (lastChild && NW_Object_IsInstanceOf(lastChild, &NW_LMgr_FlowBox_Class)) - { - // PostFormat of this FlowBox will take care of this - decreaseLineSpacing = EFalse; - } - } - } - if (decreaseLineSpacing && (parentContext->y >= KFlowBoxLineSpacing)) - { - parentContext->y = parentContext->y-KFlowBoxLineSpacing; - } - } - } -// } - - /* Get the horizontal margins for the box */ - NW_LMgr_BidiFlowBox_GetBlockMargins(flow, box, parentContext, &margin); - - /* Advance to the next clear position, if necessary */ - status = NW_LMgr_BidiFlowBox_AdvanceToClear(flow, parentContext, clearValue.token); - _NW_THROW_ON_ERROR(status); - - /* Set the size constraint for boxes that need to be constrained in order - to size themselves */ - if (!lineConstraint) - { - constraint = (NW_GDI_Metric_t) - (parentContext->endMargin - parentContext->startMargin - margin.left - margin.right); - } - else - { - constraint = (NW_GDI_Metric_t) - (parentContext->lineEnd - parentContext->lineStart - margin.left - margin.right); - } - - status = NW_LMgr_Box_Constrain(box, constraint); - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* Collapse any margins */ - status = NW_LMgr_BidiFlowBox_CollapseMargins(flow, box, parentContext, index); - _NW_THROW_ON_ERROR(status); - - // NW_LOG2(NW_LOG_LEVEL5, "Handle block::: after collapse margins : parentcontext y: %d, ht %d", parentContext->y, box->bounds.dimension.height); - /* Set the (x,y) coordinates of the block */ - if (!lineConstraint) - { - NW_LMgr_BidiFlowBox_PlaceChildAt(flow, box, - (NW_GDI_Metric_t)(parentContext->startMargin + margin.left), - parentContext->y); - } - else - { - NW_LMgr_BidiFlowBox_PlaceChildAt(flow, box, - (NW_GDI_Metric_t)(parentContext->lineStart + margin.left), - parentContext->y); - } - - /* Now have the box set its own idea of size */ - status = NW_LMgr_Box_Resize(box, parentContext); - _NW_THROW_ON_ERROR(status); - - // Deepika: There should not be special handling. PostFormat should be called on leaf - // node s as well - To be done later - if (NW_Object_IsInstanceOf(box, &NW_LMgr_MediaBox_Class) || - NW_Object_IsInstanceOf(box, &NW_FBox_FormBox_Class) ) - { - // In case of boxes which have fixed content size, e.g. RuleBox, there will not - // be any children to be formatted. They will be leaf nodes and there won't be - // any postformat performed on them. That's why we need to add new line here - status = NW_LMgr_BidiFlowBox_HandleBlockPost(flow, box, parentContext); - _NW_THROW_ON_ERROR(status); - } - } - - NW_CATCH(status) - { /* empty */ - } - - NW_FINALLY { - return status; - } NW_END_TRY; - } - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleBlockPost (NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - /* We're assuming that block boxes are always followed by a newline too. - If someone decides the CSS spec should be read differently, we can just - remove newline call. */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - TBrowserStatusCode status = NW_LMgr_BidiFlowBox_NewLine(flow, parentContext, - boxBounds.dimension.height, NW_TRUE); - return status; - - } - - -/* --------------------------------------------------------------------------*/ -/* returns: KBrsrLmgrNotClear, KBrsrSuccess */ -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_PlaceFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t floatValue; - NW_LMgr_FrameInfo_t margin; - - floatValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - NW_LMgr_Box_GetMargins(box, &margin, NULL, ELMgrFrameLeft|ELMgrFrameRight|ELMgrFrameTop); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - /* Check that there is enough room for the float */ - if (parentContext->lineEnd - parentContext->lineStart <= - boxBounds.dimension.width + margin.left + margin.right) - { - if ( NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class) && - NW_LMgr_ImgContainerBox_ImageIsBroken( box ) == NW_TRUE && - (parentContext->lineStart == 4)) - { - boxBounds.dimension.width = (NW_GDI_Metric_t)(parentContext->lineEnd - parentContext->lineStart); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - else - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - if(NW_LMgr_BidiFlowBox_AtNewLine(flow, parentContext)) - { - boxBounds.dimension.width = (NW_GDI_Metric_t)(parentContext->lineEnd - parentContext->lineStart); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - else - { - return KBrsrLmgrNotClear; - } - } - } - } - - /* Place the float in the flow */ - if (floatValue.token == NW_CSS_PropValue_left) - { - - NW_LMgr_BidiFlowBox_PlaceChildAt(flow, box, - ((NW_GDI_Metric_t) - (parentContext->lineStart + margin.left)), - ((NW_GDI_Metric_t) - (parentContext->y + margin.top))); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - parentContext->lineStart = - ((NW_GDI_Metric_t) - (parentContext->lineStart + boxBounds.dimension.width - + margin.left + margin.right)); - } - else - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - NW_LMgr_BidiFlowBox_PlaceChildAt(flow, box, - ((NW_GDI_Metric_t) - (parentContext->lineEnd - margin.right - - boxBounds.dimension.width)), - ((NW_GDI_Metric_t) - (parentContext->y + margin.top))); - parentContext->lineEnd = - ((NW_GDI_Metric_t) - (parentContext->lineEnd - boxBounds.dimension.width - - margin.left - margin.right)); - } - return KBrsrSuccess; - } - -/* --------------------------------------------------------------------------*/ -/* A method to handle float boxes. - * returns: KBrsrLmgrNotClear, KBrsrOutOfMemory, - * KBrsrUnexpectedError - */ -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleFloat(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t clearValue; - NW_Bool isClearLeft, isClearRight; - NW_LMgr_PropertyValueToken_t clearToken; - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - - if (placedFloats == NULL) - { - return KBrsrLmgrNotClear; - } - - clearValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_clear, - NW_CSS_ValueType_Token, &clearValue); - clearToken = clearValue.token; - - /* Get our parentContext info */ - isClearLeft = (NW_Bool)(parentContext->startMargin == parentContext->lineStart); - isClearRight = (NW_Bool)(parentContext->endMargin == parentContext->lineEnd); - - /* If we are not clear, add the box to the list of pending floats */ - if (!(((clearToken == NW_CSS_PropValue_left) && isClearLeft) - || ((clearToken == NW_CSS_PropValue_right) && isClearRight) - || ((clearToken == NW_CSS_PropValue_both) && isClearLeft && isClearRight) - || (clearToken == NW_CSS_PropValue_none)) - ) - { - return KBrsrLmgrNotClear; - } - - NW_TRY(status) - { - /* Format the float */ - if (NW_LMgr_Box_HasFixedContentSize(box)) - { - // Resize the float using its intrinsic width/height - status = NW_LMgr_Box_Resize(box, parentContext); - _NW_THROW_ON_ERROR(status); - - // Place the float - status = NW_LMgr_BidiFlowBox_PlaceFloat(flow, box, parentContext); - _NW_THROW_ON_ERROR(status); - - // In case of boxes which have fixed content size, e.g. image, there will not - // be any children to be formatted. They will be leaf nodes and there won't be - // any postformat performed on them. That's why we need to add them to - // placedFloat and reformat line boxes in this method, rather than in - // PostFormatFloat - - // Add the float to the vector - void *floatPtr = NW_ADT_DynamicVector_InsertAt(placedFloats, &box, NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(floatPtr, status); - - // Reformat any boxes that are already on the line - status = NW_LMgr_BidiFlowBox_ReformatLine(flow, parentContext); - _NW_THROW_ON_ERROR(status); - - // if floating fixed size box was inside an <a> tag currently ActiveContainerBox - // will not get resized. So, we explicitly resize it here - if (NW_Object_IsInstanceOf(box->parent, &NW_LMgr_ActiveContainerBox_Class)) - { - status = NW_LMgr_ContainerBox_ResizeToChildren(box->parent); - _NW_THROW_ON_ERROR(status); - - } - } - else - { - NW_LMgr_Property_t wprop; - - wprop.value.token = NW_CSS_PropValue_auto; - wprop.type = NW_CSS_ValueType_Token; - (void)NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_width, &wprop); - - if ((wprop.type == NW_CSS_ValueType_Token) - && (wprop.value.token == NW_CSS_PropValue_auto)) - { - /* Set the auto width to 25% -- this is completely arbitrary, - but makes better sense than not showing the box altogether */ - wprop.type = NW_CSS_ValueType_Percentage; - wprop.value.decimal = 25; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_width, &wprop); - _NW_THROW_ON_ERROR(status); - /* set the flag so that we know that this width was set by float */ - wprop.type = NW_CSS_ValueType_Token; - wprop.value.token = NW_CSS_PropValue_flags_floatWidth; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_flags, &wprop); - _NW_THROW_ON_ERROR(status); - } - /* Constrain using the width property */ - status = NW_LMgr_Box_Constrain(box, 0); - if (status != KBrsrLmgrConstraintTooSmall) - { - /* just ignore too small */ - _NW_THROW_ON_ERROR(status); - } - - /* Place the float */ - status = NW_LMgr_BidiFlowBox_PlaceFloat(flow, box, parentContext); - _NW_THROW_ON_ERROR(status); - - /* Resize the float */ - status = NW_LMgr_Box_Resize(box, parentContext); - _NW_THROW_ON_ERROR(status); - } - - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - - - -/* ----------------------------------------------------------------------------*/ -/* A private method to handle break boxes. */ -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_HandleBreak(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_LMgr_PropertyValue_t clearValue; - - NW_TRY(status) - { - /* Resize */ - - status = NW_LMgr_Box_Resize(box, parentContext); - _NW_THROW_ON_ERROR(status); - - /* Add the break box to the line */ - status = NW_LMgr_LineBox_Append(parentContext->currentLine, box, parentContext->direction); - _NW_THROW_ON_ERROR(status); - - /* Set the (x,y) coordinates for the box */ - NW_LMgr_BidiFlowBox_PlaceChild(flow, box, parentContext); - - /* If the box dimensions (ht/width) are zero, we do not want this box to participate in - the layout and create a new line (for e.g. in the vertical layout mode */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.height == 0) && (boxBounds.dimension.width == 0)) - NW_THROW_SUCCESS(status); - - /* Jump to the next line */ - status = NW_LMgr_BidiFlowBox_NewLine (flow, parentContext, 0, NW_TRUE); - _NW_THROW_ON_ERROR(status); - - /* Get the "clear" property */ - clearValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_clear, - NW_CSS_ValueType_Token, &clearValue); - - /* Advance to the next clear position, if necessary */ - status = NW_LMgr_BidiFlowBox_AdvanceToClear(flow, parentContext, clearValue.token); - _NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) - {} - NW_FINALLY { - return status; - } - NW_END_TRY - } - - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_BidiFlowBox_Initialize - * A public method to add any anonymous block container boxes to - * a block container that contains both block and inline content. - * This assures that all content in a block box participates - * in the same format context (either block or inline). This becomes - * essential when margins are collapsed. CSS2 p98. - */ - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_Initialize(NW_LMgr_BidiFlowBox_t *flow) - { - NW_ADT_Vector_Metric_t startInlineContent = 0; - NW_ADT_Vector_Metric_t endInlineContent = 0; - NW_ADT_Vector_Metric_t childIndex; - NW_ADT_Vector_Metric_t childCount; - NW_ADT_Vector_Metric_t i; - NW_LMgr_Box_t *childBox; - NW_LMgr_ContainerBox_t *container = NW_LMgr_ContainerBoxOf(flow); - NW_LMgr_Box_t *inlineChild; - NW_LMgr_PropertyValue_t dispValue; - NW_LMgr_PropertyValue_t floatValue; - NW_LMgr_Property_t prop; - NW_Bool inlineStarted = NW_FALSE, inlineEnded = NW_FALSE; - NW_Bool containsBlocks = NW_FALSE; - NW_Bool childIsBlock = NW_FALSE; - NW_LMgr_Box_t *anonBlock = NULL; - NW_Bool canCollapse = NW_TRUE; - - NW_TRY(status) - { - childIndex = 0; - while (childIndex < NW_LMgr_ContainerBox_GetChildCount(container)) - { - // Get the box at position i - childBox = NW_LMgr_ContainerBox_GetChild(container, childIndex); - - if (NW_Object_IsInstanceOf(childBox, &NW_LMgr_SplitTextBox_Class)) - { - NW_Object_Delete(childBox); - childBox = NULL; - continue; - } - - childIndex++; - } - - childCount = NW_LMgr_ContainerBox_GetChildCount(container); - - for (childIndex = 0; childIndex < childCount; childIndex++) - { - // Get the box at position i - childBox = NW_LMgr_ContainerBox_GetChild(container, childIndex); - - NW_LMgr_PropertyValue_t positionVal; - - positionVal.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(childBox, NW_CSS_Prop_position, - NW_CSS_ValueType_Token, &positionVal); - if(positionVal.token == NW_CSS_PropValue_position_absolute) - { - // absolute positioned boxes should not cause a new format context to be created - continue; - } - // If any of the children are block-level, set the flag - dispValue.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(childBox, NW_CSS_Prop_display, NW_CSS_ValueType_Token, &dispValue); - floatValue.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(childBox, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatValue); - if (((dispValue.token == NW_CSS_PropValue_display_block) || - (dispValue.token == NW_CSS_PropValue_display_listItem)) && - (floatValue.token == NW_CSS_PropValue_none)) - { - containsBlocks = NW_TRUE; - childIsBlock = NW_TRUE; - } - - /* We have found some inline content */ - else - { - childIsBlock = NW_FALSE; - - if (!inlineStarted) - { - startInlineContent = childIndex; - inlineStarted = NW_TRUE; - } - } - - /* If we have encountered any inline content previously, and now we - encounter a block following it, or we are the end of the container, - we must enclose any inline elements with an anonymous block box. */ - if (childIsBlock && inlineStarted) - { - endInlineContent = (NW_ADT_Vector_Metric_t)(childIndex - 1); - inlineEnded = NW_TRUE; - } - - else if (inlineStarted && (childIndex == childCount-1) && containsBlocks) - { - endInlineContent = childIndex; - inlineEnded = NW_TRUE; - } - - if (inlineEnded) - { - // Create the anonymous container */ - anonBlock = (NW_LMgr_Box_t*)LMgrAnonBlock_New(0); - NW_THROW_OOM_ON_NULL(anonBlock, status); - - // Move the inline children to the new block box - for (i = startInlineContent; i <= endInlineContent; i++) - { - inlineChild = NW_LMgr_ContainerBox_GetChild(container, - startInlineContent); - - // Get the minimum size - if (canCollapse) - { - if (NW_Object_IsInstanceOf(inlineChild, &NW_LMgr_AbstractTextBox_Class)) - { - canCollapse = NW_LMgr_AbstractTextBox_IsBlank(NW_LMgr_AbstractTextBoxOf(inlineChild)); - _NW_THROW_ON_ERROR(status); - } - else - { - canCollapse = NW_FALSE; - } - } - - // Add the child to the new flow - status = - NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(anonBlock), - inlineChild); - _NW_THROW_ON_ERROR(status); - - childCount--; - childIndex--; - } - - // If the inline content appears to be empty, - // do not add it to the flow - if (!canCollapse) - { - // Insert the new container - status = NW_LMgr_ContainerBox_InsertChildAt(container, anonBlock, - startInlineContent); - _NW_THROW_ON_ERROR(status); - - // Set the display property on the container - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(anonBlock, - NW_CSS_Prop_display, &prop); - _NW_THROW_ON_ERROR(status); - - // Update the variables - childCount ++; - childIndex ++; - } - else - { - NW_Object_Delete(anonBlock); - } - - // Reset the variables - anonBlock = NULL; - inlineStarted = NW_FALSE; - inlineEnded = NW_FALSE; - } - } - - } - NW_CATCH(status) - { - NW_Object_Delete(anonBlock); - } - NW_FINALLY - { - return status; - } - NW_END_TRY - - } - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_BidiFlowBox_InitializeSSL - * A public method to remove any empty text child box in small screen mode - */ - -TBrowserStatusCode -TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_InitializeSSL(NW_LMgr_BidiFlowBox_t *flow) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t childIndex; - NW_ADT_Vector_Metric_t childCount; - NW_LMgr_Box_t *childBox; - NW_LMgr_ContainerBox_t *container = NW_LMgr_ContainerBoxOf(flow); - - // remove empty text box - childCount = NW_LMgr_ContainerBox_GetChildCount(container); - - for (childIndex = 0; childIndex < childCount; childIndex++) - { - // Get the box at position i - childBox = NW_LMgr_ContainerBox_GetChild(container, childIndex); - - if( NW_Object_IsInstanceOf(childBox, &NW_LMgr_AbstractTextBox_Class) && - NW_LMgr_AbstractTextBox_IsBlank(NW_LMgr_AbstractTextBoxOf(childBox)) ) - { - NW_Object_Delete(childBox); - childBox = NULL; - - childCount--; - childIndex--; - } - } - - return status; - } - - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_BidiFlowBox_GetListMargin(NW_LMgr_FlowBox_t* flowBox) -{ - TBrowserStatusCode status; - NW_LMgr_Property_t prop; - NW_LMgr_Property_t propMargin; - NW_LMgr_PropertyName_t propName; - NW_LMgr_ContainerBox_t* parent; - - NW_ASSERT(flowBox != NULL); - parent = NW_LMgr_Box_GetParent(flowBox); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_ltr; - status = NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(flowBox), NW_CSS_Prop_textDirection, &prop); - - if (prop.value.token == NW_CSS_PropValue_ltr) { - propName = NW_CSS_Prop_leftMargin; - } - else { - propName = NW_CSS_Prop_rightMargin; - } - propMargin.type = NW_CSS_ValueType_Px; - status = NW_LMgr_Box_GetPropertyFromList(NW_LMgr_BoxOf(parent), NW_CSS_Prop_listMargin, &propMargin); - /* We set the value, it must be there */ - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_GetPropertyFromList(NW_LMgr_BoxOf(flowBox), propName, &propMargin); - if (status != KBrsrSuccess) { - /* The margin was not set yet */ - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(flowBox), propName, &propMargin); - } - } - return status; -} - -TBrowserStatusCode TLMgr_BoxFormatter::NW_LMgr_ResizeToFloat(NW_LMgr_Box_t* flow, NW_LMgr_FormatContext_t* parentContext) - { - NW_GDI_Rectangle_t flowBounds = NW_LMgr_Box_GetFormatBounds(flow); - NW_ADT_Vector_Metric_t floatCount, index; - NW_LMgr_Box_t *floatBox; - NW_LMgr_PropertyValue_t floatValue; - NW_GDI_Metric_t floatBottom; - NW_LMgr_FrameInfo_t margin; - - NW_ADT_DynamicVector_t *placedFloats = parentContext->placedFloats; - if (placedFloats) - { - floatCount = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(placedFloats)); - } - else - { - floatCount = 0; - } - - for (index = 0; index < floatCount; index++) - { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - if( floatBox != flow && flow == (NW_LMgr_Box_t *)NW_LMgr_Box_GetParent(floatBox)) - { - NW_ASSERT(floatBox != NULL); - - floatValue.integer = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameBottom ); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - floatBottom = (NW_GDI_Metric_t)( boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - - if( flowBounds.dimension.height + flowBounds.point.y < floatBottom) { - flowBounds.dimension.height = floatBottom - flowBounds.point.y ; - NW_LMgr_Box_SetFormatBounds(flow, flowBounds); - } - } - } - - return KBrsrSuccess; - } - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/BoxFormatHandler.cpp --- a/webengine/wmlengine/src/lmgr/src/BoxFormatHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1509 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Description : The class handles formatting of the boxes , refreshes the boxe on the postformatting, -* adds the active boxes to the tab list -* -*/ - - -// INCLUDE FILES -#include "BoxFormatHandler.h" -#include "nwx_logger.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" -#include "LMgrMarkerText.h" -#include "LMgrMarkerImage.h" -#include "LMgrAnonBlock.h" -#include "nw_lmgr_imagemapbox.h" -#include "nw_lmgr_posflowbox.h" - -#include <f32file.h> -#include <flogger.h> - - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TUint KRootBoxInitialHeight = 2; - -// MACROS - -// LOCAL CONSTANTS AND MACROS -//lint --e{752} local declarator not referenced -#ifdef _DEBUG_LOG -_LIT( KWmlBrowserLogDir, "browser" ); -_LIT( KLogFileName, "boxFormat.txt" ); -#endif - -// MODULE DATA STRUCTURES - -// FORWARD DECLARATIONS - -// ============================ MEMBER FUNCTIONS =============================== - -// -// returns last formatted box -// @return - last formatted box of the box tree -// -NW_LMgr_Box_t* CLMgr_BoxFormatHandler::GetLastBox() - { - NW_ADT_Vector_Metric_t numChildren = 0; - - iLastBoxToFormat = iRootBox; - do - { - const NW_ADT_Vector_t* children = NW_LMgr_ContainerBox_GetChildren ((NW_LMgr_ContainerBox_t*)iLastBoxToFormat); - numChildren = NW_ADT_Vector_GetSize (children ); - if (numChildren == 0 ) - break; - numChildren --; - iLastBoxToFormat = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, numChildren ); - } - while (NW_Object_IsInstanceOf (iLastBoxToFormat , - &NW_LMgr_ContainerBox_Class)); - NW_ASSERT (iLastBoxToFormat); - return iLastBoxToFormat; - } - -// -// The method clears all the items on the format stack and sets the current box to -// formatted to NULL -// -void CLMgr_BoxFormatHandler::ClearFormatStack() - { - while (!iFormatStack->IsEmpty()) - { - CFormatStackContext* formatStackContext = iFormatStack->Pop(); - delete formatStackContext ; - } - } - -void CLMgr_BoxFormatHandler::CFormatStackContext::CleanupStackContext(TAny* aFormatStackContext) - { - CFormatStackContext* formatStackContext = (CFormatStackContext*)aFormatStackContext; - delete formatStackContext; - } - -// deletes the format context if the reference count is zero else if > 0 decrements the reference count -CLMgr_BoxFormatHandler::CFormatStackContext::~CFormatStackContext() - { - if (iParentContext->newFormatContext) - { - if (iParentContext->newFormatContext != iParentContext && - iParentContext->newFormatContext->referenceCount == 0) - { -#ifdef _DEBUG - NW_LOG2(NW_LOG_LEVEL5, "Delete FormatContext :::::Pop box %x , context %x", iBox, iParentContext->newFormatContext); -#endif - iParentContext->newFormatContext = NULL; - } - else - { - iParentContext->newFormatContext->referenceCount--; - } - } - } - -// default contstructor -CLMgr_BoxFormatHandler::CFormatStackContext::CFormatStackContext(CLMgr_BoxFormatHandler* aBoxFormatHandler) - { - iBoxFormatHandler = aBoxFormatHandler; - } - -// copy constructor -CLMgr_BoxFormatHandler::CFormatStackContext::CFormatStackContext(const CFormatStackContext& - aFormatStackContext) - { - iBox = aFormatStackContext.iBox; - iParentFormatBox = aFormatStackContext.iParentFormatBox; - iParentContext = aFormatStackContext.iParentContext; - iBoxFormatHandler = aFormatStackContext.iBoxFormatHandler ; - // iParentContext->newFormatContext can be NULL if the box is a container box - if(iParentContext->newFormatContext) - { - iParentContext->newFormatContext->referenceCount++; - } - } - - -// -// The method handles post formatting on a box -// @param aFormatStackContext- Formatting context instance to be post formatted -// -void CLMgr_BoxFormatHandler::PostFormatL(CFormatStackContext& aFormatStackContext) - { - TBrowserStatusCode status = KBrsrSuccess; - TLMgr_BoxFormatter& formatter = GetBoxFormatter(aFormatStackContext.iBox); - - if ((NW_Object_IsInstanceOf (aFormatStackContext.iBox, &NW_LMgr_MarqueeBox_Class) || - NW_Object_IsInstanceOf (aFormatStackContext.iBox, &NW_LMgr_BidiFlowBox_Class)) && - NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aFormatStackContext.iBox )) > 0) - { - status = formatter.NW_LMgr_BidiFlowBox_PostFormat(aFormatStackContext.iParentContext->formatBox, NW_LMgr_ContainerBoxOf(aFormatStackContext.iBox ), aFormatStackContext.iParentContext->newFormatContext); - } - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_PostResize(aFormatStackContext.iBox); - if (status == KBrsrSuccess) - { - status = formatter.NW_LMgr_FlowBox_PostFormatBox(aFormatStackContext.iParentFormatBox, aFormatStackContext.iBox , aFormatStackContext.iParentContext ); - } - } - // interested in OOM , other errors are ignored - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - // update display - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( iRootBox ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( NW_LMgr_RootBoxOf( rootBox ) ) ) - { - NW_LMgr_Property_t prop; - - if (NW_LMgr_Box_GetProperty(aFormatStackContext.iBox, NW_CSS_Prop_gridModeApplied, - &prop) == KBrsrNotFound) - { - // update and refresh display - UpdateDisplayBounds( aFormatStackContext.iBox ); - RefreshBoxL( aFormatStackContext.iBox ); - - // Add it to the tab list - AddTabItemL( aFormatStackContext.iBox ); - } - } - else - { - NW_GDI_Rectangle_t bounds = NW_LMgr_Box_GetFormatBounds( aFormatStackContext.iBox ); - // if the box is in a cell, then the x any y coordinates do not get updated until - // the cellbox has not been resized so - // do not update until we get the real coordinates - if( bounds.point.x != 0 && bounds.point.y != 0) - { - UpdateDisplayBounds( aFormatStackContext.iBox ); - RefreshBoxL( aFormatStackContext.iBox ); - } - } - } - -void CLMgr_BoxFormatHandler::UpdateDisplayBounds( NW_LMgr_Box_t* aBox ) - { - NW_GDI_Rectangle_t bounds; - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( iRootBox ); - NW_Bool smallscreeOn = NW_LMgr_RootBox_GetSmallScreenOn( rootBox ); - - if( !iBackgroundFormat ) - { - if( NW_Object_IsInstanceOf( aBox, &NW_LMgr_ContainerBox_Class ) == NW_TRUE ) - { - NW_LMgr_ContainerBox_t* container = NW_LMgr_ContainerBoxOf( aBox ); - NW_ADT_Vector_Metric_t numChildren = NW_LMgr_ContainerBox_GetChildCount( container ); - - for( NW_ADT_Vector_Metric_t index = 0; index < numChildren; index++ ) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild( container, index ); - - if( NW_Object_IsInstanceOf( child, &NW_LMgr_ContainerBox_Class ) == NW_TRUE ) - { - // If you have the following markup: <a><div>Text</div></a>, The parentFlow is the div - // box - that gets formatted, but not the container for <a>. We need to add extra code to - // Resize the container. According to CSS, an inline container cannot have a block level - // box and InitializeTree normalizes the tree. So, we wouldn't be in this situation in normal mode. - // But in small screen mode, initialize tree is not run - so we need to handle that. - if( smallscreeOn ) - { - // that means that the child is either Container or ActiveContainer - if (!NW_Object_IsInstanceOf(child, &NW_LMgr_FormatBox_Class)) - { - bounds = NW_LMgr_Box_GetFormatBounds( child ); - if ((bounds.dimension.width == 0) || (bounds.dimension.height == 0)) - { - (void)NW_LMgr_ContainerBox_ResizeToChildren(NW_LMgr_ContainerBoxOf(child)); - } - } - } - UpdateDisplayBounds( child ); - - // Add table cellbox to the table list while in normal screen mode or - // when the cellbox is in a grid mode table. - NW_LMgr_Property_t prop; - - if( !smallscreeOn || (NW_LMgr_Box_GetProperty(child, NW_CSS_Prop_gridModeApplied, - &prop) == KBrsrSuccess)) - { - //if (!NW_Object_IsInstanceOf(child, &NW_LMgr_FormatBox_Class)) - if (NW_Object_IsInstanceOf(child, &NW_LMgr_ActiveContainerBox_Class)) - { - NW_LMgr_Box_t* tmpParent = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(child); - NW_LMgr_Box_t* tmpGrandParent = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(tmpParent); - if (NW_Object_IsInstanceOf(tmpParent, &NW_LMgr_BidiFlowBox_Class) && - NW_Object_IsInstanceOf(tmpGrandParent, &NW_LMgr_RootBox_Class)) - { - // we need to add active boxes contained within the ContainerBox. - // Active boxes within the FormatBox were added when PostFormat - // was called - AddSubTreeTabItemsL(child);// and add it to the tab list - } - } - else - { - // and add it to the tab list - AddTabItemL( child ); - } - } - } - else if (NW_Object_IsClass (child->parent, &NW_LMgr_MarqueeBox_Class) ) - { - bounds = NW_LMgr_Box_GetFormatBounds( child ); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( child->parent ), bounds ); - } - else - { - bounds = NW_LMgr_Box_GetFormatBounds( child ); - NW_LMgr_Box_UpdateDisplayBounds( child, bounds ); - } - } - } - bounds = NW_LMgr_Box_GetFormatBounds( aBox ); - NW_LMgr_Box_UpdateDisplayBounds( aBox, bounds ); - } - } - -// -// A two phase constructor that constructs and initializes CLMgr_BoxFormatHandler class -// leaves KErrNoMemory if out of memory -// @param aRootBox - flowBox to be formatted -// @param aSelectiveFormatting is ETrue if only a flowBox and its children needs to be formatted -// @return CLMgr_BoxFormatHandler* - pointer to the instance of class CLMgr_BoxFormatHandler -// -CLMgr_BoxFormatHandler* CLMgr_BoxFormatHandler::NewL(NW_LMgr_Box_t* aRootBox, TBool aSelectiveFormatting) - { - CLMgr_BoxFormatHandler* self = new (ELeave)CLMgr_BoxFormatHandler; - CleanupStack::PushL(self ); - self->ConstructL(aRootBox, aSelectiveFormatting); - CleanupStack::Pop(); - return self; - } - -// default contructor -CLMgr_BoxFormatHandler::CLMgr_BoxFormatHandler(): CActive( EPriorityLow + 2 ) - { - iFormattingPriority = ((CActive::TPriority)( CActive::EPriorityLow + 2 )); - iBackgroundFormat = EFalse; - iFormattingCompleted = EFalse; - } - -// CLMgr_BoxFormatHandler initializer , creates iFormatStack and adds the instance -// to CActiveScheduler -void CLMgr_BoxFormatHandler::ConstructL(NW_LMgr_Box_t* aRootBox, TBool aSelectiveFormatting) - { - iFormatStack = new (ELeave)CStack<CFormatStackContext, ETrue>; - iFormatContextRef = new (ELeave)CArrayPtrFlat<NW_LMgr_FormatContext_t>(2); - iRootBox = aRootBox; - iFormatBox = NULL; - iSelectiveFormatting = aSelectiveFormatting; - CActiveScheduler::Add(this); - } - -// initialize the flowbox and its children -TBrowserStatusCode CLMgr_BoxFormatHandler::InitializeBox(NW_LMgr_BidiFlowBox_t *flow) - { - return iTLMgr_BoxFormatter.NW_LMgr_BidiFlowBox_Initialize(flow); - } - -// initialize the flowbox and its children in small screen mode -TBrowserStatusCode CLMgr_BoxFormatHandler::InitializeBoxSSL(NW_LMgr_BidiFlowBox_t*) - { - return KBrsrSuccess; - } - -// destructor - deletes iFormatStack and removes the instance from CActiveScheduler -CLMgr_BoxFormatHandler::~CLMgr_BoxFormatHandler() - { - Cancel(); - if(iFormatContextRef) - { - for(TInt index = 0 ; index < iFormatContextRef->Count(); index++) - { - NW_Object_Delete(iFormatContextRef->At(index)); - } - delete iFormatContextRef; - } - delete iFormatStack; - } - -void CLMgr_BoxFormatHandler::AppendFormatContextL(NW_LMgr_FormatContext_t* aLMgr_FormatContext_t) - { - TBool found = EFalse; - for(TInt index = 0 ; index < iFormatContextRef->Count(); index++) - { - if(iFormatContextRef->At(index) == aLMgr_FormatContext_t) - { - found = ETrue; - break; - } - } - - if(!found) - { - iFormatContextRef->AppendL(aLMgr_FormatContext_t); - } - } - -// -// Finds the format context of the next box of aFormatBox to be formatted -// If the aFormatBox is NULL , then a new FormatContext is created on rootbox and -// the child of the rootbox becomes the next box to be formattec -// Leaves with KErrNoMemory if OOM -// -void CLMgr_BoxFormatHandler::FindFormatContextL(NW_LMgr_Box_t* aFormatBox) - { - CFormatStackContext* formatStackContext = NULL; - iFormatBox = NULL; - // if the iLastBoxToFormat is NULL , then it is the first request, start formatting - // from the rootBox - if (aFormatBox == NULL) - { - // removing any existing items from the stack - ClearFormatStack(); - // get the first child from the box tree - iFormatBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(iRootBox), 0); - // rootbox is the current flowbox for its child - iCurrentFlowBox = iRootBox; - iCurrentFormatContext = NW_LMgr_FormatContext_New(); - User::LeaveIfNull(iCurrentFormatContext ); - (void) NW_LMgr_FormatBox_ApplyFormatProps(NW_LMgr_FormatBoxOf (iCurrentFlowBox ), iCurrentFormatContext); - // format the rootbox children to TRUE - // set the formatBox and formatContext to format the rootbox grandchildren - // the formatbox and formatcontext may be reset on formatting the first child of the - // rootbox - iCurrentFormatContext->formatBox = iCurrentFlowBox ; - iCurrentFormatContext->newFormatContext = iCurrentFormatContext ; - - if( !iSelectiveFormatting ) - { - (void) NW_LMgr_FormatBox_ApplyFormatProps(NW_LMgr_FormatBoxOf (iCurrentFlowBox ), iCurrentFormatContext); - iCurrentFormatContext->newFormatContext = iCurrentFormatContext ; - } - else - { - //do a while loop to find the real parent, there must be a real parent - NW_LMgr_Box_t* parBox =(NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(iRootBox); - while (!NW_Object_IsInstanceOf(parBox, &NW_LMgr_FormatBox_Class)) - { - parBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(parBox); - } - (void) NW_LMgr_FormatBox_ApplyFormatProps(NW_LMgr_FormatBoxOf (parBox ), iCurrentFormatContext); - - // for the formatting after image was opened - // we need to create newContext to format containing boxes of iRootBox - // the following block is similar to LMgrFormatBox.cpp Resize(...) - NW_LMgr_FormatContext_t* newContext = NW_LMgr_FormatContext_New(); - (void) NW_LMgr_FormatBox_ApplyFormatProps(NW_LMgr_FormatBoxOf (iCurrentFlowBox ), newContext); - iCurrentFormatContext->newFormatContext = newContext ; - newContext->formatBox = iCurrentFlowBox ; - newContext->referenceCount = 0; - - // push the parentContext on to the stack - formatStackContext = new (ELeave)CFormatStackContext(this); - formatStackContext->iParentFormatBox = parBox; - formatStackContext->iBox = iRootBox; - formatStackContext->iParentContext = iCurrentFormatContext; - iFormatStack->PushL(formatStackContext); - - iCurrentFormatContext = newContext ; - } - } - else - { - // find format context from the formatstack - NW_LMgr_Box_t* box = aFormatBox; - -#ifdef _DEBUG_LOG - - for (int index1 = iFormatStack->Count() - 1 ; index1 >= 0; index1--) - { - NW_LOG2(NW_LOG_LEVEL5, "Index: %d, box %x ", index1 , iFormatStack->At(index1)->iBox); - } -#endif -#ifdef _DEBUG_LOG - // integrity check on format stack - NW_LMgr_Box_t* tempBox = aFormatBox; - for (int index = iFormatStack->Count() - 1 ; index >= 0 && NW_LMgr_ContainerBox_IsLastChild(tempBox); index--) - { - NW_LOG2(NW_LOG_LEVEL5, "Index: %d, box %x ", index , iFormatStack->At(index)->iBox); - formatStackContext = iFormatStack->At(index); - - // if the box is an instance of container box then popped item from the stack is the box itseld , the next to check - // is from the top of the stack else the next to be check would be the popped item from the stack - if (tempBox == formatStackContext->iBox) - { - tempBox = iFormatStack->Head()->iBox; - } - else - { - tempBox = formatStackContext->iBox; - } - } - // check the stack, the format stack is not correct - if (index == -1 && !iContainerSplit ) - { - NW_LMgr_Box_DumpBoxTree (NW_LMgr_BoxOf(iRootBox)); - } -#endif - - // if the last formatted box is on top of the stack , reformat the box - // the case is true of the lastbox in the previous chunk was a container box - if (aFormatBox == iFormatStack->Head()->iBox) - { - formatStackContext = iFormatStack->Pop(); - iFormatBox = formatStackContext->iBox; - iCurrentFlowBox = formatStackContext->iParentFormatBox; - formatStackContext->iParentContext->newFormatContext->referenceCount ++; - iCurrentFormatContext = formatStackContext->iParentContext; - delete formatStackContext; - } - // if the container box is split , the split container is on top of the stack - // and all of its children have been formatted. Complete post formatting of the - // container from top of the stack and next item on the stack is the containerbox that - // is split , the children of the container that was split are not formatted , - // get the first child from the stack and format the box - else if (iContainerSplit ) - { - iContainerSplit = EFalse; - do - { - NW_ASSERT(!iFormatStack->IsEmpty()); - formatStackContext = iFormatStack->Pop(); - CleanupStack::PushL(TCleanupItem(CFormatStackContext::CleanupStackContext,formatStackContext)); - PostFormatL(*formatStackContext); - CleanupStack::PopAndDestroy(); //formatStackContext - } - while ((NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(iFormatStack->Head()->iBox)) == 0)); - - // set the correct context from the item on stack - formatStackContext = iFormatStack->Head(); - if ((NW_Object_IsInstanceOf (formatStackContext->iBox, &NW_LMgr_BidiFlowBox_Class) || - NW_Object_IsInstanceOf (formatStackContext->iBox, &NW_LMgr_MarqueeBox_Class))&& - formatStackContext->iParentContext->newFormatContext) - { - iCurrentFlowBox = formatStackContext->iParentContext->formatBox; - iCurrentFormatContext = formatStackContext->iParentContext->newFormatContext; - } - else - { - iCurrentFlowBox = formatStackContext->iParentFormatBox; - iCurrentFormatContext = formatStackContext->iParentContext; - } - iFormatBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(formatStackContext->iBox), 0); - } - else - { - // first find the next box to be formatted - // Pop from the stack until the boxes are the last child of its parent - while (NW_LMgr_ContainerBox_IsLastChild(box) && !iFormatStack->IsEmpty()) - { - // pop the item from the stack and complete the post formatting - formatStackContext = iFormatStack->Pop(); - -#ifdef _DEBUG_LOG - - NW_LOG1(NW_LOG_LEVEL5, "Pop box %x ", formatStackContext->iBox); -#endif - - CleanupStack::PushL(TCleanupItem(CFormatStackContext::CleanupStackContext,formatStackContext)); - PostFormatL(*formatStackContext); - // if the box is an instance of container box then popped item from the stack is the box itseld , the next to check - // is from the top of the stack else the next to be check would be the popped item from the stack - if (box == formatStackContext->iBox) - { - box = iFormatStack->Head()->iBox; - } - else - { - box = formatStackContext->iBox; - } - CleanupStack::PopAndDestroy(); //formatStackContext - } - if (!iFormatStack->IsEmpty()) - { - // get the next sibling of the box that is on top of the stack - NW_ADT_Vector_Metric_t childIndex = NW_LMgr_ContainerBox_GetChildIndex(NW_LMgr_Box_GetParent(box), box); - iFormatBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_Box_GetParent(box), - (NW_ADT_Vector_Metric_t)(childIndex + 1)); - - // pop all the items from the stack until we find the formatbox parent - while (NW_LMgr_BoxOf(NW_LMgr_Box_GetParent(iFormatBox) ) != iFormatStack->Head()->iBox) - { - NW_ASSERT(!iFormatStack->IsEmpty()); - formatStackContext = iFormatStack->Pop(); - CleanupStack::PushL(TCleanupItem(CFormatStackContext::CleanupStackContext,formatStackContext)); - PostFormatL(*formatStackContext ); - CleanupStack::PopAndDestroy(); //formatStackContext - } - - NW_ASSERT(NW_LMgr_BoxOf(NW_LMgr_Box_GetParent(iFormatBox)) == iFormatStack->Head()->iBox); - // from the top of the stack , set the contexts - formatStackContext = iFormatStack->Head(); - - if ((NW_Object_IsInstanceOf (formatStackContext->iBox, &NW_LMgr_BidiFlowBox_Class) || - NW_Object_IsInstanceOf (formatStackContext->iBox, &NW_LMgr_MarqueeBox_Class) ) && - formatStackContext->iParentContext->newFormatContext) - { - iCurrentFormatContext = formatStackContext->iParentContext->newFormatContext; - iCurrentFlowBox = formatStackContext->iParentContext->formatBox; - } - else - { - iCurrentFormatContext = formatStackContext->iParentContext; - iCurrentFlowBox = formatStackContext->iParentFormatBox; - } - } - } - } - } - -// -// The method returns the BoxFormatter instance based on the box type -// @param aBox the box to find the formatter . -// @return TLMgr_BoxFormatter instance that can handle formatting of aBox -// -TLMgr_BoxFormatter& CLMgr_BoxFormatHandler::GetBoxFormatter(NW_LMgr_Box_t* aBox) - { - TLMgr_BoxFormatter* formatter = &iTLMgr_BoxFormatter; - - - if (NW_Object_IsInstanceOf (aBox, &NW_LMgr_StaticTableCellBox_Class) || - NW_Object_IsInstanceOf (aBox, &NW_LMgr_StaticTableRowBox_Class)) - { - formatter = &iTLMgr_StaticCell_Box_Formatter; - } - -#if 0 -// Marquee Box formatter doesn't do the job properly. - else if (NW_Object_IsInstanceOf (aBox, &NW_LMgr_MarqueeBox_Class)) - { - formatter = &iTLMgr_Marquee_Box_Formatter ; - } -#endif - - return *formatter; - } - -// the function clears of all the formatting stack and resets the -// last formatFormattedbox to NULL -void CLMgr_BoxFormatHandler::ClearFormattingContext() - { - ClearFormatStack(); - iContainerSplit = EFalse; - iFormatBox = NULL; - } - -// the function is called when the document load is complete. -// the function completes the post formatting on all the items on the format stack -void CLMgr_BoxFormatHandler::PageLoadCompleted() - { - iPageLoadCompleted = ETrue; - if (!IsActive()) - { - HandlePageLoadCompletedL(); - } - } - -TBrowserStatusCode -CLMgr_BoxFormatHandler::Collapse( NW_LMgr_FlowBox_t* aContainingFlow, NW_Bool aCollapseAnonymous ) - { - NW_LMgr_BoxVisitor_t* visitor; - NW_LMgr_Box_t* child = NULL; - NW_LMgr_Box_t* prevChild = NULL; - NW_LMgr_RootBox_t* rootBox = NW_LMgr_RootBoxOf( iRootBox ); - NW_LMgr_FlowBox_t* boxToCollapse = aContainingFlow; - - // Positioned boxes will be collapsed only if the whole tree is collapsed - if (aContainingFlow == NULL) - { - rootBox->iPositionedBoxesPlaced = EFalse; - } - - NW_TRY( status ) - { - // cancel any outstanding format first - // css may be coming while we are formatting the page - Cancel(); - ClearFormattingContext(); - - // - if( !aContainingFlow ) - { - // Clear the float context vectors. If containing flow is not NULL - // removing floating boxes should be taken care of by the calling method - // in this case ReformatBox - (void) NW_ADT_DynamicVector_Clear( rootBox->placedFloats ); - (void) NW_ADT_DynamicVector_Clear( rootBox->pendingFloats ); - (void) NW_ADT_DynamicVector_Clear( rootBox->positionedAbsObjects); - rootBox->iPositionedBoxesPlaced = NW_FALSE; - aContainingFlow = NW_LMgr_FlowBoxOf( rootBox ); - } - NW_ASSERT( NW_Object_IsInstanceOf( aContainingFlow, &NW_LMgr_FlowBox_Class ) ); - - visitor = NW_LMgr_ContainerBox_GetBoxVisitor( aContainingFlow ); - prevChild = NW_LMgr_BoxOf( aContainingFlow ); - NW_THROW_OOM_ON_NULL( visitor, status ); - - // collapse the tree - - // Iterate through all children - child = NW_LMgr_BoxVisitor_NextBox( visitor,0 ); - while( ( child = NW_LMgr_BoxVisitor_NextBox( visitor,0 ) ) != NULL ) - { - // positioned boxes are not part of the normal flow and do not need to be collapsed, - // unless the whole tree is collapsed. e.g. when switching from small screen to normal screen - if (NW_Object_IsInstanceOf(child, &NW_LMgr_PosFlowBox_Class)) - { - NW_LMgr_Box_t* box = child; - NW_Bool shouldCollapsePositioned = (boxToCollapse == NULL); - if (!shouldCollapsePositioned && NW_Object_IsInstanceOf(boxToCollapse, &NW_LMgr_PosFlowBox_Class)) - { - NW_LMgr_Box_t* theBox = box; - NW_LMgr_ContainerBox_t* theParent = NW_LMgr_Box_GetParent(theBox); - while (theParent != NULL && NW_LMgr_BoxOf(theParent) != NW_LMgr_BoxOf(boxToCollapse)) - { - theBox = NW_LMgr_BoxOf(theParent); - theParent = NW_LMgr_Box_GetParent(theBox); - } - if (NW_LMgr_BoxOf(theParent) == NW_LMgr_BoxOf(boxToCollapse)) - { - shouldCollapsePositioned = NW_TRUE; - } - } - - if (shouldCollapsePositioned) - { - // Collapse the positioned box and then remove it. - Collapse(NW_LMgr_FlowBoxOf(box), aCollapseAnonymous); - NW_LMgr_Box_t* posChild = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(box), 0); - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(box); - NW_ASSERT(posChild != NULL); - NW_Bool skip = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox( visitor, &skip); - NW_Int16 index = NW_LMgr_ContainerBox_GetChildIndex(parent, box); - (void)NW_LMgr_ContainerBox_RemoveChild(parent, box); - NW_LMgr_ContainerBox_InsertChildAt(parent, posChild, index); - NW_ADT_DynamicVector_RemoveElement(rootBox->positionedAbsObjects, &box); - NW_Object_Delete(box); - if (child == NULL) - { - break; - } - } - else - { - NW_LMgr_Box_t* posChild = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(box), 0); - NW_ASSERT(posChild != NULL); - NW_Bool skip = NW_TRUE; - child = NW_LMgr_BoxVisitor_NextBox( visitor, &skip); - if (child == NULL) - { - break; - } - } - } - if( NW_Object_IsClass( child, &NW_LMgr_ContainerBox_Class ) || - NW_Object_IsClass( child, &NW_LMgr_ActiveContainerBox_Class ) ) - { - status = NW_LMgr_ContainerBox_Collapse( NW_LMgr_ContainerBoxOf( child ) ); - prevChild = child; - } - else if( NW_Object_IsClass( child, &NW_LMgr_TextBox_Class ) ) - { - status = NW_LMgr_TextBox_Collapse( NW_LMgr_TextBoxOf( child ) ); - prevChild = child; - } - // marker was generated in formatting, so we need to delete it - else if( NW_Object_IsClass( child, &LMgrMarkerText_Class ) || - NW_Object_IsClass( child, &LMgrMarkerImage_Class ) ) - { - visitor->currentBox = prevChild; - NW_Object_Delete( child ); - } - // we do IsClass because we want to delete the anonymous boxes created - // during formatting and not the ones which were created during CreateBoxTree - // CreateBoxTree creates LMgrAnonTableBox for wrapping tables and caption - // We do not want to delete it - else if( aCollapseAnonymous && NW_Object_IsClass( child, &LMgrAnonBlock_Class ) ) - { - status = LMgrAnonBlock_Collapse( LMgrAnonBlockOf( child )); - visitor->currentBox = prevChild; - } - else - { - prevChild = child; - } - NW_ASSERT( status == KBrsrSuccess ); - _NW_THROW_ON_ERROR( status ); - } - // successful completion - status = KBrsrSuccess; - NW_LMgr_RootBox_InvalidateCache( rootBox ); - - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Object_Delete( visitor ); - return status; - } - NW_END_TRY - } - -// -// The method is called after the formatting all the chunks and no more -// chunks are available for the page. The method does post formatting of all -// the boxes on the stack and calls the formatting completed on IBoxTreeListener -// -void CLMgr_BoxFormatHandler::HandlePageLoadCompletedL() - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t index; -#ifdef _DEBUG_LOG - RFileLogger::Write( KWmlBrowserLogDir, KLogFileName , EFileLoggingModeAppend, _L(" Formatting:Page LoadCompleted " )); -#endif - while (!iFormatStack->IsEmpty()) - { - CFormatStackContext* formatStackContext = iFormatStack->Pop(); - CleanupStack::PushL(formatStackContext); - if (iSelectiveFormatting && iFormatStack->Count()==0) - { - // new information exists in newFormatContext - status = iTLMgr_BoxFormatter.NW_LMgr_BidiFlowBox_PostFormat(iRootBox, NW_LMgr_ContainerBoxOf(iRootBox), formatStackContext->iParentContext->newFormatContext); - status = iTLMgr_BoxFormatter.NW_LMgr_ResizeToFloat(iRootBox,formatStackContext->iParentContext->newFormatContext); - } - else - { - PostFormatL(*formatStackContext); - if (NW_Object_IsInstanceOf (formatStackContext->iBox->parent, &NW_LMgr_RootBox_Class)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( iRootBox ); - boxBounds.dimension.height = KRootBoxInitialHeight; - NW_LMgr_Box_SetFormatBounds( iRootBox, boxBounds ); - status = iTLMgr_BoxFormatter.NW_LMgr_BidiFlowBox_PostFormat(formatStackContext->iParentFormatBox, NW_LMgr_ContainerBoxOf(formatStackContext->iBox->parent ), formatStackContext->iParentContext); - status = NW_LMgr_Box_PostResize(NW_LMgr_BoxOf(formatStackContext->iBox->parent)); - } - } - // leave if OOM - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - UpdateDisplayBounds( formatStackContext->iBox ); - - CleanupStack::PopAndDestroy(); //formatStackContext - } - if(!iSelectiveFormatting) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_RootBoxOf(iRootBox); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - boxTreeListener->FormatPositionedBoxes (); - boxTreeListener->FormattingComplete (); - } - - for(index = 0 ; index < iFormatContextRef->Count(); index++) - { - NW_Object_Delete(iFormatContextRef->At(index)); - } - iFormatContextRef->Reset(); - ClearFormattingContext(); - - // end of background format - if( iBackgroundFormat ) - { - iBackgroundFormat = EFalse; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* child = NULL; - NW_Uint8 skipChildren = NW_FALSE; - NW_LMgr_BoxVisitor_Initialize( &boxVisitor, iRootBox ); - // set final pass on tables - while( (child = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, &skipChildren ) ) != NULL ) - { - if( NW_Object_IsInstanceOf( child, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - NW_LMgr_StaticTableBox_SetAutomaticTableWidthPass( NW_LMgr_StaticTableBoxOf( child ), NW_LMgr_StaticTableBox_AutomaticWidth_FinalPass ); - } - } - // collapse tree - Collapse( NULL, NW_TRUE ); - // format again - PartialFormatL( (CActive::TPriority)Priority() ); - // - PageLoadCompleted(); - - } - iFormattingCompleted = ETrue; - } - -// -// the method is called from view to format box tree -// -void CLMgr_BoxFormatHandler::PartialFormatL( CActive::TPriority aPriority ) - { - iFormattingPriority = aPriority; - // - if( !IsActive() && iFormattingPriority != Priority() ) - { - // set the priority - SetPriority( iFormattingPriority ); - } - // - iFormattingCompleted = EFalse; - // We need to set the bodybox and initialize the origin - if(!iSelectiveFormatting) - { - InitRootBox(); - } - - // if the iLastBoxToFormat to format has changed and if the - // active object is not active then set it to active - iLastBoxToFormat = GetLastBox(); - if (iLastBoxToFormat != iFormatBox ) - { - if (!iFormatBox) - { - // find the first box to be formatted - iPageLoadCompleted = EFalse; - } - if (iSelectiveFormatting || !IsActive()) - { - FindFormatContextL(iFormatBox); - HandlePartialFormatL(); - } - } - if(!iSelectiveFormatting) - { - int index = iFormatStack->Count() - 1 ; - for (; index >= 0; index--) - { - NW_GDI_Dimension2D_t tempDimensions = CalculateBoxTempBounds(iFormatStack->At(index)->iBox); - iFormatStack->At(index)->iTempDimensions = tempDimensions ; - NW_LMgr_Box_t* box = iFormatStack->At(index)->iBox ; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.dimension.height += tempDimensions.height; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(iRootBox), 0); - NW_GDI_Rectangle_t rootBoxBounds = NW_LMgr_Box_GetFormatBounds( iRootBox ); - NW_GDI_Rectangle_t childBoxBounds = NW_LMgr_Box_GetFormatBounds( child ); - rootBoxBounds.dimension.height = childBoxBounds.dimension.height; - NW_LMgr_Box_SetFormatBounds( iRootBox, rootBoxBounds ); - for ( index = iFormatStack->Count() - 1 ; index >= 0; index--) - { - NW_GDI_Dimension2D_t tempDimensions = iFormatStack->At(index)->iTempDimensions; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( iFormatStack->At(index)->iBox ); - boxBounds.dimension.height -= tempDimensions.height; - NW_LMgr_Box_SetFormatBounds( iFormatStack->At(index)->iBox, boxBounds ); - } - } - } - - -// -// Formats iFormatBox (the current box to be formatted ) and all the boxes to -// the left subtree iFormatBox -// Leaves with KErrNoMemory if OOM -// -void CLMgr_BoxFormatHandler::HandlePartialFormatL() - { - TBrowserStatusCode status = KBrsrSuccess; -#ifdef _DEBUG_LOG - RFileLogger::Write( KWmlBrowserLogDir, KLogFileName , EFileLoggingModeAppend, _L(" Start formatting" )); -#endif - - CFormatStackContext* formatStackContext = NULL; - TBool formatChildren = EFalse; - // find the next box to be formatted and also the - // formatcontext and flowbox used to format the box - while (iFormatBox) - { - // Skip positioned boxes. They will be formatted later separately - if (iFormatBox != iRootBox && NW_Object_IsInstanceOf(iFormatBox, &NW_LMgr_PosFlowBox_Class)) - { - FindFormatContextL(NW_LMgr_BoxOf(iFormatBox)); - continue; - } - formatChildren = EFalse; - // find the instance of the formatter class - TLMgr_BoxFormatter& formatter = GetBoxFormatter(iFormatBox); - - - NW_LMgr_ContainerBox_t* prevParentBox = NW_LMgr_Box_GetParent(iFormatBox); -#ifdef _DEBUG_LOG - - NW_LOG2(NW_LOG_LEVEL5, "FORMAT: box %x :::formatBox %x ", iFormatBox, iCurrentFlowBox ); -#endif - // initialization code - this used to be in RootBox_InitializeTree - InitBoxL(iFormatBox); - - // format the box - status = formatter.NW_LMgr_FlowBox_FormatBox(iCurrentFlowBox, iFormatBox, iCurrentFormatContext); - // When a box has absolute positioning, it should be formatted separately from the rest of the box tree - if (status == KBrsrContinue) - { - NW_LMgr_PosFlowBox_t* newParent = NW_LMgr_PosFlowBox_New(5); - if (newParent != NULL) - { - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(iFormatBox); - TInt childIndex = NW_LMgr_ContainerBox_GetChildIndex (parent, iFormatBox); - NW_ASSERT (childIndex >= 0); - NW_LMgr_ContainerBox_RemoveChild (parent, iFormatBox); - NW_LMgr_ContainerBox_InsertChildAt (parent, NW_LMgr_BoxOf(newParent), (NW_ADT_Vector_Metric_t)childIndex); - NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(newParent), iFormatBox); - - NW_LMgr_PropertyValue_t visibilityVal; - visibilityVal.token = NW_CSS_PropValue_visible; - (void)NW_LMgr_Box_GetPropertyValue(iFormatBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - NW_LMgr_PropertyValue_t displayVal; - displayVal.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(iFormatBox, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &displayVal); - - - if (iRootBox != NULL && NW_Object_IsInstanceOf(iRootBox, &NW_LMgr_PosFlowBox_Class)) - { - newParent->iContainingBlock = iRootBox; - } - - if ((visibilityVal.token != NW_CSS_PropValue_hidden) && (displayVal.token != NW_CSS_PropValue_none)) - { - NW_LMgr_PosFlowBox_AddPositionedBox(newParent); - } - - FindFormatContextL(NW_LMgr_BoxOf(NW_LMgr_Box_GetParent(iFormatBox))); - if (iPageLoadCompleted && iFormatBox == NULL) - { - HandlePageLoadCompletedL(); - break; - } - else - { - continue; - } - } - } - AppendFormatContextL (iCurrentFormatContext); - if(iCurrentFormatContext->newFormatContext) - { - AppendFormatContextL (iCurrentFormatContext->newFormatContext); - } - // if the parent has changed . update the format stack of the new parent - if ( NW_LMgr_Box_GetParent(iFormatBox) != prevParentBox ) - { - NW_ASSERT(iFormatStack->Head()->iBox == NW_LMgr_BoxOf(prevParentBox)); - NW_LOG2(NW_LOG_LEVEL5, "REPLACED box %x with box %x ", prevParentBox, iFormatBox->parent); - // do the post formatting on the boxes from top of the stack - formatStackContext = new (ELeave)CFormatStackContext(*iFormatStack->Head()); - formatStackContext->iBox = NW_LMgr_BoxOf(iFormatBox->parent); - iFormatStack->PushL(formatStackContext); -#ifdef _DEBUG_LOG - - NW_LOG1(NW_LOG_LEVEL5, "Pushbox %x ", formatStackContext->iBox); -#endif - - iContainerSplit = ETrue; - } - - // if the children need to be formatted push the current context on to the stack - // and set the new context - if (iCurrentFormatContext->formatChildren ) - { - // reset formatChildren flag as the new context can be used to format all of its children - iCurrentFormatContext->formatChildren = NW_FALSE; - // push the parentContext on to the stack - formatStackContext = new (ELeave)CFormatStackContext(this); - formatStackContext->iParentFormatBox = iCurrentFlowBox; - formatStackContext->iBox = iFormatBox; - formatStackContext->iParentContext = iCurrentFormatContext; - - // if the formatted box is the last box then push the box on to the stack and return - if (iLastBoxToFormat == iFormatBox) - { - iFormatStack->PushL(formatStackContext); - break; - } - // set the new parentContext for the children to be formatted - iCurrentFlowBox = iCurrentFormatContext->formatBox; - iCurrentFormatContext = iCurrentFormatContext->newFormatContext; - - if ( NW_Object_IsInstanceOf(iFormatBox, &NW_LMgr_ContainerBox_Class) && - (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(iFormatBox)) > 0)) - { - formatChildren = ETrue; - iFormatBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(iFormatBox), 0); -#ifdef _DEBUG_LOG - - NW_LOG1(NW_LOG_LEVEL5, "Pushbox %x ", formatStackContext->iBox); -#endif - iFormatStack->PushL(formatStackContext); - } - else - { - formatChildren = EFalse; - delete formatStackContext; - } - } - - if (!formatChildren) - { - // if the box is not NULL - // then do the post formatting on the box - // else set the box from the top of the stack - if (iFormatBox) - { - (void) NW_LMgr_Box_PostResize(iFormatBox); - } - // is a leaf box do the post formatting on the box - // if it is last box then return ; - if (iLastBoxToFormat == iFormatBox) - { - break; - } - // check if the box is the last child of the parent and do the post formatting - // and find the next box to be formatted - if ( NW_LMgr_ContainerBox_IsLastChild(iFormatBox)) - { - // if it is normal layout or part of the boxtree is to be formatted - // then formatting is synchronous - if ( iSelectiveFormatting) - { - FindFormatContextL(iFormatBox); - } - else - { - // Call SetActive() so that this active object gets notified of completed requests. - SetActive(); - // Complete the status - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); - break; - } - } - else - { - // get the next sibling - NW_ADT_Vector_Metric_t childIndex = NW_LMgr_ContainerBox_GetChildIndex(NW_LMgr_Box_GetParent(iFormatBox), iFormatBox); - iFormatBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_Box_GetParent(iFormatBox), - (NW_ADT_Vector_Metric_t)(childIndex + 1)); - CFormatStackContext* headFmtStackContext = iFormatStack->Head(); - if ( (NW_Object_IsInstanceOf (headFmtStackContext->iBox, &NW_LMgr_BidiFlowBox_Class) - ||NW_Object_IsInstanceOf (headFmtStackContext->iBox, &NW_LMgr_MarqueeBox_Class) )&& - headFmtStackContext->iParentContext->newFormatContext) - { - iCurrentFormatContext = headFmtStackContext->iParentContext->newFormatContext; - iCurrentFlowBox = headFmtStackContext->iParentContext->formatBox; - } - else - { - iCurrentFormatContext = headFmtStackContext->iParentContext; - iCurrentFlowBox = headFmtStackContext->iParentFormatBox; - } - } - } - } - -#ifdef _DEBUG_LOG - RFileLogger::Write( KWmlBrowserLogDir, KLogFileName , EFileLoggingModeAppend, _L(" End formatting" )); -#endif - - } - -// -// -// overriddes Active virtual function . The method formats a flowbox ( including its children) -// or a leaf box -// leaves if OOM -// -void CLMgr_BoxFormatHandler::RunL() - { - // adjust priority - if( iFormattingPriority != Priority() ) - { - SetPriority( iFormattingPriority ); - } - // if the page is not loaded and if there are boxes to format - // find the next box to be formatted and also the - // formatcontext and flowbox used to format the box - if (!iPageLoadCompleted || iFormatBox != iLastBoxToFormat) - { - iFormattingCompleted = EFalse; - FindFormatContextL(iFormatBox); - HandlePartialFormatL(); - } - if (iPageLoadCompleted && iFormatBox == iLastBoxToFormat) - { - HandlePageLoadCompletedL(); - } - } - -// -// overriddes Active virtual function -// Clears the formatting context, if the formatting is cancelled -// -void CLMgr_BoxFormatHandler::DoCancel() - { - iPageLoadCompleted = ETrue; - ClearFormattingContext(); - iBackgroundFormat = NW_FALSE; - } - -// -// overriddes Active virtual function -// Clears the formatting context, incase if any error -// -TInt CLMgr_BoxFormatHandler::RunError(TInt aError) - { - ClearFormattingContext(); - NW_ASSERT (NW_Object_IsClass(iRootBox, &NW_LMgr_RootBox_Class)); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(iRootBox); - TBrowserStatusCode status = KBrsrFailure; - if (aError == KErrNoMemory) - { - status = KBrsrOutOfMemory; - } - boxTreeListener->HandleError( status ); - return KErrNone; - } - -// -// sets the root box on the format handler (generally used if the -// root box changes, but the format handler is the same) -// -void CLMgr_BoxFormatHandler::SetRootBox(NW_LMgr_Box_t* aRootBox) - { - iRootBox = aRootBox; - } - -// -// The method returns dimensions of aBox by the aBox childrens height and width -// @return NW_GDI_Dimension2D_t - dimensions of the aBox -// -NW_GDI_Dimension2D_t CLMgr_BoxFormatHandler::CalculateBoxTempBounds(NW_LMgr_Box_t* aBox ) - { - NW_LMgr_ContainerBox_t* box = (NW_LMgr_ContainerBox_t*)aBox; - NW_GDI_Dimension2D_t tempDimensions; - tempDimensions.height= tempDimensions.width = 0; - NW_ADT_Vector_Metric_t numberOfChildren = NW_LMgr_ContainerBox_GetChildCount(box ); - if(numberOfChildren >0) - { - for(TInt index = numberOfChildren -1 ; index >= 0 ; index -- ) - { - NW_LMgr_Box_t* childBox = NW_LMgr_ContainerBox_GetChild(box , - (NW_ADT_Vector_Metric_t)index ); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( childBox ); - tempDimensions.height += boxBounds.dimension.height; - if(tempDimensions.width < boxBounds.dimension.width) - { - tempDimensions.width = boxBounds.dimension.width; - } - } - } - return tempDimensions; - } - - -// -// The method normalizes the box on the box tree -// @param box - box to be normalized -// @return KBrsrSuccess if successful , KBrsrOutOfMemory if OOM -// -void CLMgr_BoxFormatHandler::InitBoxL(NW_LMgr_Box_t *box) - { - - TBrowserStatusCode status = KBrsrSuccess; - - if (NW_Object_IsInstanceOf(box, &NW_LMgr_TextBox_Class)) - { - // Initialize - NW_LMgr_AbstractTextBoxOf(box)->length = 0; - } - - if (!NW_Object_IsInstanceOf(box, &NW_LMgr_ContainerBox_Class)) - { - // In small screen layout, we want to keep only 2 consequent <br/> - // We keep the first <br/> and the last <br/> in the sequence. - // That's because the last <br/> is the master box in case of <a><br/><br/><br/></a> - // If we remove the last <br/>, that link will not be selectable. - // The following code deals with both patterns of - // <br/><br/><br/><br/><br/> and <a><br/><br/><br/><br/><br/></a> - - if (NW_Object_IsClass(box, &NW_LMgr_BreakBox_Class)) - { - if (iFirstBr) - { - NW_LMgr_ContainerBox_t* parentBox = NW_LMgr_Box_GetParent(box); - - if (parentBox != NULL) - { - TInt count = NW_LMgr_ContainerBox_GetChildCount(parentBox); - NW_ADT_Vector_Metric_t idx = NW_LMgr_ContainerBox_GetChildIndex(parentBox, box); - - TBool lastBreak = (idx == count - 1); - if (!lastBreak) - { - NW_LMgr_Box_t* nextBox = NW_LMgr_ContainerBox_GetChild( - parentBox,(NW_ADT_Vector_Metric_t)(idx + 1)); - lastBreak = !NW_Object_IsInstanceOf(nextBox, &NW_LMgr_BreakBox_Class); - } - - if (lastBreak) - { - iFirstBr = EFalse; - } - } - } - if (iFirstBr) - { - NW_LMgr_Property_t prop; - // Set flag. This <br/> will not be resized and will be ingnored - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_flags_thirdBr; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_flags, &prop); - } - else - { - iFirstBr = ETrue; - } - } - else - { - iFirstBr = EFalse; - } - } - - if (status == KBrsrSuccess) - { - // Apply font properties - status = NW_LMgr_Box_ApplyFontProps(box); - } - - if (!iSelectiveFormatting) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_RootBoxOf(iRootBox); - if (!rootBox->isBlinking) - { - NW_LMgr_PropertyValue_t textDecoration; - - /* Does the box blink? */ - textDecoration.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_textDecoration, - NW_CSS_ValueType_Token, &textDecoration); - if ((textDecoration.token == NW_CSS_PropValue_blink) || - (textDecoration.token == NW_CSS_PropValue_blinkUnderline)) - { - rootBox->isBlinking = NW_TRUE; - } - } - } - // leave if OOM - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - - NW_LMgr_PropertyValue_t dispValue; - // Get own display property - dispValue.token = NW_CSS_PropValue_display_inline; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_display, NW_CSS_ValueType_Token, &dispValue); - - // Now determine the flow direction - // We set the direction property only if the box does not contain blocks, or it is a table box - if (dispValue.token == NW_CSS_PropValue_display_listItem) - { - if ((NW_Object_IsInstanceOf(box, &NW_LMgr_BidiFlowBox_Class) || - NW_Object_IsInstanceOf(box, &NW_LMgr_MarqueeBox_Class)) && - NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box))) - { - iTLMgr_BoxFormatter.NW_LMgr_BidiFlowBox_GetListMargin(NW_LMgr_FlowBoxOf(box)); - } - } - } - -// -// The method refreshes the box after the box is post formatted -// and adds the children boxes which are instances of active boxes -// to the tab list -// @param aBox - box to be refresed -// @return void -// -void CLMgr_BoxFormatHandler::RefreshBoxL(NW_LMgr_Box_t *aBox ) - { - TBrowserStatusCode status=KBrsrSuccess; - TBool refreshed = EFalse; - // At the moment we want to refresh during formatting only in vertical layout mode - // Should be revisited later: Deepika - if( !iBackgroundFormat ) - { - // we want to refresh only a FormatBox, because PostFormat on format box - // determines x,y,ht, width on descendant boxes - if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_FormatBox_Class)) - { - // if the parent of format box is on stack we will not refresh, since refresh - // on parent will cause the draw - this is to avoid flickering - if(iFormatStack->IsEmpty() || - iFormatStack->Head()->iBox != (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(aBox )) - { - status = NW_LMgr_Box_Refresh(aBox); - // denotes that the box has been refreshed - refreshed = ETrue; - } - - // if refresh on the box was not called, we refresh the containers and leaf nodes - // This is to let the content be displayed as soon as possible. - // We go through the children of the format box and add tab items - NW_ADT_Vector_Metric_t numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aBox)); - for (NW_ADT_Vector_Metric_t index=0; index < numChildren; index++) - { - NW_LMgr_Box_t* child = - NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aBox), index); - - // we want to avoid calling refresh on Format boxes, since refresh was already called - // on them when they were postformatted - if (!NW_Object_IsInstanceOf(child, &NW_LMgr_FormatBox_Class)) - { - // if the box was already refreshed don't call refresh again - if (!refreshed) - { - status = NW_LMgr_Box_Refresh(child); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - } - } - }// end for - } - }// if verticallayoutenabled - } - -// -void CLMgr_BoxFormatHandler::AddTabItemL( NW_LMgr_Box_t *aBox ) - { - if( !iBackgroundFormat ) - { - // we want to refresh only a FormatBox, because PostFormat on format box - // determines x,y,ht, width on descendant boxes - if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_FormatBox_Class)) - { - NW_ADT_Vector_Metric_t numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aBox)); - for (NW_ADT_Vector_Metric_t index=0; index < numChildren; index++) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aBox), index); - - if (!NW_Object_IsInstanceOf(child, &NW_LMgr_FormatBox_Class)) - { - // we need to add active boxes contained within the ContainerBox. - // Active boxes within the FormatBox were added when PostFormat - // was called - AddSubTreeTabItemsL(child); - } - }// end for - } - }// if verticallayoutenabled - } - -// This method is called from RefreshBox to add tabitems containeed in container box subtree -void CLMgr_BoxFormatHandler::AddSubTreeTabItemsL(NW_LMgr_Box_t *aBox) - { - NW_LMgr_BoxVisitor_t boxVisitor; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Box_t* child = NULL; - NW_Uint8 skipChildren = NW_FALSE; - (void)NW_LMgr_BoxVisitor_Initialize(&boxVisitor, aBox); - - // Add tabitems for the subtree - while ((child = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, &skipChildren)) != NULL) - { - // we are only looking for boxes implementing the NW_LMgr_IEventListener interface - NW_LMgr_IEventListener_t* eventListener = - (NW_LMgr_IEventListener_t*)(NW_Object_QueryInterface (child, &NW_LMgr_IEventListener_Class)); - - if (eventListener) - { - if (NW_Object_IsClass(iRootBox, &NW_LMgr_RootBox_Class)) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_RootBoxOf(iRootBox); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - status = boxTreeListener->BoxTreeListenerAppendTabItem (child); - // NW_LOG1( NW_LOG_LEVEL5, "NW_LMgr_IBoxTreeListener_AppendTabItem, %x", child ); - if (status == KBrsrOutOfMemory) - { - User::Leave(KErrNoMemory); - } - } - } - skipChildren = NW_FALSE; - // skip traversing FormatBox children since they were added when PostFormat was called on - // format box - if (NW_Object_IsInstanceOf(child, &NW_LMgr_FormatBox_Class)) - { - skipChildren = NW_TRUE; - } - } - } - -// This method initializes the rootbox - sets body and displaybounds -void CLMgr_BoxFormatHandler::InitRootBox() - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_RootBoxOf(iRootBox); - if (!rootBox->body) - { - // find body box - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* child = NULL; - - // set the body box - (void)NW_LMgr_BoxVisitor_Initialize(&boxVisitor, iRootBox); - while ((child = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, NULL)) != NULL) - { - NW_LMgr_PropertyValue_t bodyFlag; - bodyFlag.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_flags, NW_CSS_ValueType_Token, &bodyFlag); - if (bodyFlag.token == NW_CSS_PropValue_flags_bodyElement) - { - NW_LMgr_RootBox_SetBody(rootBox, child); - break; - } - } - } - // initialize display bounds - if (rootBox->body) - { - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext(rootBox); - if (NW_LMgr_RootBox_IsPageRTL(rootBox)) - { - NW_GDI_Point2D_t origin; - NW_GDI_Rectangle_t displayBounds; - - displayBounds = *deviceContext->DisplayBounds (); - displayBounds.point.x = RIGHT_ORIGIN; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( rootBox ), displayBounds); - origin.x = RIGHT_ORIGIN; - origin.y = 0; - deviceContext->SetOrigin ( &origin); - } - } - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/BoxRender.cpp --- a/webengine/wmlengine/src/lmgr/src/BoxRender.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,242 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "BoxRender.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_adt_resizablevector.h" -#include "nw_adt_vectoriterator.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nwx_logger.h" -#include "nwx_settings.h" - -#include "cstack.h" - -struct RenderContext -{ - NW_LMgr_ContainerBox_t* node; - NW_ADT_Vector_Metric_t childCount; - NW_ADT_Vector_Metric_t childIndex; - NW_GDI_Rectangle_t clipRect; - NW_Bool hasFocus; -}; - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -BoxRender_Render( NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool hasFocus, - NW_LMgr_RootBox_t* rootBox ) - { - NW_ADT_Vector_Metric_t childCount; - NW_LMgr_EventHandler_t* eventHandler = NULL; - NW_Bool skipChildren = NW_FALSE; - CStack<RenderContext, ETrue>* renderStack = NULL; - NW_Bool smallScreenMode; - - // for non-container box, render it and return - if( !NW_Object_IsInstanceOf( box, &NW_LMgr_ContainerBox_Class ) ) - { - // currentBox: Special handling for active containers - if( NW_Object_IsInstanceOf( currentBox, &NW_LMgr_ActiveContainerBox_Class ) ) - { - eventHandler = NW_LMgr_ActiveContainerBoxOf( currentBox )->eventHandler; - - if( NW_Object_IsInstanceOf( box, &NW_LMgr_ActiveContainerBox_Class ) ) - { - if (NW_LMgr_ActiveContainerBoxOf(box)->eventHandler == eventHandler) - { - currentBox = box; - } - } - } - return NW_LMgr_Box_Render( box, deviceContext, clipRect, currentBox, - flags, &hasFocus, &skipChildren, rootBox ); - } - - NW_TRY( status ) - { - // skip rootbox by getting its first child - if( NW_Object_IsClass( box, &NW_LMgr_RootBox_Class ) ) - { - box = NW_LMgr_ContainerBox_GetChild( NW_LMgr_ContainerBoxOf( box ), 0 ); - if( !box ) - { - // just return - NW_THROW_SUCCESS( status ); - } - } - renderStack = new CStack<RenderContext, ETrue>; - NW_THROW_OOM_ON_NULL( renderStack, status ); - - // optimize tree rendering only when the format has been completed. - // smallScreenMode = NW_Settings_GetVerticalLayoutEnabled(); - // ZAL: temp - smallScreenMode = NW_FALSE; - do - { - // currentBox: Special handling for active containers - if( NW_Object_IsInstanceOf( currentBox, &NW_LMgr_ActiveContainerBox_Class ) ) - { - eventHandler = NW_LMgr_ActiveContainerBoxOf( currentBox )->eventHandler; - - if( NW_Object_IsInstanceOf( box, &NW_LMgr_ActiveContainerBox_Class ) ) - { - if (NW_LMgr_ActiveContainerBoxOf(box)->eventHandler == eventHandler) - { - currentBox = box; - } - } - } - - // some box will change *clipRect in its render function, such as StaticTableCellBox - status = NW_LMgr_Box_Render( box, deviceContext, clipRect, currentBox, - flags, &hasFocus, &skipChildren, rootBox ); - - // in small screen mode we do not draw children boxes - // if the parent set skipChildren to true - if( smallScreenMode && skipChildren ) - { - // container is off the view. - // no children draw - childCount = 0; - } - else if( NW_Object_IsInstanceOf( box, &NW_LMgr_ContainerBox_Class ) ) - { - // visible container - childCount = NW_LMgr_ContainerBox_GetChildCount( NW_LMgr_ContainerBoxOf( box ) ); - } - else - { - // no children as the box is not a container - childCount = 0; - } - - if( childCount > 0 ) - { - // node - - // push container to the stack - RenderContext* renderCtx = new RenderContext; - //lint -e{774} Boolean within 'if' always evaluates to False - NW_THROW_OOM_ON_NULL( renderCtx, status ); - - renderCtx->node = NW_LMgr_ContainerBoxOf( box ); - renderCtx->clipRect = *clipRect; - renderCtx->hasFocus = hasFocus; - renderCtx->childCount = childCount; - renderCtx->childIndex = 0; - TRAPD( err, renderStack->PushL( renderCtx ) ); - if( err == KErrNoMemory ) - { - status = KBrsrOutOfMemory; - } - else if( err != KErrNone ) - { - status = KBrsrFailure; - } - else - { - status = KBrsrSuccess; - } - _NW_THROW_ON_ERROR( status ); - // and get the first child - box = NW_LMgr_ContainerBox_GetChild ( renderCtx->node, 0 ); - } - else - { - // leaf or node whose children must be skipped - - // if the very first box has no children to render - // then we need to return right away - if( renderStack->IsEmpty() ) - { - NW_THROW_SUCCESS( status ); - } - // check if the box has a sibling to render. - RenderContext* parent = renderStack->Head(); - - // loop until we get the next sibling. note that if the current box - // is the last child of the parent, then we jump one level up and - // start checking the parent's sibling as long as we get a sibling - while( parent->childIndex == ( parent->childCount - 1 ) ) - { - // pop off parent until we get the next sibling - parent = renderStack->Pop(); - // restore clipRect: it's important for using clipRect to draw float in RootBox_Render - *clipRect = parent->clipRect; - // do not free the box - parent->node = NULL; - delete parent; - // get its parent - // empty stack means that we have no more - // box to render - if( renderStack->IsEmpty() ) - { - NW_THROW_SUCCESS( status ); - } - // get next parent - parent = renderStack->Head(); - } - - // update *clipRect. - *clipRect = parent->clipRect; - - // we have the next sibling - // update the parent index to be able to - // keep track of the last drawn child - parent->childIndex++; - box = NW_LMgr_ContainerBox_GetChild ( parent->node, parent->childIndex ); - // get context - hasFocus = parent->hasFocus; - } - } - while( box ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - // pop off nodes if the stack is not empty. - // in fact, it should always be empty - // do not use PopAndDestroy as that frees - // boxes in the stack - if( renderStack && !renderStack->IsEmpty() ) - { - RenderContext* parent; - do - { - parent = renderStack->Pop(); - NW_ASSERT( parent != NULL ); - // do not free the box - parent->node = NULL; - delete parent; - } - while( !renderStack->IsEmpty() ); - } - delete renderStack; - return status; - } - NW_END_TRY - } - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/Epoc32AccessKey.c --- a/webengine/wmlengine/src/lmgr/src/Epoc32AccessKey.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_epoc32accesskeyi.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_Epoc32AccessKey_Class_t NW_LMgr_Epoc32AccessKey_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AccessKey_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_Epoc32AccessKey_t), - /* construct */ _NW_LMgr_AccessKey_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_AccessKey */ - /* isValidForOptionsList */ _NW_LMgr_Epoc32AccessKey_IsValidForOptionsList, - /* isValidKeyPress */ _NW_LMgr_Epoc32AccessKey_IsValidKeyPress - }, - { /* NW_LMgr_Epoc32AccessKey */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_LMgr_Epoc32AccessKey_IsValidForOptionsList (NW_LMgr_AccessKey_t* accesskey, - NW_Uint32 val) -{ - /* avoid unreferenced formal parameter warnings */ - (void) accesskey; - - return _NW_LMgr_Epoc32AccessKey_IsValidKeyPress(accesskey, val); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_LMgr_Epoc32AccessKey_IsValidKeyPress (NW_LMgr_AccessKey_t* accesskey, - NW_Uint32 val) -{ - (void)val; - (void)accesskey; - - if ((val >= '0') && (val <= '9')) { - return NW_TRUE; - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMgr_AccessKey_t* -NW_LMgr_AccessKey_New() -{ - return (NW_LMgr_AccessKey_t *) - NW_Object_New (&NW_LMgr_Epoc32AccessKey_Class); -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/IEventListener.c --- a/webengine/wmlengine/src/lmgr/src/IEventListener.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_LMgr_IEventListenerI.h" - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_IEventListener_Class_t NW_LMgr_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ 0 - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/ImageMapBox.cpp --- a/webengine/wmlengine/src/lmgr/src/ImageMapBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,739 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the handling image maps -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) - -#include "nw_lmgr_imagemapboxi.h" -#include "nw_image_cannedimages.h" -#include "nw_image_epoc32cannedimage.h" -#include "nw_image_virtualimage.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_areabox.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" -#include "nw_evt_controlkeyevent.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_scrollevent.h" -#include "nw_evt_activateevent.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_lmgr_animatedimageboxi.h" -#include "nw_lmgr_simplepropertylist.h" - -// ============================= LOCAL FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// NW_LMgr_ImageMapBox_InitializeBorder -// Method which initializes the border width, color, and style to set values. -// This method is used by the DrawBorder method. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -void -NW_LMgr_ImageMapBox_InitializeBorder(CGDIDeviceContext* aDeviceContext, - NW_LMgr_FrameInfo_t& aBorderWidth, - NW_LMgr_FrameInfo_t& aBorderColor, - NW_LMgr_FrameInfo_t& aBorderStyle, - NW_GDI_Color_t& aInitialBgColor, - NW_GDI_Color_t& aColor) -{ - aBorderWidth.top = (NW_GDI_Metric_t)NW_LMgr_Box_MediumBorderWidth; - aBorderWidth.bottom = (NW_GDI_Metric_t)NW_LMgr_Box_MediumBorderWidth; - aBorderWidth.left = (NW_GDI_Metric_t)NW_LMgr_Box_MediumBorderWidth; - aBorderWidth.right = (NW_GDI_Metric_t)NW_LMgr_Box_MediumBorderWidth; - - aBorderColor.bottom = NW_GDI_Color_Blue; - aBorderColor.left = NW_GDI_Color_Blue; - aBorderColor.right = NW_GDI_Color_Blue; - aBorderColor.top = NW_GDI_Color_Blue; - - aBorderStyle.bottom = NW_CSS_PropValue_solid; - aBorderStyle.left = NW_CSS_PropValue_solid; - aBorderStyle.right = NW_CSS_PropValue_solid; - aBorderStyle.top = NW_CSS_PropValue_solid; - - aInitialBgColor = aDeviceContext->BackgroundColor(); - - aColor = aBorderColor.bottom; - aDeviceContext->SwitchAgainstBG (&aColor); - aBorderColor.bottom = aColor; - aColor = aBorderColor.left; - aDeviceContext->SwitchAgainstBG (&aColor); - aBorderColor.left = aColor; - aColor = aBorderColor.right; - aDeviceContext->SwitchAgainstBG (&aColor); - aBorderColor.right = aColor; - aColor = aBorderColor.top; - aDeviceContext->SwitchAgainstBG (&aColor); - aBorderColor.top = aColor; -} - -// ----------------------------------------------------------------------------- -// NW_LMgr_ImageMapBox_InitializeImageMapIcon -// This method creates a new image map icon if one does not exist already and -// returns a pointer to the image. -// Returns: NW_Image_AbstractImage_t* -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_ImageMapBox_InitializeImageMapIcon(NW_LMgr_ImageMapBox_t* thisObj) - { - NW_ASSERT(thisObj); - - NW_TRY (status) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( thisObj ); - NW_Image_AbstractImage_t* abstractImageMap = (NW_Image_AbstractImage_t*)NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_ImageMap ); - - NW_ASSERT(abstractImageMap); - - // this will be deleted in the destructor - thisObj->iImageMapIcon = (NW_Image_AbstractImage_t*)NW_Image_Virtual_New( abstractImageMap ); - NW_THROW_OOM_ON_NULL(thisObj->iImageMapIcon, status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -TBrowserStatusCode -NW_LMgr_ImageMapBox_DrawImageMapIcon(NW_LMgr_ImageMapBox_t* thisObj, - CGDIDeviceContext* deviceContext) - { - NW_GDI_Point2D_t imagePos; - NW_GDI_Dimension3D_t imageSize; - NW_GDI_Rectangle_t innerRect; - - NW_TRY (status) - { - // draw the image map icon on top of the image map - deviceContext->SetPaintMode (NW_GDI_PaintMode_Copy); - - // if we don't have an image map icon, create one - if (!thisObj->iImageMapIcon) - { - status = NW_LMgr_ImageMapBox_InitializeImageMapIcon(thisObj); - NW_THROW_ON_ERROR(status); - } - - // get image size - status = NW_Image_AbstractImage_GetSize( thisObj->iImageMapIcon, &imageSize ); - NW_THROW_ON_ERROR(status); - - NW_LMgr_Box_GetInnerRectangle( NW_LMgr_BoxOf(thisObj), &innerRect ); - // do not stretch out image map icon - if( innerRect.dimension.height < imageSize.height ) - { - imageSize.height = innerRect.dimension.height; - } - if( innerRect.dimension.width < imageSize.width ) - { - imageSize.width = innerRect.dimension.width; - } - - imagePos.x = innerRect.point.x + NW_LMgr_Box_MediumBorderWidth; - imagePos.y = innerRect.point.y + NW_LMgr_Box_MediumBorderWidth; - - status = NW_Image_AbstractImage_DrawScaled( thisObj->iImageMapIcon, - deviceContext, - &imagePos, - &imageSize ); - NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -static -const -NW_LMgr_IEventListener_Class_t _NW_LMgr_ImageMapBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ImageMapBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_LMgr_ImageMapBox_IEventListener_ProcessEvent - } -}; - -// ----------------------------------------------------------------------------- -static -const NW_Object_Class_t* const _NW_LMgr_ImageMapBox_InterfaceList[] = { - &_NW_LMgr_ImageMapBox_IEventListener_Class, - NULL -}; - -// ========================== INTERFACE FUNCTIONS ============================== - -// ----------------------------------------------------------------------------- -NW_Uint8 -_NW_LMgr_ImageMapBox_IEventListener_ProcessEvent(NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_LMgr_ImageMapBox_t* thisObj; - NW_Uint8 ret = 0; - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - // obtain the implementer - thisObj = static_cast<NW_LMgr_ImageMapBox_t*>(NW_Object_Interface_GetImplementer (eventListener)); - - if (thisObj->eventHandler != NULL) - { - ret = NW_LMgr_EventHandler_ProcessEvent (thisObj->eventHandler, - NW_LMgr_BoxOf (thisObj), - event); - } - - return ret; -} - -// ----------------------------------------------------------------------------- -const -NW_LMgr_ImageMapBox_Class_t NW_LMgr_ImageMapBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AnimatedImageBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_ImageMapBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ImageMapBox_t), - /* construct */ _NW_LMgr_ImageMapBox_Construct, - /* destruct */ _NW_LMgr_ImageMapBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_ImgContainerBox_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ImageMapBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AnimatedImageBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImgContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AnimatedImageBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImageMapBox */ - /* unused */ NW_Object_Unused - } -}; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ImageMapBox_Construct -// Description: The constructor. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_LMgr_ImageMapBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) - { - NW_LMgr_ImageMapBox_t* imageBox; - - NW_ASSERT(dynamicObject != NULL); - - // invoke our superclass constructor - status = _NW_LMgr_AnimatedImageBox_Construct (dynamicObject, argp); - NW_THROW_ON_ERROR(status); - - // for convenience - imageBox = NW_LMgr_ImageMapBoxOf( dynamicObject ); - - // initialize the member variables - imageBox->eventHandler = va_arg (*argp, NW_LMgr_EventHandler_t*); - - imageBox->iUrl = va_arg (*argp, NW_Text_t*); - - imageBox->iAreaBoxArrayList = NULL; - - imageBox->iImageMapIcon = NULL; - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ImageMapBox_Destruct -// Description: The destructor. -// Returns: void -// ----------------------------------------------------------------------------- -// -void -_NW_LMgr_ImageMapBox_Destruct (NW_Object_Dynamic_t* dynamicObject) - { - NW_LMgr_ImageMapBox_t* thisObj; - - // for convenience - thisObj = NW_LMgr_ImageMapBoxOf (dynamicObject); - // destroy members - if (thisObj->iAreaBoxArrayList != NULL) - { - // - NW_ADT_Vector_Metric_t arrayIndex; - NW_ADT_Vector_Metric_t elementSize = NW_ADT_Vector_GetSize( thisObj->iAreaBoxArrayList ); - - for( arrayIndex = 0; arrayIndex < elementSize; arrayIndex++ ) - { - NW_LMgr_AreaBox_t* areaBox = *(NW_LMgr_AreaBox_t**)NW_ADT_Vector_ElementAt( thisObj->iAreaBoxArrayList, arrayIndex ); - NW_Object_Delete( areaBox ); - } - - NW_Object_Delete (thisObj->iAreaBoxArrayList); - thisObj->iAreaBoxArrayList = NULL; - } - - if (thisObj->iImageMapIcon != NULL) - { - NW_Object_Delete( thisObj->iImageMapIcon ); - thisObj->iImageMapIcon = NULL; - } - - if (thisObj->iUrl != NULL) - { - NW_Object_Delete( thisObj->iUrl ); - thisObj->iUrl = NULL; - } - - if (thisObj->eventHandler != NULL) - { - NW_Object_Delete( thisObj->eventHandler ); - thisObj->eventHandler = NULL; - } - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ImageMapBox_GetMinimumContentSize( NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t* size ) - { - NW_TRY (status) - { - NW_GDI_Dimension3D_t imageSize; - NW_LMgr_ImageMapBox_t* thisObj = NW_LMgr_ImageMapBoxOf( box ); - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - // call the parent's class implementation to get the size of the image map box - status = _NW_LMgr_ImgContainerBox_GetMinimumContentSize (box, size); - NW_THROW_ON_ERROR( status ); - - // we only want to recalculate the size of the image map box if we are - // in small screen mode - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - // now we need to get the size of the icon we are using - // if we don't have an image map icon, create one - if (!thisObj->iImageMapIcon) - { - status = NW_LMgr_ImageMapBox_InitializeImageMapIcon(thisObj); - NW_THROW_ON_ERROR(status); - } - - status = NW_Image_AbstractImage_GetSize( thisObj->iImageMapIcon, &imageSize ); - NW_THROW_ON_ERROR(status); - - // we want to see if the image map box size is less that the icon size plus - // the size of the borders (upper/lower) - if (size->height < (imageSize.height + (NW_LMgr_Box_MediumBorderWidth * 2))) - { - size->height = (imageSize.height + (NW_LMgr_Box_MediumBorderWidth * 2)); - } - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -NW_LMgr_ImageMapBox_t* -NW_LMgr_ImageMapBox_New (NW_ADT_Vector_Metric_t aNumProperties, - NW_Image_AbstractImage_t* aVirtualImage, - NW_Text_t* aAltText, - NW_Bool aBrokenImage, - NW_LMgr_EventHandler_t* aEventHandler, - NW_Text_t* aUrl) -{ - return (NW_LMgr_ImageMapBox_t*)NW_Object_New (&NW_LMgr_ImageMapBox_Class, - aNumProperties, aVirtualImage, aAltText, aBrokenImage, aEventHandler, aUrl ); -} - -// ----------------------------------------------------------------------------- -void -NW_LMgr_ImageMapBox_SetAreaBoxList (NW_LMgr_ImageMapBox_t* thisObj, - NW_ADT_DynamicVector_t* aAreaBoxArrayList) -{ - thisObj->iAreaBoxArrayList = aAreaBoxArrayList; -} - -// ----------------------------------------------------------------------------- -NW_ADT_DynamicVector_t* -NW_LMgr_ImageMapBox_GetAreaBoxList (NW_LMgr_ImageMapBox_t* thisObj) -{ - return thisObj->iAreaBoxArrayList; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_LMgr_ImageMapBox_DrawBorder(NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext) - { - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - NW_GDI_Color_t initialBgColor = 0; - NW_GDI_Color_t color = 0; - NW_LMgr_ImageMapBox_t* thisObj = NULL; - NW_ADT_Vector_Metric_t arrayIndex; - NW_ADT_Vector_Metric_t elementSize; - NW_LMgr_AreaBox_t* areaBox = NULL; - - NW_TRY(status) - { - NW_ASSERT(box != NULL); - thisObj = NW_LMgr_ImageMapBoxOf( box ); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - NW_ASSERT(rootBox); - - NW_HED_AppServices_t* appServices = rootBox->appServices; - NW_ASSERT(appServices); - - NW_LMgr_ImageMapBox_InitializeBorder(deviceContext, - borderWidth, - borderColor, - borderStyle, - initialBgColor, - color); - - // if we are in vertical layout mode (small screen) then we want to "highlight" the - // image box and display the image map icon if it has focus, otherwise we are in - // normal layout mode and we will want to highlight the area box that has focus - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - if( NW_LMgr_Box_HasFocus ( NW_LMgr_BoxOf( thisObj ) ) ) - { - // draw the border around the image map box - status = NW_LMgr_Box_DrawBorder(NW_LMgr_Box_GetFormatBounds(box), - deviceContext, - &borderWidth, - &borderStyle, - &borderColor); - NW_THROW_ON_ERROR(status); - - // draw the image map icon on the top left corner of the image - status = NW_LMgr_ImageMapBox_DrawImageMapIcon(thisObj, - deviceContext); - - NW_THROW_ON_ERROR(status); - } - } - else - { - // loop through area boxes and see if any are in focus - NW_ADT_DynamicVector_t* areaBoxArray = NW_LMgr_ImageMapBox_GetAreaBoxList(thisObj); - - // It is possible to have an ImageMapBox with no AreaBoxArray - // This happens when the usemap id is not present anywhere in the document - if (areaBoxArray != NULL) - { - // find the index of the node vector - elementSize = NW_ADT_Vector_GetSize(areaBoxArray); - - for (arrayIndex = 0; arrayIndex < elementSize; arrayIndex++) - { - areaBox = *(NW_LMgr_AreaBox_t**)NW_ADT_Vector_ElementAt (areaBoxArray, arrayIndex); - - if( NW_LMgr_Box_HasFocus( NW_LMgr_BoxOf( areaBox ) ) ) - { - // draw the border around the area box - status = NW_LMgr_Box_DrawBorder (NW_LMgr_AreaBox_GetBounds(NW_LMgr_BoxOf(areaBox)), - deviceContext, - &borderWidth, - &borderStyle, - &borderColor); - - NW_THROW_ON_ERROR(status); - - // if the image map box is broken, then we will need to display the alt text - // of the area boxes if alt text is provided - if( appServices->browserAppApi.IsImageMapView() && (NW_LMgr_ImgContainerBox_ImageIsBroken(box))) - { - status = NW_LMgr_AreaBox_DisplayAltText( areaBox, deviceContext ); - NW_THROW_ON_ERROR (status); - } - - break; - } - } - } - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - deviceContext->SetBackgroundColor( initialBgColor); - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// Function: NW_LMgr_ImageMapBox_Copy -// Description: Will return a new box which is a clone of the image map box to be -// used in the image map box view. The caller is responsible for deletion of the -// new box -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_ImageMapBox_Copy(NW_LMgr_Box_t* aBox, - NW_LMgr_Box_t** aNewBox) - { - NW_LMgr_ImageMapBox_t* oldImageMapBox = (NW_LMgr_ImageMapBox_t*)aBox; - NW_LMgr_ImageMapBox_t* newImageMapBox = NULL; - NW_ADT_Vector_Metric_t arrayIndex; - NW_ADT_Vector_Metric_t elementSize; - NW_LMgr_AreaBox_t* newAreaBox = NULL; - NW_LMgr_AreaBox_t* oldAreaBox = NULL; - NW_Image_Virtual_t* newVirtualImage = NULL; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_Text_t* altText = NULL; - NW_Text_t* url = NULL; - NW_ADT_DynamicVector_t* areaList = NULL; - NW_GDI_Rectangle_t bounds; - NW_LMgr_SimplePropertyList_t* oldPropertyList = NULL; - NW_LMgr_SimplePropertyList_t* newPropertyList = NULL; - void** ptr = NULL; - - NW_ASSERT(oldImageMapBox); - - NW_TRY( status ) - { - // copy the virtual image (each image map box needs it's own.) - // it will be deleted in the destructor - NW_Image_Virtual_t* virtualImage = (NW_Image_Virtual_t*)oldImageMapBox->super.super.virtualImage; - newVirtualImage = NW_Image_Virtual_New( virtualImage->image ); - NW_THROW_OOM_ON_NULL( newVirtualImage, status ); - - // copy the alt text - // the alt text will be deleted in the destructor - if (oldImageMapBox->super.super.altText) - { - altText = NW_Text_Copy(oldImageMapBox->super.super.altText, NW_TRUE); - NW_THROW_OOM_ON_NULL( altText, status ); - } - - if (oldImageMapBox->iUrl) - { - url = NW_Text_Copy(oldImageMapBox->iUrl, NW_TRUE); - NW_THROW_OOM_ON_NULL( url, status ); - } - - // copy the event handler - eventHandler = NW_HED_EventHandler_New(NW_HED_EventHandlerOf(oldImageMapBox->eventHandler)->documentNode, NW_HED_EventHandlerOf(oldImageMapBox->eventHandler)->context ); - NW_THROW_OOM_ON_NULL( eventHandler, status ); - - // the caller of this method is responsible for deleting the new image map box - newImageMapBox = NW_LMgr_ImageMapBox_New(5, - (NW_Image_AbstractImage_t*)newVirtualImage, - altText, - NW_LMgr_ImgContainerBox_ImageIsBroken((NW_LMgr_Box_t*)oldImageMapBox), - NW_LMgr_EventHandlerOf(eventHandler), - url); - NW_THROW_OOM_ON_NULL( newImageMapBox, status ); - - // now that the newImageMapBox has taken ownership of the image, alttext, and eventhandlers, set them to NULL - newVirtualImage = NULL; - altText = NULL; - eventHandler = NULL; - url = NULL; - - // create the new image map box's area list - areaList = (NW_ADT_DynamicVector_t*) NW_ADT_ResizableVector_New (sizeof(NW_LMgr_AreaBox_t), 10, 5 ); - NW_THROW_OOM_ON_NULL (areaList, status); - - // set the area list on the image map box - NW_LMgr_ImageMapBox_SetAreaBoxList(newImageMapBox, areaList); - - // copy the old image map box's area array to the new image map box's area array - NW_ADT_DynamicVector_t* oldAreaList = NW_LMgr_ImageMapBox_GetAreaBoxList(oldImageMapBox); - - if (oldAreaList != NULL) - { - // find the index of the node vector - elementSize = NW_ADT_Vector_GetSize(oldAreaList); - - for (arrayIndex = 0; arrayIndex < elementSize; arrayIndex++) - { - oldAreaBox = *(NW_LMgr_AreaBox_t**)NW_ADT_Vector_ElementAt (oldAreaList, arrayIndex); - - status = NW_LMgr_AreaBox_Copy(oldAreaBox, &newAreaBox); - NW_THROW_OOM_ON_NULL (newAreaBox, status); - - NW_LMgr_AreaBox_SetParentImageMapBox (newAreaBox, newImageMapBox); - - ptr = NW_ADT_DynamicVector_InsertAt (areaList, &newAreaBox, NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(ptr, status); - } - } - - // now that the area list has been set on the image map box, set the pointer to NULL - areaList = NULL; - - // set the old image map box bounds as the bounds for the new image map box - bounds = NW_LMgr_Box_GetFormatBounds(NW_LMgr_BoxOf(oldImageMapBox)); - NW_LMgr_Box_SetFormatBounds(NW_LMgr_BoxOf(newImageMapBox), bounds); - - // in order to have good picture quality once we are in image map mode, we need to delete - // the bitmap that was associated with the image map box in small screen mode and redecode - // it. This will create a new bitmap that will be better for the larger display - // of course we only want to do this if we are not a broken image - if (!NW_LMgr_ImgContainerBox_ImageIsBroken(aBox)) - { - NW_Image_Epoc32Simple_t* image = NW_Image_Epoc32SimpleOf (virtualImage->image); - - // delete the image bitmap that was used in small screen mode - if(( image->imageDecoding == NW_FALSE ) && (image->bitmap)) - { - // delete the image bitmap - CFbsBitmap* oldBitmap = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)image->bitmap); - delete oldBitmap; - image->bitmap = NULL; - CFbsBitmap* oldMask = CONST_CAST(CFbsBitmap*, (const CFbsBitmap*)image->mask); - delete oldMask; - image->mask = NULL; - image->srcHeight = 0; - image->srcWidth = 0; - } - - // force a decode on the image - (void)NW_Image_AbstractImage_ForceImageDecode( NW_Image_AbstractImageOf(virtualImage )); - } - - // copy the old image map box property list to the new image map box property list - oldPropertyList = (NW_LMgr_SimplePropertyList_t*)NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(oldImageMapBox)); - status = NW_LMgr_SimplePropertyList_CopyEntireList(oldPropertyList, &newPropertyList); - NW_THROW_ON_ERROR (status); - - // Delete the default property list that was allocated when newImageMapBox was created, - // otherwise we leak - NW_Object_Delete( (NW_LMgr_SimplePropertyList_t*)NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(newImageMapBox)) ); - - // set the property list on the new image map box - status = NW_LMgr_Box_SetPropList(NW_LMgr_BoxOf(newImageMapBox), (NW_LMgr_PropertyList_t*)newPropertyList); - NW_THROW_ON_ERROR (status); - - *aNewBox = (NW_LMgr_Box_t*)newImageMapBox; - } - NW_CATCH( status ) - { - if (newVirtualImage) - { - NW_Object_Delete(newVirtualImage); - } - - if (altText) - { - NW_Object_Delete(altText); - } - - if (url) - { - NW_Object_Delete(url); - } - - if (eventHandler) - { - NW_Object_Delete(eventHandler); - } - - if (newImageMapBox) - { - NW_Object_Delete(newImageMapBox); - } - - if (areaList) - { - NW_Object_Delete(areaList); - } - - if (newPropertyList) - { - NW_Object_Delete(newPropertyList); - } - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/ImgContainerBox.cpp --- a/webengine/wmlengine/src/lmgr/src/ImgContainerBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1013 +0,0 @@ -/* -* Copyright (c) 2003 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the handling image maps -* -*/ - - -// INCLUDE FILES -#include "nw_lmgr_imgcontainerboxi.h" -#include "nw_image_cannedimages.h" -#include "nw_image_epoc32cannedimage.h" -#include "nw_image_virtualimage.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_imagemapbox.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS -const NW_Ucs2 NW_LMgr_BoxUtils_Truncate[] = {'.','.','.','\0'}; -const NW_Text_Length_t NW_LMgr_BoxUtils_Truncate_Len = 3; - -// ============================= LOCAL FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// NW_FBox_ImgContainerBox_GetDirection -// Get the dir attribute -// Returns: void -// ----------------------------------------------------------------------------- -// -static -void -NW_FBox_ImgContainerBox_GetDirection(NW_LMgr_Box_t *box, - NW_GDI_FlowDirection_t* dir) -{ - NW_LMgr_Property_t dirProp; - NW_ASSERT(box != NULL); - - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_textDirection, &dirProp); - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - *dir = NW_GDI_FlowDirection_LeftRight; - } - else { - *dir = NW_GDI_FlowDirection_RightLeft; - } -} - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_LMgr_ImgContainerBox_DrawBorder(NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Bool isBroken, - NW_Uint8 hasFocus) -{ - NW_TRY(status) - { - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - NW_LMgr_PropertyValue_t focusBehavior; - NW_GDI_Color_t initialBgColor = 0; - NW_GDI_Color_t color = 0; - NW_LMgr_Property_t backgroundProp; - NW_GDI_Color_t backgroundColor = 0x00; - NW_LMgr_Box_t* parentBox = NULL; - NW_LMgr_IEventListener_t* eventListener; - - NW_ASSERT(box != NULL); - - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - if( isBroken == NW_TRUE ) - { - // to make sure we always draw the border for the broken image link or button, - // check the border width, if it is 0, set it to 1 - if (borderWidth.top == 0) - { - borderWidth.top = (NW_GDI_Metric_t)(borderWidth.top + 1); - borderWidth.bottom = (NW_GDI_Metric_t)(borderWidth.bottom + 1); - borderWidth.left = (NW_GDI_Metric_t)(borderWidth.left + 1); - borderWidth.right = (NW_GDI_Metric_t)(borderWidth.right + 1); - } - } - - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderStyle (box, &borderStyle, ELMgrFrameAll ); - initialBgColor = deviceContext->BackgroundColor(); - - // Modify the look of the box if we're in focus - if (hasFocus) - { - focusBehavior.token = NW_CSS_PropValue_none; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_focusBehavior, - NW_CSS_ValueType_Token, - &focusBehavior); - - if (focusBehavior.token == NW_CSS_PropValue_growBorder) - { - borderWidth.top = (NW_GDI_Metric_t)(borderWidth.top + 1); - borderWidth.bottom = (NW_GDI_Metric_t)(borderWidth.bottom + 1); - borderWidth.left = (NW_GDI_Metric_t)(borderWidth.left + 1); - borderWidth.right = (NW_GDI_Metric_t)(borderWidth.right + 1); - - if ((borderStyle.top == NW_CSS_PropValue_none) || - (borderStyle.top == NW_CSS_PropValue_hidden)) - { - borderStyle.top = NW_CSS_PropValue_solid; - } - - if ((borderStyle.bottom == NW_CSS_PropValue_none) || - (borderStyle.bottom == NW_CSS_PropValue_hidden)) - { - borderStyle.bottom = NW_CSS_PropValue_solid; - } - - if ((borderStyle.left == NW_CSS_PropValue_none) || - (borderStyle.left == NW_CSS_PropValue_hidden)) - { - borderStyle.left = NW_CSS_PropValue_solid; - } - - if ((borderStyle.right == NW_CSS_PropValue_none) || - (borderStyle.right == NW_CSS_PropValue_hidden)) - { - borderStyle.right = NW_CSS_PropValue_solid; - } - } - } - - eventListener = static_cast<NW_LMgr_IEventListener_t*> - (NW_Object_QueryInterface (box, &NW_LMgr_IEventListener_Class)); - - if ((!hasFocus) && (!eventListener)) - { - backgroundProp.type = NW_CSS_ValueType_Token; - backgroundProp.value.token = NW_CSS_PropValue_transparent; - - parentBox = NW_LMgr_BoxOf(box->parent); - while(parentBox != NULL) - { - if (NW_Object_IsClass(parentBox, &NW_LMgr_ActiveContainerBox_Class)) - { - break; //we don't want to swap color for anchors - } - - status = NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_backgroundColor, - &backgroundProp); - - if (status == KBrsrSuccess) - { - break; - } - parentBox = NW_LMgr_BoxOf(parentBox->parent); - } - - if (backgroundProp.type == NW_CSS_ValueType_Color) - { - backgroundColor = backgroundProp.value.integer; - deviceContext->SetBackgroundColor( backgroundColor); - } - } - - if (!hasFocus) - { - // draw the border - color = borderColor.bottom; - deviceContext->SwitchAgainstBG( &color); - borderColor.bottom = color; - color = borderColor.left; - deviceContext->SwitchAgainstBG( &color); - borderColor.left = color; - color = borderColor.right; - deviceContext->SwitchAgainstBG( &color); - borderColor.right = color; - color = borderColor.top; - deviceContext->SwitchAgainstBG( &color); - borderColor.top = color; - } - - status = NW_LMgr_Box_DrawBorder( NW_LMgr_Box_GetDisplayBounds(box), deviceContext, &borderWidth, &borderStyle, &borderColor); - NW_THROW_ON_ERROR(status); - - deviceContext->SetBackgroundColor( initialBgColor); - } - NW_CATCH (status) - {} - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_LMgr_ImgContainerBox_DisplayAltText(NW_LMgr_Box_t* box, - NW_Text_t* altText, - CGDIDeviceContext* deviceContext, - NW_GDI_Metric_t space, - NW_GDI_Point2D_t *textPos, - CGDIFont *boxFont) -{ - NW_Ucs2* storage = NULL; - NW_Bool freeNeeded = NW_FALSE; - NW_GDI_Color_t initialBgColor = 0; - NW_GDI_Color_t initialFgColor = 0; - NW_LMgr_Property_t backgroundProp; - NW_GDI_Color_t backgroundColor = 0x00; - NW_LMgr_Box_t* parentBox = NULL; - NW_GDI_Color_t color = 0x00; - NW_GDI_FlowDirection_t dir = NW_GDI_FlowDirection_LeftRight; - - NW_TRY(status) - { - NW_Text_Length_t length; - CGDIFont* font; - - if (altText == NULL) - { - NW_THROW_SUCCESS(status); - } - - /* Get the box font */ - font = boxFont; - NW_THROW_OOM_ON_NULL(font, status); - - status = deviceContext->SplitText(altText, - font, - space, - 0, - NW_GDI_FlowDirection_LeftRight, - &length, - NW_GDI_SplitMode_Clip); - - NW_THROW_ON(status, KBrsrOutOfMemory); - - if ((status == KBrsrSuccess) && /* split succeeded */ - (length < NW_Text_GetCharCount(altText))) - { - NW_Ucs2* newAltText; - NW_Uint16 flags = 0; - NW_Text_Length_t len = 0; - NW_Text_Length_t displayLength = 0; - NW_Text_UCS2_t* truncateText; - NW_GDI_Dimension2D_t truncateExtent; - - truncateText = NW_Text_UCS2_New ((NW_Ucs2*) NW_LMgr_BoxUtils_Truncate, - NW_LMgr_BoxUtils_Truncate_Len, 0); - NW_THROW_OOM_ON_NULL(truncateText, status); - - truncateExtent.height = truncateExtent.width = 0; - status = - deviceContext->GetTextExtent ( NW_TextOf(truncateText), - font, - 0, - NW_GDI_FlowDirection_LeftRight, - &truncateExtent); - NW_Object_Delete(truncateText); - - length = 0; - status = deviceContext->SplitText(altText, - font, - (NW_GDI_Metric_t)(space-truncateExtent.width), - 0, - NW_GDI_FlowDirection_LeftRight, - &length, - NW_GDI_SplitMode_Clip); - NW_THROW_ON(status, KBrsrOutOfMemory); - - newAltText = NW_Str_New(length + NW_LMgr_BoxUtils_Truncate_Len); - NW_THROW_OOM_ON_NULL(newAltText, status); - - flags = NW_Text_Flags_Aligned | NW_Text_Flags_Copy | NW_Text_Flags_NullTerminated; - storage = NW_Text_GetUCS2Buffer (altText, flags, &len, &freeNeeded); - NW_THROW_OOM_ON_NULL(storage, status); - - NW_Mem_memset(newAltText, 0, (length+1+NW_LMgr_BoxUtils_Truncate_Len)*sizeof(NW_Ucs2)); - NW_Mem_memcpy(newAltText, storage, length*sizeof(NW_Ucs2)); - - NW_Mem_memcpy(newAltText + length, NW_LMgr_BoxUtils_Truncate, - NW_LMgr_BoxUtils_Truncate_Len*sizeof(NW_Ucs2)); - - displayLength = (NW_Text_Length_t)(length+NW_LMgr_BoxUtils_Truncate_Len); - status = NW_Text_SetStorage(altText, newAltText, displayLength, NW_TRUE); - NW_THROW_ON_ERROR(status); - } - - initialBgColor = deviceContext->BackgroundColor(); - initialFgColor = deviceContext->ForegroundColor(); - backgroundProp.type = NW_CSS_ValueType_Token; - backgroundProp.value.token = NW_CSS_PropValue_transparent; - - parentBox = NW_LMgr_BoxOf(box->parent); - while(parentBox != NULL) - { - status = NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_backgroundColor, &backgroundProp); - if (status == KBrsrSuccess) - { - break; - } - parentBox = NW_LMgr_BoxOf(parentBox->parent); - } - - if (backgroundProp.type == NW_CSS_ValueType_Color) - { - backgroundColor = backgroundProp.value.integer; - deviceContext->SetBackgroundColor( backgroundColor); - } - - /* If the background color of the page is darker than half of the white color - indensity, the broken image description text should be white. - */ - color = deviceContext->ForegroundColor(); - - deviceContext->SwitchAgainstBG( &color); - - deviceContext->SetForegroundColor( color); - - NW_FBox_ImgContainerBox_GetDirection(box, &dir); - - status = deviceContext->DrawText( textPos, altText, font, 0, - (NW_GDI_TextDecoration_e)0, dir, space); - NW_THROW_ON_ERROR (status); - - deviceContext->SetForegroundColor( initialFgColor); - - deviceContext->SetBackgroundColor( initialBgColor); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - if ((storage != NULL) && freeNeeded) - { - NW_Mem_Free(storage); - } - return status; - } - NW_END_TRY -} - -// ----------------------------------------------------------------------------- -// NW_LMgr_ImgContainerBox_HandleVerticalLayout -// This method implements the image handling rules of vertical layout algorithm -// 1. scale the image maintaining the aspect ratio if width is greater than display width -// 2. scale the image maintaining the aspect ratio if height is greater than display height -// 3. If image is too small we do not want it to participate in the layout -// Returns: void -// ----------------------------------------------------------------------------- -// -static -void -NW_LMgr_ImgContainerBox_HandleVerticalLayout( NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size, - CGDIDeviceContext* deviceContext ) - { - const NW_GDI_Rectangle_t* rectangle; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_GDI_Metric_t maxWidth = 0; - NW_GDI_Metric_t maxHeight = 0; - - /* If image is too small we do not want it to participate in the layout */ - if ((size->width < NW_VerticalLayout_MinImageWidth1) || (size->height < NW_VerticalLayout_MinImageHeight1) || - ((size->width < NW_VerticalLayout_MinImageWidth2) && (size->height > NW_VerticalLayout_MinImageHeight2))) - { - /* if box is within <a> do not reduce size */ - /* if the box is an imagemap, do not reduce the size */ - if ((NW_LMgr_Box_FindBoxOfClass (box, &NW_LMgr_ActiveContainerBox_Class, NW_FALSE) == NULL) - && ( !NW_Object_IsInstanceOf(box, &NW_LMgr_ImageMapBox_Class))) - { - size->width = 0; - size->height = 0; - } - } - else - { - rectangle = deviceContext->DisplayBounds(); - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - maxWidth = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.left - padding.right - borderWidth.right - borderWidth.left - 6); - maxHeight = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.top - padding.bottom - borderWidth.top - borderWidth.bottom); - - /* scale the image maintaining the aspect ratio if width is greater than display width */ - if (size->width > maxWidth) - { - size->height = (NW_GDI_Metric_t)((maxWidth*size->height)/size->width); - size->width = maxWidth; - } - /* scale the image maintaining the aspect ratio if height is greater than display height */ - if (size->height > maxHeight) - { - size->width = (NW_GDI_Metric_t)((maxHeight*size->width)/size->height); - size->height = maxHeight; - } - } - } - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const -NW_LMgr_ImgContainerBox_Class_t NW_LMgr_ImgContainerBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_MediaBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ImgContainerBox_t), - /* construct */ _NW_LMgr_ImgContainerBox_Construct, - /* destruct */ _NW_LMgr_ImgContainerBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_ImgContainerBox_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ImgContainerBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_ImgContainerBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImgContainerBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ImgContainerBox_Construct -// Description: The constructor. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) - { - NW_LMgr_ImgContainerBox_t* imageBox; - - NW_ASSERT( dynamicObject != NULL ); - - /* for convenience */ - imageBox = NW_LMgr_ImgContainerBoxOf( dynamicObject ); - - NW_TRY (status) - { - NW_Ucs2* storage = NULL; - NW_Bool freeNeeded = NW_FALSE; - NW_Uint16 flags = 0; - NW_Text_Length_t len = 0; - - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct( dynamicObject, argp ); - NW_THROW_ON_ERROR( status ); - - /* initialize the member variables */ - imageBox->virtualImage = va_arg( *argp, NW_Image_AbstractImage_t* ); - NW_ASSERT( imageBox->virtualImage != NULL ); - - if( imageBox->virtualImage ) - { - NW_GDI_Rectangle_t bounds; - NW_GDI_Dimension3D_t imageSize; - - bounds.point.x = 0; - bounds.point.y = 0; - if( NW_Image_AbstractImage_GetSize( imageBox->virtualImage, &imageSize ) == KBrsrSuccess ) - { - bounds.dimension.width = imageSize.width; - bounds.dimension.height = imageSize.height; - } - else - { - // default image box sizes - bounds.dimension.width = NW_LMGR_BOX_MIN_WIDTH; - bounds.dimension.height = NW_LMGR_BOX_MIN_HEIGHT; - } - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( imageBox ), bounds ); - } - // alt text - imageBox->altText = va_arg( *argp, NW_Text_t* ); - if( imageBox->altText ) - { - /* compress whitespaces */ - flags = NW_Text_Flags_Aligned | NW_Text_Flags_Copy | NW_Text_Flags_NullTerminated; - flags |= NW_Text_Flags_CompressWhitespace; - storage = NW_Text_GetUCS2Buffer (imageBox->altText, flags, &len, &freeNeeded); - NW_THROW_OOM_ON_NULL(storage, status); - status = NW_Text_SetStorage(imageBox->altText, storage, len, freeNeeded); - NW_THROW_ON_ERROR(status); - } - // broken flag - imageBox->isBroken = (NW_Bool) va_arg( *argp, NW_Uint32 ); - } - NW_CATCH (status) - { - // image container does not take ownership if the construct failed. - imageBox->virtualImage = NULL; - imageBox->altText = NULL; - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ImgContainerBox_Destruct -// Description: The destructor. -// Returns: void -// ----------------------------------------------------------------------------- -// -void -_NW_LMgr_ImgContainerBox_Destruct( NW_Object_Dynamic_t* dynamicObject ) - { - NW_LMgr_ImgContainerBox_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_ImgContainerBoxOf (dynamicObject); - // destroy members - NW_Object_Delete( thisObj->virtualImage ); - NW_Object_Delete( thisObj->altText ); - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_GetMinimumContentSize( NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size ) - { - NW_TRY (status) - { - NW_LMgr_ImgContainerBox_t* imageContainer; - NW_GDI_Dimension3D_t imageSize; - CGDIDeviceContext* deviceContext = NULL; - NW_GDI_Dimension2D_t textSize; - NW_LMgr_PropertyValue_t sizeVal; - CGDIFont* font; - NW_Bool cssHeightSpecified = NW_TRUE; - NW_Bool cssWidthSpecified = NW_TRUE; - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - size->height = 0; - size->width = 0; - textSize.height = 0; - textSize.width = 0; - - /* for convenience */ - imageContainer = NW_LMgr_ImgContainerBoxOf( box ); - - // image alt text first - if( imageContainer->altText && imageContainer->isBroken == NW_TRUE ) - { - // Get the box font - font = NW_LMgr_Box_GetFont( box ); - NW_ASSERT( font != NULL ); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext( rootBox ); - - status = deviceContext->GetTextExtent( imageContainer->altText, - font, - 0, - NW_GDI_FlowDirection_LeftRight, - &textSize ); - NW_THROW_ON_ERROR( status ); - } - - // Get image size - if( imageContainer->virtualImage ) - { - status = NW_Image_AbstractImage_GetSize( imageContainer->virtualImage, &imageSize ); - - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_Box_GetPropertyValue( box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal ); - - if( status == KBrsrSuccess ) - { - size->height = (NW_GDI_Metric_t)sizeVal.integer; - } - else - { - cssHeightSpecified = NW_FALSE; - } - - status = NW_LMgr_Box_GetPropertyValue( box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal ); - - if( status == KBrsrSuccess ) - { - size->width = (NW_GDI_Metric_t)sizeVal.integer; - } - else - { - cssWidthSpecified = NW_FALSE; - } - - // Resize images in grid mode tables to fit in their parent's box. - NW_LMgr_Property_t prop; - - status = NW_LMgr_Box_GetProperty( box, NW_CSS_Prop_gridModeApplied, &prop ); - if( ( status == KBrsrSuccess ) && NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_Int32 parentWidth = 0; - NW_LMgr_Box_t* parent; - - // Get the width of the parent. - parent = box; - while( ( parent = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent( parent ) ) != NULL ) - { - if ( NW_Object_IsClass( parent, &NW_LMgr_StaticTableCellBox_Class ) ) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t border; - - parentWidth = parent->iFormatBounds.dimension.width; - - // Subtract the padding and border widths. - NW_LMgr_StaticTableCellBox_GetPadding( ( NW_LMgr_StaticTableCellBox_t* ) parent, - &padding); - - NW_LMgr_Box_GetBorderWidth( parent, &border, ELMgrFrameAll ); - - parentWidth -= (padding.left + padding.right + border.left + border.right); - break; - } - } - - // If the image is widder than the parent then resize it to fit. - // The aspect ratio is maintained. - if( ( parentWidth > 0 ) && ( size->width > parentWidth ) ) - { - NW_Float32 temp; - - temp = ( ( NW_Float32 ) parentWidth / size->width ) * size->height; - - size->width = parentWidth; - size->height = ( NW_GDI_Metric_t ) temp; - } - } - - if( ( size->height != 0 ) && ( !cssWidthSpecified ) && ( imageSize.height != 0 ) ) - { - size->width = (NW_GDI_Metric_t)( ( size->height * imageSize.width ) / imageSize.height ); - } - else if( ( size->height != 0 ) && ( size->width == 0 ) && ( imageSize.height != 0 ) ) - { - // In order to conform to IE and Opera look and feel, display a 1 pixel wide line - size->width = 1; - } - - if( ( size->width != 0) && ( !cssHeightSpecified ) && ( imageSize.width != 0 ) ) - { - size->height = (NW_GDI_Metric_t)( ( size->width * imageSize.height ) / imageSize.width ); - } - else if( ( size->width != 0) && ( size->height == 0 ) && ( imageSize.width != 0 ) ) - { - // In order to conform to IE and Opera look and feel, display a 1 pixel high line - size->height = 1; - } - - if( ( !cssWidthSpecified ) && ( !cssHeightSpecified ) ) - { - size->width = (NW_GDI_Metric_t)( imageSize.width + textSize.width ); - - if( imageSize.height > textSize.height ) - { - size->height = imageSize.height; - } - else - { - size->height = textSize.height; - } - } - } - // In case of vertical layout is enabled implement the image handling algorithm - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - if( deviceContext == NULL ) - { - deviceContext = NW_LMgr_RootBox_GetDeviceContext( NW_LMgr_Box_GetRootBox( box ) ); - } - - NW_LMgr_ImgContainerBox_HandleVerticalLayout( box, size, deviceContext ); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) - { - NW_LMgr_PropertyValue_t sizeVal; - TBrowserStatusCode status; - NW_LMgr_ImgContainerBox_t* thisObj; - - NW_ASSERT(box != NULL); - - /* for convenience */ - thisObj = NW_LMgr_ImgContainerBoxOf( box ); - - if( thisObj->isBroken ) - { - *splitBox = NULL; - /* If box does not fit in the space and the box is not - on the new line the input box needs to be pushed on the new line */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ((boxBounds.dimension.width > space) && !(flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - if(boxBounds.dimension.width <= space) - { - return KBrsrSuccess; - } - - /* we are more than space */ - - /* if width was specified we do not want to change it */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess) - { - return status; - } - boxBounds.dimension.width = space; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - else - { - // real image split is handled by base class - return NW_LMgr_Box_Class.NW_LMgr_Box.split(box, space, splitBox, flags ); - } - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ImgContainerBox_Draw( NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus ) - { - NW_TRY( status ) - { - NW_LMgr_ImgContainerBox_t* imageContainer; - - NW_ASSERT( box != NULL ); - - imageContainer = NW_LMgr_ImgContainerBoxOf( box ); - // height or width == 0 implies that there is no need to draw the image - // as the box does not occupy any space on displa. The box is also not drawn - // if the box hasn't been "placed". - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - - if ((boxBounds.dimension.width == 0) || (boxBounds.dimension.height == 0) || - !imageContainer->iBoxPlaced) - { - NW_THROW_SUCCESS(status); - } - - /* invoke our superclass draw method first */ - status = _NW_LMgr_Box_Draw( box, deviceContext, hasFocus ); - NW_THROW_ON_ERROR( status ); - - status = NW_LMgr_ImgBox_DrawContent( box, deviceContext, imageContainer->virtualImage, - imageContainer->isBroken, imageContainer->altText, hasFocus ); - NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -void -NW_LMgr_ImgContainerBox_ReplaceBrokenImage( NW_LMgr_Box_t* box, NW_Image_AbstractImage_t* image ) - { - NW_LMgr_ImgContainerBox_t* thisObj; - - NW_ASSERT( box != NULL ); - - /* for convenience */ - thisObj = NW_LMgr_ImgContainerBoxOf( box ); - - // free old image - NW_Object_Delete( thisObj->virtualImage ); - // and replace it - thisObj->virtualImage = image; - // update broken flag - thisObj->isBroken = NW_FALSE; - } - -NW_Bool -NW_LMgr_ImgContainerBox_ImageIsBroken( NW_LMgr_Box_t* box ) - { - NW_LMgr_ImgContainerBox_t* thisObj; - - NW_ASSERT( box != NULL ); - - /* for convenience */ - thisObj = NW_LMgr_ImgContainerBoxOf( box ); - - return thisObj->isBroken; - } - -void -NW_LMgr_ImgContainerBox_ImageIsPlaced(NW_LMgr_Box_t* box) - { - NW_LMgr_ImgContainerBox_t* thisObj; - - NW_ASSERT( box != NULL ); - - /* for convenience */ - thisObj = NW_LMgr_ImgContainerBoxOf( box ); - - thisObj->iBoxPlaced = NW_TRUE; - } - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -NW_LMgr_ImgContainerBox_t* -NW_LMgr_ImgContainerBox_New (NW_ADT_Vector_Metric_t numProperties, NW_Image_AbstractImage_t* virtualImage, - NW_Text_t* altText, NW_Bool brokenImage ) -{ - return (NW_LMgr_ImgContainerBox_t*) - NW_Object_New (&NW_LMgr_ImgContainerBox_Class, numProperties, virtualImage, altText, (NW_Uint32)brokenImage ); -} - -/* ------------------------------------------------------------------------- * - global utility functions - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_LMgr_ImgBox_DrawContent( NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Image_AbstractImage_t* image, - NW_Bool isBroken, - NW_Text_t* altText, - NW_Uint8 hasFocus) -{ - NW_TRY( status ) - { - NW_GDI_Point2D_t imagePos; - NW_GDI_Point2D_t textPos; - NW_GDI_Dimension3D_t imageSize; - NW_GDI_Rectangle_t innerRect; - CGDIFont* font = NW_LMgr_Box_GetFont (box); - - NW_ASSERT( box != NULL ); - NW_ASSERT( image != NULL ); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - NW_ASSERT(rootBox); - - NW_HED_AppServices_t* appServices = rootBox->appServices; - NW_ASSERT(appServices); - - // if we are in image map view, with a broken image, just draw the border - if (appServices->browserAppApi.IsImageMapView() && isBroken) - { - status = NW_LMgr_ImageMapBox_DrawBorder( box, deviceContext); - NW_THROW_ON_ERROR(status); - } - else - { - // draw image - if( image ) - { - // make our image draw itself at the specified location - deviceContext->SetPaintMode( NW_GDI_PaintMode_Copy ); - // get image size - NW_LMgr_Property_t hProp; - NW_LMgr_Property_t wProp; - - NW_LMgr_Box_GetInnerRectangle( box, &innerRect ); - - if( (NW_LMgr_Box_GetProperty( box, NW_CSS_Prop_height, &hProp ) == KBrsrSuccess) && - (NW_LMgr_Box_GetProperty( box, NW_CSS_Prop_width, &wProp ) == KBrsrSuccess) ) - { - imageSize.width = wProp.value.integer; - imageSize.height = hProp.value.integer; - } - else - { - status = NW_Image_AbstractImage_GetSize( image, &imageSize ); - NW_THROW_ON_ERROR(status); - } - - NW_LMgr_Box_GetInnerRectangle( box, &innerRect ); - - // do not stretch out broken images - if( isBroken == NW_TRUE ) - { - if( innerRect.dimension.height < imageSize.height ) - { - imageSize.height = innerRect.dimension.height; - } - if( innerRect.dimension.width < imageSize.width ) - { - imageSize.width = innerRect.dimension.width; - } - } - else - { - imageSize.width = innerRect.dimension.width; - imageSize.height = innerRect.dimension.height; - imageSize.depth = 0; - } - - imagePos.x = innerRect.point.x; - imagePos.y = innerRect.point.y; - - status = NW_Image_AbstractImage_DrawScaled( image, - deviceContext, - &imagePos, - &imageSize ); - NW_THROW_ON_ERROR(status); - - // draw altext - if( isBroken == NW_TRUE && - altText && innerRect.dimension.width > imageSize.width ) - { - textPos.x = (NW_GDI_Metric_t)(imagePos.x + imageSize.width); - textPos.y = imagePos.y; - - status = NW_LMgr_ImgContainerBox_DisplayAltText(box, - altText, - deviceContext, - (NW_GDI_Metric_t)(innerRect.dimension.width - imageSize.width), - &textPos, - font); - NW_THROW_ON_ERROR (status); - } - } - - /* draw the border */ - if( NW_Object_IsClass(box, &NW_LMgr_ImageMapBox_Class)) - { - status = NW_LMgr_ImageMapBox_DrawBorder(box, deviceContext); - NW_THROW_ON_ERROR(status); - } - else - { - status = NW_LMgr_ImgContainerBox_DrawBorder( box, deviceContext, isBroken, hasFocus ); - NW_THROW_ON_ERROR(status); - } - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAbstractTextBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAbstractTextBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1287 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_abstracttextboxi.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_nobrbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_text_ucs2.h" -#include "nwx_settings.h" -#include "nwx_string.h" -#include "nw_lmgr_activecontainerbox.h" -#include "urlloader_urlloaderint.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static -NW_LMgr_Box_t* -NW_LMgr_AbstractTextBox_SplitAt (NW_LMgr_AbstractTextBox_t* thisObj, - NW_Text_t *displayText, - NW_Text_Length_t splitLength) - { - NW_Text_Length_t totalLength = NW_Text_GetCharCount(displayText); - NW_LMgr_SplitTextBox_t *splitBox; - - NW_ASSERT(totalLength - splitLength > 0); - - /* Create the split box */ - splitBox = NW_LMgr_SplitTextBox_New(thisObj, - (NW_Text_Length_t)(totalLength - splitLength)); - if (splitBox == NULL) - { - return NULL; - } - - /* Update our member variables */ - NW_LMgr_AbstractTextBox_SetLength(thisObj, splitLength); - - return (NW_LMgr_Box_t*)splitBox; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetTextProperties (NW_LMgr_Box_t *box, - CGDIFont **font, - NW_GDI_Color_t *color, - NW_ADT_Token_t *textDecoration, - NW_Bool *compressWS, - NW_ADT_Token_t *textTransformation) -{ - NW_LMgr_PropertyValue_t textProp; - NW_LMgr_Box_t* parentBox = NW_LMgr_BoxOf(box->parent); - - NW_ASSERT (font != NULL); - - NW_TRY(status) - { - *font = NW_LMgr_Box_GetFont (parentBox); - NW_ASSERT (*font != NULL); - - if (color) - { - textProp.integer = 0; - - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_color, NW_CSS_ValueType_Color, &textProp); - if (status != KBrsrNotFound) - { - NW_THROW_ON_ERROR(status); - } - - *color = textProp.integer; - } - - if (textDecoration) - { - textProp.token = 0; - - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_textDecoration, NW_CSS_ValueType_Token, &textProp); - if (status != KBrsrNotFound) - { - NW_THROW_ON_ERROR(status); - } - - *textDecoration = textProp.token; - } - - if (compressWS) - { - textProp.token = NW_CSS_PropValue_normal; - - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &textProp); - if (status != KBrsrNotFound) - { - NW_THROW_ON_ERROR(status); - } - - *compressWS = (NW_Bool)((textProp.token == NW_CSS_PropValue_pre) ? NW_FALSE : NW_TRUE); - } - - if (textTransformation) - { - textProp.token = NW_CSS_PropValue_none; - - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_textTransform, NW_CSS_ValueType_Token, &textProp); - if (status != KBrsrNotFound) - { - NW_THROW_ON_ERROR(status); - } - - *textTransformation = textProp.token; - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_LMgr_AbstractTextBox_GetDeviceContext (CGDIDeviceContext * deviceContext, - NW_GDI_Color_t *oldColor, - NW_GDI_PaintMode_t *oldPaintMode) -{ - NW_ASSERT(oldColor != NULL); - NW_ASSERT(oldPaintMode != NULL); - - *oldColor = deviceContext->ForegroundColor (); - *oldPaintMode = deviceContext->PaintMode (); -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_LMgr_AbstractTextBox_SetDeviceContext (CGDIDeviceContext *deviceContext, - NW_GDI_Color_t color, - NW_GDI_PaintMode_t paintMode) -{ - deviceContext->SetForegroundColor( color); - - deviceContext->SetPaintMode ( paintMode); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_AbstractTextBox_ApplyTransform (NW_LMgr_AbstractTextBox_t *textBox, - NW_Ucs2 *inputString, - NW_Ucs2 **outputString) -{ - NW_LMgr_PropertyValue_t textTransformation; - - NW_TRY(status) { - - /* Check for the possible existence of transformations on the text style */ - textTransformation.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(textBox), - NW_CSS_Prop_textTransform, - NW_CSS_ValueType_Token, - &textTransformation); - NW_THROW_ON(status, KBrsrOutOfMemory); - - *outputString = inputString; - switch (textTransformation.token) - { - case NW_CSS_PropValue_capitalize: - status = NW_Str_Ucs2StrTitle(outputString); - NW_THROW_ON_ERROR(status); - break; - - case NW_CSS_PropValue_uppercase: - status = NW_Str_Ucs2StrUpr(outputString); - NW_THROW_ON_ERROR(status); - break; - - case NW_CSS_PropValue_lowercase: - status = NW_Str_Ucs2StrLwr(outputString); - NW_THROW_ON_ERROR(status); - break; - - default: - break; - } - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -/* The static instance of the Text_Box class object */ -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_AbstractTextBox_Class_t NW_LMgr_AbstractTextBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_MediaBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_AbstractTextBox_t), - /* construct */ _NW_LMgr_Box_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_AbstractTextBox_Split, - /* resize */ _NW_LMgr_AbstractTextBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_AbstractTextBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AbstractTextBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_AbstractTextBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AbstractTextBox */ - /* getText */ NULL, - /* getStart */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Resize (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_REQUIRED_PARAM(context); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - TBrowserStatusCode status = NW_LMgr_AbstractTextBox_GetDimensions(NW_LMgr_AbstractTextBoxOf(box), &(boxBounds.dimension) ); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - return status; -} - -/* ------------------------------------------------------------------------- */ -/* TODO: contains LR-specific code */ -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t* size ) -{ - NW_LMgr_PropertyValue_t value; - NW_ADT_Token_t whitespace; - - NW_TRY(status) { - /* Get the "white-space" property */ - value.token = NW_CSS_PropValue_normal; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &value); - NW_THROW_ON(status, KBrsrOutOfMemory); - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - // The nowrap property may come from a tablecell. - if (status == KBrsrNotFound && !NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_LMgr_Box_t* parentBox = NW_LMgr_BoxOf(box->parent); - if (NW_Object_IsInstanceOf(parentBox, &NW_LMgr_StaticTableCellBox_Class)) - { - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &value); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - - whitespace = value.token; - - status = NW_LMgr_AbstractTextBox_GetDimensions(NW_LMgr_AbstractTextBoxOf(box), size); - - if( NW_LMgr_RootBox_GetWrapEnabled( rootBox ) || (whitespace != NW_CSS_PropValue_nowrap)) - { - size->width = NW_LMGR_BOX_MIN_WIDTH; - } - } - - NW_CATCH(status) { /* empty */ } - - NW_FINALLY { - return status; - - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_LMgr_AbstractTextBox_t* textBox = NULL; - CGDIFont *font = NULL; - NW_GDI_PaintMode_t paintMode, oldPaintMode; - NW_GDI_Color_t color, oldColor; - NW_ADT_Token_t textDecoration; - NW_Bool compressWS; - NW_GDI_Point2D_t point; - NW_LMgr_RootBox_t *rootBox = NULL; - NW_Text_t* displayText = NULL; - NW_GDI_TextDecoration_t drawDecor = NW_GDI_TextDecoration_None; - NW_GDI_FlowDirection_t globalDir; - NW_LMgr_PropertyValue_t dirValue; - NW_LMgr_Box_t* parentBox = NULL; - - /* For convenience */ - textBox = NW_LMgr_AbstractTextBoxOf (box); - - /* Get the DeviceContext state */ - NW_LMgr_AbstractTextBox_GetDeviceContext ( deviceContext, &oldColor, &oldPaintMode); - - NW_TRY(status) - { - /* Get the displayable text */ - displayText = NW_LMgr_AbstractTextBox_GetDisplayText(textBox, NW_TRUE); - NW_THROW_OOM_ON_NULL(displayText, status); - - /* Get the text direction */ - dirValue.token = NW_CSS_PropValue_ltr; - status = NW_LMgr_Box_GetPropertyValue(box, - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - NW_THROW_ON(status, KBrsrOutOfMemory); - - //If the status is KBrsrNotFound, it does not necessary mean that the text direction should be from LEFT to RIGHT. - //It only means that the text direction property is not set in the <html> tag. The actual direction still - //can be from RIGHT to LEFT. For example, if the language is arabic, it has to be RIGHT to LEFT. - //We need to try one more time. That is to find the information from the text itself. - if(status == KBrsrNotFound) - { - NW_Text_Length_t length; - TBool freeNeeded = NW_FALSE; - TText16* string = NW_Text_GetUCS2Buffer (displayText, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &length, - (unsigned char*) &freeNeeded); - TPtrC ptrC(string); - const TText* text = ptrC.Ptr(); - TChar::TBdCategory category = TChar(*text).GetBdCategory(); //we just test the 1st char - if(category == TChar::ERightToLeft ||category == TChar::ERightToLeftArabic) - { - globalDir = NW_GDI_FlowDirection_RightLeft; - } - else - { - globalDir = NW_GDI_FlowDirection_LeftRight; - } - if (freeNeeded) - { - NW_Mem_Free (string); - } - } - else //found. We use whatever specified - { - if (dirValue.token == NW_CSS_PropValue_ltr) - { - globalDir = NW_GDI_FlowDirection_LeftRight; - } - else - { - globalDir = NW_GDI_FlowDirection_RightLeft; - } - } - /* Invoke our superclass draw method first. - */ - status = NW_LMgr_MediaBox_Class.NW_LMgr_Box.draw (box, deviceContext, hasFocus); - - NW_THROW_ON_ERROR(status); - - /* Get the box properties */ - status = NW_LMgr_AbstractTextBox_GetTextProperties (box, &font, &color, &textDecoration, - &compressWS, NULL); - NW_THROW_ON_ERROR(status); - - /* TODO: if cache is empty, ignore CSS imposed by "a:visited" pseudo-class, - but for now we just fix the color */ - - /* Check for link by looking at parent container. */ - if (NW_Object_IsClass(NW_LMgr_Box_GetParent(box), &NW_LMgr_ActiveContainerBox_Class)) - { - /* If Cache is empty, force links to be drawn in uncached color (blue). - NOTE: GetNumEntries allocates a list of the cached files, so avoid it for non-links. */ - //if (UrlLoader_GetNumCacheEntries() == 0) - //{ - // color = NW_GDI_Color_Blue; - // if (NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_color, &tempProp) == KBrsrSuccess) - // { - // color = tempProp.value.integer; - // } - //} - } - - if (hasFocus) - { - NW_LMgr_PropertyValue_t focusBehavior; - - focusBehavior.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_focusBehavior, - NW_CSS_ValueType_Token, - &focusBehavior); - - if (focusBehavior.token != NW_CSS_PropValue_altText) - { - /* text of the focused anchor is always black */ - color = 0x00000000; - - deviceContext->SetForegroundColor ( (NW_GDI_Color_t)0x00777777); - } - } - - /* Prepare the DeviceContext */ - paintMode = NW_GDI_PaintMode_Copy; - if (hasFocus) - { - paintMode = (NW_GDI_PaintMode_e) (paintMode | NW_GDI_PaintMode_Not); - } - - if ((textDecoration == NW_CSS_PropValue_blink) || (textDecoration == NW_CSS_PropValue_blinkUnderline)) - { - /* In case of blink, we draw the TextBox only at every second "round". */ - rootBox = NW_LMgr_Box_GetRootBox (box); - if (rootBox->blinkState) - { - NW_THROW_SUCCESS(status); - } - } - - NW_LMgr_AbstractTextBox_SetDeviceContext ( deviceContext, color, paintMode); - - /* Now draw the text */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - point = boxBounds.point; - - if ((textDecoration == NW_CSS_PropValue_underline) || (textDecoration == NW_CSS_PropValue_blinkUnderline)) - { - drawDecor = NW_GDI_TextDecoration_Underline; - } - - if (textDecoration == NW_CSS_PropValue_strikeout) - { - drawDecor = NW_GDI_TextDecoration_Strikeout; - } - - /* In vertical-layout mode, We want to remove the nbsp, if they are within a table cell - For e.g. <td> &nbsp; </td> DeviceContext will use the iRemoveNbsp flag while calculating the text - extent and drawing the text - */ - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(textBox); - if (NW_Object_IsInstanceOf(parentBox, &NW_LMgr_VerticalTableCellBox_Class)) - { - deviceContext->SetRemoveNbsp (NW_TRUE); - } - status = deviceContext->DrawText (&point, - displayText, - font, - 0, - drawDecor, - globalDir, - boxBounds.dimension.width); - if (deviceContext->RemoveNbsp()) - { - deviceContext->SetRemoveNbsp (NW_FALSE); - } - NW_THROW_ON_ERROR(status); - - /* Reset the dev context */ - NW_LMgr_AbstractTextBox_SetDeviceContext ( deviceContext, - oldColor, oldPaintMode); - } - NW_CATCH(status) - { - } - NW_FINALLY - { - NW_Object_Delete(displayText); - return status; - } - NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -NW_GDI_Metric_t -_NW_LMgr_AbstractTextBox_GetBaseline (NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t* parentBox = NW_LMgr_BoxOf(box->parent); - CGDIFont* font; - TGDIFontInfo fontInfo; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_AbstractTextBox_Class)); - - /* we're going to need the DeviceContext to get the FontInfo */ - - /* Set the font to match the parent. TODO: this may not be the best policy */ - font = NW_LMgr_Box_GetFont (parentBox); - if (font != NULL) - { - TBrowserStatusCode status = font->GetFontInfo ( &fontInfo); - NW_ASSERT (status == KBrsrSuccess); - - if (NW_LMgr_Box_GetFormatBounds(box).dimension.height > 0) - { - return fontInfo.baseline; - } - else - { - return 0; - } - } - - /* unable to get the FontInfo we return our height */ - return NW_LMgr_Box_GetFormatBounds(box).dimension.height; -} - -/* ------------------------------------------------------------------------- * - * Split splits the TextBox based on its "white-space" property, - * and any flags that are passed in from the container doing the layout. - * - * The whitespace property specifies the way paragraphs will - * be formatted. Its values signify the following: - * 1) white-space == nowrap: whitespace in the string is - * compressed, and no splitting is done until the end of paragraph - * is reached. - * 2) white-space == pre: whitespace in the string is conserved, - * and the only line breaks occur at the CR character (0x0a). - * 3) white-space == normal: whitespace is compressed and - * the text is word-wrapped. If the text can't be wrapped within - * the constraint, by default the smallest possible split is returned - * which preserves the word boundaries. - * - * The allowed flags are the following: - * 1) NW_LMgr_Box_IsNewline: indicates that this box is at a newline. - */ - -TBrowserStatusCode -_NW_LMgr_AbstractTextBox_Split (NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags) -{ - NW_LMgr_AbstractTextBox_t* textBox; - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - CGDIFont* gdiFont; - NW_LMgr_Box_t* parent; - NW_Text_t* displayText = NULL; - NW_LMgr_PropertyValue_t value; - NW_ADT_Token_t whitespace; - NW_Bool mustSplit; - NW_Text_Length_t length = 0; - NW_GDI_FlowDirection_t globalDir; - NW_LMgr_PropertyValue_t dirValue; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_AbstractTextBox_Class)); - - /* for convenience */ - textBox = NW_LMgr_AbstractTextBoxOf (box); - - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = (NW_LMgr_RootBox_t*) NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - /* Get the font for the box */ - gdiFont = NW_LMgr_Box_GetFont (box); - NW_ASSERT(gdiFont != NULL); - - NW_TRY(status) { - - /* In vertical layout mode we do not want to have extra space when visibility is hidden */ - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_LMgr_PropertyValue_t visibilityVal; - visibilityVal.token = NW_CSS_PropValue_visible; - status = NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (status == KBrsrSuccess && visibilityVal.token == NW_CSS_PropValue_hidden) - { - /* Do not split*/ - *splitBox = NULL; - NW_THROW_SUCCESS(status); - } - } - - /* Get the text object */ - displayText = NW_LMgr_AbstractTextBox_GetDisplayText(textBox, NW_FALSE); - NW_THROW_OOM_ON_NULL(displayText, status); - - /* Get the text direction */ - dirValue.token = NW_CSS_PropValue_ltr; - status = NW_LMgr_Box_GetPropertyValue(box, - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if (dirValue.token == NW_CSS_PropValue_ltr) - { - globalDir = NW_GDI_FlowDirection_LeftRight; - } - else - { - globalDir = NW_GDI_FlowDirection_RightLeft; - } - - /* Get the "white-space" property */ - value.token = NW_CSS_PropValue_normal; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &value); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // The nowrap property may come from a tablecell. - if( status == KBrsrNotFound && !NW_LMgr_RootBox_GetSmallScreenOn( rootBox )) - { - NW_LMgr_Box_t* parentBox = NW_LMgr_BoxOf(box->parent); - if (NW_Object_IsInstanceOf(parentBox, &NW_LMgr_StaticTableCellBox_Class)) - { - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &value); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - - whitespace = value.token; - - if( NW_LMgr_RootBox_GetWrapEnabled( rootBox ) && (whitespace == NW_CSS_PropValue_nowrap)) { - - /* if the current box (or ancestor) is a 'nobr' box then don't override the nowrap property */ - NW_LMgr_Box_t* tempBox = box; - NW_Bool nobrPresent = NW_FALSE; - while (tempBox != NULL && !nobrPresent) - { - nobrPresent = NW_Object_IsInstanceOf(tempBox, &NW_LMgr_NobrBox_Class); - tempBox = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (tempBox); - } - - if(!nobrPresent) - { - NW_LMgr_Box_t *surroundingBlock = NW_LMgr_Box_FindBoxOfClass(box, &NW_LMgr_FlowBox_Class, NW_TRUE); - if (!NW_Object_IsInstanceOf(surroundingBlock, &NW_LMgr_MarqueeBox_Class)) - { - whitespace = NW_CSS_PropValue_normal; - } - } - } - - /* Get the flags */ - if ((flags & NW_LMgr_Box_SplitFlags_NoPendingWS) || (flags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - mustSplit = NW_TRUE; - } - else - { - mustSplit = NW_FALSE; - } - - /* Do the split */ - switch (whitespace) - { - case NW_CSS_PropValue_pre: - status = deviceContext->SplitText( displayText, - gdiFont, - -1, - 0, - globalDir, - &length, - NW_GDI_SplitMode_Newline); - NW_THROW_ON(status, KBrsrOutOfMemory); - break; - - case NW_CSS_PropValue_nowrap: - length = NW_Text_GetCharCount(displayText); - status = KBrsrSuccess; - /* sets the parents' width to be the same as box width unless the parent is wider*/ - for (parent = NW_LMgr_BoxOf(box->parent); parent != NULL; parent = NW_LMgr_BoxOf(parent->parent)) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - NW_GDI_Rectangle_t parentBoxBounds = NW_LMgr_Box_GetFormatBounds( parent ); - - if( NW_Object_IsInstanceOf (parent, &NW_LMgr_MarqueeBox_Class) || - parentBoxBounds.dimension.width > boxBounds.dimension.width ) - { - break; - } - else - { - parentBoxBounds.dimension.width = boxBounds.dimension.width; - NW_LMgr_Box_SetFormatBounds( parent, parentBoxBounds ); - } - } - break; - - case NW_CSS_PropValue_flags_smallScreenPre: - status = deviceContext->SplitText( displayText, - gdiFont, - space, - 0, - globalDir, - &length, - NW_GDI_SplitMode_Newline); - NW_THROW_ON(status, KBrsrOutOfMemory); - if ( status == KBrsrLmgrNoSplit ) - { - status = deviceContext->SplitText( displayText, - gdiFont, - space, - 0, - globalDir, - &length, - NW_GDI_SplitMode_WordWrap); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if ( status == KBrsrLmgrNoSplit && - mustSplit && - (flags & NW_LMgr_Box_SplitFlags_AtNewLine) ) - { - /* If wrap is enabled, we must clip */ - status = deviceContext->SplitText( displayText, - gdiFont, - space, - 0, - globalDir, - &length, - NW_GDI_SplitMode_Clip); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - break; - - case NW_CSS_PropValue_normal: - default: - status = deviceContext->SplitText( displayText, - gdiFont, - space, - 0, - globalDir, - &length, - NW_GDI_SplitMode_WordWrap); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if ( status == KBrsrLmgrNoSplit && - mustSplit && - (flags & NW_LMgr_Box_SplitFlags_AtNewLine) ) - { - /* If wrap is enabled, we must clip */ - status = deviceContext->SplitText( displayText, - gdiFont, - space, - 0, - globalDir, - &length, - NW_GDI_SplitMode_Clip); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - break; - - } - - if (status == KBrsrSuccess) - { - /* Did I eat the whole thing? */ - if(length == NW_Text_GetCharCount(displayText)) - { - *splitBox = NULL; - } - else - { - /* I only ate some of the text */ - *splitBox = NW_LMgr_AbstractTextBox_SplitAt (textBox, displayText, length); - NW_THROW_OOM_ON_NULL(*splitBox, status); - } - } - else - { - *splitBox = NULL; - NW_THROW_STATUS (status, KBrsrLmgrNoSplit); - } - } - NW_CATCH(status) - { - /* empty */ - } - NW_FINALLY - { - NW_Object_Delete(displayText); - return status; - } - NW_END_TRY; -} - -/* ------------------------------------------------------------------------- * - * At this point we are not computing margins, padding and borders for text - * boxes: i.e. text boxes are just containers for raw text. We may want to - * revisit this model, but for now we are assuming that these properties are - * relevant not to individual text items, but to their containers. This makes - * sense since XML text elements don't have attributes and the relevant - * properties are not inheritable. - */ - -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetDimensions (NW_LMgr_AbstractTextBox_t* textBox, - NW_GDI_Dimension2D_t *size) -{ - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - CGDIFont *font = NULL; - NW_Text_t* displayText = NULL; - NW_LMgr_Box_t* parentBox = NULL; - NW_LMgr_PropertyValue_t dirValue; - - /* parameter assertion block */ - NW_ASSERT (textBox != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (textBox, &NW_LMgr_AbstractTextBox_Class)); - - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = (NW_LMgr_RootBox_t*) NW_LMgr_Box_GetRootBox ((NW_LMgr_Box_t*)textBox); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - NW_TRY(status) - { - /* In vertical layout mode we do not want to have extra space when visibility is hidden */ - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_LMgr_PropertyValue_t visibilityVal; - visibilityVal.token = NW_CSS_PropValue_visible; - if ((NW_LMgr_Box_GetPropertyValue ((NW_LMgr_Box_t*)textBox, NW_CSS_Prop_visibility,NW_CSS_ValueType_Token, &visibilityVal)== KBrsrSuccess ) && visibilityVal.token == NW_CSS_PropValue_hidden) - { - size->width = 0 ; - size->height = 0; - NW_THROW_SUCCESS(status); - } - } - - /* Get the displayable text */ - displayText = NW_LMgr_AbstractTextBox_GetDisplayText(textBox, NW_TRUE); - NW_THROW_OOM_ON_NULL(displayText, status); - - /* Get the font for the box */ - font = NW_LMgr_Box_GetFont ((NW_LMgr_Box_t*)textBox); - NW_ASSERT(font != NULL); - - /* calculate the extents */ - /* NOTE: DIRECTION-SENSITIVE CODE HERE */ - - dirValue.token = NW_CSS_PropValue_ltr; - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(textBox), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* In vertical-layout mode, We want to remove the nbsp, if they are within a table cell - For e.g. <td> &nbsp; </td> DeviceContext will use the iRemoveNbsp flag while calculating the text - extent and drawing the text - */ - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(textBox); - if (NW_Object_IsInstanceOf(parentBox, &NW_LMgr_VerticalTableCellBox_Class)) - { - deviceContext->SetRemoveNbsp (NW_TRUE); - } - - status = deviceContext->GetTextExtent( displayText, font, 0, NW_GDI_FlowDirection_LeftRight, size); - - if (deviceContext->RemoveNbsp()) - { - deviceContext->SetRemoveNbsp (NW_FALSE); - } - NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) - { - } - NW_FINALLY - { - NW_Object_Delete(displayText); - - return status; - } NW_END_TRY; -} - -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetMinimumSizeByWord( - NW_LMgr_AbstractTextBox_t* aTextBox, - NW_GDI_Dimension2D_t* aMinSize ) - { - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - CGDIFont* font = NULL; - NW_Text_t* displayText = NULL; - NW_Text_t* wordText = NULL; - NW_GDI_Dimension2D_t extent; - NW_Ucs2* wordStart; - NW_Ucs2* wordEnd; - NW_Ucs2 savedChar; - NW_Text_Length_t wordLen; - - // Parameter assertion block. - NW_ASSERT( aTextBox != NULL ); - NW_ASSERT( NW_Object_IsInstanceOf( aTextBox, &NW_LMgr_AbstractTextBox_Class ) ); - NW_ASSERT( aMinSize != NULL ); - - // Get deviceContext to do text extent calculations. - rootBox = (NW_LMgr_RootBox_t*)NW_LMgr_Box_GetRootBox( (NW_LMgr_Box_t*)aTextBox ); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - // Get font for the box. - font = NW_LMgr_Box_GetFont( (NW_LMgr_Box_t*)aTextBox ); - NW_ASSERT( font != NULL ); - - NW_TRY( status ) - { - // Get the displayable text. - displayText = NW_LMgr_AbstractTextBox_GetDisplayText( aTextBox, NW_TRUE ); - NW_THROW_OOM_ON_NULL( displayText, status ); - - // Create an object to hold the word. - wordText = (NW_Text_t*)NW_Text_UCS2_New( NULL, 0, 0 ); - NW_THROW_OOM_ON_NULL( wordText, status ); - - // Find the word that has the longest display extent. The longest - // extent is the minimum size for ths box. - extent.width = 0; - aMinSize->width = NW_LMGR_BOX_MIN_WIDTH; - wordStart = (NW_Ucs2 *)displayText->storage; - - - //For Chinese string we take the length of one character as the minimum length - EVariantFlag variant = AknLayoutUtils::Variant(); - if(variant == EApacVariant) - { - wordLen = 1; - wordEnd = wordStart + 1; - // Get the extent of the word. - NW_Text_SetStorage( wordText, wordStart, wordLen, NW_Text_Flags_NullTerminated ); - status = deviceContext->GetTextExtent( wordText, font, 0, NW_GDI_FlowDirection_LeftRight, &extent ); - *aMinSize = extent; - } - else - { - while ( *wordStart ) - { - wordEnd = wordStart; - wordLen = 0; - // Find the end of the current word by looking for whitespace or - // null. Note, this algorithm is simplistic, looking only for - // whitespace. A more robust implementation would account for - // hard/soft hyphens and language-specific rules such as the - // word-wrapping complexities of Thai. - while ( *wordEnd && !NW_Str_Isspace( *wordEnd ) ) - { - wordLen++; - wordEnd++; - } - // Temporarily insert a null at the end of the word. - savedChar = *wordEnd; - *wordEnd = 0; - // Get the extent of the word. - NW_Text_SetStorage( wordText, wordStart, wordLen, NW_Text_Flags_NullTerminated ); - status = deviceContext->GetTextExtent( wordText, font, 0, NW_GDI_FlowDirection_LeftRight, &extent ); - // Replace the temporary null with the saved character. - *wordEnd = savedChar; - NW_THROW_ON_ERROR(status); - // Track the largest word extent. - if (extent.width > aMinSize->width) - { - *aMinSize = extent; - } - // Skip over any whitespace. - while ( NW_Str_Isspace( *wordEnd ) ) - { - wordEnd++; - } - wordStart = wordEnd; - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - if ( displayText ) - { - NW_Object_Delete(displayText); - } - if ( wordText ) - { - NW_Object_Delete( wordText ); - } - return status; - } - NW_END_TRY; - } - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -NW_LMgr_AbstractTextBox_GetDisplayText (NW_LMgr_AbstractTextBox_t* textBox, - NW_Bool prepareForRendering) -{ - NW_Text_t *text; - NW_LMgr_Box_t *box = NW_LMgr_BoxOf(textBox); - NW_LMgr_PropertyValueToken_t whitespace; - NW_Ucs2 *storage = NULL; - NW_Ucs2 *transStorage = NULL; - NW_Ucs2 *substr = NULL; - NW_Text_Length_t len; - NW_Text_Length_t i = 0; - NW_Text_Length_t j = 0; - NW_Text_Length_t endIndex; - NW_Bool freeNeeded; - NW_Uint16 flags = 0; - NW_LMgr_PropertyValue_t value; - - NW_TRY(status) { - - /* Get the whole text */ - text = NW_LMgr_AbstractTextBox_GetText(textBox); - NW_THROW_OOM_ON_NULL(text, status); - - /* Get the "white-space" property */ - value.token = NW_CSS_PropValue_normal; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_whitespace, NW_CSS_ValueType_Token, &value); - NW_THROW_ON(status, KBrsrOutOfMemory); - whitespace = value.token; - - /* We ignore the prepareForRendering flag if white-space == pre */ - if (whitespace == NW_CSS_PropValue_pre) { - prepareForRendering = NW_FALSE; - } - - /* Get storage, using appropriate whitespace handling */ - flags = NW_Text_Flags_Aligned | NW_Text_Flags_Copy | NW_Text_Flags_NullTerminated; - if (whitespace != NW_CSS_PropValue_pre) { - flags |= NW_Text_Flags_CompressWhitespace; - if (whitespace == NW_CSS_PropValue_flags_smallScreenPre) { - flags |= NW_Text_Flags_RetainLineFeeds; - } - } - storage = NW_Text_GetUCS2Buffer (text, flags, &len, &freeNeeded); - NW_THROW_OOM_ON_NULL(storage, status); - - /* Apply the transform */ - status = NW_LMgr_AbstractTextBox_ApplyTransform (textBox, storage, &transStorage); - NW_THROW_ON_ERROR(status); - - /* If we got a new string as a result of the transformation, delete it */ - if (storage != transStorage) { - if (freeNeeded) { - NW_Str_Delete(storage); - } - } - - /* If length is zero, we assume that it is uninitialized */ - if (NW_LMgr_AbstractTextBox_GetLength(textBox) == 0) { - NW_LMgr_AbstractTextBox_SetLength(textBox, NW_Str_Strlen(transStorage)); - } - - substr = NW_Str_New(NW_LMgr_AbstractTextBox_GetLength(textBox) + 1); - NW_THROW_OOM_ON_NULL(substr, status); - - i = NW_LMgr_AbstractTextBox_GetStart(textBox); - endIndex = (NW_Text_Length_t)(i + NW_LMgr_AbstractTextBox_GetLength(textBox)); - - if (prepareForRendering) { - if (NW_LMgr_AbstractTextBox_IsCompressedLeading(textBox) && NW_Str_Isspace(transStorage[i])) { - i++; - } - } - - for (j = 0; - i < endIndex; - i++, j++) { - substr[j] = transStorage[i]; - } - - if (prepareForRendering) { - if ((j > 0) && NW_LMgr_AbstractTextBox_IsCompressedTrailing(textBox) && NW_Str_Isspace(substr[j-1])) { - j--; - } - if ((j > 0) && (substr[j-1] == NW_TEXT_UCS2_SOFT_HYPHEN)) { - substr[j-1] = NW_TEXT_UCS2_HYPHEN; - } - } - - substr[j] = 0; - NW_ASSERT(j <= NW_LMgr_AbstractTextBox_GetLength(textBox)); - } - NW_CATCH(status) { - } - NW_FINALLY { - - NW_Str_Delete(transStorage); - - if (substr != NULL) { - /* Create the new text object */ - return (NW_Text_t*) - NW_Text_UCS2_New(substr, j, NW_Text_Flags_TakeOwnership); - } - else { - return NULL; - } - - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_LMgr_AbstractTextBox_IsBlank (NW_LMgr_AbstractTextBox_t *textBox) -{ - NW_Text_t* text = NULL; - NW_Text_Length_t textLen, i; - NW_Bool isBlank = NW_TRUE; - - NW_TRY(status) { - text = NW_LMgr_AbstractTextBox_GetDisplayText(textBox, NW_FALSE); - NW_THROW_OOM_ON_NULL(text, status); - - textLen = NW_Text_GetCharCount(text); - - for (i=0; i<textLen; i++) { - if (!NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, i))) { - isBlank = NW_FALSE; - NW_THROW_SUCCESS(status); - } - } - } - NW_CATCH(status) { - (void) status; - } - NW_FINALLY { - NW_Object_Delete(text); - return isBlank; - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetWS (NW_LMgr_AbstractTextBox_t *textBox, - NW_Bool *hasLeading, - NW_Bool *hasTrailing, - NW_Bool *endsInNewline) -{ - NW_Text_t* text; - NW_Text_Length_t textLen; - - *hasLeading = NW_FALSE; - *hasTrailing = NW_FALSE; - *endsInNewline = NW_FALSE; - - NW_TRY(status) { - text = NW_LMgr_AbstractTextBox_GetDisplayText(textBox, NW_FALSE); - NW_THROW_OOM_ON_NULL(text, status); - - textLen = NW_Text_GetCharCount(text); - if (textLen == 0) { - NW_THROW_SUCCESS(status); - } - else if (textLen == 1) { - if (NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, 0))) { - *hasTrailing = NW_TRUE; - } - if ((NW_Ucs2)NW_Text_GetAt(text, 0) == NW_TEXT_UCS2_LF) { - *endsInNewline = NW_TRUE; - } - } - else { - if (NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, 0))) { - *hasLeading = NW_TRUE; - } - if (NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, - (NW_Text_Length_t)(textLen - 1)))) { - *hasTrailing = NW_TRUE; - } - if ((NW_Ucs2)NW_Text_GetAt(text, (NW_Text_Length_t)(textLen - 1)) - == NW_TEXT_UCS2_LF) { - *endsInNewline = NW_TRUE; - } - } - } - NW_CATCH(status) { - } - NW_FINALLY { - NW_Object_Delete(text); - return status; - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_AbstractTextBox_GetDirection(NW_LMgr_AbstractTextBox_t* thisObj, - NW_GDI_FlowDirection_t* dir) -{ - NW_Text_t *text = NULL; - NW_LMgr_RootBox_t *rootBox; - CGDIDeviceContext *deviceContext; - NW_LMgr_Box_t* box = NW_LMgr_BoxOf(thisObj); - NW_Text_Length_t textLen, i; - NW_Bool isBlank = NW_TRUE; - - - NW_TRY(status) - { - /* Default response */ - *dir = NW_GDI_FlowDirection_Unknown; - - /* we're going to need the deviceContext to do text extent calculations */ - rootBox = (NW_LMgr_RootBox_t*)NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - /* Get the display text */ - text = NW_LMgr_AbstractTextBox_GetDisplayText(thisObj, NW_FALSE); - NW_THROW_OOM_ON_NULL(text, status); - - /* Make sure the text is not all whitespace */ - textLen = NW_Text_GetCharCount(text); - - for (i=0; i<textLen; i++) - { - if (!NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, i))) - { - isBlank = NW_FALSE; - break; - } - } - - if (!isBlank) - { - /* Get the flow direction */ - status = deviceContext->GetFlowDirection(text, dir); - NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - NW_Object_Delete(text); - return status; - } - NW_END_TRY; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAccessKey.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAccessKey.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,373 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_accesskeyi.h" -#include "nw_adt_resizablevector.h" -#include "nwx_string.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_propertylist.h" -#include "nw_lmgr_box.h" -#include "nw_lmgr_cssproperties.h" -#include "BrsrStatusCodes.h" -/* ------------------------------------------------------------------------- * - private data - * ------------------------------------------------------------------------- */ - -#define NW_LMgr_AccessKey_And 0x80 -#define NW_LMgr_AccessKey_Mask 0x3f -#define NW_LMgr_AccessKey_ControlKey 0xf0 - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_LMgr_AccessKey_AddValToList (NW_LMgr_AccessKey_t* thisObj, - NW_Uint32 val, - NW_Bool isAnd) -{ - NW_TRY (status) { - NW_Bool isValidKeyVal; - void** entry; - - /* be optimistic, let's assume that that method will succeed */ - status = KBrsrSuccess; - - isValidKeyVal = NW_LMgr_AccessKey_IsValidForOptionsList (thisObj, val); - if (!isValidKeyVal) { - return KBrsrBadInputParam; - } - - if (thisObj->valueList == NULL) { - thisObj->valueList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->valueList, status); - } - - if (isAnd) { - NW_Uint32 existing; - - existing = *(NW_Uint32*) - NW_ADT_Vector_ElementAt (thisObj->valueList, NW_ADT_Vector_AtEnd); - - existing = (NW_Uint32) (existing | NW_LMgr_AccessKey_And); - NW_ADT_DynamicVector_ReplaceAt (thisObj->valueList, &existing, - NW_ADT_Vector_AtEnd); - } - - entry = NW_ADT_DynamicVector_InsertAt (thisObj->valueList, &val, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL (entry, status); - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_AccessKey_Class_t NW_LMgr_AccessKey_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_AccessKey_t), - /* construct */ _NW_LMgr_AccessKey_Construct, - /* destruct */ _NW_LMgr_AccessKey_Destruct - }, - { /* NW_LMgr_AccessKey */ - /* isValidForOptionsList */ NULL, - /* isValidKeyPress */ NULL - } -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AccessKey_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_AccessKey_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_LMgr_AccessKey_Class)); - NW_REQUIRED_PARAM(argp); - - /* for convenience */ - thisObj = NW_LMgr_AccessKeyOf (dynamicObject); - - thisObj->valueList = NULL; - thisObj->label = NULL; - - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -void -_NW_LMgr_AccessKey_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_AccessKey_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_AccessKeyOf (dynamicObject); - - /* Destroy our text object */ - if (thisObj->valueList != NULL) { - NW_Object_Delete (thisObj->valueList); - } - if (thisObj->label != NULL){ - NW_Object_Delete(thisObj->label); - } -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_LMgr_AccessKey_SetFromTextAttr (NW_LMgr_AccessKey_t* accessKey, - NW_Text_t* val) -{ - NW_Uint8 freeNeeded = NW_FALSE; - NW_Ucs2* storage = NULL; - - NW_TRY (status) { - NW_Text_Length_t charCount; - - storage = NW_Text_GetUCS2Buffer (val, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - status = NW_LMgr_AccessKey_AddVal (accessKey, storage, NW_FALSE); - _NW_THROW_ON_ERROR (status); - - } NW_CATCH (status) { - } NW_FINALLY { - if (freeNeeded) { - NW_Mem_Free (storage); - } - return status; - } NW_END_TRY -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_LMgr_AccessKey_AddVal (NW_LMgr_AccessKey_t* accessKey, - NW_Ucs2* val, - NW_Bool andOp) -{ - NW_TRY (status) { - NW_Uint32 charCount; - NW_Uint32 accessKeyVal; - NW_Ucs2* p; - - if (val == NULL) { - return KBrsrMissingInputParam; - } - - charCount = NW_Str_Strlen (val); - if (charCount != 1) { - /* we should have a key map to return the int value - for now ignore it */ - - /* storage has more than 1 character - check to see if it's space */ - p = NW_Str_Trim (val, NW_Str_Both); - NW_THROW_OOM_ON_NULL (p, status); - charCount = NW_Str_Strlen (p); - accessKeyVal = *p; - NW_Mem_Free (p); - if (charCount != 1) { - return KBrsrBadInputParam; - } - } else { - accessKeyVal = *val; - } - - status = NW_LMgr_AccessKey_AddValToList (accessKey, accessKeyVal, andOp); - _NW_THROW_ON_ERROR (status); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* --------------------------------------------------------------------------*/ -NW_Bool -NW_LMgr_AccessKey_MatchKey (NW_LMgr_AccessKey_t* accessKey, - NW_Uint32 v, - NW_Bool isControlKey) -{ - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t index; - - size = NW_ADT_Vector_GetSize (accessKey->valueList); - - for (index = 0; index < size; index++) - { - NW_Uint32 val; - NW_Bool cntrlKey; - - val = *(NW_Uint32*) - NW_ADT_Vector_ElementAt (accessKey->valueList, index); - - if ((val & NW_LMgr_AccessKey_ControlKey) == NW_LMgr_AccessKey_ControlKey) { - cntrlKey = NW_TRUE; - } - else { - cntrlKey = NW_FALSE; - } - val = val & NW_LMgr_AccessKey_Mask; - if ((val == v) && (cntrlKey == isControlKey)) { - if (NW_LMgr_AccessKey_IsValidKeyPress (accessKey, val)) { - return NW_TRUE; - } - } - } - return NW_FALSE; -} - -/* --------------------------------------------------------------------------*/ - -NW_Bool -NW_LMgr_AccessKey_GetDirectKey (NW_LMgr_AccessKey_t* accessKey, NW_Uint32* v) -{ - NW_ADT_Vector_Metric_t size; - - size = NW_ADT_Vector_GetSize (accessKey->valueList); - - /* Expect exactly one entry in key list for a directkey */ - if (size == 1) - { - NW_Uint32 val; - val = *(NW_Uint32*) - NW_ADT_Vector_ElementAt (accessKey->valueList, 0); - *v = val; - return NW_TRUE; - } - return NW_FALSE; -} - -/* --------------------------------------------------------------------------*/ -NW_Bool -NW_LMgr_AccessKey_SetAvailableKey (NW_LMgr_AccessKey_t* accessKey, - NW_ADT_DynamicVector_t* activeBoxList) -{ - TBrowserStatusCode status; - NW_LMgr_Property_t prop; - NW_ADT_Vector_Metric_t size; - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t keyListSize; - NW_ADT_Vector_Metric_t keyListIndex; - - size = NW_ADT_Vector_GetSize (activeBoxList); - - keyListIndex = 0; - keyListSize = NW_ADT_Vector_GetSize (accessKey->valueList); - - /* Check every access key in the list. Is that key already in use? */ - while (keyListSize > 0) - { - NW_Uint32 val; - NW_Bool matchFound; - NW_Bool isControlKey; - - matchFound = NW_FALSE; - isControlKey = NW_FALSE; - - val = *(NW_Uint32*) - NW_ADT_Vector_ElementAt (accessKey->valueList, 0); - - if ((val & NW_LMgr_AccessKey_ControlKey) == NW_LMgr_AccessKey_ControlKey) { - isControlKey = NW_TRUE; - } - val = val & NW_LMgr_AccessKey_Mask; - - /* Compare it with the accesskey for each active box. */ - for (index = 0; index < size; index++) - { - NW_LMgr_Box_t* box; - NW_LMgr_AccessKey_t* ak; - - box = *(NW_LMgr_Box_t**) - NW_ADT_Vector_ElementAt (activeBoxList, index); - - status = NW_LMgr_Box_GetPropertyFromList (box,NW_CSS_Prop_accesskey, &prop); - if (status != KBrsrSuccess) - continue; - - ak = (NW_LMgr_AccessKey_t*)(prop.value.object); - - /* Special case. If a single link is split into multiple lines, - * all the parts point to the same access key. Deleting for - * one will mess up all. Return no new access key set. - */ - if (ak == accessKey) - return NW_FALSE; - - matchFound = NW_LMgr_AccessKey_MatchKey (ak, val, isControlKey); - - /* If key is aleady in use, it's not allowed. Remove it from the list */ - if (matchFound) { - NW_ADT_DynamicVector_RemoveAt (accessKey->valueList, 0); - break; - } - } - if (!matchFound) - break; - - keyListSize = NW_ADT_Vector_GetSize (accessKey->valueList); - } - - /* Return no new access key set. */ - if (keyListSize == 0) { - return NW_FALSE; - } - - /* Now comes the task of removing extra accessKey values. */ - while (keyListIndex < keyListSize) - { - NW_Uint32 val; - - val = *(NW_Uint32*) - NW_ADT_Vector_ElementAt (accessKey->valueList, keyListIndex); - - keyListIndex++; - if ((val & NW_LMgr_AccessKey_And) != NW_LMgr_AccessKey_And) - break; - } - while (keyListIndex < keyListSize) - { - NW_ADT_DynamicVector_RemoveAt (accessKey->valueList, keyListIndex); - keyListSize = NW_ADT_Vector_GetSize (accessKey->valueList); - } - - /* Yes, a new access key was set. */ - return NW_TRUE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrActiveBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrActiveBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_activeboxi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_LMgr_ActiveBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_LMgr_ActiveBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_LMgr_ActiveBox_InterfaceList[] = { - &_NW_LMgr_ActiveBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_ActiveBox_Class_t NW_LMgr_ActiveBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_ActiveBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ActiveBox_t), - /* construct */ _NW_LMgr_ActiveBox_Construct, - /* destruct */ _NW_LMgr_ActiveBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ActiveBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_ActiveBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_ActiveBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_LMgr_ActiveBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - thisObj->eventHandler = va_arg (*argp, NW_LMgr_EventHandler_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_ActiveBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_ActiveBox_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_ActiveBoxOf (dynamicObject); - - /* destroy the EventHandler */ - NW_Object_Delete (thisObj->eventHandler); -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_LMgr_ActiveBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_LMgr_ActiveBox_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_LMgr_ActiveBox_t *) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_ActiveBox_Class)); - - /* notify the event handler (if there is one) */ - if (thisObj->eventHandler != NULL) { - return NW_LMgr_EventHandler_ProcessEvent (thisObj->eventHandler, - NW_LMgr_BoxOf (thisObj), event); - } - return 0; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrActiveContainerBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrActiveContainerBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,405 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "BrsrStatusCodes.h" -#include "nw_lmgr_activecontainerboxi.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_propertylist.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_sound.h" -#include "nw_sound_contenthandler.h" - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -const -NW_LMgr_IEventListener_Class_t _NW_LMgr_ActiveContainerBox_IEventListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_IEventListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_LMgr_ActiveContainerBox_t, NW_LMgr_IEventListener) - }, - { /* NW_LMgr_IEventListener */ - /* processEvent */ _NW_LMgr_ActiveContainerBox_IEventListener_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Class_t* const _NW_LMgr_ActiveContainerBox_InterfaceList[] = { - &_NW_LMgr_ActiveContainerBox_IEventListener_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_ActiveContainerBox_Class_t NW_LMgr_ActiveContainerBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_ContainerBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_ActiveContainerBox_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ActiveContainerBox_t), - /* construct */ _NW_LMgr_ActiveContainerBox_Construct, - /* destruct */ _NW_LMgr_ActiveContainerBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_ContainerBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_ContainerBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_ActiveContainerBox_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ActiveContainerBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_ActiveContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_ActiveContainerBox_t* thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = NW_LMgr_ActiveContainerBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_ContainerBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - thisObj->eventHandler = va_arg (*argp, NW_LMgr_EventHandler_t*); - thisObj->actionType = (NW_LMgr_ActiveContainerBox_ActionType_t) va_arg (*argp, NW_Uint32 ); - thisObj->hrefAttr = NULL; - thisObj->iName = NULL; - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_ActiveContainerBox_Destruct (NW_Object_Dynamic_t* dynamicObject) - { - NW_LMgr_ActiveContainerBox_t* thisObj; - NW_LMgr_PropertyList_t* propertyList; - NW_LMgr_Property_t prop; - - /* for convenience */ - thisObj = NW_LMgr_ActiveContainerBoxOf (dynamicObject); - - propertyList = NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(thisObj)); - - if (NW_Object_IsInstanceOf(propertyList, &NW_LMgr_SimplePropertyList_Class)) - { - // Get the sound content handler if there's one - // Only for mater box - TBrowserStatusCode status = NW_LMgr_Box_GetRawProperty( NW_LMgr_BoxOf(thisObj), - NW_CSS_Prop_contentHandlerId, &prop ); - if ( status == KBrsrSuccess ) - { - NW_Sound_ContentHandler_t* aSoundCH = (NW_Sound_ContentHandler_t*)prop.value.object; - // Because several active container box might share one SoundCH - // To avoid multiple deleting of the SoundCH: - // Before the ref count is greater than 1, just remove the property - // Only when the ref count is decreased to 1, SoundCH property will be deleted - if( aSoundCH->iBoxRefCnt > 1 ) - { - NW_LMgr_Box_RemovePropertyWithoutDelete( NW_LMgr_BoxOf(thisObj), - NW_CSS_Prop_contentHandlerId ); - } - // Reduce ref count, which could go down to 0 - aSoundCH->iBoxRefCnt--; - } - - /* if we are not a clone, destroy the EventHandler */ - NW_Object_Delete (thisObj->eventHandler); - } - - NW_Object_Delete(thisObj->hrefAttr); - NW_Object_Delete(thisObj->iName); - } - -/* ------------------------------------------------------------------------- * - * Clones of active containers inherit the property list - * and the event handler. The children are not copied into the new box. - */ -NW_LMgr_Box_t* -_NW_LMgr_ActiveContainerBox_Clone (NW_LMgr_Box_t* box) -{ - NW_LMgr_ActiveContainerBox_t* thisObj; - NW_LMgr_ActiveContainerBox_t* newActiveContainerBox = NULL; - NW_LMgr_Box_t* newLMgrBox = NULL; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf (box, &NW_LMgr_ActiveContainerBox_Class)); - - /* for convenience */ - thisObj = NW_LMgr_ActiveContainerBoxOf (box); - - /* Create the new box */ - newActiveContainerBox = - NW_LMgr_ActiveContainerBox_New (0, thisObj->eventHandler, thisObj->actionType); - if (newActiveContainerBox == NULL) { - return NULL; - } - NW_LMgr_ActiveContainerBox_SetName( newActiveContainerBox, thisObj->iName, NW_FALSE ); - - // Get the LMgr box OOC object for the new box. - newLMgrBox = NW_LMgr_BoxOf(newActiveContainerBox); - - /* Copy the property list, if one exists */ - if (box->propList != NULL) { - newLMgrBox->propList = NW_LMgr_PropertyList_Clone (box->propList); - } - else{ - /* instantiate a new SlavePropertyList object */ - newLMgrBox->propList = (NW_LMgr_PropertyList_t*) - NW_LMgr_SlavePropertyList_New (NULL); - } - if (newLMgrBox->propList == NULL) { - NW_Object_Delete (newActiveContainerBox); - return NULL; - } - - return newLMgrBox; -} - -/* ------------------------------------------------------------------------- * - implemented interface methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_LMgr_ActiveContainerBox_IEventListener_ProcessEvent (NW_LMgr_IEventListener_t* eventListener, - NW_Evt_Event_t* event) -{ - NW_LMgr_ActiveContainerBox_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (eventListener, - &NW_LMgr_IEventListener_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (event, &NW_Evt_Event_Class)); - - /* obtain the implementer */ - thisObj = (NW_LMgr_ActiveContainerBox_t *) NW_Object_Interface_GetImplementer (eventListener); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_ActiveContainerBox_Class)); - - /* notify the event handler (if there is one) */ - if (thisObj->eventHandler != NULL) { - return NW_LMgr_EventHandler_ProcessEvent (thisObj->eventHandler, - NW_LMgr_BoxOf (thisObj), event); - } - - /* if we get this far, then the event was not absorbed */ - return 0; -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_LMgr_ActiveContainerBox::New -// Creates a new file selection box. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_LMgr_ActiveContainerBox_t* -NW_LMgr_ActiveContainerBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_ActiveContainerBox_ActionType_t aActionType) -{ - return (NW_LMgr_ActiveContainerBox_t*) - NW_Object_New (&NW_LMgr_ActiveContainerBox_Class, numProperties, eventHandler, (NW_Uint32) aActionType); -} - -// ----------------------------------------------------------------------------- -// NW_LMgr_ActiveContainerBox::SetName -// Sets the name of this active container box. The name is used by ECMA script. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -void -NW_LMgr_ActiveContainerBox_SetName( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_Text_t* aName, NW_Bool aTakeOwnershipOfNameObject ) - { - // If not taking ownership of name object then make a deep copy. One way or - // another, this object will own the name object it has. - if (aName && !aTakeOwnershipOfNameObject) - { - // If out of memory occurs, aName will end up being NULL. - aName = NW_Text_Copy(aName, NW_TRUE); - } - aThisObj->iName = aName; - } - -// ----------------------------------------------------------------------------- -// Gets the soundstart state from this active container box, if present. -// Soundstart is a proprietary customer feature of anchor tags. The soundstart -// state is stored as CSS properties of this box. Note, the soundstart src URL -// is NOT stored and is returned as NULL in the soundstartState structure. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_ActiveContainerBox_GetSoundstartState( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_Sound_ContentHandler_t** aSoundCH, TSoundstartState* aSoundstartState ) - { - TBrowserStatusCode status; - NW_LMgr_Box_t* lmgrBox; - NW_LMgr_PropertyValue_t value; - - // Parameter assertion block. - NW_ASSERT( aThisObj ); - NW_ASSERT( aSoundstartState ); - - lmgrBox = NW_LMgr_BoxOf( aThisObj ); - - // Get the content handler that has the sound content. - *aSoundCH = NULL; - status = NW_LMgr_Box_GetPropertyValue( lmgrBox, NW_CSS_Prop_contentHandlerId, - NW_CSS_ValueType_Object, &value ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - *aSoundCH = (NW_Sound_ContentHandler_t*)value.object; - - // Get the soundstart action. - status = NW_LMgr_Box_GetPropertyValue( lmgrBox, NW_CSS_Prop_soundstartAction, - NW_CSS_ValueType_Integer, &value ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - aSoundstartState->action = (TSoundstartAction)value.integer; - - // Get the soundstart loop. - status = NW_LMgr_Box_GetPropertyValue( lmgrBox, NW_CSS_Prop_soundstartLoop, - NW_CSS_ValueType_Integer, &value ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - aSoundstartState->loop = (NW_Int16)value.integer; - - // Get the soundstart volume. - status = NW_LMgr_Box_GetPropertyValue( lmgrBox, NW_CSS_Prop_soundstartVolume, - NW_CSS_ValueType_Integer, &value ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - aSoundstartState->volume = (TSoundstartVolume)value.integer; - -cleanup: - return status; - } - -// ----------------------------------------------------------------------------- -// NW_LMgr_ActiveContainerBox::SetSoundstartState -// Sets the soundstart state of this active container box. Soundstart is a -// proprietary customer feature of anchor tags. The soundstart state is stored -// as CSS properties of this box. Note, the soundstart src URL is NOT set. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_LMgr_ActiveContainerBox_SetSoundstartState( NW_LMgr_ActiveContainerBox_t* aThisObj, - NW_DOM_ElementNode_t* aElementNode, TSoundstartState* aSoundstartState ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Box_t* lmgrBox; - NW_LMgr_Property_t cssProp; - - // Parameter assertion block. - NW_ASSERT( aThisObj ); - NW_ASSERT( aSoundstartState ); - - lmgrBox = NW_LMgr_BoxOf( aThisObj ); - NW_ASSERT( lmgrBox ); - - // Add the element node address (its ID) as a CSS property. This will allow - // the sound content handler to find the corresponding box. The sound - // content handler will look for this box when the sound has loaded and it - // will then link the box back to the sound content. - cssProp.type = NW_CSS_ValueType_Object; - cssProp.value.object = aElementNode; - status = NW_LMgr_Box_SetProperty( lmgrBox, NW_CSS_Prop_elementId, &cssProp ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - - // Set the soundstart action as a CSS property. - cssProp.type = NW_CSS_ValueType_Integer; - cssProp.value.integer = (NW_Int32)aSoundstartState->action; - status = NW_LMgr_Box_SetProperty( lmgrBox, NW_CSS_Prop_soundstartAction, &cssProp ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - - // Set the soundstart loop as a CSS property. - cssProp.type = NW_CSS_ValueType_Integer; - cssProp.value.integer = (NW_Int32)aSoundstartState->loop; - status = NW_LMgr_Box_SetProperty( lmgrBox, NW_CSS_Prop_soundstartLoop, &cssProp ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - - // Set the soundstart volume as a CSS property. - cssProp.type = NW_CSS_ValueType_Integer; - cssProp.value.integer = (NW_Int32)aSoundstartState->volume; - status = NW_LMgr_Box_SetProperty( lmgrBox, NW_CSS_Prop_soundstartVolume, &cssProp ); - if ( status != KBrsrSuccess ) - { - goto cleanup; - } - -cleanup: - return status; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAnimatedImageAggregate.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAnimatedImageAggregate.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_animatedimageaggregatei.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" -#include "nw_image_epoc32simpleimagei.h" -#include "nw_image_virtualimagei.h" -#include "Epoc32ImageDecoder.h" - -/* ------------------------------------------------------------------------- * - forward method declarations - * ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_AnimatedImageAggregate_TimerCallback (void *timerData); - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_AnimatedImageAggregate_CreateTimer (NW_LMgr_AnimatedImageAggregate_t* thisObj, - NW_Uint32 delay) -{ - NW_TRY (status) { - if (thisObj->timer == NULL) { - - if (delay < 200) - { - delay = 200; // hack: set a floor of 200 milliseconds for the timer - // set the floor higher if you need to. - } - thisObj->timer = - NW_System_Timer_New (NW_LMgr_AnimatedImageAggregate_TimerCallback, - thisObj, delay, NW_TRUE); - NW_THROW_ON_NULL (thisObj->timer, status, KBrsrOutOfMemory); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_AnimatedImageAggregate_AnimateImage (NW_LMgr_AnimatedImageAggregate_t* thisObj) - { - NW_LMgr_Box_t* imageBox; - NW_Image_AbstractImage_t* image; - NW_Int16 loopCount; - - NW_TRY(status) - { - /* obtain the aggregator */ - imageBox = (NW_LMgr_Box_t*) NW_Object_Aggregate_GetAggregator(thisObj); - - /* obtain the image*/ - image = NW_LMgr_AnimatedImageAggregate_GetImage (thisObj); - - NW_GDI_Rectangle_t imageBoxRect; - - /*destroy the timer so we can change the delay*/ - NW_LMgr_AnimatedImageAggregate_DestroyTimer(thisObj); - - // check if the imageBox is visible to make sure that we do not - // animate images which are out of the view. - if( NW_LMgr_Box_GetVisibleBounds( imageBox, &imageBoxRect ) == NW_TRUE ) - { - NW_LMgr_RootBox_t* rootBox; - NW_GDI_Rectangle_t viewRect; - CGDIDeviceContext* deviceContext; - // we need the rootbox to get the device context which then gives us the - // current view coordinates - rootBox = NW_LMgr_Box_GetRootBox( imageBox ); - NW_THROW_ON_NULL( rootBox, status, KBrsrFailure ); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext( rootBox ); - NW_THROW_ON_NULL (deviceContext, status, KBrsrFailure); - - viewRect = deviceContext->ClipRect (); - /*go to the next frame*/ - status = NW_Image_AbstractImage_IncrementImage(image); - - // check if the image box is in the view - if( !NW_GDI_Rectangle_Cross( &imageBoxRect, &viewRect, NULL ) ) - { - // off view - NW_THROW_SUCCESS( status ); - } - } - - if (status == KBrsrSuccess) - { - loopCount = NW_Image_AbstractImage_GetLoopCount(image); - - if((loopCount == -1) || (loopCount > 0)) - { - /*display the frame*/ - status = NW_LMgr_Box_Refresh(imageBox); - _NW_THROW_ON_ERROR(status); - - } - else - { - /*looping is completed*/ - NW_LMgr_AnimatedImageAggregate_DestroyTimer(thisObj); - NW_Image_Epoc32Simple_t* simpleImage = NW_Image_Epoc32SimpleOf (NW_Image_VirtualOf (image)->image); - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, simpleImage->decoder); - decoder->ResetImage(); - } - } - else - { - /* The previous frame did not finish decoding, give it more time */ - status = NW_LMgr_AnimatedImageAggregate_CreateTimer(thisObj, 5); - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - private static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_AnimatedImageAggregate_TimerCallback (void *timerData) -{ - NW_LMgr_AnimatedImageAggregate_t *thisObj; - NW_LMgr_AnimatedImageBox_t* box; - NW_LMgr_RootBox_t* rootBox; - NW_LMgr_Box_t* theBox; - - // cast timerData to a aggregate */ - thisObj = NW_LMgr_AnimatedImageAggregateOf (timerData); - - TTime timeNow; - timeNow.UniversalTime(); - TInt64 now = timeNow.Int64(); - thisObj->nowHigh = I64HIGH(now); - thisObj->nowLow = I64LOW(now); - thisObj->nowSet = NW_TRUE; - - theBox = (NW_LMgr_Box_t*) NW_Object_Aggregate_GetAggregator (thisObj); - if (NW_Object_IsInstanceOf (theBox, &NW_LMgr_AnimatedImageBox_Class)) - { - // obtain the aggregator */ - box = (NW_LMgr_AnimatedImageBox_t*) NW_Object_Aggregate_GetAggregator (thisObj); - - // if the animation is suspended we do not draw - if (box->iIsSuspended) - { - return KBrsrSuccess; - } - } - - // if the box tree is not visible, we do not draw */ - rootBox = NW_LMgr_Box_GetRootBox (NW_LMgr_BoxOf(theBox)); - if (rootBox == NULL || !NW_LMgr_RootBox_HasFocus (rootBox)) - { - return KBrsrSuccess; - } - - (void) NW_LMgr_AnimatedImageAggregate_AnimateImage (thisObj); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_AnimatedImageAggregate_Class_t NW_LMgr_AnimatedImageAggregate_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Aggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NULL, - /* construct */ NULL, - /* destruct */ _NW_LMgr_AnimatedImageAggregate_Destruct - }, - { /* NW_LMgr_AnimatedImageAggregate */ - /* animate */ _NW_LMgr_AnimatedImageAggregate_Animate, - /* getImage */ NULL, - /* startTimer */ _NW_LMgr_AnimatedImageAggregate_StartTimer - } - -}; - - -/* ------------------------------------------------------------------------- * - NW_Object_Aggregate method(s) - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_AnimatedImageAggregate_Destruct (NW_Object_Aggregate_t* aggregate) -{ - NW_LMgr_AnimatedImageAggregate_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_AnimatedImageAggregateOf (aggregate); - - /* destroy the timer */ - NW_LMgr_AnimatedImageAggregate_DestroyTimer (thisObj); -} - -/* ------------------------------------------------------------------------- * - NW_LMgr_AnimatedImageAggregate method(s) - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AnimatedImageAggregate_Animate (NW_LMgr_AnimatedImageAggregate_t* /*thisObj*/) - { - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AnimatedImageAggregate_StartTimer (NW_LMgr_AnimatedImageAggregate_t* thisObj) - { - NW_Image_AbstractImage_t* image; - NW_Uint32 delay; - - // obtain the image - image = NW_LMgr_AnimatedImageAggregate_GetImage( thisObj ); - - NW_Image_Epoc32Simple_t* simpleImage = NW_Image_Epoc32SimpleOf (NW_Image_VirtualOf (image)->image); - CEpoc32ImageDecoder* decoder = STATIC_CAST(CEpoc32ImageDecoder*, simpleImage->decoder); - - if (!NW_Image_AbstractImage_IsAnimated(image) || (decoder && decoder->Finished())) - { - // not an animated image - return KBrsrSuccess; - } - - - // get the delay - delay = NW_Image_AbstractImage_GetDelay(image); - NW_Uint32 subDelay; - -// Subtract the time that passed since the timet callbacl was called - NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (thisObj, &NW_LMgr_AnimatedImageAggregate_Class); - if (AnimatedImageAggregate->nowSet == NW_TRUE) - { - TTime timeNow; - timeNow.UniversalTime(); - TInt64 now = timeNow.Int64(); - TInt64 callbackTime = MAKE_TINT64(thisObj->nowHigh, thisObj->nowLow); - TInt64 theDelay = delay - (now - callbackTime)/1000; - if (theDelay < 5) - { - theDelay = 5; - } - subDelay = (NW_Uint32) theDelay; - }//if nowSet - else - { - subDelay = delay; - } - - AnimatedImageAggregate->nowSet = NW_FALSE; - - // start the timer - NW_LMgr_AnimatedImageAggregate_CreateTimer (thisObj, subDelay); - - // animation started - thisObj->started = NW_TRUE; - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_AnimatedImageAggregate_DestroyTimer (NW_LMgr_AnimatedImageAggregate_t* thisObj) -{ - NW_Object_Delete (thisObj->timer); - thisObj->timer = NULL; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAnimatedImageBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAnimatedImageBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,262 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_animatedimageboxi.h" - -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_animatedimageaggregatei.h" -#include "BrsrStatusCodes.h" -#include "LMgrMarkerImage.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_AnimatedImageBox_Class_t NW_LMgr_AnimatedImageBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_ImgContainerBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_AnimatedImageBox_SecondaryList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_AnimatedImageBox_t), - /* construct */ _NW_LMgr_AnimatedImageBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_ImgContainerBox_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ImgContainerBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AnimatedImageBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImgContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AnimatedImageBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Object_Class_t* const _NW_LMgr_AnimatedImageBox_SecondaryList[] = { - &NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_AnimatedImageAggregate_Class_t NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AnimatedImageAggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_LMgr_AnimatedImageBox_t, - NW_LMgr_AnimatedImageAggregate) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NULL, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_LMgr_AnimatedImageAggregate */ - /* animate */ _NW_LMgr_AnimatedImageAggregate_Animate, - /* getImage */ _NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_GetImage, - /* startTimer */ _NW_LMgr_AnimatedImageAggregate_StartTimer - } - -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_AnimatedImageBox_Construct(NW_Object_Dynamic_t* dynamicObject, - va_list* argp) - { - NW_TRY (status) - { - NW_LMgr_AnimatedImageBox_t* animatedImageBox; - - NW_ASSERT(dynamicObject != NULL); - - // invoke our superclass constructor - status = _NW_LMgr_ImgContainerBox_Construct (dynamicObject, argp); - NW_THROW_ON_ERROR(status); - - // for convenience - animatedImageBox = NW_LMgr_AnimatedImageBoxOf( dynamicObject ); - - // initialize the member variables - animatedImageBox->iIsSuspended = NW_FALSE; - NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (animatedImageBox, &NW_LMgr_AnimatedImageAggregate_Class); - AnimatedImageAggregate->nowSet = NW_FALSE; - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_LMgr_AnimatedImageBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - NW_LMgr_AnimatedImageBox_t* thisObj; - NW_LMgr_AnimatedImageAggregate_t* AnimatedImageAggregate; - - NW_TRY(status) - { - // for convenience - thisObj = NW_LMgr_AnimatedImageBoxOf (box); - - if (!thisObj->iIsSuspended) - { - // invoke our superclass draw method - status = NW_LMgr_ImgContainerBox_Class.NW_LMgr_Box.draw (box, deviceContext, - hasFocus); - NW_THROW_ON_ERROR(status); - - // support for animations. Note the aggregate takes over all reponsibilites - // associated with animations. the box need not be concerned about timers etc - - // get the aggregate object - AnimatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (thisObj, &NW_LMgr_AnimatedImageAggregate_Class); - - if(NW_Object_IsInstanceOf(box, &LMgrMarkerImage_Class)) - { - status = NW_LMgr_AnimatedImageAggregate_StartTimer (AnimatedImageAggregate); - } - - - NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - implemented interface/aggregate methods - * ------------------------------------------------------------------------- */ - -NW_Image_AbstractImage_t* -_NW_LMgr_AnimatedImageBox_AnimatedImageAggregate_GetImage (NW_LMgr_AnimatedImageAggregate_t* animatedImageAggregate) - { - NW_LMgr_AnimatedImageBox_t* thisObj; - NW_LMgr_ImgContainerBox_t* imageBox; - - /* obtain the aggregator */ - thisObj = (NW_LMgr_AnimatedImageBox_t *) - NW_Object_Aggregate_GetAggregator (animatedImageAggregate); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_AnimatedImageBox_Class)); - - imageBox = NW_LMgr_ImgContainerBoxOf( thisObj ); - return imageBox->virtualImage; - } - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_AnimatedImageBox_Suspend (NW_LMgr_AnimatedImageBox_t* aAnimatedBox) - { - NW_LMgr_AnimatedImageAggregate_t* animatedImageAggregate; - NW_Image_AbstractImage_t* image; - - NW_ASSERT(aAnimatedBox); - - animatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (aAnimatedBox, &NW_LMgr_AnimatedImageAggregate_Class); - - image = NW_LMgr_AnimatedImageAggregate_GetImage (animatedImageAggregate); - - if (NW_Image_AbstractImage_IsAnimated(image)) - { - aAnimatedBox->iIsSuspended = NW_TRUE; - - NW_LMgr_AnimatedImageAggregate_DestroyTimer (animatedImageAggregate); - } - } - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_AnimatedImageBox_Resume (NW_LMgr_AnimatedImageBox_t* aAnimatedBox) - { - NW_LMgr_AnimatedImageAggregate_t* animatedImageAggregate; - NW_Image_AbstractImage_t* image; - NW_Uint32 delay; - - NW_ASSERT(aAnimatedBox); - - animatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (aAnimatedBox, &NW_LMgr_AnimatedImageAggregate_Class); - - image = NW_LMgr_AnimatedImageAggregate_GetImage (animatedImageAggregate); - - if (NW_Image_AbstractImage_IsAnimated(image)) - { - aAnimatedBox->iIsSuspended = NW_FALSE; - - delay = NW_Image_AbstractImage_GetDelay(image); - - NW_LMgr_AnimatedImageAggregate_CreateTimer (animatedImageAggregate, delay); - } - } - -/* ------------------------------------------------------------------------- */ -NW_LMgr_AnimatedImageBox_t* -NW_LMgr_AnimatedImageBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_Image_AbstractImage_t* virtualImage, - NW_Text_t* altText, NW_Bool brokenImage ) - { - return (NW_LMgr_AnimatedImageBox_t*) - NW_Object_New (&NW_LMgr_AnimatedImageBox_Class, numProperties, virtualImage, altText, brokenImage ); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAnonBlock.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAnonBlock.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the anonymous block box -* See CSS2 Spec from WWW.W3C.ORG (page 98) -* -*/ - - -#include "nw_lmgr_bidiflowboxi.h" -#include "LMgrAnonBlock.h" - -const -LMgrAnonBlock_Class_t LMgrAnonBlock_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (LMgrAnonBlock_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* LMgrAnonBlock */ - /* unused */ NW_Object_Unused - } -}; - -TBrowserStatusCode -LMgrAnonBlock_Collapse (LMgrAnonBlock_t* aAnonBlock) -{ - TBrowserStatusCode status = KBrsrSuccess; - // we need to transfer the children of the anonymous block - // to the parent - - // get the parent box - NW_LMgr_ContainerBox_t* parent = (NW_LMgr_BoxOf(aAnonBlock))->parent; - NW_ASSERT(parent); - NW_ADT_Vector_t* children = (NW_ADT_Vector_t*)NW_LMgr_ContainerBox_GetChildren(NW_LMgr_ContainerBoxOf(aAnonBlock)); - - if (parent && children) - { - // find position of anonymous block - NW_ADT_Vector_Metric_t index = NW_LMgr_ContainerBox_GetChildIndex(parent, NW_LMgr_BoxOf(aAnonBlock)); - status = NW_LMgr_ContainerBox_RemoveChild(parent, NW_LMgr_BoxOf(aAnonBlock)); - - // transfer children at the position from where we removed the anonymous - // box - NW_ADT_Vector_Metric_t numChildren = NW_ADT_Vector_GetSize(children); - NW_ADT_Vector_Metric_t childCount=numChildren; - // start from the end of the children list and insert in the same position - while (childCount>0) - { - childCount--; - NW_LMgr_Box_t* child = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt (children, childCount); - NW_ASSERT(child); - if (child) - { - // insert child will remove the box from previous parent and - // attach it to new parent and also sets the parent on the box - status = NW_LMgr_ContainerBox_InsertChildAt(parent, child, index); - if (status == KBrsrOutOfMemory) - { - break; - } - } - } - } - NW_Object_Delete(aAnonBlock); - return status; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -LMgrAnonBlock_t* -LMgrAnonBlock_New (NW_ADT_Vector_Metric_t aNumProperties) -{ - return (LMgrAnonBlock_t*) - NW_Object_New (&LMgrAnonBlock_Class, aNumProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrAnonTableBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAnonTableBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the anonymous table box -* that wraps the caption and the table - See CSS2 Spec from WWW.W3C.ORG (page 251) -* -*/ - - -#include "nw_lmgr_bidiflowboxi.h" -#include "LMgrAnonTableBox.h" - -const -LMgrAnonTableBox_Class_t LMgrAnonTableBox_Class = { - { /* NW_Object_Core */ - /* super */ &LMgrAnonBlock_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (LMgrAnonTableBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* LMgrAnonBlock */ - /* unused */ NW_Object_Unused - }, - { /* LMgrAnonTableBox */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -LMgrAnonTableBox_t* -LMgrAnonTableBox_New (NW_ADT_Vector_Metric_t aNumProperties) -{ - return (LMgrAnonTableBox_t*) - NW_Object_New (&LMgrAnonTableBox_Class, aNumProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrBidiFlowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrBidiFlowBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_bidiflowboxi.h" -#include "nw_lmgr_formatcontext.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nwx_settings.h" -#include "BrsrStatusCodes.h" -#include "nw_lmgr_emptybox.h" -#include "nw_lmgr_rulebox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_listbullets.h" -#include "nw_image_virtualimage.h" -#include "nw_image_cannedimages.h" -#include "nw_fbox_formbox.h" -#include "nwx_string.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nwx_settings.h" -#include "nw_gdi_utils.h" - -/* --------------------------------------------------------------------------* - * FORWARD DECLARATIONS * - * --------------------------------------------------------------------------*/ - - - - - - -const -NW_LMgr_BidiFlowBox_Class_t NW_LMgr_BidiFlowBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_BidiFlowBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - } -}; - - - - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_BidiFlowBox_t* -NW_LMgr_BidiFlowBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_BidiFlowBox_t*) - NW_Object_New (&NW_LMgr_BidiFlowBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3666 +0,0 @@ -/* -* Copyright (c) 2000 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_boxi.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_simplepropertylist.h" -#include "nw_text_ucs2.h" -#include "nwx_string.h" -#include "nwx_logger.h" -#include "nwx_math.h" -#include "nw_gdi_utils.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_posflowbox.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_verticaltablerowbox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "urlloader_urlloaderint.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" - -#include "nw_lmgr_imgcontainerbox.h" -#include "LMgrMarkerImage.h" -#include "LMgrMarkerText.h" -#include "BrsrStatusCodes.h" -#include "LMgrAnonBlock.h" -#include "nw_css_tokentoint.h" -#include "bitdev.h" -#include "AknUtils.h" -#include "LMgrObjectBoxOOC.h" - -/* ------------------------------------------------------------------------- * - private final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ResolveAbsoluteLength - * Description: Resolves a relative length (Cm, Mm, In, Pt, Pc). - * Returns: KBrsrSuccess. - */ - -static -TBrowserStatusCode -NW_LMgr_Box_ResolveAbsoluteLength(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propertyName, - NW_LMgr_Property_t *property) - { - NW_Float32 val = property->value.decimal; - - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(propertyName); - - switch(property->type & NW_CSS_ValueType_Mask) - { - case NW_CSS_ValueType_Pc: - // A pica is equivalent to 12 points - val = val * 12; - - break; - - case NW_CSS_ValueType_Cm: - // A centimeter is 28.34 points - val = val * (NW_Float32)28.34; - - break; - - case NW_CSS_ValueType_Mm: - // A millimeter is 2.83 points - val = val * (NW_Float32)2.83; - - break; - - case NW_CSS_ValueType_In: - // A inch is 72 points - val = val * 72; - - break; - - case NW_CSS_ValueType_Pt: - default: - break; - } - - property->type = NW_CSS_ValueType_Pt; - property->value.decimal = val; - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ResolveRelativeLength - * Description: Resolves a relative length (Em, Ex). - * Returns: KBrsrSuccess. - */ - -static -TBrowserStatusCode -NW_LMgr_Box_ResolveRelativeLength(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propertyName, - NW_LMgr_Property_t *property) - { - NW_LMgr_Box_t *baseBox; - NW_Int32 val; - - (void) propertyName; - - // Fontsize uses the parent's em - if (propertyName == NW_CSS_Prop_fontSize) - { - baseBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(box); - - // This assert is only going to be triggered in the case when - // there are percentage properties applied to the RootBox. - // That is an error condition because the RootBox should have - // no properties. - NW_ASSERT(baseBox != NULL); - } - else - { - baseBox = box; - } - - // set the absolute font-size - if (property->type == NW_CSS_ValueType_Em) - { - val = (NW_Int32)(property->value.decimal * NW_LMgr_Box_GetEm(baseBox)); - } - else - { - val = (NW_Int32)(property->value.decimal * NW_LMgr_Box_GetEx(baseBox)); - } - - if (propertyName == NW_CSS_Prop_fontSize) - { - // we can't use pixels here because in NW_LMgr_Box_ApplyFontProps(), - // pixel will be adjusted to bigger value - CEikonEnv* eikEnv = CEikonEnv::Static(); - CWsScreenDevice& screenDev = *eikEnv->ScreenDevice(); - NW_Float32 valPt = FontUtils::PointsFromTwips(screenDev.VerticalPixelsToTwips(val)); - - property->type = NW_CSS_ValueType_Pt; - property->value.decimal = valPt; - } - else - { - property->type = NW_CSS_ValueType_Px; - property->value.integer = val; - } - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ResolvePercent - * Description: Resolves a relative property (percentage). - * Returns: KBrsrSuccess. - */ - -static -TBrowserStatusCode -NW_LMgr_Box_ResolvePercent(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propertyName, - NW_LMgr_Property_t *property) - - - { - NW_LMgr_Box_t* parentBox; - NW_GDI_Rectangle_t bounds; - NW_Float32 val = 0; - NW_Int32 px = 0; - NW_LMgr_Property_t parentProp; - NW_GDI_Dimension2D_t size; - NW_GDI_Dimension3D_t imgSize; - TBrowserStatusCode status = KBrsrSuccess; - NW_Image_AbstractImage_t *image = NULL; - - NW_Int32 fontSizeI = 0; - NW_Float32 fontSizeD = 0.0; - - NW_LMgr_PropertyValue_t backgroundPropValue; - - val = property->value.decimal; - - switch(propertyName) - { - // This property calculate its percentage with respect to the - // value of the same property of their parent box - case NW_CSS_Prop_fontSize: - { - // First we need to see if the box is a body box, if so, we need - // to find what the default CSS font size is. - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - // check for body box - if( NW_LMgr_RootBox_GetBody( rootBox ) == box) - { - // TODO query the CSS table for the default font size - // We know it is 6.5 points - fontSizeD = (NW_Float32)(val * 6) / 100; - - property->type = NW_CSS_ValueType_Pt; - property->value.decimal = fontSizeD; - - (void) NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_fontSize, property); - } - else - { - // calculate the percentage of the parent box's font size - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(box); - - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf (parentBox), - NW_CSS_Prop_fontSize, &parentProp); - - switch(parentProp.type) - { - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_Ex: - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pt: - case NW_CSS_ValueType_Pc: - fontSizeD = (val * parentProp.value.decimal) / 100; - - property->type = parentProp.type; - property->value.decimal = fontSizeD; - - (void) NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_fontSize, property); - break; - - case NW_CSS_ValueType_Px: - default: - fontSizeI = (NW_Int32) ((val * parentProp.value.integer) / 100); - - property->type = parentProp.type; - property->value.integer = fontSizeI; - - (void) NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_fontSize, property); - break; - } - } - return status; - } - - /* These properties calculate their percentage with repect to the - value of the same property of the surrounding flow */ - case NW_CSS_Prop_backgroundPosition_x: - case NW_CSS_Prop_backgroundPosition_y: - { - parentBox = box; - bounds = NW_LMgr_Box_GetFormatBounds(parentBox); - /* check if background-image is defined */ - backgroundPropValue.object = NULL; - NW_LMgr_FrameInfo_t borderWidthInfo; - NW_LMgr_Box_GetBorderWidth(parentBox, &borderWidthInfo, ELMgrFrameAll ); - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_backgroundImage, NW_CSS_ValueType_Image, &backgroundPropValue); - if (backgroundPropValue.object == NULL ) - { - return KBrsrSuccess; - } - - /* check if image is opened */ - image = (NW_Image_AbstractImage_t*)backgroundPropValue.object; - (void) NW_Image_AbstractImage_GetSize(image, &imgSize); - if (imgSize.width == 0 || imgSize.height == 0) - { - return KBrsrSuccess; - } - - if(propertyName == NW_CSS_Prop_backgroundPosition_x) - { - px = (NW_Int32)(val * (bounds.dimension.width - imgSize.width- borderWidthInfo.right - - borderWidthInfo.left) / 100); - } - else //propertyName == NW_CSS_Prop_backgroundPosition_y) - { - px = (NW_Int32)(val * (bounds.dimension.height - imgSize.height - - - borderWidthInfo.top - borderWidthInfo.bottom ) / 100); - } - break; - } - case NW_CSS_Prop_width: - case NW_CSS_Prop_height: - case NW_CSS_Prop_padding: - case NW_CSS_Prop_leftPadding: - case NW_CSS_Prop_rightPadding: - case NW_CSS_Prop_topPadding: - case NW_CSS_Prop_bottomPadding: - case NW_CSS_Prop_margin: - case NW_CSS_Prop_leftMargin: - case NW_CSS_Prop_rightMargin: - case NW_CSS_Prop_topMargin: - case NW_CSS_Prop_bottomMargin: - case NW_CSS_Prop_border: - case NW_CSS_Prop_leftBorderWidth: - case NW_CSS_Prop_rightBorderWidth: - case NW_CSS_Prop_topBorderWidth: - case NW_CSS_Prop_bottomBorderWidth: - case NW_CSS_Prop_textIndent: - case NW_CSS_Prop_marqueeAmount: - /* First find the enclosing flow */ - do - { - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(box); - - /* This assert is only going to be triggered in the case when - * there are percentage properties applied to the RootBox. - * That is an error condition because the RootBox should have - * no properties. - */ - NW_ASSERT(parentBox != NULL); - - /* Move one level up */ - box = parentBox; - - } while (!NW_Object_IsInstanceOf(parentBox, &NW_LMgr_FlowBox_Class)); - if ((propertyName == NW_CSS_Prop_height || propertyName == NW_CSS_Prop_width) && - NW_Object_IsInstanceOf(parentBox, &NW_LMgr_PosFlowBox_Class)) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - // The width of a positioned box depends on the containing block - // If the positioned box is nested, the containing box is - // the parent positioned box, otherwise it is the screen size - NW_LMgr_PosFlowBox_t* posParent = (NW_LMgr_PosFlowBox_t*)parentBox; - if (posParent->iContainingBlock == NULL) - { - bounds = (*deviceContext->DisplayBounds()); - } - else - { - bounds = NW_LMgr_Box_GetFormatBounds(posParent->iContainingBlock); - } - if (propertyName == NW_CSS_Prop_width) - { - NW_LMgr_FrameInfo_t paddingInfo; - NW_LMgr_FrameInfo_t borderWidthInfo; - - NW_LMgr_Box_GetPadding(parentBox, &paddingInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(parentBox, &borderWidthInfo, ELMgrFrameAll ); - NW_GDI_Metric_t containingWidth = (NW_GDI_Metric_t) - (bounds.dimension.width - - paddingInfo.left - paddingInfo.right - - borderWidthInfo.left - borderWidthInfo.right); - - px = (NW_Int32)((val * containingWidth) / 100); - } - else // propertyName == NW_CSS_Prop_height - { - - px = (NW_Int32)((val * bounds.dimension.height) / 100); - - } - } - else - { - if (propertyName != NW_CSS_Prop_height) - { - bounds = NW_LMgr_Box_GetFormatBounds(parentBox); // width - - - // S60 bug fix <PHEN-64EEW3> - // If the box needs to have x% of parent box's width, - // deduct border, padding width from parent box's width first - // then calculate the x% of the remaining width - if (propertyName == NW_CSS_Prop_width) - { - NW_LMgr_FrameInfo_t paddingInfo; - NW_LMgr_FrameInfo_t borderWidthInfo; - - NW_LMgr_Box_GetPadding(parentBox, &paddingInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(parentBox, &borderWidthInfo, ELMgrFrameAll ); - NW_GDI_Metric_t containingWidth = (NW_GDI_Metric_t) - (bounds.dimension.width - - paddingInfo.left - paddingInfo.right - - borderWidthInfo.left - borderWidthInfo.right); - - px = (NW_Int32)((val * containingWidth) / 100); - } - else - { - px = (NW_Int32)((val * bounds.dimension.width) / 100); - } - } - else // propertyName == NW_CSS_Prop_height - - { - if (!NW_Object_IsClass(parentBox, &NW_LMgr_StaticTableCellBox_Class) && - !NW_Object_IsClass(parentBox, &NW_LMgr_VerticalTableCellBox_Class)) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - bounds = (*deviceContext->DisplayBounds()); - NW_LMgr_FrameInfo_t paddingInfo; - NW_LMgr_FrameInfo_t borderWidthInfo; - - NW_LMgr_Box_GetPadding(parentBox, &paddingInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(parentBox, &borderWidthInfo, ELMgrFrameAll ); - NW_GDI_Metric_t containingHeight = (NW_GDI_Metric_t) - (bounds.dimension.height - - paddingInfo.top - paddingInfo.bottom - - borderWidthInfo.top - borderWidthInfo.bottom); - px = (NW_Int32)((val * containingHeight) / 100); - - } - else - { - - - status = NW_LMgr_Box_GetSizeProperties(parentBox, &size); - if (status != KBrsrSuccess) - { - return status; - } - - if (size.height != -1) - { - px = (NW_Int32) ((val * size.height) / 100); - } - else - { - return KBrsrNotFound; - } - } - - } - } - break; - - default: - /* In all other cases return the percentage as is (this useful for v-align) */ - return KBrsrSuccess; - } - - property->type = NW_CSS_ValueType_Px; - property->value.integer = px; - - return status; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ResolveRelativeProperty - * Description: Resolves a relative property (percentage, em, ex,). - * Returns: KBrsrSuccess. - */ - -static -TBrowserStatusCode - NW_LMgr_Box_ResolveRelativeProperty(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t propertyName, - NW_LMgr_Property_t *property) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (box); - NW_ASSERT (property); - - // Remove bit flag so it works for default/variable properties as well - // as normal ones. - switch (property->type & NW_CSS_ValueType_Mask) - { - case NW_CSS_ValueType_Percentage: - status = NW_LMgr_Box_ResolvePercent (box, propertyName, property); - break; - - case NW_CSS_ValueType_Em: - case NW_CSS_ValueType_Ex: - status = NW_LMgr_Box_ResolveRelativeLength (box, propertyName, property); - break; - - case NW_CSS_ValueType_In: - case NW_CSS_ValueType_Cm: - case NW_CSS_ValueType_Mm: - case NW_CSS_ValueType_Pt: - case NW_CSS_ValueType_Pc: - status = NW_LMgr_Box_ResolveAbsoluteLength (box, propertyName, property); - break; - - default: - break; - } - - return status; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ConvertBorderStyle - * Description: Converts border style to GDIContext value - * Returns: Converted border style - */ - -static -NW_GDI_Pattern_t -NW_LMgr_Box_ConvertBorderStyle(NW_LMgr_PropertyValueToken_t style) -{ - NW_GDI_Pattern_t gdiStyle; - switch (style) - { - case NW_CSS_PropValue_solid: - gdiStyle = NW_GDI_Pattern_Solid; - break; - - case NW_CSS_PropValue_dashed: - gdiStyle = NW_GDI_Pattern_Dashed; - break; - - case NW_CSS_PropValue_dotted: - gdiStyle = NW_GDI_Pattern_Dotted; - break; - - default: - gdiStyle = NW_GDI_Pattern_None; - break; - } - return gdiStyle; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const -NW_LMgr_Box_Class_t NW_LMgr_Box_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_Box_t), - /* construct */ _NW_LMgr_Box_Construct, - /* destruct */ _NW_LMgr_Box_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Construct - * Description: The constructor. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -_NW_LMgr_Box_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) - { - NW_LMgr_Box_t* box; - NW_ADT_Vector_Metric_t initPropCount; - - NW_ASSERT(dynamicObject != NULL); - - /* for convenience */ - box = NW_LMgr_BoxOf (dynamicObject); - - /* initialize the member variables */ - initPropCount = (NW_ADT_Vector_Metric_t) va_arg (*argp, NW_Uint32); - if (initPropCount != 0) - { - box->propList = (NW_LMgr_PropertyList_t*) - NW_LMgr_SimplePropertyList_New (initPropCount, 2); - NW_THROW_OOM_ON_NULL (box->propList, status); - } - else - { - box->propList = NULL; - } - - box->hasFocus = NW_FALSE; - box->rootBox = NULL; - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Destruct - * Description: The destructor. - * Returns: void - */ - -void -_NW_LMgr_Box_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_Box_t* box; - - NW_ASSERT(dynamicObject != NULL); - - /* for convenience */ - box = NW_LMgr_BoxOf (dynamicObject); - - /* before deleting the object, we must make sure that it is removed from the - parent */ - TBrowserStatusCode status = NW_LMgr_Box_Detach(box); - NW_ASSERT(status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - - /* delete the properties */ - if (box->propList != NULL) { - NW_Object_Delete (box->propList); - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Split - * Description: Splits the box, storing the split box in splitBox. - * By default, boxes can't split. If there is enough space for the box, - * or if we're at the new line, we return success. Otherwise - * split fails. - * Returns: KBrsrLmgrSplitOk, KBrsrLmgrNoSplit - */ - -TBrowserStatusCode -_NW_LMgr_Box_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t* *splitBox, - NW_Uint8 flags) -{ - NW_ASSERT(box != NULL); - - if (flags & NW_LMgr_Box_SplitFlags_Nowrap) { - *splitBox = NULL; - return KBrsrSuccess; - } - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - if((boxBounds.dimension.width <= space) - || (flags & NW_LMgr_Box_SplitFlags_AtNewLine)) { - *splitBox = NULL; - return KBrsrSuccess; - } - else { - *splitBox = NULL; - return KBrsrLmgrNoSplit; - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Resize - * Description: Resizes the box. By default, boxes resize themselves to match - any CSS size properties. Otherwise they get the default minimum size. - * Returns: void - */ - -TBrowserStatusCode -_NW_LMgr_Box_Resize (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_REQUIRED_PARAM(context); - NW_TRY (status) { - NW_GDI_Dimension2D_t size; - - NW_ASSERT(box != NULL); - - status = NW_LMgr_Box_GetMinimumSize (box, &size); - _NW_THROW_ON_ERROR (status); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - boxBounds.dimension.width = size.width; - boxBounds.dimension.height = size.height; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -TBrowserStatusCode -_NW_LMgr_Box_PostResize (NW_LMgr_Box_t* box) -{ - NW_REQUIRED_PARAM(box); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Constrain - * Description This method sets an initial size for a box depending on an external - * constraint. This is different from resize which knows about box - * content size, box size properties, and box minimum size. For - * container boxes, resize involves laying out children with size - * constrained in one dimension: this method is called before resizing - * the box to set the constraint. For other box types, this method - * does nothing and returns KBrsrLmgrNotConstrained, indicating - * that the box has a fixed size and cannot be arbitrarily - * constrained. This method can be called to discover whether a box - * obeys constraint arguments or has a fixed size. - * Returns: KBrsrLmgrNotConstrained - */ - -TBrowserStatusCode -_NW_LMgr_Box_Constrain(NW_LMgr_Box_t *box, - NW_GDI_Metric_t constraint) { - - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(constraint); - - return KBrsrLmgrNotConstrained; -} - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetMinimumContentSize - * Description: This virtual method returns the minimum content size for the - * box. If the WIDTH property is set on the box, this is assumed - * to be the minimum size for the box. Otherwise, the box returns - * the default values (8,8). - * Returns: KBrsrSuccess - */ - -TBrowserStatusCode -_NW_LMgr_Box_GetMinimumContentSize(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size){ - NW_LMgr_PropertyValue_t sizeVal; - - NW_REQUIRED_PARAM(box); - NW_ASSERT(size != NULL); - - /* If the box has its Width/Height properties set, use that for sizing; - * otherwise return default values (8 by 8). - */ - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_LMgr_PropertyValue_t visibilityVal; - TBrowserStatusCode status ; - visibilityVal.token = NW_CSS_PropValue_visible; - status = NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (status == KBrsrSuccess && visibilityVal.token == NW_CSS_PropValue_hidden) - { - size->width = 0 ; - size->height = 0; - return KBrsrSuccess; - } - } - - if(NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess){ - size->width = (NW_GDI_Metric_t)sizeVal.integer; - } - else { - size->width = NW_LMGR_BOX_MIN_WIDTH; - } - - if(NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess){ - size->height = (NW_GDI_Metric_t)sizeVal.integer; - } - else { - size->height = NW_LMGR_BOX_MIN_HEIGHT; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_HasFixedContentSize - * Description: Determines whether the content of the box has fixed size or not. - * By default, boxes don't have a fixed content size: i.e. they can - * be arbitrarily resized by applying a constraint. - * Returns: NW_FALSE - */ - -NW_Bool -_NW_LMgr_Box_HasFixedContentSize(NW_LMgr_Box_t *box){ - NW_REQUIRED_PARAM(box); - return NW_FALSE; -} - -/** - * Function: NW_LMgr_Box_Predraw - * Description: draw the background for the box, including background color and - * background image. - * The latter one includes background-image, background-repeat, - * background-attachment and background-position. - * Parameters: box -- The box for which the background is to be handled. - * deviceContext -- The device context object. - * hasFocus -- has the focus or not. - * - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ - -TBrowserStatusCode -NW_LMgr_Box_Predraw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_GDI_Color_t initialColor; - NW_GDI_Color_t initialBackgroundColor; - NW_GDI_Color_t highlightColor; - - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - initialColor = deviceContext->ForegroundColor(); - initialBackgroundColor = deviceContext->BackgroundColor(); - - NW_TRY (status) - { - NW_LMgr_Property_t backgroundProp; - NW_LMgr_Property_t backgroundPropX, backgroundPropY; - NW_LMgr_PropertyValue_t backgroundPropValue; - NW_Image_AbstractImage_t *image = NULL; - NW_GDI_Rectangle_t rect; /* box rectangle */ - NW_GDI_Rectangle_t viewBounds; /* view rectangle */ - NW_GDI_Point2D_t startDraw; /* start point for drawing the background image */ - NW_GDI_Point2D_t viewOffset; /* view offset caused by scrolling */ - NW_GDI_Dimension3D_t size; /* size of image */ - NW_Bool isFixed = NW_FALSE; /* if the background-attachment is set to fixed */ - NW_LMgr_RootBox_t* rootBox; - - rect = NW_LMgr_Box_GetDisplayBounds(box); - - /* draw the background color */ - - backgroundProp.type = NW_CSS_ValueType_Token; - backgroundProp.value.token = NW_CSS_PropValue_transparent; - - if (NW_Object_IsClass(box, &NW_LMgr_StaticTableCellBox_Class)) - { - NW_LMgr_StaticTableCellBox_t *cell = NW_LMgr_StaticTableCellBoxOf(box); - NW_LMgr_StaticTableCellBox_GetBackground(cell, &backgroundProp); - } - else - { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_backgroundColor, &backgroundProp); - } - - if (hasFocus && NW_Object_IsInstanceOf(box, &NW_LMgr_AbstractTextBox_Class)) - { - /* we want to change the background */ - backgroundProp.type = NW_CSS_ValueType_Color; - - deviceContext->GetHighlightColor( &highlightColor); - backgroundProp.value.integer = highlightColor; - } - - if (backgroundProp.type == NW_CSS_ValueType_Color) - { - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - deviceContext->SetBackgroundColor( backgroundProp.value.integer); - deviceContext->FillRectangle( &rect); - } - - /* draw the background image */ - - /* check if background-image is defined */ - backgroundPropValue.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_backgroundImage, NW_CSS_ValueType_Image, &backgroundPropValue); - if (backgroundPropValue.object == NULL ) - { - NW_THROW (KBrsrSuccess); - } - - /* check if image is opened */ - image = (NW_Image_AbstractImage_t*)backgroundPropValue.object; - (void) NW_Image_AbstractImage_GetSize(image, &size); - if (size.width == 0 || size.height == 0) - { - NW_THROW (KBrsrSuccess); - } - - /* initialized some drawing coordinates */ - viewOffset = deviceContext->ClipRect().point; - viewBounds = *(deviceContext->DisplayBounds()); - startDraw = rect.point; - - rootBox = NW_LMgr_Box_GetRootBox( box ); - - /* check for body box */ - if( NW_LMgr_RootBox_GetBody( rootBox ) == box) - { - /* to make sure the image can be drawn on the entire view */ - startDraw = viewBounds.point; - rect.dimension.width = rect.dimension.width + rect.point.x; - rect.dimension.height =rect.dimension.height + rect.point.y; - rect.point.x = 0; - rect.point.y = 0; - - // Note: following is a temporary fix for bug RLAU-5W9LA8 - // the cause of the bug was body box's width not being correctly set by format functions, - // instead it's always set to roughly view bounds width - // A better fix should be in post format functions - if (rect.dimension.width < viewBounds.dimension.width + viewOffset.x) - rect.dimension.width = viewBounds.dimension.width + viewOffset.x; - } - /* check for background-attachment property */ - backgroundPropValue.token = NW_CSS_PropValue_scroll; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_backgroundAttachment, NW_CSS_ValueType_Token, &backgroundPropValue); - - if (backgroundPropValue.token == NW_CSS_PropValue_background_fixed) - { - isFixed = NW_TRUE; - } - - - /* check and apply background-position property */ - backgroundPropX.type = NW_CSS_ValueType_Token; - backgroundPropX.value.token = NW_CSS_PropValue_none; - backgroundPropY.type = NW_CSS_ValueType_Token; - backgroundPropY.value.token = NW_CSS_PropValue_none; - NW_LMgr_FrameInfo_t borderWidthInfo; - NW_LMgr_Box_GetBorderWidth(box, &borderWidthInfo, ELMgrFrameAll ); - - NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_backgroundPosition_x, &backgroundPropX); - NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_backgroundPosition_y, &backgroundPropY); - if(backgroundPropX.type == NW_CSS_ValueType_Token) - { - if((backgroundPropX.value.token == NW_CSS_PropValue_none) && (backgroundPropY.value.token != NW_CSS_PropValue_none)) - { - backgroundPropX.value.token = NW_CSS_PropValue_center; - } - } - if(backgroundPropY.type == NW_CSS_ValueType_Token) - { - if((backgroundPropX.value.token != NW_CSS_PropValue_none) && (backgroundPropY.value.token == NW_CSS_PropValue_none)) - { - backgroundPropY.value.token = NW_CSS_PropValue_center; - } - } - - if(backgroundPropX.type == NW_CSS_ValueType_Token) - { - /* if background image needs to be shown as fixed, set the position relative to view bounds instead of box bounds */ - if ((backgroundPropX.value.token == NW_CSS_PropValue_center ) - && size.width <= rect.dimension.width) - { - if (isFixed == NW_TRUE) - startDraw.x += (viewBounds.dimension.width - size.width)/2; - else - startDraw.x += (rect.dimension.width - size.width)/2; - } - else if (backgroundPropX.value.token == NW_CSS_PropValue_right) - { - if (isFixed == NW_TRUE) - startDraw.x += (viewBounds.dimension.width - size.width); - else - startDraw.x += (rect.dimension.width - size.width); - } - } - else if ( backgroundPropX.type == NW_CSS_ValueType_Number) - { - startDraw.x += (TInt32)backgroundPropX.value.decimal + borderWidthInfo.left; - } - else - { - startDraw.x += backgroundPropX.value.integer + borderWidthInfo.left; - } - - if(backgroundPropY.type == NW_CSS_ValueType_Token) - { - if ((backgroundPropY.value.token == NW_CSS_PropValue_center) && - (size.height <= rect.dimension.height)) - { - if (isFixed == NW_TRUE) - startDraw.y += (viewBounds.dimension.height - size.height)/2; - else - startDraw.y += (rect.dimension.height - size.height)/2; - } - else if (backgroundPropY.value.token == NW_CSS_PropValue_bottom) - { - if (isFixed == NW_TRUE) - startDraw.y += (viewBounds.dimension.height - size.height); - else - startDraw.y += (rect.dimension.height - size.height); - } - } - else if ( backgroundPropY.type == NW_CSS_ValueType_Number) - { - startDraw.y += (TInt32)backgroundPropY.value.decimal + borderWidthInfo.top; - } - else - { - startDraw.y += backgroundPropY.value.integer + borderWidthInfo.top; - } - - /* Apply background-attachment feature only to the body element */ - if ( isFixed == NW_TRUE) - { - startDraw.x += viewOffset.x; - startDraw.y += viewOffset.y; - } - - /* check and apply background-repeat property */ - backgroundPropValue.token = NW_CSS_PropValue_background_repeat; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_backgroundRepeat, NW_CSS_ValueType_Token, &backgroundPropValue); - - // Draw the image once at startDraw. - if (backgroundPropValue.token == NW_CSS_PropValue_background_norepeat) - { - /* do no repeat, just draw the image once*/ - status = NW_Image_AbstractImage_DrawInRect (image, deviceContext, &startDraw, NULL, &rect ); - } - - // If repeat-x, draw a row of images at startDraw.y - else if (backgroundPropValue.token == NW_CSS_PropValue_background_repeat_x) - { - /* do horizonta repeat */ - /* in case the image is moved by background-position property, restore the start to left */ - if (isFixed == NW_FALSE) - { - startDraw.x = rect.point.x; - } - else - { - startDraw.x = viewBounds.point.x + viewOffset.x; - } - /*startDraw.x += deviceContext->ClipRect().point.x;*/ - - for (; startDraw.x < rect.point.x + rect.dimension.width; startDraw.x += size.width) - { - if (startDraw.x < viewBounds.point.x + viewOffset.x - size.width) - continue; - if (startDraw.x > viewBounds.point.x + viewOffset.x + viewBounds.dimension.width) - break; - - status = NW_Image_AbstractImage_DrawInRect (image, deviceContext, &startDraw, NULL, &rect); - if (status != KBrsrSuccess) - break; - } - } - - // If repeat-y, draw a column of images at startDraw.x. - else if (backgroundPropValue.token == NW_CSS_PropValue_background_repeat_y) - { - /* do verticall repeat */ - /* in case the image is moved by background-position property, restore the start to top */ - if (isFixed == NW_FALSE) - { - startDraw.y = rect.point.y; - } - else - { - startDraw.y = viewBounds.point.y + viewOffset.y; - } - - for (; startDraw.y < rect.point.y + rect.dimension.height; startDraw.y += size.height) - { - /* check to make sure only draw the images in the view */ - if (startDraw.y < viewBounds.point.y + viewOffset.y - size.height) - continue; - if (startDraw.y > viewBounds.point.y + viewOffset.y + viewBounds.dimension.height) - break; - - status = NW_Image_AbstractImage_DrawInRect (image, deviceContext, &startDraw, NULL, &rect); - if (status != KBrsrSuccess) - break; - } - } - - // If repeating in both x and y directions and the image is a "dot" - // stretch the image to fill the box. This speeds up rendering considerably. - else if ((size.width == 1) && (size.height == 1)) - { - NW_GDI_Rectangle_t realViewBounds; - NW_GDI_Rectangle_t visibleArea; - NW_GDI_Dimension3D_t scaledSize; - - // Set the view rectangle - realViewBounds = viewBounds; - realViewBounds.point = viewOffset; - - // Get the visible part of the box on which the image is stretched. - if( !NW_GDI_Rectangle_Cross( &realViewBounds, &rect, &visibleArea ) ) - { - // the box is not in the view - NW_THROW_SUCCESS( status ); - } - - scaledSize.width = visibleArea.dimension.width; - scaledSize.height = visibleArea.dimension.height; - scaledSize.depth = 0; - - // Draw the image to fill scaledSize. - status = NW_Image_AbstractImage_DrawScaled( image, deviceContext, &startDraw, &scaledSize ); - } - - // Otherwise draw a grid of iamges. - else - { - NW_GDI_Point2D_t boxBegin; - NW_GDI_Point2D_t boxEnd; - NW_GDI_Point2D_t point; - NW_Int32 x; - NW_Int32 y; - - // Normalize the box's rectangle in the view. - boxBegin.x = rect.point.x; - boxBegin.y = rect.point.y; - - boxEnd.x = boxBegin.x + rect.dimension.width; - boxEnd.y = boxBegin.y + rect.dimension.height; - - // IsFixed is only true when "background-attachment: fixed" is applied to - // a "body" box. In this case place the first image at the top-left corner - // of the view. - if (isFixed) - { - startDraw.x = viewOffset.x; - startDraw.y = viewOffset.y; - } - - // Otherwise place the first image at the top-left corner of the box. - else - { - startDraw.x = boxBegin.x; - startDraw.y = boxBegin.y; - } - - // Draw columns that overlap the box's rect. - for (x = startDraw.x; x < boxEnd.x; x += size.width) - { - // Skip columns to the left of the box's rectangle. - if ((x + size.width) < boxBegin.x) - { - continue; - } - - // Draw cells that overlap the box's box. - for (y = startDraw.y; y < boxEnd.y; y += size.height) - { - // Skip cells above box's rectangle. - if ((y + size.height) < boxBegin.y) - { - continue; - } - - // Draw the cell. - point.x = x; - point.y = y; - - status = NW_Image_AbstractImage_DrawInRect(image, deviceContext, &point, NULL, &rect); - _NW_THROW_ON_ERROR(status); - } - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - deviceContext->SetForegroundColor( initialColor); - deviceContext->SetBackgroundColor( initialBackgroundColor); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Draw - * Description: The base class draw only draws the borders and the background. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -_NW_LMgr_Box_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - NW_GDI_PaintMode_t oldPaintMode; - NW_Bool paintModeChanged = NW_FALSE; - NW_TRY (status) - { - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - NW_LMgr_PropertyValue_t displayVal; - NW_LMgr_PropertyValue_t focusBehavior; - NW_Bool getBorder = NW_FALSE; - NW_LMgr_FrameInfo_t origBorderColor; - - /* parameter assertion block */ - NW_ASSERT (box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - NW_ASSERT (deviceContext != NULL); - - NW_LMgr_Box_Predraw(box, deviceContext, hasFocus); - /* Check if display is actually a displayable one */ - displayVal.token = NW_CSS_PropValue_display_inline; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &displayVal); - if (displayVal.token == NW_CSS_PropValue_none) - { - return KBrsrSuccess; - } - - // save paint mode - oldPaintMode = deviceContext->PaintMode(); - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - paintModeChanged = NW_TRUE; - - NW_LMgr_Box_GetBorderStyle (box, &borderStyle, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderColor (box, &origBorderColor); - - // do not check color and width unless border is present. - if( !( borderStyle.top == NW_CSS_PropValue_none || borderStyle.top == NW_CSS_PropValue_hidden || origBorderColor.top == NW_GDI_Color_Transparent ) || - !( borderStyle.bottom == NW_CSS_PropValue_none || borderStyle.bottom == NW_CSS_PropValue_hidden || origBorderColor.bottom == NW_GDI_Color_Transparent) || - !( borderStyle.left == NW_CSS_PropValue_none || borderStyle.left == NW_CSS_PropValue_hidden || origBorderColor.left == NW_GDI_Color_Transparent ) || - !( borderStyle.right == NW_CSS_PropValue_none || borderStyle.right == NW_CSS_PropValue_hidden || origBorderColor.right == NW_GDI_Color_Transparent ) ) - { - getBorder = NW_TRUE; - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - } - else - { - // set border color to white - borderColor.bottom = borderColor.left = - borderColor.right = borderColor.top = NW_GDI_Color_White; - // and the style to none - borderWidth.bottom = borderWidth.left = - borderWidth.right = borderWidth.top = 0; - } - - /* Modify the look of the box if we're in focus */ - if (hasFocus) - { - focusBehavior.token = NW_CSS_PropValue_none; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_focusBehavior, - NW_CSS_ValueType_Token, - &focusBehavior); - - if (focusBehavior.token == NW_CSS_PropValue_growBorder) - { - // get the border color and style unless we already have them. - if( getBorder == NW_FALSE ) - { - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - } - borderWidth.top = (NW_GDI_Metric_t)(borderWidth.top + 1); - borderWidth.bottom = (NW_GDI_Metric_t)(borderWidth.bottom + 1); - borderWidth.left = (NW_GDI_Metric_t)(borderWidth.left + 1); - borderWidth.right = (NW_GDI_Metric_t)(borderWidth.right + 1); - - if (origBorderColor.top == NW_GDI_Color_Transparent) - { - borderStyle.top = NW_CSS_PropValue_solid; - borderColor.top = deviceContext->ForegroundColor(); - } - if (origBorderColor.bottom == NW_GDI_Color_Transparent) - { - borderStyle.bottom = NW_CSS_PropValue_solid; - borderColor.bottom = deviceContext->ForegroundColor(); - } - if (origBorderColor.left == NW_GDI_Color_Transparent) - { - borderStyle.left = NW_CSS_PropValue_solid; - borderColor.left = deviceContext->ForegroundColor(); - } - if (origBorderColor.right == NW_GDI_Color_Transparent) - { - borderStyle.right = NW_CSS_PropValue_solid; - borderColor.right = deviceContext->ForegroundColor(); - } - if ((borderStyle.top == NW_CSS_PropValue_none) || (borderStyle.top == NW_CSS_PropValue_hidden)) - { - borderStyle.top = NW_CSS_PropValue_solid; - } - if ((borderStyle.bottom == NW_CSS_PropValue_none) || (borderStyle.bottom == NW_CSS_PropValue_hidden)) - { - borderStyle.bottom = NW_CSS_PropValue_solid; - } - if ((borderStyle.left == NW_CSS_PropValue_none) || (borderStyle.left == NW_CSS_PropValue_hidden)) - { - borderStyle.left = NW_CSS_PropValue_solid; - } - if ((borderStyle.right == NW_CSS_PropValue_none) || (borderStyle.right == NW_CSS_PropValue_hidden)) - { - borderStyle.right = NW_CSS_PropValue_solid; - } - } - } - - /* TODO: if cache is empty, ignore CSS imposed by "a:visited" pseudo-class, - but for now we just fix the color */ - - /* Check for link by looking at parent container. */ - if (NW_LMgr_Box_GetParent(box) != NULL && NW_Object_IsClass(NW_LMgr_Box_GetParent(box), &NW_LMgr_ActiveContainerBox_Class)) - { - /* If Cache is empty, force border to be drawn in uncached color (blue). - NOTE: GetNumEntries allocates a list of the cached files, so avoid it for non-links. */ - //if (UrlLoader_GetNumCacheEntries() == 0) - // { - // borderColor.top = NW_GDI_Color_Blue; - // borderColor.bottom = NW_GDI_Color_Blue; - // borderColor.left = NW_GDI_Color_Blue; - // borderColor.right = NW_GDI_Color_Blue; - // } - } - /* draw the border */ - /* TODO add support for other border types */ - status = NW_LMgr_Box_DrawBorder( NW_LMgr_Box_GetDisplayBounds(box), deviceContext, &borderWidth, &borderStyle, &borderColor); - _NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - if( paintModeChanged == NW_TRUE ) - { - // reset paint mode - deviceContext->SetPaintMode( oldPaintMode ); - } - return status; - } - NW_END_TRY - } - -/* -------------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Update_RenderCache - * Description: Updates the render cache - * Returns: NW_TRUE, NW_FALSE - */ - -NW_Bool NW_LMgr_Box_Update_RenderCache (NW_LMgr_RootBox_t* rootBox, - NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* realClip, - void ***ptr) -{ - NW_Bool cachePresent = NW_FALSE; - if (rootBox->renderedBoxes && rootBox->renderedClips ) - { - cachePresent = NW_TRUE; - NW_ADT_Vector_Metric_t index = NW_ADT_Vector_GetElementIndex(rootBox->renderedBoxes, &box); - if (index == NW_ADT_Vector_AtEnd) - { - *ptr = NW_ADT_DynamicVector_InsertAt(rootBox->renderedBoxes, &box, NW_ADT_Vector_AtEnd); - if (*ptr == NULL) - return cachePresent; - *ptr = NW_ADT_DynamicVector_InsertAt(rootBox->renderedClips, realClip, NW_ADT_Vector_AtEnd); - if (*ptr == NULL) - return cachePresent; - } - else - { - *ptr = NW_ADT_DynamicVector_ReplaceAt(rootBox->renderedBoxes, &box, index); - if (*ptr == NULL) - return cachePresent; - - *ptr = NW_ADT_DynamicVector_ReplaceAt(rootBox->renderedClips, realClip, index); - if (*ptr == NULL) - return cachePresent; - } - } - return cachePresent; -} - -/* -------------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Render - * Description: Renders the box. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ - -TBrowserStatusCode -_NW_LMgr_Box_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ) -{ - NW_GDI_Rectangle_t visibleArea; - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_PropertyValue_t visibilityVal; - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t oldClip = {{0, 0}, {0, 0}}; - NW_GDI_Rectangle_t realClip; - NW_Bool clipRectChanged = NW_FALSE; - void** ptr = NULL; - - NW_TRY (status) - { - /* Should we draw floats? */ - if (!(flags & NW_LMgr_Box_Flags_DrawFloats)) - { - floatVal.token = NW_CSS_PropValue_none; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatVal); - if (floatVal.token != NW_CSS_PropValue_none) - { - NW_THROW_SUCCESS (status); - } - } - // check if the this box has focus - // if hasFocus is already set to true by any parent - // then it should not be overuled. - if( !(*hasFocus) && currentBox == box ) - { - *hasFocus = NW_TRUE; - } - - /* Calculate the view bounds */ - viewBounds = *(deviceContext->DisplayBounds()); - viewBounds.point = *(deviceContext->Origin()); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - - /* Calculate tree extents first */ - if (!NW_GDI_Rectangle_Cross(clipRect, &boxBounds, &visibleArea)) - { - NW_THROW_SUCCESS (status); - } - /* Is the box visible on screen? If not, we don't draw */ - if (!NW_GDI_Rectangle_Cross(&viewBounds, &visibleArea, NULL)) - { - NW_THROW_SUCCESS (status); - } - /* Calculate the part of the clip that is visible on screen; - if the clip is off-screen, don't draw */ - if (!NW_GDI_Rectangle_Cross(clipRect, &viewBounds, &realClip)) - { - NW_THROW_SUCCESS (status); - } - - /* Save the old clip rect */ - oldClip = deviceContext->ClipRect(); - /* Set the new clip rect */ - deviceContext->SetClipRect( &realClip ); - clipRectChanged = NW_TRUE; - - /* Check if visibility val is not hidden */ - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if ((visibilityVal.token == NW_CSS_PropValue_hidden) || - (visibilityVal.token == NW_CSS_PropValue_collapse)) - { - NW_THROW_SUCCESS(status); - } - - /* make the box draw itself */ - status = NW_LMgr_Box_Draw (box, deviceContext, *hasFocus); - _NW_THROW_ON_ERROR (status); - - /* Add the box and the clip to the cache */ - NW_Bool cachePresent = NW_LMgr_Box_Update_RenderCache (rootBox, box, &realClip, &ptr); - if (cachePresent) - { - NW_THROW_OOM_ON_NULL(ptr, status); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - // box has no child - *skipChildren = NW_FALSE; - - if( clipRectChanged == NW_TRUE ) - { - /* Reset the clip rect */ - deviceContext->SetClipRect( &oldClip); - } - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetBaseline - * Description: Returns the baseline of a box. The default implementation - * returns the bottom of the box content area as the baseline. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -NW_GDI_Metric_t -_NW_LMgr_Box_GetBaseline(NW_LMgr_Box_t* box){ - - NW_ASSERT(box != NULL); - - return (NW_GDI_Metric_t)(NW_LMgr_Box_GetFormatBounds(box).dimension.height); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Shift - * Description: Shifts the contents of the box by a given offset. The default - * implementation simply modifies the box boundaries. - * Returns: KBrsrSuccess - */ - -TBrowserStatusCode -_NW_LMgr_Box_Shift (NW_LMgr_Box_t* box, NW_GDI_Point2D_t *delta){ - - NW_ASSERT(box != NULL); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.point.x = (NW_GDI_Metric_t)(boxBounds.point.x + delta->x); - boxBounds.point.y = (NW_GDI_Metric_t)(boxBounds.point.y + delta->y); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Clone - * Description: Clone returns a "deep" copy of the box, where the actual definition of - * "deep" is up to the individual box type. The default implementation - * fails. Only the ContainerBox and its descendants have - * meaningful implementations at present, because they are the only - * ones that need it. TODO: Fix this. - * Returns: NULL. - */ - -NW_LMgr_Box_t* -_NW_LMgr_Box_Clone (NW_LMgr_Box_t* box){ - - NW_REQUIRED_PARAM(box); - NW_ASSERT(0); - - return NULL; -} - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetRawProperty - * Description: Tries to get a property from the box's own property list. - * Property inheritance is ignored. - * Returns: KBrsrSuccess, KBrsrNotFound. - */ - -TBrowserStatusCode -NW_LMgr_Box_GetRawProperty(NW_LMgr_Box_t *box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property) -{ - TBrowserStatusCode status; - NW_LMgr_Property_t origProperty; - - NW_ASSERT(box != NULL); - - if(box->propList != NULL){ - status = NW_LMgr_PropertyList_Get(box->propList, name, &origProperty); - if (status != KBrsrSuccess) { - return KBrsrNotFound; - } - - property->type = (NW_LMgr_PropertyValueType_t)(origProperty.type & NW_CSS_ValueType_Mask); - property->value = origProperty.value; - - status = KBrsrSuccess; - } - else { - status = KBrsrNotFound; - } - - return status; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetPropertyFromList - * Description: Tries to get a property from the box's own property list. - * Property inheritance is ignored. - * Returns: KBrsrSuccess, KBrsrNotFound. - */ - -TBrowserStatusCode -NW_LMgr_Box_GetPropertyFromList(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property) - { - TBrowserStatusCode status; - NW_LMgr_Property_t origProperty; - NW_Bool specialProperty, isMargin = NW_FALSE, isMarker = NW_FALSE; - - NW_ASSERT(box != NULL); - - if( box->propList ) - { - // In Vertical Layout Mode, table, tr, td, th need to ignore margin, padding, - // border, whitespace. This special handling is done in - // NW_LMgr_VerticalTableBox_GetPropertyFromList. - // For rest of the properties (specialProperty flag is false) we handle them - // the normal way - if (NW_Object_IsClass(box, &NW_LMgr_VerticalTableBox_Class) || - NW_Object_IsClass(box, &NW_LMgr_VerticalTableCellBox_Class) || - NW_Object_IsClass(box, &NW_LMgr_VerticalTableRowBox_Class)) - { - status = NW_LMgr_VerticalTableBox_GetPropertyFromList(box, name, property, &specialProperty); - if (specialProperty) - { - return status; - } - } - - if(NW_Object_IsInstanceOf(box, &LMgrMarkerImage_Class) || NW_Object_IsInstanceOf(box, &LMgrMarkerText_Class)) - { - isMarker = NW_TRUE; - } - if( NW_LMgr_RootBox_GetSmallScreenOn( NW_LMgr_Box_GetRootBox( box ) ) ) - { - if((name == NW_CSS_Prop_margin) || (name == NW_CSS_Prop_leftMargin) || - (name == NW_CSS_Prop_rightMargin) || (name == NW_CSS_Prop_topMargin) || - (name == NW_CSS_Prop_bottomMargin) ) - { - isMargin = NW_TRUE; - if( NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class) && !isMarker) - { - return KBrsrNotFound; - } - } - } - - status = NW_LMgr_PropertyList_Get(box->propList, name, &origProperty); - if (status != KBrsrSuccess) - { - return KBrsrNotFound; - } - - if(isMargin && !isMarker) - { - if(origProperty.value.integer < 0) - { - property->value.integer = 0; - return KBrsrSuccess; - } - } - - *property = origProperty; - status = NW_LMgr_Box_ResolveRelativeProperty (box, name, property); - if (status != KBrsrSuccess) - { - return KBrsrNotFound; - } - - property->type = (NW_LMgr_PropertyValueType_t)(property->type & NW_CSS_ValueType_Mask); - - status = KBrsrSuccess; - } - else - { - status = KBrsrNotFound; - } - - return status; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetProperty - * Description: Tries to get a property from the box's own property list. - * If the property is not found, and the property is inherited, - * it queries the ancestors for it. - * Returns: KBrsrSuccess, KBrsrNotFound. - */ - -TBrowserStatusCode -NW_LMgr_Box_GetProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property) - { - NW_LMgr_Box_t* childBox = box; - NW_Bool lookingForInheritProp = NW_FALSE; - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - do - { - TBrowserStatusCode status; - NW_LMgr_Property_t p; - - status = NW_LMgr_Box_GetPropertyFromList(box, name, &p); - if( status == KBrsrSuccess ) - { - if( p.type != NW_CSS_ValueType_Token || - p.value.token != NW_CSS_PropValue_inherit) - { - // if we are looking for inherit property, then - // first make sure that the property value did not get resolved - // while calling NW_LMgr_Box_GetPropertyFromList on the parent box. - // if it was modified, then we need to take a look at the - // original type to check if resolving the value is appropriate here. - // for examp: parent has 50% as height which gets resolved to 100px, - // so then we get the inherited value as 100px instead of the correct - // 50% (50px) - if( lookingForInheritProp == NW_TRUE && box->propList ) - { - NW_LMgr_Property_t origProperty; - status = NW_LMgr_PropertyList_Get( box->propList, name, &origProperty ); - if( status == KBrsrSuccess && origProperty.type != p.type ) - { - // resolve the original value on the child now - status = NW_LMgr_Box_ResolveRelativeProperty( childBox, name, &origProperty); - if( status == KBrsrSuccess ) - { - *property = origProperty; - property->type = - (NW_LMgr_PropertyValueType_t) (property->type & NW_CSS_ValueType_Mask); - return KBrsrSuccess; - } - } - } - *property = p; - property->type = - (NW_LMgr_PropertyValueType_t) (property->type & NW_CSS_ValueType_Mask); - return KBrsrSuccess; - } - } - else - { - if (!(name & NW_CSS_PropInherit)) - { - // drop out and return "not found" - break; - } - } - // The prop is inherit - lookingForInheritProp = NW_TRUE; - box = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (box); - if( !box ) - { - break; - } - // note: Allow reading direction property from anonymous box - if (name != NW_CSS_Prop_textDirection) - { - // Check if the parent is an anonymous box - if (NW_Object_IsInstanceOf(box, &LMgrAnonBlock_Class)) - { - // this parent is an anonymous box, we should go up to see if grandpa has - // the prop we are interested. - box = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent( box ); - } - } - } while( box ); - - // the property was not found - return KBrsrNotFound; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetPropertyValue - * Description: Same as GetProperty, only the type of the property is not returned. - * Returns: KBrsrSuccess, KBrsrNotFound. - */ - -/* TODO: This method should go away. We should always query for the property type. - */ - -TBrowserStatusCode -NW_LMgr_Box_GetPropertyValue (NW_LMgr_Box_t *box, - NW_LMgr_PropertyName_t name, - NW_LMgr_PropertyValueType_t type, - NW_LMgr_PropertyValue_t *value) -{ - NW_LMgr_Property_t property; - TBrowserStatusCode status; - NW_LMgr_RootBox_t* rootBox; - NW_Bool flag; - NW_Bool inMarquee = NW_FALSE; - - NW_ASSERT(box != NULL); - - status = NW_LMgr_Box_GetProperty (box, name, &property); - if (status != KBrsrSuccess) { - return status; - } - - if (type == (property.type & NW_CSS_ValueType_Mask)) - { - *value = property.value; - rootBox = NW_LMgr_Box_GetRootBox( box ); - flag = NW_LMgr_RootBox_GetSmallScreenOn( rootBox ); - - if (NW_Object_IsInstanceOf(box, &NW_LMgr_BidiFlowBox_Class)) - { - /* we want to limit the width of the FlowBoxes to be the display width - in vertical layout mode - */ - if ((name == NW_CSS_Prop_width) && flag) - { - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - - if (value->integer > rectangle->dimension.width) - { - value->integer = (NW_Uint32)(rectangle->dimension.width-4); - } - } - } - /* In vertical layout mode, we want to ignore the whitespace property */ - if ((name == NW_CSS_Prop_whitespace) && flag) - { - while( box != NULL ) - { - if( NW_Object_IsClass( box, &NW_LMgr_MarqueeBox_Class ) == NW_TRUE ) - { - inMarquee = NW_TRUE; - break; - } - if (!box->parent) - { - break; - } - box = NW_LMgr_BoxOf( box->parent ); - } - if (!inMarquee) - { - if (value->token == NW_CSS_PropValue_pre) - { - value->token = NW_CSS_PropValue_flags_smallScreenPre; - } else { - value->token = NW_CSS_PropValue_normal; - } - } - } - return KBrsrSuccess; - } else { - return KBrsrNotFound; - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_SetProperty - * Description: Sets a property on a box. - * Returns: KBrsrSuccess if successful; KBrsrOutOfMemory if - * out of memory. - */ - -TBrowserStatusCode -NW_LMgr_Box_SetProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property) -{ - NW_TRY (status) { - NW_ASSERT(box != NULL); - - if (box->propList == NULL) { - box->propList = - (NW_LMgr_PropertyList_t*) NW_LMgr_SimplePropertyList_New( 2, 10 ); - NW_THROW_OOM_ON_NULL (box->propList, status); - } - - status = NW_LMgr_PropertyList_Set (box->propList, name, property); - _NW_THROW_ON_ERROR (status); - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_RemoveProperty - * Description: Removes a property from a box. - * Returns: KBrsrSuccess if successful; KBrsrOutOfMemory if - * out of memory. - */ - -TBrowserStatusCode -NW_LMgr_Box_RemoveProperty (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(box != NULL); - - if (box->propList != NULL) { - status = NW_LMgr_PropertyList_Remove (box->propList, name); - } - - return status; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_RemovePropertyWithoutDelete - * Description: Removes a property from a box; however, does NOT delete the property - * Only for simple property list - * Returns: KBrsrSuccess if successful; KBrsrOutOfMemory if - * out of memory. - */ - -TBrowserStatusCode -NW_LMgr_Box_RemovePropertyWithoutDelete (NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(box != NULL); - NW_ASSERT( NW_Object_IsInstanceOf(box->propList, &NW_LMgr_SimplePropertyList_Class) ); - - if (box->propList != NULL) - { - status = NW_LMgr_SimplePropertyList_RemoveWithoutDelete ( - (NW_LMgr_SimplePropertyList_t*)(box->propList), - name); - } - - return status; - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_ApplyFontProps - * Description: Use the CSS properties of a text box to match a GDI font and cache - * this as the NW_Prop_GDI_Font property. The allocates a font object - * which needs to be freed when the box is destroyed. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ -TBrowserStatusCode -NW_LMgr_Box_ApplyFontProps (NW_LMgr_Box_t* box) - { - NW_LMgr_Property_t fontProp; - - fontProp.type = NW_CSS_ValueType_Font; - fontProp.value.object = NULL; - - NW_TRY (status) - { - NW_LMgr_RootBox_t* rootBox; - CGDIDeviceContext* deviceContext; - NW_LMgr_Property_t fontFamily; - NW_LMgr_Property_t size; - NW_LMgr_Property_t style; - NW_LMgr_Property_t weight; - NW_LMgr_Property_t variant; - NW_Uint8 gdiFontStyle; - NW_Uint8 gdiFontVariant; - TBrowserStatusCode s1, s2, s3, s4, s5; - - /* Check whether the properties have already been applied */ - NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontObject, &fontProp); - if (fontProp.value.object != NULL) - { - return KBrsrSuccess; - } - - // Get the properties from the box property list - s1 = NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontFamily, &fontFamily); - s2 = NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontSize, &size); - s3 = NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontStyle, &style); - s4 = NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontWeight, &weight); - s5 = NW_LMgr_Box_GetPropertyFromList (box, NW_CSS_Prop_fontVariant, &variant); - - // If there are no properties to apply, we return. If the box is the root, - // we must apply the properties at all times. - if (s1 == KBrsrNotFound && s2 == KBrsrNotFound && s3 == KBrsrNotFound && - s4 == KBrsrNotFound && s5 == KBrsrNotFound && box->parent != NULL) - { - return KBrsrSuccess; - } - - // Set defaults - fontFamily.value.object = const_cast<NW_Text_t*>(KGDIFontDefaultFamily); - size.value.integer = KGDIFontZeroSize; - style.value.token = NW_CSS_PropValue_normal; - weight.value.integer = KGDIFontDefaultWeight; - variant.value.token = NW_CSS_PropValue_normal; - - // Now take into account inheritance - NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_fontFamily, &fontFamily); - NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_fontSize, &size); - NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_fontStyle, &style); - NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_fontWeight, &weight); - NW_LMgr_Box_GetProperty (box, NW_CSS_Prop_fontVariant, &variant); - - // For negative value, use default font size - if ( size.value.integer < 0 ) - { - size.value.decimal = KGDIFontDefaultSizeInPt; - size.type = NW_CSS_ValueType_Pt; - } - - // Check the device resolution in order to resolve the correct font size for the device - CEikonEnv* eikEnv = CEikonEnv::Static(); - CWsScreenDevice& screenDev = *eikEnv->ScreenDevice(); - - // we are using pixels to pass off to the device context, from there they get converted to twips - TInt px = 0; - - if (size.type == NW_CSS_ValueType_Pt) - { - TInt valInt = (TInt)NW_Math_round(size.value.decimal); - - px = screenDev.VerticalTwipsToPixels(FontUtils::TwipsFromPoints(valInt)); - - size.type = NW_CSS_ValueType_Px; - size.value.integer = px; - } - else if (size.type == NW_CSS_ValueType_Px) - { - TUint dpi = screenDev.VerticalTwipsToPixels(KTwipsPerInch); - - // Since web designers assume a 96 pixel per inch (ppi) display use that as the reference point. - // Thus the multiplier should be: - // ppi/96 - // Below is a list of the density of commercially available LCD displays. - // Density Multiplier: - // 400 ppi 4.2 - // 210 ppi 2.2 - // 200 ppi 2.1 - // 120 ppi 1.3 - // 100 ppi 1.0 - // 96 ppi 1.0 - if ((200 > dpi) && (dpi > 120)) - { - px = (TInt)((float)size.value.integer * 1.3); - } - else if ((210 > dpi) && (dpi > 200)) - { - px = (TInt)((float)size.value.integer * 2.1); - } - else if ((400 > dpi) && (dpi > 210)) - { - px = (TInt)((float)size.value.integer * 2.2); - } - else if (dpi > 400) - { - px = (TInt)((float)size.value.integer * 4.2); - } - - size.value.integer = px; - } - - switch (style.value.token) - { - case NW_CSS_PropValue_oblique: - gdiFontStyle = EGDIFontStyleOblique; - break; - - case NW_CSS_PropValue_italic: - gdiFontStyle = EGDIFontStyleItalic; - break; - - default: - gdiFontStyle = KGDIFontDefaultStyle; - } - - switch (variant.value.token) - { - case NW_CSS_PropValue_smallcaps: - gdiFontVariant = EGDIFontVariantSmallCaps; - break; - - default: - gdiFontVariant = KGDIFontDefaultVariant; - } - - // we're going to need the DeviceContext to create Font - rootBox = NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT (deviceContext != NULL); - - fontProp.type = NW_CSS_ValueType_Font; - fontProp.value.object = - deviceContext->CreateFont ((NW_Text_t*) fontFamily.value.object, - (TGDIFontStyle) gdiFontStyle, - (NW_Uint8) size.value.integer, - (NW_Uint16) weight.value.integer, - (TGDIFontVariant) gdiFontVariant); - NW_THROW_OOM_ON_NULL (fontProp.value.object, status); - - // Add the computed GDI font to the property list - status = NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf(box), - NW_CSS_Prop_fontObject, &fontProp); - - _NW_THROW_ON_ERROR (status); - - } - NW_CATCH (status) - { - delete (CGDIFont*)fontProp.value.object; - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetFont - * Description: Get the GDI font handle. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -CGDIFont* -NW_LMgr_Box_GetFont (NW_LMgr_Box_t* box) -{ - TBrowserStatusCode status; - NW_LMgr_PropertyValue_t font; - - NW_ASSERT(box != NULL); - - font.object = NULL; - - /* If GDI font handle prop is set, return it */ - status = NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_fontObject, NW_CSS_ValueType_Font, &font); - if (status == KBrsrSuccess) { - return (CGDIFont*) font.object; - } - else { - return NULL; - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetModelProp - * Description: Returns a single box-model property for the box - * (as opposed to GetModelProps which returns the values for - * all sides of the box). - * Returns: Property value. - */ - -/* TODO: move all this to GetValueProp */ - -NW_Int32 -NW_LMgr_Box_GetModelProp(NW_LMgr_Box_t *box, NW_LMgr_PropertyName_t propName) -{ - NW_LMgr_Property_t prop; - NW_LMgr_PropertyName_t shortcutProp; - NW_LMgr_PropertyValueType_t defaultPropType; - NW_Bool doInherit = NW_FALSE; - TBrowserStatusCode status; - - switch (propName) { - case NW_CSS_Prop_topBorderWidth: - case NW_CSS_Prop_bottomBorderWidth: - case NW_CSS_Prop_leftBorderWidth: - case NW_CSS_Prop_rightBorderWidth: - - shortcutProp = NW_CSS_Prop_borderWidth; - defaultPropType = NW_CSS_ValueType_Px; - break; - - case NW_CSS_Prop_topBorderStyle: - case NW_CSS_Prop_bottomBorderStyle: - case NW_CSS_Prop_leftBorderStyle: - case NW_CSS_Prop_rightBorderStyle: - - shortcutProp = NW_CSS_Prop_borderStyle; - defaultPropType = NW_CSS_ValueType_Token; - break; - - case NW_CSS_Prop_topBorderColor: - case NW_CSS_Prop_bottomBorderColor: - case NW_CSS_Prop_leftBorderColor: - case NW_CSS_Prop_rightBorderColor: - - shortcutProp = NW_CSS_Prop_borderColor; - defaultPropType = NW_CSS_ValueType_Color; - break; - - case NW_CSS_Prop_topPadding: - case NW_CSS_Prop_bottomPadding: - case NW_CSS_Prop_leftPadding: - case NW_CSS_Prop_rightPadding: - - shortcutProp = NW_CSS_Prop_padding; - defaultPropType = NW_CSS_ValueType_Px; - break; - - case NW_CSS_Prop_topMargin: - case NW_CSS_Prop_bottomMargin: - case NW_CSS_Prop_leftMargin: - case NW_CSS_Prop_rightMargin: - - shortcutProp = NW_CSS_Prop_margin; - defaultPropType = NW_CSS_ValueType_Px; - break; - - default: - NW_ASSERT(0); - return 0; - } - - status = NW_LMgr_Box_GetPropertyFromList(box, propName, &prop); - if (status == KBrsrSuccess) { - if ((prop.type == NW_CSS_ValueType_Token) && (prop.value.token == NW_CSS_PropValue_inherit)) { - doInherit = NW_TRUE; - } - else if (prop.type == defaultPropType) { - if ((shortcutProp == NW_CSS_Prop_padding) || (shortcutProp == NW_CSS_Prop_borderWidth)) { - if (prop.value.integer < 0) { - return 0; - } - } - return prop.value.integer; - } - else if (shortcutProp == NW_CSS_Prop_margin) { - /* Special handling of auto margins */ - if ((prop.type == NW_CSS_ValueType_Token) && (prop.value.token == NW_CSS_PropValue_auto)) { - return NW_LMgr_FrameInfo_AutoMargin; - } - } - } - status = NW_LMgr_Box_GetPropertyFromList(box, shortcutProp, &prop); - if (status == KBrsrSuccess) { - if ((prop.type == NW_CSS_ValueType_Token) && (prop.value.token == NW_CSS_PropValue_inherit)) { - doInherit = NW_TRUE; - } - else if (prop.type == defaultPropType) { - if ((shortcutProp == NW_CSS_Prop_padding) || (shortcutProp == NW_CSS_Prop_borderWidth)) { - if (prop.value.integer < 0) { - return 0; - } - } - return prop.value.integer; - } - else if (shortcutProp == NW_CSS_Prop_margin) { - /* Special handling of auto margins */ - if ((prop.type == NW_CSS_ValueType_Token) && (prop.value.token == NW_CSS_PropValue_auto)) { - return NW_LMgr_FrameInfo_AutoMargin; - } - } - } - - if (doInherit && box->parent) - { - if (NW_Object_IsInstanceOf(box->parent, &LMgrAnonBlock_Class)) - { - // this parent is an anonymous box, we should go up to see if grandpa has - // the prop we are interested. - box = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (box); - if (box->parent == NULL) { - return 0; - } - } - return NW_LMgr_Box_GetModelProp((NW_LMgr_Box_t*)(box->parent), propName); - } - - /* Otherwise return defaults */ - if (shortcutProp == NW_CSS_Prop_borderColor) { - NW_LMgr_PropertyValue_t color; - color.integer = 0; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_color, NW_CSS_ValueType_Color, &color); - return color.integer; - } - else if (shortcutProp == NW_CSS_Prop_borderWidth) - { - if (NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)) - { - return (NW_LMgr_ImgContainerBox_ImageIsBroken(box) == NW_TRUE) ? - NW_CSS_PropValue_none : NW_LMgr_Box_MinBorderWidth; - } - else - { - return NW_LMgr_Box_MediumBorderWidth; - } - } - else if (shortcutProp == NW_CSS_Prop_borderStyle) { - if (NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class) && - NW_LMgr_ImgContainerBox_ImageIsBroken( box ) == NW_TRUE ) - { - return NW_CSS_PropValue_solid; - } - return NW_CSS_PropValue_none; - } - else { - return 0; - } -} - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetBorderWidth - * Description: Calculates the width of the box border on all four sides - * and stores it in borderWidth. - * Returns: void. - */ - -void -NW_LMgr_Box_GetBorderWidth(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *borderWidth, - NW_Int8 aFrameSide ) -{ - NW_LMgr_FrameInfo_t borderStyle; - - borderWidth->left = 0; - borderWidth->right = 0; - borderWidth->top = 0; - borderWidth->bottom = 0; - - /* set the width to zero if the box style is "none" */ - NW_LMgr_Box_GetBorderStyle( box, &borderStyle, aFrameSide ); - - if( ( aFrameSide & ELMgrFrameLeft ) && - borderStyle.left != NW_CSS_PropValue_none && borderStyle.left != NW_CSS_PropValue_hidden ) - { - borderWidth->left = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_leftBorderWidth); - } - if( ( aFrameSide & ELMgrFrameBottom ) && - borderStyle.bottom != NW_CSS_PropValue_none && borderStyle.bottom != NW_CSS_PropValue_hidden ) - { - borderWidth->bottom = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderWidth); - } - if( ( aFrameSide & ELMgrFrameTop ) && - borderStyle.top != NW_CSS_PropValue_none && borderStyle.top != NW_CSS_PropValue_hidden ) - { - borderWidth->top = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderWidth); - } - if( ( aFrameSide & ELMgrFrameRight ) && - borderStyle.right != NW_CSS_PropValue_none && borderStyle.right != NW_CSS_PropValue_hidden ) - { - borderWidth->right = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_rightBorderWidth); - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetBorderStyle - * Description: Gets a set of box border-style properties - * (left, right, top, bottom) and stores them in borderStyle. - * Returns: void (in case no property are set, the default value of 0 - * is returned for the property value). - */ - -void -NW_LMgr_Box_GetBorderStyle(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t* borderStyle, - NW_Int8 aFrameSide ) - { - // init - borderStyle->left = 0; - borderStyle->right = 0; - borderStyle->top = 0; - borderStyle->bottom = 0; - // - if( aFrameSide & ELMgrFrameLeft ) -{ - borderStyle->left = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_leftBorderStyle); - } - if( aFrameSide & ELMgrFrameRight ) - { - borderStyle->right = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_rightBorderStyle); - } - if( aFrameSide & ELMgrFrameTop ) - { - borderStyle->top = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderStyle); - } - if( aFrameSide & ELMgrFrameBottom ) - { - borderStyle->bottom = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderStyle); - } - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetBorderColor - * Description: Gets a set of box border-color properties - * (left, right, top, bottom) and stores them in borderColor. - * Returns: void (in case no property are set, the default value of 0 - * is returned for the property value). - */ - -void -NW_LMgr_Box_GetBorderColor(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *borderColor) -{ - borderColor->left = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_leftBorderColor); - borderColor->right = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_rightBorderColor); - borderColor->top = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topBorderColor); - borderColor->bottom = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomBorderColor); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetMargins - * Description: Calculates the width of the box margin on all four sides - * and stores it in "margins". - * Returns: void. - */ - -void -NW_LMgr_Box_GetMargins(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t *margins, - NW_LMgr_FrameInfo_t* isAuto, - NW_Int8 aFrameSide ) -{ - NW_LMgr_RootBox_t* rootBox; - - if (isAuto) - { - NW_Mem_memset(isAuto, 0, sizeof(NW_LMgr_FrameInfo_t)); - } - - if( aFrameSide & ELMgrFrameLeft ) - { - margins->left = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_leftMargin); - } - if( aFrameSide & ELMgrFrameRight ) - { - margins->right = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_rightMargin); - } - if( aFrameSide & ELMgrFrameTop ) - { - margins->top = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_topMargin); - } - if( aFrameSide & ELMgrFrameBottom ) - { - margins->bottom = NW_LMgr_Box_GetModelProp(box, NW_CSS_Prop_bottomMargin); - } - - if( ( aFrameSide & ELMgrFrameLeft ) && margins->left == NW_LMgr_FrameInfo_Auto) - { - margins->left = 0; - if (isAuto) - { - isAuto->left = 1; - } - } - if( ( aFrameSide & ELMgrFrameRight ) && margins->right == NW_LMgr_FrameInfo_Auto) - { - margins->right = 0; - if (isAuto) - { - isAuto->right = 1; - } - } - if( ( aFrameSide & ELMgrFrameTop ) && margins->top == NW_LMgr_FrameInfo_Auto) - { - margins->top = 0; - if (isAuto) - { - isAuto->top = 1; - } - } - if( ( aFrameSide & ELMgrFrameBottom ) && margins->bottom == NW_LMgr_FrameInfo_Auto) - { - margins->bottom = 0; - if (isAuto) - { - isAuto->bottom = 1; - } - } - - rootBox = NW_LMgr_Box_GetRootBox(box); - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - - /* We want to limit the margin to 15% of display width */ - if ((margins->left != NW_LMgr_FrameInfo_Auto) || (margins->right != NW_LMgr_FrameInfo_Auto)) - { - NW_GDI_Metric_t maxMargin = 0; - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - maxMargin = (NW_GDI_Metric_t)(rectangle->dimension.width*15/100); - - if( ( aFrameSide & ELMgrFrameLeft ) && margins->left > maxMargin) - { - margins->left = maxMargin; - } - if( ( aFrameSide & ELMgrFrameRight ) && margins->right > maxMargin) - { - margins->right = maxMargin; - } - } - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetPadding - * Description: Calculates the width of the box padding on all four sides - * and stores it in "padding". - * Returns: void - */ - -void -NW_LMgr_Box_GetPadding(NW_LMgr_Box_t *box, - NW_LMgr_FrameInfo_t* padding, - NW_Int8 aFrameSide ) - { - // init - padding->left = 0; - padding->right = 0; - padding->top = 0; - padding->bottom = 0; - // - if( aFrameSide & ELMgrFrameLeft ) - { - padding->left = NW_LMgr_Box_GetModelProp( box, NW_CSS_Prop_leftPadding ); - } - if( aFrameSide & ELMgrFrameRight ) - { - padding->right = NW_LMgr_Box_GetModelProp( box, NW_CSS_Prop_rightPadding ); - } - if( aFrameSide & ELMgrFrameTop ) - { - padding->top = NW_LMgr_Box_GetModelProp( box, NW_CSS_Prop_topPadding ); - } - if( aFrameSide & ELMgrFrameBottom ) - { - padding->bottom = NW_LMgr_Box_GetModelProp( box, NW_CSS_Prop_bottomPadding ); - } - } - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_DrawSolidBorder - * Description: Draws a solid border around the content of the box, - using the current boundaries of the box. - * Returns: KBrsrSuccess, KBrsrFailure (?), KBrsrOutOfMemory. - */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_DrawSolidBorder - * Description: Draws a solid border around the content of the box, - using the current boundaries of the box. - * Returns: KBrsrSuccess, KBrsrFailure (?), KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_Box_DrawBorder (NW_GDI_Rectangle_t bounds, - CGDIDeviceContext* deviceContext, - NW_LMgr_FrameInfo_t* borderWidth, - NW_LMgr_FrameInfo_t* borderStyle, - NW_LMgr_FrameInfo_t* borderColor) -{ - NW_GDI_Color_t oldFg; - NW_GDI_Pattern_t oldPat; - - oldFg = deviceContext->ForegroundColor(); - oldPat = deviceContext->LinePattern(); - - NW_TRY (status) { - NW_GDI_Metric_t innerWidth, innerHeight; - NW_Uint8 i; - NW_GDI_Point2D_t vertices[2]; - NW_Float32 ratioTopLeft=0, ratioBottomLeft=0, ratioTopRight=0, ratioBottomRight=0; - NW_Float32 ratioLeftTop=0, ratioLeftBottom=0, ratioRightTop=0, ratioRightBottom=0; - - innerWidth = (NW_GDI_Metric_t)(bounds.dimension.width - borderWidth->left - borderWidth->right); - innerHeight = (NW_GDI_Metric_t)(bounds.dimension.height - borderWidth->top - borderWidth->bottom); - - if (borderWidth->right == 0) { - ratioTopRight = 0; - } else { - ratioTopRight = ((NW_Float32)borderWidth->top)/((NW_Float32)borderWidth->right); - } - if (ratioTopRight > 0) { - ratioRightTop = 1/ratioTopRight; - } - - if (borderWidth->right == 0) { - ratioBottomRight = 0; - } else { - ratioBottomRight = ((NW_Float32)borderWidth->bottom)/((NW_Float32)borderWidth->right); - } - if (ratioBottomRight > 0) { - ratioRightBottom = 1/ratioBottomRight; - } - - if (borderWidth->left == 0) { - ratioTopLeft = 0; - } else { - ratioTopLeft = ((NW_Float32)borderWidth->top)/((NW_Float32)borderWidth->left); - } - if (ratioTopLeft > 0) { - ratioLeftTop = 1/ratioTopLeft; - } - - if (borderWidth->left == 0) { - ratioBottomLeft = 0; - } else { - ratioBottomLeft = ((NW_Float32)borderWidth->bottom)/((NW_Float32)borderWidth->left); - } - if (ratioBottomLeft > 0) { - ratioLeftBottom = 1/ratioBottomLeft; - } - - /* draw top border */ - if (borderWidth->top > 0) - { - if ( borderColor->top == NW_GDI_Color_Transparent) { - borderStyle->top = NW_CSS_PropValue_none; - } else { - deviceContext->SetForegroundColor( borderColor->top); - } - deviceContext->SetLinePattern( NW_LMgr_Box_ConvertBorderStyle(borderStyle->top)); - - for (i=0; i<borderWidth->top; i++) { - if (borderStyle->top == NW_CSS_PropValue_solid || - borderStyle->top == NW_CSS_PropValue_dashed || - borderStyle->top == NW_CSS_PropValue_dotted) { - vertices[0].x = (NW_GDI_Metric_t)(bounds.point.x + i*ratioLeftTop); - vertices[0].y = vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + i); - vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - i*ratioRightTop - 1); - } else if (borderStyle->top == NW_CSS_PropValue_bevelled) { - if (i >= innerWidth/2) { - continue; - } - vertices[0].x = (NW_GDI_Metric_t)(bounds.point.x + borderWidth->left + i); - vertices[0].y = vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + borderWidth->top - i - 1); - vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - borderWidth->right - i - 1); - } else { - // skip any unknown border styles - continue; - } - status = deviceContext->DrawPolyline( 2, vertices, NW_FALSE); - _NW_THROW_ON_ERROR(status); - } - } - - /* draw left border */ - if (borderWidth->left > 0) - { - if ( borderColor->left == NW_GDI_Color_Transparent) { - borderStyle->left = NW_CSS_PropValue_none; - } else { - deviceContext->SetForegroundColor( borderColor->left); - } - deviceContext->SetLinePattern( NW_LMgr_Box_ConvertBorderStyle(borderStyle->left)); - - for (i=0; i<borderWidth->left; i++) { - if (borderStyle->left == NW_CSS_PropValue_solid || - borderStyle->left == NW_CSS_PropValue_dashed || - borderStyle->left == NW_CSS_PropValue_dotted) { - vertices[0].x = vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + i); - vertices[0].y = (NW_GDI_Metric_t)(bounds.point.y + i*ratioTopLeft); - vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - i*ratioBottomLeft - 1); - } else if (borderStyle->left == NW_CSS_PropValue_bevelled) { - if (i >= innerHeight/2) { - continue; - } - vertices[0].x = vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + borderWidth->left - i - 1); - vertices[0].y = (NW_GDI_Metric_t)(bounds.point.y + borderWidth->top + i); - vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - borderWidth->bottom - i - 1); - } else { - // skip any unknown border styles - continue; - } - status = deviceContext->DrawPolyline( 2, vertices, NW_FALSE); - _NW_THROW_ON_ERROR(status); - } - } - - /* draw bottom border */ - if (borderWidth->bottom > 0) - { - if ( borderColor->bottom == NW_GDI_Color_Transparent) { - borderStyle->bottom = NW_CSS_PropValue_none; - } else { - deviceContext->SetForegroundColor( borderColor->bottom); - } - deviceContext->SetLinePattern( NW_LMgr_Box_ConvertBorderStyle(borderStyle->bottom)); - - for (i=0; i<borderWidth->bottom; i++) { - if (borderStyle->bottom == NW_CSS_PropValue_solid || - borderStyle->bottom == NW_CSS_PropValue_dashed || - borderStyle->bottom == NW_CSS_PropValue_dotted) { - vertices[0].x = (NW_GDI_Metric_t)(bounds.point.x + i*ratioLeftBottom); - vertices[0].y = vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - i - 1); - vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - i*ratioRightBottom - 1); - } else if (borderStyle->bottom == NW_CSS_PropValue_bevelled) { - if (i >= innerWidth/2) { - continue; - } - vertices[0].x = (NW_GDI_Metric_t)(bounds.point.x + borderWidth->left + i); - vertices[0].y = vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - borderWidth->bottom + i); - vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - borderWidth->right - i - 1); - } else { - // skip any unknown border styles - continue; - } - status = deviceContext->DrawPolyline( 2, vertices, NW_FALSE); - _NW_THROW_ON_ERROR(status); - } - } - - /* draw right border */ - if (borderWidth->right > 0) - { - if ( borderColor->right == NW_GDI_Color_Transparent) { - borderStyle->right = NW_CSS_PropValue_none; - } else { - deviceContext->SetForegroundColor( borderColor->right); - } - deviceContext->SetLinePattern( NW_LMgr_Box_ConvertBorderStyle(borderStyle->right)); - - for (i=0; i<borderWidth->right; i++) { - if (borderStyle->right == NW_CSS_PropValue_solid || - borderStyle->right == NW_CSS_PropValue_dashed || - borderStyle->right == NW_CSS_PropValue_dotted) { - vertices[0].x = vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - 1 - i); - vertices[0].y = (NW_GDI_Metric_t)(bounds.point.y + i*ratioTopRight); - vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - i*ratioBottomRight - 1); - } else if (borderStyle->right == NW_CSS_PropValue_bevelled) { - if (i >= innerHeight/2) { - continue; - } - vertices[0].x = vertices[1].x = (NW_GDI_Metric_t)(bounds.point.x + bounds.dimension.width - borderWidth->right + i); - vertices[0].y = (NW_GDI_Metric_t)(bounds.point.y + borderWidth->top + i); - vertices[1].y = (NW_GDI_Metric_t)(bounds.point.y + bounds.dimension.height - borderWidth->bottom - i - 1); - } else { - // skip any unknown border styles - continue; - } - status = deviceContext->DrawPolyline( 2, vertices, NW_FALSE); - _NW_THROW_ON_ERROR(status); - } - } - -} NW_CATCH (status) { - } NW_FINALLY { - deviceContext->SetForegroundColor( oldFg); - deviceContext->SetLinePattern(oldPat); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetSizeProperties - * Description: This method gets any size properties set on box. If the - * property is not set, (-1) is returned. This is OK because - * negative values are illegal for CSS_width and CSS_height. - * Returns: KBrsrSuccess - */ - -TBrowserStatusCode -NW_LMgr_Box_GetSizeProperties(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size){ - - NW_LMgr_PropertyValue_t sizeVal; - - NW_ASSERT(box != NULL); - NW_ASSERT(size != NULL); - - size->width = -1; - size->height = -1; - - if(NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess){ - size->width = (NW_GDI_Metric_t)sizeVal.integer; - } - - if(NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess){ - size->height = (NW_GDI_Metric_t)sizeVal.integer; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetMinimumSize - * Description: This method first adds margins, borders, and padding to minimum - * content size. While this method is final, it invokes a virtual - * method to get the minimum content size. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ - -TBrowserStatusCode -NW_LMgr_Box_GetMinimumSize (NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t* size) -{ - NW_TRY (status) { - NW_LMgr_FrameInfo_t padding, borderWidth; - - NW_ASSERT(box != NULL); - NW_ASSERT(size != NULL); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - // for bgsound support: in normal screen mode if it's object box, still check visibility - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) || - NW_Object_IsInstanceOf (box, &NW_LMgr_ObjectBox_Class) ) - { - NW_LMgr_PropertyValue_t visibilityVal; - visibilityVal.token = NW_CSS_PropValue_visible; - status = NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (status == KBrsrSuccess && visibilityVal.token == NW_CSS_PropValue_hidden) - { - size->width = 0 ; - size->height = 0; - NW_THROW_SUCCESS(status); - } - } - - /* In case of vertical layout is enabled set the height and width to zero - if the visibility attrib is hidden*/ - /* Start with minimum content box */ - status = NW_LMgr_Box_GetMinimumContentSize (box, size); - _NW_THROW_ON_ERROR (status); - - if ((size->width == 0) && (size->height == 0)) - NW_THROW_SUCCESS(status); - - /* Now add any border, padding */ - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - - size->width = - (NW_GDI_Metric_t) (size->width + padding.left + padding.right + - borderWidth.left + borderWidth.right); - size->height = - (NW_GDI_Metric_t) (size->height + padding.top + padding.bottom + - borderWidth.top + borderWidth.bottom); - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_HasFixedWidth - * Description: Determines whether the box has fixed width. - * Returns: NW_TRUE, NW_FALSE - */ - -NW_Bool -NW_LMgr_Box_HasFixedWidth(NW_LMgr_Box_t* box){ - - NW_LMgr_Property_t prop; - TBrowserStatusCode status; - - NW_ASSERT(box != NULL); - - if(NW_LMgr_Box_HasFixedContentSize(box) == NW_TRUE){ - return NW_TRUE; - } - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_auto; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_width, &prop); - if (status == KBrsrSuccess && prop.type == NW_CSS_ValueType_Px) { - return NW_TRUE; - } - - return NW_FALSE; - -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_HasFixedHeight - * Description: Determines whether the box has fixed height. - * Returns: NW_TRUE, NW_FALSE - */ - -NW_Bool -NW_LMgr_Box_HasFixedHeight(NW_LMgr_Box_t* box){ - - NW_LMgr_Property_t prop; - TBrowserStatusCode status; - - NW_ASSERT(box != NULL); - - if(NW_LMgr_Box_HasFixedContentSize(box) == NW_TRUE){ - return NW_TRUE; - } - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_auto; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_width, &prop); - if (status == KBrsrSuccess && prop.type == NW_CSS_ValueType_Px) { - return NW_TRUE; - } - - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetEm - * Description: Calculates the em size for the box. - * Returns: The em size in pixels. - */ - -/* TODO: change this interface so that out-of-memory status is propagated up - */ - -NW_GDI_Metric_t -NW_LMgr_Box_GetEm (NW_LMgr_Box_t* box) - { - NW_GDI_Metric_t em = 0; - - NW_TRY (status) - { - CGDIFont *font; - TGDIFontInfo fontInfo; - - /* Set the GDI to the box font */ - font = NW_LMgr_Box_GetFont(box); - NW_THROW_ON_NULL(font, status, KBrsrUnexpectedError); - - /* Get the em value */ - status = font->GetFontInfo( &fontInfo); - _NW_THROW_ON_ERROR(status); - em = fontInfo.height; - } - NW_CATCH (status) - { - em = 0; - } - NW_FINALLY - { - return em; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_GetEx - * Description: Calculates the ex size for the box. - * Returns: The ex size in pixels. - */ - -/* TODO: Currently ex is set to be 1/2 of em, becuase we have no way - * of accessing the actual dimensions of the 'x' character. This - * should be fixed. - * TODO: change this interface so that out-of-memory status is propagated up - */ - -NW_GDI_Metric_t -NW_LMgr_Box_GetEx (NW_LMgr_Box_t* box) -{ - return (NW_GDI_Metric_t)(NW_LMgr_Box_GetEm(box)/2); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_FindBoxOfClass - * Description: Tries to find a box of a given class or, if the class is an - * interface specification, implementing that interface. If - * the derived flag is set, then the parent boxes are queried - * for an instance of the given class. - * Returns: The box, if found. Otherwise, NULL. - */ - -NW_LMgr_Box_t* -NW_LMgr_Box_FindBoxOfClass (NW_LMgr_Box_t* box, - const NW_Object_Class_t* theClass, - NW_Bool derived) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - /* traverse up the box tree looking for the first box of either derived from - the specified class or, if the specified class is an interface - specification, implementing that interface */ - while (box != NULL) { - NW_Object_t* object; - - object = NW_Object_QueryInterface (box, theClass); - if (object != NULL && (derived || NW_Object_IsClass (object, theClass))) { - return box; - } - - /* try the parent */ - box = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (box); - } - - /* return the result */ - return box; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_RootBox_t* -_NW_LMgr_Box_GetRootBox (NW_LMgr_Box_t* box) -{ - // ZAL: temp: change rootBox back to NW_LMgr_RootBox_t* - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - // if the rootBox is not set, then get it from the parent and then set it. - if( !box->rootBox ) - { - if( box->parent ) - { - box->rootBox = (void*)NW_LMgr_Box_GetRootBox( box->parent ); - } - // no parent means that we are at the rootbox level - // However if it is not the rootbox, then the box is corrupt as - // we cannot get to the rootbox level. - else if( NW_Object_IsClass( box, &NW_LMgr_RootBox_Class ) ) - { - // rootbox points back to itself - box->rootBox = (void*)NW_LMgr_RootBoxOf( box ); - } - else - { - // NW_ASSERT( NW_FALSE )??? - } - } - return (NW_LMgr_RootBox_t*)box->rootBox; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Detach - * Description: Detaches the box from its parent. - * Returns: KBrsrSuccess. - */ - -TBrowserStatusCode -NW_LMgr_Box_Detach (NW_LMgr_Box_t* box) -{ - NW_LMgr_ContainerBox_t* parentBox; - - /* parameter assertion block */ - NW_ASSERT(box != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - /* get the parent box of the box - if it doesn't have one we simply return - success */ - parentBox = NW_LMgr_Box_GetParent (box); - if (parentBox == NULL) { - return KBrsrSuccess; - } - - /* invoke the ContainerBox's method to remove the child */ - return NW_LMgr_ContainerBox_RemoveChild (parentBox, box); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_DrawBackground - * Description: Redraws the box and its descendants. Its behavior is only - */ - -TBrowserStatusCode -NW_LMgr_Box_DrawBackground (NW_LMgr_Box_t* box, - NW_LMgr_ContainerBox_t* parent, - CGDIDeviceContext* deviceContext) -{ - NW_TRY (status) { - NW_LMgr_Box_t *parentBox = NW_LMgr_BoxOf(parent); - NW_LMgr_Property_t prop; - - /* Get the rootbox */ - if (NW_Object_IsClass(parent, &NW_LMgr_RootBox_Class)) { - return KBrsrSuccess; - } - - status = NW_LMgr_Box_DrawBackground(box, parentBox->parent, deviceContext); - _NW_THROW_ON_ERROR (status); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_transparent; - // special handling for getting background color of StaticTableCellBox - if (NW_Object_IsInstanceOf (parent, &NW_LMgr_StaticTableCellBox_Class)) - { - NW_LMgr_StaticTableCellBox_t *cell = NW_LMgr_StaticTableCellBoxOf(parent); - NW_LMgr_StaticTableCellBox_GetBackground(cell, &prop); - } - else - { - NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_backgroundColor, &prop); - } - - if (prop.type == NW_CSS_ValueType_Color) - { - NW_LMgr_Box_t tempBox; - // set the rootbox so that we can get the cached settings - status = NW_LMgr_Box_Initialize (&tempBox, 1); - tempBox.rootBox = NW_LMgr_Box_GetRootBox( box ); - _NW_THROW_ON_ERROR (status); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - NW_GDI_Rectangle_t parentBoxBounds = NW_LMgr_Box_GetDisplayBounds( parentBox ); - NW_GDI_Rectangle_t tempBoxBounds = NW_LMgr_Box_GetDisplayBounds( &tempBox ); - - if (NW_GDI_Rectangle_Cross (&boxBounds, &parentBoxBounds, &tempBoxBounds)) - { - /* Draw the background */ - NW_LMgr_Box_SetProperty (&tempBox, NW_CSS_Prop_backgroundColor, &prop); - // set display bounds - NW_LMgr_Box_UpdateDisplayBounds(&tempBox, tempBoxBounds); - status = NW_LMgr_Box_Draw (&tempBox, deviceContext, NW_FALSE); - if (status != KBrsrSuccess) { - NW_Object_Terminate (&tempBox); - if (status != KBrsrOutOfMemory) { - status = KBrsrUnexpectedError; - } - return status; - } - } - - NW_Object_Terminate (&tempBox); - } - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_Box_GetInnerRectangle(NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* innerRectangle) -{ - NW_GDI_Rectangle_t bounds; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - - /* Get all margin, border and padding settings */ - bounds = (NW_LMgr_Box_GetDisplayBounds(box)); - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - - innerRectangle->point.x = - (NW_GDI_Metric_t)(bounds.point.x + borderWidth.left + padding.left); - - innerRectangle->point.y = - (NW_GDI_Metric_t)(bounds.point.y + borderWidth.top + padding.top); - - innerRectangle->dimension.height = (NW_GDI_Metric_t)(bounds.dimension.height - - (borderWidth.top + borderWidth.bottom + padding.top + padding.bottom)); - - innerRectangle->dimension.width = (NW_GDI_Metric_t)(bounds.dimension.width - - (borderWidth.left + borderWidth.right + padding.left + padding.right)); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_LMgr_Box_GetVisibleBounds(const NW_LMgr_Box_t* box, - NW_GDI_Rectangle_t* bounds) -{ - NW_GDI_Rectangle_t rect; - NW_LMgr_PropertyValue_t overflow; - - if (bounds != NULL) { - NW_Mem_memset(bounds, 0, sizeof(NW_GDI_Rectangle_t)); - } - - rect = NW_LMgr_Box_GetDisplayBounds((NW_LMgr_Box_t*)box); - - box = (NW_LMgr_Box_t*)box->parent; - while (box != NULL) { - if (NW_Object_IsClass(box, &NW_LMgr_BidiFlowBox_Class) || - NW_Object_IsClass(box, &NW_LMgr_StaticTableBox_Class) || - NW_Object_IsClass(box, &NW_LMgr_StaticTableCellBox_Class)) { - overflow.token = NW_CSS_PropValue_visible; - (void)NW_LMgr_Box_GetPropertyValue((NW_LMgr_Box_t*)box, NW_CSS_Prop_overflow, - NW_CSS_ValueType_Token, &overflow); - if (overflow.token == NW_CSS_PropValue_hidden) { - NW_GDI_Rectangle_t temp; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( NW_LMgr_BoxOf( box ) ); - if (!NW_GDI_Rectangle_Cross(&rect, &boxBounds, &temp)) { - return NW_FALSE; - } - rect = temp; - } - } - - box = (NW_LMgr_Box_t*)box->parent; - } - - if (bounds != NULL) { - *bounds = rect; - } - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_Box_Refresh - * Description: Redraws the box and its descendants. Its behavior is only - * guaranteed to be correct if "overflow: hidden" is set. Any - * already displayed overflows will not be cleared. - * The usage of this method should be limited to the cases - * where an _isolated_ part of the box tree needs to be updated; - * in all other cases, the whole tree should be redrawn. - * Refresh CANNOT be called on the root box. - * Returns: KBrsrSuccess. - */ - -TBrowserStatusCode -NW_LMgr_Box_Refresh (NW_LMgr_Box_t* box) -{ - NW_LMgr_RootBox_t* rootBox; - - NW_ASSERT (!NW_Object_IsClass(box, &NW_LMgr_RootBox_Class)); - - /* Get the rootbox */ - rootBox = NW_LMgr_Box_GetRootBox (box); -// if( !rootBox || !rootBox->renderedBoxes ){ - if( !rootBox ){ - // refresh might be called even if the rendered boxes are null (when the cache is invalidated) - return KBrsrSuccess; - } - - return NW_LMgr_RootBox_Refresh(rootBox, box); -} - -void -NW_LMgr_Box_SetHasFocus(NW_LMgr_Box_t* box, NW_Bool hasFocus) -{ - NW_LMgr_Box_t* thisObj; - - // for convenience - thisObj = NW_LMgr_BoxOf (box); - - thisObj->hasFocus = hasFocus; -} - -NW_Bool -NW_LMgr_Box_HasFocus(NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t* thisObj; - - // for convenience - thisObj = NW_LMgr_BoxOf (box); - - return thisObj->hasFocus; -} - -NW_GDI_Rectangle_t -NW_LMgr_Box_GetFormatBounds( NW_LMgr_Box_t* aBox ) - { - if( aBox ) - { - return aBox->iFormatBounds; - } - else - { - NW_ASSERT( 0 ); - NW_GDI_Rectangle_t invalidRect; - invalidRect.dimension.height = -1; - invalidRect.dimension.width = -1; - invalidRect.point.x = -1; - invalidRect.point.y = -1; - return invalidRect; - } - } - -void NW_LMgr_Box_SetFormatBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aFormatBounds ) - { - if( aBox ) - { - aBox->iFormatBounds = aFormatBounds; - } - } - -NW_GDI_Rectangle_t -NW_LMgr_Box_GetDisplayBounds( NW_LMgr_Box_t* aBox ) - { - if( aBox ) - { - return aBox->iDisplayBounds; - } - else - { - NW_GDI_Rectangle_t invalidRect; - invalidRect.dimension.height = -1; - invalidRect.dimension.width = -1; - invalidRect.point.x = -1; - invalidRect.point.y = -1; - return invalidRect; - } - } - -void NW_LMgr_Box_UpdateDisplayBounds( NW_LMgr_Box_t* aBox, NW_GDI_Rectangle_t aDisplayBounds ) - { - if( aBox ) - { - aBox->iDisplayBounds = aDisplayBounds; - } - } - - /** -* NW_LMgr_Box_UpdateContainerBodyBox -* @description This method updates hight for displayBounds and formatBounds -* of bodybox container to take into account body bottom margin. -* it is called only once after page load complete -* @param NW_LMgr_RootBox_t* aRootBox: pointer to the rootBox -* -* @return void -*/ -void NW_LMgr_Box_UpdateContainerBodyBox( NW_LMgr_RootBox_t* aRootBox ) -{ - NW_GDI_Metric_t bottomMargin = 0; - NW_LMgr_Box_t* bodyBox = NW_LMgr_RootBox_GetBody(aRootBox); - if(bodyBox != NULL) - { - - NW_LMgr_ContainerBox_s *parent = bodyBox->parent; - if(parent != NULL) - { - - bottomMargin = - (NW_GDI_Metric_t)NW_LMgr_Box_GetModelProp(bodyBox, - NW_CSS_Prop_bottomMargin); - if(bottomMargin > 0) - { - NW_GDI_Rectangle_t formatBounds = - NW_LMgr_Box_GetFormatBounds( (NW_LMgr_Box_t* )parent); - formatBounds.dimension.height += bottomMargin; - (void) NW_LMgr_Box_SetFormatBounds( (NW_LMgr_Box_t* )parent, formatBounds ); - NW_GDI_Rectangle_t displayBounds = NW_LMgr_Box_GetDisplayBounds((NW_LMgr_Box_t*) parent); - displayBounds.dimension.height += bottomMargin; - ((NW_LMgr_Box_t* )parent)->iDisplayBounds.dimension.height = - displayBounds.dimension.height; - } - } - } - -} -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_Box_Initialize (NW_LMgr_Box_t* box, - NW_ADT_Vector_Metric_t numProperties) -{ - return NW_Object_Initialize (&NW_LMgr_Box_Class, box, numProperties); -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -NW_LMgr_Box_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_Box_t*) - NW_Object_New (&NW_LMgr_Box_Class, (NW_Uint32)numProperties); -} - - -#ifdef _DEBUG -/*lint -save -esym(960, 87) -e64 Only preprocessor statements and comments before '#include', Type mismatch */ - -#include "LMgrAnonBlock.h" -#include "LMgrAnonTableBox.h" -#include "LMgrMarkerImage.h" -#include "LMgrMarkerText.h" -#include "LMgrObjectBoxOOC.h" -#include "nw_fbox_buttonbox.h" -#include "nw_fbox_checkbox.h" -#include "nw_fbox_fileselectionbox.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_optgrpbox.h" -#include "nw_fbox_optionbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_fbox_hiddenbox.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_selectbox.h" -#include "nw_fbox_textareabox.h" -#include "nw_lmgr_activebox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_areabox.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_emptybox.h" -#include "nw_lmgr_imagebox.h" -#include "nw_lmgr_flowbox.h" -#include "nw_lmgr_formatbox.h" -#include "nw_lmgr_linebox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_mediabox.h" -#include "nw_lmgr_nobrbox.h" -#include "nw_lmgr_rulebox.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_textbox.h" - - - -#define countof(x) (sizeof(x)/sizeof(x[0])) - -typedef struct - { - const NW_Object_Class_t* objClass; - const NW_Int8* className; - } ClassNameItem_t; - -const ClassNameItem_t classNames[] = - { - {&NW_FBox_ButtonBox_Class, (NW_Int8*)"FBox_ButtonBox"}, - {&NW_FBox_CheckBox_Class, (NW_Int8*)"FBox_CheckBox"}, - {&NW_FBox_FileSelectionBox_Class, (NW_Int8*)"FBox_FileSelectionBox"}, - {&NW_FBox_ImageButtonBox_Class, (NW_Int8*)"FBox_ImageButtonBox"}, - {&NW_FBox_InputBox_Class, (NW_Int8*)"FBox_InputBox"}, - {&NW_FBox_OptGrpBox_Class, (NW_Int8*)"FBox_OptGrpBox"}, - {&NW_FBox_OptionBox_Class, (NW_Int8*)"FBox_OptionBox"}, - {&NW_FBox_PasswordBox_Class, (NW_Int8*)"FBox_PasswordBox"}, - {&NW_FBox_HiddenBox_Class, (NW_Int8*)"FBox_HiddenBox"}, - {&NW_FBox_RadioBox_Class, (NW_Int8*)"FBox_RadioBox"}, - {&NW_FBox_SelectBox_Class, (NW_Int8*)"FBox_SelectBox"}, - {&NW_FBox_TextAreaBox_Class, (NW_Int8*)"FBox_TextAreaBox"}, - {&NW_LMgr_AbstractTextBox_Class, (NW_Int8*)"AbstractTextBox"}, - {&NW_LMgr_ActiveBox_Class, (NW_Int8*)"ActiveBox"}, - {&NW_LMgr_ActiveContainerBox_Class, (NW_Int8*)"ActiveContainerBox"}, - {&NW_LMgr_AnimatedImageBox_Class, (NW_Int8*)"AnimatedImageBox"}, - {&LMgrAnonBlock_Class, (NW_Int8*)"AnonBlockBox"}, - {&LMgrAnonTableBox_Class, (NW_Int8*)"AnonTableBox"}, - {&NW_LMgr_AreaBox_Class, (NW_Int8*)"AreaBox"}, - {&NW_LMgr_BidiFlowBox_Class, (NW_Int8*)"BidiFlowBox"}, - {&NW_LMgr_BreakBox_Class, (NW_Int8*)"BreakBox"}, - {&NW_LMgr_ContainerBox_Class, (NW_Int8*)"ContainerBox"}, - {&NW_LMgr_EmptyBox_Class, (NW_Int8*)"EmptyBox"}, - {&NW_LMgr_FlowBox_Class, (NW_Int8*)"FlowBox"}, - {&NW_LMgr_FormatBox_Class, (NW_Int8*)"FormatBox"}, - {&NW_LMgr_ImageBox_Class, (NW_Int8*)"ImageBox"}, - {&NW_LMgr_ImgContainerBox_Class, (NW_Int8*)"ImgContainerBox"}, - {&NW_LMgr_ImageMapBox_Class, (NW_Int8*)"ImageMapBox"}, - {&NW_LMgr_LineBox_Class, (NW_Int8*)"LineBox"}, - {&LMgrMarkerImage_Class, (NW_Int8*)"MarkerImageBox"}, - {&LMgrMarkerText_Class, (NW_Int8*)"MarkerTextBox"}, - {&NW_LMgr_MarqueeBox_Class, (NW_Int8*)"MarqueeBox"}, - {&NW_LMgr_MediaBox_Class, (NW_Int8*)"MediaBox"}, - {&NW_LMgr_NobrBox_Class, (NW_Int8*)"NobrBox"}, - {&NW_LMgr_ObjectBox_Class, (NW_Int8*)"ObjectBox"}, - {&NW_LMgr_PosFlowBox_Class, (NW_Int8*)"PositionedBox"}, - {&NW_LMgr_RootBox_Class, (NW_Int8*)"RootBox"}, - {&NW_LMgr_RuleBox_Class, (NW_Int8*)"RuleBox"}, - {&NW_LMgr_SplitTextBox_Class, (NW_Int8*)"SplitTextBox"}, - {&NW_LMgr_StaticTableBox_Class, (NW_Int8*)"StaticTableBox"}, - {&NW_LMgr_StaticTableCellBox_Class, (NW_Int8*)"StaticTableCellBox"}, - {&NW_LMgr_StaticTableRowBox_Class, (NW_Int8*)"StaticTableRowBox"}, - {&NW_LMgr_TextBox_Class, (NW_Int8*)"TextBox"}, - {&NW_LMgr_VerticalTableBox_Class, (NW_Int8*)"VerticalTableBox"}, - {&NW_LMgr_VerticalTableCellBox_Class, (NW_Int8*)"VerticalTableCellBox"}, - {&NW_LMgr_VerticalTableRowBox_Class, (NW_Int8*)"VerticalRowBox"}, - }; -#define CLASS_NAMES_COUNT countof(classNames) - -const NW_Int8* -NW_LMgr_Box_GetBoxType (NW_LMgr_Box_t *box) { - - for (int i = 0; i < CLASS_NAMES_COUNT; i++) { - if (classNames[i].objClass == box->super.super.super.objClass) { - return classNames[i].className; - } - } - - return (NW_Int8*)"Unknown box: update NW_LMgr_Box_GetBoxType and/or the classNames table in LMgrBox.cpp."; -} - -/* ------------------------------------------------------------------------- */ -/* HACK! HACK! HACK! - * This is here ONLY for debugging purposes. The proper way to do this - * (making GetBoxInfo virtual on box) would clutter the Box interface - * too much. - */ - - -static -NW_Uint16 -GetBoxLevel (NW_LMgr_Box_t *box, NW_LMgr_Box_t *rootBox) { - NW_Uint16 level; - - level = 0; - while (box != rootBox) { - level ++; - box = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent (box); - NW_ASSERT (box != NULL); - } - - return level; -} - -static -void -PrintBoxInfo (NW_LMgr_Box_t *box, NW_Uint16 level) { - - const NW_Int8 *typeStr; - NW_Ucs2 *textBoxStr = NULL; - NW_Ucs2 indentBuf[256]; - NW_Ucs2 typeBuf[64]; - NW_Ucs2 tableInfo[64]; - NW_Ucs2 tableInfoFormat[] = { 'S', '%', 'd', ':', 'B', '%', 'd', ':', - 'H', '%', 'd', ':', 'V', '%', 'd', '\0' }; - NW_Uint16 i; - NW_LMgr_StaticTableBox_t *tableBox = NULL; - NW_Uint16 numBorderInfos = 0; - NW_Uint16 numSpans = 0; - NW_Uint16 numHEdges = 0; - NW_Uint16 numVEdges = 0; - NW_GDI_Rectangle_t bounds; - NW_GDI_Rectangle_t dispBounds; - NW_Text_t *displayText = NULL; - - typeStr = NW_LMgr_Box_GetBoxType(box); - - if (NW_Object_IsInstanceOf (box, &NW_LMgr_AbstractTextBox_Class)) { - displayText = NW_LMgr_AbstractTextBox_GetDisplayText(NW_LMgr_AbstractTextBoxOf(box), NW_TRUE); - if( displayText ) - textBoxStr = NW_Text_GetUCS2Buffer (displayText, - NW_Text_Flags_Copy, NULL, NULL); - if (textBoxStr) { - NW_Str_Strcharreplace (textBoxStr, '\n', '>'); - - // Trunc the text to 900 (NW_Debug_Log doesn't allow a print statement larger than 1024). - if (displayText->characterCount > 900) { - textBoxStr[900] = '\0'; - } - } - } - - //NW_Str_StrcpyConst(typeBuf, (char*)typeStr); - /* Get the box bounds */ - bounds = NW_LMgr_Box_GetFormatBounds(box); - dispBounds = NW_LMgr_Box_GetDisplayBounds (box); - - /* Indent the line */ - for (i=0; i<level*2 && i < 254; i++) { - indentBuf[i] = ' '; - } - indentBuf[i] = '\0'; - - /* Print the info */ - if (textBoxStr) - { - NW_LOG12(NW_LOG_LEVEL3, "%s%s %X [bounds:(%d,%d)-(%d,%d), dispBounds:(%d,%d)-(%d,%d)\"%s\"]", - indentBuf, - typeBuf, - box, - (NW_Uint16)bounds.point.x, - (NW_Uint16)bounds.point.y, - (NW_Uint16)bounds.dimension.width, - (NW_Uint16)bounds.dimension.height, - (NW_Uint16)dispBounds.point.x, - (NW_Uint16)dispBounds.point.y, - (NW_Uint16)dispBounds.dimension.width, - (NW_Uint16)dispBounds.dimension.height, - textBoxStr); - - NW_Str_Delete (textBoxStr); - NW_Object_Delete(displayText); - } - else if (tableBox) - { - NW_Str_Sprintf(tableInfo, tableInfoFormat, - (NW_Uint32)numSpans, - (NW_Uint32)numBorderInfos, - (NW_Uint32)numHEdges, - (NW_Uint32)numVEdges); - - NW_LOG12(NW_LOG_LEVEL3, "%s%s %X [bounds:(%d,%d)-(%d,%d), dispBounds:(%d,%d)-(%d,%d) %s]", - indentBuf, - typeBuf, - box, - (NW_Uint16)bounds.point.x, - (NW_Uint16)bounds.point.y, - (NW_Uint16)bounds.dimension.width, - (NW_Uint16)bounds.dimension.height, - (NW_Uint16)dispBounds.point.x, - (NW_Uint16)dispBounds.point.y, - (NW_Uint16)dispBounds.dimension.width, - (NW_Uint16)dispBounds.dimension.height, - tableInfo); - } - else - { - NW_LOG11(NW_LOG_LEVEL3, "%s%s %X [bounds:(%d,%d)-(%d,%d), dispBounds:(%d,%d)-(%d,%d)]", - indentBuf, - typeBuf, - box, - (NW_Uint16)bounds.point.x, - (NW_Uint16)bounds.point.y, - (NW_Uint16)bounds.dimension.width, - (NW_Uint16)bounds.dimension.height, - (NW_Uint16)dispBounds.point.x, - (NW_Uint16)dispBounds.point.y, - (NW_Uint16)dispBounds.dimension.width, - (NW_Uint16)dispBounds.dimension.height); - if( NW_Object_IsInstanceOf (box, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - NW_LMgr_StaticTableContext_t *ctx = NW_LMgr_StaticTableBoxOf( box )->ctx; - if( ctx != NULL ) - { - NW_LOG4(NW_LOG_LEVEL3, "%s%s \" [Table - Min,Max:(%d,%d)]", - indentBuf, - typeBuf, - (NW_Uint16)ctx->tableMinWidth, - (NW_Uint16)ctx->tableMaxWidth ); - } - } - else if( NW_Object_IsInstanceOf (box, &NW_LMgr_StaticTableCellBox_Class ) == NW_TRUE ) - { - NW_LOG4(NW_LOG_LEVEL3, "%s%s \" [Cell - Min,Max:(%d,%d)]", - indentBuf, - typeBuf, - NW_LMgr_StaticTableCellBoxOf( box )->minWidth, - NW_LMgr_StaticTableCellBoxOf( box )->maxWidth); - } - } - } - - -TBrowserStatusCode -NW_LMgr_Box_DumpBoxTree(NW_LMgr_Box_t* box) -{ - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t *current; - NW_Uint16 level; - - /* Initialize the BoxVisitor */ - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, box); - - /* Dump the subtree */ - NW_LOG0(NW_LOG_LEVEL3, "Printing the box tree..."); - NW_LOG0(NW_LOG_LEVEL3, "N.B.: The displayed class names could be names of superclasses!"); - while((current = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) { - - level = GetBoxLevel (current, box); - - /* Get the boxInfo for the current box */ - PrintBoxInfo (current, level); - } - - return KBrsrSuccess; -} - -/*lint -restore*/ -#endif /* _DEBUG */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrBoxVisitor.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrBoxVisitor.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_boxvisitori.h" - -#include "nw_lmgr_containerbox.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_BoxVisitor_Class_t NW_LMgr_BoxVisitor_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_BoxVisitor_t), - /* construct */ _NW_LMgr_BoxVisitor_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_BoxVisitor */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_BoxVisitor_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_BoxVisitor_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_BoxVisitorOf (dynamicObject); - - /* initialize the member variables */ - thisObj->rootBox = va_arg (*argp, NW_LMgr_Box_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_BoxVisitor_SetRootBox (NW_LMgr_BoxVisitor_t* visitor, - NW_LMgr_Box_t* rootBox) -{ - /* set the rootBox member variable - don't forget to clear the currentBox, - after all this may be a completely new document! */ - visitor->rootBox = rootBox; - visitor->currentBox = NULL; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -NW_LMgr_BoxVisitor_NextBox (NW_LMgr_BoxVisitor_t* visitor, - NW_Bool* skipChildren) -{ - NW_ADT_Vector_Metric_t index; - - /* if this is the first time we're called, we simply return the specified - root */ - if (visitor->currentBox == NULL) { - return visitor->currentBox = visitor->rootBox; - } - - /**/ - index = 0; - while (visitor->currentBox != NULL) { - NW_LMgr_ContainerBox_t* containerBox; - NW_ADT_Vector_t* children; - NW_ADT_Vector_Metric_t numChildren; - - if ((skipChildren == NULL || !*skipChildren) && - NW_Object_IsInstanceOf (visitor->currentBox, - &NW_LMgr_ContainerBox_Class)) { - /* if we haven't finished traversing the children (or even started) we need - to do that first */ - containerBox = NW_LMgr_ContainerBoxOf (visitor->currentBox); - children = NW_ADT_VectorOf (NW_LMgr_ContainerBox_GetChildren (containerBox)); - numChildren = NW_ADT_Vector_GetSize (children); - if (index < numChildren) { - visitor->currentBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - return visitor->currentBox; - } - } - - /* reset the skipChildren flag */ - if (skipChildren) { - *skipChildren = NW_FALSE; - } - - /* if this was the last child of the root node in which case we have no - more work to do */ - if (visitor->currentBox == visitor->rootBox) { - visitor->currentBox = NULL; - continue; - } - - /* there are no more children to traverse so look for a sibling and if - found make that our current box and return it */ - containerBox = NW_LMgr_Box_GetParent (visitor->currentBox); - children = NW_ADT_VectorOf(NW_LMgr_ContainerBox_GetChildren (containerBox)); - index = (NW_ADT_Vector_Metric_t) - (NW_ADT_Vector_GetElementIndex (children, &visitor->currentBox) + 1); - visitor->currentBox = NW_LMgr_BoxOf (containerBox); - } - - return NULL; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_BoxVisitor_Initialize (NW_LMgr_BoxVisitor_t* boxVisitor, - NW_LMgr_Box_t* rootBox) -{ - return NW_Object_Initialize (&NW_LMgr_BoxVisitor_Class, boxVisitor, rootBox); -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_BoxVisitor_t* -NW_LMgr_BoxVisitor_New (NW_LMgr_Box_t* rootBox) -{ - return (NW_LMgr_BoxVisitor_t*) - NW_Object_New (&NW_LMgr_BoxVisitor_Class, rootBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrBreakBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrBreakBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_breakboxi.h" - -#include "nw_adt_resizablevector.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_text_ucs2.h" -#include "nwx_settings.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_containerbox.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private final methods - * ------------------------------------------------------------------------- */ - -/* This method checks if the previous 2 sibling of this break box are also break - boxes - If yes we do not want to display this break box - */ -static -NW_Bool -NW_LMgr_BreakBox_HandleVerticalLayout(NW_LMgr_Box_t *box) -{ - NW_Bool displayBreak = NW_TRUE; - NW_LMgr_Property_t prop; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_ContainerBox_t* parent = box->parent; - - if (NW_Object_IsClass(parent, &NW_LMgr_VerticalTableCellBox_Class)) - { - NW_ADT_Vector_Metric_t childIndex = 0; - - childIndex = NW_LMgr_ContainerBox_GetChildIndex(parent, box); - /* If index is zero then we don't want to display the break */ - if (childIndex == 0) - { - displayBreak = NW_FALSE; - } - else - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild(parent, (NW_ADT_Vector_Metric_t)(childIndex -1)); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( child ); - - if (!NW_Object_IsInstanceOf (child, &NW_LMgr_ActiveContainerBox_Class) && - boxBounds.dimension.width == 0 ) - { - child = NW_LMgr_ContainerBox_GetChild(parent, (NW_ADT_Vector_Metric_t)(childIndex -2)); - if ( child) - { - if(boxBounds.dimension.width == 0) - { - displayBreak = NW_FALSE; - } - } - else - { - displayBreak = NW_FALSE; - } - } - } - } - else - { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_flags, &prop); - if ((status == KBrsrSuccess) && (prop.value.token == NW_CSS_PropValue_flags_thirdBr)) - { - /* do not display this break box since previous 2 siblings were break boxes */ - displayBreak = NW_FALSE; - } - } - - if (!displayBreak) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.dimension.height = 0; - boxBounds.dimension.width = 0; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - - return displayBreak; -} - - -/* ------------------------------------------------------------------------- - The static instance of the Format_Box class object - ------------------------------------------------------------------------- */ -const -NW_LMgr_BreakBox_Class_t NW_LMgr_BreakBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_BreakBox_t), - /* construct */ _NW_LMgr_Box_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_BreakBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_BreakBox_Constrain, - /* draw */ _NW_LMgr_BreakBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_BreakBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_BreakBox */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_BreakBox_Resize(NW_LMgr_Box_t *box, NW_LMgr_FormatContext_t* context) - { - NW_Bool displayBreak = NW_TRUE; - NW_REQUIRED_PARAM(context); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( box ); - - /* handle vertical layout for <br/> element */ - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - /* we want to determine if we need to display this break */ - displayBreak = NW_LMgr_BreakBox_HandleVerticalLayout(box); - } - - if (displayBreak) - { - CGDIFont *font; - /* Set the height to font height */ - font = NW_LMgr_Box_GetFont (box); - if (font != NULL) - { - TGDIFontInfo fontInfo; - - TBrowserStatusCode status = font->GetFontInfo ( &fontInfo); - NW_ASSERT (status == KBrsrSuccess); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.dimension.height = fontInfo.height; - boxBounds.dimension.width = 1; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - else - { - NW_ASSERT(0); - } - } - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_BreakBox_Constrain(NW_LMgr_Box_t *box, - NW_GDI_Metric_t constraint) { - - NW_REQUIRED_PARAM(constraint); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - boxBounds.dimension.width = 0; - - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ -NW_GDI_Metric_t -_NW_LMgr_BreakBox_GetBaseline(NW_LMgr_Box_t* box){ - - CGDIFont *font; - - /* Set the height to font height */ - font = NW_LMgr_Box_GetFont (box); - if (font != NULL) - { - TGDIFontInfo fontInfo; - - TBrowserStatusCode status = font->GetFontInfo ( &fontInfo); - NW_ASSERT (status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - - return fontInfo.baseline; - } - else - { - NW_ASSERT(0); - } - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_BreakBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) { - - NW_REQUIRED_PARAM (box); - NW_REQUIRED_PARAM (deviceContext); - NW_REQUIRED_PARAM (hasFocus); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_BreakBox_t* -NW_LMgr_BreakBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_BreakBox_t*) - NW_Object_New (&NW_LMgr_BreakBox_Class, numProperties); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrContainerBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrContainerBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1239 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_containerboxi.h" -#include "nw_lmgr_box.h" -#include "nw_lmgr_flowbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_adt_resizablevector.h" -#include "nw_lmgr_eventhandler.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_adt_vectoriterator.h" -#include "BrsrStatusCodes.h" -#include "BoxRender.h" -#include "nwx_logger.h" -#include "nwx_settings.h" -#include "ObjectUtils.h" -#include "nw_lmgr_posflowbox.h" - -/* ------------------------------------------------------------------------- * - private final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const -NW_LMgr_ContainerBox_Class_t NW_LMgr_ContainerBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ContainerBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ _NW_LMgr_ContainerBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_ContainerBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_ContainerBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_ContainerBox_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Construct - * Description: The constructor. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -_NW_LMgr_ContainerBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_ContainerBox_t* container; - - NW_TRY(status) { - - /* for convenience */ - container = NW_LMgr_ContainerBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - _NW_THROW_ON_ERROR(status); - - /* initialize the member variables */ - container->children = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_LMgr_Box_t*), 0, 5 ); - NW_THROW_OOM_ON_NULL(container->children, status); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Destruct - * Description: The destructor. - * Returns: void - */ - -void -_NW_LMgr_ContainerBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_ContainerBox_t* container; - NW_ADT_Vector_Metric_t numChildren; - NW_Int32 index; - - /* for convenience */ - container = NW_LMgr_ContainerBoxOf (dynamicObject); - - if (container->children != NULL) { - /* before deleting the object, we must delete any children - contained by us */ - numChildren = - NW_ADT_Vector_GetSize (container->children); - for (index = numChildren - 1; index >= 0; index--) { - NW_LMgr_Box_t* child; - - child = *(NW_LMgr_Box_t**) - NW_ADT_Vector_ElementAt (container->children, - (NW_ADT_Vector_Metric_t) index); - NW_Object_Delete (child); - } - - /* release our resources */ - NW_Object_Delete (container->children); - } -} - - -TBrowserStatusCode -_NW_LMgr_ContainerBox_Resize( NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context ) -{ - TBrowserStatusCode status; - NW_LMgr_ContainerBox_t* container; - - NW_REQUIRED_PARAM( context ); - NW_ASSERT( box != NULL ); - - container = NW_LMgr_ContainerBoxOf( box ); - status = NW_LMgr_ContainerBox_ResizeToChildren( container ); - if (NW_Object_IsInstanceOf(NW_LMgr_BoxOf(NW_LMgr_Box_GetParent(box)),& NW_LMgr_PosFlowBox_Class)) - { - NW_GDI_Dimension2D_t size; - NW_LMgr_Box_GetSizeProperties(box, &size); - if (size.width > box->iFormatBounds.dimension.width) - { - box->iFormatBounds.dimension.width = size.width; - } - - if (size.height > box->iFormatBounds.dimension.height) - { - box->iFormatBounds.dimension.height = size.height; - } - } - return status; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Shift - * Description: ContainerBox::Shift shifts the container and the subtree - * below it. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -_NW_LMgr_ContainerBox_Shift (NW_LMgr_Box_t* box, - NW_GDI_Point2D_t *delta) -{ - NW_LMgr_BoxVisitor_t * visitor = NULL; - NW_LMgr_Box_t *child; - - NW_TRY(status) { - - NW_ASSERT(box != NULL); - - visitor = NW_LMgr_ContainerBox_GetBoxVisitor(box); - NW_THROW_OOM_ON_NULL(visitor, status); - - /* Invoke base-class shift on this box and all children */ - - while ((child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL)) != NULL) { - status = NW_LMgr_Box_Class.NW_LMgr_Box.shift(child, delta); - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) { - } - NW_FINALLY { - NW_Object_Delete(visitor); - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Clone - * Description: Clones of containers only inherit the property list. They - * also have their "Clone" flag set. The children are not - * copied into the new box. - * Returns: The new box, or NULL in case of an error. - */ -NW_LMgr_Box_t* -_NW_LMgr_ContainerBox_Clone (NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t *newBox = NULL; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)); - - /* Create the new box */ - newBox = (NW_LMgr_Box_t*) NW_LMgr_ContainerBox_New (0); - if (newBox == NULL) { - return NULL; - } - - /* Copy the property list, if one exists */ - if (box->propList != NULL) { - newBox->propList = NW_LMgr_PropertyList_Clone (box->propList); - } - else{ - /* instantiate a new SimplePropertyList object */ - newBox->propList = (NW_LMgr_PropertyList_t*) - NW_LMgr_SlavePropertyList_New (NULL); - } - if (newBox->propList == NULL) { - NW_Object_Delete (newBox); - return NULL; - } - - return newBox; -} - -/* ------------------------------------------------------------------------- * - public/protected final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_ContainerBox_Collapse (NW_LMgr_ContainerBox_t* thisObj) -{ - NW_LMgr_PropertyList_t* propertyList; - NW_LMgr_Property_t prop; - NW_LMgr_ContainerBox_t* siblingBox; - NW_LMgr_Box_t* childBox; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_ContainerBox_Class)); - - propertyList = NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(thisObj)); - if (propertyList == NULL){ - return KBrsrSuccess; - } - - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, &NW_LMgr_PropertyList_Class)); - - /* the master box will take care of coolapsing the slave boxes */ - if (NW_Object_IsInstanceOf(propertyList, &NW_LMgr_SlavePropertyList_Class)){ - return KBrsrSuccess; - } - - /* if the propertylist is not slave propertylist, it definitely is a simple - property list, and this box is a master box - so start collapse - */ - - /* implement collapse */ - - /* Get sibling box */ - prop.value.object = NULL; - (void)NW_LMgr_PropertyList_Get(propertyList, NW_CSS_Prop_sibling, &prop); - if (prop.value.object == NULL){ - return KBrsrSuccess; - } - - while(prop.value.object) - { - NW_ADT_Vector_Metric_t childCount; - - siblingBox = NW_LMgr_ContainerBoxOf(prop.value.object); - - /* This condition should never happen unless sibling boxes are not created - properly. Should it be an ASSERT instead?? */ - if (!NW_Object_IsInstanceOf(NW_LMgr_BoxOf(siblingBox)->propList, - &NW_LMgr_SlavePropertyList_Class)) - { - return KBrsrFailure; - } - - /* Insert your sibling's children in master container box */ - /* PROBLEM: Make Container_GetChild recognize NW_ADT_Vector_AtEnd */ - childCount = NW_LMgr_ContainerBox_GetChildCount(siblingBox); - while (childCount > 0) - { - childCount--; - childBox = NW_LMgr_ContainerBox_GetChild(siblingBox, childCount); - NW_ASSERT(childBox); - - /* Insert ChildAt will remove the child from the old parent - which is the sibling box - */ - /* The following method should be more efficient - we get the child - from the old box, and then again search for it to remove it. - RemoveChild should return a box, so that we can use that box to - attach it somewhere else */ - status = NW_LMgr_ContainerBox_InsertChildAt(thisObj, childBox, 0); - if (status != KBrsrSuccess) { - return status; - } - - } - - /* Get next sibling box */ - propertyList = NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(siblingBox)); - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, &NW_LMgr_PropertyList_Class)); - - prop.value.object = NULL; - (void)NW_LMgr_PropertyList_Get(propertyList, NW_CSS_Prop_sibling, &prop); - - /* delete the sibling box */ - NW_Object_Delete(siblingBox); - - /* If we come back in a loop to the master box, then stop */ - if (prop.value.object == thisObj) - break; - } - /* We also want to remove the sibling property on the master box, - since we are collapsing the split containers */ - (void)NW_LMgr_Box_RemoveProperty(NW_LMgr_BoxOf(thisObj), NW_CSS_Prop_sibling); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_InsertChildAt - * Description: Inserts a child at the given index. If a child is already - * attached to a parent, it detaches it first. - * Returns: KBrsrSuccess if successful, KBrsrFailure if the index - * is out of bounds, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChildAt (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_ADT_Vector_Metric_t where) -{ - NW_LMgr_ContainerBox_t* parent; - - NW_TRY(status) { - - NW_ASSERT(child != NULL); - - /* Remove the child from its existing parent, if necessary */ - parent = NW_LMgr_Box_GetParent (child); - if (parent != NULL) { - status = NW_LMgr_ContainerBox_RemoveChild (parent, child); - _NW_THROW_ON_ERROR(status); - } - - /* Insert the child into our 'children' vector */ - NW_THROW_OOM_ON_NULL(NW_ADT_DynamicVector_InsertAt(container->children, - &child, where), - status); - - /* Set the parent field of the Box - note that we do this as - a 'friend' class */ - NW_LMgr_Box_SetParent (child, container); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_AddChild - * Description: Adds a child to the end of the container. - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child) -{ - return NW_LMgr_ContainerBox_InsertChildAt (container, child, - NW_ADT_Vector_AtEnd); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_InsertChild - * Description: Inserts a child immediately before the box pointed to by - * "where". - * If "where" is not a child of the container, KBrsrFailure - * is returned. - * Returns: KBrsrSuccess, KBrsrFailure, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_LMgr_Box_t* where) -{ - NW_ADT_Vector_Metric_t index; - - index = NW_ADT_Vector_GetElementIndex (container->children, - &where); - if (index == NW_ADT_Vector_AtEnd) { - return KBrsrFailure; - } - return NW_LMgr_ContainerBox_InsertChildAt (container, child, index); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_InsertChildAft - * Description: Inserts a child immediately following the box pointed to by - * "where". If "where" is not a child of the container, - * KBrsrFailure is returned. - * Returns: KBrsrSuccess, KBrsrFailure, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_InsertChildAft (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child, - NW_LMgr_Box_t* where) -{ - NW_ADT_Vector_Metric_t index; - - index = NW_ADT_Vector_GetElementIndex (container->children, - &where); - if (index == NW_ADT_Vector_AtEnd) { - return KBrsrFailure; /* TODO: return a more descriptive error code */ - } - if ((index + 1) - < NW_ADT_Vector_GetSize(container->children)) { - return NW_LMgr_ContainerBox_InsertChildAt (container, child, - ((NW_ADT_Vector_Metric_t) - (index+1))); - } else { - return NW_LMgr_ContainerBox_AddChild (container, child); - } -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_AppendChildrenOf - * Description: Appends the children of "source" to the container pointed - * to by "container". - * Returns: KBrsrSuccess, KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_AppendChildrenOf (NW_LMgr_ContainerBox_t* container, - NW_LMgr_ContainerBox_t* source) -{ - NW_TRY(status) { - while (NW_ADT_Vector_GetSize (source->children) != 0) { - NW_LMgr_Box_t* child; - - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (source->children, 0); - NW_ASSERT(child != NULL); - - status = NW_LMgr_ContainerBox_AddChild (container, child); - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_ReplaceChild - * Description: Replaces "originalChild" with "newChild". - * Returns: KBrsrSuccess, KBrsrFailure if the original child - * is not inside "container", KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_ReplaceChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* originalChild, - NW_LMgr_Box_t* newChild) -{ - NW_ADT_Vector_Metric_t index; - - NW_TRY(status) { - index = NW_ADT_Vector_GetElementIndex(container->children, - &originalChild); - if (index == NW_ADT_Vector_AtEnd) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - status = NW_LMgr_ContainerBox_InsertChildAt (container, newChild, index); - _NW_THROW_ON_ERROR(status); - - status = NW_LMgr_ContainerBox_RemoveChild (container, originalChild); - _NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_GetChildIndex - * Description: Finds the index of "child" in the container. - * Returns: The index, or NW_ADT_Vector_AtEnd, if the child in not inside - * container. - */ - -NW_ADT_Vector_Metric_t -NW_LMgr_ContainerBox_GetChildIndex (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* child) -{ - - return NW_ADT_Vector_GetElementIndex (container->children, - &child); - -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_RemoveChild - * Description: Removes the child pointed to by "component" from the container. - * Returns: KBrsrSuccess, KBrsrFailure if the original child - * is not inside "container", KBrsrOutOfMemory. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_RemoveChild (NW_LMgr_ContainerBox_t* container, - NW_LMgr_Box_t* component) -{ - NW_TRY(status) { - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf (container, &NW_LMgr_ContainerBox_Class)); - NW_ASSERT(NW_Object_IsInstanceOf (component, &NW_LMgr_Box_Class)); - - /* search the 'children' vector for the element */ - status = NW_ADT_DynamicVector_RemoveElement (container->children, - &component); - _NW_THROW_ON_ERROR(status); - - /* clear the parent field of the component - note that we do this as a - 'friend' of the class */ - NW_LMgr_Box_SetParent (component, NULL); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_ContainerBox_RemoveChildren (NW_LMgr_ContainerBox_t* thisObj) -{ - NW_ADT_VectorIterator_t iterator; - - NW_Object_Invalidate (&iterator); - NW_TRY (status) { - (void) NW_ADT_VectorIterator_Initialize (&iterator, thisObj->children, - NW_ADT_Vector_AtFront, - NW_ADT_Vector_AtEnd, - NW_ADT_IteratorDirection_Increment); - - while (NW_ADT_Iterator_HasMoreElements (&iterator)) { - NW_LMgr_Box_t* child; - - status = NW_ADT_Iterator_GetNextElement (&iterator, &child); - NW_THROW_ON_ERROR (status); - - status = NW_LMgr_ContainerBox_RemoveChild (thisObj, child); - NW_THROW_ON_ERROR (status); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - NW_Object_Terminate (&iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_ContainerBox_DeleteChildren (NW_LMgr_ContainerBox_t* thisObj) -{ - NW_LMgr_Box_t** child; - - NW_TRY (status) { - while ((child = (NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (thisObj->children, 0)) != NULL) { - status = NW_LMgr_ContainerBox_RemoveChild (thisObj, *child); - NW_THROW_ON_ERROR (status); - - NW_Object_Delete(*child); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_GetChildCount - * Description: Counts the number of children of the container. - * Returns: The number of children, 0 if the container is empty. - */ - -NW_ADT_Vector_Metric_t -NW_LMgr_ContainerBox_GetChildCount (NW_LMgr_ContainerBox_t* container) -{ - return NW_ADT_Vector_GetSize (container->children); -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_GetChild - * Description: Gets the child at "index". - * Returns: The child box, or NULL if the index is out of bounds. - */ - -NW_LMgr_Box_t* -NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBox_t* container, - NW_ADT_Vector_Metric_t index) -{ - NW_LMgr_Box_t** entry; - - entry = - (NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (container->children, index); - if (entry != NULL) { - return *entry; - } - return NULL; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_SplitAtIndex - * Description: SplitAtIndex returns a clone of the container containing the - * first "index" children. The remaining children stay in the - * original container. If "index" is 0, the split container - * will be empty. If "index" points to the last child, the - * original container will remain empty. - * Returns: The split container, or NULL if an error occured. - */ - -NW_LMgr_Box_t* -NW_LMgr_ContainerBox_SplitAtIndex (NW_LMgr_ContainerBox_t* container, - NW_ADT_Vector_Metric_t index){ - NW_ADT_Vector_Metric_t childCount, childIndex; - NW_LMgr_ContainerBox_t *splitContainer = NULL; - NW_LMgr_Box_t *childBox; - NW_LMgr_Property_t prop; - NW_LMgr_PropertyValue_t dirValue; - - childCount = NW_LMgr_ContainerBox_GetChildCount (container); - - /* Verify input parameters */ - if (childCount <= 1 || index >= childCount) { - NW_ASSERT(0); - return NULL; - } - - NW_TRY(status) { - /* Get the text direction */ - dirValue.token = NW_CSS_PropValue_ltr; - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(container), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* Create the new container */ - splitContainer = - (NW_LMgr_ContainerBox_t*)NW_LMgr_Box_Clone ((NW_LMgr_Box_t*)container); - NW_THROW_OOM_ON_NULL(splitContainer, status); - - /* Move children to the new container */ - for (childIndex = 0; childIndex < index; childIndex++) { - childBox = NW_LMgr_ContainerBox_GetChild(container, 0); - - /* AddChild will remove the child from the old parent */ - status = NW_LMgr_ContainerBox_AddChild(splitContainer, childBox); - _NW_THROW_ON_ERROR(status); - } - - /* Get and set sibling property on the cloned box's property list */ - prop.value.object = NULL; - (void)NW_LMgr_Box_GetPropertyFromList(NW_LMgr_BoxOf(container), - NW_CSS_Prop_sibling, &prop); - if (prop.value.object == NULL){ - /* Set sibling property on the cloned box's property list */ - prop.type = NW_ADT_ValueType_Object | NW_CSS_ValueType_Copy; - prop.value.object = container; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(splitContainer), - NW_CSS_Prop_sibling, &prop); - NW_ASSERT (status == KBrsrSuccess); - } - - /* Set sibling property on the master box's property list */ - prop.type = NW_ADT_ValueType_Object | NW_CSS_ValueType_Copy; - prop.value.object = splitContainer; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(container), - NW_CSS_Prop_sibling, &prop); - NW_ASSERT (status == KBrsrSuccess); - -#if 0 -#pragma message (__FILE__ ": ::MEMO::BE AWARE that this code should be commented out. It does exist in CORE.") -// If this code is added LTR support should be added too - status = NW_LMgr_Box_SetProperty((NW_LMgr_Box_t*)splitContainer, - NW_CSS_Prop_rightPadding, - &prop); - _NW_THROW_ON_ERROR(status); - status = NW_LMgr_Box_SetProperty((NW_LMgr_Box_t*)splitContainer, - NW_CSS_Prop_rightMargin, - &prop); - _NW_THROW_ON_ERROR(status); - status = NW_LMgr_Box_SetProperty((NW_LMgr_Box_t*)container, - NW_CSS_Prop_leftPadding, - &prop); - _NW_THROW_ON_ERROR(status); - status = NW_LMgr_Box_SetProperty((NW_LMgr_Box_t*)container, - NW_CSS_Prop_leftMargin, - &prop); - _NW_THROW_ON_ERROR(status); -#endif - } - NW_CATCH(status) { - NW_Object_Delete(splitContainer); - - splitContainer = NULL; - } - NW_FINALLY { - return (NW_LMgr_Box_t*)splitContainer; - } - NW_END_TRY -} - -/* -------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_GetBaseline - * Description: Returns the baseline of the container. - * According to the CSS spec, the baseline for boxes containing - * multiple lines of text is the baseline of the first line of - * text. - * We assume here that this also applies to boxes that contain - * mixed text and other content: i.e. that this applies to all - * containers by default. - * Returns: The baseline of the first child, or 0 if the container is - * empty. - */ - -/* TODO: The box may not begin at the top of the container, so its baseline - * BUG! might be larger than is currently calculated. - */ - -NW_GDI_Metric_t -_NW_LMgr_ContainerBox_GetBaseline(NW_LMgr_Box_t* box) -{ - NW_LMgr_Box_t *firstChild; - - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box)) != 0){ - firstChild = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(box), 0); - NW_ASSERT(firstChild != NULL); - return NW_LMgr_Box_GetBaseline(firstChild); - } else { - return 0; - } -} - -/* -------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Render - * Description: Renders the container and its children. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ - -TBrowserStatusCode -_NW_LMgr_ContainerBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t *rootBox ) -{ - NW_GDI_Rectangle_t oldClip = {{0, 0}, {0, 0}}; - NW_GDI_Rectangle_t newClip; - NW_GDI_Rectangle_t realClip; - NW_GDI_Rectangle_t visibleArea; - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds(box); - NW_LMgr_PropertyValue_t value; - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_PropertyValue_t visibilityVal; - NW_Bool clipRectChanged = NW_FALSE; - NW_Bool containerVisible = NW_FALSE; - void** ptr = NULL; - NW_Bool cachePresent = NW_FALSE; - - NW_TRY(status) - { - // Should we draw floats? - if (!(flags & NW_LMgr_Box_Flags_DrawFloats)) - { - floatVal.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - if (floatVal.token != NW_CSS_PropValue_none) - { - NW_THROW_SUCCESS( status ); - } - } - // check if the this box has focus - // if hasFocus is already set to true by any parent - // then it should not be overuled. - if( !(*hasFocus) && currentBox == box ) - { - *hasFocus = NW_TRUE; - } - // Get the view bounds - viewBounds = *(deviceContext->DisplayBounds()); - viewBounds.point = *(deviceContext->Origin()); - - // Determine the part of the box within the clip. - if( !NW_GDI_Rectangle_Cross( clipRect, &boxBounds, &visibleArea ) ) - { - // out of the view - goto drawChildren; - } - // Is the box visible on-screen? If not, stil try to draw - // the children - if( !NW_GDI_Rectangle_Cross( &viewBounds, &visibleArea, NULL ) ) - { - goto drawChildren; - } - // If the clip is not visible on-screen, we - // draw neither the Container nor its children; - // in case we are calculating the extents, we will still - // have to peek into all children - if (!NW_GDI_Rectangle_Cross( clipRect, &viewBounds, &realClip ) ) - { - goto drawChildren; - } - - // Save the old clip rect - oldClip = deviceContext->ClipRect(); - // Set the new clip rect - deviceContext->SetClipRect( &realClip ); - clipRectChanged = NW_TRUE; - - // Check if visibility val is set to not visible. In that case - // we do not draw the Container, but we still try to draw the - // children (the Visiblity prop may be overriden) - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - - if (visibilityVal.token != NW_CSS_PropValue_visible) - { - goto drawChildren; - } - - // make the box draw itself - status = NW_LMgr_Box_Draw( box, deviceContext, *hasFocus ); - containerVisible = NW_TRUE; - _NW_THROW_ON_ERROR (status); - - // Add the box and the clip to the cache - cachePresent = NW_LMgr_Box_Update_RenderCache (rootBox, box, &realClip, &ptr); - if (cachePresent) - { - NW_THROW_OOM_ON_NULL(ptr, status); - } - - // Even if the Container itself is not visible, its children - // might be - // note that this is overruled in smallscreen mode as we do not - // render any children of a non visible container. -drawChildren: - - // Modify the clip rectangle, if necessary - newClip = *clipRect; - value.token = NW_CSS_PropValue_visible; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_overflow, - NW_CSS_ValueType_Token, &value); - - if( value.token == NW_CSS_PropValue_hidden ) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t border; - NW_GDI_Rectangle_t tempClip = boxBounds; - - NW_LMgr_Box_GetPadding( box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth( box, &border, ELMgrFrameAll ); - tempClip.point.x = (NW_GDI_Metric_t)(boxBounds.point.x + padding.left - + border.left); - tempClip.point.y = (NW_GDI_Metric_t)(boxBounds.point.y + padding.top - + border.top); - tempClip.dimension.width = (NW_GDI_Metric_t)(boxBounds.dimension.width - - padding.left - - padding.right - - border.left - border.right); - tempClip.dimension.height = (NW_GDI_Metric_t)(boxBounds.dimension.height - - padding.top - - padding.bottom - - border.top - - border.bottom); - - if (!NW_GDI_Rectangle_Cross(&tempClip, clipRect, &newClip)) - { - // children are out of view - containerVisible = NW_FALSE; - NW_THROW_SUCCESS(status); - } - else - { - // modify cliprect for the children. - *clipRect = newClip; - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - // skip children unless the container is visible - *skipChildren = (NW_Bool)( containerVisible == NW_TRUE ? NW_FALSE : NW_TRUE ); - if( clipRectChanged == NW_TRUE ) - { - /* Reset the clip rect */ - deviceContext->SetClipRect( &oldClip); - } - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_ResizeToChildren - * Description: Resize makes the container box just big enough to enclose all of - * its children. Although the box is invisible and has no effect - * on the enclosing flow, these bounds are available to the - * UI event mechanism to identify which action container should - * handle an event. Note a limitation here: the container box - * can't actually do this correctly until the children have all - * been formatted: something the container can't really do itself - * because it lacks a formatting context. Since formatting contexts - * are not attached to boxes, there is no way to walk up the - * tree looking for one either. - * Returns: KBrsrSuccess - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_ResizeToChildren(NW_LMgr_ContainerBox_t* container) -{ - NW_ADT_Vector_Metric_t numChildren; - NW_LMgr_Box_t* thisBox = NW_LMgr_BoxOf(container); - NW_ADT_Vector_Metric_t index; - const NW_ADT_Vector_t *children; - NW_LMgr_PropertyValue_t propValue; - NW_LMgr_FrameInfo_t borders, padding; - NW_GDI_Rectangle_t containerBounds = NW_LMgr_Box_GetFormatBounds(thisBox); - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( thisBox ); - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool FirstVisibleChild = NW_TRUE; - - NW_ASSERT(container != NULL); - - children = NW_LMgr_ContainerBox_GetChildren(container); - - numChildren = NW_ADT_Vector_GetSize(children); - - // Initialize the values for the case there are no visible children. - containerBounds.point.x = containerBounds.point.y = 0; - containerBounds.dimension.width = containerBounds.dimension.height = 0; - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - - for (index = 0; index < numChildren; index++) { - NW_LMgr_Box_t* child; - - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - containerBounds = NW_LMgr_Box_GetFormatBounds(thisBox); - - // If the child box is not displayable, ignore it. - propValue.token = NW_CSS_PropValue_display_inline; - NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_display, NW_CSS_ValueType_Token, &propValue); - if (propValue.token == NW_CSS_PropValue_none){ - continue; - } - - // This step is skipped in vertical layout mode (see the comment in - // CLMgr_BoxFormatHandler::UpdateDisplayBounds) or if the child is an object-box. - // Object-boxes are always paired with a container-box that has it as the - // only child. Because of this it should never skip the object-box -- otherwise - // the container-box will have 0,0 dimensions. - //if( !NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) && !ObjectUtils::IsObjectBox(*child, EFalse)) - // { - // If the child box is a float, ignore it. - // propValue.token = NW_CSS_PropValue_none; - // NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &propValue); - // if (propValue.token != NW_CSS_PropValue_none) - // { - // continue; - // } - // } - - // If the child box is a container that has no visible children, ignore it. - NW_GDI_Rectangle_t childBoxBounds = NW_LMgr_Box_GetFormatBounds( child ); - if ((childBoxBounds.dimension.height == 0) && (childBoxBounds.dimension.width == 0)){ - if (NW_Object_IsInstanceOf(child, &NW_LMgr_ContainerBox_Class)){ - continue; - } - } - - if(FirstVisibleChild){ - FirstVisibleChild = NW_FALSE; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( container ), childBoxBounds ); - } - else{ - if(childBoxBounds.point.x < containerBounds.point.x){ - containerBounds.point.x = childBoxBounds.point.x; - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - } - - if(childBoxBounds.point.y < containerBounds.point.y){ - containerBounds.point.y = childBoxBounds.point.y; - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - } - - if((childBoxBounds.point.x + childBoxBounds.dimension.width) > - (containerBounds.point.x + containerBounds.dimension.width)){ - containerBounds.dimension.width = (NW_GDI_Metric_t) - (childBoxBounds.point.x + childBoxBounds.dimension.width - - containerBounds.point.x); - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - } - - if((childBoxBounds.point.y + childBoxBounds.dimension.height) > - (containerBounds.point.y + containerBounds.dimension.height)){ - containerBounds.dimension.height = (NW_GDI_Metric_t) - (childBoxBounds.point.y + childBoxBounds.dimension.height - - containerBounds.point.y); - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - } - } - } - containerBounds = NW_LMgr_Box_GetFormatBounds(thisBox); - - if ((containerBounds.dimension.width != 0) && - (containerBounds.dimension.height != 0)) { - /* Now take into account the borders and padding */ - NW_LMgr_Box_GetBorderWidth(thisBox, &borders, ELMgrFrameAll ); - NW_LMgr_Box_GetPadding(thisBox, &padding, ELMgrFrameAll ); - containerBounds.point.x = (NW_GDI_Metric_t)(containerBounds.point.x - borders.left - padding.left); - containerBounds.point.y = (NW_GDI_Metric_t)(containerBounds.point.y - borders.top - padding.top); - containerBounds.dimension.width = (NW_GDI_Metric_t)(containerBounds.dimension.width + - borders.left + padding.left + borders.right + padding.right); - containerBounds.dimension.height = (NW_GDI_Metric_t)(containerBounds.dimension.height + - borders.top + padding.top + borders.bottom + padding.bottom); - } - NW_LMgr_Box_SetFormatBounds( thisBox, containerBounds ); - return status; -} - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_Initialize - * A public method to add any anonymous block container boxes to - * a block container that contains both block and inline content. - * This assures that all content in a block box participates - * in the same format context (either block or inline). This becomes - * essential when margins are collapsed. CSS2 p98. - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_Initialize(NW_LMgr_ContainerBox_t *container) - { - NW_TRY (status) - { - NW_ADT_Vector_Metric_t index; - const NW_ADT_Vector_t *children; - NW_LMgr_Box_t* child; - NW_LMgr_ContainerBox_t *newContainer; - NW_LMgr_PropertyValue_t floatVal; - - children = NW_LMgr_ContainerBox_GetChildren(container); - - index = 0; - while (index < NW_ADT_Vector_GetSize(children)) { - - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - - if (NW_Object_IsInstanceOf(child, &NW_LMgr_SplitTextBox_Class)) - { - NW_Object_Delete(child); - child = NULL; - continue; - } - - else if (NW_Object_IsInstanceOf(child, &NW_LMgr_AbstractTextBox_Class)) - { - if( NW_LMgr_AbstractTextBox_IsBlank(NW_LMgr_AbstractTextBoxOf(child)) ) - { - NW_Object_Delete(child); - child = NULL; - continue; - } - } - - else if (NW_Object_IsInstanceOf(child, &NW_LMgr_FlowBox_Class) || - NW_Object_IsClass(child, &NW_LMgr_StaticTableBox_Class) || - NW_Object_IsClass(child, &NW_LMgr_StaticTableRowBox_Class)) { - - floatVal.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - if (status == KBrsrOutOfMemory) { - return KBrsrOutOfMemory; - } - - if (floatVal.token == NW_CSS_PropValue_none) { - - newContainer = NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL(newContainer, status); - - status = NW_LMgr_ContainerBox_AppendChildrenOf(newContainer, NW_LMgr_ContainerBoxOf(child)); - _NW_THROW_ON_ERROR(status); - - status = NW_LMgr_ContainerBox_ReplaceChild(container, child, NW_LMgr_BoxOf(newContainer)); - _NW_THROW_ON_ERROR(status); - - (void) NW_LMgr_Box_SetPropList(NW_LMgr_BoxOf(newContainer), NW_LMgr_Box_PropListGet(child)); - (void) NW_LMgr_Box_SetPropList(child, NULL); - NW_LMgr_Box_RemoveProperty(NW_LMgr_BoxOf(newContainer), NW_CSS_Prop_display); - NW_LMgr_Box_RemoveProperty(NW_LMgr_BoxOf(newContainer), NW_CSS_Prop_float); - - NW_Object_Delete(child); - child = NULL; - } - } - - index ++; - } - - } NW_CATCH (status) { - } NW_FINALLY { - return KBrsrSuccess; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_ContainerBox_InitializeSSL - * A public method to remove empty text child box in small screen mode - */ - -TBrowserStatusCode -NW_LMgr_ContainerBox_InitializeSSL(NW_LMgr_ContainerBox_t *container) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t index; - const NW_ADT_Vector_t *children; - NW_LMgr_Box_t* child; - - children = NW_LMgr_ContainerBox_GetChildren(container); - - index = 0; - while (index < NW_ADT_Vector_GetSize(children)) - { - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - - if (NW_Object_IsInstanceOf(child, &NW_LMgr_AbstractTextBox_Class)) - { - if( NW_LMgr_AbstractTextBox_IsBlank(NW_LMgr_AbstractTextBoxOf(child)) ) - { - NW_Object_Delete(child); - child = NULL; - continue; - } - } - index ++; - } - - return status; - } - -NW_Bool NW_LMgr_ContainerBox_IsLastChild(NW_LMgr_Box_t* box) - { - return box == NW_LMgr_BoxOf(NW_LMgr_ContainerBox_GetChild(NW_LMgr_Box_GetParent((box)), - (NW_ADT_Vector_Metric_t) (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_Box_GetParent((box))) - 1 ))); - } - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_ContainerBox_t* -NW_LMgr_ContainerBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_ContainerBox_t*) - NW_Object_New (&NW_LMgr_ContainerBox_Class, numProperties); -} - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrEmptyBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrEmptyBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_emptyboxi.h" - -#include "nw_adt_resizablevector.h" -#include "nw_lmgr_cssproperties.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- - The static instance of the Format_Box class object - ------------------------------------------------------------------------- */ -const -NW_LMgr_EmptyBox_Class_t NW_LMgr_EmptyBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_EmptyBox_t), - /* construct */ _NW_LMgr_Box_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_EmptyBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_EmptyBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_EmptyBox */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_EmptyBox_GetMinimumContentSize(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size){ - NW_REQUIRED_PARAM(box); - NW_ASSERT(size != NULL); - - /* If the properties are not set, the default values are (0,0) */ - (void) NW_LMgr_Box_GetSizeProperties (box, size); - if (size->width == -1) { - size->width = 0; - } - if (size->height == -1) { - size->height = 0; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -NW_Bool -_NW_LMgr_EmptyBox_HasFixedContentSize(NW_LMgr_Box_t *box){ - NW_REQUIRED_PARAM(box); - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_EmptyBox_t* -NW_LMgr_EmptyBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_EmptyBox_t*) - NW_Object_New (&NW_LMgr_EmptyBox_Class, numProperties); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrEventHandler.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrEventHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_eventhandleri.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_EventHandler_Class_t NW_LMgr_EventHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_EventHandler_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_LMgr_EventHandler */ - /* processEvent */ NULL - } -}; - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrFlowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrFlowBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,435 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "nw_lmgr_formatcontext.h" -#include "nw_lmgr_flowboxi.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_cssproperties.h" -#include "GDIDevicecontext.h" -#include "nw_fbox_inputbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - -/* The static instance of the Flow_Box class object - * Flow box is a pure virtual class with several methods - * for which there are no default implementations. - */ - -/* ------------------------------------------------------------------------- */ - -const -NW_LMgr_FlowBox_Class_t NW_LMgr_FlowBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FormatBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_FlowBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_FlowBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_TRY(status) { - /* invoke superclass resize */ - status = NW_LMgr_FormatBox_Class.NW_LMgr_Box.resize(box, context); - _NW_THROW_ON_ERROR(status); - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -TBrowserStatusCode -_NW_LMgr_FlowBox_PostResize(NW_LMgr_Box_t* box) - { - NW_GDI_Dimension2D_t size; - NW_LMgr_FrameInfo_t padding, borderWidth; - NW_LMgr_PropertyValue_t bodyFlag; - - NW_ASSERT(box); - - NW_TRY(status) - { - /* Check for the height property */ - NW_LMgr_Box_GetSizeProperties(box, &size); - - status = NW_LMgr_FormatBox_Class.NW_LMgr_Box.postResize(box); - _NW_THROW_ON_ERROR(status); - - /* we should always respect size.height if it's >= 0 */ - if (size.height >= 0) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if ( size.height >= boxBounds.dimension.height || - NW_Object_IsInstanceOf(box, &NW_LMgr_StaticTableBox_Class) || - NW_Object_IsInstanceOf(box, &NW_LMgr_StaticTableCellBox_Class) || - NW_Object_IsInstanceOf(box, &NW_LMgr_StaticTableRowBox_Class) ) - { - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameTop|ELMgrFrameBottom ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameTop|ELMgrFrameBottom ); - boxBounds.dimension.height = (NW_GDI_Metric_t) - (size.height + borderWidth.top + borderWidth.bottom - + padding.top + padding.bottom); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - } - bodyFlag.token = NW_CSS_PropValue_none; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_flags, - NW_CSS_ValueType_Token, &bodyFlag); - if (bodyFlag.token == NW_CSS_PropValue_flags_bodyElement) { - - const NW_GDI_Rectangle_t* rectangle; - CGDIDeviceContext* deviceContext; - NW_LMgr_RootBox_t* rootBox; - - rootBox = NW_LMgr_Box_GetRootBox(box); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if( boxBounds.dimension.height < rectangle->dimension.height) - { - boxBounds.dimension.height = (NW_GDI_Metric_t) - (rectangle->dimension.height - boxBounds.point.y); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - } - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY - } - -/* ----------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_LMgr_FlowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_RootBox_t *rootBox; - NW_LMgr_Box_t *tableBox; - NW_GDI_Metric_t minWidth; - NW_LMgr_FrameInfo_t paddingInfo; - NW_LMgr_FrameInfo_t borderWidthInfo; - TBrowserStatusCode status = KBrsrSuccess; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( format ) ); - NW_LMgr_Property_t dirProp; - - NW_LMgr_Box_GetPadding(NW_LMgr_BoxOf(format), &paddingInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(NW_LMgr_BoxOf(format), &borderWidthInfo, ELMgrFrameAll ); - - context->startMargin = - (NW_GDI_Metric_t)(boxBounds.point.x + paddingInfo.left - + borderWidthInfo.left); - context->endMargin = (NW_GDI_Metric_t)(boxBounds.point.x - + boxBounds.dimension.width - - paddingInfo.right - - borderWidthInfo.right); - - /* Set initial vertical position */ - context->y = (NW_GDI_Metric_t) (boxBounds.point.y + paddingInfo.top - + borderWidthInfo.top); - - minWidth = NW_LMGR_BOX_MIN_WIDTH; - - if (context->endMargin < context->startMargin + minWidth) - { - context->endMargin = (NW_GDI_Metric_t)(context->startMargin + minWidth); - boxBounds.dimension.width = (NW_GDI_Metric_t)(minWidth + paddingInfo.left + - borderWidthInfo.left + paddingInfo.right + borderWidthInfo.right); - - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( format ), boxBounds ); - // - status = KBrsrLmgrFormatOverflow; - } - boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( format ) ); - /* Now reset initial height. This will change as children are laid out */ - boxBounds.dimension.height = (NW_GDI_Metric_t)( paddingInfo.top + paddingInfo.bottom + - borderWidthInfo.top + borderWidthInfo.bottom); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( format ), boxBounds ); - - if (!NW_Object_IsClass(format, &NW_LMgr_RootBox_Class)) { - rootBox = NW_LMgr_Box_GetRootBox (format); - NW_ASSERT (rootBox != NULL); - } - else { - rootBox = NW_LMgr_RootBoxOf(format); - } - - tableBox = NW_LMgr_BoxOf(format); - while (tableBox != NULL) { - if (NW_Object_IsClass(tableBox, &NW_LMgr_StaticTableBox_Class)) { - break; - } - tableBox = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (tableBox); - } - if (tableBox == NULL) { - context->placedFloats = rootBox->placedFloats; - } - else { - context->placedFloats = NULL; - } - context->pendingFloats = rootBox->pendingFloats; - - /* Now set the flow-specific context variables */ - context->lineStart = NW_LMgr_FlowBox_GetLineStart(NW_LMgr_FlowBoxOf(format), - context, context->y); - context->lineEnd = NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_FlowBoxOf(format), - context, context->y); - - /* Get the flow direction */ - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(format), NW_CSS_Prop_textDirection, &dirProp); - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - context->direction = NW_GDI_FlowDirection_LeftRight; - } - else { - context->direction = NW_GDI_FlowDirection_RightLeft; - } - - /* Set the initial x position */ - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - context->x = (NW_GDI_Metric_t)(context->lineStart + - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - else { - context->x = (NW_GDI_Metric_t)(context->lineEnd - - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - return status; -} - -/* --------------------------------------------------------------------------*/ -NW_GDI_Metric_t -_NW_LMgr_FlowBox_GetBaseline(NW_LMgr_Box_t* box){ - - NW_LMgr_PropertyValue_t baselineVal; - NW_GDI_Metric_t baseline = 0; - NW_LMgr_Box_t *childFlow; - TBrowserStatusCode status; - - childFlow = box; - baselineVal.integer = 0; - while (NW_Object_IsInstanceOf(childFlow, &NW_LMgr_FlowBox_Class)) { - status = NW_LMgr_Box_GetPropertyValue(childFlow, NW_CSS_Prop_flowBaseline, - NW_CSS_ValueType_Px, &baselineVal); - if (status != KBrsrNotFound) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( childFlow ); - baseline = (NW_GDI_Metric_t)(boxBounds.point.y - - boxBounds.point.y - + baselineVal.integer); - break; - } - childFlow = - NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(childFlow), 0); - if (childFlow == NULL) { - break; - } - } - return baseline; -} - -/* --------------------------------------------------------------------------*/ -/* Private method to calculate the left margin of the flow at position y. - */ - -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetLineStart(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t where) { - - NW_ADT_Vector_Metric_t floatCount, index; - NW_GDI_Metric_t leftMargin; - NW_GDI_Metric_t floatRight, floatTop, floatBottom; - NW_LMgr_Box_t *floatBox; - NW_LMgr_PropertyValue_t floatValue; - NW_ADT_DynamicVector_t *placedFloats = context->placedFloats; - NW_LMgr_FrameInfo_t margin; - - NW_REQUIRED_PARAM(flow); - - leftMargin = context->startMargin; - - if (placedFloats == NULL) { - return leftMargin; - } - - floatCount = NW_ADT_Vector_GetSize(placedFloats); - - for (index = 0; index < floatCount; index++) { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - NW_ASSERT(floatBox != NULL); - - floatValue.integer = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - if (floatValue.token == NW_CSS_PropValue_left) { - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameRight|ELMgrFrameTop|ELMgrFrameBottom ); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - - floatTop = (NW_GDI_Metric_t)(boxBounds.point.y - margin.top); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - floatRight = (NW_GDI_Metric_t)(boxBounds.point.x - + boxBounds.dimension.width - + margin.right); - - if ((where >= floatTop) - && (where < floatBottom) - && (leftMargin < floatRight)) { - leftMargin = floatRight; - } - } - } - return leftMargin; -} - - -/* --------------------------------------------------------------------------*/ -/* Private method to calculate the left margin of the flow at position y. - */ - -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t where) { - - NW_ADT_Vector_Metric_t floatCount, index; - NW_GDI_Metric_t rightMargin; - NW_GDI_Metric_t floatLeft, floatTop, floatBottom; - NW_LMgr_Box_t *floatBox; - NW_LMgr_PropertyValue_t floatValue; - NW_ADT_DynamicVector_t *placedFloats = context->placedFloats; - NW_LMgr_FrameInfo_t margin; - - NW_REQUIRED_PARAM(flow); - - rightMargin = context->endMargin; - - if (placedFloats == NULL) { - return rightMargin; - } - - floatCount = NW_ADT_Vector_GetSize(placedFloats); - - for (index = 0; index < floatCount; index++) { - - floatBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (placedFloats, index); - NW_ASSERT(floatBox != NULL); - - floatValue.integer = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(floatBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatValue); - - if (floatValue.token == NW_CSS_PropValue_right) { - - NW_LMgr_Box_GetMargins(floatBox, &margin, NULL, ELMgrFrameLeft|ELMgrFrameTop|ELMgrFrameBottom ); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( floatBox ); - - floatTop = (NW_GDI_Metric_t)(boxBounds.point.y - margin.top); - floatBottom = (NW_GDI_Metric_t)(boxBounds.point.y - + boxBounds.dimension.height - + margin.bottom); - floatLeft = (NW_GDI_Metric_t)(boxBounds.point.x - - margin.left - 1); - - if ((where >= floatTop) - && (where < floatBottom) - && (rightMargin > floatLeft)) { - rightMargin = floatLeft; - } - } - } - return rightMargin; -} - -/* Private method to calculate any first-line indentation */ -NW_GDI_Metric_t -NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBox_t* flow, - NW_LMgr_FormatContext_t* context) -{ - NW_GDI_Metric_t indent = 0; - NW_LMgr_PropertyValue_t tIndent; - NW_LMgr_PropertyValue_t tAlign; - - if (context->lineNumber == 0) { - /* Get the text alignment */ - tAlign.token = NW_CSS_PropValue_left; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), NW_CSS_Prop_textAlign, - NW_CSS_ValueType_Token, &tAlign); - - if (tAlign.token == NW_CSS_PropValue_left) { - /* Get the text indent */ - tIndent.integer = 0; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(flow), NW_CSS_Prop_textIndent, - NW_CSS_ValueType_Px, &tIndent); - - indent = (NW_GDI_Metric_t)tIndent.integer; - } - } - return indent; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrFormatBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrFormatBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,204 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_formatboxi.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- - The static instance of the Format_Box class object - ------------------------------------------------------------------------- */ -const -NW_LMgr_FormatBox_Class_t NW_LMgr_FormatBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_ContainerBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_FormatBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FormatBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_ContainerBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ 0 - } -}; - - -/* - * Format boxes are resized by laying out their children with one - * dimension constrained. They grow to whatever size is needed in the - * other dimension. Before the child layout takes place, the - * constraint must be set, so constrain must be called before calling - * this or the results of resize will be undetermined. - */ - -TBrowserStatusCode -_NW_LMgr_FormatBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_FormatContext_t *newContext = NULL; - - NW_TRY (status) { - TBrowserStatusCode savedStatus = KBrsrSuccess; - NW_GDI_Metric_t minWidth; - - /* When this method is entered, some size constraints must have been set. - * Resize then lays the children out to get - * the final size. In general, child layout keeps the size set in - * one dimension but causes the box to grow in the other dimension. - */ - - /* First allocate a new context for formatting children */ - - newContext = NW_LMgr_FormatContext_New(); - NW_THROW_OOM_ON_NULL (newContext, status); - - /* Set formatting margins and the point where formatting starts */ - - status = NW_LMgr_FormatBox_ApplyFormatProps((NW_LMgr_FormatBox_t *) box, newContext); - if(status == KBrsrLmgrFormatOverflow) { - savedStatus = status; - } - - /* we don't enforce minimum width in the fixed width case to ensure table span display properly */ - if (!NW_LMgr_Box_HasFixedWidth (box)) { - /* Make sure the box is big enough to include a reasonable space for formatting */ - minWidth = NW_LMGR_BOX_MIN_WIDTH; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if( boxBounds.dimension.width < minWidth) - { - boxBounds.dimension.width = minWidth; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - savedStatus = KBrsrLmgrFormatOverflow; - } - } - context->formatChildren= NW_TRUE; - context->formatBox = box; - context->newFormatContext = newContext; - newContext->referenceCount = 0; - - // return the format result - status = savedStatus; - - } NW_CATCH (status) { - } NW_FINALLY { - /* Clean up the new context we allocated */ - - // jay will be cleaned up in post format - //NW_Object_Delete(newContext); - return status; - } NW_END_TRY -} - -/* Format box constrain does the work of setting a preliminary size so - * that resize can take place by formatting children within - * constraints. This must be called before resize. Constrain sets - * size in one dimension using either the width size property or the - * supplied constraint. - */ - - -TBrowserStatusCode -_NW_LMgr_FormatBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_GDI_Dimension2D_t minSize; - NW_GDI_Dimension2D_t setSize; - - NW_ASSERT(box != NULL); - - /* Get minimum size for the box. */ - (void) NW_LMgr_Box_GetMinimumSize(box, &minSize); - - /* See if any size properties are set, Currently we ignore return - * status and use the values of setSize members to see if size - * properties were set - */ - (void) NW_LMgr_Box_GetSizeProperties(box, &setSize); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - /* If a constraint was supplied, apply it */ - if(constraint > 0) - { - /* If no horizontal size property, set according to constraint */ - if(setSize.width <= 0) - { - boxBounds.dimension.width = constraint; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - /* Else, set to minimum width. Any size properties are already included - * in this value. - */ - else - { - boxBounds.dimension.width = minSize.width; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - if(constraint < minSize.width) - { - /* constraint too small */ - status = KBrsrLmgrConstraintTooSmall; - } - } - } - - /* If no constraint was provided, set to minimum width. We cannot do - * a layout without a constraint. */ - else - { - boxBounds.dimension.width = minSize.width; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - } - - return status; -} - - - - - - - - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrFormatContext.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrFormatContext.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_formatcontexti.h" -#include "nw_lmgr_linebox.h" -#include "nw_lmgr_box.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_FormatContext_Class_t NW_LMgr_FormatContext_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_FormatContext_t), - /* construct */ _NW_LMgr_FormatContext_Construct, - /* destruct */ _NW_LMgr_FormatContext_Destruct - }, - { /* NW_LMgr_FormatContext */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_FormatContext_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) { - NW_LMgr_FormatContext_t* thisObj; - - /* avoid 'unreferenced formal parameter' warnings */ - (void) argp; - - /* for convenience */ - thisObj = NW_LMgr_FormatContextOf (dynamicObject); - - /* Initialize the member variables */ - thisObj->currentLine = NW_LMgr_LineBox_New(); - NW_THROW_OOM_ON_NULL (thisObj->currentLine, status); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_FormatContext_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_FormatContext_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_FormatContextOf (dynamicObject); - - /* Destroy the line box */ - NW_Object_Delete (thisObj->currentLine); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMgr_FormatContext_t* -NW_LMgr_FormatContext_New () -{ - return (NW_LMgr_FormatContext_t*) - NW_Object_New (&NW_LMgr_FormatContext_Class); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrImageBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrImageBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,349 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_imageboxi.h" - -#include "nw_image_epoc32cannedimage.h" -#include "nw_image_virtualimage.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_settings.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_activecontainerbox.h" -#include "BrsrStatusCodes.h" - -/* This method implements the image handling rules of vertical layout algorithm - 1. scale the image maintaining the aspect ratio if width is greater than display width - 2. scale the image maintaining the aspect ratio if height is greater than display height - 3. If image is too small we do not want it to participate in the layout - - Note: if box hasn't been added to the box tree yet, must pass in a valid rootbox. - */ -/* --------------------------------------------------------------------------*/ -void -NW_LMgr_ImageBox_HandleVerticalLayout(NW_LMgr_Box_t *box, NW_GDI_Dimension2D_t *size, NW_LMgr_RootBox_t* rootBox) -{ - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_GDI_Metric_t maxWidth = 0; - NW_GDI_Metric_t maxHeight = 0; - - /* If image is too small we do not want it to participate in the layout */ - if ((size->width < NW_VerticalLayout_MinImageWidth1) || (size->height < NW_VerticalLayout_MinImageHeight1) || - ((size->width < NW_VerticalLayout_MinImageWidth2) && (size->height > NW_VerticalLayout_MinImageHeight2))) - { - /* if box is within <a> do not reduce size */ - if (NW_LMgr_Box_FindBoxOfClass (box, &NW_LMgr_ActiveContainerBox_Class, NW_FALSE) == NULL) - { - size->width = 0; - size->height = 0; - } - } - else - { - if (!rootBox) - rootBox = NW_LMgr_Box_GetRootBox(box); - NW_ASSERT (rootBox); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - NW_LMgr_Box_GetPadding(box, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameAll ); - maxWidth = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.left - padding.right - borderWidth.right - borderWidth.left - 6); - maxHeight = (NW_GDI_Metric_t)(rectangle->dimension.width - padding.top - padding.bottom - borderWidth.top - borderWidth.bottom); - - /* scale the image maintaining the aspect ratio if width is greater than display width */ - if (size->width > maxWidth) - { - NW_LMgr_Box_t* parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(box); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( parentBox ); - if((parentBox != NULL) && (boxBounds.dimension.width != 0)) - { - maxWidth = boxBounds.dimension.width; - } - - size->height = (NW_GDI_Metric_t)((maxWidth*size->height)/size->width); - size->width = maxWidth; - } - /* scale the image maintaining the aspect ratio if height is greater than display height */ - if (size->height > maxHeight) - { - size->width = (NW_GDI_Metric_t)((maxHeight*size->width)/size->height); - size->height = maxHeight; - } - } -} - -/* ------------------------------------------------------------------------- */ -/* The static instance of the Image_Box class object */ - - -const -NW_LMgr_ImageBox_Class_t NW_LMgr_ImageBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_MediaBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ImageBox_t), - /* construct */ _NW_LMgr_ImageBox_Construct, - /* destruct */ _NW_LMgr_ImageBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ImageBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_ImageBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImageBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_ImageBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_ImageBox_t* imageBox; - TBrowserStatusCode status; - - /* for convenience */ - imageBox = NW_LMgr_ImageBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize our member */ - imageBox->image = va_arg (*argp, NW_Image_AbstractImage_t*); - if (imageBox->image != NULL) { - NW_GDI_Rectangle_t bounds; - NW_GDI_Dimension3D_t imageSize; - - bounds.point.x = 0; - bounds.point.y = 0; - status = NW_Image_AbstractImage_GetSize (imageBox->image, &imageSize); - NW_ASSERT (status == KBrsrSuccess); - bounds.dimension.width = imageSize.width; - bounds.dimension.height = imageSize.height; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( imageBox ), bounds); - } - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_ImageBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_ImageBox_t* imageBox; - - /* for convenience */ - imageBox = NW_LMgr_ImageBoxOf (dynamicObject); - - /* deallocate the image */ - if (imageBox->image != NULL && - NW_Object_Core_GetClass(imageBox->image) != &NW_Image_Epoc32Canned_Class) { - - NW_Object_Delete (imageBox->image); - } -} - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_ImageBox_GetMinimumContentSize(NW_LMgr_Box_t *box, - NW_GDI_Dimension2D_t *size) - { - NW_LMgr_ImageBox_t* imageBox; - NW_LMgr_RootBox_t* rootBox; - NW_GDI_Dimension3D_t imageSize; - TBrowserStatusCode status; - NW_LMgr_PropertyValue_t sizeVal; - - /* For convenience */ - imageBox = NW_LMgr_ImageBoxOf (box); - - NW_ASSERT(size != NULL); - - /* Get image size */ - - status = NW_Image_AbstractImage_GetSize (imageBox->image, &imageSize); - if(status != KBrsrSuccess){ - return status; - } - - /* If the box has its Width/Height properties set, use that for sizing; - * otherwise return image size. - */ - size->height = size->width = 0; - - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess){ - size->height = (NW_GDI_Metric_t)sizeVal.integer; - } - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess){ - size->width = (NW_GDI_Metric_t)sizeVal.integer; - } - if ((size->height !=0 ) && (size->width == 0) && (imageSize.height != 0)){ - size->width = (NW_GDI_Metric_t)((size->height*imageSize.width)/imageSize.height); - } - if ((size->width != 0) && (size->height == 0) && (imageSize.width != 0)){ - size->height = (NW_GDI_Metric_t)((size->width*imageSize.height)/imageSize.width); - } - if (size->width == 0){ - size->width = imageSize.width; - } - if (size->height == 0){ - size->height = imageSize.height; - } - - /* In case of vertical layout is enabled implement the image handling algorithm */ - rootBox = NW_LMgr_Box_GetRootBox( box ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_LMgr_ImageBox_HandleVerticalLayout(box, size, NULL); - } - - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_LMgr_ImageBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_LMgr_ImageBox_t* imageBox; - NW_GDI_Dimension3D_t dimension; - NW_GDI_Rectangle_t innerRect; - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t borderStyle; - NW_LMgr_FrameInfo_t borderColor; - NW_LMgr_PropertyValue_t focusBehavior; - - /* for convenience */ - imageBox = NW_LMgr_ImageBoxOf (box); - - NW_TRY (status) { - - /* height or width == 0 implies that there is no need to draw the image - as the box does not occupy any space on display */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - if (( boxBounds.dimension.width == 0) || ( boxBounds.dimension.height == 0)) - NW_THROW_SUCCESS(status); - - /* invoke our superclass draw method first */ - status = _NW_LMgr_Box_Draw (box, deviceContext, hasFocus); - _NW_THROW_ON_ERROR (status); - - /* Get inner rectangle */ - NW_LMgr_Box_GetInnerRectangle(box, &innerRect); - - /* make our image draw itself at the specified location */ - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - dimension.width = innerRect.dimension.width; - dimension.height = innerRect.dimension.height; - dimension.depth = 0; - - status = NW_Image_AbstractImage_DrawScaled (imageBox->image, - deviceContext, - &innerRect.point, - &dimension); - - NW_LMgr_Box_GetBorderWidth (box, &borderWidth, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderColor (box, &borderColor); - NW_LMgr_Box_GetBorderStyle (box, &borderStyle, ELMgrFrameAll ); - - /* Modify the look of the box if we're in focus */ - if (hasFocus){ - focusBehavior.token = NW_CSS_PropValue_none; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_focusBehavior, - NW_CSS_ValueType_Token, - &focusBehavior); - - if (focusBehavior.token == NW_CSS_PropValue_growBorder) { - borderWidth.top = (NW_GDI_Metric_t)(borderWidth.top + 1); - borderWidth.bottom = (NW_GDI_Metric_t)(borderWidth.bottom + 1); - borderWidth.left = (NW_GDI_Metric_t)(borderWidth.left + 1); - borderWidth.right = (NW_GDI_Metric_t)(borderWidth.right + 1); - if ((borderStyle.top == NW_CSS_PropValue_none) || (borderStyle.top == NW_CSS_PropValue_hidden)) { - borderStyle.top = NW_CSS_PropValue_solid; - } - if ((borderStyle.bottom == NW_CSS_PropValue_none) || (borderStyle.bottom == NW_CSS_PropValue_hidden)) { - borderStyle.bottom = NW_CSS_PropValue_solid; - } - if ((borderStyle.left == NW_CSS_PropValue_none) || (borderStyle.left == NW_CSS_PropValue_hidden)) { - borderStyle.left = NW_CSS_PropValue_solid; - } - if ((borderStyle.right == NW_CSS_PropValue_none) || (borderStyle.right == NW_CSS_PropValue_hidden)) { - borderStyle.right = NW_CSS_PropValue_solid; - } - } - } - - /* draw the border */ - /* TODO add support for other border types */ - status = NW_LMgr_Box_DrawBorder ( NW_LMgr_Box_GetDisplayBounds(box), deviceContext, &borderWidth, &borderStyle, &borderColor); - _NW_THROW_ON_ERROR(status); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_ImageBox_t* -NW_LMgr_ImageBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_Image_AbstractImage_t* image) -{ - return (NW_LMgr_ImageBox_t*) - NW_Object_New (&NW_LMgr_ImageBox_Class, numProperties, image); -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrLineBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrLineBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,549 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_lineboxi.h" -#include "nw_adt_resizablevector.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_rootbox.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- - The static instance of the Format_Box class object - ------------------------------------------------------------------------- */ -const -NW_LMgr_LineBox_Class_t NW_LMgr_LineBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_LineBox_t), - /* construct */ _NW_LMgr_LineBox_Construct, - /* destruct */ _NW_LMgr_LineBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_LineBox */ - /* unused */ NW_Object_Unused - } -}; - - -TBrowserStatusCode -_NW_LMgr_LineBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_TRY (status) { - NW_LMgr_LineBox_t* lineBox; - - /* for convenience */ - lineBox = NW_LMgr_LineBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - lineBox->line = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_LMgr_Box_t*), 10, 5 ); - NW_THROW_OOM_ON_NULL (lineBox->line, status); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ - -/* Line boxes must NOT delete boxes on the line list since these references - * are always owned by other objects. - */ - -void -_NW_LMgr_LineBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_LineBox_t* lineBox; - - /* for convenience */ - lineBox = NW_LMgr_LineBoxOf (dynamicObject); - - /* release our resources */ - NW_Object_Delete (lineBox->line); -} - - -TBrowserStatusCode -NW_LMgr_LineBox_Clear(NW_LMgr_LineBox_t *lineBox){ - - NW_ASSERT(lineBox != NULL); - NW_ASSERT(lineBox->line != NULL); - - return NW_ADT_DynamicVector_Clear(lineBox->line); -} - - -NW_LMgr_Box_t* -NW_LMgr_LineBox_GetBox(NW_LMgr_LineBox_t *lineBox, NW_ADT_Vector_Metric_t index){ - - NW_ASSERT(lineBox != NULL); - NW_ASSERT(lineBox->line != NULL); - - return *(NW_LMgr_Box_t**) - NW_ADT_Vector_ElementAt(lineBox->line, (NW_ADT_Vector_Metric_t) index); -} - - -NW_ADT_Vector_Metric_t -NW_LMgr_LineBox_GetCount(NW_LMgr_LineBox_t *lineBox){ - - NW_ASSERT(lineBox != NULL); - NW_ASSERT(lineBox->line != NULL); - - return NW_ADT_Vector_GetSize(lineBox->line); -} - - -TBrowserStatusCode -NW_LMgr_LineBox_Append(NW_LMgr_LineBox_t *lineBox, - NW_LMgr_Box_t* box, - NW_GDI_FlowDirection_t dir){ - - NW_ASSERT(lineBox != NULL); - NW_ASSERT(lineBox->line != NULL); - NW_ASSERT(box != NULL); - - if (dir == NW_GDI_FlowDirection_LeftRight) { - if (NW_ADT_DynamicVector_InsertAt (lineBox->line, &box, - NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - } - else - { - if (NW_ADT_DynamicVector_InsertAt (lineBox->line, &box, 0) == NULL) { - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; -} - -/* - * LineBox_HShift equally shifts all boxes in the line box along the - * axis in which successive boxes in the linebox are laid out. This is - * the shift that is done to support CSS text-alignment. This is called - * "horizontal" here because it is orthogonal to the adjustment of boxes - * to support CSS vertical-alignment (See LineBox_VAlign). (For flows - * that are in fact horizontal, this is actually a horizontal shift.) - * LineBox_HShift does not change the relative alignment of boxes along - * this axis, i.e., it assumes that relative placement of boxes on this axis - * has already been done. - */ - -TBrowserStatusCode -NW_LMgr_LineBox_HAlign(NW_LMgr_LineBox_t *lineBox, - NW_LMgr_PropertyValueToken_t type, - NW_GDI_Metric_t space, - NW_GDI_FlowDirection_t dir) - { - NW_ADT_Vector_Metric_t boxes = 0; - NW_ADT_Vector_Metric_t i; - NW_GDI_Point2D_t delta; - NW_GDI_Metric_t width = 0; - NW_GDI_Metric_t shift; - NW_LMgr_Box_t *box; - NW_Bool ltr; - NW_LMgr_RootBox_t* rootBox; - NW_Int32 rangeLimit; - NW_LMgr_FrameInfo_t margin; - - NW_ASSERT (lineBox != NULL); - - /* How many boxes are there on the line */ - boxes = NW_LMgr_LineBox_GetCount(lineBox); - - /* First calculate the cumulative width of the line box */ - for(i = 0; i < boxes; i++) - { - box = NW_LMgr_LineBox_GetBox(lineBox, (NW_ADT_Vector_Metric_t) i); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - // make sure to calculate in the margins of the box when considering width - NW_LMgr_Box_GetMargins(box, &margin, NULL, ELMgrFrameLeft | ELMgrFrameRight ); - - width = (NW_GDI_Metric_t)(width + boxBounds.dimension.width + margin.left + margin.right); - } - - NW_GDI_Rectangle_t lineBoxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( lineBox ) ); - lineBoxBounds.dimension.width = width; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( lineBox ), lineBoxBounds ); - - - /* Get the paragraph direction */ - if (dir == NW_GDI_FlowDirection_LeftRight) - { - ltr = NW_TRUE; - } - else - { - ltr = NW_FALSE; - } - - /* Position boxes horizontally according to their alignment props */ - shift = 0; - if (ltr) - { - if(type == NW_CSS_PropValue_right) - { - shift = (NW_GDI_Metric_t)(space - width); - } - else if (type == NW_CSS_PropValue_center) - { - shift = (NW_GDI_Metric_t)((space - width)/2); - } - } - else - { - if(type == NW_CSS_PropValue_left) - { - shift = (NW_GDI_Metric_t)(-(space - width)); - } - else if (type == NW_CSS_PropValue_center) - { - shift = (NW_GDI_Metric_t)(-(space - width)/2); - } - } - - /* This prevents any boxes from going beyond the left margin - due to alignment. */ - if (shift < 0 && ltr) - { - shift = 0; - } - rootBox = NW_LMgr_Box_GetRootBox( lineBox ); - if( rootBox != NULL ) - { - rangeLimit = NW_LMgr_RootBox_GetRightLimit( rootBox ); - - if (shift + width > rangeLimit ) - { - shift = rangeLimit - width; - } - } - - /* Shift the boxes */ - delta.y = 0; - delta.x = shift; - for(i = 0; i < boxes; i++) - { - box = NW_LMgr_LineBox_GetBox(lineBox, (NW_ADT_Vector_Metric_t) i); - (void)NW_LMgr_Box_Shift(box, &delta); - } - - return KBrsrSuccess; - } - -/* Set the position of boxes in accordance with CSS vertical alignment - * This sets boxes on an axis which is orthogonal to the axis along which - * boxes are being laid out. (For horizontal flows this is vertical - * positioning.) Unlike LineBox_HShift, this makes no assumption that boxes - * have already been laid out vertically. Instead of shifting boxes, this - * method sets their absolute positions relative to the y-location of the - * line-box, a specified line-box height, and a specified base-line. - */ - -TBrowserStatusCode -NW_LMgr_LineBox_VAlign( NW_LMgr_LineBox_t *lineBox, - NW_GDI_Metric_t contextY, - NW_GDI_Metric_t *outBase, - NW_GDI_Metric_t *outHeight ) - { - NW_ADT_Vector_Metric_t boxes = 0; - NW_ADT_Vector_Metric_t i, j, pass; - NW_GDI_Metric_t lineHeight = 0; - NW_GDI_Metric_t boxHeight = 0; - NW_GDI_Metric_t lineBase = 0; - NW_GDI_Metric_t topIncrement, bottomIncrement; - NW_GDI_Metric_t lh = 0; - NW_GDI_Metric_t lineEm = 0, lineEx = 0; - NW_LMgr_Box_t* memberBox; - NW_LMgr_FrameInfo_t margin; - NW_GDI_Rectangle_t bounds; - NW_GDI_Metric_t boxBase; - NW_GDI_Metric_t boxTop; - NW_LMgr_Property_t vaProp, lhProp; - NW_GDI_Metric_t leading; - NW_GDI_Metric_t *placed; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (lineBox != NULL); - NW_ASSERT (lineBox->line != NULL); - - /* Initialize the box height */ - NW_GDI_Rectangle_t lineBoxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( lineBox ) ); - lineBoxBounds.dimension.height = 0; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( lineBox ), lineBoxBounds ); - - /* Get the number of boxes */ - boxes = NW_ADT_Vector_GetSize(lineBox->line); - - /* Allocate the temporary array for the calculated locations */ - placed = (NW_GDI_Metric_t *) NW_Mem_Malloc (sizeof(NW_GDI_Metric_t) * boxes); - if (placed == NULL) - { - return KBrsrOutOfMemory; - } - NW_Mem_memset(placed, 0, sizeof(NW_GDI_Metric_t) * boxes); - - /* Calculate the line em & ex */ - lineEm = NW_LMgr_LineBox_GetEm(lineBox); - lineEx = (NW_GDI_Metric_t)(lineEm / 2); - - /* In the first pass we calculate the line base and the line height */ - for (pass=0; pass<2; pass++) - { - for(i = 0; i < boxes; i++) - { - memberBox = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt(lineBox->line, - (NW_ADT_Vector_Metric_t) i); - bounds = NW_LMgr_Box_GetFormatBounds(memberBox); - - /* Get the verlical-align property */ - vaProp.type = NW_CSS_ValueType_Token; - vaProp.value.token = NW_CSS_PropValue_baseline; - status = NW_LMgr_Box_GetProperty(memberBox, NW_CSS_Prop_verticalAlign, &vaProp); - if (status == KBrsrNotFound) - { - NW_LMgr_Box_t* parent = NW_LMgr_BoxOf( memberBox->parent ); - // vAlign is not inherited! - // If parent is container box (inline), try to get vAlign from the parent - // e.g. X <em style="vertical-align: super">2</em> - if( NW_Object_IsClass( parent, &NW_LMgr_ContainerBox_Class ) ) - { - (void)NW_LMgr_Box_GetProperty (parent, NW_CSS_Prop_verticalAlign, &vaProp); - } - } - - if ((pass == 0) && - !((vaProp.type == NW_CSS_ValueType_Token) && (vaProp.value.token == NW_CSS_PropValue_baseline))) - { - continue; - } - if ((pass == 1) && - (vaProp.type == NW_CSS_ValueType_Token) && (vaProp.value.token == NW_CSS_PropValue_baseline)) - { - continue; - } - - /* Get the line-height property */ - lhProp.type = NW_CSS_ValueType_Token; - lhProp.value.token = NW_CSS_PropValue_normal; - NW_LMgr_Box_GetProperty(memberBox, NW_CSS_Prop_lineHeight, &lhProp); - - /* Get the box margins */ - NW_LMgr_Box_GetMargins(memberBox, &margin, NULL, ELMgrFrameTop|ELMgrFrameBottom ); - - /* Calculate the leading */ - if (lhProp.type == NW_CSS_ValueType_Px) - { - lh = (NW_GDI_Metric_t)lhProp.value.integer; - leading = (NW_GDI_Metric_t)(lh - bounds.dimension.height - margin.top - margin.bottom); - if (leading <= 0) - { - leading = 0; - } - } - else if (lhProp.type == NW_CSS_ValueType_Number) - { - NW_LMgr_PropertyValue_t fontSize; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(memberBox->parent), NW_CSS_Prop_fontSize, - NW_CSS_ValueType_Px, &fontSize); - lh = (NW_GDI_Metric_t)(fontSize.integer * lhProp.value.decimal); - leading = (NW_GDI_Metric_t)(lh - bounds.dimension.height - margin.top - margin.bottom); - if (leading <= 0) - { - leading = 0; - } - } - else - { - leading = 0; - } - - /* Get the box baseline */ - boxBase = NW_LMgr_Box_GetBaseline(memberBox); - if (boxBase != bounds.dimension.height) - { - boxBase = (NW_GDI_Metric_t)(boxBase + margin.top + leading/2); - } - else - { - boxBase = (NW_GDI_Metric_t)(boxBase + margin.top + margin.bottom + leading/2); - } - - /* Calculate the inline box height */ - boxHeight = (NW_GDI_Metric_t)(bounds.dimension.height - + margin.top + margin.bottom + leading); - - /* Align the boxes */ - if (vaProp.type == NW_CSS_ValueType_Token) - { - switch (vaProp.value.token) - { - case NW_CSS_PropValue_top: - boxTop = 0; - break; - case NW_CSS_PropValue_bottom: - boxTop = (NW_GDI_Metric_t)(lineHeight - boxHeight); - break; - case NW_CSS_PropValue_middle: - /* Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.*/ - boxTop = (NW_GDI_Metric_t)(lineBase - lineEx / 2 - (boxHeight+1)/2); - break; - case NW_CSS_PropValue_sub: - boxTop = (NW_GDI_Metric_t)(lineBase + lineEx / 2 - boxBase); - break; - case NW_CSS_PropValue_super: - boxTop = (NW_GDI_Metric_t)(lineBase - lineEx / 2 - boxBase); - break; - default: /* baseline */ - boxTop = (NW_GDI_Metric_t)(lineBase - boxBase); - break; - } - } - else if (vaProp.type == NW_CSS_ValueType_Px) - { - boxTop = (NW_GDI_Metric_t)(lineBase - boxBase - vaProp.value.integer); - } - else if (vaProp.type == NW_CSS_ValueType_Percentage) - { - boxTop = (NW_GDI_Metric_t)(lineBase - boxBase - vaProp.value.decimal / 100 * boxHeight); - } - else - { - boxTop = 0; - } - - /* Adjust the height and the baseline */ - topIncrement = bottomIncrement = 0; - if (boxTop < 0) - { - topIncrement = (NW_GDI_Metric_t)(-boxTop); - } - if (boxTop + boxHeight > lineHeight) - { - bottomIncrement = (NW_GDI_Metric_t)(boxTop + boxHeight - lineHeight); - } - lineHeight = (NW_GDI_Metric_t)(lineHeight + topIncrement + bottomIncrement); - lineBase = (NW_GDI_Metric_t)(lineBase + topIncrement); - placed[i] = (NW_GDI_Metric_t)(boxTop + leading/2 + margin.top); - - /* If we changed the top, we must update the placed array */ - /* Note that the baseline boxes that were already placed need to be - * updated, too, thus the condition "j<=boxes". Any other boxes at - * j>i will be overwritten as we go along. */ - if (topIncrement > 0) - { - for (j = 0; j < boxes; j ++) - { - placed[j] = (NW_GDI_Metric_t)(placed[j] + topIncrement); - } - } - } - } - - /* In the second pass we place the boxes */ - for(i = 0; i < boxes; i++) - { - /* Get the inline box */ - memberBox = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt(lineBox->line, - (NW_ADT_Vector_Metric_t) i); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( memberBox ); - boxBounds.point.y = (NW_GDI_Metric_t)(contextY + placed[i]); - NW_LMgr_Box_SetFormatBounds( memberBox, boxBounds ); - } - - /* Set the calculated line height */ - lineBoxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( lineBox ) ); - lineBoxBounds.dimension.height = lineHeight; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( lineBox ), lineBoxBounds ); - - /* Free the temporary array */ - NW_Mem_Free(placed); - - *outHeight = lineHeight; - *outBase = lineBase; - - // successful completion - return KBrsrSuccess; - } - -NW_GDI_Metric_t -NW_LMgr_LineBox_GetEm(NW_LMgr_LineBox_t *lineBox){ - - NW_ADT_Vector_Metric_t boxes = 0; - NW_ADT_Vector_Metric_t i; - NW_LMgr_Box_t *box; - NW_GDI_Metric_t em = 0; - NW_GDI_Metric_t lineEm = 0; - - NW_ASSERT (lineBox != NULL); - - boxes = NW_LMgr_LineBox_GetCount(lineBox); - - for(i = 0; i < boxes; i++){ - box = NW_LMgr_LineBox_GetBox(lineBox, (NW_ADT_Vector_Metric_t) i); - - em = NW_LMgr_Box_GetEm(box); - lineEm = (NW_GDI_Metric_t) (lineEm < em ? em : lineEm); - } - - return lineEm; -} - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_LineBox_t* -NW_LMgr_LineBox_New () -{ - return (NW_LMgr_LineBox_t*) - NW_Object_New (&NW_LMgr_LineBox_Class, 0); -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrMarkerImage.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrMarkerImage.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the marker image box -* -*/ - -#include "LMgrMarkerImage.h" -#include "nw_lmgr_animatedimageboxi.h" -/* ------------------------------------------------------------------------- */ -const -LMgrMarkerImage_Class_t LMgrMarkerImage_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AnimatedImageBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_LMgr_AnimatedImageBox_SecondaryList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (LMgrMarkerImage_t), - /* construct */ _NW_LMgr_ImgContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_ImgContainerBox_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ImgContainerBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AnimatedImageBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_ImgContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AnimatedImageBox */ - /* unused */ NW_Object_Unused - }, - { /* LMgrMarkerImage */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -LMgrMarkerImage_t* -LMgrMarkerImage_New (NW_ADT_Vector_Metric_t numProperties, NW_Image_AbstractImage_t* aVirtualImage, - NW_Text_t* aAltText, NW_Bool aBrokenImage ) -{ - return (LMgrMarkerImage_t*) - NW_Object_New (&LMgrMarkerImage_Class, numProperties, aVirtualImage, aAltText, aBrokenImage ); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrMarkerText.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrMarkerText.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The class represents the marker text box -* -*/ - -#include "LMgrMarkerText.h" -#include "nw_lmgr_textboxi.h" -/* ------------------------------------------------------------------------- */ -const -LMgrMarkerText_Class_t LMgrMarkerText_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_TextBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (LMgrMarkerText_t), - /* construct */ _NW_LMgr_TextBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_AbstractTextBox_Split, - /* resize */ _NW_LMgr_AbstractTextBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_AbstractTextBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AbstractTextBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_AbstractTextBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AbstractTextBox */ - /* getText */ _NW_LMgr_TextBox_GetText, - /* getStart */ _NW_LMgr_TextBox_GetStart - }, - { /* NW_LMgr_TextBox */ - /* unused */ NW_Object_Unused - }, - { /* LMgrMarkerText */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -LMgrMarkerText_t* -LMgrMarkerText_New (NW_ADT_Vector_Metric_t numProperties, - NW_Text_t* aText) -{ - return (LMgrMarkerText_t*) - NW_Object_New (&LMgrMarkerText_Class, numProperties, aText ); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrMarqueeBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrMarqueeBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,688 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_marqueeboxi.h" -#include "nw_lmgr_formatcontext.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_mediabox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_animatedimageaggregatei.h" -#include "nw_lmgr_emptybox.h" -#include "nw_gdi_utils.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_textbox.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS - -// Max marquee loop count. The value was chosen arbitrarily and limits looping -// to minimize battery drain. -const NW_Uint16 KMarqueeMaxLoopCount = 16; -// Infinite loop count value is the max. -const NW_Uint16 KMarqueeInfiniteLoopCount = KMarqueeMaxLoopCount; - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ - -static -TBrowserStatusCode -NW_LMgr_MarqueeBox_TimerCallback (void *timerData); - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_MarqueeBox_CreateTimer (NW_LMgr_MarqueeBox_t* thisObj) -{ - NW_TRY (status) { - if (thisObj->timer == NULL) { - thisObj->timer = - NW_System_Timer_New (NW_LMgr_MarqueeBox_TimerCallback, thisObj, - thisObj->marqueeSpeed, NW_TRUE); - NW_THROW_ON_NULL (thisObj->timer, status, KBrsrOutOfMemory); - } - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_LMgr_MarqueeBox_DestroyTimer (NW_LMgr_MarqueeBox_t* thisObj) -{ - if (thisObj->timer != NULL) { - NW_Object_Delete (thisObj->timer); - thisObj->timer = NULL; - } -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_MarqueeBox_StartPosition (NW_LMgr_MarqueeBox_t* thisObj) - { - NW_LMgr_Box_t *marqueeBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *parentBox = NW_LMgr_BoxOf(marqueeBox->parent); - NW_GDI_Point2D_t offset = {0,0}; - NW_GDI_Metric_t marqueeX, parentX; - NW_GDI_Metric_t marqueeWidth, parentWidth; - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( parentBox ); - parentX = boxBounds.point.x; - parentWidth = boxBounds.dimension.width; - - boxBounds = NW_LMgr_Box_GetFormatBounds( marqueeBox ); - marqueeX = boxBounds.point.x; - marqueeWidth = boxBounds.dimension.width; - - NW_TRY(status) - { - if (thisObj->marqueeStyle == NW_CSS_PropValue_alternate) - { - if (thisObj->marqueeDir == NW_CSS_PropValue_ltr) - { - if (marqueeWidth <= parentWidth) - { - offset.x = (NW_GDI_Metric_t)(0 - (marqueeX - parentX)); - } - else - { - offset.x = (NW_GDI_Metric_t)((parentWidth - marqueeWidth) - - (marqueeX - parentX)); - } - } - else - { - if (marqueeWidth <= parentWidth) - { - offset.x = (NW_GDI_Metric_t)((parentWidth - marqueeWidth) - - (marqueeX - parentX)); - } - else - { - offset.x = (NW_GDI_Metric_t)(0 - (marqueeX - parentX)); - } - } - } - else - { /* NW_CSS_PropValue_slide, NW_CSS_PropValue_scroll, default */ - - if (thisObj->marqueeDir == NW_CSS_PropValue_ltr) - { - offset.x = (NW_GDI_Metric_t)(- marqueeWidth - (marqueeX - parentX)); - } - else - { - offset.x = (NW_GDI_Metric_t)(parentWidth - (marqueeX - parentX)); - } - } - - if (offset.x != 0) - { - status = NW_LMgr_Box_Shift(marqueeBox, &offset); - - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -static void -NW_LMgr_MarqueeBox_DestroyImageTimers(NW_LMgr_Box_t *marqueeBox) -{ - NW_LMgr_ContainerBox_t* container = NW_LMgr_ContainerBoxOf(marqueeBox); - NW_ADT_Vector_Metric_t numChildren; - NW_ADT_Vector_Metric_t index; - const NW_ADT_Vector_t *children; - NW_LMgr_Box_t* child; - - children = NW_LMgr_ContainerBox_GetChildren(container); - numChildren = NW_ADT_Vector_GetSize(children); - - for (index = 0; index < numChildren; index++) - { - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - if(NW_Object_IsClass(child, &NW_LMgr_AnimatedImageBox_Class)) - { - NW_LMgr_AnimatedImageAggregate_t* animatedImageAggregate = NULL; - animatedImageAggregate = (NW_LMgr_AnimatedImageAggregate_t *) - NW_Object_QuerySecondary (NW_LMgr_AnimatedImageBoxOf (child), - &NW_LMgr_AnimatedImageAggregate_Class); - if(animatedImageAggregate != NULL) - { - NW_LMgr_AnimatedImageAggregate_DestroyTimer (animatedImageAggregate); - } - } - } -} -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_MarqueeBox_Animate (NW_LMgr_MarqueeBox_t* thisObj) - { - NW_LMgr_Box_t *marqueeBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *parentBox = NW_LMgr_BoxOf(marqueeBox->parent); - NW_GDI_Metric_t marqueeX, parentX; - NW_GDI_Metric_t marqueeWidth, parentWidth; - NW_GDI_Metric_t marqueeRight, parentRight; - NW_GDI_Metric_t scrollAmount; - NW_GDI_Point2D_t offset; - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( parentBox ); - parentX = boxBounds.point.x; - parentWidth = boxBounds.dimension.width; - - boxBounds = NW_LMgr_Box_GetDisplayBounds( marqueeBox ); - marqueeX = boxBounds.point.x; - marqueeWidth = boxBounds.dimension.width; - - parentRight = (NW_GDI_Metric_t)(parentX + parentWidth); - marqueeRight = (NW_GDI_Metric_t)(marqueeX + marqueeWidth); - - NW_TRY(status) - { - if (thisObj->loopFinished) - { - thisObj->loopCount --; - - if (thisObj->marqueeStyle == NW_CSS_PropValue_alternate) - { - if (thisObj->marqueeDir == NW_CSS_PropValue_ltr) - { - thisObj->marqueeDir = NW_CSS_PropValue_rtl; - } - else - { - thisObj->marqueeDir = NW_CSS_PropValue_ltr; - } - } - - if (thisObj->loopCount == 0) - { - NW_LMgr_MarqueeBox_DestroyTimer(thisObj); - if (thisObj->marqueeStyle == NW_CSS_PropValue_scroll) - { - NW_LMgr_MarqueeBox_DestroyImageTimers(marqueeBox); - } - } - else - { - NW_LMgr_MarqueeBox_StartPosition(thisObj); - boxBounds = NW_LMgr_Box_GetFormatBounds( marqueeBox ); - NW_LMgr_Box_UpdateDisplayBounds( marqueeBox, boxBounds ); - NW_LMgr_Box_Refresh(parentBox); - } - - thisObj->loopFinished = NW_FALSE; - - NW_THROW_SUCCESS(status); - } - - if (((thisObj->marqueeStyle) == NW_CSS_PropValue_slide) - || ((thisObj->marqueeStyle) == NW_CSS_PropValue_alternate)) - { - - if (thisObj->marqueeDir == NW_CSS_PropValue_ltr) - { - scrollAmount = (NW_GDI_Metric_t)(thisObj->marqueeAmount); - if (marqueeWidth <= parentWidth) - { - if (marqueeRight + scrollAmount >= parentRight) - { - scrollAmount = (NW_GDI_Metric_t)(parentRight - marqueeRight); - thisObj->loopFinished = NW_TRUE; - } - } - else - { - if (marqueeX + scrollAmount >= parentX) - { - scrollAmount = (NW_GDI_Metric_t)(parentX - marqueeX); - thisObj->loopFinished = NW_TRUE; - } - } - } - else - { - scrollAmount = (NW_GDI_Metric_t)(-thisObj->marqueeAmount); - if (marqueeWidth <= parentWidth) { - if (marqueeX + scrollAmount <= parentX) - { - scrollAmount = (NW_GDI_Metric_t)(parentX - marqueeX); - thisObj->loopFinished = NW_TRUE; - } - } - else - { - if (marqueeRight + scrollAmount <= parentRight) - { - scrollAmount = (NW_GDI_Metric_t)(parentRight - marqueeRight); - thisObj->loopFinished = NW_TRUE; - } - } - } - } - else - { /* NW_CSS_PropValue_scroll, default */ - - if (thisObj->marqueeDir == NW_CSS_PropValue_ltr) - { - scrollAmount = thisObj->marqueeAmount; - if (marqueeX + scrollAmount >= parentX + parentWidth) - { - scrollAmount = (NW_GDI_Metric_t)(parentX + parentWidth - marqueeX); - thisObj->loopFinished = NW_TRUE; - } - } - else - { - scrollAmount = (NW_GDI_Metric_t)(-thisObj->marqueeAmount); - if (marqueeX + scrollAmount < parentX - marqueeWidth) - { - scrollAmount = (NW_GDI_Metric_t)(parentX - marqueeWidth - marqueeX); - thisObj->loopFinished = NW_TRUE; - } - } - } - - offset.x = scrollAmount; - offset.y = 0; - status = NW_LMgr_Box_Shift(marqueeBox, &offset); - _NW_THROW_ON_ERROR(status); - - // update display bounds - NW_LMgr_BoxVisitor_t* visitor; - NW_LMgr_Box_t* child; - visitor = NW_LMgr_ContainerBox_GetBoxVisitor( marqueeBox ); - NW_THROW_OOM_ON_NULL( visitor, status ); - - // Invoke update display bound on this box and all children - NW_GDI_Rectangle_t bounds; - while( ( child = NW_LMgr_BoxVisitor_NextBox( visitor, NULL ) ) != NULL ) - { - bounds = NW_LMgr_Box_GetFormatBounds( child ); - NW_LMgr_Box_UpdateDisplayBounds( child, bounds ); - } - bounds = NW_LMgr_Box_GetFormatBounds( marqueeBox ); - NW_LMgr_Box_UpdateDisplayBounds( marqueeBox, bounds ); - // - NW_Object_Delete( visitor ); - // and refresh it - status = NW_LMgr_Box_Refresh(parentBox); - _NW_THROW_ON_ERROR(status); - - if (thisObj->marqueeStyle == NW_CSS_PropValue_slide) - { - if (thisObj->loopFinished) - { - thisObj->pause = (NW_Uint16)(1000 / thisObj->marqueeSpeed); - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_MarqueeBox_TimerCallback (void *timerData) -{ - NW_LMgr_MarqueeBox_t *thisObj; - NW_LMgr_RootBox_t *rootBox; - - NW_TRY(status) { - - /* cast timerData to a box */ - thisObj = NW_LMgr_MarqueeBoxOf (timerData); - NW_ASSERT (thisObj); - - /* make sure it is a MarqueeBox */ - NW_ASSERT (NW_Object_IsClass (thisObj, &NW_LMgr_MarqueeBox_Class)); - - /* if the box tree is not visible, we do not draw */ - rootBox = NW_LMgr_Box_GetRootBox (thisObj); - if (rootBox == NULL) { - NW_THROW_SUCCESS(status); - } - - if (!NW_LMgr_RootBox_HasFocus(rootBox)) { - NW_THROW_SUCCESS(status); - } - - if (thisObj->pause) { - thisObj->pause--; - } - else { - status = NW_LMgr_MarqueeBox_Animate(thisObj); - _NW_THROW_ON_ERROR(status); - } - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_MarqueeBox_Class_t NW_LMgr_MarqueeBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_MarqueeBox_t), - /* construct */ _NW_LMgr_MarqueeBox_Construct, - /* destruct */ _NW_LMgr_MarqueeBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FormatBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_MarqueeBox_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_MarqueeBox*/ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_MarqueeBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - /* invoke our superclass constructor */ - return NW_LMgr_BidiFlowBox_Class.NW_Object_Dynamic.construct (dynamicObject, argp); -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_MarqueeBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_MarqueeBox_t* thisObj = NW_LMgr_MarqueeBoxOf(dynamicObject); - - /* destroy the timer */ - if (thisObj->timer != NULL) { - NW_LMgr_MarqueeBox_DestroyTimer(thisObj); - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_MarqueeBox_Draw(NW_LMgr_Box_t *box, - CGDIDeviceContext *deviceContext, - NW_Bool hasFocus) -{ - NW_TRY (status) { - NW_LMgr_MarqueeBox_t* thisObj = NW_LMgr_MarqueeBoxOf(box); - NW_LMgr_Box_t *parentBox = NW_LMgr_BoxOf(box->parent); - NW_LMgr_Property_t marqueeLoop; - NW_LMgr_PropertyValue_t marqueeStyle; - NW_LMgr_PropertyValue_t marqueeAmount; - NW_LMgr_PropertyValue_t marqueeDir; - NW_LMgr_PropertyValue_t textDir; - NW_LMgr_Property_t marqueeSpeed; - - if (!thisObj->started) { - - /* Get the marquee styles and store them for easy access */ - marqueeStyle.token = NW_CSS_PropValue_scroll; - NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_marqueeStyle, NW_CSS_ValueType_Token, &marqueeStyle); - thisObj->marqueeStyle = marqueeStyle.token; - - /* Get text direction Get the direction from the parent's properties. - If it is not found, find the direction and set it to the partnt's properties. - The scrolling direction will be opposite to the text direction - */ - textDir.token = NW_CSS_PropValue_ltr; - if (NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(parentBox), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &textDir) != KBrsrSuccess) { - } - - marqueeDir.token = (textDir.token == NW_CSS_PropValue_ltr) ? NW_CSS_PropValue_rtl : NW_CSS_PropValue_ltr; - - NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_marqueeDir, NW_CSS_ValueType_Token, &marqueeDir); - thisObj->marqueeDir = marqueeDir.token; - - // Default looping is infinite, which is same behavior as Microsoft I.E. - // Default is used if loop="0", loop value is blank, invalid or loop - // attribute is not specified at all. - thisObj->loopCount = KMarqueeInfiniteLoopCount; - status = NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_marqueeLoop, &marqueeLoop); - if (status == KBrsrSuccess) { - if ((marqueeLoop.type == NW_CSS_ValueType_Integer) - && (marqueeLoop.value.integer >= 1)) { - thisObj->loopCount = (NW_Uint16)marqueeLoop.value.integer; - if (thisObj->loopCount > KMarqueeMaxLoopCount) { - thisObj->loopCount = KMarqueeMaxLoopCount; - } - } - } - - marqueeSpeed.type = NW_CSS_ValueType_Token; - marqueeSpeed.value.token = NW_CSS_PropValue_normal; - NW_LMgr_Box_GetProperty(parentBox, NW_CSS_Prop_marqueeSpeed, &marqueeSpeed); - if (marqueeSpeed.type == NW_CSS_ValueType_Token) { - switch (marqueeSpeed.value.token) { - case NW_CSS_PropValue_slow: - thisObj->marqueeSpeed = 400; - break; - case NW_CSS_PropValue_normal: - thisObj->marqueeSpeed = 150; - break; - case NW_CSS_PropValue_fast: - thisObj->marqueeSpeed = 85; - break; - } - } - else { - if (marqueeSpeed.value.integer > 0) { - thisObj->marqueeSpeed = (NW_Uint16)(marqueeSpeed.value.integer); - if(thisObj->marqueeSpeed < 85) - { - thisObj->marqueeSpeed = 85; - } - } - else { - thisObj->marqueeSpeed = 200; - } - } - - marqueeAmount.integer = 4; - NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_marqueeAmount, NW_CSS_ValueType_Px, &marqueeAmount); - thisObj->marqueeAmount = (NW_GDI_Metric_t)marqueeAmount.integer; - - status = NW_LMgr_ContainerBox_ResizeToChildren(NW_LMgr_ContainerBoxOf(box)); - _NW_THROW_ON_ERROR(status); - - /* We only start the scrolling if loop > 0 */ - if (thisObj->loopCount != 0) { - /* Place the box in its start position */ - NW_LMgr_MarqueeBox_StartPosition(thisObj); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - NW_LMgr_Box_UpdateDisplayBounds( box, boxBounds ); - - status = NW_LMgr_MarqueeBox_CreateTimer(thisObj); - _NW_THROW_ON_ERROR(status); - } - - thisObj->started = NW_TRUE; - } - - status = NW_LMgr_Box_Class.NW_LMgr_Box.draw(box, deviceContext, hasFocus); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_MarqueeBox_Float(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context){ - - NW_ADT_DynamicVector_t *pendingFloats = context->pendingFloats; - NW_ADT_DynamicVector_t *placedFloats = context->pendingFloats; - - NW_REQUIRED_PARAM(flow); - - /* If the float context is not set, remove the box */ - if (pendingFloats == NULL || placedFloats == NULL) { - return KBrsrFailure; - } - - if (NW_ADT_DynamicVector_InsertAt(pendingFloats, &box, NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -/* PUBLIC METHODS */ -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * Function: NW_LMgr_MarqueeBox_Initialize - */ -TBrowserStatusCode -NW_LMgr_MarqueeBox_Initialize(NW_LMgr_MarqueeBox_t *marquee) -{ - NW_TRY (status) { - NW_LMgr_ContainerBox_t* container = NW_LMgr_ContainerBoxOf(marquee); - NW_ADT_Vector_Metric_t numChildren; - NW_ADT_Vector_Metric_t index; - const NW_ADT_Vector_t *children; - NW_LMgr_Box_t* child; - NW_LMgr_ContainerBox_t *newContainer; - NW_LMgr_PropertyValue_t floatVal; - - marquee->started = NW_FALSE; - children = NW_LMgr_ContainerBox_GetChildren(container); - - numChildren = NW_ADT_Vector_GetSize(children); - - for (index = 0; index < numChildren; index++) { - - child = *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (children, index); - - if (NW_Object_IsInstanceOf(child, &NW_LMgr_FlowBox_Class) || - NW_Object_IsInstanceOf(child, &NW_LMgr_StaticTableBox_Class) || - NW_Object_IsInstanceOf(child, &NW_LMgr_StaticTableRowBox_Class)) { - - floatVal.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - NW_THROW_ON (status, KBrsrOutOfMemory); - - if (floatVal.token == NW_CSS_PropValue_none) { - - newContainer = NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (newContainer, status); - - status = NW_LMgr_ContainerBox_AppendChildrenOf(newContainer, NW_LMgr_ContainerBoxOf(child)); - _NW_THROW_ON_ERROR(status); - - status = NW_LMgr_ContainerBox_ReplaceChild(container, child, NW_LMgr_BoxOf(newContainer)); - _NW_THROW_ON_ERROR(status); - - (void) NW_LMgr_Box_SetPropList(NW_LMgr_BoxOf(newContainer), NW_LMgr_Box_PropListGet(child)); - (void) NW_LMgr_Box_SetPropList(child, NULL); - NW_LMgr_Box_RemoveProperty(NW_LMgr_BoxOf(newContainer), NW_CSS_Prop_display); - NW_LMgr_Box_RemoveProperty(NW_LMgr_BoxOf(newContainer), NW_CSS_Prop_float); - - NW_Object_Delete(child); - child = NULL; - } - } - } - } NW_CATCH (status) { - } NW_FINALLY { - return KBrsrSuccess; - } NW_END_TRY -} - -NW_LMgr_MarqueeBox_t* -NW_LMgr_MarqueeBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_MarqueeBox_t*) - NW_Object_New (&NW_LMgr_MarqueeBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrMediaBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrMediaBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_mediaboxi.h" - -/* The static instance of the Media_Box class object */ - - -const -NW_LMgr_MediaBox_Class_t NW_LMgr_MediaBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_Box_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_MediaBox_t), - /* construct */ _NW_LMgr_Box_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ 0 - } -}; - -/* Media boxes tend to have fixed content size */ - -NW_Bool -_NW_LMgr_MediaBox_HasFixedContentSize(NW_LMgr_Box_t *box){ - NW_REQUIRED_PARAM(box); - return NW_TRUE; -} - - - - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrNobrBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrNobrBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_nobrboxi.h" - - -/* ----------------------------------------------------------------------------* - * static data - * ----------------------------------------------------------------------------*/ - -const -NW_LMgr_NobrBox_Class_t NW_LMgr_NobrBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_ContainerBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_NobrBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_ContainerBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_ContainerBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_ContainerBox_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_NobrBox */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_NobrBox_t* -NW_LMgr_NobrBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_NobrBox_t*) - NW_Object_New (&NW_LMgr_NobrBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrObjectBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrObjectBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1112 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box to handle Netscape plugins -* -*/ - - -// INCLUDE FILES -#include <StringLoader.h> - -#include "nwx_settings.h" - -#include "LMgrObjectBox.h" -#include "LMgrObjectBoxListener.h" -#include "LMgrObjectBoxOOC.h" - -#include "nw_image_cannedimages.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_containerbox.h" -#include "LMgrBoxTreeListener.h" -#include "nw_lmgr_rootbox.h" -#include "nw_text_ucs2.h" -#include "NW_Text_AbstractI.h" - - -// ============================ LOCAL DEFINES ================================== -#define KDefaultObjectHeight 100 -#define KDefaultObjectWidth 100 - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::CLMgrObjectBox -// -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CLMgrObjectBox::CLMgrObjectBox(NW_LMgr_Box_t* aBox) : - - iBox(aBox), - iShowingPlaceHolder(ETrue), - iCalculatePlaceHolderClip(ETrue), - iDestructionListeners(2) - { - NW_ASSERT(aBox != NULL); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::ConstructL -// -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::ConstructL(void) - { - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::~CLMgrObjectBox -// -// Deconstructor. -// ----------------------------------------------------------------------------- -// -CLMgrObjectBox::~CLMgrObjectBox() - { - // Clean up the place holder - delete iOrigPlaceHolderText; - delete iPlaceHolderText; - - // Detach the CPluginInst - DetachPluginInst(); - - // Notify the owners that the box is being destroyed. - for (TInt i = 0; i < iDestructionListeners.Count(); i++) - { - iDestructionListeners[i]->Destroyed(); - } - - iDestructionListeners.Reset(); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::NewL -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CLMgrObjectBox* CLMgrObjectBox::NewL(NW_LMgr_Box_t* aBox) - { - CLMgrObjectBox* self = new(ELeave) CLMgrObjectBox(aBox); - - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::NewActiveBox -// -// Creates a Object box-tree, an active container box with a single ObjectBox as a child. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CLMgrObjectBox::NewBox(NW_LMgr_EventHandler_t* aEventHandler, - NW_LMgr_Box_t** aPluginContainerBox, NW_LMgr_Box_t** aPluginBox) - { - NW_LMgr_Box_t* containerBox = NULL; - NW_LMgr_Box_t* pluginBox = NULL; - - NW_ASSERT(aPluginContainerBox != NULL); - NW_ASSERT(aPluginBox != NULL); - TBool inHyperLink = EFalse; - - NW_TRY (status) - { - if (aEventHandler) - { - // Create an ActiveContainer box to hold the boxtree, setting the - // action type for object box. - containerBox = (NW_LMgr_Box_t*) NW_LMgr_ActiveContainerBox_New( - 0, aEventHandler, NW_LMgr_ActionType_OpenObject); - NW_THROW_OOM_ON_NULL(containerBox, status); - aEventHandler = NULL; - } - else - { - inHyperLink = ETrue; - containerBox = (NW_LMgr_Box_t*) NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL(containerBox, status); - } - - // Create the CLMgrObjectBox - pluginBox = (NW_LMgr_Box_t*) NW_LMgr_ObjectBox_New(0); - NW_THROW_OOM_ON_NULL(pluginBox, status); - NW_LMgr_ObjectBox_GetObjectBox((NW_LMgr_ObjectBox_t&)(*pluginBox))->iInHyperLink = inHyperLink; - - // Add the pluginBox to the activeContainerBox - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(containerBox), pluginBox); - NW_THROW_ON_ERROR(status); - - *aPluginBox = pluginBox; - pluginBox = NULL; - } - - NW_CATCH (status) - { - if (NW_Object_IsInstanceOf(containerBox, &NW_LMgr_ActiveContainerBox_Class)) - { - // Orphan aEventHandler before deleting the active container box. - ((NW_LMgr_ActiveContainerBox_t*) containerBox)->eventHandler = NULL; - } - NW_Object_Delete(containerBox); - - NW_Object_Delete(pluginBox); - - containerBox = NULL; - *aPluginBox = NULL; - } - - NW_FINALLY - { - *aPluginContainerBox = containerBox; - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::Split -// -// Allows the box to be placed on the on a new line and grows -// the box to the width of "space" if the box doesn't have -// a width property. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CLMgrObjectBox::Split(NW_GDI_Metric_t aSpace, - NW_LMgr_Box_t** aSplitBox, NW_Uint8 aFlags) - { - TBrowserStatusCode status; - NW_LMgr_PropertyValue_t sizeVal; - - NW_ASSERT(aSplitBox != NULL); - - *aSplitBox = NULL; - - // If box does not fit in the space and the box is not on the new line the - // box needs to be pushed on the new line. - if ((iBox->iFormatBounds.dimension.width > aSpace) && !(aFlags & NW_LMgr_Box_SplitFlags_AtNewLine)) - { - return KBrsrLmgrNoSplit; - } - - // If width was specified we do not want to change it. - status = NW_LMgr_Box_GetPropertyValue(iBox, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &sizeVal); - if (status == KBrsrSuccess) - { - return KBrsrSuccess; - } - - // Get the box's padding and margin - NW_LMgr_FrameInfo_t info; - TInt padding = 0; - TInt border = 0; - TInt margin = 0; - - // NW_LMgr_Box_GetPadding(iBox, &info); - //padding = info.right; - - // Use the parent's border because it has the border not the object box. - NW_ASSERT(NW_Object_IsInstanceOf (iBox->parent, &NW_LMgr_ActiveContainerBox_Class) || - NW_Object_IsInstanceOf (iBox->parent, &NW_LMgr_ContainerBox_Class)); - NW_LMgr_Box_GetBorderWidth((NW_LMgr_Box_t*) iBox->parent, &info, ELMgrFrameRight ); - border = info.right; - - NW_LMgr_Box_GetMargins(iBox, &info, NULL, ELMgrFrameRight ); - if (info.right != NW_LMgr_FrameInfo_Auto) - { - margin = info.right; - } - - // Set the box's width to the available space minus the border and padding. - aSpace -= (border + padding + margin); - iBox->iFormatBounds.dimension.width = aSpace; - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::GetMinimumContentSizeL -// -// Calculates the minimum size needed for the box. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::GetMinimumContentSize(NW_GDI_Dimension2D_t& aSize) - { - NW_LMgr_PropertyValue_t sizeVal; - - // Set the default size - aSize.height = KDefaultObjectHeight; - aSize.width = KDefaultObjectWidth; - - // Adjust the default size if the width or height props are present. - if (NW_LMgr_Box_GetPropertyValue(iBox, NW_CSS_Prop_width, - NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess) - { - aSize.width = (NW_GDI_Metric_t) sizeVal.integer; - } - - if (NW_LMgr_Box_GetPropertyValue(iBox, NW_CSS_Prop_height, - NW_CSS_ValueType_Px, &sizeVal) == KBrsrSuccess) - { - aSize.height = (NW_GDI_Metric_t) sizeVal.integer; - } - - // If the browser is in small screen mode scale aSize to fit on the screen - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( iBox ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) ) - { - NW_GDI_Dimension2D_t aOrigSize = aSize; - - // Scale aSize to the screen. - HandleVerticalLayout(aOrigSize, aSize); - } - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::Draw -// -// Draws the border, background and place holder (while the place -// holder is shown). -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CLMgrObjectBox::Draw(const CGDIDeviceContext& aDeviceContext, - NW_Bool aHasFocus) - { - CGDIDeviceContext* deviceContext = NULL; - NW_GDI_Dimension3D_t imageSize; - NW_GDI_Rectangle_t innerRect; - NW_GDI_Point2D_t pos; - NW_GDI_FlowDirection_t dir = NW_GDI_FlowDirection_LeftRight; - CGDIFont* font = NULL; - NW_GDI_Color_t oldForgroundColor = 0; - NW_GDI_Color_t color; - NW_LMgr_PropertyValue_t value; - - NW_TRY (status) - { - // For convenience. - deviceContext = CONST_CAST(CGDIDeviceContext*, &aDeviceContext); - - // Get the initial colors -- must be done before any throw statement... - oldForgroundColor = deviceContext->ForegroundColor(); - - // Invoke our superclass - status = NW_LMgr_MediaBox_Class.NW_LMgr_Box.draw(iBox, - deviceContext, aHasFocus); - NW_THROW_ON_ERROR(status); - - // If the place holder isn't being shown then its done. - if (!iShowingPlaceHolder) - { - if (iBoxListener) - { - if (iPluginAttached) - { - iBoxListener->RefreshPlugin(); - } - } - NW_THROW_SUCCESS(status); - } - - // If necessary get the image place holder. - if (!iPlaceHolderImage) - { - NW_LMgr_RootBox_t* rootBox = NULL; - - rootBox = NW_LMgr_Box_GetRootBox(iBox); - NW_THROW_ON_NULL(rootBox, status, KBrsrUnexpectedError); - if (!iInHyperLink) - { - iPlaceHolderImage = NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_Object); - } - else - { - // If the <object> is in a hyperlink, treat it as if it was an image - iPlaceHolderImage = NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_Broken); - } - NW_THROW_ON_NULL((void *) iPlaceHolderImage, status, KBrsrUnexpectedError); - } - - // Get the rect it is allowed to draw in - NW_LMgr_Box_GetInnerRectangle(iBox, &innerRect); - - // Get the image size. - status = NW_Image_AbstractImage_GetSize(iPlaceHolderImage, &imageSize); - NW_THROW_ON_ERROR(status); - - if (innerRect.dimension.width < imageSize.width) - { - imageSize.width = innerRect.dimension.width; - } - - if (innerRect.dimension.height < imageSize.height) - { - imageSize.height = innerRect.dimension.height; - } - - // If necessary recalculate the clipped place holder text. - if (iOrigPlaceHolderText && iCalculatePlaceHolderClip) - { - // Discard the old text - delete iPlaceHolderText; - iPlaceHolderText = NULL; - - iPlaceHolderText = ClipText(*iOrigPlaceHolderText, *deviceContext, - innerRect.dimension.width - imageSize.width, ETrue); - - iCalculatePlaceHolderClip = EFalse; - } - - // Draw Image place holder. - pos.x = innerRect.point.x; - pos.y = innerRect.point.y; - - status = NW_Image_AbstractImage_DrawScaled( - CONST_CAST(NW_Image_AbstractImage_t *, iPlaceHolderImage), - deviceContext, &pos, &imageSize); - NW_THROW_ON_ERROR(status); - - // Draw the text only if the <object> is not in hyperlink - if (!iInHyperLink) - { - font = NW_LMgr_Box_GetFont(iBox); - NW_THROW_ON_NULL(font, status, KBrsrUnexpectedError); - - // Set the foreground color - status = NW_LMgr_Box_GetPropertyValue(iBox, NW_CSS_Prop_color, - NW_CSS_ValueType_Color, &value); - - if (status == KBrsrSuccess) - { - color = value.integer; - - deviceContext->SwitchAgainstBG(&color); - - deviceContext->SetForegroundColor(color); - } - - - // Draw the text place holder. - if (iPlaceHolderText) - { - NW_Text_UCS2_t nwText; - NW_GDI_Rectangle_t oldClip = {{0, 0}, {0, 0}}; - - status = NW_Text_UCS2_Initialize(&nwText, (void*) iPlaceHolderText->Ptr(), - iPlaceHolderText->Length(), 0); - NW_THROW_ON_ERROR (status); - - pos.x = innerRect.point.x + imageSize.width; - pos.y = innerRect.point.y; - - /* Save the old clip rect */ - oldClip = aDeviceContext.ClipRect(); - - /* Clip to the inner rect so the text doesn't spill outside of the rect */ - const_cast<CGDIDeviceContext &>(aDeviceContext).SetClipRect(&innerRect); - - status = deviceContext->DrawText(&pos, (NW_Text_t*)(&nwText), font, 0, - (NW_GDI_TextDecoration_e) 0, dir, - innerRect.dimension.width - imageSize.width); - - /* Restore the clip BEFORE checking the status */ - const_cast<CGDIDeviceContext &>(aDeviceContext).SetClipRect(&oldClip); - - NW_THROW_ON_ERROR (status); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - deviceContext->SetForegroundColor(oldForgroundColor); - - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::Render -// -// If necessary it positions the CPluginInst to match the box's -// bounds and renders the box. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CLMgrObjectBox::Render(const CGDIDeviceContext& aDeviceContext, - const NW_LMgr_RootBox_t& aRootBox, const NW_GDI_Rectangle_t& aClipRect, - const NW_LMgr_Box_t* aCurrentBox, NW_Uint8 aFlags, NW_Bool& aHasFocus, - NW_Bool& aSkipChildren) - { - NW_TRY (status) - { - // Invoke our superclass - status = NW_LMgr_MediaBox_Class.NW_LMgr_Box.render(iBox, - CONST_CAST(CGDIDeviceContext*, &aDeviceContext), - CONST_CAST(NW_GDI_Rectangle_t*, &aClipRect), CONST_CAST(NW_LMgr_Box_t*, - aCurrentBox), aFlags, &aHasFocus, &aSkipChildren, - CONST_CAST(NW_LMgr_RootBox_t*, &aRootBox)); - NW_THROW_ON_ERROR(status); - - // The PluginInst must be synchronized with the box's new scroll adjusted - // location -- the size of the PluginInst may also need to be adjusted. - // This method is called even if the place holder is shown because it may - // need to recalculate the clip of the place holder text. - SyncPluginInstBounds(aDeviceContext); - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::SetBoxListener -// -// Sets the box's listener -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::SetBoxListener(MLMgrObjectBoxListener* aListener) - { - iBoxListener = aListener; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::AddBoxDestructionListenerL -// -// Adds a box's destruction listener -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::AddBoxDestructionListenerL(MLMgrBoxDestructionListener* aListener) - { - User::LeaveIfError(iDestructionListeners.Append(aListener)); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::RemoveBoxDestructionListenerL -// -// Removes a box's destruction listener -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::RemoveBoxDestructionListener(MLMgrBoxDestructionListener* aListener) - { - TInt index; - - index = iDestructionListeners.Find(aListener); - if (index != KErrNotFound) - { - iDestructionListeners.Remove(index); - } - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::SetPlaceHolderTextL -// -// Sets the place holder text. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::SetPlaceHolderTextL(const TDesC& aNewText) - { - // Set the place holder state to true - iShowingPlaceHolder = ETrue; - - // Delete the old text - delete iOrigPlaceHolderText; - iOrigPlaceHolderText = NULL; - - delete iPlaceHolderText; - iPlaceHolderText = NULL; - - // Copy the text - HBufC* temp; - - temp = HBufC::NewL(aNewText.Length() + 1); - temp->Des().Append(aNewText); - temp->Des().ZeroTerminate(); - - iOrigPlaceHolderText = temp; - - iCalculatePlaceHolderClip = ETrue; - - // Invalidate the box - (void) NW_LMgr_Box_Refresh((NW_LMgr_Box_t*) iBox->parent); - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::SetPlaceHolderTextL -// -// Set the place-holder text to the given resource id. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::SetPlaceHolderTextL(TInt aResourceId) - { - HBufC* placeHolderText = NULL; - - // Get the string from the StringLoader. - placeHolderText = StringLoader::LoadLC(aResourceId); - - // Set the place holder text. - SetPlaceHolderTextL(*placeHolderText); - CleanupStack::PopAndDestroy(placeHolderText); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::RemovePlaceHolder -// -// Removes the place holder's text and image. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::RemovePlaceHolder(void) - { - CGDIDeviceContext* deviceContext = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - - rootBox = NW_LMgr_Box_GetRootBox(iBox); - NW_ASSERT(rootBox != NULL); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext(rootBox); - NW_ASSERT(deviceContext != NULL); - // Set the place holder state to false - iShowingPlaceHolder = EFalse; - - // Delete the old text - delete iOrigPlaceHolderText; - iOrigPlaceHolderText = NULL; - - delete iPlaceHolderText; - iPlaceHolderText = NULL; - - iForceSyncPluginInst = ETrue; - if (NW_Object_IsInstanceOf (iBox->parent, &NW_LMgr_ActiveContainerBox_Class)) - { - NW_LMgr_ActiveContainerBox_SetActionType(iBox->parent, - NW_LMgr_ActionType_ActivateObject); - } - - SyncPluginInstBounds(*deviceContext); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::IsShowingPlaceHolder -// -// Returns ETrue if the place holder is being shown. -// ----------------------------------------------------------------------------- -// -TBool CLMgrObjectBox::IsShowingPlaceHolder(void) - { - return iShowingPlaceHolder; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::IsActive -// -// Returns if the plugin is active or not. -// ----------------------------------------------------------------------------- -// -TBool CLMgrObjectBox::IsActive() const - { - return iBoxListener->IsActive(); - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::FindBoxTree -// -// Each CLMgrObjectBox is contained in a container-box. In order to identify the -// plugin box associated with a given elementNode the NW_CSS_Prop_elementId -// CSS property is applied, where the property value equals the element-node. -// FindBoxTree returns the box that contains a NW_CSS_Prop_elementId with a -// value matching aBoxKey. -// ----------------------------------------------------------------------------- -// -NW_LMgr_Box_t* CLMgrObjectBox::FindBoxTree(const NW_LMgr_Box_t& aBoxTree, - void* aBoxKey) - { - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* targetBox = NULL; - - NW_ASSERT(aBoxKey != NULL); - - NW_TRY (status) - { - // Init a box visitor - status = NW_LMgr_BoxVisitor_Initialize(&boxVisitor, - CONST_CAST(NW_LMgr_Box_t*, &aBoxTree)); - NW_THROW_ON_ERROR(status); - - while ((box = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, 0)) != NULL) - { - NW_LMgr_PropertyValueType_t type = NW_CSS_ValueType_Object; - NW_LMgr_PropertyValue_t value; - - // Get the ElementId property - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, - type, &value); - - if (status == KBrsrNotFound) - { - continue; - } - - NW_THROW_ON_ERROR(status); - - // Does this box match the key? - if (value.object == aBoxKey) - { - targetBox = box; - break; - } - } - } - - NW_CATCH (status) - { - targetBox = NULL; - } - - NW_FINALLY - { - return targetBox; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::FindObjectBox -// -// Each CLMgrObjectBox is contained in a container-box. FindObjectBox finds -// and returns the first NW_LMgr_ObjectBox found in aBoxTree. -// ----------------------------------------------------------------------------- -// -NW_LMgr_Box_t* CLMgrObjectBox::FindObjectBox(const NW_LMgr_Box_t& aBoxTree) - { - TBrowserStatusCode status; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box = NULL; - - // Init a box visitor - status = NW_LMgr_BoxVisitor_Initialize(&boxVisitor, - CONST_CAST(NW_LMgr_Box_t*, &aBoxTree)); - if (status != KBrsrSuccess) - { - return NULL; - } - - while ((box = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, 0)) != NULL) - { - if (NW_Object_IsInstanceOf(box, &NW_LMgr_ObjectBox_Class)) - { - return box; - } - } - - return NULL; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::GetTextProperty -// -// Returns the given property as a descriptor. -// ----------------------------------------------------------------------------- -// -TDesC* CLMgrObjectBox::GetTextProperty(const NW_LMgr_Box_t& aBox, - NW_LMgr_PropertyName_t aProperty) - { - TBrowserStatusCode status; - NW_LMgr_Property_t prop; - HBufC* value = NULL; - - // Get the prop from the box - prop.type = NW_CSS_ValueType_Text; - prop.value.object = NULL; - status = NW_LMgr_Box_GetProperty(CONST_CAST(NW_LMgr_Box_t*, &aBox), aProperty, &prop); - - if ((status == KBrsrSuccess) && (prop.value.object)) - { - NW_Text_t* temp; - - temp = (NW_Text_t*) prop.value.object; - - // Copy the result into a TDes. - value = HBufC::New(temp->characterCount + 1); - if (value) - { - value->Des().Append((const TUint16*) temp->storage, temp->characterCount); - value->Des().ZeroTerminate(); - } - } - - return value; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::GetParentWindow -// -// Returns the view infrastructure's CCoeControl associated the given root-box. -// ----------------------------------------------------------------------------- -// -CCoeControl* CLMgrObjectBox::GetParentWindow(const NW_LMgr_RootBox_t& aRootBox) - { - MBoxTreeListener* listener = NULL; - CCoeControl* parentWindow = NULL; - - listener = NW_LMgr_RootBox_GetBoxTreeListener(CONST_CAST(NW_LMgr_RootBox_t*, &aRootBox)); - NW_ASSERT(listener != NULL); - - parentWindow = (CCoeControl*)listener->GetParentWindow(); - NW_ASSERT(parentWindow != NULL); - - return parentWindow; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::GetParentWindow -// -// Returns the view infrastructure's CCoeControl associated with this instance. -// ----------------------------------------------------------------------------- -// -CCoeControl* CLMgrObjectBox::GetParentWindow(void) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(iBox); - - if (rootBox) - { - return GetParentWindow(*rootBox); - } - else - { - return NULL; - } - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::AttachPluginInst -// -// Shows, sizes, and locates the CPluginInst or place holder to correspond with -// the box. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::AttachPluginInst(const NW_GDI_Point2D_s& aLocation, - const NW_GDI_Dimension2D_t& aSize) - { - NW_GDI_Rectangle_t bounds; - - // If the place holder is showing determine if the place holder text needs - // to be re-clipped. - if (iShowingPlaceHolder) - { - // If the width of the box has changed the clipped place holder text may - // need to be recalculated. - if (aSize.width != iSize.width) - { - iCalculatePlaceHolderClip = ETrue; - } - } - - // Otherwise show the plugin in the correct location. - else - { - if (!iPluginAttached) - { - iBoxListener->MakeVisible(ETrue); - iPluginAttached = TRUE; - } - - // Place it in the given location with the given size. - bounds.point = aLocation; - bounds.dimension = aSize; - - if ((bounds.dimension.height != 0) || (bounds.dimension.width != 0)) - { - iBoxListener->SetExtent(bounds); - } - } - - // Remember the new location and size. - iLocation = aLocation; - iSize = aSize; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::DetachPluginInstL -// -// Detaches the CPluginInst from its parent. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::DetachPluginInst(void) - { - // Ignore this method if the place holder is showing - if (iShowingPlaceHolder) - { - return; - } - - // Otherwise hide the CPluginInst - if (iPluginAttached && iBoxListener) - { - iBoxListener->MakeVisible(EFalse); - - // There is a funny Symbian bug that occurs if the BoxListener (a CCoeControl) - // isn't FULLY contained within its parent control when the current page is - // replaced. To prevent this issue the control is moved to zero, zero when - // the BoxListener is hidden. - NW_GDI_Rectangle_t bounds; - - bounds.point.x = 0; - bounds.point.y = 0; - bounds.dimension = iSize; - iBoxListener->SetExtent(bounds); - } - - iPluginAttached = FALSE; - iForceSyncPluginInst = ETrue; - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::SyncPluginInstBoundsL -// -// Adjusts the location and size of the PluginInst or place holder so it matches iBox's -// bounds. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::SyncPluginInstBounds(const CGDIDeviceContext& aDeviceContext) - { - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Point2D_t origin; - NW_GDI_Rectangle_t bounds; - - // Get the box's "inner" rect and the device origin - (void) NW_LMgr_Box_GetInnerRectangle(iBox, &bounds); - origin = *(aDeviceContext.Origin()); - - // Get the view bounds. - viewBounds = *(aDeviceContext.DisplayBounds()); - viewBounds.point = origin; - - // Detach the PluginInst if it isn't visible - if (!NW_GDI_Rectangle_Cross(&bounds, &viewBounds, NULL)) - { - iPluginAttached = ETrue; - DetachPluginInst(); - } - - // Otherwise if necessary size and place the PluginInst - else - { - // Determine the new location given the origin and bounds.point - NW_GDI_Point2D_t location; - - location.x = bounds.point.x - origin.x; - location.y = bounds.point.y - origin.y; - - // If necessary adjust the location and size - if ((iSize.width != bounds.dimension.width) || - (iSize.height != bounds.dimension.height) || - (iLocation.x != location.x) || (iLocation.y != location.y) || - iForceSyncPluginInst) - { - AttachPluginInst(location, bounds.dimension); - iForceSyncPluginInst = EFalse; - } - } - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::HandleVerticalLayout -// -// Implements the the Object handling rules for vertical layout -// 1. Scale the box maintaining the aspect ratio if width is greater than display width -// 2. Scale the box maintaining the aspect ratio if height is greater than display height -// 3. If box is too small it doesn't participate in the layout. -// ----------------------------------------------------------------------------- -// -void CLMgrObjectBox::HandleVerticalLayout(const NW_GDI_Dimension2D_t& aOrigSize, - NW_GDI_Dimension2D_t& aNewSize) - { - CGDIDeviceContext* deviceContext = NULL; - NW_GDI_Rectangle_t rectangle; - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_GDI_Metric_t maxWidth = 0; - NW_GDI_Metric_t maxHeight = 0; - NW_LMgr_RootBox_t* rootBox = NULL; - - // Get the root box. - rootBox = NW_LMgr_Box_GetRootBox(iBox); - NW_ASSERT(rootBox != NULL); - - // Determine the maximum width and height for the box. - deviceContext = NW_LMgr_RootBox_GetDeviceContext(rootBox); - NW_ASSERT(deviceContext != NULL); - - rectangle = *(deviceContext->DisplayBounds()); - - NW_LMgr_Box_GetPadding(iBox, &padding, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(iBox, &borderWidth, ELMgrFrameAll ); - - maxWidth = (NW_GDI_Metric_t) (rectangle.dimension.width - padding.left - - padding.right - borderWidth.right - borderWidth.left - 6); - maxHeight = (NW_GDI_Metric_t) (rectangle.dimension.height - padding.top - - padding.bottom - borderWidth.top - borderWidth.bottom); - - aNewSize = aOrigSize; - - // Scale the box maintaining the aspect ratio if height is greater than display height. - if (aOrigSize.height > maxHeight) - { - aNewSize.width = (NW_GDI_Metric_t) ((maxHeight * aOrigSize.width) / aOrigSize.height); - aNewSize.height = maxHeight; - } - - // Scale the box maintaining the aspect ratio if width is greater than display width. - if (aNewSize.width > maxWidth) - { - aNewSize.height = (NW_GDI_Metric_t) ((maxWidth * aNewSize.height) / aNewSize.width); - aNewSize.width = maxWidth; - } - } - -// ----------------------------------------------------------------------------- -// CLMgrObjectBox::ClipText -// -// Creates a copy of aText such that it width is <= aAvailableSpace -- truncating -// as necessary. -// ----------------------------------------------------------------------------- -// -// TODO Share with IamgeContainerBox -TDesC* CLMgrObjectBox::ClipText(const TDesC& aText, const CGDIDeviceContext& aDeviceContext, - NW_GDI_Metric_t aAvailableSpace, TBool aAddDots) - { - _LIT(kDots, "..."); - - CGDIDeviceContext* deviceContext = NULL; - CGDIFont* font = NULL; - NW_GDI_FlowDirection_t dir = NW_GDI_FlowDirection_LeftRight; - NW_Text_UCS2_t nwText; - NW_Text_Length_t clipLength; - NW_Text_Length_t newLength; - HBufC* clippedText = NULL; - TBool addDots = aAddDots; - - NW_TRY(status) - { - // For convenience. - deviceContext = CONST_CAST(CGDIDeviceContext*, &aDeviceContext); - - // Get the box font. - font = NW_LMgr_Box_GetFont(iBox); - NW_THROW_ON_NULL(font, status, KBrsrUnexpectedError); - - // Wrap aText in an NW_Text_t - status = NW_Text_UCS2_Initialize(&nwText, (void*) aText.Ptr(), aText.Length(), 0); - NW_THROW_ON_ERROR (status); - - // Clip the text - status = deviceContext->SplitText((NW_Text_t*) &nwText, font, aAvailableSpace, - 0, dir, &clipLength, NW_GDI_SplitMode_Clip); - NW_THROW_ON_ERROR (status); - - // If the text fits in the space or if "..." aren't to be appended then set - // the copy-length to clipLength. - if ((clipLength == NW_Text_GetCharCount(&nwText)) || (!aAddDots)) - { - newLength = clipLength; - addDots = EFalse; - } - - // Otherwise split it again, but this time subtracting the length of "..." - // from available space. - else - { - NW_GDI_Dimension2D_t dotsExtent; - - // Wrap aText in an NW_Text_t - status = NW_Text_UCS2_Initialize(&nwText, (void*) kDots().Ptr(), - kDots().Length(), 0); - NW_THROW_ON_ERROR (status); - - // Get the width of the dots - dotsExtent.height = 0; - dotsExtent.width = 0; - - status = deviceContext->GetTextExtent((NW_Text_t*)(&nwText), font, - 0, NW_GDI_FlowDirection_LeftRight, &dotsExtent); - NW_THROW_ON_ERROR (status); - - // Wrap aText in an NW_Text_t - status = NW_Text_UCS2_Initialize(&nwText, (void*) aText.Ptr(), aText.Length(), 0); - NW_THROW_ON_ERROR (status); - - // Clip the text again this time less the dotExtent - status = deviceContext->SplitText((NW_Text_t*) &nwText, font, - aAvailableSpace - dotsExtent.width, 0, dir, &clipLength, NW_GDI_SplitMode_Clip); - NW_THROW_ON_ERROR (status); - - newLength = clipLength + kDots().Length(); - - // CGDIDeviceContext::SplitText returns a clipLength of at least one - // char. Because of this a special case is needed. This case occurs when - // none of the text fits in aAvailableSpace and aAddDots is true. In this - // case the added dots may require more space than aAvailableSpace. - if ((clipLength == 1) && (dotsExtent.width > aAvailableSpace)) - { - newLength = 0; - } - } - - // Copy the cliped text - if (newLength > 0) - { - clippedText = HBufC::New(newLength + 1); - NW_THROW_OOM_ON_NULL(clippedText, status); - - clippedText->Des().Append(aText.Ptr(), clipLength); - - if (addDots) - { - clippedText->Des().Append(kDots().Ptr(), kDots().Length()); - } - - clippedText->Des().ZeroTerminate(); - } - } - - NW_CATCH (status) - { - delete clippedText; - clippedText = NULL; - } - - NW_FINALLY - { - return clippedText; - } - NW_END_TRY - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrObjectBoxOOC.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrObjectBoxOOC.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Box class associated with the handling object tags. -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <e32def.h> - -#include "LMgrObjectBoxOOCi.h" -#include "LMgrObjectBox.h" - -// ----------------------------------------------------------------------------- -#define GetImpl(_b) (NW_LMgr_ObjectBoxOf(_b)->iObjectBox) - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const -NW_LMgr_ObjectBox_Class_t NW_LMgr_ObjectBox_Class = -{ - { /* NW_Object_Core */ - /* super */ &NW_LMgr_MediaBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_ObjectBox_t), - /* construct */ _NW_LMgr_ObjectBox_Construct, - /* destruct */ _NW_LMgr_ObjectBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_ObjectBox_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_ObjectBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_ObjectBox_Draw, - /* render */ _NW_LMgr_ObjectBox_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ 0 - }, - { /* NW_LMgr_ObjectBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ObjectBox_Construct -// Description: The constructor. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -_NW_LMgr_ObjectBox_Construct(NW_Object_Dynamic_t* dynamicObject, va_list* argp) - { - CLMgrObjectBox* objectBox = NULL; - - NW_TRY (status) - { - // Invoke our superclass constructor - status = NW_LMgr_MediaBox_Class.NW_Object_Dynamic.construct(dynamicObject, argp); - NW_THROW_ON_ERROR(status); - - // Create the implementation instance, iObjectBox - TRAPD(err, objectBox = CLMgrObjectBox::NewL(NW_LMgr_BoxOf(dynamicObject))); - NW_THROW_ON_TRAP_ERROR(err, status); - - NW_LMgr_ObjectBoxOf(dynamicObject)->iObjectBox = objectBox; - } - - NW_CATCH (status) - { - delete NW_LMgr_ObjectBoxOf(dynamicObject)->iObjectBox; - NW_LMgr_ObjectBoxOf(dynamicObject)->iObjectBox = NULL; - } - - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// _NW_LMgr_ObjectBox_Destruct -// Description: The destructor. -// Returns: void -// ----------------------------------------------------------------------------- -// -void -_NW_LMgr_ObjectBox_Destruct(NW_Object_Dynamic_t* dynamicObject) - { - // Delete the implementation instance - delete NW_LMgr_ObjectBoxOf(dynamicObject)->iObjectBox; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_ObjectBox_Split(NW_LMgr_Box_t* box, NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, NW_Uint8 flags) - { - NW_REQUIRED_PARAM(box); - - // Pass it on to the implementation - return GetImpl(box)->Split(space, splitBox, flags); - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ObjectBox_GetMinimumContentSize(NW_LMgr_Box_t* box, NW_GDI_Dimension2D_t* size) - { - NW_REQUIRED_PARAM(box); - - NW_ASSERT(size != NULL); - - // Pass it on to the implementation - GetImpl(box)->GetMinimumContentSize(*size); - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ObjectBox_Draw(NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - NW_REQUIRED_PARAM(box); - - // Pass it on to the implementation - return GetImpl(box)->Draw(*deviceContext, hasFocus); - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_LMgr_ObjectBox_Render (NW_LMgr_Box_t* box, CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, NW_LMgr_Box_t* currentBox, NW_Uint8 flags, - NW_Bool* hasFocus, NW_Bool* skipChildren, NW_LMgr_RootBox_t* rootBox ) - { - NW_REQUIRED_PARAM(box); - - NW_ASSERT(deviceContext != NULL); - NW_ASSERT(rootBox != NULL); - NW_ASSERT(clipRect != NULL); - NW_ASSERT(hasFocus != NULL); - NW_ASSERT(skipChildren != NULL); - - // Pass it on to the implementation - return GetImpl(box)->Render(*deviceContext, *rootBox, *clipRect, currentBox, - flags, *hasFocus, *skipChildren); - } -// ----------------------------------------------------------------------------- -NW_Bool -NW_LMgr_ObjectBox_IsActive(NW_LMgr_Box_t* box) - { - NW_REQUIRED_PARAM(box); - - // Pass it on to the implementation - return (NW_Bool) GetImpl(box)->IsActive(); - } - -/* ------------------------------------------------------------------------- * - public final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -NW_LMgr_ObjectBox_t* -NW_LMgr_ObjectBox_New (NW_ADT_Vector_Metric_t numProperties) - { - return (NW_LMgr_ObjectBox_t*) NW_Object_New(&NW_LMgr_ObjectBox_Class, - numProperties); - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrPosFlowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrPosFlowBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,966 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_posflowboxi.h" -#include "nw_lmgr_formatcontext.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_cssproperties.h" -#include "NW_LMgr_IEventListener.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_verticaltablecellboxi.h" -#include "nw_lmgr_abstracttextboxi.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_breakbox.h" - -/* --------------------------------------------------------------------------* - * FORWARD DECLARATIONS * - * --------------------------------------------------------------------------*/ -static void NW_LMgr_PosFlowBox_GetMinSize(NW_LMgr_Box_t* aBox, - NW_GDI_Dimension2D_t& aMinSize); - - -static NW_LMgr_Box_t* NW_LMgr_PosFlowBox_GetPrev(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_ASSERT(aPosFlowBox != NULL); - NW_LMgr_Box_t* box = NW_LMgr_BoxOf(aPosFlowBox); - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(box); - NW_Int16 index = 0; - NW_LMgr_Box_t* prevBox = NULL; - do - { - index = NW_LMgr_ContainerBox_GetChildIndex(parent, box); - if (index > 0) - { - break; - } - box = NW_LMgr_BoxOf(parent); - parent = NW_LMgr_Box_GetParent(box); - } - while (parent != NULL); - if (index > 0) - { - prevBox = NW_LMgr_ContainerBox_GetChild(parent, (NW_Uint16)(index - 1)); - } - return prevBox; - } - -// NW_LMgr_PosFlowBox_CalculatePosition must be called prior to calling this function -static NW_GDI_Metric_t NW_LMgr_PosFlowBox_GetWidth(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_LMgr_Box_t* box = (NW_LMgr_Box_t*) aPosFlowBox; - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), (NW_ADT_Vector_Metric_t)0); - NW_ASSERT(child != NULL); // This child is the box with position:absolue property - NW_ASSERT(NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box)) == 1); - - NW_LMgr_RootBox_t *rootBox = NW_LMgr_Box_GetRootBox(box); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext != NULL); - NW_GDI_Metric_t width = deviceContext->DisplayBounds()->dimension.width; - if (aPosFlowBox->iContainingBlock != NULL) - { - width = aPosFlowBox->iContainingBlock->iFormatBounds.dimension.width; - } - - NW_LMgr_Property_t property; - property.type = NW_CSS_ValueType_Token; - TBrowserStatusCode status = NW_LMgr_Box_GetProperty(child, NW_CSS_Prop_width, &property); - TBool hasWidth = EFalse; - - // Get the width is it is specified - if (status == KBrsrSuccess) - { - switch (property.type) - { - case NW_CSS_ValueType_Px: - width = property.value.integer; - hasWidth = ETrue; - box->iFormatBounds.dimension.width = width; - child->iFormatBounds.dimension.width = width; - break; - case NW_CSS_ValueType_Percentage: - { - NW_Float32 percent = 0; - percent = (property.value.decimal * width) / 100; - width = (NW_GDI_Metric_t)percent; - hasWidth = ETrue; - box->iFormatBounds.dimension.width = width; - child->iFormatBounds.dimension.width = width; - break; - } - default: - break; - } - } - if (!hasWidth) - { - // Both left and right are specified, calculate the width from that - if (aPosFlowBox->iHasLeft && aPosFlowBox->iHasRight) - { - width -= (aPosFlowBox->iLeft + aPosFlowBox->iRight); - } - else if (aPosFlowBox->iLeft > 0) - { - if (aPosFlowBox->iLeft < width) - { - width -= aPosFlowBox->iLeft; - } - } - else if (aPosFlowBox->iRight > 0) - { - if (aPosFlowBox->iRight < width) - { - width -= aPosFlowBox->iRight; - } - } - } - if (width < NW_LMGR_BOX_MIN_WIDTH) - { - width = NW_LMGR_BOX_MIN_WIDTH; - } - return width; - } - -// NW_LMgr_PosFlowBox_CalculatePosition must be called prior to calling this function -static NW_GDI_Metric_t NW_LMgr_PosFlowBox_GetHeight(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_LMgr_Box_t* box = (NW_LMgr_Box_t*) aPosFlowBox; - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), (NW_ADT_Vector_Metric_t)0); - NW_ASSERT(child != NULL); // This child is the box with position:absolue property - NW_ASSERT(NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box)) == 1); - - NW_LMgr_RootBox_t *rootBox = NW_LMgr_Box_GetRootBox(box); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext != NULL); - NW_GDI_Metric_t height = deviceContext->DisplayBounds()->dimension.height; - if (aPosFlowBox->iContainingBlock != NULL) - { - height = aPosFlowBox->iContainingBlock->iFormatBounds.dimension.height; - } - - NW_LMgr_Property_t property; - property.type = NW_CSS_ValueType_Token; - TBrowserStatusCode status = NW_LMgr_Box_GetProperty(child, NW_CSS_Prop_height, &property); - TBool hasHeight = EFalse; - - // Get the width is it is specified - if (status == KBrsrSuccess) - { - switch (property.type) - { - case NW_CSS_ValueType_Px: - height = property.value.integer; - hasHeight = ETrue; - box->iFormatBounds.dimension.height = height; - child->iFormatBounds.dimension.height = height; - break; - case NW_CSS_ValueType_Percentage: - { - NW_Float32 percent = 0; - percent = (property.value.decimal * height) / 100; - height = (NW_GDI_Metric_t)percent; - hasHeight = ETrue; - box->iFormatBounds.dimension.height = height; - child->iFormatBounds.dimension.height = height; - break; - } - default: - break; - } - } - if (!hasHeight) - { - // Both top and bottom are specified, calculate the height from that, - // and set it on the box - if (aPosFlowBox->iHasTop && aPosFlowBox->iHasBottom) - { - height -= (aPosFlowBox->iTop + aPosFlowBox->iBottom); - NW_LMgr_Property_t prop; - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = height; - NW_LMgr_Box_SetProperty (child, NW_CSS_Prop_height, &prop); - } - else if (aPosFlowBox->iTop > 0) - { - height -= aPosFlowBox->iTop; - } - else if (aPosFlowBox->iBottom > 0) - { - height -= aPosFlowBox->iBottom; - } - } - if (height < NW_LMGR_BOX_MIN_HEIGHT) - { - height = NW_LMGR_BOX_MIN_HEIGHT; - } - return height; - } - -#if 0 -static void NW_LMgr_PosFlowBox_SetProperty(NW_LMgr_PosFlowBox_t* aPosFlowBox, NW_LMgr_Property_t* aProp, - NW_LMgr_PropertyName_t aPropName) - { - NW_LMgr_Property_t prop; - prop.value.object = NULL; - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aPosFlowBox), - (NW_ADT_Vector_Metric_t)0); - NW_LMgr_Box_SetProperty(child, aPropName, aProp); - if (NW_Object_IsInstanceOf(child, &NW_LMgr_ContainerBox_Class)) - { - (void)NW_LMgr_Box_GetProperty(child, NW_CSS_Prop_sibling, &prop); - NW_LMgr_ContainerBox_t* siblingBox; - while(prop.value.object && (NW_LMgr_BoxOf(prop.value.object) != child)) - { - siblingBox = NW_LMgr_ContainerBoxOf(prop.value.object); - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(siblingBox), aPropName, aProp); - prop.value.object = NULL; - (void)NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(siblingBox), NW_CSS_Prop_sibling, &prop); - } - } - } -#endif - -static void NW_LMgr_PosFlowBox_GetMinContainerSize(NW_LMgr_Box_t* aBox, - NW_GDI_Dimension2D_t& aMinSize) - { - NW_ADT_Vector_Metric_t count = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aBox)); - NW_ADT_Vector_Metric_t index; - NW_GDI_Dimension2D_t size; - NW_GDI_Dimension2D_t prevSize; - size.width = prevSize.width = 0; - - for (index = 0; index < count; index++) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aBox), index); - NW_LMgr_PosFlowBox_GetMinSize(child, size); - if (size.width > prevSize.width) - { - prevSize.width = size.width; - } - } - aMinSize.width = prevSize.width; - } - -static void NW_LMgr_PosFlowBox_GetMinSize(NW_LMgr_Box_t* aBox, - NW_GDI_Dimension2D_t& aMinSize) - { - if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_AbstractTextBox_Class)) - { - (void)NW_LMgr_AbstractTextBox_GetMinimumSizeByWord(NW_LMgr_AbstractTextBoxOf(aBox), &aMinSize); - } - else if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_StaticTableBox_Class)) - { - NW_LMgr_PosFlowBox_GetMinContainerSize(aBox, aMinSize); - } - else if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_PosFlowBox_Class)) - { - aMinSize.width = 0;; - } - else if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_StaticTableRowBox_Class)) - { - NW_ADT_Vector_Metric_t count = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aBox)); - NW_GDI_Dimension2D_t size; - NW_ADT_Vector_Metric_t index; - aMinSize.width = 0; - - for (index = 0; index < count; index++) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aBox), index); - NW_LMgr_PosFlowBox_GetMinSize(child, size); - aMinSize.width += size.width; - } - } - - else if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_ContainerBox_Class)) - { - NW_LMgr_PosFlowBox_GetMinContainerSize(aBox, aMinSize); - } - else - { - aMinSize.width = aBox->iFormatBounds.dimension.width; - } - } - - -// Adjusting the size is needed if the positioned box initial width was not a good choice -// That could happen if the "left" property is bigger than the width of the containing block, -// or if the "right" property was specified, and the positioned box is wider than the content -// If the width property exists, then we just use that, and no need to -static TBool NW_LMgr_PosFlowBox_AdjustSizeNeeded(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - const TInt extraSpace = 10; - NW_LMgr_Box_t* box = (NW_LMgr_Box_t*) aPosFlowBox; - NW_LMgr_Box_t* firstChild = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), (NW_ADT_Vector_Metric_t)0); - NW_ASSERT(firstChild != NULL); // must have at least one child - NW_LMgr_Property_t widthProp; - TBrowserStatusCode status = NW_LMgr_Box_GetProperty(firstChild, NW_CSS_Prop_width, &widthProp); - // The width was not specified - if (status == KBrsrNotFound) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aPosFlowBox); - NW_ASSERT(rootBox != NULL); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext != NULL); - - NW_GDI_Rectangle_t displayBounds; - if (aPosFlowBox->iContainingBlock == NULL) - { - displayBounds = (*deviceContext->DisplayBounds()); - } - else - { - if( (aPosFlowBox->iContainingBlock != NULL) && - NW_Object_IsInstanceOf(aPosFlowBox->iContainingBlock, &NW_LMgr_Box_Class) ) - { - displayBounds = NW_LMgr_Box_GetFormatBounds(NW_LMgr_BoxOf(aPosFlowBox->iContainingBlock)); - } - else - { - displayBounds = (*deviceContext->DisplayBounds()); - } - } - - NW_GDI_Dimension2D_t size; - size.width = box->iFormatBounds.dimension.width; - - // If the default width was too large, just adjust it - if ((NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aPosFlowBox)) == 1) && - (firstChild->iFormatBounds.point.x == box->iFormatBounds.point.x) && - (firstChild->iFormatBounds.dimension.width < box->iFormatBounds.dimension.width - extraSpace)) - { - box->iFormatBounds.dimension.width = firstChild->iFormatBounds.dimension.width + 5; - } - // If we have a positioned <div> element whose content is not as wide as the screen - // By default <div> gets the width of the screen. This is a problem only if the <div> has a - // "right" attribute - else if (aPosFlowBox->iHasRight) - { - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(aPosFlowBox)) == 1) - { - if (NW_Object_IsInstanceOf(firstChild, &NW_LMgr_ContainerBox_Class)) - { - NW_LMgr_Box_t* theChild = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(firstChild), - (NW_ADT_Vector_Metric_t)0); - if (theChild->iFormatBounds.dimension.width < firstChild->iFormatBounds.dimension.width + extraSpace) - { - size.width = theChild->iFormatBounds.dimension.width + 5; - } - } - } - } - else if (aPosFlowBox->iHasLeft && (aPosFlowBox->iLeft > displayBounds.dimension.width)) - { - NW_LMgr_PosFlowBox_GetMinContainerSize(box, size); - // Our algorithm is not accurate and "chops off" the last letter - size.width += 5; - } - - if (size.width < box->iFormatBounds.dimension.width - extraSpace) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aPosFlowBox); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - boxTreeListener->Collapse(NW_LMgr_FlowBoxOf(aPosFlowBox), NW_TRUE); - - NW_LMgr_BoxVisitor_t visitor; - NW_LMgr_Box_t* nextBox = NULL; - NW_LMgr_BoxVisitor_Initialize(&visitor, box); - NW_GDI_Rectangle_t boxBounds; - NW_Bool skip = NW_FALSE; - - //nextBox = NW_LMgr_BoxVisitor_NextBox(&visitor, &skip); - NW_Mem_memset(&(boxBounds), 0, sizeof(NW_GDI_Rectangle_t)); - while ((nextBox = NW_LMgr_BoxVisitor_NextBox(&visitor, &skip)) != NULL) - { - NW_LMgr_Box_SetFormatBounds( nextBox, boxBounds ); - NW_LMgr_Box_UpdateDisplayBounds( nextBox, boxBounds ); - } - NW_LMgr_Property_t property; - property.type = NW_CSS_ValueType_Px; - property.value.integer = size.width; - firstChild = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), (NW_ADT_Vector_Metric_t)0); - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(firstChild), NW_CSS_Prop_width, &property); - return ETrue; - } - } - return EFalse; - } - - -const -NW_LMgr_PosFlowBox_Class_t NW_LMgr_PosFlowBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_PosFlowBox_t), - /* construct */ _NW_LMgr_PosFlowBox_Construct, - /* destruct */ _NW_LMgr_PosFlowBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_PosFlowBox_Split, - /* resize */ _NW_LMgr_PosFlowBox_Resize, - /* postResize */ _NW_LMgr_PosFlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_PosFlowBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_PosFlowBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_PosFlowBox_Constrain, - /* draw */ _NW_LMgr_PosFlowBox_Draw, - /* render */ _NW_LMgr_PosFlowBox_Render, - /* getBaseline */ _NW_LMgr_PosFlowBox_GetBaseline, - /* shift */ _NW_LMgr_PosFlowBox_Shift, - /* clone */ _NW_LMgr_PosFlowBox_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_PosFlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - } -}; - - - - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_PosFlowBox_t* -NW_LMgr_PosFlowBox_New (NW_ADT_Vector_Metric_t numProperties) - { - NW_LMgr_PosFlowBox_t* box = (NW_LMgr_PosFlowBox_t*) - NW_Object_New (&NW_LMgr_PosFlowBox_Class, numProperties); - return box; - } - -// ----------------------------------------------------------------------------- -// _NW_LMgr_PosFlowBox_Destruct -// Description: The destructor. -// Returns: void -// ----------------------------------------------------------------------------- -// -void -_NW_LMgr_PosFlowBox_Destruct( NW_Object_Dynamic_t* /*dynamicObject */) - { - } - - -// Helper function that copies the position to class members -TBrowserStatusCode NW_LMgr_PosFlowBox_AssignPos(NW_LMgr_PropertyName_t aPropertyName, - NW_Int32 &aValue, NW_LMgr_Box_t* aBox) - { - NW_LMgr_Property_t property; - property.type = NW_CSS_ValueType_Token; - TBrowserStatusCode status = NW_LMgr_Box_GetProperty(aBox, aPropertyName, &property); - if (status == KBrsrSuccess) - { - switch (property.type) - { - case NW_CSS_ValueType_Px: - aValue = property.value.integer; - break; - case NW_CSS_ValueType_Percentage: - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aBox); - NW_ASSERT(rootBox != NULL); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext != NULL); - const NW_GDI_Rectangle_t* displayBounds = deviceContext->DisplayBounds(); - NW_ASSERT(displayBounds != NULL); - NW_Float32 percent = 0; - if (aPropertyName == NW_CSS_Prop_left || aPropertyName == NW_CSS_Prop_right) - { - percent = (property.value.decimal * displayBounds->dimension.width) / 100; - } - else if (aPropertyName == NW_CSS_Prop_top || aPropertyName == NW_CSS_Prop_bottom) - { - percent = (property.value.decimal * displayBounds->dimension.height) / 100; - } - - aValue = (NW_Int32)percent; - break; - } - default: - break; - } - } - return status; - } - -void NW_LMgr_PosFlowBox_CalculatePosition(NW_LMgr_PosFlowBox_t* aPosFlowBox, NW_LMgr_Box_t* aBox) - { - NW_ASSERT(aPosFlowBox != NULL); - NW_ASSERT(aBox != NULL); - NW_LMgr_PropertyValue_t positionVal; - positionVal.token = NW_CSS_PropValue_none; - - (void)NW_LMgr_Box_GetPropertyValue(aBox, NW_CSS_Prop_position, - NW_CSS_ValueType_Token, &positionVal); - NW_ASSERT(positionVal.token == NW_CSS_PropValue_position_absolute); - - if (NW_LMgr_PosFlowBox_AssignPos(NW_CSS_Prop_left, aPosFlowBox->iLeft, aBox) == KBrsrSuccess) - { - aPosFlowBox->iHasLeft = NW_TRUE; - } - if (NW_LMgr_PosFlowBox_AssignPos(NW_CSS_Prop_right, aPosFlowBox->iRight, aBox) == KBrsrSuccess) - { - aPosFlowBox->iHasRight = NW_TRUE; - } - if (NW_LMgr_PosFlowBox_AssignPos(NW_CSS_Prop_top, aPosFlowBox->iTop, aBox) == KBrsrSuccess) - { - aPosFlowBox->iHasTop= NW_TRUE; - } - if (NW_LMgr_PosFlowBox_AssignPos(NW_CSS_Prop_bottom, aPosFlowBox->iBottom, aBox) == KBrsrSuccess) - { - aPosFlowBox->iHasBottom = NW_TRUE; - } - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) - { - TBrowserStatusCode status = _NW_LMgr_ContainerBox_Construct(dynamicObject, argp); - NW_LMgr_PosFlowBox_t* box = (NW_LMgr_PosFlowBox_t*) dynamicObject; - if (status == KBrsrSuccess) - { - box->iLeft = 0; - box->iRight = 0; - box->iTop = 0; - box->iBottom = 0; - box->iHasLeft = NW_FALSE; - box->iHasRight = NW_FALSE; - box->iHasTop = NW_FALSE; - box->iHasBottom = NW_FALSE; - box->iContainingBlock = NULL; - } - return status; - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Split(NW_LMgr_Box_t* box, - NW_GDI_Metric_t space, - NW_LMgr_Box_t** splitBox, - NW_Uint8 flags) - { - return _NW_LMgr_Box_Split(box, space, splitBox, flags); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) - { - return _NW_LMgr_FlowBox_Resize(box, context); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_PostResize(NW_LMgr_Box_t* box) - { - return _NW_LMgr_FlowBox_PostResize(box); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_GetMinimumContentSize(NW_LMgr_Box_t* box, - NW_GDI_Dimension2D_t *size) - { - return _NW_LMgr_Box_GetMinimumContentSize(box, size); - - } - -NW_Bool -_NW_LMgr_PosFlowBox_HasFixedContentSize(NW_LMgr_Box_t *box) - { - return _NW_LMgr_Box_HasFixedContentSize(box); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Constrain(NW_LMgr_Box_t* box, NW_GDI_Metric_t constraint) - { - return _NW_LMgr_FormatBox_Constrain(box, constraint); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) - { - return _NW_LMgr_Box_Draw (box, deviceContext, hasFocus); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ) - { - return _NW_LMgr_ContainerBox_Render (box, deviceContext, clipRect, currentBox, - flags, hasFocus, skipChildren, rootBox ); - } - -NW_GDI_Metric_t -_NW_LMgr_PosFlowBox_GetBaseline(NW_LMgr_Box_t* box) - { - return _NW_LMgr_FlowBox_GetBaseline(box); - } - -TBrowserStatusCode -_NW_LMgr_PosFlowBox_Shift (NW_LMgr_Box_t* box, - NW_GDI_Point2D_t *delta) - { - return _NW_LMgr_ContainerBox_Shift (box, delta); - } - -NW_LMgr_Box_t* -_NW_LMgr_PosFlowBox_Clone (NW_LMgr_Box_t* box) - { - return _NW_LMgr_Box_Clone (box); - } - -// This function is a copy of _NW_LMgr_ContainerBox_ApplyFormatProps -// with the exception that the minimun size is the size of the root box -TBrowserStatusCode -_NW_LMgr_PosFlowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context) - { - - NW_LMgr_PosFlowBox_t* posBox = (NW_LMgr_PosFlowBox_t*) format; - NW_LMgr_Box_t* box = (NW_LMgr_Box_t*) format; - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), (NW_ADT_Vector_Metric_t)0); - NW_ASSERT(child != NULL); // This child is the box with position:absolue property - NW_ASSERT(NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box)) == 1); - NW_LMgr_PosFlowBox_CalculatePosition(posBox, child); - - NW_LMgr_RootBox_t *rootBox = NW_LMgr_Box_GetRootBox(box); - NW_GDI_Metric_t minWidth; - NW_LMgr_FrameInfo_t paddingInfo; - NW_LMgr_FrameInfo_t borderWidthInfo; - TBrowserStatusCode status = KBrsrSuccess; - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( format ) ); - NW_LMgr_Property_t dirProp; - - NW_LMgr_Box_GetPadding(NW_LMgr_BoxOf(format), &paddingInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderWidth(NW_LMgr_BoxOf(format), &borderWidthInfo, ELMgrFrameAll ); - - minWidth = NW_LMgr_PosFlowBox_GetWidth(posBox); - - context->startMargin = - (NW_GDI_Metric_t)(boxBounds.point.x + paddingInfo.left - + borderWidthInfo.left); - context->endMargin = (NW_GDI_Metric_t)(boxBounds.point.x - + boxBounds.dimension.width -// + minWidth - - paddingInfo.right - - borderWidthInfo.right); - - /* Set initial vertical position */ - context->y = (NW_GDI_Metric_t) (boxBounds.point.y + paddingInfo.top - + borderWidthInfo.top); - - if (context->endMargin < context->startMargin + minWidth) - { - context->endMargin = (NW_GDI_Metric_t)(context->startMargin + minWidth); - boxBounds.dimension.width = (NW_GDI_Metric_t)(minWidth + paddingInfo.left + - borderWidthInfo.left + paddingInfo.right + borderWidthInfo.right); - - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( format ), boxBounds ); - // - status = KBrsrLmgrFormatOverflow; - } - boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( format ) ); - /* Now reset initial height. This will change as children are laid out */ - boxBounds.dimension.height = (NW_GDI_Metric_t)( paddingInfo.top + paddingInfo.bottom + - borderWidthInfo.top + borderWidthInfo.bottom); - - NW_LMgr_PosFlowBox_GetHeight(posBox); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( format ), boxBounds ); - - if (!NW_Object_IsClass(format, &NW_LMgr_RootBox_Class)) { - rootBox = NW_LMgr_Box_GetRootBox (format); - NW_ASSERT (rootBox != NULL); - } - else { - rootBox = NW_LMgr_RootBoxOf(format); - } - - /* Now set the flow-specific context variables */ - context->lineStart = NW_LMgr_FlowBox_GetLineStart(NW_LMgr_FlowBoxOf(format), - context, context->y); - context->lineEnd = NW_LMgr_FlowBox_GetLineEnd(NW_LMgr_FlowBoxOf(format), - context, context->y); - - /* Get the flow direction */ - dirProp.type = NW_CSS_ValueType_Token; - dirProp.value.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetProperty(NW_LMgr_BoxOf(format), NW_CSS_Prop_textDirection, &dirProp); - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - context->direction = NW_GDI_FlowDirection_LeftRight; - } - else - { - context->direction = NW_GDI_FlowDirection_RightLeft; - } - - /* Set the initial x position */ - if (dirProp.value.token == NW_CSS_PropValue_ltr) { - context->x = (NW_GDI_Metric_t)(context->lineStart + - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - else { - context->x = (NW_GDI_Metric_t)(context->lineEnd - - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - return status; - } - - - - -void NW_LMgr_PosFlowBox_AdjustPosition(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_ASSERT(aPosFlowBox != NULL); - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(aPosFlowBox), (NW_ADT_Vector_Metric_t)0); - NW_ASSERT(child != NULL); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aPosFlowBox); - NW_ASSERT(rootBox != NULL); - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - NW_ASSERT(deviceContext != NULL); - - NW_GDI_Rectangle_t displayBounds; - NW_LMgr_Box_t* containingBlock = NW_LMgr_BoxOf(aPosFlowBox->iContainingBlock); - if (aPosFlowBox->iContainingBlock == NULL) - { - displayBounds = (*deviceContext->DisplayBounds()); - } - else - { - displayBounds = NW_LMgr_Box_GetDisplayBounds(containingBlock); - } - NW_GDI_Point2D_t delta; - - NW_LMgr_FrameInfo_t margins; - NW_LMgr_FrameInfo_t isAuto; - NW_Int8 aFrameSide = ELMgrFrameAll; - - NW_LMgr_Box_GetMargins(child, &margins, &isAuto, aFrameSide); - - delta.x = delta.y = 0; - if (aPosFlowBox->iHasLeft) - { - delta.x = aPosFlowBox->iLeft + displayBounds.point.x - child->iFormatBounds.point.x; - if (!isAuto.left) - { - delta.x += margins.left; - } - } - else if (aPosFlowBox->iHasRight) - { - delta.x = displayBounds.dimension.width + displayBounds.point.x - child->iFormatBounds.point.x - - aPosFlowBox->iRight - child->iFormatBounds.dimension.width; - if (!isAuto.right) - { - delta.x -= margins.right; - } - } - else - { - NW_LMgr_Box_t* prevBox = NW_LMgr_PosFlowBox_GetPrev(aPosFlowBox); - if (prevBox != NULL) - { - delta.x = prevBox->iFormatBounds.point.x + - prevBox->iFormatBounds.dimension.width - child->iFormatBounds.point.x; - - //if delta.x is too big, very close to the maximum, we need to add a new line. - //we put 8 for temporary, more investigation needs to be done for a reasonable number - //but first check if there already an breakbox as positionedbox sibling, if yes, don't - //insert any breakbox - if (!NW_Object_IsClass (prevBox, &NW_LMgr_BreakBox_Class) && - delta.x - displayBounds.dimension.width < 8) - { - //add an empty box to force the line to go the next line - TBrowserStatusCode status = KBrsrSuccess; - /* Create the break box */ - - NW_LMgr_Box_t* breakBox = NULL; - breakBox = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New ((NW_ADT_Vector_Metric_t)1); - if (breakBox == NULL) - return; - - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(aPosFlowBox); - status = NW_LMgr_ContainerBox_InsertChild(parent, - NW_LMgr_BoxOf(breakBox), - (NW_LMgr_Box_t*)aPosFlowBox); - if (status != KBrsrSuccess) - return; - - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - boxTreeListener->ReformatBox(NW_LMgr_BoxOf(breakBox)); - - prevBox = NW_LMgr_PosFlowBox_GetPrev(aPosFlowBox); - if (prevBox != NULL) - { - delta.x = prevBox->iFormatBounds.point.x + - prevBox->iFormatBounds.dimension.width - child->iFormatBounds.point.x; - } - - } - } - } - - if (aPosFlowBox->iHasTop) - { - delta.y = aPosFlowBox->iTop + displayBounds.point.y - child->iFormatBounds.point.y; - if (!isAuto.top) - { - delta.y += margins.top; - } - } - else if (aPosFlowBox->iHasBottom) - { - delta.y = displayBounds.dimension.height + displayBounds.point.y - - child->iFormatBounds.point.y - - aPosFlowBox->iBottom - (NW_LMgr_BoxOf(aPosFlowBox))->iFormatBounds.dimension.height; - if (!isAuto.bottom) - { - delta.y -= margins.bottom; - } - } - else - { - NW_LMgr_Box_t* prevBox = NW_LMgr_PosFlowBox_GetPrev(aPosFlowBox); - if (prevBox != NULL) - { - delta.y = prevBox->iFormatBounds.point.y - child->iFormatBounds.point.y; - } - } - - NW_LMgr_BoxVisitor_t visitor; - NW_Bool skipChildren = NW_FALSE; - - NW_LMgr_BoxVisitor_Initialize (&visitor, NW_LMgr_BoxOf (aPosFlowBox)); - while ((child = NW_LMgr_BoxVisitor_NextBox(&visitor, &skipChildren)) != NULL) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( child ); - boxBounds.point.x = (NW_GDI_Metric_t)(boxBounds.point.x + delta.x); - boxBounds.point.y = (NW_GDI_Metric_t)(boxBounds.point.y + delta.y); - NW_LMgr_Box_SetFormatBounds(child, boxBounds); - NW_LMgr_Box_UpdateDisplayBounds(child, boxBounds); - } - } - -TBrowserStatusCode NW_LMgr_PosFlowBox_AddTabItem(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_ASSERT(aPosFlowBox != NULL); - NW_LMgr_BoxVisitor_t boxVisitor; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Box_t* child = NULL; - NW_LMgr_Box_t* box = NW_LMgr_BoxOf(aPosFlowBox); - NW_Uint8 skipChildren = NW_FALSE; - - (void)NW_LMgr_BoxVisitor_Initialize(&boxVisitor, box); - - // Add tabitems for the subtree - while ((child = NW_LMgr_BoxVisitor_NextBox(&boxVisitor, &skipChildren)) != NULL) - { - // we are only looking for boxes implementing the NW_LMgr_IEventListener interface - NW_LMgr_IEventListener_t* eventListener = - (NW_LMgr_IEventListener_t*)(NW_Object_QueryInterface (child, &NW_LMgr_IEventListener_Class)); - - if (eventListener) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aPosFlowBox); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - status = boxTreeListener->BoxTreeListenerAppendTabItem (child); - if (status == KBrsrOutOfMemory) - { - return status; - } - } - } - return status; - } - -TBrowserStatusCode NW_LMgr_PosFlowBox_HandlePostFormat(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_ASSERT(aPosFlowBox != NULL); - if (NW_LMgr_PosFlowBox_AdjustSizeNeeded(aPosFlowBox)) - { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(aPosFlowBox); - MBoxTreeListener* boxTreeListener = NW_LMgr_RootBox_GetBoxTreeListener(rootBox); - boxTreeListener->ReformatBox(NW_LMgr_BoxOf(aPosFlowBox)); - } - NW_LMgr_PosFlowBox_AdjustPosition(aPosFlowBox); - return NW_LMgr_PosFlowBox_AddTabItem(aPosFlowBox); - } - -// This function adds a positioned box to the array of positioned boxes. -// If the positioned box is not nested, it is added to the end of the array. -// If the box is nested, it is added after all other boxes that have the same containing block -void NW_LMgr_PosFlowBox_AddPositionedBox(NW_LMgr_PosFlowBox_t* aPosFlowBox) - { - NW_ASSERT(aPosFlowBox != NULL); - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox( NW_LMgr_BoxOf(aPosFlowBox) ); - if (aPosFlowBox->iContainingBlock == NULL) - { - NW_ADT_DynamicVector_InsertAt(rootBox->positionedAbsObjects, &aPosFlowBox, NW_ADT_Vector_AtEnd); - } - else - { - NW_ADT_Vector_Metric_t posCount, index; - posCount = NW_ADT_Vector_GetSize(rootBox->positionedAbsObjects); - // First find the containing block - for (index = 0; index < posCount; index++) - { - if (*(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (rootBox->positionedAbsObjects, index) == aPosFlowBox->iContainingBlock) - { - break; - } - } - // Skip the containing block, and all boxes that have the same containing block - if (*(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (rootBox->positionedAbsObjects, index) == aPosFlowBox->iContainingBlock) - { - for (index++ ; index < posCount; index++) - { - if ((*(NW_LMgr_PosFlowBox_t**) NW_ADT_Vector_ElementAt (rootBox->positionedAbsObjects, index))->iContainingBlock != aPosFlowBox->iContainingBlock) - { - break; - } - } - } - // Insert the box - NW_ADT_DynamicVector_InsertAt(rootBox->positionedAbsObjects, &aPosFlowBox, index); - } - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrRootBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrRootBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,966 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_rootboxi.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_splittextbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_adt_resizablevector.h" -#include "GDIDevicecontext.h" -#include "nw_lmgr_breakbox.h" -#include "nwx_settings.h" -#include "nw_lmgr_simplepropertylist.h" - -#include "nw_image_epoc32simpleimage.h" -#include "nw_image_virtualimage.h" -#include "nw_lmgr_imgcontainerbox.h" - -#include <stddef.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -/* PRIVATE METHODS */ -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* BLINK IMPLEMENTATION */ -/* ------------------------------------------------------------------------- */ - -static -TBrowserStatusCode -NW_LMgr_RootBox_Blink(NW_LMgr_RootBox_t* thisObj) -{ - NW_LMgr_BoxVisitor_t* visitor = NULL; - - NW_TRY (status) { - NW_LMgr_PropertyValue_t textDecoration; - NW_LMgr_Box_t *child; - - /* Change the state */ - if (thisObj->blinkState) { - thisObj->blinkState = NW_FALSE; - } - else { - thisObj->blinkState = NW_TRUE; - } - - /* Refresh the tree */ - visitor = - NW_LMgr_ContainerBox_GetBoxVisitor(thisObj); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Iterate through all children */ - child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL); - while ((child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL)) != NULL) { - - /* Refresh all text boxes */ - if (NW_Object_IsInstanceOf(child, &NW_LMgr_AbstractTextBox_Class)) { - - /* Does the box blink? */ - textDecoration.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_textDecoration, - NW_CSS_ValueType_Token, &textDecoration); - - /* Refresh */ - if ((textDecoration.token == NW_CSS_PropValue_blink) || - (textDecoration.token == NW_CSS_PropValue_blinkUnderline)) - { - status = NW_LMgr_Box_Refresh(child); - _NW_THROW_ON_ERROR(status); - } - } - } - - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Delete(visitor); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_RootBox_BlinkCallback (void *timerData) -{ - NW_TRY (status) { - NW_LMgr_RootBox_t *thisObj; - - /* cast timerData to a box */ - thisObj = NW_LMgr_RootBoxOf (timerData); - NW_ASSERT (thisObj); - - /* make sure it is a RootBox */ - NW_ASSERT (NW_Object_IsClass (thisObj, &NW_LMgr_RootBox_Class)); - - /* If the display is suspended, do nothing */ - if (!thisObj->hasFocus) { - return KBrsrSuccess; - } - - /* i-mode HTML Elements CUIS 28.0 limits blinks to 16 */ - if (thisObj->blinkState == NW_FALSE) { - thisObj->blinkCount--; - if (thisObj->blinkCount == 0) { - NW_Object_Delete (thisObj->blinkTimer); - thisObj->blinkTimer = NULL; - thisObj->isBlinking = NW_FALSE; - return KBrsrSuccess; - } - } - - status = NW_LMgr_RootBox_Blink(thisObj); - _NW_THROW_ON_ERROR (status); - -} NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const -NW_LMgr_RootBox_Class_t NW_LMgr_RootBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_RootBox_t), - /* construct */ _NW_LMgr_RootBox_Construct, - /* destruct */ _NW_LMgr_RootBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_Box_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_RootBox_Render, - /* getBaseline */ _NW_LMgr_ContainerBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_ContainerBox_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_RootBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_RootBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_RootBox_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_RootBoxOf (dynamicObject); - - NW_TRY (status) { - NW_HED_AppServices_t* appServices; - - /* invoke our superclass constructor */ - status = _NW_LMgr_ContainerBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - appServices = va_arg (*argp, NW_HED_AppServices_t*); - thisObj->appServices = appServices; - - /* We must generate the cache later */ - thisObj->renderFromCache = NW_FALSE; - - thisObj->renderingState = NW_LMgr_RootBox_RenderUninitialized; - - /* Allocate the float vectors */ - thisObj->placedFloats = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->placedFloats, status); - - thisObj->pendingFloats = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->pendingFloats, status); - - thisObj->positionedAbsObjects = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->positionedAbsObjects, status); - thisObj->iPositionedBoxesPlaced = NW_FALSE; - - // allocate the vector - thisObj->iOutOfViewListeners = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_Image_Epoc32Simple_t*), 5, 2 ); - NW_THROW_OOM_ON_NULL (thisObj->iOutOfViewListeners, status); - - /* create canned images */ - thisObj->cannedImages = NW_Image_CannedImages_New(); - - // - thisObj->outstandingImageOpenings = 0; - - thisObj->needsRelayout = NW_FALSE; - - thisObj->focusBox = NULL; - - // initiate cached settings - thisObj->iSmallScreenOn = NW_Settings_GetVerticalLayoutEnabled(); - - thisObj->iWrapEnabled = NW_Settings_GetTextWrapEnabled(); - // unset. initialize during the first IsPageRTL() call - thisObj->iIsPageRTL = -1; - - thisObj->iYScrollChange = 0; - - } NW_CATCH (status) { - NW_Object_Delete(thisObj->placedFloats); - NW_Object_Delete(thisObj->pendingFloats); - NW_Object_Delete(thisObj->positionedAbsObjects); - NW_Object_Delete(thisObj->iOutOfViewListeners); - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_RootBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_RootBox_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_RootBoxOf (dynamicObject); - - /* Delete the float vectors */ - (void) NW_ADT_DynamicVector_Clear(thisObj->placedFloats); - (void) NW_ADT_DynamicVector_Clear(thisObj->pendingFloats); - (void) NW_ADT_DynamicVector_Clear(thisObj->positionedAbsObjects); - (void) NW_ADT_DynamicVector_Clear(thisObj->iOutOfViewListeners); - NW_Object_Delete(thisObj->placedFloats); - NW_Object_Delete(thisObj->pendingFloats); - NW_Object_Delete(thisObj->positionedAbsObjects); - NW_Object_Delete(thisObj->iOutOfViewListeners); - - /* Just in case: this will delete the cache vectors */ - NW_LMgr_RootBox_InvalidateCache(thisObj); - - /* Destroy the blink timer */ - if (thisObj->blinkTimer != NULL) { - NW_Object_Delete (thisObj->blinkTimer); - } - - /* destroy canned images */ - if (thisObj->cannedImages) { - NW_Object_Delete(thisObj->cannedImages); - } - -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_RootBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t* currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ) -{ - NW_LMgr_RootBox_t *thisObj = NW_LMgr_RootBoxOf(box); - NW_ADT_Vector_Metric_t floatCount, index; - NW_LMgr_Box_t *floatBox; - NW_GDI_Rectangle_t oldClip; - NW_Bool tempHasFocus; - - NW_REQUIRED_PARAM( hasFocus ); - NW_REQUIRED_PARAM( rootBox ); - NW_REQUIRED_PARAM( skipChildren ); - - // Save the old clip rect - oldClip = deviceContext->ClipRect(); - - NW_TRY (status) - { - - NW_REQUIRED_PARAM(flags); - - if( thisObj->renderFromCache ) - { - NW_LMgr_Box_t *childBox = NULL; - NW_GDI_Rectangle_t childClipRect; - NW_ADT_Vector_Metric_t boxCount, boxIndex; - NW_LMgr_EventHandler_t *eventHandler = NULL; - - // Special handling for active containers - if (NW_Object_IsInstanceOf(currentBox, &NW_LMgr_ActiveContainerBox_Class)) - { - eventHandler = NW_LMgr_ActiveContainerBoxOf(currentBox)->eventHandler; - } - - // Go through the cached boxes - boxCount = NW_ADT_Vector_GetSize(thisObj->renderedBoxes); - NW_ADT_Vector_Metric_t clipsCount = NW_ADT_Vector_GetSize(thisObj->renderedClips); - for (boxIndex = 0; boxIndex < boxCount; boxIndex++) - { - NW_ASSERT(boxIndex < clipsCount); - childBox = - *(NW_LMgr_Box_t**) NW_ADT_Vector_ElementAt (thisObj->renderedBoxes, boxIndex); - - childClipRect = - *(NW_GDI_Rectangle_t*) NW_ADT_Vector_ElementAt (thisObj->renderedClips, boxIndex); - - /* Special handling for active containers */ - if (NW_Object_IsInstanceOf(childBox, &NW_LMgr_ActiveContainerBox_Class)) - { - if (NW_LMgr_ActiveContainerBoxOf(childBox)->eventHandler - == eventHandler) - { - currentBox = childBox; - } - } - - tempHasFocus = NW_FALSE; - /* Are we in focus */ - // check if childbox is the current box - tempHasFocus = ( childBox == currentBox ); - if( !tempHasFocus ) - { - // Find out if the box or the parent is in focus - // if the currentBox is a container, then check its childern to see if 'childBox' is - // one of them. - if( currentBox && NW_Object_IsDerivedFrom( currentBox, &NW_LMgr_ContainerBox_Class) ) - { - // - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* tempBox = NULL; - - NW_LMgr_BoxVisitor_Initialize( &boxVisitor, (NW_LMgr_Box_t*)currentBox ); - while( ( tempBox = NW_LMgr_BoxVisitor_NextBox( &boxVisitor, NULL ) ) != NULL ) - { - // - if( childBox == tempBox ) - { - tempHasFocus = NW_TRUE; - break; - } - } - } - } - // Now set the clip and draw - deviceContext->SetClipRect( &childClipRect); - - status = NW_LMgr_Box_Draw(childBox, deviceContext, tempHasFocus ); - NW_THROW_ON_ERROR(status); - } - } - else - { - // In the case of partial render first chunk, following render immediately - // gotoActiveBox will call render again and we should take advantage of - // render cache; after partial render complete, all the scrolling will call - // render and should render from the cache - if ( !thisObj->partialRender || - (thisObj->partialRender && thisObj->renderingState == NW_LMgr_RootBox_RenderFirstChunk ) ) - { - // Allocate the render cache - thisObj->renderedBoxes = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_LMgr_Box_t*), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->renderedBoxes, status); - thisObj->renderedClips = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New(sizeof (NW_GDI_Rectangle_t), 10, 5 ); - NW_THROW_OOM_ON_NULL (thisObj->renderedClips, status); - - // We will generate the cache - thisObj->renderFromCache = NW_TRUE; - } - else - { - thisObj->renderedBoxes = NULL; - thisObj->renderedClips = NULL; - - thisObj->renderFromCache = NW_FALSE; - } - // Invoke the superclass to render the tree - // rootbox never has focus. - status = - BoxRender_Render (box, deviceContext, clipRect, currentBox, 0, NW_FALSE, thisObj); - _NW_THROW_ON_ERROR (status); - - // Draw any floats - floatCount = NW_ADT_Vector_GetSize(thisObj->placedFloats); - for (index = 0; index < floatCount; index++) - { - floatBox = *(NW_LMgr_Box_t**) - NW_ADT_Vector_ElementAt (thisObj->placedFloats, index); - NW_ASSERT(floatBox != NULL); - - status = BoxRender_Render (floatBox, deviceContext, clipRect, currentBox, - NW_LMgr_Box_Flags_DrawFloats, NW_FALSE, thisObj); - _NW_THROW_ON_ERROR (status); - } - - - // Start the blink timer - if ((thisObj->blinkTimer == NULL) && thisObj->isBlinking) - { - thisObj->blinkTimer = NW_System_Timer_New (NW_LMgr_RootBox_BlinkCallback, - thisObj, 500, NW_TRUE); - NW_THROW_OOM_ON_NULL (thisObj->blinkTimer, status); - thisObj->blinkCount = NW_ISA_BLINK_LIMIT; - } - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - // ReSet the new clip rect - deviceContext->SetClipRect( &oldClip); - - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - public/protected final methods - * ------------------------------------------------------------------------- */ - -CGDIDeviceContext* -NW_LMgr_RootBox_GetDeviceContext (NW_LMgr_RootBox_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_RootBox_Class)); - - if (thisObj->boxTreeListener != NULL) { - return thisObj->boxTreeListener->GetDeviceContext (); - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -NW_LMgr_RootBox_GetCurrentBox (NW_LMgr_RootBox_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_RootBox_Class)); - - if (thisObj->boxTreeListener != NULL) { - return thisObj->boxTreeListener->GetCurrentBox (); - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_RootBox_BoxTreeDestroyed (NW_LMgr_RootBox_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_RootBox_Class)); - - /* Stop any blinking */ - thisObj->isBlinking = NW_FALSE; - /* Destroy the blink timer */ - if (thisObj->blinkTimer != NULL) { - NW_Object_Delete (thisObj->blinkTimer); - thisObj->blinkTimer = NULL; - } - - if (thisObj->boxTreeListener != NULL) { - thisObj->boxTreeListener->BoxTreeDestroyed (); - } - - thisObj->outstandingImageOpenings = 0; - - thisObj->needsRelayout = NW_FALSE; - - thisObj->renderingState = NW_LMgr_RootBox_RenderUninitialized; - // clear RTL - thisObj->iIsPageRTL = -1; - - thisObj->iHasGridModeTables = NW_FALSE; - - NW_LMgr_RootBox_InvalidateCache(thisObj); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_RootBox_Refresh(NW_LMgr_RootBox_t* thisObj, NW_LMgr_Box_t* box) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_RootBox_Class)); - - if (thisObj->boxTreeListener != NULL) { - return thisObj->boxTreeListener->Refresh (box); - } - return KBrsrSuccess; /* TODO: a better status */ -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_RootBox_GetExtents (NW_LMgr_RootBox_t* thisObj, - NW_GDI_Dimension2D_t* extents) -{ - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box; - - if (!thisObj->calculateExtents) { - *extents = thisObj->extents.dimension; - } - /* In certain cases, this function will be called before the box tree */ - /* is rendered and therefore calculatedExtents will be TRUE. In these */ - /* cases the extents of the rootbox need to be calculated by traversing the tree */ - else { - /* create the BoxVisitor on the stack */ - TBrowserStatusCode status = - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf (thisObj)); - NW_ASSERT (status == KBrsrSuccess); - - /* initialize the extents */ - (void) NW_Mem_memset (extents, 0, sizeof (*extents)); - - /* traverse the box tree and determine the maximum size */ - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - NW_GDI_Rectangle_t boxBounds; - - // if parentbox or box is Marquee then don't calculate extents - NW_LMgr_ContainerBox_t* parent = NW_LMgr_Box_GetParent(box); - - // check condition for first box in tree - if ( ((parent == NULL) && (!(NW_Object_IsClass (box, &NW_LMgr_MarqueeBox_Class)))) - // check condition for non-first box in tree - || (parent && !(NW_Object_IsClass (parent, &NW_LMgr_MarqueeBox_Class)) - && !(NW_Object_IsClass (box, &NW_LMgr_MarqueeBox_Class))) ) - { - - boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - if (boxBounds.point.x + boxBounds.dimension.width > extents->width) { - extents->width = - (NW_GDI_Metric_t) (boxBounds.point.x + boxBounds.dimension.width); - } - if (boxBounds.point.y + boxBounds.dimension.height > extents->height) { - extents->height = - (NW_GDI_Metric_t) (boxBounds.point.y + boxBounds.dimension.height); - } - } - } - thisObj->extents.dimension = *extents; - thisObj->calculateExtents = NW_FALSE; - } - - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_RootBox_InvalidateCache(NW_LMgr_RootBox_t *rootBox) -{ - /* Clear the cache vectors */ - if (rootBox->renderedBoxes != NULL) { - (void) NW_ADT_DynamicVector_Clear(rootBox->renderedBoxes); - NW_Object_Delete(rootBox->renderedBoxes); - rootBox->renderedBoxes = NULL; - } - - if (rootBox->renderedClips != NULL) { - (void) NW_ADT_DynamicVector_Clear(rootBox->renderedClips); - NW_Object_Delete(rootBox->renderedClips); - rootBox->renderedClips = NULL; - } - - /* Reset the flag */ - rootBox->renderFromCache = NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_LMgr_RootBox_IsPageRTL(NW_LMgr_RootBox_t* rootBox) - { - NW_Bool isPageRTL = NW_FALSE; - - NW_ASSERT(rootBox != NULL); - - // get property from the list only if cache value(rootBox->iIsPageRTL)has not been set. - if( rootBox->iIsPageRTL == -1 ) - { - NW_LMgr_Property_t bodyTextDirection; - bodyTextDirection.value.token = NW_CSS_PropValue_ltr; - - if( rootBox->body != NULL ) - { - // Get the text direction. Body box will inherit from <HTML> tag, if it does not have its own setting - bodyTextDirection.type = NW_CSS_ValueType_Token; - (void)NW_LMgr_Box_GetProperty(rootBox->body, NW_CSS_Prop_textDirection, &bodyTextDirection); - isPageRTL = (NW_Bool)(bodyTextDirection.value.token == NW_CSS_PropValue_rtl); - - // set cache - rootBox->iIsPageRTL = (NW_Int8)isPageRTL; - } - } - else - { - isPageRTL = (NW_Bool)rootBox->iIsPageRTL; - } - return isPageRTL; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_LMgr_RootBox_GetScrollRange(NW_LMgr_RootBox_t *rootBox, - NW_GDI_Dimension2D_t* scrollRange) -{ - NW_LMgr_BoxVisitor_t* visitor = NULL; - - NW_TRY (status) { - NW_LMgr_Box_t *child = NULL; - NW_Int32 xLeft; - NW_Int32 xRight = 0; - - NW_ASSERT(rootBox != NULL); - xLeft = NW_LMgr_RootBox_GetRightLimit(rootBox); - - if (!rootBox->calculateScrollRange) { - *scrollRange = rootBox->scrollRange; - } - else { - status = NW_LMgr_RootBox_GetExtents(rootBox, scrollRange); - NW_THROW_ON_ERROR(status); - if (NW_LMgr_RootBox_IsPageRTL(rootBox)) { - visitor = NW_LMgr_ContainerBox_GetBoxVisitor(rootBox); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Iterate through all children */ - while ((child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL)) != NULL) - { - NW_GDI_Rectangle_t childBoxBounds = NW_LMgr_Box_GetDisplayBounds( child ); - if (childBoxBounds.dimension.width < rootBox->extents.dimension.width) - { - // In some boxes the size is not initialized and they are set to 0. - // We don't want to use them for calculating the scroll range - xLeft = ((childBoxBounds.point.x == 0) || (xLeft < childBoxBounds.point.x)) ? xLeft : childBoxBounds.point.x; - xRight = (xRight > childBoxBounds.point.x + childBoxBounds.dimension.width) ? xRight : childBoxBounds.point.x + childBoxBounds.dimension.width; - } - } - - if (xRight > xLeft) { - scrollRange->width = xRight - xLeft; - } - } - rootBox->calculateScrollRange = NW_FALSE; - rootBox->scrollRange = *scrollRange; - } - - - } NW_CATCH (status) { - } NW_FINALLY { - if (visitor != NULL) { - NW_Object_Delete(visitor); - } - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 NW_LMgr_RootBox_GetRightLimit(NW_LMgr_RootBox_t* rootBox) -{ - NW_Int32 x = 0; - CGDIDeviceContext* deviceContext; - NW_ASSERT(rootBox != NULL); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - if ( deviceContext != NULL) { - x = (deviceContext->ClipRect()).dimension.width; - } - x += RIGHT_ORIGIN; - return x; -} - - - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_ImageOpeningStarted - * - * Called by image observers when the 'open' request has been made to the media server - * The number of outanding requests is kept track - * of. When the open operations are completed, a relayout or redraw is - * done in NW_LMgr_RootBox_ImageOpened. - * - * Parameters: - * image: this object - */ -void -NW_LMgr_RootBox_ImageOpeningStarted( NW_LMgr_RootBox_t* rootBox ) - { - NW_ASSERT( rootBox != NULL ); - - rootBox->outstandingImageOpenings++; - - } - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_ImageOpened - * - * Called by image observers when the 'open' request to the media server has - * finished. This object keeps track of - * how many outstanding requests there are. When all the outstanding - * requests are completed, then a relayout or a redraw is done. - * - * Parameters: - * image: this object - */ -void -NW_LMgr_RootBox_ImageOpened( NW_LMgr_RootBox_t* rootBox ) - { - - NW_ASSERT( rootBox != NULL ); - NW_ASSERT( rootBox->boxTreeListener != NULL ); - - rootBox->outstandingImageOpenings--; - - if( rootBox->outstandingImageOpenings == 0 && rootBox->needsRelayout ) - { - (void) rootBox->boxTreeListener->BoxTreeListenerRelayout( NW_TRUE ); - rootBox->needsRelayout = NW_FALSE; - } - } - - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_SetNeedsRelayout - * - * Called by image observers when an image box needs relayout - * - * Parameters: - * image: this object - */ -void -NW_LMgr_RootBox_SetNeedsRelayout( NW_LMgr_RootBox_t* rootBox ) - { - NW_ASSERT( rootBox != NULL ); - NW_ASSERT( rootBox->outstandingImageOpenings > 0); - - rootBox->needsRelayout = NW_TRUE; - } - -/* ------------------------------------------------------------------------- */ -void -NW_LMgr_RootBox_ExtendsCalculationNeeded( NW_LMgr_RootBox_t* rootBox ) - { - NW_ASSERT( rootBox != NULL ); - - rootBox->calculateExtents = NW_TRUE; - rootBox->calculateScrollRange = NW_TRUE; - } - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_SetFocusBox - * - * Sets the focus box for this root box. Used to keep context of the current - * box for a particular root box. - * - * Parameters: - * rootBox: this object - * focusBox: current active box for this root box - */ -void -NW_LMgr_RootBox_SetFocusBox(NW_LMgr_RootBox_t* rootBox, NW_LMgr_Box_t* focusBox) - { - NW_ASSERT(rootBox != NULL); - - rootBox->focusBox = focusBox; - } - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_GetFocusBox - * - * Called to retrieve the current active box associated with this root box - * - * Parameters: - * rootBox: this object - */ -NW_LMgr_Box_t* -NW_LMgr_RootBox_GetFocusBox (NW_LMgr_RootBox_t* rootBox) - { - return rootBox->focusBox; - } - -/* ------------------------------------------------------------------------- */ -/* NW_LMgr_RootBox_Copy - * - * Called to create a copy of a root box given as the first parameter. - * Currently this method does a partial copy of the root box, so do - * not use if you need a full root box copy. - * - * Parameters: - * aOldRootBox: the box you want to copy - * aNewRootBox: the partial copy of the first box - */ -TBrowserStatusCode -NW_LMgr_RootBox_Copy (NW_LMgr_RootBox_t* aOldRootBox, - NW_LMgr_RootBox_t** aNewRootBox) - { - NW_LMgr_RootBox_t* oldRootBox = aOldRootBox; - NW_LMgr_RootBox_t* newRootBox = NULL; -// NW_LMgr_SimplePropertyList_t* oldPropertyList = NULL; -// NW_LMgr_SimplePropertyList_t* newPropertyList = NULL; - - NW_TRY( status ) - { - // retrieve the current appservices object from the current root box to - // be used when creating our new root box - NW_HED_AppServices_t* appServices = NW_LMgr_RootBox_GetAppServices(oldRootBox); - - // create a new root box - newRootBox = NW_LMgr_RootBox_New (appServices); - NW_THROW_OOM_ON_NULL (newRootBox, status); - - // copy the old image map box property list to the new image map box property list - //oldPropertyList = (NW_LMgr_SimplePropertyList_t*)NW_LMgr_Box_PropListGet(NW_LMgr_BoxOf(oldRootBox)); - - //status = NW_LMgr_SimplePropertyList_CopyEntireList(oldPropertyList, &newPropertyList); - //NW_THROW_ON_ERROR (status); - - //(void)NW_LMgr_Box_SetPropList(NW_LMgr_BoxOf(newRootBox), (NW_LMgr_PropertyList_t*)newPropertyList); - - *aNewRootBox = newRootBox; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -void -NW_LMgr_RootBox_SetSmallScreenOn( NW_LMgr_RootBox_t* aRootBox, const NW_Bool aSmallScreenOn ) - { - NW_ASSERT( aRootBox != NULL ); - // - aRootBox->iSmallScreenOn = aSmallScreenOn; - } - -void -NW_LMgr_RootBox_SetWrapEnabled( NW_LMgr_RootBox_t* aRootBox, const NW_Bool aWrapEnabled ) - { - NW_ASSERT( aRootBox != NULL ); - // - aRootBox->iWrapEnabled = aWrapEnabled; - } - -NW_Bool -NW_LMgr_RootBox_GetSmallScreenOn( NW_LMgr_RootBox_t* aRootBox ) - { - // make sure it works even if rootbox is null. - return ( aRootBox ? aRootBox->iSmallScreenOn : NW_Settings_GetVerticalLayoutEnabled() ); - } - -NW_Bool -NW_LMgr_RootBox_GetWrapEnabled( NW_LMgr_RootBox_t* aRootBox ) - { - // make sure it works even if rootbox is null. - return ( aRootBox ? aRootBox->iWrapEnabled : NW_Settings_GetTextWrapEnabled() ); - } - -// If the origin change along y coordinate is more than half the display width -// and if we are not in image map view, we check to see which images are out -// of display and if they are we we delete the bitmap to save memory -void NW_LMgr_RootBox_OriginChanged( NW_LMgr_RootBox_t* aRootBox, - NW_GDI_Point2D_t* aOldOrigin ) - { - NW_HED_AppServices_t* appServices = aRootBox->appServices; - - if (!appServices->browserAppApi.IsImageMapView()) - { - CGDIDeviceContext* deviceContext = NW_LMgr_RootBox_GetDeviceContext (aRootBox); - const NW_GDI_Dimension2D_t* displaySize = &(deviceContext->DisplayBounds()->dimension); - const NW_GDI_Point2D_t* origin = deviceContext->Origin(); - - aRootBox->iYScrollChange = (NW_Int32)(aRootBox->iYScrollChange + origin->y - aOldOrigin->y); - - // We try to delete the bitmaps which have gone out of view only if origin changes - // more than half the display - if (aRootBox->iYScrollChange > displaySize->height) - { - aRootBox->iYScrollChange = 0; - - // go through the images - NW_Uint16 index = 0; - NW_Uint16 size = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(aRootBox->iOutOfViewListeners)); - - for (index = 0; index < size; index++) - { - NW_Image_Epoc32Simple_t* simpleImage = *(NW_Image_Epoc32Simple_t**) - NW_ADT_Vector_ElementAt (aRootBox->iOutOfViewListeners, index); - - NW_Image_Epoc32Simple_OutOfView(simpleImage); - } - } - } - } - -TBrowserStatusCode -NW_LMgr_RootBox_AddToOutOfViewList( NW_LMgr_RootBox_t* aRootBox, - NW_Image_AbstractImage_t* aImage ) - { - if (NW_ADT_DynamicVector_InsertAt(aRootBox->iOutOfViewListeners, - &aImage, NW_ADT_Vector_AtEnd) == NULL) - { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_RootBox_t* -NW_LMgr_RootBox_New (NW_HED_AppServices_t* appServices) -{ - return (NW_LMgr_RootBox_t*) - NW_Object_New (&NW_LMgr_RootBox_Class, 1, appServices); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrRuleBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrRuleBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_ruleboxi.h" -#include "nw_lmgr_cssproperties.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" - -/*#define NW_HR_WIDTH_DEFAULT (NW_GDI_Metric_t)100*/ -#define NW_HR_SIZE_DEFAULT (NW_GDI_Metric_t)2 -#define NW_HR_MAX_HEIGHT (NW_GDI_Metric_t)10 - - -const -NW_LMgr_RuleBox_Class_t NW_LMgr_RuleBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_MediaBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_RuleBox_t), - /* construct */ _NW_LMgr_RuleBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_RuleBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_RuleBox_Constrain, - /* draw */ _NW_LMgr_RuleBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ 0 - }, - { /* NW_LMgr_RuleBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_RuleBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_LMgr_RuleBox_GetRuleRect(NW_LMgr_RuleBox_t *ruleBox, - NW_GDI_Rectangle_t *ruleRect) -{ - - NW_LMgr_Box_t *box = NW_LMgr_BoxOf(ruleBox); - NW_GDI_Rectangle_t bounds; - NW_GDI_Rectangle_t rect; - NW_LMgr_PropertyValue_t widthProp, heightProp, alignProp; - NW_LMgr_FrameInfo_t margin; - - // Get our bounds - bounds = NW_LMgr_Box_GetDisplayBounds(box); - - // Get the width for the rule - widthProp.integer = bounds.dimension.width; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_width, NW_CSS_ValueType_Px, &widthProp); - if (widthProp.integer == 0) - { - return KBrsrFailure; - } - rect.dimension.width = (NW_GDI_Metric_t)widthProp.integer; - if (rect.dimension.width > bounds.dimension.width) - { - rect.dimension.width = bounds.dimension.width; - } - - // Check for margins and set the width of the rule accordingly - NW_LMgr_Box_GetMargins(box, &margin, NULL, ELMgrFrameLeft | ELMgrFrameRight ); - - rect.dimension.width = rect.dimension.width - (margin.left + margin.right); - - // Get the height - heightProp.integer = NW_HR_SIZE_DEFAULT; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &heightProp); - if (heightProp.integer > NW_HR_MAX_HEIGHT) - { - heightProp.integer = NW_HR_MAX_HEIGHT; - } - rect.dimension.height = (NW_GDI_Metric_t)heightProp.integer; - - // Get the alignment - alignProp.token = NW_CSS_PropValue_left; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_textAlign, NW_CSS_ValueType_Token, &alignProp); - - // Now place the rule in the box - // TODO: also use CSS align, width, height properties - switch (alignProp.token) - { - case NW_CSS_PropValue_center: - rect.point.x = (NW_GDI_Metric_t)(bounds.point.x + - ((bounds.dimension.width - rect.dimension.width)/2)); - break; - case NW_CSS_PropValue_right: - rect.point.x = (NW_GDI_Metric_t)(bounds.point.x + - bounds.dimension.width - rect.dimension.width); - break; - case NW_CSS_PropValue_left: - default: - rect.point.x = bounds.point.x; - break; - } - rect.point.y = bounds.point.y; - - *ruleRect = rect; - - return KBrsrSuccess; -} - -/* --------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_LMgr_RuleBox_GetForegroundColors(NW_LMgr_RuleBox_t *ruleBox, - NW_GDI_Color_t *fgColorTopLeftPtr, - NW_GDI_Color_t *fgColorBottomRightPtr) { - NW_LMgr_Box_t *box = NW_LMgr_BoxOf(ruleBox); - TBrowserStatusCode status; - NW_LMgr_PropertyValue_t ruleProp; - - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_color, - NW_CSS_ValueType_Color, &ruleProp); - if (status == KBrsrNotFound) { - *fgColorTopLeftPtr = NW_LMGR_RULEBOX_COLOR_DGRAY; - *fgColorBottomRightPtr = NW_LMGR_RULEBOX_COLOR_LGRAY; - } else if (status == KBrsrSuccess) { - *fgColorTopLeftPtr = (NW_GDI_Color_t)ruleProp.integer; - *fgColorBottomRightPtr = (NW_GDI_Color_t)ruleProp.integer; - } else { - return status; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_RuleBox_GetBackgroundColor(NW_LMgr_RuleBox_t *ruleBox, - NW_GDI_Color_t *bgColorPtr) { - - NW_LMgr_Box_t *box = NW_LMgr_BoxOf(ruleBox); - TBrowserStatusCode status; - NW_LMgr_PropertyValue_t ruleProp; - - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_backgroundColor, - NW_CSS_ValueType_Color, &ruleProp); - if (status == KBrsrNotFound) { - *bgColorPtr = NW_LMGR_RULEBOX_COLOR_BLACK; - } else if (status == KBrsrSuccess) { - *bgColorPtr = (NW_GDI_Color_t)ruleProp.integer; - } else { - return status; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_LMgr_RuleBox_DrawRule(NW_LMgr_RuleBox_t *ruleBox, - CGDIDeviceContext* deviceContext, - NW_GDI_Color_t fgColorTopLeft, - NW_GDI_Color_t fgColorBottomRight, - NW_GDI_Color_t bgColor) { - TBrowserStatusCode status; - NW_GDI_Rectangle_t ruleRect; - NW_GDI_Point2D_t points[3]; - NW_GDI_Color_t initialFg; - NW_GDI_Color_t initialBg; - NW_GDI_PaintMode_t initialPm; - NW_LMgr_Property_t prop; - NW_LMgr_Box_t *box = (NW_LMgr_Box_t*)ruleBox; - - // If the box dimensions (ht/width) are zero, we do not want to draw it - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - if ((boxBounds.dimension.height == 0) && (boxBounds.dimension.width == 0)) - { - return KBrsrSuccess; - } - - // Get the DeviceContext state - initialFg = deviceContext->ForegroundColor(); - initialBg = deviceContext->BackgroundColor(); - initialPm = deviceContext->PaintMode(); - - status = NW_LMgr_RuleBox_GetRuleRect(ruleBox, &ruleRect); - if (status != KBrsrSuccess) - { - return status; - } - - // Set the paint mode - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - // If the noshade attribute is set, draw a filled rect; - // otherwise, draw an empty one - - (void)NW_LMgr_Box_GetProperty (NW_LMgr_BoxOf(ruleBox), NW_CSS_Prop_noshade, &prop); - if (prop.value.token == NW_CSS_PropValue_true) - { - (void) bgColor; - deviceContext->SetForegroundColor( fgColorTopLeft); - deviceContext->SetBackgroundColor( fgColorTopLeft); - deviceContext->FillRectangle( &ruleRect); - } - else - { - deviceContext->SetForegroundColor( fgColorBottomRight); - points[0].x = (NW_GDI_Metric_t)(ruleRect.point.x); - points[0].y = (NW_GDI_Metric_t)(ruleRect.point.y + ruleRect.dimension.height - 1); - points[1].x = (NW_GDI_Metric_t)(ruleRect.point.x + ruleRect.dimension.width - 1); - points[1].y = (NW_GDI_Metric_t)(ruleRect.point.y + ruleRect.dimension.height - 1); - points[2].x = (NW_GDI_Metric_t)(ruleRect.point.x + ruleRect.dimension.width - 1); - points[2].y = (NW_GDI_Metric_t)(ruleRect.point.y); - (void)deviceContext->DrawPolyline( 3, points, NW_FALSE); - deviceContext->SetForegroundColor( fgColorTopLeft); - points[1].x = (NW_GDI_Metric_t)(ruleRect.point.x); - points[1].y = (NW_GDI_Metric_t)(ruleRect.point.y); - (void)deviceContext->DrawPolyline( 3, points, NW_FALSE); - } - - // Reset the DeviceContext - deviceContext->SetForegroundColor( initialFg); - deviceContext->SetBackgroundColor( initialBg); - deviceContext->SetPaintMode ( initialPm); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_RuleBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_GDI_Color_t fgColorTopLeft = 0; - NW_GDI_Color_t fgColorBottomRight =0; - NW_GDI_Color_t bgColor=0; - NW_LMgr_RuleBox_t *ruleBox = NW_LMgr_RuleBoxOf(box); - TBrowserStatusCode status; - - /* Invoke our superclass draw method first */ - status = NW_LMgr_MediaBox_Class.NW_LMgr_Box.draw (box, deviceContext, hasFocus); - if (status != KBrsrSuccess) { - return status; - } - - /* Get the colors */ - status = NW_LMgr_RuleBox_GetForegroundColors (ruleBox, &fgColorTopLeft, &fgColorBottomRight); - if (status != KBrsrSuccess) { - return status; - } - status = NW_LMgr_RuleBox_GetBackgroundColor (ruleBox, &bgColor); - if (status != KBrsrSuccess) { - return status; - } - - /* Now draw the rule */ - status = NW_LMgr_RuleBox_DrawRule (ruleBox, deviceContext, - fgColorTopLeft, fgColorBottomRight, bgColor); - if (status != KBrsrSuccess) { - return status; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_RuleBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint) -{ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.dimension.width = constraint; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_RuleBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) { - - NW_LMgr_PropertyValue_t heightProp; - NW_REQUIRED_PARAM(context); - /* Get the height */ - heightProp.integer = NW_HR_SIZE_DEFAULT; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_height, NW_CSS_ValueType_Px, &heightProp); - if (heightProp.integer > NW_HR_MAX_HEIGHT) - { - heightProp.integer = NW_HR_MAX_HEIGHT; - } - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - boxBounds.dimension.height = (NW_GDI_Metric_t)heightProp.integer; - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -NW_LMgr_RuleBox_t* -NW_LMgr_RuleBox_New () -{ - - return (NW_LMgr_RuleBox_t*) - NW_Object_New (&NW_LMgr_RuleBox_Class, 0); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrSlavePropertyList.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrSlavePropertyList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,285 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_slavepropertylisti.h" -#include "nw_lmgr_simplepropertylisti.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_SlavePropertyList_Class_t NW_LMgr_SlavePropertyList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_PropertyList_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_SlavePropertyList_t), - /* construct */ _NW_LMgr_SlavePropertyList_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_PropertyList */ - /* get */ _NW_LMgr_SlavePropertyList_Get, - /* set */ _NW_LMgr_SlavePropertyList_Set, - /* remove */ _NW_LMgr_SlavePropertyList_Remove, - /* clone */ _NW_LMgr_SlavePropertyList_Clone, - /* clear */ _NW_LMgr_SlavePropertyList_Clear - }, - { /* NW_LMgr_SlavePropertyList */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_SlavePropertyList_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_LMgr_SlavePropertyList_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_LMgr_SlavePropertyListOf (dynamicObject); - - /* initialize the member variables */ - thisObj->siblingBox = va_arg (*argp, NW_LMgr_Box_t*); - if (thisObj->siblingBox){ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->siblingBox, - &NW_LMgr_Box_Class)); - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry) -{ - NW_LMgr_Box_t* masterBox; - NW_LMgr_SlavePropertyList_t* slavePropList; - NW_LMgr_PropertyList_t* siblingPropList; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SlavePropertyList_Class)); - - slavePropList = NW_LMgr_SlavePropertyListOf(propertyList); - - NW_ASSERT(slavePropList->siblingBox); - siblingPropList = NW_LMgr_Box_PropListGet(slavePropList->siblingBox); - NW_ASSERT(siblingPropList); - - switch (key) - { - case NW_CSS_Prop_sibling: - entry->type = NW_ADT_ValueType_Object | NW_CSS_ValueType_Copy; - entry->value.object = slavePropList->siblingBox; - return KBrsrSuccess; - - case NW_CSS_Prop_rightPadding: - entry->type = NW_ADT_ValueType_Integer; - entry->value.integer = 0; - return KBrsrSuccess; - - case NW_CSS_Prop_rightMargin: - entry->type = NW_ADT_ValueType_Integer; - entry->value.integer = 0; - return KBrsrSuccess; - - case NW_CSS_Prop_rightBorderStyle: - entry->type = NW_CSS_ValueType_Token; - entry->value.integer = NW_CSS_PropValue_none; - return KBrsrSuccess; - - case NW_CSS_Prop_leftPadding: - if (NW_Object_IsInstanceOf(siblingPropList, &NW_LMgr_SlavePropertyList_Class)){ - entry->type = NW_ADT_ValueType_Integer; - entry->value.integer = 0; - return KBrsrSuccess; - } - break; - - case NW_CSS_Prop_leftMargin: - if (NW_Object_IsInstanceOf(siblingPropList, &NW_LMgr_SlavePropertyList_Class)){ - entry->type = NW_ADT_ValueType_Integer; - entry->value.integer = 0; - return KBrsrSuccess; - } - break; - - case NW_CSS_Prop_leftBorderStyle: - if (NW_Object_IsInstanceOf(siblingPropList, &NW_LMgr_SlavePropertyList_Class)){ - entry->type = NW_CSS_ValueType_Token; - entry->value.integer = NW_CSS_PropValue_none; - return KBrsrSuccess; - } - break; - - default: - break; - } - - masterBox = NW_LMgr_SlavePropertyList_GetMasterBox (propertyList); - if (masterBox == NULL){ - return NULL; - } - propertyList = NW_LMgr_Box_PropListGet (masterBox); - if (propertyList == NULL){ - return NULL; - } - // return NW_LMgr_PropertyList_Get (propertyList, key, entry); */ - return NW_LMgr_SimplePropertyList_MapLookup( - NW_LMgr_SimplePropertyListOf( propertyList ), key, entry ); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Set (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - const NW_LMgr_PropertyList_Entry_t* entry) -{ - NW_LMgr_Box_t* masterBox; - NW_LMgr_SlavePropertyList_t* slavePropList; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SlavePropertyList_Class)); - - slavePropList = NW_LMgr_SlavePropertyListOf(propertyList); - - if (key == NW_CSS_Prop_sibling){ - slavePropList->siblingBox = (NW_LMgr_Box_t *) entry->value.object; - return KBrsrSuccess; - } - - masterBox = NW_LMgr_SlavePropertyList_GetMasterBox (propertyList); - propertyList = NW_LMgr_Box_PropListGet (masterBox); - return NW_LMgr_PropertyList_Set (propertyList, key, entry); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key) -{ - NW_LMgr_Box_t* masterBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SlavePropertyList_Class)); - - masterBox = NW_LMgr_SlavePropertyList_GetMasterBox (propertyList); - propertyList = NW_LMgr_Box_PropListGet (masterBox); - return NW_LMgr_PropertyList_Remove (propertyList, key); -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_PropertyList_t* -_NW_LMgr_SlavePropertyList_Clone(const NW_LMgr_PropertyList_t* propertyList) -{ - NW_LMgr_PropertyList_t* slavePropertyList = NULL; - NW_LMgr_Box_t* masterBox = NW_LMgr_SlavePropertyList_GetMasterBox(propertyList); - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (masterBox->propList, - &NW_LMgr_SimplePropertyList_Class)); - slavePropertyList = (NW_LMgr_PropertyList_t*) - NW_LMgr_SlavePropertyList_New(masterBox); - return slavePropertyList; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SlavePropertyList_Clear (NW_LMgr_PropertyList_t* propertyList) -{ - NW_LMgr_Box_t* masterBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SlavePropertyList_Class)); - - masterBox = NW_LMgr_SlavePropertyList_GetMasterBox (propertyList); - propertyList = NW_LMgr_Box_PropListGet (masterBox); - return NW_LMgr_PropertyList_Clear (propertyList); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -_NW_LMgr_SlavePropertyList_GetMasterBox (const NW_LMgr_SlavePropertyList_t* thisObj) -{ - NW_LMgr_Box_t* siblingBox; - const NW_LMgr_PropertyList_t* propertyList; - - siblingBox = NULL; - propertyList = NW_LMgr_PropertyListOf (thisObj); - do { - siblingBox = NW_LMgr_SlavePropertyList_GetSiblingBox (propertyList); - propertyList = NW_LMgr_Box_PropListGet (siblingBox); - } while (!NW_Object_IsClass (propertyList, &NW_LMgr_SimplePropertyList_Class)); - return siblingBox; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -NW_LMgr_SlavePropertyList_GetFirstBox (const NW_LMgr_SlavePropertyList_t* thisObj) -{ - NW_LMgr_Box_t* siblingBox, *previousBox; - const NW_LMgr_PropertyList_t* propertyList; - - siblingBox = NULL; - previousBox = NULL; - propertyList = NW_LMgr_PropertyListOf (thisObj); - do { - previousBox = siblingBox; - siblingBox = NW_LMgr_SlavePropertyList_GetSiblingBox (propertyList); - propertyList = NW_LMgr_Box_PropListGet (siblingBox); - } while (!NW_Object_IsClass (propertyList, &NW_LMgr_SimplePropertyList_Class)); - return previousBox; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_SlavePropertyList_t* -NW_LMgr_SlavePropertyList_New (NW_LMgr_Box_t* siblingBox) -{ - return (NW_LMgr_SlavePropertyList_t*) - NW_Object_New (&NW_LMgr_SlavePropertyList_Class, siblingBox); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrSplitTextBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrSplitTextBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_splittextboxi.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_cssproperties.h" - - -#include "nwx_settings.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -/* The static instance of the Text_Box class object */ -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_SplitTextBox_Class_t NW_LMgr_SplitTextBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AbstractTextBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_SplitTextBox_t), - /* construct */ _NW_LMgr_SplitTextBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_AbstractTextBox_Split, - /* resize */ _NW_LMgr_AbstractTextBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_AbstractTextBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AbstractTextBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_AbstractTextBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AbstractTextBox */ - /* getText */ _NW_LMgr_SplitTextBox_GetText, - /* getStart */ _NW_LMgr_SplitTextBox_GetStart - }, - { /* NW_LMgr_SplitTextBox */ - /* unused */ 0 - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SplitTextBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp){ - NW_LMgr_SplitTextBox_t* textBox; - - /* for convenience */ - textBox = NW_LMgr_SplitTextBoxOf (dynamicObject); - - /* initialize our text member */ - textBox->prevBox = va_arg (*argp, NW_LMgr_AbstractTextBox_t*); - NW_LMgr_AbstractTextBoxOf(textBox)->length = va_arg (*argp, NW_Text_Length_t); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -_NW_LMgr_SplitTextBox_GetText (NW_LMgr_AbstractTextBox_t *abstractText) -{ - NW_LMgr_SplitTextBox_t* thisObj = NW_LMgr_SplitTextBoxOf(abstractText); - NW_LMgr_AbstractTextBox_t *prevBox; - NW_LMgr_TextBox_t *principalBox; - - /* Ideally, this function should call itself recursively to find - * the original text. The following loop takes a shortcut to - * reduce stack usage. - */ - prevBox = thisObj->prevBox; - while (NW_Object_IsInstanceOf(prevBox, &NW_LMgr_SplitTextBox_Class)) { - prevBox = NW_LMgr_SplitTextBoxOf(prevBox)->prevBox; - } - - //Make sure the previous entry is still valid - if (!NW_Object_IsInstanceOf(prevBox, &NW_LMgr_TextBox_Class)) { - return NULL; - } - - principalBox = NW_LMgr_TextBoxOf(prevBox); - return principalBox->text; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_LMgr_SplitTextBox_GetStart (NW_LMgr_AbstractTextBox_t *abstractText) -{ - NW_LMgr_SplitTextBox_t* thisObj = NW_LMgr_SplitTextBoxOf(abstractText); - NW_LMgr_AbstractTextBox_t* prevBox = NULL; - NW_Text_Length_t start; - - /* Ideally, this function should call itself recursively to determine - * the starting position. The following loop takes a shortcut to - * reduce stack usage. - */ - prevBox = thisObj->prevBox; - start = 0; - while (NW_Object_IsInstanceOf(prevBox, &NW_LMgr_SplitTextBox_Class)) { - start = (NW_Text_Length_t)(start + NW_LMgr_AbstractTextBox_GetLength(prevBox)); - prevBox = NW_LMgr_SplitTextBoxOf(prevBox)->prevBox; - } - start = (NW_Text_Length_t)(start + NW_LMgr_AbstractTextBox_GetLength(prevBox)); - - return start; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_SplitTextBox_t* -NW_LMgr_SplitTextBox_New (NW_LMgr_AbstractTextBox_t* textBox, - NW_Text_Length_t length) -{ - return (NW_LMgr_SplitTextBox_t*)NW_Object_New(&NW_LMgr_SplitTextBox_Class, - textBox, - length); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrStaticTableBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrStaticTableBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1269 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_statictableboxi.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rulebox.h" -#include "BrsrStatusCodes.h" - -#define NW_LMGR_STATICTABLEBOX_MAX_CONSTRAINT (NW_GDI_Metric_t)20000 -// min constraint should always be the minimum width of a box -//#define NW_LMGR_STATICTABLEBOX_MIN_CONSTRAINT (NW_GDI_Metric_t)NW_LMGR_BOX_MIN_WIDTH -/* ------------------------------------------------------------------------- * - * Private Methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* Collapse a cell and set position/size to 0 */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CollapseCell( NW_LMgr_StaticTableBox_t* thisObj, - NW_LMgr_StaticTableCellBox_t* cellBox ) - { - NW_LMgr_BoxVisitor_t* visitor; - - NW_REQUIRED_PARAM( thisObj ); - - NW_TRY( status ) - { - NW_LMgr_Box_t* child; - NW_GDI_Rectangle_t zeroRect; - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( cellBox != NULL ); - - // set zero rect for collapse - zeroRect.point.x = 0; - zeroRect.point.y = 0; - zeroRect.dimension.width = 0; - zeroRect.dimension.height = 0; - - // travell through and collapse all children. - visitor = NW_LMgr_ContainerBox_GetBoxVisitor( cellBox ); - - NW_THROW_OOM_ON_NULL( visitor, status ); - - child = NW_LMgr_BoxVisitor_NextBox( visitor, 0 ); - - while( ( child = NW_LMgr_BoxVisitor_NextBox( visitor, 0 ) ) != NULL ) - { - if( NW_Object_IsDerivedFrom( child, &NW_LMgr_ContainerBox_Class) == NW_TRUE ) - { - status = NW_LMgr_ContainerBox_Collapse( NW_LMgr_ContainerBoxOf( child ) ); - } - else if( NW_Object_IsDerivedFrom( child, &NW_LMgr_TextBox_Class) == NW_TRUE ) - { - status = NW_LMgr_TextBox_Collapse( NW_LMgr_TextBoxOf( child ) ); - } - // check if collapse is fine - NW_THROW_ON_ERROR( status ); - // and then finalize the collapse by setting position/size to 0 - NW_LMgr_Box_SetFormatBounds( child, zeroRect ); - } - // successful completion - status = KBrsrSuccess; - // set cell to zero - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( cellBox ), zeroRect ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Object_Delete( visitor ); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -/* Collapse the table and set colums constraint to 0 */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CollapseTable( NW_LMgr_StaticTableBox_t* thisObj ) - { - NW_TRY( status ) - { - NW_ADT_Vector_Metric_t colIndex; - NW_ADT_Vector_Metric_t rowIndex; - NW_LMgr_StaticTableContext_t* tableContext; - NW_LMgr_Box_t* cellBox; - - NW_ASSERT( thisObj != NULL ); - - tableContext = thisObj->ctx; - NW_THROW_OOM_ON_NULL( tableContext, status ); - - // step through all the cells and collapse them - for( colIndex = 0; colIndex < tableContext->numCols; colIndex++ ) - { - for( rowIndex = 0; rowIndex < tableContext->numRows; rowIndex++ ) - { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy( tableContext, colIndex, rowIndex, &cellBox ); - NW_THROW_ON_ERROR( status ); - // cellbox can be NULL even if status == KBrsrSuccess - if( cellBox != NULL ) - { - // collpase cell - status = NW_LMgr_StaticTableBox_CollapseCell( thisObj, NW_LMgr_StaticTableCellBoxOf( cellBox ) ); - NW_THROW_ON_ERROR( status ); - } - } - // table collapse requires to set column constraint to 0 - NW_LMgr_StaticTableContext_SetColConstraint( tableContext, colIndex, 0 ); - } - // set table height info to 0 - thisObj->ctx->y = 0; - thisObj->ctx->contentHeight = 0; - // all the cells are collapsed - status = KBrsrSuccess; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -/* Set the current width of a container by getting its children size */ -/* please note that this function needs revise when arabic-hebrew comes to */ -/* the picture. */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CalculateContainerWidth( NW_LMgr_ContainerBox_t* containerBox ) - { - NW_TRY( status ) - { - NW_GDI_Metric_t boxWidth = NW_LMGR_BOX_MIN_WIDTH; - NW_GDI_Metric_t lineWidth = 0; - NW_GDI_Metric_t nextBoxX = 0; - NW_LMgr_Box_t* childBox; - NW_GDI_Rectangle_t boxBounds; - NW_ADT_Vector_Metric_t childIndex; - NW_ADT_Vector_Metric_t childCount; - NW_LMgr_FrameInfo_t frameInfo; - NW_LMgr_FrameInfo_t tempframeInfo; - - NW_ASSERT( containerBox != NULL ); - - childCount = NW_LMgr_ContainerBox_GetChildCount( containerBox ); - - // travell through all boxes in this container and set the longest line as the box's width - for( childIndex = 0; childIndex < childCount; childIndex++ ) - { - childBox = NW_LMgr_ContainerBox_GetChild( NW_LMgr_ContainerBoxOf( containerBox ), childIndex ); - - NW_THROW_OOM_ON_NULL( childBox, status ); - - // if this container includes an other container, then call that one first to find out the width. - // However if the container is a table box (nested tables) then no need to call its children as - // at this point all nested tables are all set. - if( NW_Object_IsDerivedFrom( childBox, &NW_LMgr_ContainerBox_Class ) == NW_TRUE && - NW_Object_IsClass( childBox, &NW_LMgr_StaticTableBox_Class ) == NW_FALSE ) - { - status = NW_LMgr_StaticTableBox_CalculateContainerWidth( NW_LMgr_ContainerBoxOf( childBox ) ); - - NW_THROW_ON_ERROR( status ); - } - boxBounds = NW_LMgr_Box_GetFormatBounds( childBox ); - // fix rulebox and boxes far too small - if( NW_Object_IsDerivedFrom( childBox, &NW_LMgr_RuleBox_Class ) == NW_TRUE || - boxBounds.dimension.width < NW_LMGR_BOX_MIN_WIDTH ) - { - boxBounds.dimension.width = NW_LMGR_BOX_MIN_WIDTH; - NW_LMgr_Box_SetFormatBounds( childBox, boxBounds ); - } - // check if this box is inline with those previous boxes - if( boxBounds.dimension.width > 0 ) - { - // nextBoxX indicates where the next box is supposed to be if it was in same line - // note that this is not right-to-left proof! - if( boxBounds.point.x < nextBoxX ) - { - // this box is in the next line - lineWidth = 0; - } - // calculate where the next box should be if it was in line - nextBoxX = boxBounds.point.x + boxBounds.dimension.width; - // add up the line width - lineWidth+= boxBounds.dimension.width; - // get the widest line - if( lineWidth > boxWidth ) - { - boxWidth = lineWidth; - } - } - } - NW_GDI_Rectangle_t containerBoxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( containerBox ) ); - // set width - containerBoxBounds.dimension.width = boxWidth; - // adjust width with borders and margins - NW_LMgr_Box_GetBorderWidth( NW_LMgr_BoxOf( containerBox ), &frameInfo, ELMgrFrameLeft|ELMgrFrameRight ); - containerBoxBounds.dimension.width+=( frameInfo.left + frameInfo.right ); - - NW_LMgr_Box_GetMargins( NW_LMgr_BoxOf( containerBox ), &frameInfo, &tempframeInfo, - ELMgrFrameLeft|ELMgrFrameRight ); - containerBoxBounds.dimension.width+=( frameInfo.left + frameInfo.right ); - - NW_LMgr_Box_GetPadding( NW_LMgr_BoxOf( containerBox ), &frameInfo, ELMgrFrameLeft|ELMgrFrameRight ); - containerBoxBounds.dimension.width+=( frameInfo.left + frameInfo.right ); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( containerBox ), containerBoxBounds ); - - status = KBrsrSuccess; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -/* Set the current width of a container by getting its children size */ -/* please note that this function needs revise when arabic-hebrew comes to */ -/* the picture. */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CalculateContainerMinWidth( NW_LMgr_ContainerBox_t* containerBox, - NW_GDI_Metric_t* containerWidth ) - { - NW_TRY( status ) - { - NW_GDI_Metric_t minWidth = 0; - NW_ADT_Vector_Metric_t childIndex; - NW_ADT_Vector_Metric_t childCount; - NW_LMgr_Box_t* childBox; - NW_GDI_Dimension2D_t boxMinSize; - NW_LMgr_FrameInfo_t frameInfo; - NW_LMgr_FrameInfo_t tempframeInfo; - - NW_ASSERT( containerBox != NULL ); - - childCount = NW_LMgr_ContainerBox_GetChildCount( containerBox ); - *containerWidth = NW_LMGR_BOX_MIN_WIDTH; - - // travell through all boxes in this container and set the longest line as the box's width - for( childIndex = 0; childIndex < childCount; childIndex++ ) - { - childBox = NW_LMgr_ContainerBox_GetChild( NW_LMgr_ContainerBoxOf( containerBox ), childIndex ); - NW_THROW_OOM_ON_NULL( childBox, status ); - - // if this container includes an other container, then call that one first to find out the width. - // However if the container is a table box (nested tables) then no need to call its children as - // at this point all nested tables are all set. - if( NW_Object_IsDerivedFrom( childBox, &NW_LMgr_ContainerBox_Class ) == NW_TRUE ) - { - if( NW_Object_IsClass( childBox, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - NW_LMgr_StaticTableBox_t* tableBox = NW_LMgr_StaticTableBoxOf( childBox ); - - if( tableBox->ctx == NULL ) - { - // context should always be initialized. - status = KBrsrUnexpectedError; - } - else - { - minWidth = tableBox->ctx->tableMinWidth; - } - } - else - { - status = NW_LMgr_StaticTableBox_CalculateContainerMinWidth( NW_LMgr_ContainerBoxOf( childBox ), &minWidth ); - } - NW_THROW_ON_ERROR( status ); - } - else if( - NW_Object_IsDerivedFrom( childBox, &NW_LMgr_RuleBox_Class ) == NW_TRUE ) - { - minWidth = NW_LMGR_BOX_MIN_WIDTH; - } - else - { - - (void) NW_LMgr_Box_GetMinimumContentSize( childBox, &boxMinSize ); - - if(boxMinSize.width == NW_LMGR_BOX_MIN_WIDTH && (NW_Object_IsInstanceOf (childBox, &NW_LMgr_AbstractTextBox_Class))){ - NW_LMgr_AbstractTextBox_GetMinimumSizeByWord(NW_LMgr_AbstractTextBoxOf(childBox), &boxMinSize ); - } - - minWidth = boxMinSize.width; - } - if( minWidth > *containerWidth ) - { - *containerWidth = minWidth; - } - } - // adjust minimum width with borders and margins - NW_LMgr_Box_GetBorderWidth( NW_LMgr_BoxOf( containerBox ), &frameInfo, ELMgrFrameLeft|ELMgrFrameRight ); - *containerWidth+=( frameInfo.left + frameInfo.right ); - - NW_LMgr_Box_GetMargins( NW_LMgr_BoxOf( containerBox ), &frameInfo, &tempframeInfo, - ELMgrFrameLeft|ELMgrFrameRight ); - *containerWidth+=( frameInfo.left + frameInfo.right ); - - NW_LMgr_Box_GetPadding( NW_LMgr_BoxOf( containerBox ), &frameInfo, ELMgrFrameLeft|ELMgrFrameRight ); - *containerWidth+=( frameInfo.left + frameInfo.right ); - - status = KBrsrSuccess; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - - - - - -/* ---------------------------------------------------------------------------- */ -/* Set the current width of a cell by getting its children size, plus it checks - * additional propeties such as cell padding and borders - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CalculateCellWidth( NW_LMgr_StaticTableBox_t* thisObj, NW_LMgr_ContainerBox_t* cellBox, - NW_GDI_Metric_t* cellWidth, NW_Bool minSize ) - { - NW_TRY( status ) - { - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_Property_t prop; - NW_LMgr_StaticTableContext_t* tableContext; - - NW_ASSERT( cellBox != NULL ); - NW_ASSERT( thisObj != NULL ); - - tableContext = thisObj->ctx; - NW_THROW_OOM_ON_NULL( tableContext, status ); - - // get the cell's width - if( minSize == NW_TRUE ) - { - status = NW_LMgr_StaticTableBox_CalculateContainerMinWidth( cellBox, cellWidth ); - } - else - { - status = NW_LMgr_StaticTableBox_CalculateContainerWidth( cellBox ); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( cellBox ) ); - *cellWidth = boxBounds.dimension.width; - } - // check return value - NW_THROW_ON_ERROR( status ); - // add padding - NW_LMgr_StaticTableCellBox_GetPadding( NW_LMgr_StaticTableCellBoxOf( cellBox ), &padding ); - // and borders - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr( tableContext, NW_LMgr_BoxOf( cellBox ), &borderWidth, NULL, NULL ); - NW_THROW_ON_ERROR(status); - // what about cellSpacing? - *cellWidth = *cellWidth + (NW_GDI_Metric_t) - ( borderWidth.left + borderWidth.right + padding.left + padding.right ); - - if( NW_LMgr_Box_GetProperty( NW_LMgr_BoxOf( cellBox ), NW_CSS_Prop_width, &prop ) == KBrsrSuccess ) - { - NW_LMgr_Property_t origProp; - // do not take percentage type into account (as we do not know about the 100% size ) - // unless the table width is set - // get the original property as NW_LMgr_Box_GetProperty calls resolve on the property - status = NW_LMgr_Box_GetRawProperty( NW_LMgr_BoxOf( cellBox ), NW_CSS_Prop_width, &origProp ); - if( status != KBrsrSuccess ) - { - // if getting raw property fails then we should use the - // result of the getPropery instead. - origProp.type = prop.type; - } - - // adjust pixel cell width - if( origProp.type != NW_CSS_ValueType_Percentage ) - { - if( (NW_GDI_Metric_t)prop.value.integer > *cellWidth ) - { - *cellWidth = (NW_GDI_Metric_t)prop.value.integer; - } - } - // adjust percentage cell width - else - { - NW_LMgr_Property_t tableProp; - - // get the table width to resolve the cell's percentage value - if( NW_LMgr_Box_GetRawProperty( NW_LMgr_BoxOf( thisObj ), NW_CSS_Prop_width, &tableProp ) == KBrsrSuccess ) - { - // works only if we've got the pixel value - if( tableProp.type == NW_CSS_ValueType_Px ) - { - // calculate new cellWidth - NW_GDI_Metric_t newCellWidth = (NW_GDI_Metric_t) ( - (NW_Float32)tableProp.value.integer / 100 * (NW_Float32)origProp.value.decimal ); - - if( newCellWidth > *cellWidth ) - { - *cellWidth = newCellWidth; - } - } - } - } - } - - // for some formatting reason, container width cannot be less than NW_LMGR_BOX_MIN_WIDTH - if( *cellWidth < NW_LMGR_BOX_MIN_WIDTH ) - { - *cellWidth = NW_LMGR_BOX_MIN_WIDTH; - } - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -/* ---------------------------------------------------------------------------- */ -/* Set the current size of a table by getting all cells' size */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_CalculateTableMinMaxWidth( NW_LMgr_StaticTableBox_t* thisObj ) - { - NW_TRY( status ) - { - NW_LMgr_StaticTableContext_t* tableContext; - NW_ADT_Vector_Metric_t rowIndex; - NW_ADT_Vector_Metric_t colIndex; - NW_LMgr_Box_t* rowBox; - NW_LMgr_Box_t* cellBox; - NW_GDI_Metric_t tableMaxWidth = 0; - NW_GDI_Metric_t tableMinWidth = 0; - NW_GDI_Metric_t maxMaxColWidth; - NW_GDI_Metric_t maxMinColWidth; - NW_Bool sameCell; - NW_LMgr_Property_t prop; - NW_LMgr_PropertyValue_t visibilityVal; - NW_LMgr_FrameInfo_t borderWidth; - - NW_ASSERT( thisObj != NULL ); - - tableContext = thisObj->ctx; - - NW_THROW_OOM_ON_NULL( tableContext, status ); - - for( colIndex = 0; colIndex < tableContext->numCols; colIndex++ ) - { - maxMaxColWidth = 0; - maxMinColWidth = 0; - // get rows - for( rowIndex = 0; rowIndex < tableContext->numRows; rowIndex++ ) - { - rowBox = NW_LMgr_ContainerBox_GetChild( NW_LMgr_ContainerBoxOf( thisObj ), rowIndex ); - NW_THROW_OOM_ON_NULL( rowBox, status ); - - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy( tableContext, colIndex, rowIndex, &cellBox ); - NW_THROW_ON_ERROR( status ); - - // if the box is not cellbox skip it - if(!NW_Object_IsInstanceOf (cellBox, &NW_LMgr_StaticTableCellBox_Class)) - continue; - - // check if this row is visible - visibilityVal.token = NW_CSS_PropValue_visible; - - (void)NW_LMgr_Box_GetPropertyValue ( rowBox, NW_CSS_Prop_visibility, NW_CSS_ValueType_Token, &visibilityVal ); - - if( visibilityVal.token == NW_CSS_PropValue_visible && cellBox != NULL ) - { - // check colspan too. as we really dont wanna add colspan cells as many times as many colspans we do have here - sameCell = NW_FALSE; - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList( cellBox, NW_CSS_Prop_colSpan, &prop ); - if( (NW_ADT_Vector_Metric_t)prop.value.integer > 1 ) - { - NW_ADT_Vector_Metric_t currentCol; - NW_ADT_Vector_Metric_t currentRow; - - status = NW_LMgr_StaticTableContext_PxPyToLxLy( tableContext, colIndex, rowIndex, &currentCol, &currentRow ); - NW_THROW_ON_ERROR( status ); - // cell position returns with the real position of the cell and that could be different to the row/col index when - // colspan is present. - // for examp: - // <tr><td colspan 2>row 1</td></tr> - // <tr><td>row2 col1</td><td>row2 col2</td></tr> - // for both columns in the first row, tableContext->cellBoxes[] returns with the very same cell box - sameCell = (NW_Bool)( ( currentCol != colIndex || currentRow != rowIndex ) ? NW_TRUE : NW_FALSE ); - } - if( sameCell != NW_TRUE ) - { - NW_GDI_Metric_t cellMinWidth; - NW_GDI_Metric_t cellMaxWidth; - - status = NW_LMgr_StaticTableBox_CalculateCellWidth( thisObj, NW_LMgr_ContainerBoxOf( cellBox ), &cellMinWidth, NW_TRUE ); - _NW_THROW_ON_ERROR( status ); - - status = NW_LMgr_StaticTableBox_CalculateCellWidth( thisObj, NW_LMgr_ContainerBoxOf( cellBox ), &cellMaxWidth, NW_FALSE ); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( cellBox ) ); - boxBounds.dimension.width = cellMaxWidth; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( cellBox ), boxBounds ); - _NW_THROW_ON_ERROR( status ); - - // set min/max cell width - NW_LMgr_StaticTableCellBox_SetMaxWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ), cellMaxWidth ); - NW_LMgr_StaticTableCellBox_SetMinWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ), cellMinWidth); - - // find the widest cell in this column in order to set table width - if( cellMaxWidth > maxMaxColWidth ) - { - maxMaxColWidth = cellMaxWidth; - } - if( cellMinWidth > maxMinColWidth ) - { - maxMinColWidth = cellMinWidth; - } - } - } - } - tableMaxWidth+=maxMaxColWidth; - tableMinWidth+=maxMinColWidth; - } - // and finally add border - NW_LMgr_Box_GetBorderWidth( NW_LMgr_BoxOf( thisObj ), &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - - // adjust table width - tableMaxWidth+=(borderWidth.left + borderWidth.right ); - tableMinWidth+=(borderWidth.left + borderWidth.right ); - - // If the 'table' or 'inline-table' element's 'width' property has a specified value and it is bigger - // than the compute value, then take width instead of the compute value - if( NW_LMgr_BoxOf( thisObj )->propList != NULL && - NW_LMgr_PropertyList_Get( ( ( NW_LMgr_Box_t * ) thisObj )->propList, NW_CSS_Prop_width, &prop ) == KBrsrSuccess ) - { - // do not take percentage type into account - if( prop.type != NW_CSS_ValueType_Percentage ) - { - if( (NW_GDI_Metric_t)prop.value.integer > tableMaxWidth ) - { - tableMaxWidth = (NW_GDI_Metric_t)prop.value.integer; - } - if( (NW_GDI_Metric_t)prop.value.integer > tableMinWidth ) - { - tableMinWidth = (NW_GDI_Metric_t)prop.value.integer; - } - } - } - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf( tableContext->tableBox ) ); - - boxBounds.dimension.width = tableMaxWidth; - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( tableContext->tableBox ), boxBounds ); - - tableContext->tableMaxWidth = tableMaxWidth; - tableContext->tableMinWidth = tableMinWidth; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------ */ -/* set columns contraint */ -static -void -NW_LMgr_StaticTableBox_SetColumnConstraint( NW_LMgr_StaticTableBox_t* thisObj, NW_GDI_Metric_t constraint ) - { - //lint -esym(550, status) Warning -- Symbol 'status' (line 554) not accessed - NW_TRY( status ) - { - NW_ADT_Vector_Metric_t colIndex; - NW_LMgr_StaticTableContext_t* tableContext; - - NW_ASSERT( thisObj != NULL ); - - tableContext = thisObj->ctx; - - NW_THROW_OOM_ON_NULL( tableContext, status ); - - for( colIndex = 0; colIndex < tableContext->numCols; colIndex++ ) - { - tableContext->colConstraints[ colIndex ] = constraint; - } - status = KBrsrSuccess; - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - } - NW_END_TRY; - } - -/* ------------------------------------------------------------------------ */ -/* constrain table */ -static -void -NW_LMgr_StaticTableBox_ConstrainTable( NW_LMgr_StaticTableBox_t* thisObj ) - { - NW_ASSERT( thisObj != NULL ); - - if( thisObj->automaticWidthPass == NW_LMgr_StaticTableBox_AutomaticWidth_MaximumPass ) - { - NW_LMgr_StaticTableBox_SetColumnConstraint( thisObj, NW_LMGR_STATICTABLEBOX_MAX_CONSTRAINT ); - } - // minimum pass is eliminated by some performance improvement - else - { - // final/undefined(fixed) pass does not require the constraints to be set as they are being calculated in this pass - } - } - -/* ------------------------------------------------------------------------- * - * Public methods to set automatic table calculation passes. - * 1. maximum pass: calculate the maximum width - * 2. final pass : calculate the final column width based on min and max - * undefined pass: error situation when automatic calculation failed. - */ -void -NW_LMgr_StaticTableBox_SetAutomaticTableWidthPass( NW_LMgr_StaticTableBox_t* thisObj, - NW_LMgr_StaticTableBox_AutomaticWidth_PassTypes_t passType ) - { - NW_ASSERT( thisObj != NULL ); - - thisObj->automaticWidthPass = passType; - } - -/* ------------------------------------------------------------------------- * -NW_LMgr_StaticTableBox_TableSizeChanged( NW_LMgr_StaticTableBox_t* thisObj ) -*/ -void -NW_LMgr_StaticTableBox_TableSizeChanged( NW_LMgr_StaticTableBox_t* thisObj ) - { - NW_ASSERT( thisObj != NULL ); - - thisObj->needsRelayout = NW_TRUE; - } - -/* ------------------------------------------------------------------------- * - * Whenever and image comes in which involves relayout flow, we need to initiate - * the relayout flow right from the topmost table. - * This function takes the "dirty" table and figures out the topmost table where - * the layout flow has to be initiated. - * Most of the time it does not involve the entire tree to be laid out so - * it saves time for us. - */ -void -NW_LMgr_StaticTableBox_UpdatesTableMinMaxWidth( NW_LMgr_StaticTableBox_t* thisObj ) - { - NW_LMgr_Box_t* box; - NW_LMgr_Box_t* topMostTable; - - NW_ASSERT( thisObj != NULL ); - - // get topmost parent table - topMostTable = NW_LMgr_BoxOf( thisObj ); - box = topMostTable; - while( box->parent != NULL ) - { - if( NW_Object_IsClass( box->parent, &NW_LMgr_StaticTableBox_Class ) == NW_TRUE ) - { - topMostTable = NW_LMgr_BoxOf( box->parent ); - } - box = NW_LMgr_BoxOf( box->parent ); - } - - // initiate relayout event. - // format context is NULL - (void)NW_LMgr_Box_Resize( topMostTable , NULL); - } - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_ResizeTable - * Parameters: thisObj - the table box - * Description: This method calls sets the width and height for the table. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_ResizeTable (NW_LMgr_StaticTableBox_t* thisObj) -{ - NW_LMgr_StaticTableContext_t *tableContext = thisObj->ctx; - NW_LMgr_Box_t* tableBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_ContainerBox_t *tableContainer = NW_LMgr_ContainerBoxOf(tableBox); - NW_LMgr_Box_t* rowBox; - NW_ADT_Vector_Metric_t rowIndex; - NW_GDI_Metric_t propHeight; - NW_LMgr_Property_t prop; - - NW_REQUIRED_PARAM(thisObj); - - prop.value.token = NW_CSS_PropValue_auto; - prop.type = NW_CSS_ValueType_Token; - NW_LMgr_Box_GetProperty(tableBox, NW_CSS_Prop_height, &prop); - - /* In case the height property was explicitly set and is greater than the - * calculated content height, we will stretch the rows to fit the given - * height */ - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - if (prop.type == NW_CSS_ValueType_Px) - { - propHeight = (NW_GDI_Metric_t)prop.value.integer; - if (propHeight > tableContext->contentHeight) - { - for (rowIndex = 0; rowIndex < tableContext->numRows; rowIndex++) - { - rowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, rowIndex); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( rowBox ); - - if( tableContext->contentHeight ) - { - boxBounds.dimension.height = (NW_GDI_Metric_t) - (boxBounds.dimension.height * propHeight / tableContext->contentHeight); - } - else - { // to prevent divided by zero - // rows height calulates desired height/ number of rows (divided equaly) as the actual - // content height is unknown. - boxBounds.dimension.height = (NW_GDI_Metric_t)( propHeight / tableContext->numRows ); - } - // - NW_LMgr_Box_SetFormatBounds( rowBox, boxBounds ); - } - tableBoxBounds.dimension.height = propHeight; - } - else - { - /* Otherwise simply use the minimum height */ - tableBoxBounds.dimension.height = (NW_GDI_Metric_t)tableContext->contentHeight; - } - } - - else - { - /* Otherwise simply use the minimum height */ - tableBoxBounds.dimension.height = (NW_GDI_Metric_t)tableContext->contentHeight; - } - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_PlaceTable - * Parameters: thisObj - table object - * Description: This method places the table on the canvas. The y position - * has already been determined by the enclosing flow; here - * we deal with the horizontal alignment of the table within - * that block. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -static -TBrowserStatusCode -NW_LMgr_StaticTableBox_PlaceTable (NW_LMgr_StaticTableBox_t* thisObj) -{ - NW_LMgr_StaticTableContext_t *tableContext = thisObj->ctx; - NW_LMgr_Box_t *tableBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_PropertyValue_t alignVal, floatVal, dirVal; - NW_LMgr_PropertyValueToken_t tableAlign; - NW_GDI_Metric_t flowWidth; - NW_GDI_Metric_t tableWidth; - NW_GDI_Metric_t flowX; - NW_LMgr_Box_t* parentBox = NULL; - NW_LMgr_RootBox_t* rootBox; - NW_Int32 rightLimit; - - NW_TRY(status) { - /* The table-align property should be handled separately */ - alignVal.token = NW_CSS_PropValue_left; - status = NW_LMgr_Box_GetPropertyValue(tableBox, NW_CSS_Prop_tableAlign, - NW_CSS_ValueType_Token, &alignVal); - NW_THROW_ON(status, KBrsrOutOfMemory); - - //If not able to find the table-align property from the table box, get its text align property which - //will be gotten from parent or grandparents (such as <p> tag) if itself does not have. - if (status == KBrsrNotFound) - { - status = NW_LMgr_Box_GetPropertyValue(tableBox, NW_CSS_Prop_textAlign, - NW_CSS_ValueType_Token, &alignVal); - } - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* If there is no align attribute, look for dir attribute */ - if (status == KBrsrNotFound) { - dirVal.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetPropertyValue(tableBox, NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, &dirVal); - if (dirVal.token == NW_CSS_PropValue_rtl) { - alignVal.token = NW_CSS_PropValue_right; - } - } - - tableAlign = alignVal.token; - - /* Get the anonymous table container */ - parentBox = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(tableBox); - - /* The float property should be applied to the container */ - floatVal.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue(parentBox, NW_CSS_Prop_float, - NW_CSS_ValueType_Token, &floatVal); - NW_THROW_ON(status, KBrsrOutOfMemory); - - /* We only align the table if it is not floating */ - NW_GDI_Rectangle_t parentBoxBounds = NW_LMgr_Box_GetFormatBounds( parentBox ); - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - if (floatVal.token == NW_CSS_PropValue_none) - { - flowX = parentBoxBounds.point.x; - flowWidth = parentBoxBounds.dimension.width; - tableWidth = tableBoxBounds.dimension.width; - - switch (tableAlign) - { - case NW_CSS_PropValue_center: - tableContext->leftMargin = (NW_GDI_Metric_t)(flowX + (flowWidth - tableWidth)/2); - break; - case NW_CSS_PropValue_right: - tableContext->leftMargin = (NW_GDI_Metric_t)(flowX + flowWidth - tableWidth); - break; - default: - // tableBoxBounds.point.x has taken left margin into account - tableContext->leftMargin = tableBoxBounds.point.x; - break; - } - tableBoxBounds.point.x = tableContext->leftMargin; - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - } - else - { - tableContext->leftMargin = tableBoxBounds.point.x; - } - // update - tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - - if (tableContext->leftMargin < 0) - { - tableBoxBounds.point.x = tableContext->leftMargin = parentBoxBounds.point.x; - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - } - - rootBox = NW_LMgr_Box_GetRootBox( tableBox ); - - // update - tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - - if( rootBox ) - { - rightLimit = NW_LMgr_RootBox_GetRightLimit( rootBox ); - if (tableContext->leftMargin + tableBoxBounds.dimension.width > rightLimit ) - { - NW_Int32 margin = tableContext->leftMargin - tableBoxBounds.point.x; - tableContext->leftMargin = rightLimit - tableBoxBounds.dimension.width; - tableBoxBounds.point.x = tableContext->leftMargin - margin ; - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - } - } - /* Finally place the table on the y axis */ - // update - tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - tableBoxBounds.point.y = tableContext->y; - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ - -const -NW_LMgr_StaticTableBox_Class_t NW_LMgr_StaticTableBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FormatBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_StaticTableBox_t), - /* construct */ _NW_LMgr_StaticTableBox_Construct, - /* destruct */ _NW_LMgr_StaticTableBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_StaticTableBox_Resize, - _NW_LMgr_StaticTableBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_StaticTableBox_Constrain, - /* draw */ _NW_LMgr_StaticTableBox_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_Box_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - /* NW_LMgr_StaticTableBox */ - { - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_Construct - * Parameters: - * Description: This constructor. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - NW_LMgr_StaticTableBox_t *thisObj = NW_LMgr_StaticTableBoxOf(dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_ContainerBox_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - thisObj->ctx = NULL; - thisObj->automaticWidthPass = NW_LMgr_StaticTableBox_AutomaticWidth_UndefinedPass; - thisObj->needsRelayout = NW_FALSE; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_Destruct - * Parameters: - * Description: This destructor. - * Returns: KBrsrSuccess - */ -void -_NW_LMgr_StaticTableBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_StaticTableBox_t *thisObj = NW_LMgr_StaticTableBoxOf(dynamicObject); - - NW_Object_Delete(thisObj->ctx); -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_Constrain - * Parameters: box - the table box - * Description: This method does the brunt of the work of table formatting. - * It initializes the table context, constrains the rows and - * cells, formats them and finally places them in the proper - * positions. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_StaticTableBox_t* thisObj; - NW_LMgr_StaticTableContext_t *tableContext = NULL; - - /* for convenience */ - thisObj = NW_LMgr_StaticTableBoxOf(box); - - NW_TRY (status) { - - if (thisObj->ctx == NULL) - { - /* Allocate the memory for the TableContext structure */ - thisObj->ctx = NW_LMgr_StaticTableContext_New(); - NW_THROW_OOM_ON_NULL(thisObj->ctx, status); - } - - /* For convenience */ - tableContext = thisObj->ctx; - - /* Initialize the context */ - status = NW_LMgr_StaticTableContext_Initialize(tableContext, box); - NW_THROW_ON_ERROR(status); - - /* Constrain the table */ - // this does not really do anything in case of final/undefined passes - NW_LMgr_StaticTableBox_ConstrainTable(thisObj); - - // check if we are ready to calculate the final contraints - if( thisObj->automaticWidthPass == NW_LMgr_StaticTableBox_AutomaticWidth_FinalPass ) - { - status = NW_LMgr_StaticTableContext_FindConstraints( tableContext, NW_TRUE ); - - // Reset automaticWidthPass back to it original value. This is necessary in order to - // to support switching screen modes on pages that contain grid mode tables as the - // constraints need to be recalulated after a screen mode switch. - // - // This is purposly done before the result is checked. - thisObj->automaticWidthPass = NW_LMgr_StaticTableBox_AutomaticWidth_UndefinedPass; - - _NW_THROW_ON_ERROR(status); - } - else if ( thisObj->automaticWidthPass == NW_LMgr_StaticTableBox_AutomaticWidth_UndefinedPass ) - { - /* Find the column constraints */ - status = NW_LMgr_StaticTableContext_FindConstraints( tableContext, NW_FALSE ); - _NW_THROW_ON_ERROR(status); - } - - /* First resize the rows to determine the table height. We start at the last row - * because that makes it easier to take into account cells with the rowSpan property set. - */ - - context->newFormatContext = context; - context->formatBox = NW_LMgr_BoxOf(thisObj); - context->formatChildren = NW_TRUE; - context->referenceCount ++; - - } NW_CATCH (status) { - } NW_FINALLY { - // tableContext- cleaned up in postresize - return status; - } NW_END_TRY -} - - -TBrowserStatusCode -_NW_LMgr_StaticTableBox_PostResize(NW_LMgr_Box_t* box) -{ - NW_LMgr_StaticTableBox_t* thisObj; - NW_LMgr_StaticTableContext_t *tableContext = NULL; - NW_ADT_Vector_Metric_t rowIndex, rowCount; - NW_LMgr_PropertyValue_t visibilityVal; - NW_LMgr_Box_t *rowBox; - NW_LMgr_ContainerBox_t *tableContainer; - - /* for convenience */ - thisObj = NW_LMgr_StaticTableBoxOf(box); - tableContainer = NW_LMgr_ContainerBoxOf(box); - - NW_TRY (status) { - - tableContext = thisObj->ctx; - - NW_ASSERT(tableContext != NULL); - - for (rowIndex = 0; rowIndex < tableContext->numRows; rowIndex++) { - - rowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, - (NW_ADT_Vector_Metric_t) - (tableContext->numRows - 1 - rowIndex)); - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( rowBox ); - - /* Add the row height to the box height */ - tableContext->contentHeight = (NW_GDI_Metric_t) - (tableContext->contentHeight + rowBoxBounds.dimension.height); - } - - /* Resize the table box */ - status = NW_LMgr_StaticTableBox_ResizeTable(thisObj); - _NW_THROW_ON_ERROR(status); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - /* Set the cursor to the top of the STB */ - tableContext->y = boxBounds.point.y; - - /* Place the table */ - status = NW_LMgr_StaticTableBox_PlaceTable(thisObj); - _NW_THROW_ON_ERROR(status); - - /* How many rows in the table */ - rowCount = NW_LMgr_ContainerBox_GetChildCount(tableContainer); - - /* Now place the rows and their contained cells */ - for (rowIndex = 0; rowIndex < rowCount; rowIndex++) { - - /* Get the row */ - rowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, rowIndex); - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( rowBox ); - - // JADE: hack; to-do: why row box is not staticrowbox? - if (!NW_Object_IsInstanceOf (rowBox, &NW_LMgr_StaticTableRowBox_Class)) - { - continue; - } - - /* Check if visibility val for the row is collapse */ - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (rowBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (visibilityVal.token == NW_CSS_PropValue_collapse) { - continue; - } - - /* Place the row */ - status = - NW_LMgr_StaticTableRowBox_PlaceRow (NW_LMgr_StaticTableRowBoxOf(rowBox), - tableContext->leftMargin, - tableContext->y); - _NW_THROW_ON_ERROR(status); - - /* Update the tableContext */ - tableContext->y = (NW_GDI_Metric_t) - (tableContext->y + rowBoxBounds.dimension.height); - } - // once we are ready with resizing, - // 1. set relayoutNeeds flag to false - // 2. check if table width needs to be calculated - thisObj->needsRelayout = NW_FALSE; - - if( thisObj->automaticWidthPass == NW_LMgr_StaticTableBox_AutomaticWidth_MaximumPass ) - // minimum pass is eliminated by some performance improvement - { - status = NW_LMgr_StaticTableBox_CalculateTableMinMaxWidth( thisObj ); - _NW_THROW_ON_ERROR(status); - // collapse the table - status = NW_LMgr_StaticTableBox_CollapseTable( thisObj ); - _NW_THROW_ON_ERROR(status); - } - - } NW_CATCH (status) { - } NW_FINALLY { - if (tableContext) { - (void)NW_LMgr_StaticTableContext_Cleanup(tableContext); - } - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_Constrain - * Parameters: box - the table box - * constrain - the constraint - * Description: This method constrains the width of the table. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Constrain(NW_LMgr_Box_t* box, - NW_GDI_Metric_t constraint) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_GDI_Dimension2D_t minSize; - NW_GDI_Dimension2D_t setSize; - NW_LMgr_Box_t *thisTable = box; - NW_LMgr_FrameInfo_t borderWidth; - - NW_ASSERT(box != NULL); - - /* Get minimum size for the box. */ - (void) NW_LMgr_Box_GetMinimumSize(thisTable, &minSize); - NW_LMgr_Box_GetBorderWidth(box, &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - minSize.width -= (borderWidth.left + borderWidth.right); - - /* See if any size properties are set, Currently we ignore return - * status and use the values of setSize members to see if size - * properties were set - */ - (void) NW_LMgr_Box_GetSizeProperties(thisTable, &setSize); - - /* If a constraint was supplied, apply it */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - if(constraint > 0) - { - /* If no horizontal size property, set according to constraint */ - if(setSize.width <= 0) - { - boxBounds.dimension.width = constraint; - } - /* Else, set to minimum width. Any size properties are already included - * in this value. - */ - else - { - boxBounds.dimension.width = minSize.width; - if(constraint < minSize.width) - { - /* constraint too small */ - status = KBrsrLmgrConstraintTooSmall; - } - } - } - - /* If no constraint was provided, set to minimum width. We cannot do - * a layout without a constraint. */ - else - { - boxBounds.dimension.width = minSize.width; - } - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - return status; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableBox_Draw - * Parameters: box - the table box - * deviceContext - the device context - * hasFocus - does the box have focus? - * Description: This method overrides the base class draw. We leave it - * blank because we don't want the table to draw its own - * borders. Table borders will be drawn by the cells that - * own them. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -TBrowserStatusCode -_NW_LMgr_StaticTableBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(deviceContext); - NW_REQUIRED_PARAM(hasFocus); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_StaticTableBox_t* -NW_LMgr_StaticTableBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_StaticTableBox_t*) - NW_Object_New (&NW_LMgr_StaticTableBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrStaticTableCellBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrStaticTableCellBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1162 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_statictablecellboxi.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_formatcontext.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_lmgr_rootbox.h" -#include "GDIDevicecontext.h" -#include "nwx_math.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_lmgr_activecontainerbox.h" -#include "BrsrStatusCodes.h" -#include "BoxRender.h" -#include "nwx_settings.h" - -/* ------------------------------------------------------------------------- */ - -static -void -NW_LMgr_StaticTableCellBox_GetEdge(NW_LMgr_Box_t* box, - NW_LMgr_StaticTableBorderSide_t side, - NW_LMgr_StaticTableBorderEdge_t* edge) -{ - NW_LMgr_FrameInfo_t widthInfo; - NW_LMgr_FrameInfo_t styleInfo; - NW_LMgr_FrameInfo_t colorInfo; - NW_LMgr_Property_t prop; - TBrowserStatusCode status; - - NW_LMgr_Box_GetBorderWidth(box, &widthInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderStyle(box, &styleInfo, ELMgrFrameAll ); - NW_LMgr_Box_GetBorderColor(box, &colorInfo); - - switch (side) { - case left: - edge->width = widthInfo.left; - edge->style = styleInfo.left; - edge->color = colorInfo.left; - break; - case right: - edge->width = widthInfo.right; - edge->style = styleInfo.right; - edge->color = colorInfo.right; - break; - case top: - edge->width = widthInfo.top; - edge->style = styleInfo.top; - edge->color = colorInfo.top; - break; - case bottom: - edge->width = widthInfo.bottom; - edge->style = styleInfo.bottom; - edge->color = colorInfo.bottom; - break; - default: - NW_ASSERT(0); - break; - } - - // While in SSM force borders on grid mode tables to 1. - if (edge->width > 1) { - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_gridModeApplied, &prop); - if (status == KBrsrSuccess) { - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - NW_ASSERT (rootBox != NULL); - - if (NW_LMgr_RootBox_GetSmallScreenOn(rootBox)) { - edge->width = 1; - } - } - } - - return; -} - -static -void -NW_LMgr_StaticTableCellBox_UpdateEdge(NW_LMgr_StaticTableBorderEdge_t* edge, - NW_LMgr_StaticTableBorderEdge_t* newEdge) - { - /* If the edge is hidden, no need to update it; simply return */ - if (edge->style == NW_CSS_PropValue_hidden) - { - return; - } - - /* If the new edge is hidden, store that and return */ - if (newEdge->style == NW_CSS_PropValue_hidden) - { - edge->style = NW_CSS_PropValue_hidden; - edge->width = 0; - return; - } - - /* Everyone can overwrite "style==none" */ - if (newEdge->style == NW_CSS_PropValue_none) - { - return; - } - - /* According to CSS, the border with the largest width wins. - If all borders have the same width, then the border with - the strongest style wins. Here we assume that - NW_CSS_PropValue_double > ...solid > ...dashed > ...dotted > ...none > */ - if (newEdge->width > edge->width) - { - *edge = *newEdge; - } - // comparison of width supercedes comparison of styel - else if ( newEdge->width == edge->width && - newEdge->style > edge->style ) - { - *edge = *newEdge; - } - - return; - } - - -void -NW_LMgr_StaticTableCellBox_GetPadding(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_LMgr_FrameInfo_t *paddingInfo) -{ - NW_LMgr_PropertyValue_t value; - NW_LMgr_Box_t *thisCell = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *thisRow = NW_LMgr_BoxOf(thisCell->parent); - NW_LMgr_StaticTableBox_t *thisSTB = NW_LMgr_StaticTableBoxOf(thisRow->parent); - NW_LMgr_Box_t *thisTable = NW_LMgr_BoxOf(thisSTB); - NW_LMgr_Property_t cellPadding; - NW_GDI_Metric_t px; - TBrowserStatusCode status; - NW_GDI_Rectangle_t bounds; - - value.integer = 0; - NW_LMgr_Box_GetPropertyValue(thisTable, NW_CSS_Prop_flags, NW_CSS_ValueType_Integer, &value); - - if (value.integer & NW_CSS_PropValue_flags_wmlTable) { - if (paddingInfo != NULL) { - paddingInfo->left = 1; - paddingInfo->right = 1; - paddingInfo->top = 1; - paddingInfo->bottom = 1; - } - } - else { - - cellPadding.value.integer = 0; - cellPadding.type = NW_CSS_ValueType_Px; - status = NW_LMgr_Box_GetRawProperty(thisTable, NW_CSS_Prop_cellPadding, &cellPadding); - if (status == KBrsrSuccess) { - if (cellPadding.type == NW_CSS_ValueType_Percentage) { - bounds = NW_LMgr_Box_GetFormatBounds(thisCell); - px = (NW_GDI_Metric_t)((cellPadding.value.decimal * bounds.dimension.width) / 100); - } - else { - px = (NW_GDI_Metric_t)cellPadding.value.integer; - } - paddingInfo->left = paddingInfo->right = paddingInfo->top = paddingInfo->bottom = px; - } - else { - NW_LMgr_Box_GetPadding(thisCell, paddingInfo, ELMgrFrameAll ); - } - } -} - -// --------------------------------------------------------------------- -// NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox() updates the side of an edge with data from a box. -// The box is presumed to be more specific than the sources applied to the edge thus far. -// If the box does not specify color data, then the color data in the edge is kept. -static -void -NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(NW_LMgr_Box_t* box, // Source for more specific edge data. - NW_LMgr_StaticTableBorderSide_t side, // The side to update. - NW_LMgr_StaticTableBorderEdge_t* edge) // Cumulative edge data. - { - TBrowserStatusCode status; - NW_LMgr_StaticTableBorderEdge_t tempEdge; - NW_LMgr_Property_t prop; - NW_LMgr_PropertyName_t cssPropName; - - - NW_LMgr_StaticTableCellBox_GetEdge(box, side, &tempEdge); - - switch(side) { - case top: - cssPropName = NW_CSS_Prop_topBorderColor; - break; - case left: - cssPropName = NW_CSS_Prop_leftBorderColor; - break; - case right: - cssPropName = NW_CSS_Prop_rightBorderColor; - break; - case bottom: - cssPropName = NW_CSS_Prop_bottomBorderColor; - break; - default: - return; - } - - - // if the box doesn't specify color, keep value from less specific element. - if (!edge->color) - { - status = NW_LMgr_Box_GetPropertyFromList(box, cssPropName, &prop); - if (status != KBrsrNotFound) - { - edge->color = prop.value.integer; - } - else - { - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_borderColor, &prop); - - if (status != KBrsrNotFound) - { - edge->color = prop.value.integer; - } - else - { - edge->color = tempEdge.color; - } - } - } - - - NW_LMgr_StaticTableCellBox_UpdateEdge(edge, &tempEdge); - } - - - -/* Public function to get the cell borders */ -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_CalculateBorders(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_Uint16 currentCol, - NW_Uint16 currentRow, - NW_Uint16 colSpan, - NW_Uint16 rowSpan, - NW_LMgr_StaticTableBorderEdge_t *leftEdge, - NW_LMgr_StaticTableBorderEdge_t *rightEdge, - NW_LMgr_StaticTableBorderEdge_t *topEdge, - NW_LMgr_StaticTableBorderEdge_t *bottomEdge) - { - NW_LMgr_Box_t *thisCell = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *thisRow = NW_LMgr_BoxOf(thisCell->parent); - NW_LMgr_StaticTableBox_t *thisSTB = NW_LMgr_StaticTableBoxOf(thisRow->parent); - NW_LMgr_Box_t *thisTable = NW_LMgr_BoxOf(thisSTB); - NW_LMgr_Box_t *tempBox = NULL; - NW_LMgr_StaticTableContext_t *context = thisSTB->ctx; - - NW_LMgr_StaticTableBorderEdge_t tempEdge; - - NW_ADT_Vector_Metric_t numCols = NW_LMgr_StaticTableContext_GetNumCols(context); - NW_ADT_Vector_Metric_t numRows = NW_LMgr_StaticTableContext_GetNumRows(context); - - NW_LMgr_PropertyValue_t value; - - NW_TRY(status) - { - - /* Optimization for WML tables */ - value.integer = 0; - NW_LMgr_Box_GetPropertyValue(thisTable, NW_CSS_Prop_flags, NW_CSS_ValueType_Integer, &value); - - if (value.integer & NW_CSS_PropValue_flags_wmlTable) - { - if (leftEdge) - { - leftEdge->width = 1; - leftEdge->style = NW_CSS_PropValue_solid; - leftEdge->color = 0x000000; - } - - if (rightEdge) - { - rightEdge->width = 1; - rightEdge->style = NW_CSS_PropValue_solid; - rightEdge->color = 0x000000; - } - - if (topEdge) - { - topEdge->width = 1; - topEdge->style = NW_CSS_PropValue_solid; - topEdge->color = 0x000000; - } - - if (bottomEdge) - { - bottomEdge->width = 1; - bottomEdge->style = NW_CSS_PropValue_solid; - bottomEdge->color = 0x000000; - } - - NW_THROW_SUCCESS(status); - } - - /* Get left border */ - if (leftEdge) - { - NW_Mem_memset(leftEdge, 0, sizeof(NW_LMgr_StaticTableBorderEdge_t)); - - // Our cell wall has the highest priority. - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisCell, left, leftEdge); - - if (currentCol > 0) - { - /* Update with the right edge of the neighbor on the left */ - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy - (context, (NW_Uint16)(currentCol - 1), currentRow, &tempBox); - NW_ASSERT(status != KBrsrNotFound); - NW_THROW_ON_ERROR(status); - - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, right, leftEdge); - } - else - { - // Now look at our row - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisRow, left, leftEdge); - - /* Check the table border */ - NW_LMgr_StaticTableCellBox_GetEdge(thisTable, left, &tempEdge); - NW_LMgr_StaticTableCellBox_UpdateEdge(leftEdge, &tempEdge); - } - } - - /* Get right border */ - if (rightEdge) - { - NW_Mem_memset(rightEdge, 0, sizeof(NW_LMgr_StaticTableBorderEdge_t)); - - // Our own cell walls have the highest priority. - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisCell, right, rightEdge); - - if (currentCol + colSpan < numCols) - { - /* Update with the left edge of the neighbor on the right */ - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy - (context, (NW_Uint16)(currentCol + colSpan), currentRow, &tempBox); - NW_ASSERT(status != KBrsrNotFound); - NW_THROW_ON_ERROR(status); - - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, left, rightEdge); - } - else - { - // Now look at our row - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisRow, right, rightEdge); - - //If we are the last cell in the row, look at the table border - NW_LMgr_StaticTableCellBox_GetEdge(thisTable, right, &tempEdge); - NW_LMgr_StaticTableCellBox_UpdateEdge(rightEdge, &tempEdge); - } - } - - /* Get top border */ - if (topEdge) - { - NW_Mem_memset(topEdge, 0, sizeof(NW_LMgr_StaticTableBorderEdge_t)); - - /* Initialize to our own cell walls */ - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisCell, top, topEdge); - - /* Now look at our row */ - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisRow, top, topEdge); - - if (currentRow > 0) - { - // Look at row immediately before us - tempBox = NW_LMgr_StaticTableBox_GetRow(thisSTB, (NW_Uint16)(currentRow - 1)); - NW_THROW_OOM_ON_NULL (tempBox, status); - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, bottom, topEdge); - - /* Look at the cell immediately above us */ - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy - (context, currentCol, (NW_Uint16)(currentRow - 1), &tempBox); - NW_ASSERT(status != KBrsrNotFound); - NW_THROW_ON_ERROR(status); - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, bottom, topEdge); - } - else - { - /* Default to the table border */ - NW_LMgr_StaticTableCellBox_GetEdge(thisTable, top, &tempEdge); - NW_LMgr_StaticTableCellBox_UpdateEdge(topEdge, &tempEdge); - } - } - - /* Get bottom border */ - if (bottomEdge) - { - NW_Mem_memset(bottomEdge, 0, sizeof(NW_LMgr_StaticTableBorderEdge_t)); - - /* Default to our own cell walls */ - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisCell, bottom, bottomEdge); - - /* Next look at our row */ - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(thisRow, bottom, bottomEdge); - - if (currentRow + rowSpan < numRows) - { - /* Look at row immediately after us */ - tempBox = NW_LMgr_StaticTableBox_GetRow(thisSTB, (NW_Uint16)(currentRow + rowSpan)); - NW_THROW_OOM_ON_NULL (tempBox, status); - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, top, bottomEdge); - - /* And the cell immediately below us */ - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy - (context, currentCol, (NW_Uint16)(currentRow + rowSpan), &tempBox); - NW_ASSERT(status != KBrsrNotFound); - NW_THROW_ON_ERROR(status); - NW_LMgr_StaticTableCellBox_UpdateEdgeFromBox(tempBox, top, bottomEdge); - } - else - { - NW_LMgr_StaticTableCellBox_GetEdge(thisTable, bottom, &tempEdge); - NW_LMgr_StaticTableCellBox_UpdateEdge(bottomEdge, &tempEdge); - } - } - } - NW_CATCH(status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -/* Public function to get the cell background */ -void -NW_LMgr_StaticTableCellBox_GetBackground(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_LMgr_Property_t *backgroundProp) -{ - NW_LMgr_Box_t *thisCell = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *thisRow = NW_LMgr_BoxOf(thisCell->parent); - NW_LMgr_Box_t *thisTable = NW_LMgr_BoxOf(thisRow->parent); - NW_LMgr_Property_t prop; - TBrowserStatusCode status; - - /* Find background color */ - if (backgroundProp != NULL) { - - /* First check the table background */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_transparent; - status = NW_LMgr_Box_GetProperty(thisTable, NW_CSS_Prop_backgroundColor, &prop); - *backgroundProp = prop; - - /* Next the row background */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_transparent; - status = NW_LMgr_Box_GetProperty(thisRow, NW_CSS_Prop_backgroundColor, &prop); - if (status == KBrsrSuccess && prop.type == NW_CSS_ValueType_Color) { - *backgroundProp = prop; - } - - /* Finally the cellbox */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_transparent; - status = NW_LMgr_Box_GetProperty(thisCell, NW_CSS_Prop_backgroundColor, &prop); - if (status == KBrsrSuccess && prop.type == NW_CSS_ValueType_Color) { - *backgroundProp = prop; - } - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_GetMinimumCellSize(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_GDI_Dimension2D_t *minSize) -{ - NW_LMgr_FrameInfo_t borderWidth, paddingInfo; - NW_LMgr_Box_t *cellBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *rowBox = NW_LMgr_BoxOf(cellBox->parent); - NW_LMgr_StaticTableBox_t *tableBox = NW_LMgr_StaticTableBoxOf(rowBox->parent); - NW_LMgr_StaticTableContext_t *context = tableBox->ctx; - NW_GDI_Dimension2D_t minContentSize; - - NW_TRY (status) { - - /* Get the border information */ - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr - (context, cellBox, &borderWidth, NULL, NULL); - NW_THROW_ON_ERROR(status); - - /* Get padding info */ - NW_LMgr_StaticTableCellBox_GetPadding(thisObj, &paddingInfo); - - /* Get the minimum content size */ - status = NW_LMgr_Box_GetMinimumContentSize(cellBox, &minContentSize); - _NW_THROW_ON_ERROR (status); - - /* Calculate the minimum size for the box */ - minSize->width = (NW_GDI_Metric_t) - (minContentSize.width + borderWidth.left + borderWidth.right + - paddingInfo.left + paddingInfo.right); - minSize->height = (NW_GDI_Metric_t) - (minContentSize.height + borderWidth.top + borderWidth.bottom + - paddingInfo.top + paddingInfo.bottom); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_ShiftContent(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_GDI_Point2D_t *delta) -{ - NW_LMgr_BoxVisitor_t* visitor = NULL; - - NW_TRY (status) { - NW_LMgr_Box_t *child; - - visitor = NW_LMgr_ContainerBox_GetBoxVisitor((NW_LMgr_ContainerBox_t*)thisObj); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Invoke base-class shift on this box and all children */ - (void)NW_LMgr_BoxVisitor_NextBox(visitor, NULL); - while((child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL)) != NULL){ - status = NW_LMgr_Box_Class.NW_LMgr_Box.shift(child, delta); - _NW_THROW_ON_ERROR(status); - } - - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Delete(visitor); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_StaticTableCellBox_Stretch(NW_LMgr_StaticTableCellBox_t *thisObj, - NW_GDI_Rectangle_t *newRect) -{ - NW_GDI_Metric_t rowBaseline; - NW_GDI_Metric_t rowHeight; - NW_GDI_Metric_t cellHeight, cellBaseline; - NW_GDI_Metric_t yOffset; - NW_GDI_Point2D_t delta; - NW_LMgr_Box_t *cellBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_Box_t *rowBox = NW_LMgr_BoxOf(cellBox->parent); - NW_LMgr_PropertyValueToken_t align; - NW_LMgr_Property_t prop; - - NW_TRY (status) { - - /* Get the cell info */ - cellBaseline = NW_LMgr_Box_GetBaseline (cellBox); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( cellBox ); - - cellHeight = boxBounds.dimension.height; - - /* Get the row info */ - rowBaseline = NW_LMgr_Box_GetBaseline (rowBox); - rowHeight = newRect->dimension.height; - - /* Get the alignment property. If the cell does - * not have it, try the row box (vAlign is not inherited!) */ - prop.value.token = NW_CSS_PropValue_baseline; - status = NW_LMgr_PropertyList_Get (cellBox->propList, NW_CSS_Prop_verticalAlign, &prop); - if ((status == KBrsrNotFound) || (prop.type & NW_CSS_ValueType_DefaultStyle)){ - status = NW_LMgr_Box_GetProperty (rowBox, NW_CSS_Prop_verticalAlign, &prop); - } - align = prop.value.token; - - /* We need to calculate the final position for the cell content */ - - /* First we account for borders and padding */ - yOffset = 0; - - /* Now we deal with vertical alignment */ - switch (align) { - case NW_CSS_PropValue_baseline: - yOffset = (NW_GDI_Metric_t)(rowBaseline - cellBaseline); - break; - case NW_CSS_PropValue_top: - yOffset = (NW_GDI_Metric_t)0; - break; - case NW_CSS_PropValue_bottom: - yOffset = (NW_GDI_Metric_t)(rowHeight - cellHeight); - break; - case NW_CSS_PropValue_middle: - yOffset = (NW_GDI_Metric_t)(rowHeight / 2 - cellHeight / 2); - break; - } - - /* Now we shift the content to its final position */ - delta.x = (NW_GDI_Metric_t)(newRect->point.x - boxBounds.point.x); - delta.y = (NW_GDI_Metric_t)(newRect->point.y + yOffset - boxBounds.point.y); - - status = NW_LMgr_StaticTableCellBox_ShiftContent(thisObj, &delta); - _NW_THROW_ON_ERROR (status); - - /* Finally we set the box size to the final size */ - NW_LMgr_Box_SetFormatBounds(cellBox, *newRect); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_StaticTableCellBox_Class_t NW_LMgr_StaticTableCellBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_StaticTableCellBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_StaticTableCellBox_Resize, - _NW_LMgr_StaticTableCellBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_StaticTableCellBox_Draw, - /* render */ _NW_LMgr_StaticTableCellBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_StaticTableCellBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_BidiFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_StaticTableCellBox*/ - /* unused */ NW_Object_Unused - } -}; - - - -TBrowserStatusCode -NW_LMgr_StaticTableCell_SetConstraint (NW_LMgr_StaticTableRowBox_t* thisObj, NW_LMgr_Box_t *cellBox) -{ - NW_LMgr_Box_t *rowBox = NW_LMgr_BoxOf(thisObj); - NW_LMgr_StaticTableBox_t *table = NW_LMgr_StaticTableBoxOf(rowBox->parent); - NW_LMgr_StaticTableContext_t *context; - NW_ADT_Vector_Metric_t cellIndex, rowIndex; - NW_ADT_Vector_Metric_t currentCol, currentRow; - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t colSpan; - NW_GDI_Metric_t constraint; - - NW_TRY(status) { - - /* Get the table context */ - context = NW_LMgr_StaticTableBox_GetContext(table); - - /* Which row is this? */ - rowIndex = NW_LMgr_ContainerBox_GetChildIndex(rowBox->parent, rowBox); - cellIndex = NW_LMgr_ContainerBox_GetChildIndex(NW_LMgr_ContainerBoxOf(rowBox), cellBox); - - /* Constrain the cells */ - - /* Get the position of the cell in the table */ - status = NW_LMgr_StaticTableContext_GetCellPxPyFromLxLy - (context, cellIndex, rowIndex, - &currentCol, &currentRow, - &colSpan, NULL); - if (status == KBrsrNotFound) { - /* This is a legal condition. */ - /* It happens if cells are not included in the table */ - status = KBrsrSuccess; - // TODO handle the error - Jay - //continue; - } - NW_THROW_ON_ERROR(status); - - /* Calculate the constraint for the cell */ - constraint = 0; - for (i = currentCol; i < currentCol + colSpan; i++) { - constraint = (NW_GDI_Metric_t) - (constraint + NW_LMgr_StaticTableContext_GetColConstraint(context, i)); - } - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( cellBox ); - /* Constrain the cell and let it resize itself */ - boxBounds.dimension.width = constraint; - NW_LMgr_Box_SetFormatBounds( cellBox, boxBounds ); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Resize(NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - TBrowserStatusCode status ; - NW_LMgr_StaticTableCell_SetConstraint((NW_LMgr_StaticTableRowBox_t*)box->parent, box ); - /* invoke superclass resize */ - status = NW_LMgr_FormatBox_Class.NW_LMgr_Box.resize(box, context); - return status; -} - - -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_PostResize(NW_LMgr_Box_t* box) -{ - NW_GDI_Dimension2D_t size; - NW_LMgr_FrameInfo_t padding, borderWidth; - NW_GDI_Rectangle_t newRect; - NW_GDI_Metric_t newHeight; - NW_LMgr_StaticTableCellBox_t *thisObj = NW_LMgr_StaticTableCellBoxOf(box); - NW_LMgr_StaticTableBox_t* thisTable = - NW_LMgr_StaticTableBoxOf(NW_LMgr_BoxOf(box->parent)->parent); - NW_LMgr_StaticTableContext_t* tableContext = thisTable->ctx; - - NW_TRY(status) { - - /* Get the box width and height properties */ - NW_LMgr_Box_GetSizeProperties(box, &size); - - /* If the height is explicitely set, we need to stretch/crop the cell */ - if (size.height >= 0) { - - /* Get the border information */ - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr - (tableContext, box, &borderWidth, NULL, NULL); - NW_THROW_ON_ERROR(status); - - /* Get padding info */ - NW_LMgr_StaticTableCellBox_GetPadding(thisObj, &padding); - - newHeight = (NW_GDI_Metric_t) - (size.height + borderWidth.top + borderWidth.bottom - + padding.top + padding.bottom); - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - - if (boxBounds.dimension.height < newHeight) - { - newRect = boxBounds; - newRect.dimension.height = newHeight; - - status = NW_LMgr_StaticTableCellBox_Stretch(thisObj, &newRect); - _NW_THROW_ON_ERROR(status); - } - else - { - boxBounds.dimension.height = (NW_GDI_Metric_t) - (size.height + borderWidth.top + borderWidth.bottom - + padding.top + padding.bottom); - } - } - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* -------------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext * deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ) -{ - NW_GDI_Rectangle_t oldClip; - NW_GDI_Rectangle_t newClip; - NW_GDI_Rectangle_t realClip; - NW_LMgr_PropertyValue_t value; - NW_LMgr_PropertyValue_t floatVal; - NW_LMgr_PropertyValue_t visibilityVal; - NW_GDI_Rectangle_t viewBounds; - NW_GDI_Rectangle_t visibleArea; - NW_Bool clipRectChanged = NW_FALSE; - NW_Bool containerVisible = NW_FALSE; - void** ptr = NULL; - NW_Bool cachePresent = NW_FALSE; - - NW_LMgr_StaticTableCellBox_t *thisObj = NW_LMgr_StaticTableCellBoxOf(box); - - NW_LMgr_Box_t *rowBox = NW_LMgr_BoxOf(box->parent); - NW_LMgr_StaticTableBox_t *thisTable = NW_LMgr_StaticTableBoxOf(rowBox->parent); - - NW_LMgr_StaticTableContext_t* thisContext = thisTable->ctx; - - // Save the old clip rect - oldClip = deviceContext->ClipRect(); - - NW_TRY (status) - { - // Should we draw floats? - if (!(flags & NW_LMgr_Box_Flags_DrawFloats)) - { - floatVal.token = NW_CSS_PropValue_none; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_float, NW_CSS_ValueType_Token, &floatVal); - if (floatVal.token != NW_CSS_PropValue_none) - { - NW_THROW_SUCCESS (status); - } - } - // check if the this box has focus - // if hasFocus is already set to true by any parent - // then it should not be overuled. - if( !(*hasFocus) && currentBox == box ) - { - *hasFocus = NW_TRUE; - } - - // Get the view bounds - viewBounds = *(deviceContext->DisplayBounds()); - viewBounds.point = *(deviceContext->Origin()); - - // Determine the part of the box within the clip. - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - if (!NW_GDI_Rectangle_Cross(clipRect, &(boxBounds), &visibleArea)) - { - NW_THROW_SUCCESS( status ); - } - // Is the box visible on-screen? If not, stil try to draw - // the children - if (!NW_GDI_Rectangle_Cross(&viewBounds, &visibleArea, NULL)) - { - NW_THROW_SUCCESS( status ); - } - // If the clip is not visible on-screen, we - // draw neither the Container nor its children; - // in case we are calculating the extents, we will still - // have to peek into all children - if (!NW_GDI_Rectangle_Cross(clipRect, &viewBounds, &realClip)) - { - NW_THROW_SUCCESS( status ); - } - - // Save the old clip rect - oldClip = deviceContext->ClipRect(); - // Set the new clip rect - deviceContext->SetClipRect( &realClip ); - clipRectChanged = NW_TRUE; - - // If the visibility val is set to hidden, don't draw the - // Container -- but still try to draw the children - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (visibilityVal.token != NW_CSS_PropValue_visible) - { - goto drawChildren; - } - - // make the box draw itself - status = NW_LMgr_Box_Draw (box, deviceContext, NW_FALSE); - containerVisible = NW_TRUE; - _NW_THROW_ON_ERROR (status); - - // Add the box and the clip to the cache - cachePresent = NW_LMgr_Box_Update_RenderCache (rootBox, box, &realClip, &ptr); - if (cachePresent) - { - NW_THROW_OOM_ON_NULL(ptr, status); - } - -drawChildren: - - // Modify the clip rectangle, if necessary - thisObj->cellClip = *clipRect; - - value.token = NW_CSS_PropValue_visible; - NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_overflow, NW_CSS_ValueType_Token, &value); - if (value.token == NW_CSS_PropValue_hidden) - { - NW_LMgr_FrameInfo_t padding, borderWidth; - - // Get the border information - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr - (thisContext, box, &borderWidth, NULL, NULL); - if (status == KBrsrNotFound) - { - NW_THROW(status); - } - NW_THROW_ON_ERROR(status); - - // Get padding info - NW_LMgr_StaticTableCellBox_GetPadding(thisObj, &padding); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( box ); - - thisObj->cellClip.point.x = (NW_GDI_Metric_t)(boxBounds.point.x - + borderWidth.left + padding.left); - thisObj->cellClip.point.y = (NW_GDI_Metric_t)(boxBounds.point.y - + borderWidth.top + padding.top); - thisObj->cellClip.dimension.width = (NW_GDI_Metric_t)(boxBounds.dimension.width - - borderWidth.left - padding.left - - borderWidth.right - padding.right); - thisObj->cellClip.dimension.height = (NW_GDI_Metric_t)(boxBounds.dimension.height - - borderWidth.top - padding.top - - borderWidth.bottom - padding.bottom); - - if (!NW_GDI_Rectangle_Cross(&(thisObj->cellClip), clipRect, &newClip)) - { - // children are out of view - containerVisible = NW_FALSE; - NW_THROW_SUCCESS (status); - } - else - { - // modify cliprect for the children. - *clipRect = newClip; - } - thisObj->cellClip = newClip; - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - // skip children unless the container is visible - *skipChildren = (NW_Bool)( containerVisible == NW_TRUE ? NW_FALSE : NW_TRUE ); - if( clipRectChanged == NW_TRUE ) - { - // Reset the clip rect - deviceContext->SetClipRect( &oldClip); - } - - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Draw(NW_LMgr_Box_t *box, - CGDIDeviceContext *deviceContext, - NW_Bool hasFocus) -{ - - NW_LMgr_Box_t tempBox; - NW_LMgr_FrameInfo_t borderWidth, borderStyle, borderColor; - NW_LMgr_Box_t *cellBox = box; - NW_GDI_Rectangle_t clipRect; - NW_GDI_Metric_t initialLineWidth; - - NW_LMgr_StaticTableBox_t* thisTable = - NW_LMgr_StaticTableBoxOf(NW_LMgr_BoxOf(box->parent)->parent); - NW_LMgr_StaticTableContext_t* thisContext = thisTable->ctx; - - NW_TRY (status) { - - NW_REQUIRED_PARAM(hasFocus); - /* Get a helper box for drawing */ - status = NW_LMgr_Box_Initialize (&tempBox, 1); - _NW_THROW_ON_ERROR (status); - - /* Get the border information */ - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr - (thisContext, box, &borderWidth, &borderStyle, &borderColor); - NW_THROW_ON_ERROR(status); - - /* Set coordinates */ - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetDisplayBounds( cellBox ); - NW_LMgr_Box_SetFormatBounds( &tempBox, boxBounds ); - NW_LMgr_Box_UpdateDisplayBounds( &tempBox, boxBounds ); - - clipRect = deviceContext->ClipRect(); - if (!NW_GDI_Rectangle_Cross(&(boxBounds), &clipRect, NULL)) { - NW_THROW_SUCCESS(status); - } - NW_LMgr_Box_Predraw (cellBox, deviceContext, hasFocus); - - initialLineWidth = deviceContext->LineWidth(); - - deviceContext->SetPaintMode ( NW_GDI_PaintMode_Copy); - - /* draw the border */ - /* TODO add support for other border types */ - status = NW_LMgr_Box_DrawBorder( NW_LMgr_Box_GetDisplayBounds(&tempBox), deviceContext, &borderWidth, &borderStyle, &borderColor); - _NW_THROW_ON_ERROR(status); - - /* set back the original values */ - deviceContext->SetLineWidth( initialLineWidth); - - } NW_CATCH (status) { - } NW_FINALLY { - NW_Object_Terminate (&tempBox); - return status; - } NW_END_TRY -} - -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_Box_t *box = NW_LMgr_BoxOf(format); - NW_LMgr_FrameInfo_t padding; - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_RootBox_t *rootBox; - NW_LMgr_PropertyValue_t dirValue; - NW_GDI_Metric_t bottomMargin = 0; - NW_LMgr_StaticTableCellBox_t *thisObj = NW_LMgr_StaticTableCellBoxOf(format); - NW_LMgr_StaticTableBox_t* thisTable = - NW_LMgr_StaticTableBoxOf(NW_LMgr_BoxOf(((NW_LMgr_Box_t *) format)->parent)->parent); - NW_LMgr_StaticTableContext_t* thisContext = thisTable->ctx; - - NW_TRY(status) { - - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( box ); - context->startMargin = 0; - context->endMargin = boxBounds.dimension.width; - context->y = 0; - - /* Table cells do not have margins. As a result, we only include the - * padding and border areas when calculating the start margin. */ - - NW_LMgr_StaticTableCellBox_GetPadding(thisObj, &padding); - - context->startMargin = (NW_GDI_Metric_t)(context->startMargin + padding.left); - context->endMargin = (NW_GDI_Metric_t)(context->endMargin - padding.right); - context->y = (NW_GDI_Metric_t)(context->y + padding.top); - bottomMargin = (NW_GDI_Metric_t)padding.bottom; - - /* Get the border information */ - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr - (thisContext, box, &borderWidth, NULL, NULL); - NW_THROW_ON_ERROR(status); - - context->startMargin = (NW_GDI_Metric_t) (context->startMargin + borderWidth.left); - context->endMargin = (NW_GDI_Metric_t) (context->endMargin - borderWidth.right); - context->y = (NW_GDI_Metric_t) (context->y + borderWidth.top); - bottomMargin = (NW_GDI_Metric_t) (bottomMargin + borderWidth.bottom); - - /* Now reset initial height. This will change as children are laid out */ - boxBounds.dimension.height = - (NW_GDI_Metric_t) (context->y + bottomMargin); - NW_LMgr_Box_SetFormatBounds( box, boxBounds ); - - /* Set the global context */ - if (!NW_Object_IsClass(format, &NW_LMgr_RootBox_Class)) { - rootBox = NW_LMgr_Box_GetRootBox (box); - NW_ASSERT (rootBox != NULL); - } - else { - rootBox = NW_LMgr_RootBoxOf(format); - } - context->placedFloats = rootBox->placedFloats; - context->pendingFloats = rootBox->pendingFloats; - - /* Now set the flow-specific context variables */ - context->lineStart = context->startMargin; - context->lineEnd = context->endMargin; - - /* Get the flow direction */ - dirValue.token = NW_CSS_PropValue_ltr; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(format), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - if (dirValue.token == NW_CSS_PropValue_ltr) { - context->direction = NW_GDI_FlowDirection_LeftRight; - } - else { - context->direction = NW_GDI_FlowDirection_RightLeft; - } - - /* Set the initial x position */ - if (dirValue.token == NW_CSS_PropValue_ltr) { - context->x = (NW_GDI_Metric_t)(context->lineStart + - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - else { - context->x = (NW_GDI_Metric_t)(context->lineEnd - - NW_LMgr_FlowBox_GetIndentation(NW_LMgr_FlowBoxOf(format), - context)); - } - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableCellBox_Float(NW_LMgr_FlowBox_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context){ - - NW_ADT_DynamicVector_t *pendingFloats = context->pendingFloats; - NW_ADT_DynamicVector_t *placedFloats = context->pendingFloats; - - NW_REQUIRED_PARAM(flow); - - /* If the float context is not set, remove the box */ - if (pendingFloats == NULL || placedFloats == NULL) { - return KBrsrFailure; - } - - if (NW_ADT_DynamicVector_InsertAt(pendingFloats, &box, NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - // we do not handle floating in cell. - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_StaticTableCellBox_t* -NW_LMgr_StaticTableCellBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_StaticTableCellBox_t*) - NW_Object_New (&NW_LMgr_StaticTableCellBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrStaticTableContext.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrStaticTableContext.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2768 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_statictablecontexti.h" -#include "nw_adt_vectoriterator.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_abstracttextbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_fbox_formbox.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - private constants - * ------------------------------------------------------------------------- */ -#define GRID_MODE_COL_CONSTRAINT_ROW_COUNT 5 -#define GRID_MODE_IMAGE_TO_CELL_RATIO 0.65 -#define GRID_MODE_IMAGE_ONLY_WIDTH_TO_NORMAL_WIDTH_RATIO 0.70 - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* This function must be called only once and only from NW_LMgr_StaticTableContext_GetTableStats */ -static -TBrowserStatusCode -NW_LMgr_SetCellsFlowDirection(NW_LMgr_ContainerBox_t *tableContainer, NW_LMgr_Box_t *rowBox) -{ - NW_Int32 j; - NW_ADT_Vector_Metric_t cellCount; - NW_LMgr_Box_t *cellBox = NULL; - NW_LMgr_PropertyValue_t dirValue; - TBrowserStatusCode status = KBrsrSuccess; - /* Get the flow direction */ - dirValue.token = NW_CSS_PropValue_ltr; - (void)NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(tableContainer), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - if (dirValue.token == NW_CSS_PropValue_rtl) { - cellCount = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(rowBox)); - - /* Go through all the cells in the row */ - for (j = cellCount - 1; j > 0; j--) { - - cellBox = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(rowBox), (NW_ADT_Vector_Metric_t)(cellCount - 1)); - - status = NW_LMgr_ContainerBox_RemoveChild (NW_LMgr_ContainerBoxOf(rowBox), cellBox); - if (status == KBrsrSuccess) - { - status = NW_LMgr_ContainerBox_InsertChildAt (NW_LMgr_ContainerBoxOf(rowBox), cellBox, (NW_ADT_Vector_Metric_t)(cellCount - j - 1)); - if (status != KBrsrSuccess) - { - NW_Object_Delete(cellBox); - } - } - } - } - return status; -} - - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_FindSpan - * Parameters: thisObj - the object - * px - - * py - - * spanx - - * spany - - * spanColSpan - - * spanRowSpan - - * Description: - * Returns: - */ - -static -NW_Bool -NW_LMgr_StaticTableContext_FindSpan(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_Uint16 *spanx, NW_Uint16 *spany, - NW_Uint16 *spanColSpan, NW_Uint16 *spanRowSpan) -{ - NW_Uint32 *mapEntry; - NW_Uint16 map_px; - NW_Uint16 map_py; - NW_Uint16 map_colSpan; - NW_Uint16 map_rowSpan; - NW_ADT_Vector_Metric_t vectorSize; - NW_ADT_Vector_Metric_t index; - - /* Are the locations within range? */ - if (px >= thisObj->numCols || py >= thisObj->numRows) { - return NW_FALSE; - } - - if (thisObj->spans) { - vectorSize = NW_ADT_Vector_GetSize(thisObj->spans); - - for (index = 0; index < vectorSize; index++) { - - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->spans, index); - - map_py = NW_LMGR_STATICTABLESPANENTRY_GETPY(*mapEntry); - - /* If we have passed our vert position, we're done */ - if (map_py > py) { - break; - } - - map_px = NW_LMGR_STATICTABLESPANENTRY_GETPX(*mapEntry); - map_rowSpan = NW_LMGR_STATICTABLESPANENTRY_GETROWSPAN(*mapEntry); - map_colSpan = NW_LMGR_STATICTABLESPANENTRY_GETCOLSPAN(*mapEntry); - - /* Check whether (px,py) falls within this cell */ - if ((py >= map_py) && (py < map_py + map_rowSpan)) { - if ((px >= map_px) && (px < map_px + map_colSpan)) { - if (spanx) { - *spanx = map_px; - } - if (spany) { - *spany = map_py; - } - if (spanColSpan) { - *spanColSpan = map_colSpan; - } - if (spanRowSpan) { - *spanRowSpan = map_rowSpan; - } - return NW_TRUE; - } - } - } - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_AddSpanToMap - * Parameters: thisObj - the object - * px - - * py - - * colSpan - - * rowSpan - - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_AddSpanToMap(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_Uint16 colSpan, - NW_Uint16 rowSpan) -{ - void** ptr; - NW_Uint32 newEntry = 0; - - NW_TRY(status) { - - if (thisObj->spans == NULL) { - thisObj->spans = - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), 10, 5 ); - NW_THROW_OOM_ON_NULL(thisObj->spans, status); - } - - NW_LMGR_STATICTABLESPANENTRY_INITIALIZE(newEntry, px, py, colSpan, rowSpan); - - ptr = NW_ADT_DynamicVector_InsertAt(thisObj->spans, - &newEntry, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(ptr, status); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_AddHEdgeToMap - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_AddHEdgeToMap(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 py, NW_Uint16 px1, NW_Uint16 px2, - NW_Uint16 info) -{ - NW_Uint32 *mapEntry; - NW_Uint32 newEntry = 0; - NW_Uint16 map_py, map_px1, map_px2, map_info; - void** ptr; - NW_ADT_Vector_Metric_t vectorSize; - - NW_TRY(status) { - - if (thisObj->horizontalEdges == NULL) { - thisObj->horizontalEdges = - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), 10, 5 ); - NW_THROW_OOM_ON_NULL(thisObj->horizontalEdges, status); - } - - vectorSize = NW_ADT_Vector_GetSize(thisObj->horizontalEdges); - - if (vectorSize > 0) { - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->horizontalEdges, (NW_ADT_Vector_Metric_t)(vectorSize - 1)); - NW_THROW_ON_NULL(mapEntry, status, KBrsrUnexpectedError); - - map_px1 = NW_LMGR_STATICTABLEHEDGEENTRY_GETPX1(*mapEntry); - map_px2 = NW_LMGR_STATICTABLEHEDGEENTRY_GETPX2(*mapEntry); - map_py = NW_LMGR_STATICTABLEHEDGEENTRY_GETPY(*mapEntry); - map_info = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - - if ((py == map_py) && (px1 >= map_px1) && (px1 <= map_px2) && (map_info == info)) { - NW_LMGR_STATICTABLEHEDGEENTRY_SETPX2(*mapEntry, px2); - NW_THROW_SUCCESS(status); - } - } - - /* Otherwise append the entry to the vector */ - NW_LMGR_STATICTABLEHEDGEENTRY_INITIALIZE(newEntry, py, px1, px2, info); - ptr = NW_ADT_DynamicVector_InsertAt(thisObj->horizontalEdges, - &newEntry, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(ptr, status); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_AddVEdgeToMap - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_AddVEdgeToMap(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py1, NW_Uint16 py2, - NW_Uint16 info) -{ - NW_Uint32 *mapEntry; - NW_Uint32 newEntry = 0; - NW_Uint16 map_px; - NW_Uint16 map_py2; - NW_Uint16 map_info; - void** ptr; - NW_ADT_Vector_Metric_t vectorIndex; - - NW_TRY(status) { - - if (thisObj->verticalEdges == NULL) { - thisObj->verticalEdges = - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), 10, 5 ); - NW_THROW_OOM_ON_NULL(thisObj->verticalEdges, status); - } - - vectorIndex = NW_ADT_Vector_GetSize(thisObj->verticalEdges); - - while (vectorIndex > 0) { - - vectorIndex--; - - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->verticalEdges, vectorIndex); - NW_THROW_ON(status, KBrsrOutOfMemory); - - map_px = NW_LMGR_STATICTABLEVEDGEENTRY_GETPX(*mapEntry); - map_py2 = NW_LMGR_STATICTABLEVEDGEENTRY_GETPY2(*mapEntry); - map_info = NW_LMGR_STATICTABLEVEDGEENTRY_GETINFO(*mapEntry); - - if (map_py2 < py1) { - break; - } - if ((map_py2 == py1) && (map_px == px) && (map_info == info)) { - NW_LMGR_STATICTABLEVEDGEENTRY_SETPY2(*mapEntry, py2); - NW_THROW_SUCCESS(status); - } - } - - /* Otherwise append the entry to the vector */ - NW_LMGR_STATICTABLEHEDGEENTRY_INITIALIZE(newEntry, px, py1, py2, info); - ptr = NW_ADT_DynamicVector_InsertAt(thisObj->verticalEdges, - &newEntry, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(ptr, status); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_AddBorderInfo - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_AddBorderInfo(NW_LMgr_StaticTableContext_t* thisObj, - NW_LMgr_StaticTableBorderEdge_t* edge, - NW_Uint16 count) -{ - NW_LMgr_StaticTableBorderInfo_t *newBorderInfo; - void** ptr; - - NW_TRY(status) { - - newBorderInfo = (NW_LMgr_StaticTableBorderInfo_t *) - NW_Mem_Malloc(sizeof(NW_LMgr_StaticTableBorderInfo_t)); - NW_THROW_OOM_ON_NULL(newBorderInfo, status); - - newBorderInfo->edge = *edge; - newBorderInfo->count = count; - - ptr = NW_ADT_DynamicVector_InsertAt(thisObj->borderInfos, - &newBorderInfo, NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(ptr, status); - - newBorderInfo = NULL; - } - NW_CATCH(status) { - NW_Mem_Free(newBorderInfo); - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GetTableStats - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetTableStats(NW_LMgr_StaticTableContext_t* thisObj) -{ - NW_ADT_Vector_Metric_t i, j, k; - NW_ADT_Vector_Metric_t colSpan, rowSpan; - NW_ADT_Vector_Metric_t rowIndex = 0; - NW_ADT_Vector_Metric_t colIndex = 0; - NW_ADT_Vector_Metric_t rowCount, cellCount; - NW_LMgr_ContainerBox_t *tableContainer = NULL; - NW_LMgr_Box_t *rowBox = NULL; - NW_LMgr_ContainerBox_t *rowContainer = NULL; - NW_LMgr_Property_t prop; - NW_LMgr_Box_t *cellBox = NULL; - NW_Int32* growRowArray = NULL; - - NW_TRY (status) - { - tableContainer = NW_LMgr_ContainerBoxOf(thisObj->tableBox); - rowCount = NW_LMgr_ContainerBox_GetChildCount(tableContainer); - - // Create the array to hold which rows need to consider growing columns - growRowArray = (NW_Int32*) NW_Mem_Malloc(sizeof(NW_Int32) * rowCount); - NW_THROW_OOM_ON_NULL(growRowArray, status); - - NW_Mem_memset(growRowArray, 0x0, sizeof(NW_Int32) * rowCount); - - for (i = 0; i < rowCount; i++) - { - rowBox = NW_LMgr_ContainerBox_GetChild (tableContainer, i); - - /* This function must be called only once and only from here */ - status = NW_LMgr_SetCellsFlowDirection(tableContainer, rowBox); - NW_THROW_ON_ERROR(status); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( rowBox ); - - if (NW_Object_IsInstanceOf (rowBox, &NW_LMgr_AbstractTextBox_Class) && - boxBounds.dimension.width == 0 && - boxBounds.dimension.height == 0 ) - { - status = NW_LMgr_ContainerBox_RemoveChild (tableContainer, rowBox); - NW_THROW_ON_ERROR(status); - rowCount = NW_LMgr_ContainerBox_GetChildCount(tableContainer); - - NW_Object_Delete(rowBox); - continue; - } - - rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* The number of columns in the table is determined by the longest row. - * This is a slight deviation from CSS2 which allows us to - * render certain malformed pages. - */ - colIndex = 0; - - /* Go through all the cells in the row */ - for (j = 0; j < cellCount; j++) { - - cellBox = NW_LMgr_ContainerBox_GetChild (rowContainer, j); - - /* Get the colSpan and make sure it is legal */ - prop.value.integer = 1; - (void)NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_colSpan, &prop); - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - if (colSpan == 0) { - colSpan = (NW_ADT_Vector_Metric_t)(thisObj->numCols - colIndex); - } - - /* Do the same for the rowSpan */ - prop.value.integer = 1; - (void)NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_rowSpan, &prop); - rowSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - - // if we have a rowspan that will span multiple rows - if (rowSpan > 1) - { - // check to see if we have enough rows to contain it, otherwise adjust the rowspan - if ( i + rowSpan > rowCount) - { - rowSpan = rowCount - i; - } - - if (rowSpan <= rowCount ) - { - // start at the row after ours - for (k = i + 1; k <= rowSpan; k++) - { - growRowArray[k] = growRowArray[k] + 1; - } - } - } - else if (rowSpan == 0) - { - rowSpan = (NW_ADT_Vector_Metric_t)(thisObj->numRows - rowIndex); - } - - /* Update the cumulative colIndex */ - colIndex = (NW_ADT_Vector_Metric_t)(colIndex + colSpan); - } - - /* Update the col count */ - if (rowIndex == 0) - { - thisObj->numCols = colIndex; - } - else if (colIndex > thisObj->numCols) - { - thisObj->numCols = (NW_ADT_Vector_Metric_t)(colIndex); - } - // do we need to add an extra column? - else if (growRowArray[i] != 0) - { - NW_Int16 diff = (colIndex + growRowArray[i]) - thisObj->numCols; - - if (diff > 0) - { - thisObj->numCols = thisObj->numCols + diff; - } - } - - rowIndex++; - - } - - /* Here we set the rows field of TableContext. The cols field has - * already been set. - */ - thisObj->numRows = rowIndex; - - /* If the table is empty, return failure */ - if ((thisObj->numRows == 0) || (thisObj->numCols == 0)) { - NW_THROW_STATUS (status, KBrsrFailure); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - NW_Mem_Free(growRowArray); - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_AddLocationInfoToMap - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_AddLocationInfoToMap(NW_LMgr_StaticTableContext_t* thisObj) -{ - NW_ADT_Vector_Metric_t i, j; - NW_ADT_Vector_Metric_t cellCount; - NW_Uint16 k; - NW_Uint16 colSpan, rowSpan; - NW_Uint16 rowIndex = 0; - NW_Uint16 colIndex = 0; - NW_LMgr_ContainerBox_t *tableContainer = NULL; - NW_LMgr_ContainerBox_t *rowContainer = NULL; - NW_LMgr_Box_t *rowBox = NULL; - NW_LMgr_Box_t *cellBox = NULL; - NW_LMgr_Property_t prop; - NW_LMgr_PropertyValue_t dirValue; - - NW_TRY (status) { - - tableContainer = NW_LMgr_ContainerBoxOf(thisObj->tableBox); - - for (i = 0; i < thisObj->numRows; i++) { - - rowBox = NW_LMgr_ContainerBox_GetChild (tableContainer, i); - rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - - /* The following code is ran twice: - * 1) find if we need to add more cells in the end - * 2) make a map of the spans - */ - - /* How many cells in the row? */ - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Start at column 0 */ - colIndex = 0; - rowIndex = i; - - /* Go through all the cells in the row */ - for (j = 0; j < cellCount; j++) { - - /* Get the cell */ - cellBox = NW_LMgr_ContainerBox_GetChild (rowContainer, j); - - /* Skip any rowspans */ - while (colIndex < thisObj->numCols) { - - if (!NW_LMgr_StaticTableContext_FindSpan (thisObj, colIndex, rowIndex, NULL, NULL, &colSpan, NULL)) { - break; - } - - colIndex = NW_UINT16_CAST(colIndex + colSpan); - } - - /* If the cell does not fit in the table, ignore it - and move on to the next row */ - if (colIndex >= thisObj->numCols) { - break; - } - - /* Get the cell span properties */ - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_colSpan, &prop); - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - - /* If the specified spans make the cell too large for the table, - * reduce the spans. We modify the box property lists in order to - * avoid having to calculate them again when we place the cells. */ - if (colIndex + colSpan > thisObj->numCols) { - prop.type = NW_ADT_ValueType_Integer; - prop.value.integer = (NW_Int32)(thisObj->numCols - colIndex); - - status = NW_LMgr_Box_SetProperty (cellBox, NW_CSS_Prop_colSpan, &prop); - NW_THROW_ON_ERROR(status); - - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - } - - colIndex = (NW_ADT_Vector_Metric_t)(colIndex + colSpan); - } // end of for (j = 0; j < cellCount; j++) { - - /* If this was the last cell in the row, and we still do not - * have enough columns, we pad the row with a dummy cell. */ - while (colIndex < thisObj->numCols) { - /* find the span number that we should skip */ - for (k = colIndex; k < thisObj->numCols; ) { - if (!NW_LMgr_StaticTableContext_FindSpan (thisObj, k, rowIndex, NULL, NULL, &colSpan, NULL)) { - break; - } - k = NW_UINT16_CAST(k + colSpan); - } - colIndex = k; - if (colIndex >= thisObj->numCols) { - break; - } - /* Get a dummy cell */ - cellBox = (NW_LMgr_Box_t*)NW_LMgr_StaticTableCellBox_New(0); - - /* Set display block property */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty (cellBox, NW_CSS_Prop_display, &prop); - _NW_THROW_ON_ERROR(status); - - /* Set its span property */ - prop.type = NW_ADT_ValueType_Integer; - prop.value.integer = (NW_Int32)1; - - status = NW_LMgr_Box_SetProperty (cellBox, NW_CSS_Prop_colSpan, &prop); - _NW_THROW_ON_ERROR(status); - - /* Find the flow direction of the row */ - dirValue.token = NW_CSS_PropValue_ltr; - NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(rowContainer), - NW_CSS_Prop_textDirection, - NW_CSS_ValueType_Token, - &dirValue); - /* Insert the new box into the table */ - if (dirValue.token == NW_CSS_PropValue_rtl) { - status = NW_LMgr_ContainerBox_InsertChildAt (rowContainer, cellBox, 0); - } - else { - status = NW_LMgr_ContainerBox_AddChild(rowContainer, cellBox); - } - _NW_THROW_ON_ERROR(status); - - colIndex = NW_UINT16_CAST(colIndex + 1); - } // end of while (colIndex < thisObj->numCols) { - - /* Go through all the cells in the row for the 2nd time */ - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Start at column 0 */ - colIndex = 0; - rowIndex = i; - - /* Go through all the cells in the row */ - for (j = 0; j < cellCount; j++) { - - /* Get the cell */ - cellBox = NW_LMgr_ContainerBox_GetChild (rowContainer, j); - - /* Skip any rowspans */ - while (colIndex < thisObj->numCols) { - - if (!NW_LMgr_StaticTableContext_FindSpan (thisObj, colIndex, rowIndex, NULL, NULL, &colSpan, NULL)) { - break; - } - - colIndex = NW_UINT16_CAST(colIndex + colSpan); - } - - /* If the cell does not fit in the table, ignore it - and move on to the next row */ - if (colIndex >= thisObj->numCols) { - break; - } - - /* Get the cell span properties */ - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_colSpan, &prop); - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - if (colSpan == 0) { - colSpan = (NW_ADT_Vector_Metric_t)(thisObj->numCols - colIndex); - } - - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_rowSpan, &prop); - rowSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - if (rowSpan == 0) { - rowSpan = (NW_ADT_Vector_Metric_t)(thisObj->numRows - rowIndex); - } - - /* If the specified spans make the cell too large for the table, - * reduce the spans. We modify the box property lists in order to - * avoid having to calculate them again when we place the cells. */ - if (colIndex + colSpan > thisObj->numCols) { - prop.type = NW_ADT_ValueType_Integer; - prop.value.integer = (NW_Int32)(thisObj->numCols - colIndex); - - status = NW_LMgr_Box_SetProperty (cellBox, NW_CSS_Prop_colSpan, &prop); - NW_THROW_ON_ERROR(status); - - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - if (colSpan == 0) { - colSpan = (NW_ADT_Vector_Metric_t)(thisObj->numCols - colIndex); - } - } - if (rowIndex + rowSpan > thisObj->numRows) { - prop.value.integer = (NW_Int32)(thisObj->numRows - rowIndex); - - status = NW_LMgr_Box_SetProperty (cellBox, NW_CSS_Prop_rowSpan, &prop); - NW_THROW_ON_ERROR(status); - - rowSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - if (rowSpan == 0) { - rowSpan = (NW_ADT_Vector_Metric_t)(thisObj->numRows - rowIndex); - } - } - - if (colSpan > 1 || rowSpan > 1) { - status = NW_LMgr_StaticTableContext_AddSpanToMap - (thisObj, colIndex, rowIndex, colSpan, rowSpan); - NW_THROW_ON_ERROR(status); - } - - colIndex = (NW_ADT_Vector_Metric_t)(colIndex + colSpan); - } // end of for (j = 0; j < cellCount; j++) { - } // for (i = 0; i < thisObj->numRows; i++) { - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GenerateBorderInfo - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_GenerateBorderInfo (NW_LMgr_StaticTableContext_t* thisObj) -{ - NW_LMgr_ContainerBox_t *tableContainer; - NW_LMgr_ContainerBox_t *rowContainer; - NW_LMgr_Box_t *rowBox; - NW_ADT_Vector_Metric_t k, l; - NW_ADT_Vector_Metric_t cellCount; - NW_LMgr_Box_t *cellBox; - NW_ADT_Vector_Metric_t numStyles; - NW_LMgr_StaticTableBorderInfo_t *borderInfo; - NW_LMgr_StaticTableBorderEdge_t edges[4]; - NW_Uint16 matches[4]; - NW_Bool lastRow = NW_FALSE; - NW_Bool lastCol = NW_FALSE; - NW_Bool lastRowTmp = NW_FALSE; - NW_Uint16 px, py; - NW_Uint16 colSpan; - NW_Uint16 rowSpan = 0; - NW_Uint16 numCols = thisObj->numCols; - NW_Uint16 numRows = thisObj->numRows; - NW_Uint16 preCount; - NW_ADT_Vector_Metric_t rowIndex, cellIndex; - - NW_TRY (status) { - - if (thisObj->borderInfos == NULL) { - thisObj->borderInfos = - NW_ADT_ResizableVector_New (sizeof (NW_LMgr_StaticTableBorderInfo_t), 10, 5 ); - NW_THROW_OOM_ON_NULL(thisObj->borderInfos, status); - } - - tableContainer = NW_LMgr_ContainerBoxOf(thisObj->tableBox); - - for (rowIndex = 0; rowIndex < thisObj->numRows; ) { - - rowBox = NW_LMgr_ContainerBox_GetChild (tableContainer, rowIndex); - rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - - /* How many cells in the row? */ - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Go through all the cells in the row */ - for (cellIndex = 0; cellIndex < cellCount; ) { - - /* Get the cell */ - cellBox = NW_LMgr_ContainerBox_GetChild (rowContainer, cellIndex); - - /* Get the (px,py) of the cell */ - status = NW_LMgr_StaticTableContext_LxLyToPxPy(thisObj, cellIndex, rowIndex, - &px, &py, - &colSpan, &rowSpan); - if (status == KBrsrNotFound) { - status = KBrsrSuccess; - break; - } - _NW_THROW_ON_ERROR(status); - - /* in case a cell not on the last row but its rowspan reach bottom of the table, - we want to draw both top and bottom border of it */ - if (rowIndex + rowSpan == numRows && rowIndex < numRows-1) { - lastRowTmp = NW_TRUE; - } - - matches[left] = NW_UINT16_CAST(!lastCol ? 0 : 0xffff); - matches[top] = NW_UINT16_CAST(!lastRow ? 0 : 0xffff); - matches[right] = NW_UINT16_CAST(lastCol ? 0 : 0xffff); - matches[bottom] = NW_UINT16_CAST((lastRow || lastRowTmp) ? 0 : 0xffff); - NW_Mem_memset(edges, 0xffffffff, sizeof(NW_LMgr_StaticTableBorderEdge_t) * 4); - - /* Calculate the borders for the cell */ - status = NW_LMgr_StaticTableCellBox_CalculateBorders(NW_LMgr_StaticTableCellBoxOf(cellBox), - px, py, - colSpan, rowSpan, - (lastCol ? NULL : &edges[left]), - (lastCol ? &edges[right] : NULL), - (lastRow ? NULL : &edges[top]), - ((lastRow || lastRowTmp) ? &edges[bottom] : NULL)); - NW_THROW_ON_ERROR(status); - - /* Do these border styles already exist? */ - numStyles = NW_ADT_Vector_GetSize (thisObj->borderInfos); - for (k = 0; k < numStyles; k++) { - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt (thisObj->borderInfos, k); - - if (!lastCol) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(borderInfo->edge, edges[left])) { - borderInfo->count ++; - matches[left] ++; - } - } - if (!lastRow) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(borderInfo->edge, edges[top])) { - borderInfo->count ++; - matches[top] ++; - } - } - if (lastCol) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(borderInfo->edge, edges[right])) { - borderInfo->count ++; - matches[right] ++; - } - } - if (lastRow || lastRowTmp) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(borderInfo->edge, edges[bottom])) { - borderInfo->count ++; - matches[bottom] ++; - } - } - } - - /* In case the style does not exist already, we must add a new - BorderInfo entry to the list */ - for (k = 0; k < 4; k++) { - if (matches[k] == 0) { - preCount = 0; - for (l = 0; l < k - 1; l++) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[k], edges[l])) { - preCount++; - } - } - for (l = NW_UINT16_CAST(k + 1); l < 4; l++) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[k], edges[l])) { - break; - } - } - if (l == 4) { - status = NW_LMgr_StaticTableContext_AddBorderInfo(thisObj, &edges[k], (NW_Uint16)(preCount + 1)); - NW_THROW_ON_ERROR(status); - } - } - } - - /* update the map */ - numStyles = NW_ADT_Vector_GetSize (thisObj->borderInfos); - for (k = 0; k < numStyles; k++) { - /* Get the border info */ - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt (thisObj->borderInfos, k); - - /* Update the border entry */ - if (!lastCol) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[left], borderInfo->edge)) { - status = NW_LMgr_StaticTableContext_AddVEdgeToMap( - thisObj, px, py, (NW_Uint16)(py + rowSpan), k); - NW_THROW_ON_ERROR(status); - } - } - if (!lastRow) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[top], borderInfo->edge)) { - status = NW_LMgr_StaticTableContext_AddHEdgeToMap( - thisObj, py, px, (NW_Uint16)(px + colSpan), k); - NW_THROW_ON_ERROR(status); - } - } - if (lastCol) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[right], borderInfo->edge)) { - status = NW_LMgr_StaticTableContext_AddVEdgeToMap( - thisObj, (NW_Uint16)(px + colSpan), py, (NW_Uint16)(py + rowSpan), k); - NW_THROW_ON_ERROR(status); - } - } - if (lastRow || lastRowTmp) { - if (NW_LMGR_STATICTABLECONTEXT_CMPEDGE(edges[bottom], borderInfo->edge)) { - status = NW_LMgr_StaticTableContext_AddHEdgeToMap( - thisObj, (NW_Uint16)(py + rowSpan), px, (NW_Uint16)(px + colSpan), k); - NW_THROW_ON_ERROR(status); - } - } - } - if (lastCol) { - lastCol = NW_FALSE; - break; - } - if (px + colSpan == numCols) { - lastCol = NW_TRUE; - } - else { - cellIndex ++; - } - - lastRowTmp = NW_FALSE; - } // end of Go through all the cells in the row - - if (lastRow) { - lastRow = NW_FALSE; - break; - } - if (rowIndex == numRows - 1) { - lastRow = NW_TRUE; - } - else { - rowIndex ++; - } - } - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_CompressBorderInfo - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_CompressBorderInfo (NW_LMgr_StaticTableContext_t* thisObj) -{ - NW_ADT_Vector_Metric_t k; - NW_ADT_Vector_Metric_t numStyles; - NW_LMgr_StaticTableBorderInfo_t *borderInfo; - NW_Uint16 maxCount; - NW_Uint16 map_info; - NW_Uint32 *mapEntry; - NW_ADT_Vector_Metric_t vectorSize; - NW_ADT_Vector_Metric_t index; - NW_ADT_ResizableVector_t *vector; - NW_ADT_Vector_Metric_t size; - - NW_TRY (status) { - - /* Determine the primary border style */ - numStyles = NW_ADT_Vector_GetSize (thisObj->borderInfos); - maxCount = 0; - for (k = 0; k < numStyles; k++) { - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt (thisObj->borderInfos, k); - if (maxCount < borderInfo->count) { - maxCount = borderInfo->count; - thisObj->defaultInfo = k; - } - } - - if (thisObj->horizontalEdges) { - - /* Remove all edges from the vector that have the primary border style. */ - vectorSize = NW_ADT_Vector_GetSize(thisObj->horizontalEdges); - if (vectorSize > 0) { - for (index = 0; index < vectorSize; ) { - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->horizontalEdges, index); - map_info = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - - if (map_info == thisObj->defaultInfo) { - status = NW_ADT_DynamicVector_RemoveAt(thisObj->horizontalEdges, index); - NW_THROW_ON_ERROR(status); - - vectorSize --; - } - else { - index ++; - } - } - } - - /* Now reallocate the vectors so we don't keep more memory than we need */ - if (NW_ADT_Vector_GetSize(thisObj->horizontalEdges) - < NW_ADT_DynamicVector_GetCapacity(thisObj->horizontalEdges)) { - vector = thisObj->horizontalEdges; - size = NW_ADT_Vector_GetSize(vector); - if (size > 0) { - thisObj->horizontalEdges = - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), size, 5); - NW_THROW_OOM_ON_NULL(thisObj->horizontalEdges, status); - - status = - NW_ADT_DynamicVector_InsertVectorAt(thisObj->horizontalEdges, vector, NW_ADT_Vector_AtFront); - NW_THROW_ON_ERROR(status); - } - else { - thisObj->horizontalEdges = NULL; - } - NW_Object_Delete(vector); - } - } - - if (thisObj->verticalEdges) { - - /* Remove all edges from the vector that have the primary border style. */ - vectorSize = NW_ADT_Vector_GetSize(thisObj->verticalEdges); - if (vectorSize > 0) { - for (index = 0; index < vectorSize; ) { - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->verticalEdges, index); - map_info = NW_LMGR_STATICTABLEVEDGEENTRY_GETINFO(*mapEntry); - - if (map_info == thisObj->defaultInfo) { - status = NW_ADT_DynamicVector_RemoveAt(thisObj->verticalEdges, index); - NW_THROW_ON_ERROR(status); - - vectorSize --; - } - else { - index ++; - } - } - } - - /* Now reallocate the vectors so we don't keep more memory than we need */ - if (NW_ADT_Vector_GetSize(thisObj->verticalEdges) - < NW_ADT_DynamicVector_GetCapacity(thisObj->verticalEdges)) { - vector = thisObj->verticalEdges; - size = NW_ADT_Vector_GetSize(vector); - if (size > 0) { - thisObj->verticalEdges = - NW_ADT_ResizableVector_New (sizeof (NW_Uint32), size, 5); - NW_THROW_OOM_ON_NULL(thisObj->verticalEdges, status); - - status = - NW_ADT_DynamicVector_InsertVectorAt(thisObj->verticalEdges, vector, NW_ADT_Vector_AtFront); - NW_THROW_ON_ERROR(status); - } - else { - thisObj->verticalEdges = NULL; - } - NW_Object_Delete(vector); - } - } - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_FindAutomaticConstraints - * Parameters: thisObj - the object - * Description: - * Automatic table layout - * http://www.w3.org/TR/REC-CSS2/tables.html#auto-table-layout - * - * Column widths are determined as follows: - * Calculate the minimum content width (MCW) of each cell: the formatted content - * may span any number of lines but may not overflow the cell box. - * If the specified 'width' (W) of the cell is greater than MCW, W is the minimum - * cell width. A value of 'auto' means that MCW is the minimum cell width. - * Also, calculate the "maximum" cell width of each cell: formatting then content - * without breaking lines other than where explicit line breaks occur. - * - * For each column, determine a maximum and minimum column width from the cells - * that span only that column. The minimum is that required by the cell with the - * largest minimum cell width (or the column 'width', whichever is larger). The - * maximum is that required by the cell with the largest maximum cell width - * (or the column 'width', whichever is larger). - * For each cell that spans more than one column, increase the minimum widths of - * the columns it spans so that together, they are at least as wide as the cell. - * Do the same for the maximum widths. If possible, widen all spanned columns - * by approximately the same amount. - * This gives a maximum and minimum width for each column. Column widths influence - * the final table width as follows: - * - * If the 'table' or 'inline-table' element's 'width' property has a specified value (W) - * other than 'auto', the property's computed value is the greater of W and the minimum - * width required by all the columns plus cell spacing or borders (MIN). - * If W is greater than MIN, the extra width should be distributed over the columns. - * If the 'table' or 'inline-table' element has 'width: auto', the computed table width - * is the greater of the table's containing block width and MIN. However, if the maximum - * width required by the columns plus cell spacing or borders (MAX) is less than that of - * the containing block, use MAX. - */ -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindAutomaticConstraints( NW_LMgr_StaticTableContext_t* thisObj ) - { - NW_ADT_DynamicVector_t* minColumnWidthArray = NULL; - NW_ADT_DynamicVector_t* maxColumnWidthArray = NULL; - NW_TRY( status ) - { - NW_ADT_Vector_Metric_t rowIndex; - NW_ADT_Vector_Metric_t colIndex; - NW_ADT_Vector_Metric_t currentCol; - NW_ADT_Vector_Metric_t currentRow; - NW_ADT_DynamicVector_t* finalColumnWidthArray = NULL; - NW_GDI_Metric_t defaultCellWidthValue = NW_LMGR_BOX_MIN_WIDTH; - NW_GDI_Metric_t nonResizeableValue = -1; - NW_GDI_Metric_t minCellWidth; - NW_GDI_Metric_t maxCellWidth; - NW_GDI_Metric_t tableWidth = 0; - NW_GDI_Metric_t minColumnsWidth = 0; - NW_GDI_Metric_t maxColumnsWidth = 0; - NW_GDI_Metric_t expandableWidth = 0; - NW_GDI_Metric_t maxExpandableWidth = 0; - NW_GDI_Metric_t columnWidth; - NW_GDI_Metric_t spaceAvailable; - NW_GDI_Metric_t spaceToDivide; - NW_LMgr_Property_t prop; - NW_Bool colSpanFound = NW_FALSE; - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_Box_t* cellBox; - NW_LMgr_Box_t* tableBox; - - NW_REQUIRED_PARAM( thisObj ); - - NW_ASSERT( thisObj != NULL ); - - tableBox = NW_LMgr_BoxOf( thisObj->tableBox ); - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds( tableBox ); - NW_THROW_OOM_ON_NULL( tableBox, status ); - // min array - minColumnWidthArray = (NW_ADT_DynamicVector_t*)NW_ADT_ResizableVector_New( - sizeof ( NW_GDI_Metric_t ), thisObj->numCols, 5 ); - NW_THROW_OOM_ON_NULL( minColumnWidthArray, status ); - // max array - maxColumnWidthArray = (NW_ADT_DynamicVector_t*)NW_ADT_ResizableVector_New( - sizeof ( NW_GDI_Metric_t ), thisObj->numCols, 5 ); - NW_THROW_OOM_ON_NULL( maxColumnWidthArray, status ); - // step through all the cells and find out the max and the min width for each and every column. - // no colspan is taken into accout in the first pass so that we can distribute colspan width proportinally - // note: w3's recommendation is to distribute colspans equally but it gives badly rendered pages. - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - // initialise min and max - NW_ADT_DynamicVector_InsertAt( minColumnWidthArray, &defaultCellWidthValue, colIndex ); - NW_ADT_DynamicVector_InsertAt( maxColumnWidthArray, &defaultCellWidthValue, colIndex ); - // take rows first so then at the end, we've got the colIndex-th max and min width - for( rowIndex = 0; rowIndex < thisObj->numRows; rowIndex++ ) - { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy( thisObj, colIndex, rowIndex, &cellBox ); - NW_THROW_ON_ERROR( status ); - // cellbox can be NULL even if status == KBrsrSuccess - if( cellBox != NULL ) - { - // min width - minCellWidth = NW_LMgr_StaticTableCellBox_GetMinWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ) ); - // max width - maxCellWidth = NW_LMgr_StaticTableCellBox_GetMaxWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ) ); - // colspan checking - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList( cellBox, NW_CSS_Prop_colSpan, &prop ); - - if( (NW_ADT_Vector_Metric_t)prop.value.integer <= 1 ) - { - // no colspan - // check if this is bigger than the minimum value - if( minCellWidth > *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ) ) - { - NW_ADT_DynamicVector_ReplaceAt( minColumnWidthArray, &minCellWidth, colIndex ); - } - // and check if this is bigger than the maximum value - if( maxCellWidth > *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ) ) - { - NW_ADT_DynamicVector_ReplaceAt( maxColumnWidthArray, &maxCellWidth, colIndex ); - } - } - else - { - colSpanFound = NW_TRUE; - } - } - } - // calculate total max/min width - minColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ); - maxColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ); - } - // second pass reqired only if colspan is present - if( colSpanFound == NW_TRUE ) - { - NW_ADT_Vector_Metric_t colSpan; - - // colspan may change them - minColumnsWidth = 0; - maxColumnsWidth = 0; - // step through all the cells and find out the max and the min width for each and every column. - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - // take rows first so then at the end, we've got the colIndex-th max and min width - for( rowIndex = 0; rowIndex < thisObj->numRows; rowIndex++ ) - { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy( thisObj, colIndex, rowIndex, &cellBox ); - NW_THROW_ON_ERROR( status ); - // cellbox can be NULL even if status == KBrsrSuccess - if( cellBox != NULL ) - { - // min width - minCellWidth = NW_LMgr_StaticTableCellBox_GetMinWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ) ); - // max width - maxCellWidth = NW_LMgr_StaticTableCellBox_GetMaxWidth( NW_LMgr_StaticTableCellBoxOf( cellBox ) ); - // colspan handling - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList( cellBox, NW_CSS_Prop_colSpan, &prop ); - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - - if( colSpan > 1 ) - { - status = NW_LMgr_StaticTableContext_PxPyToLxLy( thisObj, colIndex, rowIndex, &currentCol, &currentRow ); - NW_THROW_ON_ERROR( status ); - // note: you get the very same cellbox back within the coloumn span. so let's compare currentCol to colIndex to see if - // we get an already calculated col span to avoid calculating it again and again. - if( currentCol == colIndex && currentRow == rowIndex ) - { - NW_GDI_Metric_t minSpanColumnsWidth = 0; - NW_GDI_Metric_t maxSpanColumnsWidth = 0; - NW_GDI_Metric_t colSpanMinWidth; - NW_GDI_Metric_t colSpanMaxWidth; - NW_ADT_Vector_Metric_t colSpanIndex; - NW_ADT_Vector_Metric_t colIndexWithSpan; - // first add up those columns width that this cell spans - for( colSpanIndex = 0; colSpanIndex < colSpan; colSpanIndex++ ) - { - // currentCol + colSpanIndex musnt't be more than tableContext->numCols - colIndexWithSpan = (NW_ADT_Vector_Metric_t)( currentCol + colSpanIndex ); - NW_ASSERT( colIndexWithSpan < thisObj->numCols ); - - minSpanColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndexWithSpan ); - - maxSpanColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndexWithSpan ); - } - // and then distribute width proportionally - for( colSpanIndex = 0; colSpanIndex < colSpan; colSpanIndex++ ) - { - //lint --e{795} Conceivable division by 0 - // TODO: evaluate this lint issue. - - // currentCol + colSpanIndex musnt't be more than tableContext->numCols - colIndexWithSpan = (NW_ADT_Vector_Metric_t)( currentCol + colSpanIndex ); - NW_ASSERT( colIndexWithSpan < thisObj->numCols ); - // distribute proportinaly - colSpanMinWidth = (NW_GDI_Metric_t)( (NW_Float32)minCellWidth/ (NW_Float32)minSpanColumnsWidth * - (NW_Float32)( *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndexWithSpan ) ) + 1 ); // +1 is for rounding - - colSpanMaxWidth = (NW_GDI_Metric_t)( (NW_Float32)maxCellWidth/ (NW_Float32)maxSpanColumnsWidth * - (NW_Float32)( *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndexWithSpan ) ) + 1 ); // +1 is for rounding - // check if this is bigger than the minimum value - if( colSpanMinWidth > *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndexWithSpan ) ) - { - NW_ADT_DynamicVector_ReplaceAt( minColumnWidthArray, &colSpanMinWidth, colIndexWithSpan ); - } - // and check if this is bigger than the maximum value - if( colSpanMaxWidth > *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndexWithSpan ) ) - { - NW_ADT_DynamicVector_ReplaceAt( maxColumnWidthArray, &colSpanMaxWidth, colIndexWithSpan ); - } - } - } - } - } - } - // calculate total max/min width - minColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ); - maxColumnsWidth+= *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ); - } - } - // at this point we've got all the min and max values. let's check if the table needs to be shrunken - spaceAvailable = tableBoxBounds.dimension.width; - // remove borders - NW_LMgr_Box_GetBorderWidth( tableBox, &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - - spaceAvailable-=(borderWidth.left + borderWidth.right); - - // 1. if the max width of columns is less than the table width and the width of the table is specified, - // then we need to distribute the extra space among those columns. otherwise, we take the max column width - // 2. if minimum width is bigger than the table width, then we cannot do much. go with the minimum width - // 3. if the table width is somewhere between the min and the max columns width, then take a proportional value - // according to the w3c recommendation - - if( maxColumnsWidth < spaceAvailable ) - { - status = NW_LMgr_Box_GetRawProperty( tableBox, NW_CSS_Prop_width, &prop ); - if( status == KBrsrSuccess ) - { - // when we make the table bigger, then dont care about the non-resizeable cells - spaceToDivide = spaceAvailable - maxColumnsWidth; - // calculate columns length proportionaly - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - //lint --e{795} Conceivable division by 0 - // TODO: evaluate this lint issue. - - // calculate the value according to what min array has unless this is a non-resizeable item - columnWidth = *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ); - // add the extra space - columnWidth+= (NW_GDI_Metric_t)( (NW_Float32)spaceToDivide / (NW_Float32)maxColumnsWidth * (NW_Float32)columnWidth ); - // and replace the value in the MAX array - NW_ADT_DynamicVector_ReplaceAt( maxColumnWidthArray, &columnWidth, colIndex ); - } - // max array has both the modified column values as well as the fixed (non-resizeable) ones. - } - finalColumnWidthArray = maxColumnWidthArray; - } - else if( minColumnsWidth > spaceAvailable ) - { - finalColumnWidthArray = minColumnWidthArray; - } - else - { - // first take out those columns that are nonresizeable. - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - NW_GDI_Metric_t minValue; - NW_GDI_Metric_t maxValue; - - minValue = *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ); - maxValue = *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ); - // the column is considered to be nonresizeable if max equals to min. - if( minValue == maxValue ) - { - // nonresizeable elemets must be removed from bot available space and the total min - spaceAvailable-= minValue; - minColumnsWidth-= minValue; - // minColumn array is used to indicate that the column is nonresizeable. max column still holds the column width value - // set minimum value to nonResizeableValue - NW_ADT_DynamicVector_ReplaceAt( minColumnWidthArray, &nonResizeableValue, colIndex ); - } - else - { - // add up all expanable values - maxExpandableWidth+= ( maxValue - minValue ); - } - } - // calculate columns lentgh proportionaly - spaceToDivide = spaceAvailable - minColumnsWidth; - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - // calculate the value according to what min array has unless this is a non-resizeable item - columnWidth = *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ); - expandableWidth = *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( maxColumnWidthArray, colIndex ) - - *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( minColumnWidthArray, colIndex ); - if( columnWidth != nonResizeableValue ) - { - //lint --e{795, 414} Conceivable division by 0 - // TODO: evaluate this lint issue. - - // add the extra space - columnWidth+= (NW_GDI_Metric_t)( (NW_Float32)spaceToDivide / (NW_Float32)maxExpandableWidth * (NW_Float32)expandableWidth ); - // and replace the value in the MAX array - NW_ADT_DynamicVector_ReplaceAt( maxColumnWidthArray, &columnWidth, colIndex ); - } - } - // max array has both the modified column values as well as the fixed (non-resizeable) ones. - finalColumnWidthArray = maxColumnWidthArray; - } - // final includes the columns contstrains - NW_THROW_OOM_ON_NULL( finalColumnWidthArray, status ); - for( colIndex = 0; colIndex < thisObj->numCols; colIndex++ ) - { - NW_LMgr_StaticTableContext_SetColConstraint( thisObj, colIndex, - *(NW_GDI_Metric_t*)NW_ADT_Vector_ElementAt( finalColumnWidthArray, colIndex ) ); - tableWidth+= NW_LMgr_StaticTableContext_GetColConstraint( thisObj, colIndex ); - } - // add borders - NW_LMgr_Box_GetBorderWidth( tableBox, &borderWidth, ELMgrFrameLeft|ELMgrFrameRight ); - - tableWidth+=(borderWidth.left + borderWidth.right); - // and update the table width - tableBoxBounds.dimension.width = tableWidth; - NW_LMgr_Box_SetFormatBounds( tableBox, tableBoxBounds ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Object_Delete( minColumnWidthArray ); - NW_Object_Delete( maxColumnWidthArray ); - return status; - } - NW_END_TRY; - } - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellBoxConstraint(NW_LMgr_StaticTableContext_t* thisObj, - NW_LMgr_Box_t* box, NW_GDI_Metric_t tableWidth, NW_GDI_Metric_t* width, NW_Bool* isAuto, - NW_Bool* isImage) - { - NW_LMgr_StaticTableCellBox_t* cellBox; - NW_GDI_Dimension2D_t boxSize; - NW_LMgr_BoxVisitor_t visitor; - NW_LMgr_Box_t* child; - NW_Int32 textWidth = 0; - NW_Int32 longestTextRun = 0; - NW_LMgr_FrameInfo_t borderWidth; - NW_LMgr_FrameInfo_t paddingInfo; - NW_GDI_Metric_t extraSpace = 0; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(box != NULL); - NW_ASSERT(width != NULL); - NW_ASSERT(isAuto != NULL); - NW_ASSERT(isImage != NULL); - - NW_TRY(status) - { - cellBox = NW_LMgr_StaticTableCellBoxOf(box); - *isImage = NW_FALSE; - - // A box with a fixed width doesn't have an auto-width. - *isAuto = !NW_LMgr_Box_HasFixedWidth(box); - - // Get the extra space needed for the border and padding. - status = NW_LMgr_StaticTableContext_GetCellBordersFromPtr(thisObj, box, - &borderWidth, NULL, NULL); - NW_THROW_ON_ERROR(status); - - NW_LMgr_StaticTableCellBox_GetPadding(cellBox, &paddingInfo); - - extraSpace = borderWidth.left + borderWidth.right + paddingInfo.left + paddingInfo.right; - - // Get the cell's natural minimum size. - status = NW_LMgr_StaticTableCellBox_GetMinimumCellSize(cellBox, &boxSize); - NW_THROW_ON_ERROR(status); - - // Use this width unless it is overridden below. - *width = boxSize.width; - - // If this is a fixed width cell, its all done. - if (*isAuto == NW_FALSE) - { - NW_THROW_SUCCESS(status); - } - - *width = extraSpace; - - // Iterate through the cell-box's child to estimate the amount of - // space needed. - status = NW_LMgr_BoxVisitor_Initialize(&visitor, box); - NW_THROW_ON_ERROR(status); - - while ((child = NW_LMgr_BoxVisitor_NextBox(&visitor, NULL)) != NULL) - { - // If an image is found use the image's width property. - if (NW_Object_IsInstanceOf(child, &NW_LMgr_ImgContainerBox_Class)) - { - NW_LMgr_PropertyValue_t value; - - status = NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_width, - NW_CSS_ValueType_Px, &value); - - if (status == KBrsrSuccess) - { - *width = value.integer + extraSpace; - *isAuto = NW_FALSE; - *isImage = NW_TRUE; - thisObj->gridModeImageCount++; - - NW_THROW_SUCCESS(status); - } - } - - // If an form-box is found use the form's skin size. - else if (NW_Object_IsInstanceOf(child, &NW_FBox_FormBox_Class)) - { - NW_FBox_Skin_t* skin = NULL; - NW_GDI_Dimension3D_t skinSize; - - skin = NW_FBox_FormBox_GetSkin(child); - if (skin) - { - NW_FBox_Skin_GetSize(skin, child, &skinSize); - - *width += skinSize.width; - *isAuto = NW_FALSE; - } - } - - // If a text-box is found update the running total, as a cell-box - // may contain many such boxes. - else if (NW_Object_IsInstanceOf(child, &NW_LMgr_TextBox_Class)) - { - NW_GDI_Dimension2D_t size; - - status = NW_LMgr_AbstractTextBox_GetDimensions( - NW_LMgr_AbstractTextBoxOf(child), &size); - - if (status == KBrsrSuccess) - { - textWidth += size.width; - } - } - - // When calculating the width of a text block in a cell it needs - // to be aware of line breaks that are found in the markup - // (i.e. <br/>). When such a line break is found the longest - // text run is tracked. - else if (NW_Object_IsInstanceOf(child, &NW_LMgr_BreakBox_Class)) - { - if (textWidth > longestTextRun) - { - longestTextRun = textWidth; - } - - textWidth = 0; - } - - else - { - NW_GDI_Dimension2D_t size; - - // Get the minimum content size. - status = NW_LMgr_Box_GetMinimumContentSize(child, &size); - _NW_THROW_ON_ERROR (status); - - *width += size.width; - *isAuto = NW_FALSE; - } - } - - // See the comment in the BreakBox section above. textWidth is - // only set to longestTextRun when longestTextRun is larger than - // textWidth. This is done because textWidth tracks the last text run, - // which may be larger than longestTextRun. - if (longestTextRun > textWidth) - { - textWidth = longestTextRun; - } - - // If the text is wider than the table clip it, so that a longer - // text block doesn't cramp other columns. - if (textWidth > tableWidth) - { - textWidth = tableWidth; - } - - // If text was found, override the value set above. - if (textWidth > 0) - { - *width += textWidth; - *isAuto = NW_FALSE; - } - } - - NW_CATCH(status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindRowConstraints(NW_LMgr_StaticTableContext_t* thisObj, - NW_LMgr_ContainerBox_t* rowBox, NW_Int32 rowIndex, NW_Int32* rowConstraints, - NW_Bool* hasOnlyImages) - { - NW_Int32 cellCount; - NW_Int32 colIndex; - NW_Int32 autoColCount = 0; - NW_Int32 autoColWidth = 0; - NW_Int32 fixedColWidth = 0; - NW_Int32 minAutoWidth = 0; - NW_Int32 colSpan; - NW_LMgr_Property_t prop; - NW_Int32 width; - NW_Int32 tableWidth; - NW_LMgr_Box_t* cellBox = NULL; - NW_Bool isAuto; - NW_Bool isImage; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(rowBox != NULL); - NW_ASSERT(rowConstraints != NULL); - NW_ASSERT(hasOnlyImages != NULL); - - NW_TRY(status) - { - *hasOnlyImages = NW_TRUE; - - // Get the table width. - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds(thisObj->tableBox); - tableWidth = tableBoxBounds.dimension.width; - - // Init colConstraints - NW_Mem_memset(rowConstraints, 0x0, sizeof(NW_Int32) * thisObj->numCols); - - // Determine the constraint for each column. - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowBox); - if (cellCount < 1) - { - NW_THROW_UNEXPECTED(status); - } - - colIndex = 0; - for (NW_Int32 cellIndex = 0; cellIndex < cellCount; cellIndex++) - { - // Get the cell box. - cellBox = NW_LMgr_ContainerBox_GetChild(rowBox, (NW_ADT_Vector_Metric_t) cellIndex); - if (! NW_Object_IsInstanceOf(cellBox, &NW_LMgr_StaticTableCellBox_Class)) - { - NW_THROW_UNEXPECTED(status); - } - - // Get the ColSpan property on this cell box. - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList(cellBox, NW_CSS_Prop_colSpan, &prop); - colSpan = (NW_ADT_Vector_Metric_t) prop.value.integer; - if (colSpan < 1) - { - colSpan = 1; - } - - // Calculate the minimum cell size. - status = NW_LMgr_StaticTableContext_GetCellBoxConstraint(thisObj, cellBox, tableWidth, - &width, &isAuto, &isImage); - NW_THROW_ON_ERROR(status); - - // If the row contains anything other than an image the set hasOnlyImages to false. - if (isImage == NW_FALSE) - { - *hasOnlyImages = NW_FALSE; - } - - // Push this box into the next column if it is part of a rowspan, unless its - // the first cell in the span. - while (colIndex < thisObj->numCols) - { - NW_Uint16 spanStart; - NW_Uint16 colSpanSize; - - if (NW_LMgr_StaticTableContext_FindSpan(thisObj, (NW_Uint16) colIndex, - (NW_Uint16) rowIndex, NULL, &spanStart, &colSpanSize, NULL) && - (spanStart != rowIndex)) - { - // Push it over one or more columns, more if it is also part of a colSpan. - // rowConstraints[colIndex] is set to -1 so that this cell doesn't affect - // the constraints calculation. - for (NW_Int32 i = 0; i < colSpanSize; i++) - { - rowConstraints[colIndex] = -1; - colIndex++; - } - } - else - { - break; - } - } - - // The cell box won't fit on the row so ignore it and all remaining - // cells in this row. - if (colIndex == thisObj->numCols) - { - break; - } - - // If the cell is an auto width cell update the auto width values. - if (isAuto) - { - autoColCount += colSpan; - minAutoWidth += width; - colIndex+= colSpan; - } - - // Otherwise update the fixed width values. - else - { - fixedColWidth += width; - - for (NW_Int32 i = 0; i < colSpan; i++) - { - rowConstraints[colIndex] = width / colSpan; - colIndex++; - } - } - } - - // Calculate the width for the auto columns. - if (autoColCount > 0) - { - autoColWidth = (NW_GDI_Metric_t)(minAutoWidth / autoColCount); - - // Set the width for the auto columns. - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - if (rowConstraints[colIndex] == 0) - { - rowConstraints[colIndex] = autoColWidth; - } - } - } - } - - NW_CATCH(status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_FindGridModeConstraints - * Parameters: thisObj - the object - * Description: Sets the column constraints such that they are appropriate - * for a grid mode table. - * Returns: - */ -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindGridModeConstraints(NW_LMgr_StaticTableContext_t* thisObj) - { - NW_LMgr_ContainerBox_t* row = NULL; - NW_Int32 colIndex; - NW_Int32 tableWidth; - NW_Int32 naturalWidth = 0; - NW_Int32 imageOnlyRowNaturalWidth = 0; - NW_Int32* rowConstraints = NULL; - NW_Int32* iamgeRowConstraints = NULL; - NW_Bool hasOnlyImages; - NW_Bool hasImageOnlyRow = NW_FALSE; - NW_Bool isSlicedImage = NW_FALSE; - - NW_ASSERT(thisObj != NULL); - - NW_TRY(status) - { - thisObj->gridModeImageCount = 0; - - // Get the table width. - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds(thisObj->tableBox); - tableWidth = tableBoxBounds.dimension.width; - - // Create the arrays to hold the row constraints. - rowConstraints = (NW_Int32*) NW_Mem_Malloc(sizeof(NW_Int32) * thisObj->numCols); - NW_THROW_OOM_ON_NULL(rowConstraints, status); - - iamgeRowConstraints = (NW_Int32*) NW_Mem_Malloc(sizeof(NW_Int32) * thisObj->numCols); - NW_THROW_OOM_ON_NULL(iamgeRowConstraints, status); - - // Init the necessary contraint arrays. - NW_Mem_memset(thisObj->colConstraints, 0x0, sizeof(NW_Int32) * thisObj->numCols); - NW_Mem_memset(iamgeRowConstraints, 0x0, sizeof(NW_Int32) * thisObj->numCols); - - for (NW_Int16 i = 0; i < GRID_MODE_COL_CONSTRAINT_ROW_COUNT; i++) - { - // Get the row to be used to calculate the column constraints. - row = (NW_LMgr_ContainerBox_t*) NW_LMgr_ContainerBox_GetChild( - (NW_LMgr_ContainerBox_t*) thisObj->tableBox, i); - - if (row != NULL) - { - status = NW_LMgr_StaticTableContext_FindRowConstraints(thisObj, row, i, - rowConstraints, &hasOnlyImages); - NW_THROW_ON_ERROR(status); - - // Track the largest constraint of each column. - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - if (rowConstraints[colIndex] > thisObj->colConstraints[colIndex]) - { - thisObj->colConstraints[colIndex] = rowConstraints[colIndex]; - } - } - - // If this row only contains images also track the largest image constraints - // as well. - if (hasOnlyImages == NW_TRUE) - { - hasImageOnlyRow = NW_TRUE; - - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - if (rowConstraints[colIndex] > iamgeRowConstraints[colIndex]) - { - iamgeRowConstraints[colIndex] = rowConstraints[colIndex]; - } - } - } - } - - // No more rows. - else - { - break; - } - } - - // Determine the natural width of the table. - naturalWidth = 0; - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - naturalWidth += thisObj->colConstraints[colIndex]; - } - - // Determine the natural width of image-only rows. - if (hasImageOnlyRow == NW_TRUE) - { - imageOnlyRowNaturalWidth = 0; - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - imageOnlyRowNaturalWidth += iamgeRowConstraints[colIndex]; - } - } - - // Sliced images are larger images that content authors split into multiple - // pieces and use a table to assemble the bigger image. Grid mode tables are - // used to layout these images. In most cases these tables only contain images, - // but there are cases where an author may add a few cells that contain text. - // To ensure that these text cells don't skew the image scaling it also tracks - // the constraints of rows that just contain images -- colConstraints is then - // overridden by iamgeRowConstraints. - NW_Int32 rowCount = thisObj->numRows; - - // Only consider the rows it evalulated. - if (rowCount > GRID_MODE_COL_CONSTRAINT_ROW_COUNT) - { - rowCount = GRID_MODE_COL_CONSTRAINT_ROW_COUNT; - } - - if ((hasImageOnlyRow == NW_TRUE) && - (imageOnlyRowNaturalWidth >= (naturalWidth * GRID_MODE_IMAGE_ONLY_WIDTH_TO_NORMAL_WIDTH_RATIO)) && - (thisObj->gridModeImageCount > (GRID_MODE_IMAGE_TO_CELL_RATIO * thisObj->numCols * rowCount))) - { - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - thisObj->colConstraints[colIndex] = iamgeRowConstraints[colIndex]; - } - - naturalWidth = imageOnlyRowNaturalWidth; - isSlicedImage = NW_TRUE; - } - - if (naturalWidth == 0) - { - NW_THROW_UNEXPECTED(status); - } - - // Normalize the column contrains given the natural widths and - // the width given to the table -- so it fit horizontally on the screen. - // If table is laying out a sliced image don't normalize it if its - // width is less than the available table width. - if ((isSlicedImage == NW_FALSE) || (naturalWidth > tableWidth)) - { - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) - { - NW_Float32 temp; - - temp = (NW_Float32) thisObj->colConstraints[colIndex]; - temp = (temp / naturalWidth) * tableWidth; - - thisObj->colConstraints[colIndex] = (NW_Int32) temp; - } - } - } - - NW_CATCH(status) - { - } - - NW_FINALLY - { - NW_Mem_Free(rowConstraints); - NW_Mem_Free(iamgeRowConstraints); - - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_FindFixedConstraints - * Parameters: thisObj - the object - * Description: - * Returns: - */ -static -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindFixedConstraints( NW_LMgr_StaticTableContext_t* thisObj ) -{ - NW_LMgr_ContainerBox_t *tableContainer; - NW_ADT_Vector_Metric_t colSpan; - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t cellCount; - NW_ADT_Vector_Metric_t colIndex = 0; - NW_ADT_Vector_Metric_t cellIndex = 0; - NW_ADT_Vector_Metric_t autoColCount = 0; - NW_LMgr_Property_t prop; - NW_GDI_Metric_t width = 0; - NW_GDI_Metric_t fixedColWidth = 0; - NW_GDI_Metric_t minAutoWidth = 0; - NW_GDI_Metric_t autoColWidth = 0; - NW_GDI_Metric_t minWidth, tableWidth; - NW_LMgr_Box_t *cellBox = NULL; - NW_LMgr_Box_t *firstRow = NULL; - NW_GDI_Dimension2D_t boxSize; - - /* Get the first row. */ - tableContainer = NW_LMgr_ContainerBoxOf(thisObj->tableBox); - firstRow = NW_LMgr_ContainerBox_GetChild(tableContainer, 0); - colIndex = 0; - - /* Look at the children and determine the constraints */ - cellCount = NW_LMgr_ContainerBox_GetChildCount( - NW_LMgr_ContainerBoxOf(firstRow)); - NW_ASSERT (cellCount >= 1); - - for (cellIndex = 0; cellIndex < cellCount; cellIndex++) { - - /* We assume that the table is regular, i.e. our only children - should be table-cell boxes */ - cellBox = NW_LMgr_ContainerBox_GetChild ( - NW_LMgr_ContainerBoxOf(firstRow), cellIndex); - - /* Get the colSpan */ - prop.value.integer = 1; - NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_colSpan, &prop); - colSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - - /* Calculate the minimum cell size */ - NW_LMgr_StaticTableCellBox_GetMinimumCellSize ( - NW_LMgr_StaticTableCellBoxOf(cellBox), &boxSize); - width = boxSize.width; - - /* If the cell has a specified width, add it to the colConstraints; - * otherwise, remember it as an auto column */ - for (i = 0; i < colSpan; i++) { - if (!NW_LMgr_Box_HasFixedWidth(cellBox)) { - autoColCount++; - minAutoWidth = (NW_GDI_Metric_t)(minAutoWidth + width); - } - else { - thisObj->colConstraints[colIndex + i] = width; - fixedColWidth = (NW_GDI_Metric_t)(fixedColWidth + width); - } - } - - /* Increment the colIndex */ - colIndex = (NW_ADT_Vector_Metric_t)(colIndex + colSpan); - } - - /* Now we have all we need to know in order to constrain the columns. - First, we must check whether we can fit within the constraint. - The minimum size for the table is the total width of all - fixed width columns + the minimum width of the auto columns */ - minWidth = (NW_GDI_Metric_t)(minAutoWidth + fixedColWidth); - - /* What's the minimum table width? */ - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds( thisObj->tableBox ); - tableWidth = tableBoxBounds.dimension.width; - if (minWidth > tableWidth) - { - /* Reset the table width */ - tableWidth = minWidth; - } - - /* Calculate the width for the auto columns */ - if (autoColCount > 0) { - autoColWidth = (NW_GDI_Metric_t)((tableWidth - fixedColWidth) / autoColCount); - } - - /* Set the width for the auto columns */ - for (colIndex = 0; colIndex < thisObj->numCols; colIndex++) { - if (thisObj->colConstraints[colIndex] == 0) { - thisObj->colConstraints[colIndex] = autoColWidth; - } - } - - /* Update the table width */ - tableBoxBounds.dimension.width = (NW_GDI_Metric_t) - (fixedColWidth + autoColWidth * autoColCount); - NW_LMgr_Box_SetFormatBounds( thisObj->tableBox, tableBoxBounds ); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_FindConstraints - * Parameters: thisObj - the object - * Description: It calls either the fixed or the automatic algorithm depending on - * automaticAlgorithm value - * Returns: KBrsrSuccess if it the calculation was success. - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_FindConstraints( NW_LMgr_StaticTableContext_t* thisObj, NW_Bool automaticAlgorithm ) -{ - TBrowserStatusCode status; - - NW_ASSERT( thisObj != NULL ); - - if( automaticAlgorithm == NW_TRUE ) { - status = NW_LMgr_StaticTableContext_FindAutomaticConstraints( thisObj ); - } - else { - NW_LMgr_Property_t prop; - - status = NW_LMgr_Box_GetProperty( thisObj->tableBox, NW_CSS_Prop_gridModeApplied, &prop ); - - if ( status == KBrsrSuccess ) { - status = NW_LMgr_StaticTableContext_FindGridModeConstraints( thisObj ); - } - else { - status = NW_LMgr_StaticTableContext_FindFixedConstraints( thisObj ); - } - } - return status; -} - -static -void -NW_LMgr_StaticTableContext_ResetEdges (NW_LMgr_StaticTableContext_t* thisObj) -{ - NW_LMgr_StaticTableBorderInfo_t *borderInfo; - NW_ADT_Vector_Metric_t numStyles, k; - - NW_ASSERT( thisObj != NULL ); - - if (thisObj->borderInfos != NULL) { - numStyles = NW_ADT_Vector_GetSize (thisObj->borderInfos); - for (k = 0; k < numStyles; k++) { - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt (thisObj->borderInfos, k); - NW_Mem_Free(borderInfo); - } - } - - NW_Object_Delete(thisObj->borderInfos); - NW_Object_Delete(thisObj->horizontalEdges); - NW_Object_Delete(thisObj->verticalEdges); - - thisObj->borderInfos = NULL; - thisObj->horizontalEdges = NULL; - thisObj->verticalEdges = NULL; -} - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableContext_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_StaticTableContext_Class_t NW_LMgr_StaticTableContext_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_StaticTableContext_t), - /* construct */ _NW_LMgr_StaticTableContext_Construct, - /* destruct */ _NW_LMgr_StaticTableContext_Destruct - }, - { /* NW_LMgr_StaticTableContext */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_LMgr_StaticTableContext_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_REQUIRED_PARAM(dynamicObject); - NW_REQUIRED_PARAM(argp); - return KBrsrSuccess; -} - -void -_NW_LMgr_StaticTableContext_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_StaticTableContext_t* thisObj; - - /* for convenience */ - thisObj = NW_LMgr_StaticTableContextOf (dynamicObject); - - NW_Mem_Free(thisObj->colConstraints); - - NW_Object_Delete(thisObj->spans); - NW_LMgr_StaticTableContext_ResetEdges(thisObj); -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_Initialize - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -TBrowserStatusCode -NW_LMgr_StaticTableContext_Initialize (NW_LMgr_StaticTableContext_t* thisObj, - NW_LMgr_Box_t* thisTable) -{ - NW_TRY (status) { - - /* If this is the first time initialize is called, - * allocate and populate all the persistent data structures. */ - if (thisObj->tableBox == NULL) { - thisObj->tableBox = thisTable; - - status = NW_LMgr_StaticTableContext_GetTableStats(thisObj); - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_AddLocationInfoToMap(thisObj); - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_GenerateBorderInfo(thisObj); - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_CompressBorderInfo(thisObj); - NW_THROW_ON_ERROR(status); - } - - /* Otherwise reset the border and constraints info, unless this is the - * second (final) pass in NSM. This block is needed to support screen - * mode switching on pages that contain grid mode tables. - */ - else { - NW_LMgr_StaticTableBox_t* staticTableBox = NW_LMgr_StaticTableBoxOf(thisTable); - - if (staticTableBox->automaticWidthPass != NW_LMgr_StaticTableBox_AutomaticWidth_FinalPass) { - NW_LMgr_StaticTableContext_ResetEdges(thisObj); - - status = NW_LMgr_StaticTableContext_GenerateBorderInfo(thisObj); - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_CompressBorderInfo(thisObj); - NW_THROW_ON_ERROR(status); - } - } - - /* Allocate the temporary colConstraints array */ - if (thisObj->colConstraints) - { - NW_Mem_Free(thisObj->colConstraints); - } - thisObj->colConstraints = (NW_GDI_Metric_t*) NW_Mem_Malloc( - sizeof(NW_GDI_Metric_t) * NW_LMgr_StaticTableContext_GetNumCols(thisObj)); - - NW_THROW_OOM_ON_NULL(thisObj->colConstraints, status); - NW_Mem_memset(thisObj->colConstraints, 0, sizeof(NW_GDI_Metric_t) * NW_LMgr_StaticTableContext_GetNumCols(thisObj)); - - /* Initialize the formatting state vars */ - thisObj->y = 0; - thisObj->leftMargin = 0; - thisObj->contentHeight = 0; - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_Cleanup - * Parameters: thisObj - the object - * Description: Cleans up temporary variables used during layout. This method - * should be called after every layout. - * Returns: - */ - -TBrowserStatusCode -NW_LMgr_StaticTableContext_Cleanup (NW_LMgr_StaticTableContext_t* thisObj) -{ - thisObj->y = 0; - thisObj->leftMargin = 0; - thisObj->contentHeight = 0; - NW_Mem_Free(thisObj->colConstraints); - thisObj->colConstraints = NULL; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_LxLyToPxPy - * Parameters: thisObj - the object - * Description: - * Returns: - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_LxLyToPxPy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 lx, NW_Uint16 ly, - NW_Uint16 *px, NW_Uint16 *py, - NW_Uint16 *colSpan, NW_Uint16 *rowSpan) -{ - NW_Uint32 *mapEntry = 0; - NW_Uint16 map_px; - NW_Uint16 map_py = 0; - NW_Uint16 map_colSpan; - NW_Uint16 map_rowSpan; - NW_Uint16 col; - NW_Uint16 row; - NW_Uint16 cell; - NW_ADT_Vector_Metric_t vectorSize; - NW_ADT_Vector_Metric_t index; - NW_Bool done = NW_FALSE; - NW_Bool found = NW_FALSE; - - /* Set the default values */ - /* Go through any mapped spans */ - if (thisObj->spans == NULL) { - *px = lx; - *py = ly; - if (colSpan) { - *colSpan = 1; - } - if (rowSpan) { - *rowSpan = 1; - } - } - else { - - vectorSize = NW_ADT_Vector_GetSize(thisObj->spans); - col = 0; - row = ly; - cell = 0; - index = 0; - - while (!done) { - - found = NW_FALSE; - for (; index < vectorSize; index++) { - - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->spans, index); - NW_ASSERT(mapEntry); - - map_px = NW_LMGR_STATICTABLESPANENTRY_GETPX(*mapEntry); - map_py = NW_LMGR_STATICTABLESPANENTRY_GETPY(*mapEntry); - - /* If we have passed our vert position, we're done */ - if (map_py > ly) { - break; - } - if (map_px == col) { - found = NW_TRUE; - break; - } - } - - if (found) { - map_rowSpan = NW_LMGR_STATICTABLESPANENTRY_GETROWSPAN(*mapEntry); - map_colSpan = NW_LMGR_STATICTABLESPANENTRY_GETCOLSPAN(*mapEntry); - - /* Check whether (px,py) falls within this cell */ - if (row == map_py) { - if (cell < lx) { - cell ++; - col = NW_UINT16_CAST(col + map_colSpan); - index = 0; - } - else { - *px = col; - *py = row; - if (colSpan) { - *colSpan = map_colSpan; - } - if (rowSpan) { - *rowSpan = map_rowSpan; - } - done = NW_TRUE; - break; - } - } - else if ((row > map_py) && (row < map_py + map_rowSpan)) { - col = NW_UINT16_CAST(col + map_colSpan); - index = 0; - } - else { - index++; - } - } - else { - if (cell == lx) { - *px = col; - *py = row; - if (colSpan) { - *colSpan = 1; - } - if (rowSpan) { - *rowSpan = 1; - } - done = NW_TRUE; - break; - } - else { - cell++; - col++; - index = 0; - } - } - } - } - - if (*px >= thisObj->numCols || *py >= thisObj->numRows) { - return KBrsrNotFound; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_PxPyToLxLy - * Parameters: thisObj - the object - * Description: - * Returns: - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_PxPyToLxLy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_Uint16 *lx, NW_Uint16 *ly) -{ - NW_Uint32 *mapEntry; - NW_Uint16 map_px; - NW_Uint16 map_py; - NW_Uint16 map_colSpan; - NW_Uint16 map_rowSpan; - NW_Uint16 colCount = 0; - NW_Uint16 spanx, spany; - NW_ADT_Vector_Metric_t vectorSize; - NW_ADT_Vector_Metric_t index; - - NW_TRY(status) { - - /* Are the locations within range? */ - if (px >= thisObj->numCols || py >= thisObj->numRows) { - NW_THROW_STATUS(status, KBrsrNotFound); - } - - if (thisObj->spans) { - - if (NW_LMgr_StaticTableContext_FindSpan(thisObj, px, py, &spanx, &spany, NULL, NULL)) { - px = spanx; - py = spany; - } - - *lx = 0; - colCount = 0; - - vectorSize = NW_ADT_Vector_GetSize(thisObj->spans); - - for (index = 0; index < vectorSize; index++) { - - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->spans, index); - - map_px = NW_LMGR_STATICTABLESPANENTRY_GETPX(*mapEntry); - map_py = NW_LMGR_STATICTABLESPANENTRY_GETPY(*mapEntry); - - /* If we have passed our vert position, we're done */ - if (map_py > py) { - break; - } - - map_rowSpan = NW_LMGR_STATICTABLESPANENTRY_GETROWSPAN(*mapEntry); - map_colSpan = NW_LMGR_STATICTABLESPANENTRY_GETCOLSPAN(*mapEntry); - - if (py == map_py) { - if (px <= map_px) { - break; - } - (*lx)++; - colCount = NW_UINT16_CAST(colCount + map_colSpan); - } - else if ((py > map_py) && (py < map_py + map_rowSpan) && (px >= map_px) ) { - colCount = NW_UINT16_CAST(colCount + map_colSpan); - } - } - - /* illegal span case: overlapped span in map */ - if (colCount > (*lx + px)) - { - *lx = 0; - } else - { - *lx = NW_UINT16_CAST(*lx + px - colCount); - } - *ly = py; - } - else { - *lx = px; - *ly = py; - } - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GetCellPtrFromLxLy - * Parameters: thisObj - the object - * Description: - * Returns: - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellPtrFromLxLy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 lx, NW_Uint16 ly, - NW_LMgr_Box_t **cell) -{ - NW_LMgr_Box_t* rowBox; - NW_LMgr_ContainerBox_t* tableContainer = - NW_LMgr_ContainerBoxOf(thisObj->tableBox); - NW_LMgr_ContainerBox_t* rowContainer; - - rowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, ly); - if (rowBox != NULL) { - rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - *cell = NW_LMgr_ContainerBox_GetChild(rowContainer, lx); - } - - if (*cell == NULL || rowBox == NULL) { - return KBrsrNotFound; - } - else { - return KBrsrSuccess; - } -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GetCellLxLyFromPtr - * Parameters: thisObj - the object - * Description: - * Returns: - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellLxLyFromPtr(NW_LMgr_StaticTableContext_t *thisObj, - NW_LMgr_Box_t* cellBox, - NW_Uint16 *lx, NW_Uint16 *ly) -{ - NW_LMgr_ContainerBox_t* rowContainer = cellBox->parent; - NW_LMgr_Box_t* rowBox = NW_LMgr_BoxOf(rowContainer); - NW_LMgr_ContainerBox_t* tableContainer = NULL; - - if (thisObj == NULL) { - return KBrsrNotFound; - } - - tableContainer = NW_LMgr_ContainerBoxOf(thisObj->tableBox); - - *lx = NW_LMgr_ContainerBox_GetChildIndex(rowContainer, cellBox); - *ly = NW_LMgr_ContainerBox_GetChildIndex(tableContainer, rowBox); - - if (*lx == NW_ADT_Vector_AtEnd || *ly == NW_ADT_Vector_AtEnd) { - return KBrsrNotFound; - } else { - return KBrsrSuccess; - } -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GetCellPtrFromPxPy - * Parameters: thisObj - the object - * Description: - * Returns: - */ - -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(NW_LMgr_StaticTableContext_t *thisObj, - NW_Uint16 px, NW_Uint16 py, - NW_LMgr_Box_t** cellBox) -{ - NW_Uint16 lx, ly; - - NW_TRY(status) { - - status = NW_LMgr_StaticTableContext_PxPyToLxLy(thisObj, px, py, &lx, &ly); - NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_GetCellPtrFromLxLy (thisObj, lx, ly, cellBox); - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableContext_GetCellBordersFromPtr - * Parameters: thisObj - the object - * Description: - * Returns: - */ -TBrowserStatusCode -NW_LMgr_StaticTableContext_GetCellBordersFromPtr( - NW_LMgr_StaticTableContext_t *thisObj, - NW_LMgr_Box_t *cellBox, - NW_LMgr_FrameInfo_t *widthInfo, - NW_LMgr_FrameInfo_t *styleInfo, - NW_LMgr_FrameInfo_t *colorInfo) -{ - //lint --e{704} Shift right of signed quantity - - NW_Uint32 *mapEntry; - NW_Uint16 colSpan = 1; - NW_Uint16 rowSpan = 1; - NW_Uint16 lx, ly; - NW_Uint16 px, py; - NW_Uint16 map_px1, map_px2, map_px; - NW_Uint16 map_py1, map_py2, map_py; - NW_Uint16 topInfo, bottomInfo, leftInfo, rightInfo; - NW_ADT_Vector_Metric_t vectorSize, index; - NW_LMgr_FrameInfo_t dummy; - NW_LMgr_StaticTableBorderInfo_t *borderInfo; - NW_LMgr_Box_t* tempBox = NULL; - NW_LMgr_PropertyValue_t visibilityVal; - - NW_TRY(status) { - - status = NW_LMgr_StaticTableContext_GetCellLxLyFromPtr(thisObj, cellBox, &lx, &ly); - _NW_THROW_ON_ERROR(status); - - status = NW_LMgr_StaticTableContext_LxLyToPxPy(thisObj, lx, ly, - &px, &py, - &colSpan, &rowSpan); - if (status == KBrsrNotFound) { - NW_THROW(status); - } - _NW_THROW_ON_ERROR(status); - - /* Set the default value */ - topInfo = bottomInfo = leftInfo = rightInfo = thisObj->defaultInfo; - - /* Find the top and bottom edges */ - if (thisObj->horizontalEdges != NULL) { - vectorSize = NW_ADT_Vector_GetSize(thisObj->horizontalEdges); - - for (index = 0; index < vectorSize; index++) { - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->horizontalEdges, index); - - map_px1 = NW_LMGR_STATICTABLEHEDGEENTRY_GETPX1(*mapEntry); - map_px2 = NW_LMGR_STATICTABLEHEDGEENTRY_GETPX2(*mapEntry); - map_py = NW_LMGR_STATICTABLEHEDGEENTRY_GETPY(*mapEntry); - - if ((px >= map_px1) && (px < map_px2)) { - if (py == map_py) { - topInfo = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - } - else if (py + rowSpan == map_py) { - bottomInfo = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - } - } - } - } - - /* Find the left and right edges */ - if (thisObj->verticalEdges != NULL) { - vectorSize = NW_ADT_Vector_GetSize(thisObj->verticalEdges); - - for (index = 0; index < vectorSize; index++) { - mapEntry = (NW_Uint32*)NW_ADT_Vector_ElementAt(thisObj->verticalEdges, index); - - map_px = NW_LMGR_STATICTABLEVEDGEENTRY_GETPX(*mapEntry); - map_py1 = NW_LMGR_STATICTABLEVEDGEENTRY_GETPY1(*mapEntry); - map_py2 = NW_LMGR_STATICTABLEVEDGEENTRY_GETPY2(*mapEntry); - - if ((py >= map_py1) && (py < map_py2)) { - if (px == map_px) { - leftInfo = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - } - else if (px + colSpan == map_px) { - rightInfo = NW_LMGR_STATICTABLEHEDGEENTRY_GETINFO(*mapEntry); - } - } - } - } - - if (widthInfo == NULL) { - widthInfo = &dummy; - } - if (styleInfo == NULL) { - styleInfo = &dummy; - } - if (colorInfo == NULL) { - colorInfo = &dummy; - } - - /* Get left border */ - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt(thisObj->borderInfos, leftInfo); - NW_ASSERT (borderInfo != NULL); - - if (px == 0) { - widthInfo->left = borderInfo->edge.width; - } - else { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(thisObj, (NW_Uint16)(px - colSpan), py, &tempBox); - // If the visibility val is set to hidden, don't draw the - // Container -- but still try to draw the children - visibilityVal.token = NW_CSS_PropValue_visible; - if(status == KBrsrSuccess && tempBox != NULL) - { - (void) NW_LMgr_Box_GetPropertyValue (tempBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - } - if(visibilityVal.token == NW_CSS_PropValue_visible) - { - widthInfo->left = NW_LMGR_CEIL_DIV2(borderInfo->edge.width); - } - else - { - widthInfo->left = borderInfo->edge.width; - } - } - styleInfo->left = borderInfo->edge.style; - colorInfo->left = borderInfo->edge.color; - - /* Get right border */ - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt(thisObj->borderInfos, rightInfo); - NW_ASSERT (borderInfo != NULL); - - if (px + colSpan == thisObj->numCols) { - widthInfo->right = borderInfo->edge.width; - } - else { - - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(thisObj, (NW_Uint16)(px + colSpan ), py, &tempBox); - // If the visibility val is set to hidden, don't draw the - // Container -- but still try to draw the children - visibilityVal.token = NW_CSS_PropValue_visible; - if(status == KBrsrSuccess && tempBox != NULL) - { - (void) NW_LMgr_Box_GetPropertyValue (tempBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - } - if(visibilityVal.token == NW_CSS_PropValue_visible) - { - widthInfo->right = NW_LMGR_FLOOR_DIV2(borderInfo->edge.width); - } - else - { - widthInfo->right = borderInfo->edge.width; - } - } - styleInfo->right = borderInfo->edge.style; - colorInfo->right = borderInfo->edge.color; - - /* Get top border */ - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt(thisObj->borderInfos, topInfo); - NW_ASSERT (borderInfo != NULL); - - if (py == 0) { - widthInfo->top = borderInfo->edge.width; - } - else { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(thisObj, px, (NW_Uint16)(py - rowSpan), &tempBox); - // If the visibility val is set to hidden, don't draw the - // Container -- but still try to draw the children - visibilityVal.token = NW_CSS_PropValue_visible; - if(status == KBrsrSuccess && tempBox != NULL) - { - (void) NW_LMgr_Box_GetPropertyValue (tempBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - } - if(visibilityVal.token == NW_CSS_PropValue_visible) - { - widthInfo->top = NW_LMGR_CEIL_DIV2(borderInfo->edge.width); - } - else - { - widthInfo->top = borderInfo->edge.width; - } - } - styleInfo->top = borderInfo->edge.style; - colorInfo->top = borderInfo->edge.color; - - /* Get bottom border */ - borderInfo = *(NW_LMgr_StaticTableBorderInfo_t**) - NW_ADT_Vector_ElementAt(thisObj->borderInfos, bottomInfo); - NW_ASSERT (borderInfo != NULL); - - if (py + rowSpan == thisObj->numRows) { - widthInfo->bottom = borderInfo->edge.width; - } - else { - status = NW_LMgr_StaticTableContext_GetCellPtrFromPxPy(thisObj, px, (NW_Uint16)(py + rowSpan ), &tempBox); - // If the visibility val is set to hidden, don't draw the - // Container -- but still try to draw the children - visibilityVal.token = NW_CSS_PropValue_visible; - if(status == KBrsrSuccess && tempBox != NULL) - { - (void) NW_LMgr_Box_GetPropertyValue (tempBox, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - } - if(visibilityVal.token == NW_CSS_PropValue_visible) - { - widthInfo->bottom = NW_LMGR_FLOOR_DIV2(borderInfo->edge.width); - } - else - { - widthInfo->bottom = borderInfo->edge.width; - } - } - styleInfo->bottom = borderInfo->edge.style; - colorInfo->bottom = borderInfo->edge.color; - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -NW_LMgr_StaticTableContext_t* -NW_LMgr_StaticTableContext_New () -{ - return (NW_LMgr_StaticTableContext_t*) - NW_Object_New (&NW_LMgr_StaticTableContext_Class); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrStaticTableRowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrStaticTableRowBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,490 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_statictablerowboxi.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_cssproperties.h" -#include "BrsrStatusCodes.h" -#include "nw_lmgr_textbox.h" - - - -/* ------------------------------------------------------------------------- */ - - -const -NW_LMgr_StaticTableRowBox_Class_t NW_LMgr_StaticTableRowBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_FormatBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_StaticTableRowBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_StaticTableRowBox_ResizeRow, - /* postResize */ _NW_LMgr_StaticTableRowBox_PostResizeRow, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_StaticTableRowBox_Draw, - /* render */ _NW_LMgr_StaticTableRowBox_Render, - /* getBaseline */ _NW_LMgr_StaticTableRowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_StaticTableRowBox_ApplyFormatProps - }, - /* NW_LMgr_StaticTableRowBox */ - { - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -/* Virtual method implementations */ -/* ------------------------------------------------------------------------- */ - -NW_GDI_Metric_t -_NW_LMgr_StaticTableRowBox_GetBaseline(NW_LMgr_Box_t* rowBox) -{ - NW_LMgr_ContainerBox_t *rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - NW_ADT_Vector_Metric_t cellIndex, cellCount; - NW_LMgr_PropertyValueToken_t align; - NW_LMgr_Box_t *cellBox; - NW_GDI_Metric_t tempBase = 0, rowBaseline = 0; - NW_LMgr_Property_t prop; - - cellCount = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Look for a baseline-aligned box */ - for (cellIndex = 0; cellIndex < cellCount; cellIndex++) { - - cellBox = NW_LMgr_ContainerBox_GetChild(rowContainer, cellIndex); - - /* Get the alignment property */ - prop.value.token = NW_CSS_PropValue_baseline; - (void)NW_LMgr_Box_GetProperty (cellBox, NW_CSS_Prop_verticalAlign, &prop); - align = prop.value.token; - - if (align == NW_CSS_PropValue_baseline) { - tempBase = NW_LMgr_Box_GetBaseline(cellBox); - if (tempBase > rowBaseline) { - rowBaseline = tempBase; - } - } - } - - /* Otherwise, the baseline is not defined */ - return rowBaseline; -} - -/* ------------------------------------------------------------------------- - * Function: NW_LMgr_StaticTableRowBox_Draw - * Parameters: box - the table box - * deviceContext - the device context - * hasFocus - does the box have focus? - * Description: This method overrides the base class draw. We leave it - * blank because we don't want the table row to draw its own - * borders. Table borders will be drawn by the cells that - * own them. - * Returns: KBrsrSuccess, KBrsrOutOfMemory - */ -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_Draw (NW_LMgr_Box_t* box, - CGDIDeviceContext* deviceContext, - NW_Uint8 hasFocus) -{ - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(deviceContext); - NW_REQUIRED_PARAM(hasFocus); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_Render (NW_LMgr_Box_t* box, - CGDIDeviceContext *deviceContext, - NW_GDI_Rectangle_t* clipRect, - NW_LMgr_Box_t *currentBox, - NW_Uint8 flags, - NW_Bool* hasFocus, - NW_Bool* skipChildren, - NW_LMgr_RootBox_t* rootBox ) -{ - NW_LMgr_PropertyValue_t visibilityVal; - - // Check if visibility val for the row is collapse - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (box, NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, &visibilityVal); - if (visibilityVal.token == NW_CSS_PropValue_collapse) - { - return KBrsrSuccess; - } - - // Now call the base class render to render the children - // invoke our superclass constructor - return _NW_LMgr_ContainerBox_Render (box, - deviceContext, - clipRect, - currentBox, - flags, - hasFocus, - skipChildren, - rootBox ); -} - -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_ApplyFormatProps(NW_LMgr_FormatBox_t* format, - NW_LMgr_FormatContext_t* context) -{ - NW_REQUIRED_PARAM(format); - NW_REQUIRED_PARAM(context); - - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- * - * Public final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_StaticTableRowBox_ConstrainRow (NW_LMgr_StaticTableRowBox_t* rowBox) -{ - NW_LMgr_Box_t *thisRow = NW_LMgr_BoxOf(rowBox); - NW_LMgr_Box_t *thisTable = NW_LMgr_BoxOf(thisRow->parent); - - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( thisRow ); - NW_GDI_Rectangle_t tableBoxBounds = NW_LMgr_Box_GetFormatBounds( thisTable ); - - rowBoxBounds.dimension.width = tableBoxBounds.dimension.width; - NW_LMgr_Box_SetFormatBounds( thisRow, rowBoxBounds ); - - return KBrsrSuccess; -} - - -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_ResizeRow (NW_LMgr_Box_t* box, NW_LMgr_FormatContext_t* context) -{ - NW_LMgr_StaticTableRowBox_t* rowBox = (NW_LMgr_StaticTableRowBox_t*) box; - NW_LMgr_StaticTableBox_t* thisObj = (NW_LMgr_StaticTableBox_t*)NW_LMgr_Box_GetParent(rowBox); - NW_LMgr_PropertyValue_t visibilityVal; - TBrowserStatusCode status = KBrsrSuccess; - - visibilityVal.token = NW_CSS_PropValue_visible; - (void) NW_LMgr_Box_GetPropertyValue (box, - NW_CSS_Prop_visibility, - NW_CSS_ValueType_Token, - &visibilityVal); - if (visibilityVal.token != NW_CSS_PropValue_collapse) { - // call contraint row only on fixed algorithm - if( thisObj->automaticWidthPass == NW_LMgr_StaticTableBox_AutomaticWidth_UndefinedPass ) - { - (void)NW_LMgr_StaticTableRowBox_ConstrainRow( NW_LMgr_StaticTableRowBoxOf( rowBox ) ); - } - - context->formatBox = box; - context->formatChildren = NW_TRUE; - context->newFormatContext = context; - context->referenceCount ++; - } - return status; -} - -/* ------------------------------------------------------------------------- */ -/* ResizeRow resizes the individual cells in the row and calculates - * its final height and baseline. At the end we increment the cumulative - * height of the table content. - * ResizeRow assumes that the row originates at (0,0). We will shift it - * to its final vertical position in PlaceRow. - */ -TBrowserStatusCode -_NW_LMgr_StaticTableRowBox_PostResizeRow (NW_LMgr_Box_t* box) -{ - TBrowserStatusCode status ; - NW_LMgr_StaticTableRowBox_t* rowBox = (NW_LMgr_StaticTableRowBox_t*) box; - NW_LMgr_Box_t *thisRow = NW_LMgr_BoxOf(rowBox); - NW_LMgr_ContainerBox_t *rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - NW_LMgr_Box_t *tableBox = NW_LMgr_BoxOf(thisRow->parent); - NW_LMgr_ContainerBox_t *tableContainer = NW_LMgr_ContainerBoxOf(tableBox); - - NW_ADT_Vector_Metric_t cellCount, cellIndex; - NW_ADT_Vector_Metric_t currentRow; - NW_ADT_Vector_Metric_t rowSpan; - NW_ADT_Vector_Metric_t i; - NW_GDI_Metric_t rowHeight, rowBaseline, rowDescent; - NW_GDI_Metric_t cellHeight, cellBaseline; - NW_LMgr_Property_t prop; - NW_LMgr_Box_t* cellBox; - NW_GDI_Dimension2D_t rowSize; - NW_LMgr_PropertyValueToken_t align; - NW_Uint8 pass; - NW_LMgr_Box_t *tempRowBox; - - - /* Visit each cell in the row */ - cellCount = - NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Initialize the row info */ - currentRow = NW_LMgr_ContainerBox_GetChildIndex(tableContainer, thisRow); - rowHeight = 0; - rowBaseline = 0; - - /* We pass through the row twice. In the first pass we calculate the - * baseline for the row, if any. Next we calculate the height - * for the row given the baseline */ - for (pass = 0; pass < 2; pass++) { - for (cellIndex = 0; cellIndex < cellCount; cellIndex++) { - - /* Get the cell */ - cellBox = NW_LMgr_ContainerBox_GetChild(rowContainer, cellIndex); - - /* Get the cell info */ - cellBaseline = NW_LMgr_Box_GetBaseline (cellBox); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( cellBox ); - - cellHeight = boxBounds.dimension.height; - - /* Get the alignment property */ - prop.value.token = NW_CSS_PropValue_baseline; - status = NW_LMgr_Box_GetProperty (cellBox, NW_CSS_Prop_verticalAlign, &prop); - if (status == KBrsrNotFound) { - (void)NW_LMgr_Box_GetProperty (thisRow, NW_CSS_Prop_verticalAlign, &prop); - } - align = prop.value.token; - - /* If the rowSpan property is >1, we must take into account the other - * rows that the cell spans. The minimum height that this cell will - * take up on our row will be its height minus the total height of - * any other rows that it spans */ - prop.value.integer = 1; - (void)NW_LMgr_Box_GetPropertyFromList (cellBox, NW_CSS_Prop_rowSpan, - &prop); - rowSpan = (NW_ADT_Vector_Metric_t)prop.value.integer; - for (i = (NW_ADT_Vector_Metric_t)(currentRow + 1); - i < currentRow + rowSpan; - i++) { - tempRowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, i); - if (tempRowBox) - { - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( tempRowBox ); - cellHeight = (NW_GDI_Metric_t) - (cellHeight - boxBounds.dimension.height); - } - } - - /* Calculate the baseline and the height */ - switch (pass) { - case 0: - if (align == NW_CSS_PropValue_baseline) { - if (cellHeight - cellBaseline > rowHeight - rowBaseline) { - rowDescent = (NW_GDI_Metric_t)(cellHeight - cellBaseline); - } - else { - rowDescent = (NW_GDI_Metric_t)(rowHeight - rowBaseline); - } - rowBaseline = (NW_GDI_Metric_t) - ((rowBaseline > cellBaseline) ? rowBaseline : cellBaseline); - rowHeight = (NW_GDI_Metric_t)(rowBaseline + rowDescent); - } - break; - case 1: - if (rowHeight < cellHeight) { - switch (align) { - case NW_CSS_PropValue_bottom: - rowBaseline = - (NW_GDI_Metric_t)(rowBaseline + cellHeight - rowHeight); - break; - case NW_CSS_PropValue_middle: - rowBaseline = - (NW_GDI_Metric_t)(rowBaseline + (cellHeight - rowHeight)/2); - break; - } - rowHeight = cellHeight; - } - break; - } - } - } - /* If the row height we obtained is less than the specified row height, - we use the specified value */ - NW_LMgr_Box_GetSizeProperties(thisRow, &rowSize); - if (rowSize.height > rowHeight) { - rowHeight = rowSize.height; - } - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( thisRow ); - rowBoxBounds.dimension.height = rowHeight; - NW_LMgr_Box_SetFormatBounds( thisRow, rowBoxBounds ); - return KBrsrSuccess; - } - - - -/* ------------------------------------------------------------------------- */ -/* The alignment algorithm is defined in [CSS2 17.5.3]. - * 1. First we align any cells with align=baseline. This establishes the - * baseline for the row. - * 2. Next we align cells with align=top. This establishes the top position - * for the row and a provisional height. - * 3. Finally we align the bottom- and middle-aligned cells. This may - * increase the total height of the row. - * 4. If a cell spans several rows, it is positioned at the time we - * reach the first row in which it is contained. We start with the - * last row in order to facilitate this behavior. [This not in CSS2] - */ -TBrowserStatusCode -NW_LMgr_StaticTableRowBox_PlaceRow (NW_LMgr_StaticTableRowBox_t* rowBox, - NW_GDI_Metric_t atX, NW_GDI_Metric_t atY) -{ - NW_LMgr_Box_t *thisRow ; - NW_LMgr_ContainerBox_t *rowContainer ; - NW_LMgr_Box_t *tableBox ; - NW_LMgr_ContainerBox_t *tableContainer ; - NW_LMgr_StaticTableContext_t *thisContext ; - - NW_GDI_Rectangle_t newRect; - NW_ADT_Vector_Metric_t cellCount, cellIndex; - NW_ADT_Vector_Metric_t currentRow, currentCol, prevCol; - NW_ADT_Vector_Metric_t i; - NW_GDI_Metric_t cellHeight; - NW_GDI_Metric_t currentX; - NW_ADT_Vector_Metric_t rowSpan, colSpan; - NW_LMgr_Box_t* cellBox; - NW_LMgr_Box_t* currentRowBox; - - - thisRow = NW_LMgr_BoxOf(rowBox); - - rowContainer = NW_LMgr_ContainerBoxOf(rowBox); - - - tableBox = NW_LMgr_BoxOf(thisRow->parent); - tableContainer = NW_LMgr_ContainerBoxOf(tableBox); - thisContext = NW_LMgr_StaticTableBoxOf(tableBox)->ctx; - NW_TRY(status) { - /* Visit each cell in the row */ - cellCount = - NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - /* Initialize the row info */ - currentRow = NW_LMgr_ContainerBox_GetChildIndex(tableContainer, thisRow); - currentX = atX; - currentCol = 0; - - /* Place the cells */ - for (cellIndex = 0; cellIndex < cellCount; cellIndex++) { - - /* Get the cell */ - cellBox = NW_LMgr_ContainerBox_GetChild(rowContainer, cellIndex); - // JADE hack; to-do: why cellbox is not staticcellbox? - if (!NW_Object_IsInstanceOf (cellBox, &NW_LMgr_StaticTableCellBox_Class)) - { - continue; - } - - /* Determine its position */ - prevCol = currentCol; - status = NW_LMgr_StaticTableContext_LxLyToPxPy - (thisContext, cellIndex, currentRow, - &currentCol, &currentRow, - &colSpan, &rowSpan); - if (status == KBrsrNotFound) { - status = KBrsrSuccess; - break; - } - NW_THROW_ON_ERROR(status); - - for (i = prevCol; i < currentCol; i++) { - currentX = (NW_GDI_Metric_t) - (currentX + NW_LMgr_StaticTableContext_GetColConstraint(thisContext, i)); - } - - /* If the rowSpan property is >1, we calculate the total space that - * the cell will occupy by adding the heights of all its rows. */ - cellHeight = 0; - for (i = currentRow; i < currentRow + rowSpan; i++) { - currentRowBox = NW_LMgr_ContainerBox_GetChild(tableContainer, i); - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( currentRowBox); - - cellHeight = (NW_GDI_Metric_t) - (cellHeight - + rowBoxBounds.dimension.height); - } - - /* Get the new rectangle for the cell */ - NW_GDI_Metric_t currentColConstraint = - NW_LMgr_StaticTableContext_GetColConstraint(thisContext, currentCol); - NW_GDI_Rectangle_t cellBoxBounds = NW_LMgr_Box_GetFormatBounds( cellBox ); - newRect.point.x = currentX; - newRect.point.y = atY; - newRect.dimension.width = cellBoxBounds.dimension.width; - if (newRect.dimension.width < currentColConstraint) - { - newRect.dimension.width = currentColConstraint; - } - newRect.dimension.height = cellHeight; - - /* Stretch both moves the cell to its final position in the flow and - * stretches it to its final size. Stretch also takes care of - * any vertical alignment adjustments that need to be made. */ - status = - NW_LMgr_StaticTableCellBox_Stretch((NW_LMgr_StaticTableCellBox_t*)cellBox, - &newRect); - _NW_THROW_ON_ERROR(status); - - /* Prepare the tableContext for the next cell */ - currentX = (NW_GDI_Metric_t)(currentX + newRect.dimension.width); - currentCol = (NW_ADT_Vector_Metric_t)(currentCol + colSpan); - } - - /* Finally, place the row */ - NW_GDI_Rectangle_t rowBoxBounds = NW_LMgr_Box_GetFormatBounds( thisRow ); - rowBoxBounds.point.x = atX; - rowBoxBounds.point.y = atY; - NW_LMgr_Box_SetFormatBounds( thisRow, rowBoxBounds ); - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_StaticTableRowBox_t* -NW_LMgr_StaticTableRowBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_StaticTableRowBox_t*) - NW_Object_New (&NW_LMgr_StaticTableRowBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrTextBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrTextBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_textboxi.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_splittextbox.h" - -#include "nwx_settings.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- */ -const -NW_LMgr_TextBox_Class_t NW_LMgr_TextBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_AbstractTextBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_TextBox_t), - /* construct */ _NW_LMgr_TextBox_Construct, - /* destruct */ _NW_LMgr_TextBox_Destruct - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_AbstractTextBox_Split, - /* resize */ _NW_LMgr_AbstractTextBox_Resize, - /* postResize */ _NW_LMgr_Box_PostResize, - /* getMinimumContentSize */ _NW_LMgr_AbstractTextBox_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_MediaBox_HasFixedContentSize, - /* constrain */ _NW_LMgr_Box_Constrain, - /* draw */ _NW_LMgr_AbstractTextBox_Draw, - /* render */ _NW_LMgr_Box_Render, - /* getBaseline */ _NW_LMgr_AbstractTextBox_GetBaseline, - /* shift */ _NW_LMgr_Box_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_MediaBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_AbstractTextBox */ - /* getText */ _NW_LMgr_TextBox_GetText, - /* getStart */ _NW_LMgr_TextBox_GetStart - }, - { /* NW_LMgr_TextBox */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_TextBox_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp){ - NW_LMgr_TextBox_t* textBox; - TBrowserStatusCode status; - - /* for convenience */ - textBox = NW_LMgr_TextBoxOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_LMgr_Box_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize our text member */ - textBox->text = va_arg (*argp, NW_Text_t*); - NW_LMgr_AbstractTextBoxOf(textBox)->length = 0; /* This will get initialized - upon the first GetDisplayText */ - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -/* The text box destructor cleans up any cached GDI Font handle as well as - * the NW_Text object supplied to the constructor - */ - -void -_NW_LMgr_TextBox_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - /* for convenience */ - NW_LMgr_TextBox_t* textBox = NW_LMgr_TextBoxOf (dynamicObject); - - /* Delete the member text */ - if(textBox->text != NULL){ - NW_Object_Delete(textBox->text); - } -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_LMgr_TextBox_GetStart (NW_LMgr_AbstractTextBox_t *abstractText) -{ - NW_REQUIRED_PARAM(abstractText); - return 0; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -_NW_LMgr_TextBox_GetText (NW_LMgr_AbstractTextBox_t *abstractText) -{ - NW_LMgr_TextBox_t* textBox = NW_LMgr_TextBoxOf(abstractText); - - return textBox->text; -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_TextBox_Collapse (NW_LMgr_TextBox_t* thisObj) -{ - NW_LMgr_ContainerBox_t* parent; - NW_ADT_Vector_Metric_t index; - NW_LMgr_Box_t* siblingBox; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_LMgr_TextBox_Class)); - - /* implement collapse */ - parent = NW_LMgr_Box_GetParent (thisObj); - if (parent == NULL) { - return KBrsrFailure; - } - - /* this is the position of textBox */ - index = NW_LMgr_ContainerBox_GetChildIndex (parent, NW_LMgr_BoxOf(thisObj)); - - /* Get following split text siblings */ - index++; - siblingBox = NW_LMgr_ContainerBox_GetChild(parent, index); - - while (siblingBox != NULL && - NW_Object_IsClass(siblingBox, &NW_LMgr_SplitTextBox_Class)) - { - /* NW_LMgr_ContainerBox_RemoveChild(parent, siblingBox);*/ - NW_Object_Delete(siblingBox); - siblingBox = NW_LMgr_ContainerBox_GetChild(parent, index); - } - NW_LMgr_AbstractTextBoxOf(thisObj)->length = 0; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_LMgr_TextBox_t* -NW_LMgr_TextBox_New (NW_ADT_Vector_Metric_t numProperties, - NW_Text_t* text) -{ - NW_LMgr_TextBox_t* textBox; - - NW_REQUIRED_PARAM(numProperties); - - textBox = (NW_LMgr_TextBox_t*)NW_Object_New(&NW_LMgr_TextBox_Class, - numProperties, - text); - - return textBox; - -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrVerticalTableBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrVerticalTableBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_verticaltableboxi.h" - -#include "nw_lmgr_verticaltablerowbox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nwx_settings.h" -#include "BrsrStatusCodes.h" - -#define NW_Default_VerticalLayoutPadding 2 -/* ----------------------------------------------------------------------------* - * static data - * ----------------------------------------------------------------------------*/ - -const -NW_LMgr_VerticalTableBox_Class_t NW_LMgr_VerticalTableBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_VerticalTableBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_LRFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_VerticalTableBox */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_VerticalTableBox_t* -NW_LMgr_VerticalTableBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_VerticalTableBox_t*) - NW_Object_New (&NW_LMgr_VerticalTableBox_Class, numProperties); -} - -/* This method substitutes the boxes for <table>, <tr>, <th>, and <td> when - switching between normal and vertical mode */ -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -NW_LMgr_VerticalTableBox_SwitchBox (NW_LMgr_Box_t* box) -{ - const NW_Object_Class_t* objClass = NULL; - NW_LMgr_Box_t* newBox = NULL; - NW_LMgr_ContainerBox_t* parent = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t childCount = 0; - NW_ADT_Vector_Metric_t index = 0; - NW_LMgr_Property_t prop; - - // Don't replace boxes in a grid mode table. - if (NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_gridModeApplied, &prop) == KBrsrSuccess) - { - return NULL; - } - - objClass = NW_Object_GetClass(box); - if (objClass == &NW_LMgr_VerticalTableBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_StaticTableBox_New(0); - } - else if (objClass == &NW_LMgr_VerticalTableRowBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_StaticTableRowBox_New(0); - //NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_display); - } - else if (objClass == &NW_LMgr_VerticalTableCellBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_StaticTableCellBox_New(0); - } - else if (objClass == &NW_LMgr_StaticTableBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_VerticalTableBox_New(0); - } - else if (objClass == &NW_LMgr_StaticTableRowBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_VerticalTableRowBox_New(0); - } - else if (objClass == &NW_LMgr_StaticTableCellBox_Class) - { - newBox = (NW_LMgr_Box_t*)NW_LMgr_VerticalTableCellBox_New(0); - } - - if (newBox) - { - /* transfer the property list */ - (void) NW_LMgr_Box_SetPropList(newBox, box->propList); - box->propList = NULL; - parent = NW_LMgr_Box_GetParent(box); - - // Make sure we don't leak the children initialized in constructor. - if (NW_LMgr_ContainerBoxOf(newBox)->children != NULL) - { - NW_Object_Delete (NW_LMgr_ContainerBoxOf(newBox)->children); - } - /* transfer the children */ - NW_LMgr_ContainerBoxOf(newBox)->children = NW_LMgr_ContainerBoxOf(box)->children; - NW_LMgr_ContainerBoxOf(box)->children = NULL; - childCount = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(newBox)); - - /* update the parent pointer for all the children */ - for (index = 0; index < childCount; index++) - { - NW_LMgr_Box_t* child = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(newBox), index); - if (child) - child->parent = NW_LMgr_ContainerBoxOf(newBox); - } - /* replace old box with new box and delete the old box */ - status = NW_LMgr_ContainerBox_ReplaceChild(parent, box, newBox); - if (status == KBrsrSuccess) - { - NW_Object_Delete(box); - } - else - { - NW_Object_Delete(newBox); - newBox = NULL; - } - } - - return newBox; -} - -/* According to the Vertical Layout algorithm we need to ignore, width, height, - border, margin, padding, and white-space properties for <table>, <tr>, <th>, - and <td> elements - */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_VerticalTableBox_GetPropertyFromList(NW_LMgr_Box_t* box, - NW_LMgr_PropertyName_t name, - NW_LMgr_Property_t* property, - NW_Bool* specialProperty) -{ - TBrowserStatusCode status = KBrsrNotFound; - - /* denotes that we do not need to look into the property List */ - *specialProperty = NW_TRUE; - switch(name) - { - case NW_CSS_Prop_width: - case NW_CSS_Prop_height: - property->type = NW_CSS_ValueType_Token; - property->value.integer = NW_CSS_PropValue_auto; - break; - - case NW_CSS_Prop_leftBorderStyle: - case NW_CSS_Prop_rightBorderStyle: - case NW_CSS_Prop_topBorderStyle: - case NW_CSS_Prop_bottomBorderStyle: - case NW_CSS_Prop_borderStyle: - property->type = NW_CSS_ValueType_Token; - property->value.token = NW_CSS_PropValue_hidden; - break; - - case NW_CSS_Prop_rightPadding: - case NW_CSS_Prop_leftPadding: - case NW_CSS_Prop_padding: - status = KBrsrSuccess; - break; - - case NW_CSS_Prop_topPadding: - case NW_CSS_Prop_bottomPadding: - if (NW_Object_IsClass(box, &NW_LMgr_VerticalTableRowBox_Class)) - { - property->type = NW_CSS_ValueType_Px; - property->value.integer = NW_Default_VerticalLayoutPadding; - status = KBrsrSuccess; - } - break; - - case NW_CSS_Prop_whitespace: - property->type = NW_CSS_ValueType_Token; - property->value.token = NW_CSS_PropValue_normal; - break; - - case NW_CSS_Prop_display: - if (NW_Object_IsClass(box, &NW_LMgr_VerticalTableRowBox_Class)) - { - property->type = NW_CSS_ValueType_Token; - property->value.token = NW_CSS_PropValue_display_block; - status = KBrsrSuccess; /* we want to return that we found the property */ - } - else - /* we need to look into the property List */ - *specialProperty = NW_FALSE; - break; - - default: - /* we need to look into the property List */ - *specialProperty = NW_FALSE; - } - - return status; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrVerticalTableCellBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrVerticalTableCellBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_verticaltablecellboxi.h" - - -/* ----------------------------------------------------------------------------* - * static data - * ----------------------------------------------------------------------------*/ - -const -NW_LMgr_VerticalTableCellBox_Class_t NW_LMgr_VerticalTableCellBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_VerticalTableCellBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_LRFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_VerticalTableCellBox */ - /* unused */ NW_Object_Unused - } -}; - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_VerticalTableCellBox_t* -NW_LMgr_VerticalTableCellBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_VerticalTableCellBox_t*) - NW_Object_New (&NW_LMgr_VerticalTableCellBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrVerticalTableRowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrVerticalTableRowBox.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_verticaltablerowboxi.h" - - -/* ----------------------------------------------------------------------------* - * static data - * ----------------------------------------------------------------------------*/ - -const -NW_LMgr_VerticalTableRowBox_Class_t NW_LMgr_VerticalTableRowBox_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_BidiFlowBox_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_VerticalTableRowBox_t), - /* construct */ _NW_LMgr_ContainerBox_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_Box */ - /* split */ _NW_LMgr_Box_Split, - /* resize */ _NW_LMgr_FlowBox_Resize, - /* postResize */ _NW_LMgr_FlowBox_PostResize, - /* getMinimumContentSize */ _NW_LMgr_Box_GetMinimumContentSize, - /* hasFixedContentSize */ _NW_LMgr_Box_HasFixedContentSize, - /* constrain */ _NW_LMgr_FormatBox_Constrain, - /* draw */ _NW_LMgr_Box_Draw, - /* render */ _NW_LMgr_ContainerBox_Render, - /* getBaseline */ _NW_LMgr_FlowBox_GetBaseline, - /* shift */ _NW_LMgr_ContainerBox_Shift, - /* clone */ _NW_LMgr_Box_Clone - }, - { /* NW_LMgr_ContainerBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_FormatBox */ - /* applyFormatProps */ _NW_LMgr_FlowBox_ApplyFormatProps - }, - { /* NW_LMgr_FlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_LRFlowBox */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_VerticalTableRowBox */ - /* unused */ NW_Object_Unused - } -}; - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_VerticalTableRowBox_t* -NW_LMgr_VerticalTableRowBox_New (NW_ADT_Vector_Metric_t numProperties) -{ - return (NW_LMgr_VerticalTableRowBox_t*) - NW_Object_New (&NW_LMgr_VerticalTableRowBox_Class, numProperties); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/LMgrepoc32TextUtils.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrepoc32TextUtils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,272 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_textutils.h" - -#include "nwx_defs.h" -#include "nwx_string.h" -#include "GDIDeviceContext.h" -#include "BrsrStatusCodes.h" - -#pragma message(__FILE__ " TODO:Currently just a copy of ISA implementation. Change to epoc32 if necessary") - -/* ------------------------------------------------------------------------- * - * Static helper functions - * ------------------------------------------------------------------------- */ -static TBrowserStatusCode -Text_Truncate(NW_Text_t *text, - NW_Text_t *truncStr, - NW_GDI_Metric_t width, - CGDIDeviceContext *deviceContext, - NW_Text_Length_t *length) -{ - NW_GDI_Dimension2D_t extent; - NW_Ucs2* bufferStorage; - NW_Text_Length_t displayLength; - TBrowserStatusCode status; - NW_GDI_Dimension2D_t truncate_extent; - NW_Text_UCS2_t* displayText; - - - /* Copy text to temporary UCS2 text object */ - displayText = NW_Text_UCS2_New(NULL, 0, 0) ; - if (displayText == NULL) - return KBrsrOutOfMemory; - - bufferStorage = - NW_Text_GetUCS2Buffer(text, 0, &displayLength, NULL); - if (displayLength == 0){ - NW_Object_Delete (displayText); - return KBrsrFailure; - } - - NW_Text_SetStorage (displayText, bufferStorage, displayLength, 0); - - /* Set the initial length */ - *length = displayLength; - - /* Get extent of string */ - extent.width = 0;extent.height = 0; - status = deviceContext->GetTextExtent( - NW_TextOf(displayText), - 0, - NW_GDI_FlowDirection_LeftRight, - &extent); - - if (status != KBrsrSuccess){ - NW_Object_Delete (displayText); - return KBrsrFailure; - } - - /* if already fits in the display, return...no need to truncate */ - if (extent.width <= width){ - NW_Object_Delete (displayText); - return KBrsrSuccess; - } - - /* Loop until you find the appropriate place to clip the string */ - displayLength = (NW_Text_Length_t) (displayLength - 1); - - status = deviceContext->GetTextExtent( - truncStr, - 0, - NW_GDI_FlowDirection_LeftRight, - &truncate_extent); - - do{ - NW_Text_SetCharCount(displayText, displayLength); - extent.width = 0; - if (displayText){ - status = deviceContext->GetTextExtent( - NW_TextOf(displayText), - 0, - NW_GDI_FlowDirection_LeftRight, - &extent); - if (status != KBrsrSuccess){ - NW_Object_Delete (displayText); - return KBrsrFailure; - } - } - - if(extent.width <= (width - truncate_extent.width)) - { - break; - } - displayLength--; - }while (extent.width >= width - truncate_extent.width); - - *length = displayLength; - NW_Object_Delete (displayText); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* BreakText returns the position of the first break character that fits - * within the given constraint. It returns a 0 if the text could not - * be split to fit the constraint. - * - * Breaking can occur in one of three ways by using the flags parameter: - * If flags is set to NW_LMgr_Text_Flags_WordWrap the text will be broken - * along a word boundary. - * If NW_LMgr_Text_Flags_WordWrap is not set the text will be clipped at a - * character boundary. - * If flags is set to NW_LMgr_Text_Flags_Truncate a truncation string (ie, "..." - * must be specified in the truncStr parameter. During truncation, the - * string will be broken at a character boundary. - * - * The space parameter will specify the width of the area to fit the text. - * - * The character position to break the text will be returned in the length - * parameter. - */ - - -TBrowserStatusCode -NW_LMgr_Text_BreakText(NW_Text_t *text, - NW_Text_t *truncStr, - NW_GDI_Metric_t space, - NW_Uint8 flags, - CGDIDeviceContext *deviceContext, - NW_Text_Length_t *length) -{ - TBrowserStatusCode status; - NW_Text_Length_t strLen; - NW_Text_Length_t i; - NW_GDI_Dimension2D_t size; - NW_Text_Length_t guess; - NW_Text_Length_t totalWidth; - NW_Ucs2 ch; - NW_Bool compressWS; - - compressWS = (NW_Bool) - (flags & NW_LMgr_Text_Flags_SplitCompressed ? NW_TRUE : NW_FALSE); - - NW_ASSERT (length != NULL); - - - *length = 0; /* set return value to default */ - - strLen = NW_Text_GetCharCount (text); - - status = NW_LMgr_Text_GetSubstringExtent(text, - strLen, - compressWS, - &size, - deviceContext); - - if (flags & NW_LMgr_Text_Flags_Truncate && !truncStr) - return KBrsrFailure; - - if (status != KBrsrSuccess) { - return status; - } - - /* Word wrap the string */ - if (flags & NW_LMgr_Text_Flags_WordWrap) - { - NW_Text_Length_t temp = space; // Avoids lint warning - - totalWidth = size.width; - guess = 0; - - for (i = (NW_Text_Length_t) (temp * strLen / totalWidth); i < strLen; i++) { - ch = (NW_Ucs2)NW_Text_GetAt (text,i); - if (NW_LMgr_Text_CanSplit (ch, flags)) { - - status = NW_LMgr_Text_GetSubstringExtent(text, - (NW_Text_Length_t)(i+1), - compressWS, - &size, - deviceContext); - if (status != KBrsrSuccess) { - return status; - } - - if (space >= size.width) { - guess = i; - } - else { - break; - } - } - } - - if (guess == 0) { - for (i = (NW_Text_Length_t) (space * strLen / totalWidth); i > 0; i--) { - ch = (NW_Ucs2)NW_Text_GetAt (text,i); - if (NW_LMgr_Text_CanSplit (ch, flags)) { - - status = NW_LMgr_Text_GetSubstringExtent(text, - (NW_Text_Length_t)(i+1), - compressWS, - &size, - deviceContext); - if (status != KBrsrSuccess) { - return status; - } - - if (space >= size.width) { - guess = i; - break; - } - } - } - } - - /* Return result */ - *length = guess; - status = KBrsrSuccess; - } - - /* Truncate the string */ - else if (flags & NW_LMgr_Text_Flags_Truncate) - { - status = Text_Truncate(text, - truncStr, - space, - deviceContext, - length); - } - - /* Clip the string */ - else - { - for (i=1; i<=strLen; i++) { - status = NW_LMgr_Text_GetSubstringExtent(text, - i, - compressWS, - &size, - deviceContext); - if ( status != KBrsrSuccess ) { - return status; - } - if (size.width > space) { - i--; - break; - } - } - - *length = i; - status = KBrsrSuccess; - } - - return status; - -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/ListBullets.c --- a/webengine/wmlengine/src/lmgr/src/ListBullets.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_listbullets.h" -#include "nwx_string.h" -#include "nw_text_ucs2.h" - -/* The current implementation of the number-to-string utility is limited to a small set of - * static strings so that no allocations need to take place. However, this does limit the - * magnitude of numbers that can be handled. TODO: revisit this limitation - */ - -#define NW_LMgr_maxListCount (NW_Uint32)999 -#define NW_LMgr_maxBulletLen (NW_Uint8)10 - -/* Roman numeral support */ -const char* const units[] = { - "i","ii","iii","iv","v","vi","vii","viii","ix" -}; -const char* const tens[] = { - "x","xx","xxx","xl","l","lx","lxx","lxxx","xc" -}; -const char* const hundreds[] = { - "c","cc","ccc","cd","d","dc","dcc","dccc","cm" -}; - -static -void -getRomanBullet(NW_Uint32 number, NW_Ucs2* str, NW_Bool toUpper){ - - number = number % 1000; - if (number / 100 != 0) { - NW_Str_StrcatConst(str, hundreds[number / 100 - 1]); - number = number % 100; - } - if (number / 10 != 0) { - NW_Str_StrcatConst(str, tens[number / 10 - 1]); - number = number % 10; - } - if (number != 0) { - NW_Str_StrcatConst(str, units[number - 1]); - } - - if (toUpper) { - NW_Str_Strupr(str); - } -} - -void NW_LMgr_ListBullets_AStringFromUInt(NW_Uint32 number, NW_Uint32* i, NW_Ucs2* Str, NW_Ucs2 startChar, NW_Uint32 offset) -{ - NW_Uint32 j, new_offset = 1; - j = *i; - if (number > 26*27) - { - new_offset = 0; - } - Str[j] = (NW_Ucs2)(startChar + (number - 1)%26); - if ((number - offset) / 26) - { - *i = *i + 1; - NW_LMgr_ListBullets_AStringFromUInt((number - offset)/26, i, Str, startChar, new_offset); - } -} - -void NW_LMgr_ListBullets_ReverseStr(NW_Ucs2* Str, NW_Ucs2* temp2, NW_Uint32 i) -{ - NW_Uint32 j; - - if (i <2) - { - NW_Mem_Free (temp2); - return; - } - for (j = 0; j < i; j++) - { - Str[i-j-1] = temp2[j]; - } - NW_Mem_Free (temp2); -} - -NW_Ucs2* -NW_LMgr_ListBullets_StringFromUInt(NW_Ucs2 format, NW_Uint32 number){ - NW_Ucs2 tempBullet[NW_LMgr_maxBulletLen + 1]; - NW_Uint32 i = 0; - - number = (number % NW_LMgr_maxListCount) + 1; - NW_Mem_memset(tempBullet, 0, (NW_LMgr_maxBulletLen + 1)*sizeof(NW_Ucs2)); - - switch (format){ - case 'd': - (void)NW_Str_Itoa(number, tempBullet); - break; - case 'A': - /* a recursive way to calculate the letter bullet */ - NW_LMgr_ListBullets_AStringFromUInt(number, &i, tempBullet, 'A', 1); - NW_LMgr_ListBullets_ReverseStr(tempBullet, NW_Str_Newcpy(tempBullet), ++i); - tempBullet[i] = 0; - break; - case 'a': - NW_LMgr_ListBullets_AStringFromUInt(number, &i, tempBullet, 'a', NW_TRUE); - NW_LMgr_ListBullets_ReverseStr(tempBullet, NW_Str_Newcpy(tempBullet), ++i); - tempBullet[i] = 0; - break; - case 'R': - getRomanBullet(number, tempBullet, NW_TRUE); - break; - case 'r': - getRomanBullet(number, tempBullet, NW_FALSE); - break; - default: - NW_ASSERT(0); - return NULL; - } - - /* Add the point */ - NW_Str_StrcatConst(tempBullet, "."); - - /* Return the copy of the string */ - return NW_Str_Newcpy(tempBullet); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/MakeSrc2 --- a/webengine/wmlengine/src/lmgr/src/MakeSrc2 Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc2 -TARGET = rbTempest_lmgr_src_src2_lib.a - - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = AbstractTextBox.c AccessKey.c Action.c ActiveBox.c ActiveContainerBox.c \ - AnimatedImageBox.c AnimatedImageAggregate.c Box.c BoxVisitor.c BreakBox.c \ - ContainerBox.c EmptyBox.c EventHandler.c FlowBox.c FormatBox.c FormatContext.c \ - IActionTable.c IBoxTreeListener.c IEventListener.c ImageBox.c \ - LRFlowBox.c LineBox.c ListBullets.c MarqueeBox.c MediaBox.c \ - PropertyList.c RootBox.c RuleBox.c SimplePropertyList.c \ - SlavePropertyList.c SplitTextBox.c StaticTableBox.c StaticTableCellBox.c \ - StaticTableRowBox.c TextBox.c \ - TransientPropertyList.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/Marquee_BoxFormat.cpp --- a/webengine/wmlengine/src/lmgr/src/Marquee_BoxFormat.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Description : The class handles formatting of the marquee boxes -* -*/ - - -#include "cstack.h" -#include "BoxFormat.h" - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_FlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(flow); - NW_ASSERT(box); - NW_ASSERT(context); - - /* Inline a container of some other kind */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInlineContainer(flow, NW_LMgr_ContainerBoxOf(box), context); - } - - /* Inline a media box */ - else if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Inline an empty box */ - else if (NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Otherwise its a schema violation */ - else{ - status = KBrsrFailure; - } - - return status; - - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_PostFlowInline(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(flow); - NW_ASSERT(box); - NW_ASSERT(context); - - // Inline a Marquee - if (NW_Object_IsInstanceOf(box, &NW_LMgr_MarqueeBox_Class)) { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Inline a container of some other kind */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInlineContainerPost(flow, NW_LMgr_ContainerBoxOf(box), context); - } - - return status; - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_FlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_REQUIRED_PARAM(flow); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(context); - - /* Inline a container of some other kind */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInlineContainer(flow, NW_LMgr_ContainerBoxOf(box), context); - } - - /* Inline a media box */ - else if (NW_Object_IsInstanceOf (box, &NW_LMgr_MediaBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Inline an empty box */ - else if (NW_Object_IsClass (box, &NW_LMgr_EmptyBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Otherwise its a schema violation */ - else{ - status = KBrsrFailure; - } - - return status; - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_PostFlowBlock(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - TBrowserStatusCode status = KBrsrSuccess; - - - NW_REQUIRED_PARAM(flow); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(context); - - - // Inline a Marquee - if (NW_Object_IsInstanceOf(box, &NW_LMgr_MarqueeBox_Class)) { - status = NW_LMgr_BidiFlowBox_HandleInline(flow, box, context); - } - - /* Inline a container of some other kind */ - if (NW_Object_IsInstanceOf (box, &NW_LMgr_ContainerBox_Class)){ - status = NW_LMgr_BidiFlowBox_HandleInlineContainerPost(flow, NW_LMgr_ContainerBoxOf(box), context); - } - - return status; - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - NW_ASSERT(box); - NW_ASSERT(context); - NW_REQUIRED_PARAM(flow); - - NW_ADT_DynamicVector_t *pendingFloats = context->pendingFloats; - NW_ADT_DynamicVector_t *placedFloats = context->pendingFloats; - - /* If the float context is not set, remove the box */ - if (pendingFloats == NULL || placedFloats == NULL) { - return KBrsrFailure; - } - - if (NW_ADT_DynamicVector_InsertAt(pendingFloats, &box, NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_ListItem(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - NW_REQUIRED_PARAM(flow); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(context); - - return KBrsrFailure; - } - -TBrowserStatusCode -TLMgr_Marquee_Box_Formatter::NW_LMgr_BidiFlowBox_DirectKey(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) - { - NW_REQUIRED_PARAM(flow); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(context); - - return KBrsrFailure; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/PropertyList.c --- a/webengine/wmlengine/src/lmgr/src/PropertyList.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_propertylisti.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_PropertyList_Class_t NW_LMgr_PropertyList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_PropertyList_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_LMgr_PropertyList */ - /* get */ NULL, - /* set */ NULL, - /* set */ NULL, - /* copy */ NULL, - /* clear */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/SimplePropertyList.cpp --- a/webengine/wmlengine/src/lmgr/src/SimplePropertyList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,784 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include <e32base.h> -#include "BrsrStatusCodes.h" -#include "TKeyArrayPtr.h" -#include "nw_lmgr_simplepropertylisti.h" -#include "nw_lmgr_slavepropertylist.h" -#include "GDIFont.h" -#include "CSSPropertyTable.h" - -/** -* Wrapper class for wrapping NW_LMgr_PropertyList_Entry_t. -* This wrapper class, being a real C++ class, can be used in Symbian -* API container classes such as CArrayPtrFix. This wrapper class was -* implemented and utilized to allow the old style, non-C++ code to take -* advantage of the efficiencies in the Symbian container classes. -* -* @lib lmgr.lib -* @since 2.1 -*/ -class CLmgrPropertyEntry : public CBase - { - public: // Constructors and destructor - - CLmgrPropertyEntry() { iEntry.value.object = NULL; } - - virtual ~CLmgrPropertyEntry() - { - if (iEntry.value.object != NULL) - { - if( iEntry.type == NW_CSS_ValueType_Font ) - { - // font is CBased now - delete (CGDIFont*)iEntry.value.object; - } - else if (((iEntry.type & NW_CSS_ValueType_Mask) >= NW_CSS_ValueType_Object) && !(iEntry.type & NW_CSS_ValueType_Copy)) - { - NW_Object_Delete (iEntry.value.object); - iEntry.value.object = NULL; - } - } - } - - public: // Data - - NW_LMgr_PropertyName_t iPropName; - NW_LMgr_PropertyList_Entry_t iEntry; - - }; - -typedef CArrayPtrFlat<CLmgrPropertyEntry> CLmgrPropertyList; - - -static TBool NW_LMgr_SimplePropertyList_IsCachedEntry( NW_LMgr_PropertyName_t aPropertyName ) - { - // check inherited properties - if( aPropertyName >= NW_CSS_PropInherit ) - { - // no xor? - aPropertyName = (NW_LMgr_PropertyName_t)(aPropertyName - NW_CSS_PropInherit); - } - return( aPropertyName <= NW_CSS_CachedProperty_Num ); - } -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_SimplePropertyList_Class_t NW_LMgr_SimplePropertyList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_PropertyList_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_SimplePropertyList_t), - /* construct */ _NW_LMgr_SimplePropertyList_Construct, - /* destruct */ _NW_LMgr_SimplePropertyList_Destruct - }, - { /* NW_LMgr_PropertyList */ - /* get */ _NW_LMgr_SimplePropertyList_Get, - /* set */ _NW_LMgr_SimplePropertyList_Set, - /* remove */ _NW_LMgr_SimplePropertyList_Remove, - /* clone */ _NW_LMgr_SimplePropertyList_Clone, - /* clear */ _NW_LMgr_SimplePropertyList_Clear - }, - { /* NW_LMgr_SimplePropertyList */ - /* unused */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_LMgr_SimplePropertyList_t* thisObj; - - //lint --e{550} Symbol 'capacity' and 'keySize' not accessed - - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (dynamicObject); - - /* initialize the object */ - NW_Uint32 keySize = va_arg (*argp, NW_Uint32); - NW_Uint16 capacity = (NW_Uint16)va_arg (*argp, NW_Uint32); - NW_Uint16 increment = (NW_Uint16)va_arg (*argp, NW_Uint32); - - /* map holds pointers to the entry objects */ - thisObj->map = new CLmgrPropertyList(increment); - if (thisObj->map == NULL) - { - return KBrsrOutOfMemory; - } - - thisObj->iCachedProperty = (void**)NW_Mem_Malloc( sizeof( CLmgrPropertyEntry* ) * NW_CSS_CachedProperty_Num ); - if( !thisObj->iCachedProperty ) - { - // - delete (CLmgrPropertyList*)(thisObj->map); - return KBrsrOutOfMemory; - } - // init - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - cachedList[ i ] = NULL; - } - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_LMgr_SimplePropertyList_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_LMgr_SimplePropertyList_t* thisObj; - CLmgrPropertyList* list; - - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (dynamicObject); - list = (CLmgrPropertyList*)(thisObj->map); - - if (list != NULL) - { - /* free the map entries */ - list->ResetAndDestroy(); - - /* free the map itself */ - delete list; - thisObj->map = NULL; - } - // - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - if ( cachedList != NULL) - { - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - delete cachedList[ i ]; - } - thisObj->iCachedProperty = NULL; - NW_Mem_Free( cachedList ); - } - - if (thisObj->backupPropList != NULL) - { - NW_Object_Delete(thisObj->backupPropList); - thisObj->backupPropList = NULL; - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry) -{ - NW_LMgr_SimplePropertyList_t* thisObj; - NW_LMgr_PropertyList_Entry_t prop; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SimplePropertyList_Class)); - NW_ASSERT (entry != NULL); - - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (propertyList); - prop.value.object = NULL; - - if ((key == NW_CSS_Prop_elementId) && (thisObj->domNode != NULL)) - { - entry->type = NW_CSS_ValueType_Object; - entry->value.object = thisObj->domNode; - return KBrsrSuccess; - } - - if ((key == NW_CSS_Prop_leftBorderStyle) || - (key == NW_CSS_Prop_leftPadding) || - (key == NW_CSS_Prop_leftMargin)) - { - NW_LMgr_Box_t *box; - NW_LMgr_PropertyList_t* siblingPropList; - - box = NULL; - (void) NW_LMgr_PropertyList_Get(thisObj, NW_CSS_Prop_sibling, &prop); - if (prop.value.object) - { - if (NW_Object_IsInstanceOf(prop.value.object, &NW_LMgr_Box_Class)) - { - box = (NW_LMgr_Box_t*)prop.value.object; - siblingPropList = NW_LMgr_Box_PropListGet(box); - - if (NW_Object_IsInstanceOf(siblingPropList, &NW_LMgr_SlavePropertyList_Class)) - { - /* implies that next box is a cloned box */ - switch(key) - { - /* Hide the borders where the split occurred */ - case NW_CSS_Prop_leftBorderStyle: - entry->type = NW_CSS_ValueType_Token; - entry->value.token = NW_CSS_PropValue_none; - return KBrsrSuccess; - - /* Remove any padding or margins */ - case NW_CSS_Prop_leftPadding: - entry->type = NW_ADT_ValueType_Integer; - entry->value.token = 0; - return KBrsrSuccess; - - case NW_CSS_Prop_leftMargin: - entry->type = NW_ADT_ValueType_Integer; - entry->value.token = 0; - return KBrsrSuccess; - - default: - break; - }/* end switch */ - }/* end if */ - }/* end if */ - }/* if (prop.value.object) */ - } /*end if */ - - return NW_LMgr_SimplePropertyList_MapLookup( thisObj, key, entry ); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Set (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - const NW_LMgr_PropertyList_Entry_t* entry) - { - NW_LMgr_SimplePropertyList_t* thisObj; - CLmgrPropertyList* list; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SimplePropertyList_Class)); - NW_ASSERT (entry != NULL); - - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (propertyList); - list = (CLmgrPropertyList*)(thisObj->map); - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - - if ((key == NW_CSS_Prop_elementId) && (entry->type == NW_CSS_ValueType_Object)) - { - thisObj->domNode = entry->value.object; - return KBrsrSuccess; - } - - /* if entry already exists, delete it */ - CLmgrPropertyEntry* newEntry = new CLmgrPropertyEntry(); - if(newEntry == NULL) - { - return KBrsrOutOfMemory; - } - newEntry->iPropName = key; - - TBool cachedEntry = EFalse; - TNumKeyArrayPtr matchkey(_FOFF(CLmgrPropertyEntry, iPropName), ECmpTUint16); - // check if this is a cahced property - if( NW_LMgr_SimplePropertyList_IsCachedEntry( key ) ) - { - // cached property - cachedEntry = ETrue; - // is there XOR operator? - key = (NW_LMgr_PropertyName_t)( key > NW_CSS_PropInherit ? ( key - NW_CSS_PropInherit ) : key ); - // remove duplicate property - delete cachedList[ key - 1 ]; - cachedList[ key - 1 ] = NULL; - } - else - { - TInt index; - if (list->FindIsq(newEntry, matchkey, index) == 0) - { - CLmgrPropertyEntry* duplicateEntry; - duplicateEntry = list->At(index); - list->Delete(index); - list->Compress(); - delete duplicateEntry; - } - } - - /* use byte-wise copy to get the unaligned client data into the new entry */ - NW_Mem_memcpy (&(newEntry->iEntry), entry, sizeof *entry); - - // set the entry in the map - if( cachedEntry ) - { - // - cachedList[ key - 1 ] = newEntry; - } - else - { - TRAPD(ret, list->InsertIsqL(newEntry, matchkey)); - if (ret == KErrNoMemory) - { - delete newEntry; - return KBrsrOutOfMemory; - } - } - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key ) -{ - NW_LMgr_SimplePropertyList_t* thisObj; - CLmgrPropertyList* list; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SimplePropertyList_Class)); - - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (propertyList); - list = (CLmgrPropertyList*)(thisObj->map); - - if( NW_LMgr_SimplePropertyList_IsCachedEntry( key ) ) - { - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - key = (NW_LMgr_PropertyName_t)( key > NW_CSS_PropInherit ? ( key - NW_CSS_PropInherit ) : key ); - // remove property - delete cachedList[ key - 1 ]; - cachedList[ key - 1 ] = NULL; - } - else - { - /* remove the property */ - CLmgrPropertyEntry newEntry; - CLmgrPropertyEntry* entryToDelete; - newEntry.iPropName = key; - TInt index; - TNumKeyArrayPtr matchkey(_FOFF(CLmgrPropertyEntry, iPropName), ECmpTUint16); - if (list->FindIsq(&newEntry, matchkey, index) == 0) - { - entryToDelete = list->At(index); - list->Delete(index); - list->Compress(); - delete entryToDelete; - } - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_PropertyList_t* -_NW_LMgr_SimplePropertyList_Clone (const NW_LMgr_PropertyList_t* propertyList) -{ - NW_LMgr_PropertyList_t* newPropertyList = NULL; - - NW_LMgr_SimplePropertyList_t* thisObj; - NW_LMgr_PropertyList_Entry_t entry; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SimplePropertyList_Class)); - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (propertyList); - - entry.value.object = NULL; - (void)NW_LMgr_PropertyList_Get(thisObj, NW_CSS_Prop_sibling, &entry); - - /* instantiate a new SimplePropertyList object */ - newPropertyList = (NW_LMgr_PropertyList_t*) - NW_LMgr_SlavePropertyList_New ((NW_LMgr_Box_s *)entry.value.object); - if (newPropertyList == NULL) - { - return NULL; - } - - return newPropertyList; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Clear (NW_LMgr_PropertyList_t* propertyList) -{ - NW_LMgr_SimplePropertyList_t* thisObj; - CLmgrPropertyList* list; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_SimplePropertyList_Class)); - /* for convenience */ - thisObj = NW_LMgr_SimplePropertyListOf (propertyList); - list = (CLmgrPropertyList*)(thisObj->map); - - if (list != NULL) - { - list->ResetAndDestroy(); - } - // clear cached properties - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - delete cachedList[ i ]; - cachedList[ i ] = NULL; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_SimplePropertyList_Copy (const NW_LMgr_SimplePropertyList_t* thisObj, - NW_LMgr_PropertyList_t* destination) -{ - TInt i; - CLmgrPropertyList* list; - TBrowserStatusCode status = KBrsrSuccess; - - /* for convenience */ - list = (CLmgrPropertyList*)(thisObj->map); - - for( i = 0; i < list->Count(); i++) - { - CLmgrPropertyEntry* entry = list->At(i); - NW_ASSERT(entry != NULL); - - if ((entry->iEntry.type & NW_CSS_ValueType_Mask) >= NW_CSS_ValueType_Object) - { - entry->iEntry.type |= NW_CSS_ValueType_Copy; - } - - status = NW_LMgr_PropertyList_Set (destination, entry->iPropName, &(entry->iEntry)); - NW_ASSERT (status == KBrsrSuccess); - } - // copy cached properties - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - // - for( i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - CLmgrPropertyEntry* entry = cachedList[ i ]; - - if( entry ) - { - if ((entry->iEntry.type & NW_CSS_ValueType_Mask) >= NW_CSS_ValueType_Object) - { - entry->iEntry.type |= NW_CSS_ValueType_Copy; - } - status = NW_LMgr_PropertyList_Set( destination, entry->iPropName, &(entry->iEntry) ); - NW_ASSERT( status == KBrsrSuccess ); - } - } - return status; -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TInt -NW_LMgr_SimplePropertyList_Count (const NW_LMgr_SimplePropertyList_t* thisObj) - { - TInt count; - CLmgrPropertyList* list; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_LMgr_SimplePropertyList_Class)); - NW_ASSERT (thisObj->map != NULL); - - /* for convenience */ - list = (CLmgrPropertyList*)(thisObj->map); - - count = (list) ? list->Count() : 0; - // - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - if( cachedList[ i ] ) - { - count++; - } - } - return count; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_SimplePropertyList_At (const NW_LMgr_SimplePropertyList_t* thisObj, - TInt index, - NW_LMgr_PropertyList_Entry_t* entry) - { - CLmgrPropertyList* list; - TBrowserStatusCode status = KBrsrFailure; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_LMgr_SimplePropertyList_Class)); - NW_ASSERT (entry != NULL); - NW_ASSERT (thisObj->map != NULL); - - TInt cacheCount = 0; - CLmgrPropertyEntry* listEntry; - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - // - if( entry ) - { - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - if( cachedList[ i ] ) - { - cacheCount++; - } - // - if( ( cacheCount - 1 ) == index ) - { - // - listEntry = cachedList[ i ]; - (void) NW_Mem_memcpy( entry, &(listEntry->iEntry), sizeof *entry); - return KBrsrSuccess; - } - } - /* for convenience */ - list = (CLmgrPropertyList*)(thisObj->map); - - /* use byte-wise copy to get the unaligned data into the client's variable */ - if( index < ( list->Count() + cacheCount ) ) - { - listEntry = list->At( index - cacheCount ); - NW_ASSERT(listEntry != NULL); - (void) NW_Mem_memcpy (entry, &(listEntry->iEntry), sizeof *entry); - status = KBrsrSuccess; - } - } - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_SimplePropertyList_GetNameAt (const NW_LMgr_SimplePropertyList_t* thisObj, - TInt index, - NW_LMgr_PropertyName_t* name) -{ - CLmgrPropertyList* list; - TBrowserStatusCode status = KBrsrFailure; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, - &NW_LMgr_SimplePropertyList_Class)); - NW_ASSERT (name != NULL); - NW_ASSERT (thisObj->map != NULL); - - TInt cacheCount = 0; - CLmgrPropertyEntry* listEntry; - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - // - if( name ) - { - for( TInt i = 0; i < NW_CSS_CachedProperty_Num; i++ ) - { - if( cachedList[ i ] ) - { - cacheCount++; - } - // - if( ( cacheCount - 1 ) == index ) - { - // - listEntry = cachedList[ i ]; - *name = listEntry->iPropName; - return KBrsrSuccess; - } - } - /* for convenience */ - list = (CLmgrPropertyList*)(thisObj->map); - - /* use byte-wise copy to get the unaligned data into the client's variable */ - if( index < ( list->Count() + cacheCount ) ) - { - listEntry = list->At( index - cacheCount ); - NW_ASSERT(listEntry != NULL); - *name = listEntry->iPropName; - status = KBrsrSuccess; - } - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_SimplePropertyList_CopyEntireList(NW_LMgr_SimplePropertyList_t* aOldPropList, - NW_LMgr_SimplePropertyList_t** aNewPropList) - { - // this function does not support cached properties yet - NW_LMgr_SimplePropertyList_t* newPropertyList = NULL; - - NW_TRY( status ) - { - if( aOldPropList ) - { - TInt i; - newPropertyList = NW_LMgr_SimplePropertyList_New( 2, 2 ); - NW_THROW_OOM_ON_NULL( newPropertyList, status ); - - // loop through and copy individual properties - TInt count = NW_LMgr_SimplePropertyList_Count( aOldPropList ); - for( i = 0; i < count; i++) - { - NW_LMgr_PropertyName_t key; - NW_LMgr_PropertyList_Entry_t entry; - - status = NW_LMgr_SimplePropertyList_GetNameAt(aOldPropList, i, &key); - if (status == KBrsrSuccess) - { - // get the text property name - (void)TCSSPropertyTable::GetPropEntryByToken(key); - - status = NW_LMgr_PropertyList_Get (aOldPropList, key, &entry); - - if ((entry.type & NW_CSS_ValueType_Mask) >= NW_CSS_ValueType_Object) - { - entry.type |= NW_CSS_ValueType_Copy; - } - - // Only print property if status == success - if (status == KBrsrSuccess) - { - status = NW_LMgr_PropertyList_Set (newPropertyList, key, &entry); - NW_THROW_ON_ERROR (status); - } - } - } - } - *aNewPropList = newPropertyList; - } - NW_CATCH (status) - { - if (newPropertyList) - { - NW_Object_Delete(newPropertyList); - } - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_SimplePropertyList_MapLookup( NW_LMgr_SimplePropertyList_t* thisObj, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry ) - { - /* fetch a pointer to the value from the map */ - CLmgrPropertyEntry tempEntry; - CLmgrPropertyEntry* listEntry = NULL; - // - if( NW_LMgr_SimplePropertyList_IsCachedEntry( key ) ) - { - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - // cached property - key = (NW_LMgr_PropertyName_t)( key > NW_CSS_PropInherit ? ( key - NW_CSS_PropInherit ) : key ); - - listEntry = cachedList[ key - 1 ]; - if( !listEntry ) - { - return KBrsrNotFound; - } - } - else - { - CLmgrPropertyList* list; - tempEntry.iPropName = key; - TInt index; - TNumKeyArrayPtr matchkey(_FOFF(CLmgrPropertyEntry, iPropName), ECmpTUint16); - list = (CLmgrPropertyList*)(thisObj->map); - - if (list->FindIsq(&tempEntry, matchkey, index) != 0) - { - return KBrsrNotFound; - } - listEntry = list->At(index); - } - - /* use byte-wise copy to get the unaligned data into the client's variable */ - NW_ASSERT(listEntry != NULL); - (void) NW_Mem_memcpy (entry, &(listEntry->iEntry), sizeof *entry); - tempEntry.iEntry.value.object = 0; - - /* successful completion */ - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_LMgr_SimplePropertyList_RemoveWithoutDelete (NW_LMgr_SimplePropertyList_t* thisObj, - NW_LMgr_PropertyName_t key ) -{ - CLmgrPropertyList* list; - - /* for convenience */ - list = (CLmgrPropertyList*)(thisObj->map); - - if( NW_LMgr_SimplePropertyList_IsCachedEntry( key ) ) - { - CLmgrPropertyEntry** cachedList = (CLmgrPropertyEntry**)(thisObj->iCachedProperty); - key = (NW_LMgr_PropertyName_t)( key > NW_CSS_PropInherit ? ( key - NW_CSS_PropInherit ) : key ); - // remove property - delete cachedList[ key - 1 ]; - cachedList[ key - 1 ] = NULL; - } - else - { - /* remove the property */ - CLmgrPropertyEntry newEntry; - newEntry.iPropName = key; - TInt index; - TNumKeyArrayPtr matchkey(_FOFF(CLmgrPropertyEntry, iPropName), ECmpTUint16); - if (list->FindIsq(&newEntry, matchkey, index) == 0) - { - list->Delete(index); - list->Compress(); - } - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_SimplePropertyList_t* -NW_LMgr_SimplePropertyList_New (NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment) -{ - return (NW_LMgr_SimplePropertyList_t*) - NW_Object_New (&NW_LMgr_SimplePropertyList_Class, - sizeof (NW_LMgr_PropertyName_t), (NW_Uint32)capacity, (NW_Uint32)increment); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/TableCell_BoxFormat.cpp --- a/webengine/wmlengine/src/lmgr/src/TableCell_BoxFormat.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Description : The class handles formatting of the table cells and rows -* -*/ - - -#include "BoxFormat.h" - -TBrowserStatusCode -TLMgr_StaticCell_Box_Formatter::NW_LMgr_BidiFlowBox_Float(NW_LMgr_Box_t* flow, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* context) -{ - NW_ASSERT(box); - NW_ASSERT(context); - NW_REQUIRED_PARAM(flow); - - NW_ADT_DynamicVector_t *pendingFloats = context->pendingFloats; - NW_ADT_DynamicVector_t *placedFloats = context->pendingFloats; - - - /* If the float context is not set, remove the box */ - if (pendingFloats == NULL || placedFloats == NULL) { - return KBrsrFailure; - } - - if (NW_ADT_DynamicVector_InsertAt(pendingFloats, &box, NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - // we do not handle floating in cell. - return KBrsrFailure; - -} - -TBrowserStatusCode -TLMgr_StaticCell_Box_Formatter::NW_LMgr_BidiFlowBox_NewLine(NW_LMgr_Box_t* flow, - NW_LMgr_FormatContext_t* context, - NW_GDI_Metric_t delta, - NW_Bool indentNewLine) -{ - NW_ASSERT(flow); - NW_ASSERT(context); - NW_REQUIRED_PARAM(indentNewLine); - - NW_TRY(status) { - - /* Flush the current line */ - status = NW_LMgr_BidiFlowBox_Flush(flow, context, NW_FALSE); - _NW_THROW_ON_ERROR(status); - - /* Add the delta */ - context->y = (NW_GDI_Metric_t)(context->y + delta); - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( NW_LMgr_BoxOf(flow) ); - boxBounds.dimension.height = (NW_GDI_Metric_t) - (boxBounds.dimension.height + delta); - NW_LMgr_Box_SetFormatBounds( NW_LMgr_BoxOf( flow ), boxBounds ); - - /* Reset the whitespace flag */ - context->pendingWhitespace = NW_FALSE; - - /* Update the context */ - context->lineStart = NW_LMgr_FlowBox_GetLineStart(flow, context, - context->y); - context->lineEnd = NW_LMgr_FlowBox_GetLineEnd(flow, context, context->y); - if (context->direction == NW_GDI_FlowDirection_LeftRight) { - context->x = (NW_GDI_Metric_t)(context->lineStart - + NW_LMgr_FlowBox_GetIndentation(flow, - context)); - } - else { - context->x = (NW_GDI_Metric_t)(context->lineEnd - - NW_LMgr_FlowBox_GetIndentation(flow, - context)); - } - - } - NW_CATCH(status) { - } - NW_FINALLY { - return status; - } - NW_END_TRY -} - -TBrowserStatusCode -TLMgr_StaticCell_Box_Formatter::NW_LMgr_FlowBox_FormatBox(NW_LMgr_Box_t* /*parentFormatBox*/, - NW_LMgr_Box_t* box, - NW_LMgr_FormatContext_t* parentContext) - { - NW_ASSERT(box); - NW_ASSERT(parentContext); - - return NW_LMgr_Box_Resize(box, parentContext); - } - - -TBrowserStatusCode -TLMgr_StaticCell_Box_Formatter::NW_LMgr_FlowBox_PostFormatBox(NW_LMgr_Box_t* /*parentFormatBox*/, - NW_LMgr_Box_t* /*box*/, - NW_LMgr_FormatContext_t* /*parentContext*/) - { - return KBrsrSuccess; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/lmgr/src/TransientPropertyList.c --- a/webengine/wmlengine/src/lmgr/src/TransientPropertyList.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,243 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_lmgr_transientpropertylisti.h" -#include "nw_adt_resizablevector.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -const NW_Uint16 initialMapSize = 10; -const NW_Uint16 incrementalMapSizeIncrease = 10; - -/* ------------------------------------------------------------------------- */ -const NW_LMgr_TransientPropertyList_Class_t NW_LMgr_TransientPropertyList_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_PropertyList_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_LMgr_TransientPropertyList_t), - /* construct */ _NW_LMgr_TransientPropertyList_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_PropertyList */ - /* get */ _NW_LMgr_TransientPropertyList_Get, - /* set */ _NW_LMgr_SimplePropertyList_Set, - /* set */ _NW_LMgr_TransientPropertyList_Remove, - /* clone */ _NW_LMgr_TransientPropertyList_Clone, - /* clear */ _NW_LMgr_TransientPropertyList_Clear - }, - { /* NW_LMgr_SimplePropertyList */ - /* unused */ NW_Object_Unused - }, - { /* NW_LMgr_TransientPropertyList */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - TBrowserStatusCode status; - NW_LMgr_TransientPropertyList_t* thisObj; - - /* invoke our superclass constructor */ - status = _NW_LMgr_SimplePropertyList_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_LMgr_TransientPropertyList_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_LMgr_TransientPropertyListOf (dynamicObject); - - /* initialize the member variables */ - thisObj->basePropertyList = va_arg (*argp, NW_LMgr_PropertyList_t*); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj->basePropertyList, - &NW_LMgr_PropertyList_Class)); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Get (const NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key, - NW_LMgr_PropertyList_Entry_t* entry) -{ - TBrowserStatusCode status; - NW_LMgr_PropertyList_Entry_t buffer; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_TransientPropertyList_Class)); - - /* call our superclass method to find the property on the local list */ - status = _NW_LMgr_SimplePropertyList_Get (propertyList, key, &buffer); - if (status == KBrsrSuccess) { - /* if the type of the entry is set to zero, it really should be - interpreted as a tag showing that the entry has been removed */ - if (buffer.type == 0) { - return KBrsrNotFound; - } - - /* copy the entry from the buffer and return */ - *entry = buffer; - return KBrsrSuccess; - } - - /* the property was not present on our local property list, so we must query - the base list */ - propertyList = - NW_LMgr_TransientPropertyList_GetBasePropertyList (propertyList); - return NW_LMgr_PropertyList_Get (propertyList, key, entry); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Remove (NW_LMgr_PropertyList_t* propertyList, - NW_LMgr_PropertyName_t key) -{ - TBrowserStatusCode status2; - NW_LMgr_PropertyList_Entry_t entry; - TBrowserStatusCode status1; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_TransientPropertyList_Class)); - - /* check whether the property is set on our base property list - this is - done ahead of the rest of the code to deal with errors in a sensible - way */ - status2 = NW_LMgr_PropertyList_Get (propertyList, key, &entry); - if (status2 != KBrsrSuccess && status2 != KBrsrNotFound) { - return status2; - } - - /* if the property is set on the local property list, we remove it */ - status1 = _NW_LMgr_SimplePropertyList_Remove (propertyList, key); - if (status1 != KBrsrSuccess && status1 != KBrsrNotFound) { - return status1; - } - - /* we are done if the property is not set on our base property list */ - if (status2 == KBrsrNotFound) { - return status1; - } - - /* if we get this far, its because the property was removed from the local - property list, but it still exists on the base property list - we - therefore need to 'tag' the property as having been deleted */ - (void) NW_Mem_memset (&entry, 0, sizeof (entry)); - status2 = _NW_LMgr_SimplePropertyList_Set (propertyList, key, &entry); - if (status2 != KBrsrSuccess) { - return status2; - } - - return status1; -} - -/* ------------------------------------------------------------------------- */ -NW_LMgr_PropertyList_t* -_NW_LMgr_TransientPropertyList_Clone (const NW_LMgr_PropertyList_t* propertyList) -{ - NW_LMgr_TransientPropertyList_t* thisObj; - NW_LMgr_PropertyList_t* basePropertyList; - NW_LMgr_PropertyList_t* newPropertyList; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_TransientPropertyList_Class)); - - /* for convenience */ - thisObj = NW_LMgr_TransientPropertyListOf (propertyList); - - /* clone the base property list */ - basePropertyList = NULL; - if (thisObj->basePropertyList != NULL) { - basePropertyList = NW_LMgr_PropertyList_Clone (thisObj->basePropertyList); - if (basePropertyList == NULL) { - return NULL; - } - } - - /* instantiate a new TransientPropertyList object */ - newPropertyList = (NW_LMgr_PropertyList_t*) - NW_LMgr_TransientPropertyList_New (initialMapSize, - incrementalMapSizeIncrease, - basePropertyList); - if (newPropertyList == NULL) { - NW_Object_Delete (basePropertyList); - return NULL; - } - - /* copy the property entries */ - status = NW_LMgr_SimplePropertyList_Copy (propertyList, newPropertyList); - if (status != KBrsrSuccess) { - NW_Object_Delete (newPropertyList); - return NULL; - } - - /* successful completion */ - return newPropertyList; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_LMgr_TransientPropertyList_Clear (NW_LMgr_PropertyList_t* propertyList) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (propertyList, - &NW_LMgr_TransientPropertyList_Class)); - - propertyList = NW_LMgr_TransientPropertyList_GetBasePropertyList (propertyList); - return NW_LMgr_PropertyList_Clear (propertyList); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_TransientPropertyList_t* -NW_LMgr_TransientPropertyList_New (NW_ADT_Vector_Metric_t capacity, - NW_ADT_Vector_Metric_t increment, - NW_LMgr_PropertyList_t* basePropertyList) -{ - return (NW_LMgr_TransientPropertyList_t*) - NW_Object_New (&NW_LMgr_TransientPropertyList_Class, capacity, increment, - basePropertyList); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/NW_Markup_EXPORT.h --- a/webengine/wmlengine/src/markup/include/NW_Markup_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_EXPORT_h_ -#define _NW_Markup_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_MARKUP_EXPORT -#ifdef NW_IMPORT -#define NW_MARKUP_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_MARKUP_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_MARKUP_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/WalletWrapper.h --- a/webengine/wmlengine/src/markup/include/WalletWrapper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CWalletWrapper. -* -* -*/ - - -#ifndef WALLET_WRAPPER_H -#define WALLET_WRAPPER_H - -// INCLUDES -#include <e32base.h> - -#ifdef __WALLET -#include <WalletBrowserObserver.h> -#endif - - -typedef enum -{ - WALLET_XHTML_FILL_ALL, - WALLET_XHTML_FILL_ONE, - WALLET_XHTML_FILL_CLOSED, -}Wallet_XHTML_FillOption; - -typedef enum -{ - WALLET_XHTML_FAILURE, - WALLET_XHTML_SUCCESS, - WALLET_XHTML_OUT_OF_MEMORY, - WALLET_XHTML_UNEXPECTED_ERROR, - WALLET_XHTML_BAD_INPUT_PARAM -}WALLET_XHTML_Status_t; - - -// FORWARD DECLARATION -class CBrCtl; - - -/** -* -* wallet wrapper handling whole wallet realted function -* -* @lib Browserengine.lib -* @since Series 60 2.0 -*/ -class CWalletWrapper : - public CBase -#ifdef __WALLET - , - public MWalletObserver -#endif - { - /* - * Wallet status - */ - enum TWalletStatus - { - EWalletCreated = 0, ///< Wallet already crated - EEWalletNotExist = -1 ///< wallet already not created. - }; - /* - * Wallet tpye - */ - enum WalletType - { - EEcmlNo, ///< No conatin any ecml filed - EEcml ///< Conatin ecml filed - }; - - public: // construction - - /** - * Two-phased constructor. Leaves on failure. - * @return The constructed model - */ - static CWalletWrapper* NewL( CBrCtl* aParent); - - /** - * Destructor. - */ - virtual ~CWalletWrapper(); - - protected: // construction - - /** - * Constructor. - */ - CWalletWrapper( CBrCtl* aParent); - - /** - * Second phase constructor. Leaves on failure. - */ - void ConstructL(); - - public: // used to deriving from MKimonoWalletWrapper - - TBool WalletUI_VisibleCloseWallet(); - WALLET_XHTML_Status_t WalletFetch_Start( WALLET_XHTML_Status_t (callback) - (Wallet_XHTML_FillOption, TUint16*, void*), - TUint16* header, - TBool ecml_exists, - void* context); - void WalletFetch_CloseWallet( TBool end_pressed ); - WALLET_XHTML_Status_t WalletFetch_GetData( TUint16* field_name, - TUint16** field_value, - TBool none_filled); - WALLET_XHTML_Status_t (*iWalletCallback) (Wallet_XHTML_FillOption, TUint16*, void*); - - public: // from kimone TSK - - /** - * wallet already crated or not - * @since Series 60 2.0 - * @param - - * @return TBool wallet status - */ - TBool ValletIsCreated(); - - /** - * called when user press use wallet in the browser view - * @since Series 60 2.0 - * @param - - * @return - - */ - void CmdUseWalletInfoL( ); - - /** - * called when user press close wallet in the browser view - * @since Series 60 2.0 - * @param - - * @return TBool vallet status - */ - void CmdCloseWalletL( ); - - /** - * assyncron wallet destroyer - * @since Series 60 2.0 - * @param aWrapper pointer to the CWalletWrapper - * @return TInt callback int value - */ - static TInt DestroyWalletL( TAny* aWrapper ); - - /** - * Asyncronous close for wallet on browser exit. - * @since Series 60 2.0 - * @param aWait pointer to CActiveSchedulerWait - */ - void CmdCloseWalletOnExitL ( TAny* aWait ); - - - public: // From MWalletObserver - - /** - * vallet Handle the wallet messages - * @since Series 60 2.0 - * @param aOperationId wallet operation id - * @param aData wallet data - * @return - - */ -#ifdef __WALLET - void HandleWalletMessageL( enum TWalletOperationId aOperationId, TAny* aData); -#endif - -private: // data -#ifdef __WALLET - MBrowserObserver *iWallet; ///< not owned handled by function -#endif - - TWalletStatus iWalletStatus; ///< wallet status - WalletType iWalletType; ///< wallet type - TAny* iContext; - HBufC *iWalletInfoBuffer; - CBrCtl *iBrCtl; // not owned - CIdle* iAsyncCallBack; ///< asincron desroyer callback - TBool iFillingFaliure; - TAny* iActiveWait; - }; - -#endif - -// End of file \ No newline at end of file diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_elementhandler.h --- a/webengine/wmlengine/src/markup/include/nw_markup_elementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_ELEMENTHANDLER_H -#define NW_MARKUP_ELEMENTHANDLER_H - -#include "nw_object_base.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_activebox.h" -#include "nw_dom_node.h" -#include "NW_Markup_EXPORT.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_ElementHandler_Class_s NW_Markup_ElementHandler_Class_t; -typedef struct NW_Markup_ElementHandler_s NW_Markup_ElementHandler_t; - -typedef struct NW_Markup_ContentHandler_s NW_Markup_ContentHandler_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Markup_ElementHandler_Initialize_t) (const NW_Markup_ElementHandler_t* elementHandler, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -typedef -TBrowserStatusCode -(*NW_Markup_ElementHandler_CreateBoxTree_t) (const NW_Markup_ElementHandler_t* elementHandler, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -typedef -NW_Uint8 -(*NW_Markup_ElementHandler_ProcessEvent_t) (const NW_Markup_ElementHandler_t* elementHandler, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_ElementHandler_ClassPart_s { - NW_Markup_ElementHandler_Initialize_t initialize; - NW_Markup_ElementHandler_CreateBoxTree_t createBoxTree; - NW_Markup_ElementHandler_ProcessEvent_t processEvent; -} NW_Markup_ElementHandler_ClassPart_t; - -struct NW_Markup_ElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_ElementHandler_ClassPart_t NW_Markup_ElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_ElementHandler_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_ElementHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_ElementHandler)) - -#define NW_Markup_ElementHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_ElementHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_ElementHandler_Class_t NW_Markup_ElementHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Markup_ElementHandler_Initialize(_elementHandler, _contentHandler, _elementNode) \ - (NW_Markup_ElementHandler_GetClassPart (_elementHandler).\ - initialize ((_elementHandler), (_contentHandler), (_elementNode))) - -#define NW_Markup_ElementHandler_CreateBoxTree(_elementHandler, _contentHandler, _elementNode, _parentBox) \ - (NW_Markup_ElementHandler_GetClassPart (_elementHandler).\ - createBoxTree ((_elementHandler), (_contentHandler), (_elementNode), \ - (_parentBox))) - -#define NW_Markup_ElementHandler_ProcessEvent(_elementHandler, _contentHandler, _elementNode, _activeBox, _event) \ - (NW_Markup_ElementHandler_GetClassPart (_elementHandler).\ - processEvent ((_elementHandler), (_contentHandler), (_elementNode), \ - (_activeBox), (_event))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_ELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_elementhandleri.h --- a/webengine/wmlengine/src/markup/include/nw_markup_elementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_ELEMENTHANDLERI_H -#define NW_MARKUP_ELEMENTHANDLERI_H - -#include "nw_object_basei.h" -#include "nw_markup_elementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_ElementHandler_Initialize (const NW_Markup_ElementHandler_t* thisObj, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_ElementHandler_CreateBoxTree (const NW_Markup_ElementHandler_t* thisObj, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -NW_MARKUP_EXPORT -NW_Uint8 -_NW_Markup_ElementHandler_ProcessEvent (const NW_Markup_ElementHandler_t* elementHandler, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_ELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_formfiller.h --- a/webengine/wmlengine/src/markup/include/nw_markup_formfiller.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_FormFiller_h_ -#define _NW_Markup_FormFiller_h_ - -#include "NW_Markup_EXPORT.h" -#include "nw_object_aggregate.h" -#include "nw_hed_iformfiller.h" -#include "nw_lmgr_box.h" -#include "LMgrBoxTreeListener.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_FormFiller_Class_s NW_Markup_FormFiller_Class_t; -typedef struct NW_Markup_FormFiller_s NW_Markup_FormFiller_t; - -/* ------------------------------------------------------------------------- * - virtual method type definition(s) - * ------------------------------------------------------------------------- */ -typedef -NW_LMgr_Box_t* -(*NW_Markup_FormFiller_GetBoxTree_t) (NW_Markup_FormFiller_t* formFiller); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_FormFiller_ClassPart_s { - NW_Markup_FormFiller_GetBoxTree_t getBoxTree; -} NW_Markup_FormFiller_ClassPart_t; - -struct NW_Markup_FormFiller_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; - NW_Markup_FormFiller_ClassPart_t NW_Markup_FormFiller; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_FormFiller_s { - NW_Object_Aggregate_t super; - - /* interface implementation(s) */ - NW_HED_IFormFiller_t NW_HED_IFormFiller; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_FormFiller_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_FormFiller)) - -#define NW_Markup_FormFillerOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_FormFiller)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -NW_MARKUP_EXPORT -TBrowserStatusCode -NW_Markup_FormFiller_MapFromWalletStatus(WALLET_XHTML_Status_t walletStatus); - -NW_MARKUP_EXPORT -WALLET_XHTML_Status_t -NW_Markup_FormFiller_MapToWalletStatus(TBrowserStatusCode status); - -NW_MARKUP_EXPORT -NW_Bool -NW_Markup_FormFiller_IsFormFillerBox(NW_LMgr_Box_t* box); - -NW_MARKUP_EXPORT -NW_LMgr_Box_t* -NW_Markup_FormFiller_GetInFocusBox(NW_HED_IFormFiller_t* formFiller, - const MBoxTreeListener* boxTreeListener, - NW_Ucs2** title); - -NW_MARKUP_EXPORT -NW_Bool -NW_Markup_FormFiller_VisibleCloseWallet(void); - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_FormFiller_Class_t NW_Markup_FormFiller_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_FormFiller_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_formfilleri.h --- a/webengine/wmlengine/src/markup/include/nw_markup_formfilleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2002 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_FormFillerI_h_ -#define _NW_Markup_FormFillerI_h_ - -#include "nw_object_aggregatei.h" -#include "nw_hed_iformfilleri.h" -#include "nw_markup_formfiller.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Object_Class_t* const _NW_Markup_FormFiller_SecondaryList[]; -NW_MARKUP_EXPORT const NW_HED_IFormFiller_Class_t NW_Markup_FormFiller_IFormFiller_Class; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_MARKUP_EXPORT -NW_Bool -_NW_Markup_FormFiller_IFormFiller_ECMLExists (NW_HED_IFormFiller_t* formFiller); - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_FormFiller_IFormFiller_FillAll (NW_HED_IFormFiller_t* formFiller, - NW_LMgr_Box_t** firstNotFilled); - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_FormFiller_IFormFiller_FillOne (NW_HED_IFormFiller_t* formFiller, - NW_Uint16 *value, NW_LMgr_Box_t* node); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Markup_FormFiller_GetBoxTree(_formFiller) \ - (NW_Object_Invoke (_formFiller, NW_Markup_FormFiller, getBoxTree) ( \ - NW_Markup_FormFillerOf (_formFiller))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_FormFillerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_imageviewer.h --- a/webengine/wmlengine/src/markup/include/nw_markup_imageviewer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_ImageViewer_h_ -#define _NW_Markup_ImageViewer_h_ - -#include "NW_Markup_EXPORT.h" -#include "nw_object_aggregate.h" -#include "nw_hed_iimageviewer.h" -#include "nw_lmgr_box.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_ImageViewer_Class_s NW_Markup_ImageViewer_Class_t; -typedef struct NW_Markup_ImageViewer_s NW_Markup_ImageViewer_t; - -/* ------------------------------------------------------------------------- * - virtual method type definition(s) - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Markup_ImageViewer_LoadImage_t) (NW_Markup_ImageViewer_t* imageViewer); - -typedef -NW_Bool -(*NW_Markup_ImageViewer_IsNoSave_t) (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -typedef -NW_Ucs2* -(*NW_Markup_ImageViewer_GetAltText_t) (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_ImageViewer_ClassPart_s { - NW_Markup_ImageViewer_LoadImage_t loadImage; - NW_Markup_ImageViewer_IsNoSave_t isNoSave; - NW_Markup_ImageViewer_GetAltText_t getAltText; -} NW_Markup_ImageViewer_ClassPart_t; - -struct NW_Markup_ImageViewer_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; - NW_Markup_ImageViewer_ClassPart_t NW_Markup_ImageViewer; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_ImageViewer_s { - NW_Object_Aggregate_t super; - - /* interface implementation(s) */ - NW_HED_IImageViewer_t NW_HED_IImageViewer; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_ImageViewer_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_ImageViewer)) - -#define NW_Markup_ImageViewerOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_ImageViewer)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_ImageViewer_Class_t NW_Markup_ImageViewer_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_ImageViewer_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_imagevieweri.h --- a/webengine/wmlengine/src/markup/include/nw_markup_imagevieweri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_ImageViewerI_h_ -#define _NW_Markup_ImageViewerI_h_ - -#include "nw_object_aggregatei.h" -#include "nw_hed_iimagevieweri.h" -#include "nw_markup_imageviewer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Object_Class_t* const _NW_Markup_ImageViewer_SecondaryList[]; -NW_MARKUP_EXPORT const NW_HED_IImageViewer_Class_t NW_Markup_ImageViewer_IImageViewer_Class; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - - @method: NW_Markup_ImageViewer_Collect - - @synopsis: Returns all text strings the may contain phone numbers. - - @scope: public - @access: implementation - - @parameters: - [in, out] NW_ADT_DynamicVector_t* dynamicVector - The dynamic vector into which all the phone numbers will be - placed. This is a vector of NW_Text_t*. - - @description: The function traverses the box tree, looks inside text and - input boxes and makes text objects. The function attaches - all created text objects to the dynamic vector. It is the caller's - responsibility to free the text objects. - - Text from Password type input boxes is not passed to the caller. - - Note that although the name of the function is ImageViewer - it in fact collects all text strings. The function can be - improved by introducing an algorithm of extructing numbers or - only strings that have numbers. - - @returns: TBrowserStatusCode - [KBrsrSuccess] - Successful completion. - - [KBrsrOutOfMemory] - An unrecoverable out of memory condition was reached. - - [KBrsrUnexpectedError] - An unexpected, unrecoverable and/or unhandled error was - encountered. Although the method will attempt to return - without disrupting the state of the system, this can not be - guaranteed. - ** ----------------------------------------------------------------------- **/ -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_ImageViewer_IImageViewer_GetImage (NW_HED_IImageViewer_t* imageViewer, - NW_ADT_DynamicVector_t* dynamicVector); - - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_ImageViewer_IImageViewer_ShowImages (NW_HED_IImageViewer_t* imageViewer); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Markup_ImageViewer_LoadImage(_imageViewer) \ - (NW_Object_Invoke (_imageViewer, NW_Markup_ImageViewer, loadImage) ( \ - NW_Markup_ImageViewerOf (_imageViewer))) - -#define NW_Markup_ImageViewer_IsNoSave(_imageViewer, _imageBox) \ - (NW_Object_Invoke (_imageViewer, NW_Markup_ImageViewer, isNoSave) ( \ - NW_Markup_ImageViewerOf (_imageViewer), NW_LMgr_BoxOf(_imageBox))) - -#define NW_Markup_ImageViewer_GetAltText(_imageViewer, _imageBox) \ - (NW_Object_Invoke (_imageViewer, NW_Markup_ImageViewer, getAltText) ( \ - NW_Markup_ImageViewerOf (_imageViewer), NW_LMgr_BoxOf(_imageBox))) - -/* #define NW_Markup_ImageViewer_BoxIsValid(_numberCollector, _box) \ - (NW_Object_Invoke (_numberCollector, NW_Markup_ImageViewer, boxIsValid) ( \ - NW_Markup_ImageViewerOf (_numberCollector), NW_LMgr_BoxOf (_box)))*/ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_ImageViewerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_module.h --- a/webengine/wmlengine/src/markup/include/nw_markup_module.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_MODULE_H -#define NW_MARKUP_MODULE_H - -#include "nw_object_base.h" -#include "nw_markup_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_Module_Class_s NW_Markup_Module_Class_t; -typedef struct NW_Markup_Module_s NW_Markup_Module_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -NW_Markup_ElementHandler_t* -(*NW_Markup_Module_GetElementHandler_t) (const NW_Markup_Module_t* module, - const NW_DOM_ElementNode_t* domElement); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_Module_ClassPart_s { - NW_Markup_Module_GetElementHandler_t getElementHandler; -} NW_Markup_Module_ClassPart_t; - -struct NW_Markup_Module_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_Module_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_Module_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_Module)) - -#define NW_Markup_ModuleOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_Module)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_Module_Class_t NW_Markup_Module_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Markup_Module_GetElementHandler(module, domElement) \ - (NW_Markup_Module_GetClassPart (module).\ - getElementHandler ((module), (domElement))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_MODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_modulei.h --- a/webengine/wmlengine/src/markup/include/nw_markup_modulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_MODULEI_H -#define NW_MARKUP_MODULEI_H - -#include "nw_object_basei.h" -#include "nw_markup_module.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_Markup_Module_ElementHandlerEntry_s -{ - NW_Uint16 tagToken; - NW_Markup_ElementHandler_t* elementHandler; -}; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_MODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_numbercollector.h --- a/webengine/wmlengine/src/markup/include/nw_markup_numbercollector.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_NumberCollector_h_ -#define _NW_Markup_NumberCollector_h_ - -#include "NW_Markup_EXPORT.h" -#include "nw_object_aggregate.h" -#include "nw_hed_inumbercollector.h" -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_NumberCollector_Class_s NW_Markup_NumberCollector_Class_t; -typedef struct NW_Markup_NumberCollector_s NW_Markup_NumberCollector_t; - -/* ------------------------------------------------------------------------- * - virtual method type definition(s) - * ------------------------------------------------------------------------- */ -typedef -NW_LMgr_Box_t* -(*NW_Markup_NumberCollector_GetBoxTree_t) (NW_Markup_NumberCollector_t* numberCollector); - -typedef -NW_Text_t* -(*NW_Markup_NumberCollector_GetHrefAttr_t) (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -typedef -NW_Text_t* -(*NW_Markup_NumberCollector_GetAltAttr_t) (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -typedef -NW_Bool -(*NW_Markup_NumberCollector_BoxIsValid_t) (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_NumberCollector_ClassPart_s { - NW_Markup_NumberCollector_GetBoxTree_t getBoxTree; - NW_Markup_NumberCollector_BoxIsValid_t boxIsValid; - NW_Markup_NumberCollector_GetHrefAttr_t getHrefAttr; - NW_Markup_NumberCollector_GetAltAttr_t getAltAttr; -} NW_Markup_NumberCollector_ClassPart_t; - -struct NW_Markup_NumberCollector_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; - NW_Markup_NumberCollector_ClassPart_t NW_Markup_NumberCollector; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_NumberCollector_s { - NW_Object_Aggregate_t super; - - /* interface implementation(s) */ - NW_HED_INumberCollector_t NW_HED_INumberCollector; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_NumberCollector_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_NumberCollector)) - -#define NW_Markup_NumberCollectorOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_NumberCollector)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_NumberCollector_Class_t NW_Markup_NumberCollector_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_NumberCollector_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_numbercollectori.h --- a/webengine/wmlengine/src/markup/include/nw_markup_numbercollectori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Markup_NumberCollectorI_h_ -#define _NW_Markup_NumberCollectorI_h_ - -#include "nw_object_aggregatei.h" -#include "nw_hed_inumbercollectori.h" -#include "nw_markup_numbercollector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Object_Class_t* const _NW_Markup_NumberCollector_SecondaryList[]; -NW_MARKUP_EXPORT const NW_HED_INumberCollector_Class_t NW_Markup_NumberCollector_INumberCollector_Class; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - - @method: NW_Murkup_NumberCollector_Collect - - @synopsis: Returns all text strings the may contain phone numbers. - - @scope: public - @access: implementation - - @parameters: - [in, out] NW_ADT_DynamicVector_t* dynamicVector - The dynamic vector into which all the phone numbers will be - placed. This is a vector of NW_Text_t*. - - @description: The function traverses the box tree, looks inside text and - input boxes and makes text objects. The function attaches - all created text objects to the dynamic vector. It is the caller's - responsibility to free the text objects. - - Text from Password type input boxes is not passed to the caller. - - Note that although the name of the function is NumberCollector - it in fact collects all text strings. The function can be - improved by introducing an algorithm of extructing numbers or - only strings that have numbers. - - @returns: TBrowserStatusCode - [KBrsrSuccess] - Successful completion. - - [KBrsrOutOfMemory] - An unrecoverable out of memory condition was reached. - - [KBrsrUnexpectedError] - An unexpected, unrecoverable and/or unhandled error was - encountered. Although the method will attempt to return - without disrupting the state of the system, this can not be - guaranteed. - ** ----------------------------------------------------------------------- **/ -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_NumberCollector_INumberCollector_Collect (NW_HED_INumberCollector_t* numberCollector, - NW_ADT_DynamicVector_t* dynamicVector); - -NW_MARKUP_EXPORT -NW_Bool -_NW_Markup_NumberCollector_BoxIsValid (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Markup_NumberCollector_GetBoxTree(_numberCollector) \ - (NW_Object_Invoke (_numberCollector, NW_Markup_NumberCollector, getBoxTree) ( \ - NW_Markup_NumberCollectorOf (_numberCollector))) - -#define NW_Markup_NumberCollector_GetHrefAttr(_numberCollector, _box) \ - (NW_Object_Invoke (_numberCollector, NW_Markup_NumberCollector, getHrefAttr) ( \ - NW_Markup_NumberCollectorOf (_numberCollector), NW_LMgr_BoxOf (_box))) - -#define NW_Markup_NumberCollector_GetAltAttr(_numberCollector, _box) \ - (NW_Object_Invoke (_numberCollector, NW_Markup_NumberCollector, getAltAttr) ( \ - NW_Markup_NumberCollectorOf (_numberCollector), NW_LMgr_BoxOf (_box))) - -#define NW_Markup_NumberCollector_BoxIsValid(_numberCollector, _box) \ - (NW_Object_Invoke (_numberCollector, NW_Markup_NumberCollector, boxIsValid) ( \ - NW_Markup_NumberCollectorOf (_numberCollector), NW_LMgr_BoxOf (_box))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Markup_NumberCollectorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_wbxmlmodule.h --- a/webengine/wmlengine/src/markup/include/nw_markup_wbxmlmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_WBXMLMODULE_H -#define NW_MARKUP_WBXMLMODULE_H - -#include "nw_markup_module.h" -#include "nw_markup_elementhandler.h" -#include <stdarg.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_WBXMLModule_Class_s NW_Markup_WBXMLModule_Class_t; -typedef struct NW_Markup_WBXMLModule_s NW_Markup_WBXMLModule_t; - -typedef struct NW_Markup_WBXMLModule_ElementHandlerEntry_s NW_Markup_WBXMLModule_ElementHandlerEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_WBXMLModule_ClassPart_s { - NW_Uint32 numElementHandlers; - const NW_Markup_WBXMLModule_ElementHandlerEntry_t* elementHandlers; -} NW_Markup_WBXMLModule_ClassPart_t; - -struct NW_Markup_WBXMLModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_WBXMLModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_WBXMLModule_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_WBXMLModule)) - -#define NW_Markup_WBXMLModuleOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_WBXMLModule)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_WBXMLModule_Class_t NW_Markup_WBXMLModule_Class; - -NW_Markup_ElementHandler_t* -NW_Markup_WBXMLModule_GetHandler (const NW_Markup_Module_t* module, - NW_Uint16 tagToken); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_WBXMLMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_wbxmlmodulei.h --- a/webengine/wmlengine/src/markup/include/nw_markup_wbxmlmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_WBXMLMODULEI_H -#define NW_MARKUP_WBXMLMODULEI_H - -#include "nw_markup_modulei.h" -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_Markup_WBXMLModule_ElementHandlerEntry_s -{ - NW_Uint16 tagToken; - NW_Markup_ElementHandler_t* elementHandler; -}; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT -NW_Markup_ElementHandler_t* -_NW_Markup_WBXMLModule_GetElementHandler (const NW_Markup_Module_t* module, - const NW_DOM_ElementNode_t* domElement); - -/* ------------------------------------------------------------------------- * - protected convenience macros - * ------------------------------------------------------------------------- */ -#define NW_MARKUP_NUM_ELEMENT_HANDLERS(_module) \ - (sizeof (_NW_##_module##Module_ElementHandlers) \ - / sizeof (NW_Markup_WBXMLModule_ElementHandlerEntry_t)) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_WBXMLMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_wmlvalidator.h --- a/webengine/wmlengine/src/markup/include/nw_markup_wmlvalidator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_WMLVALIDATOR_H -#define NW_MARKUP_WMLVALIDATOR_H - -#include "NW_Text_Abstract.h" -#include "NW_FBox_Validator.h" -#include "NW_Markup_EXPORT.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_WmlValidator_Class_s NW_Markup_WmlValidator_Class_t; -typedef struct NW_Markup_WmlValidator_s NW_Markup_WmlValidator_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ - - /* ------------------------------------------------------------------------- * - class declaration - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_WmlValidator_ClassPart_s { - void** unused; -} NW_Markup_WmlValidator_ClassPart_t; - -struct NW_Markup_WmlValidator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_Validator_ClassPart_t NW_FBox_Validator; - NW_Markup_WmlValidator_ClassPart_t NW_Markup_WmlValidator; -}; - -/* ------------------------------------------------------------------------- * - object declaration - * ------------------------------------------------------------------------- */ -struct NW_Markup_WmlValidator_s { - NW_FBox_Validator_t super; - - /* member variables */ - const NW_Ucs2* formatUcs2; /* Necessary because need UCS2 to pass to ISA. */ - NW_FBox_Validator_Mode_t mode; - NW_FBox_Validator_EmptyOk_t emptyOk; - NW_Bool fullMatch; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_WmlValidator_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Markup_WmlValidator)) - -#define NW_Markup_WmlValidatorOf(object) \ - (NW_Object_Cast (object, NW_Markup_WmlValidator)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_WmlValidator_Class_t NW_Markup_WmlValidator_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT -NW_Markup_WmlValidator_t* -NW_Markup_WmlValidator_New (const NW_Text_t* format, - const NW_FBox_Validator_Mode_t mode, - const NW_FBox_Validator_EmptyOk_t emptyOk, - const NW_Bool fullMatch); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_MARKUP_WMLVALIDATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_wmlvalidatori.h --- a/webengine/wmlengine/src/markup/include/nw_markup_wmlvalidatori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_WMLVALIDATORI_H -#define NW_MARKUP_WMLVALIDATORI_H - -#include "NW_FBox_ValidatorI.h" -#include "nw_markup_wmlvalidator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_WmlValidator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_MARKUP_EXPORT -void -_NW_Markup_WmlValidator_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_WmlValidator_Validate(NW_FBox_Validator_t* validator, - const NW_Text_t* string); - -NW_MARKUP_EXPORT -TBrowserStatusCode -_NW_Markup_WmlValidator_GetFormat(NW_FBox_Validator_t* validator, - const NW_Ucs2** format, - NW_FBox_Validator_Mode_t* mode, - NW_FBox_Validator_EmptyOk_t* emptyOk); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_MARKUP_WMLVALIDATORI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_xmlmodule.h --- a/webengine/wmlengine/src/markup/include/nw_markup_xmlmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_XMLMODULE_H -#define NW_MARKUP_XMLMODULE_H - -#include "nw_markup_module.h" -#include "nw_markup_elementhandler.h" -#include <stdarg.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_XMLModule_Class_s NW_Markup_XMLModule_Class_t; -typedef struct NW_Markup_XMLModule_s NW_Markup_XMLModule_t; - -typedef struct NW_Markup_XMLModule_ElementHandlerEntry_s NW_Markup_XMLModule_ElementHandlerEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Markup_XMLModule_ClassPart_s { - NW_Uint32 numElementHandlers; - const NW_Markup_XMLModule_ElementHandlerEntry_t* elementHandlers; -} NW_Markup_XMLModule_ClassPart_t; - -struct NW_Markup_XMLModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_XMLModule_ClassPart_t NW_Markup_XMLModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Markup_XMLModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Markup_XMLModule_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_Markup_XMLModule)) - -#define NW_Markup_XMLModuleOf(_object) \ - (NW_Object_Cast (_object, NW_Markup_XMLModule)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT const NW_Markup_XMLModule_Class_t NW_Markup_XMLModule_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_XMLMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/include/nw_markup_xmlmodulei.h --- a/webengine/wmlengine/src/markup/include/nw_markup_xmlmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_MARKUP_XMLMODULEI_H -#define NW_MARKUP_XMLMODULEI_H - -#include "nw_markup_modulei.h" -#include "nw_markup_xmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -struct NW_Markup_XMLModule_ElementHandlerEntry_s -{ - const NW_Ucs2* tagName; - NW_Markup_ElementHandler_t* elementHandler; -}; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -NW_MARKUP_EXPORT -NW_Markup_ElementHandler_t* -_NW_Markup_XMLModule_GetElementHandler (const NW_Markup_Module_t* module, - const NW_DOM_ElementNode_t* domElement); - -/* ------------------------------------------------------------------------- * - protected convenience macros - * ------------------------------------------------------------------------- */ -#define NW_MARKUP_NUM_ELEMENT_HANDLERS(_module) \ - (sizeof (_NW_##_module##Module_ElementHandlers) \ - / sizeof (NW_Markup_XMLModule_ElementHandlerEntry_t)) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_MARKUP_XMLMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPElementHandler.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_markup_elementhandleri.h" -#include "BrsrStatusCodes.h" - -/* -------------------------------------------------------------------------- * - class definition - * ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_ElementHandler_Class_t NW_Markup_ElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Markup_ElementHandler */ - /* initialize */ _NW_Markup_ElementHandler_Initialize, - /* createBoxTree */ _NW_Markup_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_Markup_ElementHandler_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/*const NW_Markup_ElementHandler_t NW_Markup_ElementHandler = { - { &NW_Markup_ElementHandler_Class } -};*/ - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_ElementHandler_Initialize (const NW_Markup_ElementHandler_t* thisObj, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) thisObj; - (void) contentHandler; - (void) elementNode; - - /* by default, we do nothing ... */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_ElementHandler_CreateBoxTree (const NW_Markup_ElementHandler_t* thisObj, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - (void) thisObj; - (void) contentHandler; - (void) elementNode; - (void) parentBox; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_Markup_ElementHandler_ProcessEvent (const NW_Markup_ElementHandler_t* thisObj, - NW_Markup_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) thisObj; - (void) contentHandler; - (void) elementNode; - (void) box; - (void) event; - - /* by default, we don't absorb the event ... */ - return 0; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPFormFiller.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPFormFiller.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,832 +0,0 @@ -/* -* Copyright (c) 2002 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_string.h" -#include "nw_hed_iformfiller.h" -#include "nw_markup_formfiller.h" -#include "nw_markup_formfilleri.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_inputskin.h" -#include "nw_fbox_selectbox.h" -#include "nw_fbox_selectskin.h" -#include "nw_fbox_epoc32selectskin.h" -#include "nw_fbox_passwordbox.h" -#include "nw_fbox_textareabox.h" -#include "nw_fbox_textareaskin.h" -#include "nw_fbox_formliaison.h" -#include "nw_fbox_formboxutils.h" -#include "nwx_generic_dlg.h" -#include "NW_FBox_Validator.h" -#include "BrsrStatusCodes.h" - -static const NW_Ucs2 Ecom_prefix[] = {'E','c','o','m','_','\0'}; - -/* These extern declarations are necessary because the header that declares - these functions includes C++ code. -*/ -extern "C" TBrowserStatusCode -NW_FBox_Epoc32InputSkin_SetValue(NW_FBox_InputSkin_t* inputSkin, - const NW_Ucs2* string, - NW_Text_Length_t length); - -extern "C" TBrowserStatusCode -NW_FBox_Epoc32InputSkin_Redraw(NW_FBox_InputSkin_t* inputSkin); - -/* ------------------------------------------------------------------------- * -private methods -* ------------------------------------------------------------------------- */ -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_IsFormFillerBox - - @synopsis: Determines if the box is a valid FormFiller box. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a box object from the BoxTree. - - @description: Determines if the given box is a valid FormFiller box, - that is one of the following types: a text type input box, - a single select box, a textarea box, or a password box. - - @returns: NW_Bool - [NW_TRUE] - When box is a valid FormFiller box. - - [NW_FALSE] - When box is a not valid FormFiller box. - ** ----------------------------------------------------------------------- **/ - -NW_Bool -NW_Markup_FormFiller_IsFormFillerBox(NW_LMgr_Box_t* box) -{ - if (NW_Object_IsInstanceOf(box, &(NW_FBox_SelectBox_Class))) { - return NW_TRUE; - } else if (NW_Object_IsInstanceOf(box, &(NW_FBox_TextAreaBox_Class))) { - return NW_TRUE; - } else if (NW_Object_Core_GetClass(box) == &(NW_FBox_InputBox_Class)) { - return NW_TRUE; - } else if (NW_Object_IsInstanceOf(box, &(NW_FBox_PasswordBox_Class))) { - return NW_TRUE; - } - - return NW_FALSE; -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_IsECMLBox - - @synopsis: Returns the name attribute if the box is an ECML box, - NULL otherwise. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a box object from the BoxTree. - - [out] NW_Bool* isFormFillerBox - Pointer to store a Bool flag indicating if the - given box is a valid FormFiller box. - - @description: Determines if the given box is a ECML box. - An ECML box is a valid FormFiller box whose name - name attribute value begins with the prefix "Ecom_". - The routine determines if box is a valid FormFiller box - and sets isFormFillerBox accordingly, then returns the - name attribute of the box if it's and ECML box, NULL otherwise. - - @returns: NW_Ucs2* - - Returns the name attribute if the box is an ECML box, - NULL otherwise. - ** ----------------------------------------------------------------------- **/ - -static -NW_Ucs2* -NW_Markup_FormFiller_IsECMLBox(NW_LMgr_Box_t* box, NW_Bool* isFormFillerBox) -{ - - NW_FBox_FormLiaison_t *formLiaison = NULL; - void* controlId; - NW_Ucs2* name; - TBrowserStatusCode status; - - if (!NW_Markup_FormFiller_IsFormFillerBox(box)) { - *isFormFillerBox = NW_FALSE; - return NULL; - } - *isFormFillerBox = NW_TRUE; - - formLiaison = NW_FBox_FormBox_GetFormLiaison (box); - controlId = NW_FBox_FormBox_GetFormCntrlID(box); - status = NW_FBox_FormLiaison_GetStringName(formLiaison, controlId, &name); - if (status != KBrsrSuccess){ - return NULL; - } - - if (!NW_Str_Strncmp(Ecom_prefix, name, (NW_Int32) NW_Str_Strlen(Ecom_prefix))) { - return name; - } else { - /* clean up the temporary text object (if we have one) */ - NW_Str_Delete(name); - return NULL; - } -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_ExistingValue - - @synopsis: Determines if the box currently has a value. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a box object from the BoxTree. - - [out] NW_Bool* existingVal - Pointer to store a Bool flag indicating if the - given box currently has a value. - - @description: Determines if the given box currently has a value - and sets existingVal accordingly. - - @returns: TBrowserStatusCode - [KBrsrSuccess] - When routine was able to determine if the box has a value. - - [KBrsrOutOfMemory] - When an allocation failure is encountered. - ** ----------------------------------------------------------------------- **/ - -static -TBrowserStatusCode -NW_Markup_FormFiller_ExistingValue(NW_LMgr_Box_t* box, NW_Bool* existingVal) -{ - NW_Ucs2* buffer = NULL; - NW_Text_t* text = NULL; - - NW_TRY (status) { - *existingVal = NW_FALSE; - - if (NW_Object_IsInstanceOf(box, &(NW_FBox_SelectBox_Class))) { - NW_FBox_SelectBox_t* selectBox; - NW_FBox_SelectSkin_t* selectSkin; - NW_Uint32 length = 0; - - selectBox = NW_FBox_SelectBoxOf(box); - selectSkin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(selectBox)); - status = NW_FBox_Epoc32SelectSkin_GetValue(NW_FBox_Epoc32SelectSkinOf(selectSkin), &buffer); - NW_THROW_ON_ERROR (status); - - if (buffer != NULL) { - length = NW_Str_Strlen(buffer); - if (length) { - *existingVal = NW_TRUE; - } - } - } - else { - NW_FBox_EditableString_t* editableString; - - editableString = NW_FBox_InputBox_GetEditableString (NW_FBox_InputBoxOf(box)); - //text = (NW_Text_t*) NW_FBox_EditableString_GetText (editableString, 0); -#pragma message (__FILE__" TODO: Replace NW_FBox_EditableString_GetText() " ) - if( editableString ) - { - if (NW_Text_GetCharCount (editableString)) { - *existingVal = NW_TRUE; - } - } - } - } NW_CATCH (status) { - if (status != KBrsrOutOfMemory) { - status = KBrsrSuccess; - } - } NW_FINALLY { - NW_Str_Delete(buffer); - NW_Object_Delete(text); - return status; - } NW_END_TRY -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_UpdateBox - - @synopsis: Updates the FormFiller box with the given value. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a FormFiller box. - - [in, out] NW_Ucs2* value - Value to update the box with. - - @description: Updates the FormFiller box with the given value. - - @returns: TBrowserStatusCode - [KBrsrSuccess] - When box was updated successfully. - - [KBrsrFailure] - When box could not be updated (other than out of memory). - - [KBrsrOutOfMemory] - When an allocation failure is encountered. - ** ----------------------------------------------------------------------- **/ - -static -TBrowserStatusCode -NW_Markup_FormFiller_UpdateBox(NW_LMgr_Box_t* box, NW_Ucs2* value) -{ - NW_TRY (status) { - if (NW_Object_IsInstanceOf(box, &(NW_FBox_SelectBox_Class))) { - NW_FBox_SelectBox_t* selectBox; - NW_FBox_SelectSkin_t* selectSkin; - NW_FBox_Epoc32SelectSkin_t* epoc32Skin; - NW_Bool selectUpdated; - - selectBox = NW_FBox_SelectBoxOf(box); - selectSkin = NW_FBox_SelectSkinOf(NW_FBox_FormBox_GetSkin(selectBox)); - epoc32Skin = NW_FBox_Epoc32SelectSkinOf (selectSkin); - status = NW_FBox_Epoc32SelectSkin_UpdateSelection(epoc32Skin, value, &selectUpdated); - (void) NW_FBox_SelectSkin_RefreshText( selectSkin ); - NW_LMgr_Box_Refresh(NW_LMgr_BoxOf(selectBox)); - NW_THROW_ON_ERROR (status); - if (!selectUpdated) { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - - else if (NW_Object_IsInstanceOf(box, &(NW_FBox_InputBox_Class))) { - NW_FBox_InputBox_t* inputBox; - NW_FBox_InputSkin_t* inputSkin; - - inputBox = NW_FBox_InputBoxOf(box); - inputSkin = NW_FBox_InputSkinOf(NW_FBox_FormBox_GetSkin(inputBox)); - - if (NW_Str_Strlen(value) > (NW_Uint16) NW_FBox_InputBox_GetMaxChars (inputBox)) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - - if( NW_Str_Strlen( value ) > 0 ) - { - status=NW_FBox_Epoc32InputSkin_SetValue(inputSkin, - value, - NW_Str_Strlen( value ) ); - - NW_THROW_ON_ERROR(status); - - /* update value to the form liaison */ - status=NW_FBox_InputBox_SetFormLiaisonVal(inputBox); - NW_THROW_ON_ERROR(status); - - status=NW_FBox_Epoc32InputSkin_Redraw(inputSkin); - } - - - /* Input or password box */ -// status = NW_FBox_Epoc32InputSkin_UpdateInput(NW_FBox_Epoc32InputSkinOf (inputSkin), -// inputBox, value, NW_FALSE); -#pragma message (__FILE__" TODO: Add method NW_FBox_Epoc32InputSkin_UpdateInput()" ) - - NW_THROW_ON_ERROR (status); - } - - else { - NW_THROW_STATUS(status, KBrsrFailure); - } - } NW_CATCH (status) { - if (status != KBrsrOutOfMemory) { - status = KBrsrFailure; - } - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Markup_FormFiller_Class_t NW_Markup_FormFiller_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Aggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_FormFiller_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_HED_FormFiller */ - /* getBoxTree */ NULL - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_Markup_FormFiller_SecondaryList[] = { - &NW_Markup_FormFiller_IFormFiller_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_IFormFiller_Class_t NW_Markup_FormFiller_IFormFiller_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_IFormFiller_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_Markup_FormFiller_t, NW_HED_IFormFiller) - }, - { /* NW_HED_IFormFiller */ - /* ECMLExists */ _NW_Markup_FormFiller_IFormFiller_ECMLExists, - /* fillAll */ _NW_Markup_FormFiller_IFormFiller_FillAll, - /* fillOne */ _NW_Markup_FormFiller_IFormFiller_FillOne - } - -}; - - -/* ------------------------------------------------------------------------- * -NW_HED_IFormFiller methods -* ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: _NW_Markup_FormFiller_IFormFiller_ECMLExists - - @synopsis: Determines if there is at least one ECML box in the box tree. - - @scope: public - - @parameters: - [in, out] NW_HED_IFormFiller_t* formFiller - Pointer to FormFiller interface object. - - @description: Determines if there is at least one ECML box in the box tree. - (See NW_Markup_FormFiller_IsECMLBox for a definition of an ECML box.) - - @returns: NW_Bool - [NW_TRUE] - There is at least one ECML box in the box tree. - - [NW_FALSE] - There are no ECML boxes in the box tree. - ** ----------------------------------------------------------------------- **/ -NW_Bool -_NW_Markup_FormFiller_IFormFiller_ECMLExists (NW_HED_IFormFiller_t* formFiller) -{ - NW_Bool ECMLFound = NW_FALSE; - NW_Markup_FormFiller_t* thisObj; - NW_LMgr_BoxVisitor_t* visitor = NULL; - NW_Ucs2* ECMLFieldName = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (formFiller, - &NW_Markup_FormFiller_IFormFiller_Class)); - - /* for convenience */ - thisObj = (NW_Markup_FormFiller_t*) NW_Object_Interface_GetImplementer (formFiller); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Markup_FormFiller_Class)); - - /*lint -e{550} Symbol not accessed */ - NW_TRY (status) { - NW_LMgr_Box_t* boxTree; - NW_LMgr_Box_t* childBox; - NW_Bool skipChildren; - NW_Bool isFormFillerBox; - - boxTree = NW_Markup_FormFiller_GetBoxTree (thisObj); - NW_ASSERT (NW_Object_IsInstanceOf (boxTree, &NW_LMgr_Box_Class)); - visitor = NW_LMgr_ContainerBox_GetBoxVisitor (NW_LMgr_ContainerBoxOf (boxTree)); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Iterate through all children */ - skipChildren = NW_FALSE; - while ((childBox = NW_LMgr_BoxVisitor_NextBox (visitor, &skipChildren)) != NULL) { - ECMLFieldName = NW_Markup_FormFiller_IsECMLBox (childBox, &isFormFillerBox); - - if(ECMLFieldName == NULL) { - continue; - } - - ECMLFound = NW_TRUE; - break; - } - } NW_CATCH (status) { - } NW_FINALLY { - NW_Str_Delete(ECMLFieldName); - NW_Object_Delete (visitor); - return ECMLFound; - } NW_END_TRY -} - -/** ----------------------------------------------------------------------- ** - @method: _NW_Markup_FormFiller_IFormFiller_FillAll - - @synopsis: Attempts to fill all valid FormFiller boxes in the box tree - with data from the wallet. - - @scope: public - - @parameters: - [in, out] NW_HED_IFormFiller_t* formFiller - Pointer to FormFiller interface object. - - [out] NW_LMgr_Box_t** firstNotFilled - Pointer to store an NW_LMgr_Box_t pointer. - This is the pointer to the first empty FormFiller box which could - not be filled, or NULL if all FormFiller boxes were successfully filled. - - @description: Attempts to fill all valid FormFiller boxes in the box tree - with data from the wallet.(See NW_Markup_FormFiller_IsFormFillerBox - for a definition of a valid FormFiller box.) - - @returns: TBrowserStatusCode - [KBrsrSuccess] - When all FormFiller boxes were successfully filled. - - [KBrsrFailure] - When there is at least one empty FormFiller box which - could not be filled, - - [KBrsrOutOfMemory] - When an allocation failure is encountered. - - [KBrsrUnexpectedError] - When an unexpected error is encountered. - - [KBrsrBadInputParam] - When bad input parameter is encountered. - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode -_NW_Markup_FormFiller_IFormFiller_FillAll (NW_HED_IFormFiller_t* formFiller, - NW_LMgr_Box_t** firstNotFilled) -{ - NW_Markup_FormFiller_t* thisObj; - NW_LMgr_BoxVisitor_t* visitor = NULL; - NW_Ucs2* value; - WALLET_XHTML_Status_t walletStatus; - - /* parameter assertion block */ - NW_ASSERT(firstNotFilled != NULL); - if (firstNotFilled == NULL) { - return KBrsrBadInputParam; - } - NW_ASSERT (NW_Object_IsInstanceOf (formFiller, - &NW_Markup_FormFiller_IFormFiller_Class)); - - /* for convenience */ - thisObj = (NW_Markup_FormFiller_t*) NW_Object_Interface_GetImplementer (formFiller); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Markup_FormFiller_Class)); - - NW_TRY (status) { - NW_LMgr_Box_t* boxTree; - NW_LMgr_Box_t* childBox; - NW_Bool skipChildren; - NW_Bool noneFilled = NW_TRUE; - NW_Bool isFormFillerBox; - NW_Bool existingVal; - NW_Ucs2* ECMLFieldName; - NW_LMgr_RootBox_t* rootBox = NULL; - - *firstNotFilled = NULL; - boxTree = NW_Markup_FormFiller_GetBoxTree (thisObj); - NW_ASSERT (NW_Object_IsInstanceOf (boxTree, &NW_LMgr_Box_Class)); - visitor = NW_LMgr_ContainerBox_GetBoxVisitor (NW_LMgr_ContainerBoxOf (boxTree)); - NW_THROW_OOM_ON_NULL (visitor, status); - rootBox = NW_LMgr_Box_GetRootBox(boxTree); - - /* Iterate through all children */ - skipChildren = NW_FALSE; - while ((childBox = NW_LMgr_BoxVisitor_NextBox (visitor, &skipChildren)) != NULL) { - - ECMLFieldName = NW_Markup_FormFiller_IsECMLBox (childBox, &isFormFillerBox); - if (!isFormFillerBox) { - continue; - } - - /* If the box is a valid input box but not an ECML box, this may be counted - * as an unfilled field. If there's already a value in the field, it's considered OK. - * Note: WalletFetch_GetData() will deallocate ECMLFieldName. - */ - if (ECMLFieldName != NULL) { - walletStatus = rootBox->appServices->walletAPI.WalletFetch_GetData(ECMLFieldName, &value, noneFilled); - status = NW_Markup_FormFiller_MapFromWalletStatus(walletStatus); - - /* If the status is KBrsrFailure continue and try to fill the other fields. - * Exit on more serious errors. - */ - if (status != KBrsrSuccess && status != KBrsrFailure) { - NW_THROW (status); - } - - - if (status != KBrsrSuccess) { - noneFilled = NW_FALSE; - } - if (status == KBrsrSuccess && value != NULL) { - /* Update input box with wallet value. - * Could still fail to fill in if format is bad, - * or wallet value is invalid selection field option. - */ - status = NW_Markup_FormFiller_UpdateBox(childBox, value); - NW_Str_Delete(value); - - if (status == KBrsrSuccess) { -// noneFilled = NW_FALSE; - continue; - } - if (status == KBrsrOutOfMemory) { - NW_THROW (status); - } - } - } - - /* If field has an existing value, don't count this as unfilled. */ - status = NW_Markup_FormFiller_ExistingValue(childBox, &existingVal); - if (status == KBrsrOutOfMemory) { - NW_THROW (status); - } - if (!existingVal) { - if (!(*firstNotFilled)) { - *firstNotFilled = childBox; - } - } - } - - walletStatus = rootBox->appServices->walletAPI.WalletFetch_GetData((NW_Ucs2*)NULL, &value, noneFilled); - status = NW_Markup_FormFiller_MapFromWalletStatus(walletStatus); - - /* Last call to WalletFetch_GetData() doesn't do anything. - * If it fails, somethings wrong! - */ - if (status != KBrsrSuccess) { - NW_THROW (status); - } - - } NW_CATCH (status) { - if (status != KBrsrOutOfMemory && - status != KBrsrUnexpectedError && - status != KBrsrBadInputParam) { - status = KBrsrFailure; - } - } - NW_FINALLY { - NW_Object_Delete (visitor); - if (status == KBrsrSuccess && *firstNotFilled != NULL) { - status = KBrsrFailure; - } - return status; - } NW_END_TRY -} - -/** ----------------------------------------------------------------------- ** - @method: _NW_Markup_FormFiller_IFormFiller_FillOne - - @synopsis: Attempts to fill the given box with the requested data. - - @scope: public - - @parameters: - [in, out] NW_HED_IFormFiller_t* formFiller - Pointer to FormFiller interface object. - - [in, out] NW_Ucs2* value - Value to be used to update the FormFiller box. - - [in, out] NW_LMgr_Box_t* node - Pointer to the FormFiller box which should be updated with the value. - - @description: Attempts to fill the given box with the requested data. - (See NW_Markup_FormFiller_IsFormFillerBox - for a definition of a valid FormFiller box.) - - @returns: TBrowserStatusCode - [KBrsrSuccess] - When the FormFiller box was successfully filled. - - [KBrsrFailure] - When the FormFiller box could not be successfully filled. - - [KBrsrOutOfMemory] - When an allocation failure is encountered. - - ** ----------------------------------------------------------------------- **/ - -TBrowserStatusCode -_NW_Markup_FormFiller_IFormFiller_FillOne (NW_HED_IFormFiller_t* formFiller, - NW_Ucs2* value, - NW_LMgr_Box_t* node) -{ - NW_Markup_FormFiller_t* thisObj; - NW_LMgr_BoxVisitor_t* visitor = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (formFiller, - &NW_Markup_FormFiller_IFormFiller_Class)); - - /* for convenience */ - thisObj = (NW_Markup_FormFiller_t*) NW_Object_Interface_GetImplementer (formFiller); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Markup_FormFiller_Class)); - - NW_TRY (status) { - NW_LMgr_Box_t* boxTree; - NW_LMgr_Box_t* childBox; - NW_Bool skipChildren; - - boxTree = NW_Markup_FormFiller_GetBoxTree (thisObj); - NW_ASSERT (NW_Object_IsInstanceOf (boxTree, &NW_LMgr_Box_Class)); - visitor = NW_LMgr_ContainerBox_GetBoxVisitor (NW_LMgr_ContainerBoxOf (boxTree)); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Iterate through all children */ - skipChildren = NW_FALSE; - while ((childBox = NW_LMgr_BoxVisitor_NextBox (visitor, &skipChildren)) != NULL) { - - /* Search for the in-focus box */ - if (childBox != node) { - continue; - } - - /* Verify that it's a valid formfiller box */ - if(!NW_Markup_FormFiller_IsFormFillerBox (childBox)) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - /* Update input box with wallet value */ - status = NW_Markup_FormFiller_UpdateBox(childBox, value); - if (status == KBrsrSuccess) { - break; - } - NW_THROW(status); - } - } NW_CATCH (status) { /* empty */ - } NW_FINALLY { - NW_Object_Delete (visitor); - NW_Str_Delete(value); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_MapFromWalletStatus - - @synopsis: Maps from wallet status to browser status. - - @scope: public - - @parameters: - [in, out] WALLET_XHTML_Status_t walletStatus - Wallet status to be mapped. - - @description: Maps from wallet status to browser status. - - @returns: TBrowserStatusCode - Returns the corresponding browser status. - - ** ----------------------------------------------------------------------- **/ -TBrowserStatusCode -NW_Markup_FormFiller_MapFromWalletStatus(WALLET_XHTML_Status_t walletStatus) -{ - switch (walletStatus) { - case WALLET_XHTML_SUCCESS: return KBrsrSuccess; - case WALLET_XHTML_OUT_OF_MEMORY: return KBrsrOutOfMemory; - case WALLET_XHTML_UNEXPECTED_ERROR: return KBrsrUnexpectedError; - case WALLET_XHTML_BAD_INPUT_PARAM: return KBrsrBadInputParam; - default: return KBrsrFailure; - } -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_MapToWalletStatus - - @synopsis: Maps from browser status to wallet status. - - @scope: public - - @parameters: - [in, out] TBrowserStatusCode status - Browser status to be mapped. - - @description: Maps from browser status to wallet status. - - @returns: WALLET_XHTML_Status_t - Returns the corresponding wallet status. - - ** ----------------------------------------------------------------------- **/ -WALLET_XHTML_Status_t -NW_Markup_FormFiller_MapToWalletStatus(TBrowserStatusCode status) -{ - switch (status) { - case KBrsrSuccess: return WALLET_XHTML_SUCCESS; - case KBrsrOutOfMemory: return WALLET_XHTML_OUT_OF_MEMORY; - case KBrsrUnexpectedError: return WALLET_XHTML_UNEXPECTED_ERROR; - case KBrsrBadInputParam: return WALLET_XHTML_BAD_INPUT_PARAM; - default: return WALLET_XHTML_FAILURE; - } -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_FormFiller_GetInFocusBox - - @synopsis: Locates the in-focus FormFiller box if there is one, - and passes back it's title attribute. - - @scope: public - - @parameters: - [in, out] NW_HED_IFormFiller_t* formFiller - Pointer to a FormFiller object. - - [in] const NW_MVC_View_t* view - Pointer to the current view. - - [out] NW_Ucs2** titleOut - Pointer to store the title string pointer. - - @description: If there is currently a box in focus, and it is a valid - FormFiller box, the routine returns a pointer to that box. - Otherwise, it returns the NULL pointer. - - Also passes the title attribute of the in-focus FormFiller box - back in the titleOut parameter. If there's no in-focus FormFiller - box, or there is such a box but it has no title, passes back NULL. - - @returns: NW_LMgr_Box_t* - A pointer to the in-focus FormFiller box if there is one, - NULL otherwise. - - ** ----------------------------------------------------------------------- **/ - -NW_LMgr_Box_t* -NW_Markup_FormFiller_GetInFocusBox(NW_HED_IFormFiller_t* formFiller, - const MBoxTreeListener* boxTreeListener, - NW_Ucs2** titleOut) -{ - NW_LMgr_Box_t* box; - NW_FBox_FormLiaison_t *formLiaison = NULL; - void* controlId; - TBrowserStatusCode status; - NW_Ucs2* title; - - NW_REQUIRED_PARAM(formFiller); - - NW_ASSERT(titleOut != NULL); - - *titleOut = NULL; - box = boxTreeListener->GetInFocusBox (); - if (box == NULL) { - return box; - } - - if (!NW_Markup_FormFiller_IsFormFillerBox(box)) { - return (NW_LMgr_Box_t*) NULL; - } - - formLiaison = NW_FBox_FormBox_GetFormLiaison(box); - controlId = NW_FBox_FormBox_GetFormCntrlID(box); - status = NW_FBox_FormLiaison_GetStringTitle(formLiaison, controlId, &title); - if (status != KBrsrSuccess) { - return box; - } - - *titleOut = title; - return box; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPImageViewer.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPImageViewer.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,287 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_markup_imagevieweri.h" -#include "nw_hed_compositecontenthandler.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_image_epoc32simpleimage.h" -#include "nw_image_virtualimage.h" -#include "BrsrStatusCodes.h" -#include "nwx_string.h" - - /* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_ImageViewer_GetText - - @synopsis: Returns all phone numbers associated with the implementer. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a box object from the BoxTree. - - [out] NW_Text_t** text - Pointer to store the text object pointer. - - [out] NW_Bool* isCopy - Pointer to store a Bool flag indicating that the returned - text object has to be freed if not needed. - - @description: The function returns a pointer to a text object from input - and text boxes. - - checks if the current box is a text box or input box. A - text object is extructed and its pointer is returned. - Exception: Input boxes of the Password type are ignored - for security reasons. - - @returns: NW_Bool - [NW_TRUE] - When a text object is returned. - - [NW_FALSE] - When text object is not found. NULL is returned in place - of the pointer to a text object - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Markup_ImageViewer_Class_t NW_Markup_ImageViewer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Aggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_ImageViewer_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Markup_ImageViewer */ - /* loadImage */ NULL, - /*IsNoSave */ NULL, - /* getAltText */ NULL - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_Markup_ImageViewer_SecondaryList[] = { - &NW_Markup_ImageViewer_IImageViewer_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_IImageViewer_Class_t NW_Markup_ImageViewer_IImageViewer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_IImageViewer_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_Markup_ImageViewer_t, NW_HED_IImageViewer) - }, - { /* NW_HED_IImageViewer */ - /* getImage */ _NW_Markup_ImageViewer_IImageViewer_GetImage, - /* showImages */ _NW_Markup_ImageViewer_IImageViewer_ShowImages - } -}; - -/* ------------------------------------------------------------------------- * - NW_Markup_ImageViewer methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_ImageViewer_LoadImage(NW_Markup_ImageViewer_t* imageViewer) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Markup_ImageViewer_Class)); - - NW_REQUIRED_PARAM(imageViewer); - - /* default implementation is that all boxes are valid */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Markup_ImageViewer_IsNoSave(NW_Markup_ImageViewer_t* imageViewer, - NW_ImageCH_Epoc32ContentHandler_t* imageCH) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Markup_ImageViewer_Class)); - - NW_REQUIRED_PARAM(imageViewer); - NW_REQUIRED_PARAM(imageCH); - - /* default implementation is that all images are save */ - return NW_FALSE; -} - - -/* ------------------------------------------------------------------------- * - NW_HED_IImageViewer methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_ImageViewer_IImageViewer_GetImage(NW_HED_IImageViewer_t* imageViewer, - NW_ADT_DynamicVector_t* dynamicVector) - { - NW_Markup_ImageViewer_t* thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_LMgr_Box_t* imgBox = NULL; - NW_ADT_Iterator_t* iter = NULL; - NW_HED_ContentHandler_t* childNode = NULL; - - /* parameter assertion block */ - NW_ASSERT(NW_Object_IsInstanceOf(imageViewer, &NW_Markup_ImageViewer_IImageViewer_Class)); - NW_ASSERT(NW_Object_IsInstanceOf(dynamicVector, &NW_ADT_DynamicVector_Class)); - - /* for convenience */ - thisObj = (NW_Markup_ImageViewer_t*)NW_Object_Interface_GetImplementer(imageViewer); - NW_ASSERT(NW_Object_IsInstanceOf(thisObj, &NW_Markup_ImageViewer_Class)); - - /* for convenience */ - NW_HED_CompositeContentHandler_t* compositeCH = (NW_HED_CompositeContentHandler_t*)NW_Object_Aggregate_GetAggregator(thisObj); - NW_ASSERT(NW_Object_IsInstanceOf(compositeCH, &NW_HED_CompositeContentHandler_Class)); - - compositeNode = (NW_HED_CompositeNode_t*)NW_Object_QuerySecondary(thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT(NW_Object_IsInstanceOf(compositeNode, &NW_HED_CompositeNode_Class)); - - NW_TRY(status) - { - /* Create a child iterator */ - status = NW_HED_CompositeNode_GetChildren(compositeNode, &iter); - NW_THROW_ON_ERROR(status); - - /* Loop through the child content handlers; each contatins an image. */ - while (NW_ADT_Iterator_HasMoreElements(iter)) - { - NW_ImageCH_Epoc32ContentHandler_t* imageCH = NULL; - NW_Image_Epoc32Simple_t* image = NULL; - NW_HED_ViewImageList_Entry_t* entry; - - status = NW_ADT_Iterator_GetNextElement(iter, &childNode); - if (status != KBrsrSuccess) - { - break; - } - - if (!NW_Object_IsClass(childNode, &NW_ImageCH_Epoc32ContentHandler_Class)) - { - continue; - } - - imageCH = NW_ImageCH_Epoc32ContentHandlerOf(childNode); - - if (imageCH->image == NULL) - { - continue; - } - - if (NW_Object_IsInstanceOf(imageCH->image, &NW_Image_Virtual_Class)) - { - continue; - } - - imgBox = NW_HED_ContentHandlerOf(imageCH)->boxTree; - if (imgBox == NULL) - { - continue; - } - - if (NW_Markup_ImageViewer_IsNoSave(thisObj, imgBox)) - { - continue; - } - - // check if http cache-control header value "no-store" used, and continue if it's specified. - if (imageCH->noStore) // if cache-control:no-store directive used in HTTP headers, do not include the image. - { - continue; - } - - image = NW_Image_Epoc32SimpleOf(imageCH->image); - - /* Save the text object in the dynamicVector */ - entry = (NW_HED_ViewImageList_Entry_t*)NW_ADT_DynamicVector_InsertAt(dynamicVector, NULL, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL(entry, status); - - entry->rawData = (NW_Byte*)image->rawData; - entry->rawDataLen = image->rawDataLength; - entry->url = imageCH->requestUrl; - entry->imageType = image->imageType; - NW_Ucs2* contentType = NW_HED_ContentHandlerOf(imageCH)->response->contentTypeString16; - if (!contentType) - { - contentType = NW_Str_CvtFromAscii((const char*)NW_HED_ContentHandlerOf(imageCH)->response->contentTypeString); - // NW_Url_Resp_s takes care of cleaning up the contentTypeString16 - NW_HED_ContentHandlerOf(imageCH)->response->contentTypeString16 = contentType; - } - entry->contentType = contentType; - - if (imageCH->altText == NULL) - { - imageCH->altText = NW_Markup_ImageViewer_GetAltText(thisObj, imgBox); - } - - entry->altText = imageCH->altText; - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - NW_Object_Delete (iter); - return status; - } - NW_END_TRY - - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_ImageViewer_IImageViewer_ShowImages(NW_HED_IImageViewer_t* imageViewer) -{ - NW_Markup_ImageViewer_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Markup_ImageViewer_IImageViewer_Class)); - /* for convenience */ - thisObj = (NW_Markup_ImageViewer_t*) NW_Object_Interface_GetImplementer (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Markup_ImageViewer_Class)); - - return NW_Markup_ImageViewer_LoadImage(thisObj); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPModule.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_markup_modulei.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_Module_Class_t NW_Markup_Module_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Base_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPNumberCollector.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPNumberCollector.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,336 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_markup_numbercollectori.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_fbox_inputboxi.h" -#include "nw_fbox_selectbox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_fbox_optionbox.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static -TBrowserStatusCode -NW_Markup_NumberCollector_GetOptGrpBoxText (NW_FBox_OptGrpBox_t* optgrpBox, - NW_ADT_DynamicVector_t *dynamicVector) -{ - NW_Text_t* text = NULL; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - - NW_TRY (status) { - - void** entry; - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(optgrpBox->children)); - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(optgrpBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - text = NW_Text_Copy (NW_FBox_OptionBoxOf(formBox)->text, NW_TRUE); - NW_THROW_OOM_ON_NULL (text, status); - /* Save the text object in the dynamicVector */ - entry = NW_ADT_DynamicVector_InsertAt (dynamicVector, &text, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL (entry, status); - } - } - } - NW_CATCH (status) { - NW_Object_Delete (text); - } - NW_FINALLY { - return status; - }NW_END_TRY -} - -static -TBrowserStatusCode -NW_Markup_NumberCollector_GetSelectBoxText (NW_LMgr_Box_t* box, - NW_ADT_DynamicVector_t *dynamicVector) -{ - NW_Text_t* text = NULL; - NW_ADT_Vector_Metric_t numItems; - NW_ADT_Vector_Metric_t index; - - - NW_TRY (status) { - - void** entry; - NW_FBox_SelectBox_t* selectBox = NW_FBox_SelectBoxOf(box); - numItems = NW_ADT_Vector_GetSize(NW_ADT_VectorOf(selectBox->children)); - for(index = 0; index < numItems; index++) - { - NW_FBox_FormBox_t* formBox; - formBox = *(NW_FBox_FormBox_t**) - NW_ADT_Vector_ElementAt(selectBox->children, index); - - if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptionBox_Class)) - { - text = NW_Text_Copy (NW_FBox_OptionBoxOf(formBox)->text, NW_TRUE); - NW_THROW_OOM_ON_NULL (text, status); - /* Save the text object in the dynamicVector */ - entry = NW_ADT_DynamicVector_InsertAt (dynamicVector, &text, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL (entry, status); - } - else if (NW_Object_IsInstanceOf(formBox, &NW_FBox_OptGrpBox_Class)) - { - status = NW_Markup_NumberCollector_GetOptGrpBoxText (NW_FBox_OptGrpBoxOf(formBox), dynamicVector); - NW_THROW_ON_ERROR(status); - } - } - } - NW_CATCH (status) { - NW_Object_Delete (text); - } - NW_FINALLY { - return status; - }NW_END_TRY -} - -/** ----------------------------------------------------------------------- ** - @method: NW_Markup_NumberCollector_GetText - - @synopsis: Returns all phone numbers associated with the implementer. - - @scope: private - @access: final - - @parameters: - [in, out] NW_LMgr_Box_t* box - Pointer to a box object from the BoxTree. - - [out] NW_Text_t** text - Pointer to store the text object pointer. - - [out] NW_Bool* isCopy - Pointer to store a Bool flag indicating that the returned - text object has to be freed if not needed. - - @description: The function returns a pointer to a text object from input - and text boxes. - - checks if the current box is a text box or input box. A - text object is extructed and its pointer is returned. - Exception: Input boxes of the Password type are ignored - for security reasons. - - @returns: NW_Bool - [NW_TRUE] - When a text object is returned. - - [NW_FALSE] - When text object is not found. NULL is returned in place - of the pointer to a text object - ** ----------------------------------------------------------------------- **/ -static -TBrowserStatusCode -NW_Markup_NumberCollector_GetText (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box, - NW_Text_t** text, - NW_Bool* isCopy) -{ - *text = NULL; - *isCopy = NW_FALSE; - - if (NW_Object_IsInstanceOf(box, &NW_LMgr_TextBox_Class)) { - *text = NW_LMgr_TextBox_GetText(NW_LMgr_TextBoxOf(box)); - return KBrsrSuccess; - } else if (NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class) && - !NW_Object_IsInstanceOf(box, &NW_FBox_PasswordBox_Class)) { - *text = (NW_FBox_InputBoxOf(box))->value; - return KBrsrSuccess; - } else if (NW_Object_IsInstanceOf(box, &NW_LMgr_ActiveContainerBox_Class)) { - *text = NW_Markup_NumberCollector_GetHrefAttr(numberCollector, box); - *isCopy = NW_TRUE; - return KBrsrSuccess; - }else if (NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)) { - *text = NW_Markup_NumberCollector_GetAltAttr(numberCollector, box); - *isCopy = NW_TRUE; - return KBrsrSuccess; - } - else if (NW_Object_IsInstanceOf(box, &NW_LMgr_ImgContainerBox_Class)) { - *text = (NW_LMgr_ImgContainerBoxOf(box))->altText; - return KBrsrSuccess; - } - - return KBrsrNotFound; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Markup_NumberCollector_Class_t NW_Markup_NumberCollector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Aggregate_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_NumberCollector_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_HED_INumberCollector */ - /* getBoxTree */ NULL, - /* boxIsValid */ _NW_Markup_NumberCollector_BoxIsValid, - /* getHrefAttr */ NULL, - /* getAltAttr */ NULL - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_Markup_NumberCollector_SecondaryList[] = { - &NW_Markup_NumberCollector_INumberCollector_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const NW_HED_INumberCollector_Class_t NW_Markup_NumberCollector_INumberCollector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_INumberCollector_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_Markup_NumberCollector_t, NW_HED_INumberCollector) - }, - { /* NW_HED_INumberCollector */ - /* collect */ _NW_Markup_NumberCollector_INumberCollector_Collect - } -}; - -/* ------------------------------------------------------------------------- * - NW_Markup_NumberCollector methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Markup_NumberCollector_BoxIsValid (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_Markup_NumberCollector_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (box, &NW_LMgr_Box_Class)); - - NW_REQUIRED_PARAM(numberCollector); - NW_REQUIRED_PARAM(box); - - /* default implementation is that all boxes are valid */ - return NW_TRUE; -} - -/* ------------------------------------------------------------------------- * - NW_HED_INumberCollector methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_NumberCollector_INumberCollector_Collect (NW_HED_INumberCollector_t* numberCollector, - NW_ADT_DynamicVector_t* dynamicVector) -{ - NW_Markup_NumberCollector_t* thisObj; - NW_LMgr_BoxVisitor_t* visitor = NULL; - NW_Text_t* text = NULL; - NW_Bool isCopy = NW_FALSE; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_Markup_NumberCollector_INumberCollector_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicVector, - &NW_ADT_DynamicVector_Class)); - - /* for convenience */ - thisObj = (NW_Markup_NumberCollector_t*) NW_Object_Interface_GetImplementer (numberCollector); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Markup_NumberCollector_Class)); - - NW_TRY (status) { - NW_LMgr_Box_t* boxTree; - NW_LMgr_Box_t* childBox; - NW_Bool skipChildren; - - boxTree = NW_Markup_NumberCollector_GetBoxTree (thisObj); - NW_ASSERT (NW_Object_IsInstanceOf (boxTree, &NW_LMgr_Box_Class)); - visitor = NW_LMgr_ContainerBox_GetBoxVisitor (NW_LMgr_ContainerBoxOf (boxTree)); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* Iterate through all children */ - skipChildren = NW_FALSE; - while ((childBox = NW_LMgr_BoxVisitor_NextBox (visitor, &skipChildren)) != NULL) { - void** entry; - - /* ensure that we want to process this particular box */ - if (!NW_Markup_NumberCollector_BoxIsValid (thisObj, childBox)) { - skipChildren = NW_TRUE; - continue; - } - - if (NW_Object_IsInstanceOf(childBox, &NW_FBox_SelectBox_Class) ) - { - status = NW_Markup_NumberCollector_GetSelectBoxText (childBox, dynamicVector); - NW_THROW_ON_ERROR (status); - } - else - { - - status = NW_Markup_NumberCollector_GetText (thisObj, childBox, &text, &isCopy); - if (status == KBrsrNotFound) { - continue; - } - NW_THROW_ON_ERROR (status); - - if (!isCopy && text != NULL) { - text = NW_Text_Copy (text, NW_TRUE); - NW_THROW_OOM_ON_NULL (text, status); - } - - /* Save the text object in the dynamicVector */ - entry = NW_ADT_DynamicVector_InsertAt (dynamicVector, &text, - NW_ADT_Vector_AtEnd); - NW_THROW_OOM_ON_NULL (entry, status); - } - } - } - - NW_CATCH (status) { - NW_Object_Delete (text); - } - - NW_FINALLY { - NW_Object_Delete (visitor); - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPWBXMLModule.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPWBXMLModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_dom_element.h" -#include "nw_hed_domhelper.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_WBXMLModule_Class_t NW_Markup_WBXMLModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_Module_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ 0, - /* elementHandlers */ NULL, - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Markup_ElementHandler_t* -_NW_Markup_WBXMLModule_GetElementHandler (const NW_Markup_Module_t* module, - const NW_DOM_ElementNode_t* domElement) -{ - NW_Uint32 numElementHandlers; - const NW_Markup_WBXMLModule_ElementHandlerEntry_t* elementHandlers; - NW_Uint16 tagToken; - NW_Uint32 index; - - /* traverse our list of ElementHandlers looking for a match for our token */ - tagToken = NW_HED_DomHelper_GetElementToken (domElement); - numElementHandlers = NW_Markup_WBXMLModule_GetClassPart (module).numElementHandlers; - elementHandlers = NW_Markup_WBXMLModule_GetClassPart (module).elementHandlers; - for (index = 0; index < numElementHandlers; index++) { - if (elementHandlers[index].tagToken == tagToken) { - return elementHandlers[index].elementHandler; - } - } - - /* if no element handler is found we must return NULL */ - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_Markup_ElementHandler_t* -NW_Markup_WBXMLModule_GetHandler (const NW_Markup_Module_t* module, - NW_Uint16 tagToken) -{ - const NW_Markup_WBXMLModule_ElementHandlerEntry_t* elementHandlers; - - // traverse our list of ElementHandlers looking for a match for our token - NW_Uint32 numElementHandlers = NW_Markup_WBXMLModule_GetClassPart (module).numElementHandlers; - elementHandlers = NW_Markup_WBXMLModule_GetClassPart (module).elementHandlers; - NW_Uint16 moduleStartToken = elementHandlers[0].tagToken; - NW_Uint16 moduleEndToken = (NW_Uint16)(moduleStartToken + numElementHandlers); - // if the token is within the range, getthe element handler - if ((tagToken >= moduleStartToken) && (tagToken < moduleEndToken)) - { - // get the index - NW_Uint16 index = (NW_Uint16)(tagToken - moduleStartToken); - return elementHandlers[index].elementHandler; - } - - /* if no element handler is found we must return NULL */ - return NULL; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPWmlValidator.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPWmlValidator.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2000-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_string.h" -#include "nw_wml_core.h" -#include "nw_markup_wmlvalidatori.h" -#include "wml_task.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_WmlValidator_Class_t NW_Markup_WmlValidator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_Validator_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Markup_WmlValidator_t), - /* construct */ _NW_Markup_WmlValidator_Construct, - /* destruct */ _NW_Markup_WmlValidator_Destruct - }, - { /* NW_FBox_Validator */ - /* validate */ _NW_Markup_WmlValidator_Validate, - /* getFormat */ _NW_Markup_WmlValidator_GetFormat - }, - { /* NW_Markup_WmlValidator */ - /* unused */ NW_Object_Unused - } -}; - - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Markup_WmlValidator_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Markup_WmlValidator_t* thisObj; - NW_Text_t* format; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_Markup_WmlValidator_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_Markup_WmlValidatorOf (dynamicObject); - - /* No NW_Fbox_Validator superclass constructor to call. */ - - thisObj->formatUcs2 = NULL; - thisObj->mode = NW_FBox_Validator_Mode_None; - thisObj->emptyOk = NW_FBox_Validator_EmptyOk_None; - /* Default is to do a full string match, not prefix. */ - thisObj->fullMatch = NW_TRUE; - - /* initialize the member variables */ - format = va_arg (*argp, NW_Text_t*); - if ( format != NULL ) { - if ( NW_Text_GetCharCount(format) >= 1 ) { - NW_Ucs4 ch; - - ch = NW_Text_GetAt( format, 0 ); - if ( ch != 0 ) { - /* Is not an empty string. Take a copy of it. - Otherwise leave as null pointer. */ - thisObj->formatUcs2 = NW_Text_GetUCS2Buffer(format, - NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned | - NW_Text_Flags_Copy, - NULL, NULL); - } - } - } - - - thisObj->mode = (NW_FBox_Validator_Mode_t)va_arg (*argp, NW_Uint32); - thisObj->emptyOk = (NW_FBox_Validator_EmptyOk_t)va_arg (*argp, NW_Uint32); - thisObj->fullMatch = (NW_Bool)va_arg (*argp, NW_Uint32); - - /* successful completion */ - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Markup_WmlValidator_Destruct(NW_Object_Dynamic_t* dynamicObject) -{ - NW_Markup_WmlValidator_t* thisObj; - - /* for convenience */ - thisObj = NW_Markup_WmlValidatorOf (dynamicObject); - - /* Destroy the format */ - NW_Str_Delete((NW_Ucs2*) thisObj->formatUcs2); - - /* No NW_Fbox_Validator superclass destructor to call. */ - - return; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_Markup_WmlValidator_Validate(NW_FBox_Validator_t* validator, - const NW_Text_t* string) -{ - TBrowserStatusCode status; - NW_Bool stringFreeNeeded = NW_FALSE; - NW_Ucs2* stringStr; - NW_Markup_WmlValidator_t* thisObj; - NW_Bool prefixMatch; - NW_WmlInput_EmptyOk_t emptyOk; - - NW_ASSERT(validator != NULL); - NW_ASSERT(NW_Object_IsInstanceOf(validator, &NW_Markup_WmlValidator_Class)); - - /* For convenience. */ - thisObj = NW_Markup_WmlValidatorOf( validator ); - - if (string != NULL) { - stringStr = NW_Text_GetUCS2Buffer(string, - NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, - NULL, &stringFreeNeeded); - } else { - stringStr = NULL; - } - - /* Convert emptyOk to values for NW_WmlInput_ValidateValue. */ - if (thisObj->emptyOk == NW_FBox_Validator_EmptyOk_True) { - emptyOk = NW_WmlInput_EmptyOk_True; - } else if (thisObj->emptyOk == NW_FBox_Validator_EmptyOk_False) { - emptyOk = NW_WmlInput_EmptyOk_False; - } else { - emptyOk = NW_WmlInput_EmptyOk_None; - } - - prefixMatch = (NW_Bool)(!thisObj->fullMatch); /* True when prefix match, so complement */ - if ( NW_WmlInput_ValidateValue(stringStr, (NW_Ucs2*) thisObj->formatUcs2, - emptyOk, - prefixMatch, - 0) ) { - status = KBrsrSuccess; - } else { - status = KBrsrWmlbrowserInputNonconformingToMask; - } - - if ( stringFreeNeeded ) { - NW_Str_Delete( stringStr ); - stringStr = NULL; - } - - return status; -} - -/* --------------------------------------------------------------------------*/ -TBrowserStatusCode -_NW_Markup_WmlValidator_GetFormat(NW_FBox_Validator_t* validator, - const NW_Ucs2** format, - NW_FBox_Validator_Mode_t* mode, - NW_FBox_Validator_EmptyOk_t* emptyOk) -{ - NW_Markup_WmlValidator_t* thisObj; - - NW_ASSERT( validator != NULL ); - NW_ASSERT( format != NULL ); - NW_ASSERT( mode != NULL ); - NW_ASSERT( emptyOk != NULL ); - NW_ASSERT(NW_Object_IsInstanceOf(validator, &NW_Markup_WmlValidator_Class)); - - /* for convenience */ - thisObj = NW_Markup_WmlValidatorOf(validator); - - *format = thisObj->formatUcs2; - *mode = thisObj->mode; - *emptyOk = thisObj->emptyOk; - - /* make sure the format string is valid before returning */ - if ((*format != NULL) && ( ! NW_WmlInput_ValidateFormat(*format))) - { - *format = NULL; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience methods - * ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------*/ -NW_Markup_WmlValidator_t* -NW_Markup_WmlValidator_New (const NW_Text_t* format, - const NW_FBox_Validator_Mode_t mode, - const NW_FBox_Validator_EmptyOk_t emptyOk, - const NW_Bool fullMatch) -{ - return (NW_Markup_WmlValidator_t*) - NW_Object_New (&NW_Markup_WmlValidator_Class, format, (NW_Uint32)mode, (NW_Uint32)emptyOk, (NW_Uint32)fullMatch); -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MARKUPXMLModule.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPXMLModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/*lint --e{767} macro was defined differently in another module */ - -#include "nw_markup_xmlmodulei.h" -#include "nw_dom_element.h" - -#include <nwx_string.h> -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_XMLModule_Class_t NW_Markup_XMLModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_Module_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_XMLModule_GetElementHandler - }, - { /* NW_Markup_XMLModule */ - /* numElementHandlers */ 0, - /* elementHandlers */ NULL, - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Markup_ElementHandler_t* -_NW_Markup_XMLModule_GetElementHandler (const NW_Markup_Module_t* module, - const NW_DOM_ElementNode_t* domElement) -{ - NW_String_t tagName; - TBrowserStatusCode status; - NW_Uint32 numElementHandlers; - const NW_Markup_XMLModule_ElementHandlerEntry_t* elementHandlers; - NW_Uint32 index; - - /* get the tagName and build */ - /* TODO: deal with other character encodings than UCS2 */ - (void) NW_Mem_memset (&tagName, 0, sizeof (tagName)); - status = NW_DOM_ElementNode_getTagName ((NW_DOM_ElementNode_t*) domElement, - &tagName); - if (status != KBrsrSuccess) { - return NULL; - } - - /* traverse our list of ElementHandlers looking for a match for our token */ - numElementHandlers = NW_Markup_XMLModule_GetClassPart (module).numElementHandlers; - elementHandlers = NW_Markup_XMLModule_GetClassPart (module).elementHandlers; - for (index = 0; index < numElementHandlers; index++) { - if (!NW_Mem_memcmp (elementHandlers[index].tagName, tagName.storage, - tagName.length) && - elementHandlers[index].tagName[tagName.length / 2 - 1] == '\0') { - NW_String_deleteStorage(&tagName); - return elementHandlers[index].elementHandler; - } - } - - /* if no element handler is found we must return NULL */ - NW_String_deleteStorage(&tagName); - return NULL; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/MakeSrc --- a/webengine/wmlengine/src/markup/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_markup_src_lib.a - -SUBDIRS = - -SUBMAKES = - -SRCS = ElementHandler.c Module.c WBXMLModule.c WmlValidator.c XMLModule.c NumberCollector.c - - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/markup/src/WalletWrapper.cpp --- a/webengine/wmlengine/src/markup/src/WalletWrapper.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,327 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -* -* -*/ - - - -// INCLUDE FILES - -#include <e32std.h> -#include <eikdef.h> -#include <akninfrm.h> -#include <features.hrh> -#include <WalletAVBrowserInterface.h> - -#include "BrCtl.h" -#include "MVCShell.h" -#include "WalletWrapper.h" -#include "nwx_string.h" - - -const TInt KMaxWalletSringLenght = 512; - -// ----------------------------------------------------------------------------- -// CWalletWrapper::NewL -// ----------------------------------------------------------------------------- -// -CWalletWrapper* CWalletWrapper::NewL ( CBrCtl* aParent) - { - CWalletWrapper* self = new(ELeave) CWalletWrapper(aParent); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::~CWalletWrapper -// ----------------------------------------------------------------------------- -// -CWalletWrapper::~CWalletWrapper() - { - //Check if there is a wallet to close & destroy - delete iAsyncCallBack; - } - -// ----------------------------------------------------------------------------- -// CWalletWrapper::CWalletWrapper -// ----------------------------------------------------------------------------- -// -CWalletWrapper::CWalletWrapper( CBrCtl* aParent ) -: iBrCtl( aParent ) - { - iWalletStatus = EEWalletNotExist; - } - -// ----------------------------------------------------------------------------- -// CWalletWrapper::ConstructL -// ----------------------------------------------------------------------------- -// -void CWalletWrapper::ConstructL() - { - iAsyncCallBack = CIdle::NewL( CActive::EPriorityIdle ); - iWalletInfoBuffer = NULL; - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::CmdUseWalletInfo -// ----------------------------------------------------------------------------- -// -void CWalletWrapper::CmdUseWalletInfoL( ) - { - TBool cmdCard = EFalse; - - iBrCtl->Shell()->UseWalletInfo(); - cmdCard = iBrCtl->View()->HasECMLOnPage(); - - TRAPD( err, - iWalletType = ( WalletType ) cmdCard; - if( iWalletStatus == EEWalletNotExist ) - { - CWalletAVBrowserInterface::CreateAndRunLD( this, cmdCard ); - } - else - { - if( iWallet ) - { - iWallet->HandleBrowserMessageL( MBrowserObserver::EActivateWallet, (TAny*)&cmdCard ); - } - } - ); - - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::DestroyWalletL -// ----------------------------------------------------------------------------- -// -TInt CWalletWrapper::DestroyWalletL( TAny* aWrapper ) - { - - CWalletWrapper* wrap = - REINTERPRET_CAST( CWalletWrapper*, aWrapper ); - CWalletAVBrowserInterface::DestroyL(wrap->iWallet); - wrap->iWalletStatus = EEWalletNotExist; - wrap->iWallet = NULL; - CActiveSchedulerWait* wait= - REINTERPRET_CAST( CActiveSchedulerWait*, wrap->iActiveWait ); - if ( wait ) - { - if( wait->IsStarted() ) - { - wait->AsyncStop(); - } - } - - return EFalse; - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::ValletIsCreated -// ----------------------------------------------------------------------------- -// -TBool CWalletWrapper::ValletIsCreated() - { - TBool ret = EFalse; - if( iWalletStatus != EEWalletNotExist ) - { - ret= ETrue; - } - return ret; - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::CmdCloseWalletOnExitL -// ----------------------------------------------------------------------------- -// -void CWalletWrapper::CmdCloseWalletOnExitL( TAny* aWait ) - { - iActiveWait = aWait; - iWallet->HandleBrowserMessageL( iWallet->ECloseWallet,(TAny*)NULL ); - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::CmdCloseWalletL -// ----------------------------------------------------------------------------- -// -void CWalletWrapper::CmdCloseWalletL() - { - iWallet->HandleBrowserMessageL( iWallet->ECloseWallet,(TAny*)NULL ); - } - - -// ----------------------------------------------------------------------------- -// CBrowserContentView::HandleWalletMessageL -// ----------------------------------------------------------------------------- -// -void CWalletWrapper::HandleWalletMessageL( enum TWalletOperationId aOperationId, TAny* aData) - { - switch( aOperationId ) - { - case EWalletObserver: - { - iWallet = (MBrowserObserver*)aData; - if( iWallet ) - { - iWalletStatus = EWalletCreated; - } - } - break; - - case EControlToBrowser: - break; - - case EWalletClosed: - { - if ( !iAsyncCallBack->IsActive() ) // asyincon destroy - { - iAsyncCallBack->Start( TCallBack( DestroyWalletL, this ) ); - } - } - break; - - case EFillCurrentField: - { - if ( aData ) - { - WALLET_XHTML_Status_t status; - iWalletInfoBuffer = (HBufC*)aData; - - iWalletInfoBuffer = iWalletInfoBuffer->ReAlloc( iWalletInfoBuffer->Des().Length() + 2 ); - iWalletInfoBuffer->Des().ZeroTerminate(); - TText *buf = ::NW_Str_Newcpy( (TText*)iWalletInfoBuffer->Des().Ptr() ); - status = (iWalletCallback)( WALLET_XHTML_FILL_ONE,buf,iContext); - - // TODO: line is neeeded to avoid a memory leak ! Not need now ! - // delete iWalletInfoBuffer; - } - } - break; - - case EReadyToFill: - { - WALLET_XHTML_Status_t status; - //iWalletInfoBuffer = (HBufC*)aData; - status = (iWalletCallback)( WALLET_XHTML_FILL_ALL, NULL, iContext ); - TBool walletStatus = iFillingFaliure; - - iWallet->HandleBrowserMessageL(iWallet->EBrowserReady, (TAny*) &walletStatus); - } - break; - - default: - break; - } - } - -// ----------------------------------------------------------------------------- -// CWalletWrapper::WalletUI_VisibleCloseWallet -// this callback called by KIMONO callback -// ----------------------------------------------------------------------------- -// -TBool CWalletWrapper::WalletUI_VisibleCloseWallet() - { - TBool ret = ValletIsCreated(); - return ret; - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::WalletFetch_Start -// this callback called by KIMONO callback -// ----------------------------------------------------------------------------- -// -WALLET_XHTML_Status_t -CWalletWrapper::WalletFetch_Start( WALLET_XHTML_Status_t (callback)(Wallet_XHTML_FillOption, - TUint16*, void*), - TUint16* /*header*/, - TBool ecml_exists, - void* context) - { - iWalletCallback = callback; - iWalletType = (WalletType)ecml_exists; - iContext = context; - return WALLET_XHTML_SUCCESS; - } - - -void CWalletWrapper::WalletFetch_CloseWallet( TBool end_pressed ) - { - TBool press = EFalse; - press = end_pressed; - TRAPD( err,iWallet->HandleBrowserMessageL( iWallet->ECloseWallet,(TAny*)&press ) ); - } - - -// ----------------------------------------------------------------------------- -// CWalletWrapper::WalletFetch_GetData -// this callback called by KIMONO callback -// ----------------------------------------------------------------------------- -// -WALLET_XHTML_Status_t -CWalletWrapper::WalletFetch_GetData( TUint16* field_name, - TUint16** field_value, - TBool none_filled ) - { - TBuf<KMaxWalletSringLenght+2> field; - WALLET_XHTML_Status_t ret = WALLET_XHTML_SUCCESS; - - if( field_name ) - { - TPtrC tempField( field_name ); - if( tempField.Length() <= KMaxWalletSringLenght ) - { - field.Copy( field_name ); - } - else - { - field.Copy( field_name,KMaxWalletSringLenght ); - } - field.ZeroTerminate(); - - iWalletInfoBuffer = HBufC::NewL( KMaxWalletSringLenght ); - - iWalletInfoBuffer->Des().Copy( field ); - TRAPD( errhandle, iWallet->HandleBrowserMessageL( iWallet->EFillAllFields, - (TAny * )iWalletInfoBuffer ) ); - if( iWalletInfoBuffer->Compare( KNullDesC ) ) - { - TText *waletOut = CONST_CAST( TText*, iWalletInfoBuffer->Des().Ptr() ); - *field_value = ::NW_Str_Newcpy( waletOut ); - } - else - { - field_value = (TText**)NULL; - ret = WALLET_XHTML_FAILURE ;//WALLET_XHTML_FAILURE; //WALLET_XHTML_BAD_INPUT_PARAM - } - -// TODO: line is neeeded to avoid a memory leak ! Not need now ! - //delete iWalletInfoBuffer; - } - else - { - iFillingFaliure = none_filled; - } - return ret; - } \ No newline at end of file diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/NW_Object_EXPORT.h --- a/webengine/wmlengine/src/object/include/NW_Object_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_EXPORT_h_ -#define _NW_Object_EXPORT_h_ - -#include "nw_object_exceptions.h" - -/** ----------------------------------------------------------------------- ** - @package: NW_Object - - @synopsis: The RME object model support package. - - @description: This package provides the framework for the RME object - model. - ** ----------------------------------------------------------------------- **/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_OBJECT_EXPORT -#ifdef NW_IMPORT -#define NW_OBJECT_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_OBJECT_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_OBJECT_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_aggregate.h --- a/webengine/wmlengine/src/object/include/nw_object_aggregate.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_Aggregate_h_ -#define _NW_Object_Aggregate_h_ - -#include "nw_object_secondary.h" -#include <stdarg.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Object_Aggregate - - @scope: public - - @description: Base class for all aggregates. Aggregates are used to - provide a semblence of multiple inheritance. It's built - on top of the interface mechanism so it's not true - inheritance in the C++ sense but more like Microsoft COM. - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Aggregate_Class_s NW_Object_Aggregate_Class_t; -typedef struct NW_Object_Aggregate_s NW_Object_Aggregate_t; - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Object_Aggregate_Construct_t) (NW_Object_Aggregate_t* aggregate, - va_list* argp); - -typedef -void -(*NW_Object_Aggregate_Destruct_t) (NW_Object_Aggregate_t* aggregate); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Aggregate_ClassPart_s { - const NW_Object_Class_t* const* secondaryList; - NW_Object_Aggregate_Construct_t construct; - NW_Object_Aggregate_Destruct_t destruct; -} NW_Object_Aggregate_ClassPart_t; - -struct NW_Object_Aggregate_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; - NW_Object_Aggregate_ClassPart_t NW_Object_Aggregate; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Aggregate_s { - NW_Object_Secondary_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Aggregate_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Object_Aggregate)) - -#define NW_Object_AggregateOf(_object) \ - (NW_Object_Cast ((_object), NW_Object_Aggregate)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Aggregate_Class_t NW_Object_Aggregate_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_Aggregate_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_aggregatei.h --- a/webengine/wmlengine/src/object/include/nw_object_aggregatei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_AggregateI_h_ -#define _NW_Object_AggregateI_h_ - -#include "nw_object_secondaryi.h" -#include "nw_object_aggregate.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Aggregate_Initialize (NW_Object_Core_t* core, - va_list* argList); - -NW_OBJECT_EXPORT -void -_NW_Object_Aggregate_Terminate (NW_Object_Core_t* object); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/** ----------------------------------------------------------------------- ** - @method: NW_Object_Aggregate_Construct - - @synopsis: The constructor method for aggregate objects. - - @scope: protected - @access: virtual - - @parameters: - va_list* argList - This method accepts a variable parameter list. It is the - responsibility of each constructor method in the - aggregate derivation hierarchy to remove all parameters - from the 'argList'. - - @description: TBD - - @returns: TBrowserStatusCode - The state of 'object' is undefined in case of all errors. - - [KBrsrSuccess] - Successful completion. - ** ----------------------------------------------------------------------- **/ -#define NW_Object_Aggregate_Construct(_aggregate, _argp) \ - (NW_Object_Invoke ((_aggregate), NW_Object_Aggregate, construct) ( \ - NW_Object_AggregateOf (_aggregate), \ - (_argp))) - -/** ----------------------------------------------------------------------- ** - @method: NW_Object_Aggregate_Destruct - - @synopsis: The destructor method for aggregate objects. - - @scope: protected - @access: virtual - - @description: The destructor method for aggregate objects. - ** ----------------------------------------------------------------------- **/ -#define NW_Object_Aggregate_Destruct(_aggregate) \ - (NW_Object_Invoke ((_aggregate), NW_Object_Aggregate, destruct) ( \ - NW_Object_AggregateOf (_aggregate))) - -#define NW_Object_Aggregate_GetAggregator \ - NW_Object_GetOuter - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_AggregateI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_base.h --- a/webengine/wmlengine/src/object/include/nw_object_base.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_BASE_H -#define NW_OBJECT_BASE_H - -#include "nw_object_core.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Base_Class_s NW_Object_Base_Class_t; -typedef struct NW_Object_Base_s NW_Object_Base_t; - -typedef struct NW_Object_Base_secondaryListEntry_s NW_Object_Base_secondaryListEntry_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Base_ClassPart_s { - const NW_Object_Class_t* const* secondaryList; -} NW_Object_Base_ClassPart_t; - -struct NW_Object_Base_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Base_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Base_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Object_Base)) - -#define NW_Object_BaseOf(_object) \ - (NW_Object_Cast (_object, NW_Object_Base)) - -#define NW_Object_Base_InterfaceOffset(_type, _interface) \ - ((NW_Uint32) &(((_type##_t*)0)->_interface)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Base_Class_t NW_Object_Base_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_BASE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_basei.h --- a/webengine/wmlengine/src/object/include/nw_object_basei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_BASEI_H -#define NW_OBJECT_BASEI_H - - -#include "nw_object_corei.h" -#include "nw_object_base.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -#define _NW_Object_Base_QueryInterface \ - _NW_Object_Core_QuerySecondary - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_BASEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_core.h --- a/webengine/wmlengine/src/object/include/nw_object_core.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_CORE_H -#define NW_OBJECT_CORE_H - -#include "nw_object_object.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Core_Class_s NW_Object_Core_Class_t; -typedef struct NW_Object_Core_s NW_Object_Core_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -NW_Object_t* -(*NW_Object_Core_QuerySecondary_t) (const NW_Object_Core_t* core, - const NW_Object_Class_t* objClass); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Core_ClassPart_s { - const NW_Object_Class_t* super; - NW_Object_Core_QuerySecondary_t querySecondary; -} NW_Object_Core_ClassPart_t; - -struct NW_Object_Core_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Core_s { - const NW_Object_Class_t* objClass; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Core_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Object_Core)) - -#define NW_Object_CoreOf(_object) \ - (NW_Object_Cast (_object, NW_Object_Core)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Core_Class_t NW_Object_Core_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Core_GetClass(_object) \ - (NW_OBJECT_CONSTCAST (NW_Object_Class_t*) \ - NW_Object_CoreOf (_object)->objClass) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_CORE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_corei.h --- a/webengine/wmlengine/src/object/include/nw_object_corei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_COREI_H -#define NW_OBJECT_COREI_H - -#include "nw_object_core.h" -#include <stdarg.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Core_Initialize (NW_Object_Core_t* core, - va_list* argList); - -NW_OBJECT_EXPORT -void -_NW_Object_Core_Terminate (NW_Object_Core_t* core); - -NW_OBJECT_EXPORT -NW_Object_t* -_NW_Object_Core_QuerySecondary (const NW_Object_Core_t* core, - const NW_Object_Class_t* objClass); -#define _NW_Object_Core_QueryInterface _NW_Object_Core_QuerySecondary - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Core_CallInitialize (const NW_Object_Class_t* objClass, - NW_Object_Core_t* core, - va_list* argList); - -NW_OBJECT_EXPORT -void -_NW_Object_Core_CallTerminate (NW_Object_Core_t* core); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Core_CallInitialize(_objClass, _core, _argList) \ - (_NW_Object_Core_CallInitialize ( \ - (_objClass), \ - (NW_Object_Core_t*) (_core), \ - (_argList))) - -#define NW_Object_Core_CallTerminate(_core) \ - (_NW_Object_Core_CallTerminate ( \ - NW_Object_CoreOf (_core))) - -#define NW_Object_Core_QuerySecondary(_core, _class) \ - (NW_Object_Invoke ((_core), NW_Object_Core, querySecondary) (\ - NW_Object_CoreOf (_core), (_class))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_COREI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_dynamic.h --- a/webengine/wmlengine/src/object/include/nw_object_dynamic.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_DYNAMIC_H -#define NW_OBJECT_DYNAMIC_H - -#include "nw_object_base.h" -#include "nwx_defs.h" -#include <stdarg.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Dynamic_Class_s NW_Object_Dynamic_Class_t; -typedef struct NW_Object_Dynamic_s NW_Object_Dynamic_t; - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Object_Dynamic_Construct_t) (NW_Object_Dynamic_t* object, - va_list* argp); - -typedef -void -(*NW_Object_Dynamic_Destruct_t) (NW_Object_Dynamic_t* object); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Dynamic_ClassPart_s { - NW_Uint16 instanceSize; - NW_Object_Dynamic_Construct_t construct; - NW_Object_Dynamic_Destruct_t destruct; -} NW_Object_Dynamic_ClassPart_t; - -struct NW_Object_Dynamic_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Dynamic_s { - NW_Object_Base_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Dynamic_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Object_Dynamic)) - -#define NW_Object_DynamicOf(_object) \ - (NW_Object_Cast ((_object), NW_Object_Dynamic)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Dynamic_Class_t NW_Object_Dynamic_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -NW_Object_Initialize (const NW_Object_Class_t* objClass, - NW_Object_t* object, ...); - -NW_OBJECT_EXPORT -NW_Object_t* -NW_Object_New (const NW_Object_Class_t* objClass, ...); - -NW_OBJECT_EXPORT -void -NW_Object_Terminate (NW_Object_t* object); - -NW_OBJECT_EXPORT -void -NW_Object_Delete (NW_Object_t* object); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_DYNAMIC_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_dynamici.h --- a/webengine/wmlengine/src/object/include/nw_object_dynamici.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_DYNAMICI_H -#define NW_OBJECT_DYNAMICI_H - -#include "nw_object_basei.h" -#include "nw_object_dynamic.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Dynamic_Initialize (NW_Object_Core_t* core, - va_list* argList); - -NW_OBJECT_EXPORT -void -_NW_Object_Dynamic_Terminate (NW_Object_Core_t* object); - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Dynamic_Construct(_dynamic, _argList) \ - (NW_Object_Invoke ((_dynamic), NW_Object_Dynamic, construct) ( \ - NW_Object_DynamicOf (_dynamic), \ - (_argList))) - -#define NW_Object_Dynamic_Destruct(_dynamic) \ - (NW_Object_Invoke ((_dynamic), NW_Object_Dynamic, destruct) ( \ - NW_Object_DynamicOf (_dynamic))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_DYNAMICI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_exceptions.h --- a/webengine/wmlengine/src/object/include/nw_object_exceptions.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_exceptions_h_ -#define _NW_Object_exceptions_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define NW_TRY(_variable) \ - { TBrowserStatusCode _variable = KBrsrSuccess; if (_variable) {} - -#define NW_CATCH(_variable)\ - { (_variable) = KBrsrSuccess; goto _NW_FINALLY; } _NW_CATCH: - -#define NW_FINALLY \ - _NW_FINALLY: - -#define NW_END_TRY \ - } - -#define NW_FINISHED \ - { goto _NW_FINALLY; } - -#define NW_THROW(_status) \ - { goto _NW_CATCH; } - -#define NW_THROW_STATUS(_variable, _status) \ - { (_variable) = (TBrowserStatusCode) (_status); goto _NW_CATCH; } - -#define _NW_THROW_ON_ERROR(_variable) \ - { if ((_variable) != (TBrowserStatusCode) KBrsrSuccess) { goto _NW_CATCH; } } - -#define NW_THROW_SUCCESS(_variable) \ - { (_variable) = (TBrowserStatusCode) KBrsrSuccess; goto _NW_FINALLY; } - -#define NW_THROW_UNEXPECTED(_variable) \ - { (_variable) = (TBrowserStatusCode) KBrsrUnexpectedError; goto _NW_CATCH; } - -#define NW_THROW_ON_ERROR(_variable) \ - { if ((_variable) != (TBrowserStatusCode) KBrsrSuccess) { \ - if ((_variable) != (TBrowserStatusCode) KBrsrOutOfMemory) { \ - (_variable) = (TBrowserStatusCode) KBrsrUnexpectedError; \ - } goto _NW_CATCH; } } - -#define NW_THROW_ON(_variable, _status) \ - { if ((_variable) == (TBrowserStatusCode) (_status)) { goto _NW_CATCH; } } - -#define NW_THROW_ON_NULL(_pointer, _variable, _status) \ - { if (((void*)_pointer) == (void*) NULL) { \ - (_variable) = (TBrowserStatusCode) (_status); goto _NW_CATCH; } } - -#define NW_THROW_OOM_ON_NULL(_pointer, _variable) \ - NW_THROW_ON_NULL ((_pointer), (_variable), KBrsrOutOfMemory) - -#define NW_THROW_ON_TRAP_ERROR(_err, _status) \ - { if ((_err) != (TInt) KErrNone) { \ - if ((_err) == (TInt) KErrNoMemory) { \ - (_status) = (TBrowserStatusCode) KBrsrOutOfMemory; \ - } \ - else { \ - (_status) = (TBrowserStatusCode) KBrsrUnexpectedError; \ - } goto _NW_CATCH; } } - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_exceptions_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_factory.h --- a/webengine/wmlengine/src/object/include/nw_object_factory.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_Factory_h_ -#define _NW_Object_Factory_h_ - -#include "nw_object_core.h" -#include <stdarg.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Factory_Class_s NW_Object_Factory_Class_t; -typedef struct NW_Object_Factory_s NW_Object_Factory_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Object_Factory_InitializeObject_t) (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - NW_Object_t* object, - va_list* argList); - -typedef -TBrowserStatusCode -(*NW_Object_Factory_TerminateObject_t) (NW_Object_Factory_t* factory, - NW_Object_t* object); - -typedef -TBrowserStatusCode -(*NW_Object_Factory_NewObject_t) (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - va_list* argList, - NW_Object_t** object); - -typedef -TBrowserStatusCode -(*NW_Object_Factory_DeleteObject_t) (NW_Object_Factory_t* factory, - NW_Object_t* object); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Factory_ClassPart_s { - NW_Object_Factory_InitializeObject_t initializeObject; - NW_Object_Factory_TerminateObject_t terminateObject; - NW_Object_Factory_NewObject_t newObject; - NW_Object_Factory_DeleteObject_t deleteObject; -} NW_Object_Factory_ClassPart_t; - -struct NW_Object_Factory_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Factory_ClassPart_t NW_Object_Factory; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Factory_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Factory_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Object_Factory)) - -#define NW_Object_FactoryOf(_object) \ - (NW_Object_Cast (_object, NW_Object_Factory)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Factory_Class_t NW_Object_Factory_Class; -NW_OBJECT_EXPORT const NW_Object_Factory_t NW_Object_Factory; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Factory_InitializeObject(_factory, _objClass, _object, _argList) \ - (NW_Object_Invoke (_factory, NW_Object_Factory, initializeObject) (\ - NW_Object_FactoryOf (_factory), (_objClass), (_object), (_argList))) - -#define NW_Object_Factory_TerminateObject(_factory, _object) \ - (NW_Object_Invoke (_factory, NW_Object_Factory, terminateObject) (\ - NW_Object_FactoryOf (_factory), (_object))) - -#define NW_Object_Factory_NewObject(_factory, _objClass, _argList, _object) \ - (NW_Object_Invoke (_factory, NW_Object_Factory, newObject) (\ - NW_Object_FactoryOf (_factory), (_objClass), (_argList), (_object))) - -#define NW_Object_Factory_DeleteObject(_factory, _object) \ - (NW_Object_Invoke (_factory, NW_Object_Factory, deleteObject) (\ - NW_Object_FactoryOf (_factory), (_object))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_Factory_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_factoryi.h --- a/webengine/wmlengine/src/object/include/nw_object_factoryi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_FactoryI_h_ -#define _NW_Object_FactoryI_h_ - - -#include "nw_object_corei.h" -#include "nw_object_factory.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Factory_InitializeObject (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - NW_Object_t* object, - va_list* argList); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Factory_TerminateObject (NW_Object_Factory_t* factory, - NW_Object_t* object); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Factory_NewObject (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - va_list* argList, - NW_Object_t** object); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Factory_DeleteObject (NW_Object_Factory_t* factory, - NW_Object_t* object); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_FactoryI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_interface.h --- a/webengine/wmlengine/src/object/include/nw_object_interface.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_Interface_h_ -#define _NW_Object_Interface_h_ - -#include "nw_object_secondary.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Object_Interface - - @scope: public - - @description: Base class for all interfaces. - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Secondary_Class_s NW_Object_Interface_Class_t; -typedef struct NW_Object_Secondary_s NW_Object_Interface_t; -typedef struct NW_Object_Secondary_ClassPart_s NW_Object_Interface_ClassPart_t; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Interface_GetClassPart(_object) \ - (NW_Object_Secondary_GetClassPart (_object)) - -#define NW_Object_InterfaceOf(_object) \ - (NW_Object_SecondaryOf (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -#define NW_Object_Interface_Class NW_Object_Secondary_Class - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Interface_GetImplementer \ - NW_Object_GetOuter - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_Interface_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_interfacei.h --- a/webengine/wmlengine/src/object/include/nw_object_interfacei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_InterfaceI_h_ -#define _NW_Object_InterfaceI_h_ - -#include "nw_object_interface.h" -#include "nw_object_secondaryi.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected symbols - * ------------------------------------------------------------------------- */ -#define _NW_Object_Interface_QueryInterface \ - _NW_Object_Core_QuerySecondary - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_InterfaceI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_object.h --- a/webengine/wmlengine/src/object/include/nw_object_object.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_OBJECT_H -#define NW_OBJECT_OBJECT_H - -#include "NW_Object_EXPORT.h" -#include "nwx_defs.h" -#include "nwx_assert.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - type declarations - * ------------------------------------------------------------------------- */ -typedef void NW_Object_Class_t; -typedef void NW_Object_t; - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -#define NW_Object_Unused ((void**)0) - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#ifdef _DEBUG -#define NW_Object_Cast(_object, _type) \ - (NW_ASSERT((_object) == NULL || \ - NW_Object_IsInstanceOf (_object, &_type##_Class)), \ - ((_type##_t*) (_object))) -#else /* DEBUG */ -#define NW_Object_Cast(_object, _type) \ - ((_type##_t*) (_object)) -#endif /* DEBUG */ - -#define NW_Object_GetClassPart(_object, _type) \ - ((( _type##_Class_t*) NW_Object_Core_GetClass (_object))->_type) - -#define NW_Object_Invalidate(_object) \ - (*(NW_Object_Class_t**) (_object) = NULL, (void) 0) - -#define NW_Object_Invoke(_object, _type, _method) \ - (NW_Object_GetClassPart(_object, _type)._method) - -#if defined(LIMIT_TI_COMPILER_WARNINGS) -#define NW_OBJECT_CONSTCAST(_type) (_type) -#else -#define NW_OBJECT_CONSTCAST(_type) (_type) -#endif - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Object_GetClass(_object) \ - ((const NW_Object_Class_t*) NW_Object_Core_GetClass (_object)) - -#define NW_Object_GetSuperclass(_object) \ - (NW_Object_Core_GetClassPart (_object).super) - -#define NW_Object_IsClass(_object, _class) \ - (NW_Object_GetClass (_object) == \ - ((const NW_Object_Class_t*) (_class))) - -NW_OBJECT_EXPORT -NW_Bool -NW_Object_IsDerivedFrom (const NW_Object_Class_t* objClass, - const NW_Object_Class_t* superClass); - -NW_OBJECT_EXPORT -NW_Bool -NW_Object_IsInstanceOf (const NW_Object_t* object, - const NW_Object_Class_t* superClass); - -NW_OBJECT_EXPORT -NW_Object_t* -NW_Object_QuerySecondary (const NW_Object_t* object, - const NW_Object_Class_t* secondaryClass); - -#define NW_Object_QueryInterface(_object, _class) \ - (NW_Object_QuerySecondary((_object), (_class))) - -#define NW_Object_QueryAggregate(_object, _class) \ - (NW_Object_QuerySecondary((_object), (_class))) - -/** ----------------------------------------------------------------------- ** - @method: NW_Object_GetOuter - - @synopsis: Returns the enclosing object of the secondary. - - @scope: public - @access: final - - @parameters: - const NW_Object_t* secondary - The secondary instance for which to retrieve the - outer object. - - @description: All secondary objects have an outer primary that - encapsulates the secondary object. This method will - return an reference to that outer object that aggregates - the specified secondary. - - @returns: NW_Object_t* - If successful, the method will return the outer object of - the specified secondary. - - [NULL] - Unexpected error. - ** ----------------------------------------------------------------------- **/ -NW_OBJECT_EXPORT -NW_Object_t* -NW_Object_GetOuter (const NW_Object_t* object); - -/** ----------------------------------------------------------------------- ** - @method: NW_Object_GetPrimaryOuter - - @synopsis: Returns the primary outer object of the secondary. - - @scope: public - @access: final - - @parameters: - const NW_Object_t* instance - The secondary instance for which to retrieve the - primary outer object. - - @description: All secondary objects have a primary outer object that is - the root of the secondary object hierarchy. This method will - return an reference to that primary outer object of the - specified secondary object. - - @returns: NW_Object_t* - If successful, the method will return the primary outer - object of the specified secondary. - - [NULL] - Unexpected error. - ** ----------------------------------------------------------------------- **/ -NW_OBJECT_EXPORT -NW_Object_t* -NW_Object_GetPrimaryOuter (const NW_Object_t* object); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_OBJECT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_secondary.h --- a/webengine/wmlengine/src/object/include/nw_object_secondary.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_Secondary_h_ -#define _NW_Object_Secondary_h_ - -#include "nw_object_core.h" -#include <stddef.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Object_Secondary - - @scope: public - - @description: Base class for all secondary objects. - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Secondary_Class_s NW_Object_Secondary_Class_t; -typedef struct NW_Object_Secondary_s NW_Object_Secondary_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Secondary_ClassPart_s { - size_t offset; -} NW_Object_Secondary_ClassPart_t; - -struct NW_Object_Secondary_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Secondary_ClassPart_t NW_Object_Secondary; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Secondary_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Secondary_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Object_Secondary)) - -#define NW_Object_SecondaryOf(_object) \ - (NW_Object_Cast ((_object), NW_Object_Secondary)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Secondary_Class_t NW_Object_Secondary_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_Secondary_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_secondaryi.h --- a/webengine/wmlengine/src/object/include/nw_object_secondaryi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Object_SecondaryI_h_ -#define _NW_Object_SecondaryI_h_ - -#include "nw_object_secondary.h" -#include "nw_object_corei.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Object_SecondaryI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_shared.h --- a/webengine/wmlengine/src/object/include/nw_object_shared.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_SHARED_H -#define NW_OBJECT_SHARED_H - -#include "nw_object_dynamic.h" -#include "nwx_defs.h" -#include <stdarg.h> -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Shared_Class_s NW_Object_Shared_Class_t; -typedef struct NW_Object_Shared_s NW_Object_Shared_t; - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Object_Shared_Reserve_t) (NW_Object_Shared_t* object); - -typedef -NW_Bool -(*NW_Object_Shared_Release_t) (NW_Object_Shared_t* object); - -typedef -TBrowserStatusCode -(*NW_Object_Shared_LockObject_t) (NW_Object_Shared_t* object); - -typedef -TBrowserStatusCode -(*NW_Object_Shared_UnlockObject_t) (NW_Object_Shared_t* object); - -typedef -TBrowserStatusCode -(*NW_Object_Shared_GetObject_t) (NW_Object_Shared_t* object, - NW_Object_Dynamic_t** sharedObject); - -typedef -TBrowserStatusCode -(*NW_Object_Shared_AdoptObject_t) (NW_Object_Shared_t* object, - NW_Object_Dynamic_t* sharedObject); - -typedef -TBrowserStatusCode -(*NW_Object_Shared_OrphanObject_t) (NW_Object_Shared_t* object, - NW_Object_Dynamic_t** sharedObject); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Object_Shared_ClassPart_s { - NW_Object_Shared_Reserve_t reserve; - NW_Object_Shared_Release_t release; - NW_Object_Shared_LockObject_t lockObject; - NW_Object_Shared_UnlockObject_t unlockObject; - NW_Object_Shared_GetObject_t getObject; - NW_Object_Shared_AdoptObject_t adoptObject; - NW_Object_Shared_OrphanObject_t orphanObject; -} NW_Object_Shared_ClassPart_t; - -struct NW_Object_Shared_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Object_Shared_ClassPart_t NW_Object_Shared; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Object_Shared_s { - NW_Object_Base_t super; - - NW_Bool deleteAllowed; - NW_Int16 refCount; - NW_Bool locked; - NW_Object_Dynamic_t* sharedObject; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Object_Shared_GetClassPart(_object) \ - (NW_Object_GetClassPart ((_object), NW_Object_Shared)) - -#define NW_Object_SharedOf(_object) \ - (NW_Object_Cast ((_object), NW_Object_Shared)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT const NW_Object_Shared_Class_t NW_Object_Shared_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Object_Shared_Reserve(_object) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, reserve) \ - ((_object))) - -#define NW_Object_Shared_Release(_object) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, release) \ - ((_object))) - -#define NW_Object_Shared_LockObject(_object) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, lockObject) \ - ((_object))) - -#define NW_Object_Shared_UnlockObject(_object) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, unlockObject) \ - ((_object))) - -#define NW_Object_Shared_GetObject(_object, _sharedObject) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, getObject) \ - ((_object), (_sharedObject))) - -#define NW_Object_Shared_AdoptObject(_object, _sharedObject) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, adoptObject) \ - ((_object), (_sharedObject))) - -#define NW_Object_Shared_OrphanObject(_object, _sharedObject) \ - (NW_Object_Invoke ((_object), NW_Object_Shared, orphanObject) \ - ((_object), (_sharedObject))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -NW_Object_Shared_t* -NW_Object_Shared_New (NW_Object_Dynamic_t* object); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_SHARED_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/include/nw_object_sharedi.h --- a/webengine/wmlengine/src/object/include/nw_object_sharedi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_OBJECT_SHAREDI_H -#define NW_OBJECT_SHAREDI_H - -#include "nw_object_dynamici.h" -#include "nw_object_shared.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -NW_OBJECT_EXPORT -void -_NW_Object_Shared_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_Reserve (NW_Object_Shared_t* object); - -NW_OBJECT_EXPORT -NW_Bool -_NW_Object_Shared_Release (NW_Object_Shared_t* object); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_LockObject (NW_Object_Shared_t* object); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_UnlockObject (NW_Object_Shared_t* object); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_GetObject (NW_Object_Shared_t* object, - NW_Object_Dynamic_t** sharedObject); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_AdoptObject (NW_Object_Shared_t* object, - NW_Object_Dynamic_t* sharedObject); - -NW_OBJECT_EXPORT -TBrowserStatusCode -_NW_Object_Shared_OrphanObject (NW_Object_Shared_t* object, - NW_Object_Dynamic_t** sharedObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_OBJECT_SHAREDI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Aggregate.c --- a/webengine/wmlengine/src/object/src/Aggregate.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_aggregatei.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Aggregate_Class_t NW_Object_Aggregate_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Secondary_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ NULL, - /* construct */ NULL, - /* destruct */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - public/protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Aggregate_Initialize (NW_Object_Core_t* core, - va_list* argList) -{ - NW_TRY (status) { - /* call our superclass method */ - status = _NW_Object_Core_Initialize (core, argList); - if (status != KBrsrSuccess) { - NW_THROW (status); - } - - /* call the class constructor on the newly allocated core */ - if (NW_Object_Aggregate_GetClassPart (core).construct != NULL) { - status = NW_Object_Aggregate_Construct (core, argList); - NW_THROW_ON_ERROR (status); - } - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Object_Aggregate_Terminate (NW_Object_Core_t* core) -{ - /* call the class destructor on the object */ - if (NW_Object_Aggregate_GetClassPart (core).destruct != NULL) { - NW_Object_Aggregate_Destruct (core); - } - - /* call our superclass method */ - _NW_Object_Core_Terminate (core); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Base.c --- a/webengine/wmlengine/src/object/src/Base.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_basei.h" -#include "nw_object_secondary.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Base_Class_t NW_Object_Base_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Core.c --- a/webengine/wmlengine/src/object/src/Core.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,264 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_corei.h" -#include "nw_object_dynamici.h" -#include "nw_object_aggregatei.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -static -const NW_Object_Secondary_Class_t* const* -NW_Object_Core_GetSecondaryList (const NW_Object_Class_t* objClass) -{ - if (NW_Object_IsDerivedFrom (objClass, &NW_Object_Base_Class)) { - return (const NW_Object_Secondary_Class_t* const*) - ((NW_Object_Base_Class_t*) objClass)->NW_Object_Base.secondaryList; - } else if (NW_Object_IsDerivedFrom (objClass, &NW_Object_Aggregate_Class)) { - return (const NW_Object_Secondary_Class_t* const*) - ((NW_Object_Aggregate_Class_t*) objClass)->NW_Object_Aggregate.secondaryList; - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_Object_Core_InitializeSecondaryList (NW_Object_t* outer, - const NW_Object_Secondary_Class_t* const* secondaryList, - va_list* argList) -{ - NW_TRY (status) { - NW_Uint32 index; - - /* iterate through the secondaryList */ - for (index = 0; secondaryList[index] != NULL; index++) { - const NW_Object_Secondary_Class_t* secondaryClass; - NW_Object_Core_t* secondary; - - secondaryClass = secondaryList[index]; - secondary = (NW_Object_Core_t*) - ((char*) outer + secondaryClass->NW_Object_Secondary.offset); - - /* we only initialize secondaries if they haven't already been - initialized */ - if (secondary->objClass == NULL) { - status = NW_Object_Core_CallInitialize (secondaryClass, secondary, argList); - NW_THROW_ON_ERROR (status); - } - } - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -void -NW_Object_Core_TerminateSecondaryList (NW_Object_t* outer, - const NW_Object_Secondary_Class_t* const* secondaryList) -{ - NW_Uint32 index; - - /* iterate through the secondaryList */ - for (index = 0; secondaryList[index] != NULL; index++) { - const NW_Object_Secondary_Class_t* secondaryClass; - NW_Object_Core_t* secondary; - - secondaryClass = secondaryList[index]; - secondary = (NW_Object_Core_t*) - ((char*) outer + secondaryClass->NW_Object_Secondary.offset); - - /* we only terminate secondaries if they haven't already been - terminated */ - if (secondary->objClass != NULL) { - NW_Object_Core_CallTerminate (secondary); - } - } -} - -/* ------------------------------------------------------------------------- */ -static -NW_Object_Secondary_t* -NW_Object_Core_QuerySecondaryList (const NW_Object_t* outer, - const NW_Object_Secondary_Class_t* const* secondaryList, - const NW_Object_Class_t* queryClass) -{ - NW_Uint32 index; - NW_Object_Secondary_t* secondary; - - /* iterate through the secondaryList */ - secondary = NULL; - for (index = 0; secondary == NULL && secondaryList[index] != NULL; index++) { - const NW_Object_Secondary_Class_t* secondaryClass; - - secondaryClass = secondaryList[index]; - secondary = (NW_Object_Secondary_t*) - ((char*) outer + secondaryClass->NW_Object_Secondary.offset); - - /* we only query secondaries if they haven't been terminated */ - if (secondary->super.objClass != NULL) { - secondary = (NW_Object_Secondary_t*) NW_Object_Core_QuerySecondary (secondary, queryClass); - } - } - - if (secondary != NULL && secondary->super.objClass != NULL) { - return secondary; - } - - return NULL; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Core_Class_t NW_Object_Core_Class = { - { /* NW_Object_Core */ - /* super */ NULL, - /* querySecondary */ _NW_Object_Core_QuerySecondary - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Core_Initialize (NW_Object_Core_t* core, - va_list* argList) -{ - NW_TRY (status) { - const NW_Object_Core_Class_t* objClass = (NW_Object_Core_Class_t*) NW_Object_GetClass (core); - - /* iterate through the class hierarchy */ - while (((NW_Object_Class_t*) objClass) != &NW_Object_Core_Class) { - const NW_Object_Secondary_Class_t* const* secondaryList; - - /* get the secondary list of the class */ - secondaryList = NW_Object_Core_GetSecondaryList (objClass); - if (secondaryList != NULL) { - status = - NW_Object_Core_InitializeSecondaryList (core, secondaryList, argList); - NW_THROW_ON_ERROR (status); - } - - objClass = (const NW_Object_Core_Class_t*) objClass->NW_Object_Core.super; - } - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Object_Core_Terminate (NW_Object_Core_t* core) -{ - const NW_Object_Core_Class_t* objClass = (NW_Object_Core_Class_t*) NW_Object_GetClass (core); - - /* we start with the class of the object */ - objClass = (const NW_Object_Core_Class_t*) NW_Object_GetClass (core); - - /* iterate through the class hierarchy */ - while (((NW_Object_Class_t*) objClass) != &NW_Object_Core_Class) { - const NW_Object_Secondary_Class_t* const* secondaryList; - - /* get the secondary list of the class */ - secondaryList = NW_Object_Core_GetSecondaryList (objClass); - if (secondaryList != NULL) { - NW_Object_Core_TerminateSecondaryList (core, secondaryList); - } - - objClass = (const NW_Object_Core_Class_t*) objClass->NW_Object_Core.super; - } -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -_NW_Object_Core_QuerySecondary (const NW_Object_Core_t* core, - const NW_Object_Class_t* queryClass) -{ - const NW_Object_Core_Class_t* objClass; - - /* check ourselves first */ - if (NW_Object_IsInstanceOf (core, queryClass)) { - return (NW_Object_t*) core; - } - - /* iterate through the class hierarchy */ - objClass = (const NW_Object_Core_Class_t*) NW_Object_GetClass (core); - while (((NW_Object_Class_t*) objClass) != &NW_Object_Core_Class) { - const NW_Object_Secondary_Class_t* const* secondaryList; - - /* get the interface list of the class */ - secondaryList = NW_Object_Core_GetSecondaryList (objClass); - if (secondaryList != NULL) { - NW_Object_t* secondary; - - secondary = - NW_Object_Core_QuerySecondaryList (core, secondaryList, queryClass); - if (secondary != NULL) { - return secondary; - } - } - - /* the interface implementation was not found at this level of the class - hierarchy, let's try the superclass */ - objClass = (const NW_Object_Core_Class_t*) objClass->NW_Object_Core.super; - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Core_CallInitialize (const NW_Object_Class_t* objClass, - NW_Object_Core_t* core, - va_list* argList) -{ - /* set the class pointer */ - core->objClass = objClass; - - if (NW_Object_IsDerivedFrom (objClass, &NW_Object_Dynamic_Class)) { - return _NW_Object_Dynamic_Initialize (core, argList); - } - if (NW_Object_IsDerivedFrom (objClass, &NW_Object_Aggregate_Class)) { - return _NW_Object_Aggregate_Initialize (core, argList); - } - return _NW_Object_Core_Initialize (core, argList); -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Object_Core_CallTerminate (NW_Object_Core_t* core) -{ - if (NW_Object_IsInstanceOf (core, &NW_Object_Dynamic_Class)) { - _NW_Object_Dynamic_Terminate (core); - } else if (NW_Object_IsInstanceOf (core, &NW_Object_Aggregate_Class)) { - _NW_Object_Aggregate_Terminate (core); - } else { - _NW_Object_Core_Terminate (core); - } - - /* set the class pointer */ - *(NW_Object_Class_t**) core = NULL; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Dynamic.c --- a/webengine/wmlengine/src/object/src/Dynamic.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_dynamici.h" -#include "nw_object_aggregatei.h" -#include <nwx_mem.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Object_Base_IsEncapsulated (const NW_Object_Base_Class_t* objClass, - const NW_Object_Secondary_Class_t* secondaryClass) -{ - /* iterate through the class hierarchy */ - while (((NW_Object_Class_t*) objClass) != &NW_Object_Base_Class) { - const void* const* secondaryList; - - /* get the interface list of the class */ - secondaryList = objClass->NW_Object_Base.secondaryList; - if (secondaryList != NULL) { - NW_Uint32 index; - - for (index = 0; secondaryList[index] != NULL; index++) { - if (secondaryList[index] == secondaryClass) { - return NW_TRUE; - } - } - } - - /* the interface implementation was not found at this level of the class - hierarchy, let's try the superclass */ - objClass = (const NW_Object_Base_Class_t*) objClass->NW_Object_Core.super; - } - - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Dynamic_Class_t NW_Object_Dynamic_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Base_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Object_Dynamic_t), - /* construct */ NULL, - /* destruct */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - public/protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Dynamic_Initialize (NW_Object_Core_t* core, - va_list* argList) -{ - NW_TRY (status) { - const NW_Object_Dynamic_Class_t* objClass; - - /* zero the object */ - objClass = (const NW_Object_Dynamic_Class_t*) core->objClass; - (void) NW_Mem_memset (core, 0, objClass->NW_Object_Dynamic.instanceSize); - core->objClass = objClass; - - /* call our superclass method */ - status = _NW_Object_Core_Initialize (core, argList); - if (status != KBrsrSuccess) { - NW_THROW (status); - } - - /* call the class constructor on the newly allocated object */ - if (NW_Object_Dynamic_GetClassPart (core).construct != NULL) { - status = NW_Object_Dynamic_Construct (core, argList); - NW_THROW_ON_ERROR (status); - } - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Object_Dynamic_Terminate (NW_Object_Core_t* core) -{ - const NW_Object_Dynamic_Class_t* objClass; - - for (objClass = (const NW_Object_Dynamic_Class_t*) NW_Object_GetClass (core); - objClass != &NW_Object_Dynamic_Class; - objClass = (const NW_Object_Dynamic_Class_t*) objClass->NW_Object_Core.super) { - /* invoke the Dynamic destruct method */ - if (objClass->NW_Object_Dynamic.destruct != NULL) { - objClass->NW_Object_Dynamic.destruct ((NW_Object_Dynamic_t*) core); - } - - /* does the class have secondaries? */ - if (objClass->NW_Object_Base.secondaryList != NULL) { - size_t superOffset; - NW_Uint32 index; - - superOffset = - ((NW_Object_Dynamic_Class_t*) objClass->NW_Object_Core.super)-> - NW_Object_Dynamic.instanceSize; - - /* iterate through the secondary list in order to terminate immediate - aggregates */ - for (index = 0; - objClass->NW_Object_Base.secondaryList[index] != NULL; - index++) { - const NW_Object_Secondary_Class_t* secondaryClass; - size_t secondaryOffset; - NW_Object_Secondary_t* secondary; - - secondaryClass = (NW_Object_Secondary_Class_t*) - objClass->NW_Object_Base.secondaryList[index]; - secondaryOffset = secondaryClass->NW_Object_Secondary.offset; - secondary = - (NW_Object_Secondary_t*) ((NW_Byte*) core + secondaryOffset); - - /* ignore tagged secondaries */ - if (*(void**) secondary == NULL) { - continue; - } - - /* ignore secondaries that are not aggregates, i.e. interfaces */ - if (!NW_Object_IsDerivedFrom (secondaryClass, - &NW_Object_Aggregate_Class)) { - /* tag the secondary such that we don't process it again */ - *(void**) secondary = NULL; - continue; - } - - /* traverse up the aggregate class hierarchy destroying all that are - not referenced by our superclass secondary list */ - while (secondaryClass != (void*) &NW_Object_Aggregate_Class) { - const NW_Object_Aggregate_Class_t* aggregateClass; - - if (secondaryOffset < superOffset && - NW_Object_Base_IsEncapsulated ((const NW_Object_Base_Class_t*) - objClass->NW_Object_Core.super, secondaryClass)) { - break; - } - - aggregateClass = (NW_Object_Aggregate_Class_t*) secondaryClass; - if (aggregateClass->NW_Object_Aggregate.destruct != NULL) { - aggregateClass->NW_Object_Aggregate. - destruct ((NW_Object_Aggregate_t*) secondary); - } - secondaryClass = (const NW_Object_Secondary_Class_t*) secondaryClass->NW_Object_Core.super; - } - - /* if we reached the aggregate class, tag it as done */ - if (secondaryClass == (void*) &NW_Object_Aggregate_Class) { - *(void**) secondary = NULL; - } - } - } - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Factory.c --- a/webengine/wmlengine/src/object/src/Factory.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_factoryi.h" -#include "nw_object_dynamic.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Factory_Class_t NW_Object_Factory_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_Object_Factory */ - /* initializeObject */ _NW_Object_Factory_InitializeObject, - /* terminateObject */ _NW_Object_Factory_TerminateObject, - /* newObject */ _NW_Object_Factory_NewObject, - /* deleteObject */ _NW_Object_Factory_DeleteObject - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Object_Factory_t NW_Object_Factory = { - { &NW_Object_Factory_Class } -}; - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Factory_InitializeObject (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - NW_Object_t* object, - va_list* argList) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (factory, &NW_Object_Factory_Class)); - NW_ASSERT (NW_Object_IsDerivedFrom (objClass, &NW_Object_Dynamic_Class)); - NW_ASSERT (object != NULL); - NW_ASSERT (argList != NULL); - - /* avoid unreferenced formal parameter warnings */ - (void) factory; - - return NW_Object_Core_CallInitialize (objClass, object, argList); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Factory_TerminateObject (NW_Object_Factory_t* factory, - NW_Object_t* object) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (factory, &NW_Object_Factory_Class)); - - /* avoid unreferenced formal parameter warnings */ - (void) factory; - - /* ok, lets be forgiving and ignore NULL pointers */ - if (object == NULL) { - return KBrsrBadInputParam; - } - - /* ensure that we have the pointer to the implementation object and that it - is of type NW_Object_Dynamic */ - if (!NW_Object_IsInstanceOf (object, &NW_Object_Dynamic_Class)) { - object = NW_Object_GetPrimaryOuter (object); - if (!NW_Object_IsInstanceOf (object, &NW_Object_Dynamic_Class)) { - return KBrsrBadInputParam; - } - } - - NW_Object_Core_CallTerminate (object); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Factory_NewObject (NW_Object_Factory_t* factory, - const NW_Object_Class_t* objClass, - va_list* argList, - NW_Object_t** object) -{ - NW_Object_t* newObject; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (factory, &NW_Object_Factory_Class)); - NW_ASSERT (NW_Object_IsDerivedFrom (objClass, &NW_Object_Dynamic_Class)); - NW_ASSERT (argList != NULL); - NW_ASSERT (object != NULL); - - NW_TRY (status) { - NW_Uint32 instanceSize; - - /* allocate the object */ - instanceSize = - ((NW_Object_Dynamic_Class_t*) objClass)->NW_Object_Dynamic.instanceSize; - newObject = NW_Mem_Malloc (instanceSize); - NW_THROW_OOM_ON_NULL (newObject, status); - - /* initialize the newly allocated object */ - status = NW_Object_Factory_InitializeObject (factory, objClass, - newObject, argList); - NW_THROW_ON_ERROR (status); - - *object = newObject; - } NW_CATCH (status) { - (void) NW_Object_Factory_DeleteObject (factory, newObject); - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Factory_DeleteObject (NW_Object_Factory_t* factory, - NW_Object_t* object) -{ - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (factory, &NW_Object_Factory_Class)); - - status = NW_Object_Factory_TerminateObject (factory, object); - if (status != KBrsrBadInputParam) { - NW_Mem_Free (object); - } - return status; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Interface.c --- a/webengine/wmlengine/src/object/src/Interface.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_interfacei.h" diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/MakeSrc --- a/webengine/wmlengine/src/object/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_object_src_lib.a - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = Aggregate.c Base.c Core.c Dynamic.c Interface.c ISADelegate.c \ - Object.c Secondary.c Shared.c Factory.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Object.c --- a/webengine/wmlengine/src/object/src/Object.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_dynamici.h" -#include "nw_object_secondaryi.h" -#include "nw_object_factory.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Object_Initialize (const NW_Object_Class_t* objClass, - NW_Object_t* object, ...) -{ - NW_TRY (status) { - va_list argList; - - va_start (argList, object); - status = - NW_Object_Factory_InitializeObject (&NW_Object_Factory, objClass, - object, &argList); - va_end (argList); - NW_THROW_ON_ERROR (status); - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -void -NW_Object_Terminate (NW_Object_t* object) -{ - (void) NW_Object_Factory_TerminateObject (&NW_Object_Factory, object); -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -NW_Object_New (const NW_Object_Class_t* objClass, ...) -{ - TBrowserStatusCode status; - NW_Object_t* object; - va_list argList; - - va_start (argList, objClass); - status = NW_Object_Factory_NewObject (&NW_Object_Factory, objClass, &argList, - &object); - va_end (argList); - if (status != KBrsrSuccess) { - return NULL; - } - return object; -} - -/* ------------------------------------------------------------------------- */ -void -NW_Object_Delete (NW_Object_t* object) -{ - (void) NW_Object_Factory_DeleteObject (&NW_Object_Factory, object); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Object_IsDerivedFrom (const NW_Object_Class_t* objClass, - const NW_Object_Class_t* superClass) -{ - while (objClass != NULL && objClass != superClass) { - objClass = - ((NW_Object_Core_Class_t*) objClass)->NW_Object_Core.super; - } - return (NW_Bool) (objClass == superClass); -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Object_IsInstanceOf (const NW_Object_t* object, - const NW_Object_Class_t* superClass) -{ - /* deal with NULL objects */ - if (object == NULL || *(NW_Object_Class_t**) object == NULL) { - return NW_FALSE; - } - return NW_Object_IsDerivedFrom (*(NW_Object_Class_t**) object, superClass); -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -NW_Object_QuerySecondary (const NW_Object_t* object, - const NW_Object_Class_t* secondaryClass) -{ - NW_Object_t* primary; - - /* we always perform queries on the primary outer object */ - primary = NW_Object_GetPrimaryOuter (object); - return NW_Object_Core_QuerySecondary (primary, secondaryClass); -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -NW_Object_GetOuter (const NW_Object_t* object) -{ - if (NW_Object_IsInstanceOf (object, &NW_Object_Secondary_Class)) { - return (char*) object - NW_Object_Secondary_GetClassPart (object).offset; - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -NW_Object_GetPrimaryOuter (const NW_Object_t* object) -{ - NW_Object_t* outer; - - if ((outer = NW_Object_GetOuter (object)) != NULL) { - return NW_Object_GetPrimaryOuter (outer); - } - return (NW_Object_t*) object; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Secondary.c --- a/webengine/wmlengine/src/object/src/Secondary.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_secondaryi.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Object_Secondary_Class_t NW_Object_Secondary_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ 0 - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/object/src/Shared.c --- a/webengine/wmlengine/src/object/src/Shared.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,239 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_sharedi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public consts - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - internal methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Shared_Class_t NW_Object_Shared_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Object_Shared_t), - /* construct */ _NW_Object_Shared_Construct, - /* destruct */ _NW_Object_Shared_Destruct - }, - { /* NW_Onject_Shared */ - /* reserve */ _NW_Object_Shared_Reserve, - /* release */ _NW_Object_Shared_Release, - /* lockObject */ _NW_Object_Shared_LockObject, - /* unlockObject */ _NW_Object_Shared_UnlockObject, - /* getObject */ _NW_Object_Shared_GetObject, - /* adoptObject */ _NW_Object_Shared_AdoptObject, - /* orphanObject */ _NW_Object_Shared_OrphanObject - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Object_Shared_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Object_Shared_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_Object_SharedOf (dynamicObject); - - /* extract the object to be shared */ - thisObj->sharedObject = (NW_Object_Dynamic_t*) va_arg (*argp, NW_Object_Dynamic_t*); - - thisObj->deleteAllowed = NW_FALSE; - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Object_Shared_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_Object_Shared_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_Object_Shared_Class)); - - /* for convenience */ - thisObj = NW_Object_SharedOf (dynamicObject); - - /* - ** never call NW_Object_Delete directly (unless it was never reserved), - ** use NW_Object_Shared_Release instead - */ - NW_ASSERT ((thisObj->deleteAllowed == NW_TRUE) || (thisObj->refCount == 0)); - - /* deallocate our dynamic data */ - NW_Object_Delete (thisObj->sharedObject); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_Reserve (NW_Object_Shared_t* thisObj) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - - thisObj->refCount++; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_Object_Shared_Release (NW_Object_Shared_t* thisObj) -{ - NW_Bool deleted = NW_FALSE; - - if (thisObj != NULL) { - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - - thisObj->refCount--; - - NW_ASSERT (thisObj->refCount >= 0); - - /* delete our self if the ref-count reaches zero */ - if (thisObj->refCount <= 0) { - thisObj->deleteAllowed = NW_TRUE; - NW_Object_Delete (thisObj); - - deleted = NW_TRUE; - } - } - - return deleted; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_LockObject (NW_Object_Shared_t* thisObj) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - - thisObj->locked = NW_TRUE; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_UnlockObject (NW_Object_Shared_t* thisObj) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - - thisObj->locked = NW_FALSE; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_GetObject (NW_Object_Shared_t* thisObj, - NW_Object_Dynamic_t** sharedObject) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - NW_ASSERT (sharedObject); - NW_ASSERT (NW_Object_IsInstanceOf (*sharedObject, &NW_Object_Dynamic_Class)); - - *sharedObject = thisObj->sharedObject; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_AdoptObject (NW_Object_Shared_t* thisObj, - NW_Object_Dynamic_t* sharedObject) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - - if (sharedObject != NULL) { - NW_ASSERT (NW_Object_IsInstanceOf (sharedObject, &NW_Object_Dynamic_Class)); - } - - if (thisObj->locked == NW_TRUE) { - return KBrsrFailure; - } - - /* delete the old object */ - if (sharedObject != thisObj->sharedObject) { - NW_Object_Delete (thisObj->sharedObject); - } - - thisObj->sharedObject = sharedObject; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Object_Shared_OrphanObject (NW_Object_Shared_t* thisObj, - NW_Object_Dynamic_t** sharedObject) -{ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Object_Shared_Class)); - NW_ASSERT (sharedObject); - - if (thisObj->locked == NW_TRUE) { - return KBrsrFailure; - } - - *sharedObject = thisObj->sharedObject; - thisObj->sharedObject = NULL; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Object_Shared_t* -NW_Object_Shared_New (NW_Object_Dynamic_t* object) -{ - return (NW_Object_Shared_t*) NW_Object_New (&NW_Object_Shared_Class, - object); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/nwx_http_header.h --- a/webengine/wmlengine/src/script/include/nwx_http_header.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: HTTP commonly used constants - - Version: V1.0 - - Description: - Definintions of commonly used HTTP constants. - -******************************************************************/ - -#ifndef NW_HTTP_HEADER_H -#define NW_HTTP_HEADER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_Http_Header_t void -#define NW_Http_ContentTypeString_t NW_Uint8* -#define NW_Http_CharSet_t NW_Uint16 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_HTTP_HEADER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/nwx_script_handler.h --- a/webengine/wmlengine/src/script/include/nwx_script_handler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _nwx_script_handler_h -#define _nwx_script_handler_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* incoming messages */ -TBrowserStatusCode NW_Script_Startreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Getvarresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Setvarresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Loadurlresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Loadprevresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Refreshresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Newcontextresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Exitreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Resumereq(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Dialogalertresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Notifyerrorresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Dialogconfirmresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Dialogpromptresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Urlloadresp(TBrowserStatusCode status, NW_Uint16 transId, NW_Int32 chunkIndex, - void *loadContext, NW_Url_Resp_t *resp); -TBrowserStatusCode NW_Script_Goresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Finishnodialogresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Suspendresp(NW_Msg_t *msg); - -/* outgoing messages */ -TBrowserStatusCode NW_Script_Getvar(NW_Ucs2 *name); -TBrowserStatusCode NW_Script_Setvar(NW_Ucs2 *name, NW_Ucs2 *value); -TBrowserStatusCode NW_Script_Loadprev(void); -TBrowserStatusCode NW_Script_Refresh(void); -TBrowserStatusCode NW_Script_Newcontext(void); -TBrowserStatusCode NW_Script_Finish(void); -TBrowserStatusCode NW_Script_Dialogalert(const NW_Ucs2 *message); -TBrowserStatusCode NW_Script_Dialogconfirm(const NW_Ucs2 *message, const NW_Ucs2 *yesStr, - const NW_Ucs2 *noStr); -TBrowserStatusCode NW_Script_Dialogprompt(const NW_Ucs2 *message, const NW_Ucs2 *defaultInput); -TBrowserStatusCode NW_Script_Load(NW_Ucs2 *url); -TBrowserStatusCode NW_Script_Go(NW_Ucs2 *url); -TBrowserStatusCode NW_Script_Notifyerror(TBrowserStatusCode status); -TBrowserStatusCode NW_Script_Finishnodialog(NW_Byte status, NW_Ucs2 *msg); -TBrowserStatusCode NW_Script_Suspend(void); - -/* wtai declarations */ - -/* public library */ -TBrowserStatusCode NW_Script_wp_makeCall(NW_Ucs2 *number); -TBrowserStatusCode NW_Script_wp_sendDTMF(NW_Ucs2 *dtmf); -TBrowserStatusCode NW_Script_wp_addPBEntry(NW_Ucs2 *number, NW_Ucs2 *name); - -/* Nokia proprietary */ -TBrowserStatusCode NW_Script_nokia_locationInfo(NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format); - -TBrowserStatusCode NW_Script_CryptoSignTextStart(NW_Ucs2 *stringToSign, NW_Int32 option, - NW_Int32 keyIdType, NW_Byte *keyIdByte, NW_Int32 keyIdLen); - - -TBrowserStatusCode NW_Script_wtaiResp(NW_Msg_t *msg); - -#ifdef __cplusplus -} -#endif /* extern "C" */ - -#endif /*_nwx_script_handler_h*/ - -/* END here */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_api.h --- a/webengine/wmlengine/src/script/include/scr_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef SCR_API_H -#define SCR_API_H - -#include "scr_defs.h" -#include "scr_core.h" -#include "scr_context.h" - -#include "nw_wml_defs.h" -#include "nwx_msg_api.h" -#include "BrsrStatusCodes.h" - - - - - -/* Crypto Lib API. Used when the User digitally signs a Text */ -NW_Bool ScriptAPI_signText(NW_Ucs2 *stringToSign, NW_Int32 option, NW_Int32 keyIdType, NW_Byte *keyIdByte, NW_Int32 keyIdLen); - -/* Ask for the current context */ -context_t *ScriptAPI_getCurrentContext(void); - - -/* - Make a request to load a URL. The interperter should exit after making the request. - If the URL contains WMLScript content - - The response should call the callback function CoreScript_LoadScript_CB() -*/ -NW_Bool ScriptAPI_load(NW_Ucs2* url); - -/* - Make a request to load a URL with a specific mime type. The - interperter should exit after making the request. - The return content is not guaranteed to have the specified mimetype. - The response should call the callback function CoreScript_LoadScript_CB() -*/ -NW_Bool ScriptAPI_loadString(const NW_Ucs2* url, char *mimetype); - - -/* Same as ScriptAPI_load called to reload the current script URL */ -NW_Bool ScriptAPI_reload(void); - - -/* - Ask the WML browser for a the value of a variable. The interperter should - exit after making the request. - The response should call the callback function CoreScript_GetVar_CB(). -*/ -NW_Bool ScriptAPI_getVar(NW_Ucs2* name); - - -/* - Ask the WML browser to set a variable value. The interperter should - exit after making the request. - The response should call the callback function CoreScript_SetVar_CB(). -*/ -NW_Bool ScriptAPI_setVar(NW_Ucs2* name, NW_Ucs2* value); - - -/* - Ask the WML browser to execute a <GO> task when The interperter finishes executing the script. - The interperter should exit after making the request. - The response should call the callback function CoreScript_Go_CB(). -*/ -NW_Bool ScriptAPI_go(NW_Ucs2 *url); - - -/* - Ask the WML browser to execute a <PREV> task when The interperter finishes executing the script. - The interperter should exit after making the request. - The response should call the callback function CoreScript_Prev_CB(). -*/ -NW_Bool ScriptAPI_prev(void); - - -/* - Ask the WML browser to execute a <REFRESH> task. - The response should call the callback function CoreScript_Refresh_CB(). -*/ -NW_Bool ScriptAPI_refresh(void); - -/* - Ask the WML browser to start a new context, The interperter should - exit after making the request. - The response should call the callback function CoreScript_Go_CB(). -*/ -NW_Bool ScriptAPI_newContext(void); - - -/* - Ask the WML browser to suspend itself. The interperter should - exit after making the request. - The response should call the callback function CoreScript_Resume(). - - This function is called priodically to allow processing of pending requests. -*/ -NW_Bool ScriptAPI_suspend(void); - - -/* - Called when the interperter finishes executing The interperter (status determine if the - termination was normal or abnormal). The status codes are listed in scr_defs.h -*/ -NW_Bool ScriptAPI_finish(NW_Byte status, NW_Ucs2 *msg); -NW_Bool ScriptAPI_finishNoDialog(NW_Byte status, NW_Ucs2 *msg); - -/* public library */ -NW_Bool ScriptAPI_wp_makeCall(NW_Ucs2 *number); -NW_Bool ScriptAPI_wp_sendDTMF(NW_Ucs2 *dtmf); -NW_Bool ScriptAPI_wp_addPBEntry(NW_Ucs2 *number, NW_Ucs2 *name); - -/* Nokia proprietary */ -NW_Bool ScriptAPI_nokia_locationInfo(NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format); - -/* - ASK the OS to display a prompt dialog, The interperter should exit after making the request. - The response should call the callback function NW_WmlsDialog_PromptResp(). -*/ -NW_Bool NW_WmlsDialog_Prompt(const NW_Ucs2 *message, const NW_Ucs2 *defaultInput); - - -/* - Ask the OS to display a confirm dialog, The interperter should exit after making the request. - The response should call the callback function NW_WmlsDialog_ConfirmResp(). -*/ -NW_Bool NW_WmlsDialog_Confirm(const NW_Ucs2 *message, const NW_Ucs2 *yes_str, - const NW_Ucs2 *no_str); - - -/* - Ask the OS to display an alert dialog, The interperter should exit after making the request. - The response should call the callback function NW_WmlsDialog_AlertResp(). -*/ -NW_Bool NW_WmlsDialog_Alert(const NW_Ucs2 *message); - - -/* - Ask the OS to display an error dialog, The interperter should exit after making the request. - The response should call the callback function NW_WmlsDialog_NotifyerrorResp(). -*/ -NW_Bool NW_WmlsDialog_Error(const TBrowserStatusCode nwStatus); - - -/* Ask from the OS the script libraries table */ -lib_function_table_t *ScriptAPI_get_lib_table(void); -NW_Int32 ScriptAPI_get_lib_index(NW_Int32 libId); - -/* Added functions to avoid static function table */ -lib_function_table_t* GetLibFuncTabContext(void); -void SetLibFuncTabContext(lib_function_table_t* context); - -/* native character set */ -NW_Int32 ScriptAPI_character_set(void); -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_browser.h --- a/webengine/wmlengine/src/script/include/scr_browser.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_browser.h $ - - Purpose: - - This file is used by the scr_browser.c. It defines the prototypes - for all the functions used by the WMLBrowser's standard library. - */ - -#ifndef SCR_BROWSER_H -#define SCR_BROWSER_H - -#include "scr_core.h" - -void populate_browser_lib(lib_function_table_t *table); -NW_Byte size_browser_lib(void); - -#endif /*SCR_BROWSER_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_constpool.h --- a/webengine/wmlengine/src/script/include/scr_constpool.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: scr_constpool.h $ - - Purpose: - - This file is used by the scr_constpool.c. It defines the prototypes - for all the functions used by the constant pool. -*/ - -#ifndef SCR_CONSTPOOL_H -#define SCR_CONSTPOOL_H - -#include "scr_val.h" - -typedef struct { - val_t *vals; - NW_Uint16 size; - NW_Uint16 charset; -} constpool_t; - -constpool_t *create_cp(NW_Int32 size, NW_Int32 charset); - -void append_cp_int(NW_Int32 index, NW_Int32 v); -void append_cp_float(NW_Int32 index, NW_Float32 f); -void append_cp_string(NW_Int32 index, str_t s); - -val_t get_const(NW_Int32 index); -NW_Bool valid_const_index(NW_Int32 index); -NW_Bool is_const_string(NW_Int32 index); - -void free_cp(constpool_t *cp); - -#endif /* SCR_CONSTPOOL_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_context.h --- a/webengine/wmlengine/src/script/include/scr_context.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - /* - $Workfile: scr_context.h $ - - Purpose: - - This file is used by the scr_context.h. It defines the scr_context - structure and the prototypes for all the functions used by the ScriptServer - context. - - */ - -#ifndef SCR_CONTEXT_H -#define SCR_CONTEXT_H - -#include "scr_estack.h" -#include "scr_frstack.h" -#include "scr_fcns.h" -#include "scr_constpool.h" -#include "nwx_http_header.h" - -typedef enum -{ - RUNNING, - IDLE, - SUSPEND, - URL_REQ, - RELOAD, - LOADSTRING_REQ -} ctx_state_e; - - -typedef struct { - - NW_Ucs2 *fname; - NW_Uint8 args; -} call_str; - -typedef struct { - - call_str *cs; - - estack_t *es; - frstack_t *fs; - - constpool_t *cp; - funcpool_t *fp; - fname_table_t *fn; - - NW_Uint16 access_path; - NW_Uint16 access_domain; - NW_Bool access_public; - - NW_Byte errorCode; - ctx_state_e state; - NW_Http_ContentTypeString_t loadStringMime; - NW_Ucs2* msg; - - NW_Uint16 suspend_counter; - -} context_t; - -/* clear the context associated with the application */ -void clear_url_context(context_t *ctx); - -constpool_t *get_ctx_constpool(context_t *ctx); -void set_ctx_constpool(context_t *ctx, constpool_t *cp); - -funcpool_t *get_ctx_funcpool(context_t *ctx); -void set_ctx_funcpool(context_t *ctx, funcpool_t *fp); - -fname_table_t *get_ctx_fname_table(context_t *ctx); -void set_ctx_fname_table(context_t *ctx, fname_table_t *fn); - -estack_t *get_ctx_estack(context_t *ctx); -void set_ctx_estack(context_t *ctx, estack_t *es); - -frstack_t *get_ctx_frstack(context_t *ctx); -void set_ctx_frstack(context_t *ctx, frstack_t *fs); - -NW_Bool set_ctx_call_str(context_t *ctx, NW_Ucs2 *fname, NW_Byte args); - -NW_Uint8 get_ctx_args_no(context_t *ctx); -NW_Ucs2 *get_ctx_fname(context_t *ctx); - -NW_Bool was_calling(context_t *ctx); -void delete_call_str(context_t *ctx); - -void clear_context(context_t *ctx); - -void set_ctx_state(context_t *ctx, ctx_state_e state); -ctx_state_e get_ctx_state(context_t *ctx); - -void set_ctx_error_code(context_t *ctx, NW_Byte b); -NW_Byte get_ctx_error_code(context_t *ctx); - -void set_ctx_error_msg(context_t *ctx, NW_Ucs2* msg); -NW_Ucs2* get_ctx_error_msg(context_t *ctx); - -NW_Bool find_function_index(context_t *ctx, NW_Ucs2 *fname, NW_Byte *index); - -NW_Bool should_suspend(context_t *ctx); - -#endif /* SCR_CONSTPOOL_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_conv.h --- a/webengine/wmlengine/src/script/include/scr_conv.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_conv.h $ - - Purpose: - */ - -#ifndef SCR_CONV_H -#define SCR_CONV_H - -#include "scr_val.h" - -NW_Ucs2 *str2ucs2(str_t str); -str_t ucs22str(NW_Ucs2 *str); -str_t ucs2ch2str(NW_Ucs2 ch); -char *str2ascii(str_t s); -NW_Bool str2int(str_t s, NW_Int32 *res, NW_Bool *consumeAll); -NW_Bool str2float(str_t s, NW_Float32 *res, NW_Bool *consumeAll); -str_t int2str(NW_Int32 i); -str_t float2str(NW_Float32 f); -str_t bool2str(NW_Bool b); - -str_t scr_format(NW_Ucs2 *format, val_t v, NW_Bool *retval); -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_core.h --- a/webengine/wmlengine/src/script/include/scr_core.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef SCR_CORE_H -#define SCR_CORE_H - -#include "scr_defs.h" -#include "scr_srv.h" -#include "scr_msgs.h" -#include "nw_wae_reader.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - - - -typedef NW_Bool lib_function(void); - -typedef struct { - NW_Byte arg_size; /* no of args */ - lib_function *fp; - NW_Bool is_async; -} lib_function_t; - - -#define NO_OF_BROWSER_FUNCS 7 -#define NO_OF_DEBUG_FUNCS 3 -#define NO_OF_CRYPTO_FUNCS 1 -#define NO_OF_DIALOG_FUNCS 3 -#define NO_OF_FLOAT_FUNCS 8 -#define NO_OF_LANG_FUNCS 15 -#define NO_OF_STRING_FUNCS 16 -#define NO_OF_URL_FUNCS 14 -#define NO_OF_NOKIA_FUNCS 1 - -typedef const lib_function_t *lib_function_table_t[NO_OF_STD_LIBS]; - -void initialize_core_script(void); - -/* transfer ownership of url and referer to the script interpreter. */ -void CoreScript_InitiateScript(NW_Ucs2 *url, - NW_Ucs2 *postfields, - NW_Ucs2 *referer, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_CharSet_t charset); - -void CoreScript_Suspend(void); -void CoreScript_GetVar_CB(TBrowserStatusCode status, NW_Ucs2 *var_name, NW_Ucs2 *var_value); -void CoreScript_SetVar_CB(TBrowserStatusCode status); -void CoreScript_Go_CB(TBrowserStatusCode status); -void CoreScript_Prev_CB(TBrowserStatusCode status); -void CoreScript_NewContext_CB(TBrowserStatusCode status); -void CoreScript_Refresh_CB(TBrowserStatusCode status); - -/* Crypto Lib Callback */ -void CoreScript_SignText_CB(TBrowserStatusCode status, NW_Byte* Text, NW_Int32 length); - -/* transfer ownership of content to the script interpreter. */ -NW_Bool CoreScript_LoadScript_CB(TBrowserStatusCode status, - NW_Ucs2 *url, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_CharSet_t charset); - -/* transfer ownership of content to the script interpreter. */ -NW_Bool CoreScript_LoadString_CB(TBrowserStatusCode status, - NW_Uint32 httpStatus, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_ContentTypeString_t contentTypeString, - const NW_Http_CharSet_t charset); - -void CoreScript_Resume(void); - -void NW_WmlsDialog_PromptResp(NW_Ucs2 *input); -void NW_WmlsDialog_ConfirmResp(NW_Bool result); -void NW_WmlsDialog_AlertResp(void); -void NW_WmlsDialog_NotifyerrorResp(void); - - -void CoreScript_Wtai_CB(NW_Opaque_t *result); - -void set_error_code(NW_Byte b); -NW_Byte get_error_code(void); - -void set_error_msg(NW_Ucs2* msg); -NW_Ucs2* get_error_msg(void); - -NW_Bool call_lib_func(NW_Uint16 lib_index, NW_Byte func_index, NW_Bool *async); - -#endif /* SCR_CORE_H */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_crypto.h --- a/webengine/wmlengine/src/script/include/scr_crypto.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* Created by araman on 05/31/00 for Crypto Library. */ - - -#ifndef SCR_CRYPTO_H -#define SCR_CRYPTO_H - -#include "scr_core.h" - -typedef enum { - SignatureAlgorithmRsaSha1 = 0x01 -}SignatureAlgorithm_t; - -typedef enum { - SignatureIdKeyHash = 1 -}SIgnatureIdType_t; -/* This is defined by the spec */ -typedef enum { - SignatureCertificateTypeWtls = 2, - SignatureCertificateTypeX509 = 3, - SignatureCertificateTypeX968 = 4, - SignatureCertificateTypeURL = 5 -}SignatureCertificateType_t; - -typedef enum { - SignatureContentTypeText = 1, - SignatureContentTypeData = 2 -}SignatureContentType_t; - -typedef enum { - SignatureAuthenticatedAttributeGmtUtcTime = 1, - SignatureAuthenticatedAttributeSignerNonce = 2 -} SignatureAuthenticatedAttribute_t; - -typedef enum { - SignatureIncludeContent = 1, - SignatureIncludeKeyHash = 2, - SignatureIncludeCertificate = 4 -} SignatureInclude_t; - -typedef enum { - SignatureKeyIdentifierNone = 0, - SignatureKeyIdentifierUserKeyHash = 1, - SignatureKeyIdentifierTrustedKeyHash = 2 -} SignatureKeyIdentifier_t; - -typedef enum { - SignStateInit=0, - SignStateGetSelectedCert, - SignStateGetPIN, - SignStateGetSignature, - SignStateBuildSignature, - SignStateAddCertificateContent, - SignStateFinish, - SignStateError -} SignState_t; - -typedef struct { - NW_Byte algorithm; - NW_Uint16 signLen; - NW_Byte *sign; -} Signature; - -typedef struct { - NW_Uint8 signerInfoType; - NW_Uint16 signerInfoLen; - NW_Byte* signerInfo; -} SignerInfo; - -typedef struct { - NW_Uint8 contentType; - NW_Uint16 contentEncoding; - NW_Bool contentPresent; - NW_Uint16 contentLen; - NW_Byte* content; -} ContentInfo; - -typedef struct { - NW_Uint8 attributeType; - NW_Uint8 gmtUtcTime[12]; -} AuthenticatedAttribute; - -typedef struct { - NW_Uint8 version; - NW_Uint8 signerInfoCount; - Signature *signature; - SignerInfo **signerInfos; - ContentInfo *contentInfo; - AuthenticatedAttribute *authenticatedAttribute; -} SignedContent; - - -typedef struct { - SignState_t state; - NW_Ucs2 *stringToSign; - NW_Int32 option; - NW_Int32 keyIdType; - NW_Byte *keyIdByte; - NW_Int32 keyIdLen; - NW_Uint8 certNum; - void **certificatesList; - void *selectedCertRef; - void *selectedKeyRef; - SignedContent *signedContent; -}SignTextParams_t; - -void populate_crypto_lib(lib_function_table_t *table); -NW_Byte size_crypto_lib(void); - -/* Init the SignTextParams_t struct */ -SignTextParams_t* -NW_ScrCrypto_SignTextParamsNew(SignState_t state, NW_Ucs2 *stringToSign, NW_Int32 option, - NW_Int32 keyIdType, NW_Byte *keyIdByte, NW_Int32 keyIdLen, NW_Uint8 certNum, - void **certificatesList, void *selectedCertRef, void *selectedKeyRef); -/* Free the SignTextParams_t struct */ -void NW_ScrCrypto_SignTextParamsFree(SignTextParams_t *params); - -#endif /*SCR_CRYPTO_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_debug.h --- a/webengine/wmlengine/src/script/include/scr_debug.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_debug.h $ - - Purpose: - Debug library - - */ - -#ifndef SCR_DEBUG_H -#define SCR_DEBUG_H - -#include "scr_core.h" - -void populate_debug_lib(lib_function_table_t *table); -NW_Byte size_debug_lib(void); - -#endif /*SCR_DEBUG_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_defs.h --- a/webengine/wmlengine/src/script/include/scr_defs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_defs.h $ - - Purpose: - - This file contains generic definition needed by the ScriptServer core files. - */ - -#ifndef SCR_DEFS_H -#define SCR_DEFS_H - -#include "nwx_defs.h" - -/* constant pool types */ -#define CP_TYPE_8_BIT_SIGNED_INT 0 -#define CP_TYPE_16_BIT_SIGNED_INT 1 -#define CP_TYPE_32_BIT_SIGNED_INT 2 -#define CP_TYPE_32_BIT_FLOAT 3 -#define CP_TYPE_UTF8_STRING 4 -#define CP_TYPE_EMPTY_STRING 5 -#define CP_TYPE_EXT_STRING 6 - - -#define SCR_MIN_INT NW_INT32_MIN -#define SCR_MAX_INT NW_INT32_MAX - -#define SCR_MIN_FLOAT NW_FLOAT32_MIN -#define SCR_MAX_FLOAT NW_FLOAT32_MAX - -#define MAX_CHAR_GROUP_LEN 16 -#define MAX_STR_LEN 128 - -#define MAX_FRAME_SIZE 30 -#define MAX_EXPR_DEPTH 20 - - -/* Status Codes */ - -#define SCR_ERROR_NO_ERROR 0x00 -#define SCR_ERROR_VERIFICATION_FAILED 0x01 -#define SCR_ERROR_FATAL_LIBRARY_FUNCTION_ERROR 0x02 -#define SCR_ERROR_INVALID_FUNCTION_ARGUMENTS 0x03 -#define SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND 0x04 -#define SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT 0x05 -#define SCR_ERROR_ACCESS_VIOLATION 0x06 -#define SCR_ERROR_STACK_UNDERFLOW 0x07 -#define SCR_ERROR_STACK_OVERFLOW 0x08 -#define SCR_ERROR_OUT_OF_MEMORY 0x09 - -#define SCR_ERROR_USER_EXIT 0x0a -#define SCR_ERROR_USER_ABORT 0x0b - -#endif /*SCR_DEFS_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_dialog.h --- a/webengine/wmlengine/src/script/include/scr_dialog.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - /* - $Workfile: scr_dialog.h $ - - Purpose: - - This file is used by the scr_dialog.c. It defines the prototypes - for all the functions used by the Dialog's standard library. - */ - -#ifndef SCR_DIALOG_H -#define SCR_DIALOG_H - -#include "scr_core.h" - -void populate_dialog_lib(lib_function_table_t *table); -NW_Byte size_dialog_lib(void); - -#endif /*SCR_DIALOG_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_estack.h --- a/webengine/wmlengine/src/script/include/scr_estack.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_estack.h $ - - Purpose: - This file is used by the scr_estack.c. It defines the prototypes - for all the functions used by the execution stack. - - */ - -#ifndef SCR_estack_H -#define SCR_estack_H - -#include "scr_val.h" - -typedef struct { - val_t *ops; - NW_Int32 capacity; - NW_Int32 size; -} estack_t; - -NW_Bool create_estack(void); - -val_t pop_estack(void); - -void pop_estack_and_free(void); - -void push_estack(val_t v); - -void push_estack_and_free(val_t *vptr); - -NW_Bool is_estack_empty(void); - -void free_estack(estack_t *st); - -#endif /*SCR_COMMON_INFO_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_fcns.h --- a/webengine/wmlengine/src/script/include/scr_fcns.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - /* - $Workfile: scr_fcns.h $ - - Purpose: - This file is used by the scr_fcns.c. It defines both the function structure - and the function pool structure as well as the function prototype used by - the function pool. - - */ - -#ifndef SCR_FUNCTIONS_H -#define SCR_FUNCTIONS_H - -#include "scr_defs.h" - -typedef struct { - NW_Byte nbr_of_args; /* no of args */ - NW_Byte nbr_of_local_vars; /* no of total local vars, including args !!! */ - NW_Uint16 code_size; - NW_Byte *code; -} function_t; - - -typedef struct { - function_t **funcs; - NW_Int32 capacity; - NW_Int32 size; -} funcpool_t; - -typedef struct { - NW_Byte index; - NW_Ucs2 *name; -} fname_t; - -typedef struct { - fname_t *names; - NW_Int32 capacity; - NW_Int32 size; -} fname_table_t; - -void add_fname(NW_Byte index, NW_Ucs2 *name); -void add_func_fp(function_t *f); -NW_Bool create_func_pool(NW_Int32 c) ; -NW_Bool create_fname_table(NW_Int32 c); - -NW_Byte no_of_args(function_t *f); -NW_Byte no_of_local_vars(function_t *f); -NW_Uint16 get_code_size(function_t *f); - - -NW_Bool fu_get_opcode(NW_Byte func_index, NW_Uint16 offset, NW_Byte *b); -function_t *get_func(NW_Int32 funcIndex); - -NW_Bool fname_find_function_index(fname_table_t *fn_table, NW_Ucs2 *fname, NW_Byte *index); - -void free_funcpool(funcpool_t *fp); -void free_fname_table(fname_table_t *fn_table); - -NW_Bool valid_func_index(NW_Int32 index); - -#endif /*SCR_FUNCTIONS_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_float.h --- a/webengine/wmlengine/src/script/include/scr_float.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_float.h $ - - Purpose: - - This file is used by the scr_float.c. It defines the prototypes - for all the functions used by the Float standard library. - */ - -#ifndef SCR_FLOAT_H -#define SCR_FLOAT_H - -#include "nwx_float.h" -#include "scr_core.h" - -void populate_float_lib(lib_function_table_t *table); -NW_Byte size_float_lib(void); - -#endif /*SCR_FLOAT_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_frstack.h --- a/webengine/wmlengine/src/script/include/scr_frstack.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef FRSTACK_H -#define FRSTACK_H - -#include "scr_val.h" -#include "scr_fcns.h" -#include "scr_ptrstack.h" - -typedef struct -{ - val_t *vars; - NW_Ucs2 *url; - NW_Ucs2 *postfields; - NW_Ucs2 *referer; - NW_Uint32 chkSum; - NW_Int16 code_offset; - NW_Int16 var_cnt; - NW_Byte func_index; -} frame_t; - - -#define frstack_t pstack_t - -void init_frames(void); -NW_Bool push_frame(NW_Ucs2 *url, NW_Ucs2 *postfields, NW_Uint32 chkSum, - NW_Int32 func_index, NW_Ucs2 *referer); -void NW_Wmls_PopFrame(void); -NW_Bool is_frstack_empty(void); - -void jump_opcode(NW_Int32 offset); -void set_code_offset(NW_Uint16 s); -NW_Uint16 get_code_offset(void); -NW_Bool get_opcode(NW_Byte *b); -NW_Bool get_next_opcode_byte(NW_Byte *b); -NW_Bool get_next_opcode_int16(NW_Uint16 *i16); - -NW_Ucs2 *get_curr_referer(void); -NW_Ucs2 *get_first_referer(void); -NW_Ucs2 *get_curr_url(void); -NW_Uint32 get_curr_chkSum(void); -NW_Ucs2 *get_curr_postfields(void); - -function_t *get_curr_func(void); -NW_Int16 get_curr_func_size(void); - -val_t get_func_var(NW_Byte i); -void set_func_var(NW_Byte i, val_t v); -void free_frstack(frstack_t *st); - -/* frees all the frames in stack.*/ -void free_all_frames(void); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_handle.h --- a/webengine/wmlengine/src/script/include/scr_handle.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_handle.h $ - - Purpose: - - This file is used by the scr_handle.c. It defines the prototypes - for all the functions used by the scr_handle.c file. - - */ - -#ifndef SCR_HANDLE_H -#define SCR_HANDLE_H - -#include "scr_defs.h" - -void handle_jump_fw_s(NW_Byte offset); -void handle_jump_fw(void); -void handle_jump_fw_w(void); -void handle_jump_bw_s(NW_Byte offset); -void handle_jump_bw(void); -void handle_jump_bw_w(void); -void handle_tjump_fw_s(NW_Byte offset); -void handle_tjump_fw(void); -void handle_tjump_fw_w(void); -void handle_tjump_bw(void); -void handle_tjump_bw_w(void); -void handle_call_s(NW_Byte findex); -void handle_call(void); -NW_Bool handle_call_lib_s(NW_Byte findex, NW_Bool *async); -NW_Bool handle_call_lib(NW_Bool *async); -NW_Bool handle_call_lib_w(NW_Bool *async); -void handle_load_var_s(NW_Byte vindex); -void handle_load_var(void); -void handle_store_var_s(NW_Byte vindex); -void handle_store_var(void); -void handle_load_const_s(NW_Byte cindex); -void handle_load_const(void); -void handle_load_const_w(void); -void handle_incr_var_s(NW_Byte vindex); -void handle_incr_var(void); -void handle_decr_var(void); -void handle_incr(void); -void handle_decr(void); -void handle_add_asg(void); -void handle_sub_asg(void); -void handle_uminus(void); -void handle_add(void); -void handle_sub(void); -void handle_mul(void); -void handle_div(void); -void handle_idiv(void); -void handle_rem(void); -void handle_b_and(void); -void handle_b_or(void); -void handle_b_xor(void); -void handle_lshift(void); -void handle_rsshift(void); -void handle_rszshift(void); -void handle_comp(NW_Byte op); -void handle_l_not(void);/*bang*/ -void handle_b_not(void);/*compl*/ -void handle_pop(void); -void handle_load_const_int(NW_Int32 val); -void handle_load_const_bool(NW_Bool val); -void handle_load_const_es(void); -void handle_load_invalid(void); -void handle_typeof(void); -void handle_isvalid(void); -void handle_tobool(void); -void handle_scand(void); -void handle_scor(void); - -NW_Bool handle_call_url(void); -NW_Bool handle_call_url_w(void); - -#endif /*SCR_HANDLE_H*/ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_inter.h --- a/webengine/wmlengine/src/script/include/scr_inter.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_inter.h $ - - Purpose: - - This file is used by the scr_inter.c. It defines the prototypes - for all the functions to interpret the bytecode as defined in the - ScriptServer Specification. - */ - -#ifndef SCR_INTER_H -#define SCR_INTER_H - -#include "scr_defs.h" - -void interprete(void); - - -#endif /*SCR_INTER_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_lang.h --- a/webengine/wmlengine/src/script/include/scr_lang.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_lang.h $ - - Purpose: - - This file is used by the scr_lang.c. It defines the prototypes - for all the functions used by the Lang standard library. - */ - -#ifndef SCR_LANG_H -#define SCR_LANG_H - -#include "scr_core.h" - - -void populate_lang_lib(lib_function_table_t *table); -NW_Byte size_lang_lib(void); - -#endif /*SCR_LANG_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_msgs.h --- a/webengine/wmlengine/src/script/include/scr_msgs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: scr_msgs.h -** Purpose: Lists the data that can be moved between the WML Browser and -** the scripting engine. Also has utility functions for creation -** and deletion. -**************************************************************************/ - -#ifndef NWX_SCRIPT_MSGS_H -#define NWX_SCRIPT_MSGS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - -/* -** Type Definitions -*/ - -typedef struct { - NW_Ucs2 *url; - NW_Ucs2 *postfields; - NW_Ucs2 *referer; - NW_Byte *content; - NW_Uint32 contentLen; - NW_Http_CharSet_t charset; -} NW_StartScript_Req_t; - -typedef struct { - NW_Ucs2 *name; - NW_Ucs2 *value; -} NW_ScriptServerVarInf_t; - -typedef struct { - NW_Ucs2 *name; -} NW_ScriptServerVarCons_t; - -typedef struct { - NW_Ucs2 *message; - NW_Ucs2 *input; -} NW_ScriptServerDlgPromptReq_t; - -typedef struct { - NW_Ucs2 *message; - TBrowserStatusCode status; -} NW_ScriptServerFinishReq_t; - -typedef struct { - NW_Ucs2 *message; - NW_Ucs2 *yesStr; - NW_Ucs2 *noStr; - NW_Bool response; -} NW_ScriptServerConfirmReq_t; - -/* -** Global Function Declarations -*/ - -/* create a new script request */ -NW_StartScript_Req_t* -NW_StartScript_Req_New(NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset); - -/* free a script request */ -void NW_StartScript_Req_Free(NW_StartScript_Req_t *req); - -/* free a script request and all contents */ -void NW_StartScript_Req_DeepFree(NW_StartScript_Req_t *req); - -/* create a new variable request */ -NW_ScriptServerVarCons_t* NW_Script_VarCons_New(const NW_Ucs2 *name); - -/* free a variable request */ -void NW_Script_VarCons_Free(NW_ScriptServerVarCons_t *var); - -/* create a new variable request */ -NW_ScriptServerVarInf_t* NW_Script_VarInf_New(const NW_Ucs2 *name, - const NW_Ucs2 *value); - -/* set a value for the variable */ -TBrowserStatusCode NW_Script_VarInf_SetValue(NW_ScriptServerVarInf_t* varinf, - NW_Ucs2 *value); - -/* free a new varible request */ -void NW_Script_VarInf_Free(NW_ScriptServerVarInf_t *varinf); - -/* create a new dialog request */ -NW_ScriptServerDlgPromptReq_t* NW_Script_DlgPrompt_Req_New(const NW_Ucs2 *message, - const NW_Ucs2 *input); -/* free a dialog request */ -void NW_Script_DlgPrompt_Req_Free(NW_ScriptServerDlgPromptReq_t *dlg); - -/* create a new script finish request */ -NW_ScriptServerFinishReq_t* NW_Script_Finish_Req_New(TBrowserStatusCode status, - const NW_Ucs2 *message); - -/* free a script finish request */ -void NW_Script_Finish_Req_Free(NW_ScriptServerFinishReq_t *data); - -/* create a new script confirm request */ -NW_ScriptServerConfirmReq_t* NW_Script_Confirm_Req_New(const NW_Ucs2 *message, - const NW_Ucs2 *yesStr, - const NW_Ucs2 *noStr); - -/* free a script confirm request */ -void NW_Script_Confirm_Req_Free(NW_ScriptServerConfirmReq_t *data); - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_SCRIPT_MSGS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_opcodes.h --- a/webengine/wmlengine/src/script/include/scr_opcodes.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_opcodes.h $ - - Purpose: - - This file is used by the scr_inter.c. - This file lists all the valid opcodes in the WLScriptParser. - */ - -#ifndef SCR_OPCODES_H -#define SCR_OPCODES_H - -#define JUMP_FW_S 0x80 -#define JUMP_FW 0x01 -#define JUMP_FW_W 0x02 -#define JUMP_BW_S 0xA0 -#define JUMP_BW 0x03 -#define JUMP_BW_W 0x04 -#define TJUMP_FW_S 0xC0 -#define TJUMP_FW 0x05 -#define TJUMP_FW_W 0x06 -#define TJUMP_BW 0x07 -#define TJUMP_BW_W 0x08 - -#define CALL_S 0x60 -#define CALL 0x09 -#define CALL_LIB_S 0x68 -#define CALL_LIB 0x0A -#define CALL_LIB_W 0x0B -#define CALL_URL 0x0C -#define CALL_URL_W 0x0D - -#define LOAD_VAR_S 0xE0 -#define LOAD_VAR 0x0E -#define STORE_VAR_S 0x40 -#define STORE_VAR 0x0F -#define INCR_VAR_S 0x70 -#define INCR_VAR 0x10 -#define DECR_VAR 0x11 - - -#define LOAD_CONST_S 0x50 -#define LOAD_CONST 0x12 -#define LOAD_CONST_W 0x13 -#define CONST_0 0x14 -#define CONST_1 0x15 -#define CONST_M1 0x16 -#define CONST_ES 0x17 -#define CONST_INVALID 0x18 -#define CONST_TRUE 0x19 -#define CONST_FALSE 0x1A - -#define INCR 0x1B -#define DECR 0x1C -#define ADD_ASG 0x1D -#define SUB_ASG 0x1E -#define UMINUS 0x1F -#define ADD 0x20 -#define SUB 0x21 -#define MUL 0x22 -#define DIV 0x23 -#define IDIV 0x24 -#define REM 0x25 - -#define B_AND 0x26 -#define B_OR 0x27 -#define B_XOR 0x28 -#define B_NOT 0x29 -#define B_LSHIFT 0x2A -#define B_RSSHIFT 0x2B -#define B_RSZSHIFT 0x2C - -#define EQ 0x2D -#define LE 0x2E -#define LT 0x2F -#define GE 0x30 -#define GT 0x31 -#define NE 0x32 - -#define L_NOT 0x33 -#define SCAND 0x34 -#define SCOR 0x35 -#define TOBOOL 0x36 - - -#define POP 0x37 - -#define TYPEOF 0x38 -#define ISVALID 0x39 - -#define RETURN 0x3A -#define RETURN_ES 0x3B - -#define DEBUG_OP 0x3C - - -void parse_opcode(NW_Byte *opcode, NW_Byte *param); - -#endif - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_params.h --- a/webengine/wmlengine/src/script/include/scr_params.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_params.h $ - - Purpose: - */ - -#ifndef SCR_PARAM_H -#define SCR_PARAM_H - -#include "scr_defs.h" - -NW_Ucs2 *read_func_name(NW_Ucs2 *frag); -NW_Bool parse_argument_list(NW_Ucs2 *params, NW_Int32 args); - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_ptrstack.h --- a/webengine/wmlengine/src/script/include/scr_ptrstack.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_ptrstack.h $ - - Purpose: - - This file is used by the scr_ptrstack.c. It defines the structure and - the prototypes for all the functions used by the ptrstack. - */ - -#ifndef SCR_PTRSTACK_H -#define SCR_PTRSTACK_H - -#include "scr_defs.h" - -typedef struct { - void **s; - NW_Int32 size; - NW_Int32 capacity; -} pstack_t; - - -NW_Bool is_pstack_empty(pstack_t *st); -NW_Bool is_pstack_full(pstack_t *st); -pstack_t *new_pstack(NW_Int32 cap); -void *pop_pstack(pstack_t *st); -void *peek_pstack(pstack_t *st); -void push_pstack(pstack_t *st, void *v); -void destroy_pstack(pstack_t *st); - -void *el_at_pstack(pstack_t *st, NW_Int32 index); - -#endif /*SCR_PTRSTACK_H*/ - - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_reader.h --- a/webengine/wmlengine/src/script/include/scr_reader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_reader.h $ - - Purpose: - - This file is used by the scr_reader.c. It defines the prototypes - for all the functions needed to read the ScriptServer's bytecode. - */ - -#ifndef SCR_READER_H -#define SCR_READER_H - -#include "nw_wae_reader.h" - -NW_Bool read_script(NW_Reader_t *r, const NW_Ucs2 *referer, const NW_Ucs2 *url); - - -#endif /*SCR_READER_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_srv.h --- a/webengine/wmlengine/src/script/include/scr_srv.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef SCR_SRV_H -#define SCR_SRV_H - -/**************/ -/* Prototypes */ -/**************/ - -#define NO_OF_STD_LIBS 10 /* 7 + Debug + Crypto + Nokia (locInfo) */ - -#define LANG_LIB_ID 0 -#define FLOAT_LIB_ID 1 -#define STRING_LIB_ID 2 -#define URL_LIB_ID 3 -#define BROWSER_LIB_ID 4 -#define DIALOG_LIB_ID 5 -#define CRYPTO_LIB_ID 6 -#define DEBUG_LIB_ID 7 -#define WP_LIB_ID 512 -#define NOKIA_LIB_ID 32768 - -#endif /* SCR_SRV_H */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_str.h --- a/webengine/wmlengine/src/script/include/scr_str.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_str.h $ - - Purpose: - */ - -#ifndef SCR_STR_H -#define SCR_STR_H - -#include "scr_defs.h" - - -typedef NW_Ucs2* str_t; - -/* Create a new length-counted ucs2 string */ -str_t new_str(NW_Int32 length, NW_Ucs2 *buf); - -/* Free a length-counted ucs2 string */ -void free_str(str_t str); - -/* Return length of length-counted ucs2 string */ -NW_Int32 str_len(str_t str); - -/* Return pointer to storage for length-counted ucs2 string */ -NW_Ucs2* str_buf_ptr(str_t str); - -/* Concatinate 2 length-counted ucs2 strings */ -str_t str_cat(str_t str1, str_t str2); - -/* Concatinate 3 length-counted ucs2 strings */ -str_t str_cat3(str_t str1, str_t str2, str_t str3); - -/* Duplicate a length-counted ucs2 string */ -str_t dup_str(str_t str); - -/* Compare 2 length-counted ucs2 strings */ -NW_Int32 str_cmp(str_t str1, str_t str2); - -/* Return the character at the given index */ -NW_Ucs2 scr_charat(str_t str, NW_Int32 index); - -/* Extract a substring from a length-counted ucs2 string */ -str_t scr_substr(str_t str, NW_Int32 start, NW_Int32 len); - -/* Find position of 2nd string in 1st string */ -NW_Int32 str_find(str_t str1, str_t str2, NW_Int32 start); - -NW_Int32 str_times(str_t s, NW_Ucs2 separator); -str_t str_replace(str_t s, str_t old_str, str_t newstr); -str_t str_elementat(str_t s, NW_Int32 index, NW_Ucs2 separator); -str_t str_removeat(str_t s, NW_Int32 index, NW_Ucs2 separator); -str_t str_replaceat(str_t s, str_t newstr, NW_Int32 index, NW_Ucs2 separator); -str_t str_insertat(str_t s, str_t newstr, NW_Int32 index, NW_Ucs2 separator); -str_t str_squeeze(str_t s); -str_t str_trim(str_t s); - -NW_Bool str_is_empty(str_t s); -NW_Bool str_is_alpha(NW_Ucs2 c); -NW_Bool str_is_digit(NW_Ucs2 c); -NW_Bool str_is_reserved(str_t s); - -#endif - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_strlib.h --- a/webengine/wmlengine/src/script/include/scr_strlib.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: scr_strlib.h $ - - Purpose: - - This file is used by the scr_strlib.c. It defines the prototypes - for all the functions used by the String standard library. - */ - -#ifndef SCR_STRLIB_H -#define SCR_STRLIB_H - -#include "scr_core.h" - -void populate_string_lib(lib_function_table_t *table); -NW_Byte size_string_lib(void); - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_url.h --- a/webengine/wmlengine/src/script/include/scr_url.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_url.h $ - - Purpose: - - This file is used by the scr_url.c. It defines the prototypes - for all the functions used by the URL standard library. - */ - -#ifndef SCR_URL_H -#define SCR_URL_H - -#include "scr_core.h" - -void populate_url_lib(lib_function_table_t *table); -NW_Byte size_url_lib(void); - -#endif /*SCR_URL_H*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_val.h --- a/webengine/wmlengine/src/script/include/scr_val.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_val.h $ - - Purpose: - - representing typed values in 4 bytes - */ - -#ifndef SCR_VAL_H -#define SCR_VAL_H - -#include "scr_defs.h" -#include "scr_str.h" - -typedef enum -{ - VAL_TYPE_INT, - VAL_TYPE_FLOAT, - VAL_TYPE_STR, - VAL_TYPE_BOOL, - VAL_TYPE_INVALID, - VAL_TYPE_UNINITIALIZED -} SCR_VAL_TYPE; - -/* Note: use "volatile" keyword to suppress compiler optimizer bug */ -/* which changes store/load operation into a data-type cast */ -typedef struct -{ - volatile union { - NW_Int32 i; - NW_Float32 f; - str_t s; - NW_Bool b; - }value; - - SCR_VAL_TYPE type; -} val_t; - -NW_Ucs2* GetUcs2Val(void); -NW_Ucs2* GetUcs2Val_notrim(void); -NW_Bool GetIntVal(NW_Int32 *value); -NW_Bool GetBoolVal(NW_Bool *value); -NW_Opaque_t* GetOpaqueVal(void); - -val_t new_int_val(NW_Int32 i); -val_t new_float_val(NW_Float32 f); -val_t new_bool_val(NW_Bool b); -val_t new_empty_str_val(void); -val_t new_str_val(str_t s); -val_t new_str_val_and_free(str_t *sptr); -val_t new_invalid_val(void); -val_t uninitialize_val(void); -val_t dup_val(val_t); - -NW_Bool val2float(val_t v, NW_Float32 *f); -NW_Bool val2int(val_t v, NW_Int32 *res); -NW_Bool val2bool(val_t v, NW_Bool *res); -NW_Bool val2str(val_t v, str_t *str); -NW_Bool val2str_and_free(val_t *vptr, str_t *str); - -NW_Ucs2 *val2ucs2(val_t v); -NW_Ucs2 *val2ucs2_trim(val_t v); - -SCR_VAL_TYPE ScriptVarType(val_t v); - -void free_val(val_t v); - - -#define IS_INT(v) ((v).type == VAL_TYPE_INT) - -#define IS_FLOAT(v) ((v).type == VAL_TYPE_FLOAT) - -#define IS_BOOL(v) ((v).type == VAL_TYPE_BOOL) - -#define IS_STR(v) ((v).type == VAL_TYPE_STR) - -#define IS_INVALID(v) ((v).type == VAL_TYPE_INVALID) - -#endif /*SCR_VAL_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_valexpr.h --- a/webengine/wmlengine/src/script/include/scr_valexpr.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_valexpr.h $ - - Purpose: - - This file is used by the scr_valexpr.h. It defines the val_expr structure - and all the prototypes needed for the scr_val_expr.c - */ - -#ifndef SCR_VALEXPR_H -#define SCR_VALEXPR_H - -#include "scr_defs.h" -#include "scr_val.h" - -val_t add_string_vals(val_t v1, val_t v2); -val_t add_vals(val_t v1, val_t v2); -val_t sub_vals(val_t v1, val_t v2); -val_t mul_vals(val_t v1, val_t v2); -val_t div_vals(val_t v1, val_t v2); -val_t idiv_vals(val_t v1, val_t v2); -val_t rem_vals(val_t v1, val_t v2); - -val_t incr_val(val_t v); -val_t decr_val(val_t v); - -val_t l_not_val(val_t v); -val_t b_not_val(val_t v); -val_t uminus_val(val_t v); - -val_t comp_vals(val_t v1, val_t v2, NW_Byte op); -NW_Bool comp_string_vals(str_t s1, str_t s2, NW_Byte op); -NW_Bool comp_int_vals(NW_Int32 i1, NW_Int32 i2, NW_Byte op); -NW_Bool comp_float_vals(NW_Float32 f1, NW_Float32 f2, NW_Byte op); - -val_t lshift_vals(val_t v1, val_t v2); -val_t rsshift_vals(val_t v1, val_t v2); -val_t rszshift_vals(val_t v1, val_t v2); - -val_t bit_and_vals(val_t v1, val_t v2); -val_t bit_or_vals(val_t v1, val_t v2); -val_t bit_xor_vals(val_t v1, val_t v2); - -#endif /*SCR_VALEXPR_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/include/scr_wta.h --- a/webengine/wmlengine/src/script/include/scr_wta.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef SCR_WTA_H -#define SCR_WTA_H - -#include "scr_core.h" - - -void populate_wta_lib(lib_function_table_t *table); - -NW_Byte size_wp_lib(void); /* public */ -NW_Byte size_nokia_lib(void); /* public */ - -#endif /*SCR_WTA_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/nwx_script_handler.c --- a/webengine/wmlengine/src/script/src/nwx_script_handler.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2598 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_defs.h" -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_msg_api.h" -#include "scr_msgs.h" -#include "urlloader_urlresponse.h" -#include "urlloader_urlloaderint.h" -#include "nwx_script_handler.h" -#include "nwx_logger.h" -#include "nwx_ctx.h" -#include "scr_core.h" -#include "scr_api.h" -#include "scr_context.h" -#include "scr_crypto.h" -#include "nwx_generic_dlg.h" -#include "nwx_osu.h" -#include "nwx_http_defs.h" -#include "nwx_time.h" -#include "BrsrStatusCodes.h" - -/* Interval to suspend thread to allow other applications to run. */ -#define SUSPEND_MICROSECONDS 100000 - -typedef struct { - NW_Msg_Address_t address; /* Script Interpreter */ - NW_Msg_Address_t wmlBrowser; /* WML Browser */ - NW_Msg_Address_t loader; /* URL Loader */ - NW_Msg_t *finishMsg; /* msg alloc'ed at start */ -} Script_Context_t; - - - -/*************************** Global Data ***************************** - NOTES: For now we will create a single global variable to - hold all of the context for the component. It will be - accessed with the getThis() function call -*/ - -/************************ Access Functions **********************/ -static Script_Context_t *script_getThis(void) -{ - return (Script_Context_t*) NW_Ctx_Get(NW_CTX_SCRIPT, 0); -} - -static void script_setThis(Script_Context_t *thisObj) -{ - NW_Ctx_Set(NW_CTX_SCRIPT, 0, thisObj ); -} - -static void script_notifyError(NW_Byte status) { (void) ScriptAPI_finish(status, 0);} - - -/*********************** WIM messages handler ************************* - NOTES: This function receives messages that WIM operations - completed, and feeds the messages back to the state machine. -*/ - -/************************ Access Functions **********************/ -//lint --e{752} not referenced -TBrowserStatusCode NW_Script_Wimiresp(NW_Msg_t *msg); - - -/***************************************************************** - Incoming message handlers. Parse the data meaningful to the CoreScript - out of the message, and call the appropriate CoreScript callback - function -*****************************************************************/ - -/************************************************************************ - Function: NW_Script_Startreq - Purpose: Handles the NW_MSG_SCRIPT_START_REQ. Initializes the script - interpreter and sends a acknowledgement. - Parameters: msg - start script message - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Startreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_StartScript_Req_t *req; - Script_Context_t *thisObj; - - if (msg == NULL) { - return KBrsrBadInputParam; - } - req = (NW_StartScript_Req_t *)msg->data; - if (req == NULL) { - return KBrsrBadInputParam; - } - msg->data = NULL;/* freed by the scripting engine */ - - thisObj = script_getThis(); - if(thisObj == NULL) { - thisObj = (Script_Context_t*) NW_Mem_Malloc(sizeof(Script_Context_t)); - if (thisObj == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - NW_Mem_memset(thisObj, 0, sizeof(Script_Context_t)); - /* Get our address and the address of all the servers */ - NW_Msg_LookupReceiverByName(NW_SCRIPT_SERVER, &thisObj->address); - NW_Msg_LookupReceiverByName(NW_HTTP_LOADER, &thisObj->loader); - NW_Msg_LookupReceiverByName(NW_BROWSER_CORE, &thisObj->wmlBrowser); - thisObj->finishMsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_FINISHNODLG_REQ); - if (thisObj->finishMsg == NULL) { - status = KBrsrOutOfMemory; - } - else { - /* Initialize the script libaries*/ - initialize_core_script(); - - /* Now store the new context */ - script_setThis(thisObj); - } - } - } - - /* - * Allocate a message will will be used on script completion. - * This will be used up in the method "NW_Script_Finishnodialog" - */ - if (thisObj != NULL && thisObj->finishMsg == NULL) { - thisObj->finishMsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_FINISHNODLG_REQ); - if (thisObj->finishMsg == NULL) { - status = KBrsrOutOfMemory; - } - } - - /* Send response message back to the browser */ - NW_Msg_Reinit(msg, msg->tid, - msg->src, /* Send it back to where it came from */ - msg->dest, - NW_MSG_SCRIPT_START_RESP, - status, - NULL); - if (NW_Msg_Send(msg) != KBrsrSuccess) { - NW_LOG0(NW_LOG_LEVEL1, "Script : Could not send message"); - NW_Msg_Delete(msg); msg = NULL; - NW_StartScript_Req_DeepFree(req); - return KBrsrFailure; - } - - if (status == KBrsrOutOfMemory)/* stop further processing if we run out of memory */ - { - NW_StartScript_Req_DeepFree(req); - return KBrsrOutOfMemory; - } - - if (BRSR_STAT_IS_SUCCESS(status)) { - set_ctx_state(ScriptAPI_getCurrentContext(), RUNNING); - CoreScript_InitiateScript(req->url, req->postfields, - req->referer, req->content, - req->contentLen, req->charset); - } - - /* Note: the referrer and the URL are freed by the script interpreter */ - NW_Mem_Free(req->content); req->content = NULL; - NW_StartScript_Req_Free(req); - return status; -} - -/************************************************************************ - Function: NW_Script_Urlloadresp - Purpose: Handles the url load response. - Parameters: status - status of url load - transId - the transaction id - loadContext - context for callback (should be NULL) - resp - loader response - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Urlloadresp(TBrowserStatusCode status, NW_Uint16 transId, NW_Int32 chunkIndex, - void *loadContext, NW_Url_Resp_t *resp) -{ - NW_Bool noResponse = NW_FALSE; - NW_Bool result = NW_FALSE; - context_t *ctx = ScriptAPI_getCurrentContext(); - - NW_REQUIRED_PARAM(transId); - NW_REQUIRED_PARAM(loadContext); - - // buffer response chunks until the last chunk arrives with - // chunkIndex equals to -1. - // then pass it to the script handler - if( chunkIndex != -1 ) - { - // buffer partial responses - // pointer to the buffer is passed as loadContext - NW_Buffer_t* partialResponseBuffer; - - partialResponseBuffer = (NW_Buffer_t*)loadContext; - - NW_ASSERT( resp != NULL ); - - NW_Buffer_AppendBuffers( partialResponseBuffer, resp->body ); - } - else - { - // take buffer as response body - if( status == KBrsrSuccess && resp != NULL ) - { - // last chunk does not contain any data - NW_Buffer_Free( resp->body ); - resp->body = (NW_Buffer_t*)loadContext; - } - else - { - // if the load fails then release the buffer - // free partialResponseBuffer - NW_Buffer_Free( (NW_Buffer_t*)loadContext ); - } - - if (!resp || !resp->uri || !resp->body) - { - noResponse = NW_TRUE; - } - /* Load string callback will process a non-success wsp_status */ - if (get_ctx_state(ctx) == LOADSTRING_REQ && noResponse == NW_FALSE) - { - result = CoreScript_LoadString_CB(status, resp->httpStatus, - resp->body->data, resp->body->length, - resp->contentTypeString, resp->charset); - } - else if (noResponse == NW_TRUE || !BRSR_STAT_IS_SUCCESS(status) || - (resp->httpStatus != Success)) - { - set_error_code(SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT); - if (ctx->cs) { - delete_call_str(ctx); - } - } - else if (0 == NW_Asc_stricmp((char*)HTTP_application_vnd_wap_wmlscriptc_string, - (char*)resp->contentTypeString)) { - result = CoreScript_LoadScript_CB(status, resp->uri, resp->body->data, - resp->body->length, resp->charset); - } - - if (result == NW_FALSE) - { - if (get_error_code() == SCR_ERROR_NO_ERROR) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - } - script_notifyError(get_error_code()); - } - } - /* We can delete the response: scripting engine copies the content */ - UrlLoader_UrlResponseDelete(resp); - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Goresp - Purpose: Handles the NW_MSG_SCRIPT_GO_REQ. Restarts the script interpreter. - Parameters: msg - go response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Goresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg != NULL); - status = msg->status; - - NW_Msg_Delete(msg); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_Go_CB(status); - } - return KBrsrSuccess; -} - - -/* - Incoming message handlers. Parse the data meaningful to the CoreScript - out of the message, and call the appropriate CoreScript callback - function -*/ -/************************************************************************ - Function: NW_Script_Getvarresp - Purpose: Handles the NW_MSG_COREBROWSER_GETVAR_RESP. - Parameters: msg - get var response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Getvarresp(NW_Msg_t *msg) -{ - NW_ScriptServerVarInf_t *req; - - NW_ASSERT(msg); - NW_ASSERT(script_getThis()); - - req = (NW_ScriptServerVarInf_t *)msg->data; - msg->data = NULL; - NW_ASSERT(req); - - if (msg->status == KBrsrOutOfMemory) { - - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_GetVar_CB(msg->status, req->name, req->value); - } - - NW_Script_VarInf_Free(req); - NW_Msg_Delete(msg); - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Setvarresp - Purpose: Handles the NW_MSG_COREBROWSER_SETVAR_RESP. - Parameters: msg - set var response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Setvarresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_SetVar_CB(status); - } - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Loadprevresp - Purpose: Handles the NW_MSG_COREBROWSER_LOADPREV_RESP. - Parameters: msg - load prev response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Loadprevresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_Prev_CB(status); - } - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Refreshresp - Purpose: Handles the NW_MSG_COREBROWSER_REFRESH_RESP. - Parameters: msg - refresh response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Refreshresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_Refresh_CB(status); - } - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Newcontextresp - Purpose: Handles the NW_MSG_COREBROWSER_NEWCONTEXT_RESP. - Parameters: msg - new context response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Newcontextresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - CoreScript_NewContext_CB(status); - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogalertresp - Purpose: Handles the NW_MSG_UA_DLGALERT_RESP. - Parameters: msg - dialog alert response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogalertresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - NW_WmlsDialog_AlertResp(); - } - - return KBrsrSuccess; -} -/************************************************************************ - Function: NW_Script_Notifyerrorresp - Purpose: Handles the NW_MSG_UA_NOTIFYERROR_RESP. - Parameters: msg - finish response. - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Notifyerrorresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - if (status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - NW_WmlsDialog_NotifyerrorResp(); - } - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogconfirmresp - Purpose: Handles the NW_MSG_UA_DLGCONFIRM_RESP. - Parameters: msg - dialog confirm response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogconfirmresp(NW_Msg_t *msg) -{ - NW_ScriptServerConfirmReq_t *data = NULL; /* confirm message */ - - NW_ASSERT(msg); - NW_ASSERT(script_getThis() != NULL); - - data = (NW_ScriptServerConfirmReq_t *)msg->data; - msg->data = NULL; - - if (msg->status == KBrsrOutOfMemory) { - /* fatal errors -- for now just out of mem is fatal. */ - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - /* success or nonfatal error -- keep processing script */ - NW_ASSERT(data != NULL); - NW_WmlsDialog_ConfirmResp(data->response); - } - NW_Script_Confirm_Req_Free (data); - NW_Msg_Delete(msg); - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogpromptresp - Purpose: Handles the NW_MSG_UA_DLGPROMPT_RESP. - Parameters: msg - dialog prompt response - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogpromptresp(NW_Msg_t *msg) -{ - NW_Ucs2 *data; - NW_ASSERT(msg); - NW_ASSERT(script_getThis() != NULL); - - data = (NW_Ucs2 *)msg->data; - if (msg->status == KBrsrOutOfMemory) { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - } else { - NW_WmlsDialog_PromptResp(data); - if (data) NW_Mem_Free(data); - } - - NW_Msg_Delete(msg); - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Exitreq - Purpose: Handles the NW_MSG_SCRIPT_EXIT_REQ. Clears the script - context and sends an acknowledgement. - Two alternatives for ExitReq behavior: - 1) CoreScript should control calling ExitResp, probably after it - terminates the running script - 2) BrowserHandler immediately send the ExitResp back to browser, - then let CoreScript terminate the running script - Parameters: msg - exit request - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Exitreq(NW_Msg_t *msg) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - NW_ASSERT(script_getThis() != NULL); - NW_ASSERT(msg != NULL); - - - /* We need to cancel outstanding loader requests when exiting or Script. - s*/ - //UrlLoader_CancelAll(); - if (was_calling(ctx)) { - delete_call_str(ctx); - } - clear_context(ctx); - - /* Send response message back to the browser */ - NW_Msg_Reinit(msg, msg->tid, - msg->src, /* Send it back to where it came from */ - msg->dest, - NW_MSG_SCRIPT_EXIT_RESP, - KBrsrSuccess, - NULL); - if (NW_Msg_Send(msg) != KBrsrSuccess) { - NW_LOG0(NW_LOG_LEVEL1, "Script : Could not send message"); - NW_Msg_Delete(msg); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Resumereq - Purpose: Handles the NW_MSG_SCRIPT_RESUME_REQ. - Parameters: msg - resume request - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Resumereq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ASSERT(msg != NULL); - - status = msg->status; - NW_Msg_Delete(msg); - - NW_ASSERT(script_getThis() != NULL); - - if (BRSR_STAT_IS_SUCCESS(status)) - { - CoreScript_Resume(); - } - else - { - /* abort the script interpreter */ - script_notifyError(SCR_ERROR_USER_ABORT); - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Finishnodialogresp - Purpose: Handles the NW_MSG_UA_FINISHNODLG_RESP. - Parameters: msg - finish response. - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Finishnodialogresp(NW_Msg_t *msg) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - /* ignoring the message status and clearing the script context */ - NW_ASSERT(msg != NULL); - - if (was_calling(ctx)) { - delete_call_str(ctx); - } - clear_context(ctx); - NW_Msg_Delete(msg); - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Suspendresp - Purpose: Handles the NW_MSG_SCRIPT_SUSPEND_RESP. - Parameters: msg - suspend response. - Return Values: - KBrsrSuccess -*************************************************************************/ -TBrowserStatusCode NW_Script_Suspendresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg); - status = msg->status; - NW_Msg_Delete(msg); - - if (BRSR_STAT_IS_SUCCESS(status)) - { - CoreScript_Resume(); - } - - return KBrsrSuccess; -} - -/***************************************************************** - Outgoing message handlers. -*****************************************************************/ - -/************************************************************************ - Function: NW_Script_Getvar - Purpose: Sends a request to the WML Browser for the value of a variable. - Parameters: name - the name of the variable - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -**************************************************************************/ - -TBrowserStatusCode NW_Script_Getvar(NW_Ucs2* name) -{ - NW_Msg_t *cmsg = NULL; - NW_ScriptServerVarInf_t *data; - Script_Context_t *thisObj; - - NW_ASSERT(name != NULL); - - thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL); - - data = NW_Script_VarInf_New(name, NULL); - if (data == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_GETVAR_REQ); - if (cmsg == 0) - { - NW_Script_VarInf_Free(data); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = KBrsrSuccess; - cmsg->data = data; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Script_VarInf_Free(data); - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Setvar - Purpose: Sends a request to the WML Browser to set the variable value. - Parameters: name - the name of the variable - value - value of the variable - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -**************************************************************************/ - -TBrowserStatusCode NW_Script_Setvar(NW_Ucs2* name, NW_Ucs2* value) -{ - NW_Msg_t *cmsg = NULL; - NW_ScriptServerVarInf_t *data; - Script_Context_t *thisObj; - - NW_ASSERT(name != NULL); - - thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL); - - data = NW_Script_VarInf_New(name, value); - if (data == NULL) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_SETVAR_REQ); - if (cmsg == 0) - { - NW_Script_VarInf_Free(data); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Script_VarInf_Free(data); - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_LoadPrev - Purpose: Sends a request to the WML Browser to execute a <PREV> task. - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -**************************************************************************/ -TBrowserStatusCode NW_Script_Loadprev(void) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_LOADPREV_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Refresh - Purpose: Sends a request to the WML Browser to execute a <REFRESH> task. - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -**************************************************************************/ -TBrowserStatusCode NW_Script_Refresh(void) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_REFRESH_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, "Scripting Engine : Could not send Refresh message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Newcontext - Purpose: Sends a request to the WML Browser to start a new context. - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Newcontext(void) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_NEWCONTEXT_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogalert - Purpose: Sends a request to the User agent to display a alert dialog. - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogalert(const NW_Ucs2 *message) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - NW_Ucs2 *data; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - NW_ASSERT(message); - - data = NW_Str_Newcpy(message); - if (data == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DLGALERT_REQ); - if (cmsg == 0) - { - NW_Str_Delete(data); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Str_Delete(data); - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogconfirm - Purpose: Sends a request to the User agent to display a confirm dialog. - Parameters: message - message to be displayed - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogconfirm(const NW_Ucs2 *message, const NW_Ucs2 *yesStr, - const NW_Ucs2 *noStr) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t* thisObj; - NW_ScriptServerConfirmReq_t *data; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - NW_ASSERT(message); - - data = NW_Script_Confirm_Req_New(message, yesStr, noStr); - if (data == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DLGCONFIRM_REQ); - if (cmsg == NULL) { - NW_Script_Confirm_Req_Free(data); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Script_Confirm_Req_Free(data); - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Dialogprompt - Purpose: Sends a request to the User agent to display a prompt dialog. - Parameters: message - the message to be displayed - defaultInput - the default input value - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Dialogprompt(const NW_Ucs2 *message, const NW_Ucs2 *defaultInput) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t* thisObj; - NW_ScriptServerDlgPromptReq_t* data; - - thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL);/* script interpreter should be initialized */ - - data = NW_Script_DlgPrompt_Req_New(message, defaultInput); - if (data == 0)/* stop processing */ - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DLGPROMPT_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Script_DlgPrompt_Req_Free(data); - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Load - Purpose: Requests the URl loader to load the Url. - Parameters: url - the url to load - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Load(NW_Ucs2 *url) -{ - NW_Uint16 tid = 0;/* dont care about transaction ids */ - TBrowserStatusCode status; - NW_Buffer_t* partialResponseBuffer; - - NW_ASSERT(url != NULL); - - /* Do the load. When the loader finishes it invokes the - NW_Script_Urlloadresp() function with a callback context that is - there in NW_Url_StartLoad call. Currently loadContext is NW_SCRIPT_SERVER. - It should be some other value that is meant only for script and no - other applicaiton would be using it. - */ - - // this partialResponseBuffer is being used as a buffer in - // the response callback function - partialResponseBuffer = NW_Buffer_New( 1 ); - status = UrlLoader_Request(url, NULL, NULL, 0, NW_URL_METHOD_GET, &tid, - (void*)partialResponseBuffer, (NW_Url_RespCallback_t*)NW_Script_Urlloadresp, - NW_CACHE_NORMAL, NW_DEFAULTHEADERS_ALL, NW_UrlRequest_Type_Any, NW_FALSE, NW_TRUE, - NW_HED_UrlRequest_Reason_DocLoad, NULL); - - if (status != KBrsrSuccess && status != KBrsrHedContentDispatched && status != KBrsrScriptErrorUserAbort) - { - NW_Buffer_Free( partialResponseBuffer ); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return status; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Go - Purpose: Sends a request to the WML Browser to execute a <go> task. - Parameters: url - the url to load - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Go(NW_Ucs2 *url) -{ - NW_Msg_t *cmsg = NULL; - NW_Ucs2 *data; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(url); - NW_ASSERT(thisObj); - - data = (NW_Ucs2*) NW_Mem_Malloc((NW_Str_Strlen(url) + 1) * sizeof(NW_Ucs2)); - if (data == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - NW_Str_Strcpy(data, url); - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_COREBROWSER_GO_REQ); - if (cmsg == 0) - { - NW_Mem_Free(data); - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Mem_Free(data); - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Notifyerror - Purpose: Sends a request to the User agent to display a error. - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Notifyerror(TBrowserStatusCode status) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_NOTIFYERROR_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = status; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Finishnodialog - Purpose: Sends a request to User agent indicating that the script - interpreter has completed. NOTE!! script_NotifyError() is already - on the call stack, sooo, if we run out of memory, DON'T MAKE A - RECURSIVE CALL to script_NotifyError(). - - Parameters: - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Finishnodialog(NW_Byte status, NW_Ucs2 *msg) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - NW_ScriptServerFinishReq_t *data = NULL; - TBrowserStatusCode errorCode; - - thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL); - - if (thisObj->finishMsg != NULL){ - cmsg = thisObj->finishMsg; - thisObj->finishMsg = NULL; - } - cmsg->status = KBrsrSuccess; - switch (status) /* map the script interpreter internal status codes to TBrowserStatusCode */ - { - case SCR_ERROR_NO_ERROR: - errorCode = KBrsrSuccess; - break; - case SCR_ERROR_VERIFICATION_FAILED: - errorCode = KBrsrScriptBadContent; - break; - case SCR_ERROR_FATAL_LIBRARY_FUNCTION_ERROR: - errorCode = KBrsrScriptFatalLibFuncError; - break; - case SCR_ERROR_INVALID_FUNCTION_ARGUMENTS: - errorCode = KBrsrScriptInvalidFuncArgs; - break; - case SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND: - case SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT: - errorCode = KBrsrScriptCardNotInDeck; - break; - case SCR_ERROR_ACCESS_VIOLATION: - errorCode = KBrsrScriptNoAccess; - break; - case SCR_ERROR_STACK_UNDERFLOW: - errorCode = KBrsrScriptErrorStackUnderflow; - break; - case SCR_ERROR_STACK_OVERFLOW: - errorCode = KBrsrScriptErrorStackOverflow; - break; - case SCR_ERROR_OUT_OF_MEMORY: - errorCode = KBrsrOutOfMemory; - break; - - case SCR_ERROR_USER_EXIT: - errorCode = KBrsrScriptErrorUserExit; - break; - case SCR_ERROR_USER_ABORT: - errorCode = KBrsrScriptErrorUserAbort; - break; - default: - /* assertion to catch unmapped status codes. */ - NW_ASSERT(0); - errorCode = KBrsrFailure; - } - data = NW_Script_Finish_Req_New(errorCode, msg); - - cmsg->data = data; - - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - if (data) NW_Script_Finish_Req_Free(data); - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Script_Suspend - Purpose: Sends a request to script interpreter to yield. - Parameters: - - Return Values: - KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_Suspend(void) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - /* Suspend thread briefly to allow other applications to run. */ - NW_Osu_Wait(SUSPEND_MICROSECONDS); - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_SCRIPT_SUSPEND_REQ); - if (cmsg == 0) - { - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return KBrsrOutOfMemory; - } - cmsg->status = KBrsrSuccess; - - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, "Scripting Engine : Could not send message"); - return KBrsrFailure; - } - return KBrsrSuccess; -} - - -/********************************/ -/******** WTA Functions *********/ -/********************************/ - -/*************************************************************** - * Function: NW_Script_wp_makeCall - * Purpose: Sends a request to the Browser - ***************************************************************/ - -TBrowserStatusCode NW_Script_wp_makeCall(NW_Ucs2 *number) -{ - NW_Msg_t *msg = NULL; - NW_Ucs2 * url = NULL; - Script_Context_t *thisObj; - const char* const makeCallUrlPrefix = "wtai://wp/mc;"; - NW_Opaque_t *result = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_LOG0(NW_LOG_LEVEL5, "SCRIPT : NW_Script_wp_makeCall\n"); - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - url = (NW_Ucs2*) NW_Mem_Malloc((NW_Asc_strlen(makeCallUrlPrefix) + NW_Str_Strlen(number) + 1) * sizeof(NW_Ucs2)); - msg = NW_Msg_New(1, thisObj->address, thisObj->address, NW_MSG_SCRIPT_WP_MAKECALL_RESP); - result = (NW_Opaque_t*) NW_Mem_Malloc( sizeof( NW_Opaque_t ) ); - - if (url != NULL && msg != NULL && result != NULL) - { - result->type = NW_OPAQUE_VALUE_TYPE_STRING; - result->value.s = NULL; - - msg->status = KBrsrSuccess; - msg->data = result; - - NW_Str_StrcpyConst(url, makeCallUrlPrefix); - NW_Str_Strcat(url, number); - status = NW_Script_Load(url); - /* The WTAI loader should copy the URL string */ - NW_Mem_Free(url); - url = NULL; - if (status == KBrsrHedContentDispatched) - { - status = KBrsrSuccess; - } - } - else - { - status = KBrsrOutOfMemory; - } - - if (status == KBrsrSuccess) - { - status = NW_Msg_Send(msg); - } - - if (status != KBrsrSuccess) - { - NW_Mem_Free( result ); - NW_Mem_Free( url ); - NW_Mem_Free( msg ); - } - return status; -} - -/*************************************************************** - * Function: NW_Script_wp_sendDTMF - * Purpose: Sends a request to the Browser - ***************************************************************/ - -TBrowserStatusCode NW_Script_wp_sendDTMF(NW_Ucs2 *dtmf) -{ - NW_Msg_t *msg = NULL; - NW_Ucs2 * url = NULL; - Script_Context_t *thisObj; - const char* const sendDtmfUrlPrefix = "wtai://wp/sd;"; - NW_Opaque_t *result = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_LOG0(NW_LOG_LEVEL5, "SCRIPT : NW_Script_wp_sendDTMF\n"); - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - url = (NW_Ucs2*) NW_Mem_Malloc((NW_Asc_strlen(sendDtmfUrlPrefix) + NW_Str_Strlen(dtmf) + 1) * sizeof(NW_Ucs2)); - msg = NW_Msg_New(1, thisObj->address, thisObj->address, NW_MSG_SCRIPT_WP_SENDDTMF_RESP); - result = (NW_Opaque_t*) NW_Mem_Malloc( sizeof( NW_Opaque_t ) ); - - if (url != NULL && msg != NULL && result != NULL) - { - result->type = NW_OPAQUE_VALUE_TYPE_STRING; - result->value.s = NULL; - - msg->status = KBrsrSuccess; - msg->data = result; - - NW_Str_StrcpyConst(url, sendDtmfUrlPrefix); - NW_Str_Strcat(url, dtmf); - status = NW_Script_Load(url); - /* The WTAI loader should copy the URL string */ - NW_Mem_Free(url); - url = NULL; - if (status == KBrsrHedContentDispatched) - { - status = KBrsrSuccess; - } - } - else - { - status = KBrsrOutOfMemory; - } - - if (status == KBrsrSuccess) - { - status = NW_Msg_Send(msg); - } - - if (status != KBrsrSuccess) - { - NW_Mem_Free( result ); - NW_Mem_Free( url ); - NW_Mem_Free( msg ); - } - return status; -} - -/*************************************************************** - * Function: NW_Script_wp_addPBEntry - * Purpose: Sends a request to the Browser - ***************************************************************/ - -TBrowserStatusCode NW_Script_wp_addPBEntry(NW_Ucs2 *number, NW_Ucs2 *name) -{ - NW_Msg_t *msg = NULL; - NW_Ucs2 * url = NULL; - Script_Context_t *thisObj; - const char* const pbEntryUrlPrefix = "wtai://wp/ap;"; - const char* const numberNameSeparator = ";"; - NW_Opaque_t *result = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_LOG0(NW_LOG_LEVEL5, "SCRIPT : NW_Script_wp_PBEntry\n"); - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - url = (NW_Ucs2*) NW_Mem_Malloc((NW_Asc_strlen(pbEntryUrlPrefix) + NW_Str_Strlen(number) + - NW_Str_Strlen(name) + 2) * sizeof(NW_Ucs2)); - msg = NW_Msg_New(1, thisObj->address, thisObj->address, NW_MSG_SCRIPT_WP_ADDPBENTRY_RESP); - result = (NW_Opaque_t*) NW_Mem_Malloc( sizeof( NW_Opaque_t ) ); - - if (url != NULL && msg != NULL && result != NULL) - { - result->type = NW_OPAQUE_VALUE_TYPE_STRING; - result->value.s = NULL; - - msg->status = KBrsrSuccess; - msg->data = result; - - NW_Str_StrcpyConst(url, pbEntryUrlPrefix); - NW_Str_Strcat(url, number); - NW_Str_StrcatConst(url, numberNameSeparator); - NW_Str_Strcat(url, name); - status = NW_Script_Load(url); - /* The WTAI loader should copy the URL string */ - NW_Mem_Free(url); - url = NULL; - if (status == KBrsrHedContentDispatched) - { - status = KBrsrSuccess; - } - } - else - { - status = KBrsrOutOfMemory; - } - - if (status == KBrsrSuccess) - { - status = NW_Msg_Send(msg); - } - - if (status != KBrsrSuccess) - { - NW_Mem_Free( result ); - NW_Mem_Free( url ); - NW_Mem_Free( msg ); - } - return status; -} - -/*************************************************************** - * Function: NW_Script_nokia_locationInfo - * Purpose: Sends a request to the Browser - ***************************************************************/ - -TBrowserStatusCode NW_Script_nokia_locationInfo(NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format) -{ - NW_Msg_t *cmsg = NULL; - Script_Context_t *thisObj = NULL; - void **args = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - thisObj = script_getThis(); - NW_ASSERT(thisObj); - - args = (void**)NW_Mem_Malloc(sizeof(void*) * 3); - if (args != NULL) { - args[0] = (void*)url; - args[1] = (void*)ll_format; - args[2] = (void*)pn_format; - } else { - status = KBrsrOutOfMemory; - goto failure; - } - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_REQ); - if (cmsg == NULL) { - status = KBrsrOutOfMemory; - goto failure; - } - - cmsg->status = KBrsrSuccess; - cmsg->data = args; - - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - NW_Msg_Delete( cmsg ); - NW_LOG0(NW_LOG_LEVEL1, "Scripting Engine : Could not send message"); - status = KBrsrFailure; - goto failure; - } - return KBrsrSuccess; - -failure: - NW_Mem_Free( url ); - NW_Mem_Free( ll_format ); - NW_Mem_Free( pn_format ); - NW_Mem_Free( args ); - - script_notifyError(SCR_ERROR_OUT_OF_MEMORY); - return status; - -} - -/************************************************ - * WTAI Response Handler - * - * This handler is called as a response to every - * WTAI request. - ************************************************/ - -TBrowserStatusCode NW_Script_wtaiResp(NW_Msg_t *msg) -{ - NW_LOG0(NW_LOG_LEVEL5, "SCRIPT : NW_Script_wtaiResp\n"); - NW_ASSERT(msg != NULL); - - switch(msg->type) - { - case NW_MSG_SCRIPT_WP_MAKECALL_RESP: - case NW_MSG_SCRIPT_WP_SENDDTMF_RESP: - case NW_MSG_SCRIPT_WP_ADDPBENTRY_RESP: - { - NW_Opaque_t *result = (NW_Opaque_t*) msg->data; - NW_ASSERT(result != NULL); - CoreScript_Wtai_CB(result); - break; - } - default: - NW_ASSERT(0); - } - NW_Msg_Delete(msg); - - return KBrsrSuccess; -} - - - -/***********************************/ -/******** Crypto Functions *********/ -/***********************************/ - -/************************************************************************ - Function: NW_Script_CryptoSignTextErrorCleanup - Purpose: Cleanup in case of an error - Parameters: params - The pointer to free - status - The error code to display to the user - - Return Values: none -*************************************************************************/ -void NW_Script_CryptoSignTextErrorCleanup(SignTextParams_t* params, - TBrowserStatusCode status) -{ -#ifndef PROFILE_NO_WTLS - NW_Msg_t *msg; - Script_Context_t* thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL);/* script interpreter should be initialized */ - NW_ScrCrypto_SignTextParamsFree(params); - if ((msg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser , NW_MSG_UA_DISPLAYERROR_REQ))!=NULL) - { - msg->status = status; - NW_Msg_Send(msg); - } - CoreScript_SignText_CB(status, NULL, 0); -#else - NW_REQUIRED_PARAM(status); - NW_REQUIRED_PARAM(params); - CoreScript_SignText_CB(KBrsrSuccess, NULL, 0); - -#endif /*PROFILE_NO_WTLS*/ -} - -/************************************************************************ - Function: NW_Script_CryptoSignTextStart - Purpose: Sends a request to script proxy to display the text to sign. - Parameters: - - Return Values: KBrsrSuccess , KBrsrFailure or KBrsrOutOfMemory -*************************************************************************/ -TBrowserStatusCode NW_Script_CryptoSignTextStart(NW_Ucs2 *stringToSign, NW_Int32 option, - NW_Int32 keyIdType, NW_Byte *keyIdByte, NW_Int32 keyIdLen) -{ -#ifndef PROFILE_NO_WTLS - NW_Msg_t *cmsg = NULL; - Script_Context_t* thisObj; - SignTextParams_t* params = NULL; - NW_Dlg_Prompt_t* data = NULL; - TBrowserStatusCode status = KBrsrSuccess; - const NW_Bool contDo=NW_FALSE; - thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL);/* script interpreter should be initialized */ - do - { - if (stringToSign == NULL || NW_Str_Strlen(stringToSign) <1) - { - status = KBrsrScriptInvalidFuncArgs; - break; - } - if (keyIdType < SignatureKeyIdentifierNone || keyIdType > SignatureKeyIdentifierTrustedKeyHash) - { - status = KBrsrScriptInvalidFuncArgs; - break; - } - if (option < 0 || option > (SignatureIncludeContent | SignatureIncludeKeyHash | SignatureIncludeCertificate)) - { - status = KBrsrScriptInvalidFuncArgs; - break; - } - if (keyIdType != SignatureKeyIdentifierNone && (keyIdByte == NULL || keyIdLen == 0)) - { - status = KBrsrScriptInvalidFuncArgs; - break; - } - - params = NW_ScrCrypto_SignTextParamsNew(SignStateInit, stringToSign, option, keyIdType, - keyIdByte, keyIdLen, 0, NULL, NULL, NULL); - if (params != NULL ) - { - if ((data = NW_Dlg_PromptInit(NULL,stringToSign,UI_OPTION_TEXT_TO_SIGN, SIGN_BUTTON_INDEX, - CANCEL_BUTTON_INDEX, 0, params)) != NULL) - { - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DIALOGPROMPT_REQ); - } - } - if (cmsg == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - cmsg->data = data; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) { - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - status = KBrsrFailure; - } - } - } - while(contDo); - if (status != KBrsrSuccess) - { - NW_Script_CryptoSignTextErrorCleanup(params, status); - NW_Mem_Free(data); - NW_Mem_Free(cmsg); - } - return KBrsrSuccess; -#else /*PROFILE_NO_WTLS*/ - NW_REQUIRED_PARAM(keyIdLen); - NW_REQUIRED_PARAM(keyIdByte); - NW_REQUIRED_PARAM(keyIdType); - NW_REQUIRED_PARAM(option); - NW_REQUIRED_PARAM(stringToSign); - - /* errorCleanup() will push invalid_val on the stack */ - /* and restart the interprete() loop. just return SUCCESS */ - /* and since signtext is async current execution of */ - /* interprete() loop will terminate */ - NW_Script_CryptoSignTextErrorCleanup(NULL, KBrsrFailure); - - return KBrsrSuccess; -#endif /*PROFILE_NO_WTLS*/ -} - -//#pragma message("TODO:: nwx_script_handler.c, enable SignText") -#if 0 -#ifndef PROFILE_NO_WTLS -static NW_Bool signStateInit(SignTextParams_t* params, void* Ctx) -{ - NW_Dlg_ListSelect_t* listSelectData=NULL; - NW_Dlg_Prompt_t* promptData=NULL; - NW_Ucs2** labels=NULL; - NW_Bool cont=NW_TRUE; - const NW_Bool contDo=NW_FALSE; - NW_Uint8 i; - TBrowserStatusCode status=KBrsrSuccess; - NW_Msg_t *cmsg = NULL; - Script_Context_t* thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL);/* script interpreter should be initialized */ - NW_ASSERT(Ctx!=NULL); - promptData = (NW_Dlg_Prompt_t*)Ctx; - do - { - if (promptData->selectedButton == 0) - { - /* The user chose to sign the text */ - switch (params->keyIdType) - { - case SignatureKeyIdentifierNone: - status = NW_Wim_GetCertificateListByWIM(NULL, NW_WIMI_CU_Client, - &params->certNum, &params->certificatesList); - break; - case SignatureKeyIdentifierUserKeyHash: - { - status = NW_Wim_GetCertificateListByKeyHash(params->keyIdByte , - NW_WIMI_CU_Client, &params->certNum, &params->certificatesList); - break; - } - case SignatureKeyIdentifierTrustedKeyHash: - status = NW_Wim_GetCertificateListByCAKeyHash(params->keyIdByte , - NW_WIMI_CU_Client, &params->certNum, - &params->certificatesList); - break; - default: - /* signText got invalid parameter. - Already checked parameters before, so should not get here*/ - NW_ASSERT(NW_FALSE); - NW_Script_CryptoSignTextErrorCleanup(params,KBrsrScriptInvalidFuncArgs); - cont=NW_FALSE; - break; - } - if (status != KBrsrSuccess) - { - NW_Script_CryptoSignTextErrorCleanup(params, status); - cont=NW_FALSE; - break; - } - /* Get only non-repudiation keys */ - if ((status = NW_Wim_GetCertListByKeyUsage(&(params->certificatesList), - &(params->certNum), NW_PKCS15_KU_sign)) != KBrsrSuccess) - { - NW_Script_CryptoSignTextErrorCleanup(params, status); - cont=NW_FALSE; - break; - } - - /* - * if there are no matching certificates, abort. - * if there is one matching certificate, continue. - * if there are multiple matching certificates, let the user select which one to use. - */ - if (params->certNum == 0) - { - NW_Script_CryptoSignTextErrorCleanup(params,KBrsrCryptoNoCert); - cont=NW_FALSE; - } else { - - { - if ((status = NW_Wim_GetLabelsFromRef(params->certNum, - params->certificatesList, &labels)) != KBrsrSuccess ) - { - if (labels == NULL) - { - params->certNum = 0; - } - break; - } - - listSelectData = NW_Dlg_ListSelectInit(NULL, NULL, UI_OPTION_CERT_LIST_SIGN_TEXT, params->certNum, labels, - SELECT_BUTTON_INDEX, CANCEL_BUTTON_INDEX, - 0, 0, params); - params->state=SignStateGetSelectedCert; - - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DIALOGLISTSELECT_REQ); - if (listSelectData == NULL || cmsg == NULL) - { - status = KBrsrOutOfMemory; - break; - } - cmsg->data = listSelectData; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) - { - status = KBrsrFailure; - NW_LOG0(NW_LOG_LEVEL1, "Scripting Engine : Could not send message"); - } - cont=NW_FALSE; - } - - if (status !=KBrsrSuccess) - { - for (i=0;i<params->certNum;i++) - { - NW_Mem_Free(labels[i]); - } - NW_Mem_Free(labels); - NW_Mem_Free(listSelectData); - listSelectData=NULL; - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - cmsg=NULL; - cont=NW_FALSE; - NW_Script_CryptoSignTextErrorCleanup(params, status); - break; - } - } - } - else - { - NW_ScrCrypto_SignTextParamsFree(params); - CoreScript_SignText_CB(KBrsrCryptoUserCancel, NULL, 0); - cont=NW_FALSE; - } - } - while (contDo); - NW_Mem_Free(promptData); - promptData = NULL; - return cont; -} - -static NW_Bool signStateGetSelectedCert(SignTextParams_t* params, void* Ctx) -{ - NW_Dlg_ListSelect_t* listSelectData=NULL; - NW_Ucs2** labels=NULL; - NW_Bool cont=NW_TRUE; - NW_Uint8 i; - NW_ASSERT(Ctx!=NULL); - listSelectData = (NW_Dlg_ListSelect_t*)Ctx; - if (listSelectData->selectedButton == 0) /* The user chose the sign button, not the cancel */ - { - params->selectedCertRef= params->certificatesList[listSelectData->selectedItem]; - params->certificatesList[listSelectData->selectedItem] = NULL; - NW_Wim_free_RefList(params->certificatesList); - params->certificatesList=NULL; - params->certNum=0; - params->state = SignStateGetPIN; - } - else - { - NW_ScrCrypto_SignTextParamsFree(params); - CoreScript_SignText_CB(KBrsrCryptoUserCancel, NULL, 0); - cont=NW_FALSE; - } - labels = listSelectData->items; - for (i=0;i<listSelectData->itemsCount;i++) - { - NW_Mem_Free(labels[i]); - } - NW_Mem_Free(labels); - NW_Mem_Free(listSelectData); - return cont; -} - -static void signStateGetPIN(SignTextParams_t* params) -{ - NW_Dlg_InputPrompt_t* inputPromptData=NULL; - const NW_Bool contDo=NW_FALSE; - TBrowserStatusCode status=KBrsrSuccess; - NW_Msg_t *cmsg = NULL; - void* PINRef=NULL; - void* WIMRef=NULL; - void* refList[3] = {NULL, NULL, NULL}; /* reference lists are NULL terminated */ - NW_Ucs2** labelList = NULL; - NW_Ucs2* tmp; - - NW_Ucs2* input=NW_Mem_Malloc((MAX_PIN_LEN+1)*sizeof(NW_Ucs2)); - Script_Context_t* thisObj = script_getThis(); - NW_ASSERT(thisObj != NULL);/* script interpreter should be initialized */ - do - { - if (input == NULL) - { - status = KBrsrOutOfMemory; - break; - } - input[0]=0; - if ((status = NW_Wim_GetCertInfo(params->selectedCertRef, &WIMRef, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) != KBrsrSuccess) - break; - - if ((status = NW_Wim_GetPINRefFromCertRef(params->selectedCertRef, &PINRef)) != KBrsrSuccess) - break; - - /* Get the WIM and PIN label */ - refList[0]=PINRef; - refList[1]=WIMRef; - if ((status = NW_Wim_GetLabelsFromRef(2,refList,&labelList))!=KBrsrSuccess) - { - break; - } - inputPromptData = NW_Dlg_InputPromptInit(labelList[1], labelList[0], NULL, NULL, UI_OPTION_ENTER_PIN_SIGN_TEXT, - NW_TRUE, NW_TRUE, - ENTER_BUTTON_INDEX,CANCEL_BUTTON_INDEX, - MAX_PIN_LEN+1,input,0,params); - params->state=SignStateGetSignature; - cmsg = NW_Msg_New(1, thisObj->address, thisObj->wmlBrowser, - NW_MSG_UA_DIALOGINPUTPROMPT_REQ); - if (inputPromptData == NULL || cmsg == NULL) - { - status = KBrsrOutOfMemory; - break; - } - cmsg->data = inputPromptData; - cmsg->status = KBrsrSuccess; - if (NW_Msg_Send(cmsg) != KBrsrSuccess) - { - status = KBrsrFailure; - NW_Mem_Free(inputPromptData); - cmsg->data = NULL; - (void) NW_Msg_Delete(cmsg); - NW_LOG0(NW_LOG_LEVEL1, - "Scripting Engine : Could not send message"); - } - } - while (contDo); - NW_Wim_free_Ref(refList[0]); - NW_Wim_free_Ref(refList[1]); - - if (status !=KBrsrSuccess) - { - if (inputPromptData != NULL) - { - NW_Mem_Free(inputPromptData->input); - tmp = (NW_Ucs2*)inputPromptData->title; - NW_Mem_Free(tmp); - tmp = (NW_Ucs2*)inputPromptData->prompt; - NW_Mem_Free(tmp); - NW_Mem_Free(inputPromptData); - } - if (cmsg != NULL) - { - cmsg->data = NULL; - NW_Msg_Delete(cmsg); - cmsg=NULL; - } - NW_Script_CryptoSignTextErrorCleanup(params, status); - } - NW_Mem_Free(labelList); -} - -static void signStateGetSignature(SignTextParams_t* params, void* Ctx) -{ - NW_Dlg_InputPrompt_t* inputPromptData=NULL; - const NW_Bool contDo=NW_FALSE; - NW_Uint8 i; - TBrowserStatusCode status=KBrsrSuccess; - NW_Ucs2* tmp; - SignedContent *signedContent = NULL; - AuthenticatedAttribute *authenticatedAttribute = NULL; - NW_Time_Tm_t *universalTime = NULL; - NW_Uint16 authenticatedAttributeLen = 14; /* we only support GMT time */ - NW_Uint8 *pTime; - - NW_ASSERT(Ctx!=NULL); - inputPromptData = (NW_Dlg_InputPrompt_t*)Ctx; - if (inputPromptData->selectedButton == 0) - { - NW_Byte *utf8Buf = NW_Mem_Malloc(NW_Str_Strlen(params->stringToSign) * 3); - NW_Byte* p=utf8Buf; - NW_Ucs2 *s = params->stringToSign; - /* PKCS1 hashed content block type format */ - NW_Byte hashedData[] = { - 0x30, 0x21, - 0x30, 0x09, - 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, - 0x05, 0x00, - 0x04, 0x14, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - /* PKCS7 hashed content type format */ - NW_Byte pkcs7 [] = { - 0x31, 0x5d, - 0x30, 0x18, - 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x03, - 0x31, 0x0b, - 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, - 0x30, 0x1c, - 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x05, - 0x31,0x0f, - 0x17, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x5a, - 0x30, 0x23, - 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x04, - 0x31,0x16, - 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; -/* Get the time here */ - - NW_Byte *inputPIN=NULL; - NW_Uint16 inputPINLen=0; - NW_SignResp_t *signResp=NULL; - authenticatedAttribute = NW_Mem_Malloc(authenticatedAttributeLen); - signedContent = NW_Mem_Malloc(sizeof(SignedContent)); - - do - { - if (authenticatedAttribute == NULL || signedContent == NULL) - { - status = KBrsrOutOfMemory; - break; - } - signedContent->authenticatedAttribute = authenticatedAttribute; - params->signedContent = signedContent; - - authenticatedAttribute->attributeType = SignatureAuthenticatedAttributeGmtUtcTime; - /* This is GMT time */ - universalTime = NW_Time_CvtToTimeTm(NW_Time_GetTime()); - pTime = (NW_Uint8*)authenticatedAttribute->gmtUtcTime; - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Year,pTime); - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Month,pTime); - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Day,pTime); - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Hour,pTime); - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Minute,pTime); - pTime += NW_Reader_WriteUcs2CharBuff(universalTime->Second,pTime); - - NW_Time_Tm_Delete(universalTime); - universalTime=NULL; - NW_Mem_memcpy(&pkcs7[45], (NW_Uint8*)authenticatedAttribute->gmtUtcTime, - authenticatedAttributeLen - 2); - - if (utf8Buf != NULL) - { - while (*s) { - if (*s == '\n') - continue; - p += NW_Reader_WriteUtf8CharBuff(*s,p); - s++; - } - } - else - { - status = KBrsrOutOfMemory; - break; - } - if ((status = NW_Wim_Hash(NW_WIMI_HA_SHA1 , (NW_Uint16) (p - utf8Buf), utf8Buf, - &pkcs7[75])) != KBrsrSuccess) - { - break; - } - - if ((status = NW_Wim_Hash(NW_WIMI_HA_SHA1 , (NW_Uint16) (95), pkcs7, - &hashedData[15])) != KBrsrSuccess) - { - break; - } - - if ((status = NW_Wim_GetKeyRefFromCertRef(params->selectedCertRef, - &params->selectedKeyRef)) != KBrsrSuccess) - { - break; - } - inputPIN = (NW_Byte*) NW_Str_CvtToAscii(inputPromptData->input); - inputPINLen = NW_UINT16_CAST( NW_Str_Strlen(inputPromptData->input) ); - if (inputPIN == NULL) - { - status = KBrsrOutOfMemory; - break; - } - signResp = NW_Mem_Malloc(sizeof(NW_SignResp_t)); - if (signResp == NULL) - { - status = KBrsrOutOfMemory; - break; - } - signResp->senderInfo.sender = NW_SCRIPT_SERVER; - signResp->senderInfo.context = params; - signResp->senderInfo.callback = NW_Script_Wimiresp; - - if ((status = NW_Wim_SignReq(signResp, hashedData, sizeof(hashedData), - params->selectedKeyRef, inputPINLen, inputPIN)) != KBrsrSuccess) - { - break; - } - params->state = SignStateBuildSignature; - } - while(contDo); - if (status !=KBrsrSuccess) - { - NW_Mem_Free(utf8Buf); - if (inputPIN!=NULL) - { - /* Erase the PIN from memory */ - for (i=0;i<inputPINLen;i++) - { - inputPIN[i]=0; - } - NW_Mem_Free(inputPIN); - } - NW_Mem_Free(signResp); - NW_Script_CryptoSignTextErrorCleanup(params, status); - } - NW_Mem_Free(utf8Buf); - } - else - { - NW_ScrCrypto_SignTextParamsFree(params); - CoreScript_SignText_CB(KBrsrCryptoUserCancel, NULL, 0); - } - /* Erase the PIN from memory */ - for (i=0;i<MAX_PIN_LEN;i++) - { - inputPromptData->input[i]=0; - } - NW_Mem_Free(inputPromptData->input); - tmp = (NW_Ucs2*)inputPromptData->title; - NW_Mem_Free(tmp); - tmp = (NW_Ucs2*)inputPromptData->prompt; - NW_Mem_Free(tmp); - inputPromptData->input=NULL; - NW_Mem_Free(inputPromptData); -} - -static NW_Bool signStateBuildSignature(SignTextParams_t* params, void* Ctx) -{ - NW_SignResp_t *signResp = (NW_SignResp_t*)Ctx; - TBrowserStatusCode status=KBrsrSuccess; - NW_Uint8 signerInfosCount=0; - NW_Uint8 i; - const NW_Bool contDo = NW_FALSE; - NW_Bool cont = NW_TRUE; - Signature *signature = NULL; - SignerInfo **signerInfo = NULL; - ContentInfo *contentInfo = NULL; - SignedContent *signedContent = NULL; - NW_Byte *keyId; - NW_Uint16 keyIdLen; - NW_Uint8 type; - NW_Uint16 certLen; - NW_CertResp_t* certReq = NULL; - NW_ASSERT(params!=NULL); - NW_ASSERT(Ctx!=NULL); - do - { - status = NW_Wim_ConvertErrors(signResp->status); - if (status != KBrsrSuccess) - { - break; - } - signature = NW_Mem_Malloc(sizeof(Signature)); - contentInfo = NW_Mem_Malloc(sizeof(ContentInfo)); - signedContent = params->signedContent; - - if (signature == NULL || contentInfo == NULL || - signedContent == NULL) - { - status = KBrsrOutOfMemory; - break; - } - if ((status = NW_Wim_GetCertInfo(params->selectedCertRef, NULL, NULL, NULL, - &keyId, &keyIdLen, NULL, NULL, NULL, &type, &certLen, NULL )) != KBrsrSuccess) - { - break; - } - signature->algorithm = SignatureAlgorithmRsaSha1; - signature->signLen = signResp->signatureLen; - signature->sign = NW_Mem_Malloc(signResp->signatureLen); - if (signature->sign == NULL) - { - status = KBrsrOutOfMemory; - break; - } - NW_Mem_memcpy(signature->sign, signResp->signature, signResp->signatureLen); - signature->signLen = signResp->signatureLen; - if (params->option == 0) - { - signerInfosCount = 1; - } - else - { - if (params->option & SignatureIncludeKeyHash) - signerInfosCount ++; - if (params->option & SignatureIncludeCertificate) - signerInfosCount ++; - } - - signerInfo = NW_Mem_Malloc(signerInfosCount * sizeof(SignerInfo*)); - if (signerInfo == NULL) - { - status = KBrsrOutOfMemory; - break; - } - for (i=0;i<signerInfosCount;i++) - { - signerInfo[i] = NW_Mem_Malloc(sizeof(SignerInfo)); - if (signerInfo[i] == NULL) - { - status = KBrsrOutOfMemory; - break; - } - } - if (status != KBrsrSuccess) - break; - - i = 0; - - if (params->option == 0) - { - signerInfo[i]->signerInfoType = 0; - signerInfo[i]->signerInfoLen = 0; - signerInfo[i]->signerInfo = NULL; - } - if (params->option & SignatureIncludeKeyHash) - { - signerInfo[i]->signerInfoType = 1; - signerInfo[i]->signerInfoLen = keyIdLen; - signerInfo[i]->signerInfo = keyId; - keyId = NULL; - i++; - } - NW_Mem_Free(keyId); - if (params->option & SignatureIncludeCertificate) - { - switch (type) - { - case WTLSCert: - signerInfo[i]->signerInfoType = SignatureCertificateTypeWtls; - break; - case X509Cert: - signerInfo[i]->signerInfoType = SignatureCertificateTypeX509; - break; - case X968Cert: - signerInfo[i]->signerInfoType = SignatureCertificateTypeX968; - break; - case CertURL: - signerInfo[i]->signerInfoType = SignatureCertificateTypeURL; - break; - } - signerInfo[i]->signerInfoLen = certLen; - signerInfo[i]->signerInfo = NULL; - } - /* currently, only text content type is defined */ - contentInfo->contentType = SignatureContentTypeText; - contentInfo->contentEncoding = HTTP_utf_8; - contentInfo->contentPresent = (NW_Bool)((params->option & SignatureIncludeContent) ? - NW_TRUE : NW_FALSE); - if (contentInfo->contentPresent) - { - NW_Byte* p; - NW_Ucs2 *s = params->stringToSign; - contentInfo->content = NW_Mem_Malloc(NW_Str_Strlen(params->stringToSign) * 3); - p = contentInfo->content; - - if (contentInfo->content != NULL) - { - while (*s) { - if (*s == '\n' ) - continue; - p += NW_Reader_WriteUtf8CharBuff(*s,p); - s++; - } - contentInfo->contentLen = (NW_Uint16)(p - (NW_Byte*)contentInfo->content); - } - else - { - status = KBrsrOutOfMemory; - break; - } - } - else - { - contentInfo->contentLen = 0; - contentInfo->content=NULL; - } - - signedContent->version = 1; - signedContent->signature = signature; - signedContent->signerInfoCount = signerInfosCount; - signedContent->signerInfos = signerInfo; - signedContent->contentInfo = contentInfo; - params->signedContent = signedContent; - - if (params->option & SignatureIncludeCertificate) - { - certReq = NW_Mem_Malloc(sizeof(NW_CertResp_t)); - if (certReq == NULL) - { - status = KBrsrOutOfMemory; - break; - } - certReq->senderInfo.sender = NW_SCRIPT_SERVER; - certReq->senderInfo.context = params; - certReq->senderInfo.callback = NW_Script_Wimiresp; - status = NW_Wim_CertificateReq(certReq, params->selectedCertRef); - if (status!=KBrsrSuccess) - { - break; - } - params->state = SignStateAddCertificateContent; - cont = NW_FALSE; - } - else - { - params->state = SignStateFinish; - } - } - while(contDo); - if (status != KBrsrSuccess) - { - cont = NW_FALSE; - NW_Mem_Free(signature); - for (i=0;i<signerInfosCount;i++) - { - NW_Mem_Free(signerInfo[i]); - } - NW_Mem_Free(signerInfo); - if (contentInfo != NULL) - { - NW_Mem_Free(contentInfo->content); - NW_Mem_Free(contentInfo); - } - NW_Mem_Free(signedContent); - params->signedContent = NULL; /* Do not free twice */ - NW_Mem_Free(certReq); - NW_Script_CryptoSignTextErrorCleanup(params, status); - } - NW_Mem_Free(signResp); - return cont; -} - -static NW_Bool signStateAddCertificateContent(SignTextParams_t* params, void* Ctx) -{ - NW_Bool cont=NW_TRUE; - const NW_Bool contDo=NW_FALSE; - TBrowserStatusCode status = KBrsrSuccess; - NW_CertResp_t *certResp = (NW_CertResp_t*)Ctx; - NW_ASSERT(Ctx != NULL); - do - { - status = NW_Wim_ConvertErrors(certResp->status); - if (status != KBrsrSuccess) - { - break; - } - if (params->signedContent->signerInfos[params->signedContent->signerInfoCount - 1]->signerInfoLen != certResp->certLen) - { - status = KBrsrOutOfMemory; - break; - } - params->signedContent->signerInfos[params->signedContent->signerInfoCount - 1]->signerInfo = certResp->cert; - params->state = SignStateFinish; - } - while(contDo); - if (status != KBrsrSuccess) - { - NW_Script_CryptoSignTextErrorCleanup(params, status); - cont=NW_FALSE; - } - NW_Mem_Free(certResp); - return cont; -} - -static void signStateFinish(SignTextParams_t* params) -{ - NW_Byte* signedText; - NW_Uint32 signedTextLen; - NW_Uint16 i; - NW_Uint16 signatureLen=0; - NW_Uint16 signerInfoLen[4];/* no more than 4 defferent infos */ - NW_Uint16 signerInfosLen=2; /* 2 is for size */ - NW_Uint16 contentInfoLen=0; - NW_Uint16 authenticatedAttributeLen = 14; /* we only support GMT time */ - NW_ASSERT(params!=NULL); - /* calculate length of buffer */ - - signatureLen = 1;/* 1 for the algorithm */ - if (params->signedContent->signature->algorithm != 0) - { - signatureLen = (NW_Uint16)(signatureLen + params->signedContent->signature->signLen + 2);/* 2 for the size */ - } - - for (i=0;i<params->signedContent->signerInfoCount;i++) - { - signerInfoLen[i]=1; /* 1 for is the type */ - if (params->signedContent->signerInfos[i]->signerInfoType != 0) - { - signerInfoLen[i] = (NW_Uint16)(signerInfoLen[i] + params->signedContent->signerInfos[i]->signerInfoLen); - switch (params->signedContent->signerInfos[i]->signerInfoType) - { - case SignatureCertificateTypeWtls: - case SignatureCertificateTypeX509: - case SignatureCertificateTypeX968: - signerInfoLen[i] += 2; - /* 2 is for size */ - break; - case SignatureCertificateTypeURL: - signerInfoLen[i] += 1; /* 1 is for size */ - break; - default: - break; - } - } - signerInfosLen = (NW_Uint16)(signerInfosLen + signerInfoLen[i] ); - } - - contentInfoLen = 4; /* 4 bytes for flags: content type, encoding and present */ - if (params->signedContent->contentInfo->contentPresent) - { - contentInfoLen = (NW_Uint16)(contentInfoLen + params->signedContent->contentInfo->contentLen + 2); /* 2 is for size */ - } - - /* 1 for the version */ - signedTextLen= 1 + signatureLen + signerInfosLen + contentInfoLen + - authenticatedAttributeLen; - signedText = NW_Mem_Malloc(signedTextLen); - if (signedText != NULL) - { - /* fill the buffer */ - NW_Byte *p=signedText; - *p = 1; /* version number */ - p++; - *p = params->signedContent->signature->algorithm; - p++; - if (params->signedContent->signature->algorithm != 0) - { - p += NW_Reader_WriteUcs2CharBuff(params->signedContent->signature->signLen,p); - NW_Mem_memcpy(p,params->signedContent->signature->sign,params->signedContent->signature->signLen); - p += params->signedContent->signature->signLen; - } - p += NW_Reader_WriteUcs2CharBuff((NW_Uint16)(signerInfosLen-2),p); /* size not included */ - for (i=0;i<params->signedContent->signerInfoCount;i++) - { - *p = params->signedContent->signerInfos[i]->signerInfoType; - p++; - switch (params->signedContent->signerInfos[i]->signerInfoType) - { - case SignatureIdKeyHash: - params->signedContent->signerInfos[i]->signerInfoLen=20; /* 20 is the size of a SHA1 hash */ - break; - case SignatureCertificateTypeWtls: - case SignatureCertificateTypeX509: - case SignatureCertificateTypeX968: - p += NW_Reader_WriteUcs2CharBuff(params->signedContent->signerInfos[i]->signerInfoLen,p); - break; - case SignatureCertificateTypeURL: - *p = (NW_Uint8)(params->signedContent->signerInfos[i]->signerInfoLen); - p++; - break; - default: - break; - } - NW_Mem_memcpy(p,params->signedContent->signerInfos[i]->signerInfo, - params->signedContent->signerInfos[i]->signerInfoLen); - p += params->signedContent->signerInfos[i]->signerInfoLen; - } - *p = (NW_Uint8)SignatureContentTypeText; - p++; - p += NW_Reader_WriteUcs2CharBuff(params->signedContent->contentInfo->contentEncoding,p); - *p = params->signedContent->contentInfo->contentPresent; - p++; - if (params->signedContent->contentInfo->contentPresent) - { - p += NW_Reader_WriteUcs2CharBuff(params->signedContent->contentInfo->contentLen,p); - NW_Mem_memcpy(p,params->signedContent->contentInfo->content, - params->signedContent->contentInfo->contentLen); - p += params->signedContent->contentInfo->contentLen; - } - *p = (NW_Uint8)(authenticatedAttributeLen - 1); /* size of authenticated attribute , - without the length */ - p++; - *p = params->signedContent->authenticatedAttribute->attributeType; - p++; - NW_Mem_memcpy(p,params->signedContent->authenticatedAttribute->gmtUtcTime, - authenticatedAttributeLen - 2);/* size of authenticated attribute , - without the length and type */ - - NW_ScrCrypto_SignTextParamsFree(params); - CoreScript_SignText_CB(KBrsrSuccess, signedText, signedTextLen); - } - else - { - NW_Script_CryptoSignTextErrorCleanup(params, KBrsrOutOfMemory); - } -} -#endif /*PROFILE_NO_WTLS*/ - -/************************************************************************ - Function: NW_Script_CryptoSignTextContinue - Purpose: Continue processing of SignText - Parameters: - - Return Values: none -*************************************************************************/ -void NW_Script_CryptoSignTextContinue(SignTextParams_t* params, void* Ctx) -{ -#ifndef PROFILE_NO_WTLS - NW_Bool cont=NW_TRUE; - while (cont) - { - switch (params->state) - { - case SignStateInit: - { - cont = signStateInit( params, Ctx); - Ctx = NULL; - break; - } - case SignStateGetSelectedCert: - { - cont = signStateGetSelectedCert(params, Ctx); - Ctx = NULL; - break; - } - case SignStateGetPIN: - { - signStateGetPIN(params); - cont = NW_FALSE; - break; - } - case SignStateGetSignature: - signStateGetSignature(params, Ctx); - Ctx = NULL; - cont=NW_FALSE; - break; - case SignStateBuildSignature: - { - cont = signStateBuildSignature(params, Ctx); - Ctx = NULL; - break; - } - case SignStateAddCertificateContent: - { - cont = signStateAddCertificateContent(params, Ctx); - Ctx = NULL; - break; - } - case SignStateFinish: - { - signStateFinish(params); - cont = NW_FALSE; - break; - } - default: - NW_ASSERT(NW_FALSE); /* Should not be here. All states should be covered */ - NW_Script_CryptoSignTextErrorCleanup(params,KBrsrScriptFatalLibFuncError); - cont=NW_FALSE; - break; - }/* switch */ - }/* while cont */ -#else - NW_REQUIRED_PARAM(Ctx); - NW_REQUIRED_PARAM(params); - -#endif /*PROFILE_NO_WTLS*/ -} - - -TBrowserStatusCode NW_Script_Genericdialoglistselectresp(NW_Msg_t *msg) -{ - NW_Dlg_ListSelect_t* data; - NW_ASSERT(msg != NULL); - NW_ASSERT(msg->data != NULL); - data = (NW_Dlg_ListSelect_t*)msg->data; - NW_ASSERT(data->context!=NULL); - NW_Msg_Delete(msg); - NW_Script_CryptoSignTextContinue((SignTextParams_t*)data->context , data); - return KBrsrSuccess; -} - -TBrowserStatusCode NW_Script_Genericdialogpromptresp(NW_Msg_t *msg) -{ - NW_Dlg_Prompt_t* data; - NW_ASSERT(msg != NULL); - NW_ASSERT(msg->data != NULL); - data = (NW_Dlg_Prompt_t*)msg->data; - NW_Msg_Delete(msg); - NW_Script_CryptoSignTextContinue((SignTextParams_t*)data->context , data); - return KBrsrSuccess; -} - -TBrowserStatusCode NW_Script_Genericdialoginputpromptresp(NW_Msg_t *msg) -{ - NW_Dlg_InputPrompt_t* data; - NW_ASSERT(msg != NULL); - NW_ASSERT(msg->data != NULL); - data = (NW_Dlg_InputPrompt_t*)msg->data; - NW_Msg_Delete(msg); - NW_Script_CryptoSignTextContinue((SignTextParams_t*)data->context , data); - return KBrsrSuccess; -} - - -TBrowserStatusCode NW_Script_Wimiresp(NW_Msg_t *msg) -{ - SignTextParams_t* params; - NW_SenderInfo_t * senderInfo; - NW_ASSERT(msg->data!=NULL); - senderInfo = (NW_SenderInfo_t *) msg->data; - NW_Msg_Delete(msg); - NW_ASSERT(senderInfo!=NULL); - params = senderInfo->context; - NW_ASSERT(params!=NULL); - NW_Script_CryptoSignTextContinue(params, senderInfo); - return KBrsrSuccess; -} -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_api.c --- a/webengine/wmlengine/src/script/src/scr_api.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,482 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "scr_api.h" -#include "scr_srv.h" -#include "scr_core.h" -#include "scr_conv.h" -#include "scr_crypto.h" - -#include "nw_wae_reader.h" - -#include "nwx_defs.h" -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "nwx_msg_api.h" -#include "urlloader_urlresponse.h" -#include "urlloader_urlloaderint.h" -#include "nwx_script_handler.h" -#include "nwx_http_defs.h" -#include "nwx_ctx.h" -#include "nw_nvpair.h" - -typedef struct { - context_t ctx; -} Script_Server_t; - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static NW_Bool genericLoad( const NW_Ucs2* url, char const* mimetype) -{ - void *reqHeader = NULL; - NW_Uint16 tid = 0;/* dont care about transaction ids */ - NW_Bool ret = NW_TRUE; - TBrowserStatusCode status; - - NW_ASSERT(url != NULL); - - reqHeader = UrlLoader_HeadersNew((NW_Uint8*)mimetype, NULL, NULL, NULL, 0, NULL); - - /* Add Accept headers */ - if (reqHeader == NULL ) { - ret = NW_FALSE; - } - else { - /* No default headers must be added later on */ - - /* Do the load. When the loader finishes it invokes the - NW_Script_Urlloadresp function with a NULL callback context */ - - // this partialResponseBuffer is being used as a buffer in - // the response callback function - NW_Buffer_t* partialResponseBuffer = NW_Buffer_New( 1 ); - - status = UrlLoader_Request(url, reqHeader, NULL, 0, NW_URL_METHOD_GET, &tid, - (void*)partialResponseBuffer, (NW_Url_RespCallback_t*)NW_Script_Urlloadresp, - NW_CACHE_NORMAL, NW_DEFAULTHEADERS_CHARSET, NW_UrlRequest_Type_None, NW_FALSE, NW_TRUE, - NW_HED_UrlRequest_Reason_DocLoad, NULL); - - if (!BRSR_STAT_IS_SUCCESS(status)) { - NW_Buffer_Free( partialResponseBuffer ); - ret = NW_FALSE; - } - } - - if (ret == NW_FALSE) { - UrlLoader_HeadersFree(reqHeader); - } - return ret; -} - -static Script_Server_t *GetScrServerContext(void) -{ - return (Script_Server_t *)NW_Ctx_Get(NW_CTX_SCR_SERVER, 0); -} - -static void SetScrServerContext(Script_Server_t* context) -{ - NW_Ctx_Set(NW_CTX_SCR_SERVER, 0, context); -} - -lib_function_table_t* GetLibFuncTabContext(void) -{ - return (lib_function_table_t*)NW_Ctx_Get(NW_CTX_SCR_FUNC_TAB, 0); -} - -void SetLibFuncTabContext(lib_function_table_t* context) -{ - NW_Ctx_Set(NW_CTX_SCR_FUNC_TAB, 0, (void*)context); -} - -/*************************** Global Data ***************************** - NOTES: For now we will create a single global variable to - hold all of the context for the component. It will be - accessed with the getThis() function call -*/ - -/*TODO: delete when new memory context is tested */ -/*static Script_Server_t g_script_server;*/ -/*lib_function_t *LIB_FUNCS[NO_OF_STD_LIBS];*/ -const NW_Int32 LIB_ID_MAP[NO_OF_STD_LIBS] = { - LANG_LIB_ID, - FLOAT_LIB_ID, - STRING_LIB_ID, - URL_LIB_ID, - BROWSER_LIB_ID, - DIALOG_LIB_ID, - CRYPTO_LIB_ID, - DEBUG_LIB_ID, - WP_LIB_ID, - NOKIA_LIB_ID - }; - -/* XML Spec 2.2 CDATA value */ -/* Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] */ -/* NOTE: since NW_Ucs2 is only 2 bytes, we can't handle 0x10000-0x10ffff */ -NW_Bool CheckVarValue(NW_Ucs2* value) -{ - NW_Ucs2 *pChar = value; - - while (*pChar != 0) { - if ((*pChar >= 0x20) && (*pChar <= 0xd7ff)) { - pChar++; - continue; - } - if ((*pChar >= 0xE000) && (*pChar <= 0xfffd)) { - pChar++; - continue; - } - if ((*pChar == 0x9) || (*pChar == 0xa) || (*pChar == 0xd)) { - pChar++; - continue; - } - return NW_FALSE; - } - - return NW_TRUE; -} - -NW_Bool ScriptAPI_loadString(const NW_Ucs2* url, char *mimetype) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - set_ctx_state(ctx, LOADSTRING_REQ); - - return genericLoad(url, mimetype); -} - -NW_Bool ScriptAPI_load(NW_Ucs2* url) -{ - context_t* ctx = ScriptAPI_getCurrentContext(); - char const* mimetype = (char const*)HTTP_application_vnd_wap_wmlscriptc_string; - - set_ctx_state(ctx, URL_REQ); - - return genericLoad(url, mimetype); -} - -NW_Bool ScriptAPI_reload(void) -{ - NW_Ucs2 * postfields; - NW_Ucs2 * fullUrl = NULL; - NW_Bool ret = NW_FALSE; - NW_Ucs2 * url = get_curr_url(); - context_t * ctx = ScriptAPI_getCurrentContext(); - char const* mimetype = (char const*)HTTP_application_vnd_wap_wmlscriptc_string; - - if (ctx && url) - { - postfields = get_curr_postfields(); - if (postfields) { - if (KBrsrSuccess != NW_Url_AddPostfields(url, postfields, &fullUrl)) { - goto funcExit; - } - url = fullUrl; - } - set_ctx_state(ctx, RELOAD); - - ret = genericLoad(url, mimetype); - } - -funcExit: - NW_Str_Delete(fullUrl); - return ret; -} - -NW_Bool ScriptAPI_getVar(NW_Ucs2* name) -{ - if (!NW_CheckName(name)) { - return NW_FALSE; - } - if (KBrsrSuccess != NW_Script_Getvar(name)) - return NW_FALSE; - - return NW_TRUE; -} - -NW_Bool ScriptAPI_setVar(NW_Ucs2* name, NW_Ucs2* value) -{ - if (!NW_CheckName(name) || !CheckVarValue(value)) { - return NW_FALSE; - } - if (KBrsrSuccess != NW_Script_Setvar(name, value)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_go(NW_Ucs2 *url) -{ - if (KBrsrSuccess != NW_Script_Go(url)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_prev(void) -{ - if (KBrsrSuccess !=NW_Script_Loadprev()) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_refresh(void) -{ - if (KBrsrSuccess !=NW_Script_Refresh()) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_newContext(void) -{ - if (KBrsrSuccess != NW_Script_Newcontext()) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_finishNoDialog(NW_Byte status, NW_Ucs2 *msg) -{ - if(KBrsrSuccess != NW_Script_Finishnodialog(status, msg)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_finish(NW_Byte status, NW_Ucs2 *msg) -{ - TBrowserStatusCode nwStatus; - - switch (status) - { - case SCR_ERROR_NO_ERROR: - case SCR_ERROR_USER_EXIT: - case SCR_ERROR_USER_ABORT: - case SCR_ERROR_OUT_OF_MEMORY: /* can't display dialog if out of memory */ - ScriptAPI_finishNoDialog(status, msg); - return NW_TRUE; - - case SCR_ERROR_VERIFICATION_FAILED: - nwStatus = KBrsrScriptVerificationFailed; - break; - - case SCR_ERROR_ACCESS_VIOLATION: - nwStatus = KBrsrScriptAccessViolation; - break; - - case SCR_ERROR_FATAL_LIBRARY_FUNCTION_ERROR: - nwStatus = KBrsrScriptFatalLibFuncError; - break; - - case SCR_ERROR_INVALID_FUNCTION_ARGUMENTS: - nwStatus = KBrsrScriptInvalidFuncArgs; - break; - - case SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND: - nwStatus = KBrsrScriptExternalFunctionNotFound; - break; - - case SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT: - nwStatus = KBrsrScriptUnableToLoadCompilationUnit; - break; - - case SCR_ERROR_STACK_UNDERFLOW: - nwStatus = KBrsrScriptErrorStackUnderflow; - break; - - case SCR_ERROR_STACK_OVERFLOW: - nwStatus = KBrsrScriptErrorStackOverflow; - break; - - default: - nwStatus = KBrsrScriptBadContent; - break; - } - NW_WmlsDialog_Error(nwStatus); -//#pragma message( __FILE__ " TODO: Fix NULL deref in ScriptAPI_finishNoDialog() when called from ScriptAPI_finish()") -// Following line needed for WML Go handling; -// ScriptAPI_finishNoDialog(status, NULL); - return NW_TRUE; -} - -NW_Bool NW_WmlsDialog_Prompt(const NW_Ucs2 *message, const NW_Ucs2 *defaultInput) -{ - if (KBrsrSuccess != NW_Script_Dialogprompt(message, defaultInput)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool NW_WmlsDialog_Confirm(const NW_Ucs2 *message, const NW_Ucs2 *yes_str, - const NW_Ucs2 *no_str) -{ - if (KBrsrSuccess != NW_Script_Dialogconfirm(message, yes_str, no_str)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool NW_WmlsDialog_Alert(const NW_Ucs2 *message) -{ - if (KBrsrSuccess != NW_Script_Dialogalert(message)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool NW_WmlsDialog_Error(const TBrowserStatusCode nwStatus) -{ - if (KBrsrSuccess != NW_Script_Notifyerror(nwStatus)) - return NW_FALSE; - return NW_TRUE; -} - -NW_Bool ScriptAPI_suspend(void) -{ - if (KBrsrSuccess != NW_Script_Suspend()) - return NW_FALSE; - return NW_TRUE; -} - -context_t *ScriptAPI_getCurrentContext(void) -{ - Script_Server_t* ptr_scr_server = GetScrServerContext(); - if (!ptr_scr_server) { /*have not initialized yet*/ - ptr_scr_server = (Script_Server_t*)NW_Mem_Malloc(sizeof(Script_Server_t)); - if (!ptr_scr_server) return NULL; - else SetScrServerContext(ptr_scr_server); - - /* Initialize the structure */ - ptr_scr_server->ctx.cs = NULL; - ptr_scr_server->ctx.es = NULL; - ptr_scr_server->ctx.fs = NULL; - ptr_scr_server->ctx.cp = NULL; - ptr_scr_server->ctx.fp = NULL; - ptr_scr_server->ctx.fn = NULL; - ptr_scr_server->ctx.access_path = 0; - ptr_scr_server->ctx.access_domain = 0; - ptr_scr_server->ctx.access_public = NW_FALSE; - ptr_scr_server->ctx.errorCode = 0; - ptr_scr_server->ctx.state = RUNNING; - ptr_scr_server->ctx.msg = NULL; - - } - return &(ptr_scr_server->ctx); -} - -lib_function_table_t *ScriptAPI_get_lib_table(void) -{ - /* Initialize table structure if not ready done so*/ - lib_function_table_t *funcTable = GetLibFuncTabContext(); - if (!funcTable) { - funcTable = (lib_function_table_t *)NW_Mem_Malloc(sizeof(lib_function_table_t)); - /* Memory problem */ - NW_ASSERT(funcTable); - SetLibFuncTabContext(funcTable); - } - return funcTable; -} - -NW_Int32 ScriptAPI_get_lib_index(NW_Int32 libId) -{ - NW_Int32 i = 0; - while ( (i < NO_OF_STD_LIBS) && - (LIB_ID_MAP[i] != libId) ) - { - i++; - } - - /*lint -e{661} possible out-of-bounds*/ - NW_ASSERT(LIB_ID_MAP[i] == libId); - return i; -} - -/* native character set */ -NW_Int32 ScriptAPI_character_set(void) -{ - return 0x3E8; -} - -/********************************/ -/******** WTA Functions *********/ -/********************************/ - - -/* public library */ -NW_Bool ScriptAPI_wp_makeCall(NW_Ucs2 *number) -{ - if (KBrsrSuccess != NW_Script_wp_makeCall(number)) { - return NW_FALSE; - } - return NW_TRUE; -} - -NW_Bool ScriptAPI_wp_sendDTMF(NW_Ucs2 *dtmf) -{ - if (KBrsrSuccess != NW_Script_wp_sendDTMF(dtmf)) { - return NW_FALSE; - } - return NW_TRUE; -} - -NW_Bool ScriptAPI_wp_addPBEntry(NW_Ucs2 *number, NW_Ucs2 *name) -{ - if (KBrsrSuccess != NW_Script_wp_addPBEntry(number, name)) { - return NW_FALSE; - } - return NW_TRUE; -} - -/******************************************************** - * NOKIA proprietary library - * - * Name: locationInfo - * Input: NW_Ucs2 *url - * NW_Ucs2 *ll_format - * NW_Ucs2 *pn_format - *********************************************************/ - -NW_Bool ScriptAPI_nokia_locationInfo(NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format) -{ - if (KBrsrSuccess != NW_Script_nokia_locationInfo(url, ll_format, pn_format)) { - return NW_FALSE; - } - return NW_TRUE; -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : ScriptAPI_signText - Input : NW_Ucs2*, NW_Int32, NW_Int32, NW_Byte*, NW_Int32 - Output : NW_Bool - Purpose : Crypto Lib API. Used when the User digitally signs a Text -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -NW_Bool ScriptAPI_signText(NW_Ucs2 *stringToSign, NW_Int32 option, - NW_Int32 keyIdType, NW_Byte *keyIdByte, - NW_Int32 keyIdLen) -{ - if (KBrsrSuccess != NW_Script_CryptoSignTextStart(stringToSign, - option, - keyIdType, - keyIdByte, - keyIdLen)) { - return NW_FALSE; - } - - return NW_TRUE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_browser.c --- a/webengine/wmlengine/src/script/src/scr_browser.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_browser.c $ - - Purpose: - - This file implements the ScriptServer functionality for the WMLBrowser standard library. - The WMLBrowser library can access different WMLBrowser variables and attributes. - - */ - -#include "scr_browser.h" -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_srv.h" -#include "nwx_url_utils.h" -#include "urlloader_urlresponse.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -NW_Byte size_browser_lib(void) -{ - return NO_OF_BROWSER_FUNCS; -} - -NW_Bool browser_getVar(void) -{ - NW_Ucs2 *name = 0; - NW_Bool retVal; - - name = GetUcs2Val(); - if (name == NULL) { - return NW_FALSE; - } - - /* name will be freed by the browser app */ - retVal = ScriptAPI_getVar(name); - if (!retVal) { - push_estack(new_invalid_val()); - } - - NW_Mem_Free(name); - return retVal; -} - -static NW_Bool browser_setVar(void) -{ - NW_Ucs2 *name = 0, *value = 0; - NW_Bool retVal; - - value = GetUcs2Val_notrim(); - if (value == NULL) { - return NW_FALSE; - } - - name = GetUcs2Val(); - if (name == NULL) { - NW_Mem_Free(value); - return NW_FALSE; - } - - /* name and value will be freed by the browser app */ - retVal = ScriptAPI_setVar(name, value); - if (!retVal) { - push_estack(new_invalid_val()); - } - - NW_Mem_Free(value); - NW_Mem_Free(name); - - return retVal; -} - -NW_Bool browser_go(void) -{ - NW_Ucs2 *url = 0; - - url = GetUcs2Val(); - if (url == NULL) { - return NW_FALSE; - } - - /* url and vars will be freed by the browser app */ - ScriptAPI_go(url); - NW_Str_Delete(url); - push_estack(new_empty_str_val()); - - return NW_TRUE; -} - -NW_Bool browser_prev(void) -{ - ScriptAPI_prev(); - - return NW_TRUE; -} - -static NW_Bool browser_newContext(void) -{ - ScriptAPI_newContext(); - - return NW_TRUE; -} - -static NW_Bool browser_getCurrentCard(void) -{ - NW_Ucs2 *ref = 0; - - ref = get_first_referer(); - - if (ref) - { - TBrowserStatusCode status; - NW_Ucs2 *base = get_curr_url(); - NW_Ucs2 *res_str = 0; - str_t s = 0; - val_t v = uninitialize_val(); - - status = NW_Url_AbsToRel(base, ref, &res_str); - if (status == KBrsrOutOfMemory) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - s = ucs22str(res_str); - v = new_str_val(s); - push_estack(v); - - if (res_str) NW_Mem_Free(res_str); - free_str(s); - free_val(v); - } - else push_estack(new_invalid_val()); - - - return NW_TRUE; -} - -static NW_Bool browser_refresh(void) -{ - ScriptAPI_refresh(); - - return NW_TRUE; -} - - -/* functions in Browser library */ -static const lib_function_t browser_lib_table[NO_OF_BROWSER_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, browser_getVar, NW_TRUE }, - { 2, browser_setVar, NW_TRUE }, - { 2, browser_go, NW_TRUE }, - { 1, browser_prev, NW_TRUE }, - { 0, browser_newContext, NW_TRUE }, - { 0, browser_getCurrentCard, NW_FALSE }, - { 0, browser_refresh, NW_TRUE } -}; - -void populate_browser_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(BROWSER_LIB_ID); - (*table)[i] = browser_lib_table; - - return; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_constpool.c --- a/webengine/wmlengine/src/script/src/scr_constpool.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_constpool.c $ - - Purpose: - - This file implements the ScriptServer functionality for the constant pool. The - constant pool contains all constants defined in the ScriptServer function(s). - */ - -#include "scr_constpool.h" - -#include "scr_api.h" -#include "scr_core.h" -#include "nwx_mem.h" - - -constpool_t *create_cp(NW_Int32 size, NW_Int32 charset) -{ - NW_Int32 i; - constpool_t *cp; - context_t *ctx = ScriptAPI_getCurrentContext(); - - if (size == 0) return 0; - - cp = (constpool_t *)NW_Mem_Malloc(sizeof(constpool_t)); - if (!cp) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - cp->vals = (val_t *)NW_Mem_Malloc(size * sizeof(val_t)); - if (!cp->vals) - { - NW_Mem_Free(cp); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - for (i=0; i<size; i++) { - cp->vals[i] = new_invalid_val(); - } - - cp->size = NW_UINT16_CAST(size); - cp->charset = NW_UINT16_CAST(charset); - - set_ctx_constpool(ctx, cp); - return cp; -} - - -void append_cp_int(NW_Int32 index, NW_Int32 i) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - val_t v = new_int_val(i); - NW_ASSERT(cp); - NW_ASSERT((index < cp->size) && (index >= 0)); - cp->vals[index] = v; -} - -void append_cp_float(NW_Int32 index, NW_Float32 f) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - val_t v = new_float_val(f); - NW_ASSERT(cp); - NW_ASSERT((index < cp->size) && (index >= 0)); - cp->vals[index] = v; -} - - -void append_cp_string(NW_Int32 index, str_t s) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - val_t v = new_str_val(s); - NW_ASSERT(cp); - NW_ASSERT((index < cp->size) && (index >= 0)); - cp->vals[index] = v; -} - -val_t get_const(NW_Int32 index) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - NW_ASSERT(cp); - /* the range should have been checked by the caller */ - NW_ASSERT((index < cp->size) && (index >= 0)); - return cp->vals[index]; -} - -NW_Bool valid_const_index(NW_Int32 index) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - NW_ASSERT(cp); - - return NW_BOOL_CAST((index < cp->size) && (index >= 0)); -} - -void free_cp(constpool_t *cp) -{ - NW_Int32 i; - - if (cp == NULL) { - return; - } - - for(i = 0; i < cp->size; i++) { - free_val(cp->vals[i]); - } - NW_Mem_Free(cp->vals); -} - -NW_Bool is_const_string(NW_Int32 index) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - constpool_t *cp = get_ctx_constpool(ctx); - val_t v; - - NW_ASSERT(cp); - if ((index >= cp->size) || (index < 0)) { - return NW_FALSE; - } - - v = get_const(index); - - return NW_BOOL_CAST(ScriptVarType(v) == VAL_TYPE_STR); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_context.c --- a/webengine/wmlengine/src/script/src/scr_context.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_context.c $ - - Purpose: - - This file implements the functionality needed for the ScriptServer context. - The context is made up of: the application, the execution stack and the - frame stack. - */ - -#include "scr_context.h" -#include "scr_core.h" -#include "nwx_mem.h" - -/* interval for the script interpreter to yield. */ -#define SUSPEND_INTERVAL 40000 - -void set_ctx_state(context_t *ctx, ctx_state_e state) -{ - NW_ASSERT(ctx); - ctx->state = state; -} - -ctx_state_e get_ctx_state(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->state; -} - -void clear_context(context_t *ctx) -{ - NW_ASSERT(ctx); - NW_ASSERT(ctx->cs == 0); - - if (ctx->es) - { - free_estack(ctx->es); - NW_Mem_Free(ctx->es); - ctx->es = 0; - } - - if (ctx->fs) - { - free_frstack(ctx->fs); - NW_Mem_Free(ctx->fs); - ctx->fs = 0; - } - - clear_url_context(ctx); - - ctx->access_path = 0; - ctx->access_domain = 0; - ctx->access_public = NW_FALSE; - - ctx->state = IDLE; - - ctx->loadStringMime = 0; - ctx->errorCode = SCR_ERROR_NO_ERROR; - - ctx->suspend_counter = 0; - - if ( ctx->msg != NULL ) - NW_Mem_Free( ctx->msg ); - - ctx->msg = NULL; -} - -void clear_url_context(context_t *ctx) -{ - NW_ASSERT(ctx); - if (ctx->cp) - { - free_cp(ctx->cp); - NW_Mem_Free(ctx->cp); - ctx->cp = 0; - } - - if (ctx->fp) - { - free_funcpool(ctx->fp); - NW_Mem_Free(ctx->fp); - ctx->fp = 0; - } - - if (ctx->fn) - { - free_fname_table(ctx->fn); - NW_Mem_Free(ctx->fn); - ctx->fn = 0; - } -} - -constpool_t *get_ctx_constpool(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->cp; -} - -void set_ctx_constpool(context_t *ctx, constpool_t *cp) -{ - NW_ASSERT(ctx); - ctx->cp = cp; -} - -funcpool_t *get_ctx_funcpool(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->fp; -} - -void set_ctx_funcpool(context_t *ctx, funcpool_t *fp) -{ - NW_ASSERT(ctx); - ctx->fp = fp; -} - -fname_table_t *get_ctx_fname_table(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->fn; -} - -void set_ctx_fname_table(context_t *ctx, fname_table_t *fn) -{ - NW_ASSERT(ctx); - ctx->fn = fn; -} - -estack_t *get_ctx_estack(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->es; -} - -void set_ctx_estack(context_t *ctx, estack_t *es) -{ - NW_ASSERT(ctx); - ctx->es = es; -} - -frstack_t *get_ctx_frstack(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->fs; -} - -void set_ctx_frstack(context_t *ctx, frstack_t *fs) -{ - NW_ASSERT(ctx); - ctx->fs = fs; -} - -NW_Bool set_ctx_call_str(context_t *ctx, NW_Ucs2 *fname, NW_Byte args) -{ - /* cs is freed when calling delete_call_str in URLLoadResp */ - call_str *cs = (call_str*) NW_Mem_Malloc(sizeof(call_str)); - - if (!cs) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - cs->fname = fname; - cs->args = args; - - NW_ASSERT(ctx); - ctx->cs = cs; - return NW_TRUE; -} - -NW_Ucs2 *get_ctx_fname(context_t *ctx) -{ - NW_ASSERT(ctx && ctx->cs); - return ctx->cs->fname; -} - -NW_Uint8 get_ctx_args_no(context_t *ctx) -{ - NW_ASSERT(ctx && ctx->cs); - return ctx->cs->args; -} - - -NW_Bool was_calling(context_t *ctx) -{ - NW_ASSERT(ctx); - return NW_BOOL_CAST(ctx->cs != 0); -} - -void delete_call_str(context_t *ctx) -{ - NW_ASSERT(ctx); - if (ctx->cs) { - NW_Mem_Free(ctx->cs->fname); - NW_Mem_Free(ctx->cs); - ctx->cs = NULL; - } - -} - -NW_Bool find_function_index(context_t *ctx, NW_Ucs2 *fname, NW_Byte *index) -{ - NW_ASSERT(ctx); - return fname_find_function_index(ctx->fn, fname, index); -} - -void set_ctx_error_code(context_t *ctx, NW_Byte b) -{ - NW_ASSERT(ctx); - if (ctx->errorCode == SCR_ERROR_NO_ERROR) { - ctx->errorCode = b; - } -} - -NW_Byte get_ctx_error_code(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->errorCode; -} - -void set_ctx_error_msg(context_t *ctx, NW_Ucs2* msg) -{ - NW_ASSERT(ctx); - if (ctx->msg == NULL) { - ctx->msg = msg; - } -} -NW_Ucs2* get_ctx_error_msg(context_t *ctx) -{ - NW_ASSERT(ctx); - return ctx->msg; -} - -/* - Function: should_suspend - - Purpose: Calculates whether the script interpreter has run for - a while. If so, the interpreter should be suspended to - allow other applications to have a go. - - Parameters: - ctx: Scripting context - - Returns: - NW_TRUE if it is time to suspend script interpretation, - NW_FALSE otherwise -*/ -NW_Bool should_suspend(context_t *ctx) -{ - if (++ctx->suspend_counter > SUSPEND_INTERVAL) - { - ctx->suspend_counter = 0; - return NW_TRUE; - } - else - { - return NW_FALSE; - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_conv.c --- a/webengine/wmlengine/src/script/src/scr_conv.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,912 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_conv.c $ - - Purpose: handle parameter parsing in urls - - $History: scr_conv.c $ - */ - -#include "scr_conv.h" -#include "scr_core.h" -#include "scr_valexpr.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "nwx_math.h" -#include "nwx_float.h" - -#include "nw_wae_reader.h" -#include "BrsrStatusCodes.h" - -#define NO_PRECISION -1 -#define NO_WIDTH -1 - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static NW_Int32 Snprintf(NW_Ucs2 *buf, const NW_Int32 buf_len, const NW_Ucs2 *format, ... ); - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -/* Implementation of Snprintf exists to avoid NW_Str_Vsnprintf get duplicated */ -static NW_Int32 Snprintf(NW_Ucs2 *buf, const NW_Int32 buf_len, const NW_Ucs2 *format, ... ) -{ - va_list args; - NW_Int32 status; - - va_start (args, format ); - /* buf_len - 1, for null termination */ - status = NW_Str_Vsnprintf ( buf, buf_len - 1, format, &args ); - va_end (args); - - return status; -} - -NW_Ucs2 *str2ucs2(str_t str) -{ - NW_Ucs2 *res = 0; - NW_Int32 len; - - len = str_len(str); - res = NW_Str_New(len); - if (!res) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - if (len > 0) NW_Mem_memcpy(res, &str[1], len*sizeof(NW_Ucs2)); - res[len] = 0; - - return res; -} - - - -char *str2ascii(str_t s) -{ - NW_Int32 len, i; - NW_Uint16 wc; - char *res; - - len = str_len(s); - - res = (char*)NW_Mem_Malloc(len + 1); - if (!res) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - for(i = 0; i < len; i++) - { - wc = s[1 + i]; - if (wc > 127) - { - NW_Mem_Free(res); - return 0; - } - res[i] = (char)wc; - } - res[len] = 0; - return res; -} - - -NW_Bool str2int(str_t s, NW_Int32 *res, NW_Bool *consumeAll) -{ - NW_Int32 start = 0, len = str_len(s), end, i; - str_t substr; - NW_Ucs2 *wstr; - NW_Ucs2 *p = NULL; /*TODO: JW fix in WAVE*/ - NW_Ucs2 c; - TBrowserStatusCode status; - - NW_ASSERT(s); - NW_ASSERT(res); - NW_ASSERT(consumeAll); - - *consumeAll = NW_FALSE; - - /* skipping white spaces */ - while ( (start < len) && (scr_charat(s, start) <= 32) ) { - start++; - } - - i = start; - if (i == len) { - return NW_FALSE; /* reach the end of the string */ - } - c = scr_charat(s, i); - if ((c != '+') && (c != '-') && !NW_Str_Isdigit(c)) { - return NW_FALSE; - } - i++; - - if ( ((c == '+') || (c == '-')) && - ((i >= len) || !NW_Str_Isdigit(scr_charat(s, i))) ) - { - return NW_FALSE; - } - - while ((i < len) && NW_Str_Isdigit(scr_charat(s, i))) { - i++; - } - end = i; - - if (start == end) { - return NW_FALSE; - } - - while ((i < len) && (scr_charat(s, i) <= 32) ) { - i++; - } - - if (i== len) { - *consumeAll = NW_TRUE; - } - - /* extract substring and convert to long */ - substr = scr_substr(s, start, end - start); - if (substr == NULL) - return NW_FALSE; - - wstr = str2ucs2(substr); - free_str(substr); - if (wstr == NULL) - return NW_FALSE; - - status = NW_Str_CvtToInt32(wstr, &p, 10, res); - NW_Mem_Free(wstr); - if (status != KBrsrSuccess) { - return NW_FALSE; - } - - if (p != NULL) { - return NW_TRUE; - } else { - return NW_FALSE; - } -} - - -/* -<prefix><NW_Int32 >.<secondInt>e<exponent><postfix> -*/ -/* needs more work to meet the specs */ -NW_Bool str2float(str_t s, NW_Float32 * res, NW_Bool * consumeAll) -{ - NW_Int32 start = 0, len = str_len(s), end, i; - NW_Ucs2 c; - NW_Float64 intPart = 0.0; - NW_Float64 fracPart = 0.0; - NW_Float32 expPart = 1.0; - NW_Int32 sign = 1; - NW_Int32 expVal = 0; - NW_Float64 res64; - - NW_ASSERT(s); - NW_ASSERT(res); - NW_ASSERT(consumeAll); - *consumeAll = NW_FALSE; - /* skipping white spaces */ - while ((start < len) && (scr_charat(s, start) <= 32)) { - start++; - } - - i = start; - if (i == len) { - return NW_FALSE; /* reach the end of the string */ - } - - c = scr_charat(s, i); - if ((c != '+') && (c != '-') && (c != '.') && !NW_Str_Isdigit(c)) { - return NW_FALSE; - } - - if (c != '.') { - /* read NW_Int32 part */ - if (c == '-') { - sign = -1; - } else if (NW_Str_Isdigit(c)) { - intPart = (NW_Float32)(c - '0'); - } - i++; - while ((i < len) && NW_Str_Isdigit(scr_charat(s, i))) { - if (is_finite_float64(intPart)) { - intPart = (intPart * 10) + (scr_charat(s, i) - '0'); - } - i++; - } - if (is_finite_float64(intPart)) { - intPart *= sign; - } else { - return NW_FALSE; - } - - } - - if ((i < len) && (scr_charat(s, i) == '.')) { - /* read fraction part */ - i++; - expPart = 0.1f; - while ((i < len) && NW_Str_Isdigit(scr_charat(s, i))) { - /*lint -e{747} Significant prototype coercion*/ - if (! is_zero_float64(expPart)) { - fracPart = fracPart + expPart*(scr_charat(s, i) - '0'); - expPart *= 0.1f; - } - i++; - } - fracPart *= sign; - } - - if ((i < len) && ((scr_charat(s, i) == 'e') || (scr_charat(s, i) == 'E'))) { - /* if we have xxx[e|E] we must have exponent of some kind */ - if (++i >= len) { - return NW_FALSE; - } - c = scr_charat(s, i); - /* exp must be e[+|-]nn */ - if ((c != '+') && (c != '-') && !NW_Str_Isdigit(c)) { - return NW_FALSE; - } - - i++; - sign = 1; - /* if exp is e[+|-] or e[+|-]xx where xx is not a number, error */ - if ((c == '+') || (c == '-')) { - if ((i >= len) || !NW_Str_Isdigit(scr_charat(s, i))) { - return NW_FALSE; - } else if (c == '-') { - sign = -1; - } - } else { - expVal = c - '0'; - } - - /* Get exponent digits. */ - while ((i < len) && NW_Str_Isdigit(scr_charat(s, i))) { - /* if we can't hold exponent we've got over/underflow */ - if ((expVal > NW_FLOAT32_MAX_EXP) && (sign > 0)) { - return NW_FALSE; /* overflow */ - } else { - /* if exponent is neg, spec says underflow -> 0, so */ - /* we need to eat all chars in exp, but want expVal to */ - /* remain a big, negative, number */ - if (expVal >= 0) { - if (expVal < 2 * NW_FLOAT32_MAX_EXP) { - expVal = (expVal * 10) + (scr_charat(s, i) - '0'); - } - } - } - i++; - } - if (expVal > 0) { - expVal *= sign; - } - } - /* End exponent part. */ - end = i; - - /* explicit check for just sign char, i.e. '+' or '-' */ - if ( (start == end) || - ((start + 1 == end) && !NW_Str_Isdigit(scr_charat(s, start))) ) - { - return NW_FALSE; - } - - while ((i < len) && (scr_charat(s, i) <= 32)) { - i++; - } - - if (i == len) { - *consumeAll = NW_TRUE; - } - - /* The calculations will be done with doubles, so allow double - * the exponents for the time being. - */ - if (expVal < NW_FLOAT32_MIN_EXP * 2) { - *res = 0.0f; - return NW_TRUE; - } else if (expVal > NW_FLOAT32_MAX_EXP * 2) { - return NW_FALSE; - } else { - res64 = (intPart + fracPart)*NW_Math_powint64(10.0f, expVal); - if (is_zero_float64(res64)) { - *res = 0.0f; - return NW_TRUE; - } else if (is_finite_float64(res64)) { - *res = (NW_Float32)res64; - return NW_TRUE; - } else { - return NW_FALSE; - } - } -} - - -str_t int2str(NW_Int32 i) -{ - /* Note: largest formatted NW_Int32 is 11 chars - * (sign plus 10 digits) - */ - NW_Ucs2 buf[MAX_CHAR_GROUP_LEN]; - NW_Ucs2 fmt[8]; - NW_Uint32 len; - - NW_Str_StrcpyConst(fmt, "%d"); - len = Snprintf(buf, MAX_CHAR_GROUP_LEN, fmt, i); - - NW_ASSERT(len < MAX_CHAR_GROUP_LEN); - /* To fix TI compiler warning */ - (void) len; - - return ucs22str(buf); -} - - -str_t float2str(NW_Float32 f) -{ - /* Note: largest formatted NW_Float32 is 13 chars - * (sign plus 8 digits [24-bit mantissa] plus decimal point - * plus 'E' plus exponent sign plus 2 digits) */ - NW_Ucs2 buf[MAX_CHAR_GROUP_LEN]; - NW_Ucs2 fmt[8]; - NW_Uint32 len; - NW_Float64 d = f; /* we use double to match %g c.f. NW_Str_Sprintf */ - - NW_Str_StrcpyConst(fmt, "%g"); - len = Snprintf(buf, MAX_CHAR_GROUP_LEN, fmt, d); - - NW_ASSERT(len < MAX_CHAR_GROUP_LEN); - /* To fix TI compiler warning */ - (void) len; - - return ucs22str(buf); -} - - -str_t bool2str(NW_Bool b) -{ - NW_Ucs2 bool_str[8]; - - if (b) - NW_Str_StrcpyConst(bool_str, "true"); - else - NW_Str_StrcpyConst(bool_str, "false"); - - return ucs22str(bool_str); -} - -/* -** VSWAP wmlscriptlib/string/format/f/10 wants a single precision float to -** end up with an arbitrary number of sig digs. If value is initially -** specified as string, and it CAN be converted into a float, then just -** strip leading & trailing spaces, apply width and precision including of -** course rounding at the proper position. More appropriate, colorful, and -** unfriendly commentary on this decision would seem unprofessional, -** particularly in a source-code product. AWalsh 23-Feb-01. -*/ - -NW_Bool ProcessFloatStr(NW_Ucs2 *tmp_buff, NW_Int32 buffLength, - NW_Int32 precision, val_t val) -{ - NW_Ucs2 *pEntire; - NW_Ucs2 *pStart; - NW_Ucs2 *pTemp; - NW_Ucs2 *pDecimal = NULL; - NW_Bool hasSign = NW_FALSE; - NW_Int32 numberLen; - NW_Int32 fracLen; - NW_Int32 intLen; - NW_Int32 roundSpot; - - if (!IS_STR(val)) { - return NW_FALSE; - } - - /* - ** subtract 1 from buffLength because we might need to add a character - ** during rounding. - */ - buffLength--; - - pEntire = pStart = str2ucs2(val.value.s); - - /* strip leading white space */ - while ( *pStart && NW_Str_Isspace(*pStart) ) { - pStart++; - } - if ( !(*pStart) ) { - NW_Str_Delete(pEntire); - return NW_FALSE; - } - pTemp = pStart; - - /* check to make sure format is [+/-]ddd.ddd */ - if ( (*pTemp == WAE_URL_PLUS_CHAR) || (*pTemp == WAE_URL_DASH_CHAR) ) { - pStart++; - pTemp++; - hasSign = NW_TRUE; - } - while ( *pTemp && - (NW_Str_Isdigit(*pTemp) || (*pTemp == WAE_URL_DOT_CHAR)) ) - { - if (*pTemp == WAE_URL_DOT_CHAR) { - /* two dots is not valid float representation */ - if (pDecimal != NULL) { - NW_Str_Delete(pEntire); - return NW_FALSE; - } - pDecimal = pTemp; - } - pTemp++; - } - /* - ** if we're not at the end, and we've found something other than - ** whitespace, then we don't have [+/-]ddd.ddd so we can't use our hack. - ** Also, if the string we're trying to fudge is too long for the buffer, - ** don't use the hack. - */ - numberLen = NW_Str_Strlen(pStart) - NW_Str_Strlen(pTemp); - if ( (*pTemp && !NW_Str_Isspace(*pTemp)) - || ( numberLen >= buffLength ) ) - { - NW_Str_Delete(pEntire); - return NW_FALSE; - } - /* - ** now we've got the right format, starting at pStart, ending at pTemp, - ** possibly containing pDecimal. Examine precision to decide whether we need - ** to add zeros, round and/or truncate. - */ - if (precision == NO_PRECISION) { - precision = NW_DEFAULT_FLOAT_PREC; - } - if (pDecimal != NULL) { - /* don't count the '.' in fracLen or intLen */ - fracLen = NW_Str_Strlen(pDecimal) - NW_Str_Strlen(pTemp) - 1; - intLen = numberLen - fracLen - 1; - } else { - fracLen = 0; - intLen = numberLen; - } - /* - ** if we need to pad, and it pushes us over the limit of buffLength then - ** bail out on our hack. - */ - if (numberLen - fracLen + precision >= buffLength) { - NW_Str_Delete(pEntire); - return NW_FALSE; - } - /* - ** do rounding if necessary - note AWalsh is too lazy to apply the - ** even/odd rule, so 5 rounds up. Also note AWalsh is too lazy to worry - ** about non-ascii character sets and assumes integer values for chars - ** '0' + 1 = '1', '1' + 1 = '2' etc. - */ - roundSpot = precision; - if ( (precision < fracLen) && (pDecimal[roundSpot+1] > '4') ) { - NW_ASSERT(pDecimal != NULL); - while (pDecimal[roundSpot] == '9') { - pDecimal[roundSpot] = '0'; - roundSpot--; - } - if (roundSpot == 0) { - roundSpot = intLen; - while ( (pStart[roundSpot] == '9') && (roundSpot >= 0) ){ - pStart[roundSpot] = '0'; - roundSpot--; - } - if (roundSpot >= 0) { - pStart[roundSpot]++; - } - } else { - pDecimal[roundSpot]++; - } - fracLen = precision; - } - /* - ** now we have enough to create the result. NOTE: if roundSpot < 0 then - ** we had all 9's and we need to stick an extra 1 in front of all the 0's - ** we created while trying to round. - */ - pTemp = tmp_buff; - /* copy sign char if we have one */ - if (hasSign) { - *pTemp = *(pStart-1); - pTemp++; - } - /* if we need to add 1 at the beginning, do so */ - if (roundSpot < 0) { - *pTemp = '1'; - pTemp++; - } - pTemp = NW_Str_Strncpy(pTemp, pStart, intLen); - if (precision > 0) { - *pTemp = WAE_URL_DOT_CHAR; - pTemp++; - if (fracLen != 0) { - pTemp = NW_Str_Strncpy(pTemp, pDecimal + 1, fracLen); - } - while (fracLen < precision) { - *pTemp = '0'; - fracLen++; - pTemp++; - } - } - *pTemp = '\0'; - NW_Str_Delete(pEntire); - return NW_TRUE; -} - -/* This function is to read and check the input format specifier of String.format. -**The specifier form is "%[width] [.precision] type".both width and precision must be -**nonnegative decimal integers.If any of them read is negative, return "invalid".And a -**special case,the input is "%f" or "%.f", it will keep width = -1 && precision = -1 -**(it means both of them are not specified) and return NW_TRUE. -*/ -NW_Bool parse_format(NW_Ucs2 * str, NW_Int32 * width, NW_Int32 * precision, - NW_Int32 * type, NW_Int32 * len) -{ - NW_Ucs2 *p = str; - - /* read width */ - NW_ASSERT(width); - if (!p) { - return NW_FALSE; - } - /*if the input is "%-2.0d", return invalid */ - if (NW_Str_Isdigit(*p)) { - *width = NW_Str_Strtol(p, &p, 10); - if( *width < 0) { - return NW_FALSE; - } - } - /* read precision */ - NW_ASSERT(precision); - if (!p) { - return NW_FALSE; - } - if (*p == '.') { - ++p; - } - if(NW_Str_Isdigit(*p)) { - *precision = NW_Str_Strtol(p, &p, 10); - /*if the input is "%.-2d", return invalid */ - if( *precision < 0) { - return NW_FALSE; - } - } - if (!p) { - return NW_FALSE; - } - NW_ASSERT(type); - if ((*p == 'd') || (*p == 's') || (*p == 'f')) { - *type = *p; - } - else { - return NW_FALSE; - } - - /* 9.16 format section in the WMLScript Spec. - * When the type is a string: the spec says: - * When the width is larger than the precision, - * the width should be ignored. - * There is a CR pending on this. This is the wrong thing - * to do... - * - */ - /* Actually, we've been back and forth on this several times. - The latest consensus is that the spec is probably OK, but - needs to be clarified. The basic idea is that precision - is doesn't make much sense with strings (%s). Therefore, - if precision is specified and width > precision is - width ignored(or precision is used as the width). In the - more normal case only width would be specified and that is - used as the width. - jwild 05/17/2000. */ - /* - ** AWalsh (22-Feb-01): in order to properly ignore width, we must set the - ** value to 0. The exact behavior is tested in VSWAP June2000 conformance - ** wmlscriptlib/string/format/s/6 - */ - if (( *type == 's' ) && (*precision != NO_PRECISION )) { - if (*width > *precision) { - *width = 0; - } - } - NW_ASSERT(len); - *len = p - str + 1; - return NW_TRUE; -} - - -NW_Bool set_char_buff(NW_Ucs2 * buff, NW_Int32 index, NW_Ucs2 c) -{ - NW_ASSERT(buff); - if (index > MAX_STR_LEN) { - return NW_FALSE; - } - buff[index] = c; - return NW_TRUE; -} - - -str_t scr_format(NW_Ucs2 * format, val_t val, NW_Bool * retval) -{ - NW_Uint32 j = 0; - NW_Ucs2 *buff = NULL; - str_t retString = NULL; - NW_Bool useFormat = NW_FALSE; - NW_Ucs2 *p = format; - NW_Uint16 checkNBytes; - - NW_ASSERT(retval); - *retval = NW_TRUE; - - /* Create the buffer on the heap to avoid call stack overflow */ - buff = NW_Str_New(MAX_STR_LEN); - if (buff == NULL) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - *retval = NW_FALSE; - return NULL; - } - - while (*p) { - if (*p == '%') { - if (*(++p) == '%') { - NW_ASSERT(j < MAX_STR_LEN); - if (!set_char_buff(buff, j++, '%')) { - *retval = NW_FALSE; - break; - } - p++; - } else { - - NW_Int32 width = NO_PRECISION; - NW_Int32 precision = NO_WIDTH; - NW_Int32 type = 0; - NW_Int32 nbytes = 0; - NW_Int32 i = 0; - - *retval = parse_format(p, &width, &precision, &type, &nbytes); - if(!(*retval)){ - break; - } - /* If width is more than allowed then set width to the max allowed */ - if (width >= MAX_CHAR_GROUP_LEN) { - width = MAX_CHAR_GROUP_LEN - 1; /* Last byte is to hold null char */ - } - - if (!useFormat) { - if (type == 's') { - NW_Int32 formatted_len; - NW_Int32 len; - NW_Int32 preceeding_spaces = 0; - str_t s = 0; - if (!val2str(val, &s)) { - *retval = NW_FALSE; - break; - } - len = str_len(s); - formatted_len = len; - - if (precision >= 0) /*if precision is specified*/ - { - if ( (precision >= width) && (width >= len) ) - { - preceeding_spaces = width - len; - } - else - { - if (precision < len) - formatted_len = precision; - } - } - else if (width >= len) - { - preceeding_spaces = width - len; - } - - for (i = 0; (i<preceeding_spaces) && *retval; i++) { - NW_ASSERT(j < MAX_STR_LEN); - if (!set_char_buff(buff, j++, ' ')) { - *retval = NW_FALSE; - break; - } - } - - for (i = 0; (i < formatted_len) && *retval; i++) { - NW_ASSERT(j < MAX_STR_LEN); - if (!set_char_buff(buff, j++, scr_charat(s, i))) { - *retval = NW_FALSE; - break; - } - } - free_str(s); - } else { - NW_Ucs2 tmp_buff[MAX_CHAR_GROUP_LEN]; - NW_Ucs2 *fexpr = NULL; - NW_Ucs2 *pPrecision; - NW_Int32 i2, length; - - tmp_buff[0] = '\0'; - - checkNBytes = NW_UINT16_CAST(nbytes + 1); - i2 = checkNBytes; - if (i2 != (nbytes + 1)) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - *retval = NW_FALSE; - break; - } - - /* - ** make room for [possible] extra 0 for default precision if a - ** dot, but not an explicit precision. - */ - fexpr = NW_Str_New(nbytes + 2); - if (!fexpr) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - *retval = NW_FALSE; - break; - } - - NW_Str_Strncpy(fexpr, p-1, (nbytes + 1)); - *(fexpr + nbytes + 1) = 0; - - /* - ** for epoc32 - don't send a dot in the format specifier without - ** a precision - */ - - pPrecision = NW_Str_Strchr(fexpr, WAE_URL_DOT_CHAR); - if ( (pPrecision != NULL) && !NW_Str_Isdigit(*(pPrecision+1)) ) - { - NW_Ucs2 *pTail = NW_Str_Newcpy(pPrecision + 1); - /* spec says dot without precision same as precision of 0 */ - *(pPrecision + 1) = '0'; - NW_Str_Strcpy((pPrecision + 2), pTail); - NW_Str_Delete(pTail); - } - if (type == 'd') { - NW_Int32 ival; - if (IS_FLOAT(val)) - { - NW_Float32 f; - if (val2float(val, &f)) { - free_val(val); - val = new_int_val(NW_Math_truncate(f)); - } - else { - free_val(val); - val = new_invalid_val(); - } - } - if (val2int(val, &ival)) { - if (Snprintf(tmp_buff, MAX_CHAR_GROUP_LEN, fexpr, ival) >= MAX_CHAR_GROUP_LEN) { - /* we just trampled memory */ - NW_ASSERT(NW_FALSE); - *retval = NW_FALSE; - } - } else - *retval = NW_FALSE; - } else if (type == 'f') { - NW_Float32 fval; - - if (val2float(val, &fval)) { - /* use NW_Float64 - sprintf expects double as arg for %g & %f */ - NW_Float64 gVal = fval; - - if (!ProcessFloatStr(tmp_buff, MAX_CHAR_GROUP_LEN, precision, val)) - { - if (Snprintf(tmp_buff, MAX_CHAR_GROUP_LEN, fexpr, gVal) >= MAX_CHAR_GROUP_LEN) { - /* we just trampled memory */ - NW_ASSERT(NW_FALSE); - *retval = NW_FALSE; - } - } - - } else { - *retval = NW_FALSE; - } - } else { - *retval = NW_FALSE; - } - - length = NW_Str_Strlen(tmp_buff); - - for (i = 0; (i < width - length) && *retval; i++) { - NW_ASSERT(j < MAX_STR_LEN); - if (!set_char_buff(buff, j++, ' ')) { - *retval = NW_FALSE; - break; - } - } - - if (*retval) { - for (i = 0; i < length; i++) { - NW_ASSERT(j < MAX_STR_LEN); - if (!set_char_buff(buff, j++, tmp_buff[i])) { - *retval = NW_FALSE; - break; - } - } - } - NW_Str_Delete(fexpr); - } - useFormat = NW_TRUE; - } - p += nbytes; - } - } else { - if(j < MAX_STR_LEN) - { - if (!set_char_buff(buff, j++, *(p++))) - { - *retval = NW_FALSE; - break; - } - } - else - { - *retval = NW_FALSE; - NW_Str_Delete(buff); - return NULL; - } - } - } - - if (*retval == NW_TRUE) { - NW_ASSERT(j < MAX_STR_LEN); - buff[j] = '\0'; - retString = ucs22str(buff); - } else { - retString = NULL; - } - - NW_Str_Delete(buff); - return retString; -} - - -str_t ucs2ch2str(NW_Ucs2 ch) -{ - str_t res = 0; - - res = new_str(1, NULL); - if (!res) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - res[1] = ch; - - return res; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_core.c --- a/webengine/wmlengine/src/script/src/scr_core.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,991 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "scr_core.h" -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_srv.h" -#include "scr_reader.h" -#include "scr_params.h" -#include "scr_inter.h" - -#include "scr_lang.h" -#include "scr_float.h" -#include "scr_strlib.h" -#include "scr_url.h" -#include "scr_browser.h" -#include "scr_dialog.h" -#include "scr_debug.h" -#include "scr_wta.h" -#include "scr_crypto.h" -#include "nwx_url_utils.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - -static NW_Ucs2* Base64Encod(NW_Int32, NW_Byte * ); - -/* Base64Table contains the 64 printable characters */ -/* const char Base64Table[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";*/ -/* static NW_Ucs2 *ConvertByteToUcs2String(NW_Int32 length, NW_Byte *info); *//*not used anywhere*/ -#define BASE64_LINE_LEN 76 - -/* HexadecimalTable contains 16 hex characters */ -/*const char HexadecimalTable [16] = "0123456789abcdef";*/ -void populate_lib_fcns(void); - - - -void initialize_core_script(void) -{ - populate_lib_fcns(); - return; -} - -/**************************************************************************** - - Name: UniqueBaseValue - - Description: Creates a value to be used as the base value - for the check-sum calculation - - Parameters: Data, length of the data - Algorithm : Uses frame stack pointer to create "unique" offsets to the data - buffer. The frame stack is allocated once Wml invokes Wmls. - It will not change at least until Wml would invoke Wmls next time. - The first four bytes of the pointer value are used to fetch - bytes from the data buffer. If the value of a particular - fetched byte is greater that the data buffer size then - the offset is calculated by applying the modulus operator to - the byte value. - Return Value: unique base value - -******************************************************************************/ -static NW_Uint32 UniqueBaseValue(void *data, NW_Uint32 len) -{ - NW_Int32 i; - frstack_t *fs; - NW_Byte buf[sizeof(fs)]; - NW_Uint32 val = len; - NW_Byte *ptr = (NW_Byte *)data; - context_t *ctx = ScriptAPI_getCurrentContext(); - - NW_ASSERT(ctx && data && len > 1); - fs = get_ctx_frstack(ctx); - NW_ASSERT(fs); - - NW_Mem_memcpy(&buf[0], &fs, sizeof(fs)); - for (i=0; i < (NW_Int32) sizeof(fs); i++) { - val += ptr[buf[i]%len]; - } - return val; -} - -/**************************************************************************** - - Name: BuildCheckSum - - Description: Calculates check-sum by adding shifted (0,8,16,24 times) bytes - from the data buffer. - The value that is used as the base for additions is supplied - by the UniqueBaseValue() function - - Parameters: Data, length of the data - - Return Value: check-sum for the data buffer - -****************************************************************************/ -static NW_Uint32 BuildCheckSum(void *data, NW_Uint32 len) -{ - NW_Uint32 i; - NW_Uint32 locSum; - NW_Byte *ptr = (NW_Byte *) data; - - locSum = UniqueBaseValue(data, len); - for (i=0; i < len; i++) { - NW_Uint32 tmp = ptr[i]; - locSum += (tmp << ( (i%sizeof(NW_Uint32)) *8)); - } - return locSum; -} - -/* Helper function for CoreScript_InitiateScript() */ -static NW_Byte InitiateScriptErrChk(NW_Byte error) -{ - NW_Byte ec; - - ec = get_error_code(); - if (ec == SCR_ERROR_NO_ERROR) { - ec = error; - set_error_code(ec); - } - - return ec; -} - - -/* transfer ownership of url and referer to the script interpreter */ -void CoreScript_InitiateScript(NW_Ucs2 *url, - NW_Ucs2 *postfields, - NW_Ucs2 *referer, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_CharSet_t charset) -{ - NW_Ucs2 *frag = NULL; - NW_Ucs2 *funcName = NULL; - NW_Ucs2 *tmpFrag; - NW_Byte funcId = 0; - NW_Byte ec = SCR_ERROR_NO_ERROR; - function_t *f; - NW_Int32 args; - NW_Reader_t reader; - - do { - TBrowserStatusCode status; - NW_Uint32 chkSum; - context_t *ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - NW_Reader_InitializeBuffReader(&reader, content, contentLength, charset); - - /* - ** read_script does a clear_url_context() call which effectively erases - ** the possibility of returning to our previous state. This should be - ** postponed till we verify we can load the entire new script, however - ** it is not convenient. - */ - - if (!read_script(&reader, referer, url)) { - ec = InitiateScriptErrChk(SCR_ERROR_VERIFICATION_FAILED); - break; - } - - init_frames(); - - if (!create_estack()) { - ec = InitiateScriptErrChk(SCR_ERROR_OUT_OF_MEMORY); - break; - } - - status = NW_Url_GetFragId(url, &frag, NW_FALSE); - if (status == KBrsrOutOfMemory) { - ec = InitiateScriptErrChk(SCR_ERROR_OUT_OF_MEMORY); - break; - } - - if (frag == NULL) { - ec = InitiateScriptErrChk(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - break; - } - - /* Before use: Unescape the fragment */ - tmpFrag = frag; - frag = NW_Url_ConvertFileFromEscapeURL(tmpFrag); - NW_Str_Delete(tmpFrag); - if (frag == NULL) { - ec = InitiateScriptErrChk(SCR_ERROR_OUT_OF_MEMORY); - break; - } - - funcName = read_func_name(frag); - if (funcName == NULL) { - ec = InitiateScriptErrChk(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - break; - } - - if (!find_function_index(ctx, funcName, &funcId)) { - ec = InitiateScriptErrChk(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - break; - } - - chkSum = BuildCheckSum(content, contentLength); - if (!push_frame(url, postfields, chkSum, funcId, referer)) { - ec = InitiateScriptErrChk(SCR_ERROR_STACK_OVERFLOW); - break; - } - - f = get_func(funcId); - args = no_of_args(f); - - if (!parse_argument_list(frag + NW_Str_Strlen(funcName), args)) - { - /* NW_Wmls_PopFrame() properly frees referer and url */ - NW_Wmls_PopFrame(); - url = NULL; - referer = NULL; - - ec = InitiateScriptErrChk(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - break; - } - - /* return at end of script function will call NW_Wmls_PopFrame() */ - /* which deletes url & referer, so down below don't free url & */ - /* referer unless we've gotten an error */ - interprete(); - - /* Only time we change ec in this loop is prior to break statement */ - /* this comparison avoids a warning about const condition */ - } while (ec != SCR_ERROR_NO_ERROR); - - NW_Str_Delete(frag); - NW_Str_Delete(funcName); - if (ec != SCR_ERROR_NO_ERROR) - { - /* - ** if we got here, we failed to properly load the script and therefore - ** need to take down any parts of the script we managed to read before - ** encountering an error. We would LIKE to have saved all the previous - ** context till we finished loading all the sections of the new script, - ** however for now just be content to make sure we don't leak. - */ - context_t *ctx = ScriptAPI_getCurrentContext(); - clear_url_context(ctx); - NW_Str_Delete(url); - NW_Str_Delete(referer); - ScriptAPI_finish(ec, get_error_msg() ); - } - - return; -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : CoreScript_SignText_CB - Input : NW_Int32, NW_Byte*, NW_Int32 - Output : void - Purpose : This function is the callback function for the crypto_signText() -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* Crypto Lib Callback */ -void CoreScript_SignText_CB(TBrowserStatusCode status, NW_Byte* Text, NW_Int32 length) -{ - - NW_Ucs2 *ustr; - str_t str; - val_t val; - - /* Note: ucs22str() returns NULL if out-of-mem and */ - /* new_str_val_and_free() returns new_invalid_val() if a NULL */ - /* is passed into it. This is the same behavior as old code. */ - if (status == KBrsrCryptoUserCancel) { - ustr = NW_Str_CvtFromAscii("error:userCancel"); - } else if (status == KBrsrCryptoNoCert) { - ustr = NW_Str_CvtFromAscii("error:noCert"); - } else if (status == KBrsrSuccess) { - ustr = Base64Encod(length,Text);/* Encoding the KeyIdType as Base64 */ - } else { - ustr = NULL; - } - - str = ucs22str(ustr); - if (ustr) NW_Str_Delete(ustr); - val = new_str_val_and_free(&str); - push_estack_and_free(&val); - - interprete(); - return; -} - - -/* The following functions are CoreScript's callbacks from the runtime - environment's messaging mechanism. Each callback is the response to - one of the above messages to the CoreBrowser. */ -void CoreScript_GetVar_CB(TBrowserStatusCode status, NW_Ucs2 *var_name, NW_Ucs2 *var_value) -{ - str_t str; - val_t val; - - NW_ASSERT((var_name == NULL) || (var_name != NULL)); - - NW_REQUIRED_PARAM(var_name); - /* continue with the script execution */ - if ((status == KBrsrSuccess) && (var_value != NULL)) - { - str = ucs22str(var_value); - val = new_str_val_and_free(&str); - } - else - { - val = new_empty_str_val(); - } - - push_estack_and_free(&val); - interprete(); - return; -} - - -void CoreScript_SetVar_CB(TBrowserStatusCode status) -{ - NW_ASSERT(status == KBrsrSuccess); - - NW_REQUIRED_PARAM(status); - /* for the time being - always succeed */ - push_estack(new_bool_val(NW_TRUE)); - - /* continue with the script execution */ - interprete(); - return; -} - - -void CoreScript_Go_CB(TBrowserStatusCode status) -{ - if (status == KBrsrSuccess) { - push_estack(new_empty_str_val()); - } else { - push_estack(new_invalid_val()); - } - - /* continue with the script execution */ - interprete(); - return; -} - - -void CoreScript_Prev_CB(TBrowserStatusCode status) -{ - if (status == KBrsrSuccess) { - push_estack(new_empty_str_val()); - } else { - push_estack(new_invalid_val()); - } - - /* continue with the script execution */ - interprete(); - return; -} - - -void CoreScript_Refresh_CB(TBrowserStatusCode status) -{ - - NW_REQUIRED_PARAM(status); - /* - * WMLBrowser.Refresh() is a NOOP for the WML Interepreter. - * As we dont support refresh we push a invalid value on the stack - * and continue interpreting. [WMLScriptLibs, 12.7] - */ - push_estack(new_invalid_val()); - - /* continue with the script execution */ - interprete(); - return; -} - - -void CoreScript_NewContext_CB(TBrowserStatusCode status) -{ - if (status == KBrsrSuccess) { - push_estack(new_empty_str_val()); - } else { - push_estack(new_invalid_val()); - } - - /* continue with the script execution */ - interprete(); - return; -} - - -NW_Bool CoreScript_CallingFunctionIndex(NW_Byte *findex) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - function_t *f; - NW_Ucs2 *fname; - NW_Bool retval; - /* we get the function and argument information from the call_str structure in scr_context */ - - fname = get_ctx_fname(ctx); - retval = find_function_index(ctx, fname, findex); - - if (!retval) - { - set_error_code(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - return NW_FALSE; - } - - f = get_func(*findex); - NW_ASSERT(f); - - /* function not found is a runtime error !! */ - /* mismatch of args is a runtime error !! */ - if(get_ctx_args_no(ctx) != no_of_args(f)) - { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NW_FALSE; - } - return NW_TRUE; -} - - -/* Helper function for CoreScript_LoadScript_CB() */ -static NW_Bool LoadScriptCleanup(context_t *ctx, NW_Uint8 error) -{ - delete_call_str(ctx); - set_error_code(error); - return NW_FALSE; -} - - -/* The caller can free the content and the url */ -/* We now make a local copy when necessary */ -NW_Bool CoreScript_LoadScript_CB(TBrowserStatusCode status, - NW_Ucs2 *url, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_CharSet_t charset) -{ - context_t *ctx; - ctx_state_e st; - NW_Reader_t reader; - NW_Ucs2 *referer = NULL; - NW_Ucs2 *urlcopy = NULL; - - NW_ASSERT(status == KBrsrSuccess); - - NW_REQUIRED_PARAM(status); - ctx = ScriptAPI_getCurrentContext(); - st = get_ctx_state(ctx); - - NW_Reader_InitializeBuffReader(&reader, content, contentLength, charset); - - referer = get_curr_referer(); - - - if ((st == URL_REQ) || (st == RELOAD)) - { - NW_Byte findex; - NW_Uint32 chkSum; - - chkSum = BuildCheckSum(content, contentLength); - if (st == RELOAD && get_curr_chkSum() != chkSum) { - return LoadScriptCleanup(ctx, SCR_ERROR_VERIFICATION_FAILED); - } - - - if (!read_script(&reader, referer, url)) { - return LoadScriptCleanup(ctx, SCR_ERROR_VERIFICATION_FAILED); - } - if (st == URL_REQ) - { - if (!CoreScript_CallingFunctionIndex(&findex)) { - return LoadScriptCleanup(ctx, SCR_ERROR_VERIFICATION_FAILED); - } - - /* Script interpreter is going to free the url */ - urlcopy = NW_Str_Newcpy(url); - if (urlcopy == NULL) { - return LoadScriptCleanup(ctx, SCR_ERROR_OUT_OF_MEMORY); - } - - /* urlcopy in this case already has postfields included */ - if (!push_frame(urlcopy, NULL, chkSum, findex, referer)) { - NW_Str_Delete(urlcopy); - return LoadScriptCleanup(ctx, SCR_ERROR_STACK_OVERFLOW); - } - delete_call_str(ctx); - } - - interprete(); - return NW_TRUE; - } - - /* we should not have gotten here ... */ - return LoadScriptCleanup(ctx, SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT); -} - - -/* Helper function for CoreScript_LoadString_CB() */ -static NW_Bool LoadStringCleanup(NW_Uint32 httpStatus) -{ - val_t val; - - val = new_int_val((httpStatus)); - push_estack_and_free(&val); - interprete(); - return NW_TRUE; -} - - -NW_Bool CoreScript_LoadString_CB(TBrowserStatusCode status, - NW_Uint32 httpStatus, - NW_Byte *content, - const NW_Uint32 contentLength, - const NW_Http_ContentTypeString_t contentTypeString, - const NW_Http_CharSet_t charset) -{ - NW_Reader_t reader; - NW_Int32 strLen; - val_t val; - str_t str; - context_t *ctx = ScriptAPI_getCurrentContext(); - - NW_ASSERT(status == KBrsrSuccess || status == KBrsrHttpStatus); - - NW_REQUIRED_PARAM(status); - if (get_ctx_state(ctx) != LOADSTRING_REQ) { - set_error_code(SCR_ERROR_UNABLE_TO_LOAD_COMPILATION_UNIT); - return NW_FALSE; - } - - if (httpStatus != Success) - { - return LoadStringCleanup(httpStatus); - } - - /* these 2 content types are added to accept header in CreateHttpHeaders */ - /* if we request a uri whose content type doesn't match the file, then we */ - /* normally get NotFound as the http error code. Since we didn't really */ - /* want these two types in our accept header, then we WOULD have gotten */ - /* NotFound as our responseCode */ - if ((0 == NW_Asc_stricmp((char*)HTTP_application_vnd_wap_wmlc_string, (char*)contentTypeString)) || - (0 == NW_Asc_stricmp((char*)HTTP_application_vnd_wap_wmlscriptc_string, (char*)contentTypeString))) - { - /* Got a content type that does not match the content type - requested. Return an integer error code. */ - return LoadStringCleanup(NotAcceptable); - } - - NW_Reader_InitializeBuffReader(&reader, content, contentLength, charset); - - strLen = NW_Reader_GetStrCharCount(&reader, reader.readerSize); - - if ( strLen <= 0 ) { - /* TODO -- verify this is correct error code */ - return LoadStringCleanup(NotAcceptable); - } - - str = new_str(strLen, NULL); - if (str == NULL) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - if (!NW_Reader_ReadChars(&reader, str_buf_ptr(str), reader.readerSize)) - { - free_str(str); - /* TODO -- verify this is correct error code */ - return LoadStringCleanup(NotAcceptable); - } - - val = new_str_val_and_free(&str); - push_estack_and_free(&val); - - interprete(); - return NW_TRUE; -} - - -void CoreScript_Resume(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - ctx_state_e s = get_ctx_state(ctx); - - if (s == SUSPEND) - { - set_ctx_state(ctx, RUNNING); - interprete(); - } - - return; -} - - -void NW_WmlsDialog_PromptResp(NW_Ucs2 *input) -{ - str_t str; - val_t val; - - /* continue with the script execution */ - if (input) - { - str = ucs22str(input); - val = new_str_val_and_free(&str); - } - else - { - val = new_empty_str_val(); - } - - push_estack_and_free(&val); - interprete(); - - return; -} - - -void NW_WmlsDialog_ConfirmResp(NW_Bool result) -{ - push_estack(new_bool_val(result)); - interprete(); - - return; -} - -void NW_WmlsDialog_NotifyerrorResp(void) -{ - NW_Byte errCode = get_error_code(); - - if (errCode == SCR_ERROR_NO_ERROR) - { - push_estack(new_empty_str_val()); - interprete(); - } - else - { - /* we return from displaying error message */ - ScriptAPI_finishNoDialog(errCode, NULL); - } - - return; -} - -void NW_WmlsDialog_AlertResp(void) -{ - NW_Byte errCode = get_error_code(); - - if (errCode == SCR_ERROR_NO_ERROR) - { - push_estack(new_empty_str_val()); - interprete(); - } - else - { - /* we return from displaying error message */ - ScriptAPI_finishNoDialog(errCode, NULL); - } - - return; -} - - -void set_error_code(NW_Byte b) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - set_ctx_error_code(ctx, b); - return; -} - - -NW_Byte get_error_code(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - return get_ctx_error_code(ctx); -} - - -void set_error_msg(NW_Ucs2* msg) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - set_ctx_error_msg(ctx, msg); - return; -} - - -NW_Ucs2* get_error_msg(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - return get_ctx_error_msg(ctx); -} - - -NW_Byte get_function_index(NW_Uint16 lib_index,NW_Byte func_index) -{ - switch (lib_index) - { - /* The crypto library is the only library whose indexes do not start from 0 */ - case CRYPTO_LIB_ID: - switch (func_index) - { - case 16: - func_index = 0; - break; - } - break; - } - return func_index; -} - - - - -#define CHECK_FUNC_INDEX(index,limit) \ -if ((index) < (limit)) {return NW_TRUE;} else {return NW_FALSE;} - -NW_Bool is_valid_reference(NW_Uint16 lib_index, NW_Byte func_index) -{ - switch (lib_index) { - case LANG_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_lang_lib()) - - case FLOAT_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_float_lib()) - - case STRING_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_string_lib()) - - case URL_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_url_lib()) - - case BROWSER_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_browser_lib()) - - case DIALOG_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_dialog_lib()) - - /* Added: For Crypto Library. By araman 06/08/00 4PM */ - case CRYPTO_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_crypto_lib()) - -#ifdef WAE_DEBUG - case DEBUG_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_debug_lib()) -#endif - - case WP_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_wp_lib()) - - case NOKIA_LIB_ID: - CHECK_FUNC_INDEX(func_index, size_nokia_lib()) - - default: - return (NW_FALSE); - } -} - - -void populate_lib_fcns(void) -{ - lib_function_table_t *lib_funcs = ScriptAPI_get_lib_table(); - - populate_lang_lib(lib_funcs); - populate_float_lib(lib_funcs); - populate_string_lib(lib_funcs); - populate_url_lib(lib_funcs); - populate_browser_lib(lib_funcs); - populate_dialog_lib(lib_funcs); - populate_crypto_lib(lib_funcs); /* Added: For Crypto Library */ - populate_wta_lib(lib_funcs); - -#ifdef WAE_DEBUG - populate_debug_lib(lib_funcs); -#endif -} - - -NW_Bool call_lib_func(NW_Uint16 lib_index, NW_Byte func_index, NW_Bool *async) -{ - lib_function_table_t *lib_funcs = ScriptAPI_get_lib_table(); - NW_Int32 index = ScriptAPI_get_lib_index(lib_index); - - func_index = get_function_index(lib_index,func_index); - - if (!is_valid_reference(lib_index, func_index)) - { - set_error_code(SCR_ERROR_FATAL_LIBRARY_FUNCTION_ERROR); - return NW_FALSE; - } - - *async = (*lib_funcs)[index][func_index].is_async; - return (*lib_funcs)[index][func_index].fp(); -} - - -/******************************************************************* - * - * WTAI handling - * - *******************************************************************/ - -void CoreScript_Wtai_CB(NW_Opaque_t *result) -{ - str_t str; - val_t val; - - NW_ASSERT(result != NULL); - if ( result->type == NW_OPAQUE_VALUE_TYPE_INVALID ) { - push_estack(new_invalid_val()); - } else { - switch (result->type) { - case NW_OPAQUE_VALUE_TYPE_INT32: - push_estack(new_int_val (result->value.i)); - break; - case NW_OPAQUE_VALUE_TYPE_STRING: - str = ucs22str(result->value.s); - NW_Str_Delete(result->value.s); - val = new_str_val_and_free(&str); - push_estack_and_free(&val); - break; - case NW_OPAQUE_VALUE_TYPE_BOOL: - push_estack(new_bool_val (result->value.b)); - break; - case NW_OPAQUE_VALUE_TYPE_FLOAT: - case NW_OPAQUE_VALUE_TYPE_INVALID: - default: - push_estack(new_invalid_val()); - break; - } - } - NW_Mem_Free( result ); - - interprete(); -} - - -void base64Encode(NW_Byte* inBuf, NW_Int32 len, NW_Ucs2* outBuf) -{ - static const NW_Byte alphabet[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - switch (len) - { - case 1: - outBuf[0] = alphabet[((inBuf[0] >> 2) & 0x3F)]; - outBuf[1] = alphabet[((inBuf[0] << 4) & 0x30)]; - outBuf[2] = outBuf[3] = (NW_Ucs2)'='; - break; - case 2: - outBuf[0] = alphabet[((inBuf[0] >> 2) & 0x3F)]; - outBuf[1] = alphabet[(((inBuf[0] << 4) & 0x30) | ((inBuf[1] >> 4) & 0x0F))]; - outBuf[2] = alphabet[((inBuf[1] << 2) & 0x3C)]; - outBuf[3] = (NW_Ucs2)'='; - break; - case 3: - outBuf[0] = alphabet[((inBuf[0] >> 2) & 0x3F)]; - outBuf[1] = alphabet[(((inBuf[0] << 4) & 0x30) | ((inBuf[1] >> 4) & 0x0F))]; - outBuf[2] = alphabet[(((inBuf[1] << 2) & 0x3C) | ((inBuf[2] >> 6) & 0x03))]; - outBuf[3] = alphabet[(inBuf[2] & 0x3F)]; - break; - default: - NW_ASSERT(NW_FALSE); - } -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : Base64Encod - Input : NW_Int32, NW_Byte* - Output : NW_Ucs2* - Purpose : This function does the Base64 encoding of the KeyIdtype(which is a NW_Byte *) - and returns the encoded data as NW_Ucs2* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Ucs2* Base64Encod(NW_Int32 length, NW_Byte *bufToEnc) -{ - NW_Uint32 retLength=0; - NW_Ucs2 *encoded_data = NULL; - if (length != 0) - { - retLength = ((((length + 2) / 3) * 4) * (BASE64_LINE_LEN + 1)) / BASE64_LINE_LEN + 1; - encoded_data = (NW_Ucs2*) NW_Mem_Malloc(retLength * sizeof(NW_Ucs2)); - if (encoded_data == NULL) - retLength = 0; - else - { - NW_Uint32 i; - NW_Int32 iIn; - NW_Int32 iOut; - NW_Ucs2 encoded[4]; - - for (iIn=0,iOut=0;iIn<length;iIn+=3) - { - base64Encode(bufToEnc+iIn, (iIn +3 <= length) ? 3 : length-iIn, encoded); - for (i=0 ; i<4 ; i++) -{ - encoded_data[iOut++] = encoded[i]; - if ((iOut % (BASE64_LINE_LEN+1)) == 0) /* iOut is at least 1 */ - { - encoded_data[iOut++] = (NW_Ucs2)'\r'; - } - } - } - encoded_data[iOut] = (NW_Ucs2)0; - } - } -/* - NW_Int32 i=0; - NW_Int32 check = 0; - NW_Int32 b64byte[4]; - NW_Int32 Outindex = 0; - NW_Ucs2 *encoded_data = NULL; - check = length%3; - if(length == 0) - return NULL; - - if(check == 0) - { - encoded_data = NW_Mem_Malloc(((length*4/3) + 1)*sizeof(NW_Ucs2)); - } - else if(check == 1) - { - encoded_data = NW_Mem_Malloc((((length+2)*4/3) + 1)*sizeof(NW_Ucs2)); - } - else if(check == 2) - { - encoded_data = NW_Mem_Malloc((((length+1)*4/3) + 1)*sizeof(NW_Ucs2)); - } - while (length>2) - { - b64byte[0]=buftoenc[i]>>2; - b64byte[1]=((buftoenc[i]&3)<<4)|(buftoenc[i+1]>>4); - b64byte[2]=((buftoenc[i+1]&0x0F)<<2)|(buftoenc[i+2]>>6); - b64byte[3]=buftoenc[i+2]&0x3F; - encoded_data[Outindex]=Base64Table[b64byte[0]]; - encoded_data[Outindex+1]=Base64Table[b64byte[1]]; - encoded_data[Outindex+2]=Base64Table[b64byte[2]]; - encoded_data[Outindex+3]=Base64Table[b64byte[3]]; - length-=3; - Outindex+=4; - i+=3; - } - if(check == 0) - { - encoded_data[Outindex]= '\0'; - } - else if(check == 2) - { - b64byte[0]=buftoenc[i]>>2; - b64byte[1]=((buftoenc[i]&3)<<4)|(buftoenc[i+1]>>4); - b64byte[2]=((buftoenc[i+1]&0x0F)<<2); - encoded_data[Outindex]=Base64Table[b64byte[0]]; - encoded_data[Outindex+1]=Base64Table[b64byte[1]]; - encoded_data[Outindex+2]=Base64Table[b64byte[2]]; - encoded_data[Outindex+3]='='; - encoded_data[Outindex+4]= '\0'; - } - else - { - b64byte[0]=buftoenc[i]>>2; - b64byte[1]=((buftoenc[i]&3)<<4); - encoded_data[Outindex]=Base64Table[b64byte[0]]; - encoded_data[Outindex+1]=Base64Table[b64byte[1]]; - encoded_data[Outindex+2]='='; - encoded_data[Outindex+3]='='; - encoded_data[Outindex+4]='\0'; - } -*/ - return encoded_data; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_crypto.c --- a/webengine/wmlengine/src/script/src/scr_crypto.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,297 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: scr_browser.c $ - - Purpose: - - This file implements the ScriptServer functionality for the Crypto standard library. -*/ - - -#include "scr_conv.h" -#include "scr_api.h" -#include "nwx_mem.h" -#include "scr_srv.h" -#include "scr_crypto.h" -#include "nwx_string.h" - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : size_crypto_lib - Input : void - Output : NW_Byte - Purpose : This function returns the number of functions in crypto library -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -NW_Byte size_crypto_lib(void) -{ - return NO_OF_CRYPTO_FUNCS; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : Crypto_signText - Input : void - Output : bool - Purpose : This function enables the user to digitally sign a text -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -NW_Bool Crypto_signText(void) -{ -/* val_t v1 = uninitialize_val();*/ /* keyId */ -/* NW_Int32 v2 = 0; */ /* keyIdType */ -/* NW_Int32 v3 = 0; */ /* option */ - val_t v4 = uninitialize_val(); /* stringToSign */ - NW_Int32 option = 0; - NW_Int32 keyIdType = 0; - NW_Int32 keyIdLen = 0; - NW_Ucs2 *stringToSign = 0; - NW_Ucs2 tempCh; - NW_Bool retVal = NW_FALSE; - NW_Bool success = NW_FALSE; - str_t keyIdStr = 0; - NW_Byte *keyString = 0; - NW_Int32 i = 0; - - /* Pop all parameters. */ - v4 = pop_estack(); /* keyId */ - - /* Validate KeyId. */ - if (ScriptVarType(v4) == VAL_TYPE_INVALID) { - pop_estack_and_free(); /* keyIdType */ - pop_estack_and_free(); /* option */ - pop_estack_and_free(); /* stringToSign */ - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - /* Validate all other parameters. */ - success = GetIntVal(&keyIdType); /* check if keyIdType < 0 */ - if ((!success) || (keyIdType < 0)) { - pop_estack_and_free(); /* option */ - pop_estack_and_free(); /* stringToSign */ - push_estack(new_invalid_val()); - free_val(v4); - return NW_FALSE; - } - success = GetIntVal(&option); /* Check if option < 0 */ - if ((!success) || (option < 0)) { - pop_estack_and_free(); /* stringToSign */ - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - /* Validate stringToSign contains information. Also check if the string in empty */ - stringToSign = GetUcs2Val(); - if ((!stringToSign) || (*stringToSign == 0)) { - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - - /* Now for the KeyId. sets error code if allocation fails */ - if (!val2str(v4, &keyIdStr)) { - NW_Str_Delete(stringToSign); - free_str(keyIdStr); - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - /* If length != 0 or if length is not a multiple of 20 -> invalid */ - keyIdLen = str_len(keyIdStr); - /* Check for keyIdLen --> added from Wave on 04/18/01 */ - if((keyIdLen != 0) && (keyIdLen %20 != 0)) - { - NW_Str_Delete(stringToSign); - keyIdLen = 0; - keyIdStr = NULL; - stringToSign = NULL; - } - if(keyIdLen == 0) - { - keyString = NULL; - } - else - { - keyString = (NW_Byte *)NW_Mem_Malloc(keyIdLen); - if (keyString == NULL) { - NW_Str_Delete(stringToSign); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - free_str(keyIdStr); - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - - for (i = 0;i < keyIdLen; i++) { - tempCh = scr_charat(keyIdStr, i); - /* Check for the keyId parameter to be greater than 0xFF */ - if(tempCh > 0xFF) { - free_str(keyIdStr); - NW_Str_Delete(stringToSign); - NW_Mem_Free(keyString); - free_val(v4); - push_estack(new_invalid_val()); - return NW_FALSE; - } - else { - keyString[i] = (NW_Byte)tempCh; - } - } - } - /* - ** val2str will allocate space for NULL even if strlen is 0, so we always - ** need free keyIdStr - */ - free_val(v4); - free_str(keyIdStr); - - /* Calling the respective ScriptAPI */ - retVal = ScriptAPI_signText(stringToSign, option, keyIdType, keyString, keyIdLen); - return retVal; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : populate_crypto_lib - Input : lib_function_table_t * - Output : void - Purpose : This function populates the crypto library -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* functions in Crypto library */ -static const lib_function_t crypto_lib_table[NO_OF_CRYPTO_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 4, Crypto_signText, NW_TRUE } -}; - -void populate_crypto_lib(lib_function_table_t *table) -{ - - NW_Int32 index = ScriptAPI_get_lib_index(CRYPTO_LIB_ID); - (*table)[index] = crypto_lib_table; - - return; -} - - - -/***************************************************************** - - Name: NW_ScrCrypto_SignTextParamsNew() - - Description: Init the SignTextParams_t struct - - Parameters: - - Return Value: SignTextParams_t* - -******************************************************************/ -SignTextParams_t* -NW_ScrCrypto_SignTextParamsNew(SignState_t state, NW_Ucs2 *stringToSign, NW_Int32 option, - NW_Int32 keyIdType, NW_Byte *keyIdByte, NW_Int32 keyIdLen, NW_Uint8 certNum, - void **certificatesList, void *selectedCertRef, void *selectedKeyRef) -{ -#ifndef PROFILE_NO_WTLS - SignTextParams_t *params = (SignTextParams_t*) NW_Mem_Malloc(sizeof(SignTextParams_t)); - if (params != NULL) - { - params->state = state; - params->stringToSign = stringToSign; - params->option = option; - params->keyIdType = keyIdType; - params->keyIdByte = keyIdByte; - params->keyIdLen = keyIdLen; - params->certNum = certNum; - params->certificatesList = certificatesList; - params->selectedCertRef = selectedCertRef; - params->selectedKeyRef = selectedKeyRef; - params->signedContent = NULL; - } -#else - SignTextParams_t *params = NULL; - NW_REQUIRED_PARAM(selectedKeyRef); - NW_REQUIRED_PARAM(selectedCertRef); - NW_REQUIRED_PARAM(certificatesList); - NW_REQUIRED_PARAM(certNum); - NW_REQUIRED_PARAM(keyIdLen); - NW_REQUIRED_PARAM(keyIdByte); - NW_REQUIRED_PARAM(keyIdType); - NW_REQUIRED_PARAM(option); - NW_REQUIRED_PARAM(stringToSign); - NW_REQUIRED_PARAM(state); - -#endif /*PROFILE_NO_WTLS*/ - return params; -} - -/***************************************************************** - - Name: NW_ScrCrypto_SignTextParamsFree() - - Description: Free the SignTextParams_t struct - - Parameters: params - the object to free - - Return Value: none - -******************************************************************/ -void NW_ScrCrypto_SignTextParamsFree(SignTextParams_t *params) -{ -//#pragma message("TODO:: scr_crypto.c, enable signtext") -NW_REQUIRED_PARAM(params); -#if 0 -#ifndef PROFILE_NO_WTLS - NW_Uint8 i; - if (params != NULL) - { - NW_Mem_Free(params->stringToSign); - params->stringToSign=NULL; - NW_Mem_Free(params->keyIdByte); - params->keyIdByte=NULL; - NW_Wim_free_RefList(params->certificatesList); - NW_Wim_free_Ref(params->selectedCertRef); - NW_Wim_free_Ref(params->selectedKeyRef); - if (params->signedContent != NULL) - { - NW_Mem_Free(params->signedContent->signature); - if (params->signedContent->signerInfos!=NULL) - { - for (i=0;i<params->signedContent->signerInfoCount;i++) - { - NW_Mem_Free(params->signedContent->signerInfos[i]); - } - } - NW_Mem_Free(params->signedContent->signerInfos); - if (params->signedContent->contentInfo != NULL) - { - NW_Mem_Free(params->signedContent->contentInfo->content); - } - NW_Mem_Free(params->signedContent->contentInfo); - NW_Mem_Free(params->signedContent->authenticatedAttribute); - NW_Mem_Free(params->signedContent); - } - NW_Mem_Free(params); - } - -#else - NW_REQUIRED_PARAM(params); - -#endif /*PROFILE_NO_WTLS*/ -#endif -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_debug.c --- a/webengine/wmlengine/src/script/src/scr_debug.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_debug.c $ - - Purpose: - Propriety Debug library - */ - -#include "scr_debug.h" -#include "scr_estack.h" -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_core.h" -#include "nwx_mem.h" - -/*#define NO_OF_DEBUG_FUNCS 3 -static lib_function_t debug_funcs[NO_OF_DEBUG_FUNCS];*/ - -NW_Byte size_debug_lib(void) -{ - return NO_OF_DEBUG_FUNCS; -} - -#ifdef WAE_DEBUG - -static FILE *fp = 0; - -static NW_Bool debug_openFile(void) -{ - NW_Bool retval = NW_TRUE; - val_t v1 = 0, v2 = 0; - str_t str1 = 0; - str_t str2 = 0; - - v2 = pop_estack(); - v1 = pop_estack(); - - if (val2str(v1, &str1) && val2str(v2, &str2)) - { - char *fname = str2ascii(str1); - char *mode = str2ascii(str2); - if (fname && mode) - { - if (fp) fclose(fp); - fp = fopen(fname, mode); - if (!fp) printf("Cannot open file %s with mode %s\n",fname, mode); - NW_Mem_Free(fname); - NW_Mem_Free(mode); - } - else retval = NW_FALSE; - - } - else - { - NW_ASSERT(NW_FALSE); - retval = NW_FALSE; - } - - push_estack(new_empty_str_val()); - free_str(str1); free_str(str2); - free_val(v1); free_val(v2); - - return retval; -} - -static NW_Bool debug_println(void) -{ - NW_Bool retval = NW_TRUE; - val_t v = 0; - str_t str = 0; - - v = pop_estack(); - - if (val2str(v, &str)) - { - char *s = str2ascii(str); - if (s) - { - if (fp) fprintf(fp, "%s\n", s); - else printf("%s\n", s); - NW_Mem_Free(s); - } - else retval = NW_FALSE; - } - else if (ScriptVarType(v) == VAL_TYPE_INVALID) - { - if (fp) fprintf(fp, "<invalid>\n"); - else printf("<invalid>\n"); - - } - else - { - NW_ASSERT(NW_FALSE); - retval = NW_FALSE; - } - - - push_estack(new_empty_str_val()); - free_str(str); - free_val(v); - - return retval; -} - -static NW_Bool debug_closeFile(void) -{ - - if (fp) - { - fclose(fp); - fp = 0; - } - push_estack(new_empty_str_val()); - - return NW_TRUE; -} - -#else -NW_Bool debug_println(void) { return NW_TRUE; } -NW_Bool debug_openFile(void) { return NW_TRUE; } -NW_Bool debug_closeFile(void) { return NW_TRUE; } - -#endif - -/* functions in Debug library */ -static const lib_function_t debug_lib_table[NO_OF_DEBUG_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, debug_openFile, NW_FALSE }, - { 1, debug_println, NW_FALSE }, - { 0, debug_closeFile, NW_FALSE } -}; - -void populate_debug_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(DEBUG_LIB_ID); - (*table)[i] = debug_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_dialog.c --- a/webengine/wmlengine/src/script/src/scr_dialog.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_dialog.c $ - - Purpose: - - This file implements the ScriptServer functionality for the Dialog standard library. - The Dialog library contains a set of typical user interface functions. - - */ - -#include "scr_dialog.h" -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_srv.h" -#include "nwx_mem.h" - - -/*#define NO_OF_DIALOG_FUNCS 3 -static lib_function_t dialog_funcs[NO_OF_DIALOG_FUNCS];*/ - -NW_Byte size_dialog_lib(void) -{ - return NO_OF_DIALOG_FUNCS; -} - -static NW_Bool dialog_prompt(void) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(); - NW_Ucs2 *message = 0, *defaultInput = 0; - - v2 = pop_estack(); - v1 = pop_estack(); - - if ((ScriptVarType(v1) == VAL_TYPE_INVALID) || (ScriptVarType(v2) == VAL_TYPE_INVALID) ) - { - push_estack(new_invalid_val()); - free_val(v1); - free_val(v2); - return NW_FALSE; - } - - message = val2ucs2(v1); - defaultInput = val2ucs2(v2); - - if (!message || !defaultInput) - { - free_val(v1); - free_val(v2); - NW_Mem_Free(message); - NW_Mem_Free(defaultInput); - return NW_FALSE; - } - - - NW_WmlsDialog_Prompt(message, defaultInput); - - /* ustr1 will be cleaned when the dialog returns */ - NW_Mem_Free(defaultInput); - NW_Mem_Free(message); - free_val(v1); - free_val(v2); - - return NW_TRUE; -} - -static NW_Bool dialog_confirm(void) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), v3 = uninitialize_val(); - NW_Ucs2 *message = 0, *yes_str = 0, *no_str = 0; - - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - if ((ScriptVarType(v1) == VAL_TYPE_INVALID) || (ScriptVarType(v2) == VAL_TYPE_INVALID) - || (ScriptVarType(v2) == VAL_TYPE_INVALID) ) - { - push_estack(new_invalid_val()); - free_val(v1); - free_val(v2); - free_val(v3); - return NW_FALSE; - } - - message = val2ucs2(v1); - yes_str = val2ucs2(v2); - no_str = val2ucs2(v3); - - if (!message || !yes_str || !no_str) - { - free_val(v1); - free_val(v2); - free_val(v3); - NW_Mem_Free(message); - if (yes_str) NW_Mem_Free(yes_str); - if (no_str) NW_Mem_Free(no_str); - return NW_FALSE; - } - - NW_WmlsDialog_Confirm(message, yes_str, no_str); - - NW_Mem_Free(message); - NW_Mem_Free(yes_str); - NW_Mem_Free(no_str); - - free_val(v1); free_val(v2); free_val(v3); - - return NW_TRUE; -} - -static NW_Bool dialog_alert(void) -{ - val_t v = uninitialize_val(); - NW_Ucs2 *message = 0; - - v = pop_estack(); - - if ((ScriptVarType(v) == VAL_TYPE_INVALID)) - { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; - } - - message = val2ucs2(v); - if (!message) - { - free_val(v); - return NW_FALSE; - } - - NW_WmlsDialog_Alert(message); - - free_val(v); - - NW_Mem_Free(message); - - return NW_TRUE; -} - - -/* functions in Dialog library */ -static const lib_function_t dialog_lib_table[NO_OF_DIALOG_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 2, dialog_prompt, NW_TRUE }, - { 3, dialog_confirm, NW_TRUE }, - { 1, dialog_alert, NW_TRUE } -}; - -void populate_dialog_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(DIALOG_LIB_ID); - (*table)[i] = dialog_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_estack.c --- a/webengine/wmlengine/src/script/src/scr_estack.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_estack.c $ - - Purpose: - - This file implements the execution stack for the ScriptServer Virtual machine. - The frame stack stores current runtime values of a routine's formal - parameters and local variables, and keep track of intermediate values - during expression evaluation. The ScriptServer Interpreter also uses - the runtime stack to keep track of where to return to when the currently - executing function returns, and for a function call the return value. - The frame stack is allocated at the beginning of the execution of the - program. Each time we call a stack we push a stack frame for that - function onto the stack, and we pop up the frame when we return from the - function. A pointer (frame stack pointer) always points to the base - (first component) of the current stack frame. The current stack frame - is always the topmost one, and it represents the currently executing - routine. - */ - -#include "scr_api.h" -#include "scr_core.h" -#include "nwx_mem.h" - -/* for the time being the maximum size is 20 we can make extendable - stack later on */ - -NW_Bool create_estack(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - estack_t *es = (estack_t *)NW_Mem_Malloc(sizeof(estack_t)); - - if (!es) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - es->size = 0; - es->capacity = MAX_EXPR_DEPTH; - - es->ops = (val_t *)NW_Mem_Malloc(es->capacity * sizeof(val_t)); - if (!es->ops) - { - NW_Mem_Free(es); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - - NW_Mem_memset(es->ops, 0, es->capacity * sizeof(val_t)); - set_ctx_estack(ctx, es); - return NW_TRUE; -} - - -/* Copy the val_t to the estack */ -void push_estack(val_t v) -{ - val_t temp; - - temp = dup_val(v); - push_estack_and_free(&temp); - return; -} - - -/* Transfer ownership of the val_t to the estack */ -void push_estack_and_free(val_t *vptr) -{ - context_t *ctx; - estack_t *es; - - NW_ASSERT(vptr != NULL); - NW_ASSERT(ScriptVarType(*vptr) != VAL_TYPE_UNINITIALIZED); - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - es = get_ctx_estack(ctx); - NW_ASSERT(es); - - if (es->size >= es->capacity) - { - set_error_code(SCR_ERROR_STACK_OVERFLOW); - return; - } - - es->ops[es->size++] = *vptr; - vptr->type = VAL_TYPE_UNINITIALIZED; - vptr->value.s = NULL; - return; -} - - - -val_t pop_estack(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - estack_t *es = get_ctx_estack(ctx); - - if(es->size > 0) { - return es->ops[--es->size]; - } else { - set_error_code(SCR_ERROR_STACK_UNDERFLOW); - return new_invalid_val(); - } -} - -void pop_estack_and_free() { - val_t val; - val = pop_estack(); - if (!IS_INVALID(val)) { - free_val(val); - } - return; -} - -NW_Bool is_estack_empty(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - estack_t *es = get_ctx_estack(ctx); - NW_ASSERT(es); - return NW_BOOL_CAST(es->size == 0); -} - -void free_estack(estack_t *st) -{ - NW_Int32 i; - - for(i = 0; i < st->size; i++) - { - if (ScriptVarType(st->ops[i]) != VAL_TYPE_UNINITIALIZED) free_val(st->ops[i]); - } - NW_Mem_Free(st->ops); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_fcns.c --- a/webengine/wmlengine/src/script/src/scr_fcns.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_fcns.c $ - - Purpose: - - Implements the function pool for the ScriptServer. WMLReader reads the - functions and adds them to the function pool. The function pool is an - array of pointers. There are as many numbers of functionpool as there - are functions in a deck. - */ - -#include "scr_fcns.h" -#include "scr_api.h" -#include "scr_core.h" - -#include "nwx_mem.h" -#include "nwx_string.h" - -NW_Bool create_func_pool(NW_Int32 c) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - funcpool_t *fp = 0; - - if (c <= 0) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NW_FALSE; - } - - fp = (funcpool_t *)NW_Mem_Malloc(sizeof(funcpool_t)); - if (!fp) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - fp->funcs = (function_t **)NW_Mem_Malloc(c * sizeof(function_t *)); - if (!fp->funcs) - { - NW_Mem_Free(fp); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - fp->capacity = c; - fp->size = 0; - set_ctx_funcpool(ctx, fp); - return NW_TRUE; -} - - -void add_func_fp(function_t *f) -{ - context_t *ctx; - funcpool_t *fp; - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - fp = get_ctx_funcpool(ctx); - NW_ASSERT(fp); - NW_ASSERT(fp->size < fp->capacity); - - fp->funcs[fp->size++] = f; -} - -NW_Bool create_fname_table(NW_Int32 c) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - fname_table_t *fnames = 0; - - NW_ASSERT(ctx); - if (c <= 0) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NW_FALSE; - } - fnames = (fname_table_t *)NW_Mem_Malloc(sizeof(fname_table_t)); - if (!fnames) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - fnames->names = (fname_t *)NW_Mem_Malloc(c * sizeof(fname_t)); - if (!fnames->names) - { - NW_Mem_Free(fnames); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - fnames->capacity = c; - fnames->size = 0; - set_ctx_fname_table(ctx, fnames); - return NW_TRUE; -} - - -void add_fname(NW_Byte index, NW_Ucs2 *name) -{ - context_t *ctx; - fname_table_t *fnames; - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - fnames = get_ctx_fname_table(ctx); - NW_ASSERT(fnames); - - NW_ASSERT(fnames->size < fnames->capacity); - fnames->names[fnames->size].index = index; - fnames->names[fnames->size].name = name; - fnames->size++; -} - -function_t *get_func(NW_Int32 funcIndex) -{ - context_t *ctx; - funcpool_t *fp; - function_t *f = 0; - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - fp = get_ctx_funcpool(ctx); - NW_ASSERT(fp); - - if ((funcIndex < 0) || (funcIndex > fp->size)) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NULL; - } - - f = fp->funcs[funcIndex]; - return f; -} - -NW_Byte no_of_local_vars(function_t *f) -{ - if (f == NULL) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return 0; - } - return f->nbr_of_local_vars; -} - -NW_Byte no_of_args(function_t *f) -{ - if (f == NULL) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return 0; - } - return f->nbr_of_args; -} - -NW_Uint16 get_code_size(function_t *f) -{ - if (f == NULL) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return 0; - } - return f->code_size; -} - - -NW_Bool fu_get_opcode(NW_Byte func_index, NW_Uint16 offset, NW_Byte *b) -{ - function_t *f = 0; - context_t *ctx; - funcpool_t *fp; - - NW_ASSERT(b != NULL); - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - fp = get_ctx_funcpool(ctx); - NW_ASSERT(fp); - - if (NW_UINT8_CAST(func_index) >= fp->size) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NW_FALSE; - } - - f = fp->funcs[func_index]; - - if (offset >= f->code_size) { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - return NW_FALSE; - } - - *b = f->code[offset]; - return NW_TRUE; -} - -NW_Bool fname_find_function_index(fname_table_t *fnames, NW_Ucs2 *fname, NW_Byte *index) -{ - NW_Int32 i = 0; - - if (!fnames) { - return NW_FALSE; - } - - for(; i < fnames->size; i++) - { - if (!NW_Str_Strcmp( fnames->names[i].name, fname)) - { - *index = fnames->names[i].index; - return NW_TRUE; - } - } - return NW_FALSE; -} - -void free_func(function_t *f) -{ - if (f != NULL) { - NW_Mem_Free(f->code); - } -} - -void free_funcpool(funcpool_t *fp){ - NW_Int32 i; - - NW_ASSERT(fp); - - for(i = 0; i < fp->size; i++) - { - free_func(fp->funcs[i]); - NW_Mem_Free(fp->funcs[i]); - } - NW_Mem_Free(fp->funcs); -} - -void free_fname(fname_t *fn) -{ - NW_ASSERT(fn); - NW_Mem_Free(fn->name); -} - -void free_fname_table(fname_table_t *fn_table) -{ - NW_Int32 i; - - if (!fn_table) return; - - for (i = 0; i < fn_table->size; i++) { - free_fname(&fn_table->names[i]); - } - NW_Mem_Free(fn_table->names); -} - -NW_Bool valid_func_index(NW_Int32 index) -{ - context_t *ctx; - funcpool_t *fp; - - ctx = ScriptAPI_getCurrentContext(); - NW_ASSERT(ctx); - - fp = get_ctx_funcpool(ctx); - NW_ASSERT(fp); - - return NW_BOOL_CAST((index >= 0) && (index < fp->size)); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_float.c --- a/webengine/wmlengine/src/script/src/scr_float.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_float.c $ - - Purpose: - - This file implements the the Float standard library. The Float - library contains a set of arithmetic floating point functions - that are frequently used by the applications. - The implementation of this library is optional and implemented - only by devices that can support floating point operations. If - Floating-pont operations are not supported all functions in - this library must return invalid. - */ - -#include "scr_api.h" -#include "scr_srv.h" -#include "scr_float.h" -#include "scr_valexpr.h" -#include "scr_estack.h" -#include "scr_conv.h" -#include "nwx_math.h" - - -/*#define NO_OF_FLOAT_FUNCS 8 -static lib_function_t float_funcs[NO_OF_FLOAT_FUNCS];*/ - -NW_Byte size_float_lib(void) -{ - return NO_OF_FLOAT_FUNCS; -} - -static NW_Bool float_int(void) -{ - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2float(v, &f)) { - res = new_int_val(NW_Math_truncate(f)); - } else { - res = new_invalid_val(); - } - - push_estack(res); - - free_val(res); - free_val(v); - - return NW_TRUE; -} - - -static NW_Bool float_floor(void) -{ - NW_Float32 f; - NW_Int32 i; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2int(v, &i)) { - res = new_int_val(i); - } else if (val2float(v, &f)) { - res = new_int_val(NW_Math_truncate(NW_Math_floor((f)))); - } else { - res = new_invalid_val(); - } - - push_estack(res); - free_val(res); - free_val(v); - return NW_TRUE; -} - - -static NW_Bool float_ceil(void) -{ - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2float(v, &f)) - res = new_int_val(NW_Math_truncate(NW_Math_ceil(f))); - - else res = new_invalid_val(); - - push_estack(res); - free_val(res); - free_val(v); - return NW_TRUE; -} - - - -static NW_Bool float_pow(void) -{ - NW_Float32 f1, f2; - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - NW_Int32 i = 0; - - v2 = pop_estack(); - v1 = pop_estack(); - - if (val2float(v1, &f1) && val2float(v2, &f2)) - { - if (((f1 == 0.0) && (f2 < 0.0)) || - ((f1 < 0.0) && !val2int(v2, &i))) - { - res = new_invalid_val(); - } - else - { - if ( f2 == 0.0 ) - { - /* Force result to 1 if anything raised to 0 power. - Necessary because some pow() routines return 0 - instead of 1. jwild 10/15/1999. */ - /*lint -e{747} Significant prototype coercion*/ - res = new_float_val( 1.0 ); - } - else - { - if ((f1 < 0.0) || val2int(v2, &i)) { - res = new_float_val((NW_Float32)NW_Math_powint(f1, i)); - } else { - res = new_float_val((NW_Float32)NW_Math_pow(f1, f2)); - } - } - } - } - else - res = new_invalid_val(); - - push_estack(res); - free_val(res); - free_val(v1); - free_val(v2); - return NW_TRUE; -} - - -static NW_Bool float_round(void) -{ - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - NW_Int32 flr; - - v = pop_estack(); - - if (val2float(v, &f)) - { - flr = NW_Math_truncate(NW_Math_floor(f)); - res = (f - flr < 0.5)?new_int_val(flr):new_int_val(flr + 1); - } - else res = new_invalid_val(); - - push_estack(res); - free_val(res); - free_val(v); - return NW_TRUE; -} - - -static NW_Bool float_sqrt(void) -{ - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2float(v, &f)) - if (f >= 0.0) - { - /*lint -e{747} Significant prototype coercion*/ - res = new_float_val((NW_Float32)NW_Math_pow(f,0.5)); - } - else res = new_invalid_val(); - - else res = new_invalid_val(); - - push_estack(res); - free_val(res); - free_val(v); - return NW_TRUE; -} - - -static NW_Bool float_maxFloat(void) -{ - val_t v = uninitialize_val(); - - v = new_float_val(SCR_MAX_FLOAT); - push_estack(v); - free_val(v); - return NW_TRUE; -} - - -static NW_Bool float_minFloat(void) -{ - val_t v = uninitialize_val(); - - v = new_float_val(SCR_MIN_FLOAT); - push_estack(v); - free_val(v); - return NW_TRUE; -} - - -/* functions in Float library */ -static const lib_function_t float_lib_table[NO_OF_FLOAT_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, float_int, NW_FALSE }, - { 1, float_floor, NW_FALSE }, - { 1, float_ceil, NW_FALSE }, - { 2, float_pow, NW_FALSE }, - { 1, float_round, NW_FALSE }, - { 1, float_sqrt, NW_FALSE }, - { 0, float_maxFloat, NW_FALSE }, - { 0, float_minFloat, NW_FALSE } -}; - -void populate_float_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(FLOAT_LIB_ID); - (*table)[i] = float_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_frstack.c --- a/webengine/wmlengine/src/script/src/scr_frstack.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_frstack.c $ - - Purpose: - - This file implements the frame stack for the ScriptServer Virtual machine. - The frame stack stores current runtime values of a routine's formal - parameters and local variables, and keep track of intermediate values - during expression evaluation. The ScriptServer Interpreter also uses - the runtime stack to keep track of where to return to when the currently - executing function returns, and for a function call the return value. - The frame stack is allocated at the beginning of the execution of the - program. Each time we call a stack we push a stack frame for that - function onto the stack, and we pop up the frame when we return from the - function. A pointer (frame stack pointer) always points to the base - (first component) of the current stack frame. The current stack frame - is always the topmost one, and it represents the currently executing - routine. - - */ - -#include "scr_frstack.h" -#include "scr_context.h" -#include "scr_api.h" -#include "scr_core.h" - -#include "nwx_mem.h" -#include "nwx_string.h" - - -frame_t *get_curr_frame(void); -frame_t *get_first_frame(void); -void destroy_all_frames(void); - -function_t *get_curr_func(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - - return get_func(frame->func_index); -} - -NW_Int16 get_curr_func_size(void) -{ - frame_t *frame = get_curr_frame(); - function_t *f = 0; - - NW_ASSERT(frame); - f = get_func(frame->func_index); - NW_ASSERT(f); - - return get_code_size(f); -} - -void init_frames(void) -{ - frstack_t *fs = (frstack_t *)new_pstack(MAX_FRAME_SIZE); - context_t *ctx = ScriptAPI_getCurrentContext(); - set_ctx_frstack(ctx, fs); -} - -NW_Bool push_frame(NW_Ucs2 *url, NW_Ucs2 *postfields, NW_Uint32 chkSum, - NW_Int32 func_index, NW_Ucs2 *referer) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - NW_Int16 vars = 0, args = 0; /* Make NW_Byte to avoid compiler warnings. */ - NW_Int32 i; - frame_t *frame = 0; - function_t *f; - frstack_t *fs; - - NW_ASSERT(ctx); - fs = get_ctx_frstack(ctx); - NW_ASSERT(fs); - - if (!valid_func_index(func_index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (is_pstack_full(fs)) - { - set_error_code(SCR_ERROR_STACK_OVERFLOW); - return NW_FALSE; - } - - f = get_func(func_index); - NW_ASSERT(f != NULL); - - vars = no_of_local_vars(f); - args = no_of_args(f); - - frame = (frame_t *)NW_Mem_Malloc(sizeof(frame_t)); - if (!frame) - { - NW_Mem_Free(frame); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - frame->var_cnt = NW_INT16_CAST(vars + args); - - if (frame->var_cnt > 0) - { - frame->vars = (val_t *)NW_Mem_Malloc(frame->var_cnt * sizeof(val_t)); - if (!frame->vars) - { - NW_Mem_Free(frame); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - } - else { - frame->vars = 0; - } - frame->code_offset = 0; - - /* - ** if the new function was called from outside (e.g. from a WML - ** card) then we take the argument from the stack, otherwise the args - ** will be set by parse_argument_list - */ - if (!is_frstack_empty()) { - for(i = 0; i < args; i++) { - frame->vars[args - i - 1] = pop_estack(); - } - } else { - for(i = 0; i < args; i++) { - frame->vars[args - i - 1] = uninitialize_val(); - } - } - - /* local vars and args are pointing to empty var construct*/ - for(i = 0; i < vars; i++) { - frame->vars[args+i] = new_empty_str_val(); - } - - frame->func_index = NW_UINT8_CAST(func_index); - - if (url) - { - if (referer) { - frame->referer = referer; - } else { - frame->referer = get_curr_url(); - } - frame->url = url; - } - else - { - NW_ASSERT(!referer); - NW_ASSERT(!is_frstack_empty()); - NW_ASSERT(!postfields); - frame->url = get_curr_url(); - frame->referer = get_curr_referer(); - postfields = get_curr_postfields(); - chkSum = get_curr_chkSum(); - } - - frame->postfields = postfields; - frame->chkSum = chkSum; - push_pstack(fs, frame); - - return NW_TRUE; -} - - -void NW_Wmls_PopFrame(void) -{ - frame_t *fr; - context_t *ctx = ScriptAPI_getCurrentContext(); - frstack_t *fs = get_ctx_frstack(ctx); - NW_Int32 i, no_locals; - - NW_ASSERT(fs); - fr = (frame_t *)pop_pstack(fs); - NW_ASSERT(fr); - - /* free variables and args */ - no_locals = fr->var_cnt; - for(i = 0; i < no_locals; i++) { - free_val(fr->vars[i]); - } - - if (fr->vars) { - NW_Mem_Free(fr->vars); - } - - /* free url unless the function was called from the same file */ - - if (is_frstack_empty()) - { - NW_Mem_Free(fr->url); - NW_Mem_Free(fr->referer); - NW_Mem_Free(fr->postfields); - fr->url = NULL; - fr->referer = NULL; - fr->postfields = NULL; - - } - else - { - NW_Ucs2 *new_url = get_curr_url(); - if (fr->url != new_url) - { - NW_Mem_Free(fr->url); - NW_Mem_Free(fr->postfields); - fr->url = NULL; - fr->postfields = NULL; - } - } - - NW_Mem_Free(fr); -} - -NW_Uint16 get_code_offset(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - - return frame->code_offset; -} - - -void set_code_offset(NW_Uint16 offset) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - - frame->code_offset = offset; -} - -void jump_opcode(NW_Int32 offset) -{ - frame_t *frame = get_curr_frame(); - function_t *f = 0; - - NW_ASSERT(frame); - - f = get_func(frame->func_index); - NW_ASSERT(f); - - frame->code_offset = NW_INT16_CAST(frame->code_offset + offset); - - if ((frame->code_offset < 0) || (frame->code_offset > f->code_size)) { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - } -} - -NW_Bool get_opcode(NW_Byte *b) -{ - frame_t *frame = get_curr_frame(); - function_t *f = 0; - - NW_ASSERT(frame); - NW_ASSERT(b != NULL); - - f = get_func(frame->func_index); - if (!f) { - return NW_FALSE; - } - - /* also validate the index */ - return fu_get_opcode(frame->func_index, frame->code_offset, b); -} - - -/* can be optimize as macro */ -NW_Bool get_next_opcode_byte(NW_Byte *b) -{ - jump_opcode(1); - return get_opcode(b); -} - -NW_Bool get_next_opcode_int16(NW_Uint16 *i16) -{ - NW_Byte b1, b2; - jump_opcode(1); - if (!get_opcode(&b1)) { - return NW_FALSE; - } - - jump_opcode(1); - - if (!get_opcode(&b2)) { - return NW_FALSE; - } - - *i16 = NW_UINT16_CAST((b1 << 8) + b2); - - return NW_TRUE; -} - - -NW_Bool is_frstack_empty(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - - frstack_t *fs = get_ctx_frstack(ctx); - NW_ASSERT(fs); - return is_pstack_empty(fs); -} - - -val_t get_func_var(NW_Byte i) -{ - frame_t *frame = get_curr_frame(); - function_t *f; - NW_Int32 var_size, arg_size; - - NW_ASSERT(frame); - - f = get_func(frame->func_index); - NW_ASSERT(f); - - var_size = no_of_local_vars(f); - arg_size = no_of_args(f); - - if (NW_UINT8_CAST(i) >= var_size + arg_size) - { - set_error_code(SCR_ERROR_STACK_UNDERFLOW); - return new_invalid_val(); - } - - return frame->vars[i]; -} - -void set_func_var(NW_Byte i, val_t v) -{ - frame_t *frame = get_curr_frame(); - function_t *f; - NW_Int32 var_size, arg_size; - - NW_ASSERT(frame); - - f = get_func(frame->func_index); - NW_ASSERT(f); - - var_size = no_of_local_vars(f); - arg_size = no_of_args(f); - - if (NW_UINT8_CAST(i) >= var_size + arg_size) - { - set_error_code(SCR_ERROR_STACK_UNDERFLOW); - return; - } - - free_val(frame->vars[i]); - frame->vars[i] = dup_val(v); -} - -NW_Ucs2 *get_curr_url(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - return frame->url; -} - -NW_Uint32 get_curr_chkSum(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - return frame->chkSum; -} - -NW_Ucs2 *get_curr_postfields(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - return frame->postfields; -} - -NW_Ucs2 *get_curr_referer(void) -{ - frame_t *frame = get_curr_frame(); - NW_ASSERT(frame); - return frame->referer; -} - -NW_Ucs2 *get_first_referer(void) -{ - frame_t *frame = get_first_frame(); - NW_ASSERT(frame); - return frame->referer; -} - -void free_frstack(frstack_t *st) -{ - free_all_frames(); /*free all frames at the end of NW_Script_Finishnodialogresp, by clear_context */ - destroy_pstack(st); -} - -frame_t *get_curr_frame(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - frstack_t *fs = get_ctx_frstack(ctx); - NW_ASSERT(fs); - - return (frame_t *)peek_pstack(fs); -} - -frame_t *get_first_frame(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - frstack_t *fs = get_ctx_frstack(ctx); - - NW_ASSERT(fs); - - return (frame_t *)el_at_pstack(fs, 0); -} - -/* frees all the frames in the stack. the current context should be -freed with NW_Wmls_PopFrame before calling this function */ -void destroy_all_frames(void) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - frstack_t *fs = get_ctx_frstack(ctx); - frame_t *fr = NULL; - NW_Ucs2 *prev_url = NULL, *prev_referer = NULL; - NW_Int16 index=0; /* Moved from Wave */ - - fr = (frame_t *)peek_pstack(fs); - if(is_frstack_empty()) - { - NW_Mem_Free(fr); - return; - } - - prev_url = fr->url; - prev_referer = fr->referer; - - while ((fr = (frame_t *)pop_pstack(fs)) != NULL) { - - if (prev_url != fr->url) { - NW_Mem_Free(prev_url); - prev_url = fr->url; - } - - if (prev_referer != fr->referer) { - NW_Mem_Free(prev_referer); - prev_referer = fr->referer; - } - - /* Commented out inorder to move changes from Wave, following 3 lines. */ - index = fr->var_cnt; /* index is 0 based */ - for (index = 0; index < fr->var_cnt; index++) { - free_val(fr->vars[index]); - } - - /* Free the memory */ - if (fr->vars) { - NW_Mem_Free(fr->vars); - fr->vars = NULL; - } - - NW_Mem_Free(fr); - fr = NULL; - } - - if (prev_url) { - NW_Mem_Free(prev_url); - prev_url = NULL; - } - - if (prev_referer) { - NW_Mem_Free(prev_referer); - prev_referer = NULL; - } - -#if 0 - while (!is_frstack_empty()) { - fr = (frame_t *)pop_pstack(fs); - - if (!is_frstack_empty() && first) { - first = NW_FALSE; - if (fr->url) { - NW_Mem_Free(fr->url); - fr->url = NULL; - } - - if (fr->referer) { - NW_Mem_Free(fr->referer); - fr->referer = NULL; - } - if (fr) { - NW_Mem_Free(fr); - fr = NULL; - } - } - - if (fr) { - NW_Mem_Free(fr); - fr = NULL; - } - }/*end of while (!is_frstack_empty()) */ -#endif - return; -} - -/* destroys all the frames in the stack */ -void free_all_frames(void) -{ - - while (!is_frstack_empty()) - { - /*deep copy the prev url because NW_Wmls_PopFrame will free the prev_url if there is a context switch*/ - NW_Ucs2 *prev_url = get_curr_url(); - NW_Ucs2 *prev_url_cpy = NULL; - NW_Ucs2 *url = NULL; - - NW_ASSERT(prev_url); - prev_url_cpy = NW_Str_Newcpy(prev_url); - if (prev_url == NULL) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return; - } - - NW_Wmls_PopFrame(); - - if (!is_frstack_empty()) { - url = get_curr_url(); - NW_ASSERT(url); - if (!NW_Str_Strcmp(url, prev_url_cpy) == 0) /*are not equal*/ - { - /* context switch encountered, we cannot use "NW_Wmls_PopFrame" to free the frames - as the script context is not updated. Note: when a context switch happens the current - implementation reloads the content from the cache thereby updating the context. - */ - destroy_all_frames(); - } - } - if (prev_url_cpy) - { - NW_Mem_Free(prev_url_cpy); - prev_url_cpy = NULL; - } - } /*end of while (!is_frstack_empty()) */ - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_handle.c --- a/webengine/wmlengine/src/script/src/scr_handle.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1133 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_handle.c $ - - Purpose: - - This file contains all functions needed to handle every opcode that is - defined in the ScriptServer Specification. Each function operates on the - operand stack and the execution stack as described in the - ScriptServer Specification section 9.6.2.1. - */ - -#include "scr_handle.h" -#include "scr_estack.h" -#include "scr_core.h" -#include "scr_context.h" -#include "scr_valexpr.h" - - -#include "nwx_url_utils.h" -#include "nwx_mem.h" -#include "scr_api.h" -#include "BrsrStatusCodes.h" - -NW_Bool handle_call_url_common(NW_Int32 uindex, NW_Int32 findex, NW_Byte args); - -void handle_jump_fw_s(NW_Byte offset) -{ - NW_ASSERT(offset < 32); /*OK to leave*/ - jump_opcode(offset + 1); -} - -void handle_jump_fw() -{ - NW_Byte b; - if (!get_next_opcode_byte(&b)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - jump_opcode(b + 1); -} - -void handle_jump_fw_w() -{ - NW_Uint16 s; - - if (!get_next_opcode_int16(&s)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - jump_opcode(s + 1); -} - -void handle_jump_bw_s(NW_Byte offset) -{ - NW_ASSERT(offset < 32); - jump_opcode(-offset); -} - -void handle_jump_bw() -{ - NW_Byte b; - if (!get_next_opcode_byte(&b)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - jump_opcode(-b - 1); -} - -void handle_jump_bw_w() -{ - NW_Uint16 s; - - if (!get_next_opcode_int16(&s)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - jump_opcode(-s - 2); -} - -void handle_tjump_fw_s(NW_Byte offset) -{ - val_t v = uninitialize_val(); - NW_Bool b = NW_FALSE; - - NW_ASSERT(offset < 32); - v = pop_estack(); - - if (!val2bool(v, &b)) - { - if (ScriptVarType(v) == VAL_TYPE_INVALID) - b = NW_FALSE; - else NW_ASSERT(NW_FALSE); - } - - if (!b) jump_opcode(offset + 1); /* on true to jump*/ - else jump_opcode(1); /* or not to jump*/ - - free_val(v); -} - -void handle_tjump_fw() -{ - val_t v = uninitialize_val(); - NW_Bool bo = NW_FALSE; - NW_Byte b; - - if (!get_next_opcode_byte(&b)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = pop_estack(); - - if (!val2bool(v, &bo)) - { - if (ScriptVarType(v) == VAL_TYPE_INVALID) - bo = NW_FALSE; - else NW_ASSERT(NW_FALSE); - } - - if (!bo) jump_opcode(b + 1); - else jump_opcode(1); - - free_val(v); -} - -void handle_tjump_fw_w() -{ - val_t v = uninitialize_val(); - NW_Bool b = NW_FALSE; - - NW_Uint16 s; - - if (!get_next_opcode_int16(&s)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = pop_estack(); - - if (!val2bool(v, &b)) - { - if (ScriptVarType(v) == VAL_TYPE_INVALID) - b = NW_FALSE; - else NW_ASSERT(NW_FALSE); - } - - if (!b) jump_opcode(s + 1); - else jump_opcode(1); - free_val(v); -} - -void handle_tjump_bw() -{ - NW_Byte b; - val_t v = uninitialize_val(); - NW_Bool bo = NW_FALSE; - - v = pop_estack(); - - if (!val2bool(v, &bo)) - { - if (ScriptVarType(v) == VAL_TYPE_INVALID) - bo = NW_FALSE; - else NW_ASSERT(NW_FALSE); - } - - if (!get_next_opcode_byte(&b)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - if (!bo) jump_opcode(-b-1); - else jump_opcode(1); - free_val(v); -} - -void handle_tjump_bw_w() -{ - NW_Uint16 s; - val_t v = uninitialize_val(); - NW_Bool b = NW_FALSE; - - v = pop_estack(); - - if (!val2bool(v, &b)) - { - if (ScriptVarType(v) == VAL_TYPE_INVALID) - b = NW_FALSE; - else NW_ASSERT(NW_FALSE); - } - - if (!get_next_opcode_int16(&s)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - if (!b) jump_opcode(-s-2); - else jump_opcode(1); - free_val(v); -} - -/* when hadling opcodes of type CALL_* the - position must be incremented by 1 before pushing - the new frame - */ -void handle_call_s(NW_Byte findex) -{ - NW_Byte b; - - NW_ASSERT(findex < 8); - - if (!get_next_opcode_byte(&b)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - if (!push_frame(0, 0, 0, findex, 0)) - { - set_error_code(SCR_ERROR_STACK_OVERFLOW); - return; - } -} - -void handle_call() -{ - NW_Byte findex; - - if (!get_next_opcode_byte(&findex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - jump_opcode(1); - - if (!push_frame(0, 0, 0, findex, 0)) - { - set_error_code(SCR_ERROR_STACK_OVERFLOW); - return; - } -} - -NW_Bool handle_call_lib_s(NW_Byte findex, NW_Bool *async) -{ - NW_Bool res; - NW_Byte lindex; - - NW_ASSERT(findex < 8); /* invalid index */ - if (!get_next_opcode_byte(&lindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (findex > 7 ) - { - return NW_FALSE; - } - - jump_opcode(1); - - res = call_lib_func(lindex, findex, async); - - return res; -} - -NW_Bool handle_call_lib(NW_Bool *async) -{ - NW_Bool res; - - NW_Byte findex, lindex; - - if (!get_next_opcode_byte(&findex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (!get_next_opcode_byte(&lindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - jump_opcode(1); - - res = call_lib_func(lindex, findex, async); - - return res; -} - -NW_Bool handle_call_lib_w(NW_Bool *async) -{ - NW_Bool res; - - NW_Byte findex; - NW_Uint16 lindex; - - if (!get_next_opcode_byte(&findex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (!get_next_opcode_int16(&lindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - - jump_opcode(1); - - res = call_lib_func(lindex, findex, async); - - return res; -} - -void handle_load_var_s(NW_Byte vindex) -{ - val_t v = uninitialize_val(); - - if (vindex > 31) /*uchar*/ - { - NW_ASSERT(NW_FALSE); - return; - } - - v = get_func_var(vindex); - push_estack(v); - - jump_opcode(1); -} - -void handle_load_var() -{ - val_t v = uninitialize_val(); - NW_Byte index; - - if (!get_next_opcode_byte(&index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_func_var(index); - push_estack(v); - - jump_opcode(1); -} - -void handle_store_var_s(NW_Byte vindex) -{ - val_t v = uninitialize_val(); - - if (vindex > 15) - { - NW_ASSERT(NW_FALSE); - return; - } - - v = pop_estack(); - set_func_var(vindex, v); - jump_opcode(1); - free_val(v); -} - -void handle_store_var() -{ - val_t v = uninitialize_val(); - NW_Byte index; - - if (!get_next_opcode_byte(&index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = pop_estack(); - set_func_var(index, v); - jump_opcode(1); - free_val(v); - -} - -void handle_load_const_s(NW_Byte cindex) -{ - val_t v = uninitialize_val(); - - if (cindex > 15) - { - NW_ASSERT(NW_FALSE); - return; - } - - if (!valid_const_index(cindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_const(cindex); - push_estack(v); - - jump_opcode(1); -} - -void handle_load_const() -{ - val_t v = uninitialize_val(); - NW_Byte cindex; - - if (!get_next_opcode_byte(&cindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - if (!valid_const_index(cindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_const(cindex); - - push_estack(v); - - jump_opcode(1); -} - -void handle_load_const_w() -{ - NW_Uint16 cindex; - val_t v = uninitialize_val(); - - if (!get_next_opcode_int16(&cindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - - if (!valid_const_index(cindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_const(cindex); - push_estack(v); - - jump_opcode(1); -} - -void handle_incr_var_s(NW_Byte vindex) -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - NW_ASSERT( vindex < 8 ); - - v = get_func_var(vindex); - res = incr_val(v); - set_func_var(vindex, res); - - jump_opcode(1); - - free_val(res); -} - -void handle_incr_var() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - NW_Byte vindex; - - if (!get_next_opcode_byte(&vindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_func_var(vindex); - res = incr_val(v); - set_func_var(vindex, res); - - jump_opcode(1); - - free_val(res); -} - -void handle_decr_var() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - NW_Byte vindex; - - if (!get_next_opcode_byte(&vindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v = get_func_var(vindex); - res = decr_val(v); - set_func_var(vindex, res); - - jump_opcode(1); - - free_val(res); -} - -void handle_incr() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = incr_val(v); - push_estack(res); - - jump_opcode(1); - free_val(v); - free_val(res); -} - -void handle_decr() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = decr_val(v); - push_estack(res); - - jump_opcode(1); - free_val(v); - free_val(res); -} - -void handle_add_asg() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - NW_Byte index; - - v1 = pop_estack(); - - if (!get_next_opcode_byte(&index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v2 = get_func_var(index); - res = add_vals(v2, v1); - set_func_var(index, res); - - jump_opcode(1); - - free_val(v1); - free_val(res); -} - -void handle_sub_asg() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - NW_Byte index; - - v1 = pop_estack(); - - if (!get_next_opcode_byte(&index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return; - } - - v2 = get_func_var(index); - res = sub_vals(v2, v1); - set_func_var(index, res); - - jump_opcode(1); - - free_val(v1); - free_val(res); -} - -void handle_uminus() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = uminus_val(v); - push_estack(res); - - jump_opcode(1); - - free_val(v); - free_val(res); - -} - -void handle_add() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - - res = add_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - - -void handle_sub() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = sub_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_mul() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = mul_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_div() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = div_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_idiv() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = idiv_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_rem() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - - res = rem_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_b_and() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = bit_and_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_b_or() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = bit_or_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_b_xor() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = bit_xor_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_lshift() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = lshift_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_rsshift() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = rsshift_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_rszshift() -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = rszshift_vals(v1, v2); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - - -void handle_comp(NW_Byte op) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - res = comp_vals(v1, v2, op); - push_estack(res); - - jump_opcode(1); - - free_val(v1); - free_val(v2); - free_val(res); -} - -void handle_l_not() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = l_not_val(v); - push_estack(res); - - jump_opcode(1); - - free_val(v); - free_val(res); -} - -void handle_b_not() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = b_not_val(v); - push_estack(res); - - jump_opcode(1); - - free_val(v); - free_val(res); -} - -void handle_pop() -{ - val_t v = uninitialize_val(); - - v = pop_estack(); - jump_opcode(1); - - free_val(v); -} - -void handle_load_const_int(NW_Int32 i) -{ - val_t v = uninitialize_val(); - - v = new_int_val(i); /* 99 is junk it is used only for small ints */ - - push_estack(v); - jump_opcode(1); - - free_val(v); -} - - -void handle_load_const_bool(NW_Bool b) -{ - val_t v = uninitialize_val(); - - v = new_bool_val(b); - - push_estack(v); - jump_opcode(1); - - free_val(v); -} - -void handle_load_const_es() -{ - val_t v = uninitialize_val(); - - v = new_empty_str_val(); - - push_estack(v); - jump_opcode(1); - - free_val(v); -} - -void handle_load_invalid() -{ - val_t v = uninitialize_val(); - - v = new_invalid_val(); - - push_estack(v); - jump_opcode(1); - - free_val(v); -} - - -void handle_typeof() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = new_int_val(ScriptVarType(v)); - push_estack(res); - - jump_opcode(1); - - free_val(v); - free_val(res); -} - -void handle_isvalid() -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - res = new_bool_val(NW_BOOL_CAST(ScriptVarType(v) != VAL_TYPE_INVALID)); - push_estack(res); - - jump_opcode(1); - - free_val(v); - free_val(res); -} - - -void handle_tobool(void) -{ - val_t v = uninitialize_val(); - NW_Bool b; - - v = pop_estack(); - - if (val2bool(v, &b)) push_estack(new_bool_val(b)); - else push_estack(new_invalid_val()); - - jump_opcode(1); - - free_val(v); -} - -void handle_scand(void) -{ - val_t v = uninitialize_val(); - NW_Bool b; - - v = pop_estack(); - - if (val2bool(v, &b)) - if (b) push_estack(new_bool_val(NW_TRUE)); - else - { - push_estack(new_bool_val(NW_FALSE)); - push_estack(new_bool_val(NW_FALSE)); - } - else - { - push_estack(new_invalid_val()); - push_estack(new_bool_val(NW_FALSE)); - } - - jump_opcode(1); - - free_val(v); -} - -void handle_scor(void) -{ - val_t v = uninitialize_val(); - NW_Bool b; - - v = pop_estack(); - - if (val2bool(v, &b)) - if (b) - { - push_estack(new_bool_val(NW_TRUE)); - push_estack(new_bool_val(NW_FALSE)); - } - else push_estack(new_bool_val(NW_TRUE)); - else - { - push_estack(new_invalid_val()); - push_estack(new_bool_val(NW_FALSE)); - } - - - jump_opcode(1); - - free_val(v); -} - -NW_Bool handle_call_url(void) -{ - NW_Byte uindex, findex, args; - - if (!get_next_opcode_byte(&uindex) || - !get_next_opcode_byte(&findex) || - !get_next_opcode_byte(&args)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - return handle_call_url_common(uindex, findex, args); -} - -NW_Bool handle_call_url_w(void) -{ - NW_Uint16 uindex, findex; - NW_Byte args; - - if (!get_next_opcode_int16(&uindex) || - !get_next_opcode_int16(&findex) || - !get_next_opcode_byte(&args)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - return handle_call_url_common(uindex, findex, args); -} - - -NW_Bool handle_call_url_common(NW_Int32 uindex, NW_Int32 findex, NW_Byte args) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(); - NW_Ucs2 *url = 0; - NW_Ucs2 *fname = 0; - NW_Bool retval = NW_TRUE; - context_t *ctx = ScriptAPI_getCurrentContext(); - NW_Bool isRelative; - - do { - retval=NW_FALSE; - if (!valid_const_index(uindex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - break; - } - - v1 = get_const(uindex); - - NW_ASSERT(ScriptVarType(v1) == VAL_TYPE_STR); - - url = val2ucs2(v1); - - if (!url) - { - set_error_code(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - break; - } - - if (KBrsrSuccess != NW_Url_IsRelative(url, &isRelative)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - NW_Mem_Free(url); - break; - } - if (isRelative) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Ucs2 *tmp; - - status = NW_Url_RelToAbs(get_curr_url(), url, &tmp); - if (status == KBrsrOutOfMemory) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - NW_Mem_Free(url); - break; - } - NW_Mem_Free(url); - url = tmp; - } - /* make sure the url is valid - validation error */ - - if (!valid_const_index(findex)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - break; - } - - v2 = get_const(findex); - fname = val2ucs2(v2); - /* make sure that fname is valid */ - - if (!fname) - { - set_error_code(SCR_ERROR_EXTERNAL_FUNCTION_NOT_FOUND); - break; - } - - if (!set_ctx_call_str(ctx, fname, args)) break; - - if (!ScriptAPI_load(url)) - break; - - jump_opcode(1); - retval=NW_TRUE; - } while (ctx == NULL); /* always NW_FALSE => no warn const conditional expr */ - - if (url) NW_Mem_Free(url); - return retval; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_inter.c --- a/webengine/wmlengine/src/script/src/scr_inter.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,436 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_inter.c $ - - Purpose: - - Loop through each bytecode in a frame that contains the function - being executed. - */ - -#include "scr_frstack.h" -#include "scr_estack.h" -#include "scr_opcodes.h" -#include "scr_handle.h" -#include "scr_frstack.h" -#include "scr_inter.h" -#include "scr_context.h" -#include "scr_api.h" -#include "scr_core.h" - -#include "nwx_string.h" -#include "nwx_url_utils.h" - -/* for optimization all the handle function can be later - on injected to the interprete to save a function call - */ -void interprete() -{ - NW_Byte opcode, impl_parameter; - NW_Int32 code_offset; - context_t *ctx = ScriptAPI_getCurrentContext(); - - set_ctx_state(ctx, RUNNING); - - for(;;) - { - NW_Byte err_code = get_error_code(); - if (err_code != SCR_ERROR_NO_ERROR) - { - ScriptAPI_finish(err_code, get_error_msg()); - return; - } - - if (should_suspend(ctx))/* should the interpreter yield */ - { - set_ctx_state(ctx, SUSPEND); - ScriptAPI_suspend(); - return; - } - - code_offset = get_code_offset(); - - if (code_offset < 0) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - continue; - } - - if (code_offset >= get_curr_func_size()) - { - /* Walked off end of function. WMLScript 9.4.3 says */ - /* treat as a return of empty string. */ - opcode = RETURN_ES; - } - else if (!get_opcode(&opcode)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - continue; - } - - parse_opcode(&opcode, &impl_parameter); - - switch(opcode) { - - case JUMP_FW_S: - handle_jump_fw_s(impl_parameter); - break; - - case JUMP_FW: - handle_jump_fw(); - break; - - case JUMP_FW_W: - handle_jump_fw_w(); - break; - - case JUMP_BW_S: - handle_jump_bw_s(impl_parameter); - break; - - case JUMP_BW: /*jump Backward*/ - handle_jump_bw(); - break; - - case JUMP_BW_W: /*jump Backward*/ - handle_jump_bw_w(); - break; - - case TJUMP_FW_S: /*jumpFowrward on false*/ - handle_tjump_fw_s(impl_parameter); - break; - - case TJUMP_FW: /*jumpFowrward on False*/ - handle_tjump_fw(); - break; - - case TJUMP_FW_W: /*jumpFowrward on false*/ - handle_tjump_fw_w(); - break; - - case TJUMP_BW: - handle_tjump_bw(); - break; - - case TJUMP_BW_W: - handle_tjump_bw_w(); - break; - - case CALL_S: - - handle_call_s(impl_parameter); - break; - - case CALL: - handle_call(); - break; - - /* for the CALL_LIB*: if the called return NW_FALSE or the call - return NW_TRUE and is assync we return. - Lang.exit() and Lang.abort() return NW_FALSE. - Async functions that fail (no need to send/receive a message) - will return NW_FALSE (e.g. WMLBrowser.go() - */ - case CALL_LIB_S: - { - NW_Bool async; - - if (handle_call_lib_s(impl_parameter, &async) && async) return; - else break; - } - - case CALL_LIB: - { - NW_Bool async; - - if (handle_call_lib(&async) && async) return; - else break; - } - - case CALL_LIB_W: - { - NW_Bool async; - if (handle_call_lib_w(&async) && async) return; - else break; - } - - case CALL_URL_W: - if(handle_call_url_w()) - return; - else - break; - - - case CALL_URL: - if(handle_call_url()) - return; - else - break; - - case LOAD_VAR_S: - handle_load_var_s((NW_Byte)impl_parameter); - break; - - case LOAD_VAR: - handle_load_var(); - break; - - case STORE_VAR_S: - handle_store_var_s((NW_Byte)impl_parameter); - break; - - case STORE_VAR: - handle_store_var(); - break; - - case LOAD_CONST_S: - handle_load_const_s((NW_Byte)impl_parameter); - break; - - case LOAD_CONST: - handle_load_const(); - break; - - case LOAD_CONST_W: - handle_load_const_w(); - break; - - case INCR_VAR_S: - handle_incr_var_s((NW_Byte)impl_parameter); - break; - - case INCR_VAR: - handle_incr_var(); - break; - - case DECR_VAR: - handle_decr_var(); - break; - - case INCR: - handle_incr(); - break; - - case DECR: - handle_decr(); - break; - - case ADD_ASG: - handle_add_asg(); - break; - - case SUB_ASG: - handle_sub_asg(); - break; - - case UMINUS: - handle_uminus(); - break; - - case ADD: - handle_add(); - break; - - case SUB: - handle_sub(); - break; - - case MUL: - handle_mul(); - break; - - case DIV: - handle_div(); - break; - - case IDIV: - handle_idiv(); - break; - - case REM: - handle_rem(); - break; - - case B_AND: - handle_b_and(); - break; - - case B_OR: - handle_b_or(); - break; - - case B_XOR: - handle_b_xor(); - break; - - case B_LSHIFT: - handle_lshift(); - break; - - case B_RSSHIFT: - handle_rsshift(); - break; - - case B_RSZSHIFT: - handle_rszshift(); - break; - - case EQ: - handle_comp(EQ); - break; - - case LE: - handle_comp(LE); - break; - - case LT: - handle_comp(LT); - break; - - case GE: - handle_comp(GE); - break; - - case GT: - handle_comp(GT); - break; - - case NE: - handle_comp(NE); - break; - - case L_NOT: /*or bang*/ - handle_l_not(); - break; - - case B_NOT: /* or tilde*/ - handle_b_not(); - break; - - case POP: - handle_pop(); - break; - - case CONST_0: - handle_load_const_int(0); - break; - - case CONST_1: - handle_load_const_int(1); - break; - - case CONST_M1: - handle_load_const_int(-1); - break; - - case CONST_ES: - handle_load_const_es(); - break; - - case CONST_INVALID: - handle_load_invalid(); - break; - - case CONST_TRUE: - handle_load_const_bool(NW_TRUE); - break; - - case CONST_FALSE: - handle_load_const_bool(NW_FALSE); - break; - - case TYPEOF: - handle_typeof(); - break; - - case ISVALID: - handle_isvalid(); - break; - - case SCAND: - handle_scand(); - break; - - case SCOR: - handle_scor(); - break; - - case TOBOOL: - handle_tobool(); - break; - - - case RETURN_ES: - - push_estack(new_empty_str_val()); - - /* fall through */ - /*lint -fallthrough*/ - - case RETURN: - { - NW_Ucs2 *prev_url, *url; - - NW_ASSERT(!is_estack_empty()); - - prev_url = NW_Str_Newcpy(get_curr_url()); - - NW_Wmls_PopFrame(); - - if (is_frstack_empty()) - { - NW_Str_Delete(prev_url); - ScriptAPI_finish(SCR_ERROR_NO_ERROR, 0); - return; - } - - url = get_curr_url(); - if (NW_Str_Strcmp(url,prev_url)) - { - /* - ** changed url, so reload previous content. when URLLoadResp will - ** return control to the script the previous context will be - ** restored - */ - NW_Str_Delete(prev_url); - clear_url_context(ctx); - set_ctx_state(ctx, RELOAD); - ScriptAPI_reload(); - - return; - } - - NW_Str_Delete(prev_url); - break; - } - - default: - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - break; - } - - } - - /* The script finishes. Leave error code to be reported. */ - /* ScriptAPI_finish(get_error_code(), 0); */ - -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_lang.c --- a/webengine/wmlengine/src/script/src/scr_lang.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,433 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_lang.c $ - - Purpose: - - This file implements the ScriptServer functionality for the Lang standard library. - The Lang standard library contains a set of functions that are closely related - to the ScriptServer language core. - */ - -#include "scr_lang.h" -#include "scr_srv.h" -#include "scr_core.h" -#include "scr_conv.h" -#include "scr_api.h" - -#include "nwx_string.h" -#include "nwx_math.h" - -/*#define NO_OF_LANG_FUNCS 15 -static lib_function_t lang_funcs[NO_OF_LANG_FUNCS];*/ - -NW_Byte size_lang_lib(void) -{ - return NO_OF_LANG_FUNCS; -} - - -static NW_Bool lang_abs(void) -{ - NW_Int32 i; - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2int(v, &i)) - res = new_int_val(NW_Math_abs(i)); - - else if (val2float(v, &f)) - res = new_float_val((NW_Float32)NW_Math_fabs(f)); - - else res = new_invalid_val(); - - push_estack(res); - - free_val(v); - free_val(res); - return NW_TRUE; -} - - -/* I try to avoid casting of NW_Int32 to NW_Float32 to prevent rounding errors */ -static NW_Bool lang_min(void) -{ - NW_Float32 f1, f2; - NW_Int32 i1, i2; - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - - if (val2int(v1, &i1)) { - if (val2int(v2, &i2)) { - res = new_int_val(NW_MIN(i1, i2)); - } else if (val2float(v2, &f2)) { - if (i1 <= f2) { - res = new_int_val(i1); - } else { - res = new_float_val(f2); - } - } else { - res = new_invalid_val(); /* cannot convert v2 to NW_Int32 or NW_Float32 */ - } - } else if (val2float(v1, &f1)) { - if (val2int(v2, &i2)) { - if (f1 <= i2) { - res = new_float_val(f1); - } else { - res = new_int_val(i2); - } - } else if (val2float(v2, &f2)) { - res = new_float_val(NW_MIN(f1, f2)); - } else { - res = new_invalid_val(); /* cannot convert v2 to NW_Float32 or NW_Int32 */ - } - } else { - res = new_invalid_val(); /* cannot convert v1 to NW_Float32 or NW_Int32 */ - } - push_estack(res); - - free_val(v1); - free_val(v2); - free_val(res); - return NW_TRUE; -} - - -/* I try to avoid casting of NW_Int32 to NW_Float32 to prevent rounding errors */ -static NW_Bool lang_max(void) -{ - NW_Float32 f1, f2; - NW_Int32 i1, i2; - val_t v1 = uninitialize_val(), v2 = uninitialize_val(), res = uninitialize_val(); - - v2 = pop_estack(); - v1 = pop_estack(); - - if (val2int(v1, &i1)) { - if (val2int(v2, &i2)) { - res = new_int_val(NW_MAX(i1, i2)); - } else if (val2float(v2, &f2)) { - if (i1 >= f2) { - res = new_int_val(i1); - } else { - res = new_float_val(f2); - } - } else { - res = new_invalid_val(); /* cannot convert v2 to NW_Int32 or NW_Float32 */ - } - } else if (val2float(v1, &f1)) { - if (val2int(v2, &i2)) { - if (f1 >= i2) { - res = new_float_val(f1); - } else { - res = new_int_val(i2); - } - } else if (val2float(v2, &f2)) { - res = new_float_val(NW_MAX(f1, f2)); - } else { - res = new_invalid_val(); /* cannot convert to NW_Int32 or NW_Float32 */ - } - } else { - res = new_invalid_val(); /* cannot convert v1 to NW_Float32 or NW_Int32 */ - } - - push_estack(res); - - free_val(v1); - free_val(v2); - free_val(res); - return NW_TRUE; -} - -static NW_Bool lang_parseInt(void) -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - str_t str = 0; - NW_Int32 ival; - NW_Bool consumeAll; - - v = pop_estack(); - - if ((val2str(v, &str)) && str2int(str, &ival, &consumeAll)) - res = new_int_val(ival); - else res = new_invalid_val(); - - push_estack(res); - - free_str(str); - free_val(v); - free_val(res); - return NW_TRUE; -} - -static NW_Bool lang_parseFloat(void) -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - str_t str = 0; - NW_Float32 fval; - NW_Bool consumeAll; - - v = pop_estack(); - - if ((val2str(v, &str)) && str2float(str, &fval, &consumeAll)) - res = new_float_val(fval); - else res = new_invalid_val(); - - push_estack(res); - - free_str(str); - free_val(v); - free_val(res); - return NW_TRUE; -} - - -/* How can we get invalid ? */ -static NW_Bool lang_isInt(void) -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - str_t str = 0; - - v = pop_estack(); - - if (ScriptVarType(v) != VAL_TYPE_INVALID) - { - NW_Int32 ival; - NW_Bool bval, consumeAll; - - bval = NW_BOOL_CAST((val2str(v, &str)) && str2int(str, &ival, &consumeAll)); - res = new_bool_val(bval); - } - else res = new_invalid_val(); - - push_estack(res); - - free_str(str); - free_val(v); - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_isFloat(void) -{ - val_t v = uninitialize_val(), res = uninitialize_val(); - str_t str = 0; - - v = pop_estack(); - - if (ScriptVarType(v) != VAL_TYPE_INVALID) - { - NW_Float32 fval; - NW_Bool bval, consumeAll; - - bval = NW_BOOL_CAST((val2str(v, &str)) && str2float(str, &fval, &consumeAll)); - res = new_bool_val(bval); - } - else res = new_invalid_val(); - - push_estack(res); - - free_str(str); - free_val(v); - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_maxInt(void) -{ - val_t res = uninitialize_val(); - - res = new_int_val(SCR_MAX_INT); - - push_estack(res); - - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_minInt(void) -{ - val_t res = uninitialize_val(); - - res = new_int_val(SCR_MIN_INT); - - push_estack(res); - - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_float(void) -{ - val_t res = uninitialize_val(); - - res = new_bool_val(NW_TRUE); - - push_estack(res); - - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_exit(void) -{ - val_t v = uninitialize_val(); - - /* what to do with this return value ??? */ - v = pop_estack(); - - /*while (!is_frstack_empty()) NW_Wmls_PopFrame();*/ - /* free_all_frames(); */ /* possible double deallocation. fix moved from Wave */ - - /* Just set the error for later reporting. */ - /*ScriptAPI_finish(SCR_ERROR_USER_EXIT, 0); */ - set_error_code( SCR_ERROR_USER_EXIT ); - free_val(v); - return NW_TRUE; -} - - -static NW_Bool lang_abort(void) -{ - val_t v = uninitialize_val(); - NW_Ucs2 *str = 0; - - /* what to do with this return value ??? */ - v = pop_estack(); - - if (ScriptVarType(v) == VAL_TYPE_INVALID) { - str = NW_Str_CvtFromAscii("invalid"); - if (str == NULL) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - } - } else { - str = val2ucs2(v); - } - - /* free_all_frames(); */ /* possible double deallocation. Fix moved from Wave */ - - /* Set error code for later reporting. */ - /* ScriptAPI_finish(SCR_ERROR_USER_ABORT, str); */ - set_error_code( SCR_ERROR_USER_ABORT ); - set_error_msg( str ); /* Don't free str. Freed later when context cleared. */ - - free_val(v); - return NW_TRUE; -} - - -static NW_Bool lang_random(void) -{ - NW_Int32 i, limit; - NW_Float32 f; - val_t v = uninitialize_val(), res = uninitialize_val(); - - v = pop_estack(); - - if (val2int(v, &i)) limit = i; - else if (val2float(v, &f)) limit = NW_Math_truncate(f); - else limit = -1; - - /* spec wmls 7.13 says 0->limit inclusive */ - if (limit > 0) res = new_int_val(NW_Math_rand()%(limit+1)); - else if (limit < 0) res = new_invalid_val(); - else res = new_int_val(0); - - push_estack(res); - - free_val(v); - free_val(res); - return NW_TRUE; -} - - -static NW_Bool lang_seed(void) -{ - NW_Int32 i, seed; - NW_Float32 f; - val_t v = uninitialize_val(); - - v = pop_estack(); - - if (val2int(v, &i)) seed = i; - else if (val2float(v, &f)) seed = NW_Math_truncate(f); - else seed = -1; - - if (seed >= 0) - { - NW_Math_srand(seed); - push_estack(new_empty_str_val()); - } - else push_estack(new_invalid_val()); - - free_val(v); - return NW_TRUE; -} - - -static NW_Bool lang_characterSet(void) -{ - val_t res = uninitialize_val(); - - res = new_int_val(ScriptAPI_character_set()); - - push_estack(res); - - free_val(res); - return NW_TRUE; -} - - -/* functions in Lang library */ -static const lib_function_t lang_lib_table[NO_OF_LANG_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, lang_abs, NW_FALSE }, - { 2, lang_min, NW_FALSE }, - { 2, lang_max, NW_FALSE }, - { 1, lang_parseInt, NW_FALSE }, - { 1, lang_parseFloat, NW_FALSE }, - { 1, lang_isInt, NW_FALSE }, - { 1, lang_isFloat, NW_FALSE }, - { 0, lang_maxInt, NW_FALSE }, - { 0, lang_minInt, NW_FALSE }, - { 0, lang_float, NW_FALSE }, - { 1, lang_exit, NW_FALSE }, - { 1, lang_abort, NW_FALSE }, - { 1, lang_random, NW_FALSE }, - { 1, lang_seed, NW_FALSE }, - { 0, lang_characterSet, NW_FALSE } -}; - -void populate_lang_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(LANG_LIB_ID); - (*table)[i] = lang_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_msgs.c --- a/webengine/wmlengine/src/script/src/scr_msgs.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,441 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_string.h" -#include "scr_msgs.h" -#include "nwx_assert.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/********************************************************* -** Name: NW_StartScript_Req_New -** Description: Allocate and initialize a new script request. -** Parameters: *url - pointer to the url -** *referer - pointer to the referer -** *content - pointer to the content -** len - length of the content -** charset - encoding -** Return Value: pointer to new script request or NULL -**********************************************************/ -NW_StartScript_Req_t* -NW_StartScript_Req_New(NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset) -{ - NW_StartScript_Req_t *req; - - NW_ASSERT(url != NULL); - NW_ASSERT(content != NULL); - NW_ASSERT(len > 0); - NW_ASSERT(referer != NULL); - - /* script server's responsibility to free content, url and referer */ - req = (NW_StartScript_Req_t*) NW_Mem_Malloc(sizeof(NW_StartScript_Req_t)); - if (req != NULL) { - req->url = url; - req->postfields = postfields; - req->referer = referer; - req->content = content; - req->contentLen = len; - req->charset = charset; - return req; - } - return NULL; -} - -/********************************************************* -** Name: NW_StartScript_Req_Free -** Description: Deletes a script request. -** Parameters: *req - pointer to the request -** Return Value: void -**********************************************************/ -void NW_StartScript_Req_Free(NW_StartScript_Req_t* req) -{ - if (req != NULL) { - req->url = NULL; - req->postfields = NULL; - req->content = NULL; - req->referer = NULL; - NW_Mem_Free(req); - } - return; -} - -/********************************************************* -** Name: NW_StartScript_Req_DeepFree -** Description: Deletes a script request and its contents. -** Parameters: *req - pointer to the request -** Return Value: void -**********************************************************/ -void NW_StartScript_Req_DeepFree(NW_StartScript_Req_t* req) -{ - if (req != NULL) { - if(req->url != NULL) { - NW_Mem_Free(req->url); - } - if(req->postfields != NULL) { - NW_Mem_Free(req->postfields); - } - if(req->referer != NULL) { - NW_Mem_Free(req->referer); - } - if (req->content != NULL) { - NW_Mem_Free(req->content); - } - NW_Mem_Free(req); - } - return; -} - -/********************************************************* -** Name: NW_Script_VarCons_New -** Description: Allocate and initialize a new variable request. -** Parameters: *name - pointer to the name -** Return Value: pointer to new variable request or NULL -**********************************************************/ -NW_ScriptServerVarCons_t* NW_Script_VarCons_New(const NW_Ucs2 *name) -{ - NW_ScriptServerVarCons_t *var; - - NW_ASSERT(name != NULL); - - var = (NW_ScriptServerVarCons_t*) NW_Mem_Malloc(sizeof(NW_ScriptServerVarCons_t)); - if (var != NULL) { - var->name = NW_Str_Newcpy(name); - if (var->name == NULL) { - NW_Mem_Free(var); - return NULL; - } - } - - return var; -} - -/********************************************************* -** Name: NW_Script_VarCons_Free -** Description: Deletes a variable request -** Parameters: *var - pointer to the variable request -** Return Value: void -**********************************************************/ -void NW_Script_VarCons_Free(NW_ScriptServerVarCons_t *var) -{ - if (var != NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(var->name); - var->name = NULL; - NW_Mem_Free(var); - } - return; -} - -/********************************************************* -** Name: NW_Script_VarInf_New -** Description: Allocate and initialize a new variable request. -** Parameters: *name - pointer to the name -** *value - pointer to the value -** Return Value: pointer to new variable request or NULL -**********************************************************/ -NW_ScriptServerVarInf_t* NW_Script_VarInf_New(const NW_Ucs2 *name, - const NW_Ucs2 *value) -{ - NW_ScriptServerVarInf_t* varinf; - - NW_ASSERT(name != NULL);/* should have a name */ - - varinf = (NW_ScriptServerVarInf_t*) NW_Mem_Malloc(sizeof(NW_ScriptServerVarInf_t)); - if (varinf != NULL) { - varinf->name = NW_Str_Newcpy(name); - if (varinf->name != NULL) { - if(value == NULL) { - varinf->value = NULL; - return varinf; - } else { - varinf->value = NW_Str_Newcpy(value); - if (varinf->value != NULL) { - return varinf; - } - } - NW_Mem_Free(varinf->name); - } - NW_Mem_Free(varinf); - } - - return NULL; -} - -/********************************************************* -** Name: NW_Script_VarCons_Free -** Description: Deletes a variable request -** Parameters: *varinf - pointer to the variable request -** Return Value: void -**********************************************************/ -void NW_Script_VarInf_Free(NW_ScriptServerVarInf_t *varinf) -{ - if (varinf != NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(varinf->name); - NW_Str_Delete(varinf->value); - varinf->name = NULL; - varinf->value = NULL; - NW_Mem_Free(varinf); - } - return; -} - -/********************************************************* -** Name: NW_Script_VarInf_SetValue -** Description: Set a value on the variable -** Parameters: *varinf - pointer to the variable request - value - the value of the variable -** Return Value: - KBrsrSuccess - KBrsrOutOfMemory -**********************************************************/ -TBrowserStatusCode NW_Script_VarInf_SetValue(NW_ScriptServerVarInf_t *varinf, - NW_Ucs2 *value) -{ - NW_ASSERT(varinf != NULL); - NW_ASSERT(varinf->name != NULL);/* should have a name */ - - /* delete any previous value */ - NW_Str_Delete(varinf->value); - varinf->value = value; - - return KBrsrSuccess; -} - -/********************************************************* -** Name: NW_Script_DlgPrompt_Req_New -** Description: Allocate and initialize a new prompt dialog. -** Parameters: *message - pointer to the message to display -** *input - pointer to the input to display -** Return Value: pointer to new prompt dialog or NULL -**********************************************************/ -NW_ScriptServerDlgPromptReq_t* NW_Script_DlgPrompt_Req_New(const NW_Ucs2 *message, - const NW_Ucs2 *input) -{ - NW_ScriptServerDlgPromptReq_t *dlg; - - NW_ASSERT(message != NULL); - NW_ASSERT(input != NULL); - - dlg = (NW_ScriptServerDlgPromptReq_t*) NW_Mem_Malloc(sizeof(NW_ScriptServerDlgPromptReq_t)); - if (dlg != NULL) { - dlg->message = NW_Str_Newcpy(message); - if (dlg->message != NULL) { - dlg->input = NW_Str_Newcpy(input); - if (dlg->input != NULL) { - return dlg; - } - NW_Str_Delete(dlg->message); - } - NW_Mem_Free(dlg); - } - - return NULL; -} - -/********************************************************* -** Name: NW_Script_DlgPrompt_Req_Free -** Description: Deletes a dialog request -** Parameters: *dlg - pointer to the dialog request -** Return Value: void -**********************************************************/ -void NW_Script_DlgPrompt_Req_Free(NW_ScriptServerDlgPromptReq_t *dlg) -{ - if (dlg != NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(dlg->message); - NW_Str_Delete(dlg->input); - dlg->message = NULL; - dlg->input = NULL; - NW_Mem_Free(dlg); - } - return; -} - - -/********************************************************* -** Name: NW_Script_Finish_Req_New -** Description: Create new a finish request -** Parameters: -** Return Value: NW_ScriptServerFinishReq_t* - pointer to - a new finish request -**********************************************************/ -NW_ScriptServerFinishReq_t* NW_Script_Finish_Req_New(TBrowserStatusCode status, - const NW_Ucs2 *message) -{ - NW_ScriptServerFinishReq_t *data = NULL; - - data = (NW_ScriptServerFinishReq_t*) NW_Mem_Malloc(sizeof(NW_ScriptServerFinishReq_t)); - if (data != NULL) { - data->status = status; - data->message = NULL; - if (message != NULL) { - data->message = NW_Str_Newcpy(message); - } - } - return data; -} - -/********************************************************* -** Name: NW_Script_Finish_Req_Free -** Description: Deletes a finish request -** Parameters: *data - pointer to the finish request -** Return Value: void -**********************************************************/ -void NW_Script_Finish_Req_Free(NW_ScriptServerFinishReq_t *data) -{ - if (data != NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(data->message); - data->message = NULL; - NW_Mem_Free(data); - } - return; -} - -/********************************************************* -** Name: NW_Script_Finish_Req_New -** Description: Create a new confirm request -** Parameters: message - message to be displayed to the user -** yesStr - ok string -** noStr - no string -** Return Value: NW_ScriptServerConfirmReq_t* - pointer to - a new confirm request -**********************************************************/ -NW_ScriptServerConfirmReq_t* NW_Script_Confirm_Req_New(const NW_Ucs2 *message, - const NW_Ucs2 *yesStr, - const NW_Ucs2 *noStr) -{ - NW_ScriptServerConfirmReq_t *data = NULL; - - data = (NW_ScriptServerConfirmReq_t*) NW_Mem_Malloc(sizeof(NW_ScriptServerConfirmReq_t)); - if (data != NULL) { - data->message = NULL; - data->yesStr = NULL; - data->noStr = NULL; - - if (message != NULL) { - data->message = NW_Str_Newcpy(message); - if (data->message == NULL) { - NW_Mem_Free(data); - return NULL; - } - } - - if (yesStr != NULL) { - data->yesStr = NW_Str_Newcpy(yesStr); - if (data->yesStr == NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(data->message); - data->message = NULL; - NW_Mem_Free(data); - return NULL; - } - } - - if (noStr != NULL) { - data->noStr = NW_Str_Newcpy(noStr); - if (data->noStr == NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(data->message); - NW_Str_Delete(data->yesStr); - data->message = NULL; - data->yesStr = NULL; - NW_Mem_Free(data); - return NULL; - } - } - } - return data; -} - -/********************************************************* -** Name: NW_Script_Confirm_Req_Free -** Description: Deletes a confirm request -** Parameters: *data - pointer to the confirm request -** Return Value: void -**********************************************************/ -void NW_Script_Confirm_Req_Free(NW_ScriptServerConfirmReq_t *data) -{ - if (data != NULL) { - /* note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(data->message); - NW_Str_Delete(data->yesStr); - NW_Str_Delete(data->noStr); - data->message = NULL; - data->yesStr = NULL; - data->noStr = NULL; - NW_Mem_Free(data); - } - return; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_opcodes.c --- a/webengine/wmlengine/src/script/src/scr_opcodes.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_opcodes.c $ - - Purpose: - - Inline parameters have been used to optimally pack information into as - few bytes as possible. Therefore the opcodes types are: - 1XXPPPPP ==> type0 - 010XPPPP ==> type1 - 011XXPPP ==> type2 - 00XXXXXX ==> type3 - This file parses the opcode and return its type and any parameters/instrunctions - that has been packed with it. - */ - -#include "scr_defs.h" - -void parse_opcode(NW_Byte *opcode, NW_Byte *param) -{ - /* 1XXPPPP */ - if ((*opcode & 0x80) == 0x80) { - *param = (NW_Byte)(*opcode & 0x1F); - *opcode = (NW_Byte)(*opcode & 0xE0); - } - - /* 010XPPPP */ - else if ((*opcode & 0xE0) == 0x40) { - *param = (NW_Byte)(*opcode & 0x0F); - *opcode = (NW_Byte)(*opcode & 0xF0); - } - - /* 011XXPPP */ - else if ((*opcode & 0xE0) == 0x60 ) { - *param = (NW_Byte)(*opcode & 0x07); - *opcode = (NW_Byte)(*opcode & 0x78); - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_params.c --- a/webengine/wmlengine/src/script/src/scr_params.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* - $Workfile: scr_params.c $ - - Purpose: handle parameter parsing in urls - */ - -#include "scr_params.h" -#include "scr_context.h" -#include "scr_conv.h" -#include "scr_core.h" - -#include "nwx_string.h" -#include "nwx_url_utils.h" - -#define INVALID_LITERAL "invalid" -#define BOOL_TRUE_LITERAL "true" -#define BOOL_FALSE_LITERAL "false" - -#define INVALID_LITERAL_LEN (sizeof(INVALID_LITERAL)-1) -#define BOOL_TRUE_LITERAL_LEN (sizeof(BOOL_TRUE_LITERAL)-1) -#define BOOL_FALSE_LITERAL_LEN (sizeof(BOOL_FALSE_LITERAL)-1) - -NW_Bool read_hex_char(NW_Ucs2 *p, NW_Int32 *val) -{ - NW_Int32 i; - - *val = 0; - for(i = 0; i < 2; i++) - { - *val <<= 4; - - if ( ('0' <= p[i]) && (p[i] <= '9') ) - *val += (p[i] - '0'); - else if (('A' <= p[i]) && (p[i] <= 'F') ) - *val += (p[i] - 'A' + 10); - else if (('a' <= p[i]) && (p[i] <= 'f') ) - *val += (p[i] - 'a' + 10); - else - return NW_FALSE; - } - - return NW_TRUE; -} - -NW_Bool read_hex_wchar(NW_Ucs2 *p, NW_Int32 *val) -{ - NW_Int32 i; - - *val = 0; - for(i = 0; i < 4; i++) - { - *val <<= 4; - - if (('0' <= p[i]) && ( p[i] <= '9') ) - *val += (p[i] - '0'); - else if (('A' <= p[i]) && ( p[i] <= 'F')) - *val += (p[i] - 'A' + 10); - else if (('a' <= p[i]) && ( p[i] <= 'f')) - *val += (p[i] - 'a' + 10); - else - return NW_FALSE; - } - - return NW_TRUE; -} - - -NW_Int32 read_oct_char(NW_Ucs2 *p, NW_Int32 *val) -{ - NW_Int32 i; - - *val = 0; - for(i = 0; i < 3; i++) - { - if ((i == 2) && (p[0] > '3')) break; - if (('0' <= p[i]) && (p[i] <= '7')) - { - *val <<= 3; - *val += (p[i] - '0'); - } - else break; - } - - return i; -} - - -NW_Ucs2 *read_func_name(NW_Ucs2 *frag) -{ - NW_Int32 i; - NW_Int32 len; - - if (!NW_Str_Isalpha(frag[0])) return 0; - - len = NW_Str_Strlen(frag); - for(i=0; i < len; i++) - { - if (NW_Str_Isalnum(frag[i]) || (frag[i] == WAE_URL_UNDER_CHAR)) /* It now allows underscore in func name */ - continue; - if (frag[i] != '(') { - return 0; - } else { - NW_Ucs2 *res = NW_Str_Substr(frag, 0, i); - if (res == NULL) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - } - return res; - } - } - return NULL; -} - - -NW_Ucs2 *read_string_literal(NW_Ucs2 **p) -{ - NW_Ucs2 start_char = **p, *res = 0; - - NW_Int32 i, j; - - NW_Int32 len = NW_Str_Strlen(*p); - res = NW_Str_New(len); - if (res == NULL) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NULL; - } - - for(i=1, j = 0;;) - { - if (i >= len) - { - NW_Str_Delete(res); - return NULL; - } - if ((*p)[i] == start_char) - { - *p += (i + 1); - res[j] = '\0'; - return res; - } - - if ((*p)[i] == '\\') - { - i++; - if (((*p)[i] == '\'') || ((*p)[i] == '\"') || ((*p)[i] == '\\') || ((*p)[i] == '/')) - { - res[j++] = (*p)[i]; - i++; - } - else if ((*p)[i] == 'b') - { - res[j++] = 0x8; - i++; - } - else if ((*p)[i] == 'f') - { - res[j++] = 0xC; - i++; - } - else if ((*p)[i] == 'n') - { - res[j++] = 0xA; - i++; - } - else if ((*p)[i] == 'r') - { - res[j++] = 0xD; - i++; - } - else if ((*p)[i] == 't') - { - res[j++] = 0x9; - i++; - } - else if ((*p)[i] == 'x') - { - NW_Int32 val; - if (!read_hex_char(*p + i + 1, &val)) - { - NW_Str_Delete(res); - return NULL; - } - /* returned character should be ascii */ - res[j++] = NW_UINT8_CAST(val); - i+=2; - } - else if ((*p)[i] == 'u') - { - NW_Int32 val; - if (!read_hex_wchar(*p + i + 1, &val)) - { - NW_Str_Delete(res); - return NULL; - } - /* returned character should be ascii */ - res[j++] = NW_UINT8_CAST(val); - i+=4; - } - else - { - NW_Int32 val = 0; - NW_Int32 nbytes = read_oct_char(*p + i, &val); - if (nbytes == 0) - { - NW_Str_Delete(res); - return NULL; - } - /* returned character should be ascii */ - res[j++] = NW_UINT8_CAST(val); - i += nbytes; - } - } - else res[j++] = (*p)[i++]; - } -} - - -NW_Bool read_numeric_literal(NW_Ucs2 **p, NW_Byte index) -{ - NW_Ucs2 *arg_end = 0, *str = 0; - str_t s; - NW_Int32 ival; - NW_Float32 fval; - NW_Bool retval = NW_FALSE, consume; - - for(arg_end = *p; (*arg_end != ',') && (*arg_end != ')'); arg_end++) {} - - if (arg_end == *p) return NW_FALSE; - str = NW_Str_Substr(*p, 0, (arg_end - *p)); - if (!str) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - s = ucs22str(str); - NW_Str_Delete(str); - - if (str2int(s, &ival, &consume) && consume) - { - val_t v = new_int_val(ival); - set_func_var(index, v); - *p = arg_end; - free_val(v); - retval = NW_TRUE; - } - - else if (str2float(s, &fval, &consume) && consume) - { - val_t v = new_float_val(fval); - set_func_var(index, v); - *p = arg_end; - free_val(v); - retval = NW_TRUE; - } - - free_str(s); - - return retval; -} - - -NW_Bool parse_argument(NW_Ucs2 **p, NW_Byte index) -{ - NW_Bool retval = NW_TRUE; - - while(NW_Str_Isspace(**p)) (*p)++; - - if (!NW_Str_StrncmpConst(*p, INVALID_LITERAL, INVALID_LITERAL_LEN)) - { - set_func_var(index, new_invalid_val()); - *p += INVALID_LITERAL_LEN; - } - - else if (!NW_Str_StrncmpConst(*p, BOOL_TRUE_LITERAL, BOOL_TRUE_LITERAL_LEN)) - { - val_t v = new_bool_val(NW_TRUE); - set_func_var(index, v); - *p += BOOL_TRUE_LITERAL_LEN; - free_val(v); - } - - else if (!NW_Str_StrncmpConst(*p, BOOL_FALSE_LITERAL, BOOL_FALSE_LITERAL_LEN)) - { - val_t v = new_bool_val(NW_FALSE); - set_func_var(index, v); - *p += BOOL_FALSE_LITERAL_LEN; - free_val(v); - } - - else if ((**p == '\'') || (**p == '\"')) - { - str_t s; - val_t v; - NW_Ucs2 *str = read_string_literal(p); - if (!str) return NW_FALSE; - - s = ucs22str(str); - v = new_str_val(s); - set_func_var(index, v); - free_str(s); - free_val(v); - NW_Str_Delete(str); - } - - else retval = read_numeric_literal(p, index); - - if (retval) - { - while(NW_Str_Isspace(**p)) (*p)++; - return NW_TRUE; - } - else return NW_FALSE; -} - - -NW_Bool parse_argument_list(NW_Ucs2 *params, NW_Int32 args) -{ - NW_Ucs2 *p = params; - NW_Byte index = 0; - - if (*p++ != '(') return NW_FALSE; - - if (*p == ')') return NW_BOOL_CAST(args == 0); /* check for an empty argument list */ - - while(*p && (index < args)) - { - if (!parse_argument(&p, index++)) return NW_FALSE; - if (*p == ',') p++; - else if (*p == ')') return NW_BOOL_CAST(args == index); - else return NW_FALSE; - } - - return NW_FALSE; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_ptrstack.c --- a/webengine/wmlengine/src/script/src/scr_ptrstack.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_ptrstack.c $ - - Purpose: - - This file implements the frame stack for the ScriptServer Virtual machine. - The frame stack stores current runtime values of a routine's formal - parameters and local variables, and keep track of intermediate values - during expression evaluation. The ScriptServer Interpreter also uses - the runtime stack to keep track of where to return to when the currently - executing function returns, and for a function call the return value. - The frame stack is allocated at the beginning of the execution of the - program. Each time we call a stack we push a stack frame for that - function onto the stack, and we pop up the frame when we return from the - function. A pointer (frame stack pointer) always points to the base - (first component) of the current stack frame. The current stack frame - is always the topmost one, and it represents the currently executing - routine. - */ - -#include "scr_ptrstack.h" -#include "nwx_mem.h" -#include "scr_core.h" - -pstack_t *new_pstack(NW_Int32 cap) -{ - pstack_t *st = (pstack_t *)NW_Mem_Malloc(sizeof(pstack_t)); - if (!st) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - st->s = (void **) NW_Mem_Malloc(cap * sizeof(void*)); - if (!st->s) - { - NW_Mem_Free(st); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - st->capacity = cap; - st->size = 0; - - return st; -} - -NW_Bool is_pstack_empty(pstack_t *st) -{ - NW_ASSERT(st); - return NW_BOOL_CAST(st->size == 0); -} - -NW_Bool is_pstack_full(pstack_t *st) -{ - NW_ASSERT(st); - return NW_BOOL_CAST(st->size == st->capacity); -} - -void *pop_pstack(pstack_t *st) -{ - NW_ASSERT(st); - if (is_pstack_empty(st)) - { - return 0; - } - else - { - return (st->s[--st->size]); - } -} - -void *peek_pstack(pstack_t *st) -{ - NW_ASSERT(st); - if (is_pstack_empty(st)) - { - return 0; - } - else - { - return (st->s[st->size-1]); - } -} - -void push_pstack(pstack_t *st, void *v) -{ - NW_ASSERT(st); - NW_ASSERT(!is_pstack_full(st)); - st->s[st->size++] = v; -} - -void destroy_pstack(pstack_t *st) -{ - NW_ASSERT(st); - NW_Mem_Free(st->s); - st->s = 0; -} - -void *el_at_pstack(pstack_t *st, NW_Int32 index) -{ - NW_ASSERT(st); - NW_ASSERT((0 <= index) && (index < st->capacity)); - return st->s[index]; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_reader.c --- a/webengine/wmlengine/src/script/src/scr_reader.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,683 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_reader.c $ - - Purpose: - - This file implements functions needed to read the entire ScriptServer - bytecode. - */ - -#include "scr_reader.h" -#include "scr_context.h" -#include "scr_core.h" -#include "scr_api.h" -#include "nwx_url_utils.h" -#include "nw_wae_reader.h" -#include "nw_nvpair.h" - -#include "nwx_logger.h" -#include "nwx_mem.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - - -/* prototypes */ -NW_Bool read_header_info(NW_Reader_t *r); -NW_Bool read_constpool(NW_Reader_t *r); -NW_Bool read_pragmapool(NW_Reader_t *r, const NW_Ucs2 *referer, const NW_Ucs2 *url); -NW_Bool read_funcpool(NW_Reader_t *r); - - -#define AC_DOMAIN 0 -#define AC_PATH 1 -#define UA_PROP 2 -#define UA_PROP_SCHEME 3 - -#define SCRIPT_VERSION 0x01 - -function_t *read_function(NW_Reader_t *r) -{ - function_t *f = 0; - NW_Int32 mbyte; - NW_Int32 temp; - - f = (function_t *)NW_Mem_Malloc(sizeof(function_t)); - if (!f) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - if (!NW_Reader_ReadNextByte(r, &f->nbr_of_args) || - !NW_Reader_ReadNextByte(r, &f->nbr_of_local_vars)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - NW_Mem_Free(f); - return 0; - } - - temp = f->nbr_of_args + f->nbr_of_local_vars; - if (temp >= 256) - { - set_error_code(SCR_ERROR_STACK_UNDERFLOW); - NW_Mem_Free(f); - return 0; - } - - NW_Reader_ReadMbyteInt(r, &mbyte); - f->code_size = NW_UINT16_CAST(mbyte); - - f->code = (NW_Byte *)NW_Mem_Malloc(f->code_size * sizeof(NW_Byte)); - if (!f->code) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - if ( (r->readerPos + f->code_size) > r->readerSize) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - NW_Mem_Free(f->code); - NW_Mem_Free(f); - return NULL; - } - /* changed return value type of NW_Reader_ReadBytes, added return value handling code. - Prevent accesses beyond compiled code size. (2/16/2000, jac). */ - if (!NW_Reader_ReadBytes(r, f->code, f->code_size)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - NW_Mem_Free( f->code ); /* NEW: 2/18/2000, jac */ - NW_Mem_Free( f ); /* changed: 2/18/2000, jac */ - return 0; - } - - return f; -} - -NW_Bool read_script(NW_Reader_t *r, const NW_Ucs2 *referer, const NW_Ucs2 *url) -{ - context_t *ctx = ScriptAPI_getCurrentContext(); - clear_url_context(ctx); - return NW_BOOL_CAST(read_header_info(r) && - read_constpool(r) && - read_pragmapool(r, referer, url) && - read_funcpool(r)); -} - -/* code size and version are not used for decoding the script */ -NW_Bool read_header_info(NW_Reader_t *r) -{ - NW_Byte version; - NW_Int32 code_size; - - NW_ASSERT(r); - if (!NW_Reader_ReadNextByte(r, &version) || version != SCRIPT_VERSION) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Header Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - NW_Reader_ReadMbyteInt(r, &code_size); - - if (code_size != NW_INT32_CAST(r->readerSize - r->readerPos)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Header Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - return NW_TRUE; -} - - -NW_Bool read_constpool(NW_Reader_t *r) -{ - NW_Byte constType; - constpool_t *cp; - NW_Int32 i = 0; - NW_Int32 cp_size; - NW_Int32 charset; - NW_Uint16 cset; - - NW_ASSERT(r); - - NW_Reader_ReadMbyteInt(r, &cp_size); - - NW_Reader_ReadMbyteInt(r, &charset); - cset = NW_UINT16_CAST(charset); - - /* for the time being we rely on the content because of file simulation */ - if ( ! ( ( cset == HTTP_iso_10646_ucs_2 ) || - ( cset == HTTP_iso_8859_1 ) || - ( cset == HTTP_utf_8 ) || - ( cset == HTTP_us_ascii )) || (cset < (NW_Uint32)charset) ) - { - /* Not an accepted character set. Reject. */ - return NW_FALSE; - } - r->readerEncoding = cset; - - if (cp_size == 0) - return NW_TRUE; - - cp = create_cp(cp_size, charset); - if (!cp) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - return NW_FALSE; - } - - for(i = 0; i < cp_size; i++) - { - if (!NW_Reader_ReadNextByte(r, &constType)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r)); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - switch (constType) - { - - case CP_TYPE_8_BIT_SIGNED_INT: - { - NW_Byte ival; - - if (!NW_Reader_ReadNextByte(r, &ival)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - append_cp_int(i, (NW_Int8) ival); - break; - } - case CP_TYPE_16_BIT_SIGNED_INT: - { - NW_Int16 ival = -1; - - if(!(NW_Reader_ReadInt16(r, &ival))) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - append_cp_int(i, ival); - break; - } - case CP_TYPE_32_BIT_SIGNED_INT: - { - NW_Int32 ival = -1; - - if(!(NW_Reader_ReadInt(r, &ival))) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - append_cp_int(i, ival); - break; - } - - case CP_TYPE_32_BIT_FLOAT: - { - NW_Float32 f; - - f = NW_Reader_ReadFloat(r); - append_cp_float(i, f); - break; - } - - case CP_TYPE_UTF8_STRING: - { - NW_Int32 bytes; - NW_Int32 nchars; - str_t strval = 0; - NW_Ucs2 *str; - - NW_Reader_ReadMbyteInt(r, &bytes); - /* TODO: assert that mbyte is not bigger than short */ - - if ( bytes == 0 ) - { - /* Null string. Don't read any bytes. */ - nchars = 0; - str = NULL; - } - else - { - nchars = NW_Reader_GetStrCharCount(r, bytes); - if ( nchars <= 0 || (nchars + r->readerPos) >= r-> readerSize ) /* CHANGED: 2/18/2000, jac */ - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); /* prevents improper mem accesses */ - return NW_FALSE; /* Char count should be > 0. Return failure. */ - } - - str = (NW_Ucs2 *) NW_Mem_Malloc(nchars * sizeof(NW_Ucs2)); - if (!str) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r)); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - NW_Mem_Free(str); - return NW_FALSE; - } - - if (!NW_Reader_ReadChars(r, str, bytes)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r)); - NW_Mem_Free(str); - return NW_FALSE; - } - } - - strval = new_str(nchars, str); - append_cp_string(i, strval); - NW_Mem_Free(str); - free_str(strval); - break; - } - - case CP_TYPE_EMPTY_STRING: - { - str_t strval = 0; - - strval = new_str(0, 0); - append_cp_string(i, strval); - free_str(strval); - break; - } - - case CP_TYPE_EXT_STRING: - { - if ( (charset == HTTP_utf_8) || - (charset == HTTP_us_ascii) || - (charset == HTTP_iso_8859_1) || - (charset == HTTP_iso_10646_ucs_2) ) - { - NW_Int32 mbyte; - NW_Int32 nchars; - NW_Int16 bytes = -1; - str_t strval = 0; - NW_Ucs2* buf; - - NW_Reader_ReadMbyteInt(r, &mbyte); - bytes = (NW_Int16)mbyte; - - if ((bytes != mbyte) || ( bytes == 0 )) - { - /* Null string. Don't read any bytes. */ - nchars = 0; - buf = NULL; - } - else - { - nchars = NW_Reader_GetStrCharCount(r, bytes); - if ( nchars <= 0 || (nchars + r-> readerPos) >= r-> readerSize) /* CHANGED: 2/18/2000, jac */ - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r)); - return NW_FALSE; /* Char count should be > 0. Return failure. */ - } - buf = (NW_Ucs2 *)NW_Mem_Malloc(nchars * sizeof(NW_Ucs2)); - if (!buf) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - NW_Mem_Free(buf); - return NW_FALSE; - } - - if (!NW_Reader_ReadChars(r, (NW_Ucs2*) buf, bytes)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - NW_Mem_Free(buf); - return NW_FALSE; - } - } - - strval = new_str(nchars , buf); - NW_Mem_Free(buf); - append_cp_string(i, strval); - free_str(strval); - } - else - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - break; - - } - - default: - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Constant Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r)); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - }/*end of switch*/ - - } /*end of for loop*/ - return NW_TRUE; -} - -NW_Bool check_access(NW_Int32 path_index, NW_Int32 domain_index, const NW_Ucs2 *referer, const NW_Ucs2 *url) -{ - NW_Ucs2 *path = 0; - NW_Ucs2 *domain = 0; - NW_Bool res = NW_FALSE; - NW_Ucs2 default_path[2] = { '/', '\0' }; - TBrowserStatusCode status; - - if ((path_index == -1) && (domain_index == -1)) return NW_TRUE; - - if (path_index != -1) - { - val_t v = uninitialize_val(); - - if (!valid_const_index(path_index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - goto clean; - } - - v = get_const(path_index); - path = val2ucs2(v); - if (!path) goto clean; - - } - else path = default_path; - - if (domain_index != -1) - { - val_t v = uninitialize_val(); - - if (!valid_const_index(domain_index)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - goto clean; - } - - v = get_const(domain_index); - domain = val2ucs2(v); - if (!domain) goto clean; - } - - else - { - /* if no domain was specified we use the host of the url */ - status = NW_Url_GetHost(url, &domain); - if (status == KBrsrOutOfMemory) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - res = NW_FALSE; - goto clean; - } - if (!domain) - { - NW_ASSERT(NW_FALSE); - res = NW_FALSE; - goto clean; - } - } - - status = NW_Url_AccessOK(domain, path, referer, NULL); - if (status == KBrsrOutOfMemory) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - res = NW_FALSE; - } - else if (status == KBrsrFailure) - res = NW_FALSE; - else - res = NW_TRUE; - -clean: - if (path && (path != default_path)) NW_Mem_Free(path); - if (domain) NW_Mem_Free(domain); - - return res; -} - -NW_Bool read_pragmapool(NW_Reader_t *r, const NW_Ucs2 *referer, const NW_Ucs2 *url) -{ - NW_Int32 i, index1, index2, index3, numOfPragmas; - NW_Int32 domain_index = -1, path_index = -1; - NW_Bool accessDisable = NW_TRUE; - NW_Byte type; - - NW_Reader_ReadMbyteInt(r, &numOfPragmas); - for(i = 0; i < numOfPragmas; i++) - { - if (!NW_Reader_ReadNextByte(r, &type)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - switch (type) { - - case AC_DOMAIN: - NW_Reader_ReadMbyteInt(r, &domain_index); - if (!is_const_string(domain_index)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - accessDisable = NW_FALSE; - /* set domain in context */ - break; - case AC_PATH: - NW_Reader_ReadMbyteInt(r, &path_index); - if (!is_const_string(path_index)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - accessDisable = NW_FALSE; - /* set path in context */ - break; - case UA_PROP: - NW_Reader_ReadMbyteInt(r, &index1); - NW_Reader_ReadMbyteInt(r, &index2); - if (!is_const_string(index1) || !is_const_string(index2)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - /* TODO handle UA */ - break; - case UA_PROP_SCHEME: - NW_Reader_ReadMbyteInt(r, &index1); - NW_Reader_ReadMbyteInt(r, &index2); - NW_Reader_ReadMbyteInt(r, &index3); - - if (!is_const_string(index1) || !is_const_string(index2) || !is_const_string(index3)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - /* TODO handle UA */ - break; - default: - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - } - if (!accessDisable && ! check_access(path_index, domain_index, referer, url)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Pragma Pool Access Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_ACCESS_VIOLATION); - return NW_FALSE; - } - else return NW_TRUE; -} - -NW_Ucs2 *read_fname_str(NW_Reader_t *r) -{ - NW_Byte len; - NW_Ucs2 *s = NULL; - NW_Ucs2 wc; - NW_Int32 i; - - if (!NW_Reader_ReadNextByte(r, &len)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NULL; - } - if (((NW_Uint32) len + r->readerPos) >= r-> readerSize) /* NEW: 2/18/2000, jac */ - { - set_error_code( SCR_ERROR_VERIFICATION_FAILED ); - return NULL; - } - - s = (NW_Ucs2 *)NW_Mem_Malloc((len + 1) * sizeof(NW_Ucs2)); - if (!s) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NULL; /* was: 0; 2/18/2000, jac */ - } - - NW_Mem_memset(s, 0, (len + 1) * sizeof(NW_Ucs2)); - - for(i = 0; i < len; i++) - { - if(!(NW_Reader_ReadChar(r, &wc))) - { - NW_Mem_Free(s); - set_error_code( SCR_ERROR_VERIFICATION_FAILED ); - return NULL; - } - s[i] = wc; - } - - if (!NW_CheckName(s)) - { - NW_Mem_Free(s); - set_error_code( SCR_ERROR_VERIFICATION_FAILED ); - return NULL; - } - - return s; -} - - -NW_Bool is_identifier(str_t s) -{ - NW_Ucs2 c; - NW_Int32 i, len; - - c = scr_charat(s, 0); - - if (!str_is_alpha(c)) return NW_FALSE; - - len = str_len(s); - for(i = 1; i < len; i++) - if (!str_is_alpha(c) ||!str_is_digit(c)) return NW_FALSE; - - if (str_is_reserved(s)) return NW_FALSE; - - return NW_TRUE; -} - -NW_Bool read_fname_table(NW_Reader_t *r, NW_Int32 no_of_fcns) -{ - NW_Int32 i; - NW_Byte fn_index; - NW_Ucs2 *str = 0; - NW_Byte no_of_names; - - if (!NW_Reader_ReadNextByte(r, &no_of_names)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (no_of_names > 0) { - if (!create_fname_table(no_of_names)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - for(i =0; i < no_of_names; i++) - { - if (!NW_Reader_ReadNextByte(r, &fn_index) || (fn_index >= no_of_fcns)) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - str = read_fname_str(r); - if (!str) - { - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - add_fname(fn_index, str); - - } - } - return NW_TRUE; -} - -NW_Bool read_funcpool(NW_Reader_t *r) -{ - NW_Int32 i; - function_t *f; - NW_Byte no_of_fcns; - - if (!NW_Reader_ReadNextByte(r, &no_of_fcns) || (no_of_fcns == 0)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Function Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (!create_func_pool(no_of_fcns)) - { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Function Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; - } - - if (!read_fname_table(r, no_of_fcns)) { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Function Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - return NW_FALSE; - } - - for(i =0; i < no_of_fcns; i++) { - f = read_function(r); - if (f == NULL) { - NW_LOG1(NW_LOG_LEVEL1, "WMLScript Function Pool Validation Error. Pos = %d\n", NW_Reader_GetPos(r) ); - return NW_FALSE; - } - add_func_fp(f); - } - return NW_TRUE; -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_str.c --- a/webengine/wmlengine/src/script/src/scr_str.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,754 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_str.c $ - - Purpose: - */ - -#include "scr_str.h" -#include "scr_conv.h" -#include "scr_core.h" - -#include "nwx_mem.h" -#include "nwx_string.h" - -/* -** Creates a new empty string. -** The caller has to delete the returned string with free_str -*/ -static str_t new_empty_str(void) -{ - return new_str(0, NULL); -} - - -/* Create a new length-counted ucs2 string */ -str_t new_str(NW_Int32 len, NW_Ucs2 *buf) -{ - str_t res; - - /* The specification for WMLS allows strings of 2^32 characters - * in length; however the Rainbow architecture puts the length - * into the first 16 bits of the string. For now, return a - * fatal error if someone tries to use an absurdly long string. - */ - if (len > NW_UINT16_MAX) - { - set_error_code(SCR_ERROR_FATAL_LIBRARY_FUNCTION_ERROR); - return NULL; - } - - res = (str_t) NW_Mem_Malloc((1 + len)*sizeof(NW_Ucs2)); - if (res == NULL) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NULL; - } - - /* Length is held in the 1st 16-bit char */ - res[0] = NW_UINT16_CAST(len); - - if (len > 0) { - /* String storage starts with 2nd 16-bit char */ - if (buf != NULL) { - NW_Mem_memcpy(&res[1], buf, len*sizeof(NW_Ucs2)); - } else { - NW_Mem_memset(&res[1], 0, len*sizeof(NW_Ucs2)); - } - } - - return res; -} - - -/* Free a length-counted ucs2 string */ -void free_str(str_t str) -{ - if (str != NULL) { - NW_Mem_Free(str); - } - return; -} - - -/* Return length of length-counted ucs2 string */ -NW_Int32 str_len(str_t str) -{ - NW_ASSERT(str != NULL); - - /* length is held in the first 16-bit char */ - return str[0]; -} - - -/* Return pointer to storage for length-counted ucs2 string */ -NW_Ucs2* str_buf_ptr(str_t str) -{ - NW_ASSERT(str != NULL); - - /* String storage starts with 2nd 16-bit char */ - return &str[1]; -} - - -/* Concatinate 2 length-counted ucs2 strings */ -str_t str_cat(str_t str1, str_t str2) -{ - str_t res; - NW_Int32 len1; - NW_Int32 len2; - - NW_ASSERT(str1); - NW_ASSERT(str2); - - len1 = str_len(str1); - len2 = str_len(str2); - - res = new_str((len1 + len2), NULL); - if (res != NULL) { - if (len1 > 0) { - /* String storage starts with 2nd 16-bit char */ - NW_Mem_memcpy(&res[1], &str1[1], len1*sizeof(NW_Ucs2)); - } - if (len2 > 0) { - NW_Mem_memcpy(&res[1 + len1], &str2[1], len2*sizeof(NW_Ucs2)); - } - } - - return res; -} - - - -/* Concatinate 3 length-counted ucs2 strings */ -str_t str_cat3(str_t str1, str_t str2, str_t str3) -{ - str_t res; - NW_Int32 len1, len2, len3; - - if (str1 == NULL || str2 == NULL || str3 == NULL) { - return NULL; - } - - len1 = str_len(str1); - len2 = str_len(str2); - len3 = str_len(str3); - - res = new_str((len1 + len2 + len3), NULL); - if (res != NULL) { - if (len1 > 0) { - /* String storage starts with 2nd 16-bit char */ - NW_Mem_memcpy(&res[1], &str1[1], len1*sizeof(NW_Ucs2)); - } - if (len2 > 0) { - NW_Mem_memcpy(&res[1 + len1], &str2[1], len2*sizeof(NW_Ucs2)); - } - if (len3 > 0) { - NW_Mem_memcpy(&res[1 + len1 + len2], &str3[1], len3*sizeof(NW_Ucs2)); - } - } - - return res; -} - - -/* Duplicate a length-counted ucs2 string */ -str_t dup_str(str_t str) -{ - if (str == NULL) { - return NULL; - } - return new_str(str_len(str), str_buf_ptr(str)); -} - - -/* Create a length-counted ucs2 string from a null-terminated ucs2 string */ -str_t ucs22str(NW_Ucs2 *str) -{ - NW_Int32 len; - - if (str == NULL) { - return new_empty_str(); - } - - len = NW_Str_Strlen(str); - return new_str(len, str); -} - - -/* Compare 2 length-counted ucs2 strings */ -NW_Int32 str_cmp(str_t str1, str_t str2) -{ - NW_Int32 len, i, len1, len2; - NW_Int32 value; - NW_Ucs2 *ptr1, *ptr2; - - if (!str1 || !str2) - { - if (str1 > str2) { - return 1; - } else if (str2 > str1) { - return -1; - } else { - return 0; - } - } - - len1 = str_len(str1); - len2 = str_len(str2); - - len = NW_MIN(len1, len2); - value = len1 - len2; - - ptr1 = str_buf_ptr(str1); - ptr2 = str_buf_ptr(str2); - - for (i = 0; i < len; i++){ - if (ptr1[i] != ptr2[i]) { - value = ptr1[i] - ptr2[i]; - break; - } - } - - if (value != 0) { - value = (value > 0) ? 1:-1; - } - return value; -} - - - -/* Return the character at the given index */ -NW_Ucs2 scr_charat(str_t str, NW_Int32 index) -{ - NW_Ucs2 *ptr; - NW_Ucs2 ch = 0; - NW_Int32 len; - - NW_ASSERT(str != NULL); - - len = str_len(str); - - if ((0 <= index) && (index < len)) { - ptr = str_buf_ptr(str); - ch = ptr[index]; - } else { - set_error_code(SCR_ERROR_INVALID_FUNCTION_ARGUMENTS); - } - return ch; -} - - -/* Extract a substring from a length-counted ucs2 string */ -str_t scr_substr(str_t str, NW_Int32 start, NW_Int32 len) -{ - NW_Int32 slen; - NW_Ucs2 *ptr; - - if ((str == NULL) || (len <= 0)) { - return new_empty_str(); - } - - slen = str_len(str); - - start = NW_MAX(start, 0); - slen = NW_MIN(len, slen - start); - - if (slen <= 0) { - return new_empty_str(); - } - - ptr = str_buf_ptr(str); - return new_str(slen, &ptr[start]); -} - - -/* Find position of 2nd string in 1st string */ -NW_Int32 str_find(str_t str1, str_t str2, NW_Int32 start) -{ - NW_Int32 len1, len2, i, j; - NW_Ucs2 *ptr1, *ptr2; - - if (!str1 || !str2) { - return -1; - } - - len1 = str_len(str1); - len2 = str_len(str2); - - ptr1 = str_buf_ptr(str1); - ptr2 = str_buf_ptr(str2); - - for (i = start; i <= len1 - len2; i++) - { - for (j = 0; j < len2; j++) - { - if (ptr1[i + j] != ptr2[j]) break; - } - if (j == len2) return i; - } - - return -1; -} - - - -str_t str_replace(str_t str, str_t old_str, str_t newstr) -{ - NW_Int32 start = 0, pos; - str_t res = 0; - NW_Int32 lold, lnew; - - if (!old_str || !newstr || !str) - { - return 0; - } - - lold = str_len(old_str); - lnew = str_len(newstr); - res = dup_str(str); - - /** returns invalid, if the old string is an empty string **/ - if ( lold == 0) { - free_str(res); - return NULL; - } - - if (res == NULL) { - return NULL; - } - - for(; ;) - { - pos = str_find(res, old_str, start); - - if (pos == -1) { - break; - } - - { - str_t sub1; - str_t sub2; - NW_Int32 len = str_len(res); - - sub1 = scr_substr(res, 0, pos); - sub2 = scr_substr(res, pos + lold, len - pos - lold); - free_str(res); - res = str_cat3(sub1, newstr, sub2); - free_str(sub1); - free_str(sub2); - start = pos + lnew; - } - } - - return res; -} - - - -NW_Int32 str_times(str_t str, NW_Ucs2 separator) -{ - NW_Int32 len; - NW_Ucs2 *ptr; - NW_Int32 i, count = 0; - - NW_ASSERT(str); - - len = str_len(str); - ptr = str_buf_ptr(str); - - for(i = 0; i < len; i++) { - if (ptr[i] == separator) { - count++; - } - } - - return count; -} - - - -str_t str_elementat(str_t s, NW_Int32 index, NW_Ucs2 separator) -{ - NW_Int32 start = 0, i = 0; - NW_Int32 len; - NW_Ucs2 *ptr; - - NW_ASSERT(s); - - len = str_len(s); - ptr = str_buf_ptr(s); - - for (i = 0; (i < len) && (index > 0); i++) - { - if (ptr[i] == separator) - { - --index; - start = i + 1; - } - } - - for (i = start; i < len; i++) - { - if (ptr[i] == separator) break; - } - - return scr_substr(s, start, i - start); -} - - - -str_t str_removeat(str_t s, NW_Int32 index, NW_Ucs2 separator) -{ - NW_Int32 start = 0, el_len = 0, i = 0; - NW_Int32 len; - NW_Ucs2 *ptr; - str_t res = 0; - - NW_ASSERT(s); - - len = str_len(s); - ptr = str_buf_ptr(s); - - for (i = 0; (i < len) && (index > 0); i++) - { - if (ptr[i] == separator) - { - --index; - start = i + 1; - } - } - - for (i = start; i < len; i++) - { - if (ptr[i] == separator) break; - } - el_len = i - start; - - /* first */ - if (start == 0) { - res = scr_substr(s, el_len + 1, len); - } - /* last */ - else if (start + el_len == len) - { - res = scr_substr(s, 0, start - 1); - } - else - { - str_t sub1 = 0; - str_t sub2 = 0; - - sub1 = scr_substr(s, 0, start); - sub2 = scr_substr(s, start + el_len + 1, len); - NW_ASSERT(sub1); - NW_ASSERT(sub2); - res = str_cat(sub1, sub2); - free_str(sub1); - free_str(sub2); - } - - return res; -} - - - -str_t str_replaceat(str_t s, str_t newstr, NW_Int32 index, NW_Ucs2 separator) -{ - NW_Int32 start = 0, el_len = 0, i = 0; - NW_Int32 len; - NW_Ucs2 *ptr; - str_t sub1 = 0; - str_t sub2 = 0; - str_t res = 0; - - NW_ASSERT(s); - NW_ASSERT(newstr); - - len = str_len(s); - ptr = str_buf_ptr(s); - - for(i = 0; (i < len) && (index > 0); i++) - { - if (ptr[i] == separator) - { - --index; - start = i + 1; - } - } - - for(i = start; i < len; i++) - { - if (ptr[i] == separator) break; - } - el_len = i - start; - - sub1 = scr_substr(s, 0, start); - sub2 = scr_substr(s, start + el_len, len); - NW_ASSERT(sub1); - NW_ASSERT(sub2); - - res = str_cat3(sub1, newstr, sub2); - - free_str(sub1); - free_str(sub2); - - return res; - -} - - - -str_t str_insertat(str_t s, str_t newstr, NW_Int32 index, NW_Ucs2 separator) -{ - NW_Int32 start = 0, i = 0; - NW_Int32 len; - NW_Ucs2 *ptr; - str_t sep_str = ucs2ch2str(separator); - str_t tmpstr = 0; - str_t res = 0; - - if (!s || !sep_str || !newstr) - { - return 0; - } - - len = str_len(s); - ptr = str_buf_ptr(s); - - for (i = 0; (i < len) && (index > 0); i++) - { - if (ptr[i] == separator) - { - --index; - start = i + 1; - } - } - - if ((start == 0) && (i == len) && (len != 0) && (index > 0)) { - start = len; - } - - if (start == 0) - { - str_t empty_str = new_empty_str(); - if (!empty_str) { - return 0; /* out of memory */ - } - if (0 != str_cmp(s, empty_str)) { - tmpstr = str_cat(newstr, sep_str); - } else { - tmpstr = dup_str(newstr); - } - res = str_cat(tmpstr, s); - free_str(empty_str); - } - else if (i == len) - { - NW_ASSERT(NW_FALSE == str_is_empty(s)); - res = str_cat3(s, sep_str, newstr); - } - else - { - str_t sub1 = scr_substr(s, 0, start); - str_t sub2 = scr_substr(s, start, len - start); - tmpstr = str_cat3(sub1, newstr, sep_str); - res = str_cat(tmpstr, sub2); - free_str(sub1); - free_str(sub2); - } - - free_str(tmpstr); - free_str(sep_str); - - return res; -} - - - -str_t str_squeeze(str_t s) -{ - NW_Int32 stringlen, reslen, i; - NW_Bool blanks = NW_FALSE; - NW_Ucs2 *ucs2_str; - str_t res = 0; - - NW_ASSERT(s); - stringlen = str_len(s); - - ucs2_str = NW_Str_New(stringlen); - if (!ucs2_str) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return 0; - } - - for(i = 0, reslen = 0; i < stringlen; i++) - { - NW_Ucs2 wc = scr_charat(s, i); - if (wc > 32) - { - ucs2_str[reslen++] = wc; - blanks = NW_FALSE; - } - else - { - if (!blanks) ucs2_str[reslen++] = ' '; - blanks = NW_TRUE; - } - } - - ucs2_str[reslen] = 0; - - res = ucs22str(ucs2_str); - - NW_Str_Delete(ucs2_str); - - return res; -} - - - -str_t str_trim(str_t s) -{ - NW_Int32 from_end = 0, from_start = 0; - NW_Int32 len; - NW_Ucs2 *ptr; - - NW_ASSERT(s); - - len = str_len(s); - ptr = str_buf_ptr(s); - - for(;from_start < len ;from_start++) - if (ptr[from_start] > 32) break; - - if (from_start == len) return new_empty_str(); - - for(;;from_end++) - if (ptr[len - from_end - 1] > 32) break; - - return scr_substr(s, from_start, len - from_end - from_start); -} - - - -NW_Bool str_is_empty(str_t str) -{ - NW_ASSERT(str); - - return NW_BOOL_CAST(str_len(str) == 0); -} - - - -NW_Bool str_is_alpha(NW_Ucs2 c) -{ - return NW_BOOL_CAST((('a' <= c) && ( c <= 'z')) || (('A' <= c) && (c <= 'Z'))); -} - - - -NW_Bool str_is_digit(NW_Ucs2 c) -{ - return NW_BOOL_CAST(('0' <= c) && (c <= '9')); -} - - -static const char* const reserved_word_table[] = -{ - "access", - "agent", - "break", - "continue", - "div", - "div=", - "domain", - "else", - "equiv", - "extern", - "for", - "function", - "header", - "http", - "if", - "isvalid", - "meta", - "name", - "path", - "public", - "return", - "ScriptVarType", - "use", - "user", - "var", - "while", - "url", - "delete", - "in", - "lib", - "new", - "null", - "this", - "void", - "with", - "case", - "catch", - "class", - "const", - "debugger", - "default", - "do", - "enum", - "export", - "extends", - "finally", - "import", - "private", - "sizeof", - "struct", - "super", - "switch", - "throw", - "try" -}; - - -NW_Bool str_is_reserved(str_t str) -{ - NW_Ucs2 *ptr; - NW_Int32 i, num; - - if (str == NULL) { - return NW_FALSE; - } - - ptr = str_buf_ptr(str); - num = sizeof(reserved_word_table)/sizeof(reserved_word_table[0]); - - for (i = 0; i < num; i++) { - if (NW_Str_StrcmpConst(ptr, reserved_word_table[i]) == 0) { - return NW_TRUE; - } - } - - return NW_FALSE; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_strlib.c --- a/webengine/wmlengine/src/script/src/scr_strlib.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,620 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: scr_strlib.c $ - - Purpose: - - This file implements the ScriptServer functionality for the String standard - library. The String standard library contains a set of string functions. - A String is an array of UNICODE characters. Each of the characters has - an index. The first character in a string has an index of 0. The length - of the string is the number of characters in the array. - - */ - -#include "scr_strlib.h" -#include "scr_api.h" -#include "scr_srv.h" -#include "scr_estack.h" -#include "scr_conv.h" -#include "scr_core.h" -#include "nwx_string.h" -#include "nwx_math.h" - - -static NW_Bool GetValAsIntAndFree (val_t *vptr, NW_Int32 *iptr) -{ - NW_Bool result; - NW_Float32 fval; - - result = val2int(*vptr, iptr); - if (!result) { - result = val2float(*vptr, &fval); - if (result) { - *iptr = NW_Math_truncate(fval); - } - } - - free_val(*vptr); - return result; -} - - - -NW_Byte size_string_lib(void) -{ - return NO_OF_STRING_FUNCS; -} - - - -static NW_Bool string_length(void) -{ - val_t v1; - val_t res; - NW_Bool result; - str_t str = NULL; - - v1 = pop_estack(); - result = val2str_and_free(&v1, &str); - - if (result) { - res = new_int_val(str_len(str)); - } else { - res = new_invalid_val(); - } - - free_str(str); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_isEmpty(void) -{ - val_t v1; - val_t res; - NW_Bool result; - str_t str = NULL; - - v1 = pop_estack(); - result = val2str_and_free(&v1, &str); - - if (result) { - res = new_bool_val(NW_BOOL_CAST(str_len(str) == 0)); - } else { - res = new_invalid_val(); - } - - free_str(str); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_charAt(void) -{ - val_t v1, v2; - val_t res; - NW_Int32 index; - NW_Bool result1, result2; - str_t res_str = NULL; - str_t str = NULL; - - v1 = pop_estack(); - v2 = pop_estack(); - - result1 = GetValAsIntAndFree(&v1, &index); - result2 = val2str_and_free(&v2, &str); - - if (result1 && result2) { - if ( (index < 0) || (index >= str_len(str)) ) { - res_str = new_str(0, NULL); - } else { - res_str = scr_substr(str, index, 1); - } - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_subString(void) -{ - val_t v1, v2, v3; - val_t res; - NW_Bool result1, result2, result3; - NW_Int32 istart, ilen; - str_t str1 = NULL; - str_t res_str = NULL; - - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = GetValAsIntAndFree(&v2, &istart); - result3 = GetValAsIntAndFree(&v3, &ilen); - - if (result1 && result2 && result3) { - res_str = scr_substr(str1, istart, ilen); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_find(void) -{ - val_t v1, v2; - val_t res; - NW_Bool result1, result2; - str_t str1 = NULL; - str_t str2 = NULL; - - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - - /* if len(result2)==0 we must return INVALID as per [WAP194] 9.5 */ - if (result1 && result2 && str_len(str2)!=0 ) { - res = new_int_val(str_find(str1, str2, 0)); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_replace(void) -{ - val_t v1, v2, v3; - val_t res; - NW_Bool result1, result2, result3; - str_t str1 = NULL; - str_t str2 = NULL; - str_t str3 = NULL; - str_t res_str = NULL; - - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - result3 = val2str_and_free(&v3, &str3); - - if (result1 && result2 && result3) - { - res_str = str_replace(str1, str2, str3); - res = new_str_val_and_free(&res_str); - } else { - res= new_invalid_val(); - } - - free_str(str1); - free_str(str2); - free_str(str3); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_elements(void) -{ - val_t v1, v2; - val_t res; - NW_Bool result1, result2; - str_t str1 = NULL; - str_t str2 = NULL; - NW_Ucs2 wc; - - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - - if (result1 && result2 && (str_len(str2) > 0)) - { - wc = scr_charat(str2, 0); - if (str_is_empty(str1)) { - res = new_int_val(1); - } else { - res = new_int_val(str_times(str1, wc) + 1); - } - } else { - res= new_invalid_val(); - } - - free_str(str1); - free_str(str2); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_elementAt(void) -{ - val_t v1, v2, v3; - val_t res; - NW_Int32 index; - str_t str1 = NULL; - str_t str2 = NULL; - str_t res_str = NULL; - NW_Bool result1, result2, result3; - NW_Ucs2 separator; - - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = GetValAsIntAndFree(&v2, &index); - result3 = val2str_and_free(&v3, &str2); - - if (result1 && result2 && result3 && (str_len(str2) > 0)) { - separator = scr_charat(str2, 0); - res_str = str_elementat(str1, index, separator); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_removeAt(void) -{ - val_t v1, v2, v3; - val_t res; - NW_Int32 index; - str_t str1 = NULL; - str_t str2 = NULL; - str_t res_str = NULL; - NW_Bool result1, result2, result3; - NW_Ucs2 separator; - - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = GetValAsIntAndFree(&v2, &index); - result3 = val2str_and_free(&v3, &str2); - - if (result1 && result2 && result3 && (str_len(str2) > 0)) { - separator = scr_charat(str2, 0); - res_str = str_removeat(str1, index, separator); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_replaceAt(void) -{ - val_t v1, v2, v3, v4; - val_t res; - NW_Int32 index; - str_t str1 = NULL; - str_t str2 = NULL; - str_t str3 = NULL; - str_t res_str = NULL; - NW_Bool result1, result2, result3, result4; - NW_Ucs2 separator; - - v4 = pop_estack(); - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - result3 = GetValAsIntAndFree(&v3, &index); - result4 = val2str_and_free(&v4, &str3); - - - if (result1 && result2 && result3 && result4 && (str_len(str3) > 0)) { - separator = scr_charat(str3, 0); - res_str = str_replaceat(str1, str2, index, separator); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - free_str(str3); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_insertAt(void) -{ - val_t v1, v2, v3, v4; - val_t res; - NW_Int32 index; - str_t str1 = NULL; - str_t str2 = NULL; - str_t str3 = NULL; - str_t res_str = NULL; - NW_Bool result1, result2, result3, result4; - NW_Ucs2 separator; - - v4 = pop_estack(); - v3 = pop_estack(); - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - result3 = GetValAsIntAndFree(&v3, &index); - result4 = val2str_and_free(&v4, &str3); - - - if (result1 && result2 && result3 && result4 && (str_len(str3) > 0)) { - separator = scr_charat(str3, 0); - res_str = str_insertat(str1, str2, index, separator); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - free_str(str3); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_squeeze(void) -{ - val_t v1; - val_t res; - str_t str1 = NULL; - str_t res_str = NULL; - NW_Bool result1; - - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - - if (result1) { - res_str = str_squeeze(str1); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_trim(void) -{ - val_t v1; - val_t res; - str_t str1 = NULL; - str_t res_str = NULL; - NW_Bool result1; - - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - - if (result1) { - res_str = str_trim(str1); - res = new_str_val_and_free(&res_str); - } else { - res = new_invalid_val(); - } - - free_str(str1); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_compare(void) -{ - val_t v1, v2; - val_t res; - str_t str1 = NULL; - str_t str2 = NULL; - NW_Bool result1, result2; - NW_Int32 len1, len2; - NW_Int32 i, limit, value; - - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - result2 = val2str_and_free(&v2, &str2); - - if (result1 && result2) { - len1 = str_len(str1); - len2 = str_len(str2); - limit = NW_MIN(len1, len2); - value = len1 - len2; - - for(i = 0; i < limit; i++) - { - NW_Ucs2 c1 = scr_charat(str1, i); - NW_Ucs2 c2 = scr_charat(str2, i); - - if (c1 != c2) { - value = c1 - c2; - break; - } - } - - if (value != 0) { - value = (value > 0) ? 1:-1; - } - res = new_int_val(value); - } else { - res = new_invalid_val(); - } - - free_str(str1); - free_str(str2); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_toString(void) -{ - val_t v1; - val_t res; - str_t str1 = NULL; - NW_Bool result1; - - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - - if (result1) { - res = new_str_val_and_free(&str1); - } else if (ScriptVarType(v1) == VAL_TYPE_INVALID) { - NW_Ucs2 invalid_str[8] = { 'i', 'n', 'v', 'a', 'l', 'i', 'd', 0 }; - str_t s = ucs22str(invalid_str); - res = new_str_val_and_free(&s); - } else { - return NW_FALSE; - } - - free_str(str1); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -static NW_Bool string_format(void) -{ - val_t v1, v2; - val_t res; - str_t str1 = NULL; - str_t res_str = NULL; - NW_Bool result1; - NW_Bool retval = NW_FALSE; - - v2 = pop_estack(); - v1 = pop_estack(); - - result1 = val2str_and_free(&v1, &str1); - - if (result1) { - NW_Ucs2 *f_str = str2ucs2(str1); - if (f_str) { - res_str = scr_format(f_str, v2, &retval); - if (retval) { - res = new_str_val_and_free(&res_str); - } - NW_Str_Delete(f_str); - } - } - free_val(v2); - - if (!retval) { - res = new_invalid_val(); - } - - free_str(str1); - push_estack_and_free(&res); - return NW_TRUE; -} - - - -/* functions in String library */ -static const lib_function_t string_lib_table[NO_OF_STRING_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, string_length, NW_FALSE }, - { 1, string_isEmpty, NW_FALSE }, - { 2, string_charAt, NW_FALSE }, - { 3, string_subString, NW_FALSE }, - { 2, string_find, NW_FALSE }, - { 3, string_replace, NW_FALSE }, - { 2, string_elements, NW_FALSE }, - { 3, string_elementAt, NW_FALSE }, - { 3, string_removeAt, NW_FALSE }, - { 4, string_replaceAt, NW_FALSE }, - { 2, string_insertAt, NW_FALSE }, - { 1, string_squeeze, NW_FALSE }, - { 1, string_trim, NW_FALSE }, - { 2, string_compare, NW_FALSE }, - { 1, string_toString, NW_FALSE }, - { 2, string_format, NW_FALSE } -}; - -void populate_string_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(STRING_LIB_ID); - (*table)[i] = string_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_url.c --- a/webengine/wmlengine/src/script/src/scr_url.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,531 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_url.c $ - - Purpose: - - This file implements the ScriptServer functionality for the URL standard - library. The URL standard library contains a set of functions for - handling both absolute and relative URLs. The general syntax is: - <scheme>://<host>:<port>/path;<params>?<queury>#<fragment> - */ - -#include "scr_url.h" -#include "scr_frstack.h" -#include "scr_estack.h" -#include "scr_core.h" -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_srv.h" - -//#include "nwx_http_header_utils.h" -#include "nwx_url_utils.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -/*#define NO_OF_URL_FUNCS 14 -static lib_function_t url_funcs[NO_OF_URL_FUNCS];*/ - -/*#define BREAK_DO { failed = NW_TRUE; break; }*/ - -static NW_Ucs2* GetValidUrl(void) -{ - NW_Ucs2 *ustr = 0; - - ustr = GetUcs2Val(); - if (ustr != NULL) { - if (NW_Url_IsValid(ustr) == NW_FALSE) { - push_estack(new_invalid_val()); - NW_Str_Delete(ustr); - return NULL; - } - } - - return ustr; -} - -static NW_Bool ReturnStrVal(TBrowserStatusCode status, NW_Ucs2* res_ustr, NW_Bool res_valid) -{ - val_t res = uninitialize_val(); - str_t res_str = 0; - - if (status == KBrsrOutOfMemory) { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - if (res_ustr != NULL) { - NW_Str_Delete(res_ustr); - res_ustr = NULL; - } - } - - if (!res_valid) { - NW_Str_Delete(res_ustr); - push_estack(new_invalid_val()); - return NW_FALSE; - } else if (res_ustr == NULL) { - push_estack(new_empty_str_val()); - return NW_FALSE; - } - - res_str = ucs22str(res_ustr); - NW_Str_Delete(res_ustr); - if (res_str == NULL) { - /*lint -e{774} Significant prototype coercion*/ - if (res_valid) { - push_estack(new_empty_str_val()); - } else { - push_estack(new_invalid_val()); - } - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - res = new_str_val(res_str); - free_str(res_str); - - push_estack(res); - free_val(res); - - return NW_TRUE; -} - - -/***************************************************************** - - Name: IsValidLoadStringContentType(void) - - Description: Checks for valid loadString content type argument. - It must begin with "text/" and contain no whitespace - or comma's. - - Return Value: NW_TRUE if valid, NW_FALSE otherwise. - -******************************************************************/ -static NW_Bool IsValidLoadStringContentType ( char* contentType ) -{ - char* charPtr; - const char *textPrefix = "text/"; - - if ( contentType == NULL ) { - return NW_FALSE; - } - - /* Check that the string begins with "text/". */ - if (NW_Asc_strnicmp(contentType, textPrefix, - NW_Asc_strlen(textPrefix)) != 0) - { - /* Does not begin with "text/". Fail */ - return NW_FALSE; - } - - /* Fail if string contains any whitespace or a comma. */ - charPtr = contentType; - while ( *charPtr ) { - NW_Ucs2 c; - - c = *charPtr; - - if ( NW_Str_Isspace( c ) ) - return NW_FALSE; - - if ( c == WAE_URL_COMMA_CHAR ) - return NW_FALSE; - - charPtr++; - } - - return NW_TRUE; -} - -NW_Byte size_url_lib(void) -{ - return NO_OF_URL_FUNCS; -} - -static NW_Bool url_isValid(void) -{ - val_t res = uninitialize_val(); - NW_Ucs2 *ustr = 0; - - ustr = GetUcs2Val(); - if (ustr == NULL) { - return NW_FALSE; - } - - res = new_bool_val(NW_Url_IsValid(ustr)); - NW_Str_Delete(ustr); - - push_estack(res); - free_val(res); - - return NW_TRUE; -} - -static NW_Bool url_getScheme(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetSchemeStr(ustr, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getHost(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetHost(ustr, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getPort(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - NW_Bool valid_port; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetPort(ustr, &valid_port, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, valid_port); -} - - -static NW_Bool url_getPath(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetPathNoParam(ustr, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - - -static NW_Bool url_getParameters(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetParameters(ustr, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getQuery(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetQuery(ustr, &res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getFragment(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status; - - ustr = GetValidUrl(); - if (ustr == NULL) { - return NW_FALSE; - } - - status = NW_Url_GetFragId(ustr, &res_ustr, NW_FALSE); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getBase(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - TBrowserStatusCode status = KBrsrSuccess; - - ustr = get_curr_url(); - /* should always have a current url, but just in case somebody stomps */ - /* on the url pointer in the frame... */ - if (ustr == NULL) { - NW_ASSERT(ustr != NULL); - res_ustr = NULL; - } else { - status = NW_Url_GetBase(ustr, &res_ustr); - } - - return ReturnStrVal(status, res_ustr, NW_TRUE); -} - -static NW_Bool url_getReferer(void) -{ - TBrowserStatusCode status; - str_t res_str = 0; - NW_Ucs2 *relURI = NULL; - NW_Ucs2 *referer = get_curr_referer(); - val_t res = uninitialize_val(); - - if (referer) - { - status = NW_Url_AbsToRel(get_curr_url(), referer, &relURI); - if (status == KBrsrOutOfMemory) - { - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NW_FALSE; - } - - res_str = ucs22str(relURI); - res = new_str_val(res_str); - free_str(res_str); - } - else res = new_empty_str_val(); - - push_estack(res); - - free_val(res); - if (relURI) { - NW_Mem_Free(relURI); - } - - return NW_TRUE; -} - -static NW_Bool url_resolve(void) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(); - NW_Ucs2 *base_url = 0, *emb_url = 0, *res_url = 0; - TBrowserStatusCode status; - NW_Bool isvalid; - - v2 = pop_estack(); - v1 = pop_estack(); - - if ((ScriptVarType(v1) == VAL_TYPE_INVALID) || (ScriptVarType(v2) == VAL_TYPE_INVALID) ) - { - push_estack(new_invalid_val()); - free_val(v1); - free_val(v2); - return NW_FALSE; - } - - base_url = val2ucs2_trim(v1); - emb_url = val2ucs2_trim(v2); - free_val(v1); - free_val(v2); - - if (!base_url || ! emb_url) - { - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_url); - NW_Str_Delete(emb_url); - return NW_TRUE; - } - - status = NW_Url_RelToAbs(base_url, emb_url, &res_url); - NW_Str_Delete(base_url); - NW_Str_Delete(emb_url); - - isvalid = NW_BOOL_CAST(res_url != NULL); - - return ReturnStrVal(status, res_url, isvalid); -} - -static NW_Bool url_escapeString(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - NW_Int32 len; - NW_Bool isvalid; - TBrowserStatusCode status = KBrsrSuccess; - - ustr = GetUcs2Val(); - if (ustr == NULL) { - return NW_FALSE; - } - - len = NW_Url_EscapeStringLen(ustr); - res_ustr = NW_Str_New(len); - if (res_ustr == NULL){ - status = KBrsrOutOfMemory; - } - - isvalid = NW_Url_EscapeString(ustr, res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, isvalid); -} - -static NW_Bool url_unescapeString(void) -{ - NW_Ucs2 *ustr = 0, *res_ustr = 0; - NW_Int32 len; - NW_Bool isvalid; - TBrowserStatusCode status = KBrsrSuccess; - - ustr = GetUcs2Val(); - if (ustr == NULL) { - return NW_FALSE; - } - - len = NW_Url_UnEscapeStringLen(ustr); - res_ustr = NW_Str_New(len); - if (res_ustr == NULL){ - status = KBrsrOutOfMemory; - } - - isvalid = NW_Url_UnEscapeString(ustr, res_ustr); - NW_Str_Delete(ustr); - - return ReturnStrVal(status, res_ustr, isvalid); -} - -static NW_Bool url_loadString(void) -{ - val_t v1 = uninitialize_val(), v2 = uninitialize_val(); - NW_Ucs2 *url = NULL; - char *mimetype = 0; - str_t mimetype_str = 0; - NW_Bool status = NW_FALSE; - - /*lint --e{764} No cases, only default*/ - switch (status) - { - default: - v2 = pop_estack(); - v1 = pop_estack(); - - if ((ScriptVarType(v1) == VAL_TYPE_INVALID) || (ScriptVarType(v2) == VAL_TYPE_INVALID)) - { - status = NW_FALSE; - break; - } - - url = val2ucs2_trim(v1); - - if (!url) - { - status = NW_FALSE; - break; - } - - if (!val2str(v2, &mimetype_str)) - { - status = NW_FALSE; - break; - } - - mimetype = str2ascii(mimetype_str); - - if ( ! IsValidLoadStringContentType( mimetype ) ) - { - status = NW_FALSE; - break; - } - - if (!NW_Url_IsValid(url)) - { - status = NW_FALSE; - break; - } - - /* Leave url until get response, jwild */ - status = ScriptAPI_loadString(url, mimetype); - } - - NW_Mem_Free(url); - NW_Mem_Free(mimetype); - free_str(mimetype_str); - free_val(v1); - free_val(v2); - - if (!status) - { - push_estack(new_invalid_val()); - return NW_FALSE; - } - else - return NW_TRUE; -} - - -/* functions in Url library */ -static const lib_function_t url_lib_table[NO_OF_URL_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, url_isValid, NW_FALSE }, - { 1, url_getScheme, NW_FALSE }, - { 1, url_getHost, NW_FALSE }, - { 1, url_getPort, NW_FALSE }, - { 1, url_getPath, NW_FALSE }, - { 1, url_getParameters, NW_FALSE }, - { 1, url_getQuery, NW_FALSE }, - { 1, url_getFragment, NW_FALSE }, - { 0, url_getBase, NW_FALSE }, - { 0, url_getReferer, NW_FALSE }, - { 2, url_resolve, NW_FALSE }, - { 1, url_escapeString, NW_FALSE }, - { 1, url_unescapeString, NW_FALSE }, - { 2, url_loadString, NW_TRUE } -}; - -void populate_url_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(URL_LIB_ID); - (*table)[i] = url_lib_table; - - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_val.c --- a/webengine/wmlengine/src/script/src/scr_val.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,692 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_val.c $ - - Purpose: - - This file implements values - */ - - -#include "scr_val.h" -#include "scr_conv.h" -#include "scr_core.h" -#include "scr_estack.h" /* 1/17/01 */ - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_ctx.h" -#include "nwx_math.h" -#include "nwx_float.h" - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - This function pops off the stack a val_t and converts it to ucs2 - and returns the status. - - Depending upon the value of variable "trimFlag", leading and - trailing whitespace may be trimmed. - - ***NOTE*** that this function FREE's parameter "v" and if an - ERROR is detected, frees "ustr" as well. -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -static NW_Bool retrieveUcs2Val(NW_Ucs2 **ustr, NW_Bool trimFlag ) -{ - val_t v = uninitialize_val(); - - v = pop_estack(); - - if (ScriptVarType(v) == VAL_TYPE_INVALID) { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; - } - - if (trimFlag) - { - *ustr = val2ucs2_trim(v); - } - else - { - *ustr = val2ucs2(v); - } - free_val(v); - - if (ustr == NULL) { - push_estack(new_invalid_val()); - } - - return NW_TRUE; -} - - - -/* -**------------------------------------------------------------------------- -** External Prototypes -**------------------------------------------------------------------------- -*/ -extern NW_Int32 get_int(val_t); -extern NW_Bool get_bool(val_t); -extern NW_Float32 get_float(val_t); - - - -NW_Ucs2* GetUcs2Val(void) -{ - NW_Ucs2 *ustr = 0; - if(retrieveUcs2Val(&ustr, NW_TRUE )) { - return ustr; - } - else { - return NULL; - } -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : GetUcs2Val_notrim - Input : void - Output : bool - Purpose : This version of the above does NOT strip leading and trailing - whitespace. - - This function pops off the stack a val_t and converts it to ucs2 - and returns the status. - - ***NOTE*** that this function FREE's parameter "v" and if an - ERROR is detected, frees "ustr" as well. -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Ucs2* GetUcs2Val_notrim(void) -{ - NW_Ucs2 *ustr = 0; - if(retrieveUcs2Val(&ustr, NW_FALSE )) { - return ustr; - } - else { - return NULL; - } -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : GetIntVal - Input : void - Output : bool - Purpose : This function pops off the stack a val_t and converts it to NW_Int32 - and returns the status -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Bool GetIntVal(NW_Int32 *value) -{ - NW_Bool status = NW_FALSE; - val_t v = uninitialize_val(); - - v = pop_estack(); - - if (ScriptVarType(v) == VAL_TYPE_INVALID) - { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; /* Error */ - } - - status = val2int(v, value); - if(status == NW_FALSE) - { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; /* Error */ - } - free_val(v); - - return NW_TRUE; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : GetBoolVal - Input : void - Output : bool - Purpose : This function pops off the stack a val_t and converts it to NW_Bool - and returns the status -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Bool GetBoolVal(NW_Bool *value) -{ - val_t v = uninitialize_val(); - - v = pop_estack(); - - if (ScriptVarType(v) == VAL_TYPE_INVALID) - { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; /* Error */ - } - - *value = get_bool(v); - free_val(v); - - return NW_TRUE; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : GetFloatVal - Input : void - Output : Float - Purpose : This function pops off the stack a val_t and converts it to NW_Bool - and returns the status -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Bool GetFloatVal(NW_Float32 *value) -{ - val_t v = uninitialize_val(); - - v = pop_estack(); - - if (ScriptVarType(v) == VAL_TYPE_INVALID) - { - push_estack(new_invalid_val()); - free_val(v); - return NW_FALSE; /* Error */ - } - - *value = get_float(v); - free_val(v); - - return NW_TRUE; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * - Name : GetOpaqueVal - Input : void - Output : bool - Purpose : This function pops off the stack a val_t and converts it to NW_ - and returns the status -* * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -NW_Opaque_t* GetOpaqueVal(void) -{ - NW_Opaque_t *opaque; - NW_Int32 i; - NW_Bool b; - NW_Float32 f; - - val_t v = uninitialize_val(); - v = pop_estack(); - - /* allocate OpaqueVal */ - opaque = (NW_Opaque_t *) NW_Mem_Malloc( sizeof( NW_Opaque_t ) ); - if ( opaque == NULL ) { - return NULL; - } - - switch (ScriptVarType(v)) { - case VAL_TYPE_STR: - opaque->value.s = GetUcs2Val(); - opaque->type = NW_OPAQUE_VALUE_TYPE_STRING; - break; - case VAL_TYPE_INT: - if (!GetIntVal(&i)) { - NW_Mem_Free( opaque ); - return NULL; /* Error */ - } - opaque->value.i = i; - opaque->type = NW_OPAQUE_VALUE_TYPE_INT32; - break; - case VAL_TYPE_BOOL: - if (!GetBoolVal(&b)) { - NW_Mem_Free( opaque ); - return NULL; /* Error */ - } - opaque->value.b = b; - opaque->type = NW_OPAQUE_VALUE_TYPE_BOOL; - break; - case VAL_TYPE_FLOAT: - if (!GetFloatVal(&f)) { - NW_Mem_Free( opaque ); - return NULL; /* Error */ - } - opaque->value.f = f; - opaque->type = NW_OPAQUE_VALUE_TYPE_FLOAT; - break; - case VAL_TYPE_INVALID: - NW_Mem_Free( opaque ); - free_val(v); - return NULL; /* Error */ - case VAL_TYPE_UNINITIALIZED: - /* case added to supress gcc warning, leaving same behavior.*/ - break; - } - - free_val(v); - - return opaque; -} - -val_t new_int_val(NW_Int32 i) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_INT; - val_ret.value.i = i; - return val_ret; -} - -val_t new_float_val(NW_Float32 f) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_FLOAT; - - /* If we got "underflow" return 0 per WMLScript 6.2.7.2 */ - if ((f < SCR_MIN_FLOAT) && (f > -SCR_MIN_FLOAT)) - { - f = 0.0; - } - val_ret.value.f = f; - return val_ret; -} - - -val_t new_str_val(str_t s) -{ - val_t val_ret; - - if (!s) /*if the pointer to the string is zero, return invalid type???*/ - { - val_ret.type = VAL_TYPE_INVALID; - val_ret.value.i = 0; - return val_ret; - } - - if (str_is_empty(s)) - { - return new_empty_str_val(); - } - else - { - val_ret.value.s = dup_str(s); - val_ret.type = VAL_TYPE_STR; - return val_ret; - } -} - - - -/* Transfer ownership of string to a new val_t */ -val_t new_str_val_and_free(str_t *sptr) -{ - val_t val_ret; - - if (!*sptr) /*if the pointer to the string is zero, return invalid type???*/ - { - val_ret.type = VAL_TYPE_INVALID; - val_ret.value.i = 0; - return val_ret; - } - - val_ret.value.s = *sptr; - val_ret.type = VAL_TYPE_STR; - *sptr = NULL; - return val_ret; -} - - -val_t new_empty_str_val(void) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_STR; /*For empty string, the value field is set to 0*/ - val_ret.value.i = 0; - return val_ret; -} - -val_t new_bool_val(NW_Bool b) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_BOOL; - val_ret.value.b = b; - return val_ret; -} - -val_t new_invalid_val(void) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_INVALID; - val_ret.value.i = 0; - return val_ret; -} - -NW_Int32 get_int(val_t v) -{ - - if(v.type == VAL_TYPE_INT) - { - return v.value.i; - } - - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return 0; /* TODO - should have better error return */ - -} - -NW_Float32 get_float(val_t v) -{ - if(v.type == VAL_TYPE_FLOAT) - return v.value.f; - - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return 0; /* TODO - should have better error return */ - -} - -NW_Bool get_bool(val_t v) -{ - - if(v.type == VAL_TYPE_BOOL) - return v.value.b; - - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return NW_FALSE; /* TODO - should have better error return */ -} - -str_t get_str(val_t v) -{ - if(v.type == VAL_TYPE_STR) - { - if(v.value.i == 0) /*if empty string*/ - { - return new_str(0, 0); - } - return dup_str(v.value.s); - } - - set_error_code(SCR_ERROR_VERIFICATION_FAILED); - return (str_t)0; /* TODO - should have better error return */ -} - -SCR_VAL_TYPE ScriptVarType(val_t v) -{ - return v.type; -} - -/* make sure it copies the string */ -val_t dup_val(val_t v) -{ - - if (v.type == VAL_TYPE_INT) - return new_int_val(get_int(v)); - if (v.type == VAL_TYPE_FLOAT) - return new_float_val(get_float(v)); - if (v.type == VAL_TYPE_BOOL) - return new_bool_val(get_bool(v)); - if (v.type == VAL_TYPE_STR) - { - str_t s = get_str(v); - val_t res = new_str_val(s); - free_str(s); - return res; - } - -return new_invalid_val(); -} - -NW_Bool val2bool(val_t v, NW_Bool *res) -{ - - if (v.type == VAL_TYPE_STR) { - str_t s = get_str(v); - *res = NW_BOOL_CAST(!str_is_empty(s)); - free_str(s); - return NW_TRUE; - } - - if (v.type == VAL_TYPE_INT) { - *res = NW_BOOL_CAST(get_int(v) != 0); - return NW_TRUE; - } - - if (v.type == VAL_TYPE_FLOAT) { - *res = NW_BOOL_CAST(get_float(v) != 0.0); - return NW_TRUE; - } - - if (v.type == VAL_TYPE_BOOL) { - *res = get_bool(v); - return NW_TRUE; - } - - return NW_FALSE; -} - - -NW_Bool val2float(val_t v, NW_Float32 *f) -{ - if (IS_STR(v)) - { - NW_Bool consumeAll; - str_t s = get_str(v); - NW_Bool retval = str2float(s, f, &consumeAll); - free_str(s); - return NW_BOOL_CAST(retval && consumeAll); - } - - else if (IS_FLOAT(v)) { - *f = get_float(v); - return NW_TRUE; - } - - else if (IS_INT(v)) { - *f = (NW_Float32)get_int(v); - return NW_TRUE; - } - - else if (IS_BOOL(v)) { - /* explicitly map NW_TRUE -> 1 and NW_FALSE -> 0 */ - *f = (get_bool(v) ? (NW_Float32)1 : (NW_Float32)0); - return NW_TRUE; - } - - return NW_FALSE; -} - - -NW_Ucs2 *val2ucs2(val_t v) -{ - NW_Ucs2 *res = 0; - str_t s = 0; - - if (!val2str(v, &s)) return 0; - - res = str2ucs2(s); /* creates copy */ - if (!res) return 0; - free_str(s); - return res; -} - - -/* similar to val2ucs2 - remove white spaces in the beginning and in the end */ -NW_Ucs2 *val2ucs2_trim(val_t v) -{ - NW_Ucs2 *res = 0; - str_t s = 0; - NW_Uint32 start, end; - - if (!val2str(v, &s)) return 0; - - res = str2ucs2(s); /* creates copy */ - if (!res) return 0; - free_str(s); - - start = 0; - end = NW_Str_Strlen(res); - - while (NW_Str_Isspace(res[start])) start++; - while ((end != 0) && NW_Str_Isspace(res[end - 1])) end--; - - - if (start > end) /* only white spaces */ - { - NW_Ucs2 *trimmed_res = (NW_Ucs2*)NW_Mem_Malloc(sizeof(NW_Ucs2)); - if (trimmed_res == NULL) - { - NW_Mem_Free(res); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NULL; - } - - trimmed_res[0] = '\0'; - NW_Mem_Free(res); - return trimmed_res; - } - else if ((start > 0) || end < NW_Str_Strlen(res)) /* some white spaces */ - { - NW_Ucs2 *trimmed_res = NW_Str_Substr(&res[start], 0, (end - start)); - if (trimmed_res == NULL) - { - NW_Mem_Free(res); - set_error_code(SCR_ERROR_OUT_OF_MEMORY); - return NULL; - } - - NW_Mem_Free(res); - return trimmed_res; - } - - else return res; /* no white spaces */ -} - - -/* Convert a val_t to a string */ -NW_Bool val2str(val_t v, str_t *str) -{ - if (IS_STR(v)) { - *str = get_str(v); - return NW_TRUE; - } - - else if (IS_INT(v)) - { - *str = int2str(get_int(v)); - return NW_BOOL_CAST(*str != 0); - } - - else if (IS_FLOAT(v)) { - *str = float2str(get_float(v)); - return NW_BOOL_CAST(*str != 0); - } - - else if (IS_BOOL(v)) { - *str = bool2str(get_bool(v)); - return NW_TRUE; - } - - else return NW_FALSE; -} - - -/* Convert val_t to string and free the val_t */ -NW_Bool val2str_and_free(val_t *vptr, str_t *str) -{ - if (IS_STR(*vptr)) { - if(vptr->value.s == NULL) { - /* if empty string */ - *str = new_str(0, 0); - } else { - /* transfer ownership of the string */ - *str = vptr->value.s; - } - vptr->value.s = NULL; - vptr->type = VAL_TYPE_UNINITIALIZED; - return NW_TRUE; - } - - else if (IS_INT(*vptr)) - { - *str = int2str(get_int(*vptr)); - return NW_BOOL_CAST(*str != 0); - } - - else if (IS_FLOAT(*vptr)) { - *str = float2str(get_float(*vptr)); - return NW_BOOL_CAST(*str != 0); - } - - else if (IS_BOOL(*vptr)) { - *str = bool2str(get_bool(*vptr)); - return NW_TRUE; - } - - else return NW_FALSE; -} - - -/* Convert a val_t to an integer */ -NW_Bool val2int(val_t v, NW_Int32 *res) -{ - - if (IS_STR(v)) - { - NW_Bool consumeAll; - str_t s = get_str(v); - NW_Bool retval = str2int(s, res, &consumeAll); - free_str(s); - return NW_BOOL_CAST(retval && consumeAll); - } - - else if (IS_BOOL(v)) { - /* explicitly map NW_TRUE -> 1 and NW_FALSE -> 0 */ - *res = (get_bool(v) ? 1 : 0); - return NW_TRUE; - } - - else if (IS_INT(v)) { - *res = get_int(v); - return NW_TRUE; - } - - else return NW_FALSE; -} - - -/* Free a val_t's storage */ -void free_val(val_t v) -{ - - if (v.type == VAL_TYPE_STR) - { - free_str(v.value.s); - } - return; -} - - -/*Use to declare a value val_t*/ -val_t uninitialize_val(void) -{ - val_t val_ret; - val_ret.type = VAL_TYPE_UNINITIALIZED; - val_ret.value.i = 0; - return val_ret; -} - -/*eliminate this function later*/ -NW_Bool set_pointer_msb(void) -{ - return NW_TRUE; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_valexpr.c --- a/webengine/wmlengine/src/script/src/scr_valexpr.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,515 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: scr_valexpr.c $ - - Purpose: - - This file implements the evaluation of expression - */ - -#include "scr_valexpr.h" -#include "scr_opcodes.h" -#include "nwx_defs.h" -#include "nwx_float.h" -#include "nwx_math.h" - -/*Known also as bang*/ -val_t l_not_val(val_t v) -{ - NW_Bool b; - - if (val2bool(v, &b)) { - return new_bool_val(NW_BOOL_CAST(!b)); - } - return new_invalid_val(); -} - -/*known as tilde ~*/ -val_t b_not_val(val_t v) -{ - NW_Int32 i; - - if (val2int(v, &i)) { - return new_int_val(~i); - } else { - return new_invalid_val(); - } -} - -val_t uminus_val(val_t v) -{ - NW_Int32 i; - NW_Float32 f; - - if (val2int(v, &i)) { - return new_int_val(-i); - } else if (val2float(v, &f)) { - return new_float_val(- f); - } else { - return new_invalid_val(); - } -} - -val_t incr_val(val_t v) -{ - NW_Int32 i; - NW_Float32 f; - - if (val2int(v, &i)) { - if (i < (NW_Int32)SCR_MAX_INT) { - return new_int_val(++i); - } else { - return new_invalid_val(); - } - } else if (val2float(v, &f)) { - if (is_finite_float64((NW_Float64)f+1)) { - return new_float_val(f+1); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); - } -} - -val_t decr_val(val_t v) -{ - NW_Int32 i; - NW_Float32 f; - - if (val2int(v, &i)) { - if (i > (NW_Int32)SCR_MIN_INT) { - return new_int_val(--i); - } else { - return new_invalid_val(); - } - } else if (val2float(v, &f)) { - if (is_finite_float64((NW_Float64)f-1)) { - return new_float_val(f - 1); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); - } -} - -NW_Bool comp_string_vals(str_t s1, str_t s2, NW_Byte op) -{ - NW_Int32 i; - - NW_Bool eqOp = NW_BOOL_CAST((op == GE) || (op == EQ) || (op == LE)); - - if ((s1 == 0) && (s2 == 0)) { - return eqOp; - } else if ((s1 == 0) || (s2 == 0)) { - return NW_BOOL_CAST(!eqOp); - } - - i = str_cmp(s1, s2); - - if (i < 0) { - if ( (op == LE) || (op == NE) || (op == LT)) { - return NW_TRUE; - } else { - return NW_FALSE; - } - } else if (i > 0) { - if ( (op == GE) || (op == NE) || (op == GT)) { - return NW_TRUE; - } else { - return NW_FALSE; - } - } else { - NW_ASSERT ( i == 0 ); - if ( (op == GE) || (op == EQ) || (op == LE)) { - return NW_TRUE; - } else { - return NW_FALSE; - } - } -} - -/* assume v1 and v2 can be coverted to ints */ -NW_Bool comp_int_vals(NW_Int32 i1, NW_Int32 i2, NW_Byte op) -{ - - if (op == EQ) return NW_BOOL_CAST(i1 == i2); - else if (op == NE) return NW_BOOL_CAST(i1 != i2); - else if (op == LT) return NW_BOOL_CAST(i1 < i2); - else if (op == LE) return NW_BOOL_CAST(i1 <= i2); - else if (op == GT) return NW_BOOL_CAST(i1 > i2); - else if (op == GE) return NW_BOOL_CAST(i1 >= i2); - - NW_ASSERT(NW_FALSE); /* should never be here*/ - return NW_FALSE; - -} - -NW_Bool comp_float_vals(NW_Float32 f1, NW_Float32 f2, NW_Byte op) -{ - NW_Float32 diff; - NW_Float32 absDiff; - NW_Bool floatEq; - - diff = (f1 - f2)*NW_Math_powint(10.0f, NW_FLOAT32_DIG); - absDiff = NW_Math_fabs(diff); - floatEq = (NW_Bool)((absDiff <= NW_Math_fabs(f1)) && (absDiff <= NW_Math_fabs(f2))); - - if (op == EQ) return NW_BOOL_CAST(floatEq); - else if (op == NE) return NW_BOOL_CAST(!floatEq); - else if (op == LT) return NW_BOOL_CAST(f1 < f2); - else if (op == LE) return NW_BOOL_CAST(floatEq || (f1 < f2)); - else if (op == GT) return NW_BOOL_CAST(f1 > f2); - else if (op == GE) return NW_BOOL_CAST(floatEq || (f1 > f2)); - - NW_ASSERT(NW_FALSE); /* should never be here*/ - return NW_FALSE; - -} - - -val_t comp_vals(val_t v1, val_t v2, NW_Byte op) -{ - NW_Int32 i1, i2; - NW_Bool retval1, retval2; - val_t res = uninitialize_val(); - - if ( (ScriptVarType(v1) == VAL_TYPE_STR) || (ScriptVarType(v2) == VAL_TYPE_STR) ) { - str_t s1 = 0; - str_t s2 = 0; - retval1 = val2str(v1, &s1); - retval2 = val2str(v2, &s2); - if (retval1 && retval2) { - res = new_bool_val(comp_string_vals(s1, s2, op)); - } else { - res = new_invalid_val(); - } - free_str(s1); - free_str(s2); - return res; - } - - - if ( (ScriptVarType(v1) == VAL_TYPE_FLOAT) || (ScriptVarType(v2) == VAL_TYPE_FLOAT) ) { - NW_Float32 f1, f2; - retval1 = val2float(v1, &f1); - retval2 = val2float(v2, &f2); - if (retval1 && retval2) { - return new_bool_val(comp_float_vals(f1, f2, op)); - } else { - return new_invalid_val(); - } - } - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - return new_bool_val(comp_int_vals(i1, i2, op)); - } - - return new_invalid_val(); -} - -val_t rem_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if(val2int(v1, &i1) && val2int(v2, &i2)) - { - if (i2 == 0) { - return new_invalid_val(); - } else if (i1 >= 0) { - return new_int_val(NW_Math_abs(i1 % i2)); - } else { - NW_ASSERT ( i1 < 0 ); - return new_int_val(- NW_Math_abs(i1 % i2)); - } - } else { - return new_invalid_val(); - } -} - -val_t sub_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - NW_Float32 f1, f2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - if (i1 > 0) { - if (i2 > 0) { - /* i1 & i2 are positive, valid values, so diff will be valid */ - return new_int_val(i1 - i2); - } else { - if ( ((NW_Int32)SCR_MAX_INT - i1) >= (-i2) ) { - /* i1 is pos, i2 neg, but i1 + abs(i2) < SCR_MAX_INT */ - return new_int_val(i1 - i2); - } else { - return new_invalid_val(); - } - } - } else { - if (i2 < 0) { - /* i1 & i2 are neg, valid vals, so diff will be valid */ - return new_int_val(i1 - i2); - } else { - if ( ((NW_Int32)SCR_MIN_INT + i2) <= i1) { - /* i1 is neg, i2 pos, but i1 - i2 >= SCR_MIN_INT */ - return new_int_val(i1 - i2); - } else { - return new_invalid_val(); - } - } - } - } else if (val2float(v1, &f1) && val2float(v2, &f2)) { - if (is_finite_float64((NW_Float64)f1 - (NW_Float64)f2)) { - return new_float_val(f1 - f2); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); - } -} - -val_t add_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - NW_Bool retval1, retval2; - val_t res = uninitialize_val(); - - if ( (ScriptVarType(v1) == VAL_TYPE_STR) || (ScriptVarType(v2) == VAL_TYPE_STR) ) - { - str_t s1 = 0; - str_t s2 = 0; - retval1 = val2str(v1, &s1); - retval2 = val2str(v2, &s2); - if (retval1 && retval2) - { - str_t res_str = str_cat(s1, s2); - res = new_str_val(res_str); - free_str(res_str); - } - else res = new_invalid_val(); - free_str(s1); - free_str(s2); - return res; - } - - if ( (ScriptVarType(v1) == VAL_TYPE_FLOAT) || (ScriptVarType(v2) == VAL_TYPE_FLOAT) ) - { - NW_Float32 f1, f2; - retval1 = val2float(v1, &f1); - retval2 = val2float(v2, &f2); - if (retval1 && retval2 && is_finite_float64((NW_Float64)f1 + (NW_Float64)f2)) { - return new_float_val(f1 + f2); - } else { - return new_invalid_val(); - } - } - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - if (i1 > 0) { - if (i2 > 0) { - if ( ((NW_Int32)SCR_MAX_INT - i1) >= i2) { - return new_int_val(i1 + i2); - } else { - return new_invalid_val(); - } - } else { - return new_int_val(i1 + i2); - } - } else { - if (i2 > 0) { - return new_int_val(i1 + i2); - } else { - if ( ((NW_Int32)SCR_MIN_INT - i1) <= i2) { - return new_int_val(i1 + i2); - } else { - return new_int_val(i1 + i2); - } - } - } - } else { - return new_invalid_val(); - } -} - -val_t lshift_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if ( val2int(v1, &i1) && val2int(v2, &i2) ) { - /* Mask 2nd operand so value is 0 to 31. */ - return new_int_val(i1 << ( i2 & 0x1F )); - } else { - return new_invalid_val(); - } -} - -val_t rsshift_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - /* Mask 2nd operand so value is 0 to 31. */ - /*lint -e{704} Shift right of signed quantity*/ - return new_int_val( i1 >> (i2 & 0x1F) ); - } else { - return new_invalid_val(); - } -} - -val_t rszshift_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - NW_Uint32 ui1; - - if ( val2int(v1, &i1) && val2int(v2, &i2) ) { - /* Shift unsigned value so C will fill with 0's. - Mask 2nd operand so value is 0 to 31. */ - ui1 = (NW_Uint32) i1; - return new_int_val( (NW_Int32 ) (ui1 >> (i2 & 0x1F)) ); - } else { - return new_invalid_val(); - } -} - -val_t mul_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - NW_Float32 f1, f2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - if (i1 > 0) { - if (i2 > 0) { - if ( ((NW_Int32)SCR_MAX_INT / i2) >= i1) { - return new_int_val(i1 * i2); - } else { - return new_invalid_val(); - } - } else { - if ( (i2 == 0) || (i2 == -1) || (((NW_Int32)SCR_MIN_INT / i2) >= i1) ) { - return new_int_val(i1 * i2); - } else { - return new_invalid_val(); - } - } - } else { - if (i2 > 0) { - if ( (i1 == 0) || (i1 == -1) || (((NW_Int32)SCR_MIN_INT / i1) >= i2) ) { - return new_int_val(i1 * i2); - } else { - return new_invalid_val(); - } - } else { - if ( (i2 == 0) || (((NW_Int32)SCR_MAX_INT / i2) <= i1) ) { - return new_int_val(i1 * i2); - } else { - return new_invalid_val(); - } - } - } - } else if (val2float(v1, &f1) && val2float(v2, &f2)) { - NW_Float64 res64 = (NW_Float64)f1 * (NW_Float64)f2; - if (is_zero_float64(res64)) { - /*lint -e{747} Significant prototype coercion*/ - return new_float_val(0.0); - } else if (is_finite_float64(res64)) { - return new_float_val(f1 * f2); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); - } -} - -val_t bit_and_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - return new_int_val(i1 & i2); - } else { - return new_invalid_val(); - } -} - -val_t bit_or_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - return new_int_val(i1 | i2); - } else { - return new_invalid_val(); - } -} - -val_t bit_xor_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - return new_int_val(i1 ^ i2); - } else { - return new_invalid_val(); - } -} - -val_t idiv_vals(val_t v1, val_t v2) -{ - NW_Int32 i1, i2; - - if (val2int(v1, &i1) && val2int(v2, &i2)) { - if (i2 != 0) { - return new_int_val(i1 / i2); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); - } -} - - -val_t div_vals(val_t v1, val_t v2) -{ - NW_Float32 f1, f2; - - if (val2float(v1, &f1) && val2float(v2, &f2)) { - if (f2 != 0.0) { - NW_Float64 resd = (NW_Float64)f1 / (NW_Float64)f2; - if (is_zero_float64(resd)) { - /*lint -e{747} Significant prototype coercion*/ - return new_float_val(0.0); - } else if (is_finite_float64(resd)) { - return new_float_val(f1/f2); - } else { - return new_invalid_val(); - } - } else { - return new_invalid_val(); /* validation divission by 0 */ - } - } else { - return new_invalid_val(); - } -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/script/src/scr_wta.c --- a/webengine/wmlengine/src/script/src/scr_wta.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "scr_conv.h" -#include "scr_api.h" -#include "scr_srv.h" -#include "nwx_mem.h" -#include "nwx_string.h" - -#include "nwx_format.h" - -#define NO_OF_WP_FUNCS 3 /* (p)ublic */ - -/* -TODO: WMS commented for now, fix when WTA is ready -static lib_function_t wta_p_funcs[NO_OF_WP_FUNCS]; -*/ - -/* helper functions */ - -/* public functions */ -static NW_Bool wp_makeCall(void) -{ - NW_Bool result; - NW_Ucs2 *number = NULL; - - /* convert script variable to "C" variable */ - number = GetUcs2Val(); - if (number == NULL) { - push_estack(new_invalid_val()); - return NW_FALSE; - } - - /* compliance with WAP-188, "phone_number"?*/ - if (!NW_Format_IsValidPhoneNumber(number)) { - push_estack(new_invalid_val()); - NW_Str_Delete(number); - return NW_FALSE; - } - - /* call API routine */ - result = ScriptAPI_wp_makeCall(number); - - if (! result) { - push_estack(new_invalid_val()); - NW_Str_Delete(number); - return NW_FALSE; - } - return NW_TRUE; -} - -static NW_Bool wp_sendDTMF(void) -{ - NW_Ucs2 *dtmf = NULL; - NW_Bool result; - - /* convert script variable to "C" variable */ - dtmf = GetUcs2Val(); - if (dtmf == NULL) { - push_estack(new_invalid_val()); - return NW_FALSE; - } - - /* compliance with WAP-188, "tone_sequence"?*/ - if (!NW_Format_IsValidToneSequence( dtmf )) { - push_estack(new_invalid_val()); - NW_Str_Delete(dtmf); - return NW_FALSE; - } - - /* call API routine */ - result = ScriptAPI_wp_sendDTMF(dtmf); - - if (! result) { - push_estack(new_invalid_val()); - NW_Str_Delete(dtmf); - return NW_FALSE; - } - - return NW_TRUE; -} - -static NW_Bool wp_addPBEntry(void) -{ - NW_Ucs2 *number = NULL; - NW_Ucs2 *name = NULL; - NW_Bool result; - - /* convert script variables to "C" variables */ - name = GetUcs2Val(); - if (name == NULL) { - pop_estack_and_free(); - push_estack(new_invalid_val()); - return NW_FALSE; - } - - number = GetUcs2Val(); - if (number == NULL) { - NW_Str_Delete(name); - push_estack(new_invalid_val()); - return NW_FALSE; - } - - /* compliance with WAP-188, "phone_number"?*/ - if (!NW_Format_IsValidPhoneNumber(number)) { - push_estack(new_invalid_val()); - NW_Str_Delete(number); - NW_Str_Delete(name); - return NW_FALSE; - } - - - /* call API routine */ - result = ScriptAPI_wp_addPBEntry(number, name); - - if (! result) { - push_estack(new_invalid_val()); - NW_Str_Delete(number); - NW_Str_Delete(name); - return NW_FALSE; - } - - return NW_TRUE; -} - -/* Nokia proprietary library */ -static NW_Bool nokia_locationInfo(void) -{ - NW_Bool result; - NW_Ucs2 *url = NULL; - NW_Ucs2 *llformat = NULL; - NW_Ucs2 *pnformat = NULL; - - pnformat = GetUcs2Val(); - if (pnformat == NULL) { - pop_estack_and_free(); - pop_estack_and_free(); - push_estack(new_invalid_val()); - return NW_FALSE; - } - - llformat = GetUcs2Val(); - if (llformat == NULL) { - pop_estack_and_free(); - push_estack(new_invalid_val()); - NW_Str_Delete(pnformat); - return NW_FALSE; - } - - url = GetUcs2Val(); - if (url == NULL) { - push_estack(new_invalid_val()); - NW_Str_Delete(pnformat); - NW_Str_Delete(llformat); - return NW_FALSE; - } - - /* call API routine */ - result = ScriptAPI_nokia_locationInfo(url,llformat,pnformat); - - if (! result) { - push_estack(new_invalid_val()); - NW_Str_Delete(url); - NW_Str_Delete(llformat); - NW_Str_Delete(pnformat); - return NW_FALSE; - } - - return NW_TRUE; -} - -/* functions in WP library */ -static const lib_function_t wp_lib_table[NO_OF_WP_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 1, wp_makeCall, NW_TRUE }, - { 1, wp_sendDTMF, NW_TRUE }, - { 2, wp_addPBEntry, NW_TRUE } -}; - -void populate_wp_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(WP_LIB_ID); - (*table)[i] = wp_lib_table; - - return; -} - -/* functions in Nokia library */ -static const lib_function_t nokia_lib_table[NO_OF_NOKIA_FUNCS] = -{ /* arg_size, func_ptr, is_async */ - { 3, nokia_locationInfo, NW_TRUE } -}; - -void populate_nokia_lib(lib_function_table_t *table) -{ - NW_Int32 i = ScriptAPI_get_lib_index(NOKIA_LIB_ID); - (*table)[i] = nokia_lib_table; - - return; -} - -/* populate all libraries */ -void populate_wta_lib(lib_function_table_t *table) -{ - populate_wp_lib(table); - populate_nokia_lib(table); -} - -NW_Byte size_wp_lib() /* public */ -{ - return NO_OF_WP_FUNCS; -} - -NW_Byte size_nokia_lib() /* public */ -{ - return NO_OF_NOKIA_FUNCS; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_Abstract.h --- a/webengine/wmlengine/src/text/include/NW_Text_Abstract.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,268 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_Text_Abstract_h -#define NW_Text_Abstract_h - -#include "NW_Text_EXPORT.h" -#include "nw_object_dynamic.h" -#include "nw_text_types.h" -#include "nw_text_iterator.h" -#include "nw_string_char.h" -#include "nw_string_string.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Abstract_Class_s NW_Text_Abstract_Class_t; -typedef struct NW_Text_Abstract_s NW_Text_Abstract_t; - -//struct NW_String_String_s; -//typedef struct NW_String_String_s NW_String_t; - -// struct NW_String_t; -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -enum { - NW_Text_Flags_TakeOwnership = 0x01, - NW_Text_Flags_Aligned = 0x02, - NW_Text_Flags_Copy = 0x04, - NW_Text_Flags_CompressWhitespace = 0x08, - NW_Text_Flags_NullTerminated = 0x10, - NW_Text_Flags_RetainLineFeeds = 0x20 -}; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Text_Abstract_CreateIterator_t) (NW_Text_Abstract_t* abstractText, - NW_Text_Direction_t direction, - NW_Text_Iterator_t** iterator); - -typedef -NW_Uint32 -(*NW_Text_Abstract_GetStorageSize_t) (const NW_Text_Abstract_t* abstractText); - -typedef -NW_Ucs4 -(*NW_Text_Abstract_GetCharacterAt_t) (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -typedef -NW_Ucs2* -(*NW_Text_Abstract_GetUCS2Buffer_t) (const NW_Text_Abstract_t* abstractText, - NW_Uint16 flags, - NW_Text_Length_t* charCount, - NW_Bool* freeNeeded); - -typedef -NW_Text_Length_t -(*NW_Text_Abstract_GetSpaceAfter_t) (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Abstract_ClassPart_s { - NW_Text_Abstract_CreateIterator_t createIterator; - NW_Text_Abstract_GetStorageSize_t getStorageSize; - NW_Text_Abstract_GetCharacterAt_t getCharacterAt; - NW_Text_Abstract_GetUCS2Buffer_t getUCS2Buffer; - NW_Text_Abstract_GetSpaceAfter_t getSpaceAfter; -} NW_Text_Abstract_ClassPart_t; - -struct NW_Text_Abstract_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_Abstract_s { - NW_Object_Dynamic_t super; - - /* member variables */ - void* storage; - NW_Text_Length_t characterCount; - NW_Uint16 flags; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_Abstract_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_Abstract)) - -#define NW_Text_AbstractOf(_object) \ - (NW_Object_Cast (_object, NW_Text_Abstract)) - -#define NW_TextOf(_object) \ - (NW_Text_AbstractOf (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_Abstract_Class_t NW_Text_Abstract_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Abstract_SetStorage (NW_Text_Abstract_t* thisObj, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Abstract_SetCharacterCount (NW_Text_Abstract_t* thisObj, - NW_Text_Length_t characterCount); - -NW_TEXT_EXPORT -NW_Text_Abstract_t* -_NW_Text_Abstract_Copy (const NW_Text_Abstract_t* abstractText, - NW_Bool flags); - -NW_TEXT_EXPORT -NW_Text_t* -_NW_Text_Abstract_Split (NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - - -NW_Text_t* -_NW_Text_Abstract_SplitOnSpace (NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index, - NW_Text_Length_t *actualIndex); - -NW_TEXT_EXPORT -NW_Int32 -_NW_Text_Abstract_PartialCompare (const NW_Text_Abstract_t* abstractText, - const NW_Text_Abstract_t* rhsText, - NW_Text_Length_t numCharacters); - -NW_TEXT_EXPORT -NW_Int32 -_NW_Text_Abstract_Compare (const NW_Text_Abstract_t* abstractText, - const NW_Text_Abstract_t* rhsText); - -NW_TEXT_EXPORT -NW_Int32 -_NW_Text_Abstract_PartialASCIICompare (const NW_Text_Abstract_t* abstractText, - const NW_Uint8* rhsString, - NW_Text_Length_t numCharacters); - -NW_TEXT_EXPORT -NW_Int32 -_NW_Text_Abstract_ASCIICompare (const NW_Text_Abstract_t* abstractText, - const NW_Uint8* rhsString); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Text_SetStorage(_object, _storage, _characterCount, _flags) \ - (_NW_Text_Abstract_SetStorage \ - (NW_Text_AbstractOf (_object), (_storage), (_characterCount), (_flags))) - -#define NW_Text_GetCharCount(_object) \ - (NW_OBJECT_CONSTCAST(NW_Text_Length_t) NW_Text_AbstractOf (_object)->characterCount) - -#define NW_Text_SetCharCount(_object, _characterCount) \ - ((void) (NW_Text_AbstractOf (_object)->characterCount = (_characterCount))) - -#define NW_Text_CreateIterator(_object, _direction, _iterator) \ - (NW_Object_Invoke (_object, NW_Text_Abstract, createIterator) ( \ - NW_Text_AbstractOf (_object), (_direction), (_iterator))) - -#define NW_Text_GetAt(_object, _index) \ - (NW_Object_Invoke (_object, NW_Text_Abstract, getCharacterAt) ( \ - NW_Text_AbstractOf (_object), (_index))) - -#define NW_Text_GetUCS2Buffer(_object, _flags, _characterCount, _freeNeeded) \ - (NW_Object_Invoke (_object, NW_Text_Abstract, getUCS2Buffer) ( \ - NW_Text_AbstractOf (_object), (_flags), (_characterCount), (_freeNeeded))) - -#define NW_Text_GetSpaceAfter(_object, _index) \ - (NW_Object_Invoke (_object, NW_Text_Abstract, getSpaceAfter) ( \ - NW_Text_AbstractOf (_object), (_index))) - -#define NW_Text_Copy(_object, _deepCopy) \ - (_NW_Text_Abstract_Copy ( \ - NW_Text_AbstractOf (_object), (_deepCopy))) - -#define NW_Text_Split(_object, _index) \ - (_NW_Text_Abstract_Split (NW_Text_AbstractOf (_object), (_index))) - -#define NW_Text_SplitOnSpace(_object, _index, _actualIndex) \ - (_NW_Text_Abstract_SplitOnSpace (NW_Text_AbstractOf (_object), (_index), (_actualIndex))) - -#define NW_Text_PartialCompare(_object, _rhsText, _numCharacters) \ - (_NW_Text_Abstract_PartialCompare ( \ - NW_Text_AbstractOf (_object), NW_Text_AbstractOf (_rhsText), (_numCharacters))) - -#define NW_Text_Compare(_object, _rhsText) \ - (_NW_Text_Abstract_Compare ( \ - NW_Text_AbstractOf (_object), NW_Text_AbstractOf (_rhsText))) - -#define NW_Text_PartialASCIICompare(_object, _rhsString, _numCharacters) \ - (_NW_Text_Abstract_PartialASCIICompare ( \ - NW_Text_AbstractOf (_object), (_rhsString), (_numCharacters))) - -#define NW_Text_ASCIICompare(_object, _rhsString) \ - (_NW_Text_Abstract_ASCIICompare ( \ - NW_Text_AbstractOf (_object), (_rhsString))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Text_t* -NW_Text_New (NW_Uint32 encoding, - void* storage, - NW_Text_Length_t charCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -NW_Text_t* -NW_Text_NewFromStringAndDeleteString (NW_String_t* stringStr, - NW_Uint32 encoding); - - -NW_TEXT_EXPORT -NW_Text_t* -NW_Text_Concatenate(NW_Text_t* val1, NW_Text_t* val2); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_Text_Abstract_h */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_AbstractI.h --- a/webengine/wmlengine/src/text/include/NW_Text_AbstractI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_Text_AbstractI_h -#define NW_Text_AbstractI_h - -#include "nw_object_dynamici.h" -#include "NW_Text_Abstract.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Text_Abstract_GetStorage(_abstractText) \ - ((void* ) NW_Text_AbstractOf (_abstractText)->storage) - -#define NW_Text_Abstract_GetStorageSize(_abstractText) \ - (NW_Object_Invoke (_abstractText, NW_Text_Abstract, getStorageSize) ( \ - NW_Text_AbstractOf (_abstractText))) - -#define NW_Text_Abstract_CalcCharacterCount(_abstractText) \ - (_NW_Text_Abstract_CalcCharacterCount (NW_Text_AbstractOf (_abstractText))) - -#define NW_Text_Abstract_SetStorage(_abstractText, _storage, _characterCount, _flags) \ - (_NW_Text_Abstract_SetStorage (NW_Text_AbstractOf (_abstractText), \ - (_storage), (_characterCount), (_flags))) - -/* ------------------------------------------------------------------------- * - protected method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Abstract_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList); - -NW_TEXT_EXPORT -void -_NW_Text_Abstract_Destruct (NW_Object_Dynamic_t* dynamicObject); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Abstract_CalcCharacterCount (NW_Text_Abstract_t* thisObj); - -NW_TEXT_EXPORT -NW_Ucs2* -_NW_Text_Abstract_GetUCS2Buffer (const NW_Text_Abstract_t* thisObj, - NW_Uint16 flags, - NW_Text_Length_t* charCount, - NW_Bool* freeNeeded); -NW_Text_Length_t -_NW_Text_Abstract_GetSpaceAfter (const NW_Text_Abstract_t* thisObj, - NW_Text_Length_t index); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_Text_AbstractI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_EXPORT.h --- a/webengine/wmlengine/src/text/include/NW_Text_EXPORT.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_EXPORT_h_ -#define _NW_Text_EXPORT_h_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -#ifndef NW_TEXT_EXPORT -#ifdef NW_IMPORT -#define NW_TEXT_EXPORT NW_IMPORT -#else /* NW_IMPORT */ -#define NW_TEXT_EXPORT extern -#endif /* NW_IMPORT */ -#endif /* NW_TEXT_EXPORT */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_EXPORT_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_FixedWidth.h --- a/webengine/wmlengine/src/text/include/NW_Text_FixedWidth.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_FixedWidth_H -#define NW_TEXT_FixedWidth_H - - -#include "NW_Text_Abstract.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_FixedWidth_Class_s NW_Text_FixedWidth_Class_t; -typedef struct NW_Text_FixedWidth_s NW_Text_FixedWidth_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_FixedWidth_ClassPart_s { - size_t characterSize; -} NW_Text_FixedWidth_ClassPart_t; - -struct NW_Text_FixedWidth_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_FixedWidth_ClassPart_t NW_Text_FixedWidth; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_FixedWidth_s { - NW_Text_Abstract_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_FixedWidth_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_FixedWidth)) - -#define NW_Text_FixedWidthOf(_object) \ - (NW_Object_Cast (_object, NW_Text_FixedWidth)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_FixedWidth_Class_t NW_Text_FixedWidth_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_FixedWidth_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_FixedWidthI.h --- a/webengine/wmlengine/src/text/include/NW_Text_FixedWidthI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_FixedWidthI_H -#define NW_TEXT_FixedWidthI_H - - -#include "NW_Text_AbstractI.h" -#include "NW_Text_FixedWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Text_FixedWidth_GetCharacterSize(_object) \ - (NW_OBJECT_CONSTCAST(NW_Uint32) NW_Text_FixedWidth_GetClassPart (_object).characterSize) - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_FixedWidth_CreateIterator (NW_Text_Abstract_t* abstractText, - NW_Text_Direction_t direction, - NW_Text_Iterator_t** iterator); - -NW_TEXT_EXPORT -NW_Uint32 -_NW_Text_FixedWidth_GetStorageSize (const NW_Text_Abstract_t* abstractText); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_FixedWidthI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_VariableWidth.h --- a/webengine/wmlengine/src/text/include/NW_Text_VariableWidth.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_VariableWidth_H -#define NW_TEXT_VariableWidth_H - - -#include "NW_Text_Abstract.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_VariableWidth_Class_s NW_Text_VariableWidth_Class_t; -typedef struct NW_Text_VariableWidth_s NW_Text_VariableWidth_t; - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Text_VariableWidth_ReadCharacter_t) (NW_Text_VariableWidth_t* textVariableWidth, - NW_Int32 offset, - NW_Ucs4* character, - NW_Uint32* numBytes); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_VariableWidth_ClassPart_s { - NW_Text_VariableWidth_ReadCharacter_t readCharacter; -} NW_Text_VariableWidth_ClassPart_t; - -struct NW_Text_VariableWidth_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_VariableWidth_ClassPart_t NW_Text_VariableWidth; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_VariableWidth_s { - NW_Text_Abstract_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_VariableWidth_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_VariableWidth)) - -#define NW_Text_VariableWidthOf(_object) \ - (NW_Object_Cast (_object, NW_Text_VariableWidth)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_VariableWidth_Class_t NW_Text_VariableWidth_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_VariableWidth_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/NW_Text_VariableWidthI.h --- a/webengine/wmlengine/src/text/include/NW_Text_VariableWidthI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_VariableWidthI_H -#define NW_TEXT_VariableWidthI_H - - -#include "NW_Text_AbstractI.h" -#include "NW_Text_VariableWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ -#define NW_Text_VariableWidth_ReadCharacter(_object, _offset, _character, _numBytes) \ - (NW_Object_Invoke (_object, NW_Text_VariableWidth, readCharacter) ( \ - NW_Text_VariableWidthOf (_object), (_offset), (_character), (_numBytes))) - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_VariableWidth_CreateIterator (NW_Text_Abstract_t* abstractText, - NW_Text_Direction_t direction, - NW_Text_Iterator_t** iterator); - -NW_TEXT_EXPORT -NW_Uint32 -_NW_Text_VariableWidth_GetStorageSize (const NW_Text_Abstract_t* abstractText); - -NW_TEXT_EXPORT -NW_Ucs4 -_NW_Text_VariableWidth_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_VariableWidthI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_ascii.h --- a/webengine/wmlengine/src/text/include/nw_text_ascii.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_ASCII_H -#define NW_TEXT_ASCII_H - - -#include "NW_Text_FixedWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_ASCII_Class_s NW_Text_ASCII_Class_t; -typedef struct NW_Text_ASCII_s NW_Text_ASCII_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_ASCII_ClassPart_s { - void** unused; -} NW_Text_ASCII_ClassPart_t; - -struct NW_Text_ASCII_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_FixedWidth_ClassPart_t NW_Text_FixedWidth; - NW_Text_ASCII_ClassPart_t NW_Text_ASCII; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_ASCII_s { - NW_Text_FixedWidth_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_ASCII_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_ASCII)) - -#define NW_Text_ASCIIOf(_object) \ - (NW_Object_Cast (_object, NW_Text_ASCII)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_ASCII_Class_t NW_Text_ASCII_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Text_ASCII_t* -NW_Text_ASCII_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -TBrowserStatusCode -NW_Text_ASCII_Initialize (NW_Text_ASCII_t* ascii, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_ASCII_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_asciii.h --- a/webengine/wmlengine/src/text/include/nw_text_asciii.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_ASCIII_H -#define NW_TEXT_ASCIII_H - - -#include "NW_Text_FixedWidthI.h" -#include "nw_text_ascii.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Ucs4 -_NW_Text_ASCII_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -NW_Text_Length_t -_NW_Text_ASCII_GetSpaceAfter (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_ASCIII_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_fixedwidthiterator.h --- a/webengine/wmlengine/src/text/include/nw_text_fixedwidthiterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_FixedWidthIterator_h_ -#define _NW_Text_FixedWidthIterator_h_ - -#include "nw_text_iterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Text_FixedWidthIterator - - @scope: public - - @description: <tbd> - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_FixedWidthIterator_Class_s NW_Text_FixedWidthIterator_Class_t; -typedef struct NW_Text_FixedWidthIterator_s NW_Text_FixedWidthIterator_t; - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_FixedWidthIterator_ClassPart_s { - void** unused; -} NW_Text_FixedWidthIterator_ClassPart_t; - -struct NW_Text_FixedWidthIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Iterator_ClassPart_t NW_Text_Iterator; - NW_Text_FixedWidthIterator_ClassPart_t NW_Text_FixedWidthIterator; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_Text_FixedWidthIterator_s { - NW_Text_Iterator_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_FixedWidthIterator_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Text_FixedWidthIterator)) - -#define NW_Text_FixedWidthIteratorOf(_object) \ - (NW_Object_Cast (_object, NW_Text_FixedWidthIterator)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_FixedWidthIterator_Class_t NW_Text_FixedWidthIterator_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_FixedWidthIterator_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_fixedwidthiteratori.h --- a/webengine/wmlengine/src/text/include/nw_text_fixedwidthiteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_FixedWidthIteratorI_h_ -#define _NW_Text_FixedWidthIteratorI_h_ - -#include "nw_text_iteratori.h" -#include "nw_text_fixedwidthiterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_FixedWidthIterator_GetNext (NW_Text_Iterator_t* iterator, - NW_Ucs4* character); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_FixedWidthIterator_GetOffset (NW_Text_Iterator_t* iterator, - NW_Uint32* offset); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_FixedWidthIterator_SetIndex (NW_Text_Iterator_t* iterator, - NW_Text_Length_t index); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_FixedWidthIteratorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_iterator.h --- a/webengine/wmlengine/src/text/include/nw_text_iterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_Iterator_h_ -#define _NW_Text_Iterator_h_ - -#include "NW_Text_EXPORT.h" -#include "nw_object_dynamic.h" -#include "nw_text_types.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Text_Iterator - - @scope: public - - @description: <tbd> - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Iterator_Class_s NW_Text_Iterator_Class_t; -typedef struct NW_Text_Iterator_s NW_Text_Iterator_t; - -typedef struct NW_Text_Abstract_s NW_Text_t; - -/* ------------------------------------------------------------------------- * - virtual method type definitions - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_Text_Iterator_GetNext_t) (NW_Text_Iterator_t* iterator, - NW_Ucs4* character); - -typedef -TBrowserStatusCode -(*NW_Text_Iterator_GetOffset_t) (NW_Text_Iterator_t* iterator, - NW_Uint32* offset); - -typedef -TBrowserStatusCode -(*NW_Text_Iterator_SetIndex_t) (NW_Text_Iterator_t* iterator, - NW_Text_Length_t index); - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Iterator_ClassPart_s { - NW_Text_Iterator_GetNext_t getNext; - NW_Text_Iterator_GetOffset_t getOffset; - NW_Text_Iterator_SetIndex_t setIndex; -} NW_Text_Iterator_ClassPart_t; - -struct NW_Text_Iterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Iterator_ClassPart_t NW_Text_Iterator; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_Text_Iterator_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_Text_t* text; - NW_Text_Direction_t direction; - NW_Text_Length_t index; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_Iterator_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Text_Iterator)) - -#define NW_Text_IteratorOf(_object) \ - (NW_Object_Cast (_object, NW_Text_Iterator)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_Iterator_Class_t NW_Text_Iterator_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Iterator_HasMore (NW_Text_Iterator_t* iterator); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Text_Iterator_GetText(_iterator) \ - ((NW_Text_t* const) NW_Text_IteratorOf (_iterator)->text) - -#define NW_Text_Iterator_GetDirection(_iterator) \ - ((const NW_Text_Direction_t) NW_Text_IteratorOf (_iterator)->direction) - -#define NW_Text_Iterator_SetDirection(_iterator, _direction) \ - (NW_Text_IteratorOf (_iterator)->direction = (_direction), KBrsrSuccess) - -#define NW_Text_Iterator_GetIndex(_iterator) \ - ((NW_Text_Length_t) NW_Text_IteratorOf (_iterator)->index) - -#define NW_Text_Iterator_SetIndex(_iterator, _index) \ - (NW_Object_Invoke (_iterator, NW_Text_Iterator, setIndex) ( \ - NW_Text_IteratorOf (_iterator), (_index))) - -#define NW_Text_Iterator_HasMore(_iterator) \ - (_NW_Text_Iterator_HasMore (NW_Text_IteratorOf (_iterator))) - -#define NW_Text_Iterator_GetNext(_iterator, _character) \ - (NW_Object_Invoke (_iterator, NW_Text_Iterator, getNext) ( \ - NW_Text_IteratorOf (_iterator), (_character))) - -#define NW_Text_Iterator_GetOffset(_iterator, _offset) \ - (NW_Object_Invoke (_iterator, NW_Text_Iterator, getOffset) ( \ - NW_Text_IteratorOf (_iterator), (_offset))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_Iterator_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_iteratori.h --- a/webengine/wmlengine/src/text/include/nw_text_iteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_IteratorI_h_ -#define _NW_Text_IteratorI_h_ - -#include "nw_object_dynamici.h" -#include "nw_text_iterator.h" -#include "NW_Text_Abstract.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_Iterator_Construct (NW_Object_Dynamic_t* dynamic, - va_list* argList); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_IteratorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_latin1.h --- a/webengine/wmlengine/src/text/include/nw_text_latin1.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_Latin1_H -#define NW_TEXT_Latin1_H - - -#include "NW_Text_FixedWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Latin1_Class_s NW_Text_Latin1_Class_t; -typedef struct NW_Text_Latin1_s NW_Text_Latin1_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_Latin1_ClassPart_s { - void** unused; -} NW_Text_Latin1_ClassPart_t; - -struct NW_Text_Latin1_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_FixedWidth_ClassPart_t NW_Text_FixedWidth; - NW_Text_Latin1_ClassPart_t NW_Text_Latin1; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_Latin1_s { - NW_Text_FixedWidth_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_Latin1_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_Latin1)) - -#define NW_Text_Latin1Of(_object) \ - (NW_Object_Cast (_object, NW_Text_Latin1)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_Latin1_Class_t NW_Text_Latin1_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Text_Latin1_t* -NW_Text_Latin1_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -TBrowserStatusCode -NW_Text_Latin1_Initialize (NW_Text_Latin1_t* Latin1, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_Latin1_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_latin1i.h --- a/webengine/wmlengine/src/text/include/nw_text_latin1i.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_Latin1I_H -#define NW_TEXT_Latin1I_H - - -#include "NW_Text_FixedWidthI.h" -#include "nw_text_latin1.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Ucs4 -_NW_Text_Latin1_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -NW_Text_Length_t -_NW_Text_Latin1_GetSpaceAfter (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_Latin1I_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_types.h --- a/webengine/wmlengine/src/text/include/nw_text_types.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_Text_types_h -#define NW_Text_types_h - -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- */ -typedef NW_Uint32 NW_Text_Length_t; - -typedef enum NW_Text_Direction_e { - NW_Text_Direction_Forward = 1, - NW_Text_Direction_Backward = -1 -} NW_Text_Direction_t; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_Text_types_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_ucs2.h --- a/webengine/wmlengine/src/text/include/nw_text_ucs2.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_UCS2_H -#define NW_TEXT_UCS2_H - - -#include "NW_Text_FixedWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -#define NW_TEXT_UCS2_HYPHEN 0x2d -#define NW_TEXT_UCS2_SOFT_HYPHEN 0xad -#define NW_TEXT_UCS2_NBSP 0xa0 -#define NW_TEXT_UCS2_LF 0x0a -#define NW_TEXT_UCS2_CR 0x0d -#define NW_TEXT_UCS2_TAB 0x09 -#define NW_TEXT_UCS2_SPACE 0x20 -#define NW_TEXT_UCS2_PARASEP 0x2029 - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_UCS2_Class_s NW_Text_UCS2_Class_t; -typedef struct NW_Text_UCS2_s NW_Text_UCS2_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_UCS2_ClassPart_s { - void** unused; -} NW_Text_UCS2_ClassPart_t; - -struct NW_Text_UCS2_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_FixedWidth_ClassPart_t NW_Text_FixedWidth; - NW_Text_UCS2_ClassPart_t NW_Text_UCS2; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_UCS2_s { - NW_Text_FixedWidth_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_UCS2_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_UCS2)) - -#define NW_Text_UCS2Of(_object) \ - (NW_Object_Cast (_object, NW_Text_UCS2)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_UCS2_Class_t NW_Text_UCS2_Class; - -/* ------------------------------------------------------------------------- * - public method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_UCS2_SetStorage (NW_Text_UCS2_t* thisObj, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Text_UCS2_SetStorage(_object, _storage, _characterCount, _flags) \ - (_NW_Text_UCS2_SetStorage ( \ - NW_Text_UCS2Of (_object), (_storage), (_characterCount), (_flags))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Text_UCS2_t* -NW_Text_UCS2_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -TBrowserStatusCode -NW_Text_UCS2_Initialize (NW_Text_UCS2_t* UCS2, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_UCS2_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_ucs2i.h --- a/webengine/wmlengine/src/text/include/nw_text_ucs2i.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_UCS2I_H -#define NW_TEXT_UCS2I_H - - -#include "NW_Text_FixedWidthI.h" -#include "nw_text_ucs2.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -NW_Ucs4 -_NW_Text_UCS2_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -NW_TEXT_EXPORT -NW_Ucs2* -_NW_Text_UCS2_GetUCS2Buffer (const NW_Text_Abstract_t* textAbstract, - NW_Uint16 flags, - NW_Text_Length_t* charCount, - NW_Bool* freeNeeded); - - -NW_Text_Length_t -_NW_Text_UCS2_GetSpaceAfter (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_UCS2I_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_utf8.h --- a/webengine/wmlengine/src/text/include/nw_text_utf8.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_UTF8_H -#define NW_TEXT_UTF8_H - - -#include "NW_Text_VariableWidth.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_UTF8_Class_s NW_Text_UTF8_Class_t; -typedef struct NW_Text_UTF8_s NW_Text_UTF8_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_UTF8_ClassPart_s { - void** unused; -} NW_Text_UTF8_ClassPart_t; - -struct NW_Text_UTF8_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Abstract_ClassPart_t NW_Text_Abstract; - NW_Text_VariableWidth_ClassPart_t NW_Text_VariableWidth; - NW_Text_UTF8_ClassPart_t NW_Text_UTF8; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Text_UTF8_s { - NW_Text_VariableWidth_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_UTF8_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Text_UTF8)) - -#define NW_Text_UTF8Of(_object) \ - (NW_Object_Cast (_object, NW_Text_UTF8)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_UTF8_Class_t NW_Text_UTF8_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -NW_Text_UTF8_Decode (const NW_Uint8* buffer, - NW_Ucs4* character, - NW_Uint32* numBytes); - -NW_TEXT_EXPORT -NW_Text_UTF8_t* -NW_Text_UTF8_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - -NW_TEXT_EXPORT -TBrowserStatusCode -NW_Text_UTF8_Initialize (NW_Text_UTF8_t* UTF8, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_UTF8_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_utf8i.h --- a/webengine/wmlengine/src/text/include/nw_text_utf8i.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_TEXT_UTF8I_H -#define NW_TEXT_UTF8I_H - - -#include "NW_Text_VariableWidthI.h" -#include "nw_text_utf8.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - virtual method prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_UTF8_ReadCharacter (NW_Text_VariableWidth_t* textVariableWidth, - NW_Int32 offset, - NW_Ucs4* character, - NW_Uint32* numBytes); - -NW_Text_Length_t -_NW_Text_UTF8_GetSpaceAfter (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_TEXT_UTF8I_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_variablewidthiterator.h --- a/webengine/wmlengine/src/text/include/nw_text_variablewidthiterator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_VariableWidthIterator_h_ -#define _NW_Text_VariableWidthIterator_h_ - -#include "nw_text_iterator.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** ----------------------------------------------------------------------- ** - @class: NW_Text_VariableWidthIterator - - @scope: public - - @description: <tbd> - ** ----------------------------------------------------------------------- **/ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_VariableWidthIterator_Class_s NW_Text_VariableWidthIterator_Class_t; -typedef struct NW_Text_VariableWidthIterator_s NW_Text_VariableWidthIterator_t; - -/* ------------------------------------------------------------------------- * - object class structure - * ------------------------------------------------------------------------- */ -typedef struct NW_Text_VariableWidthIterator_ClassPart_s { - void** unused; -} NW_Text_VariableWidthIterator_ClassPart_t; - -struct NW_Text_VariableWidthIterator_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Text_Iterator_ClassPart_t NW_Text_Iterator; - NW_Text_VariableWidthIterator_ClassPart_t NW_Text_VariableWidthIterator; -}; - -/* ------------------------------------------------------------------------- * - object instance structure - * ------------------------------------------------------------------------- */ -struct NW_Text_VariableWidthIterator_s { - NW_Text_Iterator_t super; - - /* member variables */ - NW_Uint32 offset; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Text_VariableWidthIterator_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Text_VariableWidthIterator)) - -#define NW_Text_VariableWidthIteratorOf(_object) \ - (NW_Object_Cast (_object, NW_Text_VariableWidthIterator)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT const NW_Text_VariableWidthIterator_Class_t NW_Text_VariableWidthIterator_Class; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_VariableWidthIterator_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/include/nw_text_variablewidthiteratori.h --- a/webengine/wmlengine/src/text/include/nw_text_variablewidthiteratori.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_Text_VariableWidthIteratorI_h_ -#define _NW_Text_VariableWidthIteratorI_h_ - -#include "nw_text_iteratori.h" -#include "nw_text_variablewidthiterator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected prototypes - * ------------------------------------------------------------------------- */ -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_VariableWidthIterator_Construct (NW_Object_Dynamic_t* dynamic, - va_list* argList); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_VariableWidthIterator_GetNext (NW_Text_Iterator_t* iterator, - NW_Ucs4* character); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_VariableWidthIterator_GetOffset (NW_Text_Iterator_t* iterator, - NW_Uint32* offset); - -NW_TEXT_EXPORT -TBrowserStatusCode -_NW_Text_VariableWidthIterator_SetIndex (NW_Text_Iterator_t* iterator, - NW_Text_Length_t index); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Text_VariableWidthIteratorI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/ASCII.c --- a/webengine/wmlengine/src/text/src/ASCII.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_asciii.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_ASCII_Class_t NW_Text_ASCII_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_FixedWidth_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_ASCII_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_FixedWidth_CreateIterator, - /* getStorageSize */ _NW_Text_FixedWidth_GetStorageSize, - /* getCharacterAt */ _NW_Text_ASCII_GetCharacterAt, - /* getUCS2Buffer */ _NW_Text_Abstract_GetUCS2Buffer, - /* getSpaceAfter */ _NW_Text_ASCII_GetSpaceAfter - }, - { /* NW_Text_FixedWidth */ - /* characterSize */ sizeof (NW_Uint8) - }, - { /* NW_Text_ASCII */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Ucs4 -_NW_Text_ASCII_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, &NW_Text_ASCII_Class)); - - /* return the character */ - return ((NW_Uint8*) abstractText->storage)[index]; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Text_ASCII_t* -NW_Text_ASCII_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - NW_Text_ASCII_t* text; - - text = (NW_Text_ASCII_t*) - NW_Object_New (&NW_Text_ASCII_Class, storage, characterCount, (NW_Uint32)flags); - - /* if given ownership of storage but failed to create an object, delete the storage */ - if (text == NULL && flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free (storage); - } - - return text; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_ASCII_Initialize (NW_Text_ASCII_t* textASCII, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - return NW_Object_Initialize (&NW_Text_ASCII_Class, textASCII, storage, - characterCount, (NW_Uint32)flags); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_Text_ASCII_GetSpaceAfter (const NW_Text_Abstract_t* textASCII, - NW_Text_Length_t index) -{ - NW_Text_Length_t actualIndex = index; - NW_Uint8* storage; - NW_Uint32 len; - NW_ASSERT (NW_Object_IsInstanceOf (textASCII, &NW_Text_ASCII_Class)); - len = textASCII->characterCount; - storage = (NW_Uint8*) textASCII->storage; - for (actualIndex = index; actualIndex < len; actualIndex++) - { - if (*(storage + actualIndex) == 0x20 || *(storage + actualIndex) == 0x2E || *(storage + actualIndex) == 0x09) - return ++actualIndex; - } - return actualIndex; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/FixedWidthIterator.c --- a/webengine/wmlengine/src/text/src/FixedWidthIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_fixedwidthiteratori.h" -#include "NW_Text_FixedWidthI.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_FixedWidthIterator_Class_t NW_Text_FixedWidthIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_Iterator_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_FixedWidthIterator_t), - /* construct */ _NW_Text_Iterator_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Iterator */ - /* getNext */ _NW_Text_FixedWidthIterator_GetNext, - /* getOffset */ _NW_Text_FixedWidthIterator_GetOffset, - /* setIndex */ _NW_Text_FixedWidthIterator_SetIndex - }, - { /* NW_Text_FixedWidthIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_Text_Iterator methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_FixedWidthIterator_GetNext (NW_Text_Iterator_t* iterator, - NW_Ucs4* character) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, - &NW_Text_FixedWidthIterator_Class)); - - NW_TRY (status) { - /* ensure that there are more characters to get */ - status = NW_Text_Iterator_HasMore (iterator); - if (status == KBrsrIterateDone) { - NW_THROW (status); - } - NW_THROW_ON_ERROR (status); - - /* extract the character */ - *character = NW_Text_GetAt (iterator->text, iterator->index); - iterator->index = - (NW_Text_Length_t) (iterator->index + iterator->direction); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_FixedWidthIterator_GetOffset (NW_Text_Iterator_t* iterator, - NW_Uint32* offset) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, - &NW_Text_FixedWidthIterator_Class)); - - *offset = - NW_Text_FixedWidth_GetCharacterSize (iterator->text) * iterator->index; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_FixedWidthIterator_SetIndex (NW_Text_Iterator_t* iterator, - NW_Text_Length_t index) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, - &NW_Text_FixedWidthIterator_Class)); - - /* update the index */ - iterator->index = index; - - /* successful completion */ - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/Latin1.c --- a/webengine/wmlengine/src/text/src/Latin1.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_latin1i.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_Latin1_Class_t NW_Text_Latin1_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_FixedWidth_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_Latin1_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_FixedWidth_CreateIterator, - /* getStorageSize */ _NW_Text_FixedWidth_GetStorageSize, - /* getCharacterAt */ _NW_Text_Latin1_GetCharacterAt, - /* getUCS2Buffer */ _NW_Text_Abstract_GetUCS2Buffer, - /* getSpaceAfter */ _NW_Text_Latin1_GetSpaceAfter - }, - { /* NW_Text_FixedWidth */ - /* characterSize */ sizeof (NW_Uint8) - }, - { /* NW_Text_Latin1 */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Ucs4 -_NW_Text_Latin1_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, &NW_Text_Latin1_Class)); - - /* return the character */ - return ((NW_Uint8*) abstractText->storage)[index]; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Text_Latin1_t* -NW_Text_Latin1_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - NW_Text_Latin1_t* text; - - text = (NW_Text_Latin1_t*) - NW_Object_New (&NW_Text_Latin1_Class, storage, characterCount, (NW_Uint32)flags); - - /* if given ownership of storage but failed to create an object, delete the storage */ - if (text == NULL && flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free (storage); - } - - return text; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_Latin1_Initialize (NW_Text_Latin1_t* textLatin1, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - return NW_Object_Initialize (&NW_Text_Latin1_Class, textLatin1, storage, - characterCount, (NW_Uint32)flags); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_Text_Latin1_GetSpaceAfter (const NW_Text_Abstract_t* textLatin1, - NW_Text_Length_t index) -{ - NW_Text_Length_t actualIndex = index; - NW_Uint8* storage; - NW_Uint32 len; - NW_ASSERT (NW_Object_IsInstanceOf (textLatin1, &NW_Text_Latin1_Class)); - len = textLatin1->characterCount; - storage = (NW_Uint8*) textLatin1->storage; - for (actualIndex = index; actualIndex < len; actualIndex++) - { - if (*(storage + actualIndex) == 0x20 || *(storage + actualIndex) == 0x2E || *(storage + actualIndex) == 0x09) - return ++actualIndex; - } - return actualIndex; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/NW_Text_Abstract.c --- a/webengine/wmlengine/src/text/src/NW_Text_Abstract.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,612 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Text_AbstractI.h" - -#include "nw_text_ucs2.h" -#include "nw_text_utf8.h" -#include "nw_text_latin1.h" -#include "nw_text_ascii.h" -#include "nwx_string.h" -#include "nw_string_string.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_Abstract_Class_t NW_Text_Abstract_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_Abstract_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ _NW_Text_Abstract_Destruct - }, - { /* NW_Text_Abstract */ - /* createIterator */ NULL, - /* getStorageSize */ NULL, - /* getCharacterAt */ NULL, - /* getUCS2Buffer */ NULL, - /* getSpaceAfter */ _NW_Text_Abstract_GetSpaceAfter - } -}; - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static -NW_Int32 -NW_Text_Abstract_CompressCharacter(NW_Ucs2 character, NW_Bool retainLineFeeds) -{ - if (retainLineFeeds) { - return (NW_Str_Isspace (character) && (!NW_Str_Isnewline (character))); - } - else { - return NW_Str_Isspace (character); - } -} - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Abstract_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argList) -{ - NW_Text_Abstract_t* thisObj; - TBrowserStatusCode status; - void* storage; - NW_Text_Length_t characterCount; - NW_Uint16 flags; - - /* parameter assertion block */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_Text_AbstractOf (dynamicObject); - - /* initialize our member variables */ - storage = va_arg (*argList, void*); - characterCount = va_arg (*argList, NW_Text_Length_t); - flags = (NW_Uint16)va_arg (*argList, NW_Uint32); - status = - NW_Text_Abstract_SetStorage (thisObj, storage, characterCount, flags); - if (status != KBrsrSuccess) { - return status; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Text_Abstract_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_Text_Abstract_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (dynamicObject != NULL); - - /* for convenience */ - thisObj = NW_Text_AbstractOf (dynamicObject); - - /* if we own the storage, release it */ - if (thisObj->flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free ((void*) thisObj->storage); - } -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_Text_Abstract_GetSpaceAfter (const NW_Text_Abstract_t* thisObj, - NW_Text_Length_t index) -{ - NW_REQUIRED_PARAM(thisObj); - return index; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Abstract_CalcCharacterCount (NW_Text_Abstract_t* thisObj) -{ - NW_Ucs4 character; - NW_Text_Iterator_t* iterator = NULL; - - NW_TRY (status) { - if (thisObj->characterCount == 0) { - thisObj->characterCount = (NW_Text_Length_t) ~0; - status = NW_Text_CreateIterator (thisObj, NW_Text_Direction_Forward, &iterator); - NW_THROW_ON_ERROR (status); - - while ((status = NW_Text_Iterator_GetNext (iterator, &character)) == - KBrsrSuccess && character != '\0') - { - /* Nothing needed... */ - } - - NW_THROW_ON_ERROR (status); - - thisObj->characterCount = - (NW_Text_Length_t) (NW_Text_Iterator_GetIndex (iterator) - 1); - thisObj->flags |= (NW_Uint16) NW_Text_Flags_NullTerminated; - } else { /* determine if the string is null terminated */ - character = NW_Text_GetAt (thisObj, thisObj->characterCount); - if (character == '\0') { - thisObj->flags |= (NW_Uint16) NW_Text_Flags_NullTerminated; - } - } - } - - NW_CATCH (status) { - thisObj->characterCount = 0; - } - - NW_FINALLY { - NW_Object_Delete (iterator); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Abstract_SetStorage (NW_Text_Abstract_t* thisObj, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Text_Abstract_Class)); - - NW_TRY (status) { - NW_Uint32 storageSize; - - /* if the old storage is under our ownership, we must deallocate it first */ - if (thisObj->flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free ((void*) thisObj->storage); - } - thisObj->flags = 0; - - /* if the supplied pointer is NULL, we have no more work to do */ - thisObj->storage = storage; - if (thisObj->storage == NULL) { - thisObj->characterCount = 0; - NW_THROW_SUCCESS (status); - } - - /* determine the character count */ - thisObj->characterCount = characterCount; - status = NW_Text_Abstract_CalcCharacterCount (thisObj); - NW_THROW_ON_ERROR (status); - - /* if we are not directed to make a copy of the source, we simply assign the - pointer and set the flags appropriately */ - if (!(flags & NW_Text_Flags_Copy)) { - thisObj->flags |= (NW_Uint16) (flags & NW_Text_Flags_TakeOwnership); - return KBrsrSuccess; - } - - /* if the caller directed us to make a copy, we must do so now */ - storageSize = NW_Text_Abstract_GetStorageSize (thisObj); - thisObj->storage = NW_Mem_Malloc (storageSize + sizeof (NW_Ucs4)); - if (thisObj->storage == NULL) { - return KBrsrOutOfMemory; - } - (void) NW_Mem_memcpy (thisObj->storage, storage, storageSize); - (void) NW_Mem_memset ((char*) thisObj->storage + storageSize, 0, - sizeof (NW_Ucs4)); - thisObj->flags |= - (NW_Uint16) (NW_Text_Flags_TakeOwnership | NW_Text_Flags_NullTerminated); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Abstract_SetCharacterCount (NW_Text_Abstract_t* thisObj, - NW_Text_Length_t characterCount) -{ - thisObj->characterCount = characterCount; - thisObj->flags &= (NW_Uint16) ~NW_Text_Flags_NullTerminated; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Ucs2* -_NW_Text_Abstract_GetUCS2Buffer (const NW_Text_Abstract_t* thisObj, - NW_Uint16 flags, - NW_Text_Length_t* characterCount, - NW_Bool* freeNeeded) -{ - NW_Ucs2* buffer = NULL; - NW_Text_Iterator_t* iterator = NULL; - - NW_TRY(status) { - NW_Ucs4 character; - NW_Text_Length_t dstIndex; - NW_Bool retainLineFeeds = (NW_Bool) ((thisObj->flags & NW_Text_Flags_RetainLineFeeds) || - (flags & NW_Text_Flags_RetainLineFeeds)); - - - /* To reduce the amount of processing, we allocate for the worst-case - buffer in which no spaces were compressed and a terminating '\0' has - to be added. Given that the resulting string is only temporary storage, - this does not matter much */ - buffer = (NW_Ucs2*) NW_Mem_Malloc ((thisObj->characterCount + 1) * sizeof (NW_Ucs2)); - NW_THROW_OOM_ON_NULL (buffer, status); - - status = - NW_Text_CreateIterator (thisObj, NW_Text_Direction_Forward, &iterator); - NW_THROW_ON_ERROR (status); - dstIndex = 0; - - while ((status = - NW_Text_Iterator_GetNext (iterator, - &character)) == KBrsrSuccess) { - /* check to see if we've been asked to compress whitespace */ - if ((thisObj->flags & NW_Text_Flags_CompressWhitespace || - flags & NW_Text_Flags_CompressWhitespace) && - NW_Text_Abstract_CompressCharacter((NW_Ucs2) character, retainLineFeeds)) { - - /* we need to preserve the leading whitespace */ - buffer[dstIndex++] = 0x0020; /* ' ' */ - - /* skip all consecutive whitespace characters */ - do { - status = NW_Text_Iterator_GetNext (iterator, &character); - } while (status == KBrsrSuccess && - NW_Text_Abstract_CompressCharacter((NW_Ucs2) character, retainLineFeeds)); - - if (status == KBrsrIterateDone) { - break; - } - NW_THROW_ON_ERROR (status); - } - - buffer[dstIndex++] = (NW_Ucs2) character; - } - - /* Append a '\0' terminator */ - buffer[dstIndex] = '\0'; - - /* update the 'out' parameters */ - if (characterCount != NULL) { - *characterCount = dstIndex; - } - if (freeNeeded != NULL) { - *freeNeeded = NW_TRUE; - } - } - - NW_CATCH (status) { - NW_Mem_Free (buffer); - buffer = NULL; - } - - NW_FINALLY { - NW_Object_Delete (iterator); - - return buffer; - } NW_END_TRY; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Abstract_t* -_NW_Text_Abstract_Copy (const NW_Text_Abstract_t* thisObj, - NW_Bool deepCopy) -{ - return (NW_Text_Abstract_t*) NW_Object_New (NW_Object_GetClass (thisObj), - thisObj->storage, thisObj->characterCount, deepCopy ? NW_Text_Flags_Copy : 0); -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_Text_Abstract_PartialCompare (const NW_Text_Abstract_t* thisObj, - const NW_Text_Abstract_t* rhsText, - NW_Text_Length_t numCharacters) -{ - TBrowserStatusCode status; - NW_Text_Iterator_t* lhsIterator; - NW_Ucs4 lhsCharacter; - NW_Text_Iterator_t* rhsIterator; - NW_Ucs4 rhsCharacter; - - /* ensure that the two text objects character counts are of least - 'numCharacters' */ - if (thisObj->characterCount < numCharacters || - rhsText->characterCount < numCharacters) { - return thisObj->characterCount - rhsText->characterCount; - } - - /* instantiate the iterators */ - status = NW_Text_CreateIterator (thisObj, NW_Text_Direction_Forward, &lhsIterator); - if (status != KBrsrSuccess) { - return -1; - } - status = NW_Text_CreateIterator (rhsText, NW_Text_Direction_Forward, &rhsIterator); - if (status != KBrsrSuccess) { - NW_Object_Delete (rhsIterator); - return -1; - } - - /* iterate through the text objects a character at a time */ - while ((status = - NW_Text_Iterator_GetNext (lhsIterator, - &lhsCharacter)) == KBrsrSuccess && - (status = - NW_Text_Iterator_GetNext (rhsIterator, - &rhsCharacter)) == KBrsrSuccess) { - if (lhsCharacter != rhsCharacter) { - NW_Object_Delete (lhsIterator); - NW_Object_Delete (rhsIterator); - return lhsCharacter - rhsCharacter; - } - } - - /* the two text objects point to the same Unicode string for the first - number of characters specified by 'numCharacters' */ - - if(lhsIterator != NULL) - { - NW_Object_Delete (lhsIterator); - } - if(rhsIterator != NULL) - { - NW_Object_Delete (rhsIterator); - } - return 0; -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_Text_Abstract_Compare (const NW_Text_Abstract_t* thisObj, - const NW_Text_Abstract_t* rhsText) -{ - /* ensure that the two text objects are of equal length */ - if (thisObj->characterCount != rhsText->characterCount) { - return thisObj->characterCount - rhsText->characterCount; - } - return NW_Text_PartialCompare (thisObj, rhsText, thisObj->characterCount); -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_Text_Abstract_PartialASCIICompare (const NW_Text_Abstract_t* thisObj, - const NW_Uint8* rhsString, - NW_Text_Length_t numCharacters) -{ - NW_Text_Length_t index; - - /* iterate through the text object and string a character at a time */ - for (index = 0; index < numCharacters; index++) { - NW_Ucs4 lhsCharacter; - - /* ensure that we don't overrun the text buffer */ - if (index == thisObj->characterCount) { - return -1; - } - - /* compare the characters */ - lhsCharacter = NW_Text_GetAt (thisObj, index); - if (lhsCharacter != rhsString[index]) { - return lhsCharacter - rhsString[index]; - } - } - - /* the two text objects point to the same Unicode string for the first - number of characters specified by 'numCharacters' */ - return 0; -} - -/* ------------------------------------------------------------------------- */ -NW_Int32 -_NW_Text_Abstract_ASCIICompare (const NW_Text_Abstract_t* thisObj, - const NW_Uint8* rhsString) -{ - /* note that there is no need to compare the text character count with the - string length as the PartialASCIICompare will do the right lexical - "thing" if they objects are of unequal length */ - return NW_Text_PartialCompare (thisObj, rhsString, thisObj->characterCount); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Abstract_t* -_NW_Text_Abstract_Split (NW_Text_Abstract_t* thisObj, - NW_Text_Length_t index) -{ - NW_Text_Abstract_t* newText; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Text_Abstract_Class)); - NW_ASSERT (index < NW_Text_GetCharCount (thisObj)); - - /* create the new Text object */ - newText = (NW_Text_t*) - NW_Object_New (NW_Object_GetClass (thisObj), thisObj->storage, index, - thisObj->flags & NW_Text_Flags_TakeOwnership); - if (newText == NULL) { - return NULL; - } - - /* update our member variables */ - thisObj->storage = - (NW_Uint8*) thisObj->storage + NW_Text_Abstract_GetStorageSize (newText); - thisObj->characterCount = - (NW_Text_Length_t) (thisObj->characterCount - index); - thisObj->flags &= ~NW_Text_Flags_TakeOwnership; - - /* successful completion */ - return newText; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Abstract_t* -_NW_Text_Abstract_SplitOnSpace (NW_Text_Abstract_t* thisObj, - NW_Text_Length_t index, - NW_Text_Length_t *actualIndex) -{ - NW_Text_Abstract_t* newText; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Text_Abstract_Class)); - NW_ASSERT (index < NW_Text_GetCharCount (thisObj)); - NW_ASSERT(actualIndex != NULL); - - *actualIndex = NW_Text_GetSpaceAfter(thisObj, index); - if (*actualIndex == NW_Text_GetCharCount (thisObj)) - return NULL; - - /* create the new Text object */ - newText = (NW_Text_t*) - NW_Object_New (NW_Object_GetClass (thisObj), thisObj->storage, *actualIndex, - thisObj->flags & NW_Text_Flags_TakeOwnership); - if (newText == NULL) { - return NULL; - } - - /* update our member variables */ - thisObj->storage = - (NW_Uint8*) thisObj->storage + NW_Text_Abstract_GetStorageSize (newText); - thisObj->characterCount = - (NW_Text_Length_t) (thisObj->characterCount - (*actualIndex)); - thisObj->flags &= ~NW_Text_Flags_TakeOwnership; - - /* successful completion */ - return newText; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Text_Abstract_t* -NW_Text_New (NW_Uint32 encoding, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - switch (encoding) { - case HTTP_iso_10646_ucs_2: - return (NW_Text_Abstract_t*) - NW_Text_UCS2_New (storage, characterCount, flags); - - case HTTP_utf_8: - return (NW_Text_Abstract_t*) - NW_Text_UTF8_New (storage, characterCount, flags); - - case HTTP_iso_8859_1: - return (NW_Text_Abstract_t*) - NW_Text_Latin1_New (storage, characterCount, flags); - - case HTTP_us_ascii: - return (NW_Text_Abstract_t*) - NW_Text_ASCII_New (storage, characterCount, flags); - - default: - /* unsupported encoding */ - NW_ASSERT(encoding == 0); /* force debug to stop on error */ - /* if given ownership of storage but failed to create an object, delete the storage */ - if (storage != NULL && flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free (storage); - } - return NULL; - } -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Abstract_t* -NW_Text_NewFromStringAndDeleteString (NW_String_t* stringStr, - NW_Uint32 encoding) -{ - NW_Text_Abstract_t* textAbstract; - - /* parameter assertion block */ - NW_ASSERT(stringStr != NULL); - - /* */ - textAbstract = - NW_Text_New (encoding, NW_String_getStorage (stringStr), - NW_String_getCharCount (stringStr, encoding), - (NW_Uint8) (NW_String_getUserOwnsStorage (stringStr) ? - NW_Text_Flags_TakeOwnership : 0)); - - /* Storage was either owned and ownership passed to the NW_Text_Abstract_t or - it wasn't owned. Either way clear the owned bit, so storage - won't be freed. */ - NW_String_clearUserOwnsStorage(stringStr); - NW_String_delete (stringStr); - - return textAbstract; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -NW_Text_Concatenate(NW_Text_t* val1, NW_Text_t* val2) - { - NW_Ucs2* storage1 = NULL; - NW_Text_Length_t length1; - NW_Bool freeNeeded1 = NW_FALSE; - NW_Text_t* newText = NULL; - NW_Ucs2* storage2 = NULL; - NW_Text_Length_t length2; - NW_Bool freeNeeded2 = NW_FALSE; - - storage1 = NW_Text_GetUCS2Buffer (val1, NW_Text_Flags_NullTerminated | - NW_Text_Flags_CompressWhitespace, &length1, &freeNeeded1); - storage2 = - NW_Text_GetUCS2Buffer (val2, NW_Text_Flags_NullTerminated | NW_Text_Flags_CompressWhitespace, - &length2, &freeNeeded2); - if (storage1 && storage2) - { - NW_Ucs2* newStr = NW_Str_Newcat(storage1, storage2); - if (newStr) - { - newText = NW_Text_New (HTTP_iso_10646_ucs_2, newStr, NW_Str_Strlen(newStr), NW_Text_Flags_TakeOwnership); - if (!newText) - { - NW_Str_Delete(newStr); - } - } - } - if (freeNeeded1) - { - NW_Str_Delete(storage1); - } - if (freeNeeded2) - { - NW_Str_Delete(storage2); - } - return newText; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/NW_Text_FixedWidth.c --- a/webengine/wmlengine/src/text/src/NW_Text_FixedWidth.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Text_FixedWidthI.h" -#include "nw_text_fixedwidthiterator.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Text_FixedWidth_Class_t NW_Text_FixedWidth_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_Abstract_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_FixedWidth_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_FixedWidth_CreateIterator, - /* getStorageSize */ _NW_Text_FixedWidth_GetStorageSize, - /* getCharacterAt */ NULL, - /* getUCS2Buffer */ NULL, - /* getSpaceAfter */ NULL - }, - { /* NW_Text_FixedWidth */ - /* characterSize */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - NW_Text_Abstract methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_FixedWidth_CreateIterator (NW_Text_Abstract_t* abstractText, - NW_Text_Direction_t direction, - NW_Text_Iterator_t** iterator) -{ - *iterator = (NW_Text_Iterator_t*) - NW_Object_New (&NW_Text_FixedWidthIterator_Class, abstractText, direction); - if (*iterator == NULL) { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_Text_FixedWidth_GetStorageSize (const NW_Text_Abstract_t* abstractText) -{ - return abstractText->characterCount * - NW_Text_FixedWidth_GetCharacterSize (abstractText); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/NW_Text_VariableWidth.c --- a/webengine/wmlengine/src/text/src/NW_Text_VariableWidth.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "NW_Text_VariableWidthI.h" -#include "nw_text_variablewidthiterator.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_VariableWidth_Class_t NW_Text_VariableWidth_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_Abstract_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_VariableWidth_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_VariableWidth_CreateIterator, - /* getStorageSize */ _NW_Text_VariableWidth_GetStorageSize, - /* getCharacterAt */ _NW_Text_VariableWidth_GetCharacterAt, - /* getUCS2Buffer */ _NW_Text_Abstract_GetUCS2Buffer, - /* getSpaceAfter */ NULL - }, - { /* NW_Text_VariableWidth */ - /* readCharacter */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - NW_Text_Abstract methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_VariableWidth_CreateIterator (NW_Text_Abstract_t* abstractText, - NW_Text_Direction_t direction, - NW_Text_Iterator_t** iterator) -{ - *iterator = (NW_Text_Iterator_t*) - NW_Object_New (&NW_Text_VariableWidthIterator_Class, abstractText, - direction); - if (*iterator == NULL) { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint32 -_NW_Text_VariableWidth_GetStorageSize (const NW_Text_Abstract_t* abstractText) -{ - NW_Uint32 size; - NW_Text_Length_t index; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, - &NW_Text_VariableWidth_Class)); - - for (size = 0, index = 0; index < abstractText->characterCount; index++) { - TBrowserStatusCode status; - NW_Ucs4 character; - NW_Uint32 numBytes; - - status = NW_Text_VariableWidth_ReadCharacter (abstractText, size, - &character, &numBytes); - NW_ASSERT (status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - size += numBytes; - } - - return size; -} - -/* ------------------------------------------------------------------------- */ -NW_Ucs4 -_NW_Text_VariableWidth_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index) -{ - NW_Ucs4 character; - NW_Uint32 size; - NW_Text_Length_t count; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, &NW_Text_VariableWidth_Class)); - - /* iterate through the buffer, reading a character at a time until 'index' - characters have been read */ - character = '\0'; /* this will placate the compiler from complaining about - using a variable without an assignment */ - for (size = 0, count = 0; count <= index; count++) { - TBrowserStatusCode status; - NW_Uint32 numBytes; - - status = NW_Text_VariableWidth_ReadCharacter (abstractText, size, - &character, &numBytes); - NW_ASSERT (status == KBrsrSuccess); - /* To fix TI compiler warning */ - (void) status; - size += numBytes; - } - - return character; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/Text_Iterator.c --- a/webengine/wmlengine/src/text/src/Text_Iterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_iteratori.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_Iterator_Class_t NW_Text_Iterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_Iterator_t), - /* construct */ _NW_Text_Iterator_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Iterator */ - /* getNext */ NULL, - /* getOffset */ NULL, - /* setIndex */ NULL - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Iterator_Construct (NW_Object_Dynamic_t* dynamic, - va_list* argList) -{ - NW_Text_Iterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamic, &NW_Text_Iterator_Class)); - NW_ASSERT (argList != NULL); - - /* for convenience */ - thisObj = NW_Text_IteratorOf (dynamic); - - /* initialize the member variables */ - thisObj->text = va_arg (*argList, NW_Text_Abstract_t*); - thisObj->direction = va_arg (*argList, NW_Text_Direction_t); - - /* validate the input parameters */ - if (thisObj->text == NULL || - (thisObj->direction != NW_Text_Direction_Forward && - thisObj->direction != NW_Text_Direction_Backward)) { - return KBrsrBadInputParam; - } - - /* adjust the index if we are a reverse iterator */ - if (thisObj->direction == NW_Text_Direction_Backward) { - thisObj->index = - (NW_Text_Length_t) (NW_Text_GetCharCount (thisObj->text) - 1); - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - NW_Text_Iterator methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_Iterator_HasMore (NW_Text_Iterator_t* thisObj) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Text_Iterator_Class)); - - /* check to see if we've run out of entries */ - if (thisObj->index < NW_Text_GetCharCount (thisObj->text)) { - return KBrsrSuccess; - } - - /* no more entries */ - return KBrsrIterateDone; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/UCS2.c --- a/webengine/wmlengine/src/text/src/UCS2.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_ucs2i.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_UCS2_Class_t NW_Text_UCS2_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_FixedWidth_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_UCS2_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_FixedWidth_CreateIterator, - /* getStorageSize */ _NW_Text_FixedWidth_GetStorageSize, - /* getCharacterAt */ _NW_Text_UCS2_GetCharacterAt, - /* getUCS2Buffer */ _NW_Text_UCS2_GetUCS2Buffer, - /* getSpaceAfter */ _NW_Text_UCS2_GetSpaceAfter - }, - { /* NW_Text_FixedWidth */ - /* characterSize */ sizeof (NW_Ucs2) - }, - { /* NW_Text_UCS2 */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Ucs4 -_NW_Text_UCS2_GetCharacterAt (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index) -{ - NW_Ucs2 character; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, &NW_Text_UCS2_Class)); - - /* return the character */ - ((NW_Uint8*) &character)[0] = - ((NW_Uint8*) abstractText->storage)[index * sizeof (NW_Ucs2)]; - ((NW_Uint8*) &character)[1] = - ((NW_Uint8*) abstractText->storage)[index * sizeof (NW_Ucs2) + 1]; - return character; -} - -/* ------------------------------------------------------------------------- */ -NW_Ucs2* -_NW_Text_UCS2_GetUCS2Buffer (const NW_Text_Abstract_t* textAbstract, - NW_Uint16 flags, - NW_Text_Length_t* charCount, - NW_Bool* freeNeeded) -{ - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (textAbstract, &NW_Text_UCS2_Class)); - - if (flags & NW_Text_Flags_Copy || - textAbstract->flags & NW_Text_Flags_CompressWhitespace || - flags & NW_Text_Flags_CompressWhitespace || - (flags & NW_Text_Flags_Aligned && - (unsigned long) textAbstract->storage % sizeof (NW_Ucs2) != 0) || - (flags & NW_Text_Flags_NullTerminated && - !(textAbstract->flags & NW_Text_Flags_NullTerminated)) ) { - return _NW_Text_Abstract_GetUCS2Buffer (textAbstract, flags, charCount, - freeNeeded); - } - - /* we simply return the storage pointer */ - if (charCount != NULL) { - *charCount = textAbstract->characterCount; - } - if (freeNeeded != NULL) { - *freeNeeded = NW_FALSE; - } - return (NW_Ucs2*) textAbstract->storage; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Text_UCS2_t* -NW_Text_UCS2_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - NW_Text_UCS2_t* text; - - text = (NW_Text_UCS2_t*) - NW_Object_New (&NW_Text_UCS2_Class, storage, characterCount, (NW_Uint32) flags); - - /* if given ownership of storage but failed to create an object, delete the storage */ - if (text == NULL && flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free (storage); - } - - return text; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_UCS2_Initialize (NW_Text_UCS2_t* textUCS2, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - return NW_Object_Initialize (&NW_Text_UCS2_Class, textUCS2, storage, - characterCount, (NW_Uint32)flags); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_Length_t -_NW_Text_UCS2_GetSpaceAfter (const NW_Text_Abstract_t* textUCS2, - NW_Text_Length_t index) -{ - NW_Text_Length_t actualIndex = index; - NW_Uint8* storage; - NW_Uint32 len; - NW_ASSERT (NW_Object_IsInstanceOf (textUCS2, &NW_Text_UCS2_Class)); - len = NW_Text_GetCharCount(textUCS2); - storage = (NW_Uint8*)textUCS2->storage; - for (actualIndex = index; actualIndex < len; actualIndex++) - { - if ((storage[actualIndex * sizeof (NW_Ucs2) + 1] == 0) && - ((storage[actualIndex * sizeof (NW_Ucs2)] == 0x20) || - (storage[actualIndex * sizeof (NW_Ucs2)] == 0x2E) || - (storage[actualIndex * sizeof (NW_Ucs2)] == 0x09))) - return ++actualIndex; - } - return actualIndex; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/UTF8.c --- a/webengine/wmlengine/src/text/src/UTF8.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_utf8i.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_UTF8_Class_t NW_Text_UTF8_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_VariableWidth_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_UTF8_t), - /* construct */ _NW_Text_Abstract_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Abstract */ - /* createIterator */ _NW_Text_VariableWidth_CreateIterator, - /* getStorageSize */ _NW_Text_VariableWidth_GetStorageSize, - /* getCharacterAt */ _NW_Text_VariableWidth_GetCharacterAt, - /* getUCS2Buffer */ _NW_Text_Abstract_GetUCS2Buffer, - /* getSpaceAfter */ _NW_Text_UTF8_GetSpaceAfter - }, - { /* NW_Text_VariableWidth */ - /* readCharacter */ _NW_Text_UTF8_ReadCharacter - }, - { /* NW_Text_UTF8 */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_Text_VariableWidth methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_UTF8_ReadCharacter (NW_Text_VariableWidth_t* textVariableWidth, - NW_Int32 offset, - NW_Ucs4* character, - NW_Uint32* numBytes) -{ - /* avoid "unreferenced formal parameter" warnings */ - NW_REQUIRED_PARAM (textVariableWidth); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (textVariableWidth, &NW_Text_UTF8_Class)); - NW_ASSERT (character != NULL); - NW_ASSERT (numBytes != NULL); - - return - NW_Text_UTF8_Decode ((const NW_Uint8*) textVariableWidth->super.storage + offset, - character, numBytes); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_UTF8_t* -NW_Text_UTF8_New (void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - NW_Text_UTF8_t* text; - - text = (NW_Text_UTF8_t*) - NW_Object_New (&NW_Text_UTF8_Class, storage, characterCount, (NW_Uint32)flags); - - /* if given ownership of storage but failed to create an object, delete the storage */ - if (text == NULL && flags & NW_Text_Flags_TakeOwnership) { - NW_Mem_Free (storage); - } - - return text; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_UTF8_Initialize (NW_Text_UTF8_t* textUTF8, - void* storage, - NW_Text_Length_t characterCount, - NW_Uint16 flags) -{ - return NW_Object_Initialize (&NW_Text_UTF8_Class, textUTF8, storage, - characterCount, (NW_Uint32)flags); -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_UTF8_Decode (const NW_Uint8* buffer, - NW_Ucs4* character, - NW_Uint32* numBytes) -{ - NW_Uint8 mask; - - mask = (NW_Uint8) (buffer[0] >> 4 & 0x0F); - if (mask < 8) { - /* 1 byte */ - *character = buffer[0]; - *numBytes = 1; - } else if (mask == 0x0C || mask == 0x0D) { - /* 2 bytes */ - if ((buffer[1] & 0xC0) != 0x80) { - return KBrsrNotFound; - } - *character = ((buffer[0] & 0x1F) << 6) | (buffer[1] & 0x3F); - *numBytes = 2; - } else if (mask == 0x0E) { - /* 3 bytes */ - if ((buffer[1] & 0xC0) != 0x80 && (buffer[2] & 0xC0) != 0x80) { - return KBrsrNotFound; - } - *character = - (buffer[0] & 0x0F) << 12 | ((buffer[1] & 0x3F) << 6) | (buffer[2] & 0x3F); - *numBytes = 3; - } else { - return KBrsrNotFound; - } - - /* successful completion */ - return KBrsrSuccess; -} - -NW_Text_Length_t -_NW_Text_UTF8_GetSpaceAfter (const NW_Text_Abstract_t* abstractText, - NW_Text_Length_t index) -{ - NW_Text_Length_t actualIndex = index; - NW_Uint8* storage; - NW_Uint32 len; - NW_ASSERT (NW_Object_IsInstanceOf (abstractText, &NW_Text_UTF8_Class)); - len = abstractText->characterCount; - storage = (NW_Uint8*) abstractText->storage; - for (actualIndex = index + 1; actualIndex < len; actualIndex++) - { - if (*(storage + actualIndex - 1) < 0x80 && - (*(storage + actualIndex) == 0x20 || *(storage + actualIndex) == 0x2E || *(storage + actualIndex) == 0x09)) - return ++actualIndex; - } - return actualIndex; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/text/src/VariableWidthIterator.c --- a/webengine/wmlengine/src/text/src/VariableWidthIterator.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_variablewidthiteratori.h" -#include "NW_Text_VariableWidthI.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - static methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Text_VariableWidthIterator_StepBack (NW_Text_VariableWidthIterator_t* iterator) -{ - char* storage; - NW_Int32 delta; - - storage = (char*) NW_Text_Abstract_GetStorage (iterator->super.text); - NW_ASSERT (storage != NULL); - - for (delta = -1; delta > -4 && (storage[delta] & 0xC0) == 0x80; delta--) { - /* Do nothing */ - } - - if (delta < -1 && (storage[delta] & 0xC0) != 0xC0) { - return KBrsrUnexpectedError; - } - - iterator->offset -= delta; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - global data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Text_VariableWidthIterator_Class_t NW_Text_VariableWidthIterator_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Text_Iterator_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Base */ - /* secondaryList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Text_VariableWidthIterator_t), - /* construct */ _NW_Text_VariableWidthIterator_Construct, - /* destruct */ NULL - }, - { /* NW_Text_Iterator */ - /* getNext */ _NW_Text_VariableWidthIterator_GetNext, - /* getOffset */ _NW_Text_VariableWidthIterator_GetOffset, - /* setIndex */ _NW_Text_VariableWidthIterator_SetIndex - }, - { /* NW_Text_VariableWidthIterator */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - NW_Object_Dynamic methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_VariableWidthIterator_Construct (NW_Object_Dynamic_t* dynamic, - va_list* argList) -{ - NW_Text_VariableWidthIterator_t* thisObj; - TBrowserStatusCode status; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamic, - &NW_Text_VariableWidthIterator_Class)); - NW_ASSERT (argList != NULL); - - /* invoke our superclass constructor */ - status = _NW_Text_Iterator_Construct (dynamic, argList); - if (status != KBrsrSuccess) { - return status; - } - - /* for convenience */ - thisObj = NW_Text_VariableWidthIteratorOf (dynamic); - - /* initialize the member variables */ - if (thisObj->super.direction == NW_Text_Direction_Backward) { - thisObj->offset = NW_Text_Abstract_GetStorageSize (thisObj->super.text); - status = NW_Text_VariableWidthIterator_StepBack (thisObj); - if (status != KBrsrSuccess) { - return KBrsrUnexpectedError; - } - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - NW_Text_Iterator methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_VariableWidthIterator_GetNext (NW_Text_Iterator_t* iterator, - NW_Ucs4* character) -{ - NW_Text_VariableWidthIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, - &NW_Text_VariableWidthIterator_Class)); - - /* for convenience */ - thisObj = NW_Text_VariableWidthIteratorOf (iterator); - - NW_TRY (status) { - NW_Uint32 numBytes; - - /* ensure that there are more characters to get */ - status = NW_Text_Iterator_HasMore (iterator); - if (status == KBrsrIterateDone) { - NW_THROW (status); - } - NW_THROW_ON_ERROR (status); - - /* get the character */ - status = - NW_Text_VariableWidth_ReadCharacter (iterator->text, thisObj->offset, - character, &numBytes); - NW_THROW_ON_ERROR (status); - - /* adjust the pointer and index */ - if (iterator->direction == NW_Text_Direction_Forward) { - thisObj->offset += numBytes; - } else if (iterator->index > 0) { - status = NW_Text_VariableWidthIterator_StepBack (thisObj); - NW_THROW_ON_ERROR (status); - } - iterator->index = - (NW_Text_Length_t) (iterator->index + iterator->direction); - } - - NW_CATCH (status) { /* empty */ } - - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_VariableWidthIterator_GetOffset (NW_Text_Iterator_t* iterator, - NW_Uint32* offset) -{ - NW_Text_VariableWidthIterator_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (iterator, - &NW_Text_VariableWidthIterator_Class)); - - /* for convenience */ - thisObj = NW_Text_VariableWidthIteratorOf (iterator); - - /* set the offset */ - *offset = thisObj->offset; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Text_VariableWidthIterator_SetIndex (NW_Text_Iterator_t* iterator, - NW_Text_Length_t index) -{ - NW_Text_Direction_t oldDirection; - - oldDirection = iterator->direction; - NW_TRY (status) { - NW_Ucs4 character; - - iterator->direction = NW_Text_Direction_Forward; - while (index > iterator->index) { - status = NW_Text_Iterator_GetNext (iterator, &character); - NW_THROW_ON_ERROR (status); - } - - iterator->direction = NW_Text_Direction_Backward; - while (index < iterator->index) { - status = NW_Text_Iterator_GetNext (iterator, &character); - NW_THROW_ON_ERROR (status); - } - } - - NW_CATCH (status) { /* finally */ } - - NW_FINALLY { - iterator->direction = oldDirection; - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/nwx_http_defs.h --- a/webengine/wmlengine/src/urlloader/include/nwx_http_defs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,583 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -#ifndef NW_HTTP_DEFS_H -#define NW_HTTP_DEFS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Content Type Strings */ -extern const unsigned char HTTP_all_all_string[]; -extern const unsigned char HTTP_text_all_string[]; -extern const unsigned char HTTP_text_html_string[]; -extern const unsigned char HTTP_text_plain_string[]; -extern const unsigned char HTTP_text_x_hdml_string[]; -extern const unsigned char HTTP_text_x_ttml_string[]; -extern const unsigned char HTTP_text_x_vCalendar_string[]; -extern const unsigned char HTTP_text_x_vCard_string[]; -extern const unsigned char HTTP_text_vnd_wap_wml_string[]; -extern const unsigned char HTTP_text_vnd_wap_wmlscript_string[]; -extern const unsigned char HTTP_application_x_javascript_string[]; -extern const unsigned char HTTP_text_javascript_string[]; -extern const unsigned char HTTP_text_ecmascript_string[]; - -extern const unsigned char HTTP_text_vnd_wap_wta_event_string[]; -extern const unsigned char HTTP_multipart_all_string[]; -extern const unsigned char HTTP_multipart_mixed_string[]; -extern const unsigned char HTTP_multipart_form_data_string[]; -extern const unsigned char HTTP_multipart_byteranges_string[]; -extern const unsigned char HTTP_multipart_alternative_string[]; -extern const unsigned char HTTP_application_all_string[]; -extern const unsigned char HTTP_application_java_vm_string[]; -extern const unsigned char HTTP_application_x_www_form_urlencoded_string[]; -extern const unsigned char HTTP_application_x_hdmlc_string[]; -extern const unsigned char HTTP_application_vnd_wap_wml_plus_xml_string[]; -extern const unsigned char HTTP_application_vnd_wap_wmlc_string[]; -extern const unsigned char HTTP_application_vnd_wap_wmlscriptc_string[]; -extern const unsigned char HTTP_application_vnd_wap_wta_eventc_string[]; -extern const unsigned char HTTP_application_vnd_wap_uaprof_string[]; -extern const unsigned char HTTP_application_vnd_wap_wtls_ca_certificate_string[]; -extern const unsigned char HTTP_application_vnd_wap_wtls_user_certificate_string[]; -extern const unsigned char HTTP_application_x_x509_ca_cert_string[]; -extern const unsigned char HTTP_application_x_x509_user_cert_string[]; -extern const unsigned char HTTP_image_string[]; -extern const unsigned char HTTP_image_all_string[]; -extern const unsigned char HTTP_image_bmp_string[]; -extern const unsigned char HTTP_image_gif_string[]; -extern const unsigned char HTTP_image_jpeg_string[]; -extern const unsigned char HTTP_image_tiff_string[]; -extern const unsigned char HTTP_image_png_string[]; -extern const unsigned char HTTP_image_vnd_wap_wbmp_string[]; -extern const unsigned char HTTP_image_vnd_nokia_ota_bitmap_string[]; -extern const unsigned char HTTP_image_x_ota_bitmap_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_all_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_mixed_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_form_data_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_byteranges_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_alternative_string[]; -extern const unsigned char HTTP_application_xml_string[]; -extern const unsigned char HTTP_text_xml_string[]; -extern const unsigned char HTTP_application_vnd_wap_wbxml_string[]; -extern const unsigned char HTTP_application_x_x968_cross_cert_string[]; -extern const unsigned char HTTP_application_x_x968_ca_cert_string[]; -extern const unsigned char HTTP_application_x_x968_user_cert_string[]; -extern const unsigned char HTTP_text_vnd_wap_si_string[]; -extern const unsigned char HTTP_application_vnd_wap_sic_string[]; -extern const unsigned char HTTP_text_vnd_wap_sl_string[]; -extern const unsigned char HTTP_application_vnd_wap_slc_string[]; -extern const unsigned char HTTP_text_vnd_wap_co_string[]; -extern const unsigned char HTTP_application_vnd_wap_coc_string[]; -extern const unsigned char HTTP_application_vnd_wap_multipart_related_string[]; -extern const unsigned char HTTP_application_vnd_wap_sia_string[]; -extern const unsigned char HTTP_text_vnd_wap_connectivity_xml_string[]; -extern const unsigned char HTTP_application_vnd_wap_connectivity_wbxml_string[]; -extern const unsigned char HTTP_application_pkcs7_mime_string[]; -extern const unsigned char HTTP_application_vnd_wap_hashed_certificate_string[]; -extern const unsigned char HTTP_application_vnd_wap_signed_certificate_string[]; -extern const unsigned char HTTP_application_vnd_wap_cert_response_string[]; -extern const unsigned char HTTP_application_xhtml_xml_string[]; -extern const unsigned char HTTP_application_wml_xml_string[]; -extern const unsigned char HTTP_text_css_string[]; -extern const unsigned char HTTP_application_vnd_wap_mms_message_string[]; -extern const unsigned char HTTP_application_vnd_wap_rollover_certificate_string[]; -extern const unsigned char HTTP_text_x_co_desc_string[]; -extern const unsigned char HTTP_application_vnd_wap_xhtml_xml_string[]; - -extern const unsigned char HTTP_application_vnd_wap_syncml_wbxml_string[]; -extern const unsigned char HTTP_application_vnd_nokia_ringing_tone_string[]; -extern const unsigned char HTTP_application_x_nokiagamedata_string[]; - -/* Nokia defined content types string for ota push */ -extern const unsigned char HTTP_application_wap_prov_browser_settings_string[]; -extern const unsigned char HTTP_application_wap_prov_browser_bookmarks_string[]; - -extern const unsigned char HTTP_application_xhtml_xml_saved_string[]; -extern const unsigned char HTTP_application_wmlc_saved_string[]; -extern const unsigned char HTTP_application_saved_string[]; - -#ifdef __TEST_TESTHARNESS_ENABLED -extern const unsigned char HTTP_application_x_nokia_test_harness_string[]; -#endif - - -/* End Content Type */ - -// Charset strings -extern const char NW_Utf8_CharsetStr[]; -extern const char NW_UsAscii_CharsetStr[]; -extern const char NW_Iso10646Ucs2_CharsetStr[]; -extern const char NW_Ucs2_CharsetStr[]; -extern const char NW_Big5_CharsetStr[]; -extern const char NW_Gb2312_CharsetStr[]; -extern const char NW_Windows1255_CharsetStr[]; -extern const char NW_Windows1256_CharsetStr[]; -extern const char NW_Iso88591_CharsetStr[]; -extern const char NW_Iso88592_CharsetStr[]; -extern const char NW_Iso88593_CharsetStr[]; -extern const char NW_Iso88594_CharsetStr[]; -extern const char NW_Iso88595_CharsetStr[]; -extern const char NW_Iso88596_CharsetStr[]; -extern const char NW_Iso88597_CharsetStr[]; -extern const char NW_Iso88598_CharsetStr[]; -extern const char NW_Iso88598i_CharsetStr[]; -extern const char NW_Iso88599_CharsetStr[]; -extern const char NW_Iso885915_CharsetStr[]; -extern const char NW_Windows1250_CharsetStr[]; -extern const char NW_Windows1251_CharsetStr[]; -extern const char NW_Windows1252_CharsetStr[]; -extern const char NW_Windows1253_CharsetStr[]; -extern const char NW_Windows1254_CharsetStr[]; -extern const char NW_Windows1257_CharsetStr[]; -extern const char NW_Tis_620_CharsetStr[]; -extern const char NW_Unicode_CharsetStr[]; -extern const char NW_ShiftJis_CharsetStr[]; -extern const char NW_ShiftJis_CharsetStr2[]; -extern const char NW_X_SJis_CharsetStr[]; -extern const char NW_JisX0201_1997_CharsetStr[]; -extern const char NW_JisX0208_1997_CharsetStr[]; -extern const char NW_EucJp_CharsetStr[]; -extern const char NW_X_EucJp_CharsetStr[]; -extern const char NW_Iso2022Jp_CharsetStr[]; -extern const char NW_Windows874_CharsetStr[]; -extern const char NW_Koi8r_CharsetStr[]; -extern const char NW_Koi8u_CharsetStr[]; - -extern const char NW_EucKr_CharsetStr[]; -extern const char NW_ksc5601_1987_CharsetStr[]; - -/* Character set */ -#define HTTP_gb2312 0x07E9 -#define HTTP_big5 0x07EA -#define HTTP_iso_10646_ucs_2 0x03E8 -#define HTTP_iso_8859_1 0x04 -#define HTTP_iso_8859_2 0x05 -#define HTTP_iso_8859_3 0x06 -#define HTTP_iso_8859_4 0x07 -#define HTTP_iso_8859_5 0x08 -#define HTTP_iso_8859_6 0x09 -#define HTTP_iso_8859_7 0x0A -#define HTTP_iso_8859_8 0x0B -#define HTTP_iso_8859_9 0x0C -#define HTTP_shift_JIS 0x11 -#define HTTP_us_ascii 0x03 -#define HTTP_utf_8 0x6A -#define HTTP_utf_16 1015 -#define HTTP_utf_7 1012 -#define HTTP_utf_16be 1013 -#define HTTP_utf_16le 1014 -#define HTTP_windows_1255 0x08CF -#define HTTP_windows_1256 0x08D0 -#define HTTP_windows_1250 0x08CA -#define HTTP_windows_1251 0x08CB -#define HTTP_windows_1253 0x08CD -#define HTTP_windows_1254 0x08CE -#define HTTP_windows_1257 0x08D1 -#define HTTP_tis_620 0x08D3 -#define HTTP_jis_x0201_1997 0x0F -#define HTTP_jis_x0208_1997 0x3F -#define HTTP_euc_jp 0x12 -#define HTTP_iso_2022_jp 0x27 -#define HTTP_windows_874 0x07E0 -#define HTTP_Koi8_r 0x0824 -#define HTTP_Koi8_u 0x0828 - - #define HTTP_euc_kr 0x0026 - #define HTTP_ksc_5601 0x0024 - -#define HTTP_undefined 0xFD /* Nokia specific thingie */ -#define HTTP_unknown 0xFE /* Nokia specific thingie */ - -/* HTTP Headers names */ -#define HTTP_ANY 0x00 -#define HTTP_Accept 0x80 -#define HTTP_AcceptCharset 0x81 -#define HTTP_AcceptEncoding 0x82 -#define HTTP_AcceptLanguage 0x83 -#define HTTP_AcceptRanges 0x84 -#define HTTP_Age 0x85 -#define HTTP_Allow 0x86 -#define HTTP_Authorization 0x87 -#define HTTP_CacheControl 0x88 -#define HTTP_Connection 0x89 -#define HTTP_ContentBase 0x8A -#define HTTP_ContentEncoding 0x8B -#define HTTP_ContentLanguage 0x8C -#define HTTP_ContentLength 0x8D -#define HTTP_ContentLocation 0x8E -#define HTTP_ContentMD5 0x8F -#define HTTP_ContentRange 0x90 -#define HTTP_ContentType 0x91 -#define HTTP_Date 0x92 -#define HTTP_Etag 0x93 -#define HTTP_Expires 0x94 -#define HTTP_From 0x95 -#define HTTP_Host 0x96 -#define HTTP_IfModifiedSince 0x97 -#define HTTP_IfMatch 0x98 -#define HTTP_IfNoneMatch 0x99 -#define HTTP_IfRange 0x9A -#define HTTP_IfUnmodifiedSince 0x9B -#define HTTP_Location 0x9C -#define HTTP_LastModified 0x9D -#define HTTP_MaxForwards 0x9E -#define HTTP_Pragma 0x9F -#define HTTP_ProxyAuthenticate 0xA0 -#define HTTP_ProxyAuthorization 0xA1 -#define HTTP_Public 0xA2 -#define HTTP_Range 0xA3 -#define HTTP_Referer 0xA4 -#define HTTP_RetryAfter 0xA5 -#define HTTP_Server 0xA6 -#define HTTP_TransferEncoding 0xA7 -#define HTTP_Upgrade 0xA8 -#define HTTP_UserAgent 0xA9 -#define HTTP_Vary 0xAA -#define HTTP_Via 0xAB -#define HTTP_Warning 0xAC -#define HTTP_WWWAuthenticate 0xAD -#define HTTP_Content_Disposition 0xAE -#define HTTP_ApplicationId 0xAF -#define HTTP_ContentUri 0xB0 -#define HTTP_InitiatorUri 0xB1 -#define HTTP_AcceptApplication 0xB2 -#define HTTP_BearerIndication 0xB3 -#define HTTP_PushFlag 0xB4 -#define HTTP_UAProf 0xB5 -#define HTTP_UAProfDiff 0xB6 -#define HTTP_UAProfileWarning 0xB7 -#define HTTP_XWapTod 0xBF - -/* The x-wap.tod header is also defined here as a full HTTP string because we - need to use it while our header encoding version stays at 1.2 */ -#define STR_HTTP_XWAP_TOD "x-wap.tod" - -#define HTTP_SetCookie 0xC1 -#define HTTP_Cookie 0xC2 -/* For codes 0xB8(0x38) through 0xC3(0x44) see WSP spec. */ -#define HTTP_XwapSecurity 0xC4 - -#define HTTP_SPECIAL_textext_header 0xFF01 -#define HTTP_SPECIAL_inttext_header 0xFF02 - -/* Cache-Control */ -#define HTTP_CC_No_cache 0x00 -#define HTTP_CC_No_store 0x01 -#define HTTP_CC_Max_age 0x02 -#define HTTP_CC_Max_stale 0x03 -#define HTTP_CC_Min_fresh 0x04 -#define HTTP_CC_Only_if_cached 0x05 -#define HTTP_CC_Public 0x06 -#define HTTP_CC_Private 0x07 -#define HTTP_CC_No_transform 0x08 -#define HTTP_CC_Must_revalidate 0x09 -#define HTTP_CC_Proxy_revalidate 0x0A -#define HTTP_CC_Cache_extension 0x0F00 - -/* Parameter names */ -#define HTTP_Q 0x80 -#define HTTP_Charset 0x81 -#define HTTP_Level 0x82 -#define HTTP_Type 0x83 -#define HTTP_Uaprof 0x84 -#define HTTP_Name 0x85 -#define HTTP_Filename 0x86 -#define HTTP_Differences 0x87 -#define HTTP_Padding 0x88 - -/* Language names */ -#define HTTP_Afar 0x01 -#define HTTP_Abkhazian 0x02 -#define HTTP_Afrikaans 0x03 -#define HTTP_Amharic 0x04 -#define HTTP_Arabic 0x05 -#define HTTP_Assamese 0x06 -#define HTTP_Aymara 0x07 -#define HTTP_Azerbaijani 0x08 -#define HTTP_Bashkir 0x09 -#define HTTP_Byelorussian 0x0A -#define HTTP_Bulgarian 0x0B -#define HTTP_Bihari 0x0C -#define HTTP_Bislama 0x0D -#define HTTP_Bengali 0x0E -#define HTTP_Tibetan 0x0F -#define HTTP_Breton 0x10 -#define HTTP_Catalan 0x11 -#define HTTP_Corsican 0x12 -#define HTTP_Czech 0x13 -#define HTTP_Welsh 0x14 -#define HTTP_Danish 0x15 -#define HTTP_German 0x16 -#define HTTP_Bhutani 0x17 -#define HTTP_Greek 0x18 -#define HTTP_English 0x19 -#define HTTP_Esperanto 0x1A -#define HTTP_Spanish 0x1B -#define HTTP_Estonian 0x1C -#define HTTP_Basque 0x1D -#define HTTP_Persian 0x1E -#define HTTP_Finnish 0x1F -#define HTTP_Fiji 0x20 -#define HTTP_Faeroese 0x82 -#define HTTP_French 0x22 -#define HTTP_Frisian 0x83 -#define HTTP_Irish 0x24 -#define HTTP_Scots_Gaelic 0x25 -#define HTTP_Galician 0x26 -#define HTTP_Guarani 0x27 -#define HTTP_Gujarati 0x28 -#define HTTP_Hausa 0x29 -#define HTTP_Hebrew 0x2A -#define HTTP_Hindi 0x2B -#define HTTP_Croatian 0x2C -#define HTTP_Hungarian 0x2D -#define HTTP_Armenian 0x2E -#define HTTP_Interlingua 0x84 -#define HTTP_Indonesian 0x30 -#define HTTP_Interlingue 0x86 -#define HTTP_Inupiak 0x87 -#define HTTP_Icelandic 0x33 -#define HTTP_Italian 0x34 -#define HTTP_Inuktitut 0x89 -#define HTTP_Japanese 0x36 -#define HTTP_Javanese 0x37 -#define HTTP_Georgian 0x38 -#define HTTP_Kazakh 0x39 -#define HTTP_Greenlandic 0x8A -#define HTTP_Cambodian 0x3B -#define HTTP_Kannada 0x3C -#define HTTP_Korean 0x3D -#define HTTP_Kashmiri 0x3E -#define HTTP_Kurdish 0x3F -#define HTTP_Kirghiz 0x40 -#define HTTP_Latin 0x8B -#define HTTP_Lingala 0x42 -#define HTTP_Laothian 0x43 -#define HTTP_Lithuanian 0x44 -#define HTTP_Lettish 0x45 -#define HTTP_Malagasy 0x46 -#define HTTP_Maori 0x47 -#define HTTP_Macedonian 0x48 -#define HTTP_Malayalam 0x49 -#define HTTP_Mongolian 0x4A -#define HTTP_Moldavian 0x4B -#define HTTP_Marathi 0x4C -#define HTTP_Malay 0x4D -#define HTTP_Maltese 0x4E -#define HTTP_Burmese 0x4F -#define HTTP_Nauru 0x81 -#define HTTP_Nepali 0x51 -#define HTTP_Dutch 0x52 -#define HTTP_Norwegian 0x53 -#define HTTP_Occitan 0x54 -#define HTTP_Oromo 0x55 -#define HTTP_Oriya 0x56 -#define HTTP_Punjabi 0x57 -#define HTTP_Polish 0x58 -#define HTTP_Pashto 0x59 -#define HTTP_Portuguese 0x5A -#define HTTP_Quechua 0x5B -#define HTTP_Rhaeto_Romance 0x8C -#define HTTP_Kirundi 0x5D -#define HTTP_Romanian 0x5E -#define HTTP_Russian 0x5F -#define HTTP_Kinyarwanda 0x60 -#define HTTP_Sanskrit 0x61 -#define HTTP_Sindhi 0x62 -#define HTTP_Sangho 0x63 -#define HTTP_Serbo_Croatian 0x64 -#define HTTP_Sinhalese 0x65 -#define HTTP_Slovak 0x66 -#define HTTP_Slovenian 0x67 -#define HTTP_Samoan 0x68 -#define HTTP_Shona 0x69 -#define HTTP_Somali 0x6A -#define HTTP_Albanian 0x6B -#define HTTP_Serbian 0x6C -#define HTTP_Siswati 0x6D -#define HTTP_Sesotho 0x6E -#define HTTP_Sundanese 0x6F -#define HTTP_Swedish 0x70 -#define HTTP_Swahili 0x71 -#define HTTP_Tamil 0x72 -#define HTTP_Telugu 0x73 -#define HTTP_Tajik 0x74 -#define HTTP_Thai 0x75 -#define HTTP_Tigrinya 0x76 -#define HTTP_Turkmen 0x77 -#define HTTP_Tagalog 0x78 -#define HTTP_Setswana 0x79 -#define HTTP_Tonga 0x7A -#define HTTP_Turkish 0x7B -#define HTTP_Tsonga 0x7C -#define HTTP_Tatar 0x7D -#define HTTP_Twi 0x7E -#define HTTP_Uighur 0x7F -#define HTTP_Ukrainian 0x50 -#define HTTP_Urdu 0x21 -#define HTTP_Uzbek 0x23 -#define HTTP_Vietnamese 0x2F -#define HTTP_Volapuk 0x85 -#define HTTP_Wolof 0x31 -#define HTTP_Xhosa 0x32 -#define HTTP_Yiddish 0x88 -#define HTTP_Yoruba 0x35 -#define HTTP_Zhuang 0x3A -#define HTTP_Chinese 0x41 -#define HTTP_Zulu 0x5C - -/* Content encoding names */ -#define HTTP_None 0xff -#define HTTP_Gzip 0x00 -#define HTTP_Compress 0x01 -#define HTTP_Deflate 0x02 - -/* x-wap-security parameters */ -#define HTTP_CloseSubordinate 0x80 - -// Encoding -// IMPORTANT: Sync with \browser\settingsinc\settingscontainer.h -// The order of these enums can NOT be changed -enum TEncoding - { - EGb2312, - EISO8859_1, - EBig5, - EUTF8, - EISO8859_2, - EISO8859_4, - EISO8859_5, - EISO8859_7, - EISO8859_9, - EISO8859_8i, - EISO8859_8, - EISO8859_6, - EWindows1256, - EWindows1255, - EWindows1250, - EWindows1251, - EWindows1253, - EWindows1254, - EWindows1257, - EAutomatic, - EISO10646_UCS_2, - ETis620, - EShiftJis, - EJisX0201_1997, - EJisX0208_1997, - EEucJp, - EIso2022Jp, - EWindows874, - EKoi8_r, - EKoi8_u, - EEucKr, - EKsc_5601, - EDummyLast - }; - -#define NW_URL_METHOD_GET 0x40 -#define NW_URL_METHOD_OPTIONS 0x41 -#define NW_URL_METHOD_HEAD 0x42 -#define NW_URL_METHOD_DELETE 0x43 -#define NW_URL_METHOD_TRACE 0x44 -#define NW_URL_METHOD_POST 0x60 -#define NW_URL_METHOD_PUT 0x61 -#define NW_URL_METHOD_DATA 0x62 - -#define SwitchingProtocols 101 -#define ContentStale 102 /* Should be 110 */ - -/* Success */ -#define Success 200 -#define Created 201 -#define Accepted 202 -#define NonAuthInfo 203 -#define NoContent 204 -#define ResetContent 205 -#define PartialContent 206 - -/* Redirects */ -#define MultipleChoices 300 -#define MovedPerm 301 -#define MovedTemp 302 -#define SeeOther 303 -#define NotModified 304 -#define UseProxy 305 - -/* User agent erros */ -#define BadRequest 400 -#define Unauthorized 401 -#define PaymentRequired 402 -#define Forbidden 403 -#define NotFound 404 -#define MethodNotAllowed 405 -#define NotAcceptable 406 -#define ProxyAuth 407 -#define RequestTimeOut 408 -#define Conflict 409 -#define Gone 410 -#define LengthRequired 411 -#define PreconditionFailed 412 -#define EntityTooLarge 413 -#define URLTooLarge 414 -#define UnsupportedMedia 415 - -/* Server errors. */ -#define ServerError 500 -#define NotImplemented 501 -#define BadGateway 502 -#define ServiceUnavailable 503 -#define GatewayTimeout 504 -#define HTTPVerNotSupported 505 - - -/* HTTP Default Headers */ -#define NW_DEFAULTHEADERS_NOTANY 0x00 -#define NW_DEFAULTHEADERS_CONTENT 0x01 -#define NW_DEFAULTHEADERS_CHARSET 0x02 -#define NW_DEFAULTHEADERS_LANG 0x04 -#define NW_DEFAULTHEADERS_ALL 0x07 - -/* Other names */ -#define HTTP_Chunked 0x00 -#define NW_DEFAULT_CONTENTTYPE HTTP_application_vnd_wap_wmlc -#define NW_DEFAULT_CHARSET HTTP_iso_8859_1 - -#define SAVED_DECK_VERSION "SavedDeck Ver 2.0" - -/* These types are for optimized accept headers */ -#define NW_UrlRequest_Type_Any 1 /* Any type */ -#define NW_UrlRequest_Type_Image 2 /* Load an image type */ -#define NW_UrlRequest_Type_Css 3 /* Load a stylesheet type */ -#define NW_UrlRequest_Type_JavaScript 4 /* JavaScript type */ -#define NW_UrlRequest_Type_Plugin 5 /* Load plugin resource */ -#define NW_UrlRequest_Type_None 6 /* No content types */ - -/* Byte order: big-endian or little-endian for 2-byte charset or single byte */ -#define NW_BYTEORDER_SINGLE_BYTE 0 -#define NW_BYTEORDER_BIG_ENDIAN 1 -#define NW_BYTEORDER_LITTLE_ENDIAN 2 -// The native byte order is little endian. -#define NW_BYTEORDER_NATIVE NW_BYTEORDER_LITTLE_ENDIAN - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_HTTP_DEFS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/nwx_http_header.h --- a/webengine/wmlengine/src/urlloader/include/nwx_http_header.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: HTTP commonly used constants - - Version: V1.0 - - Description: - Definintions of commonly used HTTP constants. - -******************************************************************/ - -#ifndef NW_HTTP_HEADER_H -#define NW_HTTP_HEADER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_Http_Header_t void -#define NW_Http_ContentTypeString_t NW_Uint8* -#define NW_Http_CharSet_t NW_Uint16 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_HTTP_HEADER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_curlloader.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_curlloader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - - -#ifndef CKUrlLoader_H -#define CKUrlLoader_H - -// INCLUDES -#include "urlloader_murlschemehandler.h" -#include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" - - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class MBrCtlSpecialLoadObserver; -class MHttpLoader_LinkResolverCallbacks; -class CWmlResourceLoadListener; -class MWmlInterface; - -// CLASS DECLARATION -/** -* Url loader implementation class. -* -* @lib urlloader.lib -* @since 2.0 -*/ -class CKUrlLoader : public MUrlSchemeHandler -{ -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CKUrlLoader* NewL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, - MWmlInterface* aWKWmlInterface); - - /** - * Destructor. - */ - virtual ~CKUrlLoader(); - -public: // New functions - - - /** - * Make a generic load request - * @since 2.0 - * @param aUrl The request URL. - * @param aHeader The request headers or NULL if no request specific headers - * @param aData The body and body length of the request - * @param aMethod The method to use for the request could be - * NW_URL_METHOD_GET or NW_URL_METHOD_POST - * @param aTransId The request's transaction id - * @param aLoadContext Load context that should be returned with the response - * @param aLoadCallback The callback to call when the response is ready - * @param aPartialLoadCallback The callback to call when a chunk is ready - * @param aCacheMode The cache mode is relevant only in case of http or https - * @param aDefaultHeadersMask Flag indicating what default headers should be used - * @param aLoadType The load type - * @param aIsTopLevel Boolean denoting if this url is top level (not images, css) - * @return TBrowserStatusCode - */ - TBrowserStatusCode LoadRequest(const TUint16* aUrl, void* aHeader, TUint8* aData, - TUint aDataLen, TUint8 aMethod, TUint16* aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, TUint aDefaultHeadersMask, - TUint8 aLoadType, TBool aIsTopLevel, TBool aIsScript, - NW_Uint8 aReason, void* aLoadData); - - - -public: // Functions from base classes - - /** - * From MUrlSchemeHandler If the url scheme is not http, https or file, - * send the request to the application architecture. - * @since 2.0 - * @param aUrl The request URL. - * @param aHeader The request headers or NULL if no request specific headers - * @param aData The body and body length of the request - * @param aMethod The method to use for the request could be - * NW_URL_METHOD_GET or NW_URL_METHOD_POST - * @param aTransId The request's transaction id - * @param aLoadContext Load context that should be returned with the response - * @param aLoadCallback The callback to call when the response is ready - * @param aPartialLoadCallback The callback to call when a chunk is ready - * @param aCacheMode The cache mode is relevant only in case of http or https - * @param aDefaultHeadersMask Flag indicating what default headers should be used - * @param aLoadType The load type - * @param aIsTopLevel Boolean denoting if this url is top level (not images, css) - * @param aIsScript Is it a WmlScript load event? - * @return ETrue if processed the load request, EFalse otherwise - */ - virtual TBool HandleLoadRequestL(const TUint16* aUrl, void* aHeader, - TPtr8& aData, TUint8 aMethod, TUint16 aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, - TUint aDefaultHeadersMask, - TUint8 aLoadType, TBool aIsTopLevel, - TBool aIsScript, NW_Uint8 aReason, - void* aLoadData); - - /** - * Checks if the specified url is in the cache - * @since 3.1 - * @param aUrl The url of the page - * @return TBool ETrue, if url is in the cache, otherwise EFalse - */ - TBool IsUrlInCache(const TUint16* aUrl); - -private: - - /** - * C++ default constructor. - */ - CKUrlLoader(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, MWmlInterface* aWKWmlInterface); - - /** - * SetOnEnterBackward - * @since 3.1 - * @param aOnEnterBackward The OnEnterBackward event value - */ - void SetOnEnterBackward(TBool aOnEnterBackward){iOnEnterBackward = aOnEnterBackward;} - - void SetOnEnterForward(TBool aOnEnterForward){iOnEnterForward = aOnEnterForward;} - /** - * OnEnterBackward - * @since 3.1 - * @return ETrue if processed the OnEnterBackward event, EFalse otherwise - */ - TBool OnEnterBackward(){return iOnEnterBackward;} - TBool OnEnterForward() {return iOnEnterForward;} - -public: // Data - - - // The capabilities that are supported by the "Browser As Plugin". - // This is passed in as a TUint, but maps to TBrCtlDefs::TBrCtlCapabilities. - TUint iCapabilities; - -private: // Data - - // A pointer to File loader - MUrlSchemeHandler* iFileLoader; - // A popinter to SpecialLoadObserver - MBrCtlSpecialLoadObserver* iSpecialLoadObserver; - // The next transaction id to use - TUint16 iTransId; - //The back link to BrCtl - MHttpLoader_LinkResolverCallbacks* iLinkCallbacks; - // - CWmlResourceLoadListener* iResHandle; - // - TBool iOnEnterBackward; - TBool iOnEnterForward; - MWmlInterface* iWKWmlInterface; //Does not own - -}; - -#endif // CKUrlLoader_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_loaderutils.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_loaderutils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -#ifndef LOADERUTILS_H -#define LOADERUTILS_H - -// INCLUDES -#include <e32def.h> -#include "BrsrStatusCodes.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES -typedef enum { - ELogTypeRequest, - ELogTypeResponse, - ELogTypeFailedResponse, - ELogTypeSavedDeck -} TUrlLoaderLogType; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Utilities used by url loader. -* -* @lib urlloader.lib -* @since 2.0 -*/ -class LoaderUtils -{ - -public: // New functions - - /** - * General purpose panic function for url loader related errors. - * @since 2.0 - * @param aError The reason for panic. Could be left out. - * @return void - */ - static void PanicLoader(TInt aError = KErrNone); - - /** - * Map the Symbian errors to rainbow errors. - * @since 2.0 - * @param aError The Symbian error code. - * @return The matching Rainbow error code - */ - static TBrowserStatusCode MapErrors(TInt aError); - - /** - * Log the request and the response. - * @since 2.0 - * @param aUrlLoaderLogType The log type ELogTypeRequest or ELogTypeResponse. - * @return void - */ - static void LogLoaderEvents(TUrlLoaderLogType aUrlLoaderLogType, ...); -}; - -#endif // LOADERUTILS_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_murlschemehandler.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_murlschemehandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -#ifndef MURLSCHEMEHANDLER_H -#define MURLSCHEMEHANDLER_H - -// INCLUDES -#include <e32std.h> -#include <e32base.h> -#include "urlloader_loaderutils.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Base class for all loaders. -* -* @lib urlloader.lib -* @since 2.0 -*/ -class MUrlSchemeHandler : public CBase -{ - -public: // New functions - - /** - * Make a generic load request - * @since 2.0 - * @param aUrl The request URL. - * @param aHeader The request headers or NULL if no request specific headers. - * @param aData The body and body length of the request. - * @param aMethod The method to use for the request could be - * NW_URL_METHOD_GET or NW_URL_METHOD_POST. - * @param aTransId The request's transaction id. - * @param aLoadContext The load context that should be returned with the response. - * @param aLoadCallback The callback to call when the response is ready. - * @param aPartialLoadCallback The callback to call when a chunk is ready. - * @param aCacheMode The cache mode. It is relevant only in case of http or https. - * @param aDefaultHeadersMask A flag indicating what default headers should be used. - * @param aLoadType The load type - * @param aIsTopLevel A boolean denoting if this url is top level (page, not images) - * @param aIsScript Is it a WmlScript load event? - * @return ETrue if processed the load request, EFalse otherwise - */ - virtual TBool HandleLoadRequestL(const TUint16* aUrl, void* aHeader, TPtr8& aData, - TUint8 aMethod, TUint16 aTransId, void* aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, TUint aDefaultHeadersMask, - TUint8 aLoadType, TBool aIsTopLevel, TBool aIsScript, - NW_Uint8 aReason, void* aLoadData) = 0; - - /** - * Call the partial response callback with a chunk. - * @since 2.0 - * @param aUri The response URL. - * @param aBody The response body - * @param aHeaders The response headers. Currently this is always NULL. - * @param aContentType The content type. - * @param aContentLocationString The content location string. - * @param aNoStore "no-store" indicator prevents saving images. - * @param aBoundaryString The boundary. - * @param aCharset The character set. - * @param aCharsetString The character set. - * @param aHttpStatus The Http status code. - * @param aMethod The method NW_URL_METHOD_GET or NW_URL_METHOD_POST . - * @param aTransId The transaction id. - * @param aContentLength The content length of the response. Used only for HEAD requests. - * @param aErr The status of the response - * @param aLoadContext The context that was passed with the request. - * @param aPartialCallback The callback to call when a chunk is ready. - * @return TBrowserStatusCode status of the partial buffer processing - */ - inline TBrowserStatusCode PartialResponse(const TUint16* aUri, TPtr8& aBody, - void* aHeaders, TUint8* aContentTypeString, - TUint8* aContentLocationString, NW_Bool aNoStore, TUint8* aBoundaryString, TUint16* aLastModified, - TUint16 aCharset, TUint8* aCharsetString, TUint aHttpStatus, TUint8 aMethod, - TUint16 aTransId, TInt aChunkIndex, void* aCertInfo, - TUint aContentLength, TInt aErr, - void* aLoadContext, NW_Url_RespCallback_t* aPartialCallback ); - - /** - * Call the partial response callback with an error code. - * @since 2.0 - * @param aTransId The transaction id. - * @param aErr The status of the response - * @param aLoadContext The context that was passed with the request. - * @param aCallback The callback to call when the response is ready. - * @return TBrowserStatusCode status of the partial buffer processing - */ - inline TBrowserStatusCode PartialResponse(TUint16 aTransId, TInt aErr, void* aLoadContext, - NW_Url_RespCallback_t* aPartialCallback); - -private: - - // Boolean to determine if 300 or 500 errors have associated content - TBool iIsBodyPresent; - -}; - -#include "urlloader_murlschemehandler.inl" - -#endif // MURLSCHEMEHANDLER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_murlschemehandler.inl --- a/webengine/wmlengine/src/urlloader/include/urlloader_murlschemehandler.inl Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - -// INCLUDE FILES -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// MUrlSchemeHandler::PartialResponse -// Call the partial response callback with a chunk. -// ----------------------------------------------------------------------------- -// -inline TBrowserStatusCode MUrlSchemeHandler::PartialResponse(const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - NW_Bool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - NW_Uint8 *aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialCallback ) - { - TUint convertedHttpStatus = aHttpStatus; - - __ASSERT_DEBUG(aUri != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aPartialCallback != NULL, LoaderUtils::PanicLoader()); - - LoaderUtils::LogLoaderEvents(ELogTypeResponse, aTransId, aUri); - - TUint8* body = (TUint8*)aBody.Ptr(); - - if (aBody.Length() && aHttpStatus > Success && aHttpStatus < MultipleChoices) - { - /* Http status of 2xx is success, we map to OK (200) if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= MultipleChoices && aHttpStatus < BadRequest) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= ServerError && aHttpStatus < 600) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - // when dealing with http status 300 and 500 check to see if body is present - // if so we want to treat this as a standard content load and force the - // http status to be 200 (success) - - if ((body) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = ETrue; - } - - if ((iIsBodyPresent && (aChunkIndex == -1)) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = EFalse; - } - - TBrowserStatusCode status = (aErr == KErrNone && convertedHttpStatus != Success) ? - KBrsrHttpStatus : LoaderUtils::MapErrors(aErr); - - NW_Url_Resp_t* urlResp = UrlLoader_UrlResponseNew(aUri, (TUint8*)aBody.Ptr(), - aBody.Length(), aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - aMethod, - aTransId, - aContentLength); - if (aCertInfo != NULL) - { - urlResp->certInfo = aCertInfo; - } - - CleanupStack::PushL(aContentTypeString); - CleanupStack::PushL(aContentLocationString); - CleanupStack::PushL(aBoundaryString); - CleanupStack::PushL(aLastModified); - CleanupStack::PushL(body); - if (urlResp == NULL) - { - status = (aPartialCallback)(KBrsrOutOfMemory, aTransId, aChunkIndex, aLoadContext, NULL); - CleanupStack::PopAndDestroy(5); // body, aContentTypeString, aContentLocationString - // aBoundaryString, aLastModified - } - else - { - status = (aPartialCallback)(status, aTransId, aChunkIndex, aLoadContext, urlResp); - CleanupStack::Pop(5); // body, aContentTypeString, aContentLocationString, aBoundaryString, aLastModified - } - return status; - } - -// ----------------------------------------------------------------------------- -// MUrlSchemeHandler::Response -// Call the response callback with an error code. -// ----------------------------------------------------------------------------- -// -inline TBrowserStatusCode MUrlSchemeHandler::PartialResponse(TUint16 aTransId, - TInt aErr, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialCallback) -{ - __ASSERT_DEBUG(aPartialCallback != NULL, LoaderUtils::PanicLoader()); - - LoaderUtils::LogLoaderEvents(ELogTypeFailedResponse, aTransId, - LoaderUtils::MapErrors(aErr)); - return (aPartialCallback)(LoaderUtils::MapErrors(aErr), aTransId, -1, aLoadContext, NULL); -} - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_urlloaderI.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderI.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handling of general url loading -* -*/ - - - -#ifndef URLLOADERI_H -#define URLLOADERI_H - -// INCLUDES -#include "urlloader_urlloaderint.h" -#include "httploader_mlinkresolvercallbacks.h" -#include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - - // CONSTANTS - - // MACROS - - // DATA TYPES - - // FUNCTION PROTOTYPES - - // FORWARD DECLARATIONS - - // CLASS DECLARATION - - // BrowserAppUi Interface - class MBrCtlSpecialLoadObserver; - //webkit Interface - class MWmlInterface; - - /** - * Initialize the loaders. - * aHttpCallbacks A callback structure for dialogs - */ - void UrlLoader_InitializeL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, MWmlInterface* aWKWmlInterface); - - /** - * Initialize the system. - */ - TBrowserStatusCode NW_Initialize_Loadercli(); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // URLLOADERI_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_urlloaderint.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderint.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,245 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: C interface to url loader -* -*/ - - -#ifndef URLLOADERINT_H -#define URLLOADERINT_H - -// INCLUDES -#include "nwx_ctx.h" // this file includes nwx_defs.h, which includes nwx_status.h -#include "urlloader_urlresponse.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -// CONSTANTS - -#define NW_NUM_INSTANCES 3 - - -// MACROS - -// DATA TYPES - -// The "TEnterStatus", relates to what security state the page is going to. -// This "page loading" status, is passed in HandleBrowserLoadEventL() using the -// TBrCtlLoadEvent enum. (see BrCtlDefs.h) -// These constants must stay in sync with viewshellobserver.h -//R - -enum TEnterStatus - { - EEnteringSecurePage, - EExitingSecurePage, - ESomeItemsNotSecure, - ESubmittingToNonSecurePage, - ERedirectConfirmation, - ERepostConfirmation, - ESecureItemInNonSecurePage - // others to come - }; - -// The following schemes are only those supported by the browser -typedef enum - { - ESchemeInvalid, - ESchemeUnknown, - ESchemeHttps, - ESchemeMailto, - ESchemeFile, - ESchemeHttp, - ESchemeWtai, - ESchemeTel -} TUrlLoaderScheme; - -// Structure for holding context data -typedef struct - { - void *uniqueNum[NW_NUM_INSTANCES+1]; - void *contexts[NW_NUM_INSTANCES+1] [NW_NUM_CONTEXTS+1]; -} NW_ContextArray_t; - -// Structure for holding extra request headers information -typedef struct - { - NW_Uint8* accept; - NW_Uint8* contentType; - NW_Uint8* referer; - NW_Uint8* boundary; - NW_Uint32 contentLength; - NW_Uint8* expectedContentType; - } HttpRequestHeaders; - -typedef enum - { - ECookieFilter, - ECacheFilter - } TFilters; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Cancel all the pending requests due to a disconnect request. -*/ -void UrlLoader_Disconnect(); - -/** -* Cancel a specific request, identified by its id. -*/ -void UrlLoader_Cancel(NW_Uint16 aTid); - -/** -* Cancel all requests. -*/ -void UrlLoader_CancelAll(); - -/** -* Check if a specific url is in cache. -*/ -NW_Bool UrlLoader_IsUrlInCache(NW_Ucs2* aUrl); - -/** -* Get the number of entries in cache. -*/ -NW_Uint32 UrlLoader_GetNumCacheEntries(); - -/** -* Remove all the cached items. -*/ -NW_Uint32 UrlLoader_ClearCache(); - -/** -* Remove a specific item from cache, identified by its url. -*/ -TBrowserStatusCode UrlLoader_ClearItemInCache(const NW_Ucs2* aUrl); - -/** -* Set a header on a specic item, identified by its url. -*/ -TBrowserStatusCode UrlLoader_SetHeaderInCache(const NW_Ucs2* aUrl, - unsigned char* aName, - NW_Ucs2* aValue); - -/** -* Remove all the cookies. -*/ -NW_Uint32 UrlLoader_ClearCookies(); - -/** -* Free the loaders and close the session to the http stack. -*/ -void UrlLoader_Shutdown(); - -/** -* Make a load request to the loaders. -* aUrl The request URL -* aHeader The request headers or NULL if no request specific headers. -* aData The body of the request. -* aDataLen The body length of the request. -* aMethod The method to use for the request could be -* NW_URL_METHOD_GET or NW_URL_METHOD_POST. -* aTransId The request's transaction id. -* aLoadContext The load context that should be returned with the response. -* aPartialLoadCallback The callback to call when a chunk is ready. -* aCacheMode The cache mode, it is relevant only in case of http or https. -* aDefaultHeadersMask A flag indicating what default headers should be used. -* loadType The load type -* aIsTopLevel Boolean ETrue if page is top level (images, css, etc are not top) -* aIsScript Boolean ETrue if Request is being made by script. -*/ -TBrowserStatusCode UrlLoader_Request(const NW_Ucs2* aUrl, - void* aHeader, - NW_Uint8* aData, - NW_Uint32 aDataLen, - NW_Uint8 aMethod, - NW_Uint16* aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aLoadCallback, - NW_Cache_Mode_t aCacheMode, - NW_Uint32 aDefaultHeadersMask, - NW_Uint8 loadType, - NW_Bool aIsTopLevel, - NW_Bool aIsScript, - NW_Uint8 aReason, - void* aLoadData); - -/** -* Create a HttpHeaders structure with some or all of the following arguments. -* Each field can contain a value, or can be NULL. -* aAccept The accept header -* aContentType The content type of the request body -* aReferer The referer -* aBoundary The boundry if it is a multipart -* aContentLength The length of the request body -*/ -void* UrlLoader_HeadersNew(const NW_Uint8* aAccept, - const NW_Uint8* aContentType, - const NW_Ucs2* aReferer, - const NW_Uint8* aBoundary, - NW_Uint32 aContentLength, - const NW_Uint8* aExpectedContentType); - -/** -* Free the headers structure. -*/ -void UrlLoader_HeadersFree(void* aHeaders); - -/** -* Copy the headers. -*/ -void* UrlLoader_HeadersCopy(const void* aHeaders); - -/** -* Load / Unload filter specified by UID. -*/ -void UrlLoader_ChangeFilterLoadStatusL(TFilters aFilter, NW_Bool aLoad); - -/** -* Update security status on the UrlLoader -*/ -void UrlLoader_UpdateSecurityStatus(TBrowserStatusCode aLoadStatus, - NW_Url_Resp_t* aResponse); - -/** -* Determine the scheme of the URL. -*/ -TUrlLoaderScheme UrlLoader_FindUrlScheme(const NW_Ucs2* aUrl); - -/** -* Determine if the URL is handled by the browser. -*/ -NW_Bool UrlLoader_IsBrowserScheme(const NW_Ucs2* aUrl); - -/** -* Set Internet Access Point id to use for connection -*/ -void UrlLoader_SetIAPid(NW_Uint32 aIapId); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // URLLOADERINT_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/include/urlloader_urlresponse.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_urlresponse.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Creating and deleting of url response -* -*/ - - -#ifndef URLRESPONSE_H -#define URLRESPONSE_H - -#ifdef __cplusplus -extern "C" { -#endif - // INCLUDES -#include "nwx_defs.h" -#include "nwx_buffer.h" -#include "BrsrStatusCodes.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES -typedef enum { - NW_CACHE_NORMAL, // Normal Http load, use cache if not stale - NW_CACHE_HISTPREV, // History Prev load, use cache even if stale, - // unless must-revalidate - NW_CACHE_NOCACHE, // Do not use cache, even if fresh - NW_CACHE_ONLYCACHE // Only load from cache, for loading saved deck -} NW_Cache_Mode_t; - - -typedef struct NW_Url_Resp_s -{ - NW_Ucs2 *uri; // The original URL of the request - // NULL terminated - NW_Buffer_t *body; // The body of the request - void *headers; // The response headers - NW_Uint8 *contentTypeString; // The string representation of content type - NW_Uint8 *contentLocationString; // The string representation of Content Base header - NW_Bool noStore; // HTTP cache-control directive. - NW_Uint8 *boundary; // The string representation of boundary (multipart) - NW_Ucs2 *lastModified; // The string representation of last-modified header. Used by ECMAScript - NW_Uint16 charset; // WAP encoding of response's character set - NW_Uint8 *charsetString; // The charset string - NW_Uint8 byteOrder; // Byte order: big-endian or little-endian for 2-byte charset or single byte - NW_Uint32 httpStatus; // Response status as received from server - NW_Uint8 method; // Method used for the final request - NW_Uint16 transId; // The transaction id of the response - void* certInfo; // The certificate information - NW_Uint32 contentLength; // The content length of the response. Used only for HEAD requests -} NW_Url_Resp_t; - - -// A URLPartialResponseCallback is passed into this component to receive partial response -typedef TBrowserStatusCode (NW_Url_RespCallback_t) - (TBrowserStatusCode status, // The load status - NW_Uint16 transId, // The transaction id of the response - NW_Int32 chunkIndex, // chunk index - void *loadContext, // A context to pass back with the response - NW_Url_Resp_t *resp); // The response structure - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -/** -* Create a url response structure -* aUri The response URL, NULL terminated. -* aBody The body of the request. -* aBodyLength The length of the body of the request. -* aHeaders The response headers. -* aContentTypeString The string representation of the content type. -* aCharset The WAP encoding of the response's character set. -* aCharsetString The response's character set. -* aHttpStatus The response status, as received from the server. -* aMethod The method used for the final request. -* aTransId The transaction id of the response. -* aContentLength The content length of the response. Used only for HEAD requests. -*/ - -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - NW_Uint8 *aContentTypeString, - NW_Uint8 *aContentLocationString, - NW_Bool noStore, - NW_Uint8 *aBoundaryString, - NW_Ucs2 *aLastModified, - NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength); -/*//R -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - const NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - const NW_Uint8 *aContentTypeString, - const NW_Uint8 *aContentLocationString, - NW_Bool noStore, - const NW_Uint8 *aBoundaryString, - const NW_Ucs2 *aLastModified, - const NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength); -*/ - -/** -* Free a url response structure -*/ -void UrlLoader_UrlResponseDelete(NW_Url_Resp_t* aResp); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // URLRESPONSE_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/src/nwx_http_content_type_strings.c --- a/webengine/wmlengine/src/urlloader/src/nwx_http_content_type_strings.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Description: - Definintions of commonly used HTTP constant type strings - -******************************************************************/ - -#include "nwx_http_defs.h" - -/* Content Type Strings */ -const unsigned char HTTP_all_all_string[] = {"*/*"}; -const unsigned char HTTP_text_all_string[] = {"text/*"}; -const unsigned char HTTP_text_html_string[] = {"text/html"}; -const unsigned char HTTP_text_plain_string[] = {"text/plain"}; -const unsigned char HTTP_text_x_hdml_string[] = {"text/x-hdml"}; -const unsigned char HTTP_text_x_ttml_string[] = {"text/x-ttml"}; -const unsigned char HTTP_text_x_vCalendar_string[] = {"text/x-vCalendar"}; -const unsigned char HTTP_text_x_vCard_string[] = {"text/x-vCard"}; -const unsigned char HTTP_text_vnd_wap_wml_string[] = {"text/vnd.wap.wml"}; -const unsigned char HTTP_text_vnd_wap_wmlscript_string[] = {"text/vnd.wap.wmlscript"}; -const unsigned char HTTP_application_x_javascript_string[] = {"application/x-javascript"}; -const unsigned char HTTP_text_javascript_string[] = {"text/javascript"}; -const unsigned char HTTP_text_ecmascript_string[] = {"text/ecmascript"}; -const unsigned char HTTP_text_vnd_wap_wta_event_string[] = {"text/vnd.wap.wta-event"}; -const unsigned char HTTP_multipart_all_string[] = {"multipart/*"}; -const unsigned char HTTP_multipart_mixed_string[] = {"multipart/mixed"}; -const unsigned char HTTP_multipart_form_data_string[] = {"multipart/form-data"}; -const unsigned char HTTP_multipart_byteranges_string[] = {"multipart/byterantes"}; -const unsigned char HTTP_multipart_alternative_string[] = {"multipart/alternative"}; -const unsigned char HTTP_application_all_string[] = {"application/*"}; -const unsigned char HTTP_application_java_vm_string[] = {"application/java-vm"}; -const unsigned char HTTP_application_x_www_form_urlencoded_string[] = {"application/x-www-form-urlencoded"}; -const unsigned char HTTP_application_x_hdmlc_string[] = {"application/x-hdmlc"}; -const unsigned char HTTP_application_vnd_wap_wml_plus_xml_string[] = {"application/vnd.wap.wml+xml"}; -const unsigned char HTTP_application_vnd_wap_wmlc_string[] = {"application/vnd.wap.wmlc"}; -const unsigned char HTTP_application_vnd_wap_wmlscriptc_string[] = {"application/vnd.wap.wmlscriptc"}; -const unsigned char HTTP_application_vnd_wap_wta_eventc_string[] = {"application/vnd.wap.wta-eventc"}; -const unsigned char HTTP_application_vnd_wap_uaprof_string[] = {"application/vnd.wap.uaprof"}; -const unsigned char HTTP_application_vnd_wap_wtls_ca_certificate_string[] = {"application/vnd.wap.wtls-ca-certificate"}; -const unsigned char HTTP_application_vnd_wap_wtls_user_certificate_string[] = {"application/vnd.wap.wtls-user-certificate"}; -const unsigned char HTTP_application_x_x509_ca_cert_string[] = {"application/x-x509-ca-cert"}; -const unsigned char HTTP_application_x_x509_user_cert_string[] = {"application/x-x509-user-cert"}; -const unsigned char HTTP_image_string[] = {"image"}; -const unsigned char HTTP_image_all_string[] = {"image/*"}; -const unsigned char HTTP_image_bmp_string[] = {"image/bmp"}; -const unsigned char HTTP_image_gif_string[] = {"image/gif"}; -const unsigned char HTTP_image_jpeg_string[] = {"image/jpeg"}; -const unsigned char HTTP_image_tiff_string[] = {"image/tiff"}; -const unsigned char HTTP_image_png_string[] = {"image/png"}; -const unsigned char HTTP_image_vnd_wap_wbmp_string[] = {"image/vnd.wap.wbmp"}; -const unsigned char HTTP_image_vnd_nokia_ota_bitmap_string[] = {"image/vnd.nokia.ota-bitmap"}; -const unsigned char HTTP_image_x_ota_bitmap_string[] = {"image/x-ota-bitmap"}; -const unsigned char HTTP_application_vnd_wap_multipart_all_string[] = {"application/vnd.wap.multipart.*"}; -const unsigned char HTTP_application_vnd_wap_multipart_mixed_string[] = {"application/vnd.wap.multipart.mixed"}; -const unsigned char HTTP_application_vnd_wap_multipart_form_data_string[] = {"application/vnd.wap.multipart.form-data"}; -const unsigned char HTTP_application_vnd_wap_multipart_byteranges_string[] = {"application/vnd.wap.multipart.byteranges"}; -const unsigned char HTTP_application_vnd_wap_multipart_alternative_string[] = {"application/vnd.wap.multipart.alternative"}; -const unsigned char HTTP_application_xml_string[] = {"application/xml"}; -const unsigned char HTTP_text_xml_string[] = {"text/xml"}; -const unsigned char HTTP_application_vnd_wap_wbxml_string[] = {"application/vnd.wap.wbxml"}; -const unsigned char HTTP_application_x_x968_cross_cert_string[] = {"application/x-x968-cross-cert"}; -const unsigned char HTTP_application_x_x968_ca_cert_string[] = {"application/x-x968-ca-cert"}; -const unsigned char HTTP_application_x_x968_user_cert_string[] = {"application/x-x968-user-cert"}; -const unsigned char HTTP_text_vnd_wap_si_string[] = {"text/vnd.wap.si"}; -const unsigned char HTTP_application_vnd_wap_sic_string[] = {"application/vnd.wap.sic"}; -const unsigned char HTTP_text_vnd_wap_sl_string[] = {"text/vnd.wap.sl"}; -const unsigned char HTTP_application_vnd_wap_slc_string[] = {"application/vnd.wap.slc"}; -const unsigned char HTTP_text_vnd_wap_co_string[] = {"text/vnd.wap.co"}; -const unsigned char HTTP_application_vnd_wap_coc_string[] = {"application/vnd.wap.coc"}; -const unsigned char HTTP_application_vnd_wap_multipart_related_string[] = {"application/vnd.wap.multipart.related"}; -const unsigned char HTTP_application_vnd_wap_sia_string[] = {"application/vnd.wap.sia"}; -const unsigned char HTTP_text_vnd_wap_connectivity_xml_string[] = {"text/vnd.wap.connectivity-xml"}; -const unsigned char HTTP_application_vnd_wap_connectivity_wbxml_string[] = {"application/vnd.wap.connectivity-wbxml"}; -const unsigned char HTTP_application_pkcs7_mime_string[] = {"application/pkcs7-mime"}; -const unsigned char HTTP_application_vnd_wap_hashed_certificate_string[] = {"application/vnd.wap.hashed-certificate"}; -const unsigned char HTTP_application_vnd_wap_signed_certificate_string[] = {"application/vnd.wap.signed-certificate"}; -const unsigned char HTTP_application_vnd_wap_cert_response_string[] = {"application/vnd.wap.cert-response"}; -const unsigned char HTTP_application_xhtml_xml_string[] = {"application/xhtml+xml"}; -const unsigned char HTTP_application_wml_xml_string[] = {"application/wml+xml"}; -const unsigned char HTTP_text_css_string[] = {"text/css"}; -const unsigned char HTTP_application_vnd_wap_mms_message_string[] = {"application/vnd.wap.mms-message"}; -const unsigned char HTTP_application_vnd_wap_rollover_certificate_string[] = {"application/vnd.wap.rollover-certificate"}; -const unsigned char HTTP_text_x_co_desc_string[] = {"text/x-co-desc"}; -const unsigned char HTTP_application_vnd_wap_xhtml_xml_string[] = {"application/vnd.wap.xhtml+xml"}; - -const unsigned char HTTP_application_vnd_wap_syncml_wbxml_string[] = {"application/vnd.syncml+wbxml"}; -const unsigned char HTTP_application_vnd_nokia_ringing_tone_string[] = {"application/vnd.nokia.ringing-tone"}; -const unsigned char HTTP_application_x_nokiagamedata_string[] = {"application/x-NokiaGameData"}; - -/* Nokia defined content types string for ota push */ -const unsigned char HTTP_application_wap_prov_browser_settings_string[] = {"application/x-wap-prov.browser-settings"}; -const unsigned char HTTP_application_wap_prov_browser_bookmarks_string[] = {"application/x-wap-prov.browser-bookmarks"}; - -/* Special content type string to represent encoded xhtml resulting - from save-to-file operation. -*/ -const unsigned char HTTP_application_xhtml_xml_saved_string[] = {"application/xhtml_xml_saved"}; - -/* Special content type to represent wmlc resulting - from save-to-file operation. -*/ -const unsigned char HTTP_application_wmlc_saved_string[] = {"application/wmlc_saved"}; - -/* Special content type from save-to-file operation. -*/ -const unsigned char HTTP_application_saved_string[] = {"application/x-browser-savedpage"}; - -#ifdef __TEST_TESTHARNESS_ENABLED -const unsigned char HTTP_application_x_nokia_test_harness_string[] = {"text/xml"}; -#endif - -// Charset strings -const char NW_Utf8_CharsetStr[] = {"utf-8"}; -const char NW_UsAscii_CharsetStr[] = {"us-ascii"}; -const char NW_Iso10646Ucs2_CharsetStr[] = {"iso-10646-ucs-2"}; -const char NW_Ucs2_CharsetStr[] = {"ucs-2"}; -const char NW_Big5_CharsetStr[] = {"big5"}; -const char NW_Gb2312_CharsetStr[] = {"gb2312"}; -const char NW_Windows1255_CharsetStr[] = {"windows-1255"}; -const char NW_Windows1256_CharsetStr[] = {"windows-1256"}; -const char NW_Iso88591_CharsetStr[] = {"iso-8859-1"}; -const char NW_Iso88592_CharsetStr[] = {"iso-8859-2"}; -const char NW_Iso88593_CharsetStr[] = {"iso-8859-3"}; -const char NW_Iso88594_CharsetStr[] = {"iso-8859-4"}; -const char NW_Iso88595_CharsetStr[] = {"iso-8859-5"}; -const char NW_Iso88596_CharsetStr[] = {"iso-8859-6"}; -const char NW_Iso88597_CharsetStr[] = {"iso-8859-7"}; -const char NW_Iso88598_CharsetStr[] = {"iso-8859-8"}; -const char NW_Iso88598i_CharsetStr[] = {"iso-8859-8i"}; -const char NW_Iso88599_CharsetStr[] = {"iso-8859-9"}; -const char NW_Iso885915_CharsetStr[] = {"iso-8859-15"}; -const char NW_Windows1250_CharsetStr[] = {"windows-1250"}; -const char NW_Windows1251_CharsetStr[] = {"windows-1251"}; -const char NW_Windows1252_CharsetStr[] = {"windows-1252"}; -const char NW_Windows1253_CharsetStr[] = {"windows-1253"}; -const char NW_Windows1254_CharsetStr[] = {"windows-1254"}; -const char NW_Windows1257_CharsetStr[] = {"windows-1257"}; -const char NW_Tis_620_CharsetStr[] = {"tis-620"}; -const char NW_Unicode_CharsetStr[] = {"unicode"}; -const char NW_ShiftJis_CharsetStr[] = {"shift_jis"}; // standard MIME name -const char NW_ShiftJis_CharsetStr2[] = {"shift-jis"}; // common alias / misspelling -const char NW_X_SJis_CharsetStr[] = {"x-sjis"}; -const char NW_JisX0201_1997_CharsetStr[]= {"jis_x0201-1997"}; -const char NW_JisX0208_1997_CharsetStr[]= {"jis_x0208-1997"}; -const char NW_EucJp_CharsetStr[] = {"euc-jp"}; -const char NW_X_EucJp_CharsetStr[] = {"x-euc-jp"}; -const char NW_Iso2022Jp_CharsetStr[] = {"iso-2022-jp"}; -const char NW_Windows874_CharsetStr[] = {"windows-874"}; -const char NW_Koi8r_CharsetStr[] = {"koi8-r"}; -const char NW_Koi8u_CharsetStr[] = {"koi8-u"}; - - const char NW_EucKr_CharsetStr[] = {"euc-kr"}; - const char NW_ksc5601_1987_CharsetStr[] = {"ks_c_5601-1987"}; - -/* End Content Type */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/src/urlloader_curlloader.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_curlloader.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include <apgcli.h> -#include <coemain.h> -#include <uri16.h> -#include "urlloader_urlloaderint.h" -#include "urlloader_curlloader.h" -#include "urlloader_loaderutils.h" -#include "fileloader_cfileloader.h" -#include "BrsrStatusCodes.h" -#include <BrCtlSpecialLoadObserver.h> -#include "StringUtils.h" -#include "nwx_defs.h" -#include "httploader_mlinkresolvercallbacks.h" -//#include "LoadListeners.h" -#include "WmlControl.h" -#include "WmlInterface.h" - - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CKUrlLoader::CKUrlLoader -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CKUrlLoader::CKUrlLoader() -{ - iTransId = 0; - iOnEnterBackward = EFalse; -} - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CKUrlLoader::ConstructL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, - MWmlInterface* aWKWmlInterface) -{ - iFileLoader = CKFileLoader::NewL(); - - //Link back to BrCtl - iLinkCallbacks = aLinkCallbacks; - iSpecialLoadObserver = aSpecialLoadObserver; - iWKWmlInterface = aWKWmlInterface; -} - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CKUrlLoader* CKUrlLoader::NewL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, - MWmlInterface* aWKWmlInterface) -{ - CKUrlLoader* self = new( ELeave ) CKUrlLoader; - - CleanupStack::PushL( self ); - self->ConstructL(aSpecialLoadObserver, aLinkCallbacks,aWKWmlInterface); - CleanupStack::Pop(); - - return self; -} - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::~CKUrlLoader -// Destructor. -// ----------------------------------------------------------------------------- -// -CKUrlLoader::~CKUrlLoader() -{ - delete iFileLoader; -} - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::HandleLoadRequestL -// If the url scheme is not http, https or file, send the request to the -// application architecture. -// ----------------------------------------------------------------------------- -// -TBool CKUrlLoader::HandleLoadRequestL(const TUint16 *aUrl, - void *aHeader, - TPtr8& aData, - TUint8 aMethod, - TUint16 aTransId, - void *aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, - TUint aDefaultHeadersMask, - TUint8 aLoadType, - TBool aIsTopLevel, - TBool aIsScript, - NW_Uint8 aReason, - void* aLoadData) - { - // Go through the loaders until we find one that can handle the request - - if ( aReason == NW_HED_UrlRequest_Reason_DocPrev || aReason == NW_HED_UrlRequest_Reason_ShellPrev ) - { - SetOnEnterBackward(ETrue); - } - - // LinkResolver - if ( aReason == NW_HED_UrlRequest_Reason_DocLoad || - (aReason == NW_HED_UrlRequest_Reason_DocPrev || aReason == NW_HED_UrlRequest_Reason_ShellPrev) && OnEnterBackward()) - { - TPtrC desUrl(aUrl); - if( aMethod == NW_URL_METHOD_POST) - { - HttpRequestHeaders* header = (HttpRequestHeaders*)aHeader; - TInt headerLen = User::StringLength(header->contentType); - HBufC8* contType8 = HBufC8::NewL( headerLen ); - CleanupStack::PushL( contType8 ); - contType8->operator=(header->contentType); - HBufC* contType = HBufC::NewL( headerLen + 1); - CleanupStack::PushL( contType ); - contType->Des().Copy( contType8->Des() ); - contType->Des().ZeroTerminate(); - iLinkCallbacks->PostLinkUrl( desUrl, aData, *contType ); - CleanupStack::PopAndDestroy(2); - SetOnEnterBackward(EFalse); - } - else - { - iLinkCallbacks->LoadLinkUrl( desUrl, aHeader ); - } - return ETrue; - } - // ImageLoader - else if ( aReason == NW_HED_UrlRequest_Reason_DocLoadChild && aLoadType == NW_UrlRequest_Type_Image)//aLoadType == 2 - { - TPtrC desUrl(aUrl); - iResHandle = iLinkCallbacks->LoadEmbededUrl(desUrl, aLoadContext, (void*)aPartialLoadCallback, aTransId); - return ETrue; - } - - if ( aReason == NW_HED_UrlRequest_Reason_ShellLoad && OnEnterBackward() ) - { - aReason = NW_HED_UrlRequest_Reason_DocPrev; - iLinkCallbacks->SetOnEnterBackwordReason(); - SetOnEnterBackward(EFalse); - } - - // FileLoader - if ( iFileLoader->HandleLoadRequestL(aUrl, aHeader, aData, aMethod, - aTransId, aLoadContext, aPartialLoadCallback, aCacheMode, - aDefaultHeadersMask, aLoadType, aIsTopLevel, aIsScript, - aReason, aLoadData)) - { - return ETrue; - } - - return ETrue; - } - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::LoadRequest -// Make a generic load request. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CKUrlLoader::LoadRequest(const TUint16* aUrl, void* aHeader, - TUint8* aData, TUint aDataLen, - TUint8 aMethod, TUint16* aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aPartialLoadCallback, - NW_Cache_Mode_t aCacheMode, - TUint aDefaultHeadersMask, - TUint8 aLoadType, - TBool aIsTopLevel, - TBool aIsScript, - NW_Uint8 aReason, - void* aLoadData) -{ - if (aUrl == NULL || (aData == NULL && aDataLen > 0) || - aTransId == NULL || aPartialLoadCallback == NULL) - { - return KBrsrBadInputParam; - } - - *aTransId = ++iTransId; - LoaderUtils::LogLoaderEvents(ELogTypeRequest, *aTransId, aUrl); - - TPtr8 data(aData, aDataLen, aDataLen); - - TRAPD(err, HandleLoadRequestL(aUrl, aHeader, data, aMethod, iTransId, - aLoadContext, aPartialLoadCallback, - aCacheMode, aDefaultHeadersMask, aLoadType, - aIsTopLevel, aIsScript, aReason, aLoadData)); - - return LoaderUtils::MapErrors(err); -} - - -// ----------------------------------------------------------------------------- -// CKUrlLoader::IsUrlInCache -// -// ----------------------------------------------------------------------------- -// -TBool CKUrlLoader::IsUrlInCache(const TUint16* aUrl) -{ - if (aUrl == NULL) - { - return EFalse; - } - - TBool ret = EFalse; - TPtrC urlDes(aUrl); - if( iWKWmlInterface ) - { - ret = iWKWmlInterface->wmlIsUrlInCache(urlDes); - } - return ret; -} - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/src/urlloader_loaderutils.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_loaderutils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Utilities used by url loader -* -*/ - - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include "urlloader_loaderutils.h" -#include <httperr.h> -#include <in_sock.h> -#include <flogger.h> -#include <sslerr.h> -#include "BrsrStatusCodes.h" -#include <inet6err.h> -#include "nwx_logger.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// LoaderUtils::PanicLoader -// General purpose panic function for url loader related errors. -// ----------------------------------------------------------------------------- -// -void LoaderUtils::PanicLoader(TInt aError) -{ - User::Panic(_L("Loader Panic"), aError); -} - - -// ----------------------------------------------------------------------------- -// LoaderUtils::MapErrors -// Map the Symbian errors to rainbow errors. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode LoaderUtils::MapErrors(TInt aError) - { - if (aError <= KBrsrFailure && aError > KBrsrLastErrorCode) - { - return aError; - } - - if (aError == KErrSSLAlertUserCanceled) - { - return KBrsrCancelled; - } - // All SSL errors are mapped into this one, which gets displayed to the user - if (aError <= SSL_ERROR_BASE && aError > SSL_ERROR_BASE - 200 || - aError == KErrHttpCannotEstablishTunnel) - { - return KErrSSLAlertHandshakeFailure; - } - - // Deal with DNS lookup errors - if ((aError <= KErrInet6NoDestination) && (aError > (KErrInet6NoDestination - 200))) - { - return KBrsrHTTP502; - } - - // Deal with unsupported feature error - if (aError == KErrNotSupported) - { - return KErrNotSupported; - } - - // Deal with HTTP errors - if (aError <= KHttpErrorBase && aError > KHttpErrorBase - 200) - { - // Encode errors - if (aError <= KErrHttpEncodeDefault && aError >= KErrHttpEncodeCookie2) - { - return KBrsrFailure; - } - // Auth errors - if (aError == KErrHttpDecodeWWWAuthenticate || - aError == KErrHttpDecodeUnknownAuthScheme || - aError == KErrHttpDecodeBasicAuth || - aError == KErrHttpDecodeDigestAuth) - { - return KBrsrMissingAuthHeader; - } - - // Decode errors - if (aError <= KErrHttpDecodeMalformedDate && aError >= KErrHttpDecodeCookie) - { - return KBrsrWmlbrowserBadContent; - } - switch (aError) - { - case KErrHttpRedirectExceededLimit: - return KBrsrTooManyRedirects; - case KErrHttpRedirectNoLocationField: - case KErrHttpRedirectUseProxy: - return KBrsrBadRedirect; - case KErrHttpInvalidUri: - return KBrsrMalformedUrl; - default: - return KBrsrFailure; - } - } - - - switch (aError) - { - case KErrHostUnreach: - return KBrsrTcpHostUnreachable; - case KErrNone: - return KBrsrSuccess; - case KErrCancel: - return KBrsrCancelled; - case KErrNoMemory: - return KBrsrOutOfMemory; - case KErrBadName: - case KErrPathNotFound: - return KBrsrFileNotFound; - - case KErrAbort: - case KErrCommsLineFail: - case KErrNotReady: - return KBrsrConnFailed; - case KErrDiskFull: - return KBrsrFileDiskFullError; - case KErrTimedOut: - return KBrsrWaitTimeout; - case KErrCouldNotConnect: - return KBrsrMalformedUrl; - case KErrDisconnected: - return KBrsrHTTP504; - default: - return KBrsrFailure; - } // end of switch - } - - -// ----------------------------------------------------------------------------- -// LoaderUtils::LogLoaderEvents -// Log the request and the response. The url can be long (test case and search -// return case), so we truncate it to 200 chars to avoid a panic. -// -// NOTE: NW_Debug_Log() uses variable argument list (VA_LIST) to handle logging, -// but it is not enabled in the release version. When debugging you will see a -// panic if you provide a long argument (~1K bytes) to print to the log. -// ----------------------------------------------------------------------------- -// -void LoaderUtils::LogLoaderEvents(TUrlLoaderLogType aUrlLoaderLogType, ...) -{ -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - _LIT(KLogFileName, "default.log"); - _LIT(KLogDirName, "Loaders"); - const TUint kMaxUrlLength = 200; - const TUint kMaxUrlBuffer = kMaxUrlLength + 1; - - VA_LIST ap; - TBuf16<300> buf; - TBuf16<kMaxUrlBuffer> urlBuf; - - switch (aUrlLoaderLogType) - { - case ELogTypeRequest: - { - _LIT(KFormatRequest, "Request: Tid: %d Url: %s"); - VA_START(ap, aUrlLoaderLogType); - TUint tid = VA_ARG(ap, TUint); - TUint16* urlPtr = VA_ARG(ap, TUint16*); - VA_END(ap); - TPtrC fullUrl(urlPtr); - TUint urlLength = fullUrl.Length(); - if (urlLength > kMaxUrlLength) - { - urlLength = kMaxUrlLength; - } - TPtr url((TUint16*)urlBuf.Ptr(), 0, kMaxUrlBuffer); - url.Copy(fullUrl.Ptr(), urlLength); - url.ZeroTerminate(); - buf.Format(KFormatRequest(), tid, url.Ptr()); - buf.Append(0); - RFileLogger::Write(KLogDirName, KLogFileName, EFileLoggingModeAppend, buf); - break; - } - case ELogTypeResponse: - { - _LIT(KFormatResponse, "Response: Tid: %d Url: %s"); - VA_START(ap, aUrlLoaderLogType); - TUint tid = VA_ARG(ap, TUint); - TUint16* urlPtr = VA_ARG(ap, TUint16*); - VA_END(ap); - TPtrC fullUrl(urlPtr); - TUint urlLength = fullUrl.Length(); - if (urlLength > kMaxUrlLength) - { - urlLength = kMaxUrlLength; - } - TPtr url((TUint16*)urlBuf.Ptr(), 0, kMaxUrlBuffer); - url.Copy(fullUrl.Ptr(), urlLength); - url.ZeroTerminate(); - buf.Format(KFormatResponse(), tid, url.Ptr()); - buf.Append(0); - RFileLogger::Write(KLogDirName, KLogFileName, EFileLoggingModeAppend, buf); - break; - } - case ELogTypeFailedResponse: - { - _LIT(KFormatFailedResponse, "Response Failed: Tid: %d Status code: %d"); - VA_START(ap, aUrlLoaderLogType); - buf.FormatList(KFormatFailedResponse(), ap); - VA_END(ap); - buf.Append(0); - RFileLogger::Write(KLogDirName, KLogFileName, EFileLoggingModeAppend, buf); - break; - } - case ELogTypeSavedDeck: - { - _LIT(KFormatSavedDeck, "ParseSavedDeck complete with return code: %d"); - VA_START(ap, aUrlLoaderLogType); - buf.FormatList(KFormatSavedDeck(), ap); - VA_END(ap); - buf.Append(0); - RFileLogger::Write(KLogDirName, KLogFileName, EFileLoggingModeAppend, buf); - break; - } - default: - break; - } // end of switch -#else //(defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - NW_REQUIRED_PARAM( aUrlLoaderLogType ); -#endif //(defined (_DEBUG)) || (defined(_ENABLE_LOGS)) -} - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/src/urlloader_urlloaderint.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_urlloaderint.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,498 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: C interface to url loader -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include "urlloader_urlloaderI.h" -#include "urlloader_curlloader.h" -#include "urlloader_loaderutils.h" -#include "httploader_mlinkresolvercallbacks.h" -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include <uri16.h> -#include "BrsrStatusCodes.h" - -//R -//#include "httploadereventtouilistener.h" - -//lint -save -e774 Boolean within 'if' always evaluates to True - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT(KSchemeHttps, "https"); -_LIT(KSchemeFile, "file"); -_LIT(KSchemeHttp, "http"); - - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} // extern "C" -#endif - -// ============================= LOCAL FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CKHttpLoader::UrlLoader_GetUrlLoader -// Get a pointer to the url loader. -// ----------------------------------------------------------------------------- -// -static CKUrlLoader* UrlLoader_GetUrlLoader() -{ - return (CKUrlLoader*)NW_Ctx_Get(NW_CTX_URL_LOADER, 0); -} - - -// ----------------------------------------------------------------------------- -// CKHttpLoader::UrlLoader_HttpRequestHeadersNewL -// Create a HttpHeaders structure with some or all of the following arguments. -// Each field can contain a value, or can be NULL -// ----------------------------------------------------------------------------- -// -static HttpRequestHeaders* UrlLoader_HttpRequestHeadersNewL(const TUint8* aAccept, - const TUint8* aContentType, - const TUint16* aReferer, - const TUint8* aBoundary, - TUint aContentLength, - const TUint8* aExpectedContentType) -{ - TUint8* accept = NULL; - TUint8* contentType = NULL; - TUint8* referer = NULL; - TUint8* boundary = NULL; - TUint8* expectedContentType = NULL; - TInt pushed = 0; - HttpRequestHeaders* headers = NULL; - // If accept header is set, allocate and copy it - if (aAccept != NULL) - { - accept = new TUint8 [User::StringLength(aAccept) + 1]; - User::LeaveIfNull(accept); - Mem::Copy(accept, aAccept, User::StringLength(aAccept) + 1); - CleanupStack::PushL(accept); - pushed++; - } - - // If contentType header is set, allocate and copy it - if (aContentType != NULL) - { - contentType = new TUint8 [User::StringLength(aContentType) + 1]; - User::LeaveIfNull(contentType); - Mem::Copy(contentType, aContentType, User::StringLength(aContentType) + 1); - CleanupStack::PushL(contentType); - pushed++; - } - - // If referer header is set, allocate and copy it - if (aReferer != NULL) - { - TUint refererLength = User::StringLength(aReferer) + 1; - TPtrC16 referer16(aReferer); - TPtr8 referer8(NULL, 0); - referer = new TUint8 [refererLength]; - User::LeaveIfNull(referer); - CleanupStack::PushL(referer); - pushed++; - - referer8.Set(referer, 0, refererLength); - referer8.Copy(referer16); - referer8.ZeroTerminate(); - } - - // If the boundary for multipart is set, allocate and copy it - if (aBoundary != NULL) - { - boundary = new TUint8 [User::StringLength(aBoundary) + 1]; - User::LeaveIfNull(boundary); - Mem::Copy(boundary, aBoundary, User::StringLength(aBoundary) + 1); - CleanupStack::PushL(boundary); - pushed++; - } - - // If expectedContentType header is set, allocate and copy it - if (aExpectedContentType != NULL) - { - expectedContentType = new TUint8 [User::StringLength(aExpectedContentType) + 1]; - User::LeaveIfNull(expectedContentType); - Mem::Copy(expectedContentType, aExpectedContentType, User::StringLength(aExpectedContentType) + 1); - CleanupStack::PushL(expectedContentType); - pushed++; - } - headers = new(ELeave) HttpRequestHeaders; - headers->accept = accept; - headers->contentType = contentType; - headers->referer = referer; - headers->boundary = boundary; - headers->contentLength = aContentLength; - headers->expectedContentType = expectedContentType; - CleanupStack::Pop(pushed); - return headers; -} - -// ========================== OTHER EXPORTED FUNCTIONS ========================= -#ifdef __cplusplus -extern "C" { -#endif - - - -// ----------------------------------------------------------------------------- -// UrlLoader_Shutdown -// Free the loaders and close the session to the http stack. -// ----------------------------------------------------------------------------- -// -void UrlLoader_Shutdown() -{ - CKUrlLoader* urlLoader = UrlLoader_GetUrlLoader(); - - if (urlLoader != NULL) - { - delete urlLoader; - NW_Ctx_Set(NW_CTX_URL_LOADER, 0, NULL); - } -} - - -// ----------------------------------------------------------------------------- -// UrlLoader_Request -// Make a load request to the loaders. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode UrlLoader_Request(const NW_Ucs2* aUrl, void* aHeader, - NW_Uint8* aData, NW_Uint32 aDataLen, - NW_Uint8 aMethod, NW_Uint16* aTransId, - void* aLoadContext, - NW_Url_RespCallback_t* aLoadCallback, - NW_Cache_Mode_t aCacheMode, - NW_Uint32 aDefaultHeadersMask, - NW_Uint8 loadType, - NW_Bool aIsTopLevel, - NW_Bool aIsScript, - NW_Uint8 aReason, - void* aLoadData) - { - CKUrlLoader* urlLoader = UrlLoader_GetUrlLoader(); - TBrowserStatusCode status = KBrsrFailure; - __ASSERT_DEBUG(urlLoader != NULL, LoaderUtils::PanicLoader()); - - - if (urlLoader != NULL) - { - status = urlLoader->LoadRequest(aUrl, aHeader, aData, aDataLen, - aMethod, aTransId, aLoadContext, - aLoadCallback, aCacheMode, - aDefaultHeadersMask, - loadType, aIsTopLevel, aIsScript, - aReason, aLoadData); - if (status != KBrsrSuccess) - { - if ((aDataLen > 0) && (aData != NULL)) - { - delete [] aData; - } - UrlLoader_HeadersFree(aHeader); - } - } - - return status; - } - - -// ----------------------------------------------------------------------------- -// UrlLoader_HeadersNew -// Create a HttpHeaders structure with some or all of the following arguments. -// Each field can contain a value, or can be NULL -// ----------------------------------------------------------------------------- -// -void* UrlLoader_HeadersNew(const NW_Uint8* aAccept, - const NW_Uint8* aContentType, - const NW_Ucs2* aReferer, - const NW_Uint8* aBoundary, - NW_Uint32 aContentLength, - const NW_Uint8* aExpectedContentType) -{ - TInt ret = KErrNone; - HttpRequestHeaders* headers = NULL; - TRAP(ret, headers = UrlLoader_HttpRequestHeadersNewL(aAccept, - aContentType, - aReferer, - aBoundary, - aContentLength, - aExpectedContentType)); - if (ret == KErrNone) - { - return headers; - } - - return NULL; -} - - -// ----------------------------------------------------------------------------- -// UrlLoader_HeadersFree -// Free the headers structure. -// ----------------------------------------------------------------------------- -// -void UrlLoader_HeadersFree(void* aHeaders) -{ - if (aHeaders != NULL) - { - HttpRequestHeaders* headers = (HttpRequestHeaders*)aHeaders; - delete [] headers->accept; - delete [] headers->contentType; - delete [] headers->referer; - delete [] headers->boundary; - delete headers; - } -} - - -// ----------------------------------------------------------------------------- -// UrlLoader_HeadersCopy -// Copy the headers structure. -// ----------------------------------------------------------------------------- -// -void* UrlLoader_HeadersCopy(const void* aHeaders) -{ - if (aHeaders == NULL) - { - return NULL; - } - - HttpRequestHeaders* newHeaders = NULL; - - HttpRequestHeaders* headers = (HttpRequestHeaders*)aHeaders; - - newHeaders = (HttpRequestHeaders*)UrlLoader_HeadersNew(headers->accept, - headers->contentType, - NULL, - headers->boundary, - headers->contentLength, - headers->expectedContentType); - if (headers->referer != NULL) - { - newHeaders->referer = - new TUint8 [User::StringLength(headers->referer) + 1]; - - if (newHeaders->referer != NULL) - { - Mem::Copy(newHeaders->referer, headers->referer, - User::StringLength(headers->referer) +1); - } - else - { - UrlLoader_HeadersFree(newHeaders); - newHeaders = NULL; - } - } - return newHeaders; -} - - - -// ----------------------------------------------------------------------------- -// GetFlags -// Local helper function for UrlLoader_UpdateSecurityStatus. -// Gets the flags on urlLoader->iSecureFlag. -// Finds if a security note is needed and displays it -// ----------------------------------------------------------------------------- -// -void GetFlags(TUint aSecurityFlag, - TUint8* aIsPrevTopLevelSecure, - TUint8* aIsCurrentTopLevelSecure, - TUint8* aWasNoteDisplayedForThisTopLevel, - TUint8* aWasNoteAcceptedForThisTopLevel) - { - __ASSERT_DEBUG(aIsPrevTopLevelSecure != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aIsCurrentTopLevelSecure != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aWasNoteDisplayedForThisTopLevel != NULL, - LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aWasNoteAcceptedForThisTopLevel != NULL, - LoaderUtils::PanicLoader()); - - *aIsPrevTopLevelSecure = (TUint8)(aSecurityFlag & 0xFF); - *aIsCurrentTopLevelSecure = (TUint8)((aSecurityFlag >> 8) & 0xFF); - *aWasNoteDisplayedForThisTopLevel = (TUint8)((aSecurityFlag >> 16) & 0xFF); - *aWasNoteAcceptedForThisTopLevel = (TUint8)((aSecurityFlag >> 24) & 0xFF); - } - - - - -// ----------------------------------------------------------------------------- -// UrlLoader_InitializeL -// Header: urlloader_urloaderi.h -// Initialize the loaders -// ----------------------------------------------------------------------------- -// -void UrlLoader_InitializeL(MBrCtlSpecialLoadObserver* aSpecialLoadObserver, - MHttpLoader_LinkResolverCallbacks* aLinkCallbacks, - MWmlInterface* aWKWmlInterface) - { - CKUrlLoader* urlLoader = NULL; - urlLoader = CKUrlLoader::NewL(aSpecialLoadObserver, aLinkCallbacks,aWKWmlInterface); - NW_Ctx_Set(NW_CTX_URL_LOADER, 0, urlLoader); - } - - -// ----------------------------------------------------------------------------- -// IsSubmit -// Description: Determines if the load is a result of sumbit or not. -// Local helper function for HandleTopLevelSecurityStateChange. -// -// Parameters: *aUrl - pointer to the url to load -// aMethod - post or get -// aIsTopLevel - is top level request or not -// aHasHeaders - a flag is the request contains hedears -// -// Return Value: EFalse -// ETrue -// ----------------------------------------------------------------------------- -// -NW_Bool IsSubmit(const NW_Ucs2 *aUrl, NW_Uint8 aMethod, - NW_Bool aIsTopLevel, NW_Bool aHasHeaders) -{ - __ASSERT_DEBUG(aUrl != NULL, LoaderUtils::PanicLoader()); - if (aUrl == NULL) - { - return EFalse; - } - - TPtrC urlPtr(aUrl); - if (aIsTopLevel) - { - if (aMethod == NW_URL_METHOD_POST || (aHasHeaders && urlPtr.Locate('?'))) - { - return ETrue; - } - } - - return EFalse; -} - - - -// ----------------------------------------------------------------------------- -// UrlLoader_FindUrlScheme -// Determine the scheme of the url. -// ----------------------------------------------------------------------------- -// -TUrlLoaderScheme UrlLoader_FindUrlScheme(const NW_Ucs2* aUrl) - { - if (aUrl == NULL) - { - return ESchemeInvalid; - } - - TUriParser parser; - TPtrC uriPtr(aUrl); - if (parser.Parse(uriPtr) != KErrNone) - { - return ESchemeInvalid; - } - - if (!parser.IsSchemeValid()) - { - return ESchemeInvalid; - } - - TPtrC schemePtr(parser.Extract(EUriScheme)); - TInt schemeLength = schemePtr.Length(); - - // HTTP scheme is the default - if (schemeLength == 0) - { - return ESchemeHttp; - } - - // Identify the scheme - if (schemeLength == KSchemeHttp().Length() && - uriPtr.FindF(KSchemeHttp) == 0) - { - return ESchemeHttp; - } - - if (schemeLength == KSchemeHttps().Length() && - uriPtr.FindF(KSchemeHttps) == 0) - { - return ESchemeHttps; - } - - if (schemeLength == KSchemeFile().Length() && - uriPtr.FindF(KSchemeFile) == 0) - { - return ESchemeFile; - } - - return ESchemeUnknown; - } - - -// ----------------------------------------------------------------------------- -// UrlLoader_IsBrowserScheme -// Determine if the url is handled by the browser. -// ----------------------------------------------------------------------------- -// -NW_Bool UrlLoader_IsBrowserScheme(const NW_Ucs2* aUrl) - { - TUrlLoaderScheme urlScheme = UrlLoader_FindUrlScheme(aUrl); - - return (urlScheme != ESchemeUnknown); - } - -// ----------------------------------------------------------------------------- -// UrlLoader_IsUrlInCache -// Check if a specific url is in cache. -// ----------------------------------------------------------------------------- -// -NW_Bool UrlLoader_IsUrlInCache(NW_Ucs2* aUrl) - { - NW_Bool ret = NW_FALSE; - CKUrlLoader* urlLoader = UrlLoader_GetUrlLoader(); - - if (urlLoader ) - { - ret = (NW_Bool)urlLoader->IsUrlInCache(aUrl); - } - - return ret; - } - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -//lint -restore - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/urlloader/src/urlloader_urlresponse.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_urlresponse.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Creating and deleting of url response -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> -#include "urlloader_urlresponse.h" -//#include "urlloader_urlloaderint.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// UrlLoader_UrlResponseNew -// Create a url response structure -// ----------------------------------------------------------------------------- -// -NW_Url_Resp_t* UrlLoader_UrlResponseNew(const NW_Ucs2 *aUri, - NW_Uint8 *aBody, - NW_Uint32 aBodyLength, - void *aHeaders, - NW_Uint8 *aContentTypeString, - NW_Uint8 *aContentLocationString, - NW_Bool aNoStore, - NW_Uint8 *aBoundaryString, - NW_Ucs2 *aLastModified, - NW_Uint16 aCharset, - NW_Uint8 *aCharsetString, - NW_Uint32 aHttpStatus, - NW_Uint8 aMethod, - NW_Uint16 aTransId, - NW_Uint32 aContentLength) -{ - NW_Buffer_t* buffer = NULL; - NW_Url_Resp_t* resp = NULL; - NW_Ucs2* uri = NULL; - - buffer = new NW_Buffer_t; - resp = new NW_Url_Resp_t; - uri = new NW_Ucs2 [(User::StringLength(aUri) + 1)]; - - //lint -e{774} Boolean always evaluates to False - if (buffer == NULL || resp == NULL || uri == NULL) - { - delete buffer; - delete resp; - delete uri; - return NULL; - } - - Mem::Copy(uri, aUri, (User::StringLength(aUri) + 1) * sizeof(NW_Ucs2)); - resp->uri = uri; - resp->body = buffer; - resp->body->data = aBody; - resp->body->length = aBodyLength; - resp->body->allocatedLength = aBodyLength; - resp->headers = aHeaders; - resp->contentTypeString = aContentTypeString; - resp->contentLocationString = aContentLocationString; - resp->noStore = aNoStore; - resp->boundary = aBoundaryString; - resp->lastModified = aLastModified; - resp->charset = aCharset; - resp->charsetString = aCharsetString; - resp->httpStatus = aHttpStatus; - resp->method = aMethod; - resp->transId = aTransId; - resp->certInfo = NULL; - resp->contentLength = aContentLength; - return resp; -} - - -// ----------------------------------------------------------------------------- -// UrlLoader_UrlResponseDelete -// Free a url response structure -// ----------------------------------------------------------------------------- -// -void UrlLoader_UrlResponseDelete(NW_Url_Resp_t* aResp) -{ - if (aResp != NULL) - { - delete aResp->uri; - if (aResp->body != NULL) - delete aResp->body->data; - delete aResp->body; - //UrlLoader_HeadersFree(aResp->headers); - delete aResp->contentTypeString; - delete aResp->contentLocationString; - delete aResp->boundary; - delete aResp->lastModified; - delete aResp->charsetString; - delete aResp; - } -} - - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/BrowserEngineVariation.h --- a/webengine/wmlengine/src/utils/include/BrowserEngineVariation.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides one place for variation in Browser Engine. -* -*/ - - - -#ifndef BROWSERENGINEVARIATION_H -#define BROWSERENGINEVARIATION_H - -// INCLUDES - -/* -** Includes -*/ -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __SERIES60_27__ -NW_Bool NewFeatureEnabled() { return NW_FALSE; } -#else -#ifdef __SERIES60_28__ -NW_Bool NewFeatureEnabled() { return NW_FALSE; } -#else -NW_Bool NewFeatureEnabled() { return NW_TRUE; } -#endif // __SERIES60_28__ -#endif // __SERIES60_27__ - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // BROWSERENGINEVARIATION_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/BrowserVersion.h --- a/webengine/wmlengine/src/utils/include/BrowserVersion.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Browser version definition -* -*/ - - -#ifndef BROWSERVERSION_H -#define BROWSERVERSION_H - -#define MobileBrowserName (_L("MobileBrowser")) - -#if defined (__S60_50__) - #define MobileBrowserVersion (_L("5.0")) -#elif defined (__S60_32__) - #define MobileBrowserVersion (_L("3.2")) -#elif defined (__SERIES60_31__) - #define MobileBrowserVersion (_L("3.1")) -#elif defined (__SERIES60_30__) - #define MobileBrowserVersion (_L("3.0")) -#elif defined(__SERIES60_28__) - #define MobileBrowserVersion (_L("2.8")) -#elif defined (__SERIES60_27__) - #define MobileBrowserVersion (_L("2.7")) -#elif defined (__SERIES60_26__) - #define MobileBrowserVersion (_L("2.6")) -#else - #define MobileBrowserVersion (_L("2.x")) -#endif - -#define MobileBrowserBuild (_L("0516")) - - -#endif BROWSERVERSION_H -//end of file diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/BrsrStatusCodes.h --- a/webengine/wmlengine/src/utils/include/BrsrStatusCodes.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Status codes used by Browser Engine -* -*/ - -#ifndef BRSR_STATUS_CODES_H -#define BRSR_STATUS_CODES_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef signed int TBrowserStatusCode; - -/* -** Includes -*/ - -#define BRSR_STAT_IS_SUCCESS(a) ((a) == KBrsrSuccess) -#define BRSR_STAT_IS_FAILURE(a) ((a) != KBrsrSuccess) - -/* Used by NW_HED_DocumentNode_HandleError to specify the error "class" */ -#define BRSR_STAT_CLASS_NONE 0 -#define BRSR_STAT_CLASS_GENERAL 1 -#define BRSR_STAT_CLASS_HTTP 2 - - -#define KBrsrSuccess 0 -#define KBrsrFailure -26000 -#define KBrsrFileNotFound -26003 -#define KBrsrFileWriteError -26008 -#define KBrsrFileDiskFullError -26009 -#define KBrsrOutOfMemory -26011 -#define KBrsrUnexpectedError -26012 -#define KBrsrNotImplemented -26013 -#define KBrsrWaitTimeout -26014 -#define KBrsrBufferTooSmall -26015 -#define KBrsrBadInputParam -26016 -#define KBrsrMissingInputParam -26017 -#define KBrsrMalformedUrl -26018 -#define KBrsrNotFound -26021 -#define KBrsrBufferEnd -26022 -#define KBrsrIterateMore -26023 -#define KBrsrIterateDone -26024 -#define KBrsrUnknownScheme -26026 -#define KBrsrBadRedirect -26027 -#define KBrsrTooManyRedirects -26028 -#define KBrsrHttpStatus -26035 -#define KBrsrMissingAuthHeader -26037 -#define KBrsrCancelled -26038 -#define KBrsrWpsaNoActiveTransactions -26067 -#define KBrsrNoContentLength -26068 -#define KBrsrTransactionCompete -26069 -#define KBrsrWimiInvalidPin -26072 -#define KBrsrWimiPinBlocked -26073 -#define KBrsrWimiNoCard -26075 -#define KBrsrWimiNoInit -26084 -#define KBrsrWimiBadCert -26085 -#define KBrsrWimiWimErr -26089 -#define KBrsrWimiSessionNotSet -26090 -#define KBrsrWimiCertNotFound -26091 -#define KBrsrWimiKeyNotFound -26092 -#define KBrsrWimiDuplicateCert -26093 -#define KBrsrWtlsHandshakeFail -26102 -#define KBrsrWtlsUnknowCertAuth -26110 -#define KBrsrWtlsUcNotYetValid -26111 -#define KBrsrWtlsUcExpired -26112 -#define KBrsrWtlsUnsupCert -26114 -#define KBrsrWtlsDecodeFail -26116 -#define KBrsrScriptCardNotInDeck -26131 -#define KBrsrScriptNoAccess -26132 -#define KBrsrScriptBadContent -26133 -#define KBrsrScriptErrorUserExit -26134 -#define KBrsrScriptErrorUserAbort -26135 -#define KBrsrScriptErrorStackUnderflow -26136 -#define KBrsrScriptErrorStackOverflow -26137 -#define KBrsrScriptFatalLibFuncError -26138 -#define KBrsrScriptInvalidFuncArgs -26139 -#define KBrsrScriptVerificationFailed -26140 -#define KBrsrScriptExternalFunctionNotFound -26141 -#define KBrsrScriptUnableToLoadCompilationUnit -26142 -#define KBrsrScriptAccessViolation -26143 -#define KBrsrWmlbrowserCardNotInDeck -26144 -#define KBrsrWmlbrowserNoAccess -26145 -#define KBrsrWmlbrowserBadContent -26146 -#define KBrsrWmlbrowserBadContentType -26148 -#define KBrsrWmlbrowserInputNonconformingToMask -26149 -#define KBrsrWmlbrowserOnPickEx -26150 -#define KBrsrXhtmlBadContent -26151 -#define KBrsrCryptoUserCancel -26152 -#define KBrsrCryptoNoCert -26153 -#define KBrsrUnsupportedFormCharset -26156 -#define KBrsrScrproxyScrAbort -26163 -#define KBrsrScrproxyScrBusy -26164 -#define KBrsrScrproxyScrNotResponding -26165 -#define KBrsrWaeNavigationCancelled -26167 -#define KBrsrConnCancelled -26172 -#define KBrsrConnFailed -26173 -#define KBrsrLmgrConstraintTooSmall -26189 -#define KBrsrLmgrNotConstrained -26190 -#define KBrsrLmgrFormatOverflow -26191 -#define KBrsrLmgrSplitOk -26192 -#define KBrsrLmgrNoSplit -26194 -#define KBrsrLmgrNotClear -26196 -#define KBrsrDomNoStringReturned -26199 -#define KBrsrDomNodeTypeErr -26200 -#define KBrsrDomNoValuePrefix -26201 -#define KBrsrWbxmlErrorBytecode -26202 -#define KBrsrWbxmlErrorCharsetUnsupported -26203 -#define KBrsrHedNoCurrentHistEntry -26211 -#define KBrsrHedNoPreviousHistEntry -26212 -#define KBrsrHedNoNextHistEntry -26213 -#define KBrsrHedContentDispatched -26215 -#define KBrsrTcpHostUnreachable -26223 -#define KBrsrSavedPageFailed -26224 -#define KBrsrRestartParsing -26225 -#define KBrsrMvcConverterNotFound -26226 -#define KBrsrContinue -26227 -#define KBrsrLastErrorCode -26999 - -// HTTP status codes -#define KBrsrHTTP100 -25100 -#define KBrsrHTTP101 -25101 -#define KBrsrHTTP102 -25102 -#define KBrsrHTTP200 -25200 -#define KBrsrHTTP201 -25201 -#define KBrsrHTTP202 -25202 -#define KBrsrHTTP203 -25203 -#define KBrsrHTTP204 -25204 -#define KBrsrHTTP205 -25205 -#define KBrsrHTTP206 -25206 -#define KBrsrHTTP300 -25300 -#define KBrsrHTTP301 -25301 -#define KBrsrHTTP302 -25302 -#define KBrsrHTTP303 -25303 -#define KBrsrHTTP304 -25304 -#define KBrsrHTTP305 -25305 -#define KBrsrHTTP400 -25400 -#define KBrsrHTTP401 -25401 -#define KBrsrHTTP402 -25402 -#define KBrsrHTTP403 -25403 -#define KBrsrHTTP404 -25404 -#define KBrsrHTTP405 -25405 -#define KBrsrHTTP406 -25406 -#define KBrsrHTTP407 -25407 -#define KBrsrHTTP408 -25408 -#define KBrsrHTTP409 -25409 -#define KBrsrHTTP410 -25410 -#define KBrsrHTTP411 -25411 -#define KBrsrHTTP412 -25412 -#define KBrsrHTTP413 -25413 -#define KBrsrHTTP414 -25414 -#define KBrsrHTTP415 -25415 -#define KBrsrHTTP500 -25500 -#define KBrsrHTTP501 -25501 -#define KBrsrHTTP502 -25502 -#define KBrsrHTTP503 -25503 -#define KBrsrHTTP504 -25504 -#define KBrsrHTTP505 -25505 - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* BRSR_STATUS_CODES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/BrsrTypes.h --- a/webengine/wmlengine/src/utils/include/BrsrTypes.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _BRSR_TYPES_H_ -#define _BRSR_TYPES_H_ - -// Forward declarations -class CGDIDeviceContext; -class CGDIFont; -class CView; - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef unsigned char NW_Bool; /* NW_FALSE, NW_TRUE */ -typedef signed short NW_Int16; /* -32768 ... +32767 */ -typedef signed long NW_Int32; /* -2147483648 ... +2147483647 */ -typedef unsigned char NW_Uint8; /* 0 ... 255 */ -typedef unsigned short NW_Uint16; /* 0 ... 65535 */ -typedef unsigned long NW_Uint32; /* 0 ... 4294967295 */ -typedef NW_Int32 NW_WaeError_t; - -typedef NW_Uint16 NW_ADT_Vector_Metric_t; - -struct NW_ADT_DynamicVector_s; -typedef struct NW_ADT_DynamicVector_s NW_ADT_DynamicVector_t; - -struct NW_Dlg_SelectData_s; -typedef struct NW_Dlg_SelectData_s NW_Dlg_SelectData_t; - -struct NW_Evt_Event_s; -typedef struct NW_Evt_Event_s NW_Evt_Event_t; - -struct NW_Evt_KeyEvent_s; -typedef struct NW_Evt_KeyEvent_s NW_Evt_KeyEvent_t; - -struct NW_Evt_ScrollEvent_s; -typedef struct NW_Evt_ScrollEvent_s NW_Evt_ScrollEvent_t; - -struct NW_Evt_TabEvent_s; -typedef struct NW_Evt_TabEvent_s NW_Evt_TabEvent_t; - -typedef NW_Int32 NW_GDI_Metric_t; - -struct NW_GDI_Rectangle_s; -typedef struct NW_GDI_Rectangle_s NW_GDI_Rectangle_t; - -struct NW_HED_DocumentNode_s; -typedef struct NW_HED_DocumentNode_s NW_HED_DocumentNode_t; - -struct NW_HED_DocumentRoot_s; -typedef struct NW_HED_DocumentRoot_s NW_HED_DocumentRoot_t; - -struct NW_HED_UrlRequest_s; -typedef struct NW_HED_UrlRequest_s NW_HED_UrlRequest_t; - -struct NW_LMgr_Box_s; -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; - -struct NW_LMgr_BoxVisitor_s; -typedef struct NW_LMgr_BoxVisitor_s NW_LMgr_BoxVisitor_t; - -struct NW_LMgr_FlowBox_s; -typedef struct NW_LMgr_FlowBox_s NW_LMgr_FlowBox_t; - -struct NW_LMgr_RootBox_s; -typedef struct NW_LMgr_RootBox_s NW_LMgr_RootBox_t; - -struct NW_Msg_Message_s; -typedef struct NW_Msg_Message_s NW_Msg_Message_t; - -struct NW_MVC_ILoadListener_s; -typedef struct NW_MVC_ILoadListener_s NW_MVC_ILoadListener_t; - -struct NW_Text_Abstract_s; -typedef struct NW_Text_Abstract_s NW_Text_t; - -typedef NW_Uint32 NW_Text_Length_t; - -struct NW_Url_Resp_s; -typedef NW_Url_Resp_s NW_Url_Resp_t; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* __BRSR_TYPES_H_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/CBrowserSettings.h --- a/webengine/wmlengine/src/utils/include/CBrowserSettings.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef __UTIL_SETTINGS_H -#define __UTIL_SETTINGS_H - -#include <bldvariant.hrh> -#include <coemain.h> -#include "nwx_defs.h" -#include "nwx_settings.h" - -// FYI: All key literals come from \epoc32\include\oem\SharedDataKeysVariant.h -// Please do not define key literal strings here. - -_LIT( KValueOn, "True" ); -_LIT( KValueOff, "False" ); - -class CRepository; - -enum TBrowserSetting - { - EFontSizeLevel = 0x1, - EEncoding = 0x2, - ECookiesEnabled = 0x4, - EImagesEnabled = 0x8, - EEcmaScriptEnabled = 0x10, - ETextWrapEnabled = 0x20, - EOriginalEncoding = 0x40, - EVerticalLayoutEnabled = 0x80, - ECSSFetchEnabled = 0x100, - EDisableSmallScreenLayout = 0x200, - EIsEmbedded = 0x400, - EIMEINotifyEnabled = 0x800, - ESendReferrerHeader = 0x1000, - EHttpSecurityWarnings = 0x2000 - }; - -/***************************************************************** - - Description: abstract observer calss - -******************************************************************/ -/*class MBrowserSettingsObserver - { - // - public: - - virtual void BrowserSettingChanged( enum TBrowserSetting aBrowserSetting ) = 0; - }; -*/ -/***************************************************************** - - Description: This class keeps track of the settings. - -******************************************************************/ - -NONSHARABLE_CLASS(CBrowserSettings) : public CBase - { - public: - - //Construction - - static CBrowserSettings* Instance(); - - ~CBrowserSettings(); - - // observer methods - //void SetObserver( MBrowserSettingsObserver* aBrowserSettingsObserver, - // TUint aObservedSettings ); - - void RemoveObserver( void ); - - // Access methods - NW_Bool GetStartFromHomepage(void); - - NW_Uint8 GetFontSizeLevel(void); - void SetFontSizeLevel(NW_Uint8 fontSizeLevel); - - NW_Uint16 GetEncoding(void); - void SetEncoding(NW_Uint16 encoding); - - NW_Bool GetCookiesEnabled(void); - void SetCookiesEnabled(const NW_Bool enabled); - - NW_Bool GetImagesEnabled(void); - void SetImagesEnabled(const NW_Bool enabled); - - NW_Bool GetEcmaScriptEnabled(void); - void SetEcmaScriptEnabled(const NW_Bool enabled); - - NW_Bool GetTextWrapEnabled(void); - void SetTextWrapEnabled(const NW_Bool enabled); - - NW_Bool GetAlwaysConfirmDtmfSending(void); - void SetAlwaysConfirmDtmfSending(const NW_Bool enabled); - - NW_Uint32 GetOriginalEncoding(void); - void SetOriginalEncoding(NW_Uint32 encoding); - - NW_Bool GetVerticalLayoutEnabled(void); - void SetVerticalLayoutEnabled(const NW_Bool enabled); - - void SetInternalVerticalLayoutEnabled(const NW_Bool enabled); - - void SetCSSFetchEnabled(const NW_Bool disabled); - NW_Bool GetCSSFetchEnabled(void); - - NW_Uint16 GetDefaultCharset(void); - void SetDefaultCharset(NW_Uint16 defaultCharset); - - void SetDisableSmallScreenLayout(const NW_Bool disabled); - NW_Bool GetDisableSmallScreenLayout(); - - NW_Bool GetIsBrowserEmbedded(void); - void SetIsBrowserEmbedded(const NW_Bool isEmbedded); - - TUint GetLocalFeatures(void); - - NW_Ucs2* GetTempFilesPath(void); - - NW_Uint8 GetMMCDrive(void); - - NW_Uint8 GetIMEINotifyEnabled(void); - void SetIMEINotifyEnabled(NW_Uint8 enabled); - - NW_Uint8 GetSendReferrerHeader(void); - void SetSendReferrerHeader(NW_Uint8 enabled); - - NW_Bool GetHttpSecurityWarnings(void); - void SetHttpSecurityWarnings(NW_Bool enabled); - - NW_Uint32 GetIAPId(void); - void SetIAPId(NW_Uint32 aIapId); - - private: - - CBrowserSettings(); - - // observer method - void PublishSettingChange( enum TBrowserSetting aBrowserSetting ); - - // Utility methods - TInt GetIntValue(const TUint32 aKey); - NW_Bool GetBooleanValue(const TUint32 aKey); - NW_Ucs2* GetStringValue( const TUint32 aKey ); - - private: - - NW_Bool iStartFromHomepage; - NW_Uint8 iFontSizeLevel; - NW_Uint16 iEncoding; - NW_Bool iCookiesEnabled; - NW_Bool iImagesEnabled; - NW_Uint8 iEcmaScriptEnabled; - NW_Uint8 iTextWrapEnabled; - NW_Uint32 iOriginalEncoding; - NW_Uint8 iVerticalLayoutEnabled; - NW_Bool iCSSFetchEnabled; - NW_Bool iDisableSmallScreenLayout; - NW_Uint16 iDefaultCharset; - - CRepository* iRepository; - NW_Bool iIsEmbedded; - TUint iFeatureBitmask; - NW_Ucs2* iTempFilesPath; - NW_Uint8 iMMCDrive; - NW_Uint8 iIMEINotifyEnabled; - NW_Uint8 iSendReferrerHeader; - NW_Bool iHttpSecurityWarnings; - NW_Bool iSecUI; - NW_Uint32 iIapId; - - //MBrowserSettingsObserver* iBrowserSettingsObserver; - TUint iObservedSettings; - }; - -#endif /* __UTIL_SETTINGS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/CReferrerHelper.h --- a/webengine/wmlengine/src/utils/include/CReferrerHelper.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef CREFERRERHELPER_H -#define CREFERRERHELPER_H - -// INCLUDES -#include "nw_hed_documentroot.h" -#include "nw_hed_urlrequest.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// FUNCTION -void SetReferrerHeader(NW_HED_UrlRequest_t* urlRequest, - NW_Ucs2* referrerUrl); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // CREFERRERHELPER_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/FileNameUtils.h --- a/webengine/wmlengine/src/utils/include/FileNameUtils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File-name related utility methods. -* -*/ - - - -#ifndef FILENAMEUTIL_H -#define FILENAMEUTIL_H - - -// INCLUDES -#include <e32std.h> - - -// CLASS DECLARATION - -/** -* A static class which provides file-name related utility methods. -* -* @lib BrowserEngine -* @since 2.6 -*/ -class FileNameUtils - { - public: // Constructors and destructor - // None. - - public: // New functions - - /** - * Gets the localized file name, in full, which includes the path but - * not the drive. This is intended for use as a displayable path and - * as such the drive is not included since drive letters are never shown - * to the user. - * - * @since 2.6 - * @param aFullFileName Ptr to file name that is to be localized. - * @param aLocalizedFullFileName Ptr into which the localized file name - * is returned, which is a pointer to a newly allocated heap buffer. - * The caller is responsible for deallocating the buffer when it is no - * longer needed. - * @return KBrsrSuccess, KBrsrOutOfMemory or KBrsrFailure. - */ - static TBrowserStatusCode GetLocalizedFullFileName( TPtrC& aFullFileName, - HBufC** aLocalizedFullFileName ); - - }; - -#endif // FILENAMEUTIL_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/ImageUtils.h --- a/webengine/wmlengine/src/utils/include/ImageUtils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef IMAGEUTILS_H -#define IMAGEUTILS_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -// This enum allows the BrowserUI to display the image content-types -// that are supported and displayable by the browser, but not recognized by -// the SymbianOS. These are mostly image data with no indication of their -// content-type in their data, i.e. GIF files have "GIF89" as the first -// few bytes in the data. -// ERecognizedImage: SymbianOS recognizes the image content-type and no -// special handling is required. -// EUnsupportedImage: The browser and SymbianOS doesn't support this -// image and it will not display it. -// EWbmpImage, EOtaImage, etc: These are images that we support and display, -// but SymbianOS doesn't recognize, so we set this marker for special handling. -typedef enum - { - ERecognizedImage = 0, - EUnsupportedImage, - EWbmpImage, - EOtaImage - } TImageType; - - -TImageType GetRecognizedImageType(const char* aContentTypeString); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - - -#endif /* IMAGEUTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/KimonoLocalizationStrings.h --- a/webengine/wmlengine/src/utils/include/KimonoLocalizationStrings.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef KIMONOLOCALIZATIONSTRINGS_H -#define KIMONOLOCALIZATIONSTRINGS_H - -// This table must be kept in sync with -// \browser\browserappsrc\browserappui.cpp - -enum TKmLocStringId - { - EKmLocSubmitButton, - EKmLocResetButton, - EKmLocSelectLabel, - EKmLocBackSoftkeyLabel - }; - - -#endif // KIMONOLOCALIZATIONSTRINGS_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/StringUtils.h --- a/webengine/wmlengine/src/utils/include/StringUtils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: String related utility methods. -* -*/ - - - -#ifndef STRINGUTIL_H -#define STRINGUTIL_H - -// INCLUDES -#include <e32std.h> - -#include "nwx_defs.h" -#include <nw_string_string.h> - - -// CLASS DECLARATION - -/** -* A static class which provides string related utility methods. -* -* @lib Browser Engine -* @since 2.6 -*/ -class StringUtils - { - public: // Constructors and destructor - - /** - * Convert a UCS2 buffer to ascii. - * - * @since 2.6 - * @param aUsc2Buf The buffer to convert. - * @return The converted buffer or NULL, if failed to allocate a buffer. - */ - static TUint8* CopyUsc2ToAscii(const TUint16* aUsc2Buf); - - /** - * Convert a ascii buffer to unicode. - * - * @since 2.6 - * @param aAsciiBuf The buffer to convert. - * @return The converted buffer or NULL, if failed to allocate a buffer. - */ - static TUint16* CopyAsciiToUsc2(const TUint8* aAsciiBuf); - - /** - * Copy a UCS2 buffer. - * - * @since 2.6 - * @param aUsc2Buf The buffer to copy. - * @return The opied buffer or NULL, if failed to allocate a buffer. - */ - static TUint16* CopyUsc2ToUcs2(const TUint16* aUsc2Buf); - - /** - * Copy a ascii buffer. - * - * @since 2.6 - * @param aAsciiBuf The buffer to copy. - * @return The copied buffer or NULL, if failed to allocate a buffer. - */ - static TUint8* CopyAsciiToAscii(const TUint8* aAsciiBuf); - - /** - * Convert a NW_String_t (holding an usc2 null-terminated string) to a TDes16. - * - * @since 2.6 - * @param aUcs2String The string to copy - * @return The copied descriptor or NULL, if failed to allocate a buffer. - */ - static TDesC16* CopyStringToDes(const NW_String_t& aUcs2String); - - /** - * Convert a TDesC8* to a TDes16* - * - * @since 2.6 - * @param aTDes8String The string to copy - * @return The copied descriptor or NULL, if failed to allocate a buffer. - */ - static TDesC16* CopyTDesC8ToTDesC16(const TDesC8& aTDesC8String); - - /** - * Convert a TUint16* to a TDesC16 - * - * @since 2.6 - * @param aTUint16String The string to copy - * @return The copied descriptor or NULL, if failed to allocate a buffer. - */ - static TDesC16* CopyTUint16ToTDesC16(const TUint16* aTUint16String); - - - /** - * Convert a UCS2 buffer to ascii. - * - * @since 2.6 - * @param aUsc2Ptr A descriptor to the buffer to convert. - * @param retPtr The returned bufer. - * @return KErrNone or KErrNoMemory. - */ - static TInt ConvertPtrUsc2ToAscii(const TPtrC& aUsc2Ptr, TUint8** retPtr); - - /** - * Convert a ascii buffer to UCS2. - * - * @since 2.6 - * @param aAsciiPtr A descriptor to the buffer to convert. - * @param retPtr The returned bufer. - * @return KErrNone or KErrNoMemory. - */ - static TInt ConvertPtrAsciiToUcs2(const TPtrC8& aAsciiPtr, TUint16** retPtr); - - /** - * Convert a UCS2 Desc to UCS2. - * - * @since 2.6 - * @param aUcs2Ptr A descriptor to the buffer to convert. - * @param retPtr The returned bufer. - * @return KErrNone or KErrNoMemory. - */ - static TInt ConvertPtrUcs2ToUcs2(const TPtrC& aUcs2Ptr, TUint16** retPtr); - - /** - * Convert a TUint to UCS2. - * - * @since 2.6 - * @param aUint The number to convert. - * @param retPtr The returned bufer. - * @return KErrNone or KErrNoMemory. - */ - static TInt ConvertUintToUcs2(TUint aUint, TUint16** retPtr); - - /** - * Create HBufC. - * - * @since 2.6 - * @param aInBuf The buffer to copy. - * @return The new HBufC. - */ - static HBufC* CopyHBufCZeroTerminateL(const TDesC& aInBuf); - - /** - * Create HBufC. - * - * @since 2.6 - * @param aBuffer The buffer to copy from. - * @param aStart The starting point in the buffer to copy. - * @param aEnd The ending point in the buffer to copy. - * @return The new HBufC. - */ - static HBufC* MakeHBufCLC(const TUint16* aBuffer, TUint aStart, TUint aEnd); - - /** - * Convert To Unicode. - * - * @since 2.6 - * @param aBuffer The buffer to copy from. - * @param aStart The starting point in the buffer to copy. - * @param aEnd The ending point in the buffer to copy. - * @return The new HBufC. - */ - static HBufC* ConvertToUnicodeLC(const TUint8* aBuffer, TUint aStart, TUint aEnd); - - /** - * Create HBufC. from the TDesC8 - * - * @since 2.6 - * @param aInBuf The buffer to copy. - * @return The new HBufC. - */ - static HBufC* CopyConvertHBufCZeroTerminateL(const TDesC8& aInBuf); - /** - * General panic for StringUtils. - * - * @since 2.6 - * @param aError The error code from the panicked method. - * @return void. - */ - static void Panic(TInt aError); - /** - * Show the amount of free memory in the system - * - * @since 2.8 - * @return void. - */ - static void DisplayAvailableMemory(); - - }; - - -#endif // CSTRINGUTIL_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/TEncodingMapping.h --- a/webengine/wmlengine/src/utils/include/TEncodingMapping.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef __TENCODINGMAPPING_H -#define __TENCODINGMAPPING_H - -#include "BrsrTypes.h" - -typedef struct - { - NW_Uint32 uid; - NW_Uint16 ianaEncoding; - NW_Uint16 internalEncoding; - NW_Uint8* charset; - NW_Bool needsConvert; -}SupportedCharset; - -extern const SupportedCharset supportedCharset[]; - -#endif // __TENCODINGMAPPING_H \ No newline at end of file diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/TKeyArrayPtr.h --- a/webengine/wmlengine/src/utils/include/TKeyArrayPtr.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Key class for use with pointer-based Symbian array classes. -* -*/ - - -#ifndef TKEYARRAYPTR_H -#define TKEYARRAYPTR_H - -// INCLUDES -#include <e32base.h> -#include "nwx_string.h" - -// CLASS DECLARATION - -/** -* Numeric key class for use with pointer-based Symbian array classes. -* See the following link from Symbian: -* http://www3.symbian.com/faq.nsf/f6fbf5deaf4cca7080256a64005ac61e/defdb21d5e976aee80256a570051b8d9?OpenDocument&Highlight=2,TKeyArrayFix -* @lib lmgr.lib -* @since 2.1 -*/ -class TNumKeyArrayPtr : public TKeyArrayFix - { - public: // Constructors and destructor - - /** - * Constructor. - */ - inline TNumKeyArrayPtr(TInt aOffset, TKeyCmpNumeric aType) : TKeyArrayFix(aOffset, aType) {} - - - public: // NEW FUNCTIONS - - /** - * Gets pointer to array entry at specified index. - * @since 2.1 - * @param aIndex Index within the array of desired entry. - * @return Pointer to entry. - */ - virtual TAny* At(TInt aIndex) const - { - if (aIndex == KIndexPtr) - { - return *(TUint8**)iPtr + iKeyOffset; - } - return *(TUint8**)iBase->Ptr(aIndex * sizeof(TUint8**)).Ptr() + iKeyOffset; - } - }; - -/** -* Textual (string) key class for use with pointer-based Symbian array classes. -* See the following link from Symbian: -* http://www3.symbian.com/faq.nsf/f6fbf5deaf4cca7080256a64005ac61e/defdb21d5e976aee80256a570051b8d9?OpenDocument&Highlight=2,TKeyArrayFix -* @lib lmgr.lib -* @since 2.1 -*/ -class TTextKeyArrayPtr : public TKeyArrayFix - { - public: // Constructors and destructor - - /** - * Constructor. - */ - inline TTextKeyArrayPtr(TInt aOffset, TKeyCmpText aType) : TKeyArrayFix(aOffset, aType) {} - - - public: // NEW FUNCTIONS - - /** - * Gets pointer to array entry at specified index. - * @since 2.1 - * @param aIndex Index within the array of desired entry. - * @return Pointer to entry. - */ - virtual TAny* At(TInt aIndex) const - { - if (aIndex == KIndexPtr) - { - return *(TUint8**)iPtr + iKeyOffset; - } - return *(TUint8**)iBase->Ptr(aIndex * sizeof(TUint8**)).Ptr() + iKeyOffset; - } - - virtual TInt Compare(TInt aLeft, TInt aRight) const - { - NW_Ucs2* l=(*(NW_Ucs2**)At(aLeft)); - NW_Ucs2* r=(*(NW_Ucs2**)At(aRight)); - return( NW_Str_Strcmp( l, r ) ); - } - - }; -#endif // TKEYARRAYPTR_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/float.h --- a/webengine/wmlengine/src/utils/include/float.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 1999-2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* This is a dummy file for core code. These values are - based on NT limitation. These should be change according to - to porting platform, if the platform does not have a float.h file -*/ -#ifndef _FLOAT_H_ -#define _FLOAT_H_ - -#define FLT_MAX 3.402823466e+38F /* max value from NT */ -#define FLT_MIN 1.175494351e-38F /* min positive value from NT */ -#define FLT_DIG 6 -#define FLT_MAX_10_EXP 38 -#define FLT_MIN_10_EXP -37 - -#endif /*_FLOAT_H_*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/memory.h --- a/webengine/wmlengine/src/utils/include/memory.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 1999-2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* This is a dummy file for core code. These values are - based on NT limitation. These should be change according to - to porting platform, if the platform does not have a memory.h file -*/ -#ifndef _MEMORY_H_ -#define _MEMORY_H_ - -#include <string.h> - -#ifdef memcpy -#undef memcpy -#endif - -#endif /*_MEMORY_H_*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nw_loadreq.h --- a/webengine/wmlengine/src/utils/include/nw_loadreq.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_LOADREQ_H -#define NW_LOADREQ_H - -/* -** Includes -*/ -#include "nwx_defs.h" - -#include "nw_nvpair.h" -#include "nwx_buffer.h" -#include "nwx_http_header.h" -#include "urlloader_urlresponse.h" -#include "nw_hed_appservices.h" -#include "BrsrStatusCodes.h" -/* -** Type Declarations -*/ - -/* -** Preprocessor Macro Definitions -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Global Function Declarations -*/ - -/***************************************************************** - - Name: NW_LoadReq_Create - - Description: - Create loader data structures for an Http load request. - Helper routine to create request for the loaders. - - Parameters: - url - in: url to load. - postMethodFlag - in: flag indicating HTTP POST method or not. - referer - in: referer to the url. - acceptCharset - in: character set gateway will accept. - postfields - in: postdata name/value pairs. - Note: Not const because have to change to iterate over. - enctype - in: urlencoded or multipart/form-data. - docCharset - in: charset encoding for document. - header - in/out: if empty (NULL) a new header is created. - if not empty, a copy is made and added to. - resultUrl - out: url created for request - method - out: post or get. - body - out: body for load request. - appServices ? - appCtx ? - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrUnsupportedFormCharset - KBrsrOutOfMemory - - Notes: - cacheMode not needed for this helper function. - -******************************************************************/ -TBrowserStatusCode NW_LoadReq_Create ( const NW_Ucs2 *url, - const NW_Bool postMethodFlag, - const NW_Ucs2 *referer, - const NW_Ucs2 *acceptCharset, - NW_NVPair_t *postfields, /* Can't be const. */ - const NW_Ucs2 *enctype, - const NW_Http_CharSet_t docCharset, - NW_Http_Header_t **header, /* Start output params */ - NW_Ucs2 **resultUrl, - NW_Uint8 *method, - NW_Buffer_t **body, - NW_HED_AppServices_t * appServices, - void * appCtx); - - -/************************************************************************ - - Function: NW_LoadReq_BuildQuery - - Description: Construct a query from the url and escaped_postdata, - and places the result in *query. It is the caller's - responsibility to delete the resulting string. - - If the number of postfields is 0, the query is just a - new copy the original url. This prevents us from - appending a lone '?' at the end of a 'canned' query - url like - - "http://waplabdc/foo.wml?name=bar;value=foo" - - Parameters: url - in: pointer to the URL - postfields - in: pointer to the postfield data - resultUrl - out: constructed result URL. - appServices ? - appCtx ? - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory - -**************************************************************************/ -TBrowserStatusCode NW_LoadReq_BuildQuery(const NW_Ucs2 *url, - NW_NVPair_t *postfields, - NW_Ucs2 **resultUrl, - NW_HED_AppServices_t * appServices, - void * appCtx); - -/** -* Checks the encoding type to see if it is for a multipart request. -* @since 2.5 -* @param aEncodingType Ptr to encoding type string to be checked. -* @return NW_TRUE if multipart. -* NW_FALSE if not multipart. -*/ -NW_Bool NW_LoadReq_IsMultipart( const NW_Ucs2* aEncodingType ); - -/** -* Determines whether or not the current part of the multipart post is for a -* file to be uploaded or not. -* @param aValue Ptr to value of the variable. -* @return NW_TRUE if the part is for file to be uploaded. -* NW_FALSE if not a file. -*/ -NW_Bool NW_LoadReq_IsUploadFile( const NW_Ucs2 *aValue ); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_NVPAIR_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nw_nvpair.h --- a/webengine/wmlengine/src/utils/include/nw_nvpair.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,264 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef NW_NVPAIR_H -#define NW_NVPAIR_H - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Identifier validation according WMLScript 6.1.6 */ -NW_Bool NW_CheckName(const NW_Ucs2* name); - -/* - Description: - The NW_NVPair_t abstract data type is for storing name value string - pairs. It is implemented to be created and accessed - sequencially, and to use as little memory as possible. A typical - calling sequence is: - - - Typical calling sequence to create and populate an object: - postFields = NW_NVPair_New(); - while () { - status = NW_NVPair_CalSize(postFields, name, value); - } - status = NW_NVPair_AllocStorage( postFields ); - - while () { - status = NW_NVPair_Add(postFields, name, value); - } - - (void) NW_NVPair_ResetIter( postFields ); - - Typical calling sequence to interate through a created object: - (void) NW_NVPair_ResetIter( postfields ); - - status = NW_NVPair_GetNext( postfields, &name, &value ); - while ( status == KBrsrSuccess ) { - ** code that uses name-value pairs ** - status = NW_NVPair_GetNext( postfields, &name, &value ); - } - if ( status != KBrsrNotFound ) { - return status; - } -*/ - -/* -** Type Declarations -*/ -/* Holds name-value pairs as ucs2 strings. */ -typedef struct { - NW_Ucs2* iterPtr; /* Used to keep place with iterating over pairs. */ - NW_Ucs2* strTable; /* Array of null-terminated ucs2 strings. */ - NW_Uint32 size; /* Total # of ucs2 chars of string space. */ -} NW_NVPair_t; - -/* a function type for passing a name value string pair */ -typedef TBrowserStatusCode (NW_NVPair_NVFunction_t)(NW_NVPair_t* thisObj, - const NW_Ucs2* name, - const NW_Ucs2* value); -/* -** Preprocessor Macro Definitions -*/ - - -/* -** Global Function Declarations -*/ - -/***************************************************************** - - Name: NW_NVPair_New - - Description: Allocates a NW_Pair_t object. - - Parameters: none - - Return Value: pointer to newly create object. If fails, NULL. - -******************************************************************/ -NW_NVPair_t* NW_NVPair_New (void); - -/***************************************************************** - - Name: NW_NVPair_Delete - - Description: - Dellocates a NW_Pair_t object. Allows thisObj == NULL. - - - Parameters: - thisObj - in: Object to deallocate. - - Return Value: none - -******************************************************************/ -void NW_NVPair_Delete (NW_NVPair_t* thisObj); - -/***************************************************************** - - Name: NW_NVPair_IsEmpty - - Description: - Returns NW_TRUE if the object is NULL or it does not contain - any value-pairs. - - Parameters: - thisObj - in: Object to deallocate. - - Return Value: - NW_TRUE - if object contains 1 or more name-value pairs. - NW_FALSE - if object is null or it is empty (no name-value pairs). - -******************************************************************/ -NW_Bool NW_NVPair_IsEmpty (NW_NVPair_t* thisObj); - - -/***************************************************************** - - Name: NW_NVPair_CalSize - - Description: - Records the storage requirements for the name-value - pair. Counts string plus null-terminater. Used when AddFirst is - called to allocate all the necessary storage at once. - - Parameters: - thisObj - in/out: NW_NV_Pair_t object. - name - in: name string - value - in: value string - - Requires: - (name != NULL) && (name[0] != '\0') - thisObj != NULL - - Return Value: - KBrsrSuccess - -******************************************************************/ -NW_NVPair_NVFunction_t NW_NVPair_CalSize; - - -/***************************************************************** - - Name: NW_NVPair_AllocStorage - - Description: - This routine allocates the storage to all the name-value pairs - this object will hold. - - Parameters: - thisObj - in/out: NW_NV_Pair_t object. - - Requires: - thisObj != NULL - thisObj->size >= 3 (minimum to hold 1 name-value pair) - - Return Value: - KBrsrSuccess - KBrsrOutOfMemory - unable to allocate storage for name-value - pairs. - -******************************************************************/ -TBrowserStatusCode NW_NVPair_AllocStorage (NW_NVPair_t* thisObj); - -/***************************************************************** - - Name: NW_NVPair_Add - - Description: - Adds a name-value pair to the object. Must be called after - NW_NVPair_AllocStorage is called to allocate memory. - - Parameters: - thisObj - in/out: NW_NV_Pair_t object. - name - in: name string. - value - in: value string. - - Requires: - thisObj != NULL - (name != NULL) && (name[0] != '\0') - - Return Value: - KBrsrSuccess - KBrsrBufferTooSmall - name-value will not fit in allocated - storage. - -******************************************************************/ -NW_NVPair_NVFunction_t NW_NVPair_Add; - - -/***************************************************************** - - Name: NW_NVPair_ResetIter - - Description: - Sets the iterator for NW_NVPair_GetNext to start at the first - name-value pair. Allows thisObj == NULL; - - Parameters: - thisObj - in/out: NW_NV_Pair_t object. - - Return Value: - KBrsrSuccess - -******************************************************************/ -TBrowserStatusCode NW_NVPair_ResetIter (NW_NVPair_t* thisObj); - -/***************************************************************** - - Name: NW_NVPair_GetNext - - Description: - Returns subsequent name-value pair in the order they have been - inserted. Returns KBrsrNotFound when no more name-value - pairs to return. Allows thisObj == NULL; - - Parameters: - thisObj - in/out: NW_NV_Pair_t object. - name - out: name string. - value - out: value string. Returns NULL pointer for empty string (""). - - Return Value: - KBrsrSuccess - KBrsrNotFound - returned if there is not a name-value - pair to return. - -******************************************************************/ -TBrowserStatusCode NW_NVPair_GetNext (NW_NVPair_t* thisObj, NW_Ucs2** name, - NW_Ucs2** value); - - -/* -** Global Variable Declarations -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_NVPAIR_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nw_wml1x_wml_1_3_tokens.h --- a/webengine/wmlengine/src/utils/include/nw_wml1x_wml_1_3_tokens.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Wed Apr 24 14:59:12 2002 -** (coordinated universal time) -** -** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h -*/ -/* -** This file was generated by the dictionary creator but includes some hand-edits. -** If you need any help to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli. -*/ - -#ifndef HEADER_GUARD_nw_wml1x_wml_1_3_tokens_h -#define HEADER_GUARD_nw_wml1x_wml_1_3_tokens_h - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -#define NW_Wml_1_0_PublicId 0x02 -#define NW_Wml_1_1_PublicId 0x04 -#define NW_Wml_1_2_PublicId 0x09 -#define NW_Wml_1_3_PublicId 0x0A - -typedef enum NW_Wml_1_3_ElementToken_0_e{ - NW_Wml_1_3_ElementToken_pre = 0x001b, - NW_Wml_1_3_ElementToken_a = 0x001c, - NW_Wml_1_3_ElementToken_td = 0x001d, - NW_Wml_1_3_ElementToken_tr = 0x001e, - NW_Wml_1_3_ElementToken_table = 0x001f, - NW_Wml_1_3_ElementToken_p = 0x0020, - NW_Wml_1_3_ElementToken_postfield = 0x0021, - NW_Wml_1_3_ElementToken_anchor = 0x0022, - NW_Wml_1_3_ElementToken_access = 0x0023, - NW_Wml_1_3_ElementToken_b = 0x0024, - NW_Wml_1_3_ElementToken_big = 0x0025, - NW_Wml_1_3_ElementToken_br = 0x0026, - NW_Wml_1_3_ElementToken_card = 0x0027, - NW_Wml_1_3_ElementToken_do = 0x0028, - NW_Wml_1_3_ElementToken_em = 0x0029, - NW_Wml_1_3_ElementToken_fieldset = 0x002a, - NW_Wml_1_3_ElementToken_go = 0x002b, - NW_Wml_1_3_ElementToken_head = 0x002c, - NW_Wml_1_3_ElementToken_i = 0x002d, - NW_Wml_1_3_ElementToken_img = 0x002e, - NW_Wml_1_3_ElementToken_input = 0x002f, - NW_Wml_1_3_ElementToken_meta = 0x0030, - NW_Wml_1_3_ElementToken_noop = 0x0031, - NW_Wml_1_3_ElementToken_prev = 0x0032, - NW_Wml_1_3_ElementToken_onevent = 0x0033, - NW_Wml_1_3_ElementToken_optgroup = 0x0034, - NW_Wml_1_3_ElementToken_option = 0x0035, - NW_Wml_1_3_ElementToken_refresh = 0x0036, - NW_Wml_1_3_ElementToken_select = 0x0037, - NW_Wml_1_3_ElementToken_small = 0x0038, - NW_Wml_1_3_ElementToken_strong = 0x0039, - NW_Wml_1_3_ElementToken_template = 0x003b, - NW_Wml_1_3_ElementToken_timer = 0x003c, - NW_Wml_1_3_ElementToken_u = 0x003d, - NW_Wml_1_3_ElementToken_setvar = 0x003e, - NW_Wml_1_3_ElementToken_wml = 0x003f -}NW_Wml_1_3_ElementToken_0_t; - - -typedef enum NW_Wml_1_3_ElementToken_1_e{ - NW_Wml_1_3_ElementToken_zzzunknown = 0x0118 -}NW_Wml_1_3_ElementToken_1_t; - - -typedef enum NW_Wml_1_3_AttributeToken_0_e{ - NW_Wml_1_3_AttributeToken_accept_charset = 0x0005, - NW_Wml_1_3_AttributeToken_align_bottom = 0x0006, - NW_Wml_1_3_AttributeToken_align_center = 0x0007, - NW_Wml_1_3_AttributeToken_align_left = 0x0008, - NW_Wml_1_3_AttributeToken_align_middle = 0x0009, - NW_Wml_1_3_AttributeToken_align_right = 0x000a, - NW_Wml_1_3_AttributeToken_align_top = 0x000b, - NW_Wml_1_3_AttributeToken_alt = 0x000c, - NW_Wml_1_3_AttributeToken_content = 0x000d, - NW_Wml_1_3_AttributeToken_domain = 0x000f, - NW_Wml_1_3_AttributeToken_emptyok_false = 0x0010, - NW_Wml_1_3_AttributeToken_emptyok_true = 0x0011, - NW_Wml_1_3_AttributeToken_format = 0x0012, - NW_Wml_1_3_AttributeToken_height = 0x0013, - NW_Wml_1_3_AttributeToken_hspace = 0x0014, - NW_Wml_1_3_AttributeToken_ivalue = 0x0015, - NW_Wml_1_3_AttributeToken_iname = 0x0016, - NW_Wml_1_3_AttributeToken_label = 0x0018, - NW_Wml_1_3_AttributeToken_localsrc = 0x0019, - NW_Wml_1_3_AttributeToken_maxlength = 0x001a, - NW_Wml_1_3_AttributeToken_method_get = 0x001b, - NW_Wml_1_3_AttributeToken_method_post = 0x001c, - NW_Wml_1_3_AttributeToken_mode_nowrap = 0x001d, - NW_Wml_1_3_AttributeToken_mode_wrap = 0x001e, - NW_Wml_1_3_AttributeToken_multiple_false = 0x001f, - NW_Wml_1_3_AttributeToken_multiple_true = 0x0020, - NW_Wml_1_3_AttributeToken_name = 0x0021, - NW_Wml_1_3_AttributeToken_newcontext_false = 0x0022, - NW_Wml_1_3_AttributeToken_newcontext_true = 0x0023, - NW_Wml_1_3_AttributeToken_onpick = 0x0024, - NW_Wml_1_3_AttributeToken_onenterbackward = 0x0025, - NW_Wml_1_3_AttributeToken_onenterforward = 0x0026, - NW_Wml_1_3_AttributeToken_ontimer = 0x0027, - NW_Wml_1_3_AttributeToken_optional_false = 0x0028, - NW_Wml_1_3_AttributeToken_optional_true = 0x0029, - NW_Wml_1_3_AttributeToken_path = 0x002a, - NW_Wml_1_3_AttributeToken_scheme = 0x002e, - NW_Wml_1_3_AttributeToken_sendreferer_false = 0x002f, - NW_Wml_1_3_AttributeToken_sendreferer_true = 0x0030, - NW_Wml_1_3_AttributeToken_size = 0x0031, - NW_Wml_1_3_AttributeToken_src = 0x0032, - NW_Wml_1_3_AttributeToken_ordered_true = 0x0033, - NW_Wml_1_3_AttributeToken_ordered_false = 0x0034, - NW_Wml_1_3_AttributeToken_tabindex = 0x0035, - NW_Wml_1_3_AttributeToken_title = 0x0036, - NW_Wml_1_3_AttributeToken_type = 0x0037, - NW_Wml_1_3_AttributeToken_type_accept = 0x0038, - NW_Wml_1_3_AttributeToken_type_delete = 0x0039, - NW_Wml_1_3_AttributeToken_type_help = 0x003a, - NW_Wml_1_3_AttributeToken_type_password = 0x003b, - NW_Wml_1_3_AttributeToken_type_onpick = 0x003c, - NW_Wml_1_3_AttributeToken_type_onenterbackward = 0x003d, - NW_Wml_1_3_AttributeToken_type_onenterforward = 0x003e, - NW_Wml_1_3_AttributeToken_type_ontimer = 0x003f, - NW_Wml_1_3_AttributeToken_zzzunknown = 0x0040, - NW_Wml_1_3_AttributeToken_type_options = 0x0045, - NW_Wml_1_3_AttributeToken_type_prev = 0x0046, - NW_Wml_1_3_AttributeToken_type_reset = 0x0047, - NW_Wml_1_3_AttributeToken_type_text = 0x0048, - NW_Wml_1_3_AttributeToken_type_vnd_ = 0x0049, - NW_Wml_1_3_AttributeToken_href = 0x004a, - NW_Wml_1_3_AttributeToken_href_http___ = 0x004b, - NW_Wml_1_3_AttributeToken_href_https___ = 0x004c, - NW_Wml_1_3_AttributeToken_value = 0x004d, - NW_Wml_1_3_AttributeToken_vspace = 0x004e, - NW_Wml_1_3_AttributeToken_width = 0x004f, - NW_Wml_1_3_AttributeToken_xml_lang = 0x0050, - NW_Wml_1_3_AttributeToken_align = 0x0052, - NW_Wml_1_3_AttributeToken_columns = 0x0053, - NW_Wml_1_3_AttributeToken_class = 0x0054, - NW_Wml_1_3_AttributeToken_id = 0x0055, - NW_Wml_1_3_AttributeToken_forua_false = 0x0056, - NW_Wml_1_3_AttributeToken_forua_true = 0x0057, - NW_Wml_1_3_AttributeToken_src_http___ = 0x0058, - NW_Wml_1_3_AttributeToken_src_https___ = 0x0059, - NW_Wml_1_3_AttributeToken_http_equiv = 0x005a, - NW_Wml_1_3_AttributeToken_http_equiv_Content_Type = 0x005b, - NW_Wml_1_3_AttributeToken_content_application_vnd_wap_wmlc_charset_ = 0x005c, - NW_Wml_1_3_AttributeToken_http_equiv_Expires = 0x005d, - NW_Wml_1_3_AttributeToken_accesskey = 0x005e, - NW_Wml_1_3_AttributeToken_enctype = 0x005f, - NW_Wml_1_3_AttributeToken_enctype_application_x_www_form_urlencoded = 0x0060, - NW_Wml_1_3_AttributeToken_enctype_multipart_form_data = 0x0061, - NW_Wml_1_3_AttributeToken_xml_space_preserve = 0x0062, - NW_Wml_1_3_AttributeToken_xml_space_default = 0x0063, - NW_Wml_1_3_AttributeToken_cache_control_no_cache = 0x0064, - NW_Wml_1_3_AttributeToken_cache_control = 0x0065, - NW_Wml_1_3_AttributeToken_emptyok = 0x0066, - NW_Wml_1_3_AttributeToken_forua = 0x0067, - NW_Wml_1_3_AttributeToken_method = 0x0068, - NW_Wml_1_3_AttributeToken_mode = 0x0069, - NW_Wml_1_3_AttributeToken_multiple = 0x006a, - NW_Wml_1_3_AttributeToken_optional = 0x006b, - NW_Wml_1_3_AttributeToken_newcontext = 0x006c, - NW_Wml_1_3_AttributeToken_ordered = 0x006d, - NW_Wml_1_3_AttributeToken_sendreferer = 0x006e, - NW_Wml_1_3_AttributeToken_xml_space = 0x006f, - NW_Wml_1_3_AttributeToken__com_ = 0x0085, - NW_Wml_1_3_AttributeToken__edu_ = 0x0086, - NW_Wml_1_3_AttributeToken__net_ = 0x0087, - NW_Wml_1_3_AttributeToken__org_ = 0x0088, - NW_Wml_1_3_AttributeToken_accept = 0x0089, - NW_Wml_1_3_AttributeToken_bottom = 0x008a, - NW_Wml_1_3_AttributeToken_clear = 0x008b, - NW_Wml_1_3_AttributeToken_delete = 0x008c, - NW_Wml_1_3_AttributeToken_help = 0x008d, - NW_Wml_1_3_AttributeToken_http___ = 0x008e, - NW_Wml_1_3_AttributeToken_http___www_ = 0x008f, - NW_Wml_1_3_AttributeToken_https___ = 0x0090, - NW_Wml_1_3_AttributeToken_https___www_ = 0x0091, - NW_Wml_1_3_AttributeToken_middle = 0x0093, - NW_Wml_1_3_AttributeToken_nowrap = 0x0094, - NW_Wml_1_3_AttributeValueToken_onpick = 0x0095, - NW_Wml_1_3_AttributeValueToken_onenterbackward = 0x0096, - NW_Wml_1_3_AttributeValueToken_onenterforward = 0x0097, - NW_Wml_1_3_AttributeValueToken_ontimer = 0x0098, - NW_Wml_1_3_AttributeToken_options = 0x0099, - NW_Wml_1_3_AttributeToken_password = 0x009a, - NW_Wml_1_3_AttributeToken_reset = 0x009b, - NW_Wml_1_3_AttributeToken_text = 0x009d, - NW_Wml_1_3_AttributeToken_top = 0x009e, - NW_Wml_1_3_AttributeToken_unknown = 0x009f, - NW_Wml_1_3_AttributeToken_wrap = 0x00a0, - NW_Wml_1_3_AttributeToken_www_ = 0x00a1 -}NW_Wml_1_3_AttributeToken_0_t; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Wed Apr 24 14:59:12 2002 -** (coordinated universal time) -** -** Command line: r:\Shared\shaun\dict_creator\dict_creator.exe wml_1_3.dict wml_1_3_tokendict.c wml_1_3_tokendict.h -*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nw_xhtml_xhtml_1_0_tokens.h --- a/webengine/wmlengine/src/utils/include/nw_xhtml_xhtml_1_0_tokens.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -** WARNING -** -** DO NOT EDIT - THIS CODE IS AUTOMATICALLY GENERATED -** FROM A DATA FILE BY THE DICTIONARY CREATION PROGRAM -** -** This file generated on Sat Mar 05 16:32:13 2005 -** (coordinated universal time) -** -** Command line: dict_creator xhtml_1_0.dict xhtml_1_0_dict.c nw_xhtml_xhtml_1_0_tokens.h -*/ - -#ifndef _NW_Tempest_nw_xhtml_xhtml_1_0_tokens_h -#define _NW_Tempest_nw_xhtml_xhtml_1_0_tokens_h - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#define NW_xhtml_1_0_PublicId 55 - -typedef enum NW_XHTML_1_0_ElementToken_0_e -{ - NW_XHTML_ElementToken_body = 0x0005, - NW_XHTML_ElementToken_head = 0x0006, - NW_XHTML_ElementToken_html = 0x0007, - NW_XHTML_ElementToken_title = 0x0008, - NW_XHTML_ElementToken_frameset = 0x0009, - NW_XHTML_ElementToken_noframes = 0x000a, - NW_XHTML_ElementToken_noembed = 0x000b, - NW_XHTML_ElementToken_script = 0x000c, - NW_XHTML_ElementToken_noscript = 0x000d, - NW_XHTML_ElementToken_caption = 0x000e, - NW_XHTML_ElementToken_table = 0x000f, - NW_XHTML_ElementToken_td = 0x0010, - NW_XHTML_ElementToken_th = 0x0011, - NW_XHTML_ElementToken_tr = 0x0012, - NW_XHTML_ElementToken_tbody = 0x0013, - NW_XHTML_ElementToken_thead = 0x0014, - NW_XHTML_ElementToken_tfoot = 0x0015, - NW_XHTML_ElementToken_form = 0x0016, - NW_XHTML_ElementToken_input = 0x0017, - NW_XHTML_ElementToken_label = 0x0018, - NW_XHTML_ElementToken_select = 0x0019, - NW_XHTML_ElementToken_option = 0x001a, - NW_XHTML_ElementToken_optgroup = 0x001b, - NW_XHTML_ElementToken_button = 0x001c, - NW_XHTML_ElementToken_textarea = 0x001d, - NW_XHTML_ElementToken_frame = 0x001e, - NW_XHTML_ElementToken_style = 0x001f, - NW_XHTML_ElementToken_object = 0x0020, - NW_XHTML_ElementToken_embed = 0x0021, - NW_XHTML_ElementToken_meta = 0x0022, - NW_XHTML_ElementToken_link = 0x0023, - NW_XHTML_ElementToken_img = 0x0024, - NW_XHTML_ElementToken_map = 0x0025, - NW_XHTML_ElementToken_area = 0x0026, - NW_XHTML_ElementToken_a = 0x0027, - NW_XHTML_ElementToken_base = 0x0028, - NW_XHTML_ElementToken_div = 0x0029, - NW_XHTML_ElementToken_font = 0x002a, - NW_XHTML_ElementToken_h1 = 0x002b, - NW_XHTML_ElementToken_h2 = 0x002c, - NW_XHTML_ElementToken_h3 = 0x002d, - NW_XHTML_ElementToken_h4 = 0x002e, - NW_XHTML_ElementToken_h5 = 0x002f, - NW_XHTML_ElementToken_hr = 0x0030, - NW_XHTML_ElementToken_b = 0x0031, - NW_XHTML_ElementToken_big = 0x0032, - NW_XHTML_ElementToken_i = 0x0033, - NW_XHTML_ElementToken_menu = 0x0034, - NW_XHTML_ElementToken_span = 0x0035, - NW_XHTML_ElementToken_p = 0x0036, - NW_XHTML_ElementToken_center = 0x0037, - NW_XHTML_ElementToken_dl = 0x0038, - NW_XHTML_ElementToken_dt = 0x0039, - NW_XHTML_ElementToken_dd = 0x003a, - NW_XHTML_ElementToken_ul = 0x003b, - NW_XHTML_ElementToken_ol = 0x003c, - NW_XHTML_ElementToken_li = 0x003d, - NW_XHTML_ElementToken_br = 0x003e, - NW_XHTML_ElementToken_nobr = 0x003f -}NW_XHTML_1_0_ElementToken_0_t; - - -typedef enum NW_XHTML_1_0_ElementToken_1_e{ - NW_XHTML_ElementToken_h6 = 0x0105, - NW_XHTML_ElementToken_em = 0x0106, - NW_XHTML_ElementToken_fieldset = 0x0107, - NW_XHTML_ElementToken_marquee = 0x0108, - NW_XHTML_ElementToken_dir = 0x0109, - NW_XHTML_ElementToken_small = 0x010a, - NW_XHTML_ElementToken_plaintext = 0x010b, - NW_XHTML_ElementToken_pre = 0x010c, - NW_XHTML_ElementToken_abbr = 0x010d, - NW_XHTML_ElementToken_acronym = 0x010e, - NW_XHTML_ElementToken_address = 0x010f, - NW_XHTML_ElementToken_blockquote = 0x0110, - NW_XHTML_ElementToken_blink = 0x0111, - NW_XHTML_ElementToken_cite = 0x0112, - NW_XHTML_ElementToken_code = 0x0113, - NW_XHTML_ElementToken_dfn = 0x0114, - NW_XHTML_ElementToken_u = 0x0115, - NW_XHTML_ElementToken_kbd = 0x0116, - NW_XHTML_ElementToken_q = 0x0117, - NW_XHTML_ElementToken_samp = 0x0118, - NW_XHTML_ElementToken_strong = 0x0119, - NW_XHTML_ElementToken_var = 0x011a, - NW_XHTML_ElementToken_tt = 0x011b, - NW_XHTML_ElementToken_sub = 0x011c, - NW_XHTML_ElementToken_sup = 0x011d, - NW_XHTML_ElementToken_ins = 0x011e, - NW_XHTML_ElementToken_del = 0x011f, - NW_XHTML_ElementToken_strike = 0x0120, - NW_XHTML_ElementToken_s = 0x0121, - NW_XHTML_ElementToken_param = 0x0122, - NW_XHTML_ElementToken_bgsound = 0x0123, - NW_XHTML_ElementToken_zzzunknown = 0x0124 -}NW_XHTML_1_0_ElementToken_1_t; - - -typedef enum NW_XHTML_1_0_AttributeToken_0_e{ - NW_XHTML_AttributeToken_abbr = 0x0005, - NW_XHTML_AttributeToken_accept_charset = 0x0006, - NW_XHTML_AttributeToken_accept = 0x0007, - NW_XHTML_AttributeToken_accesskey = 0x0008, - NW_XHTML_AttributeToken_action = 0x0009, - NW_XHTML_AttributeToken_align = 0x000a, - NW_XHTML_AttributeToken_alink = 0x000b, - NW_XHTML_AttributeToken_alt = 0x000c, - NW_XHTML_AttributeToken_archive = 0x000d, - NW_XHTML_AttributeToken_axis = 0x000e, - NW_XHTML_AttributeToken_background = 0x000f, - NW_XHTML_AttributeToken_bgcolor = 0x0010, - NW_XHTML_AttributeToken_border = 0x0011, - NW_XHTML_AttributeToken_cellpadding = 0x0012, - NW_XHTML_AttributeToken_char = 0x0013, - NW_XHTML_AttributeToken_charoff = 0x0014, - NW_XHTML_AttributeToken_charset = 0x0015, - NW_XHTML_AttributeToken_checked = 0x0016, - NW_XHTML_AttributeToken_cite = 0x0017, - NW_XHTML_AttributeToken_class = 0x0018, - NW_XHTML_AttributeToken_classid = 0x0019, - NW_XHTML_AttributeToken_clear = 0x001a, - NW_XHTML_AttributeToken_code = 0x001b, - NW_XHTML_AttributeToken_codebase = 0x001c, - NW_XHTML_AttributeToken_codetype = 0x001d, - NW_XHTML_AttributeToken_color = 0x001e, - NW_XHTML_AttributeToken_cols = 0x001f, - NW_XHTML_AttributeToken_colspan = 0x0020, - NW_XHTML_AttributeToken_content = 0x0022, - NW_XHTML_AttributeToken_coords = 0x0023, - NW_XHTML_AttributeToken_data = 0x0024, - NW_XHTML_AttributeToken_declare = 0x0026, - NW_XHTML_AttributeToken_dir = 0x0028, - NW_XHTML_AttributeToken_disabled = 0x0029, - NW_XHTML_AttributeToken_enctype = 0x002a, - NW_XHTML_AttributeToken_encoding = 0x002b, - NW_XHTML_AttributeToken_frameborder = 0x002e, - NW_XHTML_AttributeToken_height = 0x0030, - NW_XHTML_AttributeToken_href = 0x0031, - NW_XHTML_AttributeToken_hspace = 0x0033, - NW_XHTML_AttributeToken_http_equiv = 0x0034, - NW_XHTML_AttributeToken_id = 0x0035, - NW_XHTML_AttributeToken_ismap = 0x0036, - NW_XHTML_AttributeToken_label = 0x0037, - NW_XHTML_AttributeToken_language = 0x0039, - NW_XHTML_AttributeToken_link = 0x003a, - NW_XHTML_AttributeToken_marginheight = 0x003c, - NW_XHTML_AttributeToken_marginwidth = 0x003d, - NW_XHTML_AttributeToken_maxlength = 0x003e, - NW_XHTML_AttributeToken_media = 0x003f, - NW_XHTML_AttributeToken_method = 0x0045, - NW_XHTML_AttributeToken_multiple = 0x0046, - NW_XHTML_AttributeToken_name = 0x0047, - NW_XHTML_AttributeToken_nohref = 0x0048, - NW_XHTML_AttributeToken_noresize = 0x0049, - NW_XHTML_AttributeToken_noshade = 0x004a, - NW_XHTML_AttributeToken_nowrap = 0x004b, - NW_XHTML_AttributeToken_onblur = 0x004d, - NW_XHTML_AttributeToken_onchange = 0x004e, - NW_XHTML_AttributeToken_onclick = 0x004f, - NW_XHTML_AttributeToken_onfocus = 0x0051, - NW_XHTML_AttributeToken_onload = 0x0055, - NW_XHTML_AttributeToken_onreset = 0x005b, - NW_XHTML_AttributeToken_onsubmit = 0x005d, - NW_XHTML_AttributeToken_onunload = 0x005e, - NW_XHTML_AttributeToken_readonly = 0x0061, - NW_XHTML_AttributeToken_rel = 0x0062, - NW_XHTML_AttributeToken_rev = 0x0063, - NW_XHTML_AttributeToken_rows = 0x0064, - NW_XHTML_AttributeToken_rowspan = 0x0065, - NW_XHTML_AttributeToken_scheme = 0x0067, - NW_XHTML_AttributeToken_scrolling = 0x0069, - NW_XHTML_AttributeToken_selected = 0x006a, - NW_XHTML_AttributeToken_shape = 0x006b, - NW_XHTML_AttributeToken_size = 0x006c, - NW_XHTML_AttributeToken_src = 0x006e, - NW_XHTML_AttributeToken_standby = 0x006f, - NW_XHTML_AttributeToken_start = 0x0070, - NW_XHTML_AttributeToken_style = 0x0071, - NW_XHTML_AttributeToken_tabindex = 0x0073, - NW_XHTML_AttributeToken_target = 0x0074, - NW_XHTML_AttributeToken_title = 0x0076, - NW_XHTML_AttributeToken_type = 0x0077, - NW_XHTML_AttributeToken_usemap = 0x0078, - NW_XHTML_AttributeToken_valign = 0x0079, - NW_XHTML_AttributeToken_value = 0x007a, - NW_XHTML_AttributeToken_version = 0x007c, - NW_XHTML_AttributeToken_vspace = 0x007e, - NW_XHTML_AttributeToken_width = 0x007f, - NW_XHTML_AttributeToken_none = 0x0085, - NW_XHTML_AttributeToken_left = 0x0086, - NW_XHTML_AttributeToken_right = 0x0087, - NW_XHTML_AttributeToken_normal = 0x0088, - NW_XHTML_AttributeToken_italic = 0x0089, - NW_XHTML_AttributeToken_bold = 0x008a, - NW_XHTML_AttributeToken_circle = 0x008b, - NW_XHTML_AttributeToken_disc = 0x008c, - NW_XHTML_AttributeToken_square = 0x008d, - NW_XHTML_AttributeToken_always = 0x008e, - NW_XHTML_AttributeToken_avoid = 0x008f, - NW_XHTML_AttributeToken_center = 0x0090, - NW_XHTML_AttributeToken_justify = 0x0091, - NW_XHTML_AttributeToken_underline = 0x0092, - NW_XHTML_AttributeToken_blink = 0x0093, - NW_XHTML_AttributeToken_marquee = 0x0094, - NW_XHTML_AttributeToken_top = 0x0095, - NW_XHTML_AttributeToken_middle = 0x0096, - NW_XHTML_AttributeToken_bottom = 0x0097, - NW_XHTML_AttributeToken_baseline = 0x0098, - NW_XHTML_AttributeToken_get = 0x009a, - NW_XHTML_AttributeToken_post = 0x009b, - NW_XHTML_AttributeToken_ltr = 0x009d, - NW_XHTML_AttributeToken_rtl = 0x009e, - NW_XHTML_AttributeToken_yes = 0x00a0, - NW_XHTML_AttributeToken_no = 0x00a1, - NW_XHTML_AttributeToken_auto = 0x00a2, - NW_XHTML_AttributeToken_button = 0x00a3, - NW_XHTML_AttributeToken_submit = 0x00a4, - NW_XHTML_AttributeToken_reset = 0x00a5, - NW_XHTML_AttributeToken__1 = 0x00ae, - NW_XHTML_AttributeToken_all = 0x00b3, - NW_XHTML_AttributeToken_password = 0x00b9, - NW_XHTML_AttributeToken_checkbox = 0x00ba, - NW_XHTML_AttributeToken_radio = 0x00bb, - NW_XHTML_AttributeToken_hidden = 0x00bc -}NW_XHTML_1_0_AttributeToken_0_t; - - -typedef enum NW_XHTML_1_0_AttributeToken_1_e{ - NW_XHTML_AttributeToken_zzzunknown = 0x0105, - NW_XHTML_AttributeToken_xml_stylesheet = 0x0106, - NW_XHTML_AttributeToken_cellspacing = 0x0108, - NW_XHTML_AttributeToken_text = 0x0109, - NW_XHTML_AttributeToken_bgproperties = 0x010a -}NW_XHTML_1_0_AttributeToken_1_t; - - -typedef enum NW_XHTML_1_0_AttributeToken_2_e{ - NW_XHTML_AttributeToken_behavior = 0x0205, - NW_XHTML_AttributeToken_direction = 0x0206, - NW_XHTML_AttributeToken_loop = 0x0207, - NW_XHTML_AttributeToken_scrollamount = 0x0208, - NW_XHTML_AttributeToken_scrolldelay = 0x0209, - NW_XHTML_AttributeToken_cti = 0x020b, - NW_XHTML_AttributeToken_telbook = 0x020d, - NW_XHTML_AttributeToken_email = 0x020f, - NW_XHTML_AttributeToken_directkey = 0x0221, - NW_XHTML_AttributeToken_memoryname = 0x0222, - NW_XHTML_AttributeToken_istyle = 0x0223, - NW_XHTML_AttributeToken_mode = 0x0224, - NW_XHTML_AttributeToken_bordercolor = 0x0225, - NW_XHTML_AttributeToken_A = 0x0286, - NW_XHTML_AttributeToken_a = 0x0287, - NW_XHTML_AttributeToken_I = 0x0288, - NW_XHTML_AttributeToken_i = 0x0289, - NW_XHTML_AttributeToken_scroll = 0x028a, - NW_XHTML_AttributeToken_slide = 0x028b, - NW_XHTML_AttributeToken_alternate = 0x028c -}NW_XHTML_1_0_AttributeToken_2_t; - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_assert.h --- a/webengine/wmlengine/src/utils/include/nwx_assert.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 1999 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_assert.h -** Purpose: Provides interfaces to support assertions in a platform -** independent manner. -**************************************************************************/ -#ifndef NWX_ASSERT_H -#define NWX_ASSERT_H - -/* -** Includes -*/ -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Global Function Declarations -*/ - - - -#ifdef _DEBUG -#if defined(__WINS__) - // Debug builds use the _BREAKPOINT() macro provided by E32def.h - // It provides complier-specific assembly instructions for Wins and WinsCW. - // We use a function in the NW_ASSERT macro, because raw assembly generates a syntax error. - int kimono_assert (void); - #define NW_ASSERT(expr) (void)( (expr) || kimono_assert() ) -#else /* THUMB */ - #include <assert.h> - #define NW_ASSERT(expr) assert(((NW_Uint32)(expr)) != 0) -#endif // __WINS__ - -#else - /* Release builds for all configurations evaluate to */ - /* something the compiler optimizer can throw away. */ - #define NW_ASSERT(expr) ((void)0) - -#endif - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_ASSERT_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_buffer.h --- a/webengine/wmlengine/src/utils/include/nwx_buffer.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_buffer.h -** Purpose: Provides the interface to a managerd buffer of bytes. -** The buffer contains an allocated size and an in use size (length) -** and also a pointer to a data array. -**************************************************************************/ -#ifndef NWX_BUFFER_H -#define NWX_BUFFER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - -/* -** Type Declarations -*/ -typedef struct { - NW_Uint32 length; /* length of the used part of the buffer */ - NW_Uint32 allocatedLength; /* How much space was really allocated */ - NW_Byte *data; /* the real data */ -} NW_Buffer_t; - -/* -** Global Function Declarations -*/ - -/* create a buffer struct and allocate some space */ -NW_Buffer_t *NW_Buffer_New(const NW_Uint32 size); - -/* free the space allocated for the buffer */ -void NW_Buffer_Free(NW_Buffer_t *buffer); - -/* free the space allocated for the buffer, do not free the data */ -void NW_Buffer_FreeNotData(NW_Buffer_t *buffer); - -/*copy string into buffer */ -TBrowserStatusCode NW_Buffer_CopyStr(NW_Buffer_t *buffer, const NW_Ucs2 *str); - -/*copy NW_buffer to NW_Buffer*/ -TBrowserStatusCode NW_Buffer_CopyBuffers(NW_Buffer_t *to, const NW_Buffer_t *from); - -/*append NW_buffer to NW_Buffer*/ -TBrowserStatusCode NW_Buffer_AppendBuffers(NW_Buffer_t *to, const NW_Buffer_t *from); - -/*set ascii string into buffer */ -void NW_Buffer_SetData(NW_Buffer_t *buffer, char *str); - - -#define NW_Buffer_Len(buf) ((buf)->length) -#define NW_Buffer_Data(buf) ((buf)->data) - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_BUFFER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_cleanup_epoc32.h --- a/webengine/wmlengine/src/utils/include/nwx_cleanup_epoc32.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_cleanup_epoc32.h -** Purpose: Cleans up all the rainbow memory on exiting. -**************************************************************************/ -#ifndef NWX_CLEANUP_EPOC32_H -#define NWX_CLEANUP_EPOC32_H - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - -TBrowserStatusCode NW_Cleanup(); - -#endif /* NWX_CLEANUP_EPOC32_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_ctx.h --- a/webengine/wmlengine/src/utils/include/nwx_ctx.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_ctx.h -** Purpose: Provides the interface to a component's global/static context -** for target platforms which can not have non-const global -** or static data in dynamically loaded libraries. -**************************************************************************/ -#ifndef NWX_CTX_H -#define NWX_CTX_H - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Component Definitions -*/ - -typedef enum { - NW_CTX_URL_LOADER = 0, - NW_CTX_MEM_SEG = 1, - NW_CTX_MSG_API = 2, - NW_CTX_MSG_DSP = 3, - NW_CTX_OSU = 4, - NW_CTX_WML_CORE = 5, - NW_CTX_URL = 6, - NW_CTX_SETTINGS = 7, - NW_CTX_SCRIPT = 8, - NW_CTX_SCR_SERVER = 9, - NW_CTX_SCR_FUNC_TAB = 10, - NW_CTX_LOGGER = 11, - NW_CTX_UTILS_MATH = 12, - NW_CTX_MEM_PRO_LAST_PTR = 13, - NW_CTX_MEM_PRO_SEQ_NO = 14, - NW_CTX_BROWSER_APP = 15, - NW_CTX_HED_LOAD_QUEUE = 16, - NW_CTX_PLUGIN_LIST = 17, - NW_CTX_USER_AGENT = 18, - NW_CTX_VARIABLE_CSS = 19, - NW_CTX_CONT_ACCESS_MGR = 20, - -#ifdef __TEST_TESTHARNESS_ENABLED - NW_CTX_TESTHARNESS = NW_CTX_VARIABLE_CSS + 1, -#endif - - NW_CTX_CONTEXT_COUNT - -} NW_CtxComponent_t; - -// currently 37 (optionally 38) -#define NW_NUM_CONTEXTS NW_CTX_CONTEXT_COUNT - -/* Set a context - Returns KBrsrSuccess or KBrsrOutOfMemory */ -TBrowserStatusCode NW_Ctx_Set(const NW_CtxComponent_t aComponent, - const NW_Uint16 aInstance, void *aContext); - -/* Get a context */ -void *NW_Ctx_Get(const NW_CtxComponent_t aComponent, - const NW_Uint16 aInstance); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_CTX_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_ctx_epoc32.h --- a/webengine/wmlengine/src/utils/include/nwx_ctx_epoc32.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_ctx_epoc32.h -** Purpose: Cleans up all the rainbow memory on exiting. -**************************************************************************/ -#ifndef NWX_CTX_EPOC32_H -#define NWX_CTX_EPOC32_H - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -TBrowserStatusCode NW_Ctx_DeleteBrowserContext(); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_CTX_EPOC32_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_datastruct.h --- a/webengine/wmlengine/src/utils/include/nwx_datastruct.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides interfaces to data structure routines. -* These routines support a number of different data structures. -* -* NW_Ds_Dar - DynamicArray of pointers. Creates an array of pointers -* to void *. Elements are inserted and retrieved by index. -* The array is fixed size put will automatically grow if -* the append function is called and the array needs to grow. -* -*/ - -#ifndef NWX_DATASTRUCT_H -#define NWX_DATASTRUCT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - -/************************************************************************* -** Dynamic Array of Pointers Routines -**************************************************************************/ - -/* -** Type Definitions -*/ - -typedef void* NW_Ds_Mem_MallocHandler(); -typedef void NW_Ds_Mem_FreeHandler(); - -typedef struct { - NW_Uint16 size; /* number of elements allocated */ - NW_Uint16 numElements; /* number of elements in use */ - void **elements; /* array of pointers to the elements */ - NW_Ds_Mem_MallocHandler *mallocHandler; /* memory allocation routine */ - NW_Ds_Mem_FreeHandler *freeHandler; /* memory deallocation routine */ -} NW_Ds_DynamicArray_t; - - -/* -** Global Function Declarations -*/ - -/* create a dynamic array on the default heap */ -NW_Ds_DynamicArray_t *NW_Ds_DarNew_DefaultHeap(const NW_Uint16 size); - -/* create a dynamic array */ -NW_Ds_DynamicArray_t *NW_Ds_DarNew(const NW_Uint16 size, - NW_Ds_Mem_MallocHandler *alloc, - NW_Ds_Mem_FreeHandler *free); - -/* deletes a dynamic array */ -void NW_Ds_DarDelete(NW_Ds_DynamicArray_t *array); - -/* append pointer to new element to end of array */ -TBrowserStatusCode NW_Ds_DarAppend(NW_Ds_DynamicArray_t *array, void *element); - -/* get the pointer to the specified element */ -void *NW_Ds_DarGetElement(const NW_Ds_DynamicArray_t *array, - const NW_Uint32 index); - - -/* return count of elements */ -NW_Uint16 NW_Ds_DarGetCount(const NW_Ds_DynamicArray_t *array); - -/************************************************************************* -** Single Linked List Routines -**************************************************************************/ - -/* -** Type Declarations -*/ - -typedef struct _NW_Node_t NW_Node_t; -struct _NW_Node_t { - NW_Node_t *next; - void *data; -}; - -/************************************************************************* -** Collection Routines -**************************************************************************/ - -/* -** Type Declarations -*/ - -typedef NW_Bool NW_Ds_CollectionMatcher_t (const void *key, const void *data); - -typedef struct _NW_Ds_Collection_t NW_Ds_Collection_t; - -typedef const struct { - TBrowserStatusCode (*add)(NW_Ds_Collection_t *coll, void *value); - void * (*lookup)(NW_Ds_Collection_t *coll, const void *key, - NW_Ds_CollectionMatcher_t matcher); - void * (*remove)(NW_Ds_Collection_t *coll, const void *key, - NW_Ds_CollectionMatcher_t matcher); - void (*reset)(NW_Ds_Collection_t *coll); - void * (*getNext)(NW_Ds_Collection_t *coll); - void (*free_current)(NW_Ds_Collection_t *coll); - NW_Bool (*empty)(NW_Ds_Collection_t *coll); -} NW_Ds_CollectionApi_t; - -struct _NW_Ds_Collection_t { - NW_Ds_CollectionApi_t *api; - void *data; -}; - - -/* -** Global Function Declarations -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* NWX_DATASTRUCT_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_defs.h --- a/webengine/wmlengine/src/utils/include/nwx_defs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_defs.h -** Purpose: Contains definitions common to all components. -** Also contains defs for all of the Basic Scalar types -**************************************************************************/ -#ifndef NWX_DEFS_H -#define NWX_DEFS_H - -/* -**---------------------------------------------------------------------- -** Preprocessor Macro Definitions -**---------------------------------------------------------------------- -*/ -#ifdef __cplusplus -extern "C" { -#endif - -/* -**---------------------------------------------------------------------- -** Includes -**---------------------------------------------------------------------- -*/ - -/* - * ANSI/ISO C header files needed to define basic data types - * (ie. NULL, etc) - */ - -#include <stdlib.h> - - -/* -**---------------------------------------------------------------------- -** Type Declarations -**---------------------------------------------------------------------- -*/ - -#define _NW_STR(str) L ## str -#define NW_STR(str) _NW_STR(str) - -/* New type definitions with non-conflicting name scheme */ -typedef unsigned char NW_Bool; /* NW_FALSE, NW_TRUE */ -typedef unsigned char NW_Byte; /* 0 ... 0xFF */ -typedef unsigned short NW_Word; /* 0 ... 0xFFFF */ -typedef unsigned long NW_Dword; /* 0 ... 0xFFFFFFFF */ - -typedef unsigned char NW_Uint8; /* 0 ... 255 */ -typedef unsigned short NW_Uint16; /* 0 ... 65535 */ -typedef unsigned long NW_Uint32; /* 0 ... 4294967295 */ - -typedef signed char NW_Int8; /* -128 ... +127 */ -typedef signed short NW_Int16; /* -32768 ... +32767 */ -typedef signed long NW_Int32; /* -2147483648 ... +2147483647 */ - -typedef float NW_Float32; -typedef double NW_Float64; - -typedef unsigned short NW_Ucs2; /* 0 ... 65535 */ -typedef unsigned long NW_Ucs4; /* 0 ... 4294967295 */ - -/*This type can hold both TBrowserStatusCode and http status*/ -typedef NW_Int32 NW_WaeError_t; -typedef NW_Uint16 NW_WaeHttpStatus_t; - - -#define NW_TRUE ((NW_Bool) 0x01U) -#define NW_FALSE ((NW_Bool) 0x00U) - -#define NW_UINT8_MIN ((NW_Uint8) 0x00U) -#define NW_UINT8_MAX ((NW_Uint8) 0xFFU) - -#define NW_UINT16_MIN ((NW_Uint16) 0x0000U) -#define NW_UINT16_MAX ((NW_Uint16) 0xFFFFU) - -#define NW_UINT32_MIN ((NW_Uint32) 0x00000000U) -#define NW_UINT32_MAX ((NW_Uint32) 0xFFFFFFFFU) - -#define NW_INT8_MIN ((NW_Int8) 0x80U) -#define NW_INT8_MAX ((NW_Int8) 0x7FU) - -#define NW_INT16_MIN ((NW_Int16) 0x8000U) -#define NW_INT16_MAX ((NW_Int16) 0x7FFFU) - -#define NW_INT32_MIN ((NW_Int32) 0x80000000U) -#define NW_INT32_MAX ((NW_Int32) 0x7FFFFFFFU) - -/* - * Definitions needed by the script engine for - * performing IEEE floating point math. - * These *should* be platform independent constants defined - * by the IEEE specifications, but in all cases they - * can be found in the ANSI/ISO C header file <float.h> - */ -#define NW_FLOAT32_DIG FLT_DIG -#define NW_FLOAT32_MIN FLT_MIN -#define NW_FLOAT32_MAX FLT_MAX -#define NW_FLOAT32_MIN_EXP FLT_MIN_10_EXP -#define NW_FLOAT32_MAX_EXP FLT_MAX_10_EXP - -#define NW_MIN(x, y) ( ((x) < (y)) ? (x) : (y) ) -#define NW_MAX(x, y) ( ((x) > (y)) ? (x) : (y) ) - -/* - * When casting to unsigned types, the comparison "-expr <= 0" is used - * rather than "expr >= 0" to prevent warnings about unnecessary - * comparisons on Epoc hardware. - */ -#define NW_UINT8_CAST(expr) \ - ( (NW_ASSERT((-(NW_Int32)(expr)) <= 0 && \ - ((NW_Uint32)(expr)) <= NW_UINT8_MAX)), \ - ((NW_Uint8)(expr)) ) - -#define NW_UINT16_CAST(expr) \ - ( (NW_ASSERT((-(NW_Int32)(expr)) <= 0 && \ - ((NW_Uint32)(expr)) <= NW_UINT16_MAX)), \ - ((NW_Uint16)(expr)) ) - -#define NW_UINT32_CAST(expr) \ - ( (NW_ASSERT((-(NW_Int32)(expr)) <= 0 && \ - ((NW_Uint32)(expr)) <= NW_UINT32_MAX)), \ - ((NW_Uint32)(expr)) ) - -#define NW_INT8_CAST(expr) \ - ( (NW_ASSERT(((NW_Int32)(expr)) >= NW_INT8_MIN && \ - ((NW_Int32)(expr)) <= NW_INT8_MAX)), \ - ((NW_Int8)(expr)) ) - -#define NW_INT16_CAST(expr) \ - ( (NW_ASSERT(((NW_Int32)(expr)) >= NW_INT16_MIN && \ - ((NW_Int32)(expr)) <= NW_INT16_MAX)), \ - ((NW_Int16)(expr)) ) - -#define NW_INT32_CAST(expr) \ - ( (NW_ASSERT(((NW_Int32)(expr)) >= NW_INT32_MIN && \ - ((NW_Int32)(expr)) <= NW_INT32_MAX)), \ - ((NW_Int32)(expr)) ) - -#define NW_BOOL_CAST(expr) \ - ( ((NW_Bool)(((NW_Int32)(expr) != 0) ? NW_TRUE : NW_FALSE)) ) - -/* - * Used to supress compiler warnings about required, - * but unused function parameters - */ -#define NW_REQUIRED_PARAM(param) if (param) {}; - -/* NW_Opaque_t is used for passing dynamically typed - values between the Script engine and the browser. */ - -typedef enum -{ - NW_OPAQUE_VALUE_TYPE_INT32, - NW_OPAQUE_VALUE_TYPE_STRING, - NW_OPAQUE_VALUE_TYPE_BOOL, - NW_OPAQUE_VALUE_TYPE_FLOAT, - NW_OPAQUE_VALUE_TYPE_INVALID -} NW_Opaque_Value_Type_t; - -typedef struct _NW_Opaque_t NW_Opaque_t; - -/* Note: use "volatile" keyword to suppress compiler optimizer bug */ -/* which changes store/load operation into a data-type cast */ -struct _NW_Opaque_t { - volatile union { - NW_Ucs2 *s; - NW_Int32 i; - NW_Float32 f; - NW_Bool b; - } value; - NW_Opaque_Value_Type_t type; -}; - -/* Facilitates run-time error checking */ -#define NW_THROWIF_MEM(_call) {if ((_call) == NULL) goto _NW_CATCH_MEM;} -#define NW_THROW_ERROR() { goto _NW_CATCH_ERROR;} -#define NW_THROWIF(_call) {if ((_call)) goto _NW_CATCH_ERROR;} -#define NW_THROWIF_ERROR(_call) {if ((_call) != KBrsrSuccess) goto _NW_CATCH_ERROR;} -#define NW_THROWIF_NULL(_call) {if ((_call) == NULL) goto _NW_CATCH_ERROR;} - -#define NW_CATCH_MEM _NW_CATCH_MEM: -#define NW_CATCH_ERROR _NW_CATCH_ERROR: - -/* -**---------------------------------------------------------------------- -** Includes -**---------------------------------------------------------------------- -*/ -#include "nwx_assert.h" -#include "nwx_mem.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - public constants - * ------------------------------------------------------------------------- */ -#define NW_HED_UrlRequest_Reason_Undefined 0 /* Shouldn't be used */ -#define NW_HED_UrlRequest_Reason_ShellLoad 1 /* used by goto and bookmark dialogs */ -#define NW_HED_UrlRequest_Reason_ShellPrev 2 /* used by history */ -#define NW_HED_UrlRequest_Reason_ShellNext 3 /* used by history */ -#define NW_HED_UrlRequest_Reason_ShellReload 4 /* used by history */ -#define NW_HED_UrlRequest_Reason_DocLoad 5 /* used by content-handlers to load new top-level documents */ -#define NW_HED_UrlRequest_Reason_DocPrev 6 /* used by Wml1x content-handler to load new top-level document as the result of the PREV task */ -#define NW_HED_UrlRequest_Reason_DocLoadChild 7 /* used by content-handlers to load embedded documents */ -#define NW_HED_UrlRequest_Reason_RestorePrev 8 /* used to restore a failed page */ -#define NW_HED_UrlRequest_Reason_RestoreNext 9 /* used to restore a failed page */ -#define NW_HED_UrlRequest_Reason_DocLoadHead 10 - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_DEFS_H */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_defs_symbian.h --- a/webengine/wmlengine/src/utils/include/nwx_defs_symbian.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/************************************************** -File: nwx_defs_symbian.h -Description: This file contains data type - information for EPOC platform. - This file should be include in - the main defs file, nwx_defs.h -Added by: WMS -Date: 2nd Aug, 99 -**************************************************/ -#ifndef _NWX_DEFS_SYMBIAN_H_ -#define _NWX_DEFS_SYMBIAN_H_ - -#include <e32def.h> - -/* -This is the EPOC standard C header file. -Function such as 'memcpy' is here. -*/ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Rainbow has re-defined TRUE & FALSE. No longer need to undef. */ -#if 0 - -#ifdef TRUE -#undef TRUE -/* Allow EPOC rainbow to define its own value*/ -#endif - -#ifdef FALSE -#undef FALSE -/* Allow EPOC rainbow to define its own value*/ -#endif -#endif /* 0 */ - -#ifdef memcpy -#undef memcpy -/* Allow EPOC rainbow to define its own memcpy function*/ -#endif - -#define MAX_PATH 100 - -/* typedef from nwx_osu.h */ -typedef void* NW_Osu_Thread_t; -typedef void* NW_Osu_SemaphoreHandle_t; -typedef void* NW_Osu_Mutex_t; -typedef void* NW_Osu_File_t; -typedef void* NW_Osu_Signal_t; -typedef TUint32 NW_Osu_ThreadId_t; -typedef void* NW_Osu_Hwnd_t; - -/*helper funtion*/ -//void NW_Trace(char* string); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif _NWX_DEFS_SYMBIAN_H_ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_float.h --- a/webengine/wmlengine/src/utils/include/nwx_float.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_float.h -** Purpose: Provides the interface to platform-dependant float functions -**************************************************************************/ - -#ifndef NWX_FLOAT_H -#define NWX_FLOAT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "float.h" - -/* -** Type Declarations -*/ - -/* -** Global Function Declarations -*/ -extern NW_Bool is_finite_float64(NW_Float64 d); - -extern NW_Bool is_zero_float64(NW_Float64 d); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_FLOAT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_format.h --- a/webengine/wmlengine/src/utils/include/nwx_format.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_FORMAT_H -#define NWX_FORMAT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Global Function Declarations -*/ - -/****************************************************************************** - Name: - NW_Format_IsValidPhoneNumber( const NW_Ucs2 *phoneNumber ) - - Description: - Validate "input" as complying with WAPGenFormat-188 item, "phone_number". - - Parameters: - NW_Ucs2 *phoneNumber - - Return Value: - NW_TRUE - "input" is a valid phone_number - NW_FALSE- not valid -******************************************************************************/ -NW_Bool NW_Format_IsValidPhoneNumber( const NW_Ucs2 *phoneNumber ); - - -/****************************************************************************** - Name: - NW_Format_IsValidToneSequence( const NW_Ucs2 *toneSequence ) - - Description: - Validate "input" as complying with WAPGenFormat-188 item, "tone_sequence". - tone_sequence ::= (pause | dtmf_sequence)* - pause ::= "," - dtmf_sequence ::= dtmf_digit+ - dtmf_digit ::= DIGIT | "*" | "#" | "A" | "B" | "C" | "D" - DIGIT ::= "0" | "1" | "2" | "3" | "4" | - "5" | "6" | "7" | "8" | "9" - - Parameters: - NW_Ucs2 *toneSequence - - Return Value: - NW_TRUE - "input" is a valid tone sequence - NW_FALSE- not valid -******************************************************************************/ -NW_Bool NW_Format_IsValidToneSequence( const NW_Ucs2 *toneSequence ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_FORMAT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_generic_dlg.h --- a/webengine/wmlengine/src/utils/include/nwx_generic_dlg.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,262 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: Messaging - - Version: V1.0 - - Description: Defines the platform-independent interface to the - message dispatching API for all platforms. - - Implementation Notes: - This portion of the message dispatching API is intended to be - completely portable. - -******************************************************************/ -#ifndef NWX_GENERIC_DLG_H -#define NWX_GENERIC_DLG_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "nwx_osu.h" -#include "nwx_psq.h" -#include "nwx_msg_api.h" -#include "BrsrStatusCodes.h" - -/* Return values */ -#define DIALOG_FAIL 0 -#define DIALOG_OK 1 -#define DIALOG_YES_PRESSED 2 -#define DIALOG_NO_PRESSED 3 -#define DIALOG_ROLLER_PRESSED 4 -#define DIALOG_SEND_PRESSED 5 -#define DIALOG_END_PRESSED 6 -#define DIALOG_HASH_PRESSED 7 -#define DIALOG_HASH_RELEASED 8 -#ifdef WAP_FEA_WALLET_IN_USE -#define DIALOG_WALLET_SELECTED 9 -#define DIALOG_START_WALLET_OPT 10 -#endif - - - /* These index numbers must correspond to the strings in the UI */ - -typedef enum { - NULL_BUTTON_INDEX, - BACK_BUTTON_INDEX, - SELECT_BUTTON_INDEX, - OK_BUTTON_INDEX, - CANCEL_BUTTON_INDEX, - SIGN_BUTTON_INDEX, - ENTER_BUTTON_INDEX, - OPTIONS_BUTTON_INDEX -} NW_DialogButtons_t; - -typedef enum { - DIALOG_CONFIRM_YES, - DIALOG_CONFIRM_NO, - DIALOG_CONFIRM_END -} NW_Dlg_Confirm_Result_t; - -/* -** Type Definitions -*/ - -enum { - UI_OPTION_NONE, - UI_OPTION_TEXT_TO_SIGN, - UI_OPTION_DISPLAY_CERT_DETAILS, - UI_OPTION_DISPLAY_SECURITY_SETTINGS, - UI_OPTION_ACCEPT_SERVER_CERT, - UI_OPTION_ACCEPT_CLIENT_AUTH, - UI_OPTION_CERT_LIST_SIGN_TEXT, - UI_OPTION_SELECT_CERT_HANDSHAKE, - UI_OPTION_ENTER_PIN_SIGN_TEXT, - UI_OPTION_ENTER_PIN_MODIFY, - UI_OPTION_ENTER_PIN_UNBLOCK, - UI_OPTION_ENTER_NEW_PIN, - UI_OPTION_ENTER_NEW_PIN_REPEAT, - UI_OPTION_ENTER_NEW_PIN_RETRY, - UI_OPTION_ENTER_PIN_ENABLE, - UI_OPTION_ENTER_PIN_DISABLE, - UI_OPTION_ENTER_PIN_HANDSHAKE, - UI_OPTION_ENTER_PIN_HANDSHAKE_RETRY, - UI_OPTION_ENTER_PIN_CERT_RESP, - UI_OPTION_ENTER_PIN_SIGNED_CERT, - UI_OPTION_ENTER_PIN_HASHED_CERT, - UI_OPTION_ENTER_PIN_DELETE, - UI_OPTION_SAVE_CERT, - UI_OPTION_SAVE_SIGNED_CERT, - UI_OPTION_SAVE_HASHED_CERT, - UI_OPTION_ENTER_HASH, - UI_OPTION_ENTER_HASH_ERROR, - UI_OPTION_SELECT_WIM_SAVE_CERT, - UI_OPTION_SELECT_WIM_SAVE_HASHED_CERT, - UI_OPTION_SELECT_WIM_SAVE_SIGNED_CERT -}; - - -typedef struct { - const NW_Ucs2* title; - const NW_Ucs2* prompt; - NW_Uint8 uiOptions; - NW_Uint16 itemsCount; - NW_Ucs2** items; - NW_DialogButtons_t button0; - NW_DialogButtons_t button1; - NW_Uint8 selectedItem; - NW_Uint8 selectedButton; - void* context; -}NW_Dlg_ListSelect_t ; - -typedef struct { - const NW_Ucs2* title; - const NW_Ucs2* prompt; - NW_Uint8 uiOptions; - NW_DialogButtons_t button0; - NW_DialogButtons_t button1; - NW_Uint8 selectedButton; - void* context; -}NW_Dlg_Prompt_t ; - - - -typedef struct { - const NW_Ucs2* title; - const NW_Ucs2* prompt; - NW_Ucs2* format; - const NW_Ucs2* emptyOKStr; - NW_Uint8 uiOptions; - NW_Bool shouldHide; - NW_Bool isNumber; - NW_DialogButtons_t button0; - NW_DialogButtons_t button1; - NW_Uint16 maxInputLen; - NW_Ucs2* input; - NW_Uint8 selectedButton; - void* context; -}NW_Dlg_InputPrompt_t; - - -typedef struct NW_Dlg_SelectItemData_s NW_Dlg_SelectItemData_t; -typedef struct NW_Dlg_SelectData_s NW_Dlg_SelectData_t; - -struct NW_Dlg_SelectItemData_s{ - NW_Ucs2* text; - NW_Bool isSelected; - NW_Bool isOptGroup; - NW_Bool hasOnPick; - NW_Bool isLocalNavOnpick; - void* context; -}; - -struct NW_Dlg_SelectData_s{ - NW_Ucs2* title; - void* options; /* pointer to NW_ADT_Vector_t */ - NW_Bool multiple; - NW_Bool isCanceled; /* if user aborts select, we want to know about it */ -}; - -/** - * The callback to call when done displaying a generic list dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_ListSelectCB_t) (NW_Dlg_ListSelect_t *data, void* callbackCtx); - -/** - * The callback to call when done displaying a generic prompt dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_PromptCB_t) (NW_Dlg_Prompt_t *data, void* callbackCtx); - -/** - * The callback to call when done displaying a generic input prompt dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_InputPromptCB_t) (NW_Dlg_InputPrompt_t *data, void* callbackCtx); - -/** - * The callback to call when done displaying a generic input confirm dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_ConfirmCB_t) (void *callback_ctx, TBrowserStatusCode status, NW_Dlg_Confirm_Result_t result); - - -/** - * The callback to call when done displaying a generic select dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_SelectCB_t) - (NW_Dlg_SelectData_t *data, void* callbackCtx, NW_Bool selectionChanged); - -/** - * The callback to call when done displaying a generic details dialog. -**/ -typedef TBrowserStatusCode (NW_Dlg_DetailsDlgCB_t) (void* callbackCtx); - - - -void NW_UI_DialogListSelect(NW_Dlg_ListSelect_t *data, - void* callbackCtx, - NW_Dlg_ListSelectCB_t callback); - -void NW_UI_DialogPrompt(NW_Dlg_Prompt_t *data, - void* callbackCtx, - NW_Dlg_PromptCB_t callback); - -void NW_UI_DialogInputPrompt(NW_Dlg_InputPrompt_t *data, - void* callbackCtx, - NW_Dlg_InputPromptCB_t callback); - -void NW_UI_DialogSelectOption(NW_Dlg_SelectData_t *data, - void* callbackCtx, - NW_Dlg_SelectCB_t callback); - -void NW_UI_DetailsDialogHashkeyPressed(NW_Ucs2* input, - void* callbackCtx, - NW_Dlg_DetailsDlgCB_t callback); - -/* -** Global Function Declarations -*/ -NW_Dlg_ListSelect_t* NW_Dlg_ListSelectInit(const NW_Ucs2* title,const NW_Ucs2* prompt, NW_Uint8 uiOptions, - NW_Uint16 itemsCount, NW_Ucs2 **items, - NW_DialogButtons_t button0, NW_DialogButtons_t button1, - NW_Uint8 selectedItem, NW_Uint8 selectedButton,void* context); - -NW_Dlg_Prompt_t* NW_Dlg_PromptInit(const NW_Ucs2* title,const NW_Ucs2* prompt, NW_Uint8 uiOptions, - NW_DialogButtons_t button0, NW_DialogButtons_t button1, - NW_Uint8 selectedButton,void* context); - -NW_Dlg_InputPrompt_t* NW_Dlg_InputPromptInit(const NW_Ucs2* title, const NW_Ucs2* prompt, - const NW_Ucs2* format, const NW_Ucs2* emptyOKStr, - NW_Uint8 uiOptions, NW_Bool shouldHide, NW_Bool isNumber, - NW_DialogButtons_t button0, - NW_DialogButtons_t button1, NW_Uint16 maxInputLen, - NW_Ucs2* input, NW_Uint8 selectedButton,void* context); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_GENERIC_DLG_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_logger.h --- a/webengine/wmlengine/src/utils/include/nwx_logger.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_logger.h -** Purpose: Used for logging (presently will be used for debug routines) -** (Windows NT & Windows CE will output in the debug windows) -**************************************************************************/ -#ifndef NWX_LOGGER_H -#define NWX_LOGGER_H - -#include "nwx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* -**--------------------------------------------------------------------------- -** Type Declarations -**--------------------------------------------------------------------------- -*/ -typedef enum { - NW_LOG_OFF = 0, /* No debugging info */ - NW_LOG_LEVEL1 = 1, /* Minimum amount of debugging info */ - NW_LOG_LEVEL2 = 2, - NW_LOG_LEVEL3 = 3, - NW_LOG_LEVEL4 = 4, - NW_LOG_LEVEL5 = 5 /* Maximum amount of debugging info */ -} NW_LogLevel_t; - -/* -**--------------------------------------------------------------------------- -** Global Function Declarations -**--------------------------------------------------------------------------- -*/ - -// GAF: These 4 exported functions should be always in .DEF file - -/* create a new debugging log */ -void NW_Debug_NewLogger(const char* name, const NW_LogLevel_t logLev); - -/* write formatted list of values to log */ -void NW_Debug_Log(const NW_LogLevel_t level, const char* fmt, ...); - -/* set logging level (message level must be *less* than log level) */ -void NW_Debug_SetLogLevel(const NW_LogLevel_t logLev); - -/* close the debugging log */ -void NW_Debug_CloseLogger(); - -/* Uncomment following line if you want to produce logs in release mode */ - -//#define _ENABLE_LOGS - -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - -/* log string */ -void NW_Debug_LogString(const char *message); - -/* Macros for Debug Builds */ -#define NW_LOG_NEWLOGGER(name, level) NW_Debug_NewLogger(name, level) -#define NW_LOG_SETLOGLEVEL(level) NW_Debug_SetLogLevel(level) -#define NW_LOG_CLOSELOGGER() NW_Debug_CloseLogger() - -#define NW_LOG0(level, fmt) \ - NW_Debug_Log(level, fmt) -#define NW_LOG1(level, fmt, arg1) \ - NW_Debug_Log(level, fmt, arg1) -#define NW_LOG2(level, fmt, arg1, arg2) \ - NW_Debug_Log(level, fmt, arg1, arg2) -#define NW_LOG3(level, fmt, arg1, arg2, arg3) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3) -#define NW_LOG4(level, fmt, arg1, arg2, arg3, arg4) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4) -#define NW_LOG5(level, fmt, arg1, arg2, arg3, arg4, arg5) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5) -#define NW_LOG6(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6) -#define NW_LOG7(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7) -#define NW_LOG8(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) -#define NW_LOG9(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) -#define NW_LOG10(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) -#define NW_LOG11(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) -#define NW_LOG12(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) \ - NW_Debug_Log(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) - -#else - -/* Macros for Release Builds */ -#define NW_LOG_NEWLOGGER(name, level) ((void) 0) -#define NW_LOG_SETLOGLEVEL(level) ((void) 0) -#define NW_LOG_CLOSELOGGER() ((void) 0) - -#define NW_LOG0(level, fmt) ((void) 0) -#define NW_LOG1(level, fmt, arg1) ((void) 0) -#define NW_LOG2(level, fmt, arg1, arg2) ((void) 0) -#define NW_LOG3(level, fmt, arg1, arg2, arg3) ((void) 0) -#define NW_LOG4(level, fmt, arg1, arg2, arg3, arg4) ((void) 0) -#define NW_LOG5(level, fmt, arg1, arg2, arg3, arg4, arg5) ((void) 0) -#define NW_LOG6(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6) ((void) 0) -#define NW_LOG7(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7) ((void) 0) -#define NW_LOG8(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ((void) 0) -#define NW_LOG9(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) ((void) 0) -#define NW_LOG10(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ((void) 0) -#define NW_LOG11(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) ((void) 0) -#define NW_LOG12(level, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) ((void) 0) - -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_LOGGER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_math.h --- a/webengine/wmlengine/src/utils/include/nwx_math.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_math.h -** Purpose: Provides the interface to platform-independent math functions -**************************************************************************/ - -#ifndef NWX_MATH_H -#define NWX_MATH_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" - -/* -** Type Declarations -*/ - -/* -** Global Function Declarations -*/ -extern void Math_ContextFree(); - -extern NW_Float32 NW_Math_powint(NW_Float32 x, NW_Int32 ex); - -extern NW_Float64 NW_Math_powint64(NW_Float32 x, NW_Int32 ex); - -extern NW_Int32 NW_Math_rand(); - -extern void NW_Math_srand(NW_Int32 seed); - -extern NW_Float32 NW_Math_floor(NW_Float32 x); - -extern NW_Float32 NW_Math_ceil(NW_Float32 x); - -extern NW_Int32 NW_Math_truncate(NW_Float32 x); - -extern NW_Int32 NW_Math_abs(NW_Int32 x); - -extern NW_Float32 NW_Math_fabs(NW_Float32 x); - -extern NW_Float32 NW_Math_pow(NW_Float32 x, NW_Float32 pow); - -extern void NW_Math_BaseandExp64(NW_Float64 x, NW_Int32 *base, NW_Int32 *exp); - -extern NW_Float32 NW_Math_round(NW_Float32 x); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MATH_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_mem.h --- a/webengine/wmlengine/src/utils/include/nwx_mem.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_mem.h -** Purpose: Provides the interface to memory management -**************************************************************************/ -#ifndef NWX_MEM_H -#define NWX_MEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include "nwx_defs.h" - -/***************************************************************** -** Subsystem Name: Memory -** Description: Provides allocation and free routines for memory -******************************************************************/ - -/* -** Global Function Declarations -*/ - -/* Uncomment for memory profiling. - This ALSO needs to be defined in rb_wae\bld\utils\include\nwx_mem.h - so that the rbinterpreter_memprofu.def file will be used. -*/ - - /* -#ifdef _DEBUG -#define FEATURE_MEMORY_PROFILE 1 -#endif -*/ - -#ifdef FEATURE_MEMORY_PROFILE - -#define NW_Mem_Malloc(x) NW_Mem_Malloc_Pro(x,__FILE__,__LINE__) -#define NW_Mem_Free(x) NW_Mem_Free_Pro(x,__FILE__,__LINE__) -#define NW_Mem_Malloc_Address &NW_Mem_Malloc_Pro -#define NW_Mem_Free_Address &NW_Mem_Free_Pro - -void SendStringToLogger2(char *strFormat, NW_Ucs2 *strValue); -void SendStringToLogger1(char *strMsg); -void *NW_Mem_Malloc_Pro(NW_Uint32 nbytes, char * file, NW_Uint32 line); -void NW_Mem_Free_Pro(void *buffer, char * file, NW_Uint32 line); - -#else - -#define NW_Mem_Malloc(x) NW_Mem_Malloc_No_Pro(x) -#define NW_Mem_Free(x) NW_Mem_Free_No_Pro(x) -#define NW_Mem_Malloc_Address &NW_Mem_Malloc_No_Pro -#define NW_Mem_Free_Address &NW_Mem_Free_No_Pro - -void *NW_Mem_Malloc_No_Pro(NW_Uint32 memorySize); -void NW_Mem_Free_No_Pro(void *mem); - -#endif /* FEATURE_MEMORY_PROFILE */ - -void *NW_Mem_memset(void *s, NW_Uint32 c, NW_Uint32 n); -void *NW_Mem_memcpy(void *s1, const void *s2, NW_Uint32 n); -void *NW_Mem_memmove(void *s1, const void *s2, NW_Uint32 n); -NW_Int32 NW_Mem_memcmp(const void *s1, const void *s2, NW_Uint32 n); - -#ifdef _DEBUG - -#define NW_MEM_OOMMODE_NEVER 0 -#define NW_MEM_OOMMODE_AFTER 1 -#define NW_MEM_OOMMODE_RANDOM 2 - -NW_Uint32 NW_Mem_GetMemInUse(); -NW_Uint32 NW_Mem_GetHighWaterMark(); -void NW_Mem_ResetHighWaterMark(); -NW_Bool NW_Mem_IsHeapConstrained(); -void NW_Mem_ConstrainHeap(NW_Bool constrain); -NW_Uint32 NW_Mem_GetHeapSize(); -void NW_Mem_SetHeapSize(NW_Uint32 size); -NW_Uint8 NW_Mem_GetOOMMode(); -void NW_Mem_SetOOMMode(NW_Uint8 mode); -NW_Uint32 NW_Mem_GetMaxAllocs(); -void NW_Mem_SetMaxAllocs(NW_Uint32 allocs); - -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MEM_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_memseg.h --- a/webengine/wmlengine/src/utils/include/nwx_memseg.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_memseg.h -** Purpose: Provides the interface to the memory segment management -**************************************************************************/ - -#ifndef NWX_MEMSEG_H -#define NWX_MEMSEG_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" - -/* -** Definitions -*/ -#define NW_MEM_SEGMENT_INVALID -1 -#define NW_MEM_SEGMENT_MANUAL 0 -#define NW_MEM_SEGMENT_LAST 1 - -/* -** Type Definitions -*/ - -typedef NW_Int32 NW_Mem_Segment_Id_t; - -/* -** Global Function Declarations - Memory Segment -*/ - -/* Create a new memory segment */ -NW_Mem_Segment_Id_t NW_Mem_Segment_New(void); - -/* Free a memory segment and all the allocations made from it */ -void NW_Mem_Segment_Free(const NW_Mem_Segment_Id_t sid); - -/* Allocate memory from an existing segment */ -void* NW_Mem_Segment_Malloc(const NW_Uint32 size, const NW_Mem_Segment_Id_t sid); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MEMSEG_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_msg_api.h --- a/webengine/wmlengine/src/utils/include/nwx_msg_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: Messaging - Version: V1.0 - Description: - Provides interfaces to support messaging in a platform independent - manner. - - Messages are sent to a unique message Address. A NW_Msg_Address_t is used to - identify the receipient of a message. It is an opaque data type. - All receivers of messages must have a unique address. - - An address is a 1-way communicate channel. To receive a response from a - message the sender will also need to obtain a unique address of it's own - and listen for responses. - - To send a message, the sender must first locate the reciever using the - function NW_Msg_LookupReceiver(Name). This id is then made part of - a NW_Msg_t structure. Also in that structure will be the senders address - (assuming a response is desired), and the message itself. - - The RmMsgSend() function is called to send the message to the receiver. - This function will return KBrsrSuccess or an error code. - - Messages are allocated by the sender and freed by the receiver. - -******************************************************************/ -#ifndef NWX_MSG_API_H -#define NWX_MSG_API_H - -/* -**---------------------------------------------------------------------- -** Preprocessor Macro Definitions -**---------------------------------------------------------------------- -*/ -#ifdef __cplusplus -extern "C" { -#endif - -/* -**---------------------------------------------------------------------- -** Includes -**---------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_msg_types.h" -#include "BrsrStatusCodes.h" - -/* -**---------------------------------------------------------------------- -** Type Definitions -**---------------------------------------------------------------------- -*/ - -/* Messaging Data Types */ -typedef NW_Uint16 NW_Msg_Address_t; -typedef NW_Uint16 NW_Msg_Type_t; -typedef NW_Uint16 NW_Msg_RName_t; - - -typedef struct _NW_Msg_t NW_Msg_t; - -struct _NW_Msg_t { - NW_Msg_t *next; /* the next node */ - void *data; /* the content of the message */ - NW_Uint16 tid; /* transaction ID */ - NW_Msg_Address_t src; /* source address */ - NW_Msg_Address_t dest; /* destination address */ - NW_Msg_Type_t type; /* set by the sender */ - TBrowserStatusCode status; /* additional status data (see status.h) */ -}; - -/* -**---------------------------------------------------------------------- -** Global Function Declarations -**---------------------------------------------------------------------- -*/ - -/* 1-time initialization function */ -TBrowserStatusCode NW_Msg_Initialize(const char* qName); - -/* create a new message */ -NW_Msg_t *NW_Msg_New(const NW_Uint16 tid, const NW_Msg_Address_t src, - const NW_Msg_Address_t dest, const NW_Msg_Type_t type); - -/* delete a message */ -void NW_Msg_Delete(NW_Msg_t *msg); - -/* send a message */ -TBrowserStatusCode NW_Msg_Send(NW_Msg_t *msg); - -/* return address of receiver */ -TBrowserStatusCode NW_Msg_LookupReceiverByName(const NW_Msg_RName_t name, - NW_Msg_Address_t *addr); - -/* return address of receiver */ -TBrowserStatusCode NW_Msg_GetThisReceiver(NW_Msg_Address_t *addr); - -/* reinitialize the fields of a message */ -void NW_Msg_Reinit(NW_Msg_t *msg, const NW_Uint16 tid, const NW_Msg_Address_t dest, - const NW_Msg_Address_t src, const NW_Msg_Type_t type, - const TBrowserStatusCode status, void *data ); - -/* Send a message back to previous source */ -TBrowserStatusCode NW_Msg_Reply(NW_Msg_t *msg, const NW_Msg_Type_t type); - -/* Send a message on to another destination */ -TBrowserStatusCode NW_Msg_Forward(NW_Msg_t *msg, const NW_Msg_Address_t dest, - const NW_Msg_Type_t type); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MSG_API_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_msg_dsp_api.h --- a/webengine/wmlengine/src/utils/include/nwx_msg_dsp_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_MSG_DSP_API_H -#define NWX_MSG_DSP_API_H - -/* -**---------------------------------------------------------------------- -** Preprocessor Macro Definitions -**---------------------------------------------------------------------- -*/ -#ifdef __cplusplus -extern "C" { -#endif - -/* -**---------------------------------------------------------------------- -** Includes -**---------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_osu.h" -#include "nwx_psq.h" -#include "nwx_msg_api.h" -#include "BrsrStatusCodes.h" - -/* The msg api is defined in this file */ -#include "nwx_msg_dsp_api_epoc32.h" - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MSG_DSP_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_msg_dsp_api_epoc32.h --- a/webengine/wmlengine/src/utils/include/nwx_msg_dsp_api_epoc32.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines the interface to the messaging dispatching. -* -*/ - - -#ifndef nwx_msg_dsp_h -#define nwx_msg_dsp_h - -#ifdef __cplusplus -extern "C" { -#endif -/* -** Type Definitions -*/ - -/******************** Messaging Data Types **********************************/ -typedef enum { - NW_MSG_PSQ_DSP, - NW_MSG_NATIVE_DSP -} NW_Msg_DispatcherType_t; - -#define NW_WNDPROC_MESSAGE (WM_USER + 100) -#define NW_DISPATCHER_TIMER_ID 1200 - -typedef TBrowserStatusCode NW_Msg_HandlerFunc_t(NW_Msg_t *); - -typedef struct NW_Msg_Handler_s { - struct NW_Msg_Handler_s *next; /* put this in a list */ - NW_Msg_Type_t type; /* message type */ - NW_Msg_RName_t name; /* Receiver Name */ - NW_Msg_HandlerFunc_t *func; /* function to handle the message */ -} NW_Msg_Handler_t; - -typedef struct { - NW_Msg_DispatcherType_t type; - NW_Psq_t *queue; /* queue pointer */ - NW_Osu_Hwnd_t hwnd; /* windows handle for WndProc */ - NW_Osu_Signal_t signal; /* a signal pointer */ - NW_Msg_Handler_t *handlers; /* message handler list */ - NW_Osu_ThreadId_t thread; /* Thread the dispatcher will run in */ - NW_Msg_HandlerFunc_t *tmofunc; /* The timeout function */ - NW_Int32 wait; /* How long to wait for a timeout */ -} NW_Msg_Dispatcher_t; - -typedef struct { - NW_Uint16 threadIndex;/* Which thread to run in */ - NW_Msg_DispatcherType_t dspType; /* Type of the dispatcher */ - NW_Msg_RName_t name; /* Receiver name */ - NW_Msg_Type_t msgType; /* message type */ - NW_Msg_HandlerFunc_t *func; /* message handler */ -} NW_Msg_MapEntry_t; - - - -/* -** Global Function Declarations -*/ - -/******************************* Message Dispatcher Functions ***********************/ -/* 1-time initialization function */ -TBrowserStatusCode NW_Msg_DispatcherInitialize(const char* qName); -/* create a new message dispatcher */ -NW_Msg_Dispatcher_t *NW_Msg_NewDispatcher(const NW_Msg_DispatcherType_t, - const char* qName); -/* register a message map entry with a dispatcher */ -TBrowserStatusCode NW_Msg_DispatcherRegister(NW_Msg_Dispatcher_t *dsp, - const NW_Msg_MapEntry_t *entry); -/* send a message to a dispatcher */ -TBrowserStatusCode NW_Msg_DispatcherSend(NW_Msg_Dispatcher_t *dsp, NW_Msg_t *msg); -/* return dispatcher with specified name */ -NW_Msg_Dispatcher_t *NW_Msg_LookupDispatcherByName(const NW_Msg_RName_t name); -/* return dispatcher for this thread */ -NW_Msg_Dispatcher_t *NW_Msg_GetThisDispatcher(); -/* Not Yet Implemented message handler */ -TBrowserStatusCode NW_Msg_NYI(NW_Msg_t *msg); -/* start the messaging system (defined in nwx_msg_config_win.c) */ -TBrowserStatusCode NW_Msg_Startup(const char *qName); - -/* Free all resources of the messaging system */ -void NW_Msg_Shutdown(); -void NW_Msg_DispatcherShutdown(); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* nwx_msg_dsp_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_msg_map_epoc32.h --- a/webengine/wmlengine/src/utils/include/nwx_msg_map_epoc32.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_MSG_MAP_EPOC32_H -#define NWX_MSG_MAP_EPOC32_H - - -/* -**---------------------------------------------------------------------- -** Preprocessor Macro Definitions -**---------------------------------------------------------------------- -*/ -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" -#include "nwx_script_handler.h" -#include "BrsrStatusCodes.h" - -/************************************************************************* - Function Prototypes for all of the message handlers appear here -*************************************************************************/ - -/*TBrowserStatusCode NW_Msg_NYI(NW_Msg_t *msg);*/ - -/*TBrowserStatusCode NW_Script_Notifyerrorresp(NW_Msg_t *msg);*/ -TBrowserStatusCode NW_Script_Genericdialoglistselectresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Genericdialogpromptresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Script_Genericdialoginputpromptresp(NW_Msg_t *msg); - -/* RME messages */ -TBrowserStatusCode NW_Msg_MessageDispatcher_MessageHandler (NW_Msg_t* msg); - -/* Script messages for WTA */ -TBrowserStatusCode NW_Wml_nokia_locationInfoReq(NW_Msg_t *msg); -TBrowserStatusCode NW_UiRequestCallback(NW_Msg_t *msg); - -/* WML messages */ -TBrowserStatusCode NW_Wml_Scriptexitresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Scriptstartresp(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Getvarreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Setvarreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Loadprevreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Newcontextreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Goreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Refreshreq(NW_Msg_t *msg); - -TBrowserStatusCode NW_Wml_Dialogalertreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Notifyerrorreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Dialogconfirmreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Dialogpromptreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Finishnodialogreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Genericdialoglistselectreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Genericdialogpromptreq(NW_Msg_t *msg); -TBrowserStatusCode NW_Wml_Genericdialoginputpromptreq(NW_Msg_t *msg); - - -#define NW_MSG_NUM_DISPATCHERS 1 - -/* message-handler dispatcher, msg-pump, component */ -#define FILE_LOADER_HDLR 0, NW_MSG_PSQ_DSP, NW_FILE_LOADER -#define USER_AGENT_HDLR 0, NW_MSG_PSQ_DSP, NW_USER_AGENT -#define CACHE_SERVER_HDLR 0, NW_MSG_PSQ_DSP, NW_CACHE_SERVER -#define HTTP_LOADER_HDLR 0, NW_MSG_PSQ_DSP, NW_HTTP_LOADER -#define BROWSER_CORE_HDLR 0, NW_MSG_PSQ_DSP, NW_BROWSER_CORE -#define SCRIPT_SERVER_HDLR 0, NW_MSG_PSQ_DSP, NW_SCRIPT_SERVER -#define WTAI_LOADER_HDLR 0, NW_MSG_PSQ_DSP, NW_WTAI_LOADER - - - -/* Define how many message handlers */ -#define NW_MSG_NUM_HANDLERS(msg_map) (sizeof(msg_map)/sizeof(msg_map[0])) - -/* message-handler message-type handler-func */ -#define NW_MSG_MAP_CLI { \ - {BROWSER_CORE_HDLR, NW_MSG_MSG_DSP_HANDLE_MESSAGE, NW_Msg_MessageDispatcher_MessageHandler}, \ - {BROWSER_CORE_HDLR, NW_MSG_SCRIPT_START_RESP, NW_Wml_Scriptstartresp}, \ - {BROWSER_CORE_HDLR, NW_MSG_SCRIPT_EXIT_RESP, NW_Wml_Scriptexitresp}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_GETVAR_REQ, NW_Wml_Getvarreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_SETVAR_REQ, NW_Wml_Setvarreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_LOADPREV_REQ, NW_Wml_Loadprevreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_NEWCONTEXT_REQ, NW_Wml_Newcontextreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_GO_REQ, NW_Wml_Goreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_COREBROWSER_REFRESH_REQ, NW_Wml_Refreshreq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_START_REQ, NW_Script_Startreq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_EXIT_REQ, NW_Script_Exitreq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_GETVAR_RESP, NW_Script_Getvarresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_SETVAR_RESP, NW_Script_Setvarresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_LOADPREV_RESP, NW_Script_Loadprevresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_NEWCONTEXT_RESP, NW_Script_Newcontextresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_GO_RESP, NW_Script_Goresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_COREBROWSER_REFRESH_RESP, NW_Script_Refreshresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_RESUME_REQ, NW_Script_Resumereq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_UA_DLGALERT_RESP, NW_Script_Dialogalertresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_UA_DLGPROMPT_RESP, NW_Script_Dialogpromptresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_UA_DLGCONFIRM_RESP, NW_Script_Dialogconfirmresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_UA_FINISHNODLG_RESP, NW_Script_Finishnodialogresp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_SUSPEND_REQ, NW_Script_Suspendresp}, \ - {BROWSER_CORE_HDLR, NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_REQ, NW_Wml_nokia_locationInfoReq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_WP_MAKECALL_RESP, NW_Script_wtaiResp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_WP_SENDDTMF_RESP, NW_Script_wtaiResp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_WP_ADDPBENTRY_RESP, NW_Script_wtaiResp}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_RESP,NW_Script_wtaiResp}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DLGALERT_REQ, NW_Wml_Dialogalertreq}, \ - {SCRIPT_SERVER_HDLR, NW_MSG_UA_NOTIFYERROR_RESP, NW_Script_Notifyerrorresp}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_NOTIFYERROR_REQ, NW_Wml_Notifyerrorreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DLGCONFIRM_REQ, NW_Wml_Dialogconfirmreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DLGPROMPT_REQ, NW_Wml_Dialogpromptreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_FINISHNODLG_REQ, NW_Wml_Finishnodialogreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DIALOGLISTSELECT_REQ, NW_Wml_Genericdialoglistselectreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DIALOGPROMPT_REQ, NW_Wml_Genericdialogpromptreq}, \ - {BROWSER_CORE_HDLR, NW_MSG_UA_DIALOGINPUTPROMPT_REQ, NW_Wml_Genericdialoginputpromptreq}, \ - \ - } - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* nwx_msg_map_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_msg_types.h --- a/webengine/wmlengine/src/utils/include/nwx_msg_types.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef NWX_MSG_TYPES_H -#define NWX_MSG_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_WPSA_SERVER 1 -#define NW_HTTP_LOADER 2 -#define NW_FILE_LOADER 3 -#define NW_USER_AGENT 4 -#define NW_SCRIPT_SERVER 5 -#define NW_BROWSER_CORE 6 -#define NW_WTAI_LOADER 7 -#define NW_MAILTO_LOADER 8 - -/* These #defines describe all of the values that can appear -** in the type message field -*/ - -/* USER Agent Messages */ -#define NW_MSG_UA_FINISHNODLG_REQ 120 -#define NW_MSG_UA_FINISHNODLG_RESP 121 -#define NW_MSG_UA_USERPASSWORD_REQ 122 -#define NW_MSG_UA_USERPASSWORD_RESP 123 -#define NW_MSG_UA_DLGALERT_RESP 124 -#define NW_MSG_UA_DLGALERT_REQ 125 -#define NW_MSG_UA_DLGCONFIRM_RESP 126 -#define NW_MSG_UA_DLGCONFIRM_REQ 127 -#define NW_MSG_UA_DLGPROMPT_RESP 128 -#define NW_MSG_UA_DLGPROMPT_REQ 129 -#define NW_MSG_UA_NOTIFYERROR_REQ 130 -#define NW_MSG_UA_DIALOGLISTSELECT_REQ 131 -#define NW_MSG_UA_DIALOGLISTSELECT_RESP 132 -#define NW_MSG_UA_DIALOGPROMPT_REQ 133 -#define NW_MSG_UA_DIALOGPROMPT_RESP 134 -#define NW_MSG_UA_DIALOGINPUTPROMPT_REQ 135 -#define NW_MSG_UA_DIALOGINPUTPROMPT_RESP 136 -#define NW_MSG_UA_WIMIINIT_RESP 137 -#define NW_MSG_UA_DISPLAYERROR_REQ 138 -#define NW_MSG_UA_USERREDIRECT_REQ 139 -#define NW_MSG_UA_USERREDIRECT_RESP 140 -#define NW_MSG_UA_NOTIFYERROR_RESP 141 - -/* WML Browser Messages */ -#define NW_MSG_COREBROWSER_GETVAR_REQ 200 -#define NW_MSG_COREBROWSER_GETVAR_RESP 201 -#define NW_MSG_COREBROWSER_SETVAR_REQ 202 -#define NW_MSG_COREBROWSER_SETVAR_RESP 203 -#define NW_MSG_COREBROWSER_LOADURL_REQ 204 -#define NW_MSG_COREBROWSER_LOADURL_RESP 205 -#define NW_MSG_COREBROWSER_LOADPREV_REQ 206 -#define NW_MSG_COREBROWSER_LOADPREV_RESP 207 -#define NW_MSG_COREBROWSER_NEWCONTEXT_REQ 208 -#define NW_MSG_COREBROWSER_NEWCONTEXT_RESP 209 -#define NW_MSG_COREBROWSER_GO_REQ 210 -#define NW_MSG_COREBROWSER_GO_RESP 211 -#define NW_MSG_COREBROWSER_REFRESH_REQ 212 -#define NW_MSG_COREBROWSER_REFRESH_RESP 213 - -/* Script Messages */ -#define NW_MSG_SCRIPT_START_REQ 300 -#define NW_MSG_SCRIPT_START_RESP 301 -#define NW_MSG_SCRIPT_EXIT_REQ 302 -#define NW_MSG_SCRIPT_EXIT_RESP 303 -#define NW_MSG_SCRIPT_RESUME_REQ 304 -#define NW_MSG_SCRIPT_SUSPEND_REQ 305 -#define NW_MSG_SCRIPT_SUSPEND_RESP 306 - -/* Tempest Messages */ -#define NW_MSG_MSG_DSP_HANDLE_MESSAGE 500 - -/* Script WTAI Messages */ -#define NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_REQ 743 - -#define NW_MSG_SCRIPT_WP_MAKECALL_RESP 750 -#define NW_MSG_SCRIPT_WP_SENDDTMF_RESP 751 -#define NW_MSG_SCRIPT_WP_ADDPBENTRY_RESP 752 - -#define NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_RESP 793 - -#define NW_MSG_WIMI_HASHEDCERT_RESP 907 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_MSG_TYPES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_multipart_generator.h --- a/webengine/wmlengine/src/utils/include/nwx_multipart_generator.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_MULTIPART_GENERATOR_H -#define NWX_MULTIPART_GENERATOR_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "nwx_defs.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - -NW_Byte* NW_StoreUint(NW_Byte* p, NW_Uint32 i); - -TBrowserStatusCode NW_CreateMultipartSegment -( - NW_Uint32 encoding, - NW_Uint32 oriEncoding, - NW_Http_ContentTypeString_t contentTypeString, - char* contentLocation, - const NW_Byte* data, - NW_Uint32 dataLen, - NW_Byte** result, - NW_Uint32* resultLen -); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NWX_MULTIPART_GENERATOR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_osu.h --- a/webengine/wmlengine/src/utils/include/nwx_osu.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 1999 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: Operating System Utilities - Version: V1.0 - Description: - Provides interfaces to common system utilities like; - threads, mutexes, etc - -******************************************************************/ -#ifndef NWX_OSU_H -#define NWX_OSU_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - -/* -** Type Definitions -*/ - -#define NW_WAIT_FOREVER -1 -#define NW_WAIT_UNSPECIFIED -2 - - -/* -** These OSU types should be opaque to the user. -** They are returned from, and passed to, the OSU functions -** but they are never manipulated directly by the user. -*/ - -typedef void* NW_Osu_Thread_t; -typedef void* NW_Osu_SemaphoreHandle_t; -typedef void* NW_Osu_Mutex_t; -typedef void* NW_Osu_File_t; -typedef void* NW_Osu_Signal_t; -typedef NW_Uint32 NW_Osu_ThreadId_t; -typedef void* NW_Osu_Hwnd_t; - -/* -** Global Function Declarations -*/ - -/*********************** Mutex Functions ************************************/ - -/* create a new mutex object */ -NW_Osu_Mutex_t NW_Osu_NewMutex(const char *name); - -/* wait for the mutex to be unlocked and then lock it */ -TBrowserStatusCode NW_Osu_LockMutex(NW_Osu_Mutex_t handle); - -/* unlock a mutex */ -TBrowserStatusCode NW_Osu_UnlockMutex(NW_Osu_Mutex_t handle); - -/* delete a mutex object */ -void NW_Osu_DeleteMutex(NW_Osu_Mutex_t handle); - - -/*********************** Signal Functions ************************************/ - -/* create a new signal object */ -NW_Osu_Signal_t NW_Osu_NewSignal(const char *name); - -/* set the signal */ -TBrowserStatusCode NW_Osu_NotifySignal(NW_Osu_Signal_t handle); - - /* wait for a signal to be set */ -TBrowserStatusCode NW_Osu_WaitOnSignal(NW_Osu_Signal_t handle, const NW_Int32 howLong); - -/* delete a signal object */ -void NW_Osu_DeleteSignal(NW_Osu_Signal_t handle); - - -/************************* Thread Functions **********************************/ - -typedef TBrowserStatusCode NW_Osu_StartRoutine_t(void *argument); - -/* Return ID of current thread */ -NW_Osu_ThreadId_t NW_Osu_GetCurrentThreadId(); - - -/************************* Critical Section Functions ************************/ - -/* Enter a mutex protected critical section */ -TBrowserStatusCode NW_Osu_BeginCriticalSection(); - -/* Leave a mutex protected critical section */ -TBrowserStatusCode NW_Osu_EndCriticalSection(); - -/************************* Timer Function ***********************************/ - -/* Wait a specified number of microseconds */ -void NW_Osu_Wait(NW_Int32 anInterval); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_OSU_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_osu_epoc32.h --- a/webengine/wmlengine/src/utils/include/nwx_osu_epoc32.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_osu_epoc32.h -** Purpose: Cleans up all the rainbow memory on exiting. -**************************************************************************/ -#ifndef NWX_OSU_EPOC32_H -#define NWX_OSU_EPOC32_H - -/* -** Includes -*/ -#include "nwx_defs.h" -#include "nwx_osu.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void NW_Osu_DeleteContext(); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_OSU_EPOC32_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_osu_file.h --- a/webengine/wmlengine/src/utils/include/nwx_osu_file.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_OSU_FILE_H -#define NWX_OSU_FILE_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "nwx_datastruct.h" -#include "nwx_time.h" -#include "nwx_osu.h" -#include "BrsrStatusCodes.h" - -/* -** Type Definitions -*/ - -/* -** These OSU types should be opaque to the user. -** They are returned from, and passed to, the OSU functions -** but they are never manipulated directly by the user. -*/ - - -#define NW_INVALID_FILE_HANDLE ((void *)0xFFFFFFFF) - - -typedef struct { - NW_Time_t creationTime; - NW_Time_t lastAccessTime; - NW_Time_t lastWriteTime; - NW_Uint32 fileSize; -} NW_Osu_FileInfo_t; - -/* -** Global Function Declarations -*/ - -/* create a new file and open it for write access */ -NW_Osu_File_t NW_Osu_CreateNewFile(const NW_Ucs2 *name); - -/* close an open file */ -void NW_Osu_CloseFile(NW_Osu_File_t handle); - -/* write bytes to a file */ -TBrowserStatusCode NW_Osu_WriteFile(NW_Osu_File_t handle, NW_Byte *buffer, - const NW_Uint32 numToWrite); - -/* delete an existing file */ -TBrowserStatusCode NW_Osu_Delete(const NW_Ucs2 *pathname); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*NWX_OSU_FILE_H*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_psq.h --- a/webengine/wmlengine/src/utils/include/nwx_psq.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - Subsystem Name: ProtectedSignaledQueue - Version: V1.0 - Description: - Provides interfaces to a Protected, Signaled, Queue. This is a queue that - can be have multiple readers and writers running in separate threads. - When something is added to the queue a signal is set. -******************************************************************/ -#ifndef NWX_PSQ_H -#define NWX_PSQ_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "nwx_datastruct.h" -#include "nwx_osu.h" -#include "BrsrStatusCodes.h" - -/* -** Type Definitions -*/ - -typedef struct { - NW_Node_t *head; /* queue head */ - NW_Node_t *tail; /* queue tail */ - NW_Osu_Signal_t *signal; /* signal this when adding */ - NW_Osu_Mutex_t *mutex; /* mutex for locking and unlocking */ - NW_Ucs2 *name; /* name of queue (for debugging only) */ - NW_Uint16 length; /* number of nodes in queue */ -} NW_Psq_t; - - -/* -** Global Function Declarations -*/ - -/* create a new Protected Signaled Queue */ -NW_Psq_t *NW_Psq_New(const char *name); - -/* delete a Protected Signaled Queue */ -void NW_Psq_Delete(NW_Psq_t *que); - -/* add a new node to the tail of the queue */ -void NW_Psq_AddTail(NW_Psq_t *que, NW_Node_t *node); - -/* return node from the head of the queue and remove it */ -NW_Node_t *NW_Psq_RemoveHead(NW_Psq_t *que); - -/* wait for node to be added to queue */ -TBrowserStatusCode NW_Psq_WaitForAdd(const NW_Psq_t *que, const NW_Int32 howLong); - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_PSQ_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_settings.h --- a/webengine/wmlengine/src/utils/include/nwx_settings.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NWX_SETTINGS_H -#define NWX_SETTINGS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include <e32def.h> -#include "nwx_defs.h" - -/* -** Global Function Declarations -*/ - -/* Basic browser settings */ -NW_Ucs2 *NW_Settings_GetGateway(void); //Deprecated -NW_Bool NW_Settings_SetGateway(const NW_Ucs2 *gateway); //Deprecated - -NW_Bool NW_Settings_GetStartFromHomepage(void); //Deprecated - -NW_Uint8 NW_Settings_GetFontSizeLevel(void); -NW_Bool NW_Settings_SetFontSizeLevel(NW_Uint8 fontSizeLevel); - -NW_Uint16 NW_Settings_GetEncoding(void); -NW_Bool NW_Settings_SetEncoding(NW_Uint16 encoding); - -NW_Bool NW_Settings_GetCookiesEnabled(void); -NW_Bool NW_Settings_SetCookiesEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_GetImagesEnabled(void); -NW_Bool NW_Settings_SetImagesEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_GetVerticalLayoutEnabled(void); -NW_Bool NW_Settings_SetVerticalLayoutEnabled(const NW_Bool enabled); - -// This method only changes the browser's cached value for whether or -// not vertical layout is enabled. DO NOT USE if you want to be setting -// the value in the ini file. Instead use, NW_Settings_SetVerticalLayoutEnabled -NW_Bool NW_Settings_SetInternalVerticalLayoutEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_GetCSSFetchEnabled(void); -NW_Bool NW_Settings_SetCSSFetchEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_SetWmlTextEnabled(const NW_Bool enabled); //Deprecated - -NW_Bool NW_Settings_GetEcmaScriptEnabled(void); -void NW_Settings_SetEcmaScriptEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_GetTextWrapEnabled(void); -NW_Bool NW_Settings_SetTextWrapEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_Get2WayScrollEnabled(void); -NW_Bool NW_Settings_Set2WayScrollEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_SetWspConnType(const NW_Uint32 connType); //Deprecated - -NW_Int32 NW_Settings_GetGMTOffset(void); //Deprecated -NW_Bool NW_Settings_SetGMTOffset(const NW_Int32 GMTOffset); //Deprecated - -NW_Bool NW_Settings_GetAlwaysConfirmDtmfSending(void); //Deprecated -NW_Bool NW_Settings_SetAlwaysConfirmDtmfSending(const NW_Bool always); //Deprecated - -NW_Uint32 NW_Settings_GetOriginalEncoding(); -void NW_Settings_SetOriginalEncoding(NW_Uint32 encoding); - -void NW_Settings_SetDisableSmallScreenLayout(const NW_Bool disabled); -NW_Bool NW_Settings_GetDisableSmallScreenLayout(); - -NW_Uint16 NW_Settings_GetDefaultCharset(void); -NW_Bool NW_Settings_SetDefaultCharset(NW_Uint16 defaultCharset); //Deprecated - -NW_Uint32 NW_Settings_GetBrowsingAllowedWhileMMSOngoing(void); //Deprecated - -NW_Bool NW_Settings_GetIsBrowserEmbedded(void); -void NW_Settings_SetIsBrowserEmbedded(NW_Bool isEmbedded); - -TUint NW_Settings_GetLocalFeatures(void); - -NW_Ucs2* NW_Settings_GetTempFilesPath(void); - -NW_Uint8 NW_Settings_GetMMCDrive(void); - -NW_Bool NW_Settings_GetIMEINotifyEnabled(void); -void NW_Settings_SetIMEINotifyEnabled(const NW_Bool enabled); - -NW_Bool NW_Settings_GetSendReferrerHeader(void); -void NW_Settings_SetSendReferrerHeader(const NW_Bool enabled); - -NW_Bool NW_Settings_GetHttpSecurityWarnings(void); -void NW_Settings_SetHttpSecurityWarnings(const NW_Bool enabled); - -NW_Uint32 NW_Settings_GetIAPId(void); -void NW_Settings_SetIAPId(NW_Uint32 aIapId); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_SETTINGS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_statuscodeconvert.h --- a/webengine/wmlengine/src/utils/include/nwx_statuscodeconvert.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Utility for converting cxml parser status codes to browser -* status codes -* -* -*/ - - -#ifndef NWX_STATUSCODECONVERT_H -#define NWX_STATUSCODECONVERT_H - -#include "BrsrStatusCodes.h" -#include <nwx_status.h> - -#ifdef __cplusplus -extern "C" { -#endif - -TBrowserStatusCode StatusCodeConvert( NW_Status_t cxml_status ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_string.h --- a/webengine/wmlengine/src/utils/include/nwx_string.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,395 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_string_h -** Subsystem Name:String -** Purpose: Provides string manipulation routines in a platform independent -** manner. -**************************************************************************/ - -#ifndef NWX_STRING_H -#define NWX_STRING_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include <stdarg.h> -#include "nwx_defs.h" -#include "nwx_memseg.h" -#include "BrsrStatusCodes.h" - -#define NW_DEFAULT_FLOAT_PREC 6 - -/* These constants can used to implement the NW_Str_Iswhatever() -** functions if there is a conflict between the WAE character set -** definitions and the C runtime IsWhatever() functions -*/ - -#define WAE_ASCII_NULL 0x00 - -#define WAE_ASCII_UPPER_A 0x41 -#define WAE_ASCII_UPPER_F 0x46 -#define WAE_ASCII_UPPER_Z 0x5A - -#define WAE_ASCII_LOWER_A 0x61 -#define WAE_ASCII_LOWER_F 0x66 -#define WAE_ASCII_LOWER_Z 0x7A - -#define WAE_ASCII_0 0x30 -#define WAE_ASCII_9 0x39 - -#define WAE_ASCII_SPACE 0x20 -#define WAE_ASCII_HT 0x09 -#define WAE_ASCII_LF 0x0a -#define WAE_ASCII_VT 0x0b -#define WAE_ASCII_FF 0x0c -#define WAE_ASCII_CR 0x0d -#define WAE_ASCII_ZSPACE 0x200b - -#define WAE_ASCII_HYPHEN 0x2d -#define WAE_ASCII_SOFT_HYPHEN 0xad - -#define WAE_ASCII_ANY_CHAR_BEGIN 0x0 -#define WAE_ASCII_ANY_CHAR_END 0x7F - -#define WAE_ASCII_DOLLAR 0x24 -#define WAE_ASCII_PLUS 0x2B -#define WAE_ASCII_MINUS 0x2D -#define WAE_ASCII_POINT 0x2E -#define WAE_ASCII_UNDERSCORE 0x5F -#define WAE_ASCII_LEFT_BRACE 0x28 -#define WAE_ASCII_RIGHT_BRACE 0x29 -#define WAE_ASCII_COLON 0x3a - -/* -#define WAE_ASCII_PUNC_RANGE_1_BEGIN 0x20 -#define WAE_ASCII_PUNC_RANGE_1_END 0x2F -#define WAE_ASCII_PUNC_RANGE_2_BEGIN 0x3A -#define WAE_ASCII_PUNC_RANGE_2_END 0x40 -#define WAE_ASCII_PUNC_RANGE_3_BEGIN 0x5B -#define WAE_ASCII_PUNC_RANGE_3_END 0x60 -#define WAE_ASCII_PUNC_RANGE_4_BEGIN 0x7B -#define WAE_ASCII_PUNC_RANGE_4_END 0x7F - -#define WAE_ASCII_COMMA 0x2C -*/ - -/* -**---------------------------------------------------------------- -** Type Declarations -**---------------------------------------------------------------- -*/ - -typedef enum NW_Str_Location_e{ - NW_Str_Start, - NW_Str_End, - NW_Str_Both -}NW_Str_Location_t; -/* Deprecated NW_Str_Begining because it misspelled beginning: */ -#define NW_Str_Begining NW_Str_Start - -/* -** Global Function Declarations -*/ - -/* Test if character is alphanumeric */ -NW_Int32 NW_Str_Isalnum(const NW_Ucs2 ch); - -/* Test if character is alphabetic */ -NW_Int32 NW_Str_Isalpha(const NW_Ucs2 ch); - -/* Test if character is decimal digit */ -NW_Int32 NW_Str_Isdigit(const NW_Ucs2 ch); - -/* Test if character is hexadecimal digit */ -NW_Int32 NW_Str_Isxdigit(const NW_Ucs2 ch); - -/* Test if character is white space */ -NW_Int32 NW_Str_Isspace(const NW_Ucs2 ch); - -/* Test if character is a newline */ -NW_Int32 NW_Str_Isnewline(const NW_Ucs2 ch); - -/* Test if line can break at character */ -NW_Int32 NW_Str_Isbreak(const NW_Ucs2 ch); - -/* Test if character is punctuation */ -NW_Int32 NW_Str_Ispunct(const NW_Ucs2 ch); - -/* Test if character is ascii (0x00 to 0x7F) */ -NW_Int32 NW_Str_Isascii(const NW_Ucs2 ch); - -/* Test if character is control char (0x00 to 0x1F) */ -NW_Int32 NW_Str_Iscntrl(const NW_Ucs2 ch); - -/* Test if character is uppercase */ -NW_Int32 NW_Str_Isupper(const NW_Ucs2 ch); - -/* Test if character is lowercase */ -NW_Int32 NW_Str_Islower(const NW_Ucs2 ch); - -/* Test if the phone number */ -NW_Bool NW_Str_StrIsNumber(NW_Ucs2 *string, NW_Uint32 count); - -/* Test, if a valid length */ -NW_Bool NW_Str_StrIsValidLength(NW_Ucs2 *string); - -/* Create a new string */ -NW_Ucs2 *NW_Str_New(const NW_Uint32 len); - -/* Create a new copy of a string */ -NW_Ucs2 *NW_Str_Newcpy(const NW_Ucs2 *string); - -/* Create a new copy of two concatinated strings */ -NW_Ucs2 *NW_Str_Newcat(const NW_Ucs2 *string1, - const NW_Ucs2 *string2); - -/* Create a new string */ -NW_Ucs2 *NW_Str_SegNew(const NW_Uint32 len, - const NW_Mem_Segment_Id_t sid); - -/* Create a new copy of a string */ -NW_Ucs2 *NW_Str_SegNewcpy(const NW_Ucs2 *string, - const NW_Mem_Segment_Id_t sid); - -/* Create a new copy of two concatinated strings */ -NW_Ucs2 *NW_Str_SegNewcat(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Mem_Segment_Id_t sid); - -/* Delete a string */ -void NW_Str_Delete(NW_Ucs2 *string); - -/* Return number of characters in string (excluding null termination) */ -NW_Uint32 NW_Str_Strlen(const NW_Ucs2 *string); - -/* Return number of bytes in string including terminator */ -NW_Uint32 NW_Str_Strsize(const NW_Ucs2 *string); - -/* Copy null-terminated string */ -NW_Ucs2 *NW_Str_Strcpy(NW_Ucs2 *destination, - const NW_Ucs2 *source); - -/* Concatinate null-terminated strings */ -NW_Ucs2 *NW_Str_Strcat(NW_Ucs2 *destination, - const NW_Ucs2 *source); - -/* Copy first "count" characters of null-terminated string */ -NW_Ucs2 *NW_Str_Strncpy(NW_Ucs2 *destination, - const NW_Ucs2 *source, - const NW_Uint32 count); - -/* Find first occurrence of character in string */ -NW_Ucs2 *NW_Str_Strchr(const NW_Ucs2 *string, - const NW_Ucs2 wc); - -/* Find last occurrence of character in string */ -NW_Ucs2 *NW_Str_Strrchr(const NW_Ucs2 *string, - const NW_Ucs2 wc); - -/* Find first occurrence of a character set in string */ -NW_Uint32 NW_Str_Strcspn(const NW_Ucs2 *string, - const NW_Ucs2 *search); - -/* Find substring within a string */ -NW_Ucs2 *NW_Str_Strstr(const NW_Ucs2 *string, - const NW_Ucs2 *search); - -/* Find a substring within a string ended by terminator */ -NW_Ucs2* NW_Str_Strstrtil(const NW_Ucs2 *string, - char sub_terminator); -/* Compare two strings */ -NW_Int32 NW_Str_Strcmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2); - -/* Compare two strings, case-insenstive */ -NW_Int32 NW_Str_Stricmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2); - -/* Compare first "count" characters from two strings */ -NW_Int32 NW_Str_Strncmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Uint32 count ); - -/* Compare first "count" characters from two strings, case-insenstive */ -NW_Int32 NW_Str_Strnicmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Uint32 count ); - -/* Calculate a 32-bit hash code for a string */ -NW_Uint32 NW_Str_Hash(const NW_Ucs2 *string); - -/* Convert a string to an integer */ -NW_Int32 NW_Str_Atoi(const NW_Ucs2 *string); - -/* Convert to string using specified base */ -NW_Ucs2 *NW_Str_ItoBase(const NW_Int32 i, NW_Ucs2* string, const NW_Int32 base); - -/* Convert an integer to a string */ -NW_Ucs2 *NW_Str_Itoa(const NW_Int32 i, NW_Ucs2* string); - -/* Convert to string using specified base */ -NW_Ucs2 *NW_Str_UltoBase(const NW_Int32 i, NW_Ucs2* string, const NW_Int32 base); - -/* Convert an NW_Uint32 integer to a string */ -NW_Ucs2 *NW_Str_Ultoa(const NW_Uint32 i, NW_Ucs2* string); - -/* Convert a string to an integer */ -NW_Int32 NW_Str_Strtol(const NW_Ucs2 *ptr, NW_Ucs2 **endPtr, NW_Int32 base); - -/* Convert a string to an unsigned integer */ -NW_Int32 NW_Str_Strtoul(const NW_Ucs2 *ptr, NW_Ucs2 **endPtr, NW_Int32 base); - -/* Convert a string to an integer and check for overflow */ -TBrowserStatusCode NW_Str_CvtToInt32(const NW_Ucs2 *string, NW_Ucs2 **endptr, - NW_Int32 base, NW_Int32 *ret_long); - -/* Convert a string to a float point value and check for overflow */ -TBrowserStatusCode NW_Str_CvtToFloat32(const NW_Ucs2 *string, NW_Ucs2 **endptr, - NW_Float32 *ret_double); - -/* Increment string pointer by "count" characters */ -NW_Ucs2 *NW_Str_Inc(const NW_Ucs2 *string, const NW_Int32 count); - -/* Convert ucs2 string to new ascii string */ -char *NW_Str_CvtToAscii(const NW_Ucs2 *string); - -/* Convert null-terminated ascii string to new ucs2 string */ -NW_Ucs2 *NW_Str_CvtFromAscii(const char *string); - -/* Copy a ucs2 string to an already allocated ascii string. */ -void NW_Str_CpyToAscii(char* dest, const NW_Ucs2* src); -/* Copy a ascii string to an already allocated ucs2 string. */ -void NW_Str_CpyFromAscii(NW_Ucs2* dest, const char *src); - -/* Convert character to lower case */ -NW_Ucs2 NW_Str_ToLower(const NW_Ucs2 ch); - -/* Convert character to upper case */ -NW_Ucs2 NW_Str_ToUpper(const NW_Ucs2 ch); - -/* Convert string to lower case for ASCII value only */ -void NW_Str_Strlwr(NW_Ucs2 *string); - -/* Convert string to upper case for ASCII value only */ -void NW_Str_Strupr(NW_Ucs2 *string); - -/* Convert Ucs2 string to Upper case */ -TBrowserStatusCode NW_Str_Ucs2StrUpr(NW_Ucs2 **ppStr); - -/* Convert Ucs2 string to Lower case */ -TBrowserStatusCode NW_Str_Ucs2StrLwr(NW_Ucs2 **ppStr); - -/* Capitilize the first character in each word */ -TBrowserStatusCode NW_Str_Ucs2StrTitle(NW_Ucs2 **ppStr); - -/* Return new substring of original string */ -NW_Ucs2 *NW_Str_Substr(const NW_Ucs2 *string, - const NW_Uint32 start, const NW_Uint32 len); - -/* Return new substring of original string */ -NW_Ucs2 *NW_Str_SegSubstr(const NW_Ucs2 *string, - const NW_Uint32 start, const NW_Uint32 len, - const NW_Mem_Segment_Id_t sid); - -/* Format to a string */ -NW_Int32 NW_Str_Sprintf(NW_Ucs2 *buf, const NW_Ucs2 *format, ...); -NW_Int32 NW_Str_Vsnprintf(NW_Ucs2 *buf, const NW_Int32 count, const NW_Ucs2 *format, va_list *argptr ); - -/* Create a new copy of a string from an Ascii string constant */ -NW_Ucs2 *NW_Str_NewcpyConst(const char* const string); - -/* Copy null-terminated Ascii string constant */ -NW_Ucs2 *NW_Str_StrcpyConst(NW_Ucs2 *destination, - const char* const source); - -/* Concatinate null-terminated Ascii string constant */ -NW_Ucs2 *NW_Str_StrcatConst(NW_Ucs2 *destination, - const char* const source); - -/* Compare a string to an Strii string constant */ -NW_Int32 NW_Str_StrcmpConst(const NW_Ucs2 *string1, - const char* const string2); - -/* Compare a string to an Strii string constant, case-insenstive */ -NW_Int32 NW_Str_StricmpConst(const NW_Ucs2 *string1, - const char* const string2); - -/* Compare first "count" characters of a string to an Strii string constant */ -NW_Int32 NW_Str_StrncmpConst(const NW_Ucs2 *string1, - const char* const string2, - const NW_Uint32 count); - -/* Compare first "count" characters of a string to an Strii string constant , case-insenstive */ -NW_Int32 NW_Str_StrnicmpConst(const NW_Ucs2 *string1, - const char* const string2, - const NW_Uint32 count); - -/* Compress whitespace, per WML Ver 1.2, section 11.8.1 */ -void NW_Str_CompressWhitespace(NW_Ucs2 *s); - -/* Replace all the occurance of char1 with char2 */ -NW_Int32 NW_Str_Strcharreplace(NW_Ucs2* const string, const NW_Ucs2 char1, const NW_Ucs2 char2); - -/* Creates (allocates memory) a new string with all the whitespaces removed from the specified location */ -NW_Ucs2* NW_Str_Trim(const NW_Ucs2* string, NW_Str_Location_t where); - -/* Skips over leading whitespaces and/or truncates trailing whitespaces depending on specified location */ -NW_Ucs2* NW_Str_TrimInPlace(NW_Ucs2* string, NW_Str_Location_t where); - -/* Create a Ascii string */ -char *NW_Asc_New(const NW_Uint32 len); - -/* Create a Ascii string */ -void NW_Asc_Delete(char *s1); - -NW_Uint32 NW_Asc_strlen(const char *s); - -char *NW_Asc_strcpy(char *s1, const char *s2); - -char *NW_Asc_strcat(char *s1, const char *s2); - -NW_Int32 NW_Asc_Strchr(const char* str, char ch); - -NW_Int32 NW_Asc_strcmp(const char *string1, const char *string2); - -NW_Int32 NW_Asc_stricmp(const char *string1, const char *string2); - -NW_Int32 NW_Asc_strnicmp(const char *string1, const char *string2, - const NW_Uint32 count); - -char *NW_Asc_Itoa(const NW_Int32 i, char* string); - -NW_Ucs2* NW_Asc_toUcs2(char *string); - -// compare string as byte *, case insensitive, "count" indicate the first number of bytes to compare. -NW_Int32 NW_Byte_Strnicmp(const NW_Byte *string1, - const NW_Byte *string2, - const NW_Uint32 count ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_STRING_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_time.h --- a/webengine/wmlengine/src/utils/include/nwx_time.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_time_h -** Subsystem Name:Time -** Purpose: Provides Time manipulation routines in a platform independent -** manner. -***************************************************************************/ -#ifndef NWX_TIME_H -#define NWX_TIME_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ - -#include "nwx_defs.h" - -/* -** Type Declarations -*/ - -/* UTC (GMT) system time in seconds since Jan 1st, 1970 */ -typedef NW_Uint32 NW_Time_t; - -/*UTC Time*/ -typedef struct { - NW_Uint16 Year; /* eg. 1999, 2000, ... */ - NW_Uint16 Month; /* Jan = 1, Feb = 2, ... */ - NW_Uint16 Day; /* 1st = 1, ... 31st = 31 */ - NW_Uint16 DayOfWeek; /* Sun = 0, Mon = 1, ... */ - NW_Uint16 Hour; /* 0 to 23 */ - NW_Uint16 Minute; /* 0 to 59 */ - NW_Uint16 Second; /* 0 to 59 */ - NW_Uint16 Milliseconds; /* 0 to 999 */ -} NW_Time_Tm_t; - - -/* -** Global Function Declarations -*/ - -/* Create a new time structure */ -NW_Time_Tm_t *NW_Time_Tm_New(); - -/* Free a time structure */ -void NW_Time_Tm_Delete(NW_Time_Tm_t *time); - -/* Convert time from NW_Timer_t to NW_Time_Tm_t format */ -NW_Time_Tm_t *NW_Time_CvtToTimeTm(const NW_Time_t time); - -/*Convert time from NW_Time_Tm_t to NW_Timer_t format */ -NW_Time_t NW_Time_CvtFromTimeTm(const NW_Time_Tm_t *time); - -/* Get UTC (GMT) time in Seconds since Jan 1st, 1970 */ -NW_Time_t NW_Time_GetTime(void); - -/* Get free running time in Milliseconds */ -NW_Uint32 NW_Time_GetTimeMSec(void); - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_TIME_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_ui_callbacks_register.h --- a/webengine/wmlengine/src/utils/include/nwx_ui_callbacks_register.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2001 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - nwx_ui_callbacks_register.h - - Allows the user agent to register UI functions - - Original Version: Peter B -*/ - -#ifndef NWX_UI_CALLBACKS_REGISTER_H -#define NWX_UI_CALLBACKS_REGISTER_H - -#include "nwx_generic_dlg.h" -#include "BrsrStatusCodes.h" - -typedef void (*NW_UI_DialogPrompt_t)(NW_Dlg_Prompt_t* data, - void* callbackCtx, - NW_Dlg_PromptCB_t callback); - -typedef void (*NW_UI_DialogInputPrompt_t)(NW_Dlg_InputPrompt_t* data, - void* callbackCtx, - NW_Dlg_InputPromptCB_t callback ); - -typedef void (*NW_UI_DialogListSelect_t)(NW_Dlg_ListSelect_t* data, - void* callbackCtx, - NW_Dlg_ListSelectCB_t callback); - -typedef struct { - NW_UI_DialogPrompt_t DialogPrompt; - NW_UI_DialogInputPrompt_t DialogInputPrompt; - NW_UI_DialogListSelect_t DialogListSelect; -}UI_Callback_t; - -#ifdef __cplusplus -extern "C" { -#endif - TBrowserStatusCode NW_RegisterUICallbacks(const UI_Callback_t*); -#ifdef __cplusplus -} -#endif - -#endif /* NWX_UI_CALLBACKS_REGISTER_H */ - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/nwx_url_utils.h --- a/webengine/wmlengine/src/utils/include/nwx_url_utils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,257 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -/* - $Workfile: nwx_url_utils.h $ - - Purpose: - - This file is used by the wae_urlparse.h. It defines the prototypes - for all the functions needed for parsing a URL (both relative and absolute) - -*/ - -#ifndef NWX_URL_UTILS_H -#define NWX_URL_UTILS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** Includes -*/ - -#include "nwx_defs.h" -#include "BrsrStatusCodes.h" - - - -#define WAE_URL_ESCAPE_CHAR '%' -#define WAE_URL_FRAG_CHAR '#' - -/* reserved characters -- as per rfc2396 */ -#define WAE_URL_PARAM_CHAR ';' -#define WAE_URL_PATH_CHAR '/' -#define WAE_URL_QUERY_CHAR '?' -#define WAE_URL_COLON_CHAR ':' -#define WAE_URL_AT_CHAR '@' -#define WAE_URL_AMP_CHAR '&' -#define WAE_URL_EQUAL_CHAR '=' -#define WAE_URL_PLUS_CHAR '+' -#define WAE_URL_DOLLAR_CHAR '$' -#define WAE_URL_COMMA_CHAR ',' - -/* reserved IPv6 characters -- as per rfc 2732 */ -#define WAE_URL_LEFT_SQUARE_BRACKET_CHAR '[' -#define WAE_URL_RIGHT_SQUARE_BRACKET_CHAR ']' - -/* mark characters -- as per definition in rfc2396 */ -#define WAE_URL_DASH_CHAR '-' -#define WAE_URL_UNDER_CHAR '_' -#define WAE_URL_DOT_CHAR '.' -#define WAE_URL_BANG_CHAR '!' -#define WAE_URL_TILDE_CHAR '~' -#define WAE_URL_STAR_CHAR '*' -#define WAE_URL_APOST_CHAR '\'' -#define WAE_URL_PAREN_CHAR '(' -#define WAE_URL_THESIS_CHAR ')' - - -/* String that separates a scheme from a url */ -#define WAE_URL_NETLOC_SEP (const char*)"//" -#define WAE_URL_PATH_SEP (const char*)"/" -#define WAE_URL_QUERY_SEP (const char*)"?" -#define WAE_URL_FRAG_SEP (const char*)"#" -#define WAE_URL_COLON_SEP (const char*)":" - -#define WAE_URL_POSTFIELD_SEP (const char*)"&" - -#define WAE_URL_CURRENT_DIR (const char*)"./" -#define WAE_URL_PARENT_DIR (const char*)"../" - -/* Schemata strings */ -#define WAE_URL_HTTP_SCHEME (const char*)"http" -#define WAE_URL_HTTPS_SCHEME (const char*)"https" -#define WAE_URL_FTP_SCHEME (const char*)"ftp" -#define WAE_URL_GOPHER_SCHEME (const char*)"gopher" -#define WAE_URL_MAILTO_SCHEME (const char*)"mailto" -#define WAE_URL_NEWS_SCHEME (const char*)"news" -#define WAE_URL_NNTP_SCHEME (const char*)"nntp" -#define WAE_URL_TELNET_SCHEME (const char*)"telnet" -#define WAE_URL_WAIS_SCHEME (const char*)"wais" -#define WAE_URL_FILE_SCHEME (const char*)"file" -#define WAE_URL_PROSPERO_SCHEME (const char*)"prospero" -#define WAE_URL_WTAI_SCHEME (const char*)"wtai" -#define WAE_URL_TEL_SCHEME (const char*)"tel" - -#define WAE_URL_HTTP_PORT_STR (const char*)"80" -#define WAE_URL_HTTP_PORT 80 - -#define WAE_URL_CALENDAR_EXT (const char*)"vcs" -#define WAE_URL_JPG_EXT (const char*)"jpg" - -/* -** Global Types -*/ -typedef enum { - NW_SCHEMA_INVALID = 0, - NW_SCHEMA_UNKNOWN, - NW_SCHEMA_HTTPS, - NW_SCHEMA_FTP, - NW_SCHEMA_GOPHER, - NW_SCHEMA_MAILTO, - NW_SCHEMA_NEWS, - NW_SCHEMA_NNTP, - NW_SCHEMA_TELNET, - NW_SCHEMA_WAIS, - NW_SCHEMA_FILE, - NW_SCHEMA_HTTP, - NW_SCHEMA_PROSPERO, - NW_SCHEMA_WTAI, - NW_SCHEMA_TEL -} NW_Url_Schema_t; - - -typedef struct -{ - const NW_Ucs2 *schemeStart; - const NW_Ucs2 *schemeEnd; - - const NW_Ucs2 *opaqueStart; - const NW_Ucs2 *opaqueEnd; - - const NW_Ucs2 *authorityStart; - const NW_Ucs2 *authorityEnd; - - const NW_Ucs2 *userInfoStart; - const NW_Ucs2 *userInfoEnd; - - const NW_Ucs2 *hostStart; - const NW_Ucs2 *hostEnd; - - const NW_Ucs2 *portStart; - const NW_Ucs2 *portEnd; - - const NW_Ucs2 *pathStart; - const NW_Ucs2 *pathEnd; - - const NW_Ucs2 *queryStart; - const NW_Ucs2 *queryEnd; - - const NW_Ucs2 *fragStart; - const NW_Ucs2 *fragEnd; - - NW_Bool isIPAddress; - -} NW_Rfc2396_Parts_t; - - -TBrowserStatusCode NW_Url_GetScheme( const NW_Ucs2 *url_buff, NW_Url_Schema_t *ret_scheme); - -TBrowserStatusCode NW_Url_GetSchemeStr( const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string ); -/* Function to get a scheme specific part */ -TBrowserStatusCode NW_Url_GetSchemeSpecificPart(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); -TBrowserStatusCode NW_Url_GetParameters( const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string ); -TBrowserStatusCode NW_Url_GetBase( const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string ); -NW_Bool NW_Url_IsValid(const NW_Ucs2 *pUrl); -NW_Bool NW_Url_GetRfc2396Parts( const NW_Ucs2 *pUri, NW_Rfc2396_Parts_t *parts ); - -TBrowserStatusCode NW_Url_GetPort( const NW_Ucs2 *url_buff, NW_Bool *is_valid, NW_Ucs2 **ret_string ); -TBrowserStatusCode NW_Url_GetFragId(const NW_Ucs2 *url_buff, NW_Ucs2 ** ret_string, NW_Bool incFragChar); -TBrowserStatusCode NW_Url_GetNetwork(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); -TBrowserStatusCode NW_Url_GetHost(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); -TBrowserStatusCode NW_Url_GetQuery(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); -TBrowserStatusCode NW_Url_GetPath(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); -TBrowserStatusCode NW_Url_GetPathNoParam(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string); - -/* Function to create a new url based on applying a relative url to a base url. */ -TBrowserStatusCode NW_Url_RelToAbs( const NW_Ucs2 *base, const NW_Ucs2 *relative, NW_Ucs2 **ret_string); - -/* Function to create a new relative url based on applying a absolute url to a base url. */ -TBrowserStatusCode NW_Url_AbsToRel(const NW_Ucs2 *base, const NW_Ucs2 *url, NW_Ucs2 **ret_string); -/* This function will encode a string into x-www-form-urlencoded format.*/ -NW_Bool NW_Url_EscapeString( const NW_Ucs2 *src, NW_Ucs2 *dest ); - -NW_Uint32 NW_Url_EscapeStringLen( const NW_Ucs2 *src ); - -/* This function will un-encode a string from x-www-form-urlencoded format.*/ -NW_Bool NW_Url_UnEscapeString( const NW_Ucs2 *src, NW_Ucs2 *dest ); - -/* This function creates a url in which 16-bit chars are converted to UTF-8, then URI chars */ -TBrowserStatusCode NW_Url_ConvertUnicode( const NW_Ucs2* source, NW_Ucs2** dest ); - -NW_Uint32 NW_Url_UnEscapeStringLen( const NW_Ucs2 *src ); - -TBrowserStatusCode NW_Url_AccessOK(const NW_Ucs2 *domain, const NW_Ucs2 *path, const NW_Ucs2 *url, NW_Int32 *pNumLabelDiff ); - -TBrowserStatusCode NW_Url_IsRelative(const NW_Ucs2 *url, NW_Bool * isRelative); -TBrowserStatusCode NW_Url_GetResolvedPath(const NW_Ucs2 *pBasePath, - const NW_Ucs2 *pRelPath, - NW_Ucs2 **path); - -TBrowserStatusCode NW_Url_AddPostfields(const NW_Ucs2 *url, const NW_Ucs2 *postfields, NW_Ucs2 **fullUrl); - -TBrowserStatusCode NW_Url_BuildUrl(const NW_Ucs2 *src, - const NW_Url_Schema_t scheme, - NW_Ucs2 **url); - - -NW_Ucs2 *NW_Url_Fragment(NW_Ucs2 *url); - -TBrowserStatusCode NW_Url_BuildAbsUrl(const NW_Ucs2 *url, - const NW_Ucs2 *card_name, - NW_Ucs2 **ret_string); - - -/* Function escapes the unwise and space character from the url */ -NW_Bool NW_Url_EscapeUnwise( const NW_Ucs2 *src, NW_Ucs2 *dest); - -/* Function gives the length of url for which unwise and space characters are to be escaped */ -NW_Uint32 NW_Url_EscapeUnwiseLen( const NW_Ucs2 *src ); - -/* Function escapes unwise and space characters in file url. */ -NW_Ucs2* NW_Url_ConvertFileToEscapeURL(const NW_Ucs2 *src); - -/* Function unescapes the file url */ -NW_Ucs2* NW_Url_ConvertFileFromEscapeURL(const NW_Ucs2 *src); - -/* Function returns the scheme type. It does not check if the url is valid or not */ -TBrowserStatusCode NW_Url_GetSchemeNoValidation(const NW_Ucs2* url, NW_Url_Schema_t* ret_scheme); - -TBrowserStatusCode NW_Url_IsBrowserScheme(const NW_Ucs2 *pUri, NW_Bool *isBrowserScheme); - -/* Function remove characters from the url */ -void NW_Url_RemoveChars (const NW_Ucs2 *src, NW_Ucs2 *dest, const NW_Ucs2 *chs); - -/* Function gives the length of url for which characters are to be removed */ -NW_Uint32 NW_Url_RemoveCharsLen( const NW_Ucs2 *src, const NW_Ucs2 *chs ); - -/* Function returns a string in which every byte from source is %HH escaped. */ -TBrowserStatusCode NW_Url_HHEscape( const char* aSource, NW_Ucs2** aDest ); - -/* Function returns the Url file extension */ -NW_Ucs2* NW_Url_GetUrlFileExtension(const NW_Ucs2 *src); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_URL_UTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/include/util_cdispatchereng.h --- a/webengine/wmlengine/src/utils/include/util_cdispatchereng.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: util_cdispatchereng.h $ - -*/ -#ifndef __UTIL_CDISPATCHERENG_H__ -#define __UTIL_CDISPATCHERENG_H__ - -#include <e32cons.h> -#include <e32base.h> -#include <e32std.h> - -NONSHARABLE_CLASS(CDispatcherEng) : public CActive { - -public: - CDispatcherEng(CActive::TPriority aPriority); - - ~CDispatcherEng(); - - void RequestEvent(); - void CompleteEvent(); - void RunL(); - void DoCancel(); - TInt RunError(TInt aError); - - NW_Bool IsDspContext(); - void SetDspContext(NW_Msg_Dispatcher_t* aDsp_cxt); - - //Data member (attribute); - NW_Msg_Dispatcher_t* iDsp_cxt; -}; - -#endif //__UTIL_CDISPATCHERENG_H__ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/CBrowserSettings.cpp --- a/webengine/wmlengine/src/utils/src/CBrowserSettings.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,465 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <bldvariant.hrh> -#include "CBrowserSettings.h" - -#include <BrowserUiSDKCRKeys.h> -#include <centralrepository.h> - -#include <eikenv.h> -#include <eikappui.h> -#include <eikapp.h> -#include <f32file.h> -#include "nwx_string.h" -#include "nwx_ctx.h" -#include "nwx_http_defs.h" -#include "TEncodingMapping.h" - -_LIT(KTempFilesPath, "c:\\system\\temp\\\0"); - -/************************************************************************ -Function:constructor -Purpose: Class constructor. This is protected and is created via the -static method Instance. Reason for this is that this class -is a singleton and there is only one about. -Paramters: -Return Values: -**************************************************************************/ -CBrowserSettings::CBrowserSettings() -{ - //lint --e{774} --e{666} Significant prototype coercion, Expression with side effects passed to repeated parameter in macro - - TInt err = KErrNone; - TRAP(err, iRepository = CRepository::NewL(KCRUidBrowser)); - if(err != KErrNone) - { - return; - } - - CRepository* tempRep = NULL; - TRAP(err, tempRep = CRepository::NewL(KCRUidBrowserUiLV)); - if(err != KErrNone) - { - //delete iRepository and return; - delete iRepository; - iRepository = NULL; - return; - } - iFeatureBitmask = 0; - tempRep->Get(KBrowserEngineFlags, (TInt&)iFeatureBitmask ); - delete tempRep; - - // read values from the ini file - //iStartFromHomepage = GetBooleanValue( KBrowserStartFromHomepage ); - iFontSizeLevel = NW_UINT8_CAST( GetIntValue( KBrowserNGFontSize ) ); - // translate UID to internal encoding - NW_Uint32 uid = GetIntValue( KBrowserNGEncoding ); - iEncoding = EAutomatic; - NW_Uint32 i = 0; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == uid) - { - iEncoding = supportedCharset[i].internalEncoding; - } - } - // - iCookiesEnabled = GetBooleanValue ( KBrowserNGCookiesEnabled ); - iImagesEnabled = GetBooleanValue( KBrowserNGImagesEnabled ); - iEcmaScriptEnabled = NW_UINT8_CAST( GetIntValue( KBrowserNGECMAScriptSupport )); - //we use wmlengine only for wml pages and text wrap was for xhtml small screen mode. - iTextWrapEnabled = NW_FALSE; - //we use wmlengine only for wml pages and vertical layout is not supported for WML pages - iVerticalLayoutEnabled = NW_FALSE; - iDisableSmallScreenLayout = NW_FALSE; - iCSSFetchEnabled = GetBooleanValue(KBrowserCSSFetch); - // translate UID to internal encoding - uid = GetIntValue( KBrowserDefaultCharset ); - iDefaultCharset = EISO8859_1; - for (i = 0; supportedCharset[i].uid != 0; i++) - { - if (supportedCharset[i].uid == uid) - { - iDefaultCharset = supportedCharset[i].internalEncoding; - } - } - // - iIsEmbedded = NW_FALSE; - iIMEINotifyEnabled = NW_UINT8_CAST( GetIntValue( KBrowserIMEINotification )); - iSendReferrerHeader = NW_UINT8_CAST( GetIntValue( KBrowserSendReferrerHeader )); - //iHttpSecurityWarnings = GetBooleanValue( KWmlBrowserHttpSecurityWarnings ); - iSecUI = GetBooleanValue( KBrowserSecurityUI ); - - iIapId = 0; - iObservedSettings = 0; - //iBrowserSettingsObserver = NULL; -} - -/************************************************************************ -Function: Instance -Purpose: Static method to create the only instance of this class if one -does not already exist. -Paramters: -Return Values: pointer to the instance of the WBSettings class -**************************************************************************/ -CBrowserSettings* -CBrowserSettings::Instance() -{ - CBrowserSettings* inst = (CBrowserSettings*)NW_Ctx_Get(NW_CTX_SETTINGS, 0); - if (inst == NULL) - { - inst = new CBrowserSettings(); - NW_Ctx_Set(NW_CTX_SETTINGS, 0, inst); - } - return inst; -} - -CBrowserSettings::~CBrowserSettings() -{ - delete iRepository; - iRepository = NULL; -} - -/* -void -CBrowserSettings::SetObserver( MBrowserSettingsObserver* aBrowserSettingsObserver, - TUint aObservedSettings ) - { - iBrowserSettingsObserver = aBrowserSettingsObserver; - iObservedSettings = aObservedSettings; - } - -void -CBrowserSettings::RemoveObserver( void ) - { - iBrowserSettingsObserver = NULL; - iObservedSettings = 0; - } -*/ -NW_Bool -CBrowserSettings::GetStartFromHomepage(void) - { - return iStartFromHomepage; -} - -NW_Uint8 -CBrowserSettings::GetFontSizeLevel(void) -{ - return iFontSizeLevel; -} - -void -CBrowserSettings::SetFontSizeLevel(NW_Uint8 fontSizeLevel) -{ - iFontSizeLevel = fontSizeLevel; - PublishSettingChange( EFontSizeLevel ); -} - -NW_Uint16 -CBrowserSettings::GetEncoding(void) - { - if(iEncoding >= EDummyLast) - { - return EISO8859_1; - } - else - { - return iEncoding; - } - } - -void -CBrowserSettings::SetEncoding(NW_Uint16 encoding) -{ - iEncoding = encoding; - PublishSettingChange( EEncoding ); -} - -NW_Bool -CBrowserSettings::GetCookiesEnabled(void) -{ - return iCookiesEnabled; -} - -void -CBrowserSettings::SetCookiesEnabled(const NW_Bool enabled) -{ - iCookiesEnabled = enabled; - PublishSettingChange( ECookiesEnabled ); -} - -NW_Bool -CBrowserSettings::GetImagesEnabled(void) -{ - return iImagesEnabled; -} - -void -CBrowserSettings::SetImagesEnabled(const NW_Bool enabled) -{ - iImagesEnabled = enabled; - PublishSettingChange( EImagesEnabled ); -} - -NW_Bool -CBrowserSettings::GetEcmaScriptEnabled(void) -{ - return (NW_Bool)iEcmaScriptEnabled; -} - -void -CBrowserSettings::SetEcmaScriptEnabled(const NW_Bool enabled) -{ - iEcmaScriptEnabled = (NW_Uint8) enabled; - PublishSettingChange( EEcmaScriptEnabled ); -} - -NW_Bool -CBrowserSettings::GetTextWrapEnabled(void) -{ - return (NW_Bool)iTextWrapEnabled; -} - -void -CBrowserSettings::SetTextWrapEnabled(const NW_Bool /*enabled*/) -{ - iTextWrapEnabled = NW_FALSE; - PublishSettingChange( ETextWrapEnabled ); -} - -NW_Uint32 -CBrowserSettings::GetOriginalEncoding() -{ - return iOriginalEncoding; -} - -void -CBrowserSettings::SetOriginalEncoding(NW_Uint32 encoding) -{ - iOriginalEncoding = encoding; - PublishSettingChange( EOriginalEncoding ); -} - -void -CBrowserSettings::SetDisableSmallScreenLayout(const NW_Bool disabled) -{ - iDisableSmallScreenLayout = disabled; - PublishSettingChange( EDisableSmallScreenLayout ); -} - -NW_Bool -CBrowserSettings::GetDisableSmallScreenLayout() -{ - return iDisableSmallScreenLayout; -} - -NW_Bool -CBrowserSettings::GetCSSFetchEnabled(void) -{ - return iCSSFetchEnabled; -} - -void -CBrowserSettings::SetCSSFetchEnabled(const NW_Bool enabled) -{ - iCSSFetchEnabled = enabled; - PublishSettingChange( ECSSFetchEnabled ); -} - -NW_Bool -CBrowserSettings::GetVerticalLayoutEnabled(void) -{ - if (iDisableSmallScreenLayout) - { - return NW_FALSE; - } - return (NW_Bool)iVerticalLayoutEnabled; -} - -void -CBrowserSettings::SetVerticalLayoutEnabled(const NW_Bool enabled) -{ - iVerticalLayoutEnabled = (NW_Uint8) enabled; - PublishSettingChange( EVerticalLayoutEnabled ); -} - -void -CBrowserSettings::SetInternalVerticalLayoutEnabled(const NW_Bool enabled) -{ - iVerticalLayoutEnabled = (NW_Uint8) enabled; - PublishSettingChange( EVerticalLayoutEnabled ); -} - -NW_Uint16 CBrowserSettings::GetDefaultCharset(void) -{ - if ((iDefaultCharset == EAutomatic) || (iDefaultCharset >= EDummyLast)) - { - return EISO8859_1; - } - else - { - return iDefaultCharset; - } -} - -NW_Bool -CBrowserSettings::GetIsBrowserEmbedded(void) -{ - PublishSettingChange( EIsEmbedded ); - return iIsEmbedded; -} - -void -CBrowserSettings::SetIsBrowserEmbedded(const NW_Bool isEmbedded) - { - iIsEmbedded = isEmbedded; - } - -TUint -CBrowserSettings::GetLocalFeatures(void) -{ - return iFeatureBitmask; -} - -NW_Ucs2* CBrowserSettings::GetTempFilesPath(void) -{ - NW_Ucs2* ret = NW_Str_Newcpy(KTempFilesPath().Ptr()); - return ret; -} - -NW_Uint8 CBrowserSettings::GetMMCDrive(void) -{ - return 'e'; -} - -NW_Uint8 -CBrowserSettings::GetIMEINotifyEnabled(void) -{ - return iIMEINotifyEnabled; -} - -void -CBrowserSettings::SetIMEINotifyEnabled(NW_Uint8 enabled) -{ - iIMEINotifyEnabled = enabled; - PublishSettingChange( EIMEINotifyEnabled ); -} - -NW_Uint8 -CBrowserSettings::GetSendReferrerHeader(void) -{ - return iSendReferrerHeader; -} - -void -CBrowserSettings::SetSendReferrerHeader(NW_Uint8 enabled) -{ - iSendReferrerHeader = enabled; - PublishSettingChange( ESendReferrerHeader ); -} - -NW_Bool -CBrowserSettings::GetHttpSecurityWarnings(void) -{ - // iSecUI = 1 means "supressing security UI" - if( iSecUI ) - { - return NW_FALSE; - } - - return iHttpSecurityWarnings; -} - -void -CBrowserSettings::SetIAPId(NW_Uint32 aIapId) -{ - iIapId = aIapId; -} - -NW_Uint32 -CBrowserSettings::GetIAPId(void) -{ - return iIapId; -} - -void -CBrowserSettings::SetHttpSecurityWarnings(NW_Bool enabled) -{ - iHttpSecurityWarnings = enabled; - PublishSettingChange( EHttpSecurityWarnings ); -} - -void -CBrowserSettings::PublishSettingChange( enum TBrowserSetting /*aBrowserSetting*/) - { - } - -/***************************************************************************** -* Utility methods -******************************************************************************/ -TInt -CBrowserSettings::GetIntValue(const TUint32 aKey) -{ - TInt retVal = 0; - - if ( iRepository ) - { - iRepository->Get(aKey, retVal); - } - return retVal; -} - - -NW_Bool -CBrowserSettings::GetBooleanValue(const TUint32 aKey) -{ - TFileName value; - NW_Bool retVal = NW_FALSE; - TInt err = KErrGeneral; - - if ( iRepository) - { - err = iRepository->Get( aKey, value ); - } - - if(err == KErrNone) - { - if ( value.Compare( KValueOn ) == 0 ) - { - retVal = NW_TRUE; - } - } - - return retVal; -} - - -NW_Ucs2* CBrowserSettings::GetStringValue( const TUint32 aKey ) -{ - NW_Ucs2* retVal = NULL; - TFileName value; - - if ( iRepository && ( KErrNone == iRepository->Get( aKey, value ) ) ) - { - retVal = NW_Str_Substr( value.Ptr(), 0, value.Length() ); - } -return retVal; -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/CReferrerHelper.cpp --- a/webengine/wmlengine/src/utils/src/CReferrerHelper.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "CReferrerHelper.h" -#include "urlloader_urlloaderint.h" -#include "nwx_http_defs.h" // For NW_URL_METHOD_GET -#include "nwx_settings.h" - -// ----------------------------------------------------------------------------- -// SetReferrerHeader -// Set Referrer Header -// ----------------------------------------------------------------------------- -// -void SetReferrerHeader(NW_HED_UrlRequest_t* urlRequest, - NW_Ucs2* referrerUrl) -{ - TUrlLoaderScheme urlScheme; - NW_Text_Length_t urlLength; - NW_Uint8 urlFreeNeeded = NW_FALSE; - NW_Ucs2* requestUrl; - - // Get scheme of request url for later use - requestUrl = (NW_Ucs2*) NW_Text_GetUCS2Buffer (urlRequest->url, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - &urlLength, &urlFreeNeeded); - - urlScheme = UrlLoader_FindUrlScheme(requestUrl); - if (urlFreeNeeded) - { - NW_Mem_Free(requestUrl); - } - - // Make sure Schema is valid before going forward - if (urlScheme == ESchemeInvalid) - { - return; - } - - // Don't pass referrer header if it is not get requests - if (NW_HED_UrlRequest_GetMethod (urlRequest) == NW_URL_METHOD_GET) - { // If yes, then create referrer header - TUrlLoaderScheme referrerUrlScheme = UrlLoader_FindUrlScheme(referrerUrl); - - if ( referrerUrlScheme != ESchemeInvalid && - !(referrerUrlScheme == ESchemeHttps && urlScheme == ESchemeHttp) ) - { // No referrer header sent from https to http, othercase send referrer header - // First check if referrerUrl has fragment in it or not, if so, remove it - - NW_Uint32 referrerUrlLength = NW_Str_Strlen(referrerUrl); - NW_Ucs2* newReferrerUrl = NW_Str_New(referrerUrlLength + 1); - if(newReferrerUrl != NULL) - { // Not out of memory, referrer header will be created - NW_Uint32 i = 0; - while ( i < referrerUrlLength && referrerUrl[i] != '#') - { - newReferrerUrl[i] = referrerUrl[i]; - i++; - } - - // Terminate the string - newReferrerUrl[i] = '\0'; - - HttpRequestHeaders* referHeader = (HttpRequestHeaders*)UrlLoader_HeadersNew(NULL, - NULL, - newReferrerUrl, - NULL, - 0, - NULL); - urlRequest->header = referHeader; - // Free newReferrerUrl - NW_Str_Delete(newReferrerUrl); - newReferrerUrl = NULL; - } - // else: Out of memory, no referrer header sent - } - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/FileNameUtils.cpp --- a/webengine/wmlengine/src/utils/src/FileNameUtils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File-name related utility methods. -* -*/ - - - -// INCLUDE FILES -#include <e32base.h> -#include <CDirectoryLocalizer.h> -#include <f32file.h> -#include "BrsrStatusCodes.h" -#include "FileNameUtils.h" -#include "nwx_assert.h" - -// CONSTANTS - -// A localized file name can be larger than a standard file name. A size of 50% -// more should provide adequate space. -const TInt KMaxLocalizedFileName = (KMaxFileName + (KMaxFileName >> 1)); - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// FileNameUtils::LocalizePath -// Gets the localized file name, in full, which includes the path but -// not the drive. This is intended for use as a displayable path and -// as such the drive is not included since drive letters are never shown -// to the user. -// -// Note, returns newly allocated memory in aLocalizedFullFileName that the -// caller is responsible for deleting. -// -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -FileNameUtils::GetLocalizedFullFileName( TPtrC& aFullFileName, - HBufC** aLocalizedFullFileName ) - { - TInt err; - TInt len; - TBrowserStatusCode status = KBrsrSuccess; - CDirectoryLocalizer* localizer = NULL; - HBufC* buf1 = NULL; - HBufC* buf2 = NULL; - - NW_ASSERT( aLocalizedFullFileName ); - - // Instantiate a directory localizer. - TRAP( err, localizer = CDirectoryLocalizer::NewL() ); - if ( err ) - { - // Map the system error to browser error: out-of-memory or failure. - status = (err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure; - goto _Exit; - } - - // Allocate two buffers. Both are used as work areas. In the end, buf1 will - // contain the localized file name, which will be returned to the caller, - // and buf2 will be deleted. - buf1 = HBufC::New( KMaxLocalizedFileName ); - buf2 = HBufC::New( KMaxLocalizedFileName ); - if ( !buf1 || !buf2 ) - { - status = KBrsrOutOfMemory; - goto _Exit; - } - - // The following "if" statement is used more as a way to enclose the next - // section of code in braces, creating it's own block - necessary to keep - // compiler from generating warnings about uninitialized variables due to - // the goto-exit-code-pathways above. - if ( status == KBrsrSuccess ) - { - // Pointers to the two newly allocated work buffers. - TPtr ptr1( buf1->Des() ); - TPtr ptr2( buf2->Des() ); - - // Create a file parser for the original full-file name. - TParsePtrC fileParserOrigFileName( aFullFileName ); - - // Loop through the sub-directories, localizing each one in the path. - // The localized sub-directory is appended into buf2. Buf2 ends up - // with all of the localized sub-directories but in reverse order. The - // contents of buf2 will then be reversed again into buf1 to get the - // correct order. - TInt loc; - TPtrC localName; - // To start with, buf1 (ptr1) gets a copy of the orginal drive and path. - // This copy will gradually be taken apart as each sub-directory gets - // popped in the loop below. - ptr1.Copy( fileParserOrigFileName.DriveAndPath() ); - TParsePtr fileParser1( ptr1 ); - TPtrC driveAndPath( fileParser1.DriveAndPath() ); - while ( (loc = driveAndPath.LocateReverse( '\\' )) != KErrNotFound ) - { - localizer->SetFullPath( driveAndPath ); - - // Check to see if current sub-directory is localized. - if ( localizer->IsLocalized() ) - { - // If localized, use localized sub-directory. - localName.Set( localizer->LocalizedName() ); - ptr2.Append( '\\' ); - } - else - { - // If not localized, use the sub-directory name as it is, - // extracting it from the end of the path. - - // Remove trailing backslash. - driveAndPath.Set( driveAndPath.Left( loc ) ); - // Get length of sub-directory. - if ( (loc = driveAndPath.LocateReverse( '\\' )) == KErrNotFound ) - { - len = 0; - } - else - { - len = driveAndPath.Length() - loc; - } - // Extract the sub-directory, including its leading backslash. - localName.Set( driveAndPath.Right( len ) ); - } - ptr2.Append( localName ); - - // Prepare for next iteration through loop by popping the - // sub-directory just processed and setting driveAndPath to the new - // value, which has the sub-directory removed. - err = fileParser1.PopDir(); - if ( err != KErrNone ) - { - break; - } - driveAndPath.Set( fileParser1.DriveAndPath() ); - } - - // Work buf2 contains the localized path in reverse order. Reverse it - // back to the correct order, putting the corrected path in buf1. - ptr1.Zero(); - while ( (loc = ptr2.LocateReverse( '\\' )) != KErrNotFound ) - { - ptr1.Append( ptr2.Right( ptr2.Length() - loc ) ); - ptr2.SetLength( loc ); - } - - // Append the file name and extension. - TPtrC nameAndExt( fileParserOrigFileName.NameAndExt() ); - len = ptr1.Length(); - if ( !len || (ptr1[len - 1] != '\\') ) - { - ptr1.Append( '\\' ); - } - ptr1.Append( nameAndExt ); - - // Return the allocated buffer with the localized path. - *aLocalizedFullFileName = buf1; - buf1 = NULL; // set to null so it doesn't get deallocated below. - - } - -_Exit: - delete localizer; - delete buf1; - delete buf2; - return status; - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/ImageUtils.cpp --- a/webengine/wmlengine/src/utils/src/ImageUtils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: String related utility methods. -* -*/ - - - -// INCLUDE FILES -#include <e32base.h> - -#include "ImageUtils.h" -#include "nwx_http_defs.h" -#include "nwx_string.h" - -extern const unsigned char HTTP_image_x_ota_bitmap_string[]; -extern const unsigned char HTTP_image_vnd_nokia_ota_bitmap_string[]; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// ImageUtils::GetRecognizedImageType -// -// This method determines if the content-type of the image is recognizable by -// the SymbianOS. Some image types don't contain their content-type in the -// data, so we manually recognize them. -// ----------------------------------------------------------------------------- -TImageType GetRecognizedImageType(const char* aContentTypeString) - { - // We default to assuming the SymbianOS (and BrowserUI) can recognize and - // display the image. - TImageType imageType = ERecognizedImage; - - // Find any images that require special handling, i.e. images that can't - // be recognized but can be displayed. - if (0 == NW_Asc_stricmp((char*)HTTP_image_vnd_wap_wbmp_string, - aContentTypeString)) - { - // We have a Wbmp image (image/vnd.wap.wbmp) - imageType = EWbmpImage; - } - else if (0 == NW_Asc_stricmp((char*)HTTP_image_vnd_nokia_ota_bitmap_string, - aContentTypeString)) - { - // We have an Ota image (image/vnd.nokia.ota-bitmap) - imageType = EOtaImage; - } - else if (0 == NW_Asc_stricmp((char*)HTTP_image_x_ota_bitmap_string, - aContentTypeString)) - { - // We have an Ota image (image/x-ota-bitmap) - imageType = EOtaImage; - } - - return imageType; - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/StringUtils.cpp --- a/webengine/wmlengine/src/utils/src/StringUtils.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,384 +0,0 @@ -/* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: String related utility methods. -* -*/ - - - -// INCLUDE FILES -#include <e32base.h> -#include <e32hal.h> -#include <e32svr.h> - -#include "StringUtils.h" -#include "nwx_string.h" - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// StringUtils::CopyUsc2ToAscii -// Convert a UCS2 buffer to ascii. -// ----------------------------------------------------------------------------- -// -TUint8* StringUtils::CopyUsc2ToAscii(const TUint16* aUsc2Buf) - { - if (aUsc2Buf == NULL) - { - return NULL; - } - - TUint len = User::StringLength(aUsc2Buf) + 1; - TUint8* asciiBuf = new TUint8 [len]; - if (asciiBuf != NULL) - { - TPtr8 asciiPtr(asciiBuf, 0, len); - TPtrC16 ucs2Ptr(aUsc2Buf); - asciiPtr.Copy(ucs2Ptr); - asciiPtr.ZeroTerminate(); - } - return asciiBuf; - } - - -// ----------------------------------------------------------------------------- -// StringUtils::CopyAsciiToUsc2 -// Convert a ascii buffer to UCS2. -// ----------------------------------------------------------------------------- -// -TUint16* StringUtils::CopyAsciiToUsc2(const TUint8* aAsciiBuf) - { - if (aAsciiBuf == NULL) - { - return NULL; - } - - TUint len = User::StringLength(aAsciiBuf) + 1; - TUint16* usc2Buf = new TUint16 [len]; - if (usc2Buf != NULL) - { - TPtrC8 asciiPtr(aAsciiBuf); - TPtr16 ucs2Ptr(usc2Buf, 0, len); - ucs2Ptr.Copy(asciiPtr); - ucs2Ptr.ZeroTerminate(); - } - return usc2Buf; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyUsc2ToUcs2 -// Copy a UCS2 buffer. -// ----------------------------------------------------------------------------- -// -TUint16* StringUtils::CopyUsc2ToUcs2(const TUint16* aUsc2Buf) - { - if (aUsc2Buf == NULL) - { - return NULL; - } - - TUint len = User::StringLength(aUsc2Buf) + 1; - TUint16* buf = new TUint16[len]; - if (buf != NULL) - { - TPtr16 ptr(buf, 0, len); - TPtrC16 ucs2Ptr(aUsc2Buf); - ptr.Copy(ucs2Ptr); - ptr.ZeroTerminate(); - } - return buf; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyAsciiToAscii -// Copy a ascii buffer. -// ----------------------------------------------------------------------------- -// -TUint8* StringUtils::CopyAsciiToAscii(const TUint8* aAsciiBuf) - { - if (aAsciiBuf == NULL) - { - return NULL; - } - - TUint len = User::StringLength(aAsciiBuf) + 1; - TUint8* buf = new TUint8[len]; - if (buf != NULL) - { - TPtrC8 asciiPtr(aAsciiBuf); - TPtr8 ptr(buf, 0, len); - ptr.Copy(asciiPtr); - ptr.ZeroTerminate(); - } - return buf; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyStringToDes -// Convert a NW_String_t (holding an usc2 null-terminated string) to a TDesC16. -// ----------------------------------------------------------------------------- -// -TDesC16* StringUtils::CopyStringToDes(const NW_String_t& aUcs2String) - { - HBufC16* des = NULL; - - TUint length = NW_String_getCharCount((NW_String_t*) &aUcs2String, - HTTP_iso_10646_ucs_2); - - des = HBufC16::New(length + 1); - - if (des) - { - des->Des().Append((const TUint16*) aUcs2String.storage, length); - des->Des().ZeroTerminate(); - } - - return des; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyTDesC8ToTDesC16 -// Convert a NW_String_t (holding an usc2 null-terminated string) to a TDesC16. -// ----------------------------------------------------------------------------- -// -TDesC16* StringUtils::CopyTDesC8ToTDesC16(const TDesC8& aTDesC8String) - { - HBufC16* des = NULL; - - TUint length = aTDesC8String.Length(); - - des = HBufC16::New(length + 1); - - if (des) - { - des->Des().Copy(aTDesC8String); - des->Des().ZeroTerminate(); - } - - return des; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyTUint16ToTDesC16 -// Convert a NW_String_t (holding an usc2 null-terminated string) to a TDesC16. -// ----------------------------------------------------------------------------- -// -TDesC16* StringUtils::CopyTUint16ToTDesC16(const TUint16* aTUint16String) - { - HBufC16* des = NULL; - - TUint length = User::StringLength(aTUint16String); - - des = HBufC16::New(length + 1); - - if (des) - { - des->Des().Append((const TUint16*) aTUint16String, length); - des->Des().ZeroTerminate(); - } - - return des; - } - -// ----------------------------------------------------------------------------- -// StringUtils::ConvertPtrUsc2ToAscii -// Convert a UCS2 buffer to ascii. -// ----------------------------------------------------------------------------- -// -TInt StringUtils::ConvertPtrUsc2ToAscii(const TPtrC& aUsc2Ptr, TUint8** retPtr) - { - TUint len = aUsc2Ptr.Length() + 1; // 1 for NULL terminator - - TUint8* asciiBuf = new TUint8[len]; - if (asciiBuf != NULL) - { - TPtr8 asciiPtr(asciiBuf, 0, len); - asciiPtr.Copy(aUsc2Ptr); - asciiPtr.ZeroTerminate(); - *retPtr = asciiBuf; - } - else - { - return KErrNoMemory; - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// StringUtils::ConvertPtrAsciiToUcs2 -// Convert a ascii buffer to UCS2. -// ----------------------------------------------------------------------------- -// -TInt StringUtils::ConvertPtrAsciiToUcs2(const TPtrC8& aAsciiPtr, TUint16** retPtr) - { - TUint len = aAsciiPtr.Length() + 1; // 1 for NULL terminator - - TUint16* ucs2Buf = new TUint16[len]; - if (ucs2Buf != NULL) - { - TPtr ucs2Ptr(ucs2Buf, 0, len); - ucs2Ptr.Copy(aAsciiPtr); - ucs2Ptr.ZeroTerminate(); - *retPtr = ucs2Buf; - } - else - { - return KErrNoMemory; - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// StringUtils::ConvertPtrUcs2ToUcs2 -// Convert a UCS2 buffer to UCS2. -// ----------------------------------------------------------------------------- -// -TInt StringUtils::ConvertPtrUcs2ToUcs2(const TPtrC& aUcs2Ptr, TUint16** retPtr) - { - TUint len = aUcs2Ptr.Length() + 1; // 1 for NULL terminator - - TUint16* ucs2Buf = new TUint16[len]; - if (ucs2Buf != NULL) - { - TPtr ucs2Ptr(ucs2Buf, 0, len); - ucs2Ptr.Copy(aUcs2Ptr); - ucs2Ptr.ZeroTerminate(); - *retPtr = ucs2Buf; - } - else - { - return KErrNoMemory; - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// StringUtils::ConvertUintToUcs2 -// Convert a TUint to UCS2. -// ----------------------------------------------------------------------------- -// -TInt StringUtils::ConvertUintToUcs2(TUint aUint, TUint16** retPtr) - { - TUint16 buf[10]; - - NW_Str_Itoa((TInt) aUint, buf); - TUint i = User::StringLength(buf); - TUint16* ret = new TUint16[i + 1]; - if (ret == NULL) - { - return KBrsrOutOfMemory; - } - Mem::Copy(ret, (void*) buf, (i + 1) * sizeof(TUint16)); - *retPtr = ret; - return KBrsrSuccess; - } - - -// ----------------------------------------------------------------------------- -// StringUtils::CopyHBufCZeroTerminateL -// Create HBufC. -// ----------------------------------------------------------------------------- -// -HBufC* StringUtils::CopyHBufCZeroTerminateL(const TDesC& aInBuf) - { - TPtrC ptr(aInBuf); - - if ((ptr.Length() > 0) && (ptr[ptr.Length() - 1] == '\0')) - { - ptr.Set(ptr.Left(ptr.Length() - 1)); - } - HBufC* buf = HBufC::NewL(ptr.Length() + 1); - buf->Des().Copy(ptr); - buf->Des().ZeroTerminate(); - return buf; - } - -// ----------------------------------------------------------------------------- -// StringUtils::MakeHBufCLC -// Create HBufC. -// ----------------------------------------------------------------------------- -// -HBufC* StringUtils::MakeHBufCLC(const TUint16* aBuffer, TUint aStart, TUint aEnd) - { - - TPtrC ptr(aBuffer + aStart, aEnd - aStart); - if (ptr.Length() > 0 && ptr[ptr.Length() - 1] == '\0') - { - ptr.Set(ptr.Left(ptr.Length() - 1)); - } - - HBufC* buf = HBufC::NewL(ptr.Length() + 1); - buf->Des().Copy(ptr); - buf->Des().ZeroTerminate(); - CleanupStack::PushL(buf); - return buf; - } -// ----------------------------------------------------------------------------- -// StringUtils::DisplayAvailableMemory -// Show the amount of free memory in the system -// ----------------------------------------------------------------------------- -// -void StringUtils::DisplayAvailableMemory() - { -#ifdef _DEBUG - RDebug::Print(_L("Available memory")); -#endif - } - -// ----------------------------------------------------------------------------- -// StringUtils::ConvertToUcsAndMakeHBufCLC -// Create HBufC. -// ----------------------------------------------------------------------------- -// - -HBufC* StringUtils::ConvertToUnicodeLC(const TUint8* aBuffer, TUint aStart, TUint aEnd) - { - - TPtrC8 ptr(aBuffer + aStart, aEnd - aStart); - if (ptr.Length() > 0 && ptr[ptr.Length() - 1] == '\0') - { - ptr.Set(ptr.Left(ptr.Length() - 1)); - } - - HBufC* buf = HBufC::NewL(ptr.Length() + 1); - buf->Des().Copy(ptr); - TPtr16 bufDes16 = buf->Des(); - bufDes16.ZeroTerminate(); - CleanupStack::PushL(buf); - return buf; - } - -// ----------------------------------------------------------------------------- -// StringUtils::CopyHBufCZeroTerminateL -// Create HBufC. -// ----------------------------------------------------------------------------- -// -HBufC* StringUtils::CopyConvertHBufCZeroTerminateL(const TDesC8& aInBuf) - { - TPtrC8 ptr(aInBuf); - - if ((ptr.Length() > 0) && (ptr[ptr.Length() - 1] == '\0')) - { - ptr.Set(ptr.Left(ptr.Length() - 1)); - } - HBufC* buf = HBufC::NewL(ptr.Length() + 1); - buf->Des().Copy(ptr); - TPtr16 bufDes16 = buf->Des(); - bufDes16.ZeroTerminate(); - return buf; - } -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/TEncodingMapping.cpp --- a/webengine/wmlengine/src/utils/src/TEncodingMapping.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "TEncodingMapping.h" -#include "nwx_http_defs.h" -#include "nwx_defs.h" -#include <charconv.h> - -const SupportedCharset supportedCharset[] = - { - {KCharacterSetIdentifierIso88591, HTTP_iso_8859_1, EISO8859_1, (NW_Uint8*)NW_Iso88591_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88591, HTTP_iso_8859_1, EISO8859_1, (NW_Uint8*)NW_Windows1252_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierUtf8, HTTP_utf_8, EUTF8, (NW_Uint8*)NW_Utf8_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierGb2312, HTTP_gb2312, EGb2312, (NW_Uint8*)NW_Gb2312_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierBig5, HTTP_big5, EBig5, (NW_Uint8*)NW_Big5_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88592, HTTP_iso_8859_2, EISO8859_2, (NW_Uint8*)NW_Iso88592_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88594, HTTP_iso_8859_4, EISO8859_4, (NW_Uint8*)NW_Iso88594_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88595, HTTP_iso_8859_5, EISO8859_5, (NW_Uint8*)NW_Iso88595_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88596, HTTP_iso_8859_6, EISO8859_6, (NW_Uint8*)NW_Iso88596_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88597, HTTP_iso_8859_7, EISO8859_7, (NW_Uint8*)NW_Iso88597_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88598, HTTP_iso_8859_8, EISO8859_8, (NW_Uint8*)NW_Iso88598_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88599, HTTP_iso_8859_9, EISO8859_9, (NW_Uint8*)NW_Iso88599_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso88599, HTTP_iso_8859_9, EISO8859_9, (NW_Uint8*)NW_Iso885915_CharsetStr, NW_TRUE}, - {0x100059d6, HTTP_windows_1250, EWindows1250, (NW_Uint8*)NW_Windows1250_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1250 - {0x100059D7, HTTP_windows_1251, EWindows1251, (NW_Uint8*)NW_Windows1251_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1251 - {0x100059D8, HTTP_windows_1253, EWindows1253, (NW_Uint8*)NW_Windows1253_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1253 - {0x100059D9, HTTP_windows_1254, EWindows1254, (NW_Uint8*)NW_Windows1254_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1254 - {0x101F8547, HTTP_windows_1255, EWindows1255, (NW_Uint8*)NW_Windows1255_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1255 - {0x101F8547, HTTP_windows_1255, EWindows1255, (NW_Uint8*)NW_Iso88598i_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1255 - {0x101F8548, HTTP_windows_1256, EWindows1256, (NW_Uint8*)NW_Windows1256_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1256 - {0x100059DA, HTTP_windows_1257, EWindows1257, (NW_Uint8*)NW_Windows1257_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-1257 - {0x101F8549, HTTP_tis_620, ETis620, (NW_Uint8*)NW_Tis_620_CharsetStr, NW_TRUE}, // no header file is provided with the converter tis-620 - {KCharacterSetIdentifierShiftJis, HTTP_shift_JIS, EShiftJis, (NW_Uint8*)NW_ShiftJis_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierShiftJis, HTTP_shift_JIS, EShiftJis, (NW_Uint8*)NW_ShiftJis_CharsetStr2, NW_TRUE}, - {KCharacterSetIdentifierShiftJis, HTTP_shift_JIS, EShiftJis, (NW_Uint8*)NW_X_SJis_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierJis, HTTP_jis_x0201_1997, EJisX0201_1997, (NW_Uint8*)NW_JisX0201_1997_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierJis, HTTP_jis_x0208_1997, EJisX0208_1997, (NW_Uint8*)NW_JisX0208_1997_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierEucJpPacked, HTTP_euc_jp, EEucJp, (NW_Uint8*)NW_EucJp_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierEucJpPacked, HTTP_euc_jp, EEucJp, (NW_Uint8*)NW_X_EucJp_CharsetStr, NW_TRUE}, - {KCharacterSetIdentifierIso2022Jp, HTTP_iso_2022_jp, EIso2022Jp, (NW_Uint8*)NW_Iso2022Jp_CharsetStr, NW_TRUE}, - {0x101F854A, HTTP_windows_874, EWindows874, (NW_Uint8*)NW_Windows874_CharsetStr, NW_TRUE}, // no header file is provided with the converter windows-874 - {0x101F8778, HTTP_Koi8_r, EKoi8_r, (NW_Uint8*)NW_Koi8r_CharsetStr, NW_TRUE}, // no header file is provided with the converter Russian - {0x101F8761, HTTP_Koi8_u, EKoi8_u, (NW_Uint8*)NW_Koi8u_CharsetStr, NW_TRUE}, // no header file is provided with the converter Ukrainian - {KCharacterSetIdentifierUcs2, HTTP_iso_10646_ucs_2, EISO10646_UCS_2, (NW_Uint8*)NW_Iso10646Ucs2_CharsetStr, NW_FALSE}, - {KCharacterSetIdentifierUcs2, HTTP_iso_10646_ucs_2, EISO10646_UCS_2, (NW_Uint8*)NW_Unicode_CharsetStr, NW_FALSE}, - {0x2000E526, HTTP_euc_kr, EEucKr, (NW_Uint8*)NW_EucKr_CharsetStr, NW_TRUE}, // no header file is provided with the converter Ukrainian - {0x200113CD, HTTP_ksc_5601, EKsc_5601, (NW_Uint8*)NW_ksc5601_1987_CharsetStr, NW_TRUE}, // no header file is provided with the converter Ukrainian - {0, 0, EAutomatic, (NW_Uint8*)NULL, NW_TRUE}, - {0, 0, EDummyLast, (NW_Uint8*)NULL, NW_TRUE} -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nw_loadreq.cpp --- a/webengine/wmlengine/src/utils/src/nw_loadreq.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1657 +0,0 @@ -/* -* Copyright (c) 1998-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**------------------------------------------------------------------------- -** Component Generic Include -**------------------------------------------------------------------------- -*/ -#include <apgcli.h> -#include <apmstd.h> -#include <f32file.h> - -#include "MVCShell.h" -#include "nw_object_exceptions.h" -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "nw_nvpair.h" -#include "nw_wae_reader.h" -#include "nw_string_string.h" -#include "nwx_http_defs.h" -#include "nwx_settings.h" -#include "nwx_statuscodeconvert.h" - -/* -**------------------------------------------------------------------------- -** Module Specific Includes -**------------------------------------------------------------------------- -*/ -#include "nw_loadreq.h" -#include "urlloader_urlloaderint.h" -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -//TODO STREAMING: Need to track down an API for getting these. Initial inquiry -//didn't find one and found other apps are hard-coding these as well. These, -//however, will not be needed when we switch to the streaming implementation. -static const NW_Ucs2 KCDrivePrefix[] = {'c', ':', '\\', '\0'}; -static const NW_Ucs2 KEDrivePrefix[] = {'e', ':', '\\', '\0'}; - -// The boundary string generated will be done using random numbers and -// converting them to ASCII hex strings. The length should be fairly long so as -// to reduce the probability of the boundary matching any data being sent. As -// of this writing, Microsoft I.E. uses a length of 41, of which 14 chars are -// random ASCII hex chars and the rest are all dashes. In our case, all 41 -// chars will be random providing a very low probability of a match. RFC2046 -// states that the max length is 70. -static const int KBoundaryLen = 41; - -static const NW_Uint8 KDefaultContentType[] = -{'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '/', 'o', 'c', 't', 'e', 't', '-', 's', 't', 'r', 'e', 'a', 'm'}; - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -#define NW_URLENCODED_TYPE_STR (const char*)"application/x-www-form-urlencoded" -#define NW_URLENCODED_CHARSET_UTF8_TYPE_STR (const char*)"application/x-www-form-urlencoded; charset=utf-8" -#define NW_MULTIPART_TYPE_STR (const char*)"multipart/form-data" - -// The HTTP Post header is created elsewhere. It inserts enough initial CRLFs -// already in preparation for the body; thus, the first boundary string needs -// one fewer CRLF. Inserting one too many CRLF will cause some sites to not -// work on multipart post (e.g., www.gifworks.com). Therefore, there are two -// boundary start strings, one with CRLF and one without. Note, the CRLF does -// belong in the front of and as part of the boundary string. See RFC 1521: -// "...initial CRLF is considered to be attached to encpsulation boundary -// rather than part of the preceding part." -#define NW_BOUNDARY_FIRST_START_STR (const char*)"--" -#define NW_BOUNDARY_START_STR (const char*)"\r\n--" -#define NW_BOUNDARY_END_STR (const char*)"--\r\n" -#define NW_CONTENTTYPE_TEXTPLAIN_CHARSET_STR (const char*)"\r\nContent-Type: text/plain; charset=" -#define NW_CONTENTTYPE_STR (const char*)"\r\nContent-Type: " -#define NW_CONTENTDISPOSITION_STR (const char*)"\r\nContent-Disposition: form-data; name=" -#define NW_FILENAME_STR (const char*)" filename=" -#define NW_HEADEREND_STR (const char*)"\r\n\r\n" - - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -TBrowserStatusCode Transcode( NW_Byte *p, const NW_Ucs2 *s, - NW_Http_CharSet_t http_charset, NW_Uint32 *byteLen ); -NW_Uint32 TranscodedLength( const NW_Ucs2 *s, - NW_Http_CharSet_t http_charset); -NW_Byte* TranscodeTo10646_ucs2( const NW_Ucs2 *aSrc, NW_Byte *aDst ); - -static TBrowserStatusCode getEscapedPostdataL(NW_NVPair_t *postfields, - NW_Ucs2 ** escapedPostdata, - NW_HED_AppServices_t* appServices, - void * appCtx); -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -//------------------------------------------------------------------------- -// getConvertedStringL(): -// aString: A NW_Ucs2* that needs url-escaping and/or foreign charset conversion. -// aConvertedString: Gets filled in with a (NW_Ucs2*) pointing to the result of those operations. -// *aConvertedString is NULL-terminated. -// aConvertedLen: Set to the length of aConvertedString, not including the NULL-terminator -// -static TBrowserStatusCode getConvertedStringL(const NW_Ucs2* aString, - NW_HED_AppServices_t* appServices, - void * appCtx, - NW_Ucs2** convertedString, - NW_Uint32* convertedLen) -{ -NW_Ucs2* escapedString = NULL; -NW_Uint32 escapedLen = 0; -NW_Uint32 originalStringLen = NW_Str_Strlen(aString); -NW_Uint32 copyPos = 0; -NW_Uint32 convertPos = 0; -CBufFlat* buffer = CBufFlat::NewL(20); // arbitrary granularity. - -*convertedString = NULL; -*convertedLen = 0; - -NW_TRY( status ) - { - escapedLen = (3 * originalStringLen + 1); - escapedString = NW_Str_New(escapedLen); - NW_THROW_OOM_ON_NULL(escapedString, status); - - (void)NW_Mem_memset(escapedString, 0, escapedLen * sizeof(NW_Ucs2)); - - // protect the URL from thinking field-data is a delimiter character. - NW_Url_EscapeString(aString, escapedString); - - /* convert the value to foreign charset if necessary */ - if (appServices && appCtx) - { - NW_String_t text; - NW_Uint32 origEscapedLen = NW_Str_Strlen(escapedString); - - NW_Uint32 i = 0; - while (i < origEscapedLen) - { - // Each interation copies 1 ascii sub-string and/or - // converts 1 non-ascii sub string. - - // Copy ascii chars - copyPos = i; - while (i < origEscapedLen && escapedString[i] <= 127) - { - i++; - } - - if (i != copyPos) - { - buffer->InsertL(buffer->Size(), escapedString + copyPos, (i - copyPos) * sizeof(NW_Ucs2)); - } - - convertPos = i; - while (i < origEscapedLen && escapedString[i] > 127) - { - // gather non-ascii chars for conversion. - i++; - } - - if (i != convertPos) - { - // Need to convert foreign char string. - NW_Uint32 foreignLen = i - convertPos ; - NW_Ucs2* foreignString = NW_Str_New( foreignLen); - NW_Ucs2* transmitString = NULL; - - NW_Mem_memcpy( foreignString, escapedString + convertPos, foreignLen * sizeof(NW_Ucs2)); - foreignString[ foreignLen ] = 0; - - // convert the ucs2 into byte* from charset conversion process*/ - status = StatusCodeConvert(NW_String_ucs2CharToString (&text, foreignString, HTTP_iso_10646_ucs_2)); - NW_Mem_Free(foreignString); - NW_THROW_ON_ERROR(status); - - // convert to the foreign charset */ - status = appServices->characterConversionAPI.convertToForeignCharSet(appCtx, &text); - NW_THROW_ON_ERROR(status); - - // TODO: Apply Utf8 encoding here if appropriate. - - // Apply %HH encoding to the foreign charset string. - status = NW_Url_HHEscape((const char*)text.storage, &transmitString); - NW_String_deleteStorage(&text); - NW_THROW_ON_ERROR(status); - - buffer->InsertL(buffer->Size(), transmitString, NW_Str_Strsize(transmitString) - sizeof(NW_Ucs2)); - NW_Mem_Free(transmitString); - } - } - - buffer->Compress(); - *convertedLen = buffer->Size(); - *convertedString = NW_Str_New( *convertedLen ); - NW_THROW_OOM_ON_NULL( *convertedString, status ); - - NW_Mem_memcpy( *convertedString, buffer->Ptr(0).Ptr(), *convertedLen ); - } - else - { - NW_Uint32 charCount = NW_Str_Strlen(escapedString); - *convertedLen = charCount * sizeof(NW_Ucs2); - *convertedString = NW_Str_New(charCount); - NW_THROW_OOM_ON_NULL( *convertedString, status ); - NW_Str_Strcpy( *convertedString, escapedString); - } - } - -NW_CATCH( status ) - { - } - -NW_FINALLY - { - buffer->Reset(); - delete buffer; - NW_Str_Delete(escapedString); - return status; - } - -NW_END_TRY -} - -//TODO CHARSET: These character-handling functions should be in a common -//character translation module. Currently, this type of functionality is -//spread throughout the code rather than centralized where it can be more -//easily maintained and controlled. - -// ----------------------------------------------------------------------------- -// GetMaxTranscodedByteLength -// Gets the max number of bytes required to hold the transcoded version of the -// specified source string. This is not precise. It is an upper bounds. The -// actual transcoded string length may end up being less than this max length. -// @param aSrc Pointer to source string, for which the max transcoded length is -// determined. The source string must be HTTP_iso_10646_ucs_2. -// @param aHttpCharSet Char set to use for transcoding. -// @return Max number of bytes in the transcoded string. -// ----------------------------------------------------------------------------- -// -NW_Uint32 GetMaxTranscodedByteLength( const NW_Ucs2 *aSrc, - NW_Http_CharSet_t aHttpCharSet ) - { - NW_Uint32 len = 0; - - // Return 0 length for NULL pointer or empty string. - if ( ( aSrc == NULL ) || ( aSrc[0] == 0 ) ) - { - return len; - } - - // Get the length (in characters) of the UCS2 source string. - len = NW_Str_Strlen( aSrc ); - - // For performance reasons, the exact byte length is returned for a few - // simple and quick cases. For all the rest, an upper bounds is calculated - // as being 3 byte-sized chars per every UCS2 char. - switch ( aHttpCharSet ) - { - case HTTP_us_ascii: // 1 byte per char; length already set - case HTTP_iso_8859_1: - break; - case HTTP_iso_10646_ucs_2: // 2 bytes per char - len *= sizeof(NW_Ucs2); - break; - default: // upper bounds is 3 byte-sized chars per char - len *= 3; - break; - } - return len; - } - -// ----------------------------------------------------------------------------- -// TranscodeTo10646_ucs2 -// Transcodes from a UCS2 string to a UCS2 byte stream for HTTP posts, which -// results in changing the two-byte chars from little endian to big endian. -// @param aSrc Pointer to source string, which is to be transcoded. -// @param aDst Pointer to destination for the transcoded results. -// @return Pointer to the next available byte within the destination buffer. -// ----------------------------------------------------------------------------- -// -NW_Byte* TranscodeTo10646_ucs2( const NW_Ucs2* aSrc, NW_Byte* aDst ) -{ - while ( *aSrc ) - { - aDst += NW_Reader_WriteUcs2CharBuff( *aSrc, aDst); - aSrc++; - } - return aDst; -} - -// ----------------------------------------------------------------------------- -// Transcode -// Translates string from NW_Ucs2 to specified charset (does not append a -// null-terminator). -// @param aDst Pointer to destination into which transcoded string is returned. -// The size of the destination buffer should be large enough to contain the -// transcoded string and as such the buffer needs to be allocated large enough -// when it is created. -// @param aSrc Pointer to source string, which is to be transcoded into the -// destination. The source string must be HTTP_iso_10646_ucs_2. -// @param aHttpCharSet Pointer to charset name (e.g. "utf-8"). -// @param aBufLen Length of destination buffer (amount of space available for -// transcoded string). -// @param aByteLen Pointer at which the byte length of the transcoded string is -// returned. -// @return KBrsrSuccess: if success. -// KBrsrOutOfMemory: if out of memory. -// KBrsrFailure: any other failure. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode Transcode( NW_Byte *aDst, const NW_Ucs2 *aSrc, - NW_Http_CharSet_t aHttpCharSet, NW_Uint32 aBufLen, NW_Uint32* aByteLen ) - { - NW_String_t text; - NW_Uint32 srcByteLen; - - // Parameter assertion block. - NW_ASSERT( aDst ); - NW_ASSERT( aByteLen ); - - text.storage = NULL; - - // Initialize returned length to zero for now, in case an error occurs. - *aByteLen = 0; - - NW_TRY( status ) - { - - // If there is no source, just return. - if ( aSrc == NULL ) - { - NW_THROW( KBrsrSuccess ); - } - - srcByteLen = NW_Str_Strlen( aSrc ) * sizeof( NW_Ucs2 ); - - // Special case UCS2 for performance reasons - if both source and - // destination are UCS2 then no intermediate buffer needed. - if ( aHttpCharSet == HTTP_iso_10646_ucs_2 ) - { - // Verify that there is sufficient space for the text. - if ( srcByteLen > aBufLen ) - { - NW_THROW( KBrsrFailure ); - } - aDst = TranscodeTo10646_ucs2( aSrc, aDst ); - // Return the length of transcoded text in destination. - *aByteLen = srcByteLen; - NW_THROW( KBrsrSuccess ); - } - - // Allocate an intermediate buffer. All other char sets go through the - // transcoding methods which unfortunately require an intermediate - // buffer. - text.storage = (NW_Byte*)NW_Mem_Malloc( srcByteLen ); - NW_THROW_OOM_ON_NULL( text.storage, status ); - - // Copy the source into the intermediate buffer. - NW_Mem_memcpy( text.storage, aSrc, srcByteLen ); - text.length = srcByteLen; - - // Tanscode. Note, this assumes transcoding to original character set. -//TODO CHARSET: Make the API more flexible to take the charset as a parameter. - status = CShell::ConvertToForeignCharSet( &text ); - _NW_THROW_ON_ERROR( status ); - // Verify that there is sufficient space for the text. - if ( text.length > aBufLen ) - { - NW_THROW( KBrsrFailure ); - } - // Copy the transcoded text into the destination buffer. Note, the - // transcoded length always includes 2 null bytes. -//TODO CHARSET: Fix ConvertToForeignCharSet and any code that uses it to not -//use 2 extra null bytes. Not as easy as it sounds. That will lead into a -//tangled web. - NW_Mem_memcpy( aDst, text.storage, text.length - 2 ); - // Return the length of transcoded text in destination. - *aByteLen = text.length - 2; - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_String_deleteStorage( &text ); - return status; - } - NW_END_TRY - } - -/************************************************************************ - - Function: GetHttpCharsetAsAsciiText - - Description: Returns the string of the character set. - - Parameters: httpCharset - in: HTTP charset. - - Return Value: Pointer to the charset string. - -**************************************************************************/ -static const char* GetHttpCharsetAsAsciiText(NW_Http_CharSet_t httpCharset) -{ - switch (httpCharset) - { - case HTTP_utf_8: - return NW_Utf8_CharsetStr; - case HTTP_us_ascii: - return NW_UsAscii_CharsetStr; - case HTTP_iso_10646_ucs_2: - return NW_Iso10646Ucs2_CharsetStr; - case HTTP_windows_1255: - return NW_Windows1255_CharsetStr; - case HTTP_windows_1256: - return NW_Windows1256_CharsetStr; - case HTTP_windows_1250: - return NW_Windows1250_CharsetStr; - case HTTP_windows_1251: - return NW_Windows1251_CharsetStr; - case HTTP_windows_1253: - return NW_Windows1253_CharsetStr; - case HTTP_windows_1254: - return NW_Windows1254_CharsetStr; - case HTTP_windows_1257: - return NW_Windows1257_CharsetStr; - case HTTP_big5: - return NW_Big5_CharsetStr; - case HTTP_gb2312: - return NW_Gb2312_CharsetStr; - case HTTP_iso_8859_1: - return NW_Iso88591_CharsetStr; - case HTTP_iso_8859_2: - return NW_Iso88592_CharsetStr; - case HTTP_iso_8859_3: - return NW_Iso88593_CharsetStr; - case HTTP_iso_8859_4: - return NW_Iso88594_CharsetStr; - case HTTP_iso_8859_5: - return NW_Iso88595_CharsetStr; - case HTTP_iso_8859_6: - return NW_Iso88596_CharsetStr; - case HTTP_iso_8859_7: - return NW_Iso88597_CharsetStr; - case HTTP_iso_8859_8: - return NW_Iso88598_CharsetStr; - case HTTP_iso_8859_9: - return NW_Iso88599_CharsetStr; - case HTTP_tis_620: // not flagged because we will not get here unless tis_620 is enabled - return NW_Tis_620_CharsetStr; - case HTTP_shift_JIS: - return NW_ShiftJis_CharsetStr; - case HTTP_jis_x0201_1997: - return NW_JisX0201_1997_CharsetStr; - case HTTP_jis_x0208_1997: - return NW_JisX0208_1997_CharsetStr; - case HTTP_euc_jp: - return NW_EucJp_CharsetStr; - case HTTP_iso_2022_jp: - return NW_Iso2022Jp_CharsetStr; - case HTTP_windows_874: - return NW_Windows874_CharsetStr; - case HTTP_Koi8_r: - return NW_Koi8r_CharsetStr; - case HTTP_Koi8_u: - return NW_Koi8u_CharsetStr; - } - NW_ASSERT(NW_FALSE); - return NULL; /* Make compiler happy */ -} - -// ----------------------------------------------------------------------------- -// getPostDataCharset -// Gets the charset to be used for posting data. This is currently the encoding -// of the original document. -// @return Charset to be used or HTTP_iso_8859_1 if no known value. -// HTTP_iso_8859_1 was chosen as the "default" since it is a very common -// charset. -// ----------------------------------------------------------------------------- -// -static NW_Http_CharSet_t getPostdataCharset() - { - NW_Http_CharSet_t charset; - - charset = (NW_Http_CharSet_t)NW_Settings_GetOriginalEncoding(); - return ((charset == HTTP_unknown) || (charset == 0)) - ? (NW_Http_CharSet_t)HTTP_iso_8859_1 : charset; - } - - - -/************************************************************************ - - Function: getEscapedPostdata - - Description: Give a single url-encoded string containing all - the postfield data, in the form of - - "name1=value1&name2=value2&...&namen=valuen" - - Parameters: *postfields - pointer to the postfield data. - **escaped_postdata - pointer to the encoded string. - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - -**************************************************************************/ -//??? RFD: This section needs to be corrected along with the rest of the URL-encoding fixes underway. -static TBrowserStatusCode getEscapedPostdata(NW_NVPair_t *postfields, - NW_Ucs2 ** escapedPostdata, - NW_HED_AppServices_t* appServices, - void * appCtx) -{ - TBrowserStatusCode status = KBrsrFailure; - - TInt err; - TRAP(err, status = getEscapedPostdataL(postfields, escapedPostdata, appServices, appCtx)); - - return status; -} - -static TBrowserStatusCode getEscapedPostdataL(NW_NVPair_t *postfields, - NW_Ucs2 ** escapedPostdata, - NW_HED_AppServices_t* appServices, - void * appCtx) -{ - - NW_Ucs2 *name; - NW_Ucs2 *value; - NW_Ucs2* convertedName = NULL; - NW_Uint32 convertedNameLen = 0; - NW_Ucs2* convertedValue = NULL; - NW_Uint32 convertedValueLen = 0; - NW_Uint32 parameterLen = 0; - - const char* ie = "ie"; - const char* euc = "EUC-KR"; - NW_TRY( status ) - { - - - NW_ASSERT(escapedPostdata != NULL); - - *escapedPostdata = NULL; - - if ( NW_NVPair_IsEmpty(postfields) ) - { - // No postdata fields. Return an empty string for - // escaped_postdata. - *escapedPostdata = NW_Str_NewcpyConst( "" ); - return KBrsrSuccess; - } - - // set status to KBrsrSuccess because if the were only ie=EUC-KR as - // postdata we need to return KBrsrSuccess - status = KBrsrSuccess; - CBufFlat* buffer = CBufFlat::NewL(20); // arbitrary granularity. - NW_Bool needSep = NW_FALSE; - - (void) NW_NVPair_ResetIter( postfields ); - while ( KBrsrSuccess == (status = NW_NVPair_GetNext( postfields, &name, &value ))) - { - if ( 0 == NW_Str_StrnicmpConst( name, ie, NW_Str_Strlen( name ) ) && - 0 == NW_Str_StrnicmpConst( value, euc, NW_Str_Strlen( value ) ) ) - { - continue; - } - - if ( needSep ) - { - // append "&" delimiter, as Ucs2 - buffer->InsertL(buffer->Size(), WAE_URL_POSTFIELD_SEP, 2); - parameterLen++; - } - - // Each name and value pair needs to be escaped and/or converted to foreign charset. - - status = getConvertedStringL(name, appServices, appCtx, &convertedName, &convertedNameLen); - _NW_THROW_ON_ERROR( status ); - buffer->InsertL(buffer->Size(), convertedName, convertedNameLen); - NW_Mem_Free(convertedName); - convertedName = NULL; - - buffer->InsertL(buffer->Size(), "=", 2); // seperator is UCS2 - - status = getConvertedStringL(value, appServices, appCtx, &convertedValue, &convertedValueLen); - _NW_THROW_ON_ERROR( status ); - buffer->InsertL(buffer->Size(), convertedValue, convertedValueLen); - NW_Mem_Free(convertedValue); - convertedValue = NULL; - - needSep = NW_TRUE; - } - - parameterLen = buffer->Size(); - *escapedPostdata = (NW_Ucs2*) NW_Mem_Malloc(parameterLen + 2); - NW_Mem_memcpy( *escapedPostdata, buffer->Ptr(0).Ptr(), parameterLen); - (void)NW_Mem_memset( ((NW_Byte*)(*escapedPostdata)) + parameterLen, 0, 2 ); - buffer->Reset(); - delete buffer; - - } - - NW_CATCH( status ) - { - NW_Mem_Free(convertedName); - NW_Mem_Free(convertedValue); - - } - - NW_FINALLY - { - return status; - } - - NW_END_TRY -} - - -// ----------------------------------------------------------------------------- -// CreateBoundary -// Creates the boundary string that separates each part in the multipart post. -// The boundary string generated is fairly long and has some degree of -// randomness (by using a random number generator). This is to reduce the -// chance that the string generated could actually match any of the data being -// posted. Although highly unlikely, if it does match then the post would fail. -// If the user attempts to re-transmit, a new string will be generated and the -// post is highly likely to succeed. -// @param aBoundary Ptr to address into which the allocated boundary string -// is stored. The caller takes ownership of the allocated memory. -// @return KBrsrSuccess or KBrsrOutOfMemory. -// ----------------------------------------------------------------------------- -// -static TBrowserStatusCode CreateBoundary( NW_Uint8** aBoundary ) - { - // Allocate memory for the boundary string. - NW_Uint8* boundary = (NW_Uint8*)NW_Mem_Malloc( KBoundaryLen + 1 ); - *aBoundary = boundary; - if ( !boundary ) - { - return KBrsrOutOfMemory; - } - // Fill the boundary string with random numbers, converting the numbers to - // hex chars and inserting each char into the string. - NW_Uint8 n; - int random = 0; - for ( int i = 0; i < KBoundaryLen; i++ ) - { - if ( !random ) - { - random = rand(); - } - // Extract lower nibble. - n = (NW_Uint8)(random & 0x0F); - // Convert to ASCII hex. - n = (NW_Uint8)((n < 10) ? (n + '0') : ((n - 10) + 'A')); - // Shift right by a nibble. - random = (random >> 4) & 0x0FFFFFFF; - // Insert char. - *boundary++ = n; - } - // Null terminate. - *boundary = 0; - - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// GetMimeType -// Gets the mime-type string for a given file (E.g., "image/gif", etc.). -// @param aFileName Ptr to name of file for which to get the mime-type. -// @param aMimeTypeString Ptr to desination into which the newly allocated -// mime-type string is stored. The caller takes ownership of the allocated -// memory. -// @return KBrsrSuccess: if success. -// KBrsrOutOfMemory: if out of memory. -// KBrsrFailure: any other failure. -// ----------------------------------------------------------------------------- -// -static TBrowserStatusCode GetMimeType( - const NW_Ucs2* aFileName, TUint8** aMimeTypeString ) - { - TInt err; - TUid uid; - TDataType dataType; - RApaLsSession apaSession; - TBool apaSessionConnected = EFalse; - - // Parameter assertion block. - NW_ASSERT( aFileName != NULL ); - NW_ASSERT( aMimeTypeString != NULL ); - - *aMimeTypeString = NULL; - - NW_TRY( status ) - { - err = apaSession.Connect(); - if ( err ) - { - NW_THROW( (err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ); - } - apaSessionConnected = ETrue; - - // Ask the application architecture to find the file type. - TPtrC fileNamePtr( (const TUint16*)aFileName, - (TInt)NW_Str_Strlen( aFileName ) ); - - err = apaSession.AppForDocument( fileNamePtr, uid, dataType ); - if ( err ) - { - NW_THROW( (err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ); - } - - TPtrC8 dataTypePtr = dataType.Des8(); - TInt len = dataTypePtr.Length(); - - // If no mime-type yet, then use the default. - if ( !len ) - { - len = sizeof( KDefaultContentType ); - dataTypePtr.Set( KDefaultContentType, len ); - } - - // Allocate a buffer and return the mime-type in it. - len++; // +1 for NULL terminator - *aMimeTypeString = new TUint8 [len]; - if ( *aMimeTypeString == NULL ) - { - NW_THROW( KBrsrOutOfMemory ); - } - TPtr8 mimeTypeStringPtr( *aMimeTypeString, len ); - mimeTypeStringPtr.Copy( dataTypePtr ); - mimeTypeStringPtr.ZeroTerminate(); - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - if ( apaSessionConnected ) - { - apaSession.Close(); - } - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// GetMimeTypeSize -// Gets the number of characters in the mime-type string. -// @param aFileName Ptr to name of file for which to get the mime-type size. -// @param aSize Ptr to destination into which to return the size. -// @return KBrsrSuccess: if success. -// KBrsrOutOfMemory: if out of memory. -// KBrsrFailure: any other failure. -// ----------------------------------------------------------------------------- -// -static TBrowserStatusCode GetMimeTypeSize( - const NW_Ucs2* aFileName, NW_Uint32* aSize ) - { - TBrowserStatusCode status; - TUint8* mimeType; - - // Parameter assertion block. - NW_ASSERT( aFileName != NULL ); - NW_ASSERT( aSize != NULL ); - - *aSize = 0; // default - status = GetMimeType( aFileName, &mimeType ); - if ( status == KBrsrSuccess ) - { - *aSize = NW_Asc_strlen( (const char*)mimeType ); - delete mimeType; - } - return status; - } - -// ----------------------------------------------------------------------------- -// GetMultipartEntrySize -// Gets the upper bounds on the size of the multipart entry. The size returned -// may not be the exact size but it will be >= exact size. -// -// Each multipart entry is in one of two formats. One is for name/values and -// the other is for files: -// -// name/value: -// <cr><lf>--boundary<cr><lf> -// Content-Type: text/plain; charset=charsetString<cr><lf> -// Content-Disposition: form-data; name="name"<cr><lf> -// Content-Length: contentLength<cr><lf><cr><lf> -// {value here without the curly braces} -// -// files: -// <cr><lf>--boundary<cr><lf> -// Content-Disposition: form-data; name="name"; filename="d:\dir\filename.ext"<cr><lf><cr><lf> -// {contents of file without the curly braces} -// -// @param aName -// @param aValue -// @param aHttpCharSet -// @param aBoundary -// @param aFirst -// @param aSize -// @return -// ----------------------------------------------------------------------------- -// -static TBrowserStatusCode GetMultipartEntrySize( - const NW_Ucs2* aName, - const NW_Ucs2* aValue, - NW_Http_CharSet_t aHttpCharSet, - NW_Uint8* aBoundary, - TBool aFirst, - NW_Uint32* aSize ) - { - TBrowserStatusCode ret = KBrsrSuccess; - NW_Uint32 size = 0; - - // Parameter assertion block. - NW_ASSERT( aName != NULL ); - NW_ASSERT( aValue != NULL ); - NW_ASSERT( aBoundary != NULL ); - NW_ASSERT( aSize != NULL ); - - // Note, content length is not included in mime part header. Some sites - // do not work properly if included. Microsoft I.E. does not include one. - - // Get size of the boundary, common to all types of mime parts. - size = ( aFirst ) ? NW_Asc_strlen( NW_BOUNDARY_FIRST_START_STR ) : - NW_Asc_strlen( NW_BOUNDARY_START_STR ); - size += NW_Asc_strlen( (const char*)aBoundary ); - - // Add in the rest of the size; depends on type of mime part. - if ( NW_LoadReq_IsUploadFile( aValue ) ) - { - TInt err = KErrNone; - RFs rfs; - TBool rfsConnected = EFalse; - RFile file; - TBool fileOpened = EFalse; - TPtrC fileNamePtr( (TUint16*)aValue ); - TInt fileSize; - - NW_TRY( status ) - { -//TODO STREAMING: This is very in-efficient to connect every time and then to -//reconnect again later to read the file. This will be addressed in next phase -//with streaming implementation. - err = rfs.Connect(); - if ( err ) - { - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - rfsConnected = ETrue; - - err = file.Open( rfs, fileNamePtr, EFileRead | EFileShareExclusive | EFileStream ); - if ( err ) - { -//TODO STREAMING: Also look for missing file error returned. This too will -//change with streaming implementation. - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - fileOpened = ETrue; - - err = file.Size( fileSize ); - if ( err ) - { -//TODO STREAMING: What other errors should be checked? This too will -//change with streaming implementation. - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - - NW_Uint32 mimeTypeSize = 0; - status = GetMimeTypeSize( aValue, &mimeTypeSize ); - _NW_THROW_ON_ERROR( status ); - - NW_Uint32 mimeContentTypeSize = (mimeTypeSize) - ? mimeTypeSize + NW_Asc_strlen( NW_CONTENTTYPE_STR ) : 0; - - size += NW_Asc_strlen( NW_CONTENTDISPOSITION_STR ) - + NW_Str_Strlen( aName ) + 3 //+3 for quotes around name and a semicolon at end - + NW_Asc_strlen( NW_FILENAME_STR ) - + NW_Str_Strlen( aValue ) + 2 //+2 for quotes around filename - + mimeContentTypeSize - + NW_Asc_strlen( NW_HEADEREND_STR ) - + fileSize; - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - if ( fileOpened ) - { - file.Close(); - } - if ( rfsConnected ) - { - rfs.Close(); - } - ret = status; - } - NW_END_TRY - } - else - { - NW_Uint32 transcodedValueLength = GetMaxTranscodedByteLength( aValue, aHttpCharSet ); - size += NW_Asc_strlen( NW_CONTENTTYPE_TEXTPLAIN_CHARSET_STR ) - + NW_Asc_strlen( GetHttpCharsetAsAsciiText( aHttpCharSet ) ) - + NW_Asc_strlen( NW_CONTENTDISPOSITION_STR ) - + NW_Str_Strlen( aName ) + 2/*quotes around name*/ - + NW_Asc_strlen( NW_HEADEREND_STR ) - + transcodedValueLength; - } - - *aSize = (ret == KBrsrSuccess) ? size : 0; - return ret; - } - -// ----------------------------------------------------------------------------- -// GetMultipartSize -// Gets the upper bounds on the size of the multipart data. The size returned -// may not be the exact size but it will be >= exact size. -// @param aPostFields -// @param aHttpCharSet -// @param aBoundary -// @param aSize -// @return -// ----------------------------------------------------------------------------- -// -static TBrowserStatusCode GetMultipartSize( - NW_NVPair_t *aPostFields, - NW_Http_CharSet_t aHttpCharSet, - NW_Uint8* aBoundary, - NW_Uint32* aSize ) - { - NW_Ucs2 *name; - NW_Ucs2 *value; - TBrowserStatusCode status; - NW_Uint32 size; - NW_Uint32 partSize; - TBool first = ETrue; - - // Parameter assertion block. - NW_ASSERT( aPostFields != NULL ); - NW_ASSERT( aBoundary != NULL ); - NW_ASSERT( aSize != NULL ); - - size = 0; - NW_NVPair_ResetIter( aPostFields ); - while ( (status = NW_NVPair_GetNext( aPostFields, &name, &value )) == KBrsrSuccess ) - { - status = GetMultipartEntrySize( name, value, aHttpCharSet, aBoundary, - first, &partSize ); - if ( status != KBrsrSuccess ) - { - return status; - } - size += partSize; - first = EFalse; - } - - // Add the size of the ending boundary marker, plus one for null termination - size += NW_Asc_strlen(NW_BOUNDARY_START_STR) + - NW_Asc_strlen((const char*)aBoundary) + - NW_Asc_strlen(NW_BOUNDARY_END_STR) + 1; - - *aSize = size; - return KBrsrSuccess; - } - -static TBrowserStatusCode StorePart( NW_Uint8* aDataBuffer, NW_Uint32 len, - NW_Uint8* aBoundary, NW_Ucs2* aName, NW_Ucs2* aValue, - NW_Http_CharSet_t aHttpCharSet, TBool aFirst, - NW_Uint8** retPtr ) - { - TBrowserStatusCode ret = KBrsrSuccess; - char* curr = (char*)aDataBuffer; - NW_Ucs2* ptr; - NW_Uint32 neededLen; - NW_Uint32 byteLen = 0; - - // Store the boundary, common to all types of mime parts. - neededLen = NW_Asc_strlen( - ((aFirst) ? NW_BOUNDARY_FIRST_START_STR : NW_BOUNDARY_START_STR) ) - + NW_Asc_strlen( (char*)aBoundary ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - NW_Asc_strcpy( curr, - ((aFirst) ? NW_BOUNDARY_FIRST_START_STR : NW_BOUNDARY_START_STR) ); - NW_Asc_strcat( curr, (char*)aBoundary ); - curr += neededLen; - len -= neededLen; - - // Store the rest of the part; depends on type of mime part. - if ( NW_LoadReq_IsUploadFile( aValue ) ) - { - TInt err = KErrNone; - RFs rfs; - TBool rfsConnected = EFalse; - RFile file; - TBool fileOpened = EFalse; - TPtrC fileNamePtr( (TUint16*)aValue ); - TInt fileSize; - TUint8* mimeType = NULL; - - NW_TRY( status ) - { - // Append the content disposition. - neededLen = NW_Asc_strlen( NW_CONTENTDISPOSITION_STR ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - NW_Asc_strcpy( curr, NW_CONTENTDISPOSITION_STR ); - curr += neededLen; - - // Append the variable name, within quotes. - neededLen = NW_Str_Strlen( aName ) + 3; // +3 for two quotes and semicolon - if ( neededLen >= len ) - { - return KBrsrFailure; - } - *curr++ = '\"'; - ptr = aName; - while (*ptr != 0) - { - *curr++ = (char)*ptr; - ptr++; - } - *curr++ = '\"'; - *curr++ = ';'; // end it with a semicolon - len -= neededLen; - - // Append the file name tag. - neededLen = NW_Asc_strlen( NW_FILENAME_STR ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - NW_Asc_strcpy( curr, NW_FILENAME_STR ); - curr += neededLen; - len -= neededLen; - - // Append the actual file name, within quotes. - neededLen = NW_Str_Strlen( aValue ) + 2; // +2 for quotes - if ( neededLen >= len ) - { - return KBrsrFailure; - } - *curr++ = '\"'; - ptr = aValue; - while (*ptr != 0) - { - *curr++ = (char)*ptr; - ptr++; - } - *curr++ = '\"'; - len -= neededLen; - - // Append the ContentType if the mime-type is known. - status = GetMimeType( aValue, &mimeType ); - _NW_THROW_ON_ERROR( status ); - - if ( mimeType ) - { - neededLen = NW_Asc_strlen( NW_CONTENTTYPE_STR ) - + NW_Asc_strlen( (const char*)mimeType ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - NW_Asc_strcpy( curr, NW_CONTENTTYPE_STR ); - NW_Asc_strcat( curr, (const char*)mimeType ); - curr += neededLen; - len -= neededLen; - } - - // Append the header end. - neededLen = NW_Asc_strlen( NW_HEADEREND_STR ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - NW_Asc_strcpy( curr, NW_HEADEREND_STR ); - curr += neededLen; - len -= neededLen; - - // Append the contents of the file. - err = rfs.Connect(); - if ( err ) - { - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - rfsConnected = ETrue; - - err = file.Open( rfs, fileNamePtr, EFileRead | EFileShareExclusive ); - if ( err ) - { -//TODO STREAMING: Also look for missing file error returned. This too will -//change with streaming implementation. - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - fileOpened = ETrue; - - err = file.Size( fileSize ); - if ( err ) - { -//STREAMING: What other errors should be checked? This too will -//change with streaming implementation. - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - - neededLen = (NW_Uint32)fileSize; - if ( neededLen >= len ) - { - return KBrsrFailure; - } - - TPtr8 tmpPtr( (TUint8*)(curr), 0, fileSize ); - err = file.Read( tmpPtr ); - if ( err ) - { - NW_THROW_STATUS( status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure ) ); - } - - curr += neededLen; - len -= neededLen; - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - delete mimeType; - if ( fileOpened ) - { - file.Close(); - } - if ( rfsConnected ) - { - rfs.Close(); - } - } - ret = status; - NW_END_TRY - } - else - { - char* charSetAsText = (char*)GetHttpCharsetAsAsciiText( aHttpCharSet ); - - // Verify the length will not exceed remaining buffer length (not - // including transcoded data yet). - neededLen = NW_Asc_strlen( NW_CONTENTTYPE_TEXTPLAIN_CHARSET_STR ) - + NW_Asc_strlen( charSetAsText ) - + NW_Asc_strlen( NW_CONTENTDISPOSITION_STR ) - + NW_Str_Strlen( aName ) + 2 // +2 for quotes - + NW_Asc_strlen( NW_HEADEREND_STR ); - if ( neededLen >= len ) - { - return KBrsrFailure; - } - - // Append content type and disposition text. - NW_Asc_strcpy( curr, NW_CONTENTTYPE_TEXTPLAIN_CHARSET_STR ); - NW_Asc_strcat( curr, charSetAsText ); - NW_Asc_strcat( curr, NW_CONTENTDISPOSITION_STR ); - curr = curr + NW_Asc_strlen( curr ); - // Append variable name to end of content disposition, within quotes. - *curr++ = '\"'; - ptr = aName; - while (*ptr != 0) - { - *curr++ = (char)*ptr; - ptr++; - } - *curr++ = '\"'; - // Append the header end. - NW_Asc_strcpy( curr, NW_HEADEREND_STR ); - curr = curr + NW_Asc_strlen( curr ); - - // Adjust available buffer length. - len -= neededLen; - - // Append the data. - ret = Transcode( (NW_Uint8*)curr, aValue, aHttpCharSet, len, &byteLen ); - if ( ret != KBrsrSuccess ) - { - if ( ret != KBrsrOutOfMemory ) - { - ret = KBrsrFailure; - } - } - else - { - curr += byteLen; - } - } - - *retPtr = (NW_Uint8*)curr; - return ret; - } - -/***************************************************************** - - Name: BuildMultipartBody - - Description: - Allocate and create a multipart/form-data encoded body for the - postfields. - - Parameters: - aBuffer - out: multipart/form-data encoded postfield body - aPostFields - in: postfields to encode. - aCharset - in: character set to encode the postfield values. - aBoundary - out: boundary value that separates each part; caller - must deallocate regardless of status returned! - - Return Value: - KBrsrSuccess - KBrsrOutOfMemory - KBrsrFailure - -******************************************************************/ -static TBrowserStatusCode BuildMultipartBody( - NW_Buffer_t** aBuffer, - NW_NVPair_t* aPostFields, - const NW_Http_CharSet_t aCharset, - NW_Uint8** aBoundary) - { - NW_Uint32 len; - NW_Byte* p; - NW_Byte* newP; - NW_Ucs2* name; - NW_Ucs2* value; - TBrowserStatusCode status; - - NW_ASSERT( aBuffer != NULL ); - NW_ASSERT( aBoundary != NULL ); - - *aBoundary = NULL; - - status = CreateBoundary( aBoundary ); - if ( status != KBrsrSuccess ) - { - return status; - } - - // Calculate the length of the multipart data. This will be used to - // allocate a buffer to contain the actual data. Note, the length - // is an upper bounds and not necessarily the exact length. - status = GetMultipartSize( aPostFields, aCharset, *aBoundary, &len ); - if ( status != KBrsrSuccess ) - { - return status; - } - NW_ASSERT( len != 0 ); - - // Allocate the buffer for the multipart data. - *aBuffer = NW_Buffer_New( len ); - if ( *aBuffer == NULL) - { - return KBrsrOutOfMemory; - } - - // Insert the multipart content into the buffer. The length was - // determined above; however, remaining length is tracked to make sure - // nothing has changed (like the length of the files) since the time it - // was determined. Tracking the length also provides a sanity check. - p = (*aBuffer)->data; - TBool first = ETrue; - (void)NW_NVPair_ResetIter( aPostFields ); - while ( (status = NW_NVPair_GetNext( aPostFields, &name, &value )) == KBrsrSuccess ) - { - status = StorePart( p, len, *aBoundary, name, value, aCharset, first, &newP ); - if ( status != KBrsrSuccess ) - { - return status; - } - len -= (newP - p); - p = newP; - first = EFalse; - } - - // Make sure there is enough space for ending boundary marker and a null. - NW_Uint32 endingLen = NW_Asc_strlen( NW_BOUNDARY_START_STR ) - + NW_Asc_strlen( (char*)*aBoundary ) - + NW_Asc_strlen( NW_BOUNDARY_END_STR ); - // Add one to make sure there is enough space for the null terminator. - if ( (endingLen + 1) > len ) - { - return KBrsrFailure; - } - - // Add the ending boundary marker and final null terminator. - NW_Asc_strcpy( (char*)p, NW_BOUNDARY_START_STR ); - NW_Asc_strcat( (char*)p, (char*)*aBoundary ); - NW_Asc_strcat( (char*)p, NW_BOUNDARY_END_STR ); - - p += endingLen; - - // Set length in the destination buffer to actual amount of data stored. - (*aBuffer)->length = p - (*aBuffer)->data; - - return KBrsrSuccess; - } - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -TBrowserStatusCode NW_LoadReq_Create ( const NW_Ucs2 *url, - const NW_Bool postMethodFlag, - const NW_Ucs2 *referer, - const NW_Ucs2 *acceptCharset, - NW_NVPair_t *postfields, - const NW_Ucs2 *enctype, - const NW_Http_CharSet_t docCharset, - NW_Http_Header_t **header, - NW_Ucs2** resultUrl, - NW_Uint8* method, - NW_Buffer_t** body, - NW_HED_AppServices_t* appServices, - void * appCtx) -{ - TBrowserStatusCode status = KBrsrSuccess; - char* content = NULL; - NW_Http_CharSet_t httpCharset; - NW_Ucs2* escapedPostdata = NULL; - NW_Ucs2* convertedPostdata = NULL; - NW_Uint8* boundary = NULL; - - NW_REQUIRED_PARAM(acceptCharset); - NW_REQUIRED_PARAM(docCharset); - - NW_ASSERT(url != NULL); - - /* Start with empty return values. */ - *resultUrl = NULL; - *method = 0; - *body = NULL; - - /* validate enctype */ - if ( enctype != NULL ) { - if ( postMethodFlag ) { - if ( NW_Str_StricmpConst(enctype, NW_URLENCODED_TYPE_STR) - && NW_Str_StricmpConst(enctype, NW_MULTIPART_TYPE_STR) ) - return KBrsrWmlbrowserBadContent; - } else { - if ( NW_Str_StricmpConst(enctype, NW_URLENCODED_TYPE_STR) ) - return KBrsrWmlbrowserBadContent; - } - } - - /* Get charset to use for the postdata. */ - httpCharset = getPostdataCharset(); - if (httpCharset == HTTP_unknown) { - return KBrsrUnsupportedFormCharset; - } - - if ( postMethodFlag ) { - *resultUrl = NW_Str_Newcpy(url); - if (*resultUrl == NULL) { - goto OutOfMemory; - } - - if ( NW_LoadReq_IsMultipart( enctype ) ) { - - /* post method and multipart/form-data body */ - status = BuildMultipartBody(body, postfields, httpCharset, &boundary); - if (status != KBrsrSuccess) { - goto OutOfMemory; - } - if (*header == NULL) { - *header = UrlLoader_HeadersNew(NULL, - (const unsigned char *)NW_MULTIPART_TYPE_STR, - referer, boundary, (*body)->length, NULL); - } - - if (*header == NULL) { - goto OutOfMemory; - } - - } else { -//??? RFD: This section needs to be corrected along with the rest of the URL-encoding fixes underway. - /* post method and url-encoded body */ - status = getEscapedPostdata(postfields, &escapedPostdata, appServices, appCtx); - if (status != KBrsrSuccess) - goto OutOfMemory; - /* first process the post data to corrected formatted and escaped */ - status = NW_Url_ConvertUnicode( escapedPostdata, &convertedPostdata ); - if (status != KBrsrSuccess) - goto OutOfMemory; - - /* convert the post data from NW_Ucs2 to ascii */ - content = NW_Str_CvtToAscii(convertedPostdata); - if (content == NULL) { - goto OutOfMemory; - } - - /* Create a buffer and insert the content */ - *body = NW_Buffer_New(0); - if (*body == NULL) { - goto OutOfMemory; - } - NW_Buffer_SetData(*body, content); - - /* Remove the null-terminator. */ - (*body)->length -= 1; - if (*header == NULL) { - *header = UrlLoader_HeadersNew(NULL, (const unsigned char *)NW_URLENCODED_TYPE_STR, - referer, boundary, (*body)->length, NULL); - } - - if (*header == NULL) { - goto OutOfMemory; - } - } - } else { - /* GET method */ - /* Don't add Content-Type to GET methods - there is no content */ - /* Create header because the caller expects a header to be created here */ - if (*header == NULL) { - *header = UrlLoader_HeadersNew(NULL, NULL, referer, NULL, 0, NULL); - } - - if (*header == NULL) { - goto OutOfMemory; - } - status = NW_LoadReq_BuildQuery(url, postfields, resultUrl, appServices, appCtx); - if (status != KBrsrSuccess) { - goto OutOfMemory; - } - } - - /* no longer add accept-charsets as headers */ - /* Do the load */ - if ( postMethodFlag ) { - *method = NW_UINT8_CAST(NW_URL_METHOD_POST); - } else { - *method = NW_UINT8_CAST(NW_URL_METHOD_GET); - } - - /* cleanup and return normally */ - NW_Str_Delete(escapedPostdata); - NW_Str_Delete(convertedPostdata); - NW_Mem_Free(boundary); - return status; - - /* - * clean up and return from KBrsrOutOfMemory errors - * Note: NW_Http_Header_Free(), NW_Mem_Free(), NW_Buffer_Free(), - * and NW_Str_Delete() all handle NULL pointers - */ -OutOfMemory: - - NW_Mem_Free(boundary); - NW_Str_Delete(escapedPostdata); - NW_Str_Delete(convertedPostdata); - NW_Mem_Free(content); - UrlLoader_HeadersFree(*header); - *header = NULL; - NW_Str_Delete(*resultUrl); - *resultUrl = NULL; - NW_Buffer_Free(*body); - *body = NULL; - - return KBrsrOutOfMemory; -} - -TBrowserStatusCode NW_LoadReq_BuildQuery(const NW_Ucs2 *url, - NW_NVPair_t *postfields, - NW_Ucs2 **resultUrl, - NW_HED_AppServices_t * appServices, - void * appCtx) -{ - NW_Uint32 len; - NW_Ucs2 *reqUrl = NULL; - NW_Ucs2 *frag = NULL; - NW_Ucs2 *base = NULL; - NW_Ucs2 *pQuery = NULL; - NW_Ucs2 *escapedPostdata = NULL; - TBrowserStatusCode status; - TBrowserStatusCode getQueryStatus; - - NW_ASSERT(url != NULL); - NW_ASSERT(resultUrl != NULL); - - len = NW_Str_Strlen(url) + 1; - status = getEscapedPostdata(postfields, &escapedPostdata, appServices, appCtx); - if (status != KBrsrSuccess) - return status; - - if ((status = NW_Url_GetBase(url, &base)) != KBrsrSuccess) - { - NW_Str_Delete(escapedPostdata); - return status; - } - /* At this point, getQueryStatus cannot be KBrsrMalformedUrl. - If it was the case it would be detected earlier by NW_Url_GetBase() - */ - getQueryStatus = NW_Url_GetQuery(url, &pQuery); - - /* We should free the pQuery - nobody uses it */ - NW_Str_Delete(pQuery); - pQuery = NULL; - - status = NW_Url_GetFragId(url, &frag, NW_FALSE); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE means url had no fragment - not a fatal error */ - { - NW_Str_Delete(escapedPostdata); - return status; - } - - len += NW_Str_Strlen(escapedPostdata) + 1; - if (frag) - len += NW_Str_Strlen(frag); - - reqUrl = NW_Str_New(len); - if (reqUrl == NULL) - { - NW_Str_Delete(escapedPostdata); - return KBrsrOutOfMemory; - } - - NW_Str_Strcpy(reqUrl, base); - - /* Prevent a separator to be added to the end of string. - Prevent the WAE_URL_QUERY_SEP to be applied when Url - has the query field: http://www.foo.com/mywml.wml?pf=ONE - */ - if ( ! NW_NVPair_IsEmpty(postfields) ) - { - if (getQueryStatus == KBrsrSuccess) { - NW_Str_StrcatConst(reqUrl, WAE_URL_POSTFIELD_SEP); - } else { - NW_Str_StrcatConst(reqUrl, WAE_URL_QUERY_SEP); - } - } - - NW_Str_Strcat(reqUrl, escapedPostdata); - - if (frag) - { - NW_Str_StrcatConst(reqUrl, WAE_URL_FRAG_SEP); - NW_Str_Strcat(reqUrl, frag); - NW_Str_Delete(frag); - } - - NW_Str_Delete(base); - NW_Str_Delete(escapedPostdata); - - *resultUrl = reqUrl; - return KBrsrSuccess; -} - -// ----------------------------------------------------------------------------- -// NW_LoadReq::IsMultipart -// Checks the encoding type to see if it is for a multipart request. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_Bool NW_LoadReq_IsMultipart( const NW_Ucs2 *aEncodingType ) - { - NW_Bool ret = NW_FALSE; - if ( aEncodingType ) - { - if ( NW_Str_StricmpConst( aEncodingType, NW_MULTIPART_TYPE_STR ) == 0 ) - { - ret = NW_TRUE; - } - } - return ret; - } - -//TODO STREAMING: Modify the way in which filenames are handled. The current -//implementation is a quick, short-term solution. This is going to change -//with streaming implementation. -// ----------------------------------------------------------------------------- -// NW_LoadReq::IsUploadFile -// Determines whether or not the current part of the multipart post is for a -// file to be uploaded or not. -// (Other items are commented in header.) -// ----------------------------------------------------------------------------- -// -NW_Bool NW_LoadReq_IsUploadFile( const NW_Ucs2 *aValue ) - { - // Checks file name to see if it starts with "C:\" or E:\". - if ( aValue ) - { - if ( (NW_Str_Strnicmp( aValue, KCDrivePrefix, NW_Str_Strlen( KCDrivePrefix ) ) == 0) - || (NW_Str_Strnicmp( aValue, KEDrivePrefix, NW_Str_Strlen( KEDrivePrefix ) ) == 0) ) - { - return NW_TRUE; - } - } - return NW_FALSE; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nw_nvpair.c --- a/webengine/wmlengine/src/utils/src/nw_nvpair.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* -**------------------------------------------------------------------------- -** Component Generic Include -**------------------------------------------------------------------------- -*/ -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" - -/* -**------------------------------------------------------------------------- -** Module Specific Includes -**------------------------------------------------------------------------- -*/ -#include "nw_nvpair.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/* WMLScript Spec 6.1.6 Identifiers */ -NW_Bool NW_CheckName(const NW_Ucs2* name) -{ - const NW_Ucs2 *pChar = name; - - NW_ASSERT(name != NULL); - if (!NW_Str_Isalpha(*name) && (*name != WAE_URL_UNDER_CHAR)) - { - return NW_FALSE; - } - - while (*pChar != 0) { - if (!NW_Str_Isalnum(*pChar) && (*pChar != WAE_URL_UNDER_CHAR)) - { - return NW_FALSE; - } else { - pChar++; - } - } - - return NW_TRUE; -} - -NW_NVPair_t* NW_NVPair_New (void) -{ - NW_NVPair_t* thisObj; - - thisObj = (NW_NVPair_t*) NW_Mem_Malloc( sizeof(NW_NVPair_t) ); - if ( thisObj != NULL) { - NW_Mem_memset( thisObj, 0, sizeof(NW_NVPair_t) ); - } - - return thisObj; -} - -void NW_NVPair_Delete (NW_NVPair_t* thisObj) -{ - if ( thisObj == NULL ) { - return; - } - - if ( thisObj->strTable != NULL ) { - NW_Mem_Free( thisObj->strTable ); - thisObj->strTable = NULL; - } - - NW_Mem_Free( thisObj ); -} - -NW_Bool NW_NVPair_IsEmpty (NW_NVPair_t* thisObj) -{ - return NW_BOOL_CAST(( thisObj == NULL ) || ( thisObj->size == 0 )); -} - - -TBrowserStatusCode NW_NVPair_CalSize (NW_NVPair_t* thisObj, - const NW_Ucs2* name, - const NW_Ucs2* value) -{ - NW_Uint32 len; - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( thisObj->iterPtr == NULL ); - NW_ASSERT( thisObj->strTable == NULL ); - NW_ASSERT( name != NULL ); - - if (name[0] == '\0') { - - return KBrsrSuccess; - } - - thisObj->size = thisObj->size + NW_Str_Strlen( name ) + 1; - - /* Treat NULL pointer as an empty string (""). */ - len = ( value == NULL ) ? 1 : (NW_Str_Strlen(value) + 1); - thisObj->size = thisObj->size + len; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_NVPair_AllocStorage (NW_NVPair_t* thisObj) -{ - NW_Ucs2* storage; - NW_Uint32 byteCnt; - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( thisObj->iterPtr == NULL ); - NW_ASSERT( thisObj->strTable == NULL ); - /* Require an empty structure or at least 1 name-value pair. */ - NW_ASSERT( (thisObj->size == 0) || ( thisObj->size >= 3)); - - /* Allow an empty structure. */ - if ( thisObj->size == 0 ) { - return KBrsrSuccess; - } - - byteCnt = thisObj->size * sizeof (NW_Ucs2); - storage = (NW_Ucs2*) NW_Mem_Malloc( byteCnt ); - if (storage == NULL) { - return KBrsrOutOfMemory; - } - - /* Zero out structure. */ - NW_Mem_memset( storage, 0, byteCnt ); - - thisObj->iterPtr = storage; - thisObj->strTable = storage; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_NVPair_Add (NW_NVPair_t* thisObj, - const NW_Ucs2* name, - const NW_Ucs2* value) -{ - NW_Uint32 len; - NW_Int32 strTableLen; - - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( thisObj->iterPtr != NULL ); - NW_ASSERT( thisObj->strTable != NULL ); - NW_ASSERT( name != NULL ); - - /* WML Spec says that the name is required - If name is NULL, do not add this pair*/ - if (name[0] == '\0') { - return KBrsrSuccess; - } - - len = NW_Str_Strlen( name ) + 1; - strTableLen = thisObj->iterPtr - thisObj->strTable; - NW_ASSERT( strTableLen >= 0 ); - if ( (NW_UINT32_CAST(strTableLen) + len) > thisObj->size ) { - return KBrsrBufferTooSmall; - } - NW_Str_Strcpy( thisObj->iterPtr, name ); - thisObj->iterPtr += len; - - /* Treat null pointer for value as empty string (""). */ - len = (value == NULL) ? 1 : NW_Str_Strlen( value ) + 1; - strTableLen = thisObj->iterPtr - thisObj->strTable; - NW_ASSERT( strTableLen >= 0 ); - if ( (NW_UINT32_CAST(strTableLen) + len) > thisObj->size ) { - return KBrsrBufferTooSmall; - } - - if ( value == NULL) { - /* Store NULL pointer as empty string (""). */ - thisObj->iterPtr[0] = 0; - } else { - NW_Str_Strcpy( thisObj->iterPtr, value ); - } - thisObj->iterPtr += len; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_NVPair_ResetIter (NW_NVPair_t* thisObj) -{ - if ( thisObj == NULL ) { - /* Treat NULL pointer like an empty object. */ - return KBrsrSuccess; - } - thisObj->iterPtr = thisObj->strTable; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_NVPair_GetNext (NW_NVPair_t* thisObj, NW_Ucs2** name, - NW_Ucs2** value) -{ - NW_Int32 strTableLen; - - NW_ASSERT( name != NULL ); - NW_ASSERT( value != NULL ); - - *name = NULL; - *value = NULL; - - if ( thisObj == NULL ) { - /* Treat NULL pointer like an empty object. */ - return KBrsrNotFound; - } - - NW_ASSERT( thisObj->iterPtr != NULL ); - NW_ASSERT( thisObj->strTable != NULL ); - - - strTableLen = thisObj->iterPtr - thisObj->strTable; - NW_ASSERT( strTableLen >= 0 ); - if ( NW_UINT32_CAST(strTableLen) >= thisObj->size ) { - return KBrsrNotFound; - } - - /* Require that name is not an empty string (""). */ - NW_ASSERT( thisObj->iterPtr[0] != 0 ); - - *name = thisObj->iterPtr; - thisObj->iterPtr += (NW_Str_Strlen( thisObj->iterPtr ) + 1); - - /* Must be value if found name because always insert in pairs. */ - strTableLen = thisObj->iterPtr - thisObj->strTable; - NW_ASSERT( ( strTableLen >= 0 ) && - ( NW_UINT32_CAST(strTableLen) < thisObj->size ) ); - - *value = thisObj->iterPtr; - thisObj->iterPtr += (NW_Str_Strlen( thisObj->iterPtr ) + 1); - - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_assert.c --- a/webengine/wmlengine/src/utils/src/nwx_assert.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_assert.c -** Description: Provides re[placement for assert -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <e32def.h> -/*lint --e{1065} Symbol not declared as "C" conflicts */ - -// Debug builds use the _BREAKPOINT() macro provided by E32def.h -// It provides complier-specific assembly instructions for Wins and WinsCW. -// We use this function in the NW_ASSERT macro, because raw assembly generates a syntax error. - -#if defined(__WINS__) -int kimono_assert (void) -{ -#ifdef _DEBUG - __BREAKPOINT() -#endif - return 0; -} -#endif // WINS diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_buffer.c --- a/webengine/wmlengine/src/utils/src/nwx_buffer.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,264 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: NW_Buffer.c -** Part of: Buffer -** Version: 3/16/99 Initial version -** Description: Provides the interface to a managerd buffer of bytes. -** The buffer contains an allocated size and an in use -** size (length) and also a pointer to a data array. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_buffer.h" -#include "nwx_mem.h" -#include "nwx_assert.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static TBrowserStatusCode Resize_Data(NW_Buffer_t *buffer, const NW_Uint32 len) -{ - void *temp; - - if (buffer->allocatedLength < len) { - temp = NW_Mem_Malloc(len); - if (temp == NULL) - return KBrsrOutOfMemory; - NW_Mem_Free(buffer->data); - buffer->length = 0; - buffer->allocatedLength = len; - buffer->data = (NW_Byte*) temp; - } - return KBrsrSuccess; -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Buffer_New -** Description: creates a new buffer -** Parameters: size - size to allocate -** Return Value: pointer to the new buffer -******************************************************************/ -NW_Buffer_t *NW_Buffer_New(const NW_Uint32 size) -{ - NW_Buffer_t *buffer; - - buffer = (NW_Buffer_t*) NW_Mem_Malloc(sizeof(NW_Buffer_t)); - if (buffer != NULL) { - buffer->length = 0; - buffer->allocatedLength = size; - buffer->data = NULL; - if (size > 0) { - buffer->data = (NW_Byte*) NW_Mem_Malloc(size); - if (buffer->data == NULL) { - NW_Mem_Free(buffer); - return NULL; - } - } - } - return buffer; -} - -/***************************************************************** -** Name: NW_Buffer_Free -** Description: frees the space allocated for a buffer -** Parameters: *buffer - the buffer to free -** Return Value: void -******************************************************************/ -void NW_Buffer_Free(NW_Buffer_t *buffer) -{ - if (buffer != NULL) { - if (buffer->data != NULL) { - NW_Mem_Free(buffer->data); - buffer->data = NULL; - } - NW_Mem_Free(buffer); - } - return; -} - -/***************************************************************** -** Name: NW_Buffer_FreeNotData -** Description: free the space allocated for a buffer. -** Parameters: *buffer - the buffer to free -** Return Value: void -** Notes: This does not free the data -******************************************************************/ -void NW_Buffer_FreeNotData(NW_Buffer_t *buffer) -{ - if (buffer != NULL) { - buffer->data = NULL; - NW_Mem_Free(buffer); - } - return; -} - -/***************************************************************** -** Name: NW_Buffer_CopyStr -** Description: Copy NULL terminated string into buffer and adjust -** length. If necessary, reallocate space. -** Parameters: *buffer - the buffer to copy to -** *str - the string to copy from -** Return Value: KBrsrSuccess if succeeds, else KBrsrOutOfMemory -******************************************************************/ -TBrowserStatusCode NW_Buffer_CopyStr(NW_Buffer_t *buffer, const NW_Ucs2 *str) -{ - NW_Uint16 len; - - NW_ASSERT(buffer != NULL); - NW_ASSERT(str != NULL); - - len = (NW_Uint16)NW_Str_Strsize(str); - if (Resize_Data(buffer, len) == KBrsrOutOfMemory) - return KBrsrOutOfMemory; - NW_Mem_memcpy(buffer->data, str, len); - buffer->length = len; - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Buffer_CopyBuffers -** Description: Copy NW_Buffer into buffer (NW_Buffer) -** and adjust length. If necessary, reallocate space. -** Parameters: *to - the buffer to copy to -** *from - the buffer to copy from -** Return Value: KBrsrSuccess if succeeds, else KBrsrOutOfMemory -******************************************************************/ -TBrowserStatusCode NW_Buffer_CopyBuffers(NW_Buffer_t *to, const NW_Buffer_t *from) -{ - NW_ASSERT(to != NULL); - NW_ASSERT(from != NULL); - - if (Resize_Data(to, from->length) == KBrsrOutOfMemory) - return KBrsrOutOfMemory; - NW_Mem_memcpy(to->data, from->data, from->length); - to->length = from->length; - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Buffer_AppendBuffers -** Description: Append NW_Buffer into buffer (NW_Buffer) -** and adjust length. If necessary, reallocate space. -** Parameters: *to - the buffer to copy to -** *from - the buffer to copy from -** Return Value: KBrsrSuccess if succeeds, else KBrsrOutOfMemory -******************************************************************/ -TBrowserStatusCode NW_Buffer_AppendBuffers(NW_Buffer_t *to, const NW_Buffer_t *from) - { - NW_ASSERT( to != NULL ); - NW_ASSERT( from != NULL ); - - if( to->allocatedLength < to->length + from->length ) - { - void* temp; - // resize - temp = NW_Mem_Malloc( to->length + from->length ); - if( temp == NULL ) - { - return KBrsrOutOfMemory; - } - // copy old buffer - NW_Mem_memcpy( temp, to->data, to->length ); - // free old buffer - NW_Mem_Free( to->data ); - // set new buffer - to->data = (NW_Byte*)temp; - to->allocatedLength = to->length + from->length; - } - NW_Mem_memcpy( to->data + to->length, from->data, from->length ); - to->length = to->length + from->length; - return KBrsrSuccess; - } - -/***************************************************************** -** Name: NW_Buffer_SetData -** Description: Set NULL terminated ascii string into buffer and -** adjust length. -** Parameters: *buffer - the buffer to copy to -** *str - the string to set into buffer -** Return Value: void -******************************************************************/ -void NW_Buffer_SetData(NW_Buffer_t *buffer, char *str) -{ - NW_Uint32 len; - - NW_ASSERT(buffer != NULL); - NW_ASSERT(str != NULL); - - if(buffer->data != NULL) { - NW_Mem_Free(buffer->data); - } - len = (NW_Asc_strlen(str) + 1) * sizeof(char); - buffer->length = len; - buffer->allocatedLength = len; - buffer->data = (NW_Byte *)str; - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_cleanup_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_cleanup_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides the interface to a manager of context pointer for - multiple components. -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <e32std.h> -#include <e32svr.h> - -#include "nwx_defs.h" -#include "nwx_cleanup_epoc32.h" -#include "nwx_ctx.h" -#include "nw_wae.h" -#include "nwx_psq.h" -#include "nwx_msg_dsp_api_epoc32.h" -#include "nwx_math.h" -#include "CBrowserSettings.h" -#include "nwx_ctx_epoc32.h" -#include "nwx_osu_epoc32.h" -#include "nwx_logger.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - - - -/***************************************************************** - Name: NW_Cleanup() - Description: Deletes the rainbow data elements. - Parameters: - Return Value: KBrsrSuccess -******************************************************************/ -TBrowserStatusCode NW_Cleanup() -{ - void* ctx; - - /* Epoc Shutdown */ - NW_Msg_Shutdown(); - NW_Msg_DispatcherShutdown(); - - Math_ContextFree(); - - ctx = NW_Ctx_Get(NW_CTX_SCRIPT, 0); - NW_Mem_Free(ctx); - NW_Ctx_Set(NW_CTX_SCRIPT, 0, NULL); - - ctx = NW_Ctx_Get(NW_CTX_SCR_FUNC_TAB, 0); - NW_Mem_Free(ctx); - NW_Ctx_Set(NW_CTX_SCR_FUNC_TAB, 0, NULL); - - ctx = NW_Ctx_Get(NW_CTX_SCR_SERVER, 0); - NW_Mem_Free(ctx); - NW_Ctx_Set(NW_CTX_SCR_SERVER, 0, NULL); - - ctx = NW_Ctx_Get(NW_CTX_MEM_SEG, 0); - NW_Mem_Free(ctx); - NW_Ctx_Set(NW_CTX_MEM_SEG, 0, NULL); - - CBrowserSettings* settings = (CBrowserSettings*) NW_Ctx_Get(NW_CTX_SETTINGS, 0); - delete settings; - NW_Ctx_Set(NW_CTX_SETTINGS, 0, NULL); - - NW_Osu_DeleteContext(); - -#ifdef FEATURE_MEMORY_PROFILE - SendStringToLogger1((char *) NULL); -#endif - NW_LOG_CLOSELOGGER(); - - NW_Ctx_DeleteBrowserContext(); - - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_ctx_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_ctx_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* -* Copyright (c) 1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_ctx.cpp -** Purpose: Provides the interface to a manager of context pointer for - multiple components. - On Epoc32 we use thread local storage to maintain the - context arrays. -**************************************************************************/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <e32std.h> -#include <eikenv.h> - -#include "nwx_ctx_epoc32.h" -#include "nwx_mem.h" -#include "nwx_defs_symbian.h" -#include "urlloader_urlloaderint.h" -#include "nw_object_exceptions.h" -#include "BrsrStatusCodes.h" - - -/***************************************************************** - - Name: NW_Ctx_GetBrowserIndex() - - Description: Get the index of the current browser's context. - A context is init'ed if one doesn't exist. - - Parameters: The index. - - Return Value: KBrsrSuccess or KBrsrOutOfMemory - -******************************************************************/ -static TBrowserStatusCode NW_Ctx_GetBrowserIndex(NW_ContextArray_t** aContextArray, - NW_Uint16* aIndex) -{ - NW_ContextArray_t* contextArray = NULL; - void* appInst = NULL; - NW_Int16 contextIndex; - NW_Uint16 i; - - //lint -e{429} Custodial pointer has not been freed or returned - - NW_ASSERT(aContextArray != NULL); - NW_ASSERT(aIndex != NULL); - - NW_TRY(status) - { - // If need be, initialize the context manager. - contextArray = (NW_ContextArray_t*) Dll::Tls(); - - if (contextArray == NULL) - { - contextArray = (NW_ContextArray_t*) malloc(sizeof(NW_ContextArray_t)); - NW_THROW_OOM_ON_NULL(contextArray, status); - - NW_Mem_memset(contextArray, 0x00, sizeof(NW_ContextArray_t)); - - // Store the array in TLS. - Dll::SetTls(contextArray); - } - - // Get the current instance of browser. - // TODO: The idea of using the App UI pointer to identify the browser - // context isn't valid. For example, consider when the browser is used by the - // the media player to download a image. In this case the context is created - // when the browser UI is active, but after a image is downloaded and passed to - // the media-player the player is the active UI. While the media-player is still the - // front-most application the browser then "resumes" the document. This doesn't - // work of course because it fetches the App UI pointer of the media-player - // instead of the browser therefore it can't access its singleton data from the - // context and fails. - - // appInst = STATIC_CAST( void*, CEikonEnv::Static()->EikAppUi()); - appInst = (void *) 1L; - - // Search the uniqueNum for the inst. - contextIndex = -1; - for (i = 0; i < NW_NUM_INSTANCES; i++) - { - if (contextArray->uniqueNum[i] == appInst) - { - contextIndex = i; - break; - } - } - - // If not found then create a new context. - if (contextIndex == -1) - { - // Find an empty slot. - for (i = 0; i < NW_NUM_INSTANCES; i++) - { - if (contextArray->uniqueNum[i] == NULL) - { - contextIndex = i; - break; - } - } - - // Throw if it is out of slots. - if (contextIndex == -1) -{ - NW_THROW_UNEXPECTED(status); -} - - // Init the slot. - contextArray->uniqueNum[contextIndex] = appInst; - - for (i = 0; i < NW_NUM_CONTEXTS; i++) -{ - contextArray->contexts[contextIndex][i] = NULL; - } - } - - // Return the values. - *aIndex = contextIndex; - *aContextArray = contextArray; - } - - NW_CATCH(status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/***************************************************************** - - Name: NW_Ctx_DeleteBrowserContext() - - Description: Delete the current browser's context. - - Parameters: - - Return Value: KBrsrSuccess or some other error - -******************************************************************/ -TBrowserStatusCode NW_Ctx_DeleteBrowserContext() -{ - TBrowserStatusCode status; - NW_Uint16 index; - NW_Uint16 i; - NW_ContextArray_t* contextArray = NULL; - NW_Bool okToDelete; - - // Get the context index - status = NW_Ctx_GetBrowserIndex(&contextArray, &index); - if (status != KBrsrSuccess) - { - return status; - } - - // Clear the slot. - contextArray->uniqueNum[index] = NULL; - - for (i = 0; i < NW_NUM_CONTEXTS; i++) - { - contextArray->contexts[index][i] = NULL; - } - - // Delete the context array if this was the last instance. - okToDelete = NW_TRUE; - for (i = 0; i < NW_NUM_INSTANCES; i++) - { - if (contextArray->uniqueNum[i] != NULL) - { - okToDelete = NW_FALSE; - break; - } - } - - if (okToDelete) - { - free(contextArray); - Dll::SetTls(NULL); - - // Release of all STDLIB resources belonging to this thread. - CloseSTDLIB(); - } - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_Ctx_Set() - - Description: Set the context for the specified component - - Parameters: component - which context - instance - which instance (NOT USED YET) - *ctx - pointer to the context to store - - Return Value: KBrsrSuccess or KBrsrFailure - -******************************************************************/ -TBrowserStatusCode NW_Ctx_Set(const NW_CtxComponent_t aComponent, - const NW_Uint16 aInstance, void *aContext) -{ - TBrowserStatusCode status; - NW_ContextArray_t* contextArray; - NW_Uint16 index; - - NW_REQUIRED_PARAM(aInstance); - - status = NW_Ctx_GetBrowserIndex(&contextArray, &index); - if (status == KBrsrSuccess) - { - contextArray->contexts[index][aComponent] = aContext; - } - - return status; -} - - -/***************************************************************** - - Name: NW_Ctx_Get() - - Description: Get the context for the specified component - - Parameters: component - which context - instance - which instance (NOT USED YET) - - Return Value: pointer to the component's context or NULL - -******************************************************************/ -void *NW_Ctx_Get(const NW_CtxComponent_t aComponent, - const NW_Uint16 aInstance) -{ - TBrowserStatusCode status; - NW_ContextArray_t* contextArray; - NW_Uint16 index; - - NW_REQUIRED_PARAM(aInstance); - - status = NW_Ctx_GetBrowserIndex(&contextArray, &index); - if (status == KBrsrSuccess) - { - return contextArray->contexts[index][aComponent]; - } - - return NULL; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_datastruct.c --- a/webengine/wmlengine/src/utils/src/nwx_datastruct.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides interfaces to data structure routines. -* These routines support a number of different data structures. -* -* NW_Ds_Dar - DynamicArray of pointers. Creates an array of pointers -* to void *. Elements are inserted and retrieved by index. -* The array is fixed size put will automatically grow if -* the append function is called and the array needs to grow. -* -*/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_datastruct.h" -#include "BrsrStatusCodes.h" - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static TBrowserStatusCode DarGrow(NW_Ds_DynamicArray_t *); - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/*lint -save -e64 -e119 Type mismatch, Too many arguments*/ - -/************************************************************************* -** Dynamic Array of Pointers Routines -**************************************************************************/ - -/***************************************************************** -** Name: NW_Ds_DarNew_DefaultHeap -** Description: Helper function which creates the array on the -** default heap -** Parameters: size - number of elements in the initial -** allocation -** Return Value: pointer to the dynamic array or NULL if failure -******************************************************************/ -NW_Ds_DynamicArray_t *NW_Ds_DarNew_DefaultHeap(const NW_Uint16 size) -{ - return NW_Ds_DarNew(size, NW_Mem_Malloc_Address, NW_Mem_Free_Address); -} - -/***************************************************************** -** Name: NW_Ds_DarNew -** Description: Creates a dyamic array of pointers. The size of the -** array returned is always greater then or equal to one. -** Parameters: size - number of elements in the initial allocation -** *fpAlloc -- function pointer to the memory allocation routine -** *fpFree -- function pointer to the free allocation routine -** Return Value: pointer to the dynamic array or NULL if failure -******************************************************************/ -NW_Ds_DynamicArray_t *NW_Ds_DarNew(const NW_Uint16 size, - NW_Ds_Mem_MallocHandler *fpAlloc, - NW_Ds_Mem_FreeHandler *fpFree) -{ - NW_Uint16 i; - NW_Ds_DynamicArray_t *array; - - NW_ASSERT(fpAlloc != NULL); - NW_ASSERT(fpFree != NULL); - -#ifndef FEATURE_MEMORY_PROFILE - array = (fpAlloc)(sizeof(NW_Ds_DynamicArray_t)); -#else - array = NW_Mem_Malloc(sizeof(NW_Ds_DynamicArray_t)); -#endif - if (array != NULL) { - array->size = NW_UINT16_CAST(NW_MAX(size, 1)); - array->numElements = 0; -#ifndef FEATURE_MEMORY_PROFILE - array->elements = (fpAlloc)(array->size * sizeof(void *)); -#else - array->elements = NW_Mem_Malloc(array->size * sizeof(void *)); -#endif - if (array->elements == NULL) { -#ifndef FEATURE_MEMORY_PROFILE - (fpFree)(array); -#else - NW_Mem_Free(array); -#endif - - return NULL; - } - for (i = 0; i < array->size; i++) - array->elements[i] = NULL; - array->mallocHandler = fpAlloc; - array->freeHandler = fpFree; - } - - return array; -} - -/***************************************************************** -** Name: NW_Ds_DarDelete -** Description: Deletes a dyamic array of pointers. -** Parameters: *array - a pointer to the dynamic array -** Return Value: void -******************************************************************/ -void NW_Ds_DarDelete(NW_Ds_DynamicArray_t *array) -{ - if ((array != NULL) && (array->elements != NULL) && (array->freeHandler != NULL)) - { -#ifndef FEATURE_MEMORY_PROFILE - (array->freeHandler)(array->elements); - (array->freeHandler)(array); -#else - NW_Mem_Free(array->elements); - NW_Mem_Free(array); -#endif - } - return; -} - -/***************************************************************** -** Name: NW_Ds_DarAppend -** Description: adds a pointer to an element to the end of the array. -** The array will grow as needed. -** Parameters: *array - a pointer to the dynamic array -** *element - the data to append -** Return Value: KBrsrSuccess if succeeds, else KBrsrOutOfMemory -******************************************************************/ -TBrowserStatusCode NW_Ds_DarAppend(NW_Ds_DynamicArray_t *array, void *element) -{ - NW_ASSERT(array != NULL); - NW_ASSERT(array->elements != NULL); - - if (array->numElements >= array->size) { - if (DarGrow(array) == KBrsrOutOfMemory) - return KBrsrOutOfMemory; - } - array->elements[array->numElements++] = element; - - return KBrsrSuccess; -} - -/***************************************************************** -** Name: DarGrow -** Description: Grow the array by 1/2 the current size -** Parameters: *array - a pointer to the dynamic array -** Return Value: KBrsrSuccess if succeeds, else KBrsrOutOfMemory -******************************************************************/ -static TBrowserStatusCode DarGrow(NW_Ds_DynamicArray_t *array) -{ - NW_Int32 i; - NW_Uint16 newsize; - void **temp; - - NW_ASSERT(array != NULL); - NW_ASSERT(array->elements != NULL); - - newsize = NW_UINT16_CAST(array->size + NW_MAX((array->size/2), 1)); -#ifndef FEATURE_MEMORY_PROFILE - temp = (array->mallocHandler)(newsize * sizeof(void *)); -#else - temp = NW_Mem_Malloc(newsize * sizeof(void *)); -#endif - if (temp == NULL) { - return KBrsrOutOfMemory; - } else { - array->size = newsize; - for (i = 0; i < array->numElements; i++) - temp[i] = array->elements[i]; - for (i = array->numElements; i < array->size; i++) - temp[i] = NULL; -#ifndef FEATURE_MEMORY_PROFILE - (array->freeHandler)(array->elements); -#else - NW_Mem_Free(array->elements); -#endif - array->elements = temp; - return KBrsrSuccess; - } -} - - -/***************************************************************** -** Name: NW_Ds_DarGetElement -** Description: gets the pointer to the specified element -** Parameters: *array - a pointer to the dynamic array -** index - the index of the element to get -** Return Value: a pointer to the data or NULL if array out of bounds -******************************************************************/ -void *NW_Ds_DarGetElement(const NW_Ds_DynamicArray_t *array, const NW_Uint32 index) -{ - NW_ASSERT(array != NULL); - NW_ASSERT(array->elements != NULL); - NW_ASSERT(index < array->numElements); - - if (index < array->numElements) - return array->elements[index]; - else - return NULL; -} -/***************************************************************** -** Name: NW_Ds_DarGetCount -** Description: gets the number of elements in the array -** Parameters: *array - a pointer to the dynamic array -** Return Value: the actual number of elements stored in the array -******************************************************************/ -NW_Uint16 NW_Ds_DarGetCount(const NW_Ds_DynamicArray_t *array) -{ - if(array != NULL) - return array->numElements; - return 0; -} - -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_float.c --- a/webengine/wmlengine/src/utils/src/nwx_float.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - /* - $Workfile: nwx_float_epoc32.c $ - - Purpose: - - Contains platform-dependant float functions - */ - -#include <math.h> -#include "nwx_float.h" - -/* - * This doesn't work on the Epoc hardware - any attempt to - * access an invalid float causes a crash. -NW_Bool is_finite_float( NW_Float32 f ) -{ - * remove sign bit and fraction part * - NW_Uint32 fBits = ( 0x7F800000 & *((NW_Uint32 *)(&f)) ); - - * if exponent is 8 ones, it is either NaN or plus/minus infinity * - return NW_BOOL_CAST(fBits != 0x7F800000); -} -*/ - -/* Test to see if this NW_Float64 is a valid 32 bit float */ -NW_Bool is_finite_float64(NW_Float64 d) -{ - return NW_BOOL_CAST(fabs(d) < NW_FLOAT32_MAX); -} - -/* Test to see if this NW_Float64 is smaller than can be represented - * in a 32 bit float - */ -NW_Bool is_zero_float64(NW_Float64 d) -{ - return NW_BOOL_CAST(fabs(d) < NW_FLOAT32_MIN); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_format.c --- a/webengine/wmlengine/src/utils/src/nwx_format.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**----------------------------------------------------------------------------- -** REFERENCES: -** WAP-188-WAPGenFormats, Version 15-Aug-2000 -** Design Specification - Spectrum Coding Standards -**----------------------------------------------------------------------------- -*/ - -/* -**----------------------------------------------------------------------------- -** Component Generic Includes -**----------------------------------------------------------------------------- -*/ - - -/* -**----------------------------------------------------------------------------- -** Module Specific Includes -**----------------------------------------------------------------------------- -*/ -#include "nwx_string.h" - -/* -**----------------------------------------------------------------------------- -** MACROS -**----------------------------------------------------------------------------- -*/ -#define GLOBALEXTENSION 0x2b /* + */ -//#define PAUSECHAR 0x2c /* , */ -//#define UPPER_D 0x44 -#define ASTERISK 0x2a -#define HASHMARK 0x23 - -/* -**----------------------------------------------------------------------------- -** External Public (Exported) Functions -**----------------------------------------------------------------------------- -*/ -/****************************************************************************** - Name: - NW_Format_IsValidPhoneNumber( const NW_Ucs2 *phoneNumber ) - - Description: - Validate "input" as complying with WAPGenFormat-188 item, "phone_number". - Assume that phone_number consists of: [+] DIGIT+ - DIGIT ::= "0" | "1" | "2" | "3" | "4" | - "5" | "6" | "7" | "8" | "9" - Parameters: - NW_Ucs2 *phoneNumber - - Return Value: - NW_TRUE - "phone number" is valid - NW_FALSE- not valid -******************************************************************************/ -NW_Bool NW_Format_IsValidPhoneNumber( const NW_Ucs2 *phoneNumber ) { - NW_Bool digitFound = NW_FALSE; - - if (*phoneNumber == GLOBALEXTENSION) { - ++phoneNumber; - } - while (*phoneNumber) { - switch (*phoneNumber) { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - digitFound = NW_TRUE; - break; - default: - return NW_FALSE; - } - ++phoneNumber; - } - return digitFound; -} - - -/****************************************************************************** - Name: - NW_Format_IsValidToneSequence( const NW_Ucs2 *toneSequence ) - - Description: - Validate "input" as complying with WAPGenFormat-188 item, "tone_sequence". - tone_sequence ::= (pause | dtmf_sequence)* - pause ::= "," - dtmf_sequence ::= dtmf_digit+ - dtmf_digit ::= DIGIT | "*" | "#" | "A" | "B" | "C" | "D" - DIGIT ::= "0" | "1" | "2" | "3" | "4" | - "5" | "6" | "7" | "8" | "9" - - Parameters: - NW_Ucs2 *toneSequence - - Return Value: - NW_TRUE - "toneString" is a valid tone sequence - NW_FALSE- not valid -******************************************************************************/ -NW_Bool NW_Format_IsValidToneSequence( const NW_Ucs2 *toneSequence ) { - NW_Bool digitFound = NW_TRUE; /* Changed from FALSE to TRUE inorder to allow empty DTMF sequence. moved from Wave */ - - while (*toneSequence) { - switch (*toneSequence) { - case ASTERISK: - case HASHMARK: - case ',': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': - digitFound = NW_TRUE; - break; - default: - return NW_FALSE; - } - ++toneSequence; - } - return digitFound; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_generic_dlg.c --- a/webengine/wmlengine/src/utils/src/nwx_generic_dlg.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,160 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_generic_dlg.c -** Part of: Debug -** Version: 1.0 -** Description: Provides interfaces to building generic dialog boxes -******************************************************************/ -/* -**------------------------------------------------------------------------- -** Component Generic Include -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_generic_dlg.h" - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Dlg_ListSelectInit -** Description: Helper function which creates the data struct for a listbox -** Parameters: title - title for the dialog box -** prompt - prompt for the dialog box -** itemsCount - how many items in the list -** items - strings to display in the select box -** button0 - The text for the OK button -** button1 - The text for the cancel button -** selectedItem - The item that was selected when the dialog box closed -** selectedButton- The user closed with OK or cancel -** context - context for the calling -** Return Value: pointer to the struct or NULL if failure -******************************************************************/ -NW_Dlg_ListSelect_t* NW_Dlg_ListSelectInit(const NW_Ucs2* title,const NW_Ucs2* prompt, NW_Uint8 uiOptions, - NW_Uint16 itemsCount, NW_Ucs2 **items, - NW_DialogButtons_t button0, NW_DialogButtons_t button1, - NW_Uint8 selectedItem, NW_Uint8 selectedButton,void* context) -{ - NW_Dlg_ListSelect_t* data = - (NW_Dlg_ListSelect_t*) NW_Mem_Malloc(sizeof(NW_Dlg_ListSelect_t)); - - if (data != NULL) - { - data->title=title; - data->prompt=prompt; - data->uiOptions = uiOptions; - data->itemsCount=itemsCount; - data->items=items; - data->button0=button0; - data->button1=button1; - data->selectedItem=selectedItem; - data->selectedButton=selectedButton; - data->context=context; - } - return data; -} - -/***************************************************************** -** Name: NW_Dlg_PromptInit -** Description: Helper function which creates the data struct for a listbox -** Parameters: title - title for the dialog box -** prompt - prompt for the dialog box -** button0 - The text for the OK button -** button1 - The text for the cancel button -** selectedButton- The user closed with OK or cancel -** context - context for the calling -** Return Value: pointer to the struct or NULL if failure -******************************************************************/ -NW_Dlg_Prompt_t* NW_Dlg_PromptInit(const NW_Ucs2* title,const NW_Ucs2* prompt, NW_Uint8 uiOptions, - NW_DialogButtons_t button0, NW_DialogButtons_t button1, - NW_Uint8 selectedButton,void* context) -{ - NW_Dlg_Prompt_t* data = - (NW_Dlg_Prompt_t*) NW_Mem_Malloc(sizeof(NW_Dlg_Prompt_t)); - - if (data != NULL) - { - data->title=title; - data->prompt=prompt; - data->uiOptions = uiOptions; - data->button0=button0; - data->button1=button1; - data->selectedButton=selectedButton; - data->context=context; - } - return data; -} - -/***************************************************************** -** Name: NW_Dlg_InputPromptInit -** Description: Helper function which creates the data struct for a listbox -** Parameters: title - title for the dialog box -** prompt - prompt for the dialog box -** format - WML input format string -** emptyOKStr - value of WML input attribute emptyok -** shouldHide - flag if to display the text or asterisks, for PIN -** isNumber - flag if allow digital number only -** button0 - The text for the OK button -** button1 - The text for the cancel button -** maxInputLen - the size of the input buffer -** input - the input text -** selectedButton- The user closed with OK or cancel -** context - context for the calling -** Return Value: pointer to the struct or NULL if failure -******************************************************************/ -NW_Dlg_InputPrompt_t* NW_Dlg_InputPromptInit(const NW_Ucs2* title, const NW_Ucs2* prompt, - const NW_Ucs2* format, const NW_Ucs2* emptyOKStr, - NW_Uint8 uiOptions, - NW_Bool shouldHide, NW_Bool isNumber, - NW_DialogButtons_t button0, - NW_DialogButtons_t button1, NW_Uint16 maxInputLen, - NW_Ucs2* input, NW_Uint8 selectedButton,void* context) -{ - NW_Dlg_InputPrompt_t* data = - (NW_Dlg_InputPrompt_t*) NW_Mem_Malloc(sizeof(NW_Dlg_InputPrompt_t)); - - if (data != NULL) - { - data->title=title; - data->prompt=prompt; - data->format=(NW_Ucs2*)format; - data->emptyOKStr = emptyOKStr; - data->uiOptions = uiOptions; - data->shouldHide = shouldHide; - data->isNumber = isNumber; - data->button0=button0; - data->button1=button1; - data->maxInputLen=maxInputLen; - data->input=input; - data->selectedButton=selectedButton; - data->context=context; - } - return data; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_logger_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_logger_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -/* -* Copyright (c) 1999 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/***************************************************************** -** File name: nwx_logger_epoc32.c -** Description: Provides the interface to logging -** Windows NT & Windows CE log to the DevStudio -** debugging window, all others to an I/O stream. -******************************************************************/ - -/* -** Include Files -*/ -#include <e32def.h> -#include <e32std.h> -#include <eikenv.h> -#include <f32file.h> -#include <flogger.h> -#include "nwx_logger.h" -#include "nwx_ctx.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* -** Constants -*/ -enum {KMaxLogLen = 1500}; - -/* -** File Scoped Structure -*/ -typedef struct - { - NW_LogLevel_t logLevel; - NW_Ucs2* logFileName; - } NW_Logger_Struct_t; - -/* -** External Public (Exported) Functions -*/ - -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - -_LIT( KWmlBrowserLogDir, "browser" ); - -/*#define DEFAULT_LOGFILENAME "default.log"*/ - -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - -/***************************************************************** -** Name: NW_Debug_NewLogger -** Description: creates a new logger -** Parameters: *name -- name of the file to log info in -** logLev -- level of logging during a session -** Return Value: void -** Note: not to be used with windows CE -******************************************************************/ -void NW_Debug_NewLogger(const char *name, const NW_LogLevel_t logLev) - { -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - - NW_REQUIRED_PARAM(name); - - NW_Logger_Struct_t* logger_ctx = - (NW_Logger_Struct_t*)NW_Mem_Malloc(sizeof(NW_Logger_Struct_t)); - - if (logger_ctx == NULL) - return; - - if (NW_Ctx_Set(NW_CTX_LOGGER, NULL, logger_ctx) != KBrsrSuccess) return; - - /* Set logfile name */ - logger_ctx->logFileName = NW_Str_CvtFromAscii(name); - NW_ASSERT(logger_ctx->logFileName); - - /* Set logging level */ - logger_ctx->logLevel = logLev; -#else - NW_REQUIRED_PARAM(name); - NW_REQUIRED_PARAM(logLev); -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - - } - - - -/***************************************************************** -** Name: NW_Debug_SetLogLevel -** Description: change the log level -** Parameters: logLev -- log level for the logger -** Return Value: void -******************************************************************/ -void NW_Debug_SetLogLevel(const NW_LogLevel_t logLev) - { -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - - NW_Logger_Struct_t* logger_ctx = - (NW_Logger_Struct_t*)NW_Ctx_Get(NW_CTX_LOGGER, NULL); - NW_ASSERT(logger_ctx); - logger_ctx->logLevel = logLev; - -#else - NW_REQUIRED_PARAM(logLev); -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - } - - -/***************************************************************** -** Name: NW_Debug_Log -** Description: To log some information -** Parameters: msgLevel -- level of the message (this will be -** compared with the log level to -** determine whether a message will -** need to be logged) -** fmt -- format string -** ... -- a list of parameters to be logged -** Return Value: void -** -** NOTE: This method will panic the browser when an extremely -** long argument (~1K bytes) is presented for logging. This is -** because the argument (usually url) exceeds the buf size of -** KMaxLogLen. Since we don't know the order or type of the -** incoming va_list (...) we can't perform any size or type checking. -** Since this is only internal code, used for debugging, it doesn't -** effect our release code. -******************************************************************/ -void NW_Debug_Log(const NW_LogLevel_t msgLevel, const char* fmt, ...) - { -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - - /* Get a context. Will not exist if logger has not been started yet. */ - NW_Logger_Struct_t*logger_ctx = (NW_Logger_Struct_t*)NW_Ctx_Get(NW_CTX_LOGGER, NULL); - if (!logger_ctx) - return; - - NW_LogLevel_t logLevel = logger_ctx->logLevel; - - if (logLevel >= msgLevel) - { - VA_LIST ap; - NW_Ucs2* fmt16; - fmt16 = NW_Str_CvtFromAscii(fmt); - if (fmt16 != NULL) - { - TBuf16<KMaxLogLen> buf; - TPtrC16 format(fmt16); - - VA_START(ap, fmt); - buf.FormatList(format, ap); - VA_END(ap); - - buf.Append(0); - - TPtrC fileName(logger_ctx->logFileName); - RFileLogger::Write( KWmlBrowserLogDir, fileName , EFileLoggingModeAppend, buf ); - NW_Mem_Free(fmt16); - } - } - -#else - NW_REQUIRED_PARAM(msgLevel); - NW_REQUIRED_PARAM(fmt); -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - - return; - } - - -/***************************************************************** -** Name: NW_Debug_CloseLogger -** Description: close debugger -** Parameters: void -** Return Value: void -** Note: not to be used for windows CE architecture -******************************************************************/ -void NW_Debug_CloseLogger() - { -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - - NW_Logger_Struct_t* logger_ctx = - (NW_Logger_Struct_t*)NW_Ctx_Get(NW_CTX_LOGGER, NULL); - - if (logger_ctx != NULL) - { - NW_Mem_Free(logger_ctx->logFileName); - NW_Mem_Free (logger_ctx); - NW_Ctx_Set(NW_CTX_LOGGER, NULL, NULL); - } -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_math.c --- a/webengine/wmlengine/src/utils/src/nwx_math.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,484 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_math.c -** Part of: Debug -** Version: 1.0 -** Description: Provides interfaces to ANSI standard math functions. -******************************************************************/ - -#include "nwx_assert.h" -#include "nwx_defs.h" -#include "nwx_float.h" -#include "nwx_ctx.h" -#include "nwx_math.h" - -/* abramowitz & stegun, 26.8.3 */ - -#define DEFAULT_SEED_VAL 47594118 -#define T 100000001 -#define A 23 -#define B 0 - -/* Cannot have static variables in code for Epoc. -** ie. static NW_Int32 currRand = DEFAULT_SEED_VAL; -*/ -typedef struct { - NW_Int32 currRand; -} Math_Context_t; - -static Math_Context_t *Math_Initialize(void); -static NW_Int32 Math_GetCurrRandom(void); -static Math_Context_t *Math_ContextGet(void); -static void Math_SaveCurrRandom(NW_Int32 currRand); -static NW_Int32 Math_PowerInt(NW_Int32 x, NW_Int32 ex); - -static Math_Context_t *Math_Initialize(void) -{ - Math_Context_t *context = (Math_Context_t*) NW_Mem_Malloc(sizeof(Math_Context_t)); - if (context != NULL) { - context->currRand = DEFAULT_SEED_VAL; - } - return context; -} - -static Math_Context_t *Math_ContextGet(void) -{ - Math_Context_t *context = (Math_Context_t *)NW_Ctx_Get(NW_CTX_UTILS_MATH, 0); - if (context == NULL) { - context = Math_Initialize(); - NW_Ctx_Set(NW_CTX_UTILS_MATH, 0, (void*)context); - } - return context; -} - -void Math_ContextFree(void) -{ - Math_Context_t *context = (Math_Context_t *)NW_Ctx_Get(NW_CTX_UTILS_MATH, 0); - NW_Mem_Free(context); - NW_Ctx_Set(NW_CTX_UTILS_MATH, 0, NULL); -} - -static NW_Int32 Math_GetCurrRandom(void) -{ - Math_Context_t *context = Math_ContextGet(); - NW_ASSERT(context != NULL); - return context->currRand; -} - -static void Math_SaveCurrRandom(NW_Int32 currRand) -{ - Math_Context_t *context = Math_ContextGet(); - NW_ASSERT(context != NULL); - context->currRand = currRand; -} - -static NW_Int32 Math_PowerInt(NW_Int32 x, NW_Int32 ex) -{ - NW_Int32 res = 1; - NW_Int32 factor = x; - - if (ex < 0) { - ex = -ex; - } - - while (ex > 0) { - res *= factor; - ex--; - } - return res; -} - - -void NW_Math_srand(NW_Int32 seed) -{ - if (seed > 0) { - Math_SaveCurrRandom(seed); - } else { - Math_SaveCurrRandom(DEFAULT_SEED_VAL); - } -} - -NW_Int32 NW_Math_rand() -{ - NW_Int32 currRand = Math_GetCurrRandom(); - - currRand = (A * currRand + B) % T; - if (currRand < 0) { - currRand = -currRand; - } - Math_SaveCurrRandom(currRand); - return currRand; -} - -NW_Int32 NW_Math_truncate(NW_Float32 x) -{ - /*lint --e{785, 747} Too few initializers, Significant prototype coercion*/ - NW_Float32 y; /* y is temp */ - NW_Float32 temp = 0.0; - NW_Float32 factor = 0.0; - NW_Float32 array [10] = {0.0}; - NW_Int32 answer = 0; - NW_Int32 res = 0; - NW_Int32 count = 0; - NW_Int32 z = 0; - - if (x < 0.0) { - y = -x; - } else { - y = x; - } - - /* we assume # of bits for mantissa/significand of double is less than */ - /* # of bits in int */ - while (y >= 1.0) { - y /= 10.0; - count++; - } - - if (x < 0.0) { - y = -x; - } else { - y = x; - } - - while (count > 0) { - factor = NW_Math_powint(10.0, count-1); - temp = array [res]; - for (z=0; z<10; ++z) { - array [z] = (factor * z) + temp; - } - if (y < array [1]) { - res = 0; - } else if (y < array [2]) { - res = 1; - } else if (y < array [3]) { - res = 2; - } else if (y < array [4]) { - res = 3; - } else if (y < array [5]) { - res = 4; - } else if (y < array [6]) { - res = 5; - } else if (y < array [7]) { - res = 6; - } else if (y < array [8]) { - res = 7; - } else if (y < array [9]) { - res = 8; - } else { - res = 9; - } - count--; - answer = answer + (Math_PowerInt(10, count) * res); - } - if (x < 0.0) { - answer = -answer; - } - return answer; -} - -NW_Float32 NW_Math_powint(NW_Float32 x, NW_Int32 ex) -{ - NW_Float32 res = 1.0; - NW_Float32 factor = ( (ex > 0) ? x : 1/x ); - - if (ex < 0) { - ex = -ex; - } - - while (ex > 0) { - res *= factor; - ex--; - } - return res; -} - -NW_Float64 NW_Math_powint64(NW_Float32 x, NW_Int32 ex) -{ - NW_Float64 res = 1.0; - NW_Float64 factor = ( (ex > 0) ? (NW_Float64)x : (NW_Float64)1/x ); - - if (ex < 0) { - ex = -ex; - } - - while (ex > 0) { - res *= factor; - ex--; - } - return res; -} - -/* strategy - rewrite x^y as 10^(y+y') where x = 10^y' => y' = Log(x) */ -/* Log(x) given by abramowitz & stegun 4.1.42 for 10^-0.5 <= x <= 10^.5 */ -/* and 10^(y+y') given by abramowitxz & stegun 4.2.47. Highest order */ -/* error term is 10^-7, just on the edge of the spec for fp precision */ -/* in wmlscript. */ -NW_Float32 NW_Math_pow(NW_Float32 x, NW_Float32 y) -{ - NW_Float32 xrange = x; - NW_Int32 fac = 0; - NW_Float32 t, t2, t1; - NW_Float32 res = 1; - NW_Float32 yprime; - NW_Float32 fracpow; - - if (x < 0) { - return 0.0; - } - while (xrange > 3.126227766) { - xrange /= 10.0; - fac++; - } - while (xrange < 0.3126227766) { - xrange *= 10.0; - fac--; - } - - t1 = t = (xrange - 1)/(xrange + 1); - t2 = t1*t1; - yprime = ((NW_Float32)0.868591718)*t; - t *= t2; /* t^3 */ - yprime += ((NW_Float32)0.289335524)*t; - t *= t2; /* t^5 */ - yprime += ((NW_Float32)0.177522071)*t; - t *= t2; /* t^7 */ - yprime += ((NW_Float32)0.094376476)*t; - t *= t2; - yprime += ((NW_Float32)0.191337714)*t; - - yprime += fac; /* log(ab) = log(a) + log(b) */ - yprime *= y; - - if (yprime > 1.0) { - res = 10.0; - yprime -= 1.0; - while (yprime > 1.0) { - res *= 10.0; - yprime -= 1.0; - } - } else { - res = 1.0; - while (yprime < 0.0) { - res *= (NW_Float32)0.1; - yprime += (NW_Float32)1.0; - } - } - - t = yprime; - fracpow = (NW_Float32)(1.0 + 1.15129277603*t); - t *= yprime; - fracpow += ((NW_Float32)0.66273088429)*t; - t *= yprime; - fracpow += ((NW_Float32)0.25439357484)*t; - t *= yprime; - fracpow += ((NW_Float32)0.07295173666)*t; - t *= yprime; - fracpow += ((NW_Float32)0.01742111988)*t; - t *= yprime; - fracpow += ((NW_Float32)0.00255491796)*t; - t *= yprime; - fracpow += ((NW_Float32)0.00093264267)*t; - - return res * fracpow * fracpow; -} - -NW_Int32 NW_Math_abs(NW_Int32 i) -{ - if (i < 0) { - return -i; - } else { - return i; - } -} - -NW_Float32 NW_Math_floor(NW_Float32 x) -{ - NW_Float32 y; - NW_Float32 digit; - NW_Float32 res = 0; - NW_Int32 count = 0; - - if (x < 0.0) { - y = -x; - } else { - y = x; - } - - /* we assume # of bits for mantissa/significand of double is less than */ - /* # of bits in int */ - while (y >= 1.0) { - y /= 10.0; - count++; - } - y *= 10; - while (count > 0) { - res = 10.0f*res; - if (y < 1.0) { - digit = 0.0; - } else if (y < 2.0) { - digit = 1.0; - } else if (y < 3.0) { - digit = 2.0; - } else if (y < 4.0) { - digit = 3.0; - } else if (y < 5.0) { - digit = 4.0; - } else if (y < 6.0) { - digit = 5.0; - } else if (y < 7.0) { - digit = 6.0; - } else if (y < 8.0) { - digit = 7.0; - } else if (y < 9.0) { - digit = 8.0; - } else { - digit = 9.0; - } - res += digit; - count--; - y = (y - digit)*10.0f; - } - if (x < 0.0) { - res = -res-1; - } - return res; -} - -NW_Float32 NW_Math_ceil(NW_Float32 x) -{ - NW_Float32 xFloor = NW_Math_floor(x); - /* if x starts out an even integer then x = floor(x) = ceil(x) */ - if (xFloor < x) { - return xFloor + 1; - } else { - return xFloor; - } -} - -NW_Float32 NW_Math_fabs(NW_Float32 x) -{ - if (x < 0) { - return -x; - } else { - return x; - } -} - -NW_Int32 NW_Math_truncate64(NW_Float64 x) -{ - NW_Float64 y; - NW_Float64 digit; - NW_Int32 res = 0; - NW_Int32 prevRes = 0; - NW_Int32 count = 0; - - if (x < 0.0) { - y = -x; - } else { - y = x; - } - - /* we assume # of bits for mantissa/significand of double is less than */ - /* # of bits in int */ - while (y >= 1.0) { - y /= 10.0; - count++; - } - y *= 10.0; - while (count > 0) { - prevRes = res; - res = 10*res; - if (y < 1.0) { - digit = 0.0; - } else if (y < 2.0) { - res += 1; - digit = 1.0; - } else if (y < 3.0) { - res += 2; - digit = 2.0; - } else if (y < 4.0) { - res += 3; - digit = 3.0; - } else if (y < 5.0) { - res += 4; - digit = 4.0; - } else if (y < 6.0) { - res += 5; - digit = 5.0; - } else if (y < 7.0) { - res += 6; - digit = 6.0; - } else if (y < 8.0) { - res += 7; - digit = 7.0; - } else if (y < 9.0) { - res += 8; - digit = 8.0; - } else { - res += 9; - digit = 9.0; - } - if (res < prevRes) { - /* figure out correct error behavior, ERANGE? */ - } - count--; - y = (y - digit)*10.0; - } - if (x < 0.0) { - res = -res; - } - return res; -} - -void NW_Math_BaseandExp64(NW_Float64 x, NW_Int32 *base, NW_Int32 *exp) -{ - NW_Int32 sign = 1; - NW_Int32 i; - - NW_ASSERT(base != NULL); - NW_ASSERT(exp != NULL); - - *exp = 0; - if (x < 0) { - sign = -1; - x = -x; - } - if (x != 0.0f) { - while (x >= 1.0) { - x *= 0.1f; - *exp += 1; - } - while (x < 0.1) { - x *= 10.0f; - *exp -= 1; - } - } - for (i=0; i<=FLT_DIG; i++) { - x *= 10.0f; - } - *base = sign*NW_Math_truncate64(x); -} - -NW_Float32 NW_Math_round(NW_Float32 x) -{ - return NW_Math_floor((NW_Float32)(x + 0.5)); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_mem_epoc32.c --- a/webengine/wmlengine/src/utils/src/nwx_mem_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,422 +0,0 @@ -/* -* Copyright (c) 1999 - 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_mem.c -** Purpose: Provides the implementation to memory management -**************************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_mem.h" -#include "nwx_logger.h" -#ifdef FEATURE_MEMORY_PROFILE -#include "nwx_ctx.h" -#include "BrsrStatusCodes.h" -#endif // FEATURE_MEMORY_PROFILE - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ -#ifdef FEATURE_MEMORY_PROFILE -typedef struct _MemProfile -{ - struct _MemProfile *next; // ptr to next mem block - struct _MemProfile *prev; // ptr to previous mem block - char *file; // filename of memory allocator - NW_Int32 line; // line # in filename of memory allocator - NW_Int32 size; // size of requested memory - NW_Int32 seq; // sequence number for allocation -} MemProfile; -#endif // FEATURE_MEMORY_PROFILE - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -void *NW_Mem_memset(void *s, NW_Uint32 c, NW_Uint32 n) -{ - unsigned char *myPtr = (unsigned char *)s; - unsigned char fill = (unsigned char)c; - while (n > 0) { - *myPtr = fill; - myPtr++; - n--; - } - return s; -} - -void *NW_Mem_memcpy(void *s1, const void *s2, NW_Uint32 n) -{ - unsigned char *myDest = (unsigned char *)s1; - unsigned char *mySource = (unsigned char *)s2; - if (n==0) return NULL; - while (n > 0) { - *myDest = *mySource; - n--; - myDest++; - mySource++; - } - return s1; -} - -void *NW_Mem_memmove(void *s1, const void *s2, NW_Uint32 n) -{ - unsigned char *tempBuff; - if (n == 0) return NULL; - tempBuff = (unsigned char *) NW_Mem_Malloc(n); - if (tempBuff == NULL) { - return NULL; - } - NW_Mem_memcpy(tempBuff, s2, n); - NW_Mem_memcpy(s1, tempBuff, n); - NW_Mem_Free(tempBuff); - return s1; -} - -NW_Int32 NW_Mem_memcmp(const void *s1, const void *s2, NW_Uint32 n) -{ - unsigned char *myDest = (unsigned char *)s1; - unsigned char *mySource = (unsigned char *)s2; - - /* If s1 == s2, then immediately return 0. */ - if ( s1 == s2 ) - return 0 ; - - while (n > 0) { - if (*myDest != *mySource) { - return (*myDest - *mySource); - } - myDest++; - mySource++; - n--; - } - - return 0; -} - - -/********************************************************* -** Name: NW_Mem_Malloc -** Description: Allocates memory. -** Parameters: nbytes - number of bytes to allocate -** Return Value: pointer to the allocated memory or NULL -**********************************************************/ - -void *NW_Mem_Malloc_No_Pro(NW_Uint32 nbytes) -{ - void *buf; - buf = malloc(nbytes); -// this must be in sync with nw_logger.h -#if (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) - if( !buf ) - { - NW_LOG0( NW_LOG_LEVEL2, "Malloc returned NULL!" ); - } -#endif /* (defined (_DEBUG)) || (defined(_ENABLE_LOGS)) */ - return buf; -} - -/************************************************************************ -** Name: NW_Mem_Free -** Description: Frees allocated memory. -** Parameters: mem - pointer to the memory to free -** Return Value: void -**************************************************************************/ -void NW_Mem_Free_No_Pro(void *mem) -{ - /* Note: free() handles NULL pointers corretly */ - free(mem); - return; -} - - -// -------------------------------------------------------- -// PROFILED MEMORY MANAGEMENT ROUTINES -// -------------------------------------------------------- - -#ifdef FEATURE_MEMORY_PROFILE - -/***************************************************************** -** Name: Asc_strlen -** Description: Returns string length of ascii string -** Parameters: *string - Null-terminated ascii string -** Return Value: string length -******************************************************************/ -NW_Uint32 Asc_strlen(const char *s) -{ - NW_Uint32 i = 0; - while (*s != '\0') - { - s++; - i++; - } - return i; -} - -/***************************************************************** -** Name: Asc_strcpy -** Description: Copies ascii string -** Parameters: s1 destination string -** s2 source string -** Return Value: pointer to s1 -******************************************************************/ -char *Asc_strcpy(char *s1, const char *s2) -{ - while (*s2 != '\0') { - *s1 = *s2; - s1++; - s2++; - } - *s1 = *s2; - return s1; -} - -/***************************************************************** -** Name: Str_CvtFromAscii -** Description: Convert null-terminated ascii string to new ucs2 string -** Parameters: *string - Null-terminated ascii string -** Return Value: pointer to new ucs2 string or NULL -******************************************************************/ -NW_Ucs2 *Str_CvtFromAscii(const char *string) -{ - NW_Uint32 i, size; - NW_Ucs2* res = NULL; - - NW_ASSERT(string); - - size = Asc_strlen(string) + 1; - res = malloc(size * sizeof(NW_Ucs2)); - /* this is a really naive conversion from ascii */ - if (res != NULL) { - for (i=0; i < size; i++) { - res[i] = string[i]; - } - } - return res; -} - - -/********************************************************* -** Name: NW_Mem_Malloc_Pro -** Description: Allocates "profiled" memory. -** Parameters: nbytes - number of bytes to allocate -** file - string of filename where this was called -** line - line # of file where this was called -** Return Value: pointer to the allocated memory or NULL -**********************************************************/ -void *NW_Mem_Malloc_Pro(NW_Uint32 nbytes, char *file, NW_Uint32 line) -{ - void *buf; - MemProfile *pblock, *last; - NW_Int32 len = nbytes + sizeof(MemProfile); - NW_Int32 seqno; - TBrowserStatusCode status; - - pblock = malloc(len); - - // Store profile block data - - if ((NW_Uint32) file > 0xf000) - { - pblock->file = (char*)malloc(Asc_strlen(file) + 1); - Asc_strcpy(pblock->file, file); - } - else - { - // no filename since this may be called via a function ptr - pblock->file = NULL; - } - pblock->line = line; - pblock->size = nbytes; - - // Set List Pointers - // Get last ptr - last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0); - - if (last == NULL) - { - pblock->prev = NULL; - pblock->seq = 0; - } - else - { - pblock->prev = last; - last->next = pblock; - // can't use last-> because free my remove block (along with - // seq numbers, need a context - seqno = (NW_Uint32) NW_Ctx_Get(NW_CTX_MEM_PRO_SEQ_NO, 0); - seqno += 1; - pblock->seq = seqno; - status = NW_Ctx_Set(NW_CTX_MEM_PRO_SEQ_NO, 0, seqno); - NW_ASSERT(status == KBrsrSuccess); - } - pblock->next = NULL; - - // last = pblock - last = pblock; - status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last); - NW_ASSERT(status == KBrsrSuccess); - - - // return mem block to caller - buf = (void *) ((NW_Byte *) pblock + sizeof(MemProfile)); - return (buf); -} - -/************************************************************************ -** Name: NW_Mem_Free_Pro -** Description: Frees allocated "profiled" memory. -** Parameters: mem - pointer to the memory to free -** file - string of filename where this was called -** line - line # of file where this was called -** Return Value: void -**************************************************************************/ -void NW_Mem_Free_Pro(void *buffer, char *file, NW_Uint32 line) -{ - MemProfile *pblock, *last, *prevp, *nextp; - TBrowserStatusCode status; - - if (buffer == NULL) - { - return; - } - - pblock = (MemProfile *) ((NW_Byte *) buffer - sizeof(MemProfile)); - - // Get last ptr - last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0); - - if ( pblock == last ) - { - last = last->prev; - status = NW_Ctx_Set(NW_CTX_MEM_PRO_LAST_PTR, 0, last); - NW_ASSERT(status == KBrsrSuccess); - } - else - { - prevp = pblock->prev; - nextp = pblock->next; - if (prevp) - { - prevp->next = nextp; - } - if (nextp) - { - nextp->prev = prevp; - } - } - - // Free Filename pointer and memory block - free(pblock->file); - free(pblock); - return; -} - - -/************************************************************************ -** Name: SendStringToLogger1 -** Description: Output Memory Profile Data to Debug Log -** Parameters: none -** Return Value: void -**************************************************************************/ -void SendStringToLogger1(char *strMsg) -{ - MemProfile *pblock, *last; - NW_Ucs2 *uStrFileName = NULL; - - if (strMsg != NULL) - { - NW_Ucs2 *uStrMsg = Str_CvtFromAscii(strMsg); - NW_LOG1(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: %s", uStrMsg); - free(uStrMsg); - return; - } - - // Get last ptr - last = (MemProfile *) NW_Ctx_Get(NW_CTX_MEM_PRO_LAST_PTR, 0); - - pblock = last; - while ( pblock ) - { - if (pblock->file == NULL) - { - uStrFileName = Str_CvtFromAscii("??"); - } - else - { - uStrFileName = Str_CvtFromAscii(pblock->file); - } - NW_LOG6(NW_LOG_LEVEL1, "Mem_Log: memBk:%X, da:%X, File: %s ; Line: %d ; Size: %d ; SEQ: %d", - pblock, - pblock + sizeof(MemProfile), - uStrFileName, - pblock->line, - pblock->size, - pblock->seq); - NW_LOG0(NW_LOG_LEVEL1, "NW_Mem_Pro_Log: ------------------------------"); - pblock = pblock->prev; - free(uStrFileName); - } -} -#endif // FEATURE_MEMORY_PROFILE diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_memseg_epoc32.c --- a/webengine/wmlengine/src/utils/src/nwx_memseg_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,401 +0,0 @@ -/* -* Copyright (c) 1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nwx_memseg_epoc32.c -** Purpose: Memory segment management -**************************************************************************/ - -#include <string.h> // For memset -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include "nwx_mem.h" -#include "nwx_memseg.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ -#define MINBLOCKSIZE 64 /* the minimum size block allocated by the system */ -/*#define OVERHEADSIZE 16*/ /* the number of bytes consumed by system overhead */ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -typedef struct _mem_block_t mem_block_t; -struct _mem_block_t { - mem_block_t *pNext; - NW_Uint32 offset; - NW_Uint32 size; - NW_Byte buffer[4]; -}; - - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -static mem_block_t *NewMemBlock(const NW_Uint32 size); -static void DeleteMemBlock(mem_block_t *pBlock); -static void *AllocFromBlock(mem_block_t *pBlock, const NW_Uint32 size); -static NW_Uint32 AdjustAllocSize(const NW_Uint32 size); - - -/* -**------------------------------------------------------------------------- -** Global Variables in Context -**------------------------------------------------------------------------- -*/ - -typedef struct { - NW_Mem_Segment_Id_t numSegments; - mem_block_t **pSegments; -} MemSeg_Context_t; - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static MemSeg_Context_t *MemSeg_GetThis() -{ - MemSeg_Context_t *ctx = (MemSeg_Context_t*) NW_Ctx_Get(NW_CTX_MEM_SEG,0); - if (ctx == NULL) - { - ctx = (MemSeg_Context_t*) NW_Mem_Malloc(sizeof(MemSeg_Context_t)); - if (ctx) - { - ctx->numSegments = 0; - ctx->pSegments = NULL; - NW_Ctx_Set(NW_CTX_MEM_SEG, 0, ctx); - } - } - return ctx; -} - -/* Create a new memory block */ -static mem_block_t *NewMemBlock(const NW_Uint32 size) -{ - mem_block_t *pBlock; - NW_Uint32 allocSize; - NW_Uint32 blockSize; - - NW_ASSERT(size > 0); - - /* - * Alloc a block large enough for the block header plus - * the requested size. Note that the header size - * includes 4 bytes of the buffer. - */ - allocSize = AdjustAllocSize(size); - - /* Get the actual size of the memory block which the system - * will allocate to hold the requested size, and bump - * up the allocated size to use all of the available memory. - */ - blockSize = AdjustAllocSize(sizeof(mem_block_t) - sizeof(NW_Byte[4]) + allocSize); - allocSize = blockSize - (sizeof(mem_block_t) - sizeof(NW_Byte[4])); - - pBlock = (mem_block_t*) NW_Mem_Malloc(blockSize); - if (pBlock != NULL) { - pBlock->pNext = NULL; - pBlock->offset = 0; - pBlock->size = allocSize; - } - - return pBlock; -} - - - -/* Delete a memory block */ -static void DeleteMemBlock(mem_block_t *pBlock) -{ - NW_ASSERT(pBlock != NULL); - - pBlock->pNext = NULL; - pBlock->offset = 0; - pBlock->size = 0; - NW_Mem_Free(pBlock); - - return; -} - - -/* Allocate memory from current block, or return NULL */ -static void *AllocFromBlock(mem_block_t *pBlock, const NW_Uint32 size) -{ - void *mem = NULL; - NW_Uint32 allocSize; - - NW_ASSERT(pBlock != NULL); - NW_ASSERT(size > 0); - - /* adjust allocation size to maintain memory allignment */ - allocSize = AdjustAllocSize(size); - - /* attempt to allocate memory from this block */ - if ((pBlock->size - pBlock->offset) >= allocSize) { - mem = &pBlock->buffer[pBlock->offset]; - pBlock->offset = pBlock->offset + allocSize; - } - - return mem; -} - - -/* Round up the size of the allocation to maintain memory alignment */ -static NW_Uint32 AdjustAllocSize(const NW_Uint32 size) -{ - NW_Uint32 adjustedSize = size; - - /* Plato environment (ARM compiler) requires 4 NW_Byte alignment. - * Always leave the offset at a 4 NW_Byte boundary. This may fragment - * 3 bytes for each AllocFromBlock() call. - */ - adjustedSize = ((adjustedSize + 3) & 0xFFFFFFFC); - - return adjustedSize; -} - -/********************************************************* -** Name: NW_Mem_Segment_ShutDown -** Description: Shutsdown the memory segment manager and -** frees all the memory segements. These memory segments -** should not be referenced after this function completes. -** Parameters: none -** Return Value: KBrsrSuccess -**********************************************************/ -static TBrowserStatusCode ShutDown() -{ - MemSeg_Context_t *ctx = MemSeg_GetThis(); - if (ctx == NULL) - return KBrsrSuccess; - - if (ctx->pSegments != NULL) { - NW_Mem_Free(ctx->pSegments); - } - - ctx->pSegments = NULL; - ctx->numSegments = 0; - - return KBrsrSuccess; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/********************************************************* -** Name: NW_Mem_Segment_New -** Description: Create and intialize a new memory segment. -** Parameters: none -** Return Value: ID of the new segment or 0 if failure -**********************************************************/ -NW_Mem_Segment_Id_t NW_Mem_Segment_New(void) -{ - NW_Mem_Segment_Id_t i; - NW_Mem_Segment_Id_t newNumSegments; - mem_block_t **newSegments; - - MemSeg_Context_t *ctx = MemSeg_GetThis(); - if (ctx == NULL) - return 0; - - /* Initialize array of segments if necessary */ - if (ctx->pSegments == NULL) { - ctx->numSegments = NW_MEM_SEGMENT_LAST * 2; - ctx->pSegments = (mem_block_t **) NW_Mem_Malloc(ctx->numSegments * sizeof(mem_block_t*)); - if (ctx->pSegments == NULL) { - return 0; - } - - for (i = 0; i < ctx->numSegments; i++) { - ctx->pSegments[i] = NULL; - } - } - - /* Find an unused segment, if any */ - for (i = NW_MEM_SEGMENT_LAST; i < ctx->numSegments; i++) { - if (ctx->pSegments[i] == NULL) { - /* Init the segment to prevent another "new" prior to 1st allocation */ - ctx->pSegments[i] = NewMemBlock(MINBLOCKSIZE); - return i; - } - } - - /* Enlarge the array of segments */ - newNumSegments = ctx->numSegments + 4; - newSegments = (mem_block_t **) NW_Mem_Malloc(newNumSegments * sizeof(mem_block_t*)); - if (newSegments == NULL) { - return 0; - } - - for (i = 0; i < ctx->numSegments; i++) { - newSegments[i] = ctx->pSegments[i]; - } - for (i = ctx->numSegments; i < newNumSegments; i++) { - newSegments[i] = NULL; - } - NW_Mem_Free(ctx->pSegments); - - i = ctx->numSegments; - ctx->numSegments = newNumSegments; - ctx->pSegments = newSegments; - - /* Return ID of the 1st new segment */ - /* Init the segment to prevent another "new" prior to 1st allocation */ - ctx->pSegments[i] = NewMemBlock(MINBLOCKSIZE); - return i; -} - - -/********************************************************* -** Name: NW_Mem_Segment_Free -** Description: Frees the memory allocated from the specified memory segment. -** Parameters: sid - the segment ID number -** Return Value: none -**********************************************************/ -void NW_Mem_Segment_Free(const NW_Mem_Segment_Id_t sid) -{ - mem_block_t *pBlock; - mem_block_t *pTemp; - NW_Bool shutdown = NW_TRUE; - NW_Mem_Segment_Id_t i; - - MemSeg_Context_t *ctx = MemSeg_GetThis(); - if (ctx == NULL) - return; - - NW_ASSERT(sid < ctx->numSegments); - NW_ASSERT(ctx->pSegments != NULL); - if ((ctx->pSegments == NULL) || (sid >= ctx->numSegments)) - return; - /* Handle the special segment */ - if (sid == NW_MEM_SEGMENT_MANUAL) { - return; - } - - /* Release all the memory blocks of the segment */ - pBlock = ctx->pSegments[sid]; - while (pBlock != NULL) { - pTemp = pBlock; - pBlock = pBlock->pNext; - DeleteMemBlock(pTemp); - } - - /* Mark the segment as unused */ - ctx->pSegments[sid] = NULL; - - /* Shutdown memory segment if all of the segments have been deleted */ - for (i = 0; i < ctx->numSegments; i++) { - if (ctx->pSegments[i] != NULL) { - shutdown = NW_FALSE; - break; - } - } - if (shutdown == NW_TRUE) { - ShutDown(); - } - - return; -} - - -/********************************************************* -** Name: NW_Mem_Segment_Malloc -** Description: Allocate a block of the requested size from -** the specified memory segment. -** Parameters: sid - the segment ID number -** Return Value: pointer to the allocated block or NULL -**********************************************************/ -void* NW_Mem_Segment_Malloc(const NW_Uint32 size, const NW_Mem_Segment_Id_t sid) -{ - mem_block_t *pBlock; - mem_block_t *pTemp = NULL; - void *mem; - - MemSeg_Context_t *ctx = MemSeg_GetThis(); - if (ctx == NULL) - return 0; - - NW_ASSERT(size > 0); - NW_ASSERT(sid < ctx->numSegments); - NW_ASSERT(ctx->pSegments != NULL); - - /* Handle the special segment */ - if (sid == NW_MEM_SEGMENT_MANUAL) { - return NW_Mem_Malloc(size); - } - - /* Find a block which has enough unused memory */ - pBlock = ctx->pSegments[sid]; - while (pBlock != NULL) { - mem = AllocFromBlock(pBlock, size); - if (mem != NULL) { - return mem; - } - pTemp = pBlock; - pBlock = pBlock->pNext; - } - - /* Add another block to the segment */ - pBlock = NewMemBlock(size); - if (pBlock == NULL) { - return NULL; - } - - if (pTemp == NULL) { - ctx->pSegments[sid] = pBlock; - } else { - pTemp->pNext = pBlock; - } - - /* Allocate memory from the new block */ - mem = AllocFromBlock(pBlock, size); - return mem; -} - -/************************************************************************ -Function: NW_Mem_Segment_Shutdown() -Purpose: -Clean up memory segment context -Paramters: NONE -Return Value: NONE -**************************************************************************/ -TBrowserStatusCode NW_Mem_Segment_ShutDown(void) -{ - MemSeg_Context_t *ctx = MemSeg_GetThis(); - if (ctx != NULL) - { - NW_Mem_Free(ctx); - NW_Ctx_Set(NW_CTX_MEM_SEG, 0, NULL); - } - - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_msg_config_epoc32.c --- a/webengine/wmlengine/src/utils/src/nwx_msg_config_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,286 +0,0 @@ -/* -* Copyright (c) 1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/***************************************************************** - - File name: nwx_msg_config_win.c - Part of: Messaging - Version: V1.0 - Description: - The NW_Msg_Startup routine is used to start the messaging system. - It uses the NW_MSG_MAP macro defined in rb_msg_map.h to initialize - an array of Message Handlers and Message Dispatchers. - -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include "nwx_msg_api.h" -#include "nwx_msg_types.h" -#include "nwx_http_header.h" -#include "wml_wae.h" -#include "nwx_mem.h" -#include "nwx_psq.h" -#include "nwx_msg_dsp_api_epoc32.h" -#include "nwx_msg_map_epoc32.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -** TODO: This struct is duplicated in nwx_msg_epoc32.c, which is down -** right evil. To resolve this, it should be put in a shared-private -** header file. -*/ -/*lint --e{754} local structure member not referenced */ -typedef struct { - NW_Ds_DynamicArray_t *receivers; /* receivers know to this guy */ - NW_Uint16 nextRID; /* next receiver ID */ - NW_Uint16 nextDID; /* next dispatcher ID */ - NW_Msg_Dispatcher_t **g_dispatchers; /* NW_Msg_Startup allocs ; NW_Msg_Shutdown frees */ -} Msg_Context_t; - - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* The single Windows WND proc dispatcher */ -//extern NW_Msg_Dispatcher_t *g_wndproc_dsp; - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/********************************************************* -** Name: NW_Msg_Startup -** Description: Rainbow Messaging startup. Must be called -** before any calls to the messaging system. -** Parameters: qName - Message queue name -** Return Value: KBrsrSuccess or KBrsrOutOfMemory -**********************************************************/ -TBrowserStatusCode NW_Msg_Startup(const char* qName) -{ - Msg_Context_t *ctx = (Msg_Context_t *) NW_Ctx_Get(NW_CTX_MSG_API,0); - NW_Uint16 numHandlers; - NW_Uint16 numDispatchers; - NW_Int16 i,k; - NW_Msg_Address_t address; - NW_Msg_Dispatcher_t **g_dispatchers = NULL; - TBrowserStatusCode status; - - /* The NW_MSG_MAP... macros will initialize the rb_map[] array of - message handlers and message dispatchers */ - NW_Msg_MapEntry_t rb_map[] = NW_MSG_MAP_CLI; - - numHandlers = NW_MSG_NUM_HANDLERS(rb_map); - - numDispatchers = NW_MSG_NUM_DISPATCHERS; - - /* Create an array to hold all of the dispatchers */ - g_dispatchers = (NW_Msg_Dispatcher_t**) NW_Mem_Malloc(numDispatchers * sizeof(NW_Msg_Dispatcher_t *)); - /* Save pointer to dispatcher for Free'ing later in NW_Msg_Shutdown */ - ctx->g_dispatchers = g_dispatchers; - - if (g_dispatchers == NULL) - return KBrsrOutOfMemory; - - for (i = 0; i < numDispatchers; i++) { - g_dispatchers[i] = NULL; - } - /* Loop thru the list of handlers and start message dispatchers as needed */ - for (i = 0; i < numHandlers; i++) - { - /* If the dispatcher doesn't exist, start it */ - if (g_dispatchers[rb_map[i].threadIndex] == NULL) - { - g_dispatchers[rb_map[i].threadIndex] = NW_Msg_NewDispatcher(rb_map[i].dspType, qName); - if (g_dispatchers[rb_map[i].threadIndex] == NULL) { - for (k = 0; k <= i; k++) - { - if (g_dispatchers[rb_map[k].threadIndex] != NULL) - { - if (g_dispatchers[rb_map[k].threadIndex]->queue != NULL) - { - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->queue->signal); - // we can't cleanup mutex NW_Osu_DeleteMutex(), so it will be a memory leak in the low memory situation - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->queue); - } - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]); - g_dispatchers[rb_map[k].threadIndex] = NULL; - } - } - NW_Mem_Free(g_dispatchers); - return KBrsrOutOfMemory; - } - //if (rb_map[i].dspType == NW_MSG_WNDPROC && g_wndproc_dsp == NULL) - //g_wndproc_dsp = g_dispatchers[rb_map[i].threadIndex]; - } - status = NW_Msg_DispatcherRegister(g_dispatchers[rb_map[i].threadIndex], &rb_map[i]); - if (status == KBrsrOutOfMemory) - { - for (k = 0; k <= i; k++) - { - if (g_dispatchers[rb_map[k].threadIndex] != NULL) - { - if (g_dispatchers[rb_map[k].threadIndex]->queue != NULL) - { - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->queue->signal); - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->queue); - } - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]); - g_dispatchers[rb_map[k].threadIndex] = NULL; - } - } - NW_Mem_Free(g_dispatchers); - return KBrsrOutOfMemory; - } - } - - /* Loop thru the list of handlers lookup the address of each reciever. Doing - this now will make certain that all the receivers are known in the message - api layer before the first message is sent. */ - for (i = 0; i < numHandlers; i++) { - status = NW_Msg_LookupReceiverByName(rb_map[i].name, &address); - if (status == KBrsrOutOfMemory) - { - // TO DO: call function which will cleanup handler NW_Msg_LookupReceiverByName() - for (k = 0; k < i; k++) - { - if (g_dispatchers[rb_map[k].threadIndex] != NULL) - { - if (g_dispatchers[rb_map[k].threadIndex]->queue != NULL) - { - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->queue->signal); - NW_Mem_Free(g_dispatchers[k]->queue); - } - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]->handlers); - NW_Mem_Free(g_dispatchers[rb_map[k].threadIndex]); - g_dispatchers[rb_map[k].threadIndex] = NULL; - } - } - NW_Mem_Free(g_dispatchers); - return KBrsrOutOfMemory; - } - } - - return KBrsrSuccess; -} - - -/********************************************************* -** Name: NW_Msg_Shutdown -** Description: Rainbow Messaging Shutdown. -** Free's all memory allocated in NW_Msg_Startup -** Parameters: none -** Return Value: none -**********************************************************/ -void NW_Msg_Shutdown() -{ - Msg_Context_t *ctx = (Msg_Context_t *) NW_Ctx_Get(NW_CTX_MSG_API,0); - NW_Uint16 count,i; - NW_Msg_Dispatcher_t **g_dispatchers = NULL; - NW_Msg_Dispatcher_t *dsp = NULL; - NW_Msg_Handler_t *tmp,*tmp2; - - if (ctx == NULL) - return; - - g_dispatchers = ctx->g_dispatchers; - if (g_dispatchers != NULL) - { - - /* Loop thru the list of handlers and free message dispatchers */ - dsp = g_dispatchers[0]; - - if (dsp && dsp->queue) - { - NW_Psq_Delete(dsp->queue); - } - if (dsp && dsp->handlers) - { - tmp = dsp->handlers; - while (tmp->next != NULL) - { - tmp2 = (NW_Msg_Handler_t*) tmp->next; - NW_Mem_Free(tmp); - tmp = tmp2; - } - NW_Mem_Free(tmp); - } - - NW_Mem_Free(g_dispatchers[0]); - g_dispatchers[0] = NULL; - NW_Mem_Free(g_dispatchers); - g_dispatchers = NULL; - - } - // Free up all the Message Receivers allocated in nwx_msg_epoc32.c - count = NW_Ds_DarGetCount(ctx->receivers); - for (i=0 ; i < count ; i++) - { - NW_Mem_Free(NW_Ds_DarGetElement(ctx->receivers, i)); - } - NW_Ds_DarDelete(ctx->receivers); - - NW_Mem_Free(ctx); - ctx = NULL; - NW_Ctx_Set(NW_CTX_MSG_API,0, NULL); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_msg_dsp_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_msg_dsp_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,438 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs_symbian.h" -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include "nwx_psq.h" -#include "nwx_msg_api.h" -#include "nwx_datastruct.h" -#include "nwx_osu.h" -#include "nwx_logger.h" -#include "nwx_msg_dsp_api_epoc32.h" -#include "nwx_string.h" -#include "util_cdispatchereng.h" -#include "BrsrStatusCodes.h" - - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ -typedef struct { - CDispatcherEng* ipCDispatcherEng; -} NW_DspEng_Struct; - -typedef NW_DspEng_Struct* NW_DspEng_t; - -typedef struct { - NW_Ds_DynamicArray_t *dispatchers; /* dispatchers know to this guy */ - NW_Osu_Hwnd_t hwnd; /* Window handle for WndProc disp */ - NW_DspEng_t DspEng; /* Pointer to struct encapslate a C++ class */ -} Msg_DspContext_Struct; - -typedef Msg_DspContext_Struct Msg_DspContext_t; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static Msg_DspContext_t *MsgDsp_GetThis(); -static void MsgDsp_SetThis(Msg_DspContext_t *cxt); -static TBrowserStatusCode NW_Msg_DispatcherStart(void *); - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -static Msg_DspContext_t *MsgDsp_GetThis() -{ - return (Msg_DspContext_t *)NW_Ctx_Get(NW_CTX_MSG_DSP,0); -} - -static void MsgDsp_SetThis(Msg_DspContext_t *ctx) -{ - NW_Ctx_Set(NW_CTX_MSG_DSP, 0, ctx); -}; - - - -/********************************************************* -** Name: NW_Msg_DispatcherStart -** Description: Dispatcher start routine. -** Parameters: *data - message dispatcher to start -** Return Value: nominally, KBrsrSuccess (never returns) -**********************************************************/ -static TBrowserStatusCode NW_Msg_DispatcherStart(void *data) -{ - NW_Msg_Dispatcher_t *dsp = (NW_Msg_Dispatcher_t *)data; - Msg_DspContext_t* cxt; - - NW_ASSERT (dsp != NULL); - cxt = MsgDsp_GetThis(); - if (cxt == NULL) - return KBrsrOutOfMemory; - - if (!(cxt->DspEng->ipCDispatcherEng->IsDspContext())) - cxt->DspEng->ipCDispatcherEng->SetDspContext(dsp); - /* Signal that we have started */ - //NW_Osu_NotifySignal(dsp->signal); - - cxt->DspEng->ipCDispatcherEng->RequestEvent(); - - return KBrsrSuccess; -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/********************************************************* -** Name: NW_Msg_DispatcherInitialize -** Description: Creates a new messaging dispatching system. -** There will be only one of these per process. -** It will know about all of the dispatchers in -** the process. -** Parameters: qName : Message queue name -** Return Value: KBrsrSuccess or KBrsrOutOfMemory -**********************************************************/ -TBrowserStatusCode NW_Msg_DispatcherInitialize(const char* qName) -{ - Msg_DspContext_t *ctx; - - /* Get a pointer to the context. If it is null - create a new one and store it */ - ctx = MsgDsp_GetThis(); - if (ctx == NULL) - { - ctx = (Msg_DspContext_t *)NW_Mem_Malloc(sizeof(Msg_DspContext_t)); - if (ctx == NULL) - { - return KBrsrOutOfMemory; - } - ctx->DspEng = (NW_DspEng_Struct*)NW_Mem_Malloc(sizeof(NW_DspEng_Struct)); - if (ctx->DspEng == NULL) - { - NW_Mem_Free(ctx); - MsgDsp_SetThis(NULL); - return KBrsrOutOfMemory; - } - - ctx->DspEng->ipCDispatcherEng = new CDispatcherEng(CActive::EPriorityUserInput); - if (ctx->DspEng->ipCDispatcherEng == NULL) - { - NW_Mem_Free(ctx->DspEng); - ctx->DspEng = NULL; - NW_Mem_Free(ctx); - MsgDsp_SetThis(NULL); - return KBrsrOutOfMemory; - } - - ctx->dispatchers = NW_Ds_DarNew_DefaultHeap(3); - if (ctx->dispatchers == NULL) - { - delete ctx->DspEng->ipCDispatcherEng; - NW_Mem_Free(ctx->DspEng); - ctx->DspEng = NULL; - NW_Mem_Free(ctx); - MsgDsp_SetThis(NULL); - return KBrsrOutOfMemory; - } - ctx->hwnd = NULL; - MsgDsp_SetThis(ctx); - - /* Now call the startup routine */ - TBrowserStatusCode status = NW_Msg_Startup(qName) ; - if (status == KBrsrOutOfMemory) - { - NW_Ds_DarDelete (ctx->dispatchers); - ctx->dispatchers = NULL; - delete ctx->DspEng->ipCDispatcherEng; - NW_Mem_Free(ctx->DspEng); - ctx->DspEng = NULL; - NW_Mem_Free(ctx); - MsgDsp_SetThis(NULL); - return KBrsrOutOfMemory; - } - } - - return KBrsrSuccess; -} - -/********************************************************* -** Name: NW_Msg_NewDispatcher -** Description: Creates and initializes a new message dispatcher -** Parameters: type - dispatcher type -** Return Value: pointer to new dispatcher or NULL -**********************************************************/ -NW_Msg_Dispatcher_t *NW_Msg_NewDispatcher(const NW_Msg_DispatcherType_t type, - const char* qName) -{ - Msg_DspContext_t *ctx = MsgDsp_GetThis(); - NW_Msg_Dispatcher_t *tmp; - - NW_ASSERT (ctx != NULL); - NW_ASSERT (type == NW_MSG_PSQ_DSP || type == NW_MSG_NATIVE_DSP); - - /* Allocate a dispatcher structure */ - tmp = (NW_Msg_Dispatcher_t *)NW_Mem_Malloc(sizeof(NW_Msg_Dispatcher_t)); - if (tmp != NULL) { - tmp->type = type; - tmp->handlers = NULL; - tmp->hwnd = NULL; - tmp->tmofunc = NULL; - tmp->wait = NW_WAIT_FOREVER; - - /* Not used in EPOC implementation */ - tmp->signal = NULL; - - switch (type) { - case NW_MSG_PSQ_DSP: - tmp->queue = NW_Psq_New(qName); - if (tmp->queue != NULL) { - NW_Msg_DispatcherStart(tmp); - tmp->thread = NW_Osu_GetCurrentThreadId(); - } - else { - NW_Mem_Free(tmp); - return NULL; - } - break; - case NW_MSG_NATIVE_DSP: - /* If we are using a WndProc dispatcher, just save the thread for */ - /* later use in GetThisDispatcher calls */ - tmp->thread = NW_Osu_GetCurrentThreadId(); - tmp->hwnd = ctx->hwnd; - break; - default: - NW_Mem_Free(tmp); - return NULL; - } - - /* Add the new dispatcher to the context */ - if (NW_Ds_DarAppend(ctx->dispatchers, tmp) != KBrsrSuccess) { - NW_Mem_Free(tmp); - return NULL; - } - } - - return tmp; -} - -/********************************************************* -** Name: NW_Msg_DispatcherRegister -** Description: Registers a message handler with a dispatcher. -** Parameters: *dsp - pointer to the dispatcher -** *entry - pointer to the message map entry -** Return Value: KBrsrSuccess or KBrsrOutOfMemory -**********************************************************/ -TBrowserStatusCode NW_Msg_DispatcherRegister(NW_Msg_Dispatcher_t *dsp, - const NW_Msg_MapEntry_t *entry) -{ - NW_Msg_Handler_t *handler; - NW_Msg_Handler_t *tmp; - - NW_ASSERT (dsp != NULL); - NW_ASSERT (entry != NULL); - - /* Create a handler structure */ - handler = (NW_Msg_Handler_t*)NW_Mem_Malloc(sizeof(NW_Msg_Handler_t)); - if (handler == NULL) - return KBrsrOutOfMemory; - - handler->next = NULL; - handler->type = entry->msgType; - handler->name = entry->name; - handler->func = entry->func; - - /* If the first one, just set it */ - if (dsp->handlers == NULL) { - dsp->handlers = handler; - } else { - /* locate the last one in the last */ - tmp = dsp->handlers; - while (tmp->next != NULL) - tmp = (NW_Msg_Handler_t *)tmp->next; - tmp->next = handler; - } - return KBrsrSuccess; -} - -/********************************************************* -** Name: NW_Msg_DispatcherSend -** Description: Sends a message to a dispatcher. -** Parameters: *dsp - pointer to the dispatcher -** *msg - pointer to the message -** Return Value: KBrsrSuccess or KBrsrUnexpectedError -**********************************************************/ -TBrowserStatusCode NW_Msg_DispatcherSend(NW_Msg_Dispatcher_t *dsp, NW_Msg_t *msg) -{ - Msg_DspContext_t *ctx = MsgDsp_GetThis(); - - if (ctx == NULL) - return KBrsrOutOfMemory; - - NW_ASSERT (dsp != NULL); - NW_ASSERT (msg != NULL); - NW_ASSERT (dsp->type == NW_MSG_PSQ_DSP || dsp->type == NW_MSG_NATIVE_DSP); - - switch (dsp->type) { - case NW_MSG_PSQ_DSP: - NW_Psq_AddTail(dsp->queue, (NW_Node_t *)msg); - ctx->DspEng->ipCDispatcherEng->RequestEvent(); - break; - case NW_MSG_NATIVE_DSP: - break; - default: - return KBrsrUnexpectedError; - } - - return KBrsrSuccess; -} - -/********************************************************* -** Name: NW_Msg_LookupDispatcherByName -** Description: Lookup the message dispatcher from the name. -** Parameters: name - name known to sender -** Return Value: pointer to the dispatcher or NULL -**********************************************************/ -NW_Msg_Dispatcher_t *NW_Msg_LookupDispatcherByName(const NW_Msg_RName_t name) -{ - Msg_DspContext_t *ctx = MsgDsp_GetThis(); - NW_Msg_Handler_t *handler; - NW_Msg_Dispatcher_t *dsp; - NW_Int16 i, j; - - /* Go through the list of dispatchers and find the one requested */ - if (ctx != NULL) { - j = NW_Ds_DarGetCount(ctx->dispatchers); - for (i = 0; i < j; i++) { - dsp = (NW_Msg_Dispatcher_t *)NW_Ds_DarGetElement(ctx->dispatchers, i); - handler = dsp->handlers; - while (handler != NULL) { - if (handler->name == name) - return dsp; - else - handler = (NW_Msg_Handler_t *)handler->next; - } - } - } - - return NULL; -} - -/********************************************************* -** Name: NW_Msg_GetThisDispatcher -** Description: Get the message dispatcher for current thread. -** Parameters: none -** Return Value: pointer to the dispatcher or NULL -**********************************************************/ -NW_Msg_Dispatcher_t *NW_Msg_GetThisDispatcher() -{ - Msg_DspContext_t *ctx = MsgDsp_GetThis(); - NW_Osu_ThreadId_t thread = NW_Osu_GetCurrentThreadId(); - NW_Msg_Dispatcher_t *dsp; - NW_Uint16 i, j; - - /* Go through the list of dispatchers and find the one requested */ - if (ctx != NULL) { - j = NW_Ds_DarGetCount(ctx->dispatchers); - for (i = 0; i < j; i++) { - dsp = (NW_Msg_Dispatcher_t *)NW_Ds_DarGetElement(ctx->dispatchers, i); - if (dsp->thread == thread) - return dsp; - } - } - - return NULL; -} - -/********************************************************* -** Name: NW_Msg_NYI -** Description: Default message handler for unimplemented types. -** Parameters: *msg - pointer to the message -** Return Value: KBrsrSuccess -**********************************************************/ -TBrowserStatusCode NW_Msg_NYI(NW_Msg_t *msg) -{ - NW_REQUIRED_PARAM(msg); - NW_ASSERT (msg != NULL); - - NW_LOG1(NW_LOG_LEVEL5, "NYI Message Handler %d\n", msg->type); - - return KBrsrSuccess; -} - -/********************************************************* -** Name: NW_Msg_DispatcherShutdown() -** Description: Rainbow Message Dispatcher Shutdown. -** Free's all memory allocated in NW_Msg_DispatcherInitialize() -** Parameters: none -** Return Value: none -**********************************************************/ -void NW_Msg_DispatcherShutdown() -{ - // Free up Dispatching System from NW_Msg_DispatcherInitialize() - Msg_DspContext_t *dsp_ctx = MsgDsp_GetThis(); - if (dsp_ctx == NULL) - return; - - dsp_ctx->DspEng->ipCDispatcherEng->Cancel(); - delete dsp_ctx->DspEng->ipCDispatcherEng; - NW_Mem_Free(dsp_ctx->DspEng); - NW_Ds_DarDelete(dsp_ctx->dispatchers); - NW_Mem_Free(dsp_ctx); - dsp_ctx = NULL; - NW_Ctx_Set(NW_CTX_MSG_DSP,0, NULL); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_msg_epoc32.c --- a/webengine/wmlengine/src/utils/src/nwx_msg_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,507 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_ctx.h" -#include "nwx_msg_api.h" -#include "nwx_datastruct.h" -#include "nwx_psq.h" -#include "nwx_msg_types.h" -#include "nwx_msg_dsp_api_epoc32.h" -#include "nwx_logger.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Function prototype to remove warning. -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -** TODO: This struct is duplicated in nwx_msg_config_epoc32.c, which is down -** right evil. To resolve this, it should be put in a shared-private -** header file. -*/ -/*lint --e{754} local structure member not referenced */ -typedef struct { - NW_Ds_DynamicArray_t *receivers; /* receivers know to this guy */ - NW_Uint16 nextRID; /* next receiver ID */ - NW_Uint16 nextDID; /* next dispatcher ID */ - NW_Msg_Dispatcher_t **g_dispatchers; /* NW_Msg_Startup allocs ; NW_Msg_Shutdown frees */ -} Msg_Context_t; - -typedef struct { - NW_Uint32 name; /* message receiver name */ - NW_Msg_Address_t address; /* the address of this receiver */ - NW_Msg_Dispatcher_t *dispatcher; /* how will handle the dispatching */ -} Msg_Receiver_t; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static Msg_Context_t *Msg_GetThis(void); -static void Msg_SetThis(Msg_Context_t *ctx); -static NW_Uint16 Msg_GetNextRID(Msg_Context_t *ctx); -static Msg_Receiver_t *Msg_GetReceiver(const Msg_Context_t *ctx, - const NW_Msg_Address_t addr); - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -static Msg_Context_t *Msg_GetThis() -{ - return (Msg_Context_t*) NW_Ctx_Get(NW_CTX_MSG_API,0); -} - -static void Msg_SetThis(Msg_Context_t *ctx) -{ - NW_Ctx_Set(NW_CTX_MSG_API,0,ctx); - -} - -static NW_Uint16 Msg_GetNextRID(Msg_Context_t *ctx) -{ - return ctx->nextRID++; -} - - -/********************************************************* -** Name: Msg_GetReceiver -** Description: Return the receiver for a given address -** Parameters: *ctx - pointer to the context -** address - message address to find -** Return Value: the matching receiver or NULL -**********************************************************/ -static Msg_Receiver_t *Msg_GetReceiver(const Msg_Context_t *ctx, - const NW_Msg_Address_t addr) -{ - NW_Int16 loop, count; - Msg_Receiver_t *receiver; - - NW_ASSERT(ctx != NULL); - - count = NW_Ds_DarGetCount(ctx->receivers); - for (loop = 0; loop < count; loop++) { - receiver = (Msg_Receiver_t *)NW_Ds_DarGetElement(ctx->receivers, loop); - if (receiver != NULL) { - if (receiver->address == addr) - return receiver; - } - } - return NULL; -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -/*! - \brief Creates a new messaging system. There will be only one of these <br> - per process. Each messageing system will know about all of the receivers <br> - registered within the process and all of the message dispatchers. - \return The results are <br> - KBrsrSuccess - success <br> - KBrsrOutOfMemory - out of memory <br> -*/ - -/********************************************************* -** Name: NW_Msg_Initialize -** Parameters: qName : Name of msg queue -**********************************************************/ -TBrowserStatusCode NW_Msg_Initialize(const char* qName) - { - Msg_Context_t *ctx; - TBrowserStatusCode ret; - - /* Get a pointer to the context. If it is null - create a new one and store it */ - ctx = Msg_GetThis(); - if (ctx == NULL) - { - ctx = (Msg_Context_t*) NW_Mem_Malloc(sizeof(Msg_Context_t)); - if (ctx == NULL) - { - Msg_SetThis(ctx); - return KBrsrOutOfMemory; - } - ctx->g_dispatchers = NULL; - ctx->nextRID = 1; - ctx->receivers = NW_Ds_DarNew_DefaultHeap(3); - if (ctx->receivers == NULL) - { - NW_Mem_Free(ctx); - ctx = NULL; - Msg_SetThis(ctx); - return KBrsrOutOfMemory; - } - Msg_SetThis(ctx); - } - - /* Initialize the Dispatching system also */ - ret = NW_Msg_DispatcherInitialize(qName); - if (ret == KBrsrOutOfMemory) - { - NW_Ds_DarDelete(ctx->receivers); - ctx->receivers = NULL; - NW_Mem_Free(ctx); - ctx =NULL; - Msg_SetThis(ctx); - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; - } - -/********************************************************* -** Name: NW_Msg_New -** Description: Allocate and initialize a new message. -** Parameters: tid - transaction id of this message -** src - source address of the sender -** dest - destination address -** type - message type -** Return Value: pointer to new message or NULL -**********************************************************/ -NW_Msg_t *NW_Msg_New(const NW_Uint16 tid, const NW_Msg_Address_t src, - const NW_Msg_Address_t dest, const NW_Msg_Type_t type) -{ - NW_Msg_t *msg; - - msg = (NW_Msg_t*) NW_Mem_Malloc(sizeof (NW_Msg_t) ); - if (msg != NULL) { - msg->next = NULL; - msg->dest = dest; - msg->src = src; - msg->type = type; - msg->tid = tid; - msg->status = -1; - msg->data = NULL; - } - - //NW_LOG5(NW_LOG_LEVEL3, - // "Msg New: type %d, src %d, dst %d, tid %d, ptr %x", - // msg->type, msg->src, msg->dest, msg->tid, msg); - - return msg; -} - -/********************************************************* -** Name: NW_Msg_Delete -** Description: Deletes a message -** Parameters: *msg - pointer to the message -** Return Value: void -**********************************************************/ -void NW_Msg_Delete(NW_Msg_t *msg) -{ -#ifdef _DEBUG - NW_Uint32 loop; - char *p = (char *)msg; -#endif - - if (msg != NULL) { - NW_LOG6(NW_LOG_LEVEL3, - "Msg delete: type %d, src %d, dst %d, tid %d, data %x, ptr %x", - msg->type, msg->src, msg->dest, msg->tid, msg->data, msg); - -#ifdef _DEBUG - for (loop=0; loop< sizeof(NW_Msg_t); loop++, p++) { - /*lint -e{569} Loss of information (8 bits to 7 bits)*/ - *p = (unsigned char)0xa1; - } -#endif - - NW_Mem_Free(msg); - } - return; -} - - -/********************************************************* -** Name: NW_Msg_Send -** Description: Sends a message -** Parameters: *msg - pointer to the message -** Return Value: KBrsrSuccess - if the receiver is found - KBrsrFailure - if the receiver or Destination is not found -**********************************************************/ - -TBrowserStatusCode NW_Msg_Send(NW_Msg_t *msg) -{ - Msg_Context_t *ctx = Msg_GetThis(); - Msg_Receiver_t *receiver; - - NW_ASSERT(ctx != NULL); - NW_ASSERT(msg != NULL); - - if (msg->dest < 1) - return KBrsrFailure; - - /* check for receivers in this dispatcher */ - receiver = Msg_GetReceiver(ctx, msg->dest); - if (receiver == NULL) { - /* TODO Add logic for Receiver not in this dispatcher */ - return KBrsrFailure; - } - - NW_LOG6(NW_LOG_LEVEL3, - "sendMsg: type %d, src %d, dst %d, tid %d, data %x, ptr %x", - msg->type, msg->src, msg->dest, msg->tid, msg->data, msg); - - /* Use the dispatcher to send the message */ - NW_Msg_DispatcherSend(receiver->dispatcher, msg); - - return KBrsrSuccess; -} - - -/********************************************************* -** Name: NW_Msg_LookupReceiverByName -** Description: Lookup address of receiver from name -** Parameters: name - name known by sender -** *addr - address returned -** Return Value: KBrsrSuccess or KBrsrUnexpectedError -** or KBrsrOutOfMemory -**********************************************************/ -TBrowserStatusCode NW_Msg_LookupReceiverByName(const NW_Msg_RName_t name, - NW_Msg_Address_t *addr) -{ - Msg_Context_t *ctx = Msg_GetThis(); - Msg_Receiver_t *receiver; - NW_Msg_Dispatcher_t *dispatcher; - NW_Uint16 loop, count; - - NW_ASSERT(ctx != NULL); - NW_ASSERT(addr != NULL); - - /* Go through the list of receivers and find the one requested */ - count = NW_Ds_DarGetCount(ctx->receivers); - for (loop = 0; loop < count; loop++) { - receiver = (Msg_Receiver_t *)NW_Ds_DarGetElement(ctx->receivers, loop); - if (receiver != NULL) { - if (name == receiver->name) { - *addr = receiver->address; - return KBrsrSuccess; - } - } - } - - /* We haven't send this receiver yet, so go ask the Message - Dispatching layer about this receiver */ - dispatcher = NW_Msg_LookupDispatcherByName(name); - if (dispatcher == NULL) { - NW_ASSERT(dispatcher == NULL); - return KBrsrUnexpectedError; - } - - /* Create a new receiver record and add it */ - receiver = (Msg_Receiver_t*) NW_Mem_Malloc(sizeof(Msg_Receiver_t)); - if (receiver == NULL) - return KBrsrOutOfMemory; - receiver->dispatcher = dispatcher; - receiver->name = name; - receiver->address = Msg_GetNextRID(ctx); - if (NW_Ds_DarAppend(ctx->receivers, receiver) != KBrsrSuccess) - { - *addr = NULL; - return KBrsrOutOfMemory; - } - - /* Return the address */ - *addr = receiver->address; - return KBrsrSuccess; - -} - -/********************************************************* -** Name: NW_Msg_GetThisReceiver -** Description: Return address of current receiver -** Parameters: *addr - address returned -** Return Value: KBrsrSuccess or KBrsrUnexpectedError -** or KBrsrFailure -**********************************************************/ - -TBrowserStatusCode NW_Msg_GetThisReceiver(NW_Msg_Address_t *addr) -{ - Msg_Context_t *ctx = Msg_GetThis(); - Msg_Receiver_t *receiver; - NW_Msg_Dispatcher_t *dispatcher; - NW_Uint16 loop, count; - - NW_ASSERT(ctx != NULL); - NW_ASSERT(addr != NULL); - - /* First get the This dispatcher */ - dispatcher = NW_Msg_GetThisDispatcher(); - if (dispatcher == NULL) { - NW_ASSERT(dispatcher == NULL); - return KBrsrUnexpectedError; - } - - /* Go thru the list of receivers and find one that uses - the dispatcher we just found*/ - count = NW_Ds_DarGetCount(ctx->receivers); - for (loop = 0; loop < count; loop++) { - receiver = (Msg_Receiver_t *)NW_Ds_DarGetElement(ctx->receivers, loop); - if (receiver != NULL) { - if (dispatcher == receiver->dispatcher) { - *addr = receiver->address; - return KBrsrSuccess; - } - } - } - - return KBrsrFailure; -} - - -/********************************************************* -** Name: NW_Msg_Reinit -** Description: Reinitializes a message's fields -** Parameters: *msg - pointer to the message -** tid - transaction id of this message -** dest - destination address -** src - source address of the sender -** type - message type -** status - message status -** *data - pointer to the message data -** Return Value: void -**********************************************************/ -void NW_Msg_Reinit(NW_Msg_t *msg, const NW_Uint16 tid, const NW_Msg_Address_t dest, - const NW_Msg_Address_t src, const NW_Msg_Type_t type, - const TBrowserStatusCode status, void *data) -{ - NW_ASSERT(msg != NULL); - - if (msg != NULL) { - msg->tid = tid; - msg->dest = dest; - msg->src = src; - msg->type = type; - msg->status = status; - msg->data = data; - } - return; -} - - -/********************************************************* -** Name: NW_Msg_Reply -** Description: Send a message back to previous source -** Parameters: *msg - pointer to the message -** type - message type -** Return Value: status -** Note: if status is not KBrsrSuccess, caller must -** delete the message data, if any. -**********************************************************/ -TBrowserStatusCode NW_Msg_Reply(NW_Msg_t *msg, const NW_Msg_Type_t type) -{ - TBrowserStatusCode status; - NW_Msg_Address_t temp; - - NW_ASSERT(msg != NULL); - - /* Send this message back to the source address from this receiver address */ - temp = msg->src; - msg->src = msg->dest; - msg->dest = temp; - msg->type = type; - - /* Note: Caller must delete the message data (if it is not NULL) if failure */ - status = NW_Msg_Send(msg); - if (status != KBrsrSuccess) { - NW_Msg_Delete(msg); - } - - return status; -} - - -/********************************************************* -** Name: NW_Msg_Forward -** Description: Send a message on to another destination -** Parameters: *msg - pointer to the message -** dest - destination address -** type - message type -** Return Value: status -** Note: if status is not KBrsrSuccess, caller must -** delete the message data, if any. -**********************************************************/ -TBrowserStatusCode NW_Msg_Forward(NW_Msg_t *msg, const NW_Msg_Address_t dest, - const NW_Msg_Type_t type) -{ - TBrowserStatusCode status; - - NW_ASSERT(msg != NULL); - - /* Send this message on to a new destination address from this receiver address */ - msg->src = msg->dest; - msg->dest = dest; - msg->type = type; - - /* Note: Caller must delete the message data (if it is not NULL) if failure */ - status = NW_Msg_Send(msg); - if (status != KBrsrSuccess) { - NW_Msg_Delete(msg); - } - - return status; -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_multipart_generator.cpp --- a/webengine/wmlengine/src/utils/src/nwx_multipart_generator.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 1998-1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_defs.h" -#include "nwx_http_defs.h" -#include "nwx_string.h" -#include "nw_loadreq.h" -#include "nwx_multipart_generator.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/************************************************************************ - - Function: NW_StoreUint - - Description: Store a number into a buffer - - Parameters: p - in: The buffer to store in - i - in: The number to store - - Return Value: The new offset in the buffer - -**************************************************************************/ -NW_Byte* NW_StoreUint(NW_Byte* p, NW_Uint32 i) -{ - NW_Byte* pI; - NW_Uint32 j = i; - - NW_ASSERT(p != NULL); - - pI = (NW_Byte*)(&j); - NW_Mem_memcpy(p, pI, sizeof(NW_Uint32)); - return p + sizeof(NW_Uint32); -} - - -/************************************************************************ - - Function: NW_CreateMultipartSegment - - Description: Construct a multipart segment. It is the caller's - responsibility to delete the resulting buffer. - - Parameters: encoding - in: character encoding - contentTypeString - in: eg HTTP_application_xhtml_xml_string - contentLocation - in: content location header - data - in: Data for multipart segment - dataLen - in: Length of data - result - out: Resultant allocated buffer - resultLen - out: Length of output buffer - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - -**************************************************************************/ -TBrowserStatusCode NW_CreateMultipartSegment -( - NW_Uint32 encoding, - NW_Uint32 oriEncoding, - NW_Http_ContentTypeString_t contentTypeString, - char* contentLocation, - const NW_Byte* data, - NW_Uint32 dataLen, - NW_Byte** result, - NW_Uint32* resultLen -) -{ - NW_Byte *p = NULL; - NW_Uint32 urlLen; - NW_Uint32 contentTypeStrLen; - NW_Uint32 len; - const char* version = SAVED_DECK_VERSION; - - NW_ASSERT(data != NULL || dataLen == 0); - NW_ASSERT(contentLocation != NULL); - NW_ASSERT(result != NULL); - NW_ASSERT(resultLen != NULL); - NW_ASSERT(contentTypeString != NULL); - - urlLen = NW_Asc_strlen(contentLocation); - contentTypeStrLen = NW_Asc_strlen((char*)contentTypeString); - - /* - 4 bytes for URL length + 4 byte for content charset + 4 byte for original charset - 4 bytes for content string length + 4 bytes for dataLen + NULL terminator for URL + - NULL terminator for body + NULL terminator for contentTypeString. - These NULL terminators will be used when the file is loaded to determine the validity of the file. - */ - len = 23 + urlLen + contentTypeStrLen + dataLen + NW_Asc_strlen(version); - - *result = (NW_Byte*) NW_Mem_Malloc(len); - if (*result == NULL) - return KBrsrOutOfMemory; - *resultLen = len; - - p = *result; - - // Put the version - NW_Asc_strcpy((char*)p, version); - p += NW_Asc_strlen(version); - - // Put the length of the URL; - p = NW_StoreUint(p, urlLen); - // Copy the Url - NW_Asc_strcpy((char*)p, contentLocation); - p = p + urlLen + 1; // skip the NULL terminator - - // Put the length of the content type string; - p = NW_StoreUint(p, contentTypeStrLen); - // Copy the content type string - NW_Asc_strcpy((char*)p, (char*)contentTypeString); - p = p + contentTypeStrLen + 1; // skip the NULL terminator - - // Characterset - p = NW_StoreUint(p, encoding); - // save original encoding for saved page - p = NW_StoreUint(p, oriEncoding); - - // dataLen - p = NW_StoreUint(p, dataLen); - NW_Mem_memcpy(p, data, dataLen); - p += dataLen; - *p = '\0'; - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_osu_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_osu_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,445 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides interfaces to common system utilities like; -* threads, mutexes, etc -* -*/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <e32std.h> -#include <string.h> -#include "nwx_ctx.h" -#include "nwx_osu_epoc32.h" -#include "nwx_logger.h" -#include "nwx_string.h" -//#include <ls_std.h> -//#include <kernel/ls_std.h> - -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ -typedef struct - { - RMutex iMutex; - } NW_Osu_Mutex_Struct_t; - -/* We use a Semaphore obj as a singal object */ -typedef struct - { - RSemaphore iSemaphore; - } NW_Osu_Signal_Struct_t; - -//#define NW_OSU_THREAD_T_CAST(expr) ((NW_Osu_Thread_Struct_t*)(expr)) -//#define NW_OSU_SEMAPHORE_T_CAST(expr) ((NW_Osu_Signal_Struct_t*)(expr)) -#define NW_OSA_MUTEX_T_CAST(expr) ((NW_Osu_Mutex_Struct_t*) (expr)) -#define NW_OSU_SIGNAL_T_CAST(expr) ((NW_Osu_Signal_Struct_t*)(expr)) - - -typedef struct { - NW_Osu_Mutex_t g_NW_CriticalSectionMutex; - NW_Osu_ThreadId_t gThread_Id; -} Osu_Context_t; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static Osu_Context_t *Osu_GetContext(); -static Osu_Context_t* OsuInitialize(); - - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static Osu_Context_t *Osu_GetContext() -{ - Osu_Context_t* context; - - context = (Osu_Context_t*)NW_Ctx_Get(NW_CTX_OSU, 0); - if (context == NULL) - { - context = OsuInitialize(); - NW_Ctx_Set(NW_CTX_OSU, 0, context); - } - - return context; -} - - -/***************************************************************** -** Name: OsuInitialize -** Description: creates the Osu context and stores it -** Parameters: -** Return Value: -******************************************************************/ -static Osu_Context_t* OsuInitialize() -{ - Osu_Context_t *context; - - context = (Osu_Context_t*)NW_Ctx_Get(NW_CTX_OSU, 0); - if (context == NULL) - { - context = new Osu_Context_t; - - //lint -e{774} Significant prototype coercion - if (context != NULL) { - context->g_NW_CriticalSectionMutex = NW_Osu_NewMutex("Critical Section"); - if (context->g_NW_CriticalSectionMutex != NULL) { - context->gThread_Id = 0; - NW_Ctx_Set(NW_CTX_OSU, 0, context); - return context; - } - delete context; - } - } - - return NULL; -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Osu_NewMutex -** Description: creates a new mutex object -** Parameters: *name - name of mutex for debug logging -** Return Value: handle to new mutex object or NULL -******************************************************************/ -NW_Osu_Mutex_t NW_Osu_NewMutex(const char *name) -{ - NW_Osu_Mutex_Struct_t* m = new NW_Osu_Mutex_Struct_t; - - //lint -e{774} Significant prototype coercion - if (!m) - return NULL; - - if (name == NULL) - { - NW_LOG0(NW_LOG_LEVEL5, "osi_newMutex NoName\n"); - _LIT(KNoName, "NW_OS_Mutex_NoName"); - if(m->iMutex.OpenGlobal(KNoName, EOwnerProcess) != KErrNone) - (void) m->iMutex.CreateGlobal(KNoName, EOwnerProcess); - } - else - { - _LIT(KMutexBaseName, "NW_OS_Mutex_%s"); -#if defined(_UNICODE) - NW_Ucs2* wName = NW_Str_CvtFromAscii(name); - if (!wName) - { - delete m; - return NULL; - } - NW_LOG1(NW_LOG_LEVEL5, "osi_newMutex %s\n",wName); - NW_Uint32 wNameLen = NW_Str_Strlen(wName); - HBufC16* mutexName = HBufC16::New((TInt) (13+1+wNameLen)); - if (!mutexName) - { - NW_Str_Delete(wName); - delete m; - return NULL; - } - mutexName->Des().Format(KMutexBaseName, wName); - NW_Str_Delete(wName); -#else - NW_Uint32 nameLen = strlen(name); - HBufC8* mutexName = HBufC8::New((TInt) (13+1+nameLen)); - mutexName->Des().Format(KMutexBaseName, name); -#endif - if(m->iMutex.OpenGlobal(mutexName->Des(), EOwnerProcess) != KErrNone) - (void) m->iMutex.CreateGlobal(mutexName->Des(), EOwnerProcess); - delete mutexName; - } - - return m; -} - -/***************************************************************** -** Name: NW_Osu_UnlockMutex -** Description: unlocks a mutex -** Parameters: handle - handle to the mutex object -** Return Value: STAT_SUCCESS -******************************************************************/ -TBrowserStatusCode NW_Osu_UnlockMutex(NW_Osu_Mutex_t handle) -{ - NW_ASSERT(handle != NULL); - NW_LOG1(NW_LOG_LEVEL5, "osi_unlockMutex %d\n",handle); - NW_OSA_MUTEX_T_CAST(handle)->iMutex.Signal(); - - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Osu_LockMutex -** Description: wait indefintely for a mutex and then lock it -** Parameters: handle - handle to the mutex object -** Return Value: STAT_SUCCESS -** Note: does *NOT* wait if called in succesion from the same -** thread in order to prevent deadlocks. -******************************************************************/ -TBrowserStatusCode NW_Osu_LockMutex(NW_Osu_Mutex_t handle) -{ - NW_ASSERT(handle != NULL); - NW_LOG1(NW_LOG_LEVEL5, "osi_lockMutex %d\n",handle); - - NW_OSA_MUTEX_T_CAST(handle)->iMutex.Wait(); - return KBrsrSuccess; -} - - -/***************************************************************** -** Name: NW_Osu_DeleteMutex -** Description: deletes a mutex object -** Parameters: handle - handle to the mutex object -** Return Value: void -** Note: mutex object *MUST* no longer be in use by *ANY* thread -******************************************************************/ -void NW_Osu_DeleteMutex(NW_Osu_Mutex_t handle) -{ - NW_ASSERT(handle != NULL); - NW_LOG1(NW_LOG_LEVEL5, "osi_deleteMutex %d\n", handle); - - NW_OSA_MUTEX_T_CAST(handle)->iMutex.Close(); - delete handle; -} - - -/******************************************************* -** Name: NW_Osu_BeginCriticalSection -** Description: Begins the Execution of a Critical Section -** Parameters: -** Return Value: KBrsrSuccess or KBrsrUnexpectedError -******************************************************************/ -TBrowserStatusCode NW_Osu_BeginCriticalSection() -{ - Osu_Context_t *ctx = Osu_GetContext(); - if(ctx == NULL) - return KBrsrOutOfMemory; - - NW_Osu_LockMutex(ctx->g_NW_CriticalSectionMutex); - - return KBrsrSuccess; -} - -/******************************************************* -** Name: NW_Osu_EndCriticalSection -** Description: Ends the Execution of a Critical Section -** Parameters: -** Return Value: -******************************************************************/ -TBrowserStatusCode NW_Osu_EndCriticalSection() -{ - Osu_Context_t *ctx = Osu_GetContext(); - NW_Osu_UnlockMutex(ctx->g_NW_CriticalSectionMutex); - - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Osu_NewSignal -** Description: creates a new signal object -** Parameters: *name - name of signal for debug logging -** Return Value: handle to new signal object or NULL -******************************************************************/ -NW_Osu_Signal_t NW_Osu_NewSignal(const char *name) -{ - NW_Osu_Signal_Struct_t* handle = new NW_Osu_Signal_Struct_t; -/* NW_ASSERT(handle != NULL); */ - - //lint -e{774} Significant prototype coercion - if (handle == NULL) - return handle; - -#if defined(_UNICODE) - NW_Ucs2* wName = NW_Str_CvtFromAscii(name); - if (!wName) - { - delete handle; - return NULL; - } - TPtrC semaphoreName(wName, NW_Str_Strlen(wName)); - NW_LOG2(NW_LOG_LEVEL5, "osi_createSignal %d %s\n", handle, wName); -#else - TPtrC semaphoreName((const unsigned char*)name, strlen(name)); -#endif - - TInt ret = - NW_OSU_SIGNAL_T_CAST(handle)->iSemaphore.CreateGlobal(semaphoreName, - 0, EOwnerProcess); - - /* Something wrong with the name */ - if (ret < 0) { - /* Max Thread Id is 11 digits long ; hardset buflength to account for that - 16 + 11 + 1 = 28 */ - TBuf<28> semaphoreName2; - _LIT(KSemBaseName, "NW_OS_Semaphore_%d"); - semaphoreName2.Format(KSemBaseName, NW_Osu_GetCurrentThreadId()); - ret = NW_OSU_SIGNAL_T_CAST(handle)->iSemaphore.CreateGlobal(semaphoreName2, - 0, EOwnerProcess); - } - -#if defined(_UNICODE) - NW_Str_Delete(wName); -#endif - - return handle; -} - -/***************************************************************** -** Name: NW_Osu_NotifySignal -** Description: sets signal object and notifies any waiting threads -** Parameters: handle - handle to the signal object -** Return Value: STAT_SUCCESS -******************************************************************/ -TBrowserStatusCode NW_Osu_NotifySignal(NW_Osu_Signal_t handle) -{ - NW_ASSERT(handle != NULL); - NW_LOG1(NW_LOG_LEVEL5, "osi_notifySignal %d\n", handle); - - NW_OSU_SIGNAL_T_CAST(handle)->iSemaphore.Signal(); - - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Osu_WaitOnSignal -** Description: wait for a signal to be set -** Parameters: handle - handle to the signal object -** howLong - number of mSec to wait or NW_WAIT_FOREVER -** Return Value: STAT_SUCCESS is object is signaled, else STAT_WAIT_TIMEOUT -******************************************************************/ -TBrowserStatusCode NW_Osu_WaitOnSignal(NW_Osu_Signal_t handle, const NW_Int32 howLong) -{ - NW_REQUIRED_PARAM(howLong); - - /*TODO: to add a time waited signal function... */ - /*However, EPOC port might not need it anyway. */ - /*NW_Int32 wait = howLong; */ - - NW_ASSERT(handle != NULL); - NW_LOG2(NW_LOG_LEVEL5, "osi_waitSignal %d, %d\n", handle, howLong); - - /*if (wait == NW_WAIT_FOREVER) - wait = INFINITE; */ - - /*TODO: Impletement a time waited semaphore class to use it here. - Right now we just assume all wait all forever. This can be - dangerous. */ - NW_OSU_SIGNAL_T_CAST(handle)->iSemaphore.Wait(); - - return KBrsrSuccess; -} - -/***************************************************************** -** Name: NW_Osu_DeleteSignal -** Description: deletes a signal object -** Parameters: handle - handle to the signal object -** Return Value: void -** Note: signal object *MUST* no longer be in use by *ANY* thread -******************************************************************/ -void NW_Osu_DeleteSignal(NW_Osu_Signal_t handle) -{ - NW_ASSERT(handle != NULL); - NW_LOG1(NW_LOG_LEVEL5, "osi_deleteSignal %d\n", handle); - - NW_OSU_SIGNAL_T_CAST(handle)->iSemaphore.Close(); - delete handle; -} - -/***************************************************************** -** Name: NW_Osu_GetCurrentThreadId -** Description: gets ID of the current thread -** Parameters: none -** Return Value: ID of the thread -******************************************************************/ -NW_Osu_ThreadId_t NW_Osu_GetCurrentThreadId() -{ - Osu_Context_t *ctx = Osu_GetContext(); - if (ctx == NULL) - return 0; - - return ctx->gThread_Id; -} - -/***************************************************************** -** Name: NW_Osu_Wait -** Description: Waits for the specified number of microseconds -** Parameters: anInterval: Number of microseconds to wait -** Return Value: void -******************************************************************/ -void NW_Osu_Wait(NW_Int32 anInterval) -{ - User::After((TTimeIntervalMicroSeconds32)anInterval); -} - -/***************************************************************** -** Name: NW_Osu_DeleteContext -** Description: Deletes the Osu context -** Parameters: -** Return Value: -******************************************************************/ -void NW_Osu_DeleteContext() -{ - Osu_Context_t *ctx = Osu_GetContext(); - - if (ctx == NULL) - return; - - /* This may cause problems if the Mutex is being used. The intention - is to only use this function for cleaning up; more work may - need to be done. */ - NW_Osu_DeleteMutex(ctx->g_NW_CriticalSectionMutex); - - delete ctx; - NW_Ctx_Set(NW_CTX_OSU, 0, NULL); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_osu_file_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_osu_file_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,372 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation a simple file system interface for EPOC platform. -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <e32def.h> -#include "nwx_string.h" -#include "nwx_osu_file.h" -#include "nwx_logger.h" -#include "nwx_settings.h" - -#include <f32file.h> -#include <sysutil.h> -#include "BrsrStatusCodes.h" - - -/* -**------------------------------------------------------------------------- -** Defines -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ -typedef struct { - RFile* file; - RFs* fs; -} NW_File_Handle_t; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -/***************************************************************** -** Name: NW_File_Handle_Free -** Description: Free File Handle structure and its contents -** Parameters: file_handle -** Return Value: none -** -******************************************************************/ -void NW_File_Handle_Free(NW_File_Handle_t *file_handle) -{ - if (file_handle) - { - if (file_handle->file) - { - file_handle->file->Close(); - delete file_handle->file; - } - if (file_handle->fs) - { - file_handle->fs->Close(); - delete file_handle->fs; - } - NW_Mem_Free(file_handle); - } -} - -/***************************************************************** -** Name: NW_Bad_Handle -** Description: Check for valid File Handle pointer and contents -** Parameters: file_handle -** Return Value: NW_TRUE - if handle is not valid -** NW_FALSE - if handle is valid -******************************************************************/ -NW_Bool NW_Bad_Handle(NW_Osu_File_t handle) -{ - NW_File_Handle_t *file_handle = (NW_File_Handle_t *) handle; - - if (!file_handle) - return NW_TRUE; - - if (file_handle == NW_INVALID_FILE_HANDLE) - return NW_TRUE; - - if (!file_handle->fs) - return NW_TRUE; - - if (!file_handle->file) - return NW_TRUE; - - return NW_FALSE; -} - - -/***************************************************************** -** Name: NW_File_Handle_new -** Description: Allocate File Handle structure and its contents -** Parameters: none -** Return Value: NULL - if allocation failed -** pointer to alloc'd file handle structure -******************************************************************/ -NW_File_Handle_t* NW_File_Handle_New(void) -{ - NW_File_Handle_t *file_handle; - - file_handle = (NW_File_Handle_t *) NW_Mem_Malloc(sizeof(NW_File_Handle_t)); - if (file_handle == NULL) - { - return NULL; - } - - file_handle->fs = new RFs; - if (file_handle->fs == NULL) - { - NW_Mem_Free(file_handle); - return NULL; - } - - file_handle->file = new RFile; - if (file_handle->file == NULL) - { - delete file_handle->fs; - NW_Mem_Free(file_handle); - return NULL; - } - - return file_handle; -} - - -/***************************************************************** -** Name: NW_ConvertFilename -** Description: Convert all "/" in filename to "\" since EPOC -** File operations don't like "/" chars. Prepends a -** '\' character if the filename includes directories, -** and doesn't already start with one. -** Parameters: pointer to incoming filename string -** Return Value: NULL - if allocation failed -** pointer - to new filename string **needs to be freed by caller -******************************************************************/ -NW_Ucs2 *NW_ConvertFilename(const NW_Ucs2 *filename) - { - NW_Ucs2 *tmp = NULL; - - if (filename == NULL) - return NULL; - - // If there is already a '\' or '/' or a 'c:\' at the front, or there are - // no directories in the path, then just convert the '/' characters. - // Otherwise first prepend a '\'. - if ( filename[0] == '\\' || filename[0] == '/' || NW_Str_Strchr(filename, ':') || - ( !NW_Str_Strchr(filename, '\\') && !NW_Str_Strchr(filename, '/') ) ) - { - tmp = NW_Str_Newcpy(filename); - if (tmp == NULL) - return NULL; - } - else - { - tmp = NW_Str_New(NW_Str_Strlen(filename) + 1); - if (tmp == NULL) - return NULL; - tmp[0] = '\\'; - NW_Str_Strcpy(&(tmp[1]), filename); - } - - NW_Str_Strcharreplace(tmp, '/', '\\'); - return tmp; - } - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Osu_CreateNewFile -** Description: Create a new file and open it for write access. -** Parameters: *name - pathname of file -** Return Value: file handle if file created, otherwise NW_INVALID_FILE_HANDLE -******************************************************************/ -NW_Osu_File_t NW_Osu_CreateNewFile(const NW_Ucs2 *name) -{ - - NW_Ucs2 *tmp = NW_ConvertFilename(name); - if (tmp == NULL) - { - return NW_INVALID_FILE_HANDLE; - } - - NW_Osu_File_t handle = NW_INVALID_FILE_HANDLE ; - TPtrC filename(tmp); - - NW_File_Handle_t *file_handle = NW_File_Handle_New(); - if (file_handle == NULL) - { - NW_Str_Delete(tmp); - return NW_INVALID_FILE_HANDLE; - } - - RFs *fs = file_handle->fs; - RFile *file = file_handle->file; - - TInt result = fs->Connect(); - if (result) - { - NW_File_Handle_Free(file_handle); - NW_Str_Delete(tmp); - return NW_INVALID_FILE_HANDLE; - } - - if (( result = file->Create(*fs, filename, EFileShareExclusive)) == KErrNone) - handle = (NW_Osu_File_t) file_handle; - else - NW_File_Handle_Free(file_handle); - - NW_Str_Delete(tmp); - return handle; -} - -/***************************************************************** -** Name: NW_Osu_CloseFile -** Description: Close an open file. -** Parameters: handle - file handle -** Return Value: void -******************************************************************/ -void NW_Osu_CloseFile(NW_Osu_File_t handle) -{ - if (NW_Bad_Handle(handle)) - return; - - NW_File_Handle_t *file_handle = (NW_File_Handle_t *) handle; - - NW_File_Handle_Free(file_handle); - - return; -} - -/***************************************************************** -** Name: NW_Osu_WriteFile -** Description: Write bytes to a file. -** Parameters: handle - file handle returned from NW_Osu_CreateNewFile -** *buffer - pointer to buffer to write from -** numToWrite - number of bytes to write -** Return Value: KBrsrSuccess if all bytes written, else failure status -******************************************************************/ -TBrowserStatusCode NW_Osu_WriteFile(NW_Osu_File_t handle, NW_Byte *buffer, const NW_Uint32 numToWrite) -{ - if (NW_Bad_Handle(handle)) - return KBrsrFailure; - - NW_File_Handle_t *file_handle = (NW_File_Handle_t *) handle; - - NW_LOG1(NW_LOG_LEVEL1, "===writeFile===: before checking critical level. numToWrite=%d", numToWrite); - /* Disk CL check */ - TBool statusCL = EFalse; - RFs *fs = file_handle->fs; - - TRAPD(ret, statusCL = SysUtil::DiskSpaceBelowCriticalLevelL (fs, numToWrite, EDriveC) ) - if (ret != KErrNone || statusCL) - { - NW_LOG3(NW_LOG_LEVEL1, "===writeFile===: critical level reached. ret=%d, statusCL=%d, numToWrite=%d", ret, statusCL, numToWrite); - return KBrsrFileDiskFullError; - } - NW_LOG3(NW_LOG_LEVEL1, "===writeFile===: critical level NOT reached. ret=%d, statusCL=%d, numToWrite=%d", ret, statusCL, numToWrite); - - NW_ASSERT(buffer != NULL); - - if (numToWrite == 0) - return KBrsrSuccess; - - RFile *file = file_handle->file; - - /* Note: if buffer size < numToRead, then "write_buffer" will panic - */ - TPtrC8 write_buffer(buffer,numToWrite); - TInt result = file->Write( write_buffer); - if (result == KErrNone) - { - result = file->Flush(); // ensure data is commited to file before closing - } - - switch (result) { - case KErrNone: - return KBrsrSuccess; - case KErrDiskFull: - return KBrsrFileDiskFullError; - default: - return KBrsrFileWriteError; - } -} - -/***************************************************************** -** Name: NW_Osu_Delete -** Description: Delete an existing file. -** Parameters: *pathname - pathname of file -** Return Value: KBrsrSuccess if file deleted, else KBrsrFailure -******************************************************************/ -TBrowserStatusCode NW_Osu_Delete(const NW_Ucs2 *pathname) -{ - NW_ASSERT(pathname != NULL); - - - NW_Ucs2 *tmp = NW_ConvertFilename(pathname); - if (tmp == NULL) - return KBrsrFailure; - - RFs fs; - TInt result = fs.Connect(); - if (result) - { - NW_Str_Delete(tmp); - return KBrsrFailure; - } - - TPtrC filename(tmp); - - result = fs.Delete(filename); - fs.Close(); - if (result) - { - NW_Str_Delete(tmp); - return KBrsrFailure; - } - else - { - NW_Str_Delete(tmp); - return KBrsrSuccess; - } -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_psq.c --- a/webengine/wmlengine/src/utils/src/nwx_psq.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** - - File name: nwx_psq.c - Part of: Protected Signaled Queue - Version: V1.0 - Description: - Provides interfaces to a Protected, Signaled, Queue. This is a queue that - can be have multiple readers and writers running in separate threads. - When something is added to the queue a signal is set. - -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_psq.h" -#include "nwx_string.h" -#include "nwx_logger.h" -#include "nwx_datastruct.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Psq_New -** Description: Creates a new Psq object. -** Parameters: *name - name of queue for debugging -** Return Value: a pointer to the new Psq object or NULL -******************************************************************/ -NW_Psq_t *NW_Psq_New(const char *name) -{ - NW_Psq_t *que; - - NW_ASSERT(name != NULL); - - que = (NW_Psq_t*) NW_Mem_Malloc(sizeof(NW_Psq_t)); - if (que != NULL) { - que->head = NULL; - que->tail = NULL; - que->length = 0; - que->signal = (NW_Osu_Signal_t*) NW_Osu_NewSignal(name); - if (que->signal == NULL) - { - NW_Mem_Free(que); - return NULL; - } - que->mutex = (NW_Osu_Mutex_t*) NW_Osu_NewMutex(name); - if (que->mutex == NULL) - { - NW_Osu_DeleteSignal(que->signal); - NW_Mem_Free(que); - return NULL; - } - que->name = NW_Str_CvtFromAscii(name); - if (que->name == NULL) { - NW_Osu_DeleteSignal(que->signal); - NW_Osu_DeleteMutex(que->mutex); - NW_Mem_Free(que); - return NULL; - } - } - return que; -} - -/***************************************************************** -** Name: NW_Psq_Delete -** Description: Delete a Psq object -** Parameters: *que - a pointer to the queue -** Return Value: void -** Note: caller *must* insure that both signal and mutex -** are no longer in use prior to deleting the Psq object. -******************************************************************/ -void NW_Psq_Delete(NW_Psq_t *que) -{ - NW_ASSERT(que != NULL); - - if (que->signal != NULL) - NW_Osu_DeleteSignal(que->signal); - if (que->mutex != NULL) - NW_Osu_DeleteMutex(que->mutex); - if (que->name != NULL) - NW_Str_Delete(que->name); - NW_Mem_Free(que); - - return; -} - -/***************************************************************** -** Name: NW_Psq_AddTail -** Description: Add a new node to the tail of the queue -** Parameters: *que - a pointer to the queue -** *node - pointer to the new node -** Return Value: void -******************************************************************/ -void NW_Psq_AddTail(NW_Psq_t *que, NW_Node_t *node) -{ - NW_ASSERT(que != NULL); - NW_ASSERT(node != NULL); - NW_LOG2(NW_LOG_LEVEL5, "addTail on queue %s length %d\n", - que->name, que->length); - - /* lock the mutex and wait as long as needed */ - NW_Osu_LockMutex(que->mutex); - - /* do the add */ - if (que->head == NULL) { - que->head = node; - } else { - que->tail->next = node; - } - que->tail = node; - que->tail->next = NULL; - que->length++; - - /* unlock the mutex and set signal */ - NW_Osu_UnlockMutex(que->mutex); - NW_Osu_NotifySignal(que->signal); - return; -} - -/***************************************************************** -** Name: NW_Psq_RemoveHead -** Description: Return node from the head of the queue and remove it -** Parameters: *que - a pointer to the queue -** Return Value: pointer to removed node -******************************************************************/ -NW_Node_t *NW_Psq_RemoveHead(NW_Psq_t *que) -{ - NW_Node_t *tmp=NULL; - - NW_ASSERT(que != NULL); - NW_LOG2(NW_LOG_LEVEL5, "removeHead on queue %s length %d\n", - que->name, que->length); - - /* lock the mutex and wait as long as needed */ - NW_Osu_LockMutex(que->mutex); - - /* do the remove */ - if (que->head != NULL) { - tmp = que->head; - que->head = tmp->next; - if (que->head == NULL) - que->tail = NULL; - que->length--; - } - - /* unlock the mutex */ - NW_Osu_UnlockMutex(que->mutex); - - /* return the node */ - return tmp; -} - -/***************************************************************** -** Name: NW_Psq_WaitForAdd -** Description: Wait for a node to be added to the queue -** Parameters: *que - a pointer to the queue -** howLong - number mSec to wait or NW_WAIT_FOREVER -** Return Value: KBrsrSuccess if node is queued, else KBrsrWaitTimeout -******************************************************************/ -TBrowserStatusCode NW_Psq_WaitForAdd(const NW_Psq_t *que, const NW_Int32 howLong) -{ - /* NW_LOG1(NW_LOG_ALL, "wait on queue %s\n", que->name); */ - return NW_Osu_WaitOnSignal(que->signal, howLong); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_settings_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_settings_epoc32.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,624 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides interfaces to user agent settings. -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <bldvariant.hrh> -#include <e32def.h> // resolves NULL redefinition warning - -#include "CBrowserSettings.h" -#include "nwx_settings.h" -#include "nwx_http_defs.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_GetGateway -** Description: Get the gateway configuration from the settings -** Parameters: None -** Return Value: pointer to the allocated string or NULL. -** The caller has to free the memory. -******************************************************************/ -NW_Ucs2 *NW_Settings_GetGateway(void) -{ - return NULL; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_SetGateway -** Description: Set the gateway configuration for the settings -** Parameters: *gateway - a pointer to the gateway settings -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetGateway(const NW_Ucs2 *gateway) -{ - NW_REQUIRED_PARAM(gateway); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetHomepage -** Description: Gets the homepage from the settings -** Parameters: None -** Return Value: pointer to the allocated string or NULL. -** The caller has to free the memory. -******************************************************************/ -NW_Bool NW_Settings_GetStartFromHomepage(void) -{ - return CBrowserSettings::Instance()->GetStartFromHomepage(); -} - -/***************************************************************** -** Name: NW_Settings_GetEcmaScriptEnabled -** Description: Gets the EcmaScriptEnabled flag in the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetEcmaScriptEnabled(void) -{ - return CBrowserSettings::Instance()->GetEcmaScriptEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetEcmaScriptEnabled -** Description: Sets the EcmaScriptEnabled flag in the settings -** Parameters: NW_Bool isEcmaScriptEnabled -** Return Value: void -******************************************************************/ -void NW_Settings_SetEcmaScriptEnabled(NW_Bool isEnabled) -{ - CBrowserSettings::Instance()->SetEcmaScriptEnabled(isEnabled); -} - -/***************************************************************** -** Name: NW_Settings_GetFontSizeLevel -** Description: Gets the fonts size level from the settings -** Parameters: None -** Return Value: the stored value -******************************************************************/ -NW_Uint8 NW_Settings_GetFontSizeLevel(void) -{ - return CBrowserSettings::Instance()->GetFontSizeLevel(); -} - -/***************************************************************** -** Name: NW_Settings_SetFontSizeLevel -** Description: Sets the fonts size level to the settings -** Parameters: fontSizeLevel - new value -** Return Value: NW_Bool -- NW_TRUE is success -******************************************************************/ -NW_Bool NW_Settings_SetFontSizeLevel(NW_Uint8 fontSizeLevel) -{ - CBrowserSettings::Instance()->SetFontSizeLevel(fontSizeLevel); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_Encoding -** Description: Gets the encoding from the settings -** Parameters: None -** Return Value: the stored value -******************************************************************/ -NW_Uint16 NW_Settings_GetEncoding(void) -{ - NW_Uint16 customerEncoding; - customerEncoding = CBrowserSettings::Instance()->GetEncoding(); - if(customerEncoding > EDummyLast) - return EISO8859_1; - else - return customerEncoding; -} - -/***************************************************************** -** Name: NW_Settings_SetEncoding -** Description: Sets the encoding to the settings -** Parameters: fontSizeLevel - new value -** Return Value: NW_Bool -- NW_TRUE is success -******************************************************************/ -NW_Bool NW_Settings_SetEncoding(NW_Uint16 encoding) -{ - CBrowserSettings::Instance()->SetEncoding(encoding); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetCookieEnabled -** Description: Gets the Http Cookies enabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetCookiesEnabled(void) -{ - return CBrowserSettings::Instance()->GetCookiesEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetCookieEnabled -** Description: Sets the Http Cookies enabled flag in the settings -** Parameters: enabled - NW_TRUE if Http Cookies enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetCookiesEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetCookiesEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetImagesEnabled -** Description: Gets the Image-Loading enabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetImagesEnabled(void) -{ - return CBrowserSettings::Instance()->GetImagesEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetImagesEnabled -** Description: Sets the Image-Loading enabled flag in the settings -** Parameters: enabled - NW_TRUE if Http Cookies enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetImagesEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetImagesEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetTextWrapEnabled -** Description: Gets the Text-Wrapping enabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetTextWrapEnabled(void) -{ - return CBrowserSettings::Instance()->GetTextWrapEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetTextWrapEnabled -** Description: Sets the Text-Wrapping enabled flag in the settings -** Parameters: enabled - NW_TRUE if Http Cookies enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetTextWrapEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetTextWrapEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_SetWspConnType -** Description: Sets the Wsp Connection TYpe in the settings -** Parameters: connType - type of the connection : -** 0 - connection oriented -** 1 - connectionless -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetWspConnType(const NW_Uint32 connType) -{ - NW_REQUIRED_PARAM(connType); - return NW_TRUE; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_GetGMTOffset -** Description: Determines the offset between GMT time and the -** operating system time from the settings -** Parameters: None -** Return Value: the offset needed to get GMT time from os time -******************************************************************/ -NW_Int32 NW_Settings_GetGMTOffset(void) -{ - return 1; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_SetGMTOffset -** Description: Sets the offset between GMT time and the -** operating system time -** Parameters: GMTOffset - the offset needed to get GMT time from os time -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetGMTOffset(const NW_Int32 GMTOffset) -{ - NW_REQUIRED_PARAM(GMTOffset); - return NW_TRUE; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_GetAlwaysConfirmDtmfSending -** Description: Determines whether sending Dtmf should be confirmed -** always or once -** Parameters: None -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_GetAlwaysConfirmDtmfSending(void) -{ - return NW_TRUE; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_SetAlwaysConfirmDtmfSending -** Description: Sets whether sending Dtmf should be confirmed always -** or once -** Parameters: always - NW_TRUE for always, NW_FALSE for once -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -NW_Bool NW_Settings_SetAlwaysConfirmDtmfSending(const NW_Bool always) -{ - NW_REQUIRED_PARAM(always); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetVerticalLayoutEnabled -** Description: Gets the VerticalLayoutEnabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetVerticalLayoutEnabled(void) -{ - return CBrowserSettings::Instance()->GetVerticalLayoutEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetVerticalLayoutEnabled -** Description: Sets the VerticalLayoutEnabled flag in the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_SetVerticalLayoutEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetVerticalLayoutEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_SetInternalVerticalLayoutEnabled -** Description: Sets the VerticalLayoutEnabled flag in the settings. -** This method only changes the browser's cached value for whether or -** not vertical layout is enabled. DO NOT USE if you want to be setting -** the value in the ini file. Instead use -** NW_Settings_SetVerticalLayoutEnabled -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_SetInternalVerticalLayoutEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetInternalVerticalLayoutEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetOriginalEncoding -** Description: Sets the KWmlBrowserDefaultLatinEncoding flag in -** the settings -** Parameters: None -** Return Value: NW_Uint32 -******************************************************************/ -NW_Uint32 NW_Settings_GetOriginalEncoding() -{ - return CBrowserSettings::Instance()->GetOriginalEncoding(); -} - -/***************************************************************** -** Name: NW_Settings_SetOriginalEncoding -** Description: Sets the KWmlBrowserDefaultLatinEncoding flag in -** the settings -** Parameters: NW_Uint32 encoding -** Return Value: void -******************************************************************/ -void NW_Settings_SetOriginalEncoding(NW_Uint32 encoding) -{ - CBrowserSettings::Instance()->SetOriginalEncoding(encoding); -} - -/***************************************************************** -** Name: NW_Settings_SetDisableSmallScreenLayout -** Description: Sets the SetDisableSmallScreenLayout flag in the -** settings -** Parameters: NW_Bool -- disabled if NW_TRUE -** Return Value: void -******************************************************************/ -void NW_Settings_SetDisableSmallScreenLayout(const NW_Bool disabled) -{ - CBrowserSettings::Instance()->SetDisableSmallScreenLayout(disabled); -} - -/***************************************************************** -** Name: NW_Settings_GetDisableSmallScreenLayout -** Description: Gets the SetDisableSmallScreenLayout flag in the -** settings -** Parameters: NW_Bool -- disabled if NW_TRUE -** Return Value: void -******************************************************************/ -NW_Bool NW_Settings_GetDisableSmallScreenLayout() -{ - return CBrowserSettings::Instance()->GetDisableSmallScreenLayout(); -} - -/***************************************************************** -** Name: NW_Settings_GetCSSFetchEnabled -** Description: Gets the CSSEnabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetCSSFetchEnabled(void) - { - return CBrowserSettings::Instance()->GetCSSFetchEnabled(); - } - -/***************************************************************** -** Name: NW_Settings_SetCSSFetchEnabled -** Description: Sets the CSSEnabled flag in the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_SetCSSFetchEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetCSSFetchEnabled(enabled); - return NW_TRUE; -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_GetBrowsingAllowedWhileMMSOngoing -** Description: Determines whether browsinf is allowed during MMS -** Parameters: None -** Return Value: NW_TRUE if browsing is allowed, otherwise NW_FALSE -******************************************************************/ -NW_Uint32 NW_Settings_GetBrowsingAllowedWhileMMSOngoing(void) -{ - return 1; -} - -/***************************************************************** -** Name: NW_Settings_DefaultCharset -** Description: Gets the default charset from the settings -** Parameters: None -** Return Value: the stored value -******************************************************************/ -NW_Uint16 NW_Settings_GetDefaultCharset(void) -{ - NW_Uint16 defaultCharset; - defaultCharset = CBrowserSettings::Instance()->GetDefaultCharset(); - if ((defaultCharset == EAutomatic) || (defaultCharset >= EDummyLast)) - { - return EISO8859_1; - } - else - { - return defaultCharset; - } -} - -/***************************************************************** -** Deprecated - DO NOT USE -** Name: NW_Settings_SetDefaultCharset -** Description: Sets the default charset to the settings -** Parameters: defaultCharset - new value -** Return Value: NW_Bool -- NW_TRUE is success -******************************************************************/ -NW_Bool NW_Settings_SetDefaultCharset(NW_Uint16 defaultCharset) -{ - NW_REQUIRED_PARAM(defaultCharset); - return NW_TRUE; -} - -/***************************************************************** -** Name: NW_Settings_GetIsBrowserEmbedded -** Description: Gets the value of the embedded setting -** Parameters: None -** Return Value: the stored value -******************************************************************/ -NW_Bool NW_Settings_GetIsBrowserEmbedded() -{ - return CBrowserSettings::Instance()->GetIsBrowserEmbedded(); -} - -/***************************************************************** -** Name: NW_Settings_SetIsBrowserEmbedded -** Description: Sets the value of the embedded setting -** Parameters: NW_Bool isEmbedded -** Return Value: void -******************************************************************/ -void NW_Settings_SetIsBrowserEmbedded(NW_Bool isEmbedded) -{ - CBrowserSettings::Instance()->SetIsBrowserEmbedded(isEmbedded); -} - -/***************************************************************** -** Name: NW_Settings_GetLocalFeatures -** Description: Gets the local features bitmask -** Parameters: void -** Return Value: TUint - the local features bitmask -******************************************************************/ -TUint NW_Settings_GetLocalFeatures(void) -{ - return CBrowserSettings::Instance()->GetLocalFeatures(); -} - -/***************************************************************** -** Name: NW_Settings_GetTempFilesPath -** Description: Gets the path for temporary files -** Parameters: void -** Return Value: NW_Ucs2* - the path of temp files -******************************************************************/ -NW_Ucs2* NW_Settings_GetTempFilesPath(void) -{ - return CBrowserSettings::Instance()->GetTempFilesPath(); -} - -/***************************************************************** -** Name: NW_Settings_GetMMCDrive -** Description: Gets the drive letter of MMC card -** Parameters: void -** Return Value: NW_Uint8 - the drive letter of MMC card -******************************************************************/ -NW_Uint8 NW_Settings_GetMMCDrive(void) -{ - return CBrowserSettings::Instance()->GetMMCDrive(); -} - -/***************************************************************** -** Name: NW_Settings_GetIMEINotifyEnabled -** Description: Gets the IMEI Notify enabled flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetIMEINotifyEnabled(void) -{ - return CBrowserSettings::Instance()->GetIMEINotifyEnabled(); -} - -/***************************************************************** -** Name: NW_Settings_SetIMEINotifyEnabled -** Description: Sets the IMEI Notify enabled flag in the settings -** Parameters: enabled - NW_TRUE if IMEI Notify enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -void NW_Settings_SetIMEINotifyEnabled(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetIMEINotifyEnabled(enabled); -} - -/***************************************************************** -** Name: NW_Settings_GetSendReferrerHeader -** Description: Gets the SendReferrerHeader flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetSendReferrerHeader(void) -{ - return CBrowserSettings::Instance()->GetSendReferrerHeader(); -} - -/***************************************************************** -** Name: NW_Settings_SetSendReferrerHeader -** Description: Sets the SendReferrerHeader flag in the settings -** Parameters: enabled - NW_TRUE if SendReferrerHeader enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -void NW_Settings_SetSendReferrerHeader(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetSendReferrerHeader(enabled); -} - -/***************************************************************** -** Name: NW_Settings_GetHttpSecurityWarnings -** Description: Gets the HttpSecurityWarnings flag from the settings -** Parameters: None -** Return Value: NW_Bool -- enabled if NW_TRUE -******************************************************************/ -NW_Bool NW_Settings_GetHttpSecurityWarnings(void) -{ - return CBrowserSettings::Instance()->GetHttpSecurityWarnings(); -} - -/***************************************************************** -** Name: NW_Settings_SetHttpSecurityWarnings -** Description: Sets the HttpSecurityWarnings flag in the settings -** Parameters: enabled - NW_TRUE if SendReferrerHeader enabled -** Return Value: NW_TRUE if value set, otherwise NW_FALSE -******************************************************************/ -void NW_Settings_SetHttpSecurityWarnings(const NW_Bool enabled) -{ - CBrowserSettings::Instance()->SetHttpSecurityWarnings(enabled); -} - -/***************************************************************** -** Name: NW_Settings_GetIAPId -** Description: Gets the Internet AP ID to use from the settings -** Parameters: None -** Return Value: TUint -- Internet AP ID to use -******************************************************************/ -NW_Uint32 NW_Settings_GetIAPId(void) -{ - return CBrowserSettings::Instance()->GetIAPId(); -} - -/***************************************************************** -** Name: NW_Settings_SetIAPId -** Description: Gets the Internet AP ID to use from the settings -** Parameters: TUint iapId - Access Point Id -** Return Value: None -******************************************************************/ -void NW_Settings_SetIAPId(NW_Uint32 aIapId) -{ - CBrowserSettings::Instance()->SetIAPId(aIapId); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_sprintf.c --- a/webengine/wmlengine/src/utils/src/nwx_sprintf.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1019 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_sprintf.c -** Part of: string (NW) -** Description: Provides interfaces to (NW) string API. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ - -#include "nwx_string.h" -#include "nwx_math.h" -#include "nwx_url_utils.h" - -#include <stdarg.h> -#include <float.h> /* FLT_DIG */ - -/*lint -save -e794, -e661 Conceivable use of null pointer, Possible access of out-of-bounds pointer*/ - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -#define FLAG_LEFT_JUSTIFIED (1 << 0) -#define FLAG_USE_PLUS (1 << 1) -#define FLAG_USE_SPACE (1 << 2) -#define FLAG_ALTERNATE (1 << 3) - -#define FIELD_FLAGS (1 << 0) -#define FIELD_WIDTH (1 << 1) -#define FIELD_PREC (1 << 2) -#define FIELD_TYPE (1 << 3) -#define MAX_FLOAT_STRING 20 -#define MAX_TEMP_BUF 50 -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -typedef enum { - TYPE_INVALID, - TYPE_SHORT, - TYPE_LONG_INT, - TYPE_LONG_DOUBLE -} Type; - -typedef enum { - FORMAT_INVALID, - FORMAT_SIGNED, - FORMAT_OCTAL, - FORMAT_UNSIGNED, - FORMAT_HEX, - FORMAT_BIGHEX, - FORMAT_FLOAT, - FORMAT_EXP, - FORMAT_BIGEXP, - FORMAT_CHOOSE, - FORMAT_BIGCHOOSE, - FORMAT_CHAR, - FORMAT_STRING, - FORMAT_POINTER, - FORMAT_OUTPUT_LEN -} Format; - -typedef enum { - STATE_NORMAL, - STATE_DIRECTIVE -} State; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -** this function rounds an integer (val) to a specified number of -** significant digits (prec). If the digit at the place to be rounded is 5 -** or greater we round AWAY from 0 (e.g. -15 gets rounded to -20). The -** resulting value is converted to a string and returned in digString. On -** input, digString must contain a string representation of the value to be -** rounded. The rounded integer value is returned as the value of the -** function. Rounding is accomplished by adding 5Ex to val, where x -** specifies the position of the digit where rounding will occur. The result -** is divided by 1E(x+1) (integer division) to eliminate the (x+1) low order -** digits, then multiplied by 1E(x+1) to refill the (x+1) low order digits -** with zeros. ex. val = 12345678 prec = 5, x = 2, val += 500 -> 12346178, -** 12346178/1000 -> 12346, 12346*1000 -> 12346000 which is then converted to -** the string "12346000" -*/ -static NW_Int32 roundInt(NW_Int32 val, NW_Ucs2 *digString, NW_Int32 prec) -{ - NW_Int32 roundFactor; /* 5Ex */ - NW_Int32 roundLoc; /* roundLoc = x+1 */ - NW_Int32 roundMult; /* 1E(x+1) */ - - /* - ** calculate x - for the example above, x will be 2, roundLoc is 3. - ** NOTE: digString must start out as the string representation of val! - */ - roundLoc = NW_Str_Strlen(digString) - prec; - /* - ** if we've got a negative number then we need to account for the '-' in - ** the string representation, so subtract one from roundLoc. Our example - ** is positive so roundLoc remains 3. - */ - if (val < 0) { - roundLoc--; - } - /* now - if we need to do some rounding */ - if (roundLoc > 0) { - roundFactor = 5; - roundMult = 10; - /* - ** in our example roundLoc is 3, so we execute the following loop twice, - ** roundFactor ends up as 500, roundMult ends up as 1000. - */ - while (roundLoc > 1) { - roundFactor *= 10; - roundMult *= 10; - roundLoc--; - } - /* if we're rounding negative numbers sub rather than add */ - if (val > 0) { - val += roundFactor; - } else { - val -= roundFactor; - } - /* in our example 12346178/1000 => 12346*/ - val /= roundMult; - - /* in our example 12346178*1000 => 12346000 */ - val *= roundMult; - - /* finally, convert the result back to a string */ - NW_Str_Itoa(val, digString); - } - /* return the rounded value */ - return val; -} - -static NW_Int32 gFormat(NW_Float64 x, NW_Int32 prec, NW_Ucs2 *output,NW_Int32 outSize) -{ - NW_Int32 base; - NW_Int32 nDigits = 0; - NW_Int32 exp; - NW_Int32 count = 0; - NW_Ucs2 expString[MAX_FLOAT_STRING]; - NW_Ucs2 baseString[MAX_FLOAT_STRING]; - NW_Ucs2 *ptrOut; - NW_Ucs2 *ptrIn; - - NW_ASSERT(output != NULL); - - NW_Math_BaseandExp64(x, &base, &exp); - NW_Str_Itoa(base, baseString); - - ptrOut = output; - ptrIn = baseString; - - nDigits = NW_Str_Strlen(baseString); - - if (prec > nDigits){ - nDigits = prec; - /* 8: '-','0','.','E','-','1','5','\0' as a ex. -0.3E-15 */ - if ((nDigits + 8) > outSize) { - return 0; - } - } - /**copy '-' into start of output**/ - if (x < 0) { - *ptrOut++ = *ptrIn++; - } - *ptrOut++ = '0'; - *ptrOut++ = WAE_URL_DOT_CHAR; - base = roundInt(base, baseString, prec); - - if ((NW_Str_Strlen(baseString) - nDigits) == 1) { - exp ++; - } - - while ((count < prec) && (*ptrIn != 0)) { - *ptrOut++ = *ptrIn++; - count++; - } - while (count < prec) { - *ptrOut++ = '0'; - count++; - } - - NW_Str_Itoa(exp, expString); - - - if (exp != 0) { - *ptrOut++ = 'E'; - ptrIn = expString; - while (*ptrIn != 0) { - *ptrOut++ = *ptrIn++; - } - } - *ptrOut = 0; - return (ptrOut - output); -} - -/* -**this function is converting a float to a string by the precision input,and return -**the length of it.First convert it to a mantissa and exponent(exp),then do a -**rounding as a suitable position. To get the output,the string is made by 5 steps: -**1)if negative, add a '-' at the beginning. 2)if exp > 0, output those bits in -**baseString;otherwise add a '0' before '.'. 3)'.'. 4)if exp < 0, add '0'(s) as the bit(s) -**of precision;otherwise output the precision part of baseString. 5)if baseString is -**not as precision as needed,fill '0'(s) in tail.ex. x = -1.2345678,prec = 6,->exp = 1, -**'-12345678' -> '-1234570' -> '-1.234570' ( len = 9) -*/ -static NW_Int32 fFormat(NW_Float64 x, NW_Int32 prec, NW_Ucs2 *output, NW_Int32 outSize) -{ - NW_Int32 count = 0; /* length of output string */ - NW_Int32 nDigits = 0; /* length of baseString */ - NW_Int32 base; /* integer form */ - NW_Int32 exp; /* exponent */ - NW_Ucs2 baseString[MAX_FLOAT_STRING]; - NW_Int32 j,precCount = 0; /* if it is smaller than the precision asked */ - NW_Int32 expCount = 0; /* how many '0' should set before and after '.' */ - NW_Ucs2 *ptrIn; /* baseString */ - NW_Int32 roundSpot; /* suitable position of rounding */ - - NW_ASSERT(output != NULL); - NW_ASSERT(prec < outSize); - /* convert x to a interger and exp,in our example, exp = 1 */ - NW_Math_BaseandExp64(x, &base, &exp); - /* convert base to a string */ - NW_Str_Itoa(base, baseString); - - /* suitable position of rounding,in our example,roundSpot = 7 */ - roundSpot = prec + exp; - /* now,roundSpot = 6 */ - if (roundSpot > FLT_DIG){ - roundSpot = FLT_DIG; - } - /* in our example,base -> 1234570 */ - base = roundInt(base, baseString, roundSpot); - - /* string length,in our example nDigits = 7 */ - nDigits = NW_Str_Strlen(baseString); - NW_ASSERT(nDigits < outSize); - /* To fix TI compiler warning */ - (void) nDigits; - /* 4: '-', '0', '.', '\0' */ - if (((exp + prec + 4 ) > outSize) || ((prec + 4) > outSize)){ - return 0; - } - ptrIn = baseString; - - /* copy '-' into start of output */ - if (x < 0) { - *output++ = *ptrIn++; - count++; - } - NW_ASSERT(count < outSize); - /* is there any '0' before and after '.' */ - /* if exp > 0,expCount = -1; if exp = 0,expCount = 0; if exp < 0;expCount = -exp */ - if ( exp < 0) { - expCount = -exp ; - } - else{ - if (exp == 0){ - expCount = 0; - } - else{ - expCount = -1; - } - } - NW_ASSERT((ptrIn-baseString) < MAX_FLOAT_STRING); - /* in our example,output '1',j -> 1*/ - for(j=0;j < exp;j++){ - if (( j < exp ) && ( *ptrIn != '\0')){ - *output++ = *ptrIn++; - } - } - for (;j< exp; j++){ - *output++ = '0'; - } - /*in our example,count -> 2 */ - count += j; - NW_ASSERT(count < outSize); - /* exp > 0, in our example, count -> 3 */ - if ( expCount == -1 ){ - *output++ = WAE_URL_DOT_CHAR; - count++; - } - else{ - /* exp < = 0 */ - *output++ = '0'; - *output++ = WAE_URL_DOT_CHAR; - count += 2; - /* output '0' when exp < 0 */ - while ( expCount > 0) { - *output++ = '0'; - expCount--; - precCount++; - count++; - } - } - NW_ASSERT(count < outSize); - /*in our example,output '234570',count -> 9,precCount -> 6*/ - while (( precCount < prec ) && (*ptrIn != '\0')){ - *output++ = *ptrIn++; - count++; - precCount++; - } - /* fill '0'(s) at the end if not precision enough */ - while (( precCount < prec ) && (prec > 0)){ - *output++ = '0'; - count++; - precCount++; - } - NW_ASSERT(count < outSize); - *output = 0; - /* in our example count -> 9 */ - return (count) ; -} - -static const NW_Ucs2 *parse_flags ( const NW_Ucs2 *format, NW_Uint32 *fields, NW_Uint32 *retFlags ) -{ - const NW_Ucs2 *traverse = format; - NW_Bool done = NW_FALSE; - NW_Ucs2 ch; - - NW_ASSERT ( traverse != NULL ); - NW_ASSERT ( fields != NULL ); - NW_ASSERT ( retFlags != NULL ); - - while ((( ch = *traverse ) != '\0') && !done) { - switch (ch) { - case '-' : - *retFlags |= FLAG_LEFT_JUSTIFIED; - traverse++; - break; - case '+' : - *retFlags |= FLAG_USE_PLUS; - traverse++; - break; - case ' ' : - *retFlags |= FLAG_USE_SPACE; - traverse++; - break; - case '#' : - *retFlags |= FLAG_ALTERNATE; - traverse++; - break; - default: - /* end of flags */ - done = NW_TRUE; - } - } - - if ( traverse != format ) - *fields |= FIELD_FLAGS; - - return traverse; -} - -static const NW_Ucs2 *parse_width ( const NW_Ucs2 *format, NW_Uint32 *fields, NW_Uint32 *retWidth ) -{ - NW_Uint32 width; - NW_Ucs2 *endPtr = NULL; - - NW_ASSERT ( format != NULL ); - NW_ASSERT ( fields != NULL ); - NW_ASSERT ( retWidth != NULL ); - - width = NW_Str_Strtoul ( format, &endPtr, 10 ); - NW_ASSERT ( endPtr != NULL ); - if ( format != endPtr ) { - *fields |= FIELD_WIDTH; - *retWidth = width; - } - - return endPtr; -} - -static const NW_Ucs2 *parse_prec ( const NW_Ucs2 *format, NW_Uint32 *fields, NW_Uint32 *retPrec ) -{ - NW_Uint32 prec; - - NW_ASSERT ( format != NULL ); - NW_ASSERT ( fields != NULL ); - NW_ASSERT ( retPrec != NULL ); - - if ( *format == '.' ) { - NW_Ucs2 *endPtr = NULL; - format++; - prec = NW_Str_Strtoul ( format, &endPtr, 10 ); - *fields |= FIELD_PREC; - if ( format != endPtr ) { - *retPrec = prec; - } else { - *retPrec = 0; - } - return endPtr; - } else { - return format; - } -} - -static const NW_Ucs2 *parse_type ( const NW_Ucs2 *format, NW_Uint32 *fields, Type *retType ) -{ - NW_ASSERT ( format != NULL ); - NW_ASSERT ( fields != NULL ); - NW_ASSERT ( retType != NULL ); - - switch ( *format ) { - case 'h': - *retType = TYPE_SHORT; - *fields |= FIELD_TYPE; - format++; - break; - case 'l': - *retType = TYPE_LONG_INT; - *fields |= FIELD_TYPE; - format++; - break; - case 'L': - *retType = TYPE_LONG_DOUBLE; - *fields |= FIELD_TYPE; - format++; - break; - default: - /* no type */ - ; - } - return format; -} - -static const NW_Ucs2 *parse_format ( const NW_Ucs2 *format, Format *retFormat ) -{ - NW_ASSERT ( format != NULL ); - NW_ASSERT ( retFormat != NULL ); - - switch ( *format ) { - case 'i': - case 'd': - *retFormat = FORMAT_SIGNED; - format++; - break; - case 'o': - *retFormat = FORMAT_OCTAL; - format++; - break; - case 'u': - *retFormat = FORMAT_UNSIGNED; - format++; - break; - case 'x': - *retFormat = FORMAT_HEX; - format++; - break; - case 'X': - *retFormat = FORMAT_BIGHEX; - format++; - break; - case 'f': - *retFormat = FORMAT_FLOAT; - format++; - break; - case 'e': - *retFormat = FORMAT_EXP; - format++; - break; - case 'E': - *retFormat = FORMAT_BIGEXP; - format++; - break; - case 'g': - *retFormat = FORMAT_CHOOSE; - format++; - break; - case 'G': - *retFormat = FORMAT_BIGCHOOSE; - format++; - break; - case 'c': - *retFormat = FORMAT_CHAR; - format++; - break; - case 's': - *retFormat = FORMAT_STRING; - format++; - break; - case 'p': - *retFormat = FORMAT_POINTER; - format++; - break; - case 'n': - *retFormat = FORMAT_OUTPUT_LEN; - format++; - break; - default: - /* bad format string */ - NW_ASSERT ( 0 ); - format = NULL; - } - return format; -} - -static NW_Int32 execute_hex ( NW_Ucs2 *output, NW_Int32 count, NW_Int32 fields, - NW_Int32 width, NW_Int32 prec, Type type, va_list *argptr ) -{ - NW_Uint32 val = 0; - NW_Int32 numWritten = 0; - - NW_ASSERT ( output != NULL ); - NW_ASSERT ( count >= 0 ); - NW_ASSERT ( fields >= 0 ); - NW_ASSERT ( width >= 0 ); - NW_ASSERT ( prec >= 0 ); - - NW_REQUIRED_PARAM(type); - - val = va_arg ( *argptr, NW_Uint32 ); - - if (! ( fields & FIELD_WIDTH )) { - width = 1; - } - if (! ( fields & FIELD_PREC )) { - prec = 1; - } - - /* perhaps I should through in val == 0 and width == 0 */ - if (! (( prec == 0 ) && (val == 0))) { - NW_Ucs2 temp_buf[40]; - NW_Int32 len; - NW_Int32 zeroes = 0; - NW_Int32 spaces = 0; - NW_Int32 i; - - /* Platform-specific */ - NW_Str_UltoBase(val, temp_buf, 16); - - len = NW_Str_Strlen ( temp_buf ); - - if ( len < prec ) { - zeroes = prec - len; - } - if (( len + zeroes ) < width ) { - spaces = width - ( len + zeroes ); - } - - for ( i = 0; i < spaces; i++ ) { - if ( count > (NW_Uint16) numWritten ) { - *output++ = ' '; - numWritten++; - } - } - - for ( i = 0; i < zeroes; i++ ) { - if ( count > (NW_Uint16) numWritten ) { - *output++ = '0'; - numWritten++; - } - } - - if ( count > (NW_Uint16) numWritten ) { - NW_Int32 toWrite = len; - if ( len > (count - (NW_Uint16) numWritten )) { - toWrite = count - numWritten; - } - NW_Str_Strncpy ( output, temp_buf, toWrite ); - numWritten = numWritten + toWrite; - } - } - - return numWritten; -} - -static NW_Int32 execute_signed ( NW_Ucs2 *output, NW_Int32 count, NW_Int32 fields, - NW_Int32 width, NW_Int32 prec, Type type, va_list *argptr ) -{ - long val = 0; - NW_Int32 numWritten = 0; - NW_Bool negative = NW_FALSE; - - NW_ASSERT ( output != NULL ); - NW_ASSERT ( count >= 0 ); - NW_ASSERT ( fields >= 0 ); - NW_ASSERT ( width >= 0 ); - NW_ASSERT ( prec >= 0 ); - - if ( fields & FIELD_TYPE ) { - switch ( type ) { - case TYPE_SHORT : - val = (NW_Int16) va_arg ( *argptr, NW_Int32 ); - break; - case TYPE_LONG_INT : - val = va_arg ( *argptr, long ); - break; - case TYPE_LONG_DOUBLE: - NW_ASSERT ( 0 ); /* should not happen with a %d */ - numWritten = -1; - break; - default: - NW_ASSERT ( 0 ); - } - } else { - val = va_arg ( *argptr, NW_Int32 ); - } - - if (! ( fields & FIELD_WIDTH )) { - width = 1; - } - if (! ( fields & FIELD_PREC )) { - prec = 1; - } - - /* perhaps I should through in val == 0 and width == 0 */ - if ((numWritten != -1) && (! (( prec == 0 ) && (val == 0)))) { - NW_Ucs2 temp_buf[40]; - NW_Int32 len; - NW_Int32 zeroes = 0; - NW_Int32 spaces = 0; - NW_Int32 i; - - /* Platform-specific */ - NW_Str_Itoa(val, temp_buf); - if (*temp_buf == '-') negative = NW_TRUE; - - len = NW_Str_Strlen ( temp_buf ); - if ( negative ) len--; - - if ( len < prec ) { - zeroes = prec - len; - } - if (( len + zeroes ) < width ) { - spaces = width - ( len + zeroes ); - if ( negative ) spaces--; - } - - for ( i = 0; i < spaces; i++ ) { - if ( count > numWritten ) { - *output++ = ' '; - numWritten++; - } - } - - if ( negative ) { - if ( count > numWritten ) { - *output++ = '-'; - numWritten++; - } - } - - for ( i = 0; i < zeroes; i++ ) { - if ( count > numWritten ) { - *output++ = '0'; - numWritten++; - } - } - - if ( count > numWritten ) { - NW_Int32 toWrite = len; - if ( len > (count - numWritten )) { - toWrite = count - numWritten; - } - if ( negative ) { - NW_Str_Strncpy ( output, temp_buf + 1, toWrite); - } else { - NW_Str_Strncpy ( output, temp_buf, toWrite ); - } - numWritten = numWritten + toWrite; - } - } - - return numWritten; -} -/* -**The function handle the output of float by precision asked.When the precison -**input is zero,set it to '6' as a default value.If fmt is FORMAT_FLOAT,output a -**float string as input. If is FORMAT_CHOOSE, output a string being written in -**"0.2E8" format if the input val is not in 0.0001 <= |val| < 1000000. And in -**the second situation, we skip useless zero(s) at the tail. -*/ -static NW_Int32 execute_choose (NW_Ucs2 *buf, NW_Int32 count, NW_Int32 fields, - NW_Int32 width, NW_Int32 prec, Format fmt, - va_list *argptr) -{ - NW_Float64 val; - NW_Ucs2 temp_buf[MAX_TEMP_BUF]; - NW_Int32 i, j; - NW_Int32 len = 0; - NW_Int32 spaces = 0; - NW_Int32 numWritten = 0; - NW_Ucs2 *output = buf; - NW_Bool localPrec = NW_FALSE; /* Is the precision set by input, or by local function */ - NW_Bool decDot = NW_FALSE; /* Is there a decimal pot in the string */ - NW_Bool eFormat = NW_FALSE; /* Is there a "E" in the string */ - - NW_ASSERT ( buf != NULL ); - NW_ASSERT ( output != NULL ); - - val = va_arg ( *argptr, NW_Float64 ); - /* - * if no precision asked, set it as a default value, localPrec -> NW_TRUE - * if the precision is more then the buffer then set it to efault value. - */ - if (((!(fields & FIELD_PREC)) && (prec == 0)) || (prec >= MAX_TEMP_BUF)) - { - prec = NW_DEFAULT_FLOAT_PREC; - localPrec = NW_TRUE; - } - if (! ( fields & FIELD_WIDTH)) { - width = 1; - } - NW_ASSERT((fmt == FORMAT_FLOAT) || (fmt == FORMAT_CHOOSE)); - if (fmt == FORMAT_FLOAT){ - len = fFormat( val, prec, temp_buf, MAX_TEMP_BUF );/* just ouput float string */ - } - else { - /* different formats as different float values input, for example, 20000 -> 20000.0, - len = 8 by fFormat;20000000 -> 0.2E8 ,len = 5 by gFormat as prec = 1 */ - if ((val < 1000000.00 && val >= 0.0001) || (val > -1000000.00 && val <= -0.0001)){ - len = fFormat( val, prec, temp_buf, MAX_TEMP_BUF ); - } - else { - len = gFormat( val, prec, temp_buf, MAX_TEMP_BUF ); - } - /* calculate trailing '0',if percision was set by local function; else output string - as percision as asked*/ - if (localPrec) { - i = 0; - while ((temp_buf[len-i-1] == '0')&&((len-i-1) > 0)){ - i++; - } - for (j = 0 ; j <= (len - i - 1); j++){ - if (temp_buf[j] == '.'){ - decDot = NW_TRUE; - } - if (temp_buf[j] == 'E'){ - eFormat = NW_TRUE; - } - } - /* if there isn't a decimal pot in the string, no need to skip '0'(s) at the tail */ - /* undo it if the val was processed by gFomat.for example "0.1E10" we shouldn't skip the tail "0"*/ - if ((decDot) && (!eFormat)){ - if (i == prec){ - len -= (i-1); - } - else { - len -= i; - } - } - } - } - /* if the last bit of the string is '.',skip it */ - if (temp_buf[len-1] == '.'){ - len -= 1; - } - /* is there any empty spaces need before the string */ - if ( width > len ){ - spaces = width - len; - } - for ( i = 0; (i < spaces) && (numWritten < count); i++ ) { - *output++ = ' '; - numWritten++; - } - i = 0; - while((i < len) && (temp_buf[i] != '\0') && (numWritten < count)){ - *output++ = temp_buf[i]; - numWritten++; - i++; - } - return numWritten; -} - -static NW_Int32 execute_string ( NW_Ucs2 *output, NW_Int32 count, NW_Int32 fields, - NW_Int32 width, NW_Int32 prec, va_list *argptr ) -{ - const NW_Ucs2 *val; - NW_Int32 numWritten = 0; - NW_Int32 len; - NW_Int32 toWrite; - NW_Int32 i; - - NW_ASSERT ( output != NULL ); - NW_ASSERT ( count >= 0 ); - NW_ASSERT ( fields >= 0 ); - NW_ASSERT ( width >= 0 ); - NW_ASSERT ( prec >= 0 ); - - if ( ! ( fields & FIELD_WIDTH )) { - width = 1; - /* To fix TI compiler warning */ - (void) width; - } - - val = va_arg ( *argptr, const NW_Ucs2 *); - if (val == NULL) { - return 0; - } - len = NW_Str_Strlen ( val ); - - /* - ** WMLScript Std Lib 9.16 says for strings: "When the width is larger than - ** precision, the width should be ignored." and in general: "If the number - ** of characters in the output value is greater than the specified width - ** or, if width is not given, all characters of the value are printed." - ** Sooo, for strings, we always ignore width - */ - toWrite = len; - - if ( fields & FIELD_PREC ) { - if ( prec < toWrite ) toWrite = prec; - } - - for ( i = 0; i < toWrite; i++) { - if ( numWritten < count ) { - *output++ = *val++; - numWritten++; - } - } - - return numWritten; -} - -static NW_Int32 execute_directive ( NW_Ucs2 *buf, NW_Int32 count, NW_Int32 fields, - NW_Int32 width, NW_Int32 prec, Type type, - Format fmt, va_list *argptr ) -{ - NW_Int32 numWritten = 0; - - NW_ASSERT ( buf != NULL ); - NW_ASSERT ( count >= 0 ); - NW_ASSERT ( fields >= 0 ); - NW_ASSERT ( width >= 0 ); - NW_ASSERT ( prec >= 0 ); - - switch ( fmt ) { - case FORMAT_SIGNED: - numWritten = execute_signed ( buf, count, fields, width, prec, type, argptr ); - break; - case FORMAT_FLOAT: - case FORMAT_CHOOSE: - numWritten = execute_choose ( buf, count, fields, width, prec, fmt, argptr ); - break; - case FORMAT_STRING: - numWritten = execute_string ( buf, count, fields, width, prec, argptr ); - break; - case FORMAT_HEX: - case FORMAT_BIGHEX: - numWritten = execute_hex ( buf, count, fields, width, prec, type, argptr ); - break; - default: - NW_ASSERT (0); - /* not implemented */ - numWritten = -1; - } - return numWritten; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -NW_Int32 NW_Str_Vsnprintf (NW_Ucs2 *buf, const NW_Int32 count, const NW_Ucs2 *format, va_list *argptr) -{ - NW_Ucs2 ch; - NW_Int32 numWritten = 0; - NW_Ucs2 *output; - const NW_Ucs2 *input; - State state = STATE_NORMAL; - - NW_ASSERT ( buf != NULL ); - NW_ASSERT ( count >= 0 ); - NW_ASSERT ( format != NULL ); - - input = format; - - output = buf; - - - while ((( ch = *input ) != '\0') && ( numWritten >= 0 )) { - switch (state) { - case STATE_NORMAL: - if ( ch == '%' ) { - if (*(input + 1) == '%') { - /* it's a %% */ - input++; - } else { - /* starting directive */ - state = STATE_DIRECTIVE; - } - } - if ( state == STATE_NORMAL ) { - /* regular character, just write it */ - NW_ASSERT(0 <= count); - if ( numWritten < count ) { - *output++ = ch; - numWritten++; - } - } - input++; - break; - case STATE_DIRECTIVE: - { - NW_Uint32 fields = 0; - NW_Uint32 flags = 0; - NW_Uint32 width = 0; - NW_Uint32 prec = 0; - Type type = TYPE_INVALID; - Format fmt = FORMAT_INVALID; - - if (( input = parse_flags ( input, &fields, &flags )) != NULL ) { - if (( input = parse_width ( input, &fields, &width )) != NULL ) { - /* If width is more than allowed then set width to the max allowed */ - if (width > NW_UINT32_CAST(count)) - { - width = NW_UINT32_CAST(count); /* Last byte is to hold null char */ - } - if (( input = parse_prec ( input, &fields, &prec )) != NULL ) { - if (( input = parse_type ( input, &fields, &type )) != NULL ) { - if (( input = parse_format ( input, &fmt )) != NULL ) { - NW_Int32 retVal; - retVal = execute_directive ( output, count - numWritten, - fields, width, prec, type, - fmt, argptr ); - if ( retVal >= 0 ) { - numWritten += retVal; - output += retVal; - state = STATE_NORMAL; - } - } else { - numWritten = -1; - } - } else { - numWritten = -1; - } - } else { - numWritten = -1; - } - } else { - numWritten = -1; - } - } - } - break; - default: - NW_ASSERT ( 0 ); - } - } - - NW_ASSERT(0 <= count); - if (numWritten <= count) { - *output = '\0'; - } - return numWritten; -} - -NW_Int32 NW_Str_Sprintf (NW_Ucs2 *buf, const NW_Ucs2 *format, ... ) -{ - va_list args; - NW_Int32 status; - - va_start (args, format ); - /* TODO: 9999999 should be some kind of MAX_INT */ - status = NW_Str_Vsnprintf ( buf, 9999999, format, &args ); - va_end (args); - - return status; -} - -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_statuscodeconvert.c --- a/webengine/wmlengine/src/utils/src/nwx_statuscodeconvert.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Utility for converting cxml parser status codes to browser -* status codes -* -* -*/ - -#include "nwx_statuscodeconvert.h" - -TBrowserStatusCode StatusCodeConvert( NW_Status_t cxml_status ) - { - TBrowserStatusCode status; - - switch(cxml_status) - { - case NW_STAT_SUCCESS: - { - status = KBrsrSuccess; - break; - } - case NW_STAT_NOT_FOUND: - { - status = KBrsrNotFound; - break; - } - case NW_STAT_OUT_OF_MEMORY: - { - status = KBrsrOutOfMemory; - break; - } - case NW_STAT_DOM_NODE_TYPE_ERR: - { - status = KBrsrDomNodeTypeErr; - break; - } - case NW_STAT_DOM_NO_VALUE_PREFIX: - { - status = KBrsrDomNoValuePrefix; - break; - } - case NW_STAT_WBXML_ERROR_BYTECODE: - { - status = KBrsrWbxmlErrorBytecode; - break; - } - case NW_STAT_WBXML_ERROR_CHARSET_UNSUPPORTED: - { - status = KBrsrWbxmlErrorCharsetUnsupported; - break; - } - default: - { - status = KBrsrFailure; - break; - } - } - - return status; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_string.c --- a/webengine/wmlengine/src/utils/src/nwx_string.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2064 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_string.c -** Part of: string (NW) -** Description: Provides interfaces to (NW) string API . -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_string.h" -#include "nwx_mem.h" -#include "nwx_memseg.h" -#include "nwx_float.h" -#include "nwx_math.h" -#include "BrsrStatusCodes.h" - -/*lint -save -e794 Conceivable use of null pointer*/ - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Asc_New -** Description: Create a Ascii string -** Parameters: NW_Uint32 len -** Return Value: new Ascii String or Null of no memory available -******************************************************************/ -char *NW_Asc_New(const NW_Uint32 len) -{ - char *tmp; - - tmp = (char*) NW_Mem_Malloc((len + 1) * sizeof(char)); - if (tmp != NULL) { - tmp[0] = WAE_ASCII_NULL; - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Asc_Delete -** Description: Delete a Ascii string -** Parameters: char * -** Return Value: void -******************************************************************/ -void NW_Asc_Delete(char *string) -{ - if (string != NULL) { - NW_Mem_Free(string); - } - return; -} - -/***************************************************************** -** Name: NW_Asc_ToUpper -** Description: Converts a char to upper case -** Parameters: ch - the character to convert -** Return Value: the converted character -******************************************************************/ -NW_Ucs2 NW_Asc_ToUpper(const char ch) -{ - if((ch >= WAE_ASCII_LOWER_A) && (ch <= WAE_ASCII_LOWER_Z)) { - /*lint -e{571} Suspicious cast*/ - return (NW_Ucs2)(ch - WAE_ASCII_LOWER_A + WAE_ASCII_UPPER_A); - } else { - return ch; - } -} - -NW_Uint32 NW_Asc_strlen(const char *s) -{ - NW_Uint32 i = 0; - while (*s != '\0') - { - s++; - i++; - } - return i; -} - -char *NW_Asc_strcpy(char *s1, const char *s2) -{ - while (*s2 != '\0') { - *s1 = *s2; - s1++; - s2++; - } - *s1 = *s2; - return s1; -} - -char *NW_Asc_strcat(char *s1, const char *s2) -{ - char *myDest = s1; - while (*myDest != '\0') { - myDest++; - } - NW_Asc_strcpy(myDest, s2); - return s1; -} - -NW_Int32 NW_Asc_Strchr(const char* str, char ch) -{ - NW_Int32 found = -1; - NW_Uint32 count = 0; - NW_ASSERT(str != NULL); - while((*str != NULL) && (found == -1)) - { - if(*str == ch) - { - found = count; - } - else - { - str++; - count++; - } - } - - if(*str == ch) - { - found = count; - } - return found; -} - -NW_Int32 NW_Asc_strcmp(const char *string1, const char *string2) -{ - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((*string1 == *string2) && - (*string1 != '\0') && (*string2 != '\0')) - { - string1++; - string2++; - } - return (*string1 - *string2); -} - -NW_Int32 NW_Asc_stricmp(const char *string1, const char *string2) -{ - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((NW_Asc_ToUpper(*string1) == NW_Asc_ToUpper(*string2)) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL)) - { - string1++; - string2++; - } - return (NW_Asc_ToUpper(*string1) - NW_Asc_ToUpper(*string2)); -} - -NW_Int32 NW_Asc_strnicmp(const char *string1, const char *string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 1; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((NW_Asc_ToUpper(*string1) == NW_Asc_ToUpper(*string2)) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL) && - (i < count)) - { - string1++; - string2++; - i++; - } - if (count == 0) { - return 0; - } else { - return (NW_Asc_ToUpper(*string1) - NW_Asc_ToUpper(*string2)); - } -} - -char * NW_Asc_Itoa(const NW_Int32 i, char* s) -{ - NW_Int32 nDigits; - NW_Int32 posVal = i; - char *string = s; - - NW_ASSERT(string != NULL); - - if (i < 0) { - *string = '-'; - string++; - posVal = -i; - } - - nDigits = posVal; - do { - nDigits /= 10; - string++; - } while (nDigits > 0); - - nDigits = posVal; - *string = '\0'; - string--; - do { - *string = (char)((nDigits % 10) + '0'); - nDigits = nDigits / 10; - string--; - } while (nDigits > 0); - return s; -} - - -NW_Ucs2* NW_Asc_toUcs2(char *string) -{ - NW_Int32 i, size; - NW_Ucs2* res = NULL; - - NW_ASSERT(string); - - if (string != NULL) { - size = NW_Asc_strlen(string) + 1; - res = (NW_Ucs2*) NW_Mem_Malloc(size * sizeof(NW_Ucs2)); - if (res != NULL) { - NW_Mem_memset(res,0,(size*sizeof(NW_Ucs2))); - for (i=0; i < size; i++) { - res[i] = (char)(string[i]); - } - } - } - return res; -} - -/***************************************************************** -** Name: NW_Str_Isalnum -** Description: Checks if the character is a particular -** representation of an alphanumeric character -** Parameters: ch - character to test -** Return Value: non-zero if c is an alphanumeric character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isalnum(const NW_Ucs2 ch) -{ - return ( NW_Str_Isalpha(ch) || NW_Str_Isdigit(ch) ); -} - -/***************************************************************** -** Name: NW_Str_Isalpha -** Description: Checks if the character is a particular -** representation of an alphabetic character -** Parameters: ch - character to test -** Return Value: non-zero if c is an alphabetic character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isalpha(const NW_Ucs2 ch) -{ - return ( ( (ch >= WAE_ASCII_LOWER_A) && (ch <= WAE_ASCII_LOWER_Z) ) || - ( (ch >= WAE_ASCII_UPPER_A) && (ch <= WAE_ASCII_UPPER_Z) ) ); -} - -/***************************************************************** -** Name: NW_Str_Isdigit -** Description: Checks if the character is a particular -** representation of a decimal-digit character. -** Parameters: ch - character to test -** Return Value: non-zero if c is a decimal-digit character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isdigit(const NW_Ucs2 ch) -{ - return ( (ch >= WAE_ASCII_0) && (ch <= WAE_ASCII_9) ); -} - -/***************************************************************** -** Name: NW_Str_Isxdigit -** Description: Checks if the character is a particular -** representation of a hexadecimal-digit character. -** Parameters: ch - character to test -** Return Value: non-zero if c is a hexadecimal-digit character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isxdigit(const NW_Ucs2 ch) -{ - return (NW_Str_Isdigit(ch) || - ( (ch >= WAE_ASCII_UPPER_A) && (ch <= WAE_ASCII_UPPER_F) ) || - ( (ch >= WAE_ASCII_LOWER_A) && (ch <= WAE_ASCII_LOWER_F) ) ); -} - -/***************************************************************** -** Name: NW_Str_Isspace -** Description: Checks if the character is a particular -** representation of a space character -** Parameters: ch - character to test -** Return Value: non-zero if c is a white-space character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isspace(const NW_Ucs2 ch) -{ - return ((ch == WAE_ASCII_SPACE) || (ch == WAE_ASCII_CR) || - (ch == WAE_ASCII_LF) || (ch == WAE_ASCII_FF) || - (ch == WAE_ASCII_HT) || (ch == WAE_ASCII_VT) || - (ch == WAE_ASCII_ZSPACE)); -} - -/***************************************************************** -** Name: NW_Str_Isnewline -** Description: Checks if the character is a newline -** Parameters: ch - character to test -** Return Value: non-zero if c is a linefeed character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isnewline(const NW_Ucs2 ch) -{ - return ((ch == WAE_ASCII_LF) || (ch == WAE_ASCII_VT) || (ch == WAE_ASCII_FF)); -} - -/***************************************************************** -** Name: NW_Str_Isbreak -** Description: Checks if the line can be broken at the -** given character. This will only be the case if -** the character is white-space or a hyphen -** Parameters: ch - character to test -** Return Value: non-zero if c is a white-space character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isbreak(const NW_Ucs2 ch) -{ - return ((NW_Str_Isspace(ch)) || (ch == WAE_ASCII_HYPHEN) || - (ch == WAE_ASCII_SOFT_HYPHEN)); -} - -/***************************************************************** -** Name: NW_Str_Ispunct -** Description: Checks if the character is a particular -** representation of a punctuation character -** Parameters: ch - character to test -** Return Value: non-zero if c is a punctuation character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Ispunct(const NW_Ucs2 ch) -{ - return ((ch > WAE_ASCII_SPACE) && !NW_Str_Isalnum(ch)); -} - -/***************************************************************** -** Name: NW_Str_Isascii -** Description: Checks if the character is a particular -** representation of a ascii (0x00 to 0x7F) character -** Parameters: ch - character to test -** Return Value: non-zero if c is a ascii character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isascii(const NW_Ucs2 ch) -{ - /* unsigned character always greater than 0 */ - return (/*(ch >= WAE_ASCII_ANY_CHAR_BEGIN) && */(ch <= WAE_ASCII_ANY_CHAR_END)); -} - -/***************************************************************** -** Name: NW_Str_Iscntrl -** Description: Checks if the character is a particular -** representation of a control char (0x00 to 0x1F) character -** Parameters: ch - character to test -** Return Value: non-zero if c is a control char character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Iscntrl(const NW_Ucs2 ch) -{ - return ((ch < WAE_ASCII_SPACE) && !NW_Str_Isspace(ch)); -} - -/***************************************************************** -** Name: NW_Str_Isupper -** Description: Checks if the character is a particular -** representation of an alphabetic character -** Parameters: ch - character to test -** Return Value: non-zero if c is an alphabetic character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Isupper(const NW_Ucs2 ch) -{ - return ((ch >= WAE_ASCII_UPPER_A) && (ch <= WAE_ASCII_UPPER_Z)); -} - -/***************************************************************** -** Name: NW_Str_Islower -** Description: Checks if the character is a particular -** representation of an alphabetic character -** Parameters: ch - character to test -** Return Value: non-zero if c is an alphabetic character, else 0 -******************************************************************/ -NW_Int32 NW_Str_Islower(const NW_Ucs2 ch) -{ - return ((ch >= WAE_ASCII_LOWER_A) && (ch <= WAE_ASCII_LOWER_Z)); -} - -/***************************************************************** -** Name: NW_Str_New -** Description: Create a new string -** Parameters: len - length of string (excluding the terminal NULL) -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_New(const NW_Uint32 len) -{ - NW_Ucs2 *tmp; - - /* Yes, sometimes we really *want* to allocate empty strings */ - - tmp = (NW_Ucs2*) NW_Mem_Malloc((len + 1) * sizeof(NW_Ucs2)); - if (tmp != NULL) { - tmp[0] = WAE_ASCII_NULL; - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_Newcpy -** Description: Create a new copy of string -** Parameters: *string - pointer to the old string -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_Newcpy(const NW_Ucs2 *string) -{ - NW_Uint32 len; - NW_Ucs2 *tmp; - - NW_ASSERT(string != NULL); - - len = NW_Str_Strlen(string); - tmp = (NW_Ucs2*) NW_Mem_Malloc((len + 1) * sizeof(NW_Ucs2)); - if (tmp != NULL) { - NW_Str_Strcpy(tmp, string); - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_Newcat -** Description: Create a new copy of two concatinated strings -** Parameters: *string1 - pointer to the 1st string -** *string2 - pointer to the 2nd string -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_Newcat(const NW_Ucs2 *string1, - const NW_Ucs2 *string2) -{ - NW_Uint32 len1, len2; - NW_Ucs2 *tmp; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - len1 = NW_Str_Strlen(string1); - len2 = NW_Str_Strlen(string2); - tmp = (NW_Ucs2*) NW_Mem_Malloc((len1 + len2 + 1) * sizeof(NW_Ucs2)); - if (tmp != NULL) { - NW_Str_Strcpy(tmp, string1); - NW_Str_Strcpy((tmp + len1), string2); - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_SegNew -** Description: Create a new string -** Parameters: len - length of string (excluding the terminal NULL) -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_SegNew(const NW_Uint32 len, - const NW_Mem_Segment_Id_t sid) -{ - NW_Ucs2 *tmp; - - /* Yes, sometimes we really *want* to allocate empty strings */ - tmp = (NW_Ucs2 *)NW_Mem_Segment_Malloc((len + 1) * sizeof(NW_Ucs2), sid); - if (tmp != NULL) { - tmp[0] = WAE_ASCII_NULL; - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_SegNewcpy -** Description: Create a new copy of string -** Parameters: *string - pointer to the old string -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_SegNewcpy(const NW_Ucs2 *string, - const NW_Mem_Segment_Id_t sid) -{ - NW_Uint32 len; - NW_Ucs2 *tmp; - - NW_ASSERT(string != NULL); - - len = NW_Str_Strlen(string); - tmp = (NW_Ucs2*) NW_Mem_Segment_Malloc((len + 1) * sizeof(NW_Ucs2), sid); - if (tmp != NULL) { - NW_Str_Strcpy(tmp, string); - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_SegNewcat -** Description: Create a new copy of two concatinated strings -** Parameters: *string1 - pointer to the 1st string -** *string2 - pointer to the 2nd string -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_SegNewcat(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Mem_Segment_Id_t sid) -{ - NW_Uint32 len1, len2; - NW_Ucs2 *tmp; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - len1 = NW_Str_Strlen(string1); - len2 = NW_Str_Strlen(string2); - tmp = (NW_Ucs2*) NW_Mem_Segment_Malloc((len1 + len2 + 1) * sizeof(NW_Ucs2), sid); - if (tmp != NULL) { - NW_Str_Strcpy(tmp, string1); - NW_Str_Strcpy((tmp + len1), string2); - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_Delete -** Description: Delete a string -** Parameters: *string - pointer to the string -** Return Value: void -******************************************************************/ -void NW_Str_Delete(NW_Ucs2 *string) -{ - if (string != NULL) { - NW_Mem_Free(string); - } - return; -} - -/***************************************************************** -** Name: NW_Str_Strlen -** Description: Get the length of a string -** Parameters: *string - Null-terminated string -** Return Value: Returns the number of characters in string, -** excluding the terminal NULL. -******************************************************************/ -NW_Uint32 NW_Str_Strlen(const NW_Ucs2 *string) -{ - NW_Uint32 len = 0; - NW_ASSERT(string != NULL); - - while (*string != WAE_ASCII_NULL) { - string++; - len++; - } - return len; -} - -/***************************************************************** -** Name: NW_Str_Strsize -** Description: Get the size of the string -** Parameters: *string - Null-terminated string -** Return Value: number of bytes in string including terminator -******************************************************************/ -NW_Uint32 NW_Str_Strsize(const NW_Ucs2 *string) -{ - NW_ASSERT(string != NULL); - - /*lint -e{666} Expression with side effects passed to repeated parameter in macro*/ - return NW_UINT32_CAST((NW_Str_Strlen(string) + 1) * sizeof(NW_Ucs2)); -} - -/***************************************************************** -** Name: NW_Str_Strcpy -** Description: Copy a string -** Parameters: *destination - Destination string -** *source - Source string -** Return Value: pointer to the destination string -******************************************************************/ -NW_Ucs2 *NW_Str_Strcpy(NW_Ucs2 *destination, - const NW_Ucs2 *source) -{ - NW_Ucs2 *walker = destination; - NW_ASSERT(destination != NULL); - NW_ASSERT(source != NULL); - - while (*source != WAE_ASCII_NULL) { - *walker++ = *source++; - } - *walker = *source; - return destination; -} - -/***************************************************************** -** Name: NW_Str_Strcat -** Description: Concatinate source string to destination string -** Parameters: *destination - Destination string -** *source - Source string -** Return Value: pointer to destination string -******************************************************************/ -NW_Ucs2 *NW_Str_Strcat(NW_Ucs2 *destination, - const NW_Ucs2 *source) -{ - NW_ASSERT(destination != NULL); - NW_ASSERT(source != NULL); - - while (*destination != WAE_ASCII_NULL) { - destination++; - } - return NW_Str_Strcpy(destination, source); -} - -/***************************************************************** -** Name: NW_Str_Strncpy -** Description: Copy characters of one string to another -** Parameters: *destination - Destination string -** *source - Source string -** count - Maximum number of characters to be copied -** Return Value: pointer to destination string -******************************************************************/ -NW_Ucs2 *NW_Str_Strncpy(NW_Ucs2 *destination, - const NW_Ucs2 *source, - const NW_Uint32 count ) -{ - NW_Uint32 nCopied = 0; - - NW_ASSERT(destination != NULL); - NW_ASSERT(source != NULL); - - while ( (nCopied < count) && (*source != WAE_ASCII_NULL) ) { - *destination = *source; - destination++; - source++; - nCopied++; - } - /* - ** ANSI 7.11.2.4 says nulls are appended till count characters in all have - ** been copied - */ - while (nCopied < count) { - *destination = WAE_ASCII_NULL; - destination++; - nCopied++; - } - return destination; -} - -/***************************************************************** -** Name: NW_Str_Strchr -** Description: Find first occurrence of a character in a string -** Parameters: *string - Null-terminated source string -** ch - Character to be located -** Return Value: pointer to the occurrence or NULL if not found -******************************************************************/ -NW_Ucs2 *NW_Str_Strchr(const NW_Ucs2 *string, - const NW_Ucs2 ch) -{ - const NW_Ucs2 *found = NULL; - NW_ASSERT(string != NULL); - - while ((*string != WAE_ASCII_NULL) && (found == NULL)) { - if (*string == ch) { - found = string; - } else { - string++; - } - } - /* handle ch == 0 */ - if (*string == ch) { - found = string; - } - return (NW_Ucs2 *)found; -} - -/***************************************************************** -** Name: NW_Str_Strrchr -** Description: Find the last occurrence of a character in a string -** Parameters: *string - Null-terminated source string -** ch - Character to be located -** Return Value: pointer to the occurrence or NULL if not found -******************************************************************/ -NW_Ucs2 *NW_Str_Strrchr(const NW_Ucs2 *string, - const NW_Ucs2 ch) -{ - const NW_Ucs2 *found = NULL; - const NW_Ucs2 *walker = NULL; - NW_ASSERT(string != NULL); - - walker = string + NW_Str_Strlen(string); - while ( (walker >= string) && (found == NULL) ) { - if (*walker == ch) { - found = walker; - } else { - walker--; - } - } - return (NW_Ucs2 *)found; -} - -/***************************************************************** -** Name: NW_Str_Strcspn -** Description: Find the first occurrence of a character set in a string -** Parameters: *string - Null-terminated source string -** *search - Character set to be located -** Return Value: index of the character found -******************************************************************/ -NW_Uint32 NW_Str_Strcspn(const NW_Ucs2 *string, - const NW_Ucs2 *search) -{ - NW_Uint32 count = 0; - - NW_ASSERT(string != NULL); - NW_ASSERT(search != NULL); - - while ((*string != WAE_ASCII_NULL) && - NW_Str_Strchr(search, *string)) - { - count++; - string++; - } - return count; -} - -/***************************************************************** -** Name: NW_Str_Strstr -** Description: Find a substring within a string -** Parameters: *string - Null-terminated source string -** *search - Null-terminated string to search for -** Return Value: pointer to start of substring or NULL if not found -******************************************************************/ -NW_Ucs2 *NW_Str_Strstr(const NW_Ucs2 *string, - const NW_Ucs2 *search) -{ - NW_Uint32 searchLen = NW_Str_Strlen(search); - - NW_ASSERT(string != NULL); - NW_ASSERT(search != NULL); - - if (*search == WAE_ASCII_NULL) { - return (NW_Ucs2 *)string; - } - while ((*string != WAE_ASCII_NULL) && - NW_Str_Strncmp(string, search, searchLen)) - { - string++; - } - if (*string != WAE_ASCII_NULL) { - return (NW_Ucs2 *)string; - } - return NULL; -} - -/***************************************************************** -** Name: NW_Str_Strstrtil -** Description: Find a substring within a string ended by terminator -** Parameters: *string - Null-terminated source string -** *sub_terminator -** Return Value: substring -******************************************************************/ -NW_Ucs2* NW_Str_Strstrtil(const NW_Ucs2 *string, char sub_terminator){ - - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_ASSERT(string != NULL); - - pStart = string; - - pEnd = NW_Str_Strchr(pStart, sub_terminator); - - if (pEnd != NULL) { - return NW_Str_Substr(pStart, 0, (pEnd - pStart)); - } - else { - return NULL; - } -} - -/***************************************************************** -** Name: NW_Str_Strcmp -** Description: Compare two strings -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2 -******************************************************************/ -NW_Int32 NW_Str_Strcmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2) -{ - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((*string1 == *string2) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL)) - { - string1++; - string2++; - } - return (*string1 - *string2); -} - -/***************************************************************** -** Name: NW_Str_Stricmp -** Description: Compare two strings, case-insensitve -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2 -******************************************************************/ -NW_Int32 NW_Str_Stricmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2) -{ - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - - while ((NW_Str_ToUpper(*string1) == NW_Str_ToUpper(*string2)) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL)) - { - string1++; - string2++; - } - return (NW_Str_ToUpper(*string1) - NW_Str_ToUpper(*string2)); -} - -/***************************************************************** -** Name: NW_Str_Strncmp -** Description: Compare first "count" characters of two strings -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** count - Maximum number of characters to compare -** Return Value: <0 if str1 < str2, 0 if str1 == str2, or >0 if str1 > str2 -******************************************************************/ -NW_Int32 NW_Str_Strncmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 1; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((*string1 == *string2) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL) && - (i < count)) - { - string1++; - string2++; - i++; - } - if (count == 0) { - return 0; - } else { - return (*string1 - *string2); - } -} - -/***************************************************************** -** Name: NW_Str_Strnicmp -** Description: Compare first "count" characters of two strings, case-insensitive -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** count - Maximum number of characters to compare -** Return Value: <0 if str1 < str2, 0 if str1 == str2, or >0 if str1 > str2 -******************************************************************/ -NW_Int32 NW_Str_Strnicmp(const NW_Ucs2 *string1, - const NW_Ucs2 *string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 1; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - while ((NW_Str_ToUpper(*string1) == NW_Str_ToUpper(*string2)) && - (*string1 != WAE_ASCII_NULL) && (*string2 != WAE_ASCII_NULL) && - (i < count)) - { - string1++; - string2++; - i++; - } - if (count == 0) { - return 0; - } else { - return (NW_Str_ToUpper(*string1) - NW_Str_ToUpper(*string2)); - } -} - -/***************************************************************** -** Name: NW_Str_Hash -** Description: Calculate a 32-bit hash code for a string -** Parameters: *string - Null-terminated string to hash -** Return Value: integer value -******************************************************************/ -NW_Uint32 NW_Str_Hash(const NW_Ucs2 *string) -{ - /* Psuedo-random numbers from Excel */ - static const NW_Uint32 hashtable[16] = { - 0x14FDDB16, 0x441E357C, 0x71036490, 0xC5428810, - 0xBF776505, 0x7D781343, 0x9D949D3A, 0x846D619D, - 0x8E53570C, 0x494C0336, 0x1F30DB1B, 0xCB5F2D5F, - 0x38692DEB, 0x51202F39, 0x75CD2E06, 0x7678235A - }; - - static const NW_Uint32 highbit[2] = {0, 0x80000000}; - - NW_Uint16 i; - NW_Uint32 ch; - NW_Uint32 hashcode = 0; - - NW_ASSERT(string != NULL); - - do { - ch = *string; - - /* XOR pseudo-random number and then rotate bits */ - for (i = 0; i < 4; i++) { - hashcode = hashcode ^ hashtable[ch & 0x0F]; - hashcode = (hashcode >> 1) | highbit[hashcode & 0x01]; - ch = ch >> 4; - } - - } while ((*string++) != 0); - - return hashcode; -} - -/***************************************************************** -** Name: NW_Str_Atoi -** Description: Converts a string to an integer -** Parameters: *string - Null-terminated string to convert -** Return Value: integer value -******************************************************************/ -NW_Int32 NW_Str_Atoi(const NW_Ucs2 *string) -{ - NW_Ucs2 *endPtr; - NW_ASSERT(string != NULL); - - return NW_Str_Strtol(string, &endPtr, 10); -} - -NW_Ucs2 *NW_Str_ItoBase(const NW_Int32 i, NW_Ucs2* s, const NW_Int32 base) -{ - NW_Int32 nDigits; - NW_Int32 posVal = i; - NW_Ucs2 *string = s; - NW_ASSERT(string != NULL); - - if(i == 0) - { - string++; - *string = WAE_ASCII_NULL; - string--; - *string = (NW_Ucs2)WAE_ASCII_0; - return s; - } - - if (i < 0) { - *string = '-'; - string++; - posVal = -i; - } - nDigits = posVal; - while (nDigits > 0) { - nDigits /= base; - string++; - } - nDigits = posVal; - *string = WAE_ASCII_NULL; - string--; - while (nDigits > 0) { - NW_Int32 numeral = nDigits % base; - if (numeral < 10) { - *string = (NW_Ucs2)(numeral + WAE_ASCII_0); - } else { - *string = (NW_Ucs2)(numeral - 10 + WAE_ASCII_LOWER_A); - } - nDigits = nDigits / base; - string--; - } - return s; -} - -/***************************************************************** -** Name: NW_Str_Itoa -** Description: Convert a decimal integer to a string -** Parameters: i - Integer to be converted -** *string - pointer to string -** Return Value: pointer to the converted string -******************************************************************/ -NW_Ucs2 *NW_Str_Itoa(const NW_Int32 i, NW_Ucs2* string) -{ - return NW_Str_ItoBase(i, string, 10); -} - -NW_Ucs2 *NW_Str_UltoBase(const NW_Int32 i, NW_Ucs2* s, const NW_Int32 base) -{ - NW_Int32 nDigits; - NW_Ucs2 *string = s; - - NW_ASSERT(string != NULL); - - nDigits = i; - do { - nDigits /= base; - string++; - } while (nDigits != 0); - - nDigits = i; - *string = WAE_ASCII_NULL; - string--; - do { - NW_Int32 numeral = nDigits % base; - if (numeral < 10) { - *string = (NW_Ucs2)(numeral + WAE_ASCII_0); - } else { - *string = (NW_Ucs2)(numeral - 10 + WAE_ASCII_LOWER_A); - } - nDigits /= base; - string--; - } while (nDigits != 0); - return s; -} - -/***************************************************************** -** Name: NW_Str_Ultoa -** Description: Convert an NW_Uint32 integer to an NW string -** Parameters: i - Integer to be converted -** *string - pointer to string -** Return Value: pointer to the converted string -******************************************************************/ -NW_Ucs2 *NW_Str_Ultoa(const NW_Uint32 i, NW_Ucs2* string) -{ - return NW_Str_UltoBase((NW_Int32)i, string, 10); -} - - -/***************************************************************** -** Name: NW_Str_Strtol -** Description: Converts a string to an integer -** Parameters: *ptr - Null-terminated string to convert -** **endPtr - returned pointer to end of converted string -** base - radix for conversion -** Return Value: integer value -******************************************************************/ -NW_Int32 NW_Str_Strtol(const NW_Ucs2 *ptr, NW_Ucs2 **endPtr, NW_Int32 base) -{ - NW_Int32 result; - NW_Int32 prevResult; - NW_Int32 currDigit; - NW_Int32 sign = 1; - - const NW_Ucs2 *myEnd; - NW_ASSERT(ptr != NULL); - NW_ASSERT(endPtr != NULL); - - while ((*ptr != WAE_ASCII_NULL) && NW_Str_Isspace(*ptr)) { - ptr++; - } - - if (*ptr == WAE_ASCII_PLUS) { - ptr++; - } - if (*ptr == WAE_ASCII_MINUS) { - ptr++; - sign = -1; - } - myEnd = ptr; - result = 0; - currDigit = 0; - - do { - prevResult = result; - result = result*base + currDigit; - if (result < prevResult) { - *endPtr = NULL; - return 0; - } - if ((*myEnd >= WAE_ASCII_0) && (*myEnd <= WAE_ASCII_9)) { - currDigit = (*myEnd - WAE_ASCII_0); - myEnd++; - } else if ((base > 10) && NW_Str_Isalpha(*myEnd)) { - currDigit = NW_Str_ToUpper(*myEnd) - WAE_ASCII_UPPER_A + 10; - myEnd++; - } else { - currDigit = base; - } - } while ( currDigit < base ); - *endPtr = (NW_Ucs2 *)myEnd; - return sign*result; -} - -/***************************************************************** -** Name: NW_Str_Strtoul -** Description: Converts a string to an unsigned integer -** Parameters: *ptr - Null-terminated string to convert -** **endPtr - returned pointer to end of converted string -** base - radix for conversion -** Return Value: integer value -******************************************************************/ -NW_Int32 NW_Str_Strtoul(const NW_Ucs2 *ptr, NW_Ucs2 **endPtr, NW_Int32 base) -{ - NW_Int32 result; - NW_Int32 prevResult; - NW_Int32 currDigit; - - const NW_Ucs2 *myEnd; - - NW_ASSERT(ptr != NULL); - NW_ASSERT(endPtr != NULL); - - while ((*ptr != WAE_ASCII_NULL) && NW_Str_Isspace(*ptr)) { - ptr++; - } - - if (*ptr == WAE_ASCII_PLUS) { - ptr++; - } - myEnd = ptr; - result = 0; - currDigit = 0; - - do { - prevResult = result; - result = result*base + currDigit; - if (result < prevResult) { - *endPtr = NULL; - return 0; - } - if ((*myEnd >= WAE_ASCII_0) && (*myEnd <= WAE_ASCII_9)) { - currDigit = (*myEnd - WAE_ASCII_0); - myEnd++; - } else if ((base > 10) && NW_Str_Isalpha(*myEnd)) { - currDigit = NW_Str_ToUpper(*myEnd) - WAE_ASCII_UPPER_A + 10; - myEnd++; - } else { - currDigit = base; - } - } while ( currDigit < base ); - *endPtr = (NW_Ucs2 *)myEnd; - return result; -} - -/***************************************************************** -** Name: NW_Str_CvtToInt32 -** Description: Converts a string to an integer value -** and checks for overflow -** Parameters: *ptr - Null-terminated string to convert -** **endPtr - returned pointer to end of converted string -** base - radix for conversion -** *value - integer value returned -** Return Value: KBrsrSuccess or KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_Str_CvtToInt32(const NW_Ucs2 *string, NW_Ucs2 **endptr, - NW_Int32 base, NW_Int32 *value) -{ - NW_ASSERT(string != NULL); - NW_ASSERT(endptr != NULL); - - *endptr = NULL; - *value = NW_Str_Strtol(string, endptr, base); - - if (*endptr == NULL) { - return KBrsrBadInputParam; - } else { - return KBrsrSuccess; - } -} - -/***************************************************************** -** Name: NW_Str_CvtToInt32 -** Description: Converts a string to a floating-point value -** and checks for overflow -** Parameters: *ptr - Null-terminated string to convert -** **endPtr - returned pointer to end of converted string -** *ret_double - float value returned -** Return Value: KBrsrSuccess or KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_Str_CvtToFloat32(const NW_Ucs2 *string, NW_Ucs2 **end, - NW_Float32 *ret_double) - -{ - const NW_Ucs2* ptr; - const NW_Ucs2* start = string; - NW_Ucs2 c; - NW_Float64 intPart = 0.0; - NW_Float64 fracPart = 0.0; - NW_Float32 expPart = 1.0; - NW_Int32 sign = 1; - NW_Int32 expVal = 0; - NW_Float64 res64; - - NW_ASSERT(string); - NW_ASSERT(end); - NW_ASSERT(ret_double); - - /* skipping white spaces */ - while ((*start != 0) && (*start <= 32)) { - start++; - } - - ptr = start; - if (*ptr == 0) { - return KBrsrBadInputParam; /* reach the end of the string */ - } - - c = *ptr; - if ((c != '+') && (c != '-') && (c != '.') && !NW_Str_Isdigit(c)) { - return KBrsrBadInputParam; - } - - if (c != '.') { - /* read NW_Int32 part */ - if (c == '-') { - sign = -1; - } else if (NW_Str_Isdigit(c)) { - intPart = (NW_Float32)(c - '0'); - } - ptr++; - while ((*ptr != 0) && NW_Str_Isdigit(*ptr)) { - if (is_finite_float64(intPart)) { - intPart = (intPart * 10) + (*ptr - '0'); - } - ptr++; - } - if (is_finite_float64(intPart)) { - intPart *= sign; - } else { - return KBrsrBadInputParam; - } - - } - - if ((*ptr != 0) && (*ptr == '.')) { - /* read fraction part */ - ptr++; - expPart = 0.1f; - while ((*ptr != 0) && NW_Str_Isdigit(*ptr)) { - /*lint -e{747} Significant prototype coercion*/ - if (! is_zero_float64(expPart)) { - fracPart = fracPart + expPart*(*ptr - '0'); - expPart *= 0.1f; - } - ptr++; - } - fracPart *= sign; - } - - if ((*ptr != 0) && ((*ptr == 'e') || (*ptr == 'E'))) { - /* if we have xxx[e|E] we must have exponent of some kind */ - ptr++; - if (*ptr == 0) { - return KBrsrBadInputParam; - } - c = *ptr; - /* exp must be e[+|-]nn */ - if ((c != '+') && (c != '-') && !NW_Str_Isdigit(c)) { - return KBrsrBadInputParam; - } - - ptr++; - sign = 1; - /* if exp is e[+|-] or e[+|-]xx where xx is not a number, error */ - if ((c == '+') || (c == '-')) { - if ((*ptr == 0) || !NW_Str_Isdigit(*ptr)) { - return KBrsrBadInputParam; - } else if (c == '-') { - sign = -1; - } - } else { - expVal = c - '0'; - } - - /* Get exponent digits. */ - while ((*ptr != 0) && NW_Str_Isdigit(*ptr)) { - /* if we can't hold exponent we've got over/underflow */ - if ((expVal > NW_FLOAT32_MAX_EXP) && (sign > 0)) { - return KBrsrBadInputParam; /* overflow */ - } else { - /* if exponent is neg, spec says underflow -> 0, so */ - /* we need to eat all chars in exp, but want expVal to */ - /* remain a big, negative, number */ - if (expVal >= 0) { - if (expVal < 2 * NW_FLOAT32_MAX_EXP) { - expVal = (expVal * 10) + (*ptr - '0'); - } - } - } - ptr++; - } - if (expVal > 0) { - expVal *= sign; - } - } - /* End exponent part. */ - *end = (NW_Ucs2*)ptr; - - /* explicit check for just sign char, i.e. '+' or '-' */ - if ( (start == *end) || - ((start + 1 == *end) && !NW_Str_Isdigit(*start)) ) - { - return KBrsrBadInputParam; - } - - /* The calculations will be done with doubles, so allow double - * the exponents for the time being. - */ - if (expVal < NW_FLOAT32_MIN_EXP * 2) { - *ret_double = 0.0f; - return KBrsrSuccess; - } else if (expVal > NW_FLOAT32_MAX_EXP * 2) { - return KBrsrBadInputParam; - } else { - res64 = (intPart + fracPart)*NW_Math_powint64(10.0f, expVal); - if (is_zero_float64(res64)) { - *ret_double = 0.0f; - return KBrsrSuccess; - } else if (is_finite_float64(res64)) { - *ret_double = (NW_Float32)res64; - return KBrsrSuccess; - } else { - return KBrsrBadInputParam; - } - } -} - -/***************************************************************** -** Name: NW_Str_Inc -** Description: Increments the string pointer by count -** Parameters: *string - pointer to null-terminated string -** count - Amount to increment -** Return Value: pointer to the new location or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_Inc(const NW_Ucs2 *string, const NW_Int32 count) -{ - NW_Int32 len; - - NW_ASSERT(string != NULL); - - len = NW_Str_Strlen(string); - if(count > len) - return NULL; - - return (NW_Ucs2 *)(string + count); -} - -/***************************************************************** -** Name: NW_Str_CvtToAscii -** Description: Convert ucs2 string to new null-terminated ascii string -** Parameters: *string - Null-terminated ucs2 string -** Return Value: pointer to the new ascii string or NULL -******************************************************************/ -char *NW_Str_CvtToAscii(const NW_Ucs2 *string) -{ - NW_Int32 i, size; - char* res = NULL; - - NW_ASSERT(string); - - size = NW_Str_Strlen(string) + 1; - res = (char*) NW_Mem_Malloc((NW_Uint32)size * sizeof(char)); - /* this is a really naive conversion to ascii */ - if (res != NULL) { - for (i=0; i < size; i++) { - res[i] = (char)(string[i] & 0xFF); - } - } - return res; -} - -/***************************************************************** -** Name: NW_Str_CvtFromAscii -** Description: Convert null-terminated ascii string to new ucs2 string -** Parameters: *string - Null-terminated ascii string -** Return Value: pointer to new ucs2 string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_CvtFromAscii(const char *string) -{ - NW_Uint32 i, size; - NW_Ucs2* res = NULL; - - NW_ASSERT(string); - - size = NW_Asc_strlen(string) + 1; - res = (NW_Ucs2*) NW_Mem_Malloc(size * sizeof(NW_Ucs2)); - /* this is a really naive conversion from ascii */ - if (res != NULL) { - for (i=0; i < size; i++) { - res[i] = string[i]; - } - } - return res; -} - -/***************************************************************** -** Name: NW_Str_ToLower -** Description: Converts a NW_Ucs2 to lower case -** Parameters: ch - the character to convert -** Return Value: the converted character -******************************************************************/ -NW_Ucs2 NW_Str_ToLower(const NW_Ucs2 ch) -{ - if((ch >= WAE_ASCII_UPPER_A) && (ch <= WAE_ASCII_UPPER_Z)) { - return (NW_Ucs2)(ch - WAE_ASCII_UPPER_A + WAE_ASCII_LOWER_A); - } else { - return ch; - } -} - -/***************************************************************** -** Name: NW_Str_ToUpper -** Description: Converts a NW_Ucs2 to upper case -** Parameters: ch - the character to convert -** Return Value: the converted character -******************************************************************/ -NW_Ucs2 NW_Str_ToUpper(const NW_Ucs2 ch) -{ - if((ch >= WAE_ASCII_LOWER_A) && (ch <= WAE_ASCII_LOWER_Z)) { - return (NW_Ucs2)(ch - WAE_ASCII_LOWER_A + WAE_ASCII_UPPER_A); - } else { - return ch; - } -} - -/***************************************************************** -** Name: NW_Str_Strlwr -** Description: Converts a string lower case -** Parameters: *string - the string to convert -** Return Value: void -******************************************************************/ -void NW_Str_Strlwr(NW_Ucs2 *string) -{ - NW_ASSERT(string); - while (*string != WAE_ASCII_NULL) { - *string = NW_Str_ToLower(*string); - string++; - } - return; -} - -/***************************************************************** -** Name: NW_Str_Strupr -** Description: Converts a string upper case -** Parameters: *string - the string to convert -** Return Value: void -******************************************************************/ -void NW_Str_Strupr(NW_Ucs2 *string) -{ - NW_ASSERT(string); - while (*string != WAE_ASCII_NULL) { - *string = NW_Str_ToUpper(*string); - string++; - } - return; -} - -/***************************************************************** -** Name: NW_Str_Substr -** Description: Returns a new substring -** Parameters: *string - the source string -** start - index of the start of the substring -** len - length of the substring -** Return Value: pointer to the new substring or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_Substr(const NW_Ucs2 *string, - const NW_Uint32 start, const NW_Uint32 len) -{ - NW_Ucs2 *tmp = NULL; - - NW_ASSERT(string); - - if (NW_Str_Strlen(string) < (start + len)) { - return NULL; - } - - /* Yes, sometimes we really *want* to allocate empty strings */ - tmp = (NW_Ucs2*) NW_Mem_Malloc((len + 1) * sizeof(NW_Ucs2)); - if (tmp != NULL) { - NW_Str_Strncpy(tmp, (string + start), len); - tmp[len] = WAE_ASCII_NULL; - } - return tmp; -} - -/***************************************************************** -** Name: NW_Str_SegSubstr -** Description: Returns a new substring -** Parameters: *string - the source string -** start - index of the start of the substring -** len - length of the substring -** Return Value: pointer to the new substring or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_SegSubstr(const NW_Ucs2 *string, - const NW_Uint32 start, const NW_Uint32 len, - const NW_Mem_Segment_Id_t sid) -{ - NW_Ucs2 *tmp = NULL; - - NW_ASSERT(string); - NW_ASSERT(NW_Str_Strlen(string) >= (start + len)); - - /* Yes, sometimes we really *want* to allocate empty strings */ - tmp = (NW_Ucs2*) NW_Mem_Segment_Malloc((len + 1) * sizeof(NW_Ucs2), sid); - if (tmp != NULL) { - NW_Str_Strncpy(tmp, (string + start), len); - tmp[len] = WAE_ASCII_NULL; - } - return tmp; -} - -/***************************************************************** -** Name: NW_Str_NewcpyConst -** Description: Create a new copy of a string -** Parameters: *string - pointer to the old string -** Return Value: pointer to the new string or NULL -******************************************************************/ -NW_Ucs2 *NW_Str_NewcpyConst(const char* const string) -{ - NW_Uint32 i = 0; - NW_Uint32 len; - NW_Ucs2 *tmp; - - NW_ASSERT(string != NULL); - - len = NW_Asc_strlen(string); - tmp = (NW_Ucs2*) NW_Mem_Malloc((len + 1) * sizeof(NW_Ucs2)); - if (tmp != NULL) { - for (i = 0; i <= len; i++) { - tmp[i] = string[i]; - } - } - - return tmp; -} - -/***************************************************************** -** Name: NW_Str_StrcpyConst -** Description: Copy a string -** Parameters: *destination - Destination string -** *source - Source Ascii string constant -** Return Value: pointer to the destination string -******************************************************************/ -NW_Ucs2 *NW_Str_StrcpyConst(NW_Ucs2 *destination, - const char* const source) -{ - NW_Int32 i = 0; - char ch; - - NW_ASSERT(destination != NULL); - NW_ASSERT(source != NULL); - - do { - ch = source[i]; - destination[i] = ch; - i++; - } while (ch != WAE_ASCII_NULL); - - return destination; -} - -/***************************************************************** -** Name: NW_Str_StrcatConst -** Description: Concatinate source string to destination string -** Parameters: *destination - Destination string -** *source - Source Ascii string constant -** Return Value: pointer to destination string -******************************************************************/ -NW_Ucs2 *NW_Str_StrcatConst(NW_Ucs2 *destination, - const char* const source) -{ - NW_Uint32 i = 0; - NW_Uint32 j = 0; - char ch; - - NW_ASSERT(destination != NULL); - NW_ASSERT(source != NULL); - - while (destination[i] != WAE_ASCII_NULL) { - i++; - } - - do { - ch = source[j]; - destination[i] = ch; - i++; - j++; - } while (ch != WAE_ASCII_NULL); - - return destination; -} - -/***************************************************************** -** Name: NW_Str_StrcmpConst -** Description: Compare a string to an Ascii string constant -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2 -******************************************************************/ -NW_Int32 NW_Str_StrcmpConst(const NW_Ucs2 *string1, - const char* const string2) -{ - NW_Int32 i = 0; - NW_Int32 ch1; - NW_Int32 ch2; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - do { - ch1 = string1[i]; - ch2 = string2[i]; - i++; - } while (((ch1 - ch2) == 0) && (ch1 != WAE_ASCII_NULL)); - - return (ch1 - ch2); -} - -/***************************************************************** -** Name: NW_Str_StricmpConst -** Description: Compare a string to an Ascii string constant, case-insensitve -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** Return Value: <0 if string1 < string2, 0 if equal, >0 if string1 > string2 -******************************************************************/ -NW_Int32 NW_Str_StricmpConst(const NW_Ucs2 *string1, - const char* const string2) -{ - NW_Int32 i = 0; - NW_Int32 ch1; - NW_Int32 ch2; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - do { - ch1 = NW_Str_ToUpper(string1[i]); - ch2 = NW_Str_ToUpper(string2[i]); - i++; - } while (((ch1 - ch2) == 0) && (ch1 != WAE_ASCII_NULL)); - - return (ch1 - ch2); -} - -/***************************************************************** -** Name: NW_Str_StrncmpConst -** Description: Compare first "count" characters of a string to -** an Ascii string constant -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** count - Maximum number of characters to compare -** Return Value: <0 if str1 < str2, 0 if str1 == str2, or >0 if str1 > str2 -******************************************************************/ -NW_Int32 NW_Str_StrncmpConst(const NW_Ucs2 *string1, - const char* const string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 0; - NW_Int32 ch1; - NW_Int32 ch2; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - do { - ch1 = string1[i]; - ch2 = string2[i]; - i++; - } while (((ch1 - ch2) == 0) && (ch1 != WAE_ASCII_NULL) && (i < count)); - - return (ch1 - ch2); -} - -/***************************************************************** -** Name: NW_Str_StrnicmpConst -** Description: Compare first "count" characters of a string to -** an Ascii string constant, case-insensitive -** Parameters: *string1 - Null-terminated string to compare -** *string2 - Null-terminated string to compare -** count - Maximum number of characters to compare -** Return Value: <0 if str1 < str2, 0 if str1 == str2, or >0 if str1 > str2 -******************************************************************/ -NW_Int32 NW_Str_StrnicmpConst(const NW_Ucs2 *string1, - const char* const string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 0; - NW_Uint16 ch1; - NW_Uint16 ch2; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - do { - ch1 = NW_Str_ToUpper(string1[i]); - ch2 = NW_Str_ToUpper(string2[i]); - i++; - } while (((ch1 - ch2) == 0) && (ch1 != WAE_ASCII_NULL) && (i < count)); - - return (ch1 - ch2); -} - -/******************************************************************* - Name: NW_Str_CompressWhitespace - - Description: Removes excess whitespace, per WML Ver 1.2, - section 11.8.1. - - Parameters: s -- pointer to string to be squeezed - - Algorithm: Remove leading whitespace, and compress all other - sequences of whitespace into a single blank characer. - " For example, this " becomes - "For example, this ". - - Returns: void - - NOTE: Some gateways do this for us -- this code ensures that - Rainbow behaves properly for gateways which fail to - do so. -********************************************************************/ - -void NW_Str_CompressWhitespace(NW_Ucs2 *s) -{ - NW_Bool compressing = NW_TRUE; - NW_Ucs2 *p = s; - - NW_ASSERT(s); - - while (*p) { - if (NW_Str_Isspace(*p)) { - *p = ' '; /* make sure all whitespace becomes a blank */ - if (compressing) { - p++; - continue; - } - compressing = NW_TRUE; - } else { - compressing = NW_FALSE; - } - *s++ = *p++; - } - *s = '\0'; -} - -/******************************************************************* - Name: NW_Str_Strcharreplace - - Description: Replaces char1 by char2 in a string - - Parameters: stirng -- pointer to string to perform operation on - char1 - character to be replaced - char2 - character to be replaced by - - Algorithm: Replace char1 by char2 in a string - For example replace all d with a in string add will - result in ddd - - Returns: NW_Int32 - number of replacements - -********************************************************************/ - -NW_Int32 NW_Str_Strcharreplace(NW_Ucs2* const string, const NW_Ucs2 char1, const NW_Ucs2 char2) -{ - NW_Int32 count = 0; - NW_Int32 i = 0; - - NW_ASSERT(string); - - while(string[i]) - { - if(string[i] == char1) { - string[i] = char2; - count++; - } - i++; - } - - return count; -} - -/******************************************************************* - Name: NW_Str_Trim - - Description: Removes all the whitespaces from the start or/and - end of the string - - Parameters: string -- pointer to string to perform operation on - where - specifies from whether start/end or both locs - - - Returns: NW_Ucs2* - returns a new string; - -********************************************************************/ -NW_Ucs2* NW_Str_Trim(const NW_Ucs2* string, NW_Str_Location_t where) -{ - NW_Uint32 start = 0; - NW_Uint32 end = 0; - NW_Uint32 len; - const NW_Ucs2* ptr; - - if(string == NULL) - return NULL; - - len = NW_Str_Strlen(string); - - ptr = string; - - while ((*ptr != WAE_ASCII_NULL) && NW_Str_Isspace(*ptr)) { - ptr++; - start++; - } - - if(where == NW_Str_Start) - return NW_Str_Substr(string, start, (len > start) ? (len - start) : 0); - - ptr = string + len - 1; - end = len; - - while ((*ptr != WAE_ASCII_NULL) && NW_Str_Isspace(*ptr)) { - ptr--; - end--; - } - - if(where == NW_Str_End) - return NW_Str_Substr(string, 0, end); - - if(where == NW_Str_Both) - return NW_Str_Substr(string, start, (end > start) ? (end - start) : 0); - - return NULL; -} - -/******************************************************************* - Name: NW_Str_TrimInPlace - - Description: 'Removes' all the whitespaces from the start or/and - end of the string. This is done in-place within the - existing memory. Leading whitespace is not actually - removed but the returned pointer will be such that it - has been skipped. Trailing whitespace is removed by - moving the null terminator of the string. - - CAUTION: The returned pointer will be somewhere in - the middle of the original string. Care must be taken - when dealing with an allocated buffer such that the - original buffer is deallocated only after all pointers - within the buffer are no longer used. - - Parameters: string -- pointer to string to perform operation on - where - specifies from whether start/end or both locs - - - Returns: NW_Ucs2* - returns a pointer to the trimmed string. - -********************************************************************/ -NW_Ucs2* NW_Str_TrimInPlace(NW_Ucs2* string, NW_Str_Location_t where) -{ - NW_Ucs2* ptrStart; - NW_Ucs2* ptrEnd; - - if(string == NULL) { - return NULL; - } - - if((where != NW_Str_Start) && (where != NW_Str_End) && (where != NW_Str_Both)) { - return NULL; - } - - ptrStart = string; - if((where == NW_Str_Start) || (where == NW_Str_Both)) { - while ((*ptrStart != WAE_ASCII_NULL) && NW_Str_Isspace(*ptrStart)) { - ptrStart++; - } - } - - if((where == NW_Str_End) || (where == NW_Str_Both)) { - ptrEnd = ptrStart + NW_Str_Strlen(ptrStart) - 1; - while ((ptrEnd >= ptrStart) && NW_Str_Isspace(*ptrEnd)) { - *ptrEnd-- = WAE_ASCII_NULL; - } - } - - return ptrStart; -} - -/******************************************************************* - Name: NW_Str_StrIsNumber - - Description: This function is to check the given string contains - only digits, spaces, 'w' char. These charecters are - used to represent phone numbers. - - Parameters: stirng -- pointer to string to perform operation on - count - number of charecters to check. - - Returns: NW_TRUE if all the charectors confirms to charecter - set to represent phone number. NW_FALSE other wise. - -********************************************************************/ -NW_Bool NW_Str_StrIsNumber(NW_Ucs2 *string, NW_Uint32 count) -{ - NW_Uint32 i = 0; - - if(count == 0) - return NW_FALSE; - - while((i < count) && *string) - { - if(NW_Str_Isdigit(*string) || - NW_Str_Isbreak(*string) || - (*string == 'w') || - (*string == 'p') || - (*string == '*') || - (*string == '#') || - (*string == '+') || - (*string == '.') || - (*string == ',') || - (*string == ')') || - (*string == '(')) - { - string++; - i++; - } - else - { - return NW_FALSE; - } - } - - return NW_TRUE; -} - -/******************************************************************* - Name: NW_Str_StrIsValidLength - - Description: This function is to check the given string contains - first letter optional +/-, and only digits, - - Parameters: stirng -- pointer to string to perform operation on - - Returns: NW_TRUE -- if all the charectors confirms to charecter - in a valid number NW_FALSE other wise. - -********************************************************************/ -NW_Bool NW_Str_StrIsValidLength(NW_Ucs2 *string) -{ - NW_Bool retValue = NW_FALSE; - NW_Uint32 i = NW_Str_Strlen(string); - - if(i == 0) - return retValue; - - if (*string == WAE_ASCII_PLUS) { - string++; - i--; - } - - while(i && *string) - { - retValue = NW_TRUE; - if(NW_Str_Isdigit(*string)) - { - string++; - i--; - } - else - { - retValue = NW_FALSE; - break; - } - } - - return retValue; -} - -// compare string as byte *, case insensitive, -//"count" indicate the first number of bytes to compare. - -NW_Int32 NW_Byte_Strnicmp(const NW_Byte *string1, const NW_Byte *string2, - const NW_Uint32 count) -{ - NW_Uint32 i = 1; - - NW_ASSERT(string1 != NULL); - NW_ASSERT(string2 != NULL); - - if (string1 == string2) - return 0; - - while ((NW_Asc_ToUpper(*string1) == NW_Asc_ToUpper(*string2)) && - (i < count)) - { - string1++; - string2++; - i++; - } - if (count == 0) { - return 0; - } else { - return (NW_Asc_ToUpper(*string1) - NW_Asc_ToUpper(*string2)); - } -} -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_time_epoc32.c --- a/webengine/wmlengine/src/utils/src/nwx_time_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 1999 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/***************************************************************** -** File name: nwx_time_epoc32.c -** Part of: Time -** Description: Provides interfaces to time routines. -** Note: None of these is thread safe. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include <time.h> -#include "nwx_time.h" -#include "nwx_settings.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Time_GetTime -** Description: Get current system time -** Parameters: none -** Return Value: sytem time in seconds since Jan 1st, 1970 -******************************************************************/ -NW_Time_t NW_Time_GetTime() -{ - time_t ltime = time(NULL); - time_t utctime = mktime(gmtime(&ltime)); // on EPOC this is a signed int - - // NW_Time_t is an NW_Int32, so the typecast is fine. - return (NW_Time_t)(utctime); -} - -/***************************************************************** -** Name: NW_Time_GetTimeMSec -** Description: Get current system time -** Parameters: none -** Return Value: sytem time in mSecs since Jan 1st, 1970 -** Note: this timer will roll-over every 49.7 days. -******************************************************************/ -NW_Uint32 NW_Time_GetTimeMSec() -{ - // EPOC32 does seem to have any way of getting the current msec - // value. - NW_Uint32 sec = (NW_Uint32)time(NULL); - NW_Uint32 msec = sec * 1000; - - return msec; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_time_utils.c --- a/webengine/wmlengine/src/utils/src/nwx_time_utils.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,409 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nwx_time_utils.c -** Part of: Time -** Description: Time utilities. Platform independent -** Note: None of these is thread safe. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ - -#include "nwx_defs.h" -#include "nwx_time.h" -#include "nwx_math.h" -#include "nwx_string.h" - -/*lint -save -esym(578, time), -e650 Declaration of symbol hides symbol, Constant out of range for operator*/ - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ -#define SECONDS_IN_MINUTE 60 -#define SECONDS_IN_HOUR (SECONDS_IN_MINUTE * 60) -#define SECONDS_IN_DAY (SECONDS_IN_HOUR * 24) -#define SECONDS_IN_YEAR (SECONDS_IN_DAY * 365) -#define SECONDS_IN_4YEARS (SECONDS_IN_YEAR * 4 + SECONDS_IN_DAY) - -//#define SUNDAY 0 -//#define MONDAY 1 -//#define TUESDAY 2 -//#define WEDNESDAY 3 -#define THURSDAY 4 -//#define FRIDAY 5 -//#define SATURDAY 6 - -#define DAYS_IN_WEEK 7 - -//#define JANUARY 1 -//#define FEBRUARY 2 -//#define MARCH 3 -//#define APRIL 4 -//#define MAY 5 -//#define JUNE 6 -//#define JULY 7 -//#define AUGUST 8 -//#define SEPTEMBER 9 -//#define OCTOBER 10 -//#define NOVEMBER 11 -//#define DECEMBER 12 - -/*#define MONTHS_IN_YEAR 12*/ - -/*const char * const ABRV_MONTH_STRS[] = { "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" };*/ - -/*const char * const ABRV_DAYOFWEEK_STRS[] = { "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" };*/ - -/*#define RFC1123TIMESTR_POS_DAYOFWEEK 0 -#define RFC1123TIMESTR_POS_DAY 5 -#define RFC1123TIMESTR_POS_MONTH 8 -#define RFC1123TIMESTR_POS_YEAR 12 -#define RFC1123TIMESTR_POS_HOUR 17 -#define RFC1123TIMESTR_POS_MINUTE 20 -#define RFC1123TIMESTR_POS_SECOND 23 -#define RFC1123TIMESTR_LEN 29*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static NW_Uint16 NW_Time_DayOfWeek(const NW_Time_t time) -{ - NW_Uint32 days; - - days = (NW_Uint32)time / SECONDS_IN_DAY; - days += THURSDAY; /* Jan 1, 1970 is a Thursday */ - - return (NW_Uint16)(days % DAYS_IN_WEEK); -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** -** Name: NW_Time_Tm_New -** Description: Allocates a new NW_Time_Tm_t structure -** Parameters: None -** Return Value: pointer to the new NW_Time_tm_t or NULL -******************************************************************/ -NW_Time_Tm_t *NW_Time_Tm_New(void) -{ - NW_Time_Tm_t *time = NULL; - - time = (NW_Time_Tm_t*) NW_Mem_Malloc(sizeof(NW_Time_Tm_t)); - - return time; -} - -/***************************************************************** -** Name: NW_Time_Tm_Free -** Description: Deallocates a NW_Time_Tm_t structure -** Parameters: *time - pointer to the NW_Time_Tm_t struct to free -** Return Value: void -******************************************************************/ -void NW_Time_Tm_Delete(NW_Time_Tm_t *time) -{ - NW_Mem_Free(time); - time = NULL; - - return; -} - -/***************************************************************** -** Name: NW_Time_CvtToTimeTm -** Description: Convert time from NW_Timer_t to NW_Time_Tm_t format -** Parameters: time - time to convert -** Return Value: pointer to the new NW_Time_Tm_t or NULL -** Note: caller must call NW_Time_Tm_Free -******************************************************************/ -NW_Time_Tm_t *NW_Time_CvtToTimeTm(const NW_Time_t in_time) -{ - NW_Uint32 remainder; - NW_Uint16 leap_years, year, julday, month, day, hour, minute, second; - NW_Uint16 daysInMonth[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; - NW_Uint32 baseYear; - NW_Time_Tm_t *time_tm = NULL; - NW_Time_t time; - - time = in_time; - time_tm = NW_Time_Tm_New(); - if (time_tm == NULL) { - return NULL; - } - - /* Find the number of Years in the time */ - year = (NW_Uint16)(time / SECONDS_IN_YEAR); - if (year >= 2) - { - /* Past Jan 1, 1972 (which is the first leap year after 1970) */ - baseYear = 1972; - time -= 2 * SECONDS_IN_YEAR; - } - else - { - /* This is between Jan 1, 1970 and Jan 1, 1972 (no leaps years in this range) */ - baseYear = 1970; - } - - /* Found out how many leap years there have been in this time and subtract them out */ - if (baseYear == 1972) - { - remainder = time % SECONDS_IN_4YEARS; - leap_years = (NW_Uint16)(time / SECONDS_IN_4YEARS); - /* Compute the number of years since the last leap year */ - /* 4 Cases -------------------------*/ - /* Case 1: The year 2100 is not a leap year */ - if (leap_years >= 32) - { - /* Between 2100 and 2104 there is no leap year to consider */ - if (leap_years == 32) - { - year = (NW_Uint16)(remainder / SECONDS_IN_YEAR); - remainder %= SECONDS_IN_YEAR; - } - else - { - /* Add back in the leap day taken out by above calculations */ - remainder += SECONDS_IN_DAY; - if (remainder > (SECONDS_IN_YEAR + SECONDS_IN_DAY)) - { - /* Take out a day for the previous leap year */ - remainder -= SECONDS_IN_DAY; - year = (NW_Uint16)(remainder / SECONDS_IN_YEAR); - remainder %= SECONDS_IN_YEAR; - } - else - { - /* This is a leap year */ - daysInMonth[1] = 29; - year = 0; - } - } - } - /* Case 1: Dec 31st of a leap year */ - else if ((remainder > SECONDS_IN_YEAR) && (remainder < (SECONDS_IN_YEAR + SECONDS_IN_DAY))) - { - - year = 0; - daysInMonth[1] = 29; - } - /* Case 2: In non-leap year */ - else if (remainder > (SECONDS_IN_YEAR + SECONDS_IN_DAY)) - { - /* Take out a day for the previous leap year */ - remainder -= SECONDS_IN_DAY; - year = (NW_Uint16)(remainder / SECONDS_IN_YEAR); - remainder %= SECONDS_IN_YEAR; - } - /* Case 4: In leap year before Dec 31st */ - else - { - daysInMonth[1] = 29; - year = 0; - } - /* Compute the number of years since the base year */ - year = NW_UINT16_CAST(leap_years * 4 + year); - } - else - { - remainder = time % SECONDS_IN_YEAR; - } - - /* Compute the Julian Day of this time */ - julday = (NW_Uint16)(remainder / SECONDS_IN_DAY); - remainder %= SECONDS_IN_DAY; - - /* Compute the Month and day of this Julian Day (base zero) */ - month = 0; - day = julday; - while (day >= daysInMonth[month]) - { - day = NW_UINT16_CAST(day - daysInMonth[month]); - month++; - } - - /* Compute the hour, minute, second */ - hour = (NW_Uint16)(remainder / SECONDS_IN_HOUR); - remainder %= SECONDS_IN_HOUR; - minute = (NW_Uint16)(remainder / SECONDS_IN_MINUTE); - second = (NW_Uint16)(remainder % SECONDS_IN_MINUTE); - - /* Fill in the time structure */ - time_tm->Year = NW_UINT16_CAST(baseYear + year); - time_tm->Month = NW_UINT16_CAST(month + 1); - time_tm->Day = NW_UINT16_CAST(day + 1); - time_tm->DayOfWeek = NW_Time_DayOfWeek(in_time); - time_tm->Hour = hour; - time_tm->Minute = minute; - time_tm->Second = second; - time_tm->Milliseconds = 0; - - return time_tm; -} - - -/***************************************************************** -** Name: NW_Time_CvtFromTimeTm -** Description: Convert from a date time struct to an integer time -** -** Parameters: dateTime - a time structure -** Return Value: sytem time in seconds since Jan 1, 1970 -******************************************************************/ -NW_Time_t NW_Time_CvtFromTimeTm(const NW_Time_Tm_t *time_tm) -{ - NW_Uint16 daysInMonth[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; - NW_Time_t time = 0; - NW_Uint16 remainder; - NW_Uint16 julday, month, leap_years; - - if (time_tm->Year < 1970) - return 0; - - if (time_tm->Year >= 2104) - { - time += (1972 - 1970) * SECONDS_IN_YEAR; - leap_years = 2100 - 1972; - leap_years /= 4; - time += leap_years * SECONDS_IN_4YEARS; - time += (2104 - 2100) * SECONDS_IN_YEAR; - time += ((time_tm->Year - 2104) / 4) * SECONDS_IN_4YEARS; - remainder = NW_UINT16_CAST((time_tm->Year - 2104) % 4); - time += remainder * SECONDS_IN_YEAR; - /* If we are in a leap year */ - if (remainder == 0) - { - daysInMonth[1] = 29; - } - else - { - /* otherwise, add in seconds for the previous leap year */ - time += SECONDS_IN_DAY; - } - } - else if (time_tm->Year >= 2100) - { - time += (1972 - 1970) * SECONDS_IN_YEAR; - leap_years = 2100 - 1972; - leap_years /= 4; - time += leap_years * SECONDS_IN_4YEARS; - remainder = NW_UINT16_CAST((time_tm->Year - 2100) % 4); - time += remainder * SECONDS_IN_YEAR; - } - else if (time_tm->Year >= 1972) - { - time += (1972 - 1970) * SECONDS_IN_YEAR; - time += ((time_tm->Year - 1972) / 4) * SECONDS_IN_4YEARS; - remainder = NW_UINT16_CAST((time_tm->Year - 1972) % 4); - time += remainder * SECONDS_IN_YEAR; - /* If we are in a leap year */ - if (remainder == 0) - { - daysInMonth[1] = 29; - } - else - { - /* otherwise, add in seconds for the previous leap year */ - time += SECONDS_IN_DAY; - } - } - else - { - time += (time_tm->Year - 1970) * SECONDS_IN_YEAR; - } - - /* Compute the Julian day */ - julday = NW_UINT16_CAST(time_tm->Day - 1); - month = 0; - while (month < (time_tm->Month - 1)) - { - julday = NW_UINT16_CAST(julday + daysInMonth[month]); - month++; - } - - /* Add in the days in year */ - time += julday * SECONDS_IN_DAY; - - /* Add in the time */ - time += time_tm->Hour * SECONDS_IN_HOUR; - time += time_tm->Minute * SECONDS_IN_MINUTE; - time += time_tm->Second; - - return time; -} - -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_ui_callbacks_register.cpp --- a/webengine/wmlengine/src/utils/src/nwx_ui_callbacks_register.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2001 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/*! \file nwx_ui_callbacks_register.cpp -*/ - -/* - nwx_ui_callbacks_register.cpp - - Implements the callback functions for the UI. These call the corresponding - functions which have been registered by the user agent. - - Original Version: Peter B -*/ - -#include <e32def.h> -#include "nwx_defs.h" -#include "nwx_ui_callbacks_register.h" -#include "nwx_ctx.h" -#include "MVCShell.h" -#include "Epoc32DialogProvider.h" -#include "BrsrStatusCodes.h" -/************************************************************************ - Function: NW_UI_DialogPrompt - Purpose: Displays a generic prompt Passes on the request to the - UI callback which has been registered by the user agent. - - Paramters: data - Data to display in dialog - callbackCtx - Data to pass onto callback function - callback - Function to call on dialog completion - - Return Values: none -**************************************************************************/ -void NW_UI_DialogPrompt(NW_Dlg_Prompt_t* data, - void* callbackCtx, - NW_Dlg_PromptCB_t callback) -{ - LoaderServer_Ctx* context = (LoaderServer_Ctx*)NW_Ctx_Get(NW_CTX_URL_LOADER, 0); - if (context == NULL || context->UICallbacks == NULL) - { - NW_ASSERT(0); - return; - } - - (context->UICallbacks->DialogPrompt)(data, callbackCtx, callback); -} - -/************************************************************************ - Function: NW_UI_DialogInputPrompt - Purpose: Displays a generic input prompt. Passes on the request to the - UI callback which has been registered by the user agent. - - Paramters: data - Data to display in dialog - callbackCtx - Data to pass onto callback function - callback - Function to call on dialog completion - - Return Values: none -**************************************************************************/ -void NW_UI_DialogInputPrompt(NW_Dlg_InputPrompt_t* data, - void* callbackCtx, - NW_Dlg_InputPromptCB_t callback) -{ - LoaderServer_Ctx* context = (LoaderServer_Ctx*)NW_Ctx_Get(NW_CTX_URL_LOADER, 0); - if (context == NULL || context->UICallbacks == NULL) - { - NW_ASSERT(0); - return; - } - - context->UICallbacks->DialogInputPrompt(data, callbackCtx, callback); -} - -/************************************************************************ - Function: NW_UI_DialogListSelect - Purpose: Displays a generic list box for selection. Passes on the request to the - UI callback which has been registered by the user agent. - - Paramters: data - Data to display in dialog - callbackCtx - Data to pass onto callback function - callback - Function to call on dialog completion - - Return Values: none -**************************************************************************/ -void NW_UI_DialogListSelect(NW_Dlg_ListSelect_t* data, - void* callbackCtx, - NW_Dlg_ListSelectCB_t callback) -{ - LoaderServer_Ctx* context = (LoaderServer_Ctx*)NW_Ctx_Get(NW_CTX_URL_LOADER, 0); - if (context == NULL || context->UICallbacks == NULL) - { - NW_ASSERT(0); - return; - } - - context->UICallbacks->DialogListSelect(data, callbackCtx, callback); -} -/*! - \brief Registers UI callbacks. Ownership of callback structure remains <br> - with user agent (it's not freed here or on shutdown by the context). - \return The results are <br> - KBrsrSuccess - success <br> - KBrsrFailure - failed <br> -*/ -extern "C" TBrowserStatusCode NW_RegisterUICallbacks(const UI_Callback_t* callbacks) -{ - LoaderServer_Ctx* context = (LoaderServer_Ctx*)NW_Ctx_Get(NW_CTX_URL_LOADER, 0); - - if (context == NULL || callbacks == NULL) - { - NW_ASSERT(0); - return KBrsrFailure; - } - - context->UICallbacks = callbacks; - - return KBrsrSuccess; -} - - -extern "C" TBrowserStatusCode NW_GUI_DisplayError(NW_Msg_t* msg) -{ - NW_REQUIRED_PARAM(msg); - CShell* shellInstance = REINTERPRET_CAST(CShell*, (NW_Ctx_Get(NW_CTX_BROWSER_APP, 0))); - NW_ASSERT(shellInstance); - MEpoc32DialogProvider& dialogProvider = shellInstance->DialogApi(); - TRAPD(err, dialogProvider.NotifyErrorL(msg->status)); - NW_Msg_Delete(msg); - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/nwx_url_utils.c --- a/webengine/wmlengine/src/utils/src/nwx_url_utils.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3522 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -/***************************************************************** -** File name: nwx_url_utils.c -** Part of: Url Utils (NW) -** Description: This file implements parsing of the URL according -** to the standards defined in RFC 2396. -******************************************************************/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_url_utils.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nw_wae_reader.h" -#include "nwx_settings.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - -/*lint -save -e794, -e574 Conceivable use of null pointer, Signed-unsigned mix with relational*/ - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ -static const NW_Ucs2 HEXDIGITS[] = {'0', '1', '2', '3', - '4', '5', '6', '7', - '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static void escape_one_char(const NW_Ucs2 *src, NW_Ucs2 **destPtr, NW_Bool escapeReservedDelimiters); - -static NW_Bool escape_char( const NW_Ucs2 *src, NW_Ucs2 *dest, NW_Bool escapeReservedDelimiters); - -static NW_Bool unescape_char( const NW_Ucs2 *src, NW_Ucs2 *dest); - -static TBrowserStatusCode build_url( const NW_Ucs2 *scheme, const NW_Ucs2 *net_loc, - const NW_Ucs2 *path, const NW_Ucs2 *query, - const NW_Ucs2 *frag, NW_Ucs2 **ret_string); - -static NW_Url_Schema_t returnschema(const NW_Ucs2 *scheme); - -static NW_Bool is_legal_escaped_chars(const NW_Ucs2* s); - -static NW_Bool is_legal_escaped_string(const NW_Ucs2* s); - -static NW_Uint32 writeForeignCharBuff(const NW_Byte * c, NW_Byte *buff); - - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static NW_Bool NW_Url_IsSupportedEncoding(NW_Uint32 encoding) -{ - switch (encoding) - { - case HTTP_gb2312: - case HTTP_big5: - case HTTP_iso_8859_8: - case HTTP_iso_8859_6: - case HTTP_windows_1255: - case HTTP_windows_1256: - case HTTP_windows_1250: - case HTTP_windows_1251: - case HTTP_windows_1253: - case HTTP_windows_1254: - case HTTP_windows_1257: - case HTTP_iso_8859_1: - case HTTP_iso_8859_2: - case HTTP_iso_8859_3: - case HTTP_iso_8859_4: - case HTTP_iso_8859_5: - case HTTP_iso_8859_9: - case HTTP_iso_8859_7: - case HTTP_tis_620: // not flagged because we will not get here unless tis_620 is enabled - case HTTP_shift_JIS: - case HTTP_jis_x0201_1997: - case HTTP_jis_x0208_1997: - case HTTP_euc_jp: - case HTTP_iso_2022_jp: - case HTTP_windows_874: - case HTTP_Koi8_r: - case HTTP_Koi8_u: - return NW_TRUE; - default: - return NW_FALSE; - } -} - - -static NW_Bool is_legal_escaped_chars(const NW_Ucs2* s) -{ - NW_Bool isLegal = NW_FALSE; - - NW_ASSERT(s); - - if ( s[0] == WAE_URL_ESCAPE_CHAR ) - { - /* Found escape char. Check for 2 following hex digits. */ - if ( NW_Str_Isxdigit(s[1]) && NW_Str_Isxdigit(s[2]) ) - { - /* Legal escape char sequence. */ - isLegal = NW_TRUE; - } - } - - return isLegal; -} - -static NW_Bool is_legal_escaped_string(const NW_Ucs2* s) -{ - NW_Bool isLegal = NW_TRUE; - NW_Int32 i = 0; - - NW_ASSERT(s); - - while ( isLegal && ( s[i] != 0 ) ) - { - if ( s[i] == WAE_URL_ESCAPE_CHAR ) - { - /* Found escape char. Check for - 2 following hex digits. */ - if ( is_legal_escaped_chars( &s[i] ) ) - { - /* Legal escape char sequence. Increment - and continue checking. */ - i = i + 3; - } - else - { - /* Illegal escape sequence. Fail. */ - isLegal = NW_FALSE; - } - } - else - { - /* - if (s[i] > 127) { - isLegal = NW_FALSE; - } else - */ - i++; /* Not escape. Increment and continue checking. */ - } - } - return isLegal; -} -static NW_Bool is_uric_char(const NW_Ucs2 *pCh) -{ - if (NW_Str_Isalpha(*pCh) || - NW_Str_Isdigit(*pCh) || - is_legal_escaped_chars(pCh) || /* %xx */ - (*pCh == WAE_URL_PARAM_CHAR) || /* ; */ - (*pCh == WAE_URL_PATH_CHAR) || /* / */ - (*pCh == WAE_URL_QUERY_CHAR) || /* ? */ - (*pCh == WAE_URL_COLON_CHAR) || /* : */ - (*pCh == WAE_URL_AT_CHAR) || /* @ */ - (*pCh == WAE_URL_AMP_CHAR) || /* & */ - (*pCh == WAE_URL_EQUAL_CHAR) || /* = */ - (*pCh == WAE_URL_PLUS_CHAR) || /* + */ - (*pCh == WAE_URL_DOLLAR_CHAR) || /* $ */ - (*pCh == WAE_URL_COMMA_CHAR) || /* , */ - (*pCh == WAE_URL_LEFT_SQUARE_BRACKET_CHAR) || /* [ */ - (*pCh == WAE_URL_RIGHT_SQUARE_BRACKET_CHAR) || /* ] */ - (*pCh == WAE_URL_DASH_CHAR) || /* - */ - (*pCh == WAE_URL_UNDER_CHAR) || /* _ */ - (*pCh == WAE_URL_DOT_CHAR) || /* . */ - (*pCh == WAE_URL_BANG_CHAR) || /* ! */ - (*pCh == WAE_URL_TILDE_CHAR) || /* ~ */ - (*pCh == WAE_URL_STAR_CHAR) || /* * */ - (*pCh == WAE_URL_APOST_CHAR) || /* ' */ - (*pCh == WAE_URL_PAREN_CHAR) || /* ( */ - (*pCh == WAE_URL_THESIS_CHAR) ) /* ) */ - { - return NW_TRUE; - } else { - return NW_FALSE; - } -} -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -/* as per appendix A, rfc2396, URI-reference */ -NW_Bool NW_Url_GetRfc2396Parts( const NW_Ucs2 *pUri, NW_Rfc2396_Parts_t *parts ) - { - const NW_Ucs2 *pCh = pUri; - const NW_Ucs2 *pStart = pUri; - const NW_Ucs2 *pEnd = NULL; - const NW_Ucs2 *pAtChar = NULL; - NW_Bool isBrowserScheme; - NW_Bool isIPv6Address = NW_FALSE; - TBrowserStatusCode status; - NW_Url_Schema_t schema; - - if ((pUri == NULL) || (NW_Str_Strlen(pUri) == 0)) - { - return NW_FALSE; - } - - /* If and only if the schema is NOT WTAI, then do simple check to make sure - all chars are valid in the URI. WTAI does not use a valid URI since - foreign chars are not encoded but sent as UCS2. */ - status = NW_Url_GetSchemeNoValidation(pUri, &schema); - if ( (status != KBrsrOutOfMemory) && (schema != NW_SCHEMA_WTAI) ) - { - while (*pCh != 0) - { - /* stop checking for valid uric chars at fragment */ - if (*pCh == WAE_URL_FRAG_CHAR) - { - pCh++; - } - if (!is_uric_char(pCh) ) - { - return NW_FALSE; - } - /* stop checking the valid uric char for query string */ - if (*pCh == WAE_URL_QUERY_CHAR) - { - break; - } - pCh++; - } // end of while - } - - parts->schemeStart = NULL; - parts->opaqueStart = NULL; - parts->authorityStart = NULL; - parts->userInfoStart = NULL; - parts->hostStart = NULL; - parts->portStart = NULL; - parts->pathStart = NULL; - parts->queryStart = NULL; - parts->fragStart = NULL; - parts->isIPAddress = NW_FALSE; - - NW_Url_IsBrowserScheme(pUri, &isBrowserScheme); - - pCh = pStart; - parts->fragStart = NW_Str_Strchr(pCh, WAE_URL_FRAG_CHAR); - parts->queryStart = NW_Str_Strchr(pCh, WAE_URL_QUERY_CHAR); - - /* Browser schema can only have one frag, wtai can have multiple # chars */ - if (isBrowserScheme && (parts->fragStart != NULL) && - (NW_Str_Strchr(parts->fragStart+1, WAE_URL_FRAG_CHAR) != NULL)) - { - return NW_FALSE; - } - else - { - pEnd = pUri + NW_Str_Strlen(pUri); - if (parts->fragStart != NULL) - { - parts->fragEnd = pEnd; - pEnd = parts->fragStart++; - } - } - - /* fragment can contain query char, but not the other way 'round */ - if ((parts->queryStart != NULL) && (parts->fragStart != NULL) && - (parts->queryStart >= parts->fragStart)) - { - parts->queryStart = NULL; - } - else if (parts->queryStart != NULL) - { - parts->queryEnd = pEnd; - pEnd = parts->queryStart++; - } - - /* we've stripped off frag and query, so current pEnd will be end of */ - /* path if a path exists. */ - parts->pathEnd = pEnd; - - /* see if we have a scheme */ - parts->schemeStart = parts->schemeEnd = NW_Str_Strchr(pCh, WAE_URL_COLON_CHAR); - if (parts->schemeStart != NULL) - { - if (parts->schemeStart > pEnd) - { - /* here the first colon shows up in a query or frag so it doesn't */ - /* represent the end of a scheme string */ - parts->schemeStart = NULL; - } - else /* now check for valid scheme string */ - { - if (!NW_Str_Isalpha(*pCh)) - { - parts->schemeStart = NULL; - } - else - { - while (pCh < parts->schemeStart) - { - if (!NW_Str_Isalpha(*pCh) && !NW_Str_Isdigit(*pCh) && - (*pCh != WAE_URL_PLUS_CHAR) && - (*pCh != WAE_URL_DASH_CHAR) && - (*pCh != WAE_URL_DOT_CHAR)) - { - parts->schemeStart = NULL; - } - pCh++; - } - } - } - if (parts->schemeStart != NULL) - { - parts->schemeStart = pStart; - pCh++; /* go one past colon character */ - pStart = pCh; - } - else - { - pCh = pStart; - } - } - - /* if we've got a scheme, handle possible opaque_part first */ - if ((parts->schemeStart != NULL) && (*pCh != WAE_URL_PATH_CHAR)) - { - /* only restriction on opaque_part is >= 1 non-frag char, and doesn't */ - /* start with a slash */ - parts->queryStart = NULL; - if (*pCh != 0) - { - parts->opaqueStart = pCh; - parts->opaqueEnd = pEnd; - } - else - { - parts->opaqueStart = NULL; - } - - // We can handle valid schemes with no opaque_part. i.e. "sms:", etc... - return NW_TRUE; - } - else - { - /* we've got no scheme, or a scheme followed by net_path or abs_path. - net_path, abs_path or rel_path. net_path & abs_path start with '/' */ - parts->pathStart = NULL; - if (*pCh != WAE_URL_PATH_CHAR) - { - /* must have rel_path */ - NW_ASSERT(parts->schemeStart == NULL); - parts->pathStart = NW_Str_Strchr(pCh, WAE_URL_PATH_CHAR); - if ((parts->pathStart == NULL) || (parts->pathStart > pEnd)) - { - parts->pathStart = pEnd; - } - - while (pCh < parts->pathStart) - { - /* we know is_uric_char(*pCh) and it's not frag, query or path char */ - /* only other char not possible in rel_segment is colon */ - if (*pCh == WAE_URL_COLON_CHAR) - { - return NW_FALSE; - } - pCh++; - } // end of while - - /* rel_segment must have at least one char */ - if (pCh > pStart) - { - parts->pathStart = pStart; - parts->pathEnd = pEnd; - } - else - { - parts->pathStart = NULL; - /* we've got a relativeURI but no path, and we've already taken */ - /* care of any query and fragment, so just return */ - return NW_TRUE; - } - } - - /* will be (net_path | abs_path) [ ? query ] */ - if ((*pCh != 0) && (*(pCh+1) == WAE_URL_PATH_CHAR) && (parts->pathStart == NULL)) - { - /* handle net_path case */ - pCh += 2; /* point at next char after "//" */ - parts->authorityStart = pCh; - parts->pathStart = NW_Str_Strchr(pCh, WAE_URL_PATH_CHAR); - if ((parts->pathStart == NULL) || (parts->pathStart > pEnd)) - { - parts->pathStart = NULL; - parts->authorityEnd = pEnd; - } - else - { - parts->authorityEnd = parts->pathStart; - } - - /* check to see if this is an ipv6 address */ - if (*pCh == WAE_URL_LEFT_SQUARE_BRACKET_CHAR) - { - isIPv6Address = NW_TRUE; - } - - /* net_path = "//" authority [abs_path] so look for "//" authority */ - /* authority = server | reg_name. Server can be empty but reg_name */ - /* has at least one character, so we're really just looking to see */ - /* if this parses properly as [userinfo @] hostport */ - - /* if we have an @ char, see if we have userinfo @ hostport */ - /* if userinfo is valid pCh will point one past the @ character */ - /* otherwise will not change. userinfo can be null, or any valid */ - /* char other than / @ ? so we don't need to explicitly check -- */ - /* we've already found first occurrence of those 3 chars. */ - pAtChar = NW_Str_Strchr(pCh, WAE_URL_AT_CHAR); - - if ((pAtChar != NULL) && (pAtChar > parts->authorityEnd)) - { - pAtChar = parts->userInfoStart = NULL; - } - else if (pAtChar != NULL) - { - parts->userInfoStart = pCh; - parts->userInfoEnd = pAtChar; - pCh = pAtChar + 1; - } - else - { - parts->userInfoStart = NULL; - } - - /* now look for hostport -- if we have : check for valid port */ - if (isIPv6Address) - { - const NW_Ucs2 ipv6PortSepStr[] = {']', ':'}; - parts->portStart = NW_Str_Strstr(pCh, ipv6PortSepStr); - if (parts->portStart != NULL) - { - /* portStart should begin at the : not the ], so must point - to the character after the one returned by NW_Str_Strstr */ - parts->portStart += 1; - } - - } - else - { - parts->portStart = NW_Str_Strchr(pCh, WAE_URL_COLON_CHAR); - } - - /* port is *digit, which means it might be empty */ - if ((parts->portStart != NULL) && (parts->portStart < parts->authorityEnd)) - { - pStart = parts->portStart; - parts->portStart++; - parts->portEnd = parts->portStart; - while ( (parts->portEnd < parts->authorityEnd) && - NW_Str_Isdigit(*parts->portEnd) ) - { - parts->portEnd++; - } - /* now if we ate all the digits, and we're not at a path, */ - /* query, frag, or end of uri then we can't make a valid */ - /* uri interpreting the current substring as */ - /* : port [abs_path] [? query] [# fragment] so indicate error */ - /* NOTE: since we have scheme:// remainder MUST conform to valid */ - /* hostname:port otherwise we have invalid URL */ - if (parts->portEnd != parts->authorityEnd) - { - return NW_FALSE; - } - } - else - { - parts->portStart = parts->authorityEnd; - } - - /* portStart is overloaded -- NULL means we found ":" but not a valid */ - /* port #, portStart == authorityEnd means there is no ":" */ - if (parts->portStart != NULL) - { -#define SEGARRAY_SIZE 4 - const NW_Ucs2 *segArray[SEGARRAY_SIZE]; - NW_Int32 nDots = 0; - NW_Int32 nonDigits = 0; - - /* now look for hostname or IPv4address */ - parts->hostStart = pCh; - if (parts->portStart == parts->authorityEnd) - { - parts->hostEnd = parts->portStart; - } - else - { - parts->hostEnd = parts->portStart - 1; - NW_ASSERT(*parts->hostEnd == WAE_URL_COLON_CHAR); - } - pCh = parts->portStart - 1; - - while (pCh >= parts->hostStart) - { - if (*pCh == WAE_URL_DOT_CHAR) - { - if (nDots < SEGARRAY_SIZE) - { - segArray[nDots] = pCh; - } - nDots++; - } - else if (!NW_Str_Isdigit(*pCh)) - { - nonDigits++; - } - pCh--; - } // end of while - - /* since portStart was overloaded, set to NULL if no valid port */ - if (parts->portStart == parts->authorityEnd) - { - parts->portStart = NULL; - } - - /* this may be IPv4address -- so make sure at least one */ - /* digit between each pair of dots and a digit at the */ - /* beginning and end. */ - if ((nDots == 3) && (nonDigits == 0)) - { - /*lint --e{644} Variable may not have been initialized*/ - if (((segArray[1] + 1) != segArray[0]) && - ((segArray[2] + 1) != segArray[1]) && - NW_Str_Isdigit(*parts->hostStart) && - NW_Str_Isdigit(*(parts->hostEnd - 1))) - { - parts->isIPAddress = NW_TRUE; - return NW_TRUE; - } - } - else - { - /* better have *(domainlabel ".") toplabel ["."] */ - /* domain is less restrictive than top, so if we set domain */ - /* false we will also set top false, so to simplify test at */ - /* end, make sure all substrings in host are validDomain. */ - NW_Bool validDomain = NW_TRUE; - NW_Bool validTop = NW_FALSE; - - pCh = parts->hostStart; - while (pCh < parts->hostEnd) /* outer */ - { - if (NW_Str_Isdigit(*pCh)) - { - validDomain = NW_TRUE; - } - else if (NW_Str_Isalpha(*pCh)) - { - validTop = NW_TRUE; - } - - pCh++; - while ((pCh < parts->hostEnd) && (*pCh != WAE_URL_DOT_CHAR)) - { - if (!NW_Str_Isalpha(*pCh) && - !NW_Str_Isdigit(*pCh) ) - { - /* if we're at the end of the host, or if the next */ - /* char is a dot we need alphanum for valid label, but */ - /* if we're in the interior, we can also accept dash */ - if (((pCh == (parts->hostEnd - 1)) || - (*(pCh + 1) == WAE_URL_DOT_CHAR)) || - (*pCh != WAE_URL_DASH_CHAR)) - { - validTop = NW_FALSE; - validDomain = NW_FALSE; - } - } - pCh++; - } // end of inner while - - /* we're at dot or hostEnd, bump by one */ - pCh++; - } // end of outer while - - if (!validDomain || !validTop) - { - parts->hostStart = parts->userInfoStart = pAtChar = NULL; - } - } - } // end of if (parts->portStart != NULL) - } - else - { - /* we've got abs_path only, no auth */ - if (parts->pathStart == NULL) - { - parts->pathStart = pCh; - } - } // end of if-else ((*pCh != 0) && (*(pCh+1)... - } // end of if ((parts->schemeStart != NULL) &&... - - return NW_TRUE; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - string has NO fragment -* KBrsrOutOfMemory -* KBrsrMalformedUrl -*/ -TBrowserStatusCode NW_Url_GetFragId(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string, NW_Bool incFragChar) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.fragStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.fragStart; - - if (incFragChar == NW_TRUE) { - pStart--; - } - - pEnd = urlPieces.fragEnd; - - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - return KBrsrSuccess; -} - - -/* -* returns predefined scheme -* -* RETURN: KBrsrSuccess -* KBrsrFailure - bad url_buff -* - url_buff does not contain a scheme -* KBrsrOutOfMemory -* -* MODIFIED: ret_scheme -*/ -TBrowserStatusCode NW_Url_GetScheme(const NW_Ucs2 *url_buff, - NW_Url_Schema_t *ret_scheme) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - NW_Ucs2 *pBuff = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_scheme); - - *ret_scheme = NW_SCHEMA_INVALID; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.schemeStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.schemeStart; - pEnd = urlPieces.schemeEnd; - - /* extract the scheme string */ - NW_ASSERT(pEnd >= pStart); - pBuff = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (pBuff == NULL) - return KBrsrOutOfMemory; - - /* - ** RFC2396 sect 3.1 says "programs interpreting URI should treat upper - ** case letters as equivalient to lower case in scheme names" - */ - NW_Str_Strlwr(pBuff); - - *ret_scheme = returnschema(pBuff); - - NW_Str_Delete(pBuff); - return KBrsrSuccess; -} - - - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - string contains NO network location -* KBrsrOutOfMemory -* KBrsrMalformedUrl -*/ -TBrowserStatusCode NW_Url_GetNetwork(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.authorityStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.authorityStart; - pEnd = urlPieces.authorityEnd; - - if (pStart != NULL) { - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) { - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - string contains NO query -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetQuery(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.queryStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.queryStart; - pEnd = urlPieces.queryEnd; - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - - if (*ret_string == NULL) { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/***************************************************************** - Name: NW_Url_AddPostfields - Description: Adds postfileds string to a Url with out postfilds - Note: the input url must not have postfields - Parameters: url (may have a fragment) - postfields portion of a Url - pointer to full url pointer location - Algorithm: Alocates memory for fullUrl that includes postfilds. - Parses the input url for base and fragment. - builds fullUrl by concat base+query separator+fragment - Return Value: The returned fullUrl is not Null only in case - if KBrsrSuccess success is returned - Other return statuses: - KBrsrOutOfMemory, - KBrsrFailure -******************************************************************/ -TBrowserStatusCode NW_Url_AddPostfields(const NW_Ucs2 *url, const NW_Ucs2 *postfields, NW_Ucs2 **fullUrl) -{ - NW_Ucs2 *pBase = NULL; - NW_Ucs2 *pFragment = NULL; - TBrowserStatusCode status; - - *fullUrl = NW_Str_New(NW_Str_Strlen(url) + NW_Str_Strlen(postfields) + - NW_Asc_strlen(WAE_URL_QUERY_SEP)); - if (!fullUrl) { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - status = NW_Url_GetBase((const NW_Ucs2 *)url, &pBase); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - - status = NW_Url_GetFragId((const NW_Ucs2 *)url, &pFragment, NW_TRUE); - if (status != KBrsrSuccess && status != KBrsrFailure) { - NW_THROW_ERROR(); - } - - (void)NW_Str_Strcpy(*fullUrl, (const NW_Ucs2 *)pBase); - (void)NW_Str_StrcatConst(*fullUrl, WAE_URL_QUERY_SEP); - (void)NW_Str_Strcat(*fullUrl, (const NW_Ucs2 *)postfields); - if (pFragment) { - (void)NW_Str_Strcat(*fullUrl, (const NW_Ucs2 *)pFragment); - } - status = KBrsrSuccess; - -NW_CATCH_ERROR - if (status != KBrsrSuccess) { - NW_Str_Delete(*fullUrl); - *fullUrl = NULL; - } - NW_Str_Delete(pBase); - NW_Str_Delete(pFragment); - return status; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - url_buff has NO path -* KBrsrOutOfMemory -* KBrsrMalformedUrl -*/ -TBrowserStatusCode NW_Url_GetHost(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.hostStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.hostStart; - pEnd = urlPieces.hostEnd; - - if (pStart != NULL) - { - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - url_buff has NO path -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetPath(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.pathStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.pathStart; - pEnd = urlPieces.pathEnd; - - if (pStart != NULL) - { - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - url_buff has NO path -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetPathNoParam(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - NW_Ucs2 *pRet = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - if (urlPieces.pathStart == NULL) - { - return KBrsrFailure; - } - - pStart = urlPieces.pathStart; - pEnd = urlPieces.pathEnd; - - if (pStart != NULL) - { - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_New((NW_Uint32)(pEnd - pStart)); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - pRet = *ret_string; - while (pStart < pEnd) { - if (*pStart == WAE_URL_PARAM_CHAR) { - while ((*pStart != WAE_URL_PATH_CHAR) && (pStart < pEnd)) - { - pStart++; - } - } - if (pStart < pEnd) { - *pRet = *pStart; - pRet++; - pStart++; - } - } - *pRet = 0; - } - - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetSchemeStr( const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - pStart = urlPieces.schemeStart; - pEnd = urlPieces.schemeEnd; - if (pStart == NULL) - { - return KBrsrSuccess; - } - - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/* -* this function returns the base of a fully qualified URL (e.g. -* it rips off the card name). -* -* It assumes that the last portion of a URL is deck. -* -* RETURN: KBrsrSuccess -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetBase(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - /* fragStart points one past '#' if '#' exists */ - pEnd = urlPieces.fragStart; - - if (pEnd == NULL) - { - *ret_string = NW_Str_Newcpy(url_buff); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - return KBrsrSuccess; - } - else - { - pEnd--; - NW_ASSERT(*pEnd == WAE_URL_FRAG_CHAR); - } - - pStart = url_buff; - - NW_ASSERT(pEnd >= pStart); - - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - the string has NO port -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetPort(const NW_Ucs2 *url_buff, NW_Bool *is_valid, - NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pStart; - const NW_Ucs2 *pEnd; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(is_valid); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - *is_valid = NW_TRUE; - - pStart = urlPieces.portStart; - if (pStart != NULL) - { - pEnd = urlPieces.portEnd; - - /*malloc enough for the string and the null terminator.*/ - NW_ASSERT(pEnd >= pStart); - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - { - *is_valid = NW_FALSE; - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - string has NO parameters -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_GetParameters(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - const NW_Ucs2 *pCh = url_buff; - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pFirstParam = NULL; - - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(url_buff); - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) - { - return KBrsrMalformedUrl; - } - - pStart = urlPieces.pathStart; - if (pStart == NULL) - { - return KBrsrSuccess; - } - pCh = urlPieces.pathEnd - 1; - /* return all params from last segment in path */ - while ((pCh >= pStart) && (*pCh != WAE_URL_PATH_CHAR)) - { - if (*pCh == WAE_URL_PARAM_CHAR) - { - pFirstParam = pCh; - } - pCh--; - } - - if (pFirstParam != NULL) - { - pFirstParam++; - pCh = urlPieces.pathEnd; - - NW_ASSERT(pCh >= pFirstParam); - *ret_string = NW_Str_Substr(pFirstParam, 0, ((NW_Uint32)(pCh - pFirstParam))); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - } - return KBrsrSuccess; -} - -NW_Bool NW_Url_IsValid( const NW_Ucs2 *pUrl ) -{ - NW_Rfc2396_Parts_t urlPieces; - return NW_Url_GetRfc2396Parts(pUrl, &urlPieces); -} - -/***************************************************************** -** Name: NW_Url_GetResovledPath -** Description: Parses a given path and extracts from it the filename -** Parameters: *pBasePath - pointer to the base path -** **path - pointer to the path returned -** Return Value: KBrsrOutOfMemory if could not allocate memory -** KBrsrSuccess otherwise -** Note: pBasePath loooks like: /browser/welcome.wml -******************************************************************/ - -TBrowserStatusCode NW_Url_GetResolvedPath(const NW_Ucs2 *pBasePath, - const NW_Ucs2 *pRelPath, - NW_Ucs2 **path) -{ - NW_Bool shortened; - NW_Ucs2 *pStart = NULL; - NW_Ucs2 *pDest = NULL; - NW_Ucs2 *pSegment = NULL; - NW_Ucs2 *pBackslashLocationStr = NULL; - NW_Ucs2 *pTempBasePath = NULL; - NW_Uint32 length = 0; - const NW_Ucs2 escapedBackslashStr[] = {'%', '5', 'C'}; - const NW_Ucs2 slashStr[] = {'/'}; - - /* check to see if the base path has any escaped '\' characters ('%5C') - if any are found, replace with slash '/' character. This is required - for compatability with Internet Explorer */ - - if (pBasePath != NULL) - { - pTempBasePath = NW_Str_New(NW_Str_Strlen(pBasePath)); - - if (pTempBasePath == NULL) - { - return KBrsrOutOfMemory; - } - - pTempBasePath = NW_Str_Strcpy(pTempBasePath, pBasePath); - - pBackslashLocationStr = NW_Str_Strstr(pTempBasePath, escapedBackslashStr); - while(pBackslashLocationStr) - { - NW_Ucs2 *pTempStr; - NW_Ucs2 *pTempStrStart; - NW_Ucs2 *pTempStrEnd; - NW_Uint32 basePathLength = NW_Str_Strlen(pTempBasePath); - NW_Uint32 backslashLocation = pBackslashLocationStr - pTempBasePath; - - pTempStr = NW_Str_New(basePathLength); - if(pTempStr == NULL) - { - NW_Str_Delete(pTempBasePath); - return KBrsrOutOfMemory; - } - - pTempStrStart = NW_Str_Substr(pTempBasePath, 0, backslashLocation); - if(pTempStrStart == NULL) - { - NW_Str_Delete(pTempBasePath); - NW_Str_Delete(pTempStr); - return KBrsrOutOfMemory; - } - - pTempStrEnd = NW_Str_Substr(pTempBasePath, backslashLocation + 3, basePathLength - backslashLocation - 3); - if(pTempStrEnd == NULL) - { - NW_Str_Delete(pTempBasePath); - NW_Str_Delete(pTempStr); - NW_Str_Delete(pTempStrStart); - return KBrsrOutOfMemory; - } - - NW_Str_Strcat(pTempStr, pTempStrStart); - NW_Str_Strcat(pTempStr, slashStr); - NW_Str_Strcat(pTempStr, pTempStrEnd); - - pTempBasePath = NW_Str_Strcpy(pTempBasePath, pTempStr); - - NW_Str_Delete(pTempStrEnd); - NW_Str_Delete(pTempStrStart); - NW_Str_Delete(pTempStr); - - pBackslashLocationStr = NW_Str_Strstr(pTempBasePath, escapedBackslashStr); - } - - } - - /* return NULL if error or not found */ - if (pBasePath != NULL) { - length += NW_Str_Strlen(pTempBasePath); - } - if (pRelPath != NULL) { - length += NW_Str_Strlen(pRelPath); - } - - /* allocate max mem we'll ever need */ - *path = NW_Str_New(length + NW_Asc_strlen(WAE_URL_PATH_SEP)); - if (*path == NULL) { - NW_Str_Delete(pTempBasePath); - return KBrsrOutOfMemory; - } - - /*set start of basepath*/ - pStart = *path; - *pStart = 0; - if (pBasePath != NULL) { - NW_Str_Strcpy(pStart, pTempBasePath); - } - - /* RFC2396 section 5 step 6 */ - - /* - ** "a) All but the last segment of the base URI's path component is copied - ** to the buffer. In other words, any characters after the last - ** (right-most) slash charactger, if any, are excluded." __NOTA BENE__ if - ** the base path is empty we add a single / per the WML Script Standard - ** Library Spec and proposed changes to RFC2396. - */ - pDest = NW_Str_Strrchr(pStart, WAE_URL_PATH_CHAR); - if (pDest != NULL && *pDest == WAE_URL_PATH_CHAR) - { - *(pDest + 1) = 0; - } - else if (pRelPath != NULL) /* slash doesn't exist, and we've got a rel path */ - { - NW_Str_StrcpyConst(pStart, WAE_URL_PATH_SEP); - } - - if (pRelPath != NULL) { - /* b) the reference's path component is appended to the buffer */ - (void)NW_Str_Strcat(pStart, pRelPath); - } - - /* deal with http://www.sees.com, <img src="../img/some.gif"> - pStart = /../img/some.gif; want to resolve it to be /img/some.gif - */ - pDest = pStart; - pDest = NW_Str_Strchr(pDest, WAE_URL_DOT_CHAR); - if ( pDest != NULL && - pDest - 1 == pStart && - *(pDest - 1) == WAE_URL_PATH_CHAR && - *(pDest + 1) == WAE_URL_DOT_CHAR && - *(pDest + 2) == WAE_URL_PATH_CHAR ) - { - /* Move pDest + 2 to pStart. Do not use NW_Asc_strcpy because - the source and destination overlap. Instead, use NW_Mem_memmove. - */ - NW_Mem_memmove(pStart, pDest + 2, ((NW_Str_Strlen(pDest + 2)) + 1) * sizeof(NW_Ucs2)); - } - - /* - ** c) All occurrences of "./", where "." is a complete path segment, are - ** removed from the buffer string. - ** d) If the buffer string ends with "." as a complete path segment, that - ** "." is removed. - */ - shortened = NW_TRUE; - pDest = pStart; - while (shortened) - { - shortened = NW_FALSE; - pDest = NW_Str_Strchr(pDest, WAE_URL_DOT_CHAR); - if (pDest != NULL) - { - shortened = NW_TRUE; - if (pDest == pStart || *(pDest - 1) == WAE_URL_PATH_CHAR) - { - /* got to end of string, so don't look for single dot again */ - if (*(pDest + 1) == 0) - { - *pDest = 0; - shortened = NW_FALSE; - } - else if (*(pDest + 1) == WAE_URL_PATH_CHAR) - { - NW_Str_Strcpy(pDest, pDest + 2); - } - } - pDest++; - } - } - - /* - ** e) all occurrences of "<segment>/../", where <segment> is a complete - ** path segment not equal to "..", are removed from the buffer string. - ** Removal of these path segments is performed iteratively, removing - ** the leftmost matching pattern on each iteration, until no matching - ** pattern remains. - ** f) If the buffer string ends with "<segment>/..", where <segment> is a - ** complete path segment not equal to "..", that "<segment>/.." is removed. - ** g) If the resulting buffer string still begins with one or more complete - ** path segments of "..", then the reference is considered to be in error. - ** Implementations may handle this error by reaining these components in - ** the resolved path (i.e., treating them as part of the final URI), by - ** removing them from the resolved parth (i.e., discarding relative levels - ** above the root), or by avoiding traversal of the reference. - */ - shortened = NW_TRUE; - pDest = pStart; - while (shortened) - { - shortened = NW_FALSE; - pDest = NW_Str_Strchr(pDest, WAE_URL_DOT_CHAR); - if (pDest != NULL) - { - shortened = NW_TRUE; - if ( (pDest == pStart || *(pDest - 1) == WAE_URL_PATH_CHAR) && - *(pDest + 1) == WAE_URL_DOT_CHAR ) - { - if ( (pDest == pStart || (pDest - 1) == pStart) && - (*(pDest + 2) == 0 || *(pDest + 2) == WAE_URL_PATH_CHAR) ) - { - // there's extra ../ in the relative, we should remove them - // case1: base url is /format/video/index.asp, relative url is ../../../formats/video/benefits.asp - // case2: base url is /, relative url is ../formats/index.asp - if ( *(pDest + 2) == WAE_URL_PATH_CHAR ) - { - // Move pDest + 2 to pSegment or pStart. Do not use NW_Asc_strcpy because - // the source and destination overlap. Instead, use NW_Mem_memmove. - if (pSegment == pStart) - { - NW_Mem_memmove(pSegment, pDest + 2, ((NW_Str_Strlen(pDest + 2)) + 1) * sizeof(NW_Ucs2)); - pDest = pSegment; - continue; - } - else if (*pBasePath == WAE_URL_PATH_CHAR) - { - NW_Mem_memmove(pStart, pDest + 2, ((NW_Str_Strlen(pDest + 2)) + 1) * sizeof(NW_Ucs2)); - pDest = pStart; - continue; - } - } - - NW_Str_Delete(pStart); - *path = NULL; - NW_Str_Delete(pTempBasePath); - return KBrsrFailure; - } - - /* see if we're at end of string */ - if (*(pDest + 2) == 0) - { - pSegment = pDest - 2; - while (pSegment >= pStart && *pSegment != WAE_URL_PATH_CHAR) - { - pSegment--; - } - if (*pSegment == WAE_URL_PATH_CHAR) - { - *(pSegment + 1) = 0; - } - else - { - *pSegment = 0; - } - shortened = NW_FALSE; - } - else if (*(pDest + 2) == WAE_URL_PATH_CHAR) - { - pSegment = pDest - 2; - while (pSegment >= pStart && *pSegment != WAE_URL_PATH_CHAR) - { - pSegment--; - } - /* - * Move pDest + 2 to pSegment. Do not use NW_Asc_strcpy because - * the source and destination overlap. Instead, use NW_Mem_memmove. - */ - NW_Mem_memmove(pSegment, pDest + 2, ((NW_Str_Strlen(pDest + 2)) + 1) * sizeof(NW_Ucs2)); - pDest = pSegment; - } - else { - pDest++; - } - } else { - pDest++; - } - } - } - - NW_Str_Delete(pTempBasePath); - return KBrsrSuccess; -} - -/* - * RETURN KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - * KBrsrMalformedUrl - */ -TBrowserStatusCode NW_Url_RelToAbs( const NW_Ucs2 *base, const NW_Ucs2 *relative, - NW_Ucs2 **ret_string) -{ - - /* - * Step1 -- Parse URL into its components - */ - typedef struct - { - NW_Ucs2 *schemeStr; - NW_Ucs2 *netLoc; - NW_Ucs2 *port; - NW_Ucs2 *path; - NW_Ucs2 *query; - NW_Ucs2 *fragId; - //_Bool portValid; - } parts_t; - - TBrowserStatusCode status = KBrsrSuccess; - NW_Ucs2 *resolvedPath = NULL; - - NW_Rfc2396_Parts_t baseUrlPieces; - NW_Rfc2396_Parts_t relUrlPieces; - - parts_t bp = {NULL, NULL, NULL, NULL, NULL, NULL}; - parts_t rp = {NULL, NULL, NULL, NULL, NULL, NULL}; - - NW_ASSERT(base); - NW_ASSERT(ret_string); - *ret_string = NULL; - - - if (!base || !NW_Url_GetRfc2396Parts(base, &baseUrlPieces)) - return KBrsrMalformedUrl; - - if (!relative || !NW_Url_GetRfc2396Parts(relative, &relUrlPieces)) - status = KBrsrMalformedUrl; - - /* get all the the url base parts */ - if (NW_Url_GetSchemeStr(base, &(bp.schemeStr)) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetNetwork(base, &bp.netLoc) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetPath(base, &bp.path) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetQuery(base, &bp.query) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetFragId(base, &bp.fragId, NW_FALSE) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - /*get all url the parts from the relative*/ - if (NW_Url_GetSchemeStr(relative, &rp.schemeStr) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetNetwork(relative, &rp.netLoc) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetPath(relative, &rp.path) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetQuery(relative, &rp.query) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - if (NW_Url_GetFragId(relative, &rp.fragId, NW_FALSE) == KBrsrOutOfMemory) { - status = KBrsrOutOfMemory; NW_THROW_ERROR(); - } - - /* - * Step 2 - */ - - /* If the path component is empty and the scheme, authority, and query components are - * undefined, then it is a reference to the current document and we are done. - * - * Otherwise, the reference URI's query and fragment components are defined as found - * (or not found) within the URI reference and not inherited from the base URI. - */ - - if ( (rp.schemeStr == NULL) && (rp.netLoc == NULL) && (rp.path == NULL) && - (rp.query == NULL)) - { - if (rp.fragId == NULL) { - status = build_url(bp.schemeStr, bp.netLoc, bp.path, bp.query, bp.fragId, ret_string); - } else { - /* - ** example in rfc2396 appendix c.1 shows fragment only in rel part - ** handled differently from any other relative uri - the last segment - ** in the base is NOT stripped, and any existing fragment is simply - ** replaced by the new fragment - */ - status = build_url(bp.schemeStr, bp.netLoc, bp.path, bp.query, rp.fragId, ret_string); - } - NW_THROW_ERROR(); - } - - /*Step 3*/ - - /* If the scheme component is defined, indicating that the reference starts with - * a scheme name, then the reference is interpreted as an absolute URI - * and we are done. - * - * Otherwise, the reference URI's scheme is inherited from the base URI's scheme - * component. - */ - - if (rp.schemeStr != NULL) { - *ret_string = NW_Str_Newcpy(relative); - if (*ret_string == NULL) { - status = KBrsrOutOfMemory; - } - NW_THROW_ERROR(); - } - - /*Step 4*/ - - /* If the authority component is defined, then the reference is a network-path - * - * Otherwise, the reference URI's authority is inherited from the base URI's - * authority component, which will also be undefined if the URI scheme does not - * use an authority component. - * Note: referee is a network path - */ - if (rp.netLoc != NULL) { - status = build_url(bp.schemeStr, rp.netLoc, rp.path, rp.query, rp.fragId, ret_string); - NW_THROW_ERROR(); - } - - /*Step5*/ - /* If the path component begins with a slash character, then the reference is an absolute - * path - * Note: the reference is an absolute path - */ - - if ((rp.path != NULL) && (rp.path[0] == WAE_URL_PATH_CHAR)) { - status = build_url(bp.schemeStr, bp.netLoc, rp.path, rp.query, rp.fragId, ret_string); - NW_THROW_ERROR(); - } - - /* - * Otherwise resolving a relative path reference - */ - status = NW_Url_GetResolvedPath(bp.path, rp.path, &resolvedPath); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - - status = build_url(bp.schemeStr, bp.netLoc, resolvedPath, rp.query, rp.fragId, ret_string); - -NW_CATCH_ERROR - NW_Str_Delete(bp.schemeStr); - NW_Str_Delete(bp.netLoc); - NW_Str_Delete(bp.port); - NW_Str_Delete(bp.path); - NW_Str_Delete(bp.query); - NW_Str_Delete(bp.fragId); - - NW_Str_Delete(rp.schemeStr); - NW_Str_Delete(rp.netLoc); - NW_Str_Delete(rp.port); - NW_Str_Delete(rp.path); - NW_Str_Delete(rp.query); - NW_Str_Delete(rp.fragId); - - NW_Str_Delete (resolvedPath); - return status; - -} - -//??? RFD: Is this correct, regarding must be UTF8? -// Determines whether or not a UCS2 char needs to be escaped for encoding -// within a URL. -// -// RFC2396, "Uniform Resource Identifiers (URI): Generic Syntax", specifies -// the US-ASCII chars (0x00 - 0x7F) that can occur within a URI, specifies -// reserved chars, delimiters and how to escape-encode US-ASCII chars that -// are not allowed. It does not, however, specify how to handle NON US-ASCII -// chars (> 0x7F). For that, W3C provides guidance and sample code but, as -// of this writing, no formal specification. See the following: -// "http://www.w3.org/International/O-URL-code.html" -// -// An excerpt from that W3C site: -// "For worldwide interoperability, URIs have to be encoded uniformly. To map -// the wide range of characters used worldwide into the 60 or so allowed -// characters in a URI, a two-step process is used: -// o. Convert the character string into a sequence of bytes using the -// UTF-8 encoding. -// o. Convert each byte that is not an ASCII letter or digit to %HH, where -// HH is the hexadecimal value of the byte. -// The site also provides example code and other links. -// -// Because there isn't a definitive spec on how to handle chars > 0x7F, only -// the suggested W3C guidelines, there are different implementations out on -// the street that are incompatible. We cannot be all things to all people. -// There will be sites that cannot be supported without breaking some other -// site. Much care must be used when modifying URL encoding. -// -// STREET-SUPPORT: In real-world situations, it appears that more often than -// not, UTF-8 encoding is not used. Instead, chars >0x7F are escape-encoded -// directly without first using UTF-8. But it is highly probably that there are -// web severs that will not work this way and expect UTF-8. -// -// One heuristic mentioned on some web-sites is that if the original page -// specified a character set, then it is ok/recommended to use that and not -// convert to UTF-8. This means that the browser charset handling has to -// differentiate between when the charset is explicitely specified and when a -// default charset is used. -//??? RFD: This is not the case at the moment. -// -//??? RFD: For 2-byte chars, use little-endian or big-endian? There's no ambiguity if first converted to UTF-8 but there is when escape-encoding 2-byte chars. -// -// Notes: -// - UTF8 is defined in RFC2279, "UTF-8, a transformation format of ISO 10646". -// - RFC2396 has been updated by RFC2732, "Format for Literal IPv6 Addresses in -// URL's". -// -// @param ch UCS2 char being checked. -// @param escapeReservedDelimiters Flag indicating whether or not reserved -// and delimiter chars need to be escaped. -// @return NW_TRUE if char needs to be escaped; otherwise, NW_FALSE. -static NW_Bool shouldEscape( NW_Ucs2 ch, NW_Bool escapeReservedDelimiters ) -{ - if ( ch > 0xFF ) // Hack: these chars are handled by NW_Url_ConvertUnicode... - { - return NW_FALSE; - } - - if ( ch >= 0x80 ) - { -//??? RFD: When this was changed to TRUE, chars >7f and <ff were encoded and my bug seemed to be fixed. - return NW_FALSE; - } - - if ( (ch <= 0x1F) || (ch == 0x20) || (ch == 0x7F) ) - { - return NW_TRUE; // US-ASCII control chars or space char - } - - if ( escapeReservedDelimiters ) - { - if ( (ch == ';') || - (ch == '/') || - (ch == '?') || - (ch == ':') || - (ch == '@') || - (ch == '&') || - (ch == '=') || - (ch == '+') || - (ch == '$') || - (ch == ',') || - // The following two chars are defined as "unwise" in RFC2396 but - // were re-defined as delimiters for IPv6 in RFC2732. - (ch == '[') || - (ch == ']') ) - { - return NW_TRUE; // RFC2396 reserved chars - } - - if ( (ch == '<') || - (ch == '>') || - (ch == '#') || - (ch == '%') || - (ch == '"') ) - { - return NW_TRUE; // RFC2396 delimiter chars - } - } - - if ( (ch == '{') || - (ch == '}') || - (ch == '|') || - (ch == '\\') || - (ch == '^') || - (ch == '`') ) - { - return NW_TRUE; // RFC2396 "unwise" chars - } - - return NW_FALSE; -} - -//??? RFD: This will only produce the correct results if the string has already been converted to UTF8. -NW_Uint32 NW_Url_EscapeStringLen( const NW_Ucs2 *src ) -{ - NW_Uint32 len = 0, - pos = 0, - numToEsc = 0; - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - for( pos = 0; pos < len; pos++ ) - { - if( shouldEscape( src[pos], NW_TRUE) ) - { - numToEsc++; - } - } - - return (2 * numToEsc) + len; -} - -/* Gets the byte-length needed to convert the UCS2 string to a URL encoded - string. Only chars > 0x7F are URL encoded. If the original-encoding is - supported, then each char encoded is encoded using 3 2-byte chars for a - total of 6 bytes; otherwse, UTF8 encoding is used and then escaped, which - for each char being encoded requires either 6 or 9 bytes, depending on the range: - - range 0x0080 <= char <= 0x07FF: 2 3-byte chars for total of 6 bytes - - range 0x0800 <= char <= 0xFFFF: 3 3 byte chars for total of 9 bytes */ -static NW_Uint32 NW_Url_ConvertUnicodeLen(const NW_Ucs2 *str, NW_Uint32 encoding) -{ - NW_Uint32 len = 0; -//??? RFD: Why are we doing this with supported encoding? W3C guidelines say to use UTF8, then escape it. - NW_Bool supportedEncoding = NW_Url_IsSupportedEncoding( encoding ); - - while ( *str != 0 ) - { - if ( *str <= 0x07f && *str != 0x20 ) // if char < 0x7f and not spc (space) char - no encode, otherwise check if to be 3-byte encoded - { - len += 1; // no escaping - } - else if ( supportedEncoding || (*str <= 0x07ff) ) - { - len += 6; - } - else - { - len += 9; - } - str++; - } - return len; -} - -// Determines whether or not URL needs to be encoded for specified schema. -static NW_Bool isUrlEncodedForSchema( NW_Url_Schema_t schema ) - { - NW_Bool ret = NW_FALSE; - switch (schema) - { - case NW_SCHEMA_WTAI: - case NW_SCHEMA_UNKNOWN: - ret = NW_FALSE; - break; - - case NW_SCHEMA_HTTPS: - case NW_SCHEMA_FTP: - case NW_SCHEMA_GOPHER: - case NW_SCHEMA_MAILTO: - case NW_SCHEMA_NEWS: - case NW_SCHEMA_NNTP: - case NW_SCHEMA_TELNET: - case NW_SCHEMA_WAIS: - case NW_SCHEMA_FILE: - case NW_SCHEMA_HTTP: - case NW_SCHEMA_PROSPERO: - case NW_SCHEMA_TEL: - default: - ret = NW_TRUE; - } - return ret; - } - -// Converts an entire byte sequence to %HH format, storing the result as an NW_Ucs2* -// This is needed by charsets such as ShiftJis, which is multibyte and may have -// ascii values as one of the bytes. -TBrowserStatusCode NW_Url_HHEscape( const char* aSource, NW_Ucs2** aDest ) -{ - NW_Uint32 escapedLen = 3 * NW_Asc_strlen(aSource); - const char* currentByte = NULL; - NW_Ucs2* dest = NULL; - - - NW_ASSERT( aDest != NULL ); - NW_ASSERT( aSource != NULL); - - dest = NW_Str_New(escapedLen); - *aDest = dest; - if (dest == NULL) - { - return KBrsrOutOfMemory; - } - - for (currentByte = aSource; - *currentByte != NULL; - currentByte++) - { - *dest = WAE_URL_ESCAPE_CHAR; - dest++; - *dest = HEXDIGITS[(*currentByte >> 4) & 15]; - dest++; - *dest = HEXDIGITS[*currentByte & 15]; - dest++; - } - *dest = 0; - return KBrsrSuccess; -} - -//??? RFD: It is wrong to do chars <= 7F separately, especially because -// foreign charset encoding does not guarantee that encoded chars are > 0x7F; -// therefore, trying to URL encode after convertUnicode will cause double convertion. - -/************************************************************************ - - Function: NW_Url_ConvertUnicode - - Description: Given a UCS-2 string in source, - produces a string in which characters > 0x7F (8 and 16-bits) - have been UTF-8 encoded (if not using foreign charset encoding) - and url-escaped. - This routine does not affect characters <= 0x7F in source. - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - -**************************************************************************/ -//??? RFD: What is the output of this method? Is it UCS2? Can't be UCS2! -// Or is it a byte stream or is it a byte stream that has every byte occupy two-bytes? -TBrowserStatusCode NW_Url_ConvertUnicode( const NW_Ucs2* source, NW_Ucs2** dest) -{ - const NW_Ucs2* ucs2Ptr = source; - const NW_Byte* bytePtr = (NW_Byte *)source; - NW_Byte tmp[3]; - NW_Int32 cnt; - NW_Ucs2* convertedPtr; - NW_Int32 i; - NW_Int32 convertedLen; - NW_Ucs2 charToEncode; - NW_Bool isUrlEncoded; - NW_Uint32 encoding; - NW_Url_Schema_t schema; - TBrowserStatusCode status; - - NW_ASSERT( dest != NULL ); - *dest = NULL; - - if ( source == NULL) - return KBrsrSuccess; - -//??? RFD: Should determine here: -// 1. what encoding to use -// 2. whether or not to UTF-8 encode -// 3. whether or not to escape-encode -// 4. determine endianess if encoding is 2-bytes and not being UTF-8 encoded -// (The endianness is important for 2-byte chars whether or not they are -// escape-encoded.) -// And then pass this information to all the relevant sub-methods rather than -// all the special-case crap that is dispersed down through the layers here. -// It may make sense to even make these decisions at a higher level and pass -// that information into this method, if it gets called at all. -// -// The items mentioned differ based on the schema. For WTAI, for example, -// the encoding must be UCS2 regardless of what the original encoding was, it -// must not be UTF-8 encoded, it must not be escape-encoded, and it must be -// in little-endian. -// -// For HTTP, it is much more complex. See header comments added to shouldEscape. -// - -//??? RFD: We don't seem to be converting to the original encoding when we are not using UTF-8. -// And we are not using UTF-8 most of the time now. This is wrong. If we are not using UTF-8 -// then chars have to be transcoded into the original encoding. The original encoding shouls -// only be used if it was explicitely specified, not if some assumed default was chosen. - -//TODO: Should have a getSchemaEncoding method. Some schemas use original -// encoding and others (internal, such as WTAI) use UCS2. - encoding = NW_Settings_GetOriginalEncoding(); - - convertedLen = 2 * ( NW_Url_ConvertUnicodeLen( source, encoding ) + 1 ); - *dest = (NW_Ucs2*) NW_Mem_Malloc( convertedLen ); - if (*dest == NULL) { - return KBrsrOutOfMemory; - } - NW_Mem_memset(*dest, 0, convertedLen); - - convertedPtr = *dest; -//??? RFD: Checking SupportedEncoding is not quite the correct way to determine whether to UTF-8 encode. - if (NW_Url_IsSupportedEncoding(encoding)) - { - // Check to see whether or not the URL needs to use encoding. Some schemas - // need URL encoding and some must not have it. WTAI, for example, must not - // use encoding; chars are sent as straight UCS2. - status = NW_Url_GetSchemeNoValidation(source, &schema); - isUrlEncoded = (NW_Bool)(( status == KBrsrSuccess ) - ? isUrlEncodedForSchema(schema) : NW_TRUE); - - while ( *bytePtr != 0 || *(bytePtr +1)!=0) - { - NW_Mem_memset(tmp, 0, sizeof(tmp)); - cnt = writeForeignCharBuff(bytePtr, &tmp[0]); - NW_ASSERT(cnt <= sizeof(tmp)); - if (tmp[0] >= 0x80 || cnt > 1) { - for ( i = 0; i < cnt; i++ ) - { - if (isUrlEncoded) - { - /* temporary variable needed because passing ((NW_Ucs2*) &tmp[i]) to - escape_one_char() causes a word-boundary error when i is odd. */ - charToEncode = tmp[i]; - escape_one_char((const NW_Ucs2*) &charToEncode, &convertedPtr, NW_TRUE); - } - else - { - *convertedPtr++ = *((NW_Ucs2*) tmp); - break; - } - } - } - else { - //use "+" replace the space in the post string -//??? RFD: space chars are suppose to be escaped and why doesn't this apply below, the case where not supported encoding - if (tmp[0] == 0x20) - { - *convertedPtr++ = '%'; *convertedPtr++='2'; *convertedPtr++='0'; - } - else - { - *convertedPtr++ = (NW_Ucs2) tmp[0]; - } - } -//??? RFD: Get rid of this bytePtr and use a UCS2 ptr. - bytePtr += 2; - } - } - else - { -//??? RFD: Combine this with the above loop. - while ( *ucs2Ptr != 0 ) - { - NW_Mem_memset(tmp, 0, sizeof(tmp)); - cnt = NW_Reader_WriteUtf8CharBuff( *ucs2Ptr, &tmp[0]); - NW_ASSERT(cnt <= sizeof(tmp)); - for ( i = 0; i < cnt; i++ ) - { - if (tmp[i] >= 0x80 || cnt > 1) { - /* temporary storage needed because passing ((NW_Ucs2*) &tmp[i]) to - escape_one_char() causes a word-boundary error when i is odd.*/ - charToEncode = tmp[i]; - escape_one_char((const NW_Ucs2*) &charToEncode, &convertedPtr, NW_TRUE); - } - else { - *convertedPtr = (NW_Ucs2) tmp[i]; - convertedPtr++; - } - } - ucs2Ptr++; - } - } - NW_ASSERT(convertedPtr - *dest <= convertedLen); - - return KBrsrSuccess; -} - -//??? RFD: What the hell is "x-www-form-urlencoded format"? -/* This function will encode a string into x-www-form-urlencoded format.*/ - -//??? RFD: it is backwards to have ConvertUnicode called after the string is escaped. The sequence -// should be 1. determine charset to use, 2. determine whether or not to UTF-8 encode, determine -// endianess if not using UTF-8, 3. UTF-8 encoded if using UTF-8, otherwise, convert to charset, -// 4. swap bytes if 2-byte charset and endianess is different from internal storage (little endian), -// 5. escape-encode if escape-encoding (WTAI schema doesn't escape-encode) -// -//??? RFD: the comment below on 0xFF doesn't match what is done in the code, which uses 0x7F. Which is it suppose to be? -/* 09-09-02 CEI: Modifed to ignore characters > 0xFF, which get handled by - NW_Url_ConvertUnicode() just before the URL is sent. This split is caused - by issues involving WML variable resolution, which gives WML content - developers control over URL escaping. -*/ -//??? RFD: May need to cleanup all methods that call this. -NW_Bool NW_Url_EscapeString( const NW_Ucs2 *src, NW_Ucs2 *dest ) -{ - NW_Int32 len = 0, - posInSrc = 0, - posInDest = 0; - NW_Bool allASCII=NW_TRUE; - - NW_ASSERT(dest); - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - /* Walk through the source and escape any characters into destination. */ - posInDest = 0; - for( posInSrc = 0; posInSrc < len; posInSrc++ ) - { - if (src[posInSrc] > 127) { - allASCII = NW_FALSE; - } - - if (escape_char( &src[posInSrc], &dest[posInDest], NW_TRUE ) && (dest[posInDest] != 0x2B) ) { - posInDest += 3; - } else { - posInDest++; - } - } - dest[posInDest] = 0; - return allASCII; -} - -//??? RFD: This will only produce the correct results if the string has already been converted to UTF8. -static NW_Bool escape_char( const NW_Ucs2 *src, NW_Ucs2 *dest, NW_Bool escapeReservedDelimiters ) -{ - - NW_ASSERT(src); - NW_ASSERT(dest); - - if( shouldEscape( *src, escapeReservedDelimiters ) ) - { - escape_one_char(src, &dest, escapeReservedDelimiters); - - return NW_TRUE; - } - else - { - *dest = *src; - - return NW_FALSE; - } -} - -static void escape_one_char(const NW_Ucs2 *src, NW_Ucs2 **dest, NW_Bool escapeReservedDelimiters) -{ - NW_ASSERT(dest != NULL); - NW_ASSERT(*dest != NULL); - if (*src == 0x20 && escapeReservedDelimiters) { - **dest = 0x2B; // change space to plus - (*dest)++; - return; - } - **dest = WAE_URL_ESCAPE_CHAR; - (*dest)++; - **dest = HEXDIGITS[(*src >> 4) & 15]; - (*dest)++; - **dest = HEXDIGITS[*src & 15]; - (*dest)++; -} - - -NW_Uint32 NW_Url_UnEscapeStringLen( const NW_Ucs2 *src ) -{ - NW_Uint32 len = 0, - numToUnesc = 0, - pos = 0; - - if( src ) { - len = NW_Str_Strlen(src); - /* - ** better make sure the val we return here is a big enough buffer to - ** hold result of NW_Url_UnEscapeString() - */ - if ( !is_legal_escaped_string( src ) ) { - return len; - } - } - else - len = 0; - - for( pos = 0; pos < len; pos++ ) - { - if ( is_legal_escaped_chars( &src[pos] ) ) - { - /* Only subtract from length if legal. */ - numToUnesc++; - } - } - - return len - (2 * numToUnesc); -} - - -/* This function will un-encode a string from x-www-form-urlencoded format.*/ -NW_Bool NW_Url_UnEscapeString( const NW_Ucs2 *src, NW_Ucs2 *dest ) -{ - NW_Int32 len = 0, - posInSrc = 0, - posInDest = 0; - NW_Bool retval = NW_TRUE; - /*NW_Ucs2 *pDest = NULL;*/ - - NW_ASSERT(src); - NW_ASSERT(dest); - - if ( !is_legal_escaped_string( src ) ) - { - /* String contains an illegal escape sequence. - Put unchanged result in dest and return NW_FALSE. */ - NW_Str_Strcpy( dest, src ); - return NW_FALSE; - } - - len = NW_Str_Strlen(src); - - /* Walk through the source and un-escape any characters into destination. */ - posInDest = 0; - for( posInSrc = 0; posInSrc < len; posInSrc++ ) - { - if( unescape_char( &src[posInSrc], &dest[posInDest]) ) - { - posInSrc += 2; - } - - if (dest[posInDest] > 0x7F) - retval = NW_FALSE; - posInDest++; - } - - dest[posInDest] = 0; - - return retval; -} - -static NW_Bool unescape_char( const NW_Ucs2 *src, NW_Ucs2 *dest ) -{ - NW_Ucs2 buff[3]; - NW_Ucs2 *end; - - NW_ASSERT(src); - NW_ASSERT(dest); - - if( *src == WAE_URL_ESCAPE_CHAR ) - { - /*This may be a valid escape sequence.*/ - if( NW_Str_Isxdigit( *(src + 1) ) && NW_Str_Isxdigit( *(src + 2) ) ) - { - /* Ok it is a valid escape sequence, convert it into a char.*/ - buff[0] = *(src + 1); - buff[1] = *(src + 2); - buff[2] = 0; - *dest = (NW_Ucs2) NW_Str_Strtoul(buff, &end, 16); - return NW_TRUE; - } - else - { - *dest = *src; - return NW_FALSE; - } - } - else - { - *dest = *src; - return NW_FALSE; - } - -} - -/***************************************************************** -** Name: StripPortNum -** Description: Finds a valid port reference at the end of a string -** and writes zero over its first character ':'. -** Note: A valid port reference is always at the end -** of a domain name. It consists of ':' and one or -** more decimal digits. E.g. "foo.com:80" -** -** Params: Null-terminated domain potion of Url. -** -** Return Value: <none> -******************************************************************/ -static void StripPortNum(const NW_Ucs2 *domain) -{ - NW_Ucs2 *ptr; - NW_Ucs2 *save_ptr; - NW_Int32 i; /* To count digits in the port number */ - - ptr = - save_ptr = NW_Str_Strrchr(domain, WAE_URL_COLON_CHAR); - - if (ptr) - { - for (i = 0, ++ptr; NW_Str_Isdigit(*ptr); ptr++) - ++i; - - /* A valid port found when there is at least one digit after ':' and - all remaining string characters (if any) are digits as well */ - if (i > 0 && *ptr == 0) - *save_ptr = 0; - } - return; -} - - -/* - -From 30-APR-98 WML Spec. - -If a deck has a DOMAIN and/or PATH attribute, the referring deck's -URL must match the values of the attributes. Matching is done as -follows: the access domain is suffix-matched against the domain name -portion of the referring URL and the access path is prefix matched -against the path portion of the referring URL. - -DOMAIN suffix matching is done using the entire element of each -sub-domain and must match each element exactly (eg, www.wapforum.org -shall match wapforum.org, but shall not match forum.org). PATH prefix -matching is done using entire path elements and must match each -element exactly (eg, /X/Y matches /X, but does not match /XZ). -The DOMAIN attribute defaults to the current deck’s domain. The PATH -attribute defaults to the value "/". - -On 4-AUG-2000 the following was added: -A port number can be specified in the referring deck URL -and/or in the DOMAIN attribute value. (e.g. www.wapforum.org:80) -The WAP does not comment on such cases in respect to acces control. -The logic in the function below would strip the port number (if any) -before validating access rules. - -Note. Some gateways may add the default port number (e.g. ":80") to -the URL saved in the HTTP request header. When the requested page is a -*.asp file with -<head> <access domain="<%=request. ServerVariables("HTTP_HOST")%>" .. -</head> -the domain attribute gets the port number if it was recorded in -the HTTP header. - -07-DEC-2000 -The pNumLabelDiff parameter added - pointer to the domain label difference -count. The count is 0 if there is an exact match of all complete domain -labels. If a referencing Url has more complete domain labels than the access -domain then the count is for those extra labels -If the input value for "pNumLabelDiff" is NULL then the function does -not perform the label difference calculation. -* -* -* -* RETURN: KBrsrSuccess - access is OK -* KBrsrFailure - if domain is null or access is denied -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_AccessOK(const NW_Ucs2 *domain, const NW_Ucs2 *path, - const NW_Ucs2 *url, NW_Int32 *pNumLabelDiff) -{ - NW_Ucs2* pRefDomain = NULL; - NW_Ucs2* pRefPath = NULL; - NW_Ucs2* fullPath = NULL; - NW_Ucs2* tmpDomain = NULL; - - NW_Int32 accLen = 0; - NW_Int32 refLen = 0; - NW_Int32 deltaLen; - NW_Int32 i; - TBrowserStatusCode status; - - /* Find the host / path separation. */ - - /* We require a domain name. */ - if ( !domain || !url ) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - status = NW_Url_GetNetwork(url, &pRefDomain); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - if ( !pRefDomain ) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - /* Create a copy of the domain string as - we are going to modify it */ - tmpDomain = NW_Str_Newcpy(domain); - if (tmpDomain == NULL) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - /* We don't need a path; since the default is the root path as long as the - domain name matches we are OK. */ - - /* Now we have 2 domains that should be suffix matched and 2 paths - that should be prefix matched. */ - - /* Strip ":<port number>" (if any) by replacing ':' with 0 */ - StripPortNum(pRefDomain); - StripPortNum(tmpDomain); - - /*Suffix match the domain names.*/ - refLen = NW_Str_Strlen( pRefDomain ); - accLen = NW_Str_Strlen( tmpDomain ); - - if ( accLen > refLen ) - { - /* Access domain name is longer. Will never suffix match. */ - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - for( i = 1; i <= accLen; i++) - { - /* Loop over last character to first (0). */ - if ( NW_Str_ToLower(tmpDomain[accLen - i]) != - NW_Str_ToLower(pRefDomain[refLen - i]) ) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - - deltaLen = refLen - accLen; - - /* Check for this case: - www.wapforum.org shall match wapforum.org, but shall not match forum.org - */ - /* if pRefDomain is longer than domain, verify first or previous pRefDomain - character is the path separator */ - if ( deltaLen > 0 ) - { - if ( (pRefDomain[deltaLen] != WAE_URL_DOT_CHAR) && - (pRefDomain[deltaLen - 1] != WAE_URL_DOT_CHAR) ) - { - /* first or previous char are not separtor. Does not match. */ - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - - /* Check for domain labels to support n.10.6 E2ESEC */ - if (pNumLabelDiff != NULL) - { - *pNumLabelDiff = 0; - if (deltaLen > 0) - { - for (i = deltaLen; i >= 0; i--) - { - if (pRefDomain[i] == WAE_URL_DOT_CHAR) { - (*pNumLabelDiff)++; - } - } - } - } - - if ( path ) - { - status = NW_Url_GetPath(url, &pRefPath); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - } - - if( pRefPath != NULL ) - { - NW_Ucs2 *tmp = NULL; - - if (path == NULL) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - /* WMLScript 1.1 Section 6.7.2 and WML 1.1 Section 11.3.1 - says relative paths are converted to absolute. */ - status = NW_Url_RelToAbs(url, path, &tmp); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - status = NW_Url_GetPath(tmp, &fullPath); - NW_Str_Delete(tmp); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - /* Prefix match the paths. */ - accLen = NW_Str_Strlen(fullPath); - refLen = NW_Str_Strlen(pRefPath); - - if ( accLen > refLen ) - { - /* Access path name is longer. Will never prefix match. */ - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - for( i = 0; i < accLen; i++) - { - if( NW_Str_ToLower(fullPath[i]) != - NW_Str_ToLower(pRefPath[i]) ) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - - /* if pRefPath is longer than path, verify last or next pRefPath - character is the path separator */ - if ( accLen < refLen ) - { - if ( ((accLen >= 1) && (pRefPath[accLen-1] != WAE_URL_PATH_CHAR)) && - (pRefPath[accLen] != WAE_URL_PATH_CHAR) ) - { - /* last or next char are not separtor. Does not match. */ - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - } /*--end for "pRefPath != NULL" */ - - status = KBrsrSuccess; - -NW_CATCH_ERROR - - NW_Str_Delete( fullPath ); - NW_Str_Delete( pRefPath ); - NW_Str_Delete( tmpDomain ); - NW_Str_Delete( pRefDomain ); - return status; -} - -/** - ** check for whether the url pass is relative URL or absolute URL - ** if it's not a valid URL, then return NW_STAT_FALLURE - ** if it's a valid relative url, return KBrsrSuccess with *isRelative set to TRUE - ** if it's a valid absolute url, return KBrsrSuccess with *isRelative set to FALSE - **/ -TBrowserStatusCode NW_Url_IsRelative(const NW_Ucs2 *url, NW_Bool *isRelative) -{ - NW_Rfc2396_Parts_t urlPieces; - - NW_ASSERT(isRelative); - - *isRelative = NW_TRUE; - - if (!NW_Url_GetRfc2396Parts(url, &urlPieces)) - { - return KBrsrFailure; - } - - if (urlPieces.schemeStart != NULL) { - *isRelative = NW_FALSE; - } - /* else isRelative is true */ - - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrOutOfMemory -*/ -TBrowserStatusCode build_url( const NW_Ucs2 *scheme, const NW_Ucs2 *net_loc, - const NW_Ucs2 *path, const NW_Ucs2 *query, - const NW_Ucs2 *frag, NW_Ucs2 **ret_string) -{ - NW_Uint32 len = 0; - - if (scheme) { - len += (NW_Str_Strlen(scheme) + 1); - } - if (net_loc) { - len += (NW_Str_Strlen(net_loc) + 2); - } - if (path) { - len += (NW_Str_Strlen(path)); - } - if (query) { - len += (NW_Str_Strlen(query) + 1); - } - if (frag) { - len += (NW_Str_Strlen(frag) + 1); - } - - *ret_string = NW_Str_New(len); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - (*ret_string)[0] = 0; - - if (scheme) - { - (void)NW_Str_Strcat(*ret_string, scheme); - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_COLON_SEP); - } - - if (net_loc) - { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_NETLOC_SEP); - (void)NW_Str_Strcat(*ret_string, net_loc); - } - - if (path) - { - (void)NW_Str_Strcat(*ret_string, path); - } - - if (query) - { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_QUERY_SEP); - (void)NW_Str_Strcat(*ret_string, query); - } - - if (frag) - { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_FRAG_SEP); - (void)NW_Str_Strcat(*ret_string, frag); - } - - return KBrsrSuccess; -} - - -static NW_Int32 num_of_segs(const NW_Ucs2 *path) -{ - NW_Int32 res = 0; - - while(*path) - { - if (*path++ == WAE_URL_PATH_CHAR) res++; - } - return res; -} - -/* -* from a/b/c and a/d/f create ../f -* -* RETURN: KBrsrSuccess -* KBrsrFailure - bad input -* KBrsrOutOfMemory -*/ -TBrowserStatusCode diff_paths(const NW_Ucs2 *base_path, const NW_Ucs2 *url_path, - NW_Ucs2 **ret_string) -{ - NW_Ucs2 *base_start = 0, *url_start = 0; - NW_Ucs2 *base_dir = 0, *url_dir = 0, *url_file = 0, *base_file = 0; - NW_Uint32 len; - - NW_ASSERT(url_path != NULL); - NW_ASSERT(base_path != NULL); - NW_ASSERT(ret_string != NULL); - *ret_string = NULL; - - base_file = NW_Str_Strrchr(base_path, WAE_URL_PATH_CHAR); - - if (base_file) - { - NW_ASSERT(base_file - base_path + 1 >= 0); - len = (NW_Uint32)(base_file - base_path + 1); /* include the / in the end */ - - base_dir = NW_Str_Substr(base_path, 0, len); - if (base_dir == NULL) { - return KBrsrOutOfMemory; - } - } - - url_file = NW_Str_Strrchr(url_path, WAE_URL_PATH_CHAR); - - if (url_file) - { - len = url_file - url_path + 1; /* include the / in the end */ - url_dir = NW_Str_Substr(url_path, 0, len); - if (url_dir == NULL) { - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_dir); - return KBrsrOutOfMemory; - } - } - - base_start = base_dir; - url_start = url_dir; - - /* find common prefix */ - for(; *base_start; base_start++, url_start++) - { - if (*base_start != *url_start) break; - } - /* remove the leading '/' */ - url_file++; - - if (! *base_start && (*url_start == WAE_URL_PATH_CHAR)) - { - /* same directory */ - *ret_string = NW_Str_Newcpy(url_file); - if (*ret_string == NULL) - { - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_dir); - NW_Str_Delete(url_dir); - return KBrsrOutOfMemory; - } - if (NW_Str_Strlen(*ret_string) == 0) { - NW_Str_Delete(*ret_string); - *ret_string = NW_Str_NewcpyConst(WAE_URL_CURRENT_DIR); - if (*ret_string == NULL) { - NW_Str_Delete(base_dir); - NW_Str_Delete(url_dir); - return KBrsrOutOfMemory; - } - } - } - else - { - NW_Int32 segs; - - /* find where the last common path segment ends */ - for(;;) - { - if ((base_start > base_dir) == NW_FALSE) /* the first char is / */ - { - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_dir); - NW_Str_Delete(url_dir); - return KBrsrFailure; - } - - if (*(base_start - 1) == WAE_URL_PATH_CHAR) break; - else base_start--; - } - - /* calculate how many "../" are needed before adding the url_path */ - segs = (base_start? num_of_segs(base_start) : 0); - - /* make sure there's room for "./" if segs == 0 */ - len = segs * NW_Asc_strlen(WAE_URL_PARENT_DIR) - + NW_Asc_strlen(WAE_URL_CURRENT_DIR) - + NW_Str_Strlen(url_start) - + NW_Str_Strlen(url_file); - *ret_string = NW_Str_New(len); - if (*ret_string == NULL) - { - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_dir); - NW_Str_Delete(url_dir); - return KBrsrOutOfMemory; - } - - for (;segs > 0; segs--) { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_PARENT_DIR); - } - - (void)NW_Str_Strcat(*ret_string, url_start); - (void)NW_Str_Strcat(*ret_string, url_file); - - if (NW_Str_Strlen(*ret_string) == 0) { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_CURRENT_DIR); - } - } - - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(base_dir); - NW_Str_Delete(url_dir); - - return KBrsrSuccess; -} - -/* -* RETURN: KBrsrSuccess -* KBrsrFailure - any failure -* - base or url are null -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Url_AbsToRel(const NW_Ucs2 *base, const NW_Ucs2 *url, - NW_Ucs2 **ret_string) -{ - NW_Ucs2 *base_scheme = 0; - NW_Ucs2 *url_scheme = 0; - - NW_Ucs2 *base_net_loc = 0; - NW_Ucs2 *url_net_loc = 0; - - NW_Ucs2 *base_path = 0; - NW_Ucs2 *url_path = 0; - NW_Ucs2 *res_path = 0; - - NW_Ucs2 *url_query = 0; - NW_Ucs2 *url_frag = 0; - - NW_Uint32 len; - - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(ret_string); - *ret_string = NULL; - - if (!base || !url) return KBrsrFailure; - - if ((status = NW_Url_GetSchemeStr(base, &base_scheme)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetSchemeStr(url, &url_scheme)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetNetwork(base, &base_net_loc)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetNetwork(url, &url_net_loc)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetQuery(url, &url_query)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetFragId(url, &url_frag, NW_TRUE)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* assume both urls are absolute */ - - if (!base_scheme || !url_scheme || !base_net_loc || !url_net_loc) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - if (NW_Str_Strcmp(base_scheme, url_scheme) || - NW_Str_Strcmp(base_net_loc, url_net_loc)) - { - *ret_string = NW_Str_Newcpy(url); - if (*ret_string == NULL) { - status = KBrsrOutOfMemory; - } - NW_THROW_ERROR(); - } - else - { - status = NW_Url_GetPath(base, &base_path); - if (status != KBrsrSuccess) - NW_THROW_ERROR(); - - status = NW_Url_GetPath(url, &url_path); - if (status != KBrsrSuccess) - NW_THROW_ERROR(); - - /* all WAP urls have path */ - if (!base_path || !url_path) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - status = diff_paths(base_path, url_path, &res_path); - if (status != KBrsrSuccess) - NW_THROW_ERROR(); - } - - len = 0; - if (res_path) { - len += NW_Str_Strlen(res_path); - } - if (url_query) { - len += (NW_Str_Strlen(url_query) + NW_Asc_strlen(WAE_URL_QUERY_SEP)); - } - if (url_frag) { - len += NW_Str_Strlen(url_frag); - } - - *ret_string = NW_Str_New(len); - if (*ret_string == NULL) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - if (res_path) { - (void)NW_Str_Strcat(*ret_string, res_path); - } - if (url_query) { - (void)NW_Str_StrcatConst(*ret_string, WAE_URL_QUERY_SEP); - (void)NW_Str_Strcat(*ret_string, url_query); - } - if (url_frag) { - (void)NW_Str_Strcat(*ret_string, url_frag); - } - -NW_CATCH_ERROR - NW_Str_Delete(base_scheme); - NW_Str_Delete(url_scheme); - NW_Str_Delete(base_net_loc); - NW_Str_Delete(url_net_loc); - NW_Str_Delete(base_path); - NW_Str_Delete(url_path); - NW_Str_Delete(res_path); - NW_Str_Delete(url_query); - NW_Str_Delete(url_frag); - - return status; -} - -TBrowserStatusCode NW_Url_BuildUrl(const NW_Ucs2 *src, - const NW_Url_Schema_t scheme, - NW_Ucs2 **url) -{ - - TBrowserStatusCode status = KBrsrMalformedUrl; - const char *schemeConst; - NW_Ucs2 *scheme_str = NULL; - NW_Ucs2 *network_loc = NULL; - NW_Ucs2 *path = NULL; - NW_Ucs2 *query = NULL; - NW_Ucs2 *frag = NULL; - - if(NW_Url_IsValid(src)) - { - /* get the schemata strings */ - switch (scheme) - { - case NW_SCHEMA_HTTPS: - schemeConst = WAE_URL_HTTPS_SCHEME; - break; - case NW_SCHEMA_FTP: - schemeConst = WAE_URL_FTP_SCHEME; - break; - case NW_SCHEMA_GOPHER: - schemeConst = WAE_URL_GOPHER_SCHEME; - break; - case NW_SCHEMA_MAILTO: - schemeConst = WAE_URL_MAILTO_SCHEME; - break; - case NW_SCHEMA_NEWS: - schemeConst = WAE_URL_NEWS_SCHEME; - break; - case NW_SCHEMA_NNTP: - schemeConst = WAE_URL_NNTP_SCHEME; - break; - case NW_SCHEMA_TELNET: - schemeConst = WAE_URL_TELNET_SCHEME; - break; - case NW_SCHEMA_WAIS: - schemeConst = WAE_URL_WAIS_SCHEME; - break; - case NW_SCHEMA_FILE: - schemeConst = WAE_URL_FILE_SCHEME; - break; - case NW_SCHEMA_HTTP: - schemeConst = WAE_URL_HTTP_SCHEME; - break; - case NW_SCHEMA_PROSPERO: - schemeConst = WAE_URL_PROSPERO_SCHEME; - break; - case NW_SCHEMA_TEL: - schemeConst = WAE_URL_TEL_SCHEME; - break; - case NW_SCHEMA_UNKNOWN: /* fall through */ - default: - return KBrsrBadInputParam; - } - - scheme_str = NW_Str_NewcpyConst(schemeConst); - if (scheme_str == NULL) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetNetwork(src, &network_loc)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (network_loc == NULL) { - /* to add network seperator later */ - network_loc = NW_Str_NewcpyConst(""); - } - - if ((status = NW_Url_GetPath(src, &path)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetQuery(src, &query)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_Url_GetFragId(src, &frag, NW_FALSE)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - - status = build_url(scheme_str, network_loc, path, - query, frag, url); - NW_THROW_ERROR(); - - } - -NW_CATCH_ERROR - NW_Str_Delete(scheme_str); - NW_Str_Delete(network_loc); - NW_Str_Delete(path); - NW_Str_Delete(query); - NW_Str_Delete(frag); - return status; -} - - - -/*------------------------------------------------------------ - * NW_Url_Fragment - * - * return pointer to start of card name in url (the part - * right after the '#' character), or NULL if no '#' - * exists. The card name may be the empty - * string if no characters follow the '#' sign. - * - * NOTE: This assumes that you, the caller, have verified - * the validity of the url (you can do this easily by - * calling NW_Url_GetRfc2395Parts). - * - * NOTE: This does not allocate memory -- it only returns a - * pointer to the fragment - *----------------------------------------------------------*/ - -NW_Ucs2 *NW_Url_Fragment(NW_Ucs2 *url) -{ - NW_Bool result; - NW_Rfc2396_Parts_t parts = {0}; - - NW_ASSERT(url != NULL); - result = NW_Url_GetRfc2396Parts(url, &parts); - NW_ASSERT(result); - /* To fix TI compiler warning */ - (void) result; - - return (NW_Ucs2*)(parts.fragStart); -} - -/* - * NW_Url_BuildAbsUrl -- construct a new URL. The resultant URL consists of - * the base of the 'url' parameter, plus the 'card_name', if any. - * The resultant url is placed in the ret_string. It is the caller's - * responsibility to delete the resulting string. - * - * The 'card_name' parameter may be NULL, in which case the return value - * will be the base portion of the 'url' parameter. - * - * RETURNS - * KBrsrSuccess - * KBrsrMalformedUrl - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Url_BuildAbsUrl(const NW_Ucs2 *url, - const NW_Ucs2 *card_name, - NW_Ucs2 **ret_string) -{ - NW_Ucs2 *base = NULL; - TBrowserStatusCode status; - - NW_ASSERT(url != NULL); - NW_ASSERT(ret_string != NULL); - - *ret_string = NULL; - - if ((status = NW_Url_GetBase(url, &base)) == KBrsrSuccess) - { - NW_ASSERT(base != NULL); - if (card_name != NULL) - { - NW_Ucs2 *fragId = NW_Str_New(NW_Str_Strlen(card_name) + 1 + 1); - if (fragId == NULL) { - NW_Str_Delete(base); - return KBrsrOutOfMemory; - } - *fragId = WAE_URL_FRAG_CHAR; - NW_Str_Strcpy(fragId+1,card_name); - status = NW_Url_RelToAbs(base,fragId,ret_string); - NW_Str_Delete(fragId); - NW_Str_Delete(base); - } - else - *ret_string = base; - } - return status; -} -/* -**------------------------------------------------------------------------- -** This function will return the scheme specific string in the URL. ie. -** scheme-specific-part. The caller has to free the ret_string. -** Absolute URI syntax as per the RFC 2396: <scheme>:<scheme-specific-part> -** RETURNS: KBrsrMalformedUrl -** KBrsrOutOfMemory -** KBrsrSuccess -**------------------------------------------------------------------------- -*/ -TBrowserStatusCode NW_Url_GetSchemeSpecificPart(const NW_Ucs2 *url_buff, NW_Ucs2 **ret_string) -{ - NW_Rfc2396_Parts_t urlPieces; - const NW_Ucs2 *pStart, *pEnd; - - NW_ASSERT(url_buff != NULL); - - /* Get the structure of URL-reference - RFC2396 */ - if (!NW_Url_GetRfc2396Parts(url_buff, &urlPieces)) { - return KBrsrMalformedUrl; - } - - pStart = urlPieces.schemeEnd; - NW_ASSERT(pStart != NULL); - pStart++; /* scheme seperator */ - NW_ASSERT(pStart != NULL); - - pEnd = urlPieces.schemeStart + NW_Str_Strlen(url_buff); - NW_ASSERT(pEnd != NULL); - - /* malloc enough for the string and the null terminator. */ - *ret_string = NW_Str_Substr(pStart, 0, ((NW_Uint32)(pEnd - pStart))); - if (*ret_string == NULL) - { - return KBrsrOutOfMemory; - } - return KBrsrSuccess; -} - -/******************************************************************* - Name: NW_Url_EscapeUnwiseLen - - Description: Gives the length of string for escaping illegal chars - - Parameters: src -- pointer to the string containing url - - Returns: length of string -********************************************************************/ -//??? RFD: This will only produce the correct results if the string has already been converted to UTF8. -NW_Uint32 NW_Url_EscapeUnwiseLen( const NW_Ucs2 *src ) -{ - NW_Uint32 len = 0, - pos = 0, - numToEsc = 0; - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - for( pos = 0; pos < len; pos++ ) - { - if( shouldEscape( src[pos], NW_FALSE) ) - { - numToEsc++; - } - } - - return (2 * numToEsc) + len; -} - -/******************************************************************* - Name: NW_Url_EscapeUnwise - - Description: Escapes all the characters except legal chars - - Parameters: src -- pointer to the string containing url - dest - pointer to the string where escaped - Url is to be stored - - Returns: NW_Bool - true if successful - false if unsuccessful -********************************************************************/ -//??? RFD: May need to cleanup all methods that call this. -NW_Bool NW_Url_EscapeUnwise( const NW_Ucs2 *src, NW_Ucs2 *dest) -{ - NW_Int32 len = 0, - posInSrc = 0, - posInDest = 0; - NW_Bool allASCII=NW_TRUE; - - NW_ASSERT(dest); - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - /* Walk through the source and escape any characters into destination. */ - posInDest = 0; - for( posInSrc = 0; posInSrc < len; posInSrc++ ) - { -//??? RFD: Why is this check made? Chars between 0x80 && 0xFF can and are escaped. - if (src[posInSrc] > 127) { - allASCII = NW_FALSE; - } - - if (escape_char( &src[posInSrc], &dest[posInDest], NW_FALSE)) { - posInDest += 3; - } else { - posInDest++; - } - } - dest[posInDest] = 0; -//??? RFD: Description of return value above states TRUE if successful; else FALSE. Doesn't say anything about all ASCII. - return allASCII; - -} - -/******************************************************************* - Name: NW_Url_ConvertFileToEscapeURL - - Description: Converts an file URL to escaped Url - Escapes all the charactes in Url except legal url - characters - - Parameters: src -- pointer to the string containing url - - Returns: new string which contains URL in escaped form. - Returns NULL if allocation fails. -********************************************************************/ - -NW_Ucs2* NW_Url_ConvertFileToEscapeURL(const NW_Ucs2 *src) -{ - NW_Ucs2 *escapedUrl = NULL; - NW_Uint32 len = 0; - - len = NW_Url_EscapeUnwiseLen(src); - escapedUrl = NW_Str_New(len); - if (escapedUrl == NULL) { - return NULL; - } - - NW_Url_EscapeUnwise(src, escapedUrl); - - return escapedUrl; - -} - -/******************************************************************* - Name: NW_Url_ConvertFileFromEscapeURL - - Description: Converts an Escaped URL to file Url - - Parameters: src -- pointer to the string containing url - - Algorithm : Unescapes all the escapes sequence - - Returns: new string which contains URL in unescaped form. -********************************************************************/ - -NW_Ucs2* NW_Url_ConvertFileFromEscapeURL(const NW_Ucs2 *src) -{ - NW_Ucs2 *unescapedUrl = NULL; - NW_Int32 len = 0; - - len = NW_Url_UnEscapeStringLen(src); - - NW_ASSERT(len >= 0); - unescapedUrl = NW_Str_New((NW_Uint32)len); - if (unescapedUrl == NULL) { - return NULL; - } - - NW_Url_UnEscapeString(src, unescapedUrl); - - return unescapedUrl; - -} - -/******************************************************************* - Name: NW_Url_GetSchemeNoValidation - - Description: Get the URL Schema without checking the validity - of the URL. - eg. if url is "file://c:\hello dir\aa.wmlc" it does not - check if url contans illegal chars or not. - - Parameters: url -- pointer to string containg url - ret_scheme - scheme returned - - Algorithm : Checks for first occurance of ":" in the string - Compares the characters before ":" to valid url - schemas and return the schema - - Returns: TBrowserStatusCode - status - KBrsrSuccess : if scheme found or unknown scheme - KBrsrFailure : if no scheme (no ":" char in url) - KBrsrOutOfMemory : if out of memory -********************************************************************/ -TBrowserStatusCode NW_Url_GetSchemeNoValidation(const NW_Ucs2* url, NW_Url_Schema_t* ret_scheme) - { - NW_Ucs2 *scheme = NULL; - NW_Ucs2 *seperator = NULL; - - NW_ASSERT(url); - NW_ASSERT(ret_scheme); - - *ret_scheme = NW_SCHEMA_INVALID; - - seperator = NW_Str_Strchr(url, WAE_URL_COLON_CHAR); - if (!seperator) - { - return KBrsrFailure; - } - - NW_ASSERT(seperator >= url); - scheme = NW_Str_Substr(url, 0, ((NW_Uint32)(seperator - url))); - if (!scheme) - { - return KBrsrOutOfMemory; - } - - /* RFC2396 sect 3.1 says "programs interpreting URI should - treat upper case letters as equivalient to lower case in - scheme names" */ - NW_Str_Strlwr(scheme); - *ret_scheme = returnschema(scheme); - NW_Str_Delete(scheme); - - return KBrsrSuccess; - } - -/* -Below function compares the parameter scheme with standard schema type and returns -oe of the constants for the schema types. - -eg . if value of scheme is "file" or "FILE" then it returns NW_SCHEMA_FILE. - if value is not one of the valid types it returns NW_SCHEMA_UNKNOWN - -*/ - -NW_Url_Schema_t returnschema(const NW_Ucs2 *scheme) -{ - NW_ASSERT(scheme); - - if (NW_Str_StrcmpConst(scheme, WAE_URL_HTTP_SCHEME) == 0) { - return NW_SCHEMA_HTTP; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_HTTPS_SCHEME) == 0) { - return NW_SCHEMA_HTTPS; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_FTP_SCHEME) == 0) { - return NW_SCHEMA_FTP; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_GOPHER_SCHEME) == 0) { - return NW_SCHEMA_GOPHER; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_MAILTO_SCHEME) == 0) { - return NW_SCHEMA_MAILTO; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_NEWS_SCHEME) == 0) { - return NW_SCHEMA_NEWS; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_NNTP_SCHEME) == 0) { - return NW_SCHEMA_NNTP; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_TELNET_SCHEME) == 0) { - return NW_SCHEMA_TELNET; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_WAIS_SCHEME) == 0) { - return NW_SCHEMA_WAIS; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_FILE_SCHEME) == 0) { - return NW_SCHEMA_FILE; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_WTAI_SCHEME) == 0) { - return NW_SCHEMA_WTAI; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_PROSPERO_SCHEME) == 0) { - return NW_SCHEMA_PROSPERO; - } else if (NW_Str_StrcmpConst(scheme, WAE_URL_TEL_SCHEME) == 0) { - return NW_SCHEMA_TEL; - }else { - return NW_SCHEMA_UNKNOWN; - } -} - -/* Copies a UCS2, potentially foreign char, into a buffer, returning # of bytes - copied into the buffer. Input char is assumed to be in little endian. */ -NW_Uint32 writeForeignCharBuff(const NW_Byte* c, NW_Byte *buff) -{ - NW_Uint32 cnt; - - NW_ASSERT(buff != NULL); - - buff[0] = *c++; - cnt = (*c) ? 2 : 1; - buff[1] = *c; - return cnt; -} - -/* Schema other than {http, https, file} are handled via SchemeDispatcher. - They are treated as absolute URLs. - */ -TBrowserStatusCode -NW_Url_IsBrowserScheme(const NW_Ucs2 *pUri, NW_Bool *isBrowserScheme) - { - TBrowserStatusCode status; - NW_Url_Schema_t schema; - - status = NW_Url_GetSchemeNoValidation(pUri, &schema); - - switch (schema) - { - - case NW_SCHEMA_HTTPS: - case NW_SCHEMA_HTTP: - case NW_SCHEMA_FILE: - /* These are handled by BrowserEngine */ - *isBrowserScheme = NW_TRUE; - break; - - default: - /* Not handled by BrowserEngine */ - *isBrowserScheme = NW_FALSE; - break; - - } - - return status; - } - - -/******************************************************************* - Name: NW_Url_RemoveCharsLen - - Description: Url after removing the chars passed in whenever they appears - - Parameters: src -- pointer to the string containing url - chars - chars to be removed - - Returns: void -********************************************************************/ -NW_Uint32 NW_Url_RemoveCharsLen( const NW_Ucs2 *src, const NW_Ucs2 *chs ) -{ - NW_Int32 len = 0; - NW_Int32 posInSrc = 0; - NW_Int32 lenCh = 0; - NW_Int32 posInCh = 0; - NW_Bool found; - - NW_ASSERT(chs); - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - if( chs ) - lenCh = NW_Str_Strlen(chs); - else - lenCh = 0; - - /* Walk through the source and remove any characters from chs and build destination. */ - for( posInSrc = 0; posInSrc < len; posInSrc++ ) - { - found = NW_FALSE; - - for( posInCh = 0; posInCh < lenCh; posInCh++ ) - { - if (src[posInSrc] == chs[posInCh]) - { - found = NW_TRUE; - break; - } - } - - if (found) - { - len--; - } - } - - return len; -} - - -/******************************************************************* - Name: NW_Url_RemoveChars - - Description: Creates a copy of a string but with specific chars removed. - - Parameters: src - pointer to the source string. - dest - pointer to the destination into which the source. - string will be copied with specific chars removed. - chs - list of chars to be removed. - - Returns: void -********************************************************************/ -void NW_Url_RemoveChars( const NW_Ucs2 *src, NW_Ucs2 *dest, const NW_Ucs2 *chs ) -{ - NW_Int32 len = 0; - NW_Int32 posInSrc = 0; - NW_Int32 posInDest = 0; - NW_Int32 lenCh = 0; - NW_Int32 posInCh = 0; - NW_Bool found; - - NW_ASSERT(dest); - NW_ASSERT(chs); - - if( src ) - len = NW_Str_Strlen(src); - else - len = 0; - - if( chs ) - lenCh = NW_Str_Strlen(chs); - else - lenCh = 0; - - /* Walk through the source and remove any characters from chs and build destination. */ - for( posInSrc = 0; posInSrc < len; posInSrc++ ) - { - found = NW_FALSE; - - for( posInCh = 0; posInCh < lenCh; posInCh++ ) - { - if (src[posInSrc] == chs[posInCh]) - { - found = NW_TRUE; - break; - } - } - - if (!found) - { - dest[posInDest] = src[posInSrc]; - posInDest++; - } - } - - dest[posInDest] = 0; -} - -/******************************************************************* - Name: NW_Url_GetUrlFileExtension - - Description: Returns the file extension from an url - Parameters: src - pointer to the source string. - - Returns: ext - pointer to the file extension. -********************************************************************/ -NW_Ucs2* NW_Url_GetUrlFileExtension(const NW_Ucs2 *src) -{ - NW_Ucs2* fileName = NW_Str_Strrchr(src, WAE_ASCII_POINT); - if (fileName == NULL) - { - return NULL; - } - return NW_Str_Substr(src, (NW_Str_Strlen(src) - NW_Str_Strlen(fileName) + 1), (NW_Str_Strlen(fileName) - 1)); -} -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/ucs2_transformation_epoc32.c --- a/webengine/wmlengine/src/utils/src/ucs2_transformation_epoc32.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -/* -* Copyright (c) 2001-2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* -**---------------------------------------------------------------- -** Component Generic Include -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** Module Specific Includes -**---------------------------------------------------------------- -*/ -#include "nwx_string.h" -#define EPOC32_API_AVAILABLE 0 /* 0 when not available */ -/* -**---------------------------------------------------------------- -** Constants -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** Internal Types -**---------------------------------------------------------------- -*/ -#if (EPOC32_API_AVAILABLE) -#include "type_def.h" -#include "ui_type.h" -#include "d_xhtml_interface.h" -#include "BrsrStatusCodes.h" - - -typedef enum -{ - NW_Transformation_ToUpper = 0, - NW_Transformation_ToLower, - NW_Transformation_ToTitleCase -} TextTransformationMode; -#endif -/* -**---------------------------------------------------------------- -** Macros -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** Internal Prototypes -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** File Scoped Static Variables -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** Global Variable Definitions -**---------------------------------------------------------------- -*/ - -/* -**---------------------------------------------------------------- -** Internal Functions -**---------------------------------------------------------------- -*/ -/**** Below is the code that uses ISA DO APIs (to be delivered in Jan 2002) ***/ -#if (EPOC32_API_AVAILABLE) -static TBrowserStatusCode DoTextTransformation(NW_Ucs2 **ppStr, TextTransformationMode mode) -{ - ucs2_char *result; - ucs2_char *tmpResult = NULL; - TBrowserStatusCode nwStatus = KBrsrSuccess; - uint16 ret; - uint16 size; - uint16 length; - - NW_ASSERT(ppStr && *ppStr); - - length = NW_Str_Strlen(*ppStr); - - if (2*length > NW_UINT16_MAX) { - nwStatus = KBrsrFailure; - goto FuncExit; - } - - /* Case transformation can result in a different string size. - We reserve the result string buffer for the worst case scenario */ - size = 2*length; - tmpResult = NW_Str_New(size); - if (tmpResult == NULL) { - nwStatus = KBrsrOutOfMemory; - goto FuncExit; - } - switch(mode) - { - case NW_Transformation_ToUpper: - ret = D1_ToUpper((ucs2_char *)*ppStr, tmpResult, length, &size); - break; - case NW_Transformation_ToLower: - ret = D1_ToLower((ucs2_char *)*ppStr, tmpResult, length, &size); - break; - case NW_Transformation_ToTitleCase: - ret = D1_ToTitleCase((ucs2_char *)*ppStr, tmpResult, length, &size); - break; - default: - NW_ASSERT(0); - ret = 0xFFFF; - break; - } - - if (ret == 0xFFFF) { - nwStatus = KBrsrFailure; - goto FuncExit; - } - - if (size == length) { - (void) NW_Str_Strcpy(*ppStr, tmpResult); - } - else { - result = NW_Str_New(size); - if (result == NULL) { - nwStatus = KBrsrOutOfMemory; - } - else { - (void) NW_Str_Strcpy(result, tmpResult); - *ppStr = result; - } - } - -FuncExit: - NW_Str_Delete(tmpResult); - return nwStatus; -} -#endif -/* -**---------------------------------------------------------------- -** External Public (Exported) Functions -**---------------------------------------------------------------- -*/ - -/***************************************************************** - - Name: NW_Str_Ucs2StrUpr - - Description: Transforms each letter of the string to upper case - - Parameters: pointer to a Ucs2 string pointer - - Return Value: Transformed to upper case string - NW_Status: KBrsrSuccess - -*****************************************************************/ -TBrowserStatusCode NW_Str_Ucs2StrUpr(NW_Ucs2 **ppStr) -{ - TBrowserStatusCode nwStatus; - -#if (EPOC32_API_AVAILABLE) - nwStatus = DoTextTransformation(ppStr, NW_Transformation_ToUpper); -#else - NW_ASSERT(ppStr); - nwStatus = KBrsrSuccess; - NW_Str_Strupr(*ppStr); -#endif - return nwStatus; -} - -/***************************************************************** - - Name: NW_Str_Ucs2StrLwr - - Description: Transforms each letter of the string to lower case - - Parameters: pointer to a Ucs2 string pointer - - Return Value: Transformed to lower case string - NW_Status: KBrsrSuccess - -*****************************************************************/ -TBrowserStatusCode NW_Str_Ucs2StrLwr(NW_Ucs2 **ppStr) -{ - TBrowserStatusCode nwStatus; - -#if (EPOC32_API_AVAILABLE) - nwStatus = DoTextTransformation(ppStr, NW_Transformation_ToLower); -#else - NW_ASSERT(ppStr); - nwStatus = KBrsrSuccess; - NW_Str_Strlwr(*ppStr); -#endif - return nwStatus; -} - -/***************************************************************** - - Name: NW_Str_Ucs2StrTitle - - Description: Transforms first character of each word to upper case - - Parameters: pointer to a Ucs2 string pointer - - Return Value: Transformed to lower case string - NW_Status: KBrsrSuccess - -*****************************************************************/ -TBrowserStatusCode NW_Str_Ucs2StrTitle(NW_Ucs2 **ppStr) -{ - NW_Bool capChar = NW_TRUE; - TBrowserStatusCode nwStatus; - -#if (EPOC32_API_AVAILABLE) - nwStatus = DoTextTransformation(ppStr, NW_Transformation_ToTitleCase); -#else - NW_Ucs2 *tmp; - NW_ASSERT(ppStr && *ppStr); - nwStatus = KBrsrSuccess; - for (tmp = *ppStr; *tmp; tmp++) { - if (NW_Str_Isspace (*tmp) == NW_TRUE) { - capChar = NW_TRUE; - } - else if (capChar == NW_TRUE) { - *tmp = NW_Str_ToUpper (*tmp); - capChar = NW_FALSE; - } - } -#endif - return nwStatus; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/utils/src/util_cdispatchereng.cpp --- a/webengine/wmlengine/src/utils/src/util_cdispatchereng.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 1998-2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "nwx_defs_symbian.h" -#include "nwx_msg_api.h" -#include "nwx_datastruct.h" -#include "nwx_psq.h" -#include "nwx_msg_types.h" -#include "nwx_msg_dsp_api_epoc32.h" -#include "nwx_logger.h" -#include "util_cdispatchereng.h" -#include "BrsrStatusCodes.h" - -/* Active Object ID */ -/*#define AO_NONE 0xFF -#define AO_WAPACLI 0x00 -#define AO_WAPALAYER 0x01*/ -#define AO_WAPMESSAGE 0x02 - -CDispatcherEng::CDispatcherEng(CActive::TPriority aPriority) - :CActive(aPriority) { - - CActiveScheduler::Add(this); - __DECLARE_NAME(_S("CDispatcherEng")); - - iDsp_cxt = NULL; - -} - -CDispatcherEng::~CDispatcherEng() { - Cancel(); -} - -void CDispatcherEng::DoCancel() { - // Program execution never gets here as the request is always completed - // right after it is issued. See RequestEvent() below. - } - -void CDispatcherEng::RequestEvent() { - - if (!IsActive()) - { - SetActive(); - TRequestStatus* status = &iStatus; - User::RequestComplete(status, AO_WAPMESSAGE); - } - -} - -void CDispatcherEng::RunL() { - - if (iStatus != AO_WAPMESSAGE) { - // TODO: Somehow the status of this object is - // corrupted if the program gets here. Unexpected - // error!! - return; - } - - NW_Msg_t *msg; - NW_Msg_Handler_t *handler; - TBrowserStatusCode ret; - - msg = (NW_Msg_t *)NW_Psq_RemoveHead(iDsp_cxt->queue); - if (!msg) return; - - NW_LOG1(NW_LOG_LEVEL3, "Received message %d\n", msg->type); - handler = iDsp_cxt->handlers; - - while (handler != NULL) { - if (handler->type == msg->type) { - ret = handler->func(msg); - if (ret == KBrsrOutOfMemory) - { - User::Leave(ret); - } - break; - } else { - handler = (NW_Msg_Handler_t *)handler->next; - } - } - // Request another run of this obj to check for queued msg. - RequestEvent(); -} - -NW_Bool CDispatcherEng::IsDspContext() { - - if (iDsp_cxt == NULL) return NW_FALSE; - else - return NW_TRUE; - -} - -void CDispatcherEng::SetDspContext(NW_Msg_Dispatcher_t* aDsp_cxt) { - - iDsp_cxt = aDsp_cxt; - -} -/****************************************************************************** - RunError - - Overrides default CActive implementation. Called when RunL method leaves. -******************************************************************************/ -TInt CDispatcherEng::RunError(TInt /*aError*/) -{ - return KErrNone; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_errnotify.h --- a/webengine/wmlengine/src/wml/include/nw_errnotify.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nw_errnotify.h -** Subsystem Name: nwx_wae -** Purpose: Provides interface to Errors -**************************************************************************/ -#ifndef NW_ERRNOTIFY_H -#define NW_ERRNOTIFY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" -/* -** Includes -*/ - -/* -** Type Declarations -*/ -typedef struct _NW_ErrorApi_t NW_ErrorApi_t; - -/* The callback to call when done displaying a error dialog */ -typedef TBrowserStatusCode (NW_ErrorCB_t)(void *callback_ctx, - TBrowserStatusCode status); - -typedef TBrowserStatusCode (*NW_NotifyError_t) (void *wae, const TBrowserStatusCode status, - void *callback_ctx, - NW_ErrorCB_t *callback); - -typedef TBrowserStatusCode (*NW_HttpError_t) (void *wae, const NW_WaeHttpStatus_t httpError, - const NW_Ucs2 *uri, - void *callback_ctx, - NW_ErrorCB_t *callback); - - -struct _NW_ErrorApi_t { - /* notify the user that an error has occured */ - NW_NotifyError_t notifyError; - NW_HttpError_t httpError; -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_ERRNOTIFY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_evlog_api.h --- a/webengine/wmlengine/src/wml/include/nw_evlog_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Event log API interface. -* -*/ - - -#ifndef NW_EVLOG_API_H -#define NW_EVLOG_API_H - -/* -** Includes -*/ -#include <stdarg.h> -#include "urlloader_urlresponse.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Type Declarations -*/ -typedef struct NW_EvLogApi_s NW_EvLogApi_t; - -struct NW_EvLogApi_s { - /* Log new context event (affects global vars only). */ - TBrowserStatusCode (*logVariableContextNew)(void); - /* Log clearing the history stack event (right now affect WML history stack - only). */ - TBrowserStatusCode (*logHistoryStackClear)(void); - /* Log pushing an entry onto the history stack event. */ - TBrowserStatusCode (*logHistoryPush)(NW_Ucs2* url); - /* Log poping an entry onto the history stack event. */ - TBrowserStatusCode (*logHistoryPop)(void); - /* Log history back event. */ - TBrowserStatusCode (*logHistoryBack)(void); - /* Log history forward event. */ - TBrowserStatusCode (*logHistoryForward)(void); - /* Log setting variable event. */ - TBrowserStatusCode (*logSetVar)(NW_Ucs2* name, NW_Ucs2* value); - /* Log cache add. */ - TBrowserStatusCode (*logCacheAdd)(NW_Ucs2* url); - /* Log cache remove. */ - TBrowserStatusCode (*logCacheRemove)(NW_Ucs2* url); - /* Log cache clear */ - TBrowserStatusCode (*logCacheClear)(void); -}; - -typedef enum { - NW_EvLog_INVALID, - NW_EvLog_FIRST, - NW_EvLog_CONTENT_REQUEST = NW_EvLog_FIRST, - NW_EvLog_CONTENT_RECEIVED, - NW_EvLog_VARIABLE_CONTEXT_NEW, - NW_EvLog_HISTORY_STACK_CLEAR, - NW_EvLog_HISTORY_PUSH, - NW_EvLog_HISTORY_POP, - NW_EvLog_HISTORY_BACK, - NW_EvLog_HISTORY_FORWARD, - NW_EvLog_SET_VAR, - NW_EvLog_CACHE_ADD, - NW_EvLog_CACHE_REMOVE, - NW_EvLog_CACHE_CLEAR, - NW_EvLog_LAST = NW_EvLog_CACHE_CLEAR -} NW_EvLog_Index_t; - -/* -** Global Function Declarations -*/ - -void NW_EvLog_Log( const NW_EvLogApi_t* evLogApi, NW_EvLog_Index_t index, ...); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_EVLOG_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_scrproxy.h --- a/webengine/wmlengine/src/wml/include/nw_scrproxy.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nw_scr_api.h -** Subsystem Name: WAE User Agent -** Purpose: This module is responsible for coordinating the WML Script Engine -** with the WML Interpreter and the User Interface. -**************************************************************************/ -#ifndef NW_SCR_API_H -#define NW_SCR_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Includes -*/ -#include "nw_wtai_api.h" -#include "nwx_http_header.h" -#include "nw_errnotify.h" -#include "nwx_generic_dlg.h" -#include "BrsrStatusCodes.h" - -/* -** Type Declarations -*/ - -/** - * The context of the script proxy. - * Created by NW_ScrProxy_New(). - * Destroyed by NW_ScrProxy_Free(). -**/ -typedef struct _NW_ScrProxy_t NW_ScrProxy_t; - -/** - * The callback to call when done displaying a script confirm dialog. -**/ - -//#define NW_Dlg_ConfirmCB_t NW_ScrProxy_DlgConfirmCB_t; -/** - * The callback to call when done displaying a script alert dialog. -**/ -typedef TBrowserStatusCode (NW_ScrProxy_DlgAlertCB_t) (void *callback_ctx, - TBrowserStatusCode status, - NW_Dlg_Confirm_Result_t result); - -/** - * The callback to call when done displaying a script prompt dialog. -**/ -typedef TBrowserStatusCode (NW_ScrProxy_DlgPromptCB_t) (void *callback_ctx, TBrowserStatusCode status, - const NW_Ucs2 *input, NW_Bool endPressed); - -/** - * The callback functions will be invoked by the script proxy to inform the user agent that a - * WML Script has started and completed. -**/ -typedef struct { - - /* WML Script NW_Byte code has been downloaded and its about to execute. */ - TBrowserStatusCode (*start)(void *wae, const NW_Ucs2 *url); - - /* script execution has completed. */ - TBrowserStatusCode (*finish)(void *wae, TBrowserStatusCode status, - const NW_Ucs2 *message); -} NW_Scr_ProgressApi_t; /* Script progress, UI interface */ - -/** - * The callback functions will be invoked by the script proxy to inform the user agent that a dialog - * has to displayed. -**/ -typedef struct { - - /* display a alert dialog to the user */ - void (*dlgAlert)(void *wae, const NW_Ucs2 *message, - void *callback_ctx, - NW_ScrProxy_DlgAlertCB_t *callback); - - /* display a confirm dialog to the user */ - void (*dlgConfirm)(void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callback_ctx, - NW_Dlg_ConfirmCB_t *callback); - - /* display a prompt dialog to the user */ - void (*dlgPrompt)(void *wae, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - void *callback_ctx, - NW_ScrProxy_DlgPromptCB_t *callback); -} NW_Scr_DialogApi_t; /* Script dialog libraries, UI interface */ - - - -typedef struct { - - /* retreive a variable */ - TBrowserStatusCode (*getVar) (void *ctx, const NW_Ucs2 *var, NW_Ucs2 ** ret_string); - - /* set a variable */ - TBrowserStatusCode (*setVar) (void *ctx, const NW_Ucs2 *var, const NW_Ucs2 *value); - - TBrowserStatusCode (*go) (void *ctx, const NW_Ucs2 *url, const NW_Ucs2 *param, - NW_Http_Header_t *header); - - TBrowserStatusCode (*prev) (void *ctx); - - TBrowserStatusCode (*newContext) (void *ctx); - - TBrowserStatusCode (*refresh) (void *ctx); - -} NW_Scr_WmlBrowserApi_t; /* WMLBrowser Library Api */ - -typedef struct { - - /* script suspend/resume api */ - TBrowserStatusCode (*scriptSuspResQuery) (void *ctx); - -} NW_Scr_SuspResQueryApi_t; - -/* -** Global Function Declarations -*/ - -NW_ScrProxy_t *NW_ScrProxy_New(); - -void NW_ScrProxy_Free(NW_ScrProxy_t *proxy); - -/* initialize the script proxy */ -TBrowserStatusCode -NW_ScrProxy_Initialize(NW_ScrProxy_t *scrProxy, void *ctx, - const NW_Scr_WmlBrowserApi_t *scrBrowserApi, - const NW_Scr_ProgressApi_t *scrProgressApi, - const NW_Scr_DialogApi_t *scrDlgApi, - const NW_WtaiApi_t *wtaiApi, - const NW_Scr_SuspResQueryApi_t *scrSuspResQueryApi, - NW_NotifyError_t errApi); - -/* run a script */ -TBrowserStatusCode -NW_ScrProxy_RunScript(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *url, NW_Ucs2 *postfields, NW_Ucs2 *referer, - NW_Byte *content, const NW_Uint32 len, - const NW_Http_CharSet_t charset); - -/** -* This function abort's the currently running WML Script. -**/ -TBrowserStatusCode NW_ScrProxy_AbortScript(NW_ScrProxy_t *scrProxy); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_SCR_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_telephony_api.h --- a/webengine/wmlengine/src/wml/include/nw_telephony_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: wml_telephony_api.h -** Part of: WAE -** Description: Provides an interface to Telephony functionality from iHTML/xHTML -******************************************************************/ - -#ifndef NWX_TELEPHONY_API_H -#define NWX_TELEPHONY_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_string.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* interface to telephony API */ -typedef struct _NW_TelephonyApi_s NW_TelephonyApi_t; - -struct _NW_TelephonyApi_s -{ - /* Make Call - a valid number should be sent */ - TBrowserStatusCode (*makeCall)(const NW_Ucs2* number); - - /* add phone book entry */ - TBrowserStatusCode (*addPBEntry)(const NW_Ucs2* number, const NW_Ucs2* name, const NW_Ucs2* email); -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_TELEPHONY_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wae.h --- a/webengine/wmlengine/src/wml/include/nw_wae.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,242 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: nw_wae.h -** Subsystem Name: WAE User Agent -** Purpose: Provides interface to the WAE Browser. This module -** has mostly glue logic that integrates the WML Interpreter with -** the URL Loaders -**************************************************************************/ -#ifndef NW_WAE_H -#define NW_WAE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* -**---------------------------------------------------------------------- -** Includes -**---------------------------------------------------------------------- -*/ -#include "nw_errnotify.h" -#include "nw_scrproxy.h" -#include "nw_wml_core.h" -#include "nw_wml_api.h" -#include "nw_wtai_api.h" -#include "nwx_generic_dlg.h" -#include "nw_evlog_api.h" -#include "wml_wae_transaction.h" -#include "BrsrStatusCodes.h" - - -/* */ -/* Spectrum uses the new SIA/OTA Push application, which registers directly */ -/* with the WSP stack, rather than the Rainbow OEM Push handlering code */ -/* */ - -/* Define the default port number */ -#define NW_DEFAULT_PORT 2948 - -/* -**---------------------------------------------------------------------- -** Type Declarations -**---------------------------------------------------------------------- -*/ - -/* - * --------------------------------------------------------------------- - */ - -typedef struct _NW_UrlLoadProgressApi_t NW_UrlLoadProgressApi_t; -typedef struct _NW_AuthenticationApi_t NW_AuthenticationApi_t; -typedef struct _NW_GenDlgApi_t NW_GenDlgApi_t; -typedef struct _NW_WaeUsrAgent_t NW_WaeUsrAgent_t; -typedef struct _NW_UserRedirectionApi_t NW_UserRedirectionApi_t; - -struct _NW_WaeUsrAgent_t { - NW_Wml_t *wml; /* WML Interpreter */ - NW_WaeTransaction_t wmlReq; /* WML Interpreter loader request */ - NW_ScrProxy_t *scrProxy; /* WML Script Proxy */ - const NW_AuthenticationApi_t *authApi; /* Authentication API */ - const NW_GenDlgApi_t *genDlgApi; /* Generic dialogs API */ - const NW_UrlLoadProgressApi_t *loadProgApi; /* URL Load Progress API */ - const NW_ErrorApi_t *errorApi; /* Error API */ - const NW_WtaiApi_t *wtaiApi; /* Wtai API */ - const NW_EvLogApi_t *evLogApi; /* Event Logging API */ - void *uiCtx; /* GUI Context */ - - const NW_UserRedirectionApi_t *userRedirection; /* User Redirection */ -}; - -/* The callback to call when done displaying a authentication dialog */ -typedef TBrowserStatusCode (NW_Wae_AuthenticationCB_t)(void *callback_ctx, - TBrowserStatusCode status, - const NW_Ucs2 *username, - const NW_Ucs2 *password, - NW_Bool cancel, - NW_Bool endPressed); - -typedef TBrowserStatusCode (NW_Wae_UserRedirectionCB_t)(void *callback_ctx, - TBrowserStatusCode status, - NW_Dlg_Confirm_Result_t resp); - -/* Display a authentication dialog to the user */ -struct _NW_AuthenticationApi_t { - void (*getAuthenticationData)(void *wae, - void *callbackCtx, - NW_Wae_AuthenticationCB_t *callback); - void (*getAuthenticationDataFailed)(void *msg, - NW_Dlg_ConfirmCB_t *callback); -}; - -/* Display a authentication dialog to the user */ -struct _NW_UserRedirectionApi_t { - void (*getUserRedirectionData)(void *wae, - const NW_Ucs2 *originalUrl, - const NW_Ucs2 *redirectedUrl, - void *callbackCtx, - NW_Wae_UserRedirectionCB_t *callback); -}; - -struct _NW_GenDlgApi_t { - void (*DialogListSelect)(NW_Dlg_ListSelect_t *data, void* callbackCtx, NW_Dlg_ListSelectCB_t* callback); - void (*DialogPrompt)(NW_Dlg_Prompt_t *data, void* callbackCtx, NW_Dlg_PromptCB_t* callback); - void (*DialogInputPrompt)(NW_Dlg_InputPrompt_t *data, void* callbackCtx, NW_Dlg_InputPromptCB_t* callback); - void (*DialogSelectOption)(NW_Dlg_SelectData_t *data, void* callbackCtx, NW_Dlg_SelectCB_t* callback); - void (*DetailsDialogHashkeyPressed)(NW_Ucs2* input, void* callbackCtx, NW_Dlg_DetailsDlgCB_t* callback); -}; - -/* URL load process API, UI interface*/ -struct _NW_UrlLoadProgressApi_t { - /* start of a URL load ie. request to load a URL has been - sent to the URL Loader. */ - TBrowserStatusCode (*start) (void *wae, const NW_Ucs2 *url); - /* the URL Loader has completed the load. */ - TBrowserStatusCode (*finish) (void *wae, const NW_Ucs2 *url); - /* Progress status is available */ - TBrowserStatusCode (*load_progress_on) (void *wae, NW_Uint16 transactionId); - -}; - -/* -**---------------------------------------------------------------------- -** Global Function Declarations -**---------------------------------------------------------------------- -*/ - -/* Create the wae browser */ -NW_WaeUsrAgent_t *NW_WaeUsrAgent_New(); - -/* - * Free the wae browser. This function will shutdown the - * URL Loader, WML Interpreter, Image Loader and the script proxy. - */ -void NW_WaeUsrAgent_Free(NW_WaeUsrAgent_t *wae); - - - -TBrowserStatusCode NW_Wae_RegisterWml(NW_WaeUsrAgent_t *wae, NW_Wml_t *wml); - -TBrowserStatusCode NW_Wae_UnRegisterWml(NW_WaeUsrAgent_t *wae); - -TBrowserStatusCode NW_Wae_RegisterWmlScriptProxy(NW_WaeUsrAgent_t *wae, - NW_ScrProxy_t *scrProxy); - -TBrowserStatusCode NW_Wae_UnRegisterWmlScriptProxy(NW_WaeUsrAgent_t *wae); - - -/* */ -/* Spectrum uses the new SIA/OTA Push application, which registers directly */ -/* with the WSP stack, rather than the Rainbow OEM Push handlering code */ -/* */ - -TBrowserStatusCode -NW_WaeUsrAgent_RegisterGenDlg(NW_WaeUsrAgent_t *wae, - const NW_GenDlgApi_t *genDlgApi); - -TBrowserStatusCode -NW_WaeUsrAgent_UnRegisterGenDlg(NW_WaeUsrAgent_t *wae); - - -/* - * Get a pointer to the script proxy. The caller should not free - * the returned pointer. - */ -NW_ScrProxy_t *NW_WaeUsrAgent_GetScript(NW_WaeUsrAgent_t *wae); - - -/* */ -/* Spectrum uses the new SIA/OTA Push application, which registers directly */ -/* with the WSP stack, rather than the Rainbow OEM Push handlering code */ -/* */ - -TBrowserStatusCode NW_WaeUsrAgent_RegisterError(NW_WaeUsrAgent_t *wae, - const NW_ErrorApi_t *errorApi); - -TBrowserStatusCode NW_WaeUsrAgent_RegisterLoadProgress(NW_WaeUsrAgent_t *wae, - const NW_UrlLoadProgressApi_t *loadProgApi); - - -/* */ -/* Spectrum uses the new SIA/OTA Push application, which registers directly */ -/* with the WSP stack, rather than the Rainbow OEM Push handlering code */ -/* */ - -/* Register event log API */ -TBrowserStatusCode NW_WaeUsrAgent_RegisterEvLog(NW_WaeUsrAgent_t *wae, - const NW_EvLogApi_t *evLogApi); - -/* Unregister event log API */ -TBrowserStatusCode NW_WaeUsrAgent_UnRegisterEvLog(NW_WaeUsrAgent_t *wae); - -/* Get a pointer to the EvLogApi. */ -const NW_EvLogApi_t *NW_WaeUsrAgent_GetEvLog(NW_WaeUsrAgent_t *wae); - -TBrowserStatusCode -NW_WaeUsrAgent_RegisterUserRedirection(NW_WaeUsrAgent_t *wae, - const NW_UserRedirectionApi_t *userRedirectionapi); - -TBrowserStatusCode -NW_WaeUsrAgent_UnRegisterUserRedirection(NW_WaeUsrAgent_t *wae); - - - -TBrowserStatusCode NW_WaeUsrAgent_DlgListSelect(NW_WaeUsrAgent_t *wae, - NW_Dlg_ListSelect_t *data, - void *callbackCtx, - NW_Dlg_ListSelectCB_t callback); - -TBrowserStatusCode NW_WaeUsrAgent_DlgPrompt(NW_WaeUsrAgent_t *wae, - NW_Dlg_Prompt_t *data, - void *callbackCtx, - NW_Dlg_PromptCB_t callback); - -TBrowserStatusCode NW_WaeUsrAgent_DlgInputPrompt(NW_WaeUsrAgent_t *wae, - NW_Dlg_InputPrompt_t *data, - void *callbackCtx, - NW_Dlg_InputPromptCB_t callback); - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WAE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wae_reader.h --- a/webengine/wmlengine/src/wml/include/nw_wae_reader.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declares structures and function to read native types from encoded bytecode. - The wae_reader iterates over the bytecode and reads or skips raw bytes, ints, - floats, boolean, and string types. - -* -*/ - - -#ifndef WAE_READER_H -#define WAE_READER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" - -typedef struct -{ - NW_Byte* readerBuff; - NW_Uint32 readerSize; /* Allocated buffer size */ - NW_Uint32 readerPos; /* To keep the position of the buffer */ - NW_Uint16 readerEncoding; /* Type of encoding */ - NW_Uint32 readerBytesRead; /* To hold number of bytes has been read */ -} NW_Reader_t; - - -void NW_Reader_InitializeBuffReader(NW_Reader_t *r, NW_Byte *buff, - NW_Uint32 buff_size, NW_Uint16 encoding); -NW_Byte NW_Reader_UngetByte(NW_Reader_t *r); -NW_Bool NW_Reader_ReadMbyteInt(NW_Reader_t *r, NW_Int32 *res); -NW_Bool NW_Reader_ReadMbyteBuff(NW_Int32 *val, NW_Reader_t *r); -NW_Uint32 NW_Reader_GetPos(NW_Reader_t *r); -NW_Bool NW_Reader_ReadBytes(NW_Reader_t *r, NW_Byte *buff, NW_Uint32 len); /* changed return type from void to NW_Bool. 2/16/2000,jac */ -NW_Bool NW_Reader_ReadInt16(NW_Reader_t *r, NW_Int16 *res); -NW_Bool NW_Reader_ReadInt(NW_Reader_t *r, NW_Int32 *res); -NW_Float32 NW_Reader_ReadFloat(NW_Reader_t *r); -NW_Bool NW_Reader_ReadNextByte(NW_Reader_t *r, NW_Byte *b); -NW_Uint32 NW_Reader_GetStrCharCount(NW_Reader_t *r, NW_Uint32 byte_len); -NW_Bool NW_Reader_ReadChar(NW_Reader_t *r, NW_Ucs2 *c); -NW_Bool NW_Reader_ReadChars(NW_Reader_t *r, NW_Ucs2 *str, NW_Int32 len); -NW_Int32 NW_Reader_StrBuff(NW_Byte *buff, NW_Uint16 encoding); -NW_Uint32 NW_Reader_ReadUtf8CharBuff(NW_Reader_t *r, NW_Ucs2 *c); -NW_Uint32 NW_Reader_WriteUtf8CharBuff(NW_Ucs2 c, NW_Byte *buff); -NW_Uint32 NW_Reader_GetUtf8EncodedByteLength(const NW_Ucs2 *str); -NW_Uint32 NW_Reader_WriteUcs2CharBuff(NW_Ucs2 c, NW_Byte *buff); -NW_Uint32 NW_Reader_ReadIso8859_1CharBuff(NW_Reader_t *r, NW_Ucs2 *c); -NW_Uint32 NW_Reader_ReadUsAsciiCharBuff(NW_Reader_t *r, NW_Ucs2 *c); -NW_Uint32 NW_Reader_ReadCharBuff(NW_Reader_t *r, NW_Ucs2 *c); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* WAE_READER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_api.h --- a/webengine/wmlengine/src/wml/include/nw_wml_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML_API_H -#define NW_WML_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" -#include "nw_wml_decoder.h" -#include "nw_wml_defs.h" -#include "BrsrStatusCodes.h" - -/* interface to the display */ -struct _NW_DisplayApi_t -{ - /* create the card */ - TBrowserStatusCode (*createCard) (void *usrAgent); - /* show the card */ - TBrowserStatusCode (*showCard) (void *usrAgent); - /* destroy the card */ - TBrowserStatusCode (*destroyCard) (void *usrAgent); - /* add an element to the card */ - TBrowserStatusCode (*addElement) (void *usrAgent, NW_Wml_ElType_e elemType, NW_Int16 *elemId); - /* clean up the display. indicates that a event has happened*/ - TBrowserStatusCode (*cleanUp) (void *usrAgent); - /* get the state of the option element */ - TBrowserStatusCode (*getOptState) (void *usrAgent, NW_Uint16 elemId, NW_Bool *st); - /* set the state of the option element */ - TBrowserStatusCode (*setOptState) (void *usrAgent, NW_Uint16 elemId, NW_Bool st); - /* refresh the display */ - TBrowserStatusCode (*refresh) (void *usrAgent); -}; - -/* interface to timers */ -struct _NW_TimerApi_t -{ - /* create the timer */ - TBrowserStatusCode (*create) (void *usrAgent, NW_Uint32 period); - /* read the time remaining in the timer */ - TBrowserStatusCode (*read) (void *usrAgent, NW_Uint32 *period); - /* destroy the timer */ - TBrowserStatusCode (*destroy) (void *usrAgent); - /* resume the timer */ - TBrowserStatusCode (*resume) (void *usrAgent); - /* stop the timer */ - TBrowserStatusCode (*stop) (void *usrAgent); - /* check if timer is running */ - TBrowserStatusCode (*isRunning) (void *usrAgent, NW_Bool *isRunning); -}; - -typedef struct _NW_DisplayApi_t NW_DisplayApi_t; -typedef struct _NW_TimerApi_t NW_TimerApi_t; - -typedef struct _NW_WmlApi_t NW_WmlApi_t; -struct _NW_WmlApi_t -{ - /* display routines */ - const NW_DisplayApi_t *display; - /* timer routines */ - const NW_TimerApi_t *timer; -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_core.h --- a/webengine/wmlengine/src/wml/include/nw_wml_core.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: nw_wml_core.h $ - - Purpose: - - Class: WmlBrowser - - Main browser engine class declaration. The exteral environment messages to this - engine through the constructor, Start, Event, and *Resp methods. The core browser - object directs the URL Loader to get WML deck and card bytecode. It then processes - the WML tags and interfaces with an external UI system. The core browser also - interfaces with the WML script engine. - -*/ - -#ifndef NW_WML_CORE_H -#define NW_WML_CORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" - -#include "nw_wml_defs.h" -#include "nw_wml_var.h" -#include "nw_wml_decoder.h" -#include "nw_wml_elements.h" -#include "nw_wml_list.h" -#include "nw_wml_api.h" -#include "nw_nvpair.h" - -#include "nwx_mem.h" -#include "nwx_http_header.h" -#include "nwx_memseg.h" -#include "nwx_buffer.h" -#include "urlloader_urlresponse.h" -#include "BrsrStatusCodes.h" - - -#define MAX_NUMBER_INTRA_OEF 15 /* the value is so chosen that the call stack does not max out - Vishy*/ - - -/*--------------------------------------------------------------------- - * NW_Wml_History_t -- history stack element -- holds information needed - * to reconstruct the call to access a card we've been to recently. - --------------------------------------------------------------------*/ -typedef struct { - NW_Ucs2 *req_url; /* the one sent in the request */ -} NW_Wml_History_t; - - -typedef struct -{ - NW_Ucs2 *load_url; - NW_Ucs2 *load_url_params; - NW_Http_Header_t *load_header; - NW_Bool load_prev; - NW_Uint32 timer_time; - NW_Bool timerProcessing;/* NW_TRUE: timer processing complete - NW_FALSE: timer processing not complete */ -} NW_Wml_Script_State_t; - - -typedef struct _NW_Wml_t NW_Wml_t; -struct _NW_Wml_t { - void *browser_app; /* the user agent */ - NW_Wml_VarList_t *var_list; - NW_Wml_VarList_t *param_list; - NW_Wml_Task_e curr_task; - NW_Ucs2 *history_resp_url; - NW_DeckDecoder_t *decoder; - NW_Wml_Element_t **card_els; - NW_Int16 prev_task_id; - NW_Int16 do_type_prev_id; - NW_Wml_Script_State_t script_state; - NW_Bool hasFocus; - NW_Int16 outstandingLoadCount; - NW_Mem_Segment_Id_t mem_segment_general; - NW_Mem_Segment_Id_t mem_segment_card; /* DON'T ACCESS THIS FIELD DIRECTLY */ - const NW_WmlApi_t *wml_api; /* user agent call backs */ - NW_Uint16 IntraDeck_OefCounter; /* This counter is used to keep track of the number of - intra-deck OnEnterforward has occured continuously*/ - NW_Bool oefNavigation; /* NW_TRUE = nav within oef/oeb navigation, NW_FALSE otherwise */ -}; - -/* Type for emptyOk parameter to NW_WmlInput_ValidateInput(). */ -typedef enum NW_WmlInput_EmptyOk_e { - NW_WmlInput_EmptyOk_None, - NW_WmlInput_EmptyOk_True, - NW_WmlInput_EmptyOk_False -} NW_WmlInput_EmptyOk_t; - - -/* macros */ -#define DISPLAY_API thisObj->wml_api->display -#define TIMER_API thisObj->wml_api->timer - -/* interface from the user agent */ -TBrowserStatusCode NW_Wml_Init(NW_Wml_t *that, - const NW_WmlApi_t *wmlapi, - void *usrAgent); - -/* Use this function to init the wml 1.x interpreter -from the HED Wml content handler */ -TBrowserStatusCode NW_Wml_InitFromShell(NW_Wml_t *that, - const NW_Ucs2 *url, - const NW_WmlApi_t *wmlapi, - void *usrAgent); - -TBrowserStatusCode NW_Wml_GetVersion(NW_Wml_t *that, NW_Uint8 *version); - -TBrowserStatusCode NW_Wml_Start(NW_Wml_t* that, NW_Ucs2 *initialUrl); - -TBrowserStatusCode NW_Wml_ReStart(NW_Wml_t *that, TBrowserStatusCode status); - -TBrowserStatusCode NW_Wml_Exit(NW_Wml_t *that); - -TBrowserStatusCode NW_Wml_GetAttribute(NW_Wml_t *that, NW_Uint16 el_id, NW_Wml_Attr_t tag, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_GetElementType(NW_Wml_t *that, NW_Uint16 el_id, NW_Wml_ElType_e *el_type, NW_Wml_Element_t **el); - -TBrowserStatusCode NW_Wml_GetDefault(NW_Wml_t *that, NW_Uint16 el_id, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_GUIEvent(NW_Wml_t* that, NW_Uint16 id, void *value); - -TBrowserStatusCode NW_Wml_GetCurrURL(NW_Wml_t *that, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_GetCurrReqURL(NW_Wml_t *that, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_GetPrevId(NW_Wml_t *that, NW_Int16 *id); - -NW_Bool NW_WmlInput_ValidateValue(NW_Ucs2* input_value, - NW_Ucs2* format, - NW_WmlInput_EmptyOk_t emptyok, - NW_Bool partial_validation_ok, - NW_Uint32 docPublicId); - -/* Returns the document public ID */ -TBrowserStatusCode NW_Wml_GetPublicId(NW_Wml_t *that, NW_Uint32 *publicId); - -/* Note: The NW_Wml_GetImage function is obsolete on Rainbow 2.0 and is only provided for - compatability with WAVE. To load images use the image loader. */ - -/* helper function to retrieve the absolute url for the image element SRC*/ -TBrowserStatusCode NW_Wml_GetImageUrl(NW_Wml_t *that, NW_Uint16 imgel_id, NW_Ucs2 **ret_string); - -/* helper function to retrieve the absolute url for the image element with LOCALSRC */ -TBrowserStatusCode NW_Wml_GetLocalImageUrl(NW_Wml_t *that, NW_Uint16 imgel_id, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_Timeout(void *that); - -/* user agents should call this function when they gain focus */ -TBrowserStatusCode NW_Wml_GainFocus(NW_Wml_t *that); - -/* user agents should call this function when they loose focus */ -TBrowserStatusCode NW_Wml_LoseFocus(NW_Wml_t *that); - -/* interface from the script interpreter */ -TBrowserStatusCode NW_Wml_GetVar(NW_Wml_t* that, const NW_Ucs2 *var_name, NW_Ucs2 **ret_string); - -NW_Wml_Var_t *NW_Wml_NextVar(NW_Wml_t* thisObj, NW_Wml_Var_t *current); - -TBrowserStatusCode NW_Wml_SetVar(NW_Wml_t *that, const NW_Ucs2 *varName, const NW_Ucs2 *varValue); - -void NW_Wml_UnsetVar(NW_Wml_t *that, NW_Ucs2 *varName); - -void NW_Wml_LoadPrev(NW_Wml_t *that); - -void NW_Wml_NewContext(NW_Wml_t *that); - -/* does a newcontext but leaves the top history entry intact. */ -void NW_Wml_NewContextFromScript(NW_Wml_t *that); - -void NW_Wml_LoadUrl(NW_Wml_t *that, NW_Ucs2 *url, NW_Ucs2 *param, NW_Http_Header_t *header); - -TBrowserStatusCode NW_Wml_DisplayCard(NW_Wml_t* thisObj, NW_Bool cancelRequest); - -TBrowserStatusCode NW_Wml_LoadWmlResp(NW_Wml_t *thisObj, NW_Buffer_t* responseBuffer, NW_Bool contentWasPlainText, NW_Url_Resp_t* response); - -void NW_Wml_ClearTaskVariables(NW_Wml_t *that); - -TBrowserStatusCode NW_Wml_ApplyTaskVariables(NW_Wml_t *that); - -TBrowserStatusCode NW_Wml_HasOptionIntrinsicEvents(NW_Wml_t *that, NW_Wml_Element_t* option_el, NW_Bool execute); -TBrowserStatusCode NW_Wml_HasOnpick(NW_Wml_t *that, NW_Uint16 el_id ); - -NW_Mem_Segment_Id_t NW_Wml_GetCardSegment(NW_Wml_t *thisObj); -TBrowserStatusCode NW_Wml_FreeCardSegment(NW_Wml_t *that); - -TBrowserStatusCode NW_Wml_HandleIntraDocRequest (NW_Wml_t *thisObj, NW_Wml_Task_e task, - NW_Bool historicRequest, const NW_Ucs2 *url); - -TBrowserStatusCode NW_Wml_CancelAllLoads (NW_Wml_t *thisObj); - -void NW_Wml_HandleError (NW_Wml_t *thisObj, NW_Int16 errorClass, NW_Int16 error); - -TBrowserStatusCode NW_Wml_ProcessSetvarElements(NW_Wml_t *thisObj); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_CORE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_decoder.h --- a/webengine/wmlengine/src/wml/include/nw_wml_decoder.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: nw_wml_decoder.h $ - - Purpose: - - Class: DeckDecoder - - This class stores WML bytecode for a retrieved URL. The core browser will - instruct the DeckDecoder to position in a particular card, then it will ask - the DeckDecoder to deliver WML elements within this card. A reader is used - by a DeckDecoder object to read and interpret the WML bytecode. - -*/ - -#ifndef NW_WML_DECODER_H -#define NW_WML_DECODER_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct NW_DeckDecoder_s NW_DeckDecoder_t; - -typedef struct NW_DeckDecoderIter_s NW_DeckDecoderIter_t; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_DECODER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_defs.h --- a/webengine/wmlengine/src/wml/include/nw_wml_defs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML_DEFS_H -#define NW_WML_DEFS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" - -typedef NW_Uint16 NW_Wml_ElType_e; -typedef NW_Uint16 NW_Wml_Attr_t; - -/* Private WML definitions */ -typedef enum { - ED_CARD_NOT_IN_DECK, - ED_ACCESS, - ED_BAD_CONTENT, - ED_OUT_OF_MEMORY -} NW_Wml_Error_Message_e; - -/* Events */ -#define CLICK (0x01) - -/* public attribute types */ - -typedef enum { - INVALID_TASK, - GO_TASK, - PREV_TASK, - REFRESH_TASK, - RESTORE_TASK, - NOOP_TASK -} NW_Wml_Task_e; - -typedef enum { - ONENTERFORWARD, - ONENTERBACKWARD, - ONCLICK, - ONTIMER -} NW_Wml_Intrinsic_e; - -typedef enum { - SINGLE_SELECT, - MULTIPLE_SELECT -} NW_Wml_Select_Type_e; - - -#define WAE_ASC_EMPTY_STR (const char*)"" -#define WAE_ASC_TRUE_STR (const char*)"true" -#define WAE_ASC_FALSE_STR (const char*)"false" -#define WAE_ASC_0_STR (const char*)"0" -#define WAE_ASC_1_STR (const char*)"1" -#define WAE_ASC_SEMICOLON_STR (const char*)";" -#define WAE_ASC_HTTP_SLASH_SLASH_STR (const char*)"http://" -#define WAE_ASC_HTTPS_SLASH_SLASH_STR (const char*)"https://" -#define WAE_ASC_BOTTOM_STR (const char*)"bottom" -#define WAE_ASC_CENTER_STR (const char*)"center" -#define WAE_ASC_LEFT_STR (const char*)"left" -#define WAE_ASC_MIDDLE_STR (const char*)"middle" -#define WAE_ASC_HTTPS_STR (const char*)"https" -#define WAE_ASC_RESET_STR (const char*)"reset" -#define WAE_ASC_RIGHT_STR (const char*)"right" -#define WAE_ASC_TOP_STR (const char*)"top" -#define WAE_ASC_APP_CHAR_STR (const char*)"application/vnd.wap.wmlc;charset=" -#define WAE_ASC_APP_X_WWW_CHAR_STR (const char*)"application/x-www-form-urlencoded" -#define WAE_ASC_MULTIPART_STR (const char*)"multipart/form-data" -#define WAE_ASC_HTTP_STR (const char*)"http" -#define WAE_ASC_CONTENT_TYPE_STR (const char*)"Content-Type" -#define WAE_ASC_EXPIRES_STR (const char*)"Expires" -#define WAE_ASC_GET_STR (const char*)"get" -#define WAE_ASC_POST_STR (const char*)"post" -#define WAE_ASC_NOCACHE_STR (const char*)"no-cache" -#define WAE_ASC_WRAP_STR (const char*)"wrap" -#define WAE_ASC_NOWRAP_STR (const char*)"nowrap" -#define WAE_ASC_ACCEPT_STR (const char*)"accept" -#define WAE_ASC_DELETE_STR (const char*)"delete" -#define WAE_ASC_HELP_STR (const char*)"help" -#define WAE_ASC_PASSWORD_STR (const char*)"password" -#define WAE_ASC_ONPICK_STR (const char*)"onpick" -#define WAE_ASC_ONENTERBACKWARD_STR (const char*)"onenterbackward" -#define WAE_ASC_ONENTERFORWARD_STR (const char*)"onenterforward" -#define WAE_ASC_ONTIMER_STR (const char*)"ontimer" -#define WAE_ASC_OPTIONS_STR (const char*)"options" -#define WAE_ASC_PREV_STR (const char*)"prev" -#define WAE_ASC_TEXT_STR (const char*)"text" -#define WAE_ASC_VND_STR (const char*)"vnd." -#define WAE_ASC_PRESERVE_STR (const char*)"preserve" -#define WAE_ASC_DEFAULT_STR (const char*)"default" -#define WAE_ASC_NOSAVE_STR (const char*)"no_save" -#define WAE_ASC_NOKIA_STR (const char*)"nokia" -#define WAE_ASC_UNKNOWN_STR (const char*)"unknown" - -#define WAE_ASC_STRLEN(str) (NW_Asc_strlen((str))) - -#define MALLOC_FAILED { NW_Mem_Segment_Free(MEM_FUNK); return status; } - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_DEFS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_elements.h --- a/webengine/wmlengine/src/wml/include/nw_wml_elements.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* - $Workfile: nw_wml_elements.h $ - - Purpose: - - Declares the main WML structures: types deck_t and card_t. Also declares - functions for parsing global WML NW_Byte masks. -*/ - -#ifndef NW_WML_ELEMENTS_H -#define NW_WML_ELEMENTS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" - -typedef struct NW_Wml_Element_s NW_Wml_Element_t; - -#define INVALID_POS (-1) -#define INVALID_ID (-1) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_ELEMENTS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_list.h --- a/webengine/wmlengine/src/wml/include/nw_wml_list.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: nw_wml_list.h $ - - Purpose: - - Declaration of template functions for creating, appending, accessing and - deleting generic singley linked lists. -*/ - -#ifndef NW_WML_LIST_H -#define NW_WML_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" -#include "nwx_status.h" -#include "nwx_memseg.h" - -/* A single linked list with a dummy element first */ - -typedef struct _NW_Wml_Node_t NW_Wml_Node_t; -struct _NW_Wml_Node_t { - NW_Wml_Node_t *next; - void *data; -}; - -typedef struct { - NW_Wml_Node_t *first; - NW_Wml_Node_t *last; - NW_Wml_Node_t *cursor; - NW_Mem_Segment_Id_t memSegment; -} NW_Wml_List_t; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_LIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_url_utils.h --- a/webengine/wmlengine/src/wml/include/nw_wml_url_utils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: nw_wml_url_utils.h $ - - Purpose: - - Class: WmlBrowser - - Browser's url utility functions (interface file) - -*/ - -#ifndef NW_WML_URL_UTILS_H -#define NW_WML_URL_UTILS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "nw_wml_core.h" -#include "nwx_status.h" - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_URL_UTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wml_var.h --- a/webengine/wmlengine/src/wml/include/nw_wml_var.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: nw_wml_var.h $ - - Purpose: - - Function and structure declaration for WML variables and WML variable - lists. The core browser manages user defined variables while processing WML - documents. -*/ - -#ifndef NW_WML_VARS_H -#define NW_WML_VARS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nwx_defs.h" -#include "nwx_memseg.h" -#include "nwx_status.h" - -typedef struct _NW_Wml_Var_t NW_Wml_Var_t; -struct _NW_Wml_Var_t { - NW_Wml_Var_t *next; - NW_Ucs2 *name; - NW_Ucs2 *val; -}; - -typedef NW_Wml_Var_t NW_Wml_VarList_t; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_VARS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/nw_wtai_api.h --- a/webengine/wmlengine/src/wml/include/nw_wtai_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: wml_wtai_api.h -** Part of: WAE -** Description: Provides an interface to WTA functionality. -******************************************************************/ - -#ifndef NWX_WTAI_API_H -#define NWX_WTAI_API_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_defs.h" -#include "nwx_string.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* URI Invocation constants */ -#define NW_WTAI_PUBLICLIB_URI_STR (const char*)"wp" -#define NW_WTAI_MAKECALL_URI_STR (const char*)"mc" -#define NW_WTAI_SENDDTMF_URI_STR (const char*)"sd" -#define NW_WTAI_ADDPBENTRY_URI_STR (const char*)"ap" - -#define NW_WTAI_INVOCATION_ERROR -200 - -/* LocationInfo headers */ -#define NW_HTTP_LOCINFO_METHOD (const char*)"X-NOKIA-WAP-LOC-LOCATIONINFO-METHOD" -#define NW_HTTP_LOCINFO_LAT (const char*)"X-NOKIA-WAP-LOC-LAT" -#define NW_HTTP_LOCINFO_LONG (const char*)"X-NOKIA-WAP-LOC-LONG" -#define NW_HTTP_LOCINFO_GSM_INFORMATION (const char*)"X-NOKIA-WAP-LOC-GSM-INFORMATION" -#define NW_HTTP_LOCINFO_LL_FORMAT (const char*)"X-NOKIA-WAP-LOC-LL-FORMAT" -#define NW_HTTP_LOCINFO_PN_FORMAT (const char*)"X-NOKIA-WAP-LOC-PN_FORMAT" -#define NW_HTTP_LOCINFO_ACTUAL_LL (const char*)"X-NOKIA-WAP-LOC-ACTUAL-LL" -#define NW_HTTP_LOCINFO_ACCURACY (const char*)"X-NOKIA-WAP-LOC-ACCURACY" -#define NW_HTTP_LOCINFO_ERROR (const char*)"X-NOKIA-WAP-LOC-ERROR" - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* interface to WTAI */ -typedef struct _NW_WtaiApi_s NW_WtaiApi_t; - -struct _NW_WtaiApi_s -{ - /* public library */ - TBrowserStatusCode (*wp_makeCall) (void *ctx, /* context */ - const NW_Ucs2 *number); /* arguments */ - TBrowserStatusCode (*wp_sendDTMF) (void *ctx, - const NW_Ucs2 *dtmf); - TBrowserStatusCode (*wp_addPBEntry) (void *ctx, - const NW_Ucs2 *number, const NW_Ucs2 *name, - const NW_Ucs2 *email); - - TBrowserStatusCode (*nokia_locationInfo) - (void *ctx, - NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format, - NW_Http_Header_t *header); -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NWX_WTAI_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_api.h --- a/webengine/wmlengine/src/wml/include/wml_api.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WML_API_H -#define WML_API_H - -#include "nw_wml_api.h" -#include "wml_decoder.h" -//R -//#include "urlloader_urlloaderint.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* interface to the loaders */ -TBrowserStatusCode NW_Wml_HttpLoad(void *wml1xCH, - const NW_Ucs2 *url, - NW_Bool is_method_post, - const NW_Ucs2 *referer, - const NW_Ucs2 *accept_charset, - NW_Http_Header_t *header, - NW_NVPair_t *postfields, - const NW_Ucs2 *enctype, - const NW_Cache_Mode_t cacheMode); - -TBrowserStatusCode NW_Wml_UrlLoad(void *wml1xCH, - const NW_Ucs2 *url, - NW_NVPair_t *postfields, - const NW_Cache_Mode_t cacheMode, - NW_Ucs2* referrerUrl); - -/* Request previous card load as the result of executing a PREV task */ -TBrowserStatusCode NW_Wml_DoPrevLoad(void *wml1xCH); - -/* interface to control navigation events. - Note: WML Interpreter invokes this function when ever it is navigating to - a new URL. If this function returns a result "KBrsrSuccess", navigation - is performed, for all other values the navigation is canceled. -*/ -TBrowserStatusCode NW_Wml_CanNavigateToUri(void); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* WML_API_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_core.h --- a/webengine/wmlengine/src/wml/include/wml_core.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_core.h $ - - Purpose: - - Class: WmlBrowser - - Refere to nw_wml_core.h for the main browser engine class declaration. - The core browser also interfaces with the WML script engine. -*/ - -#ifndef WML_CORE_H -#define WML_CORE_H - -#include "nw_wml_core.h" -#include "wml_var.h" -#include "wml_decoder.h" -#include "wml_elements.h" -#include "wml_list.h" -#include "wml_api.h" - - -#endif /* WML_CORE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_deck.h --- a/webengine/wmlengine/src/wml/include/wml_deck.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WML_DECK_H -#define WML_DECK_H - -#include "nwx_http_header.h" -#include "nw_wml_var.h" -#include "nw_nvpair.h" - -#include "nw_wml_defs.h" -#include "nwx_buffer.h" - -#include "nw_hed_domtree.h" -#include "nw_hed_domhelper.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -typedef struct NW_Wml_Deck_s NW_Wml_Deck_t; - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -NW_Wml_Deck_t* NW_Wml_Deck_New (NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Bool contentWasPlainText); - -void NW_Wml_Deck_Delete (NW_Wml_Deck_t* thisObj); - -NW_HED_DomTree_t* NW_Wml_Deck_GetDomTree (const NW_Wml_Deck_t* thisObj); - -NW_HED_DomHelper_t* NW_Wml_Deck_GetDomHelper (NW_Wml_Deck_t* thisObj, - const NW_Wml_VarList_t* varList); - -NW_DOM_Node_t* NW_Wml_Deck_GetCurrentCard (const NW_Wml_Deck_t* thisObj); - -NW_DOM_Node_t* NW_Wml_Deck_GetCardByName (NW_Wml_Deck_t* thisObj, - const NW_String_t* cardName); - -TBrowserStatusCode NW_Wml_Deck_SetCurrentCardByName (NW_Wml_Deck_t* thisObj, - const NW_String_t* cardName); - -void NW_Wml_Deck_SetCurrentCardByElement (NW_Wml_Deck_t* thisObj, - const NW_DOM_Node_t* element); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* WML_DECK_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_deck_iter.h --- a/webengine/wmlengine/src/wml/include/wml_deck_iter.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WML_DECK_ITER_H -#define WML_DECK_ITER_H - -#include "wml_deck.h" - -#include "nw_hed_domhelper.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - public data types - * ------------------------------------------------------------------------- */ - -typedef struct NW_Wml_DeckIter_s { - NW_DOM_Node_t* rootElement; - NW_DOM_Node_t* currentElement; - NW_Bool justOwnChildren; -} NW_Wml_DeckIter_t; - - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode NW_Wml_DeckIter_Initialize (NW_Wml_DeckIter_t* thisObj, - NW_DOM_Node_t* rootElement, - NW_Bool justOwnChildren); - - -NW_DOM_Node_t* NW_Wml_DeckIter_GetNextElement (NW_Wml_DeckIter_t* thisObj); - -#endif /* WML_DECK_ITER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_decoder.h --- a/webengine/wmlengine/src/wml/include/wml_decoder.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WML_DECODER_H -#define WML_DECODER_H - -#include "nwx_http_header.h" -#include "nw_wml_var.h" -#include "nwx_buffer.h" -#include "wml_elements.h" -#include "wml_decoder_iter.h" -#include "nw_wml_defs.h" -#include "nw_nvpair.h" -#include "nw_wml_decoder.h" -#include "nw_wae_reader.h" -#include "nw_wml_core.h" -#include "nw_hed_context.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -/* TODO make this private by moving it to wml_decoder.c */ -struct NW_DeckDecoder_s { - NW_Wml_Element_t card_el; - NW_Wml_Deck_t* domDeck; -}; - - -/* deck related */ -NW_DeckDecoder_t* NW_DeckDecoder_New (void); - -void NW_DeckDecoder_Delete (NW_DeckDecoder_t* thisObj); - -TBrowserStatusCode NW_DeckDecoder_InitializeAndValidate (NW_DeckDecoder_t* thisObj, - NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Bool contentWasPlainText); - -TBrowserStatusCode NW_DeckDecoder_GetRootElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* root); - -NW_Bool NW_DeckDecoder_GetCardElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* elem); - -TBrowserStatusCode NW_DeckDecoder_GetTemplateElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* elem); - -TBrowserStatusCode NW_DeckDecoder_GetHeadElement (const NW_DeckDecoder_t *thisObj, - NW_Wml_Element_t *elem); - -TBrowserStatusCode NW_DeckDecoder_SetCardByName (NW_DeckDecoder_t *thisObj, - const NW_Ucs2* cardName); - -TBrowserStatusCode NW_DeckDecoder_SetCardByElement (NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* newElement); - -TBrowserStatusCode NW_DeckDecoder_GetCardName (const NW_DeckDecoder_t *thisObj, - NW_Ucs2 **cardName); - -TBrowserStatusCode NW_DeckDecoder_GetCardTitle (const NW_DeckDecoder_t* thisObj, - const NW_Wml_VarList_t* varList, - NW_Ucs2** title); - -TBrowserStatusCode NW_DeckDecoder_GetDocumentPublicId (const NW_DeckDecoder_t* thisObj, - NW_Uint32* publicId); - -NW_Uint8 NW_DeckDecoder_GetVersion (const NW_DeckDecoder_t* thisObj); - -NW_Uint16 NW_DeckDecoder_GetEncoding (const NW_DeckDecoder_t* thisObj); - - -/* element related */ -TBrowserStatusCode NW_DeckDecoder_ReadString (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - const NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope, - NW_Ucs2** retString); - -NW_Bool NW_DeckDecoder_FirstContainedElement (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* container, - NW_Wml_Element_t* elem); - -TBrowserStatusCode NW_DeckDecoder_GetType (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_ElType_e* type); - -TBrowserStatusCode NW_DeckDecoder_SearchDoElements(NW_DeckDecoder_t* thisObj, - NW_Wml_VarList_t* varList, - NW_Wml_Element_t* container, - NW_Wml_Attr_t attribute, - NW_Ucs2* searchString); - -TBrowserStatusCode NW_DeckDecoder_GetPostfieldData (const NW_DeckDecoder_t* thisObj, - const NW_Wml_VarList_t* varList, - const NW_Wml_Element_t* elem, - NW_NVPair_t** postfieldsArg); - -TBrowserStatusCode NW_DeckDecoder_GetAttribute (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_Attr_t attribute, - const NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope, - NW_Ucs2** attributeValue); - -NW_Bool NW_DeckDecoder_HasAttributeWithValue (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_Attr_t attribute, - const char* attributeValue, - const NW_Wml_VarList_t* varList); - -NW_Bool NW_DeckDecoder_HasContent (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem); - -TBrowserStatusCode NW_DeckDecoder_CopyElement (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* srcEl, - NW_Wml_Element_t* destEl); - -NW_HED_Context_t* -NW_DeckDecoder_VarListToContext (const NW_Wml_VarList_t* varList); - -TBrowserStatusCode -NW_DeckDecoder_ContextToVarList (const NW_HED_Context_t* context, - NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope); - -/* deck-iterator related */ -TBrowserStatusCode NW_DeckDecoderIter_Initialize (NW_DeckDecoderIter_t *thisObj, - const NW_DeckDecoder_t* decoder, - const NW_Wml_Element_t* container); - -TBrowserStatusCode NW_DeckDecoderIter_InitializeAll_Children (NW_DeckDecoderIter_t *thisObj, - const NW_DeckDecoder_t* decoder, - const NW_Wml_Element_t* container); -NW_Bool NW_DeckDecoderIter_GetNextElement (NW_DeckDecoderIter_t* thisObj, - NW_Wml_Element_t* elem); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* WML_DECODER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_decoder_iter.h --- a/webengine/wmlengine/src/wml/include/wml_decoder_iter.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML_DECODER_ITER_H -#define NW_WML_DECODER_ITER_H - -#include "nw_wml_decoder.h" -#include "nw_wml_elements.h" - -#include "wml_deck_iter.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* typedef struct NW_DeckDecoderIter_s NW_DeckDecoderIter_t; */ - -struct NW_DeckDecoderIter_s { - NW_DeckDecoder_t* decoder; - NW_Wml_Element_t currentElement; - - NW_Wml_DeckIter_t deckIter; -}; - - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* NW_WML_DECODER_ITER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_elements.h --- a/webengine/wmlengine/src/wml/include/wml_elements.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/* - $Workfile: wml_elements.h $ - - Purpose: - - Declares the main WML structures: types deck_t and card_t. Also declares - functions for parsing global WML NW_Byte masks. -*/ - -#ifndef WML_ELEMENTS_H -#define WML_ELEMENTS_H - -#include "nw_wml_decoder.h" -#include "nw_wml_elements.h" -#include "nw_wml_defs.h" - -#include "nw_hed_domhelper.h" - -/* typedef struct NW_Wml_Element_s NW_Wml_Element_t; */ - -struct NW_Wml_Element_s { - NW_Int16 id; - NW_DOM_Node_t* domElement; -}; - - - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_elm_attr.h --- a/webengine/wmlengine/src/wml/include/wml_elm_attr.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WML_ELM_ATTR_H -#define WML_ELM_ATTR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nw_wml1x_wml_1_3_tokens.h" - -/* public element types */ -#define STRING_ELEMENT 1 -#define END_ELEMENT 2 - -#define UNKNOWN_ELEMENT NW_Wml_1_3_ElementToken_zzzunknown -#define DO_ELEMENT NW_Wml_1_3_ElementToken_do -#define INPUT_ELEMENT NW_Wml_1_3_ElementToken_input -#define SELECT_ELEMENT NW_Wml_1_3_ElementToken_select -#define CARD_ELEMENT NW_Wml_1_3_ElementToken_card -#define GO_ELEMENT NW_Wml_1_3_ElementToken_go -#define PREV_ELEMENT NW_Wml_1_3_ElementToken_prev -#define REFRESH_ELEMENT NW_Wml_1_3_ElementToken_refresh -#define NOOP_ELEMENT NW_Wml_1_3_ElementToken_noop -#define SETVAR_ELEMENT NW_Wml_1_3_ElementToken_setvar -#define ONEVENT_ELEMENT NW_Wml_1_3_ElementToken_onevent -#define WML_ELEMENT NW_Wml_1_3_ElementToken_wml -#define HEAD_ELEMENT NW_Wml_1_3_ElementToken_head -#define TEMPLATE_ELEMENT NW_Wml_1_3_ElementToken_template -#define OPTION_ELEMENT NW_Wml_1_3_ElementToken_option -#define OPTGRP_ELEMENT NW_Wml_1_3_ElementToken_optgroup -#define A_ELEMENT NW_Wml_1_3_ElementToken_a -#define ANCHOR_ELEMENT NW_Wml_1_3_ElementToken_anchor -#define FIELDSET_ELEMENT NW_Wml_1_3_ElementToken_fieldset -#define IMAGE_ELEMENT NW_Wml_1_3_ElementToken_img -#define TIMER_ELEMENT NW_Wml_1_3_ElementToken_timer -#define ACCESS_ELEMENT NW_Wml_1_3_ElementToken_access -#define META_ELEMENT NW_Wml_1_3_ElementToken_meta -#define EMPHASIS_ELEMENT NW_Wml_1_3_ElementToken_em -#define STRONG_ELEMENT NW_Wml_1_3_ElementToken_strong -#define ITALIC_ELEMENT NW_Wml_1_3_ElementToken_i -#define BOLD_ELEMENT NW_Wml_1_3_ElementToken_b -#define UNDERLINE_ELEMENT NW_Wml_1_3_ElementToken_u -#define BIG_ELEMENT NW_Wml_1_3_ElementToken_big -#define SMALL_ELEMENT NW_Wml_1_3_ElementToken_small -#define BREAK_ELEMENT NW_Wml_1_3_ElementToken_br -#define P_ELEMENT NW_Wml_1_3_ElementToken_p -#define TABLE_ELEMENT NW_Wml_1_3_ElementToken_table -#define TR_ELEMENT NW_Wml_1_3_ElementToken_tr -#define TD_ELEMENT NW_Wml_1_3_ElementToken_td -#define POSTFIELD_ELEMENT NW_Wml_1_3_ElementToken_postfield -#define PRE_ELEMENT NW_Wml_1_3_ElementToken_pre - -/* public attribute types */ - -#define UNKNOWN_ATTR 0 -#define STR_VALUE 1 - -#define ACCEPT_CHARSET_ATTR NW_Wml_1_3_AttributeToken_accept_charset -#define ALIGN_ATTR NW_Wml_1_3_AttributeToken_align -#define ALT_ATTR NW_Wml_1_3_AttributeToken_alt -#define CACHECONTROL_ATTR NW_Wml_1_3_AttributeToken_cache_control -#define CLASS_ATTR NW_Wml_1_3_AttributeToken_class -#define COLUMNS_ATTR NW_Wml_1_3_AttributeToken_columns -#define CONTENT_ATTR NW_Wml_1_3_AttributeToken_content -#define DOMAIN_ATTR NW_Wml_1_3_AttributeToken_domain -#define EMPTYOK_ATTR NW_Wml_1_3_AttributeToken_emptyok -#define ENCTYPE_ATTR NW_Wml_1_3_AttributeToken_enctype -#define FORMAT_ATTR NW_Wml_1_3_AttributeToken_format -#define FORUA_ATTR NW_Wml_1_3_AttributeToken_forua -#define HEIGHT_ATTR NW_Wml_1_3_AttributeToken_height -#define HREF_ATTR NW_Wml_1_3_AttributeToken_href -#define HSPACE_ATTR NW_Wml_1_3_AttributeToken_hspace -#define HTTP_EQUIV_ATTR NW_Wml_1_3_AttributeToken_http_equiv -#define ID_ATTR NW_Wml_1_3_AttributeToken_id -#define IVALUE_ATTR NW_Wml_1_3_AttributeToken_ivalue -#define INAME_ATTR NW_Wml_1_3_AttributeToken_iname -#define LABEL_ATTR NW_Wml_1_3_AttributeToken_label -#define LOCALSRC_ATTR NW_Wml_1_3_AttributeToken_localsrc -#define MAXLENGTH_ATTR NW_Wml_1_3_AttributeToken_maxlength -#define METHOD_ATTR NW_Wml_1_3_AttributeToken_method -#define MODE_ATTR NW_Wml_1_3_AttributeToken_mode -#define MULTIPLE_ATTR NW_Wml_1_3_AttributeToken_multiple -#define NAME_ATTR NW_Wml_1_3_AttributeToken_name -#define NEWCONTEXT_ATTR NW_Wml_1_3_AttributeToken_newcontext -#define ONENTERBACKWARD_ATTR NW_Wml_1_3_AttributeToken_onenterbackward -#define ONENTERFORWARD_ATTR NW_Wml_1_3_AttributeToken_onenterforward -#define ONPICK_ATTR NW_Wml_1_3_AttributeToken_onpick -#define ONTIMER_ATTR NW_Wml_1_3_AttributeToken_ontimer -#define OPTIONAL_ATTR NW_Wml_1_3_AttributeToken_optional -#define ORDERED_ATTR NW_Wml_1_3_AttributeToken_ordered -#define PATH_ATTR NW_Wml_1_3_AttributeToken_path -#define SCHEME_ATTR NW_Wml_1_3_AttributeToken_scheme -#define SENDREFERER_ATTR NW_Wml_1_3_AttributeToken_sendreferer -#define SIZE_ATTR NW_Wml_1_3_AttributeToken_size -#define SRC_ATTR NW_Wml_1_3_AttributeToken_src -#define TABINDEX_ATTR NW_Wml_1_3_AttributeToken_tabindex -#define TITLE_ATTR NW_Wml_1_3_AttributeToken_title -#define TYPE_ATTR NW_Wml_1_3_AttributeToken_type -#define VALUE_ATTR NW_Wml_1_3_AttributeToken_value -#define VSPACE_ATTR NW_Wml_1_3_AttributeToken_vspace -#define WIDTH_ATTR NW_Wml_1_3_AttributeToken_width -#define XML_LANG_ATTR NW_Wml_1_3_AttributeToken_xml_lang -#define XML_SPACE_ATTR NW_Wml_1_3_AttributeToken_xml_space -#define ACCESSKEY_ATTR NW_Wml_1_3_AttributeToken_accesskey - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* WML_ELM_ATTR_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_history.h --- a/webengine/wmlengine/src/wml/include/wml_history.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_history.h $ - - Purpose: - - Class: WmlBrowser - - Maintain browser's history state (interface file) - -*/ - -#ifndef WML_HISTORY_H -#define WML_HISTORY_H - - -#include "wml_core.h" - -#include "nwx_mem.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Delete a history entry object */ -void NW_Wml_HistoryDeleteEntry(NW_Wml_History_t *entry); - -/* Init the history stack */ -void NW_Wml_HistoryInit(NW_Wml_t *wml); - -/* Clear the history stack, but keep last-load and resp Url */ -void NW_Wml_HistoryClear(NW_Wml_t *wml); - -TBrowserStatusCode NW_Wml_HistoryPushIntraDeckLoad(NW_Wml_t *wml, - NW_Ucs2 *url, - NW_Ucs2 *respUrl); - -/* Pop a history entry from the stack */ -TBrowserStatusCode NW_Wml_HistoryToPrev(NW_Wml_t *wml, NW_Wml_History_t **entry); - -/* Store the current response Url */ -TBrowserStatusCode NW_Wml_HistorySetResponseUrl(NW_Wml_t* wml, - NW_Ucs2 *resp_url); - -/* Return the current request Url */ -TBrowserStatusCode NW_Wml_HistoryGetRequestUrl(NW_Wml_t* wml, - NW_Ucs2 **req_url); - -/* Return the current response Url */ -TBrowserStatusCode NW_Wml_HistoryGetResponseUrl(NW_Wml_t* wml, - NW_Ucs2 **resp_url); -/* Return the previous response Url */ -TBrowserStatusCode NW_Wml_HistoryGetPrevResponseUrl(NW_Wml_t* wml, - NW_Ucs2 **resp_url); - -/* Return the previous history entry */ -TBrowserStatusCode NW_Wml_HistoryPrevCard(NW_Wml_t* wml, - NW_Wml_History_t **entry); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* WML_HISTORY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_list.h --- a/webengine/wmlengine/src/wml/include/wml_list.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_list.h $ - - Purpose: - - Declaration of template functions for creating, appending, accessing and - deleting generic singley linked lists. -*/ - -#ifndef WML_LIST_H -#define WML_LIST_H - -#include "nw_wml_list.h" -#include "BrsrStatusCodes.h" - -/* Global function declarations */ - -NW_Wml_List_t *NW_WmlList_NewEmptyList(NW_Mem_Segment_Id_t memSegment); - -TBrowserStatusCode NW_WmlList_Append(NW_Wml_List_t *l, void *el); - -void *NW_WmlList_First(NW_Wml_List_t *l); - -void *NW_WmlList_Next(NW_Wml_List_t *l); - -NW_Bool NW_WmlList_IsLast(NW_Wml_List_t *l); - -NW_Int32 NW_WmlList_Length(NW_Wml_List_t *l); - -#if(0) -/* The following functions are not being used as of 7/31/2001. */ -NW_Wml_List_t *NW_WmlList_New(void *el); -/* destroy the list not the content */ -void NW_WmlList_Destroy(NW_Wml_List_t *l); - -void *NW_WmlList_ToArray(NW_Wml_List_t *l, NW_Int32 el_size); -#endif - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_ops.h --- a/webengine/wmlengine/src/wml/include/wml_ops.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_ops.h $ - - Purpose: - - Maps the WML bytecodes from the WML Specification to a unique namespace. - This also makes the browser code more readable. -*/ - -#ifndef WML_OPS_H -#define WML_OPS_H - -/* #defines for Global tokens. */ - - -#define GT_SWITCH_PAGE 0x0 -#define GT_END 0x1 -#define GT_ENTITY 0x2 -#define GT_STR_I 0x3 -#define GT_LITERAL 0x4 -#define GT_PI 0x43 -#define GT_LITERAL_C 0x44 -#define GT_STR_T 0x83 -#define GT_LITERAL_A 0x84 -#define GT_EXT_0 0xC0 -#define GT_EXT_1 0xC1 -#define GT_EXT_2 0xC2 -#define GT_OPAQUE 0xC3 -#define GT_LITERAL_AC 0xC4 - -/* #defines for overridden Global tokens. */ - -#define GT_VAR_ESC_I 0x40 -#define GT_VAR_UNESC_I 0x41 -#define GT_VAR_DIRECT_I 0x42 -#define GT_VAR_ESC_T 0x80 -#define GT_VAR_UNESC_T 0x81 -#define GT_VAR_DIRECT_T 0x82 - -/* #defines for Tag tokens. */ - -#define TAG_A 0x1C -#define TAG_ANCHOR 0x22 -#define TAG_ACCESS 0x23 -#define TAG_B 0x24 -#define TAG_BIG 0x25 -#define TAG_BR 0x26 -#define TAG_CARD 0x27 -#define TAG_DO 0x28 -#define TAG_EM 0x29 -#define TAG_FIELDSET 0x2A -#define TAG_GO 0x2B -#define TAG_HEAD 0x2C -#define TAG_I 0x2D -#define TAG_IMG 0x2E -#define TAG_INPUT 0x2F -#define TAG_META 0x30 -#define TAG_NOOP 0x31 -#define TAG_P 0x20 -#define TAG_POSTFIELD 0x21 -#define TAG_PRE 0x1B -#define TAG_PREV 0x32 -#define TAG_ONEVENT 0x33 -#define TAG_OPTGROUP 0x34 -#define TAG_OPTION 0x35 -#define TAG_REFRESH 0x36 -#define TAG_SELECT 0x37 -#define TAG_SMALL 0x38 -#define TAG_STRONG 0x39 -#define TAG_TABLE 0x1F -#define TAG_TD 0x1D -#define TAG_TEMPLATE 0x3B -#define TAG_TIMER 0x3C -#define TAG_TR 0x1E -#define TAG_U 0x3D -#define TAG_SETVAR 0x3E -#define TAG_WML 0x3F - -/* #defines for AttrName tokens. */ - -#define AS_ACCEPT_CHARSET 0x5 -#define AS_ACCESSKEY 0x5E /* 3/30/00, JCashook */ -#define AS_ALIGN 0x52 -#define AS_ALIGN_BOTTOM 0x6 -#define AS_ALIGN_CENTER 0x7 -#define AS_ALIGN_LEFT 0x8 -#define AS_ALIGN_MIDDLE 0x9 -#define AS_ALIGN_RIGHT 0xA -#define AS_ALIGN_TOP 0xB -#define AS_ALT 0xC -#define AS_CLASS 0x54 -#define AS_COLUMNS 0x53 -#define AS_CONTENT 0xD -#define AS_CONTENT_MIME_CHARSET 0x5C -#define AS_DOMAIN 0xF -#define AS_EMPTYOK_FALSE 0x10 -#define AS_EMPTYOK_TRUE 0x11 -#define AS_ENCTYPE 0x5F -#define AS_ENCTYPE_APPLICATION 0x60 -#define AS_ENCTYPE_MULTIPART 0x61 -#define AS_FORMAT 0x12 -#define AS_FORUA_FALSE 0x56 -#define AS_FORUA_TRUE 0x57 -#define AS_HEIGHT 0x13 -#define AS_HREF 0x4A -#define AS_HREF_HTTP 0x4B -#define AS_HREF_HTTPS 0x4C -#define AS_HSPACE 0x14 -#define AS_HTTP_EQUIV 0x5A -#define AS_HTTP_EQUIV_CONT_TYPE 0x5B -#define AS_HTTP_EQUIV_EXPIRES 0x5D -#define AS_ID 0x55 -#define AS_IVALUE 0x15 -#define AS_INAME 0x16 -#define AS_LABEL 0x18 -#define AS_LOCALSRC 0x19 -#define AS_MAXLENGTH 0x1A -#define AS_METHOD_GET 0x1B -#define AS_METHOD_POST 0x1C -#define AS_MODE_NOWRAP 0x1D -#define AS_MODE_WRAP 0x1E -#define AS_MULTIPLE_FALSE 0x1F -#define AS_MULTIPLE_TRUE 0x20 -#define AS_NAME 0x21 -#define AS_NEWCONTEXT_FALSE 0x22 -#define AS_NEWCONTEXT_TRUE 0x23 -#define AS_ONENTERBACKWARD 0x25 -#define AS_ONENTERFORWARD 0x26 -#define AS_ONPICK 0x24 -#define AS_ONTIMER 0x27 -#define AS_OPTIONAL_FALSE 0x28 -#define AS_OPTIONAL_TRUE 0x29 -#define AS_PATH 0x2A -#define AS_SCHEME 0x2E -#define AS_SENDREFERER_FALSE 0x2F -#define AS_SENDREFERER_TRUE 0x30 -#define AS_SIZE 0x31 -#define AS_SRC 0x32 -#define AS_SRC_HTTP 0x58 -#define AS_SRC_HTTPS 0x59 -#define AS_ORDERED_TRUE 0x33 -#define AS_ORDERED_FALSE 0x34 -#define AS_TABINDEX 0x35 -#define AS_TITLE 0x36 -#define AS_TYPE 0x37 -#define AS_TYPE_ACCEPT 0x38 -#define AS_TYPE_DELETE 0x39 -#define AS_TYPE_HELP 0x3A -#define AS_TYPE_PASSWORD 0x3B -#define AS_TYPE_ONPICK 0x3C -#define AS_TYPE_ONENTERBACKWARD 0x3D -#define AS_TYPE_ONENTERFORWARD 0x3E -#define AS_TYPE_ONTIMER 0x3F -#define AS_TYPE_OPTIONS 0x45 -#define AS_TYPE_PREV 0x46 -#define AS_TYPE_RESET 0x47 -#define AS_TYPE_TEXT 0x48 -#define AS_TYPE_VND 0x49 -#define AS_VALUE 0x4D -#define AS_VSPACE 0x4E -#define AS_WIDTH 0x4F -#define AS_XML_LANG 0x50 -#define AS_XML_SPACE_PRESERVE 0x62 -#define AS_XML_SPACE_DEFAULT 0x63 -#define AS_CACHE_NOCACHE 0x64 - -/* #defines for AttrValue tokens. */ -/* Following AV definitions are not being - used, so it has been commented out. - Note: its not deleted, for feature use. -#define AV_COM 0x85 -#define AV_EDU 0x86 -#define AV_NET 0x87 -#define AV_ORG 0x88 -#define AV_ACCEPT 0x89 -#define AV_BOTTOM 0x8A -#define AV_CLEAR 0x8B -#define AV_DELETE 0x8C -#define AV_HELP 0x8D -#define AV_HTTP 0x8E -#define AV_HTTP_WWW 0x8F -#define AV_HTTPS 0x90 -#define AV_HTTPS_WWW 0x91 -#define AV_LIST 0x92 -#define AV_MIDDLE 0x93 -#define AV_NOWRAP 0x94 -#define AV_ONENTERBACKWARD 0x96 -#define AV_ONENTERFORWARD 0x97 -#define AV_ONPICK 0x95 -#define AV_ONTIMER 0x98 -#define AV_OPTIONS 0x99 -#define AV_PASSWORD 0x9A -#define AV_RESET 0x9B -#define AV_TEXT 0x9D -#define AV_TOP 0x9E -#define AV_UNKNOWN 0x9F -#define AV_WRAP 0xA0 -#define AV_WWW 0xA1 -*/ - -#endif /* WML_OPS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_scrproxy.h --- a/webengine/wmlengine/src/wml/include/wml_scrproxy.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,351 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: wml_scrproxy.h -** Subsystem Name: WAE User Agent -** Purpose: This module is responsible for coordinating the WML Script Engine -** with the WML Interpreter and the User Interface. -**************************************************************************/ -#ifndef WML_SCRPROXY_H -#define WML_SCRPROXY_H - -/* -** Includes -*/ -#include "nw_scrproxy.h" -#include "nwx_generic_dlg.h" -#include "nw_wtai_api.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* -** Type Declarations -*/ -/* interface to the script interpreter */ -typedef struct { - /* request to run a script. transfer ownership of the url, referer, and content - to the script server */ - TBrowserStatusCode (*run) (NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset); - - /* request to abort the running script */ - TBrowserStatusCode (*abort) (void); -} NW_ScriptSrvApi_t; - - -/* -** Global Function Declarations -*/ -/*************** interface from the WAE Browser ***************/ - -/* dispose the script proxy */ -/* this function is not being used any where. -TBrowserStatusCode NW_ScrProxy_Dispose(NW_ScrProxy_t *scrProxy); -*/ - -/* script interpreter is not responding */ -TBrowserStatusCode NW_ScrProxy_ScrNotRespondingError(NW_ScrProxy_t *scrProxy); - -/* check if any script is still running */ -TBrowserStatusCode NW_ScrProxy_IsScriptRunning(NW_ScrProxy_t *scrProxy, - NW_Bool *result); - -/* acknowledgement for a script start */ -TBrowserStatusCode NW_ScrProxy_RunScriptAck(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status); - -/* script has completed */ -TBrowserStatusCode NW_ScrProxy_Finish(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status, - const NW_Ucs2 *message); - -/* acknowledgement for a script abort */ -TBrowserStatusCode NW_ScrProxy_AbortAck(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status); - -/* alert the user with a dialog */ -TBrowserStatusCode NW_ScrProxy_DlgAlert(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - void *callbackCtx, - NW_ScrProxy_DlgAlertCB_t *callback); - -TBrowserStatusCode NW_ScrProxy_NotifyError(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status); - -/* confirm with the user with a dialog */ -TBrowserStatusCode NW_ScrProxy_DlgConfirm(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callbackCtx, - NW_Dlg_ConfirmCB_t *callback); - -/* prompt the user with a dialog */ -TBrowserStatusCode NW_ScrProxy_DlgPrompt(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - void *callbackCtx, - NW_ScrProxy_DlgPromptCB_t *callback); - -/* prompt the user with a generic dialog */ -TBrowserStatusCode NW_ScrProxy_GenericDlgListSelect(NW_ScrProxy_t *scrProxy, NW_Dlg_ListSelect_t *data, - void* callbackCtx, NW_Dlg_ListSelectCB_t* callback); - - -/* prompt the user with a generic dialog */ -TBrowserStatusCode NW_ScrProxy_GenericDlgPrompt(NW_ScrProxy_t *scrProxy, NW_Dlg_Prompt_t *data, - void* callbackCtx, NW_Dlg_PromptCB_t* callback); - -/* prompt the user with a generic dialog */ -TBrowserStatusCode NW_ScrProxy_GenericDlgInputPrompt(NW_ScrProxy_t *scrProxy, NW_Dlg_InputPrompt_t *data, - void* callbackCtx, NW_Dlg_InputPromptCB_t* callback); - - -/* acknowledgement for a script exit */ -TBrowserStatusCode NW_ScrProxy_GetVar(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *var, - NW_Ucs2 **ret_string); - -/* set a variable */ -TBrowserStatusCode NW_ScrProxy_SetVar(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *var, - const NW_Ucs2 *value); - -/* execute a wml prev task on the wml interpreter */ -TBrowserStatusCode NW_ScrProxy_LoadPrev(NW_ScrProxy_t *scrProxy); - -/* execute a newcontext on the wml interpreter */ -TBrowserStatusCode NW_ScrProxy_NewContext(NW_ScrProxy_t *scrProxy); - -/* refresh the wml interpreter */ -TBrowserStatusCode NW_ScrProxy_Refresh(NW_ScrProxy_t *scrProxy); - -/* execute a load url on the wml interpreter */ -TBrowserStatusCode NW_ScrProxy_LoadUrl(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *url, - const NW_Ucs2 *param); - -/* Query Browser app for Suspend/Resume of Script */ -TBrowserStatusCode NW_ScrProxy_BrowerApp_QueryForSuspRes(NW_ScrProxy_t *scrProxy); -/* WTAI functions */ - -/* public library */ -TBrowserStatusCode NW_ScrProxy_wp_makeCall(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *number); -TBrowserStatusCode NW_ScrProxy_wp_sendDTMF(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *dtmf); -TBrowserStatusCode NW_ScrProxy_wp_addPBEntry(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *number, - NW_Ucs2 *name); - -/* not yet supported */ - -#if 0 - -/* voice call library */ -TBrowserStatusCode NW_ScrProxy_wvc_setup (NW_ScrProxy_t *scrProxy, - NW_Ucs2 *number, NW_Bool mode, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wvc_accept (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Bool *mode, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wvc_release (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wvc_sendDTMF (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *dtmf, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wvc_callStatus(NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *field, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wvc_list (NW_ScrProxy_t *scrProxy, - NW_Bool returnFirst, - NW_Opaque_t *result); - - -/* network text library */ -TBrowserStatusCode NW_ScrProxy_wnt_send (NW_ScrProxy_t *scrProxy, - NW_Ucs2 *address, NW_Ucs2 *text, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wnt_list (NW_ScrProxy_t *scrProxy, - NW_Bool returnFirst, NW_Int32 type, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wnt_remove (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wnt_getFieldValue (void *ctx, - NW_Opaque_t *msgHandle, NW_Ucs2 *field, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wnt_markAsRead(NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - - -/* phone book library */ -TBrowserStatusCode NW_ScrProxy_wpb_write (NW_ScrProxy_t *scrProxy, - NW_Int32 index, NW_Ucs2 *number, NW_Ucs2 *name, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wpb_search (NW_ScrProxy_t *scrProxy, - NW_Ucs2 *field, NW_Ucs2 *value, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wpb_remove (NW_ScrProxy_t *scrProxy, - NW_Int32 index, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wpb_getFieldValue (void *ctx, - NW_Int32 index, NW_Ucs2 *field, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wpb_change (NW_ScrProxy_t *scrProxy, - NW_Int32 index, NW_Ucs2 *field, NW_Ucs2 *value, - NW_Opaque_t *result); - - -/* call log library */ -TBrowserStatusCode NW_ScrProxy_wcl_dialled (NW_ScrProxy_t *scrProxy, - NW_Bool returnFirst, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wcl_missed (NW_ScrProxy_t *scrProxy, - NW_Bool returnFirst, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wcl_received (NW_ScrProxy_t *scrProxy, - NW_Bool returnFirst, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wcl_getFieldValue(NW_ScrProxy_t *scrProxy, - NW_Opaque_t *logHandle, NW_Ucs2 *field, - NW_Opaque_t *result); - - -/* miscellaneous library */ -TBrowserStatusCode NW_ScrProxy_wm_setIndicator (NW_ScrProxy_t *scrProxy, - NW_Int32 type, NW_Int32 newState, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wm_endcontext (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wm_getProtection (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_wm_setProtection (NW_ScrProxy_t *scrProxy, - NW_Bool mode, - NW_Opaque_t *result); - - -/* is136 specific library */ -TBrowserStatusCode NW_ScrProxy_is136_sendFlash (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *flash, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_is136_sendAlert (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *alert, - NW_Opaque_t *result); - - -/* gsm specific library */ -TBrowserStatusCode NW_ScrProxy_gsm_hold (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_retrieve (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_transfer (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *Bhandle, NW_Opaque_t *Chandle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_deflect (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *number, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_multiparty(NW_ScrProxy_t *scrProxy, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_separate (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_sendUSSD (NW_ScrProxy_t *scrProxy, - NW_Ucs2 *message, NW_Int32 codingScheme, - NW_Int32 type, NW_Int32 transactionID, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_gsm_netinfo (NW_ScrProxy_t *scrProxy, - NW_Int32 type, - NW_Opaque_t *result); - - -/* pdc specific library */ -TBrowserStatusCode NW_ScrProxy_pdc_hold (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_pdc_retrieve (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_pdc_transfer (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *number, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_pdc_deflect (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, NW_Ucs2 *dest, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_pdc_multiparty(NW_ScrProxy_t *scrProxy, - NW_Opaque_t *result); - -TBrowserStatusCode NW_ScrProxy_pdc_separate (NW_ScrProxy_t *scrProxy, - NW_Opaque_t *handle, - NW_Opaque_t *result); - - -#endif /* if 0 */ - -/* Nokia proprietary */ -TBrowserStatusCode NW_ScrProxy_nokia_locationInfo(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - - -#endif /* WML_SCRPROXY_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_task.h --- a/webengine/wmlengine/src/wml/include/wml_task.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_url_utils.h $ - - Purpose: - - Class: WmlBrowser - - WML interpreter various functions decalrations. All functions are - used by this component only. - -*/ - -#ifndef WML_TASK_H -#define WML_TASK_H - -#include "wml_core.h" - -#include "nwx_mem.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - WAE_TIMER_USE_DEFAULT, - WAE_TIMER_TIMEOUT, - WAE_TIMER_FROM_TIMER -} NW_Wml_TimerBehavior_t; - - -/* - * wml_bind.c - */ -TBrowserStatusCode NW_Wml_ApplyContainedInternalVariables(NW_Wml_t* thisObj, NW_Wml_Element_t* container); - -/* - * wml_head.c - */ -TBrowserStatusCode NW_Wml_AccessControl(NW_Wml_t *thisObj, NW_Ucs2 *url); - -TBrowserStatusCode NW_Wml_HandleMetaElements(NW_Wml_t *thisObj); - - -/* - * wml_input_validation.c - */ -NW_Bool NW_WmlInput_ValidateFormat(const NW_Ucs2 * format); - - -/* - * wml_intrinsic_event.c - */ -TBrowserStatusCode NW_Wml_HandleIntrinsicEvents(NW_Wml_t *obj, NW_Wml_Intrinsic_e); - - -/* - * wml_option_event.c - */ -TBrowserStatusCode NW_Wml_HandleOptionEvent(NW_Wml_t *obj, NW_Wml_Element_t* el); - -/* -** wml_event.c -*/ -TBrowserStatusCode NW_Wml_HandleInputEvent(NW_Wml_t *thisObj, - NW_Wml_Element_t *el, - NW_Ucs2 *value, - NW_Bool setFlag, - NW_Bool *validateOK); - -/* - * wml_query_service.c - */ -NW_Int32 NW_Wml_FindEl(NW_Wml_t *thisObj, NW_Uint16 id); - -/* - * wml_ref_model.c - */ -TBrowserStatusCode NW_Wml_HandleTaskEvent(NW_Wml_t *thisObj, NW_Wml_Element_t* el); - -TBrowserStatusCode NW_Wml_ProcessGo(NW_Wml_t *obj, NW_Ucs2 *response_url); - -TBrowserStatusCode NW_Wml_ProcessPrev(NW_Wml_t *obj, NW_Ucs2 *response_url); - -TBrowserStatusCode NW_Wml_ProcessRefresh(NW_Wml_t *obj); - -/* - * wml_select_ui_state.c - */ -TBrowserStatusCode NW_Wml_SetCardUIState(NW_Wml_t *thisObj); - -TBrowserStatusCode NW_WmlInput_InitOptionValues(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el); - - -/* - * wml_select_validation.c - */ -TBrowserStatusCode NW_WmlSelect_ValidateName_Value(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* iname_var_value, NW_Wml_Select_Type_e type, NW_Mem_Segment_Id_t mem_scope, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_WmlSelect_ValidateIName_Value(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* name_var_value, NW_Wml_Select_Type_e type, NW_Mem_Segment_Id_t mem_scope, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_WmlSelect_GetFirstOptionValue(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Mem_Segment_Id_t mem_scope, NW_Ucs2 **ret_string); - - -/* - * wml_timer.c - */ -TBrowserStatusCode NW_Wml_SetTimerKey(NW_Wml_t* thisObj, NW_Wml_TimerBehavior_t behavior, NW_Uint32 *ret_time); - -TBrowserStatusCode NW_Wml_HandleTimer(NW_Wml_t *thisObj); - -void NW_Wml_SetTimerProcessing(NW_Wml_t* thisObj, NW_Bool timerProcessing); - -NW_Bool NW_Wml_IsTimerProcessingComplete(NW_Wml_t* thisObj); - - - -/* - * wml_url_navigation.c - */ -TBrowserStatusCode NW_Wml_FetchUrlGeneric( - NW_Wml_t *obj, - NW_Ucs2 *url_param, - NW_Bool is_method_post, - NW_Http_Header_t *header, - NW_NVPair_t *postfields, - NW_Ucs2 *enctype); -TBrowserStatusCode NW_Wml_FetchUrl(NW_Wml_t *obj, NW_Ucs2 *url, NW_Wml_Element_t* go_el); -TBrowserStatusCode NW_Wml_FetchPrevUrl(NW_Wml_t *obj); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* WML_TASK_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_url_utils.h --- a/webengine/wmlengine/src/wml/include/wml_url_utils.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_url_utils.h $ - - Purpose: - - Class: WmlBrowser - - Browser's url utility functions (interface file) - -*/ - -#ifndef WML_URL_UTILS_H -#define WML_URL_UTILS_H - -#include "nw_wml_core.h" -//R -//#include "urlloader_urlloaderint.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -TBrowserStatusCode NW_Wml_GetHrefAttr(NW_Wml_t* obj, NW_Wml_Element_t *el, NW_Ucs2 **ret_string); - -TBrowserStatusCode NW_Wml_IsCardInCurrentDeck(NW_Wml_t* obj, NW_Ucs2 *full_url); - -TBrowserStatusCode NW_Wml_GetFullUrl(NW_Wml_t* obj, NW_Ucs2 *rel_url, NW_Ucs2 **ret_string); - -NW_Ucs2* NW_Wml_CheckRedirection(NW_Ucs2* url_param, NW_Ucs2* redirected_url); - -TBrowserStatusCode NW_Wml_MakeLoadRequest(NW_Wml_t *thisObj, - NW_Ucs2 *url, - NW_Wml_Element_t *go_el); - -TBrowserStatusCode NW_Wml_DoLoadAndSave(NW_Wml_t *thisObj, - NW_Ucs2 *req_url, - NW_Bool is_method_post, - NW_Ucs2 *referer, - NW_Ucs2 *accept_charset, - NW_Http_Header_t *header, - NW_NVPair_t *escaped_postdata, - NW_Ucs2 *enctype, - NW_Cache_Mode_t cacheMode); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* WML_URL_UTILS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_var.h --- a/webengine/wmlengine/src/wml/include/wml_var.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_var.h $ - - Purpose: - - Function and structure declaration for WML variables and WML variable - lists. The core browser manages user defined variables while processing WML - documents. -*/ - -#ifndef WML_VARS_H -#define WML_VARS_H - -#include "nw_wml_var.h" -#include "BrsrStatusCodes.h" - -/* Global function declarations */ - -TBrowserStatusCode NW_WmlVar_ParseList(NW_Ucs2 *str, NW_Int32 *size, NW_Mem_Segment_Id_t mem_scope, NW_Wml_Var_t **ret_var); - -NW_Wml_VarList_t * NW_WmlVar_NewList(NW_Mem_Segment_Id_t mem_scope); - -TBrowserStatusCode NW_WmlVar_AddToList(NW_Wml_VarList_t *l, const NW_Ucs2 *n, - const NW_Ucs2 *v, NW_Mem_Segment_Id_t mem_scope); - -TBrowserStatusCode NW_WmlVar_ReplaceValue(NW_Wml_Var_t *v, const NW_Ucs2 *value, NW_Mem_Segment_Id_t mem_scope); - -NW_Wml_VarList_t * NW_WmlVar_DupList(NW_Wml_VarList_t *l, NW_Mem_Segment_Id_t mem_scope); - - -NW_Ucs2 *NW_WmlVar_GetValue(NW_Wml_VarList_t *l, const NW_Ucs2 *name); - -NW_Bool NW_WmlVar_Replace(NW_Wml_VarList_t *l, NW_Wml_Var_t *param_var); - -NW_Wml_Var_t *NW_WmlVar_Get(NW_Wml_VarList_t *l, const NW_Ucs2 *name); - -NW_Wml_Var_t *NW_WmlVar_Next(NW_Wml_VarList_t *l, NW_Wml_Var_t *current); - -NW_Bool NW_WmlVar_Remove(NW_Wml_VarList_t *l, NW_Ucs2 *name); - -void NW_WmlVar_Clear(NW_Wml_VarList_t *l); - -NW_Wml_Var_t *NW_WmlVar_PopFirst(NW_Wml_VarList_t *l); - -void NW_WmlVar_AddVarToList(NW_Wml_VarList_t *l, NW_Wml_Var_t *v); - -NW_Bool NW_WmlVar_IsListEmpty(NW_Wml_VarList_t *l); - -#endif /* WML_VARS_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_wae.h --- a/webengine/wmlengine/src/wml/include/wml_wae.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef WML_WAE_H -#define WML_WAE_H - -/* -** Includes -*/ -#include "nw_wae.h" -#include "BrsrStatusCodes.h" - -/* -** Type Declarations -*/ - - -/* -** Global Function Declarations -*/ - -/* -** wml_msgs.c -*/ -/* run the script */ -TBrowserStatusCode -NW_Wml_RunScript(NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset); - -/* abort the running script */ -TBrowserStatusCode NW_Wml_AbortScript(void); - -#endif /* WML_WAE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/include/wml_wae_transaction.h --- a/webengine/wmlengine/src/wml/include/wml_wae_transaction.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/*************************************************************************** -** File: wml_wae_transaction.h -** Subsystem Name: WAE User Agent -** Purpose: Provides interface to transaction -**************************************************************************/ -#ifndef WML_WAE_TRANSACTION_H -#define WML_WAE_TRANSACTION_H - -/* -** Includes -*/ - -/* -** Type Declarations -*/ - -typedef enum { - NW_WAE_TRANSACTION_STATE_INIT, - NW_WAE_TRANSACTION_STATE_PENDING, - NW_WAE_TRANSACTION_STATE_CANCELLED, - NW_WAE_TRANSACTION_STATE_COMPLETE -} NW_WaeTransactionState_t; - -typedef struct _NW_WaeTransaction_t NW_WaeTransaction_t; -struct _NW_WaeTransaction_t { - NW_Uint16 tid; /* transaction id */ - NW_WaeTransactionState_t state; /* state of the transaction */ -}; - -/* -** Global Function Declarations -*/ -/* initialize the transaction */ -void NW_WaeTransaction_Initialize(NW_WaeTransaction_t *trans); - -/* get the transaction identifier */ -NW_Uint16 NW_WaeTransaction_GetId(const NW_WaeTransaction_t *trans); - -/* set the transaction identifier */ -void NW_WaeTransaction_SetId(NW_WaeTransaction_t *trans, NW_Uint16 id); - -/* get the state of the transaction */ -NW_WaeTransactionState_t -NW_WaeTransaction_GetState(const NW_WaeTransaction_t *trans); - -/* set the state of the transaction */ -void NW_WaeTransaction_SetState(NW_WaeTransaction_t *trans, - NW_WaeTransactionState_t state); - -#endif /* WML_WAE_TRANSACTION_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/MakeCommon --- a/webengine/wmlengine/src/wml/src/MakeCommon Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeCommon -TARGET = rbWae_src_wml_common_lib.a - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = nw_evlog_api.c wml_bind.c wml_core.c wml_deck.c wml_deck_iter.c wml_decoder.c \ - wml_event.c wml_head.c wml_history.c wml_input_validation.c wml_intrinsic_event.c \ - wml_list.c wml_msgs.c wml_option_event.c wml_query_service.c wml_ref_model.c \ - wml_script_message.c wml_scrproxy.c wml_select_ui_state.c wml_select_validation.c \ - wml_timer.c wml_transaction.c wml_ui.c wml_url_navigation.c wml_url_utils.c \ - wml_var.c wml_wae.c wml_wae_reader.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/WMLUrlNavigation.cpp --- a/webengine/wmlengine/src/wml/src/WMLUrlNavigation.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1179 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_url_navigation.c $ - - Purpose: - - Class: WmlBrowser - - Browser url navigation logic - -*/ -#include "nwx_defs.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "wml_elm_attr.h" - -#include "wml_task.h" -#include "wml_api.h" -#include "wml_history.h" -#include "wml_url_utils.h" -#include "wml_decoder.h" - -#include "nw_hed_documentroot.h" -#include "MVCShell.h" -#include "nw_lmgr_rootbox.h" -#include "nw_wml1x_wml1xcontenthandler.h" -#include "BrsrStatusCodes.h" - - -static TBrowserStatusCode LoadDeckError(NW_Wml_t* thisObj, NW_DeckDecoder_t *tmp_decoder, - NW_DeckDecoder_t *old_decoder, NW_Ucs2* url); - -static TBrowserStatusCode SetTimerKey(NW_Wml_t *wml); -static TBrowserStatusCode GetMethod(NW_Wml_t *thisObj, NW_Wml_Element_t *go_elem, NW_Bool *method_is_post); -static TBrowserStatusCode MakeReqUrl(NW_Wml_t *thisObj, NW_Ucs2 *card_name, NW_Ucs2 **patchedReqUrl); -static TBrowserStatusCode MoveToCard(NW_Wml_t *thisObj, NW_Ucs2 *card_name); -static TBrowserStatusCode ProcessIntraDeckGoTask(NW_Wml_t *thisObj, NW_Ucs2 *reqUrl, NW_Bool updateHistory); -static TBrowserStatusCode ProcessIntraDeckFetchUrlTask(NW_Wml_t *thisObj, NW_Ucs2 *reqUrl, NW_Bool updateHistory); -static TBrowserStatusCode MustReload(NW_Wml_t *thisObj, NW_Wml_Element_t *go_elem, NW_Bool *reload); -static TBrowserStatusCode GetImageUrl(NW_Wml_t *that, NW_Uint16 imgel_id, NW_Wml_Attr_t image_attr, - NW_Ucs2 **ret_string); - -/*------------------------------------------------------------ - * SetTimerKey - * If a timer is running, set the TIMER's KEY variable to the - * remaining time. - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *----------------------------------------------------------*/ - -static TBrowserStatusCode SetTimerKey(NW_Wml_t *thisObj) -{ - TBrowserStatusCode status; - NW_Uint32 timer_value = 0; - NW_Bool running = NW_FALSE; - - NW_ASSERT(thisObj != NULL); - - status = (TIMER_API->isRunning)(thisObj->browser_app,&running); - if (status != KBrsrSuccess || !running) - return status; - - if ((status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_FROM_TIMER, &timer_value)) - == KBrsrOutOfMemory) - return status; - thisObj->script_state.timer_time = timer_value; - - if ((status = (TIMER_API->stop)(thisObj->browser_app)) != KBrsrSuccess) - return status; - (void)(TIMER_API->destroy)(thisObj->browser_app); - - return status; -} - -/*--------------------------------------------------------------------------- - * GetMethod - * - * Sets method_is_post true if the method really, truly is 'post' - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *-------------------------------------------------------------------------*/ -static TBrowserStatusCode GetMethod(NW_Wml_t *thisObj, - NW_Wml_Element_t *go_elem, - NW_Bool *method_is_post) -{ - NW_ASSERT(thisObj != NULL); - - *method_is_post = NW_FALSE; - - if (go_elem == NULL) - return KBrsrSuccess; - - *method_is_post = NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, go_elem, METHOD_ATTR, - WAE_ASC_POST_STR, thisObj->var_list); - - return KBrsrSuccess; -} - -/*--------------------------------------------------------------------------- - * GetCacheControl - * - * Sets noCache true if the cache-control attrib. value is 'no-cache' - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *-------------------------------------------------------------------------*/ -static TBrowserStatusCode GetCacheControl(NW_Wml_t *thisObj, - NW_Wml_Element_t *go_elem, - NW_Bool *noCache) -{ - NW_ASSERT(thisObj != NULL); - - *noCache = NW_FALSE; - - if (go_elem == NULL) - return KBrsrSuccess; - - *noCache = NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, go_elem, CACHECONTROL_ATTR, - WAE_ASC_NOCACHE_STR, thisObj->var_list); - - return KBrsrSuccess; -} - -/*--------------------------------------------------------------------------- - * GetPostfields - * - * Sets postfields to true if a postfields elmement is within the go tag - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *-------------------------------------------------------------------------*/ -static TBrowserStatusCode GetPostfields(NW_Wml_t *thisObj, - NW_Wml_Element_t *go_elem, - NW_Bool *isPostField) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_NVPair_t *postfields = NULL; - - NW_ASSERT(thisObj != NULL); - - *isPostField = NW_FALSE; - - if (go_elem == NULL) - { - return KBrsrSuccess; - } - - status = NW_DeckDecoder_GetPostfieldData(thisObj->decoder, - thisObj->var_list, go_elem, &postfields); - - if (postfields != NULL) - { - *isPostField = NW_TRUE; - NW_NVPair_Delete( postfields ); - postfields = NULL; - } - - return status; -} - -/*--------------------------------------------------------------------- - * MustReload - * - * We must reload if there are any postfields, or the method of the - * go element is 'post'. - * - * returns: - * KBrsrSuccess - * anything else is an unrecoverable error - *---------------------------------------------------------------------*/ -static TBrowserStatusCode MustReload(NW_Wml_t *thisObj, - NW_Wml_Element_t *go_elem, - NW_Bool *reload) -{ - NW_Bool isPost; - NW_Bool noCache; - NW_Bool isPostField; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(reload != NULL); - - *reload = NW_FALSE; - - GetPostfields(thisObj, go_elem, &isPostField); - - GetMethod(thisObj, go_elem, &isPost); - - GetCacheControl(thisObj, go_elem, &noCache); - - *reload = (NW_Bool) (noCache || isPost || isPostField); - return KBrsrSuccess; -} - -/*---------------------------------------------------------------------------------- - * MakeReqUrl - * - * Workaround for PDC Gateway issue -- we remanufacture the full destination from - * the history request url, not from the response url, for an intradeck 'go' - * - * returns KBrsrOutOfMemory - * KBrsrMalformedUrl - * KBrsrSuccess - *---------------------------------------------------------------------------------*/ -static TBrowserStatusCode MakeReqUrl(NW_Wml_t *thisObj, - NW_Ucs2 *card_name, - NW_Ucs2 **patchedUrlReq) -{ - TBrowserStatusCode status; - NW_Ucs2 *url; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(patchedUrlReq != NULL); - - - status = NW_Wml_HistoryGetRequestUrl(thisObj, &url); - if (status == KBrsrOutOfMemory) - return status; - - status = NW_Url_BuildAbsUrl(url, card_name, patchedUrlReq); - NW_Str_Delete(url); - - return status; -} - -/*---------------------------------------------------------------------- - * MoveToCard - * - * Positions the deck decoder to the given card, if possible. If not, - * then the decoder is positioned to the first card in the deck, - * per WML 1.2, section 12.5.1#4c. - * - * Note -- this works ok even if the card_name parameter is NULL. - * - * returns - * KBrsrSuccess - * KBrsrOutOfMemory - *---------------------------------------------------------------------*/ -static TBrowserStatusCode MoveToCard(NW_Wml_t *thisObj, NW_Ucs2 *card_name) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(thisObj != NULL); - - if(thisObj->decoder != NULL) - status = NW_DeckDecoder_SetCardByName(thisObj->decoder, card_name); - - if (status == KBrsrOutOfMemory) - return status; - - /* wrong card_name */ - if (status == KBrsrWmlbrowserCardNotInDeck) { - /* Try using a NULL card_name to enforce WML 12.5.1#4c */ - status = NW_DeckDecoder_SetCardByName(thisObj->decoder, NULL); - } - return status; -} - -/*-------------------------------------------------------------------------- - * ProcessIntraDeckGoTask - * - * NOTE -- the 'GO_TASK' case contains a workaround for a PDC gateway - * issue. Specifically the problem is this -- the PDC gateway sometimes - * sends back a ContentLocation header indicating that the gateway (e.g., - * 'krell.uplanet.com') is the location of the redirected content. - * Since we derive the 'response_url' from the ContentLocation header, - * and we resolve relative references with respect to the response url, - * we have a problem. - * - * So, in the case of an intradeck 'go', we need to manufacture a - * request URL that contains the real (originally requested) - * deck URL, plus the _requested_ card name (which is part of reqUrl). - * Then we need to manufacture a response URL that consists of the - * request URL plus the _actual_ card that we are going to display (this - * may or may not be the requested card, and it may or may not have a name). - * - * Suppose, for example, the current deck was requested as - * "http://foo/deck.wml#card1", and the response_url (derived from - * the ContentLocation header) from the PDC gateway is - * "http://foo/krell.uplanet.com#card1". Suppose further that the next - * request from that card is to go to "#card2", but there isn't a - * 'card2', and that 'main' is the id of the first card in the deck. - * - * Then we need to manufacture a request url of "http://foo/deck.wml#card2" - * and a response url of "http://foo/krell.uplanet.com#main". - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *-------------------------------------------------------------------------*/ - -static TBrowserStatusCode ProcessIntraDeckGoTask(NW_Wml_t *thisObj, - NW_Ucs2 *url, - NW_Bool updateHistory) -{ - NW_Ucs2 *cardName = NULL; - NW_Ucs2 *responseUrl = NULL; - NW_Ucs2 *requestUrl = NULL; - TBrowserStatusCode status; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(url != NULL); - - status = NW_DeckDecoder_GetCardName(thisObj->decoder, &cardName); - if (status != KBrsrSuccess && status != KBrsrFailure) - goto Exit; - - status = NW_Url_BuildAbsUrl(url,cardName,&responseUrl); - if (status != KBrsrSuccess) - goto Exit; - - status = MakeReqUrl(thisObj,NW_Url_Fragment(url),&requestUrl); - if (status != KBrsrSuccess) - goto Exit; - - /* now create and push a new History entry */ - if (updateHistory == NW_TRUE) { - status = NW_Wml_HistoryPushIntraDeckLoad(thisObj, requestUrl, responseUrl); - if (status != KBrsrSuccess && status != KBrsrFailure) - goto Exit; - } - - status = NW_Wml_ProcessGo(thisObj,responseUrl); - if (status != KBrsrSuccess && status != KBrsrFailure) - goto Exit; /* FAILURE does not imply a fatal error */ - status = KBrsrSuccess; - -Exit: - NW_Str_Delete(cardName); - NW_Str_Delete(requestUrl); - NW_Str_Delete(responseUrl); - return status; -} - -/*----------------------------------------------------------------------- - * ProcessIntraDeckFetchUrlTask - * - * Handles intradeck navigation tasks as indicated by the the 'curr_task' - * member of the NW_Wml_t object. - * - * returns - * KBrsrSuccess - * anything else is an unrecoverable error - *---------------------------------------------------------------------*/ -static TBrowserStatusCode ProcessIntraDeckFetchUrlTask(NW_Wml_t *thisObj, - NW_Ucs2 *reqUrl, - NW_Bool updateHistory) -{ - TBrowserStatusCode status; - NW_Wml1x_ContentHandler_t* thisHandlerObj; - - NW_ASSERT(thisObj != NULL); - - status = NW_Wml_CancelAllLoads(thisObj); - thisHandlerObj = NW_Wml1x_ContentHandlerOf(thisObj->browser_app); - - switch (thisObj->curr_task) - { - case GO_TASK: - NW_ASSERT(reqUrl != NULL); - status = ProcessIntraDeckGoTask(thisObj, reqUrl, updateHistory); - break; - - case PREV_TASK: - NW_ASSERT(reqUrl != NULL); - status = NW_Wml_ProcessPrev(thisObj, reqUrl); - - if (status != KBrsrSuccess && status != KBrsrFailure) - break; /* FAILURE does not imply a fatal error */ - status = KBrsrSuccess; - break; - - case REFRESH_TASK: - status = NW_Wml_ProcessRefresh(thisObj); - - if (status != KBrsrSuccess && status != KBrsrFailure) - break; /* FAILURE does not imply a fatal error */ - status = KBrsrSuccess; - break; - - case RESTORE_TASK: - /* TODO do we need to do more to restore/restart a card */ - if(thisHandlerObj->contextSuspended) - { - /* apply the global variables to the wml interpreter */ - NW_DeckDecoder_ContextToVarList (thisHandlerObj->contextSuspended, thisHandlerObj->wmlInterpreter.var_list, - thisHandlerObj->wmlInterpreter.mem_segment_general); - /* clear the global variable context */ - NW_Object_Delete (thisHandlerObj->contextSuspended); - thisHandlerObj->contextSuspended = NULL; - } - NW_Wml_DisplayCard(thisObj, NW_FALSE); - status = NW_Wml_HandleTimer(thisObj); - - status = KBrsrSuccess; - break; - - case INVALID_TASK: - case NOOP_TASK: - default: - status = KBrsrFailure; - } - - return status; -} - - -static TBrowserStatusCode NW_Wml_HandleIntraPageNavigationStarted (NW_Wml_t *thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj->browser_app); - - thisObj->outstandingLoadCount = 0; - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(docRoot); - (void) NW_ADT_DynamicVector_Clear(rootBox->iOutOfViewListeners); - - return NW_HED_DocumentRoot_HandleIntraPageNavigationStarted (docRoot); -} - - -static TBrowserStatusCode NW_Wml_HandleIntraPageNavigationCompleted (NW_Wml_t *thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj->browser_app); - - if (thisObj->IntraDeck_OefCounter > MAX_NUMBER_INTRA_OEF) { - /* we have exceeded the maximunm # of OnEnterForwards allowable for the deck - The error will be handled after we process the deck - Vishy05/14/2002 - */ - docRoot->isIntraPageNav--; - - return KBrsrSuccess; - } - else { - return NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (docRoot); - } -} - -TBrowserStatusCode NW_Wml_HandleIntraDocRequest (NW_Wml_t *thisObj, - NW_Wml_Task_e task, - NW_Bool historicRequest, - const NW_Ucs2 *url) -{ - TBrowserStatusCode status = KBrsrWmlbrowserCardNotInDeck; - NW_Bool mustCallCompleted = NW_FALSE; - NW_Bool cardNotFound = NW_FALSE; - NW_Wml1x_ContentHandler_t* wmlCH; - - /* set the wml-task */ - thisObj->curr_task = task; - - if(task != RESTORE_TASK) - { - wmlCH = NW_Wml1x_ContentHandlerOf(thisObj->browser_app); - NW_Object_Delete (wmlCH->contextSuspended); - /* copy the suspended context */ - wmlCH->contextSuspended = NW_DeckDecoder_VarListToContext(wmlCH->wmlInterpreter.var_list); - } - - /* notify the docRoot that we are performing an intra-document navigation */ - NW_Wml_HandleIntraPageNavigationStarted (thisObj); - mustCallCompleted = NW_TRUE; - - /* set the card. The url will be NULL when we are "restoring" a card */ - if (url != NULL) { - NW_String_t cardName; - - /* if the intra-nav dest card is not found, it is not a fatal error */ - /* see WML-191, section 12.5.1.4 */ - - NW_String_initialize (&cardName, NW_Url_Fragment((NW_Ucs2 *) url), HTTP_iso_10646_ucs_2); - - if (cardName.storage != NULL) { - if (!NW_Wml_Deck_GetCardByName (thisObj->decoder->domDeck, &cardName)) - { - cardNotFound = NW_TRUE; - } - } - - /* set the current card */ - NW_THROWIF_ERROR (status = MoveToCard(thisObj, NW_Url_Fragment((NW_Ucs2 *) url))); - } - - /* show the intra-deck card */ - NW_THROWIF_ERROR (status = ProcessIntraDeckFetchUrlTask(thisObj, (NW_Ucs2 *) url, - (NW_Bool) (historicRequest == NW_FALSE))); - - /* notify the docRoot that we are done navigating */ - NW_Wml_HandleIntraPageNavigationCompleted (thisObj); - - if (cardNotFound == NW_TRUE) /* if the requested card was not found - WML-191, 12.5.1.4 is followed, */ - { /* and notify user that a nav exception has occured, to let them know. */ - NW_Wml_HandleError (thisObj, BRSR_STAT_CLASS_GENERAL, (NW_Int16) KBrsrWmlbrowserCardNotInDeck); - } - - /* When we restore a previous document we do not want to start the timers again! - Vishy 07/02/2002 */ - if(task == RESTORE_TASK) { - wmlCH = NW_Wml1x_ContentHandlerOf(thisObj->browser_app); - (void) (wmlCH->wmlInterpreter).wml_api->timer->destroy(wmlCH); - wmlCH->allowTimer = NW_FALSE; - } - - /* update the content handler to point to the frag's url-request */ - { - NW_HED_DocumentNode_t* docNode = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_HED_HistoryStack_t* history = NULL; - NW_HED_HistoryEntry_t* entry = NULL; - - docNode = NW_HED_DocumentNodeOf (thisObj->browser_app); - docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (docNode); - history = NW_HED_DocumentRoot_GetHistoryStack (docRoot); - - entry = NW_HED_HistoryStack_GetEntry (history, NW_HED_HistoryStack_Direction_Current); - - status = NW_HED_ContentHandler_SetAssociatedHistoryEntry (docNode, entry); - } - - return status; - -NW_CATCH_ERROR - /*lint -e{774} Significant prototype coercion*/ - if (mustCallCompleted == NW_TRUE) { - NW_Wml_HandleError (thisObj, BRSR_STAT_CLASS_GENERAL, (NW_Int16) status); - //We need to set the IntraDeck_OefCounter to 0 so that one card is shown for the infinite loop and also preventing a crash - //down the road. The bad content error message will be shown through the next function call. - thisObj->IntraDeck_OefCounter = 0; - NW_Wml_HandleIntraPageNavigationCompleted (thisObj); - - if (thisObj->IntraDeck_OefCounter > MAX_NUMBER_INTRA_OEF) { - - /* this is a cronic error and we want to propagate this error to the - to the top - Vishy 05/14/2002*/ - status = KBrsrWmlbrowserBadContent; - } - else { - /* the error is handled above so set status to success */ - status = KBrsrSuccess; - } - } - - return status; -} - -/*--------------------------------------------------------------------------- - * NW_Wml_FetchUrlGeneric - * - * This is the same as NW_Wml_FetchUrlGeneric, but allows for more flexibility. - * It does not rely on a GO element to provide the semantics of the load, - * but receives these directly in the argument list. - * - * RETURN: KBrsrSuccess - * NW_FAILURE - does NOT imply a fatal error - * - card does not have an intrinsic event - * KBrsrBadInputParam - * KBrsrOutOfMemory - *---------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_FetchUrlGeneric( - NW_Wml_t *obj, - NW_Ucs2 *url_param, - NW_Bool is_method_post, - NW_Http_Header_t *header, - NW_NVPair_t *postfields, - NW_Ucs2 *enctype) -{ - NW_Wml_t *thisObj = (NW_Wml_t*) obj; - TBrowserStatusCode status = KBrsrFailure; - NW_Ucs2 *patchedReqUrl = NULL; - NW_Bool intraDeck = NW_FALSE; - NW_Bool mustReload = is_method_post; - NW_Rfc2396_Parts_t parts = {0}; - - if (!NW_Url_GetRfc2396Parts(url_param,&parts)) - return KBrsrMalformedUrl; - - if ((status = SetTimerKey(thisObj)) != KBrsrSuccess) - return status; - - status = NW_Wml_IsCardInCurrentDeck(thisObj, url_param); - if (status == KBrsrOutOfMemory) - return status; - - intraDeck = (NW_Bool) (status == KBrsrSuccess); - - /* - * If card is in current deck, then WML Spec 12.5.1.3 and - * 12.5.1.4 are satisfied: access control and locating the - * destination card - */ - - if (!intraDeck || mustReload) { - thisObj->curr_task = GO_TASK; - if (intraDeck) { - status = MakeReqUrl(thisObj, NW_Url_Fragment(url_param), &patchedReqUrl); - if (status != KBrsrSuccess) - return status; - status = NW_Wml_DoLoadAndSave(thisObj, patchedReqUrl, is_method_post, - NULL, NULL, header, - postfields, enctype, NW_CACHE_NORMAL); - NW_Str_Delete(patchedReqUrl); - } else { - status = NW_Wml_DoLoadAndSave(thisObj, url_param, is_method_post, - NULL, NULL, header, - postfields, enctype, NW_CACHE_NORMAL); - } - } - - /* intradeck fetch -- no need to reload the deck */ - else { - status = NW_Wml_HandleIntraDocRequest (thisObj, thisObj->curr_task, NW_FALSE, url_param); - - if (status != KBrsrSuccess) { - NW_Wml_ClearTaskVariables(thisObj); /* per WML 12.5.5 */ - } - } - - return status; -} - -/*--------------------------------------------------------------------------- - * NW_Wml_FetchUrl - * - * Navigate to url_param. url_param is NW_MEM_SEGMENT_MANUAL & not owned by - * this routine, but short-lived - * - * NOTE: For an intradeck fetch that doesn't require a reload of the deck, - * if the curr_task is not reload, we clear thisObj->mem_segment_card and - * clean the memory segment identified by the 'mem_segment_general' field of the wml - * object (this flushes out history strings that were orphaned). - * - * RETURN: KBrsrSuccess - * NW_FAILURE - does NOT imply a fatal error - * - card does not have an intrinsic event - * KBrsrBadInputParam - * KBrsrOutOfMemory - *---------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_FetchUrl(NW_Wml_t *obj, - NW_Ucs2 *url_param, - NW_Wml_Element_t* go_elem) -{ - NW_Wml_t *thisObj = (NW_Wml_t*) obj; - TBrowserStatusCode status = KBrsrFailure; - NW_Ucs2 *patchedReqUrl = NULL; - NW_Bool intraDeck = NW_FALSE; - NW_Bool mustReload = NW_FALSE; - NW_Rfc2396_Parts_t parts = {0}; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(url_param != NULL); - - if (NW_Url_GetRfc2396Parts(url_param,&parts) != NW_TRUE) - return KBrsrMalformedUrl; - - if ((status = SetTimerKey(thisObj)) != KBrsrSuccess) - return status; - - status = NW_Wml_IsCardInCurrentDeck(thisObj, url_param); - if (status == KBrsrOutOfMemory) - return status; - intraDeck = (NW_Bool) (status == KBrsrSuccess); - - if(intraDeck && go_elem) - { - NW_Wml_ElType_e el_type; - //Check if it is <a> tag not the <go> or <anchor> tag. Then let - //cache decide wheather to keep the same page or load the new one. - //If we keep the same page then cache parameters are not modified. - //If there is an <a> tag this is wrong because the cache doesn't implement - //the wml intradeck naviagation, as it is 12.5.1.3, 12.5.1.4 - NW_DeckDecoder_GetType(thisObj->decoder, go_elem, &el_type); - if(el_type == ANCHOR_ELEMENT) - { - intraDeck = NW_FALSE; - go_elem = NULL; //Make same that of the original call. - } - } - - if ((status = MustReload(thisObj, go_elem, &mustReload)) != KBrsrSuccess) - return status; - - /* - * If card is in current deck, then WML Spec 12.5.1.3 and - * 12.5.1.4 are satisfied: access control and locating the - * destination card - */ - - if (!intraDeck || mustReload) { - thisObj->curr_task = GO_TASK; - /* reset the counter as we are making an external load */ - thisObj->IntraDeck_OefCounter = 0; - if (intraDeck) { - status = MakeReqUrl(thisObj, NW_Url_Fragment(url_param), &patchedReqUrl); - if (status != KBrsrSuccess) - return status; - status = NW_Wml_MakeLoadRequest(thisObj, patchedReqUrl, go_elem); - NW_Str_Delete(patchedReqUrl); - } else { - status = NW_Wml_MakeLoadRequest(thisObj, url_param, go_elem); - } - } - - /* intradeck fetch -- no need to reload the deck */ - else { - - /*Now we need to check if a condition for endless loop of intra-OnEnterForward is met. */ - if(thisObj->IntraDeck_OefCounter > MAX_NUMBER_INTRA_OEF) { - /*We stop the navigation to prevent endless loop and - notify the user about the error*/ - return KBrsrWmlbrowserBadContent; - } - - status = NW_Wml_HandleIntraDocRequest (thisObj, thisObj->curr_task, NW_FALSE, url_param); - - if (status != KBrsrSuccess) { - NW_Wml_ClearTaskVariables(thisObj); /* per WML 12.5.5 */ - } - } - - return status; -} - - -/*------------------------------------------------------------------------- - * NW_Wml_FetchPrevUrl - * - * Navigate to the url of the history entry before the current one. - * - * Intradeck fetches cause thisObj->mem_segment_card to be cleared, and - * cause the wml object's mem_segment_general segment to be cleaned. - * - * RETURN: KBrsrSuccess - * KBrsrFailure - history stack is empty - * KBrsrOutOfMemory - *------------------------------------------------------------------------*/ - TBrowserStatusCode NW_Wml_FetchPrevUrl(NW_Wml_t *obj) - { - NW_Wml_t *thisObj = (NW_Wml_t*) obj; - NW_Wml_History_t *prev_card = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool intraDeck = NW_FALSE; - - if ((status = SetTimerKey(thisObj)) != KBrsrSuccess) - return status; - - if ((status = NW_Wml_HistoryPrevCard(thisObj, &prev_card)) == KBrsrOutOfMemory) - return status; - - /* - * If the history stack is empty, then perhaps a dialog should be - * presented to the user. But the spec does not say this is - * an error condition. - */ - if (status == KBrsrFailure) - goto EndFetchPrev; - - if ((status = NW_Wml_IsCardInCurrentDeck(thisObj, prev_card->req_url)) - == KBrsrOutOfMemory) - goto EndFetchPrev; - intraDeck = (NW_Bool)(status == KBrsrSuccess); - - /* The 'pop' of the history stack will occur when NW_Wml_ProcessPrev - is executed. Otherwise, we run the risk of popping the history - stack _before_ the load is completed, and then aborting the load. - The 'current' url would then be lost! - */ - - /* - * if card is in current deck, then WML Spec 12.5.2.3 and 12.5.2.4 are - * satisfied: access control and locating the destination card - */ - if (intraDeck) - { - NW_Wml_Element_t last_card_el; - - NW_DeckDecoder_GetCardElement (thisObj->decoder, &last_card_el); - - if ((status = MoveToCard(thisObj, NW_Url_Fragment(prev_card->req_url))) - == KBrsrOutOfMemory) { - goto EndFetchPrev; - } - - if (status == KBrsrSuccess) - { - status = NW_Wml_HistoryToPrev(thisObj, NULL); - if (status != KBrsrSuccess) { - goto EndFetchPrev; - } - - /* show the prev card */ - status = NW_Wml_HandleIntraDocRequest (thisObj, PREV_TASK, NW_TRUE, prev_card->req_url); - - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto EndFetchPrev; - } - else - { - /* card not found - present dialog app */ - - /* do a refresh until UI option list bug is fixed */ - thisObj->curr_task = REFRESH_TASK; - NW_DeckDecoder_SetCardByElement (thisObj->decoder, &last_card_el); - status = NW_Wml_DisplayCard(thisObj, NW_TRUE); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto EndFetchPrev; - } - } - else - { - thisObj->curr_task = PREV_TASK; - status = NW_Wml_DoPrevLoad(thisObj->browser_app); - } - -EndFetchPrev: - NW_Wml_HistoryDeleteEntry(prev_card); - - return status; -} - - -/* Helper function for LoadDeck() to cleanup after errors */ -static TBrowserStatusCode LoadDeckError(NW_Wml_t* thisObj, NW_DeckDecoder_t *tmp_decoder, - NW_DeckDecoder_t *old_decoder, NW_Ucs2* url) -{ - - NW_ASSERT(thisObj != NULL); - - /* Restore old deck decoder */ - if (old_decoder != NULL) { - thisObj->decoder = old_decoder; - } - - NW_Str_Delete(url); - - /* Clean up variable state, per WML 12.5.5 */ - NW_Wml_ClearTaskVariables(thisObj); - - NW_Ucs2 *card_name = NULL; - /* redisplay the old deck only if we have one !*/ - if (thisObj->decoder != NULL && (NW_DeckDecoder_GetCardName(thisObj->decoder, &card_name) != KBrsrSuccess)) { - return NW_Wml_DisplayCard(thisObj, NW_TRUE); - } - else - { - return NW_Wml_DisplayCard(thisObj, NULL); - } -} - -/* - * RETURN KBrsrSuccess - deck is loaded OK - * KBrsrFailure - deck is not loaded because of a non-fatal - * error like failing access control - * KBrsrOutOfMemory - * NW_STAT_* - propagates fatal return value from CB calls - */ - -/* -** TODO this function can be simplified now that we load each deck into their -** own Tempest-content-handler. Since the wml-content-handler has a unique -** NW_Wml_t structure there will NEVER be previous card or deck to restore to -** if a failure is encountered in this function. LoadDeckError can also be -** simplified. -*/ -TBrowserStatusCode NW_Wml_LoadWmlResp(NW_Wml_t *thisObj, - NW_Buffer_t* responseBuffer, - NW_Bool contentWasPlainText, - NW_Url_Resp_t* response) -{ - NW_Ucs2 *url = NULL; - NW_Ucs2 *card_name = NULL; - NW_DeckDecoder_t *old_decoder = thisObj->decoder; - NW_DeckDecoder_t *tmp_decoder = NULL; - TBrowserStatusCode status; - TBrowserStatusCode error; - NW_Http_CharSet_t charset; - NW_Ucs2 *reqUrl; - NW_Ucs2 *redirectedUrl; - - NW_ASSERT(thisObj != NULL); - - charset = response->charset; - - reqUrl = NW_Str_Newcpy(response->uri); - if (reqUrl == NULL) { - return KBrsrOutOfMemory; - } - - redirectedUrl = reqUrl; - - /* - * check for a redirected url, then free. - * both url_param and new_url were malloced without using a mem segment - */ - url = NW_Wml_CheckRedirection(reqUrl, redirectedUrl); - if (url == NULL) - { - (void) LoadDeckError(thisObj, NULL, NULL, url); - return KBrsrOutOfMemory; - } - NW_ASSERT(url != NULL); - - if (redirectedUrl != reqUrl) - NW_Mem_Free(redirectedUrl); - - NW_Mem_Free(reqUrl); - /* create a new DeckDecoder, reuse the resp->context wml bytecode */ - - tmp_decoder = NW_DeckDecoder_New(); - if (tmp_decoder == NULL) - { - (void) LoadDeckError(thisObj, NULL, NULL, url); - return KBrsrOutOfMemory; - } - - status = NW_DeckDecoder_InitializeAndValidate(tmp_decoder, responseBuffer, - charset, contentWasPlainText); - - /* - ** tmp_decoder now owns the content, and will free it when tmp_decoder is - ** freed, or has already freed it in the case of error. - */ - - if (status != KBrsrSuccess) { - error = status; - (void) LoadDeckError(thisObj, tmp_decoder, NULL, url); - return error; - } - - /* - * Temporarily set thisObj->decoder to tmp_decoder so the access - * check can be done - */ - thisObj->decoder = tmp_decoder; - - status = NW_Wml_AccessControl(thisObj, url); - if (status != KBrsrSuccess) { - if (status == KBrsrOutOfMemory) { - error = KBrsrOutOfMemory; - } else { - error = KBrsrWmlbrowserNoAccess; - } - (void) LoadDeckError(thisObj, tmp_decoder, old_decoder, url); - return error; - } - - /* non - WML Spec */ - /* check for card's meta data and perform custom processing */ - if ((status = NW_Wml_HandleMetaElements(thisObj)) == KBrsrOutOfMemory) - { - (void) LoadDeckError(thisObj, tmp_decoder, old_decoder, url); - return status; - } - - card_name = NW_Str_Strchr(url, '#'); - if (card_name && NW_Str_StrcmpConst(card_name, WAE_ASC_EMPTY_STR)) - card_name++; - /* this if branch include card_name = NULL */ - status = NW_DeckDecoder_SetCardByName(thisObj->decoder, card_name); - if (status != KBrsrSuccess) { - /* Try using a NULL card_name to enforce WML 12.5.1#4c */ - status = NW_DeckDecoder_SetCardByName(thisObj->decoder, NULL); - if (status == KBrsrWmlbrowserCardNotInDeck) { - (void) LoadDeckError(thisObj, tmp_decoder, old_decoder, url); - return status; - } - } - - /* append the card name to the URL */ - if ((status = NW_DeckDecoder_GetCardName(thisObj->decoder, &card_name)) - == KBrsrSuccess) { - if(card_name) { - NW_Ucs2 *new_url = NULL; - status = NW_Url_BuildAbsUrl(url, card_name, &new_url); - NW_Str_Delete(card_name); - if (status != KBrsrSuccess) { - (void) LoadDeckError(thisObj, tmp_decoder, old_decoder, url); - return status; - } - NW_Str_Delete(url); - url = new_url; - } - } - /* Card not found is not a fatal error */ - if (status == KBrsrOutOfMemory) { - error = status; - (void) LoadDeckError(thisObj, tmp_decoder, old_decoder, url); - return error; - } - - if ( (thisObj->curr_task == GO_TASK) || (thisObj->curr_task == PREV_TASK) ) - { - /* - * Temporarily install the previous decoder so the UI can be notified - * that the old card can be destroyed - */ - thisObj->decoder = old_decoder; - if ((status = (DISPLAY_API->destroyCard)(thisObj->browser_app)) - != KBrsrSuccess) - { - (void) LoadDeckError(thisObj, tmp_decoder, NULL, url); - return status; - } - /* Restore the new decoder */ - thisObj->decoder = tmp_decoder; - } - - if (thisObj->curr_task == GO_TASK) - { - status = NW_Wml_ProcessGo(thisObj, url); - } - else if(thisObj->curr_task == PREV_TASK) - { - status = NW_Wml_ProcessPrev(thisObj, url); - } - else - { - status = KBrsrFailure; - } - /* free the old decoder as we have loaded the new deck */ - /* Note: NW_DeckDecoder_Delete() handles NULL pointers */ - NW_DeckDecoder_Delete(old_decoder); - - /* Note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(url); - - if (status != KBrsrSuccess) /* display error and cleanup */ - { - /* blow up the card here as the user agent might have reported errors - when displaying the card */ - (void) (DISPLAY_API->destroyCard)(thisObj->browser_app); - - /* Clean up variable state, per WML 12.5.5 */ - NW_Wml_ClearTaskVariables(thisObj); - } - - if (status != KBrsrSuccess) - { - NW_DeckDecoder_Delete(thisObj->decoder); - thisObj->decoder = NULL; - } - return status; -} - - -/* Retrieve the absolute URL for a image element. This function is called when - * only SRC exist. - * NOTE: The ret_string parameter has to be freed by the caller by invoking - * the function NW_Wml_FreeString - * RETURN KBrsrSuccess - URL exits - * KBrsrBadInputParam - element not found or bad input param - * KBrsrOutOfMemory - * NW_STAT_* - propagates fatal return value from CB calls - */ -TBrowserStatusCode NW_Wml_GetImageUrl(NW_Wml_t *thisObj, NW_Uint16 imgel_id, NW_Ucs2 **ret_string) -{ - NW_Wml_Attr_t image_attr; - - image_attr = SRC_ATTR; - return (GetImageUrl(thisObj, imgel_id, image_attr, ret_string)); -} - -/* Retrieve the absolute URL for a image element. This function is called when - * LOCALSRC attribute exist, it should be loaded first. - * NOTE: The ret_string parameter has to be freed by the caller by invoking - * the function NW_Wml_FreeString - * RETURN KBrsrSuccess - URL exits - * KBrsrBadInputParam - element not found or bad input param - * KBrsrOutOfMemory - * NW_STAT_* - propagates fatal return value from CB calls - */ - -TBrowserStatusCode NW_Wml_GetLocalImageUrl(NW_Wml_t *thisObj, NW_Uint16 imgel_id, NW_Ucs2 **ret_string) -{ - NW_Wml_Attr_t image_attr; - - image_attr = LOCALSRC_ATTR; - return (GetImageUrl(thisObj, imgel_id, image_attr, ret_string)); -} - - -static TBrowserStatusCode GetImageUrl(NW_Wml_t *thisObj, NW_Uint16 imgel_id, NW_Wml_Attr_t image_attr, - NW_Ucs2 **ret_string) -{ - NW_Int32 id = -1; - NW_Wml_Element_t *el = 0; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status = KBrsrFailure; - NW_Ucs2 *url = 0; - - if ((thisObj == NULL) || (id = NW_Wml_FindEl(thisObj, imgel_id)) == -1) - return KBrsrBadInputParam; - - el = thisObj->card_els[id]; - NW_ASSERT(el != NULL); - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - if (el_type == IMAGE_ELEMENT) - { - /* get image-attribute */ - if ( (status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, image_attr, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &url)) == KBrsrOutOfMemory ) - { - return status; - } - - /* Get url*/ - if (url) - { - status = NW_Wml_GetFullUrl(thisObj, url, ret_string); - NW_Str_Delete(url); - } - } - else - { - status = KBrsrBadInputParam; - } - return status; -} - -TBrowserStatusCode -NW_Wml_CancelAllLoads (NW_Wml_t *thisObj) -{ - NW_HED_DocumentNode_t* rootNode; - - rootNode = NW_HED_DocumentNode_GetRootNode (thisObj->browser_app); - (void) NW_HED_DocumentNode_Cancel (rootNode, NW_HED_CancelType_NewRequest); - - return KBrsrSuccess; -} - -void NW_Wml_HandleError (NW_Wml_t *thisObj, NW_Int16 errorClass, NW_Int16 error) -{ - NW_HED_DocumentNode_t* docNode; - - docNode = NW_HED_DocumentNodeOf (thisObj->browser_app); - - if (error == KBrsrWmlbrowserCardNotInDeck) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - - docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (docNode); - - (void) docRoot->appServices->errorApi. - notifyError (docRoot, (TBrowserStatusCode) error, NULL, NULL); - return; - } - - NW_HED_DocumentNode_HandleError (docNode, NULL, errorClass, error); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/WMLWae.cpp --- a/webengine/wmlengine/src/wml/src/WMLWae.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,752 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides an interface to the browser. This module -* has mostly glue logic to integrate various components of Rainbow. -* It exposes a initialization function that create and intializes -* the WAE components. -* -*/ - - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nwx_logger.h" -#include "wml_scrproxy.h" -#include "wml_core.h" -#include "nwx_ctx.h" -#include "wml_decoder.h" -#include "nw_loadreq.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "nw_wml1x_epoc32contenthandler.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" -#include "CReferrerHelper.h" - -#include "urlloader_urlloaderint.h" - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/***************************************************************** - - Name: NW_WaeUsrAgent_New() - - Description: Create and initialize a new wae user agent - - Parameters: - - Return Value: pointer to the wae user agent - -******************************************************************/ -NW_WaeUsrAgent_t* NW_WaeUsrAgent_New() -{ - NW_WaeUsrAgent_t *waeUsrAgent = NULL; - - waeUsrAgent = (NW_WaeUsrAgent_t*) NW_Mem_Malloc(sizeof(NW_WaeUsrAgent_t)); - if (waeUsrAgent != NULL) { - waeUsrAgent->wml = NULL; - waeUsrAgent->scrProxy = NULL; - waeUsrAgent->authApi = NULL; - waeUsrAgent->loadProgApi = NULL; - waeUsrAgent->errorApi = NULL; - waeUsrAgent->wtaiApi = NULL; - waeUsrAgent->uiCtx = NULL; - waeUsrAgent->evLogApi = NULL; - waeUsrAgent->userRedirection = NULL; - } - return waeUsrAgent; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_Free() - - Description: Free the Wae user agent. This function will shutdown the - URL Loader, WML Interpreter, Image Loader and the script proxy. - - Parameters: pointer to the wae user agent - - Return Value: - -******************************************************************/ -void NW_WaeUsrAgent_Free(NW_WaeUsrAgent_t *waeUsrAgent) -{ - if (waeUsrAgent != NULL) { - if (waeUsrAgent->scrProxy != NULL) { - NW_ScrProxy_Free(waeUsrAgent->scrProxy); - } - - NW_Mem_Free(waeUsrAgent); - } - - return; -} - -/************************************************************************ - Function: NW_Wae_UnRegisterWml - Purpose: Register the wml interpreter with the wae user agent. - - Parameters: - wae - wae browser - wml - pointer to the wml interpreter - - Return Values:Return Values:KBrsrSuccess - KBrsrOutOfMemory -**************************************************************************/ -TBrowserStatusCode NW_Wae_RegisterWml(NW_WaeUsrAgent_t *wae, NW_Wml_t *wml) -{ - NW_ASSERT(wae != NULL); - NW_ASSERT(wml != NULL); - wae->wml = wml; - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Wae_UnRegisterWml - Purpose: Unregister the wml interpreter with the wae user agent - - Parameters: - wae - wae browser - - Return Values:KBrsrSuccess - KBrsrNotFound if not previously registered -**************************************************************************/ -TBrowserStatusCode NW_Wae_UnRegisterWml(NW_WaeUsrAgent_t *wae) -{ - if (wae) - { - wae->wml = NULL; - } - - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Wae_RegisterWmlScriptProxy - Purpose: Register the script proxy with the wae user agent - - Parameters: - wae - wae browser - - Return Values:KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode NW_Wae_RegisterWmlScriptProxy(NW_WaeUsrAgent_t *wae, - NW_ScrProxy_t *scrProxy) -{ - wae->scrProxy = scrProxy; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_Wae_UnRegisterWmlScriptProxy - Purpose: UnRegister the script proxy with the wae user agent - - Parameters: - wae - wae browser - - Return Values:KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode NW_Wae_UnRegisterWmlScriptProxy(NW_WaeUsrAgent_t *wae) -{ - wae->scrProxy = NULL; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_RegisterGenDlg - Purpose: Register callback functions for generic dialogs. - - Parameters: - wae - wae browser - genDlgapi - generic dialogs api - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_RegisterGenDlg(NW_WaeUsrAgent_t *wae, - const NW_GenDlgApi_t *genDlgapi) -{ - wae->genDlgApi = genDlgapi; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_UnRegisterGenDlg - Purpose: UnRegister callback functions for generic dialogs. - - Parameters: - wae - wae browser - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_UnRegisterGenDlg(NW_WaeUsrAgent_t *wae) -{ - wae->genDlgApi = NULL; - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_GetScript() - - Description: Get a pointer to the WML Script Proxy. The caller of - this function should not free the returned pointer. - - Parameters: *wae - pointer to the wae browser - - Return Value: pointer to the script proxy - -******************************************************************/ -NW_ScrProxy_t * NW_WaeUsrAgent_GetScript(NW_WaeUsrAgent_t *wae) -{ - if (wae != NULL) { - return wae->scrProxy; - } - return NULL; -} - -/***************************************************************** - - Name: NW_Wml_CanNavigateToUri() - - Description: Is it allowed to navigate to a new card. This behaviour - is defined by the wml scripts running asynchronously. - If a script has not completed and the user tries to - navigate to a new card, the navigation is canceled. - - Parameters: result - result from the user. - - Return Value: KBrsrSuccess - KBrsrWaeNavigationCancelled - -******************************************************************/ -TBrowserStatusCode NW_Wml_CanNavigateToUri() -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool running; - NW_WaeUsrAgent_t *wae; - - wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - - /* The script proxy registers dynamically in Rainbow 3.0 */ - if (!wae->scrProxy) return KBrsrSuccess; - - /* check if a script is running */ - if ((status = NW_ScrProxy_IsScriptRunning(wae->scrProxy, &running)) - == KBrsrSuccess) { - if (running == NW_TRUE) { - status = KBrsrWaeNavigationCancelled; - } - } - - return status; -} - -/***************************************************************** - - Name: NW_Wml_DoPrevLoad() - - Description: Sets History to the previous entry and issues Url load request. - Returns KBrsrFailure if no previous entry - - Parameters: Wml Content handler pointer - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory - -******************************************************************/ -TBrowserStatusCode NW_Wml_DoPrevLoad(void *wml1xCH) -{ - NW_HED_HistoryEntry_t *prevEntry; - NW_HED_DocumentRoot_t *dr; - const NW_HED_UrlRequest_t *urlRequest; - TBrowserStatusCode status = KBrsrFailure; - - dr = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (wml1xCH); - prevEntry = NW_HED_HistoryStack_GetEntry(dr->historyStack, - NW_HED_HistoryStack_Direction_Previous); - if (prevEntry) { - urlRequest = NW_HED_HistoryEntry_GetUrlRequest(prevEntry); - - if ((KBrsrSuccess == - NW_HED_UrlRequest_SetReason((NW_HED_UrlRequest_t*)urlRequest, - NW_HED_UrlRequest_Reason_DocPrev)) && - (KBrsrSuccess == - NW_HED_UrlRequest_SetCacheMode((NW_HED_UrlRequest_t*)urlRequest, - NW_CACHE_HISTPREV))) { - /* - ** update the history to point to the new current entry. It is important - ** that this is done BEFORE StartRequest. - */ - NW_HED_HistoryStack_SetCurrent(dr->historyStack, - NW_HED_HistoryStack_Direction_Previous); - - /* Do the load */ - status = NW_HED_DocumentRoot_StartRequest(dr, - NW_HED_DocumentNodeOf( dr ), // top level request is owned by document root. - urlRequest, - (void *)&NW_Wml1x_Epoc32ContentHandler_Class ); - } - } - return status; -} - -/***************************************************************** - - Name: NW_Wml_UrlLoad() - - Description: Load a Url. - - Parameters: url - url to load - postfields - pointer to postfield data struct, - OR NULL, if no postfield data exists - - Return Value: KBrsrSuccess - KBrsrFailure - -******************************************************************/ -TBrowserStatusCode NW_Wml_UrlLoad(void *wml1xCH, - const NW_Ucs2 *url, - NW_NVPair_t *postfields, - const NW_Cache_Mode_t cacheMode, - NW_Ucs2* referrerUrl) -{ - NW_Text_UCS2_t *urlObj = NULL; - NW_HED_UrlRequest_t *urlRequest = NULL; - NW_Ucs2 *req_url = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_DocumentRoot_t *dr; - - dr = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (wml1xCH); - - if ( !NW_NVPair_IsEmpty(postfields) ) { - status = NW_LoadReq_BuildQuery(url, postfields, &req_url, NULL, NULL); - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - } else { - req_url = NW_Str_Newcpy(url); - if (req_url == NULL) { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - } - - urlObj = NW_Text_UCS2_New(req_url, 0, 0); - if (!urlObj) { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - urlRequest = NW_HED_UrlRequest_New(NW_TextOf (urlObj), - NW_URL_METHOD_GET, - NULL, NULL, - NW_HED_UrlRequest_Reason_DocLoad, - NW_HED_UrlRequest_LoadNormal, - NW_UrlRequest_Type_Any); - - if (referrerUrl) { - SetReferrerHeader(urlRequest, referrerUrl); - } - - if (!urlRequest) { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - (void)NW_HED_UrlRequest_SetCacheMode(urlRequest, cacheMode); - - - status = NW_HED_DocumentRoot_StartRequest(dr, - NW_HED_DocumentNodeOf( dr ), // top level request is owned by document root. - urlRequest, - (void *)&NW_Wml1x_Epoc32ContentHandler_Class ); - - if (status == KBrsrSuccess) { - urlRequest = NULL; /* To prevent freeing it when exiting the function */ - } - -NW_CATCH_ERROR - NW_Str_Delete(req_url); - NW_Object_Delete(urlObj); - if (urlRequest) { - NW_Object_Delete (urlRequest); - } - return status; -} - -/***************************************************************** - - Name: NW_Wml_HttpLoad() - - Description: Do a HTTP load. - - Parameters: usrAgent - wae browser - *url - url to load - is_method_post - HTTP method - referer - referer to the url - accept_charset - - postfields - name/value pairs - enctype - urlencoded or multipart/form-data - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrUnsupportedFormCharset - KBrsrOutOfMemory - -******************************************************************/ -TBrowserStatusCode NW_Wml_HttpLoad(void *wml1xCH, - const NW_Ucs2 *url, - NW_Bool is_method_post, - const NW_Ucs2 *referer, - const NW_Ucs2 *accept_charset, - NW_Http_Header_t *header, - NW_NVPair_t *postfields, - const NW_Ucs2 *enctype, - const NW_Cache_Mode_t cacheMode) -{ - NW_Buffer_t *body = NULL; - NW_Ucs2 *resultUrl = NULL; - NW_HED_UrlRequest_t *urlRequest = NULL; - NW_Text_UCS2_t *urlObj = NULL; - NW_Uint8 method; - TBrowserStatusCode status; - NW_WaeUsrAgent_t *wae; - NW_HED_DocumentRoot_t *dr; - - dr = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (wml1xCH); - - wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - - NW_ASSERT(wae != NULL); - NW_ASSERT(url != NULL); - - status = NW_LoadReq_Create(url, is_method_post, referer, - accept_charset, postfields, enctype, - NW_DeckDecoder_GetEncoding (wae->wml->decoder), - &header, &resultUrl, &method, &body, NULL, NULL); - - if (status != KBrsrSuccess) { - NW_THROW_ERROR(); - } - - urlObj = NW_Text_UCS2_New (resultUrl, 0, 0); - - if (!urlObj) { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - urlRequest = NW_HED_UrlRequest_New(NW_TextOf (urlObj), - method, - header, - body, - NW_HED_UrlRequest_Reason_DocLoad, - NW_HED_UrlRequest_LoadNormal, - NW_UrlRequest_Type_Any); - - if (!urlRequest) { - UrlLoader_HeadersFree(header);//R->ul - NW_Buffer_Free(body); - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - (void)NW_HED_UrlRequest_SetCacheMode(urlRequest, cacheMode); - /* Do the load */ - status = NW_HED_DocumentRoot_StartRequest(dr, - NW_HED_DocumentNodeOf( dr ), // top level request is owned by document root. - urlRequest, - (void *)&NW_Wml1x_Epoc32ContentHandler_Class ); - if (status == KBrsrSuccess) { - urlRequest = NULL; /* To prevent freeing it when exiting the function */ - } - -NW_CATCH_ERROR - NW_Str_Delete(resultUrl); - NW_Object_Delete(urlObj); - if (urlRequest) { - NW_Object_Delete (urlRequest); - } - return status; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_DlgListSelect() - - Purpose: Call the list select dialog box. - - Parameters: - wae - wae browser - data - structure to pass to the dialog - callbackCtx - callback context - callback - the callback to cal after the dialog box exits - - Return Values: - KBrsrSuccess - KBrsrNotImplemented - -******************************************************************/ -TBrowserStatusCode NW_WaeUsrAgent_DlgListSelect(NW_WaeUsrAgent_t *wae, - NW_Dlg_ListSelect_t *data, - void *callbackCtx, - NW_Dlg_ListSelectCB_t callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_ASSERT(wae != NULL); - if (wae->genDlgApi != NULL) { - NW_ASSERT(wae->genDlgApi->DialogListSelect != NULL); - (wae->genDlgApi->DialogListSelect) (data, callbackCtx, callback); - } else { - status = KBrsrNotImplemented; - NW_ASSERT(0); /* dialog not implemented. */ - } - return status; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_DlgPrompt() - - Purpose: Call the prompt dialog box. - - Parameters: - wae - wae browser - data - structure to pass to the dialog - callbackCtx - callback context - callback - the callback to cal after the dialog box exits - - Return Values: - KBrsrSuccess - KBrsrNotImplemented - -******************************************************************/ -TBrowserStatusCode NW_WaeUsrAgent_DlgPrompt(NW_WaeUsrAgent_t *wae, - NW_Dlg_Prompt_t *data, - void *callbackCtx, - NW_Dlg_PromptCB_t callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_ASSERT(wae != NULL); - if (wae->genDlgApi != NULL) { - NW_ASSERT(wae->genDlgApi->DialogPrompt != NULL); - (wae->genDlgApi->DialogPrompt) (data, callbackCtx, callback); - } else { - status = KBrsrNotImplemented; - NW_ASSERT(0); /* dialog not implemented. */ - } - return status; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_DlgInputPrompt() - - Purpose: Call the input prompt dialog box. - - Parameters: - wae - wae browser - data - structure to pass to the dialog - callbackCtx - callback context - callback - the callback to cal after the dialog box exits - - Return Values: - KBrsrSuccess - KBrsrNotImplemented - -******************************************************************/ -TBrowserStatusCode NW_WaeUsrAgent_DlgInputPrompt(NW_WaeUsrAgent_t *wae, - NW_Dlg_InputPrompt_t *data, - void *callbackCtx, - NW_Dlg_InputPromptCB_t callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_ASSERT(wae != NULL); - if (wae->genDlgApi != NULL) { - NW_ASSERT(wae->genDlgApi->DialogInputPrompt != NULL); - (wae->genDlgApi->DialogInputPrompt) (data, callbackCtx, callback); - } else { - status = KBrsrNotImplemented; - NW_ASSERT(0); /* dialog not implemented. */ - } - return status; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_RegisterError() - - Purpose: register callbacks for error handling. - - Parameters: - wae - wae browser - errorApi - error api - - Return Values: - KBrsrSuccess - -******************************************************************/ -TBrowserStatusCode NW_WaeUsrAgent_RegisterError(NW_WaeUsrAgent_t *wae, - const NW_ErrorApi_t *errorApi) -{ - NW_ASSERT(wae != NULL); - NW_ASSERT(errorApi != NULL); - wae->errorApi = errorApi; - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_RegisterLoadProgress() - - Purpose: register callbacks for error handling. - - Parameters: - wae - wae browser - errorApi - error api - - Return Values: - KBrsrSuccess - -******************************************************************/ -TBrowserStatusCode NW_WaeUsrAgent_RegisterLoadProgress(NW_WaeUsrAgent_t *wae, - const NW_UrlLoadProgressApi_t *loadProgApi) -{ - NW_ASSERT(wae != NULL); - NW_ASSERT(loadProgApi != NULL); - wae->loadProgApi = loadProgApi; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_RegisterEvLog - Purpose: Register event log API. - - Parameters: - wae - wae browser - evLogApi - event log api - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_RegisterEvLog(NW_WaeUsrAgent_t *wae, - const NW_EvLogApi_t *evLogApi) -{ - NW_ASSERT(wae != NULL); - NW_ASSERT(evLogApi != NULL); - wae->evLogApi = evLogApi; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_UnRegisterEvLog - Purpose: UnRegister event log API. - - Parameters: - wae - wae browser - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_UnRegisterEvLog(NW_WaeUsrAgent_t *wae) -{ - wae->evLogApi = NULL; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_RegisterUserRedirection - Purpose: Register callback functions for user redirection. - - Parameters: - wae - wae browser - authapi - NW_UserRedirectionApi_t - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_RegisterUserRedirection(NW_WaeUsrAgent_t *wae, - const NW_UserRedirectionApi_t *userRedirectionapi) -{ - wae->userRedirection = userRedirectionapi; - return KBrsrSuccess; -} - -/************************************************************************ - Function: NW_WaeUsrAgent_UnRegisterUserRedirection - Purpose: UnRegister callback functions for user redirection. - - Parameters: - wae - wae browser - - Return Values: KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode -NW_WaeUsrAgent_UnRegisterUserRedirection(NW_WaeUsrAgent_t *wae) -{ - wae->userRedirection = NULL; - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_WaeUsrAgent_GetEvLog - - Description: Return pointer to EvLogApi of wae - - Parameters: wae pointer - - Return Value: EvLogApi of wae - -*****************************************************************/ -const NW_EvLogApi_t *NW_WaeUsrAgent_GetEvLog(NW_WaeUsrAgent_t *wae) -{ - return (wae->evLogApi); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/WMLhistory.cpp --- a/webengine/wmlengine/src/wml/src/WMLhistory.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,396 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_history.c $ - - Purpose: - - Class: WmlBrowser - - Maintain browser's history state logic -*/ - -#include "wml_history.h" - -#include "nwx_string.h" -#include "nwx_http_header.h" -#include "nw_evlog_api.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "nw_hed_documentroot.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - - -/*------------------------------------------------------------------------ - * StringCopy -- makes a copy of src string, puts its address in *dest, - * and returns true iff the copy was successful (failure means we ran - * out of memory). If src is NULL, the 'copy' just consists of a copy - * of the NULL pointer, and is considered successful. - -----------------------------------------------------------------------*/ -static NW_Bool StringCopy(NW_Ucs2 **dest, NW_Ucs2 *src) -{ - if (src) { - *dest = NW_Str_Newcpy(src); - if (*dest != NULL) { - return NW_TRUE; - } else { - return NW_FALSE; - } - } else { - *dest = NULL; - return NW_TRUE; - } -} - -/* Create a new history entry object */ -static NW_Wml_History_t *Wml_HistoryNewEntry(NW_Ucs2 *req_url) -{ - NW_Wml_History_t *entry; - - /* Note: NULL args are acceptable */ - entry = (NW_Wml_History_t*) NW_Mem_Malloc(sizeof(NW_Wml_History_t)); - if (entry != NULL) { - if (StringCopy(&(entry->req_url), req_url) == NW_TRUE) { - return entry; - } else { - NW_Str_Delete(entry->req_url); - entry->req_url = NULL; - } - NW_Mem_Free(entry); - } - - return NULL; -} - -/* Creates a copy of a Wml History entry using information from HED history. - Returns a pointer to the new entry or NULL when failed.*/ -static NW_Wml_History_t *HEDtoWmlHistoryEntry(NW_HED_HistoryEntry_t *entry) -{ - NW_Ucs2 *reqUrl; - NW_Wml_History_t *dest; - - reqUrl = (NW_Ucs2 *)NW_HED_UrlRequest_GetRawUrl(entry->urlRequest); - dest = Wml_HistoryNewEntry(reqUrl); - return (dest); -} - -/* Delete a history entry object */ -void NW_Wml_HistoryDeleteEntry(NW_Wml_History_t *entry) -{ - if (entry != NULL) { - NW_Str_Delete(entry->req_url); - entry->req_url = NULL; - NW_Mem_Free(entry); - } - return; -} - - -/*------------------------------------------------------------------------- - * NW_Wml_HistoryInit -- initialize the history stack - ------------------------------------------------------------------------*/ -void NW_Wml_HistoryInit(NW_Wml_t *wml) -{ - NW_ASSERT(wml != NULL); - - wml->history_resp_url = NULL; - return; -} - - -/*-------------------------------------------------------------------------- - * NW_Wml_HistoryClear -- clear all history entries, but preserve the - * current entry - -------------------------------------------------------------------------*/ - -void NW_Wml_HistoryClear(NW_Wml_t *wml) -{ - NW_HED_DocumentRoot_t *dr; - NW_HED_HistoryStack_t *history; - NW_HED_HistoryEntry_t *entry; - - NW_ASSERT(wml != NULL); - - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - - history = NW_HED_DocumentRoot_GetHistoryStack (dr); - if (history == NULL) { - return; - } - /* remove the current entry from the history */ - entry = NW_HED_HistoryStack_RemoveEntry (history, NW_HED_HistoryStack_Direction_Current); - if (entry == NULL) { - return; - } - - /* delete all of the remaining entries */ - NW_HED_HistoryStack_DeleteAll (history); - - /* add the current entry back */ - NW_HED_HistoryStack_PushEntry (history, entry); -} - - -/*--------------------------------------------------------------------------- - * NW_Wml_HistoryForIntradeckLoad - * - * Crates a new entry in the global history to reflect intradeck load - * -------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_HistoryPushIntraDeckLoad(NW_Wml_t *wml, - NW_Ucs2 *reqUrl, - NW_Ucs2 *respUrl) -{ - NW_HED_DocumentRoot_t *dr; - NW_HED_ContentHandler_t *thisObj; - NW_HED_HistoryEntry_t *newEntry = NULL; - NW_Text_UCS2_t requestUrl; - NW_Text_UCS2_t responseUrl; - TBrowserStatusCode status = KBrsrOutOfMemory; - - NW_ASSERT(wml != NULL); - NW_ASSERT(reqUrl != NULL); - NW_ASSERT(respUrl != NULL); - - /* get the document-root and content-handler */ - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - NW_THROWIF_NULL (dr); - NW_THROWIF_NULL (thisObj = NW_HED_ContentHandlerOf (wml->browser_app)); - - /* wrap the urls as NW_Text_t */ - NW_THROWIF_ERROR (status = NW_Text_UCS2_Initialize (&requestUrl, reqUrl, NW_Str_Strlen (reqUrl), 0)); - NW_THROWIF_ERROR (status = NW_Text_UCS2_Initialize (&responseUrl, respUrl, NW_Str_Strlen (respUrl), 0)); - - /* create the new entry */ - NW_THROWIF_NULL (newEntry = NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry (thisObj, - &requestUrl, &responseUrl)); - - /* push the new entry on the history stack */ - NW_THROWIF_ERROR (status = NW_HED_HistoryStack_PushEntry (dr->historyStack, newEntry)); - - /* update the content handler to point to the associated history entry */ - NW_THROWIF_ERROR (status = NW_HED_ContentHandler_SetAssociatedHistoryEntry (thisObj, newEntry)); - - return KBrsrSuccess; - -NW_CATCH_ERROR - - NW_Object_Delete (newEntry); - return status; -} - - -/*-------------------------------------------------------------------------- - * NW_Wml_HistoryToPrev - * RETURN: KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - * Returns the current history entry in NW_Wml_History_t structure (when wmlEntry!=0). - * Return (1)value KBrsrSuccess indicates a successful move to the previous - * entry in the HED history and (2)wmlEntry when requested. - * KBrsrFailure indicates an absence of the previous entry. - * KBrsrOutOfMemory is returned when not enough memory to create wmlEntry - * - * Note -- the 'wmlEntry' argument may be NULL, indicating that the caller - * only wants to move to the previous entry. - *------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_HistoryToPrev(NW_Wml_t *wml, NW_Wml_History_t **wmlEntry) -{ - NW_HED_DocumentRoot_t *dr; - TBrowserStatusCode nwStatus = KBrsrSuccess; - - NW_ASSERT(wml != NULL); - - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - - if (wmlEntry) - { - NW_HED_HistoryEntry_t *HEDhistEntry; - HEDhistEntry = NW_HED_HistoryStack_GetEntry (dr->historyStack, - NW_HED_HistoryStack_Direction_Current); - NW_ASSERT(HEDhistEntry); - - *wmlEntry = HEDtoWmlHistoryEntry(HEDhistEntry); - if (*wmlEntry == NULL) { - nwStatus = KBrsrOutOfMemory; - } - } - - if (nwStatus == KBrsrSuccess) { - nwStatus = NW_HED_HistoryStack_SetCurrent(dr->historyStack, - NW_HED_HistoryStack_Direction_Previous); - } - return nwStatus; -} - - -/*--------------------------------------------------------------------- - * sets the history_resp_url member of NW_Wml_t. This is separate from - * SetLastLoad, because at the time SetLastLoad is called, we don't - * know what the response url will be (could be redirected). - */ -TBrowserStatusCode NW_Wml_HistorySetResponseUrl(NW_Wml_t* wml, NW_Ucs2 *resp_url) -{ - NW_ASSERT(wml != NULL); - NW_ASSERT(resp_url != NULL); - - NW_Str_Delete(wml->history_resp_url); - wml->history_resp_url = NW_Str_Newcpy(resp_url); - - if (wml->history_resp_url == NULL) { - return KBrsrOutOfMemory; - } else { - return KBrsrSuccess; - } -} - -/*---------------------------------------------------------------------- - * Gets the 'req_url member of top-of-stack, and makes a new copy of it - * in the mem_scope given. The address is return in *ret_string; if the req_url - * was null, *ret_string is also null. - ---------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_HistoryGetRequestUrl(NW_Wml_t *wml, - NW_Ucs2 **req_url) -{ - NW_Ucs2 *url; - NW_HED_DocumentRoot_t *dr; - NW_HED_HistoryEntry_t *currEntry; - TBrowserStatusCode nwStatus = KBrsrSuccess; - - NW_ASSERT(wml != NULL); - NW_ASSERT(req_url != NULL); - *req_url = NULL; - - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - - currEntry = NW_HED_HistoryStack_GetEntry (dr->historyStack, - NW_HED_HistoryStack_Direction_Current); - NW_ASSERT(currEntry); - - url = (NW_Ucs2 *)NW_HED_UrlResponse_GetRawUrl(currEntry->urlResponse); - if (url) { - *req_url = NW_Str_Newcpy(url); - if (!*req_url) { - nwStatus = KBrsrOutOfMemory; - } - } - return nwStatus; -} - -/*---------------------------------------------------------------------- - * Gets the history_resp_url member of NW_Wml_t, and makes a new copy of it - * in the mem_scope given. The address is return in *resp_url; if the - * response_url was null, *resp_url is also null. - ---------------------------------------------------------------------*/ - -TBrowserStatusCode NW_Wml_HistoryGetResponseUrl(NW_Wml_t *wml, - NW_Ucs2 **resp_url) -{ - NW_ASSERT(wml != NULL); - NW_ASSERT(resp_url != NULL); - - if (wml->history_resp_url != NULL) { - *resp_url = NW_Str_Newcpy(wml->history_resp_url); - if (*resp_url == NULL) - return KBrsrOutOfMemory; - } else { - *resp_url = NULL; - } - - return KBrsrSuccess; -} - -/*---------------------------------------------------------------------- - * Gets the responseUrl member of the previous-history-entry, and makes a new copy of it - * in the mem_scope given. The address is return in *resp_url; if the - * response_url was null, *resp_url is also null. - ---------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_HistoryGetPrevResponseUrl(NW_Wml_t *wml, - NW_Ucs2 **resp_url) -{ - NW_Ucs2 *url; - NW_HED_DocumentRoot_t *dr; - NW_HED_HistoryEntry_t *currEntry; - - NW_ASSERT(wml != NULL); - NW_ASSERT(resp_url != NULL); - *resp_url = NULL; - - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - - currEntry = NW_HED_HistoryStack_GetEntry (dr->historyStack, - NW_HED_HistoryStack_Direction_Previous); - if (currEntry == NULL) { - return KBrsrFailure; - } - - url = (NW_Ucs2 *)NW_HED_UrlResponse_GetRawUrl(currEntry->urlResponse); - if (url) { - *resp_url = NW_Str_Newcpy(url); - if (!*resp_url) { - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; -} - - -/*------------------------------------------------------------------------------- - * NW_Wml_HistoryPrevCard - * - * RETURN: KBrsrSuccess -- there is a previous card, and you got info about it - * KBrsrFailure -- there is no previous card, and you didn't get much - * KBrsrOutOfMemory -- you're out of memory - * - * Note -- you get a mutated copy of the history-stack entry in NW_Wml_History_t format. - * Any non-null string pointers are replaced by pointers to brand new copies of the - * original strings, in the mem_scope of your choice. - ------------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_HistoryPrevCard(NW_Wml_t *wml, - NW_Wml_History_t **entry) -{ - NW_HED_DocumentRoot_t *dr; - NW_HED_HistoryEntry_t *prevEntry; - TBrowserStatusCode nwStatus = KBrsrSuccess; - - NW_ASSERT(wml != NULL); - NW_ASSERT(entry != NULL); - - dr = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (wml->browser_app); - - prevEntry = NW_HED_HistoryStack_GetEntry(dr->historyStack, - NW_HED_HistoryStack_Direction_Previous); - if (prevEntry == NULL) { - nwStatus = KBrsrFailure; - *entry = NULL; - } - else { - *entry = HEDtoWmlHistoryEntry(prevEntry); - if (*entry == NULL) { - nwStatus = KBrsrOutOfMemory; - } - } - return nwStatus; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/nw_evlog_api.c --- a/webengine/wmlengine/src/wml/src/nw_evlog_api.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: nw_evlog_api.c -** Part of: WML Interpreter -** Description: Provides an interface to event log api. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "nw_evlog_api.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -/***************************************************************** - Name: NW_EvLog_Log - - Description: Called to log events in content handlers. Call the - appropriate logging function in event log API based - on the index argument. - - Parameters: - evLogApi - in: data structure that contains function pointers - to logging functions. - index - in: index of logging function to call. - - ... - in: any other parameters for the specific logging function. - - Return Value: - None. Since this is a logging function, it returns without logging - if it encounters any problems. We don't want logging to bring down - the system. -******************************************************************/ -void NW_EvLog_Log( const NW_EvLogApi_t* evLogApi, NW_EvLog_Index_t index, ... ) -{ - /*lint --e{415, 416} Likely creation of out-of-bounds pointer, Likely access of out-of-bounds pointer*/ - va_list argp; - - if ( evLogApi == NULL ) - { - /* No functions to call. Just return. */ - return; - } - - va_start(argp, index); - - switch (index) { - case NW_EvLog_CONTENT_REQUEST: - //Requests are logged in the loaders - break; - - case NW_EvLog_CONTENT_RECEIVED: - //Responses are logged in the loaders - break; - - case NW_EvLog_VARIABLE_CONTEXT_NEW: - if ( evLogApi->logVariableContextNew != NULL ) { - (void)evLogApi->logVariableContextNew(); - } - break; - - case NW_EvLog_HISTORY_STACK_CLEAR: - if ( evLogApi->logHistoryStackClear != NULL ) { - (void)evLogApi->logHistoryStackClear( ); - } - break; - - case NW_EvLog_HISTORY_PUSH: - if ( evLogApi->logHistoryPush != NULL ) { - (void)evLogApi->logHistoryPush( va_arg(argp, NW_Ucs2*) ); - } - break; - - case NW_EvLog_HISTORY_POP: - if ( evLogApi->logHistoryPop != NULL ) { - (void)evLogApi->logHistoryPop( ); - } - break; - - case NW_EvLog_HISTORY_BACK: - if ( evLogApi->logHistoryBack != NULL ) { - (void)evLogApi->logHistoryBack( ); - } - break; - - case NW_EvLog_HISTORY_FORWARD: - if ( evLogApi->logHistoryForward != NULL ) { - (void)evLogApi->logHistoryForward( ); - } - break; - - case NW_EvLog_SET_VAR: - if ( evLogApi->logSetVar != NULL ) { - NW_Ucs2* name = va_arg(argp, NW_Ucs2*); - NW_Ucs2* value = va_arg(argp, NW_Ucs2*); - (void)evLogApi->logSetVar( name, value ); - } - break; - - case NW_EvLog_CACHE_ADD: - if ( evLogApi->logCacheAdd != NULL ) { - (void)evLogApi->logCacheAdd(va_arg(argp, NW_Ucs2*)); - } - break; - - case NW_EvLog_CACHE_REMOVE: - if ( evLogApi->logCacheRemove != NULL ) { - (void)evLogApi->logCacheRemove(va_arg(argp, NW_Ucs2*)); - } - break; - - case NW_EvLog_CACHE_CLEAR: - if ( evLogApi->logCacheClear != NULL ) { - (void)evLogApi->logCacheClear( ); - } - break; - - default: - break; /* Just return if invalid index. */ - } - - va_end(argp); - return; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_bind.c --- a/webengine/wmlengine/src/wml/src/wml_bind.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1021 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_bind.c $ - - Purpose: - - Class: WmlBrowser - - Main browser engine variable binding logic -*/ - - -#include "wml_task.h" - -#include "nwx_defs.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "wml_elm_attr.h" -#include "BrsrStatusCodes.h" - - -/* - * Forward declarations for static functions - */ -static TBrowserStatusCode BindDefaultVariables(NW_Wml_t *thisObj, NW_Wml_Element_t* el); - -static TBrowserStatusCode SetName(NW_Wml_t *thisObj, NW_Wml_Element_t* el, NW_Ucs2 **ret_string); - -static TBrowserStatusCode SetIName(NW_Wml_t *thisObj, NW_Wml_Element_t* el, NW_Ucs2 **ret_string); - -static TBrowserStatusCode SyncNameValue(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* validated_ivalue, NW_Mem_Segment_Id_t mem_scope, NW_Ucs2 **ret_string); - -static TBrowserStatusCode SyncINameValue(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* validated_name, NW_Mem_Segment_Id_t mem_scope, NW_Ucs2 **ret_string); - -static TBrowserStatusCode GetOptionValue(NW_Wml_t* thisObj, NW_Wml_Element_t* container_el, NW_Int32 option_to_match, NW_Int32 *option_count, NW_Ucs2 **ret_string); - -static TBrowserStatusCode GetOptionValueSize(NW_Wml_t* thisObj, NW_Wml_Element_t* container_el, NW_Int32 option_to_match, NW_Int32 *option_count, NW_Int32 *ret_size); - -static TBrowserStatusCode GetOptionValueIndex(NW_Wml_t* thisObj, NW_Wml_Element_t* container_el, NW_Ucs2* name, NW_Int32 * option_count, NW_Int32 *ret_index); - - -/* - * process WML container for INPUT and SELECT elems. - * apply their NAME and INAME attr variables to the current browser context - * - * RECURSIVE - * - * RETURN: KBrsrSuccess - * KBrsrFailure - propagated from below - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_ApplyContainedInternalVariables(NW_Wml_t* thisObj, - NW_Wml_Element_t* container) -{ - NW_Wml_Element_t el; - TBrowserStatusCode status = KBrsrSuccess; - NW_DeckDecoderIter_t iter; - - NW_ASSERT(thisObj); - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container) != KBrsrSuccess) - return KBrsrSuccess; - - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - if (el_type == INPUT_ELEMENT || el_type == SELECT_ELEMENT) - { - status = BindDefaultVariables(thisObj, &el); - if (status == KBrsrOutOfMemory) - return status; - } - else if(el_type == P_ELEMENT || el_type == FIELDSET_ELEMENT) - { - status = NW_Wml_ApplyContainedInternalVariables(thisObj, &el); - if (status == KBrsrOutOfMemory) - return status; - } - else if (el_type == UNKNOWN_ELEMENT) - { - /* - * If this unknown element has content, recurse on it - */ - if (NW_DeckDecoder_HasContent(thisObj->decoder, &el)) - { - status = NW_Wml_ApplyContainedInternalVariables(thisObj, &el); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - } - } - } - - return status; -} - - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - */ -static TBrowserStatusCode BindDefaultVariables(NW_Wml_t *thisObj, - NW_Wml_Element_t* el) -{ - NW_Bool res = NW_FALSE; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status; - NW_Ucs2 *name = NULL; - NW_Ucs2 *value = NULL; - NW_Ucs2 *format = NULL; - NW_Ucs2 *emptyok_str = NULL; - NW_Ucs2 *value2 = NULL; - NW_Ucs2 *iname = NULL; - NW_Ucs2 *ivalue = NULL; - NW_Ucs2 *multi_str = NULL; - NW_Ucs2 *validated_value = NULL; - NW_Ucs2 *validated_ivalue = NULL; - NW_Ucs2 *syncd_iname_value= NULL; - NW_Ucs2 *syncd_name_value = NULL; - NW_Ucs2 *first_option_value = NULL; - - NW_ASSERT(thisObj); - NW_ASSERT(thisObj->decoder); - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - /* handle INPUT element */ - if (el_type == INPUT_ELEMENT) - { - NW_Uint32 publicId; - NW_WmlInput_EmptyOk_t emptyok = NW_WmlInput_EmptyOk_None; - NW_Bool partial_validation_ok; - - NW_THROWIF_ERROR(status = NW_DeckDecoder_GetDocumentPublicId(thisObj->decoder,&publicId)); - - /* initialize name value */ - if ((status = SetName(thisObj, el, &value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get NAME variable name */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get FORMAT attr value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, FORMAT_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &format)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get EMPTYOK attr value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, EMPTYOK_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &emptyok_str)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - emptyok = NW_WmlInput_EmptyOk_None; - /* if no format is specified, default for format is *M and emptyok=true. (WML-191, section 11.6.3 - emptyok) */ - if (emptyok_str == NULL && (format == NULL || *format == NULL)) - { - emptyok = NW_WmlInput_EmptyOk_True; - } - else - { - if ( emptyok_str != NULL) { - if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_TRUE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_True; - } else if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_FALSE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_False; - } - } - } - - /* set variable to 0 if it doesn't conform to INPUT FORMAT */ - partial_validation_ok = NW_FALSE; - if (format) - { - if(!NW_WmlInput_ValidateValue(value, format, emptyok, - partial_validation_ok, publicId)) - { - /* - 11.6.3 If the name variable contains a value that does not - confirm to the input mask, the user agent must unset the - value and attempt to initialize the variable with the value - attriubute. - */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &value2)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if(NW_WmlInput_ValidateValue(value2, format, emptyok, - partial_validation_ok, publicId)) - { - status = NW_Wml_SetVar(thisObj, name, value2); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - else - { - NW_Wml_UnsetVar(thisObj, name); - } - } - } - res = NW_TRUE; - } - /* handle SELECT element */ - else if (el_type == SELECT_ELEMENT) - { - NW_Wml_Select_Type_e type = SINGLE_SELECT; - - /* check if multiple selection, default is false */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, MULTIPLE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &multi_str)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (multi_str && !NW_Str_StrcmpConst(multi_str, WAE_ASC_TRUE_STR)) - type = MULTIPLE_SELECT; - - /* initialize iname and name values */ - if ((status = SetIName(thisObj, el, &ivalue)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = SetName(thisObj, el, &value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get INAME attribute */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, INAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &iname)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get NAME attribute */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* validate iname and name values */ - if (ivalue) - { - if ((status = NW_WmlSelect_ValidateIName_Value(thisObj, el, ivalue, - type, NW_MEM_SEGMENT_MANUAL, &validated_ivalue)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - } - if (value) - { - if ((status = NW_WmlSelect_ValidateName_Value(thisObj, el, value, - type, NW_MEM_SEGMENT_MANUAL, &validated_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - } - - /* case 1: value exists */ - if (validated_value) - { - if (name) - { - status = NW_Wml_SetVar(thisObj, name, validated_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - /* sync iname if iname is declared and not already defined */ - if (iname) - { - if ((status = SyncINameValue(thisObj, el, validated_value, - NW_MEM_SEGMENT_MANUAL, &syncd_iname_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - status = NW_Wml_SetVar(thisObj, iname, syncd_iname_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - } - - /* case 2: ivalue exists, but value doesn't */ - else if (validated_ivalue) - { - if (iname) - { - status = NW_Wml_SetVar(thisObj, iname, validated_ivalue); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - - /* sync name var if name is declared */ - if (name) - { - if ((status = SyncNameValue(thisObj, el, validated_ivalue, - NW_MEM_SEGMENT_MANUAL, &syncd_name_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - status = NW_Wml_SetVar(thisObj, name, syncd_name_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - } - /* case 3: neither ivalue or value exist */ - else - { - switch (type) - { - case MULTIPLE_SELECT: - break; - - case SINGLE_SELECT: - if (name) - { - if ((status = NW_WmlSelect_GetFirstOptionValue(thisObj, el, NW_MEM_SEGMENT_MANUAL, - &first_option_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (first_option_value) - { - status = NW_Wml_SetVar(thisObj, name, first_option_value); - } - else - { - /* None of the OPTION elements has the VALUE attribute */ - status = KBrsrSuccess; - } - - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - - if (iname) - { - NW_Ucs2 temp_str[16]; - - (void)NW_Str_StrcpyConst(temp_str, WAE_ASC_1_STR); - status = NW_Wml_SetVar(thisObj, iname, temp_str); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - break; - - default: - break; - } - } - res = NW_TRUE; - } - - if (res == NW_TRUE) - status = KBrsrSuccess; - else - status = KBrsrFailure; - - /* fall through */ - -NW_CATCH_ERROR - NW_Str_Delete(name); - NW_Str_Delete(value); - NW_Str_Delete(format); - NW_Str_Delete(emptyok_str); - NW_Str_Delete(value2); - NW_Str_Delete(iname); - - if (validated_ivalue != ivalue) { - NW_Str_Delete(validated_ivalue); - } - - NW_Str_Delete(ivalue); - NW_Str_Delete(multi_str); - NW_Str_Delete(validated_value); - NW_Str_Delete(syncd_iname_value); - NW_Str_Delete(syncd_name_value); - NW_Str_Delete(first_option_value); - - return status; -} - - -/* - * This function implements the algorithm described in section - * 11.5.2.1 - in the description of the name/value attributes. - * - * If the given select element's name attribute is defined - * and it points to a variable that is defined, return the - * the variable's value via the ret_string parameter. - * - * Else if the given select element's name attribute is defined - * and it points to a variable that is NOT defined, if the - * select element has a value attribute, a variable is created - * with the element's name and value attributes and the value - * of the value attribute is returned via the ret_string parameter. - * - * Else set *ret_string to NULL. - * - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetName(NW_Wml_t *thisObj, NW_Wml_Element_t* el, - NW_Ucs2 **ret_string) -{ - NW_Ucs2 *name = NULL; - TBrowserStatusCode status; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - - /* get NAME attribute */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - &name); - if (status == KBrsrOutOfMemory) - return status; - - *ret_string = NULL; - - if (name) - { - if ((status = NW_Wml_GetVar(thisObj, name, ret_string)) - == KBrsrOutOfMemory) - { - NW_Str_Delete(name); - return status; - } - } - - if (*ret_string == 0) - { - /* - * The select element's name attribute points to a variable - * name that is not defined. - */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - ret_string); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(name); - return status; - } - - if (name && (*ret_string != 0)) - { - /* Set the name to the select element's value attribute */ - status = NW_Wml_SetVar(thisObj, name, *ret_string); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - NW_Str_Delete(name); - return status; - } - } - } - - NW_Str_Delete(name); - return KBrsrSuccess; -} - -/* - * This function implements the algorithm described in section - * 11.5.2.1 - in the description of the iname/ivalue attributes. - * - * If the given select element's iname attribute is defined - * and it points to a variable that is defined, return the - * the variable's value via the ret_string parameter. - * - * Else if the given select element's iname attribute is defined - * and it points to a variable that is NOT defined, if the - * select element has a ivalue attribute, a variable is created - * with the element's iname and ivalue attributes and the value - * of the ivalue attribute is returned via the ret_string parameter. - * - * Else set *ret_string to NULL. - * - * - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetIName(NW_Wml_t *thisObj, NW_Wml_Element_t* el, - NW_Ucs2 **ret_string) -{ - TBrowserStatusCode status; - NW_Ucs2 *iname = NULL; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - - /* get INAME attribute */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, INAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - &iname); - if (status == KBrsrOutOfMemory) - return status; - - *ret_string = NULL; - - if (iname) - { - status = NW_Wml_GetVar(thisObj, iname, ret_string); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(iname); - return status; - } - } - - if (*ret_string == 0) - { - /* - * The select element's iname attribute points to a variable - * name that is not defined. - */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, IVALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - ret_string); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(iname); - return status; - } - - if (iname && (*ret_string != 0)) - { - status = NW_Wml_SetVar(thisObj, iname, *ret_string); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - NW_Str_Delete(iname); - return status; - } - } - } - - NW_Str_Delete(iname); - return KBrsrSuccess; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SyncINameValue(NW_Wml_t* thisObj, - NW_Wml_Element_t *select_el, - NW_Ucs2 *validated_name, - NW_Mem_Segment_Id_t mem_scope, - NW_Ucs2 **ret_string) -{ -/* large enough to format any 32-bit integer */ -#define TEMP_LENGTH 16 - - NW_Int32 option_item; - NW_Int32 count = 0; - NW_Uint32 size = 0; - NW_Bool done_processing_name = NW_FALSE; - NW_Ucs2 *start = validated_name; - NW_Ucs2 *delimiter_position = NULL; - NW_Ucs2 temp_option_value[TEMP_LENGTH]; - TBrowserStatusCode status; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - NW_ASSERT(validated_name); - - do - { - /* get next item in validated_name to match */ - delimiter_position = NW_Str_Strchr(start, ';'); - if (delimiter_position != NULL) - { - *delimiter_position = 0; - status = GetOptionValueIndex(thisObj, select_el, start, &count, - &option_item); - if (status == KBrsrOutOfMemory) - return status; - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* last item in semi-colon delimited list */ - else - { - status = GetOptionValueIndex(thisObj, select_el, start, &count, - &option_item); - if (status == KBrsrOutOfMemory) - return status; - done_processing_name = NW_TRUE; - } - - (void)NW_Str_Itoa(option_item, temp_option_value); - size += NW_Str_Strlen(temp_option_value); - count = 0; - if (!done_processing_name) - size += 1; - - } while (!done_processing_name); - - *ret_string = NW_Str_SegNew(size, mem_scope); - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - **ret_string = 0; - start = validated_name; - done_processing_name = NW_FALSE; - - do - { - /* get next item in validated_name to match */ - delimiter_position = NW_Str_Strchr(start, ';'); - if (delimiter_position != NULL) - { - *delimiter_position = 0; - status = GetOptionValueIndex(thisObj, select_el, start, &count, - &option_item); - if (status == KBrsrOutOfMemory) - return status; - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* last item in semi-colon delimited list */ - else - { - status = GetOptionValueIndex(thisObj, select_el, start, &count, - &option_item); - if (status == KBrsrOutOfMemory) - return status; - done_processing_name = NW_TRUE; - } - - (void)NW_Str_Itoa(option_item, temp_option_value); - - /* add delimiter iff not the first option_value pushed into new_name_value */ - if (NW_Str_Strlen(*ret_string)) - (void)NW_Str_StrcatConst(*ret_string, WAE_ASC_SEMICOLON_STR); - - (void)NW_Str_Strcat(*ret_string, temp_option_value); - count = 0; - - } while (!done_processing_name); - - NW_ASSERT(NW_Str_Strlen(*ret_string) <= size); - return KBrsrSuccess; -} - - -/* - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SyncNameValue(NW_Wml_t* thisObj, - NW_Wml_Element_t *select_el, - NW_Ucs2 *validated_ivalue, - NW_Mem_Segment_Id_t mem_scope, - NW_Ucs2 **ret_string) -{ - NW_Int32 option_item, option_count; - NW_Uint32 size = 0; - NW_Bool done_processing_iname = NW_FALSE; - NW_Ucs2 *start = validated_ivalue; - NW_Ucs2 *delimiter_position = NULL; - NW_Ucs2 *option_value = NULL; - TBrowserStatusCode status; - - NW_ASSERT(thisObj); - NW_ASSERT(validated_ivalue); - NW_ASSERT(ret_string); - - do - { - NW_Int32 temp_size; - - /* get next item to match */ - delimiter_position = NW_Str_Strchr(start, ';'); - if (delimiter_position != NULL) - { - *delimiter_position = 0; - option_item = NW_Str_Atoi(start); - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* last item in semi-colon delimited list */ - else - { - option_item = NW_Str_Atoi(start); - done_processing_iname = NW_TRUE; - } - - option_count = 0; - temp_size = 0; - - if ((status = GetOptionValueSize(thisObj, select_el, option_item, - &option_count, &temp_size)) - == KBrsrOutOfMemory) - { - return status; - } - - if ( (temp_size > 0) && (size > 0) ) - { - size++; /* Already an option value, increment size for ';'. */ - } - size = temp_size + size; - - } while (!done_processing_iname); - - *ret_string = NW_Str_SegNew(size, mem_scope); - if (*ret_string == NULL) - { - return KBrsrOutOfMemory; - } - - **ret_string = 0; - - if ( size > 0 ) - { - start = validated_ivalue; - done_processing_iname = NW_FALSE; - - do - { - /* get next item in to match */ - delimiter_position = NW_Str_Strchr(start, ';'); - if (delimiter_position != NULL) - { - *delimiter_position = 0; - option_item = NW_Str_Atoi(start); - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* last item in semi-colon delimited list */ - else - { - option_item = NW_Str_Atoi(start); - done_processing_iname = NW_TRUE; - } - option_count = 0; - if ((status = GetOptionValue(thisObj, select_el, option_item, - &option_count, &option_value)) - == KBrsrOutOfMemory) - return status; - - /* TODO: check that this modification doesn't create problems - KM */ - if ( option_value != NULL ) - { - /* add delimiter iff not the first option_value pushed - into ret_string */ - if (*ret_string != NULL && NW_Str_Strlen(*ret_string)) - (void)NW_Str_StrcatConst(*ret_string, WAE_ASC_SEMICOLON_STR); - - (void)NW_Str_Strcat(*ret_string, option_value); - NW_Str_Delete(option_value); - } - } while (!done_processing_iname); - NW_ASSERT(NW_Str_Strlen(*ret_string) <= size); - } - else - { - /* size == 0 */ - return KBrsrFailure; - } - - return KBrsrSuccess; -} - -/* - * RECURSIVE - * - * RETURN: KBrsrSuccess - * KBrsrFailure - stop recursion - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetOptionValue(NW_Wml_t* thisObj, - NW_Wml_Element_t *container_el, - NW_Int32 option_to_match, - NW_Int32 *option_count, - NW_Ucs2 **ret_string) -{ - NW_Wml_Element_t el; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - NW_ASSERT(option_count); - - *ret_string = NULL; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container_el) != KBrsrSuccess) - return KBrsrFailure; - - while ((*ret_string == NULL) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - if (el_type == OPTION_ELEMENT) - { - (*option_count)++; - - if (*option_count == option_to_match) - { - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, - &el, VALUE_ATTR, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - ret_string)) == KBrsrOutOfMemory) - { - return status; - } - } - } - else if (el_type == OPTGRP_ELEMENT) - { - /* call self */ - if ((status = GetOptionValue(thisObj, &el, option_to_match, - option_count, ret_string)) == KBrsrOutOfMemory) - { - return status; - } - } - } - - return KBrsrSuccess; -} - -/* - * RECURSIVE - * - * RETURN: KBrsrSuccess - * KBrsrFailure - element not found - NOT fatal (stops recursion) - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetOptionValueSize(NW_Wml_t* thisObj, - NW_Wml_Element_t* container_el, - NW_Int32 option_to_match, - NW_Int32 *option_count, - NW_Int32 *ret_size) -{ - NW_Wml_Element_t el; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_size); - NW_ASSERT(option_count); - - *ret_size = 0; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container_el) != KBrsrSuccess) - { - return KBrsrFailure; - } - - while ((*ret_size == 0) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - if (el_type == OPTION_ELEMENT) - { - (*option_count)++; - if (*option_count == option_to_match) - { - /* get OPTION element value */ - NW_Ucs2 *option_value = 0; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) == KBrsrOutOfMemory) - return status; - - if (option_value) - { - *ret_size = NW_Str_Strlen(option_value); - NW_Str_Delete(option_value); - } - } - } - /* call self */ - else if (el_type == OPTGRP_ELEMENT) - { - if ((status = GetOptionValueSize(thisObj, &el, option_to_match, - option_count, ret_size)) == KBrsrOutOfMemory) - return status; - } - } - - return KBrsrSuccess; -} - -/* - * RECURSIVE - * - * RETURN: KBrsrSuccess - * KBrsrFailure - element not found - * - bad content - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetOptionValueIndex(NW_Wml_t* thisObj, - NW_Wml_Element_t* container_el, - NW_Ucs2* name, NW_Int32 * option_count, - NW_Int32 *ret_index) -{ - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t el; - NW_Ucs2 *option_value = 0; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - NW_ASSERT(thisObj); - NW_ASSERT(option_count); - NW_ASSERT(ret_index); - - *ret_index = 0; - - /* loop thru card elements starting at first element after container_el */ - /* (container is either a select or an option group element) */ - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container_el) != KBrsrSuccess) - { - return KBrsrFailure; - } - - while (keep_looping && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - - *option_count += 1; - /* get OPTION element value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, - &el, VALUE_ATTR, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) - == KBrsrOutOfMemory) - return status; - - if (!option_value) - break; - - if (!NW_Str_Strcmp(name, option_value)) - { - *ret_index = *option_count; - keep_looping = NW_FALSE; - } - - NW_Str_Delete(option_value); - break; - - case OPTGRP_ELEMENT: - if ((status = GetOptionValueIndex(thisObj, &el, name, - option_count, ret_index)) == KBrsrOutOfMemory) - return status; - - if (*ret_index > 0) - keep_looping = NW_FALSE; - - break; - - /* - * option element may contain strings, emphasis, tab, or - * break elements - skip over - */ - case STRING_ELEMENT: - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* Skip an unknown element */ - case UNKNOWN_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - case END_ELEMENT: - keep_looping = NW_FALSE; - break; - - /* unexpected element - present error dialog */ - default: - return KBrsrFailure; - } - - } - - return KBrsrSuccess; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_core.c --- a/webengine/wmlengine/src/wml/src/wml_core.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,509 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_core.c $ - - Purpose: - - Class: WmlBrowser - - Main browser engine class definition. The exteral environment messages to this - engine through the constructor, Start, Event, and *Resp methods. The core browser - object directs the URL Loader to get WML deck and card bytecode. It then processes - the WML tags and interfaces with an external UI system. The core browser also - interfaces with the WML script engine. - -*/ - -#include "wml_core.h" -#include "wml_history.h" -#include "wml_api.h" -#include "wml_url_utils.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "nwx_url_utils.h" - -#include "nw_evlog_api.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "BrsrStatusCodes.h" -#include "urlloader_urlloaderint.h" - -/* Zero out the WML data structure. */ -static void initWmlData( NW_Wml_t* thisObj ) -{ - - /* thisObj->browser_app = NULL; don't init because won't be reset. */ - - thisObj->curr_task = INVALID_TASK; - - thisObj->var_list = NULL; - thisObj->param_list = NULL; - - /* Also initializes last_load, history_resp_url, and history_index. */ - NW_Wml_HistoryInit(thisObj); - - thisObj->decoder = NULL; - - thisObj->card_els = NULL; - - thisObj->prev_task_id = -1; - thisObj->do_type_prev_id = -1; - - thisObj->script_state.load_url = NULL; - thisObj->script_state.load_url_params = NULL; - thisObj->script_state.load_header = NULL; - thisObj->script_state.load_prev = NW_FALSE; - thisObj->script_state.timer_time = 0; - thisObj->script_state.timerProcessing = NW_FALSE; - - thisObj->hasFocus = NW_TRUE; /* Assume start with focus. */ - - thisObj->mem_segment_general = NW_MEM_SEGMENT_INVALID; - thisObj->mem_segment_card = NW_MEM_SEGMENT_INVALID; - thisObj->IntraDeck_OefCounter = 0; /*Reset the counter*/ - thisObj->oefNavigation = NW_FALSE; /*establish navigation initially as non-eof */ - - /* thisObj->wml_api = NULL; Don't init because won't be reset. */ - - return; -} - -static void freeWmlData( NW_Wml_t* thisObj ) -{ - /* Frees var_list and param_list when free thisObj->mem_segment_general. */ - - NW_Str_Delete( thisObj->history_resp_url ); - - /* Handles null pointer for decoder. */ - NW_DeckDecoder_Delete(thisObj->decoder); - - /* Free card_els and card info. */ - NW_Wml_FreeCardSegment(thisObj); - - /* Free up the WMLScript restart state. */ - NW_Str_Delete(thisObj->script_state.load_url); - NW_Str_Delete(thisObj->script_state.load_url_params); - UrlLoader_HeadersFree(thisObj->script_state.load_header); - - if ( thisObj->mem_segment_general != NW_MEM_SEGMENT_INVALID ) - { - NW_Mem_Segment_Free(thisObj->mem_segment_general); - } - - /* set to a "zero" state. */ - initWmlData( thisObj ); - - return; -} - -/* Allocate any initial data structures needed. */ -static TBrowserStatusCode allocWmlData( NW_Wml_t* thisObj ) -{ - NW_ASSERT( thisObj != NULL ); - NW_ASSERT( thisObj->mem_segment_general == NW_MEM_SEGMENT_INVALID ); - NW_ASSERT( thisObj->var_list == NULL ); - NW_ASSERT( thisObj->param_list == NULL ); - - thisObj->mem_segment_general = NW_Mem_Segment_New(); - if (thisObj->mem_segment_general == 0) - return KBrsrOutOfMemory; - - thisObj->var_list = NW_WmlVar_NewList(thisObj->mem_segment_general); - if (thisObj->var_list == 0) - { - NW_Mem_Segment_Free(thisObj->mem_segment_general); - thisObj->mem_segment_general = NW_MEM_SEGMENT_INVALID; - return KBrsrOutOfMemory; - } - - thisObj->param_list = NW_WmlVar_NewList(thisObj->mem_segment_general); - if (thisObj->param_list == 0) - { - NW_Mem_Segment_Free(thisObj->mem_segment_general); - thisObj->var_list = NULL; - thisObj->mem_segment_general = NW_MEM_SEGMENT_INVALID; - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/****************************************************************************** - Name: - NW_Wml_GetVersion( NW_Wml_t *thisObj, NW_Uint8 *version ) - - Description: - Retrieves a version identifier set when the WML deck was loaded. The - version is saved by "wml_decoder.c" routine, - NW_DeckDecoder_InitializeAndValidate(). - The format of this NW_Byte follows information in paragraph 5.4 of - WAP-192-WXBML-20000515. - - Parameters: - NW_Wml_t *thisObj - pointer to NW_Wml_t - NW_Uint8 *version - pointer to NW_Int8 variable in which version is returned - - Return value: - KBrsrSuccess obtained version of WBXML saved when deck was loaded. - KBrsrFailure wml context not available; "decoder" is not available. - *****************************************************************************/ -TBrowserStatusCode NW_Wml_GetVersion( NW_Wml_t *thisObj, NW_Uint8 *version ) -{ - if (thisObj == NULL) - { - return KBrsrFailure; - } - if (thisObj->decoder == NULL) - { - return KBrsrFailure; - } - *version = NW_DeckDecoder_GetVersion (thisObj->decoder); - return KBrsrSuccess; -} - - -/* - * RETURN: KBrsrSuccess - KBrsrBadInputParam - * KBrsrOutOfMemory - */ -static TBrowserStatusCode NW_Wml_InitTask(NW_Wml_t *thisObj, - const NW_WmlApi_t *wmlapi, - void *usrAgent, - NW_Wml_Task_e taskValue) -{ - TBrowserStatusCode status; - - if ((thisObj == 0) || - (wmlapi == 0) || - (wmlapi->display == 0) || - (wmlapi->timer == 0)) - return KBrsrBadInputParam; - - /* Initialize ALL the member data */ - initWmlData( thisObj ); - status = allocWmlData( thisObj ); - if ( status != KBrsrSuccess ) { - return status; - } - - thisObj->browser_app = usrAgent; - thisObj->curr_task = taskValue; - thisObj->wml_api = wmlapi; - - return KBrsrSuccess; -} - -TBrowserStatusCode NW_Wml_Init(NW_Wml_t *thisObj, - const NW_WmlApi_t *wmlapi, - void *usrAgent) -{ - return NW_Wml_InitTask(thisObj, wmlapi, usrAgent, NOOP_TASK); -} - - -TBrowserStatusCode NW_Wml_InitFromShell(NW_Wml_t *thisObj, - const NW_Ucs2 *url, - const NW_WmlApi_t *wmlapi, - void *usrAgent) -{ - TBrowserStatusCode status; - - status = NW_Wml_InitTask(thisObj, wmlapi, usrAgent, GO_TASK); - NW_REQUIRED_PARAM(url); - return status; -} - -#if(0) -/* This function is not being used as of 07/31/2001. */ -void NW_Wml_Dispose(NW_Wml_t *thisObj ) -{ - NW_ASSERT( thisObj != NULL ); - - /* Should not be called now that freeWmlData does all cleanup. - jwild 2001.04.26 */ - NW_ASSERT(NW_FALSE); - - /* Free allocated heap data*/ - NW_Wml_FreeCardSegment(thisObj); - NW_Mem_Segment_Free(thisObj->mem_segment_general); -} -#endif - -TBrowserStatusCode NW_Wml_Start(NW_Wml_t* thisObj, NW_Ucs2 *initialUrl) -{ - NW_Ucs2 *pStart; - NW_Ucs2 *pEnd; - TBrowserStatusCode status = KBrsrSuccess; - NW_Bool running; - - if ((thisObj == NULL) || (initialUrl == NULL)) - return KBrsrBadInputParam; - - NW_ASSERT(DISPLAY_API != NULL); - NW_ASSERT(TIMER_API != NULL); - - thisObj->IntraDeck_OefCounter = 0; /*Reset the counter*/ - thisObj->oefNavigation = NW_FALSE; - - /* First check if we can navigate */ - if ((status = NW_Wml_CanNavigateToUri()) - != KBrsrSuccess) { - return status; - } - - /* - * If the deck is running a timer loop and the user tries to - * open another page the, timers should be destroyed. - */ - if ((status = (TIMER_API->isRunning)(thisObj->browser_app, - &running)) == - KBrsrSuccess) - { - if (running) - { - status = (TIMER_API->destroy)(thisObj->browser_app); - } - } - if (status != KBrsrSuccess) { - return status; - } - - /* Strip leading & trailing spaces from the Url */ - pStart = initialUrl; - pEnd = NW_Str_Strchr(initialUrl, '\0'); - while (pStart < pEnd) { - if (NW_Str_Isspace(*pStart)) { - pStart++; - } else { - break; - } - } - while (pStart < pEnd) { - if (NW_Str_Isspace(*(pEnd - 1))) { - pEnd--; - } else { - break; - } - } - *pEnd = '\0'; - if (pStart != initialUrl) { - (void)NW_Mem_memmove(initialUrl, pStart, (NW_UINT32_CAST((pEnd - pStart + 1))*sizeof(NW_Ucs2))); - } - - /* - * Since this request may be the result of a user-supplied - * URL and not part of "normal" WML navigation, must create - * a new context, per WML spec section 10.4. - * - * Must also tell the UI to destroy the current card. - * This could result in the current card being cleared but - * that's OK - per WML spec section 10.2 which says an - * implementation "can reset its state to a well-known value" - * and in this case, we assume this means a clear UI. - */ - if ((status = (DISPLAY_API->destroyCard)(thisObj->browser_app)) == - KBrsrSuccess) - { - thisObj->curr_task = GO_TASK; - NW_Wml_NewContext(thisObj); - status = NW_Wml_DoLoadAndSave(thisObj, initialUrl, NW_FALSE, NULL, - NULL, NULL, NULL, NULL, NW_CACHE_NORMAL); - } - return status; -} - -TBrowserStatusCode NW_Wml_Exit(NW_Wml_t* thisObj) -{ - NW_ASSERT(thisObj != NULL); - - freeWmlData( thisObj ); - -#ifdef WAE_DEBUG - find_leaks(); -#endif - - return KBrsrSuccess; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - var_name is not found - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_GetVar(NW_Wml_t* thisObj, const NW_Ucs2 *var_name, NW_Ucs2 **ret_string) -{ - NW_Ucs2 *temp; - - NW_ASSERT(thisObj != NULL); - - temp = NW_WmlVar_GetValue(thisObj->var_list, var_name); - - if (temp) - { - *ret_string = NW_Str_Newcpy(temp); - - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - return KBrsrSuccess; - } - - return KBrsrFailure; -} - -/* - * RETURN: NULL -- no more variables - * NON-NULL -- a pointer to a wml variable - */ -NW_Wml_Var_t *NW_Wml_NextVar(NW_Wml_t* thisObj, NW_Wml_Var_t *current) -{ - NW_ASSERT(thisObj); - - return NW_WmlVar_Next(thisObj->var_list, current); -} - -void NW_Wml_UnsetVar(NW_Wml_t* thisObj, NW_Ucs2 *var_name) -{ - NW_ASSERT(var_name != NULL); - NW_ASSERT(thisObj != NULL); - - (void)NW_WmlVar_Remove(thisObj->var_list, var_name); -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - if name = null - * - returned by NW_WmlVar_AddToList if name = null - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_SetVar(NW_Wml_t* thisObj, const NW_Ucs2 *name, - const NW_Ucs2 *value) -{ - TBrowserStatusCode status; - NW_Wml_Var_t *v = 0; - NW_WaeUsrAgent_t* wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - - NW_ASSERT(thisObj != NULL); - NW_ASSERT( wae != NULL ); - - if (name == NULL) - return KBrsrFailure; - - v = NW_WmlVar_Get(thisObj->var_list, name); - - if (v) - status = NW_WmlVar_ReplaceValue(v, value, thisObj->mem_segment_general); - else - status = NW_WmlVar_AddToList(thisObj->var_list, name, value, - thisObj->mem_segment_general); - NW_EvLog_Log( NW_WaeUsrAgent_GetEvLog(wae), NW_EvLog_SET_VAR, name, value ); - - return status; -} - - -TBrowserStatusCode NW_Wml_GainFocus(NW_Wml_t *thisObj) -{ - NW_Bool running = NW_FALSE; - TBrowserStatusCode status = KBrsrSuccess; - NW_ASSERT(TIMER_API != NULL); - - if (thisObj == NULL) - return KBrsrBadInputParam; - - thisObj->hasFocus = NW_TRUE; - - /* IF the timer is running, resume it */ - if ((status = (TIMER_API->isRunning)(thisObj->browser_app, &running)) == KBrsrSuccess) - { - if (running) status = (TIMER_API->resume)(thisObj->browser_app); - } - else if (thisObj->script_state.timer_time != 0) - { - status = (TIMER_API->create)(thisObj->browser_app, thisObj->script_state.timer_time); - thisObj->script_state.timer_time = 0; - if (status != KBrsrSuccess) - { - return status; - } - } - return status; -} - -TBrowserStatusCode NW_Wml_LoseFocus(NW_Wml_t *thisObj) -{ - NW_Bool running = NW_FALSE; - TBrowserStatusCode status = KBrsrSuccess; - NW_ASSERT(TIMER_API != NULL); - - if (thisObj == NULL) - return KBrsrBadInputParam; - - thisObj->hasFocus = NW_FALSE; - - /* if the timer is running, stop it */ - if ((status = (TIMER_API->isRunning)(thisObj->browser_app, &running)) == KBrsrSuccess) - { - if (running) status = (TIMER_API->stop)(thisObj->browser_app); - } - return status; -} - -NW_Mem_Segment_Id_t NW_Wml_GetCardSegment(NW_Wml_t *thisObj) -{ - if ( thisObj->mem_segment_card == NW_MEM_SEGMENT_INVALID ) - { - thisObj->mem_segment_card = NW_Mem_Segment_New(); - - NW_ASSERT(thisObj->mem_segment_card != NW_MEM_SEGMENT_INVALID); - } - - return thisObj->mem_segment_card; -} - -TBrowserStatusCode NW_Wml_FreeCardSegment(NW_Wml_t *thisObj) -{ - if ( thisObj->mem_segment_card != NW_MEM_SEGMENT_INVALID ) - { - NW_Mem_Segment_Free(thisObj->mem_segment_card); - thisObj->mem_segment_card = NW_MEM_SEGMENT_INVALID; - } - - return KBrsrSuccess; -} - - -/*----------------------------------------------------------------------------------- - * NW_Wml_GetPublicId - * - * see WBXML spec 1.2, sections 5.5 and 7.2 - * - * returns KBrsrSuccess - * KBrsrOutOfMemory - *---------------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_GetPublicId(NW_Wml_t *thisObj, NW_Uint32 *publicId) -{ - NW_DeckDecoder_t *decoder = thisObj->decoder; - - return ( NW_DeckDecoder_GetDocumentPublicId(decoder, publicId) ); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_deck.c --- a/webengine/wmlengine/src/wml/src/wml_deck.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "wml_deck.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wml1x_wml1xentityset.h" -#include "nw_hed_domhelper.h" -#include "wml_decoder.h" - -#include "wml_elm_attr.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- */ -struct NW_Wml_Deck_s { - NW_HED_DomTree_t* domTree; - NW_HED_DomHelper_t domHelper; - NW_DOM_Node_t* currentCard; -}; - -/* ------------------------------------------------------------------------- */ -NW_Wml_Deck_t* NW_Wml_Deck_New (NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Bool contentWasPlainText) -{ - NW_Wml_Deck_t* deck = NULL; - - NW_ASSERT (domBuffer != NULL); - - /* create the deck */ - NW_THROWIF_NULL (deck = (NW_Wml_Deck_t*) NW_Mem_Malloc (sizeof (NW_Wml_Deck_t))); - NW_THROWIF_NULL (deck->domTree = NW_HED_DomTree_New (domBuffer, charset, NW_Wml_1_3_PublicId,NULL)); - deck->currentCard = NULL; - - deck->domHelper.entitySet = NW_HED_EntitySetOf (&NW_Wml1x_EntitySet); - deck->domHelper.context = NULL; - deck->domHelper.resolvePlainTextVariablesAndEntities = contentWasPlainText; - - /* print the domTree */ -#ifdef _DEBUG - NW_HED_DomHelper_PrintTree (&deck->domHelper, NW_HED_DomTree_GetRootNode (deck->domTree)); -#endif - - return deck; - -NW_CATCH_ERROR - NW_Wml_Deck_Delete (deck); - - return NULL; -} - -/* ------------------------------------------------------------------------- */ -void NW_Wml_Deck_Delete (NW_Wml_Deck_t* thisObj) -{ - if (thisObj != NULL) { - NW_HED_DomTree_Delete (thisObj->domTree); - - NW_Mem_Free (thisObj); - } -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DomTree_t* NW_Wml_Deck_GetDomTree (const NW_Wml_Deck_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return thisObj->domTree; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DomHelper_t* NW_Wml_Deck_GetDomHelper (NW_Wml_Deck_t* thisObj, - const NW_Wml_VarList_t* varList) -{ - NW_HED_Context_t* context = NULL; - - NW_ASSERT (thisObj != NULL); - - /* delete the old context because it is stale */ - NW_Object_Delete (((NW_Wml_Deck_t *)thisObj)->domHelper.context); - - /* convert the varList into a context */ - if (varList != NULL) { - context = NW_DeckDecoder_VarListToContext(varList); - } - - /* set the domHelper's context to the new context */ - ((NW_Wml_Deck_t *)thisObj)->domHelper.context = context; - - return &(((NW_Wml_Deck_t *)thisObj)->domHelper); -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* NW_Wml_Deck_GetCurrentCard (const NW_Wml_Deck_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - return thisObj->currentCard; -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_Node_t* NW_Wml_Deck_GetCardByName (NW_Wml_Deck_t* thisObj, - const NW_String_t* cardName) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (cardName != NULL); - - return (NW_HED_DomHelper_FindElement (NW_Wml_Deck_GetDomHelper (thisObj, NULL), - NW_HED_DomTree_GetRootNode (thisObj->domTree), 2, CARD_ELEMENT, ID_ATTR, cardName)); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_Wml_Deck_SetCurrentCardByName (NW_Wml_Deck_t* thisObj, - const NW_String_t* cardName) -{ - NW_DOM_Node_t* cardElem = NULL; - TBrowserStatusCode status = KBrsrWmlbrowserCardNotInDeck; - - /* if cardName is NULL, use the first card */ - if (cardName->storage == NULL) { - cardElem = NW_HED_DomHelper_FindElement (NW_Wml_Deck_GetDomHelper (thisObj, NULL), - NW_HED_DomTree_GetRootNode (thisObj->domTree), 2, CARD_ELEMENT, 0, NULL); - } - - /* otherwise find a card with the given name */ - else { - cardElem = NW_HED_DomHelper_FindElement (NW_Wml_Deck_GetDomHelper (thisObj, NULL), - NW_HED_DomTree_GetRootNode (thisObj->domTree), 2, CARD_ELEMENT, ID_ATTR, cardName); - } - - /* set the card */ - if (cardElem != NULL) { - NW_Wml_Deck_SetCurrentCardByElement (thisObj, cardElem); - - status = KBrsrSuccess; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -void NW_Wml_Deck_SetCurrentCardByElement (NW_Wml_Deck_t* thisObj, - const NW_DOM_Node_t* element) -{ - NW_ASSERT (thisObj != NULL); - - thisObj->currentCard = (NW_DOM_Node_t*) element; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_deck_iter.c --- a/webengine/wmlengine/src/wml/src/wml_deck_iter.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <nwx_logger.h> - -#include "nw_dom_text.h" -#include "wml_deck_iter.h" -#include "nw_dom_document.h" -#include "BrsrStatusCodes.h" - -static NW_DOM_Node_t* x_GetNextElement_AllChildren (NW_Wml_DeckIter_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - /* if this is the first time we're called, we simply return the specified - root */ - if (thisObj->currentElement == NULL) { - thisObj->currentElement = thisObj->rootElement; - } - - do { - NW_DOM_Node_t* node; - NW_DOM_Node_t* parentNode; - - /* ok, we've been here before ... check whether the current node has any - children, if so we return the first of its children and make that the - current node */ - node = NW_DOM_Node_getFirstChild (thisObj->currentElement); - if (node != NULL) { - thisObj->currentElement = node; - continue; - } - - /* so, no children (although abstinence is hard) - look for a sibling, if - found make that our current node and return it */ - node = NW_DOM_Node_getNextSibling (thisObj->currentElement); - if (node != NULL) { - thisObj->currentElement = node; - continue; - } - - /* what? no siblings? oh well, we'll have to look for the first sibling of - the first ancestor we can find (not including our root) */ - for (parentNode = NW_DOM_Node_getParentNode (thisObj->currentElement); - ( (parentNode != thisObj->rootElement) && (parentNode != 0) ); - parentNode = NW_DOM_Node_getParentNode (parentNode)) { - node = NW_DOM_Node_getNextSibling (parentNode); - if (node != NULL) { - thisObj->currentElement = node; - break; - } - } - if (node != NULL) { - continue; - } - - /* ok, if we get this far it means that we can find no more nodes to - iterate over */ - thisObj->currentElement = NULL; - } while ((thisObj->currentElement != NULL) && - (thisObj->currentElement != thisObj->rootElement) && - ! ((NW_DOM_ELEMENT_NODE | NW_DOM_TEXT_NODE) & NW_DOM_Node_getNodeType (thisObj->currentElement))); - - /* return the result */ - return thisObj->currentElement; -} - -static NW_DOM_Node_t* x_GetNextElement_JustSiblings (NW_Wml_DeckIter_t* thisObj) -{ - NW_ASSERT (thisObj != NULL); - - if (thisObj->currentElement == NULL) { - thisObj->currentElement = NW_DOM_Node_getFirstChild (thisObj->rootElement); - } - - else { - thisObj->currentElement = NW_DOM_Node_getNextSibling (thisObj->currentElement); - } - - /* return the result */ - return thisObj->currentElement; -} - -TBrowserStatusCode NW_Wml_DeckIter_Initialize (NW_Wml_DeckIter_t* thisObj, - NW_DOM_Node_t* rootElement, - NW_Bool justOwnChildren) -{ - NW_ASSERT (thisObj != NULL); - - thisObj->rootElement = rootElement; - thisObj->currentElement = NULL; - thisObj->justOwnChildren = justOwnChildren; - - return KBrsrSuccess; -} - -NW_DOM_Node_t* NW_Wml_DeckIter_GetNextElement (NW_Wml_DeckIter_t* thisObj) -{ - if (thisObj->justOwnChildren == NW_TRUE) { - return x_GetNextElement_JustSiblings (thisObj); - } - else { - return x_GetNextElement_AllChildren (thisObj); - } -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_decoder.c --- a/webengine/wmlengine/src/wml/src/wml_decoder.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,785 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_decoder.c $ - - Purpose: - - Class: DeckDecoder - - Implementation of DeckDecoder class. Declares and defines - private functions for reading shared elements. - -*/ - -#include "wml_decoder.h" -#include "wml_var.h" -#include "nwx_string.h" -#include "wml_elm_attr.h" -#include "nw_text_ucs2.h" - -#include "nw_hed_domtree.h" -#include "wml_deck_iter.h" -#include "nw_hed_contextvisitor.h" -#include "nw_wml1x_wml1xentityset.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- */ -NW_DeckDecoder_t* NW_DeckDecoder_New (void) -{ - NW_DeckDecoder_t* decoder; - - decoder = (NW_DeckDecoder_t*) NW_Mem_Malloc (sizeof (NW_DeckDecoder_t)); - - if (decoder != NULL) { - NW_Mem_memset (decoder, 0x00, sizeof (NW_DeckDecoder_t)); - } - - return decoder; -} - -/* ------------------------------------------------------------------------- */ -void NW_DeckDecoder_Delete (NW_DeckDecoder_t* thisObj) -{ - if (thisObj == NULL) { - return; - } - - NW_Wml_Deck_Delete (thisObj->domDeck); - NW_Mem_Free(thisObj); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_InitializeAndValidate (NW_DeckDecoder_t* thisObj, - NW_Buffer_t* domBuffer, - NW_Http_CharSet_t charset, - NW_Bool contentWasPlainText) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(domBuffer != NULL); - - if (domBuffer->length == 0 || domBuffer->data == NULL) { - return KBrsrWmlbrowserBadContent; - } - - /* create a dom-tree for this new content */ - thisObj->domDeck = NW_Wml_Deck_New (domBuffer, charset, contentWasPlainText); - - if (thisObj->domDeck == NULL) { - status = KBrsrWmlbrowserBadContent; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetRootElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* root) -{ - NW_DOM_Node_t* r; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (root != NULL); - - root->id = INVALID_ID; - - if ((r = NW_HED_DomTree_GetRootNode (NW_Wml_Deck_GetDomTree (thisObj->domDeck))) != NULL) { - root->domElement = NW_DOM_Node_getFirstChild (r); - status = KBrsrSuccess; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_DeckDecoder_GetCardElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* elem) -{ - NW_DOM_Node_t* domElem; - NW_Bool found = NW_FALSE; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - - if ((domElem = NW_Wml_Deck_GetCurrentCard (thisObj->domDeck)) != NULL) { - elem->domElement = domElem; - - found = NW_TRUE; - } - - return found; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetTemplateElement (const NW_DeckDecoder_t* thisObj, - NW_Wml_Element_t* elem) -{ - NW_DOM_Node_t* domElem; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - - domElem = NW_HED_DomHelper_FindElement (NW_Wml_Deck_GetDomHelper (thisObj->domDeck, NULL), - NW_HED_DomTree_GetRootNode (NW_Wml_Deck_GetDomTree (thisObj->domDeck)), 2, - TEMPLATE_ELEMENT, 0, NULL); - - if (domElem != NULL) { - elem->domElement = domElem; - - status = KBrsrSuccess; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetHeadElement (const NW_DeckDecoder_t *thisObj, - NW_Wml_Element_t *elem) -{ - NW_DOM_Node_t* domElem; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - - domElem = NW_HED_DomHelper_FindElement (NW_Wml_Deck_GetDomHelper (thisObj->domDeck, NULL), - NW_HED_DomTree_GetRootNode (NW_Wml_Deck_GetDomTree (thisObj->domDeck)), 2, - HEAD_ELEMENT, 0, NULL); - - if (domElem != NULL) { - elem->domElement = domElem; - status = KBrsrSuccess; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_SetCardByName (NW_DeckDecoder_t *thisObj, - const NW_Ucs2* cardName) -{ - NW_String_t card; - TBrowserStatusCode status; - - NW_ASSERT (thisObj != NULL); - - NW_String_initialize (&card, (void *) cardName, HTTP_iso_10646_ucs_2); - - if ((status = NW_Wml_Deck_SetCurrentCardByName (thisObj->domDeck, &card)) == KBrsrSuccess) { - thisObj->card_el.domElement = NW_Wml_Deck_GetCurrentCard (thisObj->domDeck); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_SetCardByElement (NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* newElement) -{ - NW_ASSERT (thisObj != NULL); - - NW_Wml_Deck_SetCurrentCardByElement (thisObj->domDeck, newElement->domElement); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetCardName (const NW_DeckDecoder_t *thisObj, - NW_Ucs2 **cardName) -{ - NW_Wml_Element_t card; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (cardName != NULL); - - *cardName = NULL; - - /* get the id attribute of the current card */ - if (NW_DeckDecoder_GetCardElement (thisObj, &card)) { - status = NW_DeckDecoder_GetAttribute (thisObj, &card, ID_ATTR, NULL, - NW_MEM_SEGMENT_MANUAL, cardName); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetCardTitle (const NW_DeckDecoder_t* thisObj, - const NW_Wml_VarList_t* varList, - NW_Ucs2** title) -{ - NW_Wml_Element_t card; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (title != NULL); - - NW_REQUIRED_PARAM (varList); - - *title = NULL; - - /* get the id attribute of the current card */ - if (NW_DeckDecoder_GetCardElement (thisObj, &card)) { - status = NW_DeckDecoder_GetAttribute (thisObj, &card, TITLE_ATTR, varList, - NW_MEM_SEGMENT_MANUAL, title); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetDocumentPublicId (const NW_DeckDecoder_t* thisObj, - NW_Uint32* publicId) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (publicId != NULL); - - *publicId = NW_HED_DomTree_GetPublicId (NW_Wml_Deck_GetDomTree (thisObj->domDeck)); - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 NW_DeckDecoder_GetVersion (const NW_DeckDecoder_t* thisObj) -{ - NW_Uint8 version; - - NW_ASSERT (thisObj != NULL); - - version = NW_HED_DomTree_GetVersion (NW_Wml_Deck_GetDomTree (thisObj->domDeck)); - - return version; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint16 NW_DeckDecoder_GetEncoding (const NW_DeckDecoder_t* thisObj) -{ - NW_Uint16 encoding; - - NW_ASSERT (thisObj != NULL); - - encoding = (NW_Uint16) NW_HED_DomTree_GetCharEncoding (NW_Wml_Deck_GetDomTree (thisObj->domDeck)); - - return encoding; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_ReadString (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - const NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope, - NW_Ucs2** retString) -{ - NW_String_t str; - NW_HED_DomHelper_t* domHelper; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - NW_ASSERT (retString != NULL); - - NW_REQUIRED_PARAM (varList); - NW_REQUIRED_PARAM (memScope); - - /* get the domHelper and set the context */ - domHelper = NW_Wml_Deck_GetDomHelper (thisObj->domDeck, varList); - - /* get the string and convert it to ucs2 */ - status = NW_HED_DomHelper_GetText (domHelper, elem->domElement, NW_TRUE, &str, NULL); - if (status == KBrsrSuccess) { - *retString = (NW_Ucs2*) NW_String_getStorage (&str); - } - - /* - ** get the domHelper again, passing null in the var-list pram so the context - ** is deleted right away - */ - (void) NW_Wml_Deck_GetDomHelper (thisObj->domDeck, NULL); - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_DeckDecoder_FirstContainedElement (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* container, - NW_Wml_Element_t* elem) -{ - NW_DOM_Node_t* domElem; - NW_Bool found = NW_FALSE; - - NW_ASSERT (thisObj != NULL); - - NW_REQUIRED_PARAM(thisObj); - if ((domElem = NW_DOM_Node_getFirstChild (container->domElement)) != NULL) { - elem->domElement = domElem; - - found = NW_TRUE; - } - - return found; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetType (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_ElType_e* type) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - NW_ASSERT (type != NULL); - NW_ASSERT (elem->domElement != NULL); - - NW_REQUIRED_PARAM(thisObj); - /* if the element is a text-node set the type to STRING_ELEMENT */ - if (NW_DOM_Node_getNodeType(elem->domElement) == NW_DOM_TEXT_NODE) { - *type = STRING_ELEMENT; - } - - /* otherwise get the element's type */ - else { - *type = NW_HED_DomHelper_GetElementToken (elem->domElement); - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_SearchDoElements(NW_DeckDecoder_t* thisObj, - NW_Wml_VarList_t* varList, - NW_Wml_Element_t* container, - NW_Wml_Attr_t attribute, - NW_Ucs2* searchString) -{ - NW_Ucs2 *attrValue = 0; - NW_Bool match = NW_FALSE; - NW_Wml_Element_t elem; - TBrowserStatusCode status; - NW_Wml_ElType_e elType; - NW_DeckDecoderIter_t iter; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (container != NULL); - NW_ASSERT (searchString != NULL); - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj, container) != KBrsrSuccess) - return KBrsrFailure; - - while ((match == NW_FALSE) && NW_DeckDecoderIter_GetNextElement(&iter, &elem)) - { - NW_DeckDecoder_GetType(thisObj, &elem, &elType); - - if (elType == DO_ELEMENT) - { - if ((status = NW_DeckDecoder_GetAttribute(thisObj, &elem, attribute, varList, - NW_MEM_SEGMENT_MANUAL, &attrValue)) == KBrsrOutOfMemory) - { - return status; - } - if ((attrValue == NULL ) && (attribute == NAME_ATTR)) - { - /* Getting the Do Name and there isn't one. If no Do Name, use the the - Do Type as name. WML 1.1 Spec section 9.7 */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj, &elem, TYPE_ATTR, - varList, NW_MEM_SEGMENT_MANUAL, &attrValue)) == KBrsrOutOfMemory) - { - return status; - } - } - if (attrValue && !NW_Str_Strcmp(searchString, attrValue)) - match = NW_TRUE; - - if (attrValue) - NW_Mem_Free(attrValue); - } - else if(elType == P_ELEMENT || elType == FIELDSET_ELEMENT) - { - /* elements which can contain DO elements */ - if (NW_DeckDecoder_SearchDoElements(thisObj, varList, &elem, attribute, - searchString) == KBrsrSuccess) - match = NW_TRUE; - } - else if (elType == UNKNOWN_ELEMENT) - { - /* - * If this unknown element has content, recurse on it - */ - if (NW_DeckDecoder_HasContent(thisObj, &elem)) - { - if (NW_DeckDecoder_SearchDoElements(thisObj, varList, &elem, attribute, - searchString) == KBrsrSuccess) - match = NW_TRUE; - } - } - } - - if (match == NW_TRUE) { - return KBrsrSuccess; - } else { - return KBrsrFailure; - } -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetPostfieldData (const NW_DeckDecoder_t* thisObj, - const NW_Wml_VarList_t* varList, - const NW_Wml_Element_t* elem, - NW_NVPair_t** postfieldsArg) -{ - NW_Wml_Element_t el; - TBrowserStatusCode status = KBrsrFailure; - NW_Int32 pass; - NW_NVPair_t* postFields; - NW_DeckDecoderIter_t iter; - NW_Ucs2* name = NULL; - NW_Ucs2* value = NULL; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - NW_ASSERT (postfieldsArg != NULL); - - *postfieldsArg = NULL; - - postFields = NW_NVPair_New(); - if ( postFields == NULL ) { - status = KBrsrOutOfMemory; - goto cleanup_memory; - } - - for ( pass = 0; pass < 2; pass++) - { - if (NW_DeckDecoderIter_Initialize(&iter, thisObj, elem) == KBrsrSuccess) - { - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e elType; - - NW_DeckDecoder_GetType(thisObj, &el, &elType); - - if (elType == POSTFIELD_ELEMENT) { - /* get name and value strings */ - status = NW_DeckDecoder_GetAttribute(thisObj, &el, NAME_ATTR, - varList, NW_MEM_SEGMENT_MANUAL, &name); - if (status != KBrsrSuccess) { - if (status != KBrsrOutOfMemory) { - status = KBrsrWmlbrowserBadContent; - } - goto cleanup_memory; - } - - NW_ASSERT(name != NULL); - - status = NW_DeckDecoder_GetAttribute(thisObj, &el, VALUE_ATTR, - varList, NW_MEM_SEGMENT_MANUAL, &value); - if (status == KBrsrOutOfMemory) { - goto cleanup_memory; - } - - if (pass == 0) { - /* 1st pass calculate the size. */ - status = NW_NVPair_CalSize(postFields, name, value); - if ( status != KBrsrSuccess ) { - goto cleanup_memory; - } - } else { - /* 2nd pass add the name-value pairs. */ - if(postFields->iterPtr == NULL || postFields->strTable == NULL) - { - status = KBrsrWmlbrowserBadContent; - } - else - { - status = NW_NVPair_Add(postFields, name, value); - } - if ( status != KBrsrSuccess ) { - goto cleanup_memory; - } - } - - NW_Str_Delete(name); - name = NULL; - - NW_Str_Delete(value); - value = NULL; - } - } - } - - if ( pass == 0 ) { - /* Completed sizing pass(1st). Allocate storage for name-value pairs. */ - status = NW_NVPair_AllocStorage( postFields ); - if ( status != KBrsrSuccess ) { - goto cleanup_memory; - } - } else { - /* Completed pass 2. Finished add pass. Reset iterator - to beginning to be safe. */ - (void) NW_NVPair_ResetIter( postFields ); - } - } /* for */ - - if ( NW_NVPair_IsEmpty(postFields) ) { - /* Does not contain any postfields. Free and return null pointer. */ - NW_NVPair_Delete( postFields ); - *postfieldsArg = NULL; - } else { - *postfieldsArg = postFields; - } - - return KBrsrSuccess; - -cleanup_memory: - NW_Str_Delete(name); - NW_Str_Delete(value); - - *postfieldsArg = NULL; - NW_NVPair_Delete( postFields ); - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_GetAttribute (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_Attr_t attribute, - const NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope, - NW_Ucs2** attributeValue) -{ - NW_String_t value; - NW_HED_DomHelper_t* domHelper; - TBrowserStatusCode status; - - NW_REQUIRED_PARAM (memScope); - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - NW_ASSERT (attributeValue != NULL); - - *attributeValue = NULL; - - /* get the domHelper and set the context */ - domHelper = NW_Wml_Deck_GetDomHelper (thisObj->domDeck, varList); - - /* get the attribute value as a ucs2 NW_String_t */ - if ((status = NW_HED_DomHelper_GetAttributeValue (domHelper, elem->domElement, - attribute, &value)) == KBrsrSuccess) { - - *attributeValue = (NW_Ucs2*) value.storage; - } - - /* - ** get the domHelper again, passing null in the var-list pram so the context - ** is deleted right away - */ - (void) NW_Wml_Deck_GetDomHelper (thisObj->domDeck, NULL); - - if (status == KBrsrNotFound) { - status = KBrsrFailure; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_DeckDecoder_HasAttributeWithValue (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem, - NW_Wml_Attr_t attribute, - const char* attributeValue, - const NW_Wml_VarList_t* varList) -{ - NW_Ucs2 *methodStr = NULL; - NW_Bool hasAtt = NW_FALSE; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - - if (NW_DeckDecoder_GetAttribute(thisObj, elem, attribute, - varList, NW_MEM_SEGMENT_MANUAL, &methodStr) == KBrsrSuccess) { - if (! NW_Str_StrcmpConst(methodStr, attributeValue)) { - hasAtt = NW_TRUE; - } - } - - if (methodStr != NULL) - NW_Mem_Free(methodStr); - - return hasAtt; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_DeckDecoder_HasContent (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* elem) -{ - NW_Bool hasContent; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - NW_REQUIRED_PARAM(thisObj); - - hasContent = NW_DOM_Node_hasChildNodes (elem->domElement); - - return hasContent; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoder_CopyElement (const NW_DeckDecoder_t* thisObj, - const NW_Wml_Element_t* srcEl, - NW_Wml_Element_t* destEl) -{ - NW_ASSERT (thisObj != NULL); - NW_ASSERT (srcEl != NULL); - NW_ASSERT (destEl != NULL); - NW_REQUIRED_PARAM(thisObj); - - destEl->id = srcEl->id; - destEl->domElement = srcEl->domElement; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoderIter_Initialize (NW_DeckDecoderIter_t *thisObj, - const NW_DeckDecoder_t* decoder, - const NW_Wml_Element_t* container) -{ - TBrowserStatusCode status; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (decoder != NULL); - NW_ASSERT (container != NULL); - - thisObj->decoder = (NW_DeckDecoder_t*) decoder; - status = NW_Wml_DeckIter_Initialize (&thisObj->deckIter, container->domElement, NW_TRUE); - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode NW_DeckDecoderIter_InitializeAll_Children (NW_DeckDecoderIter_t *thisObj, - const NW_DeckDecoder_t* decoder, - const NW_Wml_Element_t* container) -{ - TBrowserStatusCode status; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (decoder != NULL); - NW_ASSERT (container != NULL); - - thisObj->decoder = (NW_DeckDecoder_t*) decoder; - status = NW_Wml_DeckIter_Initialize (&thisObj->deckIter, container->domElement, NW_FALSE); - - return status; -} - - -/* ------------------------------------------------------------------------- */ -NW_Bool NW_DeckDecoderIter_GetNextElement (NW_DeckDecoderIter_t* thisObj, - NW_Wml_Element_t* elem) -{ - NW_DOM_Node_t* domElement; - NW_Bool result= NW_FALSE; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (elem != NULL); - - if ((domElement = NW_Wml_DeckIter_GetNextElement (&thisObj->deckIter)) != NULL) { - elem->domElement = domElement; - - result = NW_TRUE; - } - - return result; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_Context_t* -NW_DeckDecoder_VarListToContext (const NW_Wml_VarList_t* varList) -{ - NW_Wml_Var_t* var = NULL; - NW_HED_Context_t* context = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - if (varList == NULL) { - return NULL; - } - - if ((context = NW_HED_Context_New()) == NULL) { - return NULL; - } - - while ((var = NW_WmlVar_Next((NW_Wml_VarList_t*) varList, var)) != NULL) { - NW_String_t name; - NW_String_t value; - - if (var->name && var->val) { - NW_String_initialize (&name, var->name, HTTP_iso_10646_ucs_2); - NW_String_initialize (&value, var->val, HTTP_iso_10646_ucs_2); - - status = NW_HED_Context_SetOrAddVariable (context, &name, &value); - if (status != KBrsrSuccess) { - break; - } - } - } - - if (status != KBrsrSuccess) { - NW_Object_Delete (context); - context = NULL; - } - - return context; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_DeckDecoder_ContextToVarList (const NW_HED_Context_t* context, - NW_Wml_VarList_t* varList, - NW_Mem_Segment_Id_t memScope) -{ - NW_HED_ContextVisitor_t vistor; - NW_HED_Context_Variable_t* var; - TBrowserStatusCode status = KBrsrSuccess; - - /* clear the varList */ - NW_WmlVar_Clear (varList); - - /* apply the global variables to the wml interpreter */ - NW_HED_ContextVisitor_Initialize (&vistor, (NW_HED_Context_t*) context); - - while((var = (NW_HED_Context_Variable_t *) NW_HED_ContextVisitor_NextVariable (&vistor)) != NULL) { - NW_Ucs2* name; - NW_Ucs2* value; - - name = (NW_Ucs2 *) NW_String_getStorage(&var->name); - value = (NW_Ucs2* ) NW_String_getStorage(&var->value); - - /* add the variable to the interpreter */ - status = NW_WmlVar_AddToList(varList, name, value, memScope); - } - - return status; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_event.c --- a/webengine/wmlengine/src/wml/src/wml_event.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_event.c $ - - Purpose: - - Class: WmlBrowser - - Browser's event handling implementation - - $Event: wml_event.c $ - -*/ - -#include "wml_task.h" -#include "wml_elm_attr.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -/* - * Returns the return value from other CoreBrowser calls - * - * RETURN: KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_GUIEvent(NW_Wml_t* thisObj, NW_Uint16 id, void *value) -{ - NW_Wml_Element_t *el; - NW_Int32 i = -1; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status; - - if (thisObj == NULL) - return KBrsrBadInputParam; - - if ((i = NW_Wml_FindEl(thisObj, id)) == -1) - return KBrsrFailure; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - status = KBrsrFailure; - - if (el_type == DO_ELEMENT || el_type == A_ELEMENT || el_type == ANCHOR_ELEMENT) - { - status = NW_Wml_HandleTaskEvent(thisObj, el); - } - else if (el_type == INPUT_ELEMENT) - { - status = NW_Wml_HandleInputEvent(thisObj, el, (NW_Ucs2*) value, NW_TRUE, NULL); - } - else if(el_type == OPTION_ELEMENT) - { - status = NW_Wml_HandleOptionEvent(thisObj, el); - } - return status; -} - - -/* - * handle user input to the INPUT element - * - * setFlag - if NW_TRUE set/unset the variable. If NW_FALSE, don't change the variable. - * - * RETURN: KBrsrSuccess - * KBrsrFailure - attribute not found - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_HandleInputEvent(NW_Wml_t *thisObj, - NW_Wml_Element_t *el, - NW_Ucs2 *value, - NW_Bool setFlag, - NW_Bool *validateOkPtr) -{ - NW_Ucs2* var_name = NULL; - NW_Ucs2* format = NULL; - NW_Ucs2* emptyok_str = NULL; - NW_Ucs2* maxLengthStr = NULL; - NW_WmlInput_EmptyOk_t emptyok = NW_WmlInput_EmptyOk_None; - NW_Bool partial_validation_ok = NW_FALSE; - NW_Bool validateOk = NW_FALSE; - TBrowserStatusCode status; - NW_Uint32 publicId; - - status = NW_DeckDecoder_GetDocumentPublicId(thisObj->decoder,&publicId); - if (status != KBrsrSuccess) { - return status; - } - - /* get NAME variable name */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &var_name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get FORMAT attr value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, FORMAT_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &format)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get EMPTYOK attr value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, EMPTYOK_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &emptyok_str)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get MAXLENGTH attr value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, MAXLENGTH_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &maxLengthStr)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* maxLengthStr set to NULL if attr not found */ - if (maxLengthStr != NULL) { - NW_Int32 maxLength = -1; /* Initialize to invalid length */ - if(NW_Str_StrIsValidLength(maxLengthStr)) - { - maxLength = NW_Str_Atoi(maxLengthStr); - } - if(maxLength < 0) - { - status = KBrsrFailure; - } - else if (NW_Str_Strlen(value) > NW_UINT32_CAST(maxLength)) - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - - emptyok = NW_WmlInput_EmptyOk_None; - /* if no format is specified, default for format is *M and emptyok=true. (WML-191, section 11.6.3 - emptyok) */ - if (emptyok_str == NULL && (format == NULL || *format == NULL)) - { - emptyok = NW_WmlInput_EmptyOk_True; - } - else - { - if ( emptyok_str != NULL) { - if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_TRUE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_True; - } else if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_FALSE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_False; - } - } - } - /* - * set variable to 0 if it doesn't conform to INPUT FORMAT - * - * this routine is called when input is complete, hence - * partial_validation_ok is NW_FALSE - */ - partial_validation_ok = NW_FALSE; - - validateOk = NW_WmlInput_ValidateValue(value, - format, - emptyok, - partial_validation_ok, - publicId); - - if (validateOkPtr != NULL) - { - *validateOkPtr = validateOk; - } - - if ( format && - !validateOk ) - { - if(setFlag) - { - NW_Wml_UnsetVar(thisObj, var_name); - } - else - { - status = KBrsrFailure; - NW_THROW_ERROR(); - } - } - else - { - if ( setFlag ) - { - status = NW_Wml_SetVar(thisObj, var_name, value); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - NW_THROW_ERROR(); - } - } - } - - status = KBrsrSuccess; - /* fall through */ - -NW_CATCH_ERROR - NW_Str_Delete(var_name); - NW_Str_Delete(format); - NW_Str_Delete(emptyok_str); - NW_Str_Delete(maxLengthStr); - - return status; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_head.c --- a/webengine/wmlengine/src/wml/src/wml_head.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_head.c $ - - Purpose: - - Class: WmlBrowser - - Handles head element processing logic -*/ - -#include "wml_task.h" -#include "wml_history.h" -#include "nwx_url_utils.h" -#include "wml_elm_attr.h" - -#include "nwx_mem.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -static void ProcessMetaData(void); - - -/* - * return NW_TRUE if no access conflict, NW_FALSE otherwise - * - * RETURN KBrsrSuccess -> NW_TRUE - * KBrsrFailure -> NW_FALSE (access denied - NOT a fatal error) - * KBrsrOutOfMemory - * NW_STAT_* -> propagate failures - */ -TBrowserStatusCode NW_Wml_AccessControl(NW_Wml_t* thisObj, NW_Ucs2* url) -{ - NW_Ucs2 *domain = 0, *path = 0, *referring_url = 0; - NW_Wml_Element_t head_el, el; - NW_DeckDecoderIter_t iter; - TBrowserStatusCode status = KBrsrSuccess; - - /* if no head/access element, access is public */ - status = NW_DeckDecoder_GetHeadElement(thisObj->decoder, &head_el); - if (status != KBrsrSuccess) - { - if (status == KBrsrFailure) - /* The deck has NO head so access is allowed */ - return KBrsrSuccess; - else - /* A fatal error ... */ - return status; - } - - /* if head element has no elements, access is public */ - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, &head_el) != KBrsrSuccess) - return KBrsrSuccess; - - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - if (el_type == ACCESS_ELEMENT) - { - /* if 1) there is an access element - 2) its public attr is not NW_TRUE - 3) there is no prev deck in history to check access - then fail access control - */ - status = NW_Wml_HistoryGetPrevResponseUrl(thisObj, &referring_url); - if (status == KBrsrOutOfMemory) - return status; - - if (referring_url == NULL) - return KBrsrFailure; - - /* get domain */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, DOMAIN_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &domain); - if (status == KBrsrOutOfMemory) - { - /* Note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(referring_url); - return status; - } - - /* get path */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, PATH_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &path); - if (status == KBrsrOutOfMemory) - { - /* Note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(referring_url); - NW_Str_Delete(domain); - return status; - } - - /* set defaults if needed */ - if (domain == NULL) - status = NW_Url_GetHost(url, &domain); - if (status == KBrsrOutOfMemory || status == KBrsrMalformedUrl) - { - /* Note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(referring_url); - NW_Str_Delete(path); - NW_Str_Delete(domain); - return status; - } - - if (path == NULL) { - path = NW_Str_NewcpyConst(WAE_URL_PATH_SEP); - } - status = NW_Url_AccessOK(domain, path, referring_url, NULL); - - /* cleanup */ - /* Note: NW_Str_Delete() handles NULL pointers */ - NW_Str_Delete(referring_url); - NW_Str_Delete(path); - NW_Str_Delete(domain); - - /* only one ACCESS element allowed */ - break; - - } - - } - - return status; -} - - -/* - * utility - * - * RETURN: KBrsrSuccess - * KBrsrFailure - NO meta or head element - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_HandleMetaElements(NW_Wml_t *thisObj) -{ - NW_Ucs2 *http_equiv = 0, *name = 0; - NW_Ucs2 *content = 0, *scheme = 0; - NW_Wml_Element_t container, el; - TBrowserStatusCode status = KBrsrFailure; - NW_DeckDecoderIter_t iter; - - /* return if no HEAD or HEAD contained elements */ - if (NW_DeckDecoder_GetHeadElement(thisObj->decoder, &container) != KBrsrSuccess) - return status; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, &container) != KBrsrSuccess) - return status; - - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - if (el_type == META_ELEMENT) - { - http_equiv = NULL; - name = NULL; - content = NULL; - scheme = NULL; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, HTTP_EQUIV_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &http_equiv)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, NAME_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, CONTENT_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &content)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, SCHEME_ATTR, - (NW_Wml_VarList_t *)0, NW_MEM_SEGMENT_MANUAL, &scheme)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - ProcessMetaData(); - - NW_Str_Delete(http_equiv); - http_equiv = NULL; - NW_Str_Delete(name); - name = NULL; - NW_Str_Delete(content); - content = NULL; - NW_Str_Delete(scheme); - scheme = NULL; - } - } - - return KBrsrSuccess; - -NW_CATCH_ERROR - NW_Str_Delete(http_equiv); - NW_Str_Delete(name); - NW_Str_Delete(content); - NW_Str_Delete(scheme); - - return status; -} - -/* - * NOTE: to date, this function is a noop. - * - * TODO make sure we do not have conflicting charset - */ -static void ProcessMetaData() -{ -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_input_validation.c --- a/webengine/wmlengine/src/wml/src/wml_input_validation.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,948 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_input_validation.c $ - - Purpose: - - Class: WmlBrowser - - Main browser's input variable validation logic -*/ - - -#include "wml_task.h" - -#include "nwx_string.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "NW_Unicode_Category.h" -#include "NW_Unicode_CategoryI.h" -#include "NW_Unicode_LetterLowercase.h" -#include "NW_Unicode_LetterModifier.h" -#include "NW_Unicode_LetterUppercase.h" -#include "NW_Unicode_NumberDecimalDigit.h" -#include "NW_Unicode_SymbolCurrency.h" -#include "NW_Unicode_SymbolModifier.h" -#include "NW_Unicode_SymbolMath.h" -#include "NW_Unicode_SymbolOther.h" -#include "NW_Unicode_PunctuationConnector.h" -#include "NW_Unicode_SeparatorSpace.h" -#include "NW_Unicode_PunctuationDash.h" -#include "NW_Unicode_PunctuationOpen.h" -#include "NW_Unicode_PunctuationClose.h" -#include "NW_Unicode_PunctuationOther.h" -#include "NW_Unicode_LetterOther.h" -#include "NW_Unicode_LetterChina.h" -#include "NW_Unicode_LetterThai.h" - -typedef enum { - ANY_NUMBER_OF_CHARS, - SPECIFIC_NUMBER_OF_CHARS -} FormatWildcard_t; - -/* for INPUT element validation */ - -static NW_Bool ValidateInputWildcard(NW_Ucs2*, NW_Ucs2*, FormatWildcard_t, NW_Int32 ); -static NW_Bool CheckaFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool CheckAFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool ChecknFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool CheckNFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool CheckxFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool CheckXFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked); -static NW_Bool CheckAnyChar(NW_Ucs2* value, NW_Int32 chars_to_check); -static NW_Bool ValidateFormat(const NW_Ucs2 * format, NW_Int32 *numChars); -static NW_Bool IsFormatCode(const NW_Ucs2 ch); -static NW_Bool IsStarF_Format(NW_Ucs2 *format); - -NW_Bool NW_WmlInput_ValidateValue(NW_Ucs2* input_value, - NW_Ucs2* format, - NW_WmlInput_EmptyOk_t emptyok, - NW_Bool partial_validation_ok, - NW_Uint32 docPublicId) -{ - NW_Ucs2 *format_cursor = format, *value_cursor = input_value; - NW_Bool failed_validation = NW_FALSE, done = NW_FALSE; - NW_Int32 chars_to_check, chars_checked; - NW_Int32 numChars = 0; - - /* handle empty input cases */ - if (!input_value || input_value[0] == 0) - { - if (emptyok == NW_WmlInput_EmptyOk_True) { - /* Empty string and emptyok == true. Return valid match. */ - return NW_TRUE; - } else if (emptyok == NW_WmlInput_EmptyOk_False) { - /* Empty string and emptyok == false. Return mismatch. */ - return NW_FALSE; - } else { - /* emptyok not set. Drop through and match against format mask. */ - ; - } - } - - if ((format == NULL) || - (format[0] == '\0') || - (!ValidateFormat(format, &numChars))) { - /* Either no format or an illegal format. Nothing to validate - against. Everything accepted. */ - return NW_TRUE; - } - - if ((input_value == NULL) || (input_value[0] == '\0')) { - if(IsStarF_Format(format)) - { - /* No input value and a "*f" format mask */ - return NW_TRUE; - } - else - { - /* No input value and a nonempty valid format mask */ - return NW_FALSE; - } - } - - if (numChars != -1 && partial_validation_ok == NW_FALSE) - { - /* For WML 1.0 and 1.1, the format has a fixed number of characters. - * If we're validating the entire input and the number of characters - * are not the same, return failure. But for WML 1.2, the - * number of input characters can be from 1 to n (1 <=n <= 9). - */ - - NW_Int32 inputLength; - - inputLength = NW_Str_Strlen(input_value); - - if (docPublicId == NW_Wml_1_0_PublicId || docPublicId == NW_Wml_1_1_PublicId) /**{ - At WML 1.2 && 1.3, the * number of input characters can be from 1 to n (1 <=n <= 9), and don't - need the length of input value is as same as the number get from fomat. - if (inputLength != numChars) - return NW_FALSE; - } else {**/ - if ( (inputLength < 1) || (inputLength > numChars) ) { - return NW_FALSE; - } - } - - while (format_cursor && format_cursor[0] && !failed_validation && !done) - { - switch (format_cursor[0]) - { - case 'A': - chars_to_check = 1; - if (CheckAFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor += chars_checked; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'a': - chars_to_check = 1; - if (CheckaFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor += chars_checked; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'N': - chars_to_check = 1; - if (CheckNFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor++; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'n': - chars_to_check = 1; - if (ChecknFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor++; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'X': - chars_to_check = 1; - if (CheckXFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor += chars_checked; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'x': - chars_to_check = 1; - if (CheckxFormat(value_cursor, chars_to_check, &chars_checked)) - { - format_cursor++; - value_cursor++; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case 'M': - case 'm': - chars_to_check = 1; - if (CheckAnyChar(value_cursor, chars_to_check)) - { - format_cursor++; - value_cursor++; - } - else - { - failed_validation = NW_TRUE; - } - break; - - case '*': - { - FormatWildcard_t wildcard = ANY_NUMBER_OF_CHARS; - format_cursor++; - if ( value_cursor[0] == 0) - { - /* Not more values. OK because * is 0 or more. */ - done = NW_TRUE; - /* Skip format character if there. */ - if ( format_cursor[0] != 0 ) - format_cursor++; - } - else if (ValidateInputWildcard(value_cursor, format_cursor, - wildcard, 0)) - { - done = NW_TRUE; - } - else - { - failed_validation = NW_TRUE; - } - break; - } - - case '\\': - { - NW_Ucs2 save_format_char, save_value_char; - format_cursor++; - save_format_char = format_cursor[1]; - save_value_char = value_cursor[1]; - format_cursor[1] = 0; - value_cursor[1] = 0; - if (!NW_Str_Strcmp(format_cursor, value_cursor)) - { - format_cursor++; - value_cursor++; - *format_cursor = save_format_char; - *value_cursor = save_value_char; - } - else - { - /* Save the original format back to its value */ - format_cursor++; - value_cursor++; - *format_cursor = save_format_char; - *value_cursor = save_value_char; - failed_validation = NW_TRUE; - } - break; - } - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - /* NW_Ucs2 save_char = *(format_cursor + 1); */ - FormatWildcard_t wildcard = SPECIFIC_NUMBER_OF_CHARS; - NW_Int32 num_chars; - NW_Int32 i = 0; - NW_Ucs2 save_char; - - while (NW_Str_Isdigit(format_cursor[i])) - { - i++; - } - - save_char = format_cursor[i]; - format_cursor[i] = 0; - num_chars = NW_Str_Atoi(format_cursor); - - format_cursor += i; - *format_cursor = save_char; - if (ValidateInputWildcard(value_cursor, format_cursor, - wildcard, num_chars)) - { - format_cursor++; - /* Bug # - TODO: JW buddy review this change. - - Problem : the value_cursor was moved by the number of characters - defined in the format. - Fix: For example the value_cursor is "aa" format_cursor = "5a" - num_chars = "5" the value_cursor cannot be incremented by "5", - we dont know how big the input string is. - */ - /*value_cursor += num_chars;*/ - NW_ASSERT(NW_Str_Strlen(value_cursor)); - /*lint -e{666} Expression with side effects passed to repeated parameter in macro*/ - value_cursor += NW_MIN(NW_UINT32_CAST(num_chars), NW_Str_Strlen(value_cursor)); - } - else - { - failed_validation = NW_TRUE; - } - break; - } - - default: - failed_validation = NW_TRUE; - - } - - /* eat any wildcard characters left at end */ - if (!value_cursor[0]) { - NW_Bool wildchar_found = NW_FALSE; - while (format_cursor[0] == '*') { - wildchar_found = NW_TRUE; - format_cursor++; - } - /* If these is any wildchar character at this point, it should apprear - only once and must appear at the end of the format string */ - if(wildchar_found) - { - if(format_cursor[0] && IsFormatCode(format_cursor[0]) && - !format_cursor[1]) - { - done = NW_TRUE; - } - else - { - failed_validation = NW_TRUE; - } - } - - if ((!format_cursor[0]) || (NW_Str_Isdigit(format_cursor[0]))) { - done = NW_TRUE; - } - } - - /* check for more format chars, but no more value chars */ - if (!done && format_cursor[0] && !value_cursor[0]) - { - if (partial_validation_ok) - { - done = NW_TRUE; - } - else - { - failed_validation = NW_TRUE; - } - } - - /* check for more value chars, but no more format chars */ - if (!done && value_cursor[0] && !format_cursor[0]) - failed_validation = NW_TRUE; - } - return NW_BOOL_CAST(!failed_validation); -} - -/* - * Function to validate the format attribute value of an INPUT element. - * Note: The UI should validate the format string before trying to parse it. - * One example where the UI needs to parse the format string is to implement - * the functionality of preloading the input field. - * eg:- <input name="date" format="NN\-NN\-\2\0\0\0\0">, - * the UI can display this as "__-__-2000" - * RETURN: NW_TRUE - if the format is legal - * - if format is null - * NW_FALSE - if the format is not legal - - */ -NW_Bool NW_WmlInput_ValidateFormat(const NW_Ucs2 * format) -{ - NW_Int32 numChars = 0; - return ValidateFormat(format, &numChars); -} - -static NW_Bool ValidateInputWildcard(NW_Ucs2* input_value, - NW_Ucs2* format, - FormatWildcard_t wildcard, - NW_Int32 num_of_chars) -{ - NW_Ucs2 *format_cursor = format, *value_cursor = input_value; - NW_Bool validation_ok = NW_FALSE; - NW_Int32 chars_to_check; - NW_Int32 chars_checked; - - chars_to_check = (wildcard == ANY_NUMBER_OF_CHARS ? - NW_Str_Strlen(input_value) : num_of_chars); - switch (format_cursor[0]) - { - case 'A': - if (CheckAFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - - case 'a': - if (CheckaFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - case 'N': - if (CheckNFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - case 'n': - if (ChecknFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - case 'X': - if (CheckXFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - case 'x': - if (CheckxFormat(value_cursor, chars_to_check, &chars_checked)) - { - validation_ok = NW_TRUE; - } - break; - - case 'M': - case 'm': - if (CheckAnyChar(value_cursor, chars_to_check)) - { - validation_ok = NW_TRUE; - } - break; - - - default: - /* The format specifier is illegal - the mask is ignored */ - validation_ok = NW_TRUE; - break; - } - - return validation_ok; -} - - -/* Check that 1 to chars_to_check match the WML input "a" format. */ -/*entry of any lowercase letter, symbol, or punctuation character. Numeric -characters are excluded.*/ - -static NW_Bool CheckaFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - NW_Ucs4 uniCompare; - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - uniCompare = (NW_Ucs4)value[i]; - if ((!(NW_Unicode_IsLetterLowercase(uniCompare))) && - (!(NW_Unicode_IsLetterModifier(uniCompare))) && - (!(NW_Unicode_IsLetterOther(uniCompare))) && - (!(NW_Unicode_IsSymbolCurrency(uniCompare))) && - (!(NW_Unicode_IsSymbolMath(uniCompare))) && - (!(NW_Unicode_IsSymbolModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolOther(uniCompare))) && - (!(NW_Unicode_IsPunctuationConnector(uniCompare))) && - (!(NW_Unicode_IsPunctuationDash(uniCompare))) && - (!(NW_Unicode_IsPunctuationOpen(uniCompare))) && - (!(NW_Unicode_IsPunctuationClose(uniCompare))) && - (!(NW_Unicode_IsSeparatorSpace(uniCompare))) && - (!(NW_Unicode_IsPunctuationOther(uniCompare))) && - (!(NW_Unicode_IsLetterChina(uniCompare))) && - (!(NW_Unicode_IsLetterThai(uniCompare)))) - { - pass = NW_FALSE; - } - i++; - } - while ((pass == NW_TRUE) && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} - - -/* Check that 1 to chars_to_check match the WML input "A" format. */ -/*entry of any uppercase letter, symbol, or punctuation character. Numeric -characters are excluded**/ - -static NW_Bool CheckAFormat(NW_Ucs2* value, NW_Int32 chars_to_check, NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - NW_Ucs4 uniCompare; - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - uniCompare = (NW_Ucs4)value[i]; - if ((!(NW_Unicode_IsLetterUppercase(uniCompare))) && - (!(NW_Unicode_IsLetterModifier(uniCompare))) && - (!(NW_Unicode_IsLetterOther(uniCompare))) && - (!(NW_Unicode_IsSymbolCurrency(uniCompare))) && - (!(NW_Unicode_IsSymbolMath(uniCompare))) && - (!(NW_Unicode_IsSymbolModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolOther(uniCompare))) && - (!(NW_Unicode_IsPunctuationConnector(uniCompare))) && - (!(NW_Unicode_IsPunctuationDash(uniCompare))) && - (!(NW_Unicode_IsPunctuationOpen(uniCompare))) && - (!(NW_Unicode_IsPunctuationClose(uniCompare))) && - (!(NW_Unicode_IsSeparatorSpace(uniCompare))) && - (!(NW_Unicode_IsPunctuationOther(uniCompare))) && - (!(NW_Unicode_IsLetterChina(uniCompare))) && - (!(NW_Unicode_IsLetterThai(uniCompare)))) - { - pass = NW_FALSE; - } - i++; - } - while ((pass == NW_TRUE) && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} - -/* Check that 1 to chars_to_check match the WML input "x" format. */ -/* entry of any lowercase letter, numeric character, symbol, or punctuation -character -*/ -static NW_Bool CheckxFormat(NW_Ucs2* value, NW_Int32 chars_to_check, - NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - NW_Ucs4 uniCompare; - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - uniCompare = (NW_Ucs4)value[i]; - if ((!(NW_Unicode_IsLetterLowercase(uniCompare))) && - (!(NW_Unicode_IsLetterOther(uniCompare))) && - (!(NW_Unicode_IsLetterModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolCurrency(uniCompare))) && - (!(NW_Unicode_IsSymbolMath(uniCompare))) && - (!(NW_Unicode_IsSymbolModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolOther(uniCompare))) && - (!(NW_Unicode_IsPunctuationConnector(uniCompare))) && - (!(NW_Unicode_IsPunctuationDash(uniCompare))) && - (!(NW_Unicode_IsPunctuationOpen(uniCompare))) && - (!(NW_Unicode_IsPunctuationClose(uniCompare))) && - (!(NW_Unicode_IsSeparatorSpace(uniCompare))) && - (!(NW_Unicode_IsPunctuationOther(uniCompare))) && - (!(NW_Unicode_IsNumberDecimalDigit(uniCompare))) && - (!(NW_Unicode_IsLetterChina(uniCompare))) && - (!(NW_Unicode_IsLetterThai(uniCompare)))) - { - pass = NW_FALSE; - } - i++; - } - while ((pass == NW_TRUE) && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} - -/* Check that 1 to chars_to_check match the WML input "X" format. */ -/* entry of any uppercase letter, numeric character, symbol, or punctuation -character*/ - -static NW_Bool CheckXFormat(NW_Ucs2* value, NW_Int32 chars_to_check, - NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - NW_Ucs4 uniCompare; - - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - uniCompare = (NW_Ucs4)value[i]; - if ((!(NW_Unicode_IsLetterUppercase(uniCompare))) && - (!(NW_Unicode_IsLetterOther(uniCompare))) && - (!(NW_Unicode_IsLetterModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolCurrency(uniCompare))) && - (!(NW_Unicode_IsSymbolMath(uniCompare))) && - (!(NW_Unicode_IsSymbolModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolOther(uniCompare))) && - (!(NW_Unicode_IsPunctuationConnector(uniCompare))) && - (!(NW_Unicode_IsPunctuationDash(uniCompare))) && - (!(NW_Unicode_IsPunctuationOpen(uniCompare))) && - (!(NW_Unicode_IsPunctuationClose(uniCompare))) && - (!(NW_Unicode_IsSeparatorSpace(uniCompare))) && - (!(NW_Unicode_IsPunctuationOther(uniCompare))) && - (!(NW_Unicode_IsNumberDecimalDigit(uniCompare))) && - (!(NW_Unicode_IsLetterChina(uniCompare))) && - (!(NW_Unicode_IsLetterThai(uniCompare)))) - { - pass = NW_FALSE; - } - i++; - } - while ((pass == NW_TRUE) && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} - - -/* Check that 1 to chars_to_check match the WML input "n" format. */ -/* entry of any numeric, symbol, or punctuation character.*/ - -static NW_Bool ChecknFormat(NW_Ucs2* value, NW_Int32 chars_to_check, - NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - NW_Ucs4 uniCompare; - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - uniCompare = (NW_Ucs4)value[i]; - if((!(NW_Unicode_IsSymbolCurrency(uniCompare))) && - (!(NW_Unicode_IsSymbolMath(uniCompare))) && - (!(NW_Unicode_IsSymbolModifier(uniCompare))) && - (!(NW_Unicode_IsSymbolOther(uniCompare))) && - (!(NW_Unicode_IsPunctuationConnector(uniCompare))) && - (!(NW_Unicode_IsPunctuationDash(uniCompare))) && - (!(NW_Unicode_IsPunctuationOpen(uniCompare))) && - (!(NW_Unicode_IsPunctuationClose(uniCompare))) && - (!(NW_Unicode_IsPunctuationOther(uniCompare))) && - (!(NW_Unicode_IsNumberDecimalDigit(uniCompare)))) { - pass = NW_FALSE; - } - i++; - } - while ((pass == NW_TRUE) && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} -/*entry of any numeric character.*/ -static NW_Bool CheckNFormat(NW_Ucs2* value, NW_Int32 chars_to_check, - NW_Int32* chars_checked) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - - NW_ASSERT(chars_checked); - - *chars_checked = 0; - - if ( (chars_to_check <= 0) || - (value == NULL) || - (value[0] == 0 ) ) - { - return NW_FALSE; - } - - do - { - if (!NW_Unicode_IsNumberDecimalDigit((NW_Ucs4)value[i])) { - pass = NW_FALSE; - } - i++; - } - while (pass && (i < chars_to_check) && value[i]); - - *chars_checked = i; - return pass; -} - -static NW_Bool CheckAnyChar(NW_Ucs2* value, NW_Int32 chars_to_check) -{ - NW_Int32 i = 0; - NW_Bool pass = NW_TRUE; - - NW_ASSERT(value); - - do - { - if (NW_Str_Iscntrl(value[i])) - { - pass = NW_FALSE; - } - i++; - } - while (pass && (i < chars_to_check) && value[i]); - - return pass; -} - -/* - * Given a format string, determine if it is legal. - * - * RETURN: NW_TRUE - if the format is legal - * - if format is null - * NW_FALSE - if the format is not legal - * - * MODIFIED: numChars is set to the number of characters that - * are allowed in the format or set to -1 if any number of - * chars are allowed. - */ -static NW_Bool ValidateFormat(const NW_Ucs2 * format, NW_Int32 *numChars) -{ - NW_Bool expectChar = NW_FALSE; - const NW_Ucs2 * pch; - - NW_ASSERT(numChars != NULL); - *numChars = 0; - - /* A null or empty format string is legal */ - if ((format == NULL) || (format[0] == 0)) - return NW_TRUE; - - for (pch = format; (*pch) != 0; pch++) - { - - switch (*pch) - { - case 'A': - case 'a': - case 'N': - case 'n': - case 'X': - case 'x': - case 'M': - case 'm': - if (*numChars >= 0) - (*numChars)++; - if (expectChar) - { - /* - * The previous format char was a number or wildcard - * thus no other characters are allowed in a legal - * format string - */ - if (pch[1] == 0) - return NW_TRUE; - else - return NW_FALSE; - } - expectChar = NW_FALSE; - break; - - case '\\': - if (*numChars == -1 || expectChar) - /* - * Was expecting a format char from above but - * did not get one so the format is not legal - */ - return NW_FALSE; - - /* Skip this character and the escape */ - (*numChars)+=2; - pch++; - - if ( *pch == 0 ) - return NW_FALSE; /* Must have another char after "\". */ - - break; - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (*numChars == -1 || expectChar) - /* Illegal format */ - return NW_FALSE; - - /* - * Add the ordinal value of this specifier but assume that - * one will added for the specifier. - */ - { - NW_Ucs2 tmp[2]; - tmp[0] = *pch; - tmp[1] = 0; - *numChars = (*numChars) + NW_Str_Atoi(tmp) - 1; - } - - expectChar = NW_TRUE; - break; - - case '*': - if (*numChars == -1 || expectChar) - /* Illegal format */ - return NW_FALSE; - - *numChars = -1; - expectChar = NW_TRUE; - break; - - default: - /* Illegal format character */ - return NW_FALSE; - } - } - - if (expectChar) - return NW_FALSE; - else - return NW_TRUE; -} - -static NW_Bool IsFormatCode(const NW_Ucs2 ch) -{ - if((ch == 'A') || (ch == 'a') || (ch == 'M') || (ch == 'm') || - (ch == 'X') || (ch == 'x') || (ch == 'N') || (ch == 'n')) - { - return NW_TRUE; - } - else - { - return NW_FALSE; - } -} - -/***************************************************************** - - Name: IsStarF_Format() - - Description: Checks for "*f" format of WML format attribute - - Parameters: format - In, value of format attribute. - - Return Value: TRUE/FALSE - TRUE if the format is of "*f" type. - -*****************************************************************/ -static NW_Bool IsStarF_Format(NW_Ucs2 *format) -{ - if(format[0] != '*') - { - return NW_FALSE; - } - format++; - if(((format[0] == 'A') || (format[0] == 'a') || - (format[0] == 'N') || (format[0] == 'n') || - (format[0] == 'X') || (format[0] == 'x') || - (format[0] == 'M') || (format[0] == 'm')) && - (format[1] == 0)) - { - return NW_TRUE; - } - return NW_FALSE; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_intrinsic_event.c --- a/webengine/wmlengine/src/wml/src/wml_intrinsic_event.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,349 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/***************************************************************** -** File name: wml_intrinsic_event.c -** Part of: WML Interpreter -** Description: This file contains functions to handle the - ONETERFORWARD, ONENTERBACKWARD and ONTIMER Intrinsic Events - per [WML]. -******************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "wml_task.h" -#include "wml_url_utils.h" -#include "wml_api.h" -#include "wml_elm_attr.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - -static -TBrowserStatusCode Wml_HandleTemplateIntrinsicEvents(NW_Wml_t* obj, - NW_Wml_Intrinsic_e intrinsic_event); -static -TBrowserStatusCode Wml_HandleCardIntrinsicEvents(NW_Wml_t* obj, - NW_Wml_Intrinsic_e intrinsic_event); -static -TBrowserStatusCode Wml_HandleIntrinsicEvents(NW_Wml_t *obj, - NW_Wml_Element_t *el, - NW_Wml_Intrinsic_e intrinsic_event); - -/***************************************************************** - - Name: Wml_HandleCardIntrinsicEvents() - - Description: Searches for the card element, and if found invokes the - Wml_HandleIntrinsicEvents function. - - Parameters: obj - - intrinsic_event - intrinsic event - - Return: - KBrsrSuccess - if the event is found - KBrsrFailure - if the event is not found (NOT a fatal error) - - no card element. - KBrsrOutOfMemory - NW_STAT_* - propagates other errors - -******************************************************************/ -static -TBrowserStatusCode Wml_HandleCardIntrinsicEvents(NW_Wml_t* obj, - NW_Wml_Intrinsic_e intrinsic_event) -{ - NW_Wml_Element_t card_el; - NW_Wml_t *thisObj = obj; - - if (!NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - return KBrsrFailure; - return Wml_HandleIntrinsicEvents(thisObj, &card_el, intrinsic_event); -} - - -/***************************************************************** - - Name: Wml_HandleTemplateIntrinsicEvents() - - Description: Searches for the template element, and if found invokes the - Wml_HandleIntrinsicEvents function. - - Parameters: obj - - intrinsic_event - intrinsic event - - Return: - KBrsrSuccess - if the event is found - KBrsrFailure - if the event is not found (NOT a fatal error) - - no template element - - not an intrinsic event - - bad card element - KBrsrOutOfMemory - NW_STAT_* - other errors - -******************************************************************/ -static -TBrowserStatusCode Wml_HandleTemplateIntrinsicEvents(NW_Wml_t* obj, - NW_Wml_Intrinsic_e intrinsic_event) -{ - TBrowserStatusCode status; - NW_Wml_Element_t templ_el; - NW_Wml_t *thisObj = obj; - - if ((status = NW_DeckDecoder_GetTemplateElement(thisObj->decoder, &templ_el)) - != KBrsrSuccess) { - return status; - } - return Wml_HandleIntrinsicEvents(thisObj, &templ_el, intrinsic_event); -} - -/***************************************************************** - - Name: Wml_HandleIntrinsicEvents() - - Description: Handle intrinsic events defined on the requested element. - 1. Look for (ONENTERFORWARD/ONENTERBACKWARD/ONTIMER) attribute value URL - on the element.If found, fetch the URL. - 2. Search for any contained elements of type ONEVENT on the element. If - found the task defined on the element is executed. - - Note: Intrinsic events are only defined at the card/template level. - - Parameters: obj - - el - card (or) template element - intrinsic_event - intrinsic events - - Return: - KBrsrSuccess - if the event is found - KBrsrFailure - if the event is not found (NOT a fatal error) - - not an intrinsic event - - bad element - KBrsrOutOfMemory - NW_STAT_* - propagates other errors - -******************************************************************/ -static -TBrowserStatusCode Wml_HandleIntrinsicEvents(NW_Wml_t *obj, - NW_Wml_Element_t *el, - NW_Wml_Intrinsic_e intrinsic_event) -{ - NW_Wml_t *thisObj = obj; - NW_Ucs2 *url = 0, *target_url = 0; - NW_Wml_Element_t el_iterator; - NW_Bool found = NW_FALSE; - NW_Wml_Attr_t attr_token = UNKNOWN_ATTR; - const char *type_str = NULL; - TBrowserStatusCode status; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(el != NULL); - /* known event? */ - NW_ASSERT((intrinsic_event == ONENTERFORWARD) || - (intrinsic_event == ONENTERBACKWARD) || - (intrinsic_event == ONTIMER)); - - switch (intrinsic_event) { - - case ONENTERFORWARD: - attr_token = ONENTERFORWARD_ATTR; - type_str = WAE_ASC_ONENTERFORWARD_STR; - break; - - case ONENTERBACKWARD: - attr_token = ONENTERBACKWARD_ATTR; - type_str = WAE_ASC_ONENTERBACKWARD_STR; - break; - - case ONTIMER: - attr_token = ONTIMER_ATTR; - type_str = WAE_ASC_ONTIMER_STR; - break; - - case ONCLICK: - default: - break; - } - NW_ASSERT(type_str != NULL); - NW_ASSERT((attr_token == ONENTERFORWARD_ATTR) || - (attr_token == ONENTERBACKWARD_ATTR) || - (attr_token == ONTIMER_ATTR)); - - /* First, check for ON*** card attribute */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, attr_token, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &url); - - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) { - return status; - } - - if (url) { - - /* get absolute url */ - status = NW_Wml_GetFullUrl(thisObj, url, &target_url); - NW_Str_Delete(url); - - if (status == KBrsrSuccess) - { - /* if no url, then perhaps a dialog should be presented to the user */ - if (target_url) { - /* clean up the display */ - if ((status = (DISPLAY_API->cleanUp)(thisObj->browser_app)) == KBrsrSuccess) { - thisObj->curr_task = GO_TASK; - - if( (intrinsic_event == ONENTERFORWARD) ||(intrinsic_event ==ONENTERBACKWARD)) { - thisObj->IntraDeck_OefCounter++; /* Intra-deck On-enter-forward*/ - thisObj->oefNavigation = NW_TRUE; - } - status = NW_Wml_FetchUrl(thisObj, target_url, 0);/* no GO element */ - } - NW_Str_Delete(target_url); - if (status != KBrsrSuccess) { - return status; - } - } - found = NW_TRUE; - } - else if(status == KBrsrFailure) /* fall through */ - { - /* FAILURE does not imply a fatal error */ - found = NW_TRUE; - } - else - { - return status; - } - } else { /* Second, check for ONEVENT element of type onenter_tag */ - NW_DeckDecoderIter_t iter; - - found = NW_FALSE; - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, el) != KBrsrSuccess) - return KBrsrFailure; - - while ((found == NW_FALSE) && NW_DeckDecoderIter_GetNextElement(&iter, &el_iterator)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el_iterator, &el_type); - - if (el_type == ONEVENT_ELEMENT) { - if( (intrinsic_event == ONENTERFORWARD) ||(intrinsic_event ==ONENTERBACKWARD)) { - thisObj->IntraDeck_OefCounter++; /* Intra-deck On-enter-forward*/ - thisObj->oefNavigation = NW_TRUE; - } - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, &el_iterator, TYPE_ATTR, - type_str, thisObj->var_list)) { - /* clean up the display */ - if ((status = (DISPLAY_API->cleanUp)(thisObj->browser_app)) != KBrsrSuccess) - { - return status; - } - status = NW_Wml_HandleTaskEvent(thisObj, &el_iterator); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does NOT imply a fatal error */ - return status; - } - found = NW_TRUE; - } - } - /* Note: Check "found" variable first because event processing can change - content which could make GetNextElement call invalid. jwild 2000.09.29. */ - } - } - - NW_ASSERT((status == KBrsrSuccess) || (status == KBrsrFailure)); - - if (found == NW_TRUE) - return KBrsrSuccess; - else - return KBrsrFailure; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -/***************************************************************** - - Name: NW_Wml_HandleIntrinsicEvents() - - Description: HandleIntrinsicEvents generic function, searches for the card event - tag (ONENTERFORWARD or ONENTERBACKWARD) as either an attribute of the card element - or a contained ONEVENT element of TYPE "ONENTER*". - - 1. If the CARD element contains a card-level Intrinsic Event - (i.e. the event is an attribute of the CARD), execute the event - 2. Else, if the CARD contains an ONEVENT element, execute the ONEVENT's task; - 3. Else if the deck contains a TEMPLATE element and the TEMPLATE contains - an Intrinsic Event as an attribute, execute the event; - 4. Else if the deck contains a TEMPLATE element and the TEMPLATE contains - an ONEVENT element, execute the ONEVENT's task - - Parameters: obj - - intrinsic_event - intrinsic events - - Return: - KBrsrSuccess - if the event is found - KBrsrFailure - if the event is not found (NOT a fatal error) - KBrsrOutOfMemory - NW_STAT_* - propagates other errors - -******************************************************************/ -TBrowserStatusCode NW_Wml_HandleIntrinsicEvents(NW_Wml_t* obj, NW_Wml_Intrinsic_e intrinsic_event) -{ - NW_Wml_t *thisObj = obj; - TBrowserStatusCode status; - - /* card level events override the deck level events */ - status = Wml_HandleCardIntrinsicEvents(thisObj, intrinsic_event); - if (status == KBrsrFailure) - { - /* not a fatal error, look for template events */ - status = Wml_HandleTemplateIntrinsicEvents(thisObj, intrinsic_event); - /* propogate errors to the caller */ - if (status != KBrsrSuccess && status != KBrsrFailure) - { - return status; - } - } - else if(status != KBrsrSuccess) - { - /* propogate errors to the caller */ - return status; - } - - NW_ASSERT((status == KBrsrSuccess) || (status == KBrsrFailure)); - - /* the browser state will be reflected in the curr_task variable */ - if ((status == KBrsrSuccess) && (thisObj->curr_task != NOOP_TASK)) { - /*return (DISPLAY_API->destroyCard)(thisObj->browser_app);*/ - return KBrsrSuccess; - } - return KBrsrFailure; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_list.c --- a/webengine/wmlengine/src/wml/src/wml_list.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_list.c $ - - Purpose: - - Definition of template functions for creating, appending, accessing and - deleting generic singley linked lists. -*/ - -#include "wml_list.h" - -#include "nwx_mem.h" -#include "nwx_memseg.h" -#include "BrsrStatusCodes.h" - -/* - * RETURN NW_Wml_List_t * or 0 if malloc fails - */ -NW_Wml_List_t *NW_WmlList_NewEmptyList(NW_Mem_Segment_Id_t memSegment) -{ - NW_Wml_List_t *l = (NW_Wml_List_t *) NW_Mem_Segment_Malloc(sizeof(NW_Wml_List_t), memSegment); - - if (l == 0) - return 0; - - l->first = l->last = l->cursor = 0; - l->memSegment = memSegment; - - return l; -} - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlList_Append(NW_Wml_List_t *l, void *el) -{ - NW_Wml_Node_t *n = (NW_Wml_Node_t *)NW_Mem_Segment_Malloc(sizeof(NW_Wml_Node_t), l->memSegment); - - if (n == 0) - return KBrsrOutOfMemory; - - NW_ASSERT(l != NULL); - - n->data = el; - n->next = 0; - - if (l->last) - { - l->last->next = n; - l->last = n; - } - - /* append to empty list */ - else - { - l->first = l->last = l->cursor = n; - } - - return KBrsrSuccess; -} - - -void *NW_WmlList_First(NW_Wml_List_t *l) -{ - - l->cursor = l->first; - - if (l->cursor && l->cursor->data) - return l->cursor->data; - else - return 0; -} - -void *NW_WmlList_Next(NW_Wml_List_t *l) -{ - if (NW_WmlList_IsLast(l)) - return 0; - - l->cursor = l->cursor->next; - return l->cursor->data; -} - -NW_Bool NW_WmlList_IsLast(NW_Wml_List_t *l) -{ - return NW_BOOL_CAST(l->cursor->next == 0); -} - -NW_Int32 NW_WmlList_Length(NW_Wml_List_t *l) -{ - NW_Wml_Node_t *n = 0; - NW_Int32 length = 0; - - if (l == 0) - return 0; - n = l->first; - - while(n != 0) - { - length++; - n = n->next; - } - return length; -} - -#if(0) -/* These functions are not being used as of 7/31/2001 */ -void NW_WmlList_Destroy(NW_Wml_List_t *l) -{ - NW_Wml_Node_t *n, *rest; - - n = rest = l->first; - while(rest != 0) - { - rest = n->next; - NW_Mem_Free(n); /* should be updated */ - } - - NW_Mem_Free(l); -} - -/* - * RETURN void * or 0 if malloc fails - */ - -void *NW_WmlList_ToArray(NW_Wml_List_t *l, NW_Int32 el_size) -{ - NW_Byte *a; - NW_Int32 len, i; - - if (l == 0) return 0; - - len = NW_WmlList_Length(l); - - a = (NW_Byte *)NW_Mem_Segment_Malloc(el_size * len, l->memSegment); - if (a == 0) - return 0; - - NW_Mem_memcpy(a, NW_WmlList_First(l), el_size); - - for(i = 1; i < len; i++) - NW_Mem_memcpy(a + i * el_size, NW_WmlList_Next(l), el_size); - - return a; -} -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_msgs.c --- a/webengine/wmlengine/src/wml/src/wml_msgs.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1247 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Message handlers for the wml interpreter. -* -*/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ - -#include "nwx_logger.h" -#include "nwx_ctx.h" -#include "nwx_msg_api.h" -#include "nwx_generic_dlg.h" -#include "scr_msgs.h" -#include "wml_wae.h" -#include "wml_scrproxy.h" -#include "BrsrStatusCodes.h" - - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static TBrowserStatusCode Wml_MsgSendResponse(NW_Msg_t *msg, NW_Msg_Type_t msgType, - TBrowserStatusCode status, void *data); -static NW_ScrProxy_t * Wml_GetScriptProxy(void); - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static TBrowserStatusCode Wml_MsgSendResponse(NW_Msg_t *msg, NW_Msg_Type_t msgType, - TBrowserStatusCode status, void *data) -{ - TBrowserStatusCode ret_status; - NW_ASSERT(msg != NULL); - - NW_Msg_Reinit(msg, msg->tid, - msg->src, /* Send it back to where it came from */ - msg->dest, - msgType, - status, - data); - - if ((ret_status = NW_Msg_Send(msg)) != KBrsrSuccess) { - NW_LOG0(NW_LOG_LEVEL1, "WML Interpreter : Could not send message"); - } - return ret_status; -} - -/************************************************************************ - Function: Wml_GetScriptProxy - Purpose: returns the NW_ScrProxy_t for the current browser context - Parameters: none - - Return Values: NW_ScrProxy_t or NULL if script handler unregistered -**************************************************************************/ -static NW_ScrProxy_t * Wml_GetScriptProxy(void) -{ - NW_WaeUsrAgent_t *browser; - NW_ScrProxy_t *scrProxy; - - browser = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(browser != NULL); - - scrProxy = NW_WaeUsrAgent_GetScript(browser); - - return scrProxy; -} - -/************************************************************************ - Function: NW_Wml_DlgConfirmResp - Purpose: Sends a confirm response to the Script Interpreter. - Parameters: ctx - message - status - user agent status - result - user confirmation - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_DlgConfirmResp(void *ctx, - TBrowserStatusCode status, - NW_Dlg_Confirm_Result_t result) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - NW_ScriptServerConfirmReq_t *data = (NW_ScriptServerConfirmReq_t* )msg->data; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg->type == NW_MSG_UA_DLGCONFIRM_REQ); /* bad context pointer */ - NW_ASSERT(data != NULL); - - if (status == KBrsrOutOfMemory || result == DIALOG_CONFIRM_END) { - NW_Script_Confirm_Req_Free(data); - NW_Msg_Delete(msg); - return status; - } - - switch (result) { - case DIALOG_CONFIRM_YES: - data->response = NW_TRUE; - break; - case DIALOG_CONFIRM_NO: - data->response = NW_FALSE; - break; - default: - NW_ASSERT(0); - } - - if ((status = Wml_MsgSendResponse(msg, NW_MSG_UA_DLGCONFIRM_RESP, - status, data)) != KBrsrSuccess) { - NW_Script_Confirm_Req_Free(data); - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/************************************************************************ - Function: NW_Wml_DlgPromptResp - Purpose: Sends a prompt response to the Script Interpreter. - Parameters: ctx - message - status - user agent status - input - user input - endPressed - - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_DlgPromptResp(void *ctx, - TBrowserStatusCode status, - const NW_Ucs2 *input, - NW_Bool endPressed) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - NW_Ucs2 *inputCpy = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg->type == NW_MSG_UA_DLGPROMPT_REQ); /* bad context pointer */ - - if (status == KBrsrOutOfMemory || endPressed) { - NW_Msg_Delete(msg); - return status; - } - - if ((status == KBrsrSuccess) && (input != NULL)) { - inputCpy = NW_Str_Newcpy(input); - if (inputCpy == NULL) { - status = KBrsrOutOfMemory; - } - } - - if ((status = Wml_MsgSendResponse(msg, NW_MSG_UA_DLGPROMPT_RESP, - status, inputCpy)) != KBrsrSuccess) { - NW_Str_Delete(inputCpy); - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/************************************************************************ - Function: NW_Wml_DlgAlertResp - Purpose: Sends a alert response to the Script Interpreter. - Parameters: ctx - message - status - user agent status - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_DlgAlertResp(void *ctx, - TBrowserStatusCode status, - NW_Dlg_Confirm_Result_t result) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - NW_ASSERT(msg->type == NW_MSG_UA_DLGALERT_REQ); /* bad context pointer */ - - if (status == KBrsrOutOfMemory || result == DIALOG_CONFIRM_END) { - NW_Msg_Delete(msg); - return status; - } - - - if ((status = Wml_MsgSendResponse(msg, NW_MSG_UA_DLGALERT_RESP, - status, NULL)) != KBrsrSuccess) { - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Genericdialoglistselectresp - Purpose: Sends a generic listselect response to the Script Interpreter. - Parameters: data - response - ctx - message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_Genericdialoglistselectresp(NW_Dlg_ListSelect_t* data, void* ctx) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg->type == NW_MSG_UA_DIALOGLISTSELECT_REQ); /* bad context pointer */ - msg->data=data; - - if ((status = NW_Msg_Reply(msg, NW_MSG_UA_DIALOGLISTSELECT_RESP)) != KBrsrSuccess) { - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Genericdialogpromptresp - Purpose: Sends a generic prompt response to the Script Interpreter. - Parameters: data - response - ctx - message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_Genericdialogpromptresp(NW_Dlg_Prompt_t* data, void* ctx) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg->type == NW_MSG_UA_DIALOGPROMPT_REQ); /* bad context pointer */ - msg->data=data; - - if ((status = NW_Msg_Reply(msg, NW_MSG_UA_DIALOGPROMPT_RESP)) != KBrsrSuccess) { - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Genericdialoginputpromptresp - Purpose: Sends a generic input prompt response to the Script Interpreter. - Parameters: data - response - ctx - message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory -**************************************************************************/ -static TBrowserStatusCode NW_Wml_Genericdialoginputpromptresp(NW_Dlg_InputPrompt_t* data, void* ctx) -{ - NW_Msg_t *msg = (NW_Msg_t *)ctx; - TBrowserStatusCode status = KBrsrSuccess; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg->type == NW_MSG_UA_DIALOGINPUTPROMPT_REQ); /* bad context pointer */ - - - msg->data=data; - - if ((status = NW_Msg_Reply(msg, NW_MSG_UA_DIALOGINPUTPROMPT_RESP)) != KBrsrSuccess) { - NW_Msg_Delete(msg); - /* inform the proxy that we were not able to send the message */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - } - return status; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ - -/************************************************************************ - Function: NW_Wml_Dialogalertreq - Purpose: Handler for NW_MSG_UA_DLGALERT_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing dialog alert data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Dialogalertreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_Ucs2 *alertmsg; /* message to display to the user */ - NW_ScrProxy_t *scrProxy; - - NW_LOG0(NW_LOG_LEVEL5, "WML : NW_Wml_Dialogalertreq\n"); - - NW_ASSERT(msg != NULL); - alertmsg = (NW_Ucs2* )msg->data; msg->data = NULL; - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_DlgAlert(scrProxy, alertmsg, msg, NW_Wml_DlgAlertResp); - } - - NW_Str_Delete(alertmsg); - - if (status != KBrsrSuccess) { - NW_Msg_Delete(msg); - } - return status; -} -/************************************************************************ - Function: NW_Wml_Notifyerrorreq - Purpose: Handler for NW_MSG_UA_NOTIFYERROR_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing dialog alert data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Notifyerrorreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_LOG0(NW_LOG_LEVEL5, "WML : NW_Wml_Notifyerrorreq\n"); - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_NotifyError(scrProxy,msg->status); - } - - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (status != KBrsrScrproxyScrAbort) - { - /* return the response to the scripting engine */ - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_UA_NOTIFYERROR_RESP, - status, NULL)) - { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - if (status != KBrsrSuccess) { - /* free the incoming message */ - NW_Msg_Delete(msg); - } - return status; -} - - -/************************************************************************ - Function: NW_Wml_Dialogconfirmreq - Purpose: Handler for NW_MSG_UA_DLGCONFIRM_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing dialog confirm data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Dialogconfirmreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScriptServerConfirmReq_t *data = NULL; /* confirm message */ - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - data = (NW_ScriptServerConfirmReq_t* )msg->data; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_DlgConfirm(scrProxy, data->message, data->yesStr, - data->noStr, msg, NW_Wml_DlgConfirmResp); - } - - if (status != KBrsrSuccess) { - NW_Script_Confirm_Req_Free(data); - NW_Msg_Delete(msg); - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Dialogpromptreq - Purpose: Handler for NW_MSG_UA_DLGPROMPT_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing dialog prompt data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Dialogpromptreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScriptServerDlgPromptReq_t *data = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_ScriptServerDlgPromptReq_t* )msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_DlgPrompt(scrProxy, data->message, data->input, - msg, NW_Wml_DlgPromptResp); - } - NW_Script_DlgPrompt_Req_Free(data); - - if (status != KBrsrSuccess) - { - NW_Msg_Delete(msg); - } - return status; -} - - -/************************************************************************ - Function: NW_Wml_Genericdialoglistselectreq - Purpose: Handler for NW_MSG_UA_DIALOGLISTSELECT_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing generic dialog listselect data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Genericdialoglistselectreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_Dlg_ListSelect_t *data = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_Dlg_ListSelect_t* )msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_GenericDlgListSelect(scrProxy, data, msg, - NW_Wml_Genericdialoglistselectresp); - } - - if (status != KBrsrSuccess) { - NW_Msg_Delete(msg); - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Genericdialogpromptreq - Purpose: Handler for NW_MSG_UA_DIALOGPROMPT_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing generic dialog prompt data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Genericdialogpromptreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_Dlg_Prompt_t *data = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_Dlg_Prompt_t* )msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_GenericDlgPrompt(scrProxy, data, msg, NW_Wml_Genericdialogpromptresp); - } - - if (status != KBrsrSuccess) - { - NW_Msg_Delete(msg); - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Genericdialoginputpromptreq - Purpose: Handler for NW_MSG_UA_DIALOGINPUTPROMPT_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing generic dialog input prompt data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Genericdialoginputpromptreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_Dlg_InputPrompt_t *data = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_Dlg_InputPrompt_t* )msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_GenericDlgInputPrompt(scrProxy, data, msg, NW_Wml_Genericdialoginputpromptresp); - } - - if (status != KBrsrSuccess) { - NW_Msg_Delete(msg); - } - return status; -} - - - -/************************************************************************ - Function: NW_Ua_Finishnodialogreq - Purpose: Handler for NW_MSG_UA_FINISHNODLG_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - Parameters: msg - pointer to message containing script status and message - on completion. - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Finishnodialogreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScriptServerFinishReq_t *data = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_ScriptServerFinishReq_t* )msg->data; - msg->data = NULL; - - scrProxy = Wml_GetScriptProxy(); - - if (data != NULL) - { - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_Finish(scrProxy, data->status, data->message); - } - - NW_Script_Finish_Req_Free(data); - } - else - { - status = KBrsrOutOfMemory; - NW_ScrProxy_Finish(scrProxy, status, NULL); - } - - - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (status != KBrsrScrproxyScrAbort) - { - /* return the response to the scripting engine */ - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_UA_FINISHNODLG_RESP, - status, NULL)) - { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - if (status != KBrsrSuccess) { - /* free the incoming message */ - NW_Msg_Delete(msg); - } - return status; -} - -/************************************************************************ - Function: NW_Wml_Scriptstartresp - Purpose: Handler for NW_MSG_SCRIPT_START_RESP messages. - Invokes the script proxy. - - Parameters: msg - pointer to message containing acknowledgement for - start script request. - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Scriptstartresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_RunScriptAck(scrProxy, msg->status); - } - - NW_Msg_Delete(msg); - - return status; -} - -/************************************************************************ - Function: NW_Wml_Scriptexitresp - Purpose: Handler for NW_MSG_SCRIPT_EXIT_RESP messages. - Invokes the script proxy. - - Parameters: msg - pointer to message containing acknowledgement for - script exit request. - - Return Values: - TBrowserStatusCode - always returns KBrsrSuccess -**************************************************************************/ -TBrowserStatusCode NW_Wml_Scriptexitresp(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_AbortAck(scrProxy, msg->status); - } - - NW_Msg_Delete(msg); - - return status; -} - -/************************************************************************ - Function: NW_Wml_Getvarreq - Purpose: Handler for NW_MSG_COREBROWSER_GETVAR_REQ message. - Invokes the script proxy and sends the response to the - script interpreter. - Parameters: - msg - msg data contains a pointer to a variable name - - Return Values: - TBrowserStatusCode - KBrsrSuccess - - KBrsrOutOfMemory - - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Getvarreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScriptServerVarInf_t *data; - NW_Ucs2 *value = NULL; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_ScriptServerVarInf_t*)msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - NW_ASSERT(data->name != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else if ((status = NW_ScrProxy_GetVar(scrProxy, data->name, &value)) - == KBrsrSuccess) { - status = NW_Script_VarInf_SetValue(data, value); - } - - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (status != KBrsrScrproxyScrAbort) { - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_GETVAR_RESP, - status, data)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - NW_Script_VarInf_Free(data); - return status; -} - -/************************************************************************ - Function: NW_Wml_Setvarreq - Purpose: Handles the NW_MSG_COREBROWSER_SETVAR_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - Note : When variables are set on the WML Interpreter - the GUI is not refreshed. - Parameters: msg - pointer to message containing pointer to the - variable name - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Setvarreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScriptServerVarInf_t *data; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - data = (NW_ScriptServerVarInf_t*)msg->data; - msg->data = NULL; - NW_ASSERT(data != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - /* Note: KBrsrFailure does not imply a fatal error ??? */ - status = NW_ScrProxy_SetVar(scrProxy, data->name, data->value); - } - NW_Script_VarInf_Free(data); - - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (status != KBrsrScrproxyScrAbort) { - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_SETVAR_RESP, - status, NULL)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - return status; -} - -/************************************************************************ - Function: NW_Wml_Loadprevreq - Purpose: Handler for NW_MSG_COREBROWSER_LOADPREV_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - - Parameters: msg - pointer to message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Loadprevreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else if ((status = NW_ScrProxy_LoadPrev(scrProxy)) != KBrsrScrproxyScrAbort) { - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_LOADPREV_RESP, - status, NULL)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - return status; -} - -/************************************************************************ - Function: NW_Wml_Newcontextreq - Purpose: Handler for NW_MSG_COREBROWSER_NEWCONTEXT_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - Parameters: msg - pointer to message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Newcontextreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else if ((status = NW_ScrProxy_NewContext(scrProxy)) != KBrsrScrproxyScrAbort) { - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_NEWCONTEXT_RESP, - status, NULL)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - return status; -} - -/************************************************************************ - Function: NW_Wml_Goreq - Purpose: Handler for NW_MSG_COREBROWSER_GO_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - Parameters: msg - pointer to message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Goreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - NW_Ucs2 *url; - - NW_ASSERT(msg != NULL); - url = (NW_Ucs2 *)msg->data; - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) - { - /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else - { - status = NW_ScrProxy_LoadUrl(scrProxy, url, NULL); - } - NW_Str_Delete(url); - - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (status != KBrsrScrproxyScrAbort) { - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_GO_RESP, - status, NULL)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - return status; -} - - -/************************************************************************ - Function: NW_Wml_Refreshreq - Purpose: Handler for NW_MSG_COREBROWSER_REFRESH_REQ messages. - Invokes the script proxy and sends the response to the - script interpreter. - Parameters: msg - pointer to message - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_Refreshreq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - NW_ScrProxy_t *scrProxy; - - NW_ASSERT(msg != NULL); - - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else if ((status = NW_ScrProxy_Refresh(scrProxy)) != KBrsrScrproxyScrAbort) { - /* - * send a response message to the scipt interpreter only if the script is - * still running ie. not aborted - */ - if (KBrsrSuccess == Wml_MsgSendResponse(msg, NW_MSG_COREBROWSER_REFRESH_RESP, - status, NULL)) { - return KBrsrSuccess; - } - status = NW_ScrProxy_ScrNotRespondingError(scrProxy); - } - - /* clean up (1)if we failed to send the message (2)the script has aborted */ - NW_Msg_Delete(msg); - return status; -} - -/***************************************************************** - - Name: Wae_RunScript() - - Description: Send a message to the script engine to run - a script. Note : the caller has to free the url, - referer and content if the function returns a status - code other than KBrsrSuccess. - - Parameters: url - location of the script. - referer - the script invoker - content - wml script - len - length of the content - charset - encoding - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - -******************************************************************/ -TBrowserStatusCode -NW_Wml_RunScript(NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset) -{ - TBrowserStatusCode status; - NW_StartScript_Req_t *scrReq; - NW_Msg_t *cmsg = NULL; - NW_Msg_Address_t wmlMsgAddr, scriptMsgAddr; - - NW_ASSERT(url != NULL); - NW_ASSERT(content != NULL); - - scrReq = NW_StartScript_Req_New(url, postfields, referer, content, len, charset); - if (scrReq == NULL) { - return KBrsrOutOfMemory; - } - - /* get the messaging address of wml and script interpreter */ - status = NW_Msg_LookupReceiverByName(NW_BROWSER_CORE, &wmlMsgAddr); - if (status == KBrsrSuccess) { - status = NW_Msg_LookupReceiverByName(NW_SCRIPT_SERVER, &scriptMsgAddr); - if (status == KBrsrSuccess) { - /* TODO: add transaction support */ - cmsg = NW_Msg_New(1, wmlMsgAddr, scriptMsgAddr, NW_MSG_SCRIPT_START_REQ); - if (cmsg == NULL) { - status = KBrsrOutOfMemory; - } else { - cmsg->data = scrReq; - /* Send the message to the script interpreter */ - status= NW_Msg_Send(cmsg); - } - } - } - - /* clean up */ - if (status != KBrsrSuccess) { - NW_StartScript_Req_Free(scrReq); - NW_Msg_Delete(cmsg); - } - return status; -} - -/***************************************************************** - - Name: NW_Wml_AbortScript() - - Description: Send a message to the script engine to abort the script. - - Parameters: - - Return Value: KBrsrSuccess - KBrsrFailure - -******************************************************************/ -TBrowserStatusCode NW_Wml_AbortScript() -{ - TBrowserStatusCode status; - NW_Msg_t *cmsg = NULL; - NW_Msg_Address_t wmlMsgAddr, scriptMsgAddr; - - - /* get the messaging address of wml and script interpreter */ - status = NW_Msg_LookupReceiverByName(NW_BROWSER_CORE, &wmlMsgAddr); - if (status == KBrsrSuccess) { - status = NW_Msg_LookupReceiverByName(NW_SCRIPT_SERVER, &scriptMsgAddr); - if (status == KBrsrSuccess) { - /* TODO: add transaction support */ - cmsg = NW_Msg_New(1, wmlMsgAddr, scriptMsgAddr, NW_MSG_SCRIPT_EXIT_REQ); - if (cmsg == NULL) { - status = KBrsrOutOfMemory; - } else { - /* Send the message to the script interpreter */ - status = NW_Msg_Send(cmsg); - } - } - } - - /* clean up */ - if (status != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - } - return status; -} - -/************************************************************************ - Function: NW_Wml_nokia_locationInfo - Purpose: Handler for NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_REQ messages. - Unpacks the message and invokes the script proxy. The script - proxy is responsible for sending a response to this message. - Parameters: msg - pointer to message containing dialog alert data - - Return Values: KBrsrSuccess or KBrsrOutOfMemory or - KBrsrScrproxyScrAbort -**************************************************************************/ -TBrowserStatusCode NW_Wml_nokia_locationInfoReq(NW_Msg_t *msg) -{ - TBrowserStatusCode status; - void **args; - NW_Ucs2 *url; - NW_Ucs2 *ll_format; - NW_Ucs2 *pn_format; - NW_ScrProxy_t *scrProxy; - - NW_LOG0(NW_LOG_LEVEL5, "WML : NW_Wml_nokia_locationInfoReq\n"); - - /* decode the args */ - NW_ASSERT(msg != NULL); - NW_ASSERT(msg->data != NULL); - args = (void**)msg->data; - url = (NW_Ucs2*) args[0]; - ll_format = (NW_Ucs2*) args[1]; - pn_format = (NW_Ucs2*) args[2]; - - /* free the argument array, so the response can come in its place */ - NW_Mem_Free( msg->data ); - msg->data = NULL; - - /* get the proxy */ - scrProxy = Wml_GetScriptProxy(); - - if (scrProxy == NULL) { /* check if script is aborted */ - status = KBrsrScrproxyScrAbort; - } - else { - status = NW_ScrProxy_nokia_locationInfo(scrProxy, - url, ll_format, pn_format); - } - if (status != KBrsrSuccess) { - goto failure; - } - - /* send a reply to the Script engine */ - status = NW_Msg_Reply( msg, NW_MSG_SCRIPT_NOKIA_LOCATIONINFO_RESP ); - - if (status != KBrsrSuccess) { - status = NW_ScrProxy_ScrNotRespondingError(Wml_GetScriptProxy()); - goto failure; - } - - /* Free only the format args; the browser now owns the URL. - The message body will be deleted by the Script message handler */ - NW_Str_Delete( url ); - NW_Str_Delete( ll_format ); - NW_Str_Delete( pn_format ); - return status; - -failure: - NW_Msg_Delete( msg ); - NW_Str_Delete( url ); - NW_Str_Delete( ll_format ); - NW_Str_Delete( pn_format ); - return status; -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_option_event.c --- a/webengine/wmlengine/src/wml/src/wml_option_event.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,855 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_option_event.c $ - - Purpose: - - Class: WmlBrowser - - Maintain browser's option_event state logic - - $Option_Event: wml_option_event.c $ - -*/ - -#include "wml_task.h" -#include "wml_api.h" -#include "wml_url_utils.h" -#include "wml_elm_attr.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -/*lint -save -e571 Suspicious cast*/ - -static TBrowserStatusCode HandleOptionIntrinsicEvents(NW_Wml_t *thisObj, NW_Wml_Element_t* option_el); - - -/* funcs used with NW_Wml_HandleOptionEvent */ -static TBrowserStatusCode CalculateNameSize(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Int32 *ret_size); - -static TBrowserStatusCode CalculateINameSize(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Int32 *ret_size); - -static TBrowserStatusCode BuildNameValue(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* new_key_value); - -static TBrowserStatusCode BuildINameValue(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* new_key_value); - - -/* - * handle user input to the Select element - * this func needs to be broken up - * - * RETURN KBrsrSuccess - * KBrsrFailure - card has no select element - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_HandleOptionEvent(NW_Wml_t *obj, NW_Wml_Element_t* option_el) -{ - NW_Wml_t *thisObj = obj; - NW_Wml_Element_t *el = 0, *select_el = 0; - NW_Bool searching; - NW_Int32 i; - NW_Uint16 option_count = 0; - typedef enum {WAE_SELECTION, WAE_DESELECTION} wml_select_mode_e; - wml_select_mode_e mode; - NW_Wml_Select_Type_e type = SINGLE_SELECT; - TBrowserStatusCode status = KBrsrSuccess; - - NW_Ucs2 *key_var_name = NULL; - NW_Ucs2 *ikey_var_name = NULL; - NW_Ucs2 *option_value = NULL; - NW_Ucs2 *new_key_value = NULL; - NW_Ucs2 *new_ikey_value = NULL; - - /* - * find the select element and option index associated with the - * option event - */ - searching = NW_TRUE; - i = 0; - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - if (el_type == SELECT_ELEMENT) - { - select_el = el; - option_count = 0; - } - else if (el_type == OPTION_ELEMENT) - { - option_count++; - if (el->id == option_el->id) - searching = NW_FALSE; - } - } while (searching && thisObj->card_els[++i]); - - if (!select_el) - NW_THROW_ERROR(); - - - /* get NAME variable name */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &key_var_name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* get INAME variable name */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, INAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &ikey_var_name)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* check if multiple selection, default is false */ - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, select_el, MULTIPLE_ATTR, - WAE_ASC_TRUE_STR, thisObj->var_list)) - type = MULTIPLE_SELECT; - - /* get OPTION element value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, option_el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - /* determine whether event is a SELECTION or a DESELECTION */ - /* for now, single select can't deselect */ - /* note that the UI has already set the option state */ - mode = WAE_SELECTION; - if (type == MULTIPLE_SELECT) - { - NW_Bool st; - if ((status = (DISPLAY_API->getOptState)(thisObj->browser_app, - NW_UINT16_CAST(option_el->id), &st)) != KBrsrSuccess) - NW_THROW_ERROR(); - - if (!st) - mode = WAE_DESELECTION; - } - - switch (type) - { - case SINGLE_SELECT: - - /* initialize all options to NW_FALSE */ - if ((status = NW_WmlInput_InitOptionValues(thisObj, select_el)) != KBrsrSuccess) - NW_THROW_ERROR(); - - switch (mode) - { - case WAE_SELECTION: - - /* set shared ui option state */ - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(el->id), NW_TRUE)) != KBrsrSuccess) - NW_THROW_ERROR(); - - /* - * set NAME and/or INAME variables. Note that option_value - * may be null if the option element has no value attribute - */ - if (key_var_name && option_value) - { - status = NW_Wml_SetVar(thisObj, key_var_name, option_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - - if (ikey_var_name) - { - NW_Ucs2 temp[16]; - (void)NW_Str_Itoa(option_count, temp); - status = NW_Wml_SetVar(thisObj, ikey_var_name, temp); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - - /* handle ONEVENT and ONCLICK on SELECTION only */ - status = HandleOptionIntrinsicEvents(thisObj, option_el); - if (status == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - break; - - case WAE_DESELECTION: - if (key_var_name) - NW_Wml_UnsetVar(thisObj, key_var_name); - - if (ikey_var_name) - NW_Wml_UnsetVar(thisObj, ikey_var_name); - - break; - } - - break; /* SINGLE_SELECT */ - - case MULTIPLE_SELECT: - /* build key & ikey variables */ - if (key_var_name) - { - NW_Int32 key_size = 0; - - if ((status = CalculateNameSize(thisObj, select_el, &key_size)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (key_size) - { - new_key_value = NW_Str_SegNew(NW_UINT32_CAST(key_size), NW_MEM_SEGMENT_MANUAL); - if (!new_key_value) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - if ((status = BuildNameValue(thisObj, select_el, new_key_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - status = NW_Wml_SetVar(thisObj, key_var_name, new_key_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - /* set key_var to null if no options selected */ - else - NW_Wml_UnsetVar(thisObj, key_var_name); - } - - if (ikey_var_name) - { - NW_Int32 ikey_size; - - if ((status = CalculateINameSize(thisObj, select_el, &ikey_size)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (ikey_size) - { - new_ikey_value = NW_Str_SegNew(NW_UINT32_CAST(ikey_size), NW_MEM_SEGMENT_MANUAL); - if (!new_ikey_value) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - if ((status = BuildINameValue(thisObj, select_el, new_ikey_value)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - status = NW_Wml_SetVar(thisObj, ikey_var_name, new_ikey_value); - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) - NW_THROW_ERROR(); - } - /* set ikey_var to null if no options selected */ - else - NW_Wml_UnsetVar(thisObj, ikey_var_name); - } - - /* do OPTION events for both SELECTION and DESELECTION */ - status = HandleOptionIntrinsicEvents(thisObj, option_el); - if (status == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - break; /* MULTIPLE_SELECT */ - } - - if (status == KBrsrFailure) - { - status = KBrsrSuccess; /* failure in the preceding code does not mean broken */ - } - - /* fall through */ - -NW_CATCH_ERROR - NW_Str_Delete(key_var_name); - NW_Str_Delete(ikey_var_name); - NW_Str_Delete(option_value); - NW_Str_Delete(new_key_value); - NW_Str_Delete(new_ikey_value); - - return status; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode CalculateNameSize(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Int32 *ret_size) -{ - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1, - option_value_count = 0, - size = 0; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - - *ret_size = 0; - - /* loop thru card elements starting at select_el */ - do - { - NW_Wml_ElType_e el_type; - NW_Bool st = NW_FALSE; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - if ((status = (DISPLAY_API->getOptState)(thisObj->browser_app, NW_UINT16_CAST(el->id), - &st)) != KBrsrSuccess) - { - return status; - } - if (st) - { - /* get OPTION element value */ - NW_Ucs2 *option_value = NULL; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) == KBrsrOutOfMemory) - return status; - - if (option_value) - { - size += NW_Str_Strlen(option_value); - option_value_count++; - - NW_Str_Delete(option_value); - } - } - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - if(option_value_count) - { - NW_Uint32 tmplen = WAE_ASC_STRLEN(WAE_ASC_SEMICOLON_STR); - NW_ASSERT(size); - /* option values are seperated by delimiters */ - size += ((option_value_count * NW_INT32_CAST(tmplen)) - 1); - } - - *ret_size = size; - - return KBrsrSuccess; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode CalculateINameSize(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Int32 *ret_size) -{ - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Int32 option_count = 0; - NW_Uint32 size = 0; - NW_Bool keep_looping = NW_TRUE; - NW_Bool found_first_option = NW_FALSE; - TBrowserStatusCode status; - NW_Wml_Element_t *el = 0; - - *ret_size = 0; - - /* loop thru card elements starting at select_el */ - do - { - NW_Wml_ElType_e el_type; - NW_Bool st = NW_FALSE; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - option_count++; - if ((status = (DISPLAY_API->getOptState)(thisObj->browser_app, NW_UINT16_CAST(el->id), &st)) - != KBrsrSuccess) - return status; - - if (st) - { - /* don't count semicolon for first selected option */ - if (!found_first_option) - { - /* add null ucs2 char once only */ - size = sizeof(NW_Ucs2); - - /* one NW_Ucs2 */ - if (option_count < 10) - size += sizeof(NW_Ucs2); - - /* two ucs2_chars */ - if (option_count >= 10 && option_count < 100) - size += (sizeof(NW_Ucs2) * 2); - - /* three ucs2_chars. yikes - this shouldn't happen */ - if (option_count >= 100) - size += (sizeof(NW_Ucs2) * 3); - - found_first_option = NW_TRUE; - } - - /* add the preceeding semicolon to size count */ - else - { - /* one NW_Ucs2 plus semicolon */ - if (option_count < 10) - size += (sizeof(NW_Ucs2) * 2); - - /* two ucs2_chars plus semicolon */ - if (option_count >= 10 && option_count < 100) - size += (sizeof(NW_Ucs2) * 3); - - /* three ucs2_chars plus semicolon. yikes - this shouldn't happen */ - if (option_count >= 100) - size += (sizeof(NW_Ucs2) * 4); - } - } - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - *ret_size = NW_INT32_CAST(size); - - return KBrsrSuccess; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode BuildNameValue(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* new_key_value) -{ - - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Bool keep_looping = NW_TRUE; - TBrowserStatusCode status; - NW_Wml_Element_t *el = 0; - - /* loop thru card elements starting at select_el */ - do - { - NW_Wml_ElType_e el_type; - NW_Bool st; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - if ((status = (DISPLAY_API->getOptState)(thisObj->browser_app, NW_UINT16_CAST(el->id), &st)) - != KBrsrSuccess) - { - return status; - } - if (st) - { - /* get OPTION element value */ - NW_Ucs2 *option_value = NULL; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) == KBrsrOutOfMemory) - return status; - - if (option_value) - { - /* - * add delimiter iff not the first option_value pushed - * into new_key_value - */ - if (NW_Str_Strlen(new_key_value)) { - (void)NW_Str_StrcatConst(new_key_value, WAE_ASC_SEMICOLON_STR); - } - (void)NW_Str_Strcat(new_key_value, option_value); - - NW_Str_Delete(option_value); - } - } - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode BuildINameValue(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Ucs2 *new_ikey_value) -{ - - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Uint16 option_count = 0; - NW_Bool keep_looping = NW_TRUE; - TBrowserStatusCode status; - NW_Wml_Element_t *el = 0; - - /* loop thru card elements starting at select_el */ - do - { - NW_Wml_ElType_e el_type; - NW_Bool st = NW_FALSE; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - option_count++; - if ((status = (DISPLAY_API->getOptState)(thisObj->browser_app, NW_UINT16_CAST(el->id), - &st)) != KBrsrSuccess) - { - return status; - } - if (st) - { - NW_Ucs2 ucs2_temp[16]; - - /* - * add delimiter iff not the first option_value pushed into - * new_key_value - */ - if (NW_Str_Strlen(new_ikey_value)) - (void)NW_Str_StrcatConst(new_ikey_value, WAE_ASC_SEMICOLON_STR); - - /* - * convert option_count integer to ucs2 string and concat - * to new_ikey_value - */ - (void)NW_Str_Itoa(option_count, ucs2_temp); - (void)NW_Str_Strcat(new_ikey_value, ucs2_temp); - } - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - - - -/* - * Returns KBrsrSuccess or propagates errors from other CB calls - * - * RETURN KBrsrSuccess - * KBrsrFailure - - * KBrsrOutOfMemory - */ -static TBrowserStatusCode HandleOptionIntrinsicEvents(NW_Wml_t *thisObj, NW_Wml_Element_t* option_el) -{ - TBrowserStatusCode status; - - status = NW_Wml_HasOptionIntrinsicEvents(thisObj, option_el, NW_TRUE); - return status; -} - - -/* - * execute arg: Set to NW_TRUE if you want to process event - * Set to NW_FALSE if you're just checking if event exists, but - * don't want to process it - * - * Returns KBrsrSuccess or propagates errors from other CB calls - * - * RETURN KBrsrSuccess - * KBrsrFailure - - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_HasOptionIntrinsicEvents(NW_Wml_t *thisObj, NW_Wml_Element_t* option_el, NW_Bool execute) -{ - TBrowserStatusCode status; - - /* first handle ONCLICK */ - NW_Ucs2 *url = 0; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, option_el, ONPICK_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &url)) == KBrsrOutOfMemory) - return status; - - if (url) - { - if (execute == NW_FALSE) - { - if ( *url != 0 ) - { - /* Onpick is not an empty string. Is an onpick. */ - NW_Mem_Free( url ); - return KBrsrSuccess; - } - NW_Mem_Free(url); - } - else - { - NW_Ucs2 *target_url = 0; - - /* check if we are allowed to navigate. */ - status = NW_Wml_CanNavigateToUri(); - if (status != KBrsrSuccess) { - NW_Mem_Free(url); - return status; - } - - thisObj->curr_task = GO_TASK; - - status = NW_Wml_GetFullUrl(thisObj, url, &target_url); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return status; - } - - /* if no url, then perhaps a dialog should be presented to the user */ - if (target_url) - { - status = NW_Wml_FetchUrl(thisObj, target_url, 0); - NW_Mem_Free(target_url); - if (status != KBrsrSuccess) { - NW_Mem_Free(url); - return status; - } - } - NW_Mem_Free(url); - /* inform caller that an onpick event has been executed */ - if ((status == KBrsrSuccess) || (status == KBrsrFailure)) - { - return KBrsrWmlbrowserOnPickEx; - } - } - } - - /* then handle ONEVENT */ - else - { - NW_Wml_Element_t el; - NW_DeckDecoderIter_t iter; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, option_el) != KBrsrSuccess) - return KBrsrFailure; - - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - switch (el_type) - { - case ONEVENT_ELEMENT: - { - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, &el, TYPE_ATTR, - WAE_ASC_ONPICK_STR, thisObj->var_list)) - { - if (execute == NW_FALSE) - { - status = KBrsrSuccess; - } - else - { - status = NW_Wml_HandleTaskEvent(thisObj, &el); - - /* inform caller that an onpick event has been executed */ - if ((status == KBrsrSuccess) || (status == KBrsrFailure)) - { - status = KBrsrWmlbrowserOnPickEx; - } - } - return status; - } - break; - } - - case STRING_ELEMENT: - break; - - /* OPTION may contain any text type */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - return KBrsrFailure; - } - } - } - - return KBrsrFailure; -} - - -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_query_service.c --- a/webengine/wmlengine/src/wml/src/wml_query_service.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,304 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_query_service.c $ - - Purpose: - - Class: WmlBrowser - - Handles data query requests for the Browser (implementation) -*/ - -#include "wml_task.h" -#include "wml_elements.h" -#include "wml_history.h" -#include "wml_url_utils.h" -#include "wml_elm_attr.h" - -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - attribute not found - * KBrsrBadInputParam - bad input parameters - * - el_id is bad - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_GetAttribute(NW_Wml_t *thisObj, NW_Uint16 el_id, NW_Wml_Attr_t tag, NW_Ucs2 **ret_string) -{ - NW_Wml_Element_t *el; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status; - - if ((status = NW_Wml_GetElementType(thisObj, el_id, &el_type, &el)) != KBrsrSuccess) - return status; - - if (tag == STR_VALUE) - { - if (el_type == STRING_ELEMENT) - { - status = NW_DeckDecoder_ReadString(thisObj->decoder, el, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, ret_string); - if (status == KBrsrOutOfMemory) - return status; - } - else if ((el_type == OPTION_ELEMENT) || (el_type == A_ELEMENT) || (el_type == ANCHOR_ELEMENT)) - { - NW_Wml_Element_t string_el; - NW_Wml_ElType_e el_type_2; - - if (!NW_DeckDecoder_FirstContainedElement(thisObj->decoder, el, &string_el)) - return KBrsrFailure; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type_2); - - if (el_type != STRING_ELEMENT) - return KBrsrFailure; - - status = NW_DeckDecoder_ReadString(thisObj->decoder, el, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, ret_string); - if (status == KBrsrOutOfMemory) - return status; - } - else - { - return KBrsrFailure; - } - } - else - { - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, tag, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, ret_string); - if (status == KBrsrOutOfMemory) - return status; - - /* This is a bit of a hack to put this here. However I want to make sure - WML and the UI see the same behavior for the invalid format values. - Return NULL pointer for empty or invalid format. This will be treated - like no format or *M in WML. jwild 2000.10.10 */ - - if ( (tag == FORMAT_ATTR) && (*ret_string != NULL) && - (! NW_WmlInput_ValidateFormat(*ret_string)) ) - { - NW_Mem_Free(*ret_string); - *ret_string = NULL; - } - } - - return KBrsrSuccess; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - el_id is bad - * - element is not an input element - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_GetElementType(NW_Wml_t *thisObj, NW_Uint16 el_id, NW_Wml_ElType_e *el_type, NW_Wml_Element_t **el) -{ - NW_Int32 id = -1; - NW_Wml_ElType_e elTypeLocal; - - if (thisObj == NULL) - return KBrsrBadInputParam; - - id = NW_Wml_FindEl(thisObj, el_id); - if (id == -1) - return KBrsrFailure; - - *el = thisObj->card_els[id]; - - NW_DeckDecoder_GetType(thisObj->decoder, *el, &elTypeLocal); - - *el_type = elTypeLocal; - return KBrsrSuccess; -} - -#if 0 /* no longer used 12/5/2001 */ -/* - * this is probably useless. the PE should just call - * GetAttribute on the INPUT elems KEY attr - * - * RETURN: KBrsrSuccess - * KBrsrFailure - el_id is bad - * - element is not an input element - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_GetDefault(NW_Wml_t *thisObj, NW_Uint16 el_id, NW_Ucs2 **ret_string) -{ - NW_Wml_Element_t *el; - NW_Ucs2 *key_var_name = 0; - TBrowserStatusCode status; - NW_Wml_ElType_e el_type = UNKNOWN_ELEMENT; - - if ((status = NW_Wml_GetElementType(thisObj, el_id, &el_type, &el)) != KBrsrSuccess) - return status; - - if (el_type == INPUT_ELEMENT) - { - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &key_var_name); - if (status == KBrsrOutOfMemory) - return KBrsrOutOfMemory; - - if (key_var_name) - { - NW_Ucs2 *temp = 0; - temp = NW_WmlVar_GetValue(thisObj->var_list, key_var_name); - if (temp) - { - *ret_string = NW_Str_Newcpy(temp); - if (*ret_string == 0) - return KBrsrOutOfMemory; - } - } - /* Note: NW_Str_Delete() handles null pointers */ - NW_Str_Delete(key_var_name); - } - else - { - return KBrsrFailure; /* bad request */ - } - return KBrsrSuccess; -} -#endif - -/* - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - * KBrsrBadInputParam - Bad input parameter - */ -TBrowserStatusCode NW_Wml_GetCurrURL(NW_Wml_t *thisObj, NW_Ucs2 **ret_string) -{ - NW_ASSERT(thisObj); - /* Caller frees memory */ - return NW_Wml_HistoryGetResponseUrl(thisObj, ret_string); -} - -/* - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - * KBrsrBadInputParam - Bad input parameter - */ -TBrowserStatusCode NW_Wml_GetCurrReqURL(NW_Wml_t *thisObj, NW_Ucs2 **ret_string) -{ - NW_ASSERT(thisObj); - /* Caller frees memory */ - return NW_Wml_HistoryGetRequestUrl(thisObj, ret_string); -} - - -NW_Int32 NW_Wml_FindEl(NW_Wml_t *thisObj, NW_Uint16 id) -{ - NW_Uint16 i = 0; - NW_Wml_Element_t *el; - - if ( (thisObj == NULL) || (thisObj->card_els == NULL) ) { -#if 0 - /* NW_ASSERT(NW_FALSE); */ -#endif - return -1; - } - - /* assume rendered_els is an array of n NW_Wml_Element_t items */ - for (i = 0;;i++) - { - el = thisObj->card_els[i]; - if (!el) - return -1; - if (el->id == id) - return i; - } - - /* NEVER executed ... - NW_ASSERT(NW_FALSE); - return -1; - */ -} - -#if 0 /* no longer used 12/5/2001 */ -/*************************************************************************** - * Name: NW_Wml_GetPrevId - * Description: returns the previous_task id of the WML object - * Parameters: thisObj -- pointer to NW_Wml_t structure - * id -- pointer to id to be returned - * Algorithm: If either argument is NULL, the value - * KBrsrBadInputParam is returned immediately. - * - * If the 'prev_task_id' field is greater than or equal to 0, - * that value is placed in *id, and KBrsrSuccess is returned. - * - * Otherwise, there is either (a) no previous task id, or - * (b) more than one 'prev' task. In either case the id - * value is set to -1, and KBrsrFailure is returned. - * Return value: KBrsrSuccess - * KBrsrFailure - * KBrsrBadInputParam - ***************************************************************************/ -TBrowserStatusCode NW_Wml_GetPrevId(NW_Wml_t *thisObj, NW_Int16 *id) -{ - NW_ASSERT(thisObj); - NW_ASSERT(id); - - if (thisObj->prev_task_id >= 0) - { - *id = thisObj->prev_task_id; - return KBrsrSuccess; - } else { - *id = -1; - return KBrsrFailure; - } -} -#endif - -/*************************************************************************** - * Name: NW_Wml_HasOnpick - * - * Description: returns KBrsrSuccess if all of the following are true: - * - element is of type OPTION_ELEMENT - * - element contains an onpick attribute or contains an - * onevent with an onpick type - * Otherwise, it returns a failure code - * - * Parameters: thisObj -- pointer to NW_Wml_t structure - * el_id -- element id to check for onpick status - * - * Return value: KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - ***************************************************************************/ -TBrowserStatusCode NW_Wml_HasOnpick(NW_Wml_t *thisObj, NW_Uint16 el_id ) -{ - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - NW_Wml_ElType_e el_type; - - if ((status = NW_Wml_GetElementType(thisObj, el_id, &el_type, &el)) != KBrsrSuccess) - return status; - - status = KBrsrFailure; - if (el_type == OPTION_ELEMENT) - { - status = NW_Wml_HasOptionIntrinsicEvents(thisObj, el, NW_FALSE); - } - - return status; -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_ref_model.c --- a/webengine/wmlengine/src/wml/src/wml_ref_model.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,893 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_ref_model.c $ - - Purpose: - - Class: WmlBrowser - - Browser's reference model processing logic for inter-card - traversal - -*/ - -#include "wml_task.h" -#include "wml_history.h" -#include "wml_url_utils.h" -#include "wml_api.h" -#include "wml_elm_attr.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "nwx_msg_api.h" -#include "nwx_url_utils.h" -//#include "nwx_mailto_loader.h" -//#include "nwx_wtai_loader.h" -#include "BrsrStatusCodes.h" - -static TBrowserStatusCode ProcessVarElements(NW_Wml_t *obj, NW_Bool useTempVars, NW_Wml_Element_t* task_el); - -static void VarListFree(NW_Wml_VarList_t *varList, NW_Mem_Segment_Id_t mem_segment); - -static NW_Wml_VarList_t *CpyVarList(NW_Wml_VarList_t *varList, NW_Mem_Segment_Id_t mem_segment); - - - -static TBrowserStatusCode HandleNewContext(NW_Wml_t *obj); - -static TBrowserStatusCode ApplyInternalVariables(NW_Wml_t *obj); - -static TBrowserStatusCode SetTempVar(NW_Wml_VarList_t *paramList, NW_Mem_Segment_Id_t mem_segment, - NW_Ucs2 *name, NW_Ucs2 *value); - -static TBrowserStatusCode CanNavigate(NW_Wml_t *thisObj, NW_Wml_Element_t *el); - -/* - * RETURN KBrsrSuccess - * KBrsrFailure - does not imply a fatal error - * - no task element is found - * KBrsrOutOfMemory - * KBrsrMalformedUrl - malformed URL encountered - * NW_STAT_* - propagates TBrowserStatusCode error from the other calls - */ -TBrowserStatusCode NW_Wml_HandleTaskEvent(NW_Wml_t *thisObj, NW_Wml_Element_t* el) -{ - NW_Wml_Element_t task_el; - NW_Ucs2 *target_url = 0; - NW_Ucs2 *extension_val = NULL; - NW_Bool task_found = NW_FALSE; - NW_DeckDecoderIter_t iter; - TBrowserStatusCode status = KBrsrSuccess; - NW_Url_Schema_t ret_scheme; - TBrowserStatusCode schema_status = KBrsrSuccess; - NW_Bool display = NW_FALSE; - - /* first check if we can find href attribute (A element) */ - status = NW_Wml_GetHrefAttr(thisObj, el, &target_url); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return status; - } - - /* if no url, then perhaps a dialog should be presented to the user */ - if (target_url) - { - NW_Wml_ElType_e el_type; - /* check if we are allowed to navigate. */ - status = NW_Wml_CanNavigateToUri(); - if (status != KBrsrSuccess) { - NW_Mem_Free(target_url); - return status; - } - - /* check the file extension */ - extension_val = NW_Url_GetUrlFileExtension(target_url); - - /* - There is no special handling for mailto and wtai here. - The default scheme dispatcher will dispatch these schemes - */ - thisObj->curr_task = GO_TASK; - - //To get the element type - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - if ( el_type == A_ELEMENT ) - { - //pass the element type. Otherwise it will crash. - status = NW_Wml_FetchUrl(thisObj, target_url, el); - } - else - { - /* thisObj parameter - no GO element involved */ - status = NW_Wml_FetchUrl(thisObj, target_url, 0); - } - NW_Mem_Free(target_url); - return status; /* _NOT_ KBrsrSuccess; */ - } - - /* Check if we are allowed to navigate. */ - status = CanNavigate(thisObj, el); - if (status != KBrsrSuccess) { - return status; - } - - /* look for a task element */ - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, el) != KBrsrSuccess) - return KBrsrFailure; - - while ((task_found == NW_FALSE) && NW_DeckDecoderIter_GetNextElement(&iter, &task_el)) - { - NW_Wml_ElType_e el_type; - NW_Bool running = NW_FALSE; - - NW_DeckDecoder_GetType(thisObj->decoder, &task_el, &el_type); - - if (el_type == GO_ELEMENT) - { - task_found = NW_TRUE; - thisObj->curr_task = GO_TASK; - - /* GetHrefAttr & FetchUrl handle 12.5.1.2 */ - status = NW_Wml_GetHrefAttr(thisObj, &task_el, &target_url); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return status; - } - - /* This function handles 12.5.1 */ - status = ProcessVarElements(thisObj, NW_TRUE, &task_el); - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) - { - return status; - } - - /* - * if no url, then perhaps a dialog should be presented to - * the user - */ - if (target_url) - { - /* - There is no special handling for mailto and wtai here. - The default scheme dispatcher will dispatch these schemes - */ - status = NW_Wml_FetchUrl(thisObj, target_url, &task_el); - - //If there is a WTAI or callendar in an oneventforward, the card must be displayed again - //after responding to the dialog query to make the call or else the browser will "jam". - schema_status = NW_Url_GetSchemeNoValidation(target_url, &ret_scheme); - //val = NW_Str_StrcmpConst(NW_Url_GetUrlFileExtension(target_url), WAE_URL_CALENDAR_EXT); - - if( (extension_val != NULL) && - (0 == NW_Str_StrcmpConst(NW_Url_GetUrlFileExtension(extension_val), WAE_URL_CALENDAR_EXT) - || 0 == NW_Str_StrcmpConst(NW_Url_GetUrlFileExtension(extension_val), WAE_URL_JPG_EXT))) - { - display = NW_TRUE; - } - if ( schema_status == KBrsrSuccess && (ret_scheme == NW_SCHEMA_WTAI || display == NW_TRUE)) - { - schema_status = NW_Wml_DisplayCard(thisObj, NW_TRUE); - - if (schema_status != KBrsrSuccess) - { - return schema_status; - } - return KBrsrSuccess; - } - - NW_Mem_Free(target_url); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - return status; - } - } - else - { - return KBrsrMalformedUrl; - } - } - else if (el_type == PREV_ELEMENT) - { - task_found = NW_TRUE; - thisObj->curr_task = PREV_TASK; - - /* This function handles 12.5.2.1 */ - status = ProcessVarElements(thisObj, NW_TRUE, &task_el); - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) - { - return status; - } - - status = NW_Wml_FetchPrevUrl(thisObj); - if (status == KBrsrFailure) - { - /* - * FAILURE means the history stack is empty. - * Must unset variables - */ - NW_Wml_ClearTaskVariables(thisObj); - status = KBrsrHedContentDispatched; - return status; - } - else if (status != KBrsrSuccess) - { - return status; - } - } - else if (el_type == REFRESH_ELEMENT) - { - NW_Uint32 dummy = 0; - task_found = NW_TRUE; - thisObj->curr_task = REFRESH_TASK; - - status = (TIMER_API->isRunning)(thisObj->browser_app, &running); - if (status == KBrsrSuccess && running == NW_TRUE) - { - status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_FROM_TIMER, &dummy); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return status; - } - } - /* This function handles 12.5.4.1 */ - status = ProcessVarElements(thisObj, NW_TRUE, &task_el); - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) - { - return status; - } - - /* - * WML Spec 12.5.4.2 - * apply navigation task variable settings to browser content - */ - (void) NW_Wml_ApplyTaskVariables(thisObj); - - /* Set Input and Select element NAME and INAME variables */ - if ((status = ApplyInternalVariables(thisObj)) == KBrsrOutOfMemory) - return status; - - status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_USE_DEFAULT, &dummy); - - /* KBrsrSuccess implies timer is present. - * KBrsrFailure is not a fatal error - */ - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) { - /* Currently this would be true only in the case of KBrsrOutOfMemory */ - return status; - } - - /* - * WML Spec 12.5.4.4 - * display card via the MMI interface - * don't call NW_WmlPanel_UiRefresh() - this card hasn't been - * presented yet - */ - status = NW_Wml_DisplayCard(thisObj, NW_TRUE); - if (status != KBrsrSuccess) - { - return status; - } - - /* TODO: This has to change to reflect the new logic of - * setting the timer after the page is refreshed vk - 01/22 - */ - status = NW_Wml_HandleTimer(thisObj); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return status; - } - } - else if (el_type == NOOP_ELEMENT) - { - /* no processing */ - task_found = NW_TRUE; - thisObj->curr_task = NOOP_TASK; - } - /* we ignore any other element type */ - } - - return KBrsrSuccess; -} - - -/* - ProcessGo supports the Reference Processing Behavior - Inter-card - Navigation defined in WML Specification 12.5.1.5 - 12.5.1.10, - 5. handle NEWCONTEXT - 6. apply navigation task variable assignments to browser context - 7. push destination card onto history stack - 8. handle ONENTERFORWARD - 9. handle TIMER element - 10. display card via the MMI interface - * - * RETURN KBrsrSuccess - * KBrsrFailure - does not imply a fatal error - * KBrsrOutOfMemory - * NW_STAT_* - propagates TBrowserStatusCode error from the other calls - */ -TBrowserStatusCode NW_Wml_ProcessGo(NW_Wml_t *obj, NW_Ucs2 *response_url) -{ - TBrowserStatusCode status; - NW_Uint32 dummy = 0; - - /* timers haven't been started yet. */ - NW_Wml_SetTimerProcessing(obj, NW_FALSE); - - - /* WML Spec 12.5.1.5 - * - * apply navigation task variable settings to browser content - */ - (void) NW_Wml_ApplyTaskVariables(obj); - - /* WML Spec 12.5.1.6 - * - * check for card's new_context state and clear browser history - * and var_list if neccesary - */ - if ((status = HandleNewContext(obj)) != KBrsrSuccess) - return status; - - /* Set Input and Select element NAME and INAME variables */ - if ((status = ApplyInternalVariables(obj)) == KBrsrOutOfMemory) - return status; - - /* WML Spec 12.5.1 #7. - * The destination card was pushed already into the history stack by - * the DocumentRoot.UpdateHistory - */ - if ((status = NW_Wml_HistorySetResponseUrl(obj, response_url)) != KBrsrSuccess) - return status; - - /* WML Spec 12.5.1.8 - * - * handle ONENTERFORWARD intrinsic event; - */ - status = NW_Wml_HandleIntrinsicEvents(obj, ONENTERFORWARD); - - /* If status is failure then no ONENTERFORWARD existed. KBrsrSuccess - ** means ONENTERFORWARD existed and was executed, so content will be - ** specified by result of ONENTERFORWARD. All other errors should terminate - ** processing this deck. - */ - if (status != KBrsrFailure) - { - status = NW_Wml_DisplayCard(obj, NW_FALSE); - return status; - } - - /* Check to see if there is a ONTIMER event specified if so populate the - * key variable.The timer will be set after the card has been displayed - */ - status = NW_Wml_SetTimerKey(obj, WAE_TIMER_USE_DEFAULT, &dummy); - - /* KBrsrSuccess implies timer is present. - * KBrsrFailure is not a fatal error - */ - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) { - /* Currently this would be true only in the case of KBrsrOutOfMemory */ - (void)NW_Wml_HistoryToPrev(obj, NULL); - return status; - } - - /* WML Spec 12.5.1.10 - * - * display card via the MMI interface - */ - status = NW_Wml_DisplayCard(obj, NW_FALSE); - if (status != KBrsrSuccess) { - (void)NW_Wml_HistoryToPrev(obj, NULL); - } - - return status; -} - - -/* - ProcessPrev supports the Reference Processing Behavior - Inter-card - Navigation defined in WML Specification 12.5.2.5 - 12.5.2.8, - 5. apply navigation task variable assignments to browser context - 6. handle ONENTERBACKWARD - 7. handle TIMER element - 8. display card via the MMI interface - * - * RETURN KBrsrSuccess - * KBrsrFailure - does not imply a fatal error - * NW_STAT_* - propagates TBrowserStatusCode error from the other calls - * - */ -TBrowserStatusCode NW_Wml_ProcessPrev(NW_Wml_t *obj, NW_Ucs2 *response_url) -{ - TBrowserStatusCode status; - TBrowserStatusCode savedStatus = KBrsrSuccess; - NW_Uint32 dummy; - - /* timers havent been started yet. */ - NW_Wml_SetTimerProcessing(obj, NW_FALSE); - - /* WML Spec 12.5.2.5 - * - * apply navigation task variable settings to browser content - */ - (void) NW_Wml_ApplyTaskVariables(obj); - - /* Set Input and Select element NAME and INAME variables */ - if ((status = ApplyInternalVariables(obj)) - == KBrsrOutOfMemory) - return status; - - /* WML Spec 12.5.1.7 - * - * push destination card onto history stack. - * In this case, we just need to save the current response Url. - */ - - if ((status = NW_Wml_HistorySetResponseUrl(obj, response_url)) != KBrsrSuccess) - return status; - - /* WML Spec 12.5.2.6 - * - * handle ONENTERBACKWARD intrinsic event - */ - status = NW_Wml_HandleIntrinsicEvents(obj, ONENTERBACKWARD); - if ((status == KBrsrSuccess) || (status == KBrsrOutOfMemory)) - { - /* things get subtle here */ - return status; - } - else if(status != KBrsrFailure) - { - savedStatus = status; - } - - /* Check to see if there is a ONTIMER event specified if so populate the - * key variable.The timer will be set after the card has been displayed - */ - status = NW_Wml_SetTimerKey(obj, WAE_TIMER_USE_DEFAULT, &dummy); - - /* KBrsrSuccess implies timer is present. - * KBrsrFailure is not a fatal error - */ - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) { - - /* Currently this would be true only in the case of KBrsrOutOfMemory */ - if (savedStatus != KBrsrSuccess) { - return savedStatus; - } else { - return status; - } - - } - - /* WML Spec 12.5.2.8 - * - * display card via the MMI interface - */ - if ((status = NW_Wml_DisplayCard(obj, NW_FALSE)) != KBrsrSuccess) { - if (savedStatus != KBrsrSuccess) { - return savedStatus; - } else { - return status; - } - } - - return savedStatus; -} - -/* - ProcessRefresh supports the Reference Processing Behavior - Inter-card - Navigation defined in WML Specification 12.5.4.2 - 12.5.4.4, - 2. apply navigation task variable assignments to browser context - 3. handle TIMER element - 4. display card via the MMI interface - * - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_ProcessRefresh(NW_Wml_t *obj) -{ - TBrowserStatusCode status; - NW_Wml_t* thisObj = (NW_Wml_t*) obj; - NW_Uint32 dummy; - NW_Bool running = NW_FALSE; - - /* WML Spec 12.5.4.2 - * - * apply navigation task variable settings to browser content - */ - (void) NW_Wml_ApplyTaskVariables(thisObj); - - /* Set Input and Select element NAME and INAME variables */ - if ((status = ApplyInternalVariables(obj)) == KBrsrOutOfMemory) - return status; - - /* - * WML Spec 12.5.4.3 handle TIMER element per the - * Refresh's specific requirements in 11.7 - */ - status = (TIMER_API->isRunning)(thisObj->browser_app, &running); - if (status == KBrsrSuccess && running == NW_TRUE) - { - status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_FROM_TIMER, &dummy); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - return status; - } - - /* Check to see if there is a ONTIMER event specified if so populate the - * key variable.The timer will be set after the card has been displayed - */ - status = NW_Wml_SetTimerKey(obj, WAE_TIMER_USE_DEFAULT, &dummy); - - /* KBrsrSuccess implies timer is present. - * KBrsrFailure is not a fatal error - */ - if ((status != KBrsrSuccess) && (status != KBrsrFailure)) { - /* Currently this would be true only in the case of KBrsrOutOfMemory */ - return status; - } - - /* WML Spec 12.5.4.4 - * - * display card via the MMI interface - */ - status = (DISPLAY_API->refresh)(thisObj->browser_app); - - return status; -} - - -/* - * apply navigation task variable settings to browser content - * - * RETURN KBrsrSuccess - * KBrsrFailure - param_list is null or empty - */ -TBrowserStatusCode NW_Wml_ApplyTaskVariables(NW_Wml_t* thisObj) -{ - NW_Wml_Var_t *v; - - if (thisObj->param_list == 0) - return KBrsrFailure; - - if (NW_WmlVar_IsListEmpty(thisObj->param_list)) - return KBrsrFailure; - - /* - * If dup var, replace value. else, add to list - * - * NOTE: within this loop, all variables in param_list are - * cleared. - */ - while ((v = NW_WmlVar_PopFirst(thisObj->param_list)) != NULL) - { - if (!NW_WmlVar_Replace(thisObj->var_list, v)) - NW_WmlVar_AddVarToList(thisObj->var_list, v); - } - - return KBrsrSuccess; -} - - -/* - * If the context contains task (temporary) variables, clear them - * - * Assume the memory allocated for these variables is part - * of thisObj->mem_segment_general and will be free'd when thisObj->mem_segment_general - * is free'd. - */ -void NW_Wml_ClearTaskVariables(NW_Wml_t *thisObj) -{ - if (thisObj == 0 || thisObj->param_list == 0) - return; - - while (NW_WmlVar_PopFirst(thisObj->param_list) != NULL) - { - /* Loop through the vars and clear them */ - ; - } -} - -/* - * Implements the Reference Processing Behavior - - * 9.5.2 The Prev Element with setvar's. - * The function is invoked when HistoryShell Previous is requested - * - * RETURN: KBrsrSuccess - * KBrsrFailure - */ -TBrowserStatusCode NW_Wml_ProcessSetvarElements(NW_Wml_t *thisObj) -{ - NW_Wml_Element_t *el; - NW_Wml_Element_t task_el; - NW_Int32 i; - TBrowserStatusCode nwStatus = KBrsrSuccess; - - NW_ASSERT (thisObj != NULL); - - if (thisObj->prev_task_id >= 0) { - if ((i = NW_Wml_FindEl(thisObj, thisObj->prev_task_id)) != -1) { - el = thisObj->card_els[i]; - if (NW_DeckDecoder_FirstContainedElement(thisObj->decoder, el, &task_el)) { - nwStatus = ProcessVarElements(thisObj, NW_TRUE, &task_el); - } - } - else { - nwStatus = KBrsrFailure; - } - } - return nwStatus; -} - -/* - * Implements the Reference Processing Behavior - - * Inter-card Navigation defined in WML Specification 12.5.1.1, - * 12.5.2.1, and 12.5.4.1; specifically. - * - * RETURN: KBrsrSuccess - * KBrsrFailure - var element not found (not fatal) - * KBrsrOutOfMemory - * NW_STAT_* - */ -static TBrowserStatusCode ProcessVarElements(NW_Wml_t *thisObj, NW_Bool useTempVars, NW_Wml_Element_t *task_el) -{ - NW_Wml_Element_t el; - TBrowserStatusCode status; - NW_Ucs2 *n = NULL; - NW_Ucs2 *v = NULL; - NW_Wml_VarList_t *mergedList = NULL; - NW_DeckDecoderIter_t iter; - - /* "ClearTaskVariables" MOVED HERE to *ALWAYS* clear the task variables. - * 10/27/2000, jac. - * - * The context should not contain any old task/temporary vars - * but if it does (e.g. an error occurred and the variables - * were not cleared), clear them now. - */ - NW_Wml_ClearTaskVariables(thisObj); - - NW_THROWIF_ERROR((status = NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, task_el))); - - while (NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - if ((status = NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type)) - == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - - if (el_type == SETVAR_ELEMENT) - { - /* get the NAME attribute */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &n)) == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - - /* get the VALUE attribute */ - if (useTempVars) { - if (mergedList == NULL) - NW_THROWIF_MEM((mergedList = CpyVarList(thisObj->var_list, - NW_MEM_SEGMENT_MANUAL))); - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, VALUE_ATTR, - mergedList, NW_MEM_SEGMENT_MANUAL, &v)) == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - - if ((status = SetTempVar(mergedList, NW_MEM_SEGMENT_MANUAL, n, v)) - == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - status = SetTempVar(thisObj->param_list, thisObj->mem_segment_general, n, v); - } - else { - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &v)) == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - status = NW_Wml_SetVar(thisObj, n, v); - } - - /* FAILURE does not imply a fatal error */ - if (status != KBrsrSuccess && status != KBrsrFailure) { - NW_THROW_ERROR(); - } - - NW_Str_Delete(n); - NW_Str_Delete(v); - n = v = NULL; - } - } - - status = KBrsrSuccess; - NW_THROW_ERROR(); - -NW_CATCH_MEM - status = KBrsrOutOfMemory; - -NW_CATCH_ERROR - VarListFree(mergedList, NW_MEM_SEGMENT_MANUAL); - NW_Str_Delete(n); - NW_Str_Delete(v); - - return status; -} - - -/* - * NewContext is a generic function to reset the CoreBrowser's - * current context - * - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode HandleNewContext(NW_Wml_t* thisObj) -{ - NW_Wml_Element_t card_el; - - if (!NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - return KBrsrFailure; - - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, &card_el, NEWCONTEXT_ATTR, - WAE_ASC_TRUE_STR, thisObj->var_list)) - NW_Wml_NewContext(thisObj); - - return KBrsrSuccess; -} - - - -/* - * apply NAME and INAME attr variables inside card's INPUT and - * SELECT elements - * - * RETURN KBrsrSuccess - * KBrsrFailure - does not imply a fatal error - * - no card element - * NW_STAT_* - propagates TBrowserStatusCode error from the other calls - */ -static TBrowserStatusCode ApplyInternalVariables(NW_Wml_t* thisObj) -{ - NW_Wml_Element_t card_el; - - if (!NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - return KBrsrFailure; - - return NW_Wml_ApplyContainedInternalVariables(thisObj, &card_el); -} - - -/* - * Add the given name/value pair to the "temporary" variable - * list - the thisObj->param_list variable list. - * - * RETURN: KBrsrSuccess - * KBrsrFailure - if name = null - * - returned by NW_WmlVar_AddToList if name = null - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetTempVar(NW_Wml_VarList_t *paramList, NW_Mem_Segment_Id_t mem_segment, - NW_Ucs2 *name, NW_Ucs2 *value) -{ - NW_Wml_Var_t *v; - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT(paramList); - - if (name) { - v = NW_WmlVar_Get(paramList, name); - - if (v) { - status = NW_WmlVar_ReplaceValue(v, value, mem_segment); - } - else { - status = NW_WmlVar_AddToList(paramList, name, value, mem_segment); - } - } - return status; -} - -/* - * The function frees memory alocated for a Wml variable list. It does nothing if - * the manual memory segment is used. - */ -static void VarListFree(NW_Wml_VarList_t *varList, NW_Mem_Segment_Id_t mem_segment) -{ - if (mem_segment == NW_MEM_SEGMENT_MANUAL) - { - NW_Wml_Var_t *pVar = NULL; - NW_Wml_Var_t tmpVar; - - while ((pVar = NW_WmlVar_Next(varList, pVar)) != NULL) { - NW_Str_Delete(pVar->name); - NW_Str_Delete(pVar->val); - tmpVar.next = pVar->next; - NW_Mem_Free(pVar); - pVar = &tmpVar; - } - } - return; -} - -/* - * The function creates a copy of a Wml variable list in - * a specified memory segment. The function returns: - * NULL pointer in out memory conditions - */ -static NW_Wml_VarList_t *CpyVarList(NW_Wml_VarList_t *varList, NW_Mem_Segment_Id_t mem_segment) -{ - NW_Wml_Var_t *pVar = NULL; - NW_Wml_VarList_t *retList; - - retList = NW_WmlVar_NewList(mem_segment); - if (retList) - { - while ((pVar = NW_WmlVar_Next(varList, pVar)) != NULL) - { - TBrowserStatusCode status; - if (!pVar->name || !pVar->val) { - continue; - } - status = NW_WmlVar_AddToList(retList, pVar->name, pVar->val, mem_segment); - if (status == KBrsrOutOfMemory) { - VarListFree(retList, mem_segment); - retList = NULL; - break; - } - else { - NW_ASSERT(status == KBrsrSuccess); - } - } - } - return retList; -} -static TBrowserStatusCode CanNavigate(NW_Wml_t *thisObj, NW_Wml_Element_t *el) -{ - NW_Wml_Element_t task_el; - NW_Wml_ElType_e el_type; - NW_DeckDecoderIter_t iter; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(el != NULL); - - /* look for a task element */ - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, el) != KBrsrSuccess) { - return KBrsrFailure; - } - - while (NW_DeckDecoderIter_GetNextElement(&iter, &task_el)) - { - NW_DeckDecoder_GetType(thisObj->decoder, &task_el, &el_type); - /* The go and prev tasks result in navigation to a new url. */ - if (el_type == GO_ELEMENT || el_type == PREV_ELEMENT) - { - /* check if we are allowed to navigate. */ - return NW_Wml_CanNavigateToUri(); - } - } - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_script_message.c --- a/webengine/wmlengine/src/wml/src/wml_script_message.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_script_message.c $ - - Purpose: - - Class: WmlBrowser - - Browser script message functions implementation - -*/ - -#include "wml_task.h" -#include "wml_history.h" -#include "wml_url_utils.h" - -#include "nwx_mem.h" -#include "nwx_string.h" -#include "nw_evlog_api.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "BrsrStatusCodes.h" -#include "urlloader_urlloaderint.h" - -/* - * RETURN KBrsrSuccess - * KBrsrFailure - * KBrsrBadInputParam - * NW_STAT_* - fatal error - */ -TBrowserStatusCode NW_Wml_ReStart(NW_Wml_t *thisObj, TBrowserStatusCode script_status) -{ - NW_Ucs2 *load_url = thisObj->script_state.load_url; - NW_Ucs2 *load_url_params = thisObj->script_state.load_url_params; - NW_Http_Header_t *load_header = thisObj->script_state.load_header; - NW_Ucs2 *target_url = NULL; - NW_Int32 size = 0; - NW_Ucs2 empty[1] = {0}; - TBrowserStatusCode status = KBrsrSuccess; - - if (thisObj == NULL) - goto finish; - - if ( ((script_status == KBrsrSuccess) || ( script_status == KBrsrScriptErrorUserExit)) - && load_url && NW_Str_Strcmp(load_url, empty)) - { - thisObj->curr_task = GO_TASK; - if (load_url_params && (load_url_params[0] != '\0')) - { - status = NW_WmlVar_ParseList(load_url_params, &size, - thisObj->mem_segment_general, - &thisObj->param_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* Failure does not imply a fatal error */ - goto finish; - } - - status = NW_Wml_GetFullUrl(thisObj, load_url, &target_url); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto finish; - - /* if no url, then perhaps a dialog should be presented to the user */ - if (target_url && (load_header==NULL)) /* a simple GO */ - { - status = NW_Wml_FetchUrlGeneric( - thisObj, - target_url, - NW_FALSE, /* go() can only be a get */ - NULL, /* no header */ - NULL, /* no postfields */ - NULL); /* no enc_type */ - - NW_Str_Delete(target_url); - if (status != KBrsrSuccess) - goto finish; - } - else if (target_url && load_header) { /* LOCATIONINFO() */ - status = NW_Wml_FetchUrlGeneric( - thisObj, - target_url, - NW_TRUE, /* locationInfo is a post */ - load_header, /* the header */ - NULL, /* blank postfields */ - NULL); /* enc_type = NULL, i.e. wml-urlencoded */ - - NW_Str_Delete(target_url); - - load_header = NULL; - thisObj->script_state.load_header = 0; - - if (status != KBrsrSuccess) - goto finish; - } - } - else if (((script_status == KBrsrSuccess) || ( script_status == KBrsrScriptErrorUserExit)) - && thisObj->script_state.load_prev) - { - thisObj->curr_task = PREV_TASK; - status = NW_Wml_FetchPrevUrl(thisObj); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto finish; - } - else - { - /* Start timer after call to Script */ - if (!NW_Wml_IsTimerProcessingComplete(thisObj)) - { - /* Current card contains a timer with a timer variable. - Start timer as usual using the timer variable. */ - status = NW_Wml_HandleTimer(thisObj); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto finish; - } - else - { - /* Current card does not contain a timer variable. Start - timer from the saved timer state. If no timer in card, - saved timer start is 0. */ - if ((thisObj->script_state.timer_time != 0) && thisObj->hasFocus) - { - status = (TIMER_API->create)(thisObj->browser_app, thisObj->script_state.timer_time); - thisObj->script_state.timer_time = 0; - if (status != KBrsrSuccess) - goto finish; - } - } - - /* do a refresh until UI option list bug is fixed */ - thisObj->curr_task = REFRESH_TASK; - status = NW_Wml_DisplayCard(thisObj, NW_FALSE); - - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal error */ - goto finish; - } - -finish: - /* reset script navigation variables */ - - if(thisObj != NULL) - { - thisObj->script_state.load_prev = NW_FALSE; - - if (load_url != 0) - { - NW_Str_Delete(load_url); - thisObj->script_state.load_url = 0; - } - - if (load_url_params != 0) - { - NW_Str_Delete(load_url_params); - thisObj->script_state.load_url_params = 0; - } - - if (load_header != 0) - { - UrlLoader_HeadersFree(load_header); - thisObj->script_state.load_header = 0; - } - } - return status; -} - -void NW_Wml_LoadPrev(NW_Wml_t *thisObj) -{ - thisObj->script_state.load_prev = NW_TRUE; - if (thisObj->script_state.load_url) - { - NW_Mem_Free(thisObj->script_state.load_url); - NW_Mem_Free(thisObj->script_state.load_url_params); - thisObj->script_state.load_url = 0; - thisObj->script_state.load_url_params = 0; - } -} - -void NW_Wml_LoadUrl(NW_Wml_t *thisObj, NW_Ucs2 *url, NW_Ucs2 *param, NW_Http_Header_t *header) -{ - if (thisObj->script_state.load_url) /* 11/29/2000 */ - { - NW_Mem_Free(thisObj->script_state.load_url); - NW_Mem_Free(thisObj->script_state.load_url_params); - } - if (thisObj->script_state.load_header) - { - UrlLoader_HeadersFree(thisObj->script_state.load_header); - } - thisObj->script_state.load_url = url; - thisObj->script_state.load_url_params = param; - thisObj->script_state.load_prev = NW_FALSE; - thisObj->script_state.load_header = header; -} - - -/* void NewContext() */ -void NW_Wml_NewContext(NW_Wml_t *thisObj) -{ - NW_WaeUsrAgent_t* wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - - NW_Wml_HistoryClear(thisObj); - NW_WmlVar_Clear(thisObj->var_list); - - NW_ASSERT( wae != NULL ); - NW_EvLog_Log( NW_WaeUsrAgent_GetEvLog(wae), NW_EvLog_VARIABLE_CONTEXT_NEW ); - NW_EvLog_Log( NW_WaeUsrAgent_GetEvLog(wae), NW_EvLog_HISTORY_STACK_CLEAR ); -} - -/* does a newcontext but leaves the top history entry intact. */ -void NW_Wml_NewContextFromScript(NW_Wml_t *thisObj) -{ - NW_Wml_NewContext(thisObj); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_scrproxy.c --- a/webengine/wmlengine/src/wml/src/wml_scrproxy.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1028 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This module has the logic to coordinate the -* interaction between the WML Script Engine, WML Interpreter -* and the user agent ie. typically the GUI. -* (1) acts as proxy to the script interpreter. All the calls to the script -* interpreter are tunneled through this module. -* (2) invokes the wml interpreter for script requests to the WML Browser -* Library -* (3) invokes the user agent for the script requests to the Dialog libraries -* (4) propogates start of script exection and finish to the user agent -* (5) exposes API's to abort scripts, query the state of the script -* interpreter(idle, busy) . -* -*/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ -#include "wml_scrproxy.h" -#include "wml_wae.h" /* wml script interface */ -#include "nwx_generic_dlg.h" -#include "nwx_ctx.h" -#include "BrsrStatusCodes.h" - -/* -**------------------------------------------------------------------------- -** Constants -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Types -**------------------------------------------------------------------------- -*/ - -typedef enum { - SCR_STATE_INIT, - SCR_STATE_RUN_REQ, - SCR_STATE_RUNNING, - SCR_STATE_DONE, - SCR_STATE_ABORT_REQ, - SCR_STATE_ABORTED -} NW_Script_State_t; - -struct _NW_ScrProxy_t { - void *ctx; - const NW_ScriptSrvApi_t *scrSvrApi; - const NW_Scr_ProgressApi_t *scrProgressApi; - const NW_Scr_DialogApi_t *scrDlgApi; - NW_NotifyError_t errApi; - const NW_WtaiApi_t *wtaiApi; - NW_Script_State_t state; /* state of the script engine */ - const NW_Scr_WmlBrowserApi_t *scrBrowserApi; - const NW_Scr_SuspResQueryApi_t *scrSuspResQueryApi; -}; - -/* -**------------------------------------------------------------------------- -** Macros -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static void *ScrProxy_GetUserAgent(NW_ScrProxy_t *scrProxy); -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -static const NW_ScriptSrvApi_t scriptSrv_Api = -{ - NW_Wml_RunScript, - NW_Wml_AbortScript, -}; - -/* -**------------------------------------------------------------------------- -** Global Variable Definitions -**------------------------------------------------------------------------- -*/ - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static void *ScrProxy_GetUserAgent(NW_ScrProxy_t *scrProxy) -{ - NW_ASSERT(scrProxy != NULL); - return scrProxy->ctx; -} - -static void -ScrProxy_SetScriptApi(NW_ScrProxy_t *scrProxy, - const NW_ScriptSrvApi_t *scrSvrApi) -{ - scrProxy->scrSvrApi = scrSvrApi; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -/***************************************************************** - - Name: NW_ScrProxy_New() - - Description: Create a new script proxy. - - Parameters: - - Return Value: pointer to the script proxy - -******************************************************************/ -NW_ScrProxy_t *NW_ScrProxy_New() -{ - NW_ScrProxy_t *proxy = (NW_ScrProxy_t*) NW_Mem_Malloc(sizeof(NW_ScrProxy_t)); - - if (proxy != NULL) { - proxy->scrSvrApi = NULL; - proxy->scrProgressApi = NULL; - proxy->scrDlgApi = NULL; - proxy->scrBrowserApi = NULL; - proxy->state = SCR_STATE_INIT; - } - return proxy; -} - -/***************************************************************** - - Name: NW_ScrProxy_Free() - - Description: Free the script proxy. - - Parameters: proxy - pointer to the script proxy - - Return Value: - -******************************************************************/ -void NW_ScrProxy_Free(NW_ScrProxy_t *proxy) -{ - if (proxy != NULL) { - NW_Mem_Free(proxy); - } -} - -/***************************************************************** - - Name: NW_ScrProxy_Initialize() - - Description: Initialize the script proxy. - - Parameters: scrProxy - pointer to the script proxy - ctx - context of the caller - scrBrowserApi - interface to browser (WML context) - scrProgressApi - interface to browser (script progress) - scrDlgApi - interface to dialogs - wtaiApi - interface to WTAI - errApi - interface to browser (error notification) - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode -NW_ScrProxy_Initialize(NW_ScrProxy_t *scrProxy, - void *ctx, - const NW_Scr_WmlBrowserApi_t *scrBrowserApi, - const NW_Scr_ProgressApi_t *scrProgressApi, - const NW_Scr_DialogApi_t *scrDlgApi, - const NW_WtaiApi_t *wtaiApi, - const NW_Scr_SuspResQueryApi_t *scrSuspResQueryApi, - NW_NotifyError_t errApi) -{ - if ((scrProxy != NULL) && (scrBrowserApi != NULL) - && (scrProgressApi != NULL) && (scrDlgApi != NULL) && (errApi != NULL)) { - scrProxy->ctx = ctx; - scrProxy->scrBrowserApi = scrBrowserApi; - scrProxy->scrProgressApi = scrProgressApi; - scrProxy->scrDlgApi = scrDlgApi; - scrProxy->errApi = errApi; - scrProxy->wtaiApi = wtaiApi; - scrProxy->state = SCR_STATE_INIT; - scrProxy->scrSuspResQueryApi = scrSuspResQueryApi; - ScrProxy_SetScriptApi(scrProxy, &scriptSrv_Api); - return KBrsrSuccess; - } - return KBrsrBadInputParam; -} - -/***************************************************************** - - Name: NW_ScrProxy_RunScript() - - Description: Run a script. Updates the state machine to indicate - that a request to run a script has been made. - - Parameters: scrProxy - pointer to the script proxy - wml - the wml interpreter that is making the request - url - location from which the script is downloaded - referer - the referer to the script - content - encoded wml script - len - lenght of the content - charset - charset - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrBusy - the script engine is busy -******************************************************************/ -TBrowserStatusCode -NW_ScrProxy_RunScript(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *url, NW_Ucs2 *postfields, - NW_Ucs2 *referer, NW_Byte *content, - const NW_Uint32 len, const NW_Http_CharSet_t charset) -{ - TBrowserStatusCode ret_status; - void *ctx; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - NW_ASSERT(url != NULL); - NW_ASSERT(content != NULL); - NW_ASSERT(referer != NULL); - if ((scrProxy->state == SCR_STATE_RUNNING) - || (scrProxy->state == SCR_STATE_ABORT_REQ) - || (scrProxy->state == SCR_STATE_RUN_REQ)) { - return KBrsrScrproxyScrBusy; - } - - - NW_ASSERT(scrProxy->scrSvrApi != NULL); - - /* run the script */ - ret_status = scrProxy->scrSvrApi->run(url, postfields, referer, content, len, charset); - if (ret_status == KBrsrSuccess) { - scrProxy->state = SCR_STATE_RUN_REQ; - - /* inform the user that we have started a new script */ - if (scrProxy->scrProgressApi != NULL) { - ctx = ScrProxy_GetUserAgent(scrProxy); - if ((ret_status = scrProxy->scrProgressApi->start(ctx, url)) - != KBrsrSuccess) { - return ret_status; - } - } - } - return ret_status; -} - -/***************************************************************** - - Name: NW_ScrProxy_RunScriptAck() - - Description: Acknowledgement for a run script request. - - Parameters: scrProxy - pointer to the script proxy - status - status of the script interpreter - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_RunScriptAck(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status) -{ - void *ctx; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - /* validate our state */ - NW_ASSERT(scrProxy->state == SCR_STATE_RUN_REQ); - if (scrProxy->state == SCR_STATE_RUN_REQ) { - if (status == KBrsrSuccess) { - scrProxy->state = SCR_STATE_RUNNING; - } else { - /* failed to run the script */ - scrProxy->state = SCR_STATE_ABORTED; - /* script has completed */ - ctx = ScrProxy_GetUserAgent(scrProxy); - if (scrProxy->scrProgressApi != NULL) { - return scrProxy->scrProgressApi->finish(ctx, status, NULL); - } - } - } - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_ScrProxy_Finish() - - Description: Script execution has completed. - - Parameters: scrProxy - pointer to the script proxy - status - status of the script interpreter - message - messgae from the script interpreter - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_Finish(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status, - const NW_Ucs2 *message) -{ - void *ctx; - TBrowserStatusCode ret_status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - /* validate our state */ - NW_ASSERT(scrProxy->state == SCR_STATE_RUNNING); - if (scrProxy->state == SCR_STATE_RUNNING) { - scrProxy->state = SCR_STATE_DONE; - - ctx = ScrProxy_GetUserAgent(scrProxy); - /* inform the user that the script has completed */ - if (scrProxy->scrProgressApi != NULL) { - ret_status = scrProxy->scrProgressApi->finish(ctx, - status, message); - } - } - return ret_status; -} - -/***************************************************************** - - Name: NW_ScrProxy_AbortAck() - - Description: Acknowledgement from the script interpreter for the - abort request. - - Parameters: scrProxy - pointer to the script proxy - status - status of the script interpreter - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_AbortAck(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode status) -{ - void *ctx; - TBrowserStatusCode ret_status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - /* validate our state */ - NW_ASSERT(scrProxy->state == SCR_STATE_ABORT_REQ); - if (scrProxy->state == SCR_STATE_ABORT_REQ) { - scrProxy->state = SCR_STATE_ABORTED; - - ctx = ScrProxy_GetUserAgent(scrProxy); - /* inform the user that the script has completed */ - if (scrProxy->scrProgressApi != NULL) { - ret_status = scrProxy->scrProgressApi->finish(ctx, - status, NULL); - } - } - return ret_status; -} - -/***************************************************************** - - Name: NW_ScrProxy_DlgAlert() - - Description: Script library dialog alert. - - Parameters: scrProxy - pointer to the script proxy - message - message to display to the user - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_DlgAlert(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - void *callbackCtx, - NW_ScrProxy_DlgAlertCB_t *callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - void *ctx = ScrProxy_GetUserAgent(scrProxy); - if (scrProxy->scrDlgApi != NULL) { - scrProxy->scrDlgApi->dlgAlert(ctx, message, - callbackCtx, callback); - } - } else { - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_NotifyError() - - Description: Script library dialog error notification - - Parameters: scrProxy - pointer to the script proxy - message - message to display to the user - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_NotifyError(NW_ScrProxy_t *scrProxy, - const TBrowserStatusCode Err) -{ - TBrowserStatusCode status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - void *ctx = ScrProxy_GetUserAgent(scrProxy); - if (scrProxy->errApi != NULL) { - (void) scrProxy->errApi(ctx, Err, NULL, NULL); - } - } else { - status = KBrsrScrproxyScrAbort; - } - return status; -} -/***************************************************************** - - Name: NW_ScrProxy_DlgConfirm() - - Description: Script library dialog confirm. - - Parameters: scrProxy - pointer to the script proxy - message - message to display to the user - yesMessage - yes message - noMessage - no message - confirm - user confirmation - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_DlgConfirm(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - const NW_Ucs2 *yesMessage, - const NW_Ucs2 *noMessage, - void *callbackCtx, - NW_Dlg_ConfirmCB_t *callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - void *ctx = ScrProxy_GetUserAgent(scrProxy); - if (scrProxy->scrDlgApi != NULL) { - NW_ASSERT(scrProxy->scrDlgApi->dlgConfirm != NULL); - scrProxy->scrDlgApi->dlgConfirm(ctx, message, - yesMessage, noMessage, callbackCtx, callback); - } - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_DlgPrompt() - - Description: Script library dialog prompt. - - Parameters: scrProxy - pointer to the script proxy - message - message to display to the user - defaultInput - default input string - ret_string - return string - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_DlgPrompt(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *message, - const NW_Ucs2 *defaultInput, - void *callbackCtx, - NW_ScrProxy_DlgPromptCB_t *callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - void *ctx = ScrProxy_GetUserAgent(scrProxy); - if (scrProxy->scrDlgApi != NULL) { - scrProxy->scrDlgApi->dlgPrompt(ctx, message, - defaultInput, callbackCtx, callback); - } - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_GenericDlgListSelect() - - Description: Display a generic dialog box with a prompt only. - - Parameters: scrProxy - pointer to the script proxy - data - holds all the strings to display - - - Return Value: - KBrsrSuccess - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_GenericDlgListSelect(NW_ScrProxy_t *scrProxy, NW_Dlg_ListSelect_t *data, - void *callbackCtx, NW_Dlg_ListSelectCB_t* callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - void *wae = NW_Ctx_Get(NW_CTX_WML_CORE, 0); - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING && wae != NULL) { - (void) NW_WaeUsrAgent_DlgListSelect((NW_WaeUsrAgent_t*) wae, data, callbackCtx, callback); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_GenericDlgPrompt() - - Description: Display a generic dialog box with a prompt only. - - Parameters: scrProxy - pointer to the script proxy - data - holds all the strings to display - - - Return Value: - KBrsrSuccess - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_GenericDlgPrompt(NW_ScrProxy_t *scrProxy, NW_Dlg_Prompt_t *data, - void *callbackCtx, NW_Dlg_PromptCB_t* callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - void *wae = NW_Ctx_Get(NW_CTX_WML_CORE, 0); - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING && wae != NULL) { - (void)NW_WaeUsrAgent_DlgPrompt((NW_WaeUsrAgent_t*) wae, data, callbackCtx, callback); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_GenericDlgInputPrompt() - - Description: Display a generic dialog box with a prompt for user input. - - Parameters: scrProxy - pointer to the script proxy - data - holds all the strings to display - - - Return Value: - KBrsrSuccess - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_GenericDlgInputPrompt(NW_ScrProxy_t *scrProxy, NW_Dlg_InputPrompt_t *data, - void *callbackCtx, NW_Dlg_InputPromptCB_t* callback) -{ - TBrowserStatusCode status = KBrsrSuccess; - void *wae = NW_Ctx_Get(NW_CTX_WML_CORE, 0); - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING && wae != NULL) { - (void)NW_WaeUsrAgent_DlgInputPrompt((NW_WaeUsrAgent_t*) wae, data, callbackCtx, callback); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_GetVar() - - Description: Get a variable from the wml intepreter. - - Parameters: scrProxy - pointer to the script proxy - var - variable to query - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_GetVar(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *var, - NW_Ucs2 **ret_string) -{ - TBrowserStatusCode status; - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - status = scrProxy->scrBrowserApi->getVar(scrProxy->ctx, var, ret_string); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_SetVar() - - Description: Set a variable on the wml intepreter. - - Parameters: scrProxy - pointer to the script proxy - var - new variable - value - variable value - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_SetVar(NW_ScrProxy_t *scrProxy, - const NW_Ucs2 *var, - const NW_Ucs2 *value) -{ - TBrowserStatusCode status; - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - status = scrProxy->scrBrowserApi->setVar(scrProxy->ctx, var, value); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_LoadPrev() - - Description: Perform a prev task on the wml interpreter. - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_LoadPrev(NW_ScrProxy_t *scrProxy) -{ - TBrowserStatusCode status; - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - status = scrProxy->scrBrowserApi->prev(scrProxy->ctx); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_NewContext() - - Description: Perform a newcontext on the wml interpreter. - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrScrproxyScrAbort - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_NewContext(NW_ScrProxy_t *scrProxy) -{ - TBrowserStatusCode status; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) - { - status = scrProxy->scrBrowserApi->newContext(scrProxy->ctx); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_Refresh() - - Description: Perform a refresh on the wml interpreter. - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_Refresh(NW_ScrProxy_t *scrProxy) -{ - TBrowserStatusCode status; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - - if (scrProxy->state == SCR_STATE_RUNNING) { - status = scrProxy->scrBrowserApi->refresh(scrProxy->ctx); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_LoadUrl() - - Description: Perform a load url on the wml interpreter. - - Parameters: scrProxy - pointer to the script proxy - url - url to load - param - ??? - - Return Value: - KBrsrSuccess - KBrsrBadInputParam - KBrsrOutOfMemory - KBrsrScrproxyScrAbort -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_LoadUrl(NW_ScrProxy_t *scrProxy, const NW_Ucs2 *url, - const NW_Ucs2 *param) -{ - TBrowserStatusCode status; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if (scrProxy->state == SCR_STATE_RUNNING) { - status = scrProxy->scrBrowserApi->go(scrProxy->ctx, url, param, NULL); - } else { - /* ignore the request */ - status = KBrsrScrproxyScrAbort; - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_AbortScript() - - Description: Abort a running script. The script is only aborted - after we get a abort acknowledgement. - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_AbortScript(NW_ScrProxy_t *scrProxy) -{ - TBrowserStatusCode status = KBrsrSuccess; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if ((scrProxy->state == SCR_STATE_RUNNING) || - (scrProxy->state == SCR_STATE_RUN_REQ)) { - - NW_ASSERT(scrProxy->scrSvrApi != NULL); - - /* abort the script */ - if ((status = scrProxy->scrSvrApi->abort()) == KBrsrSuccess) - { - scrProxy->state = SCR_STATE_ABORT_REQ; - } - } - return status; -} - -/***************************************************************** - - Name: NW_ScrProxy_IsScriptRunning() - - Description: export the state of the script interpreter. - - Parameters: scrProxy - pointer to the script proxy - result - "NW_TRUE" script is running - "NW_FALSE" script is not running - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_IsScriptRunning(NW_ScrProxy_t *scrProxy, - NW_Bool *result) -{ - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if ((scrProxy->state == SCR_STATE_RUN_REQ) || - (scrProxy->state == SCR_STATE_RUNNING) || - (scrProxy->state == SCR_STATE_ABORT_REQ)) { - *result = NW_TRUE; - } else { - *result =NW_FALSE; - } - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_ScrProxy_ScrNotRespondingError() - - Description: script interpreter is not respoinding. - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrBadInputParam -******************************************************************/ -TBrowserStatusCode NW_ScrProxy_ScrNotRespondingError(NW_ScrProxy_t *scrProxy) -{ - - void *ctx; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - if ((scrProxy->state == SCR_STATE_RUN_REQ) || - (scrProxy->state == SCR_STATE_RUNNING) || - (scrProxy->state == SCR_STATE_ABORT_REQ)) { - - scrProxy->state = SCR_STATE_ABORTED; - - ctx = ScrProxy_GetUserAgent(scrProxy); - /* send a script finish to the user .*/ - if (scrProxy->scrProgressApi != NULL) { - (void) scrProxy->scrProgressApi->finish(ctx, KBrsrFailure, NULL); - } - /* flag an error to the user. */ - if (scrProxy->errApi != NULL) { - (void) scrProxy->errApi(ctx, KBrsrScrproxyScrNotResponding, NULL, NULL); - } - } - return KBrsrSuccess; -} - - -/***************************************************************** - - Name: NW_ScrProxy_nokia_locationInfo() - - Description: see [WAP-170] - - Parameters: scrProxy - pointer to the script proxy - - Return Value: - KBrsrSuccess - KBrsrScrproxyScrAbort -******************************************************************/ - -TBrowserStatusCode NW_ScrProxy_nokia_locationInfo(NW_ScrProxy_t *scrProxy, - NW_Ucs2 *url, - NW_Ucs2 *ll_format, - NW_Ucs2 *pn_format) -{ -//#pragma message ("TODO:: wml_scr_proxy.c, fix NW_ScrProxy_nokia_locationInfo") - NW_REQUIRED_PARAM(scrProxy); - NW_REQUIRED_PARAM(url); - NW_REQUIRED_PARAM(ll_format); - NW_REQUIRED_PARAM(pn_format); - -#if 0 - TBrowserStatusCode status = KBrsrSuccess; - NW_WtaiApi_t wtaiApi; - void *ctx; - NW_Http_Header_t *header = NULL; - - if (scrProxy == NULL) { - return KBrsrBadInputParam; - } - - /* If no API in proxy, get the API from the service factory */ - if ( scrProxy->wtaiApi == NULL ) - { - wtaiApi = NW_PlatformServicesFactory_GetScrWtaiService(); - } - /* If only the method is null, get the API from the service factory */ - else if (scrProxy->wtaiApi->nokia_locationInfo == NULL ) - { - wtaiApi = NW_PlatformServicesFactory_GetScrWtaiService(); - } - else - { - wtaiApi = *(scrProxy->wtaiApi); - } - - if (scrProxy->state == SCR_STATE_RUNNING) - { - ctx = ScrProxy_GetUserAgent(scrProxy); - - if (wtaiApi.nokia_locationInfo != NULL) - { - header = NW_Http_Header_New(NULL, 0, NW_TRUE, NW_TRUE /* use POST */); - if (header == NULL) - { - return KBrsrOutOfMemory; - } - - status = (wtaiApi.nokia_locationInfo)(ctx, url, - ll_format, pn_format, - header); - if (status != KBrsrSuccess) - { - UrlLoader_HeadersFree(header); - return status; - } - - status = scrProxy->scrBrowserApi->go(scrProxy->ctx, url, NULL, header); - /* go() makes copies of url & header. we own header so free it here */ - UrlLoader_HeadersFree(header); - if (status != KBrsrSuccess) - { - return status; - } - } - } - else - { - status = KBrsrScrproxyScrAbort; - } - return status; -#endif - return KBrsrFailure; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_select_ui_state.c --- a/webengine/wmlengine/src/wml/src/wml_select_ui_state.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,614 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_select_ui_state.c $ - - Purpose: - - Class: WmlBrowser - - Main browser's select ui state logic -*/ - -#include "wml_api.h" -#include "wml_task.h" -#include "wml_elm_attr.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/*lint -save -e571 Suspicious cast*/ - -static TBrowserStatusCode SetSelectUIState(NW_Wml_t *thisObj, NW_Wml_Element_t* el); - -static TBrowserStatusCode SetOptStateToFirstItem(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el); - -static TBrowserStatusCode SetOptStatesUsingIName(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* iname_var_value, NW_Wml_Select_Type_e type); - -static TBrowserStatusCode SetOptStatesUsingName(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* name_var_value, NW_Wml_Select_Type_e type); - -static TBrowserStatusCode MatchOptionIndex(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Int32 option_count_to_match, NW_Wml_Element_t **ret_el); - -static TBrowserStatusCode MatchOptionValueUsingElArray(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* name, NW_Wml_Element_t **ret_el); - - -/* - * sets the UI state for each select element in a card using - * the select elements NAME and/or INAME variables - * - * RETURN KBrsrSuccess - * KBrsrFailure - propagated from NW_DeckDecoder_GetType - * - the card has no elements - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_SetCardUIState(NW_Wml_t* thisObj) -{ - NW_Int32 i = 0; - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - - if (!thisObj->card_els[0]) return KBrsrFailure; - - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - if (el_type == SELECT_ELEMENT) { - if ((status = SetSelectUIState(thisObj, el)) != KBrsrSuccess) - return status; - } - - } while (thisObj->card_els[++i]); - - return KBrsrSuccess; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetSelectUIState(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Ucs2 - *name = 0, /* NAME attribute */ - *value = 0, /* VALUE attribute */ - *iname = 0, /* INAME attribute */ - *ivalue = 0, /* IVALUE attribute */ - *iname_value = 0, /* value of the iname attribute's variable */ - *name_value = 0; /* value of the name attribute'svariable */ - NW_Wml_Select_Type_e type = SINGLE_SELECT; - - /* - * get INAME variable name and value - */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, INAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &iname)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (iname) - { - if ((status = NW_Wml_GetVar(thisObj, iname, &iname_value)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - } - - /* - * get NAME variable name and value - */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &name)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (name) - { - if ((status = NW_Wml_GetVar(thisObj, name, &name_value)) - == KBrsrOutOfMemory) - NW_THROW_ERROR(); - } - - /* - * get select type: single or multiple - */ - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, select_el, MULTIPLE_ATTR, - WAE_ASC_TRUE_STR, thisObj->var_list)) - type = MULTIPLE_SELECT; - - /* process all possible cases in precedence order */ - - - /* - * if iname variable exists, parse it and - * update UI select/option state - */ - if (iname) - { - status = SetOptStatesUsingIName(thisObj, select_el, iname_value, type); - } - - /* - * else if name variable exists, parse it - * and update UI select/option state - */ - else if (name) - { - status = SetOptStatesUsingName(thisObj, select_el, name_value, type); - } - /* - * else if IVALUE is defined (but no name or iname), use it - */ - else if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, IVALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &ivalue)) != KBrsrFailure) - { - if (status == KBrsrSuccess) - status = SetOptStatesUsingIName(thisObj, select_el, ivalue, type); - } - - /* - * else if VALUE is defined (but no name or iname), use it - */ - else if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, select_el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &value)) != KBrsrFailure) - { - if (status == KBrsrSuccess) - status = SetOptStatesUsingName(thisObj, select_el, value, type); - } - - /* - * else if multi-select is defined, then no options are pre-selected - */ - else if (type == MULTIPLE_SELECT) - { - status = NW_WmlInput_InitOptionValues(thisObj, select_el); - } - - /* - * else if single-select is defined, then choose first option - */ - else - { - status = SetOptStateToFirstItem(thisObj, select_el); - } - - if (status != KBrsrOutOfMemory) - status = KBrsrSuccess; - - /* fall through */ - -NW_CATCH_ERROR - NW_Str_Delete(name); - NW_Str_Delete(value); - NW_Str_Delete(iname); - NW_Str_Delete(ivalue); - NW_Str_Delete(iname_value); - NW_Str_Delete(name_value); - - return status; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetOptStateToFirstItem(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el) -{ - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - - /* loop thru card elements starting at select_el */ - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(el->id), NW_TRUE)) != KBrsrSuccess) - return status; - keep_looping = NW_FALSE; - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - * */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetOptStatesUsingIName(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* iname_var_value, NW_Wml_Select_Type_e type) -{ - NW_Wml_Element_t* matched_option_el = 0; - TBrowserStatusCode status; - NW_Ucs2* start = iname_var_value, *delimiter_position = 0; - - /* initialize all options to NW_FALSE */ - if ((status = NW_WmlInput_InitOptionValues(thisObj, select_el)) - != KBrsrSuccess) - return status; - - if (iname_var_value == NULL) { - return KBrsrSuccess; - } - - /* handle the delimiter seperated values in the iname value list */ - while (type == MULTIPLE_SELECT && - ((delimiter_position = NW_Str_Strchr(start, ';')) != NULL)) - { - *delimiter_position = 0; - matched_option_el = 0; - - if ((status = MatchOptionIndex(thisObj, select_el, NW_Str_Atoi(start), - &matched_option_el)) != KBrsrSuccess) - return status; - - if (matched_option_el) - { - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(matched_option_el->id), NW_TRUE)) != KBrsrSuccess) - return status; - } - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* handle the last value in the iname value list */ - matched_option_el = 0; - - if ((status = MatchOptionIndex(thisObj, select_el, NW_Str_Atoi(start), - &matched_option_el)) != KBrsrSuccess) - return status; - - /* Reset status */ - status = KBrsrSuccess; - - if (matched_option_el) - { - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(matched_option_el->id), NW_TRUE)) != KBrsrSuccess) - return status; - } - else if (type == SINGLE_SELECT) - status = SetOptStateToFirstItem(thisObj, select_el); - - return status; -} - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode SetOptStatesUsingName(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* name_var_value, NW_Wml_Select_Type_e type) -{ - NW_Wml_Element_t* matched_option_el = 0; - TBrowserStatusCode status; - NW_Ucs2* start = name_var_value, *delimiter_position = 0; - - /* initialize all options to NW_FALSE */ - if ((status = NW_WmlInput_InitOptionValues(thisObj, select_el)) - != KBrsrSuccess) - return status; - - if (name_var_value == NULL) { - return KBrsrSuccess; - } - - /* handle the delimiter seperated values in the name value list */ - while (type == MULTIPLE_SELECT && - ((delimiter_position = NW_Str_Strchr(start, ';')) != NULL)) - { - *delimiter_position = 0; - matched_option_el = 0; - - if ((status = MatchOptionValueUsingElArray(thisObj, select_el, - start, &matched_option_el)) != KBrsrSuccess) - return status; - - if (matched_option_el) - { - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(matched_option_el->id), NW_TRUE)) != KBrsrSuccess) - return status; - } - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - /* handle the last value in the name value list */ - matched_option_el = 0; - - if ((status = MatchOptionValueUsingElArray(thisObj, select_el, - start, &matched_option_el)) != KBrsrSuccess) - return status; - - /* Reset status */ - status = KBrsrSuccess; - - if (matched_option_el) - { - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(matched_option_el->id), NW_TRUE)) != KBrsrSuccess) - return status; - } - else if (type == SINGLE_SELECT) - status = SetOptStateToFirstItem(thisObj, select_el); - - return status; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode MatchOptionIndex(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Int32 option_count_to_match, NW_Wml_Element_t **ret_el) -{ - NW_Int32 option_count = 0, i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t *el = 0; - - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - if (++option_count == option_count_to_match) - { - *ret_el = el; - keep_looping = NW_FALSE; - } - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlInput_InitOptionValues(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el) -{ - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - - /* loop thru card elements starting at first element after select_el */ - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - if(!el) - return KBrsrWmlbrowserBadContent; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - if ((status = (DISPLAY_API->setOptState)(thisObj->browser_app, - NW_UINT16_CAST(el->id), NW_FALSE)) != KBrsrSuccess) - return status; - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - - -/* - * RETURN KBrsrSuccess - * KBrsrOutOfMemory - */ -static TBrowserStatusCode MatchOptionValueUsingElArray(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* name, NW_Wml_Element_t **ret_el) -{ - NW_Int32 i = NW_Wml_FindEl(thisObj, NW_UINT16_CAST(select_el->id)) + 1; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t *el = 0; - TBrowserStatusCode status; - NW_Ucs2 *option_value = 0; - - do - { - NW_Wml_ElType_e el_type; - - el = thisObj->card_els[i]; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - - /* get OPTION element value */ - option_value = NULL; - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) - == KBrsrOutOfMemory) - return status; - - if (option_value && !NW_Str_Strcmp(name, option_value)) - { - *ret_el = el; - keep_looping = NW_FALSE; - } - - NW_Str_Delete(option_value); - break; - - case STRING_ELEMENT: - case OPTGRP_ELEMENT: - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } while (keep_looping && thisObj->card_els[++i]); - - return KBrsrSuccess; -} - -/*lint -restore*/ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_select_validation.c --- a/webengine/wmlengine/src/wml/src/wml_select_validation.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,784 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_select_validation.c $ - - Purpose: - - Class: WmlBrowser - - Main browser's select variable validation logic -*/ - -#include "wml_task.h" - -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "wml_elm_attr.h" -#include "BrsrStatusCodes.h" - - -#define WML_SELECT_HIGH_RANGE_CHK_OPT_1 1 -#define WML_SELECT_HIGH_RANGE_CHK_OPT_2 0 - - -static TBrowserStatusCode GetNumberSelectOptions(NW_Wml_t *thisObj, NW_Wml_Element_t* select_el, NW_Int32 *ret_int); - -static TBrowserStatusCode MatchOptionValueUsingBytecode(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* key); - -static TBrowserStatusCode GetCorrectedNameValueLength(NW_Wml_t* thisObj, NW_Wml_Element_t* select_el, NW_Ucs2* key_var_value, NW_Wml_List_t* default_option_values, NW_Wml_Select_Type_e type, NW_Int32 *ret_int); - -static NW_Ucs2* GetCorrectedNameValue(NW_Ucs2* corrected_value, NW_Wml_List_t* default_option_values); - -static NW_Bool SelectValidationDupCheck(NW_Ucs2*, NW_Wml_List_t*); - - -/* - * RETURN KBrsrSuccess - * KBrsrFailure - NON-fatal - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlSelect_ValidateIName_Value( - NW_Wml_t *thisObj, - NW_Wml_Element_t *select_el, - NW_Ucs2 *ikey_var_value, - NW_Wml_Select_Type_e type, - NW_Mem_Segment_Id_t mem_scope, - NW_Ucs2 **ret_string) -{ - NW_Int32 option_item; - NW_Uint32 size = 0; - NW_Ucs2 *start = ikey_var_value; - NW_Ucs2 *end = 0; - NW_Ucs2 *endstr = 0; - NW_Ucs2 *delimiter_position = 0; - NW_Ucs2 *validated_option_value = 0; - NW_Ucs2 *ucs2_temp = 0; - NW_Int32 max_option_items =0; - NW_Wml_List_t *default_option_index; - TBrowserStatusCode status; - NW_Bool corrections_made = NW_FALSE; - NW_Bool last_option_item = NW_FALSE; - - default_option_index = NW_WmlList_NewEmptyList(NW_Wml_GetCardSegment(thisObj)); - - if (!default_option_index) - { - return KBrsrOutOfMemory; - } - - if ((status = GetNumberSelectOptions(thisObj, select_el, &max_option_items)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (!max_option_items) { - max_option_items = 1; - } - - /* 2 pass algorithm. First pass checks for integers, out of bounds values, - and dup values while calculating the size of a new, corrected ikey value. - The second pass builds the new corrected ikey value. If no corrections - are necessary, only 1 pass is processed. - */ - do - { - if (!start) { - break; - } - - delimiter_position = NW_Str_Strchr(start, ';'); - if (type == MULTIPLE_SELECT && (delimiter_position != NULL)) - *delimiter_position = 0; - - - /* skip over non-integer indicies */ - endstr = start + NW_Str_Strlen(start); - option_item = NW_Str_Strtol(start, &end, 10); - if (end != endstr) - { - corrections_made = NW_TRUE; - } - - /* low range check - remove values less than one */ - else if (option_item < 1) - { - corrections_made = NW_TRUE; - } - - /* high range check - if value is past upper bound - 1.1 spec is contradictory - either 1) it should be removed (pg 38, middle validate() behavior) or - 2) it should set the last entry (pg 39, in next to - last bullet "If the iname attribute exists.." - this implements option (2) for now - */ -#if WML_SELECT_HIGH_RANGE_CHK_OPT_1 - /* implements option 1 */ - else if (option_item > max_option_items) - { - corrections_made = NW_TRUE; - } -#endif - -#if WML_SELECT_HIGH_RANGE_CHK_OPT_2 - /* implements option 2 */ - else if (option_item > max_option_items) - { - ucs2_temp = NW_Str_SegNew(16, NW_MEM_SEGMENT_MANUAL); - - NW_Str_Itoa(max_option_items, ucs2_temp); - - /* verify this isnt a duplicate */ - if (SelectValidationDupCheck(ucs2_temp, default_option_index)) - { - corrections_made = NW_TRUE; - } - - /* - * Add item str and semicolon, null terminator comes from - * WAE_INAME_DELIMITER_STR - */ - else - { - size += NW_Str_Strlen(ucs2_temp); - size += last_option_item ? 0 : WAE_ASC_STRLEN(WAE_ASC_SEMICOLON_STR); - if ((status = NW_WmlList_Append(default_option_index, (void*) ucs2_temp)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - ucs2_temp = NULL; - } - } -#endif - - /* "normal" option item */ - else - { - /* verify this is not a duplicate */ - if (SelectValidationDupCheck(start, default_option_index)) - { - corrections_made = NW_TRUE; - } - - /* add item str and semicolon, remove extra null terminator from calc */ - else - { - size += NW_Str_Strlen(start); - size += last_option_item ? 0 : WAE_ASC_STRLEN(WAE_ASC_SEMICOLON_STR); - - ucs2_temp = NW_Str_SegNewcpy(start, NW_Wml_GetCardSegment(thisObj)); - if (!ucs2_temp) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - if ((status = NW_WmlList_Append(default_option_index, (void*) ucs2_temp)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - ucs2_temp = NULL; - } - } - - /* - * if not the last option item, reset the delimiter and move the - * start pointer - */ - if (delimiter_position) - { - *delimiter_position = ';'; - start = delimiter_position + 1; - } - - } while (delimiter_position); - - /* - * if default_option_index is empty, then set ikey var to the new - * default value. This depends on whether the select element is - * SINGLE or MULTIPLE selection - */ - if (!NW_WmlList_Length(default_option_index)) - { - /* - * empty default_option_index and multi selection results in - * setting the default option index to 0 - * - * note that 0 is a valid value for setting the name or iname - * variable value, but it is ignored when seelecting options - */ - if (NW_DeckDecoder_HasAttributeWithValue (thisObj->decoder, select_el, MULTIPLE_ATTR, - WAE_ASC_TRUE_STR, thisObj->var_list)) - { - NW_Ucs2 temp_str[16]; - - (void)NW_Str_StrcpyConst(temp_str, WAE_ASC_0_STR); - if ((status = NW_WmlList_Append(default_option_index, temp_str)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - size = WAE_ASC_STRLEN(WAE_ASC_0_STR); - } - - /* - * empty default_option_index and single selection results in - * setting the default option index to 1 - */ - else - { - NW_Ucs2 temp_str[16]; - - (void)NW_Str_StrcpyConst(temp_str, WAE_ASC_1_STR); - if ((status = NW_WmlList_Append(default_option_index, temp_str)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - size = WAE_ASC_STRLEN(WAE_ASC_1_STR); - } - - corrections_made = NW_TRUE; - } - - if (!corrections_made) - { - NW_Str_Delete(ucs2_temp); - *ret_string = ikey_var_value; - return KBrsrSuccess; - } - - /* allocated memory for corrected value - include 1 for null terminator */ - *ret_string = NW_Str_SegNew(size, mem_scope); - if (*ret_string == 0) - { - status = KBrsrOutOfMemory; - NW_THROW_ERROR(); - } - - (void)NW_Mem_memset(*ret_string, '\0', (size + 1) * sizeof(NW_Ucs2)); - - /* - * now process through validated default_option_index list and - * build corrected value - */ - validated_option_value = (NW_Ucs2*) NW_WmlList_First(default_option_index); - if (validated_option_value != NULL) - { - do - { - (void)NW_Str_Strcat(*ret_string, validated_option_value); - - /* add delimiter if not last item in list*/ - if (!NW_WmlList_IsLast(default_option_index)) - (void)NW_Str_StrcatConst(*ret_string, WAE_ASC_SEMICOLON_STR); - validated_option_value = (NW_Ucs2*) NW_WmlList_Next(default_option_index); - } while (validated_option_value != NULL); - } - - status = KBrsrSuccess; - /* fall through */ - -NW_CATCH_ERROR - NW_Str_Delete(ucs2_temp); - - return status; -} - - -/* - * verifies that each option item inside the key value is matched to - * an option's value in the select element. This func will return the - * first option value if any un-matched values are contained in the - * key_var_value - * - * - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlSelect_ValidateName_Value(NW_Wml_t* thisObj, - NW_Wml_Element_t* select_el, - NW_Ucs2* key_var_value, - NW_Wml_Select_Type_e type, - NW_Mem_Segment_Id_t mem_scope, - NW_Ucs2 **ret_string) -{ - NW_Int32 corrected_value_len = 0; - TBrowserStatusCode status; - NW_Wml_List_t *default_option_values = NW_WmlList_NewEmptyList(NW_Wml_GetCardSegment(thisObj)); - - if (!default_option_values) - { - return KBrsrOutOfMemory; - } - - /* - * first, check if any corrections are needed and, if so, - * the corrected value length - */ - if ((status = GetCorrectedNameValueLength(thisObj, select_el, key_var_value, default_option_values, - type, &corrected_value_len)) == KBrsrOutOfMemory) - return status; - - if (!corrected_value_len) - { - *ret_string = NULL; - return KBrsrSuccess; - } - - *ret_string = NW_Str_SegNew(NW_UINT32_CAST(corrected_value_len), mem_scope); - if (*ret_string == 0) - { - return KBrsrOutOfMemory; - } - - (void) GetCorrectedNameValue(*ret_string, default_option_values); - - return KBrsrSuccess; -} - - -/* - * return the value from the first option found given a select element - * - * RETURN KBrsrSuccess - * KBrsrFailure - NON-fatal - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlSelect_GetFirstOptionValue(NW_Wml_t* thisObj, - NW_Wml_Element_t* select_el, - NW_Mem_Segment_Id_t mem_scope, - NW_Ucs2 **ret_string) -{ - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t el; - NW_DeckDecoderIter_t iter; - TBrowserStatusCode status; - - *ret_string = 0; - - /* loop thru card elements starting at first element after select_el */ - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, select_el) != KBrsrSuccess) - return KBrsrFailure; - - while ((keep_looping == NW_TRUE) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - - /* get OPTION element value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, VALUE_ATTR, - thisObj->var_list, mem_scope, ret_string)) - == KBrsrOutOfMemory) - return status; - - if (*ret_string == 0) - break; - - keep_looping = NW_FALSE; - break; - - case STRING_ELEMENT: - break; - - case OPTGRP_ELEMENT: /* recursion: optgroup ::= (optgroup|option)+ */ - status = NW_WmlSelect_GetFirstOptionValue(thisObj,&el,mem_scope,ret_string); - if (status == KBrsrOutOfMemory) - return status; - - keep_looping = NW_FALSE; - break; - - /* - * option element may contain emphasis, tab, or break elements - * - skip over - */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* Skip an unknown element */ - case UNKNOWN_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - default: - keep_looping = NW_FALSE; - break; - } - - } - - return KBrsrSuccess; -} - - -static NW_Bool SelectValidationDupCheck(NW_Ucs2* value_to_validate, - NW_Wml_List_t* default_option_index) -{ - NW_Bool dup_found = NW_FALSE; - NW_Ucs2* validated_option_value = 0; - - /* handle a null value_to_validate */ - if (!value_to_validate) - return dup_found; - - /* - * now process through validated default_option_index list and - * build corrected value - */ - validated_option_value = (NW_Ucs2*) NW_WmlList_First(default_option_index); - if (validated_option_value != NULL) - { - do - { - if (!NW_Str_Strcmp(value_to_validate, validated_option_value)) - dup_found = NW_TRUE; - validated_option_value = (NW_Ucs2*) NW_WmlList_Next(default_option_index); - } while (!dup_found && (validated_option_value != NULL)); - } - - return dup_found; -} - - -/* - * RECURSIVE - * - * RETURN KBrsrSuccess - * KBrsrFailure - NON-fatal - * - element not supported - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetNumberSelectOptions(NW_Wml_t *thisObj, - NW_Wml_Element_t* select_el, - NW_Int32 *ret_int) -{ - NW_Int32 option_count = 0; - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t el; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - /* loop thru card elements starting at first element after select_el */ - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, select_el) != KBrsrSuccess) - return KBrsrFailure; - - /* loop thru card elements starting at select_el */ - while ((keep_looping == NW_TRUE) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - option_count++; - break; - - case OPTGRP_ELEMENT: - if ((status = GetNumberSelectOptions(thisObj, &el, ret_int)) - != KBrsrSuccess) { - return status; - } - option_count += *ret_int; - break; - - /* - * option element may contain strings, emphasis, tab, or - * break elements - skip over - */ - case STRING_ELEMENT: - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* Skip an unknown element */ - case UNKNOWN_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - case END_ELEMENT: - keep_looping = NW_FALSE; - break; - - /* bad bytecode, raise exception */ - default: - return KBrsrFailure; - } - - } - - *ret_int = option_count; - - return KBrsrSuccess; -} - -/* - * RETURN KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetCorrectedNameValueLength(NW_Wml_t* thisObj, - NW_Wml_Element_t* select_el, - NW_Ucs2* key_var_value, - NW_Wml_List_t* default_option_values, - NW_Wml_Select_Type_e type, - NW_Int32 *ret_length) -{ - NW_Ucs2 *start = key_var_value; - NW_Ucs2 *delimiter_position = 0, *ucs2_temp = 0; - NW_Int32 corrected_value_len = 0; - TBrowserStatusCode status; - - *ret_length = 0; - - if (!start) - { - /* cases where there is no value to check */ - return KBrsrSuccess; - } - - /* handle the delimiter separated values */ - do - { - if (start[0] == 0)/* check for null terminator */ - break; - - if (type == MULTIPLE_SELECT && - ((delimiter_position = NW_Str_Strchr(start, ';')) != NULL)) - *delimiter_position = 0; - - /* - * check for a match with an option value and, if so, whether - * its not a duplicate - * - */ - if ((status = MatchOptionValueUsingBytecode(thisObj, select_el,start)) - == KBrsrOutOfMemory) - return status; - - if (status == KBrsrSuccess && - !SelectValidationDupCheck(start, default_option_values)) - { - /* set new length */ - if (!corrected_value_len) - corrected_value_len += NW_Str_Strlen(start); - else - /* add 1 for the preceeding semicolon */ - corrected_value_len += (NW_Str_Strlen(start) + 1); - - /* add to default option values list */ - ucs2_temp = NW_Str_SegNewcpy(start, default_option_values->memSegment); - if (!ucs2_temp) - return KBrsrOutOfMemory; - - status = NW_WmlList_Append(default_option_values, (void*) ucs2_temp); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(ucs2_temp); - return status; - } - } - - if (delimiter_position) - { - *delimiter_position = ';'; - start = delimiter_position + 1; - } - } while (delimiter_position); - - *ret_length = corrected_value_len; - - return KBrsrSuccess; -} - - -static NW_Ucs2* GetCorrectedNameValue(NW_Ucs2* corrected_value, - NW_Wml_List_t* default_option_values) -{ - NW_Ucs2* validated_option_value = 0; - - /* initialize the corrected_value */ - (void)NW_Str_StrcpyConst(corrected_value, WAE_ASC_EMPTY_STR); - - /* - * use default_option_values for implementation - * - * now process through validated default_option_index list - * and build corrected value - */ - validated_option_value = (NW_Ucs2*) NW_WmlList_First(default_option_values); - if (validated_option_value != NULL) - { - do - { - (void)NW_Str_Strcat(corrected_value, validated_option_value); - - /* add delimiter if not last item in list*/ - if (!NW_WmlList_IsLast(default_option_values)) - (void)NW_Str_StrcatConst(corrected_value, WAE_ASC_SEMICOLON_STR); - validated_option_value = (NW_Ucs2*) NW_WmlList_Next(default_option_values); - } while (validated_option_value != NULL); - } - - return corrected_value; -} - - -/* - * RECURSIVE - * - * RETURN KBrsrSuccess - * KBrsrFailure - NO match found - * - unexpected element - * KBrsrOutOfMemory - */ -static TBrowserStatusCode MatchOptionValueUsingBytecode(NW_Wml_t* thisObj, - NW_Wml_Element_t* container_el, - NW_Ucs2* key) -{ - NW_Bool keep_looping = NW_TRUE; - NW_Wml_Element_t el; - TBrowserStatusCode status; - NW_Ucs2 *option_value = NULL; - NW_Bool match_found = NW_FALSE; - NW_DeckDecoderIter_t iter; - - /* - * loop thru card elements starting at first element after - * container_el. (container is either a select or an - * option group element) - */ - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container_el) != KBrsrSuccess) - { - return KBrsrFailure; - } - - while ((keep_looping == NW_TRUE) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - switch (el_type) - { - case OPTION_ELEMENT: - - /* get OPTION element value */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, - &el, VALUE_ATTR, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &option_value)) - == KBrsrOutOfMemory) - return status; - - if (!option_value) - break; - - if (!NW_Str_Strcmp(key, option_value)) - { - match_found = NW_TRUE; - keep_looping = NW_FALSE; - } - - NW_Str_Delete(option_value); - option_value = NULL; - break; - - case OPTGRP_ELEMENT: - if ((status = MatchOptionValueUsingBytecode(thisObj, &el, key)) - == KBrsrOutOfMemory) - return status; - if (status == KBrsrSuccess) - { - match_found = NW_TRUE; - keep_looping = NW_FALSE; - } - break; - - /* - * option element may contain strings, emphasis, tab, or - * break elements - skip over - */ - case STRING_ELEMENT: - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - break; - - /* Skip an unknown element */ - case UNKNOWN_ELEMENT: - break; - - /* - * image, A, and break elems can be contained inside a select - * via %flow contained within an emph elem - */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case IMAGE_ELEMENT: - case BREAK_ELEMENT: - break; - - case END_ELEMENT: - keep_looping = NW_FALSE; - break; - - /* unexpected element - present error dialog */ - default: - return KBrsrFailure; - } - - } - - if (match_found) return KBrsrSuccess; else return KBrsrFailure; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_timer.c --- a/webengine/wmlengine/src/wml/src/wml_timer.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,346 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_timer.c $ - - Purpose: - - Class: WmlBrowser - - Handles timer element processing logic -*/ - -#include "wml_task.h" -#include "wml_api.h" -#include "wml_elm_attr.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* -* HandleTimer if destination card contains a TIMER element, start the timer -* -* RETURN KBrsrSuccess -* KBrsrFailure - propagates CB_SetTimerKey return values -* KBrsrOutOfMemory -*/ -TBrowserStatusCode NW_Wml_HandleTimer(NW_Wml_t* thisObj) -{ - TBrowserStatusCode status; - NW_Uint32 timeout_period = 0; - NW_Bool running; - NW_ASSERT(TIMER_API != NULL); - - /* done with timer processing */ - NW_Wml_SetTimerProcessing(thisObj, NW_TRUE); - - /* kill the timers if any */ - status = (TIMER_API->isRunning)(thisObj->browser_app, &running); - if (status == KBrsrSuccess && running == NW_TRUE) { - - if ((status = (TIMER_API->stop)(thisObj->browser_app)) != KBrsrSuccess) - return status; - - if ((status = (TIMER_API->destroy)(thisObj->browser_app)) != KBrsrSuccess) - return status; - } - - if ((status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_USE_DEFAULT, &timeout_period)) != KBrsrSuccess) - return status; - - /* - * create and initialize a timer with timeout period. timeout_period - * must be in tenths of seconds - */ - if (timeout_period && thisObj->hasFocus) - { - if ((status = (TIMER_API->create)(thisObj->browser_app, timeout_period)) != KBrsrSuccess) - return status;/* stop processing */ - } - else if (timeout_period) - { - /* - ** when we regain focus, we look at this field to determine what timeout - ** to use for restarting timers. since this timer was never created, - ** timer_time is equal to the original timeout_period. - */ - thisObj->script_state.timer_time = timeout_period; - } - - return KBrsrSuccess; -} - -/* - * - * Changed to allocate in MEM_FUNK instead of MEM_CARD. MEM_CARD - * could get filled on lots of OnEnterForwards. jwild 06/21/2000. - * - * RETURN KBrsrSuccess - * KBrsrFailure - no card - * - timer value is not a valid integer - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_SetTimerKey(NW_Wml_t* thisObj, NW_Wml_TimerBehavior_t behavior, NW_Uint32 *ret_time) -{ - NW_Wml_Element_t el, card_el; - TBrowserStatusCode status = KBrsrSuccess; - NW_Int32 timeout_period_int = 0; - NW_Bool timer_found = NW_FALSE; - NW_DeckDecoderIter_t iter; - - *ret_time = 0; - - if (thisObj->decoder == NULL || !NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - { - return KBrsrFailure; - } - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, &card_el) != KBrsrSuccess) - { - return KBrsrFailure; - } - - /* allow only one TIMER element per card */ - while ((timer_found == NW_FALSE) && NW_DeckDecoderIter_GetNextElement(&iter, &el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, &el, &el_type); - - /* search for TIMER element in current card. Start a timer if found */ - if (el_type == TIMER_ELEMENT) - { - NW_Ucs2 *key_var_name = NULL, *timeout_period = NULL; - NW_Ucs2 *endptr = 0, *endstr = 0; - timer_found = NW_TRUE; - - /* get NAME variable name */ - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &key_var_name); - - if (status == KBrsrOutOfMemory) - { - return status; - } - - switch (behavior) - { - case WAE_TIMER_USE_DEFAULT: - if (key_var_name) - { - if ((status = NW_Wml_GetVar(thisObj, key_var_name, &timeout_period)) - == KBrsrOutOfMemory) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status; - } - } - - if (timeout_period) - { - /* make sure timeout_period is a positive - * integer, with no extraneous characters - */ - endstr = timeout_period + NW_Str_Strlen(timeout_period); - timeout_period_int = NW_Str_Strtol(timeout_period, &endptr, 10); - if (endptr != endstr || timeout_period_int < 1) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return KBrsrFailure; - } - } - - /* if KEY variable doesn't exist in context, - * populate it with the TIMER element's DEFAULT - * value (if DEFAULT attr exists) - */ - if (!timeout_period || !NW_Str_StrcmpConst(timeout_period, WAE_ASC_EMPTY_STR)) - { - NW_Str_Delete(timeout_period); - timeout_period = NULL; - - status = NW_DeckDecoder_GetAttribute(thisObj->decoder, &el, VALUE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &timeout_period); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status; - } - - if (timeout_period) - { - /* make sure timeout_period is a positive - * integer, with no extraneous characters, - * handle null timeout_period - */ - endstr = timeout_period + NW_Str_Strlen(timeout_period); - timeout_period_int = NW_Str_Strtol(timeout_period, &endptr, 10); - if (endptr != endstr || timeout_period_int < 1) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return KBrsrFailure; - } - - if (key_var_name) - { - status = NW_Wml_SetVar(thisObj, key_var_name, timeout_period); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status; - } - } - } - } - if (timeout_period_int < 1) - timeout_period_int = 0; - break; - - case WAE_TIMER_TIMEOUT: - if (key_var_name) - { - NW_Ucs2 temp_str[16]; - - (void)NW_Str_StrcpyConst(temp_str, WAE_ASC_0_STR); - status = NW_Wml_SetVar(thisObj, key_var_name, temp_str); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status; - } - } - break; - - case WAE_TIMER_FROM_TIMER: - { - NW_Ucs2 temp[16]; - NW_Uint32 time_remaining; - /* get the remaining time in the timer */ - status = (TIMER_API->read)(thisObj->browser_app, &time_remaining); - if (status != KBrsrSuccess) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status;/* stop processing */ - } - - timeout_period_int = time_remaining; - - if (key_var_name) - { - (void)NW_Str_Itoa(time_remaining, temp); - status = NW_Wml_SetVar(thisObj, key_var_name, temp); - if (status == KBrsrOutOfMemory) - { - NW_Str_Delete(key_var_name); - NW_Str_Delete(timeout_period); - return status; - } - } - break; - } - } /* end behavior switch */ - - NW_Str_Delete(key_var_name); - key_var_name = NULL; - NW_Str_Delete(timeout_period); - timeout_period = NULL; - } - - } - - *ret_time = timeout_period_int; - return KBrsrSuccess; -} - -/* -* RETURN KBrsrSuccess -* KBrsrFailure - propagates CB_SetTimerKey return values -* KBrsrOutOfMemory -* KBrsrBadInputParam - bad input parameter -*/ -TBrowserStatusCode NW_Wml_Timeout(void* obj) -{ - TBrowserStatusCode status; - NW_Uint32 dummy = 0; - NW_Wml_t *thisObj = (NW_Wml_t *)obj; - NW_WaeUsrAgent_t *browser; - - if (thisObj == NULL) - return KBrsrBadInputParam; - - /* initialize TIMER element KEY variable's value */ - if ((status = NW_Wml_SetTimerKey(thisObj, WAE_TIMER_TIMEOUT, &dummy)) == - KBrsrOutOfMemory) - return status; - - /* destroy the timer */ - if ((status = (TIMER_API->destroy)(thisObj->browser_app)) != KBrsrSuccess) - return status;/* stop processing */ - - - /* process ONTIMER intrinsic events */ - if ((status = NW_Wml_HandleIntrinsicEvents(thisObj, ONTIMER)) != KBrsrSuccess) - { - if (status == KBrsrHedContentDispatched) - { - return KBrsrSuccess; - } - if (status == KBrsrFailure && thisObj->curr_task == NOOP_TASK) /* NOOP task is not an error - reset it */ - { - status = KBrsrSuccess; - } - else - { - browser = (NW_WaeUsrAgent_t*)NW_Ctx_Get(NW_CTX_WML_CORE, 0); - if(browser) - { - (void) browser->errorApi->notifyError(browser, status, NULL, NULL); - } - } - } - return status; -} - -/* -* Set the timer processing flag for the current card. -*/ -void NW_Wml_SetTimerProcessing(NW_Wml_t* thisObj, NW_Bool timerProcessing) -{ - NW_ASSERT(thisObj != NULL); - thisObj->script_state.timerProcessing = timerProcessing; -} - -/* -* This function returns NW_TRUE if the timer processing (start timers...) has -* completed for the current card. NW_FALSE means that the timer element has not been -* processed. -*/ -NW_Bool NW_Wml_IsTimerProcessingComplete(NW_Wml_t* thisObj) -{ - NW_ASSERT(thisObj != NULL); - return thisObj->script_state.timerProcessing; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_ui.c --- a/webengine/wmlengine/src/wml/src/wml_ui.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,636 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_ui.c $ - - Purpose: - - Class: WmlBrowser - - Browser's UI processing implementation for element rendering - - $Task: wml_ui.c $ - -*/ - -#include "wml_api.h" -#include "wml_list.h" -#include "wml_task.h" -#include "wml_url_utils.h" -#include "wml_elm_attr.h" - -#include "nwx_mem.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "wml_history.h" -#include "BrsrStatusCodes.h" - -static TBrowserStatusCode RenderCardElements(NW_Wml_t* thisObj, NW_Wml_Element_t* container, NW_Wml_List_t* card_el_list); - -static TBrowserStatusCode RenderTemplateElements(NW_Wml_t* thisObj, NW_Wml_List_t* card_el_list); - -static TBrowserStatusCode RenderDoElement(NW_Wml_t* thisObj, NW_Wml_Element_t* do_el, NW_Wml_List_t* card_el_list); - -static TBrowserStatusCode RenderAElement(NW_Wml_t* thisObj, NW_Wml_Element_t* do_el, NW_Wml_List_t* card_el_list); - -static TBrowserStatusCode CleanContext(NW_Wml_t *thisObj); - - -static TBrowserStatusCode CleanContext(NW_Wml_t* thisObj) -{ - NW_Wml_VarList_t *WmlVar_NewList = 0; - NW_Wml_VarList_t *new_param_list = 0; - NW_Mem_Segment_Id_t MEM_CC_SCOPE = NW_Mem_Segment_New(); - - if (!MEM_CC_SCOPE) - return KBrsrOutOfMemory; - - if (thisObj->var_list) - { - WmlVar_NewList = NW_WmlVar_DupList(thisObj->var_list, MEM_CC_SCOPE); - if (WmlVar_NewList == 0) - { - NW_Mem_Segment_Free(MEM_CC_SCOPE); - return KBrsrOutOfMemory; - } - } - - if (thisObj->param_list) - { - new_param_list = NW_WmlVar_DupList(thisObj->param_list, MEM_CC_SCOPE); - if (new_param_list == 0) - { - NW_Mem_Segment_Free(MEM_CC_SCOPE); - return KBrsrOutOfMemory; - } - } - - NW_Mem_Segment_Free(thisObj->mem_segment_general); - - thisObj->mem_segment_general = MEM_CC_SCOPE; - thisObj->var_list = WmlVar_NewList; - thisObj->param_list = new_param_list; - thisObj->card_els = NULL; - - return KBrsrSuccess; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - not a card - * KBrsrOutOfMemory - * NW_STAT_* - propagates other fatal errors - */ -TBrowserStatusCode NW_Wml_DisplayCard(NW_Wml_t* thisObj, NW_Bool cancelRequest) -{ - NW_Uint32 len, i; - NW_Int32 tmplen; - NW_Wml_Element_t card_el; - TBrowserStatusCode status; - NW_Wml_List_t *card_el_list; - - NW_Wml_Element_t* cardElArrayManual; /* Allocated in MEM_MANUAL. */ - NW_Wml_Element_t* cardElArrayCard; /* Allocated in MEM_CARD. */ - NW_Wml_Element_t* cardElPtr; - - /* check for user agent callbacks */ - NW_ASSERT(thisObj != NULL); - NW_ASSERT(DISPLAY_API != NULL); - NW_ASSERT(TIMER_API != NULL); - - thisObj->IntraDeck_OefCounter = 0; /*Reset the counter*/ - thisObj->oefNavigation = NW_FALSE; /* navigations have completed */ - - /* free scratch-pad for processing deck/card/script */ - status = CleanContext(thisObj); - if (status != KBrsrSuccess) - return status; - - NW_Wml_FreeCardSegment(thisObj); - - /* WAVE FIX: In case there is no decoder, just return here... */ - /* This will happen in case the coreBrowser finds an error on the very first deck...(BAD Content) */ - if(thisObj->decoder == NULL) - { - return KBrsrSuccess; - } - - /* initialize */ - thisObj->do_type_prev_id = -1; - thisObj->prev_task_id = -1; - card_el_list = NW_WmlList_NewEmptyList(NW_Wml_GetCardSegment(thisObj)); - if (!card_el_list) - return KBrsrOutOfMemory; - - /* cancel all outstanding request if cancelRequest was passed as NW_TRUE */ - if(cancelRequest) { - status = NW_Wml_CancelAllLoads(thisObj); - } - - /* create the card */ - if ((status = (DISPLAY_API->createCard)(thisObj->browser_app)) - != KBrsrSuccess) - return status;/* stop processing */ - - /* position to card start */ - if (!NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - return KBrsrFailure; - - /* set containter to card start */ - /* render displayable elements */ - status = RenderCardElements(thisObj, &card_el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal condition */ - return status; - - status = RenderTemplateElements(thisObj, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal condition */ - return status; - - /* convert card_el_list to an array */ - tmplen = NW_WmlList_Length(card_el_list); - len = NW_UINT32_CAST(tmplen); - - /* Redo to free the element list after the element array is - is created. Necessary because using too much MEM_CARD for - Wave. jwild 2000.08.23 */ - - /* Allocate on continuous array for elements and copy from list. - Possible to have no elements. */ - cardElArrayManual = NULL; - if (len > 0) - { - cardElArrayManual = (NW_Wml_Element_t*) - NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t) * len, - NW_MEM_SEGMENT_MANUAL); - if (cardElArrayManual == NULL) - return KBrsrOutOfMemory; - } - - cardElPtr = (NW_Wml_Element_t*) NW_WmlList_First(card_el_list); - if(cardElArrayManual != NULL) - { - for(i = 0; (i < len) && cardElPtr ; i++) - { - NW_DeckDecoder_CopyElement(thisObj->decoder, cardElPtr, &cardElArrayManual[i]); - cardElPtr = (NW_Wml_Element_t*) NW_WmlList_Next(card_el_list); - } - } - - /* Now free the element list because all information is in the element array. */ - NW_Wml_FreeCardSegment(thisObj); - - /* Now allocate the element array and array of element array pointers in - MEM_CARD. Copy over. */ - cardElArrayCard = NULL; - if ( len > 0 ) - { - cardElArrayCard = (NW_Wml_Element_t*) - NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t) * len, - NW_Wml_GetCardSegment(thisObj)); - if (cardElArrayCard == NULL) - { - NW_Mem_Free( cardElArrayManual ); - return KBrsrOutOfMemory; - } - } - - thisObj->card_els = (NW_Wml_Element_t **)NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t*) * (len + 1), - NW_Wml_GetCardSegment(thisObj)); - if (thisObj->card_els == NULL) - { - if ( cardElArrayManual != NULL ) - { - NW_Mem_Free( cardElArrayManual ); - } - return KBrsrOutOfMemory; - } - - if(cardElArrayManual != NULL && cardElArrayCard != NULL) - { - for(i = 0; i < len; i++) - { - NW_DeckDecoder_CopyElement(thisObj->decoder, &cardElArrayManual[i], &cardElArrayCard[i]); - thisObj->card_els[i] = &cardElArrayCard[i]; - } - } - thisObj->card_els[len] = NULL; - - /* Now free the MEM_MANUAL element array. */ - if (cardElArrayManual != NULL) - { - NW_Mem_Free( cardElArrayManual ); - } - - status = NW_Wml_SetCardUIState(thisObj); - if (status != KBrsrSuccess && status != KBrsrFailure) - /* FAILURE does not imply a fatal condition */ - return status; - - /* display the card */ - if ((status = (DISPLAY_API->showCard)(thisObj->browser_app)) != KBrsrSuccess) - return status; - - return KBrsrSuccess; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - * KBrsrOutOfMemory - * NW_STAT_* - propagates other fatal errors - */ -static TBrowserStatusCode RenderCardElements(NW_Wml_t* thisObj, - NW_Wml_Element_t* container, - NW_Wml_List_t* card_el_list) -{ - NW_Wml_Element_t *el; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - /* Handle card elements */ - el = (NW_Wml_Element_t*) NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t), NW_Wml_GetCardSegment(thisObj)); - if (!el) - return KBrsrOutOfMemory; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, container) != KBrsrSuccess) - return KBrsrSuccess; - - while (NW_DeckDecoderIter_GetNextElement(&iter, el)) - { - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - switch (el_type) - { - case DO_ELEMENT: - { - status = RenderDoElement(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - break; - } - - case A_ELEMENT: - case ANCHOR_ELEMENT: - { - status = RenderAElement(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - break; - } - - /* simple elements with attributes - add to card_els */ - case INPUT_ELEMENT: - case BREAK_ELEMENT: - case IMAGE_ELEMENT: - case STRING_ELEMENT: - /* send the element to the display */ - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, - el_type, &el->id)) != KBrsrSuccess) - return status; - - if ((status = NW_WmlList_Append(card_el_list, el)) - == KBrsrOutOfMemory) - return status; - break; - - /* recursive elements with attributes - add recursively to card_els */ - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - case SELECT_ELEMENT: - case P_ELEMENT: - case FIELDSET_ELEMENT: - case OPTGRP_ELEMENT: - case TABLE_ELEMENT: - case TR_ELEMENT: - case TD_ELEMENT: - case OPTION_ELEMENT: - case PRE_ELEMENT: - { - NW_Int16 elemId = 0; - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, - el_type, &el->id)) != KBrsrSuccess) - - return status; - - if ((status = NW_WmlList_Append(card_el_list, el)) - == KBrsrOutOfMemory) - return status; - - /* recursively call self, then send end element */ - status = RenderCardElements(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - - /* ignore the element ids for the end element */ - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, - END_ELEMENT, &elemId)) != KBrsrSuccess) - return status; - - break; - } - - case UNKNOWN_ELEMENT: - { - /* - * If this unknown element has content, must recurse on it - * but do not want to send it to the UI - */ - if (NW_DeckDecoder_HasContent(thisObj->decoder, el)) - { - status = RenderCardElements(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - } - break; - } - - case CARD_ELEMENT: - case GO_ELEMENT: - case PREV_ELEMENT: - case REFRESH_ELEMENT: - case NOOP_ELEMENT: - case SETVAR_ELEMENT: - case ONEVENT_ELEMENT: - case WML_ELEMENT: - case HEAD_ELEMENT: - case TEMPLATE_ELEMENT: - case END_ELEMENT: - case TIMER_ELEMENT: - case ACCESS_ELEMENT: - case META_ELEMENT: - case POSTFIELD_ELEMENT: - default: - break; /* unknown elements are not going to be rendered */ - } - - el = (NW_Wml_Element_t*) NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t), NW_Wml_GetCardSegment(thisObj)); - if (!el) - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - - -/* Handle template elements - * - * RETURN: KBrsrSuccess - * KBrsrFailure - NON-fatal: no template; not a card; etc. - * KBrsrOutOfMemory - * NW_STAT_* - propagates other fatal errors - */ -static TBrowserStatusCode RenderTemplateElements(NW_Wml_t* thisObj, - NW_Wml_List_t* card_el_list) -{ - NW_Wml_Element_t *el, container; - TBrowserStatusCode status; - NW_DeckDecoderIter_t iter; - - el = (NW_Wml_Element_t*) NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t), NW_Wml_GetCardSegment(thisObj)); - if (!el) - return KBrsrOutOfMemory; - - if (NW_DeckDecoder_GetTemplateElement(thisObj->decoder, &container) != KBrsrSuccess) - return KBrsrFailure; - - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, &container) != KBrsrSuccess) - return KBrsrFailure; - - while (NW_DeckDecoderIter_GetNextElement(&iter, el)) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(thisObj->decoder, el, &el_type); - - if (el_type == DO_ELEMENT) - { - NW_Wml_Element_t card_el; - NW_Ucs2 *task_name = NULL; - - if (!NW_DeckDecoder_GetCardElement(thisObj->decoder, &card_el)) - return KBrsrFailure; - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, NAME_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &task_name)) == KBrsrOutOfMemory ) - { - return status; - } - - /* if name is not defined, use type as name */ - if (!task_name) - { - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, TYPE_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &task_name)) == KBrsrOutOfMemory ) - { - return status; - } - } - - /* if a do element with the same name exists in the deck, the template DO is not displayed */ - if (task_name) - { - /* SearchDoElements searches by TYPE if NAME is not available */ - if ((status = NW_DeckDecoder_SearchDoElements(thisObj->decoder, - thisObj->var_list, &card_el, NAME_ATTR, task_name)) != KBrsrSuccess ) - { - status = RenderDoElement(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - } - - NW_Str_Delete(task_name); - } - else - { - status = RenderDoElement(thisObj, el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - } - } - - el = (NW_Wml_Element_t*) NW_Mem_Segment_Malloc(sizeof(NW_Wml_Element_t), NW_Wml_GetCardSegment(thisObj)); - if (!el) - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - NON-fatal - * KBrsrOutOfMemory - */ -static TBrowserStatusCode RenderDoElement(NW_Wml_t* thisObj, - NW_Wml_Element_t* do_el, - NW_Wml_List_t* card_el_list) -{ - NW_Wml_Element_t task_el; - NW_Wml_ElType_e do_task; - TBrowserStatusCode status = KBrsrSuccess; - - if (!NW_DeckDecoder_FirstContainedElement(thisObj->decoder, do_el, &task_el)) - return KBrsrSuccess; - - NW_DeckDecoder_GetType(thisObj->decoder, &task_el, &do_task); - - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, DO_ELEMENT, - &do_el->id)) != KBrsrSuccess) - return status; - - /* UI prev softkey processing... - prev_task_id meaning: - -1 : initial, no PREV tasks processed - >= 0 : the id of the only DO or A elem processed which has PREV task - -2 : more than 1 DO or A elem processed which has PREV task - do_type_prev_id meaning: - -1 : initial, no DO processed with type PREV - >= 0 : the id of the only DO elem processed which has type PREV - -2 : more than 1 DO elem processed which has type PREV - */ - - /* first check for prev tasks */ - if (do_task == PREV_ELEMENT) - { - if (thisObj->prev_task_id == -1) - thisObj->prev_task_id = do_el->id; - /* - * if more than 1 PREV task, then it is misleading to map to - * a UI construct (like a softkey) - */ - else if (thisObj->prev_task_id >= 0) - thisObj->prev_task_id = -2; - } - - /* second check for prev types */ - if (NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, do_el, - TYPE_ATTR, WAE_ASC_PREV_STR, thisObj->var_list) == NW_TRUE) - { - if (thisObj->do_type_prev_id == -1) - thisObj->do_type_prev_id = do_el->id; - /* - * if more than 1 DO has TYPE PREV, then it is misleading - * to map to a UI construct (like a softkey) - */ - else if (thisObj->do_type_prev_id >= 0) - thisObj->do_type_prev_id = -2; - } - - if ((status = NW_WmlList_Append(card_el_list, do_el)) == KBrsrOutOfMemory) - return status; - - return KBrsrSuccess; -} - - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - unrecognized element - * KBrsrOutOfMemory - * NW_STAT_* - propagates other fatal errors - */ -static TBrowserStatusCode RenderAElement(NW_Wml_t* thisObj, - NW_Wml_Element_t* a_el, - NW_Wml_List_t* card_el_list) -{ - NW_Wml_Element_t task_el; - NW_Wml_ElType_e a_type = UNKNOWN_ELEMENT; - NW_Ucs2 *href = NULL; - TBrowserStatusCode status; - NW_Int16 elemid; - - /* - * Since A and ANCHOR elements appear to mapped to the same - * enum "A_ELEMENT", we don't know if this is an A or an ANCHOR - * element. However, since an A element is required by the WML - * DTD to have an href attribute, we look for it and if it is - * found, we assume that the element is an A element and if this - * attribute is not found, then assume it is an ANCHOR element. - * - */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, a_el, HREF_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &href)) == KBrsrOutOfMemory) - return status; - - if (!href) - { - NW_DeckDecoderIter_t iter; - - /* Must be an anchor element */ - if (NW_DeckDecoderIter_Initialize(&iter, thisObj->decoder, a_el) != KBrsrSuccess) - return KBrsrSuccess; - - /* looking for the task element */ - while (NW_DeckDecoderIter_GetNextElement(&iter, &task_el)) - { - NW_DeckDecoder_GetType(thisObj->decoder, &task_el, &a_type); - - if ((a_type == NOOP_ELEMENT) || (a_type == GO_ELEMENT) || - (a_type == PREV_ELEMENT) || (a_type == REFRESH_ELEMENT)) - break; - - else - a_type = UNKNOWN_ELEMENT; - - } - - if (a_type == UNKNOWN_ELEMENT) - { - return KBrsrSuccess; - } - - /* a elements for noop tasks are hiden from the UI */ - if (a_type == NOOP_ELEMENT) - { - return KBrsrSuccess; - } - } - else - { - NW_Mem_Free( href ); - } - - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, A_ELEMENT, - &a_el->id)) != KBrsrSuccess) - return status; - - if ((status = NW_WmlList_Append(card_el_list, a_el)) == KBrsrOutOfMemory) - return status; - - /* render all text elements */ - status = RenderCardElements(thisObj, a_el, card_el_list); - if (status != KBrsrSuccess && status != KBrsrFailure) - return status; - - /* send dummy "end of a" element. the element id is ignored */ - if ((status = (DISPLAY_API->addElement)(thisObj->browser_app, END_ELEMENT, - &elemid)) != KBrsrSuccess) - return status; - - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_url_utils.c --- a/webengine/wmlengine/src/wml/src/wml_url_utils.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,571 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_url_utils.c $ - - Purpose: - - Class: WmlBrowser - - Browser url utilities logic -*/ - -#include "wml_decoder.h" -#include "wml_url_utils.h" -#include "wml_history.h" -#include "wml_api.h" -#include "wml_elm_attr.h" -#include "nwx_url_utils.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -#include "nwx_settings.h" -#include "urlloader_urlloaderint.h" - -/* Note: functionality described below has been removed. This code will not always post back to the same - card deck. This is a violation of the WML specification but it was decided that it would be better to - allow posts to the same card deck to support the cases where dynamic web pages post to themselves. - - Use the code change history to see the lines removed. - -*/ - -/* Insofar as postfields and <go> elements are concerned, WML version 1.2 defined that - a <go> to the same deck with postfields was not allowed. This is used to distinguish - WBXML decks encoded by the gateways which may adhere to the earlier standard. */ - - -/* - * Forward declarations for static functions - */ - static TBrowserStatusCode GetDeckURL(NW_Wml_t* obj, NW_Ucs2 *full_url, NW_Ucs2 **ret_string); - -/* - * Returns KBrsrSuccess - * KBrsrFailure - does NOT imply a fatal error - * KBrsrOutOfMemory - * KBrsrMalformedUrl - * NW_STAT_* - propagates TBrowserStatusCode from other calls - */ -TBrowserStatusCode NW_Wml_GetHrefAttr(NW_Wml_t* obj, NW_Wml_Element_t* el, - NW_Ucs2 **ret_string) -{ - NW_Wml_t* thisObj = (NW_Wml_t*) obj; - NW_Ucs2 *raw_url = NULL; - NW_Ucs2 *escapedUrl = NULL; - NW_Uint32 escapeLen; - TBrowserStatusCode status; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, el, HREF_ATTR, - thisObj->var_list, NW_MEM_SEGMENT_MANUAL, &raw_url)) == KBrsrOutOfMemory) - return status; - - /* reset status - may be a non-fatal value (e.g. FAILURE) */ - status = KBrsrSuccess; - - /* escape the href value */ -//??? RFD: May need to modify this along with the rest of the URL encoding cleanup underway. - escapeLen = NW_Url_EscapeUnwiseLen(raw_url); - - if ((raw_url != NULL) && (escapeLen != NW_Str_Strlen(raw_url))) - { - escapedUrl = NW_Str_New(escapeLen); - if (escapedUrl == NULL) - { - NW_Str_Delete (raw_url); - return KBrsrOutOfMemory; - } - -//??? RFD: May need to modify this along with the rest of the URL encoding cleanup underway. - NW_Url_EscapeUnwise(raw_url, escapedUrl); - - NW_Str_Delete(raw_url); - } - else - escapedUrl = raw_url; - - if (escapedUrl) - { - status = NW_Wml_GetFullUrl(thisObj, escapedUrl, ret_string); - NW_Mem_Free(escapedUrl); - } - - return status; -} - - -/* - * removing the card part - * - * if full_url is passed as NULL, then use the last item in - * the history list - * - * RETURN: KBrsrSuccess - * KBrsrFailure - full_url is null and the history stack empty - * KBrsrOutOfMemory - */ -static TBrowserStatusCode GetDeckURL(NW_Wml_t *obj, - NW_Ucs2 *full_url, - NW_Ucs2 **ret_string) -{ - NW_Wml_t* thisObj = (NW_Wml_t*) obj; - NW_Ucs2 *last_full_url = 0; - NW_Ucs2 *end = 0; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - - status = NW_Wml_HistoryGetResponseUrl(thisObj, &last_full_url); - if (status == KBrsrOutOfMemory) - return status; - - if (!full_url) - full_url = last_full_url; - - if (!full_url) { - /* This can happen (e.g. a script just called WMLBrowser.newContext() ... */ - return KBrsrFailure; - } - end = NW_Str_Strrchr(full_url, '#'); - if (end != NULL) { - *ret_string = NW_Str_SegSubstr(full_url, 0, NW_UINT32_CAST(end - full_url), NW_Wml_GetCardSegment(thisObj)); - } else { - *ret_string = NW_Str_SegNewcpy(full_url, NW_Wml_GetCardSegment(thisObj)); - } - - NW_Str_Delete(last_full_url); - - if (*ret_string == NULL) - return KBrsrOutOfMemory; - - return KBrsrSuccess; -} - - -/* - * IsCardInCurrentDeck verifies that the passed url (full_url) is in the same - * deck as the last card processed by the CoreBrowser. - * - * RETURN: KBrsrSuccess - * KBrsrFailure - card NOT in current deck - * - no past deck - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_IsCardInCurrentDeck(NW_Wml_t *obj, - NW_Ucs2* full_url) -{ - NW_Wml_t* thisObj = obj; - NW_Ucs2 *parameter_deck_url = 0; - NW_Ucs2 *history_deck_url = 0; - NW_Ucs2 *history_full_url = 0; - NW_Bool res = NW_FALSE; - TBrowserStatusCode status; - - NW_ASSERT(thisObj); - NW_ASSERT(thisObj->decoder); - - /* always false if no current deck decoder is NULL - means no past deck */ -#if 0 /* TODO what should replace this call */ - if (!(NW_DeckDecoder_GetReader(thisObj->decoder))) - return KBrsrFailure; -#endif - - if ((status = GetDeckURL(thisObj, full_url, &parameter_deck_url)) - == KBrsrOutOfMemory) - return status; - - - status = NW_Wml_HistoryGetResponseUrl(thisObj, &history_full_url); - if (status == KBrsrOutOfMemory) - return status; - - /* can happen if Prev/Popped back to beginning */ - if (!history_full_url) - return KBrsrFailure; - - if ((status = GetDeckURL(thisObj, history_full_url, - &history_deck_url)) == - KBrsrOutOfMemory) - { - NW_Str_Delete(history_full_url); - return status; - } - - if (!parameter_deck_url || !history_deck_url) - res = NW_FALSE; - else - res = NW_BOOL_CAST(!NW_Str_Strcmp(parameter_deck_url, history_deck_url)); - - NW_Str_Delete(history_full_url); - - if (res == NW_TRUE) - return KBrsrSuccess; - else - return KBrsrFailure; -} - - -/* - * Evaluate whether the passed url is a card name, a relative url, - * or an absolute url. In all cases, return the full, absolute url. - * The caller is responsible for freeing the returned NW_MEM_SEGMENT_MANUAL memory - * - * Returns KBrsrSuccess - * KBrsrFailure - url_param is null - * - no history to get previous url - * - does NOT imply a fatal error - * KBrsrOutOfMemory - * KBrsrMalformedUrl - * NW_STAT_* - propagates TBrowserStatusCode from other calls - */ -TBrowserStatusCode NW_Wml_GetFullUrl(NW_Wml_t* thisObj, NW_Ucs2 *url_param, - NW_Ucs2 **ret_string) - { - TBrowserStatusCode status; - NW_Ucs2 *deck_url = 0; - NW_Ucs2* tempUrl = NULL; - NW_Url_Schema_t scheme; - NW_Ucs2* safeUrl = NULL; - NW_Bool isBrowserScheme = NW_FALSE; - - NW_ASSERT(thisObj); - NW_ASSERT(ret_string); - NW_ASSERT(url_param); - - tempUrl = url_param; - - if ((status = GetDeckURL(thisObj, 0, &deck_url)) == KBrsrOutOfMemory) - { - goto clean; - } - - // Handle file URLs and relative URLs whose deck_url has a file schema. - status = NW_Url_GetScheme(deck_url, &scheme); - if ((status == KBrsrSuccess) && (scheme == NW_SCHEMA_FILE)) - { - status = NW_Url_GetSchemeNoValidation(url_param, &scheme); - if ((status != KBrsrSuccess) || (scheme == NW_SCHEMA_FILE)) - { - // If getting schema was not successful (status != KBrsrSuccess), - // assume a relative FILE URL, reset the status, and continue - // as though the schema is FILE, the same as its deck schema - // determined above. - status = KBrsrSuccess; - - // Replace all back-slashes with forward-slashes, hence supporting - // and converting Windows-style file delimiters to UNIX-style file - // delimiters. - (void)NW_Str_Strcharreplace(url_param, '\\', '/'); - tempUrl = NW_Url_ConvertFileToEscapeURL(url_param); - if (tempUrl == NULL) - { - status = KBrsrOutOfMemory; - goto clean; - } - } - } -//??? RFD: This section needs to be corrected along with the rest of the URL-encoding fixes underway. - status = NW_Url_ConvertUnicode(tempUrl, &safeUrl); - if (status != KBrsrSuccess) - { - goto clean; - } - - if (tempUrl != url_param) - { - NW_Str_Delete(tempUrl); - } - tempUrl = safeUrl; - safeUrl = NULL; - - status = NW_Url_IsBrowserScheme(tempUrl, &isBrowserScheme); - if (status == KBrsrOutOfMemory) - { - goto clean; - } - - /* If and only if the schema is a so-called browser schema, then validate - the URL. Do NOT validate URLs for other schemas because not all of the - other schemas use URLs that conform to the RFCs. For example, WTAI URLs - do not conform; paramters are not encoded and are passed directly in - UCS2 chars. */ - if (isBrowserScheme) - { - if (!NW_Url_IsValid(tempUrl)) - { - status = KBrsrMalformedUrl; - goto clean; - } - } - - status = KBrsrSuccess; //Reset status. - /* check if url is a card name only. */ - if (tempUrl[0] == '#') - { - if (!deck_url) - { - status = KBrsrFailure; - goto clean; - } - - *ret_string = NW_Str_Newcat(deck_url, tempUrl); - if (*ret_string == 0) - { - status = KBrsrOutOfMemory; - goto clean; - } - } - // Check for relative urls; URL should not contain a protocol. - else if (NW_Str_StrncmpConst(tempUrl, WAE_ASC_HTTP_SLASH_SLASH_STR, WAE_ASC_STRLEN(WAE_ASC_HTTP_SLASH_SLASH_STR)) && - NW_Str_StrncmpConst(tempUrl, WAE_ASC_HTTPS_SLASH_SLASH_STR, WAE_ASC_STRLEN(WAE_ASC_HTTPS_SLASH_SLASH_STR))) - { - if (!deck_url) - { - status = KBrsrFailure; - goto clean; - } - status = NW_Url_RelToAbs(deck_url, tempUrl, ret_string); - } - /* url parameter is absolute url */ - else - { - *ret_string = NW_Str_Newcpy(tempUrl); - if (*ret_string == 0) - { - status = KBrsrOutOfMemory; - goto clean; - } - } - -clean: - if (tempUrl != url_param) - { - NW_Str_Delete(tempUrl); - } - return status; - } - - -/* - * this function will malloc and set the url state for UrlLoadResp - * - * RETURN: string or NULL if malloc for the string fails - */ -NW_Ucs2* NW_Wml_CheckRedirection(NW_Ucs2* url_param, NW_Ucs2* redirected_url) -{ - NW_Ucs2* url = 0; - - /* determine whether url is redirected and set state */ - if (url_param != redirected_url) - { - NW_ASSERT(redirected_url); - url = NW_Str_Newcpy(redirected_url); - } - else - { - NW_ASSERT(url_param); - url = NW_Str_Newcpy(url_param); - } - return url; -} - -/* - * Returns KBrsrSuccess - * KBrsrBadInputParam - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_Wml_MakeLoadRequest(NW_Wml_t *thisObj, NW_Ucs2 *url, - NW_Wml_Element_t *go_el) -{ - NW_Ucs2 *accept_charset = NULL; - NW_Ucs2 *referer = NULL; - NW_Ucs2 *enctype = NULL; - NW_Ucs2 *refNofrag = NULL; - NW_Ucs2 *url_frag = NULL; - NW_NVPair_t *postfields = NULL; - NW_Ucs2 *top = NULL; - NW_Bool is_method_post = NW_FALSE; - NW_Bool cacheAttr = NW_FALSE; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint32 ref_len; - NW_Uint32 frag_len; - - NW_ASSERT(thisObj); - - if (go_el) - { - /* sendrefer attr */ - if (NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, go_el, - SENDREFERER_ATTR, WAE_ASC_TRUE_STR, thisObj->var_list)) - { - status = NW_Wml_HistoryGetResponseUrl(thisObj, &top); - NW_THROWIF_ERROR(status); - - /* Spec requires the referer be "smallest" relative URL */ - if ((status = NW_Url_AbsToRel(url, top, &referer)) == KBrsrOutOfMemory) - NW_THROW_ERROR(); - - if (status == KBrsrSuccess) - { - NW_Mem_Free(top); - } - else - { - referer = top; - } - - top = NULL; - - if( (status = NW_Url_GetFragId(referer, &url_frag, NW_FALSE)) - == KBrsrSuccess ) - { - frag_len = NW_Str_Strlen(url_frag); - ref_len = NW_Str_Strlen(referer); - /*url_frag does not includes # */ - - refNofrag = (NW_Ucs2*) NW_Mem_Malloc((ref_len - frag_len) * sizeof(NW_Ucs2)); - NW_THROWIF_NULL(refNofrag); - - (void)NW_Str_Strncpy(refNofrag, referer, (ref_len - frag_len)); - refNofrag[ref_len - frag_len -1] = 0; - - NW_Str_Delete(url_frag); - url_frag = NULL; - } - else if(status == KBrsrOutOfMemory) - { - NW_THROW_ERROR(); - } - else if(NW_Url_IsValid(referer)) - { - refNofrag = NW_Str_Newcpy(referer); - } - } - - /* method attr - need to know if the method is "get" or "post" */ - is_method_post = NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, go_el, - METHOD_ATTR, WAE_ASC_POST_STR, thisObj->var_list); - - /* accept-charset attr */ - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, - go_el, ACCEPT_CHARSET_ATTR, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - &accept_charset)) == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - - // Note: code was removed here. See comment at top of file regarding POST - - if (NW_DeckDecoder_HasAttributeWithValue(thisObj->decoder, go_el, CACHECONTROL_ATTR, - WAE_ASC_NOCACHE_STR, thisObj->var_list)) { - cacheAttr = NW_TRUE; - } - - - if ((status = NW_DeckDecoder_GetPostfieldData(thisObj->decoder, - thisObj->var_list, go_el, &postfields)) != KBrsrSuccess) { - NW_THROW_ERROR(); - } - - if ((status = NW_DeckDecoder_GetAttribute(thisObj->decoder, - go_el, ENCTYPE_ATTR, thisObj->var_list, NW_MEM_SEGMENT_MANUAL, - &enctype)) == KBrsrOutOfMemory) { - NW_THROW_ERROR(); - } - } - - status = NW_Wml_DoLoadAndSave(thisObj, url, is_method_post, refNofrag, accept_charset, - NULL, postfields, enctype, (cacheAttr) ? NW_CACHE_NOCACHE : NW_CACHE_NORMAL); - - /* cleanup */ - -NW_CATCH_ERROR - if (top != referer) - { - NW_Str_Delete (top); - } - - NW_Str_Delete(accept_charset); - NW_Str_Delete(referer); - NW_Str_Delete(enctype); - NW_Str_Delete(refNofrag); - NW_Str_Delete(url_frag); - NW_NVPair_Delete(postfields); - - return status; -} - -/*------------------------------------------------------------------------------- - * NW_Wml_DoLoadAndSave -- this abstracts out the decision about what kind of load - * to do, and keeps it localized. - * - * RETURN: - * <whatever HttpLoad or UrlLoad can return>, or - * KBrsrOutOfMemory - * - ------------------------------------------------------------------------------*/ -TBrowserStatusCode NW_Wml_DoLoadAndSave(NW_Wml_t *thisObj, - NW_Ucs2 *req_url, - NW_Bool is_method_post, - NW_Ucs2 *referer, - NW_Ucs2 *accept_charset, - NW_Http_Header_t *header, - NW_NVPair_t *postfields, - NW_Ucs2 *enctype, - NW_Cache_Mode_t cacheMode) -{ - TBrowserStatusCode status; - - /* at this point, we know everything we need to know about what will - * eventually be pushed onto the history stack; but we don't want it - * to be pushed until the load is actually completed. So we set the - * 'last_load' member of the context with the appropriate information, - * and the response logic will push it onto the stack for us later. - */ - if (referer || is_method_post || accept_charset || enctype || header) { - status = NW_Wml_HttpLoad(thisObj->browser_app, req_url, is_method_post, - referer, accept_charset, header, - postfields, enctype, cacheMode); - } - else { - if (NW_Settings_GetSendReferrerHeader()) { - status = NW_Wml_UrlLoad(thisObj->browser_app, req_url, postfields, - cacheMode, thisObj->history_resp_url); - } - else { - status = NW_Wml_UrlLoad(thisObj->browser_app, req_url, postfields, - cacheMode, NULL); - } - - /* - ** the following params are all cleaned up by NW_Wml_HttpLoad(). since - ** we didn't call NW_Wml_HttpLoad() we must delete them explicitly. - */ - UrlLoader_HeadersFree(header); - NW_Str_Delete(referer); - NW_Str_Delete(accept_charset); - NW_Str_Delete(enctype); - } - return status; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_var.c --- a/webengine/wmlengine/src/wml/src/wml_var.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,378 +0,0 @@ -/* -* Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* - $Workfile: wml_var.c $ - - Purpose: - - Function definitions for WML variables and WML variable lists. - - Definition file for varibale parsing functions -*/ - -#include "wml_var.h" -#include "nwx_memseg.h" -#include "nwx_string.h" -#include "nw_nvpair.h" -#include "BrsrStatusCodes.h" - -/* Forward declarations for static functions */ -static void ClearNextVar(NW_Wml_Var_t *var); - -/* - * n must be valid, v may be null - * - * - * RETURN: KBrsrSuccess - * KBrsrFailure - n is null - * KBrsrOutOfMemory - */ -static TBrowserStatusCode NewVar(const NW_Ucs2 *n, const NW_Ucs2 *v, NW_Mem_Segment_Id_t mem_scope, NW_Wml_Var_t **ret_var) -{ - if (n != NULL) - { - if (!NW_CheckName(n)) { - return KBrsrWmlbrowserBadContent; - } - *ret_var = (NW_Wml_Var_t *)NW_Mem_Segment_Malloc(sizeof(NW_Wml_Var_t), mem_scope); - if (*ret_var != NULL) - { - (*ret_var)->name = NW_Str_SegNewcpy(n, mem_scope); - if ((*ret_var)->name != NULL) - { - (*ret_var)->val = NULL; - if (v != NULL) - { - (*ret_var)->val = NW_Str_SegNewcpy(v, mem_scope); - if ((*ret_var)->val == NULL) - { - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; - } - } - return KBrsrOutOfMemory; - } - return KBrsrFailure; -} - -/* - * - * RETURN: KBrsrSuccess - * KBrsrFailure - str = null - * - str = empty string - * - str parsing error - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlVar_ParseList(NW_Ucs2 *str, NW_Int32 *size, NW_Mem_Segment_Id_t mem_scope, NW_Wml_Var_t **ret_var) -{ - NW_Int32 i = 0, pos = 0, varNo = 0, len; - NW_Bool nameFlag = NW_TRUE; - - *ret_var = 0; - - if ((str == NULL) || (NW_Str_Strlen(str) == 0)) - return KBrsrFailure; - - len = NW_Str_Strlen(str); - - /* checking how many vars there are */ - for(i = 0, *size = 1; i < len; i++) { - if(str[i] == '&') (*size)++; - } - - *ret_var = (NW_Wml_Var_t *)NW_Mem_Segment_Malloc(sizeof(NW_Wml_Var_t) * NW_UINT32_CAST(*size), mem_scope); - if (*ret_var == NULL) - return KBrsrOutOfMemory; - - for(i = 0, pos = 0, varNo = 0; i < len + 1; i++) - { - if (str[i] == '=') - { - /* Parsing error ??? */ - if (nameFlag == NW_FALSE) - return KBrsrFailure; - - (*ret_var)[varNo].name = NW_Str_SegSubstr(str, NW_UINT32_CAST(pos), - NW_UINT32_CAST(i - pos), mem_scope); - - if ((*ret_var)[varNo].name == NULL) { - return KBrsrOutOfMemory; - } - - if (!NW_CheckName((*ret_var)[varNo].name)) { - return KBrsrWmlbrowserBadContent; - } - - pos = i + 1; - nameFlag = NW_BOOL_CAST(!nameFlag); - } - - if ((str[i] == '&') || (str[i] == '\0')) - { - /* Parsing error ??? */ - if (nameFlag) - return KBrsrFailure; - - (*ret_var)[varNo].val = NW_Str_SegSubstr(str, NW_UINT32_CAST(pos), - NW_UINT32_CAST(i - pos), mem_scope); - - if ((*ret_var)[varNo].val == NULL) - return KBrsrOutOfMemory; - - pos = i + 1; - nameFlag = NW_BOOL_CAST(!nameFlag); - varNo++; - } - } - return KBrsrSuccess; -} - -NW_Wml_Var_t *NW_WmlVar_Get(NW_Wml_VarList_t *l, const NW_Ucs2 *name) -{ - NW_Wml_Var_t *v = 0; - - if (l == NULL) - return NULL; - - v = l->next; - while (v != NULL) - { - if (NW_Str_Strcmp(v->name, name) == 0) - return v; - v = v->next; - } - - return NULL; -} - -NW_Wml_Var_t *NW_WmlVar_Next(NW_Wml_VarList_t *l, NW_Wml_Var_t *current) -{ - NW_Wml_Var_t *v = 0; - - if (l == NULL) - v = NULL; - else if (current == NULL) - v = l; - else - v = current->next; - - return v; -} - -NW_Bool NW_WmlVar_Remove(NW_Wml_VarList_t *l, NW_Ucs2 *name) -{ - NW_Wml_Var_t *v = 0; - NW_Bool res = NW_FALSE; - - if (l == NULL) - return NW_FALSE; - - v = l; - - while ((v != NULL) && (v->next != NULL)) - { - if (NW_Str_Strcmp(v->next->name, name) == 0) - { - res = NW_TRUE; - v->next = v->next->next; - } - v = v->next; - } - return res; -} - -NW_Ucs2 *NW_WmlVar_GetValue(NW_Wml_VarList_t *l, const NW_Ucs2 *name) -{ - NW_Wml_Var_t *v = NW_WmlVar_Get(l, name); - - /* Treat variables as not set if variable - is not defined, or is set to empty string. - See section 10.3 of the WML 1.1 Spec. */ - - if ( ( v != NULL ) && - ( v->val != NULL ) && - ( v->val[0] != 0 ) ) - { - return v->val; - } - else - { - return NULL; - } -} - -NW_Bool NW_WmlVar_Replace(NW_Wml_VarList_t *l, NW_Wml_Var_t *param_var) -{ - NW_Wml_Var_t *list_var = NW_WmlVar_Get(l, param_var->name); - - if (list_var != NULL) - { - list_var->val = param_var->val; - return NW_TRUE; - } - else - return NW_FALSE; -} - -void NW_WmlVar_Clear(NW_Wml_VarList_t *l) -{ - if (l == NULL) - return; - - if (l->next != NULL) - ClearNextVar(l->next); - l->next = NULL; -} - -static void ClearNextVar(NW_Wml_Var_t *var) -{ - if (var->next) - ClearNextVar(var->next); - var->val = 0; - var->next = 0; - var->name = 0; -} - -/* - * RETURN: *var_list or 0 if malloc fails - */ -NW_Wml_VarList_t * NW_WmlVar_NewList(NW_Mem_Segment_Id_t mem_scope) -{ - NW_Wml_VarList_t *ret_list; - - ret_list = (NW_Wml_VarList_t *)NW_Mem_Segment_Malloc(sizeof(NW_Wml_VarList_t), mem_scope); - if (ret_list == NULL) - return NULL; - - ret_list->name = ret_list->val = 0; - ret_list->next = 0; - - return ret_list; -} - -NW_Wml_Var_t *NW_WmlVar_PopFirst(NW_Wml_VarList_t *l) -{ - NW_Wml_Var_t *var = l; - NW_Wml_Var_t *prev_var = l; - - if (NW_WmlVar_IsListEmpty(l)) return 0; - - /* note that the "first" var, that is the first one put in the - list, will be the last actual variable in the linked list */ - while(var->next) { - prev_var = var; - var = var->next; - } - - prev_var->next = 0; - return var; -} - -void NW_WmlVar_AddVarToList(NW_Wml_VarList_t *l, NW_Wml_Var_t *v) -{ - if (!l) - return; - - v->next = l->next; - l->next = v; -} - -NW_Bool NW_WmlVar_IsListEmpty(NW_Wml_VarList_t *l) -{ - if (!l) - return NW_TRUE; - - return NW_BOOL_CAST(l->next == 0); -} - -/* - * RETURN: KBrsrSuccess - * KBrsrFailure - if name is null - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlVar_AddToList(NW_Wml_VarList_t *l, const NW_Ucs2 *name, const NW_Ucs2 *value, NW_Mem_Segment_Id_t mem_scope) -{ - TBrowserStatusCode status; - NW_Wml_Var_t *v = 0; - - status = NewVar(name, value, mem_scope, &v); - if (status == KBrsrSuccess && v) - { - v->next = l->next; - l->next = v; - } - return status; -} - -/* - * RETURN: KBrsrSuccess - * KBrsrOutOfMemory - */ -TBrowserStatusCode NW_WmlVar_ReplaceValue(NW_Wml_Var_t *v, const NW_Ucs2 *value, NW_Mem_Segment_Id_t mem_scope) -{ - if (!value) { - v->val = NULL; - return KBrsrSuccess; - } - - if (v->val != NULL && (NW_Str_Strlen(value) <= NW_Str_Strlen(v->val))) { - NW_Str_Strcpy(v->val, value); - return KBrsrSuccess; - } - - if (mem_scope == NW_MEM_SEGMENT_MANUAL) { - NW_Str_Delete(v->val); - } - v->val = NW_Str_SegNewcpy(value, mem_scope); - if (!v->val) { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; - -} - -/* - * RETURN: *var_list or 0 if malloc fails - */ -NW_Wml_VarList_t *NW_WmlVar_DupList(NW_Wml_VarList_t *l, NW_Mem_Segment_Id_t mem_scope) -{ - NW_Wml_Var_t *v = 0; - NW_Wml_VarList_t *ret_list; - - ret_list = NW_WmlVar_NewList(mem_scope); - if (ret_list == NULL) { - return NULL; - } - - while ((v = NW_WmlVar_PopFirst(l)) != NULL) - { - TBrowserStatusCode status = NW_WmlVar_AddToList(ret_list, v->name, v->val, mem_scope); - /* memory already allocated will be freed when segment is freed. */ - if (status == KBrsrOutOfMemory) { - return NULL; - } - NW_ASSERT(status == KBrsrSuccess); - } - - return ret_list; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml/src/wml_wae_reader.c --- a/webengine/wmlengine/src/wml/src/wml_wae_reader.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,471 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Defines functions to read the native types (NW_Int32 , NW_Float32, etc..) from encoded - : bytecode. -* -*/ - - -#include "nw_wae_reader.h" - -#include "nwx_defs.h" -#include "nwx_http_defs.h" -#include "wml_ops.h" - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -static NW_Uint32 ReadInt16CharBuff(NW_Reader_t *r, NW_Ucs2 *c); - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static NW_Uint32 ReadInt16CharBuff(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_Byte *buff = &r->readerBuff[r->readerPos + r->readerBytesRead]; - NW_ASSERT(c != NULL); - NW_ASSERT(r != NULL); - - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead + 1) >= r->readerSize) - { - return 0; - } - *c = (NW_Ucs2)((buff[0] << 8) | buff[1]); - return 2; -} - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -NW_Uint32 NW_Reader_ReadUtf8CharBuff(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_Byte *buff = &r->readerBuff[r->readerPos + r->readerBytesRead]; - NW_ASSERT(r != NULL); - NW_ASSERT(c != NULL); - - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead) >= r->readerSize) - { - return 0; - } - - switch (buff[0] >> 4) - { - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: - /* 1 NW_Byte */ - *c = (NW_Ucs2) buff[0]; - return 1; - - case 12: case 13: - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead + 1) >= r->readerSize) - { - return 0; - } - /* 2 bytes */ - if ( !((buff[1] & 0xC0) == 0x80) ) - { - return 0; - } - *c = (NW_Ucs2) ( ((buff[0] & 0x1F) << 6) | (buff[1] & 0x3F) ); - return 2; - - case 14: - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead + 2) >= r->readerSize) - { - return 0; - } - /* 3 bytes */ - if ( !(((buff[1] & 0xC0) == 0x80) || ((buff[2] & 0xC0) == 0x80)) ) - return 0; - *c = (NW_Ucs2) ( ((buff[0] & 0x0F) << 12) | - ((buff[1] & 0x3F) << 6) | - ((buff[2] & 0x3F) << 0) ); - return 3; - - default: - return 0; /* bad format */ - } -} - - -NW_Uint32 NW_Reader_WriteUcs2CharBuff(NW_Ucs2 c, NW_Byte *buff) -{ - NW_ASSERT(buff != NULL); - buff[0] = (NW_Byte) ((0xff00 & c) >> 8); - buff[1] = (NW_Byte) (0xff & c); - return 2; -} - -NW_Uint32 NW_Reader_WriteUtf8CharBuff(NW_Ucs2 c, NW_Byte *buff) -{ - NW_ASSERT(buff != NULL); - - if (/*(c >= 0x0000) && */ (c <= 0x007F)) - { - /* 0x0000 - 0x007F: 1 NW_Byte UTF-8 encoding. */ - buff[0] = (NW_Byte) c; - return 1; - } - else if (c > 0x07FF) - { - /* 0x0800 - 0xFFFF: 3 NW_Byte UTF-8 encoding. */ - buff[0] = (NW_Byte) (0xE0 | ((c >> 12) & 0x0F)); - buff[1] = (NW_Byte) (0x80 | ((c >> 6) & 0x3F)); - buff[2] = (NW_Byte) (0x80 | ((c >> 0) & 0x3F)); - return 3; - } - else - { - /* 0x0080 - 0x07ff: 2 NW_Byte UTF-8 encoding. */ - buff[0] = (NW_Byte) (0xC0 | ((c >> 6) & 0x1F)); - buff[1] = (NW_Byte) (0x80 | ((c >> 0) & 0x3F)); - return 2; - } -} - - -/* This function returns the bytelength of ucs2 string encoded as UTF-8. */ -NW_Uint32 NW_Reader_GetUtf8EncodedByteLength(const NW_Ucs2 *str) -{ - NW_Uint32 len = 0; - while(*str != 0) - { - if( *str <= 0x07f ) - { - len = len + 1; - } - else if (*str <= 0x07ff ) - { - len = len + 2; - } - else - { - len = len + 3; - } - str ++; - } - return len; -} - - -NW_Uint32 NW_Reader_ReadIso8859_1CharBuff(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_Byte *buff = &r->readerBuff[r->readerPos + r->readerBytesRead]; - NW_ASSERT(c != NULL); - NW_ASSERT(r != NULL); - - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead) >= r->readerSize) - { - return 0; - } - *c = buff[0] ; - return 1; -} - -NW_Uint32 NW_Reader_ReadUsAsciiCharBuff(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_Byte *buff = &r->readerBuff[r->readerPos + r->readerBytesRead]; - NW_ASSERT(c != NULL); - NW_ASSERT(r != NULL); - - /* return 0, if an attempt to read beyond the alocated buffer */ - if((r->readerPos + r->readerBytesRead) >= r->readerSize) - { - return 0; - } - - *c = buff[0] ; - return 1; -} - - -NW_Uint32 NW_Reader_ReadCharBuff(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_ASSERT(c != NULL); - NW_ASSERT(r != NULL); - - if (r->readerEncoding == HTTP_iso_10646_ucs_2) - return ReadInt16CharBuff(r, c); - else if (r->readerEncoding == HTTP_utf_8) - return NW_Reader_ReadUtf8CharBuff(r, c); - else if (r->readerEncoding == HTTP_iso_8859_1) - return NW_Reader_ReadIso8859_1CharBuff(r, c); - else if (r->readerEncoding == HTTP_us_ascii) - return NW_Reader_ReadUsAsciiCharBuff(r, c); - else - return 0; -} - -NW_Bool NW_Reader_ReadChar(NW_Reader_t *r, NW_Ucs2 *c) -{ - NW_Uint32 byteCnt = 0; - r->readerBytesRead = 0; - byteCnt = NW_Reader_ReadCharBuff(r, c); - if(byteCnt == 0) - { - return NW_FALSE; - } - r->readerPos = byteCnt + r->readerPos; - return NW_TRUE; -} - -void NW_Reader_InitializeBuffReader(NW_Reader_t *r, NW_Byte *buff, NW_Uint32 buff_size, NW_Uint16 encoding) -{ -#ifdef WAE_DEBUG - static NW_Bool logFlag = NW_FALSE; - static const char* fileName = "C:\\Temp\\reader.bin"; - FILE* outFile; - - if ( logFlag ) - { - outFile = fopen( fileName, "w" ); - fwrite( buff, 1, buff_size, outFile ); - fclose( outFile ); - } -#endif - - if ( encoding == HTTP_undefined ) - { - /* Character set is undefined. Default to Latin 1. */ - encoding = HTTP_iso_8859_1; - } - - r->readerSize = buff_size; - r->readerBuff = buff; - r->readerPos = 0; - r->readerEncoding = encoding; - r->readerBytesRead = 0; -} - -NW_Uint32 NW_Reader_GetPos(NW_Reader_t *r) -{ - NW_ASSERT(r != NULL); - NW_ASSERT(r->readerPos <= r->readerSize); - return r->readerPos; -} - -NW_Uint32 NW_Reader_GetStrCharCount(NW_Reader_t *r, NW_Uint32 byte_len) -{ - NW_Uint32 chars_read = 0; - NW_Uint32 byteCnt =0; - NW_Ucs2 c; - - NW_ASSERT(r != NULL); - r->readerBytesRead = 0; - while ( r->readerBytesRead < byte_len ) - { - byteCnt = NW_Reader_ReadCharBuff(r, &c); - if ( byteCnt == 0 ) - return 0; - - r->readerBytesRead += byteCnt; - chars_read++; - } - r->readerBytesRead = 0; - return chars_read; -} - -NW_Bool NW_Reader_ReadChars(NW_Reader_t *r, NW_Ucs2 *str, NW_Int32 len) -{ - NW_Int32 i; - NW_Uint32 start = r->readerPos; - NW_Uint32 byteCnt; - - if (len <= 0) - return NW_TRUE; - - NW_ASSERT(str != NULL); - NW_ASSERT(r != NULL); - - r->readerBytesRead = 0; - for(i = 0;; i++) - { - byteCnt = NW_Reader_ReadCharBuff(r, &str[i]); - - if ( byteCnt == 0 ) - { - /* Did not return a character. Fail. */ - return NW_FALSE; - } - - r->readerPos = byteCnt + r->readerPos; - - if (r->readerPos == (start + NW_UINT32_CAST(len))) - { - return NW_TRUE; - } - else if (r->readerPos > (start + NW_UINT32_CAST(len))) - { - return NW_FALSE; - } - } - /* Cannot reach here */ -} - -/* Changed void return type to NW_Bool. Removed NW_ASSERT's. CHANGED: 2/16/2000, jac. */ -NW_Bool NW_Reader_ReadBytes(NW_Reader_t *r, NW_Byte *buff, NW_Uint32 len) -{ - - NW_ASSERT( r != NULL ); - if ( (r->readerPos + len) > r->readerSize) /* REMOVED NW_ASSERT: report status if "run off end of buffer"*/ - { - return NW_FALSE; - } - (void)NW_Mem_memcpy(buff, &r->readerBuff[r->readerPos], len); - r->readerPos += len; - return NW_TRUE; -} - -NW_Bool NW_Reader_ReadInt16(NW_Reader_t *r, NW_Int16 *res) -{ - NW_Byte b1; - NW_Byte b2; - - NW_ASSERT(r != NULL); - - if (!NW_Reader_ReadNextByte(r, &b1)) - { - return NW_FALSE; - } - if (!NW_Reader_ReadNextByte(r, &b2)) - { - return NW_FALSE; - } - *res = (NW_Int16)((b1 << 8) | b2); - return NW_TRUE; -} - - - -NW_Bool NW_Reader_ReadInt(NW_Reader_t *r,NW_Int32 *res) -{ - NW_Byte b1; - NW_Byte b2; - NW_Byte b3; - NW_Byte b4; - - NW_ASSERT(r != NULL); - - if (!NW_Reader_ReadNextByte(r, &b1)) - { - return NW_FALSE; - } - if (!NW_Reader_ReadNextByte(r, &b2)) - { - return NW_FALSE; - } - if (!NW_Reader_ReadNextByte(r, &b3)) - { - return NW_FALSE; - } - if (!NW_Reader_ReadNextByte(r, &b4)) - { - return NW_FALSE; - } - - *res = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4; - return NW_TRUE; -} - - -NW_Float32 NW_Reader_ReadFloat(NW_Reader_t *r) -{ - NW_Int32 tmp; - /* "volatile" keyword is used to suppress compiler optimizer bug */ - /* which changes store/load operation into a data-type cast */ - volatile union { - NW_Int32 int_res; - NW_Float32 float_res; - } res; - - NW_ASSERT(r != NULL); - - if(!(NW_Reader_ReadInt(r, &tmp))) - { - return 0; - } - res.int_res = tmp; - return res.float_res; -} - - -NW_Bool NW_Reader_ReadNextByte(NW_Reader_t *r, NW_Byte *b) -{ - - if (!r || (r->readerBuff == 0) || (r->readerPos >= r->readerSize)) return NW_FALSE; - - *b = r->readerBuff[r->readerPos++]; - - return NW_TRUE; -} - - -NW_Bool NW_Reader_ReadMbyteInt(NW_Reader_t *r, NW_Int32 *res) -{ - NW_ASSERT(r != NULL); - if(!(NW_Reader_ReadMbyteBuff(res, r))) - { - return NW_FALSE; - } - if ( (r->readerBytesRead == 0) || (r->readerBytesRead > 5)) - { - return NW_FALSE; - } - if( (r->readerPos + r->readerBytesRead) <= r->readerSize ) - { - r->readerPos += r->readerBytesRead; - return NW_TRUE; - } - return NW_FALSE; -} - -NW_Bool NW_Reader_ReadMbyteBuff(NW_Int32 *val, NW_Reader_t *r) -{ - NW_Int32 next; - NW_Uint32 i; - NW_Byte* buf = &r->readerBuff[r->readerPos]; - - NW_ASSERT(r); - NW_ASSERT(val); - - for(i = 0, *val = 0;;i++, *val <<= 7) - { - if( (r->readerPos + i) >= r->readerSize ) - { - r->readerBytesRead = 0; - return NW_FALSE; - } - - next = buf[i]; - if (!(next & 0x80)) - { - *val |= next; - break; - } - else *val |= (next & 0x7F); - } - r->readerBytesRead = i+1; - return NW_TRUE; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_epoc32contenthandler.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_epoc32contenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_EPOC32CONTENTHANDLER_H -#define NW_WML1X_EPOC32CONTENTHANDLER_H - -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_markup_imageviewer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_Epoc32ContentHandler_Class_s NW_Wml1x_Epoc32ContentHandler_Class_t; -typedef struct NW_Wml1x_Epoc32ContentHandler_s NW_Wml1x_Epoc32ContentHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_Epoc32ContentHandler_ClassPart_s { - void** unused; -} NW_Wml1x_Epoc32ContentHandler_ClassPart_t; - -struct NW_Wml1x_Epoc32ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_CompositeContentHandler_ClassPart_t NW_HED_CompositeContentHandler; - NW_Wml1x_ContentHandler_ClassPart_t NW_Wml1x_ContentHandler; - NW_Wml1x_Epoc32ContentHandler_ClassPart_t NW_Wml1x_Epoc32ContentHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Wml1x_Epoc32ContentHandler_s { - NW_Wml1x_ContentHandler_t super; - - /* aggregation(s) */ - NW_Markup_ImageViewer_t NW_Markup_ImageViewer; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_Epoc32ContentHandler_ClassPartOf(_object) \ - (NW_Object_GetClassPart (_object, NW_Wml1x_Epoc32ContentHandler)) - -#define NW_Wml1x_Epoc32ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_Wml1x_Epoc32ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Wml1x_Epoc32ContentHandler_Class_t NW_Wml1x_Epoc32ContentHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -NW_Wml1x_Epoc32ContentHandler_SaveToFile(NW_Wml1x_Epoc32ContentHandler_t *thisObj, - NW_Ucs2* file); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_EPOC32CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_epoc32contenthandleri.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_epoc32contenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_EPOC32CONTENTHANDLERI_H -#define NW_WML1X_EPOC32CONTENTHANDLERI_H - -#include "nw_wml1x_wml1xcontenthandleri.h" -#include "nw_wml1x_epoc32contenthandler.h" -#include "nw_markup_imagevieweri.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - protected data - * ------------------------------------------------------------------------- */ -extern const NW_Markup_ImageViewer_Class_t NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class; -extern const NW_Object_Class_t* const NW_Wml1x_Epoc32_InterfaceList[]; - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_Wml1x_Epoc32ContentHandler_PartialLoadCallback( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode loadStatus, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context ); - -extern -void -_NW_Wml1x_Epoc32ContentHandler_HandleLoadComplete(NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ); - -extern -TBrowserStatusCode -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_Load (NW_Markup_ImageViewer_t* imageViewer); - -extern -NW_Bool -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_IsNoSave (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -extern -NW_Ucs2* -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_GetAltText (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_EPOC32CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xactiveevent.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xactiveevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1XACTIVEEVENT_H -#define NW_WML1XACTIVEEVENT_H - -#include "nw_hed_appservices.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -TBrowserStatusCode NW_Wml1x_HandleDo (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_LMgr_Box_t **deleteBox); - -TBrowserStatusCode NW_Wml1x_HandleSelect (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_LMgr_Box_t **deleteBox, - NW_Bool *currentSelectMultipleState, - NW_Int32 *currentSelectTabIndexVal); - -TBrowserStatusCode NW_Wml1x_HandleOption (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_Bool currentSelectMultipleState, - NW_Int32 currentSelectTabIndexVal); - -TBrowserStatusCode NW_Wml1x_HandleOptgroup (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box); - -TBrowserStatusCode NW_Wml1x_FixupAnchorText (NW_Wml_t *wmlInterpreter, - NW_Uint16 elId, - NW_LMgr_ContainerBox_t *containerBox, - NW_HED_AppServices_t* appServices); /* for access to localization function */ - -TBrowserStatusCode NW_Wml1x_GetURL(NW_Wml_t *wmlInterpreter, - NW_Uint16 elId, - NW_Ucs2 **retURL, - NW_Bool *isPrev); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1XACTIVEEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xapi.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xapi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1XAPI_H -#define NW_WML1XAPI_H - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -const NW_WmlApi_t* NW_Api_GetWml1xCB(); - -TBrowserStatusCode -NW_UI_LoadImage (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, NW_Bool showImage); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1XAPI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandler.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_CONTENTHANDLER_H -#define NW_WML1X_CONTENTHANDLER_H - -#include "nw_hed_compositecontenthandler.h" -#include "nw_wmlscriptch_iwmlbrowserlib.h" -#include "nw_wmlscriptch_iwmlscriptlistener.h" -#include "nw_markup_numbercollector.h" - -#include "nw_system_timer.h" -#include "nw_hed_domhelper.h" -#include "nw_hed_domtree.h" -#include "nw_text_ucs2.h" -#include "nw_adt_dynamicvector.h" -#include "nw_wml1x_wml1xformliaison.h" -#include "nw_tinydom_utils.h" -#include "BrsrStatusCodes.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_ContentHandler_Class_s NW_Wml1x_ContentHandler_Class_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_ContentHandler_ClassPart_s { - void** unused; -} NW_Wml1x_ContentHandler_ClassPart_t; - -struct NW_Wml1x_ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_CompositeContentHandler_ClassPart_t NW_HED_CompositeContentHandler; - NW_Wml1x_ContentHandler_ClassPart_t NW_Wml1x_ContentHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Wml1x_ContentHandler_s { - NW_HED_CompositeContentHandler_t super; - - /* implemented interfaces */ - NW_WmlsCh_IWmlBrowserLib_t NW_WmlsCh_IWmlBrowserLib; - NW_WmlsCh_IWmlScriptListener_t NW_WmlsCh_IWmlScriptListener; - - /* aggregate(s) */ - NW_Markup_NumberCollector_t NW_Markup_NumberCollector; - - /* member variables */ - NW_Text_t* title; - NW_Text_t* currentUrl; - NW_Wml_t wmlInterpreter; - NW_LMgr_Box_t* currentBox; /* box onto which further content is added as child(ren) */ - NW_Int16 lastId; /* next element Id to be assigned */ - NW_Bool isSuspended; /* whether or not the content handler has been suspended */ - - NW_System_Timer_t* wmlTimer; - - NW_ADT_Map_t *optionMap; /* maps option element ids to option element states */ - NW_Wml1x_FormLiaison_t *formLiaison; /* provides methods needed by FormBoxes */ - NW_Ds_DynamicArray_t *optionItemList; /* copy of the option list item pointers */ - - NW_HED_Context_t* contextSuspended; /* copy of the context at the time of supend or - IntraPageNavigationStarted */ - NW_Bool saveddeck; /* whether the content is retrieved from saved deck - used for setting only-cache mode for url request for embeded element loading */ - NW_Bool histload; /* whether the content is retrieved as result of history load - used for setting histprev cache mode for url request for embeded element loading */ - NW_Bool reload; /* whether the content is retrieved as result of reload - used for setting no cache mode for url request for embeded element loading */ - NW_Bool allowTimer; /* Prevent RESTORE_TASK (Resume) from re-creating timers.*/ - }; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_ContentHandler_ClassPartOf(_object) \ - (NW_Object_GetClassPart (_object, NW_Wml1x_ContentHandler)) - -#define NW_Wml1x_ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_Wml1x_ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Wml1x_ContentHandler_Class_t NW_Wml1x_ContentHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -NW_Wml1x_ContentHandler_DeleteOptionItemList(NW_Ds_DynamicArray_t *itemList); - -extern -NW_HED_DomHelper_t* -NW_Wml1x_ContentHandler_GetDomHelper (NW_Wml1x_ContentHandler_t* thisObj, - NW_Wml_VarList_t* varList); -extern -NW_HED_DomTree_t* -NW_Wml1x_ContentHandler_GetDomTree (NW_Wml1x_ContentHandler_t *thisObj); - -/* retrieve the boolean whether content is saved content */ -extern -NW_Bool -NW_Wml1x_ContentHandler_IsSaveddeck (NW_Wml1x_ContentHandler_t * thisObj); - -/* retrieve the boolean whether content is history load */ -extern -NW_Bool -NW_Wml1x_ContentHandler_IsHistload (NW_Wml1x_ContentHandler_t * thisObj); - -/* retrieve the boolean whether content is reload */ -extern -NW_Bool -NW_Wml1x_ContentHandler_IsReload (NW_Wml1x_ContentHandler_t * thisObj); - -/* set the boolean whether content is the saved content */ -extern -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetSaveddeck (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isSaveddeck); - -/* set the boolean whether content is a history load */ -extern -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetHistload (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isHistload); - -/* set the boolean whether content is a reload */ -extern -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetReload (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isReload); - -extern -void AddImageProperties(NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t *box, - NW_LMgr_PropertyValue_t value); - -extern -TBrowserStatusCode LoadSrcImage( NW_Wml1x_ContentHandler_t* thisObj, NW_Uint16 elId ); - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandleri.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_CONTENTHANDLERI_H -#define NW_WML1X_CONTENTHANDLERI_H - -#include "nw_hed_compositecontenthandleri.h" -#include "nw_wmlscriptch_iwmlbrowserlibi.h" -#include "nw_wmlscriptch_iwmlscriptlisteneri.h" -#include "nw_markup_numbercollectori.h" - - -#include "nw_wml1x_wml1xcontenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -extern const NW_WmlsCh_IWmlBrowserLib_Class_t NW_Wml1x_ContentHandler_IWmlBrowserLib_Class; -extern const NW_WmlsCh_IWmlScriptListener_Class_t NW_Wml1x_ContentHandler_IWmlScriptListener_Class; -extern const NW_Markup_NumberCollector_Class_t NW_Wml1x_ContentHandler_NumberCollector_Class; -extern const NW_Object_Class_t* const _NW_Wml1x_ContentHandler_InterfaceList[]; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_Wml1x_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Initialize (NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree); - -extern -void -_NW_Wml1x_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree); - -extern -void -_NW_Wml1x_ContentHandler_Resume (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_Wml1x_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IntraPageNavigationCompleted (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_Wml1x_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_Wml1x_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode); - -extern -const NW_Text_t* -_NW_Wml1x_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_HandleRequest (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_FeatureQuery (NW_HED_ContentHandler_t* thisObj, - NW_HED_ContentHandler_Feature_t featureId); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Init (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_GetVar (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *var, NW_Ucs2 **ret_string); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_SetVar (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *var, const NW_Ucs2 *value); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Go (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *url, const NW_Ucs2 *param, - NW_Http_Header_t *header); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Prev (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_NewContext (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Refresh (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlScriptListener_Start (NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const NW_Ucs2 *url); - -extern -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlScriptListener_Finish (NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const TBrowserStatusCode status, const NW_Ucs2 *message); - -extern -NW_LMgr_Box_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetBoxTree (NW_Markup_NumberCollector_t* numberCollector); - -extern -NW_Text_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetHrefAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); -extern -NW_Text_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetAltAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -extern -TBrowserStatusCode -HandleInvalidImage( NW_Wml1x_ContentHandler_t *thisObj, - NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode, - NW_Url_Resp_t* response, - void* pElId); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xdefaultstylesheet.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xdefaultstylesheet.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_WML1XDEFAULTSTYLESHEET_H -#define NW_WML1X_WML1XDEFAULTSTYLESHEET_H - -#include "nw_lmgr_box.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_propertylist.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Includes */ - -void NW_Wml1x_ParagraphDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_Box_t *box); - -void NW_Wml1x_BigDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_SmallDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_StrongDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_BoldDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_EmphasisDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_ItalicDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_UnderlineDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - - -void NW_Wml1x_DefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -void NW_Wml1x_ImageWithinAnchorDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_Box_t* box); - -void NW_Wml1x_DefaultCardStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ContainerBox_t* containerBox); - -TBrowserStatusCode NW_Wml1x_AnchorDefaultStyle(NW_LMgr_Property_t* prop, - NW_LMgr_ActiveContainerBox_t* containerBox, - NW_Bool inCache); - -void NW_Wml1x_InputDefaultStyle (NW_LMgr_Box_t *inputBox); - -void NW_Wml1x_SelectDefaultStyle (NW_LMgr_Box_t *selectBox); - -void NW_Wml1x_FieldsetDefaultStyle(NW_LMgr_Box_t* box); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xentityset.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xentityset.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_WML1XENTITYSET_H -#define NW_WML1X_WML1XENTITYSET_H - -#include "nw_hed_entityset.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_EntitySet_Class_s NW_Wml1x_EntitySet_Class_t; -typedef struct NW_Wml1x_EntitySet_s NW_Wml1x_EntitySet_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_EntitySet_ClassPart_s { - void** unused; -} NW_Wml1x_EntitySet_ClassPart_t; - -struct NW_Wml1x_EntitySet_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_HED_EntitySet_ClassPart_t NW_HED_EntitySet; - NW_Wml1x_EntitySet_ClassPart_t NW_Wml1x_EntitySet; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Wml1x_EntitySet_s { - NW_HED_EntitySet_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_EntitySet_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_Wml1x_EntitySet)) - -#define NW_Wml1x_EntitySetOf(_object) \ - (NW_Object_Cast (_object, NW_Wml1x_EntitySet)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Wml1x_EntitySet_Class_t NW_Wml1x_EntitySet_Class; -extern const NW_Wml1x_EntitySet_t NW_Wml1x_EntitySet; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_EntitySet_GetEntityChar(_entitySet, _name) \ - (NW_Object_Invoke (_entitySet, NW_HED_EntitySet, getEntityChar) \ - ((_entitySet), (_name))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_WML1XENTITYSET_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xentityseti.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xentityseti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_WML1XENTITYSETI_H -#define NW_WML1X_WML1XENTITYSETI_H - -#include "nw_hed_entityseti.h" -#include "nw_wml1x_wml1xentityset.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_WML1XENTITYSETI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xeventhandler.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xeventhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_EVENTHANDLER_H -#define NW_WML1X_EVENTHANDLER_H - -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_lmgr_eventhandler.h" -#include "nw_hed_documentnode.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_EventHandler_Class_s NW_Wml1x_EventHandler_Class_t; -typedef struct NW_Wml1x_EventHandler_s NW_Wml1x_EventHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_EventHandler_ClassPart_s { - void** unused; -} NW_Wml1x_EventHandler_ClassPart_t; - -struct NW_Wml1x_EventHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_LMgr_EventHandler_ClassPart_t NW_LMgr_EventHandler; - NW_Wml1x_EventHandler_ClassPart_t NW_EventHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Wml1x_EventHandler_s { - NW_LMgr_EventHandler_t super; - - /* member variables */ - NW_Wml1x_ContentHandler_t* ch; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_EventHandler_ClassPartOf(_object) \ - (((NW_Wml1x_EventHandler_Class_t*) \ - NW_Object_ClassOf(_object))->NW_Wml1x_EventHandler_DeviceContext) - -#define NW_Wml1x_EventHandlerOf(_object) \ - ((NW_Wml1x_EventHandler_t*) (_object)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Wml1x_EventHandler_Class_t NW_Wml1x_EventHandler_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -NW_Wml1x_EventHandler_t* -NW_Wml1x_EventHandler_New (NW_Wml1x_ContentHandler_t* ch); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_EVENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xeventhandleri.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xeventhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_EVENTHANDLERI_H -#define NW_WML1X_EVENTHANDLERI_H - -#include "nw_lmgr_eventhandleri.h" -#include "nw_wml1x_wml1xeventhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_Wml1x_EventHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -NW_Uint8 -_NW_Wml1x_EventHandler_ProcessEvent (NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_EVENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xformliaison.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xformliaison.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_WML1XFORMLIAISON_H -#define NW_WML1X_WML1XFORMLIAISON_H - -#include "nw_fbox_formliaison.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_FormLiaison_Class_s NW_Wml1x_FormLiaison_Class_t; -typedef struct NW_Wml1x_FormLiaison_s NW_Wml1x_FormLiaison_t; - -typedef struct NW_Wml1x_ContentHandler_s NW_Wml1x_ContentHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_Wml1x_FormLiaison_ClassPart_s { - void** unused; -} NW_Wml1x_FormLiaison_ClassPart_t; - -struct NW_Wml1x_FormLiaison_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_FormLiaison_ClassPart_t NW_FBox_FormLiaison; - NW_Wml1x_FormLiaison_ClassPart_t NW_Wml1x_FormLiaison; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_Wml1x_FormLiaison_s { - NW_FBox_FormLiaison_t super; - - /* member variables */ - NW_Wml1x_ContentHandler_t *contentHandler; - NW_Text_t* lastStringValue; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_Wml1x_FormLiaison_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_Wml1x_FormLiaison)) - -#define NW_Wml1x_FormLiaisonOf(object) \ - (NW_Object_Cast (object, NW_Wml1x_FormLiaison)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Wml1x_FormLiaison_Class_t NW_Wml1x_FormLiaison_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -extern -NW_Wml1x_FormLiaison_t* -NW_Wml1x_FormLiaison_New (NW_Wml1x_ContentHandler_t *contentHandler); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_WML1XFORMLIAISON_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xformliaisoni.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xformliaisoni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WML1X_WML1XFORMLIAISONI_H -#define NW_WML1X_WML1XFORMLIAISONI_H - -#include "nw_evt_ecmaevent.h" - -#include "nw_fbox_formliaisoni.h" -#include "nw_object_dynamici.h" -#include "nw_wml1x_wml1xformliaison.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_Construct (NW_Object_Dynamic_t *dynamicObject, - va_list *argp); - -extern -void -_NW_Wml1x_FormLiaison_Destruct(NW_Object_Dynamic_t* dynamicObject); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetWBXMLVersion(NW_FBox_FormLiaison_t *thisObj, - NW_Uint32 *version); -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetInitialStringValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_Length_t maxChars); -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetStringValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_t *value); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_ValidateStringValue (NW_FBox_FormLiaison_t* thisObj, - void* elemId, - const NW_Text_t* value); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_t **valueOut, - NW_Bool *initialValueUsed); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringName(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Ucs2 **nameOut); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringTitle(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Ucs2 **titleOut); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetBoolValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Bool *value); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_ToggleBoolValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetBoolValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Bool *valueOut); - -extern -NW_Bool -_NW_Wml1x_FormLiaison_OptionHasOnPick(NW_FBox_FormLiaison_t *thisObj, - void *elemId); - -extern -NW_Bool -_NW_Wml1x_FormLiaison_IsLocalNavOnPick(NW_FBox_FormLiaison_t *thisObj, - void *elemId); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetDocRoot(NW_FBox_FormLiaison_t *thisObj, - NW_HED_DocumentRoot_t **docRoot); - -extern -TBrowserStatusCode -_NW_Wml1x_FormLiaison_DelegateEcmaEvent(NW_FBox_FormLiaison_t *thisObj, - void* eventNode, - NW_ECMA_Evt_Type_t ecmaEvent); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WML1X_WML1XFORMLIAISONI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/Epoc32Wml1xActiveEvent.cpp --- a/webengine/wmlengine/src/wml1x/src/Epoc32Wml1xActiveEvent.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1075 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> // resolves NULL redefinition warning. - -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_wml1x_wml1xeventhandler.h" -#include "nw_wml1x_wml1xactiveevent.h" -#include "nw_wml1x_wml1xdefaultstylesheet.h" -#include "nw_fbox_checkbox.h" -#include "nw_fbox_radiobox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_hed_appservices.h" -#include "nw_hed_documentroot.h" -#include "nw_fbox_buttonbox.h" -#include "nw_fbox_selectbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_system_optionlist.h" -#include "nw_wae.h" -#include "wml_elm_attr.h" -#include "WmlEngineInterface.h" -#include "nw_dom_domvisitor.h" -#include "nw_hed_domhelper.h" -#include "wml_deck.h" -#include "nw_wml_decoder.h" -#include "wml_decoder.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" - -#include "KimonoLocalizationStrings.h" - -#include <e32std.h> -#include <coemain.h> -#include <bautils.h> -#include "BrsrStatusCodes.h" - -NW_Ucs2* -NW_Str_FurtherTrim(NW_Ucs2 *string) -{ - NW_Text_Length_t trimmedLen; - NW_Text_Length_t i; - NW_Text_Length_t length; - NW_Ucs2* Trimedstr = NULL; - - /*Trim leading and trailing whitespace*/ - Trimedstr = NW_Str_Trim(string, NW_Str_Both); - /*Deal with the tab, CR, LF*/ - trimmedLen = 0; - length = NW_Str_Strlen(Trimedstr); - for (i = 0; i < length; i++) { - if (Trimedstr[i] == NW_TEXT_UCS2_SOFT_HYPHEN) - { - continue; - } - else if ((Trimedstr[i] == NW_TEXT_UCS2_TAB) || (Trimedstr[i] == NW_TEXT_UCS2_NBSP) || - (Trimedstr[i] == NW_TEXT_UCS2_LF) || (Trimedstr[i] == NW_TEXT_UCS2_CR)) { - Trimedstr[trimmedLen++] = ' '; - } - else { - Trimedstr[trimmedLen++] = Trimedstr[i]; - } - } - Trimedstr[trimmedLen] = 0; - NW_Str_CompressWhitespace(Trimedstr); - return Trimedstr; -} - -/************************************************************************ - Function: NW_Wml1x_GetOptionBox - Purpose: Handle <option> element within NW_Wml1x_HandleSelect() - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - Return Values: None -**************************************************************************/ -static -NW_FBox_OptionBox_t* -NW_Wml1x_GetOptionBox (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box) - { - NW_Ucs2 *retString = NULL; - NW_Ucs2 *trimmedRetString = NULL; - NW_FBox_OptionBox_t* optionBox = NULL; - NW_Text_t *optionData = NULL; - - NW_TRY (status) { - NW_Wml1x_ContentHandler_t *thisObj; - NW_Wml1x_EventHandler_t *eventHandler; - NW_LMgr_Box_t *childBox = NULL; - NW_Uint16 childElId = 0; - NW_LMgr_PropertyValue_t value; - NW_Uint32 elIdAsWord = elId; /* NOTE: this exists solely to eliminate a compiler warning */ - void *elIdAsVoidStar = (void *)elIdAsWord; /* NOTE: this exists solely to eliminate a compiler warning */ - NW_ASSERT(ctx != NULL); - - thisObj = NW_Wml1x_ContentHandlerOf(ctx); - - /* create the eventHandler for the <option> element */ - eventHandler = NW_Wml1x_EventHandler_New(NW_Wml1x_ContentHandlerOf(thisObj)); - NW_THROW_OOM_ON_NULL ( eventHandler, status ); - - /* get the NW_Text_t optionData from the <option> content or title */ - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box)) > 0) - { - /* <option> element had content */ - childBox = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), 0); - - /* if child count is greater than zero, then zeroth child had better not be null */ - NW_ASSERT(childBox != NULL); - - /* if the child is a text box, get the text string value */ - if (NW_Object_IsInstanceOf(childBox, &NW_LMgr_TextBox_Class)) - { - /* if the box tree were complete at this point, we could get the - ** text from the box; but since the text box is a child of the option - ** box, the text object has not yet been set on it by NW_UI_ShowCard(). - ** So we must use the WML query service to get the text - */ - /* get the child element id */ - status = NW_LMgr_Box_GetPropertyValue(childBox, - NW_CSS_Prop_elementId, - NW_CSS_ValueType_Integer, - &value); - _NW_THROW_ON_ERROR(status); - - /* get the child element type */ - childElId = NW_UINT16_CAST(value.integer); - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - childElId, - STR_VALUE, - &retString); - if (status == KBrsrOutOfMemory) - { - NW_THROW(status); - } - if (retString != NULL) - { - trimmedRetString = NW_Str_FurtherTrim(retString); - NW_THROW_OOM_ON_NULL ( trimmedRetString, status ); - NW_Mem_Free(retString); - retString = NULL; - - optionData = (NW_Text_t*) - NW_Text_UCS2_New (trimmedRetString, (NW_Text_Length_t)NW_Str_Strlen(trimmedRetString), - NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL ( optionData, status ); - trimmedRetString = NULL; /* prevent deletion */ - } - } - } - if (optionData == NULL) - { - /* no children OR first child not a text box OR null text on text box: - if there is a title attribute, obtain the title string */ - - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TITLE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - { - NW_THROW(status); - } - - if (retString == NULL) - { - retString = NW_Str_NewcpyConst(" "); /* set some text if none returned */ - NW_THROW_OOM_ON_NULL ( retString, status ); - } - optionData = (NW_Text_t*) - NW_Text_UCS2_New (retString, (NW_Text_Length_t)NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL( optionData, status ); - retString = NULL; /* prevent deletion */ - } - - /* create the NEW optionBox */ - optionBox = NW_FBox_OptionBox_New(1, - NW_LMgr_EventHandlerOf (eventHandler), - elIdAsVoidStar, - NW_FBox_FormLiaisonOf (thisObj->formLiaison), - optionData); - NW_THROW_OOM_ON_NULL( optionBox, status ); - optionData = NULL; /* prevent deletion */ - } NW_CATCH (status) { - } NW_FINALLY { - /* not necessary to delete original box's children before returning, - ** since they will be deleted when the original box is deleted - */ - - /* deallocate retString if we still own it */ - if (retString != NULL) - { - NW_Mem_Free(retString); - } - /* deallocate trimmedRetString if we still own it */ - if (trimmedRetString != NULL) - { - NW_Mem_Free(trimmedRetString); - trimmedRetString = NULL; - } - /* deallocate optionData if we still own it */ - if (optionData != NULL) - { - NW_Object_Delete(optionData); - } - return optionBox; - } NW_END_TRY -} - - - -/************************************************************************ - Function: NW_Wml1x_GetOptgroupBox - Purpose: Handle <optgroup> element within NW_Wml1x_HandleSelect() - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - Return Values: None -**************************************************************************/ -static -NW_FBox_OptGrpBox_t* -NW_Wml1x_GetOptgroupBox (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box) -{ - NW_Ucs2 *retString = NULL; - NW_Text_t *optgrpTitle = NULL; - NW_ADT_Vector_Metric_t numChildren = 0; - NW_LMgr_Box_t *childBox = NULL; - NW_FBox_OptGrpBox_t *optgrpBox = NULL; - - NW_TRY (status) { - NW_Wml1x_ContentHandler_t *thisObj; - NW_Wml1x_EventHandler_t *eventHandler; - - NW_ADT_Vector_Metric_t currentChild = 0; - NW_LMgr_PropertyValue_t value; - NW_Wml_ElType_e childElType = UNKNOWN_ELEMENT; - NW_Uint16 childElId = 0; - NW_Wml_Element_t *childEl; - NW_Uint32 elIdAsWord = elId; /* NOTE: this exists solely to eliminate a compiler warning */ - void *elIdAsVoidStar = (void *)elIdAsWord; /* NOTE: this exists solely to eliminate a compiler warning */ - - NW_ASSERT(ctx != NULL); - - thisObj = NW_Wml1x_ContentHandlerOf(ctx); - - /* don't bother with this element if no children */ - if ((numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box))) == 0) - { - NW_THROW(status); - } - - /* get title for the optgrpBox */ - /* see CUIS 27.0 2.10.1.2 "Optgroup Element": label then title */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - LABEL_ATTR, - &retString); - if (status == KBrsrOutOfMemory) { - NW_THROW(status); - } - - if (retString == NULL) { - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TITLE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) { - NW_THROW(status); - } - } - - if (retString != NULL) { - optgrpTitle = (NW_Text_t*) - NW_Text_UCS2_New (retString, (NW_Text_Length_t)NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL( optgrpTitle, status ); - retString = NULL; /* prevent deletion */ - } - - /* create the eventHandler for the <optgroup> element */ - eventHandler = NW_Wml1x_EventHandler_New(NW_Wml1x_ContentHandlerOf(thisObj)); - NW_THROW_OOM_ON_NULL( eventHandler, status ); - - /* create the NEW optgrpBox */ - optgrpBox = NW_FBox_OptGrpBox_New(1, - NW_LMgr_EventHandlerOf (eventHandler), - elIdAsVoidStar, - NW_FBox_FormLiaisonOf (thisObj->formLiaison), - optgrpTitle); - NW_THROW_OOM_ON_NULL( optgrpBox, status ); - optgrpTitle = NULL; /* prevent deletion */ - - /* iterate over the child nodes of the original <optgroup> box, adding option elements to the new optgrpBox */ - currentChild = 0; - while (currentChild < numChildren) - { - childBox = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), currentChild); - if (childBox) - { - /* get the child element id */ - status = NW_LMgr_Box_GetPropertyValue(childBox, - NW_CSS_Prop_elementId, - NW_CSS_ValueType_Integer, - &value); - _NW_THROW_ON_ERROR(status); - - /* get the child element type */ - childElId = NW_UINT16_CAST(value.integer); - status = NW_Wml_GetElementType(&(thisObj->wmlInterpreter), - childElId, - &childElType, - &childEl); - _NW_THROW_ON_ERROR(status); - - /* WAP-191-WML allows nested <optgroup> elements */ - if (childElType == OPTGRP_ELEMENT) - { - NW_FBox_OptGrpBox_t* childOptgrpBox; - - childOptgrpBox = NW_Wml1x_GetOptgroupBox(thisObj, - childElId, - childBox); - NW_THROW_OOM_ON_NULL( childOptgrpBox, status ); - - NW_FBox_OptGrpBox_AddOptGrp(optgrpBox, childOptgrpBox); - - } - else if (childElType == OPTION_ELEMENT) - { - NW_FBox_OptionBox_t* optionBox; - - optionBox = NW_Wml1x_GetOptionBox(thisObj, - childElId, - childBox); - NW_THROW_OOM_ON_NULL( optionBox, status ); - - NW_FBox_OptGrpBox_AddOption(optgrpBox, optionBox); - - } - else - { - NW_ASSERT(0); - status = KBrsrWmlbrowserBadContent; - NW_THROW(status); - } - } - else - { - NW_ASSERT(childBox); - status = KBrsrFailure; /* we asked for a childBox using a valid index and got a NULL */ - NW_THROW(status); - } - currentChild++; - } - } NW_CATCH (status) { - } NW_FINALLY { - /* not necessary to delete original box's children before returning, - ** since they will be deleted when the original box is deleted - */ - - /* deallocate retString if we still own it */ - if (retString != NULL) - { - NW_Mem_Free(retString); - } - /* deallocate optgrpTitle if we still own it */ - if (optgrpTitle != NULL) - { - NW_Object_Delete(optgrpTitle); - } - return optgrpBox; - } NW_END_TRY -} - -/************************************************************************ - Function: NW_Wml1x_HandleDo () - Purpose: Handle do element UI event. - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - deletebox - pointer to pointer to box to be deleted - Return Values: None -**************************************************************************/ -TBrowserStatusCode NW_Wml1x_HandleDo (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_LMgr_Box_t **deleteBox) -{ - TBrowserStatusCode status; - NW_Wml1x_ContentHandler_t *thisObj; - NW_Ucs2* labelString = NULL; - NW_Ucs2* typeString = NULL; - NW_Uint16 elementType = 0; - - static const NW_Ucs2 acceptStr[] = {'a','c','c','e','p','t',0}; - static const NW_Ucs2 prevStr[] = {'p','r','e','v',0}; - static const NW_Ucs2 helpStr[] = {'h','e','l','p',0}; - static const NW_Ucs2 resetStr[] = {'r','e','s','e','t',0}; - static const NW_Ucs2 optionsStr[] = {'o','p','t','i','o','n','s',0}; - static const NW_Ucs2 deleteStr[] = {'d','e','l','e','t','e',0}; - static const NW_Ucs2 unknownStr[] = {'u','n','k','n','o','w','n',0}; - static const NW_Ucs2 experimentalStr[] = {'x','-'}; - static const NW_Ucs2 vendorStr[] = {'v','n','d','.'}; - - NW_ASSERT(ctx != NULL); - thisObj = NW_Wml1x_ContentHandlerOf(ctx); - - NW_REQUIRED_PARAM (box); - NW_REQUIRED_PARAM (deleteBox); - - /* get label attribute */ - status = NW_Wml_GetAttribute (&(thisObj->wmlInterpreter), - elId, - LABEL_ATTR, - &labelString); - if (status != KBrsrSuccess) { - return status; - } - - /* get type attribute */ - status = NW_Wml_GetAttribute (&(thisObj->wmlInterpreter), - elId, - TYPE_ATTR, - &typeString); - - if (status != KBrsrSuccess) { - return status; - } - - /* determine element type */ - if (typeString == NULL) { - elementType = TWmlEngineDefs::WML_OPTION_UNKNOWN; - } - else if (!NW_Str_Strcmp(typeString, acceptStr)) { - elementType = TWmlEngineDefs::WML_OPTION_ACCEPT; - } - else if (!NW_Str_Strcmp(typeString, prevStr)) { - elementType = TWmlEngineDefs::WML_OPTION_PREV; - } - else if (!NW_Str_Strcmp(typeString, helpStr)) { - elementType = TWmlEngineDefs::WML_OPTION_HELP; - } - else if (!NW_Str_Strcmp(typeString, resetStr)) { - elementType = TWmlEngineDefs::WML_OPTION_RESET; - } - else if (!NW_Str_Strcmp(typeString, optionsStr)) { - elementType = TWmlEngineDefs::WML_OPTION_OPTIONS; - } - else if (!NW_Str_Strcmp(typeString, deleteStr)) { - elementType = TWmlEngineDefs::WML_OPTION_DELETE; - } - else if ((*typeString == 0) ||(!NW_Str_Strcmp(typeString, unknownStr))) { - elementType = TWmlEngineDefs::WML_OPTION_UNKNOWN; - } - else if (!NW_Str_Strnicmp(typeString,experimentalStr,NW_Str_Strlen(experimentalStr))) { - elementType = 0; - } - else if (!NW_Str_Strnicmp(typeString,vendorStr,NW_Str_Strlen(vendorStr))) { - elementType = 0; - } - else { - elementType = TWmlEngineDefs::WML_OPTION_UNKNOWN; - } - - - /* if there's a label - use it */ - if (labelString != NULL) { - /* make a copy of the retString pointer to array for future clean up */ - if (thisObj->optionItemList == NULL) { - thisObj->optionItemList = NW_Ds_DarNew_DefaultHeap(16); - } - - /* Add the item pointer to the array */ - NW_Ds_DarAppend(thisObj->optionItemList, labelString); - - /* delete unnecessary typeString */ - NW_Str_Delete(typeString); - } - else { - /* if element type is defined - use it to determine label */ - if (elementType!=0) { - NW_Str_Delete(typeString); - } - /* if element type is not known - use it as a label */ - else { - labelString = typeString; - } - /* make a copy of the retString pointer to array for future clean up */ - if (thisObj->optionItemList == NULL) { - thisObj->optionItemList = NW_Ds_DarNew_DefaultHeap(16); - } - /* Add the item pointer to the array */ - NW_Ds_DarAppend(thisObj->optionItemList, labelString); - } - - NW_HED_DocumentRoot_t *docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(thisObj); - - NW_ASSERT(docRoot != NULL); - NW_ASSERT(docRoot->appServices != NULL); - - NW_System_OptionList_AddItem(labelString, (NW_Uint32) elId, elementType); - - return status; -} - - -/************************************************************************ - Function: NW_Wml1x_HandleSelect - Purpose: Handle <select> element within UI ShowCard - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - currentSelectMultipleState - ptr to var to get value of MULTIPLE attribute - currentSelectTabIndexVal - ptr to var to get value of TABINDEX attribute - Return Values: None -**************************************************************************/ -TBrowserStatusCode NW_Wml1x_HandleSelect (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_LMgr_Box_t **deleteBox, - NW_Bool *currentSelectMultipleState, - NW_Int32 *currentSelectTabIndexVal) -{ - NW_ADT_Vector_Metric_t numChildren = 0; - NW_FBox_SelectBox_t *selectBox = NULL; - NW_LMgr_Box_t *childBox = NULL; - - NW_TRY (status) { - NW_Ucs2 *retString = NULL; - NW_Ucs2 *titleStr = NULL; - NW_Wml1x_ContentHandler_t *thisObj = NULL; - NW_HED_DocumentRoot_t *docRoot; - NW_LMgr_ContainerBox_t *parentBox = NULL; - NW_FBox_SelectBox_t *tempSelectBox = NULL; - NW_Wml1x_EventHandler_t *eventHandler; - NW_Text_t *temptext; - NW_Text_t *titleText; - NW_ADT_Vector_Metric_t currentChild = 0; - NW_LMgr_PropertyValue_t value; - NW_Wml_ElType_e childElType = UNKNOWN_ELEMENT; - NW_Uint16 childElId = 0; - NW_Wml_Element_t *childEl = NULL; - NW_Uint32 elIdAsWord = elId; /* NOTE: this exists solely to eliminate a compiler warning */ - void *elIdAsVoidStar = (void *)elIdAsWord; /* NOTE: this exists solely to eliminate a compiler warning */ - - NW_ASSERT(ctx != NULL); - NW_REQUIRED_PARAM (box); - - thisObj = NW_Wml1x_ContentHandlerOf(ctx); - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(thisObj); - - NW_ASSERT(docRoot != NULL); - NW_ASSERT(docRoot->appServices != NULL); - - - *currentSelectMultipleState = NW_FALSE; /* defaults to NW_FALSE */ - *currentSelectTabIndexVal = 0; - - /* don't bother with this element if no children */ - if ((numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(box))) == 0) - { - NW_THROW(status); - } - - /* determine value of multiple attribute */ - retString = NULL; - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - MULTIPLE_ATTR, - &retString); - _NW_THROW_ON_ERROR(status); - - if (retString && (NW_Str_StrcmpConst(retString, WAE_ASC_TRUE_STR) == 0) ) - *currentSelectMultipleState = NW_TRUE; - - NW_Str_Delete(retString); - retString = NULL; - - /* get the TABINDEX_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TABINDEX_ATTR, - &retString); - _NW_THROW_ON_ERROR(status); - - if (retString != NULL) - { - /* convert string to tab index value */ - *currentSelectTabIndexVal = NW_Str_Atoi(retString); - *currentSelectTabIndexVal = (*currentSelectTabIndexVal > 0) ? *currentSelectTabIndexVal : 0; - NW_Str_Delete(retString); - retString = NULL; - } - - /* get the name attribute if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - NAME_ATTR, - &retString); - _NW_THROW_ON_ERROR(status); - - if (retString == NULL) - { - retString = NW_Str_NewcpyConst(" "); /* set some text if none returned */ - NW_THROW_OOM_ON_NULL (retString, status); - } - - temptext = (NW_Text_t*) NW_Text_UCS2_New (retString, 0, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL (temptext, status); - - /* get the title attribute if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TITLE_ATTR, - &titleStr); - _NW_THROW_ON_ERROR(status); - - titleText = NULL; - if(titleStr != NULL) { - titleText = (NW_Text_t*) NW_Text_UCS2_New (titleStr, 0, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL ( titleText, status ); - } - - /* create the eventHandler for the select box */ - eventHandler = NW_Wml1x_EventHandler_New(NW_Wml1x_ContentHandlerOf(thisObj)); - NW_THROW_OOM_ON_NULL ( eventHandler, status ); - - /* create the selectBox and insert in box tree */ - selectBox = - NW_FBox_SelectBox_New(1, - NW_LMgr_EventHandlerOf (eventHandler), - elIdAsVoidStar, /* elementNode, */ - NW_FBox_FormLiaisonOf (thisObj->formLiaison), - docRoot->appServices, - *currentSelectMultipleState, - temptext, - titleText); - NW_THROW_OOM_ON_NULL ( selectBox, status ); - - /* first, determine the parent of the original container box - * and then insert the new select box in front of the original container box - * finally, mark the original container box for later deletion - */ - parentBox = NW_LMgr_Box_GetParent(box); - - status = NW_LMgr_ContainerBox_InsertChild(parentBox, - NW_LMgr_BoxOf(selectBox), - box); - _NW_THROW_ON_ERROR(status); - /* add style properties only after box has been added to box tree (in case of relative styles) */ - NW_Wml1x_SelectDefaultStyle(NW_LMgr_BoxOf(selectBox)); - - /* add a break box per CUIS - childBox = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New((NW_ADT_Vector_Metric_t)1); - NW_THROW_OOM_ON_NULL ( childBox, status ); - - status = NW_LMgr_ContainerBox_InsertChild(parentBox, childBox, box); - _NW_THROW_ON_ERROR(status);*/ - - tempSelectBox = selectBox; /* save pointer for later use */ - selectBox = NULL; /* prevent deletion during cleanup */ - - /* iterate over the child nodes, adding optgroup and option elements to the select box */ - currentChild = 0; - while (currentChild < numChildren) - { - childBox = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), currentChild); - if (childBox) - { - /* get the child element id */ - status = NW_LMgr_Box_GetPropertyValue(childBox, - NW_CSS_Prop_elementId, - NW_CSS_ValueType_Integer, - &value); - _NW_THROW_ON_ERROR(status); - - /* get the child element type */ - childElId = NW_UINT16_CAST(value.integer); - status = NW_Wml_GetElementType(&(thisObj->wmlInterpreter), - childElId, - &childElType, - &childEl); - _NW_THROW_ON_ERROR(status); - - /* handle <optgroup> and <option> elements only */ - if (childElType == OPTGRP_ELEMENT) - { - NW_FBox_OptGrpBox_t* optgrpBox; - - optgrpBox = NW_Wml1x_GetOptgroupBox(thisObj, childElId, childBox); - - NW_THROW_OOM_ON_NULL (optgrpBox, status); - - NW_FBox_SelectBox_AddOptGrp(tempSelectBox, optgrpBox); - - } - else if (childElType == OPTION_ELEMENT) - { - NW_FBox_OptionBox_t* optionBox; - - optionBox = NW_Wml1x_GetOptionBox(thisObj, childElId, childBox); - - NW_THROW_OOM_ON_NULL (optionBox, status); - - NW_FBox_SelectBox_AddOption(tempSelectBox, optionBox,NULL); - - } - else - { - NW_ASSERT((childElType == OPTGRP_ELEMENT) || (childElType == OPTION_ELEMENT)); - status = KBrsrWmlbrowserBadContent; - NW_THROW(status); - } - } - else - { - NW_ASSERT(childBox); - NW_THROW_STATUS( status, KBrsrFailure ); /* we asked for a childBox using a valid index and got a NULL */ - } - currentChild++; - } - - } NW_CATCH (status) { - } NW_FINALLY { - /* delete original box's children before returning, so the boxVisitor won't get confused */ - while (numChildren > 0) - { - numChildren--; /* predecrement for use as index */ - childBox = NW_LMgr_ContainerBox_GetChild (NW_LMgr_ContainerBoxOf(box), numChildren); - if (childBox) - { - NW_LMgr_ContainerBox_RemoveChild (NW_LMgr_ContainerBoxOf(box), childBox); - NW_Object_Delete(childBox); - } - } - - *deleteBox = box; /* mark old container for later deletion */ - - /* deallocate selectBox if we still own it */ - if (selectBox != NULL) - { - NW_Object_Delete(selectBox); - } - return status; - } NW_END_TRY -} - - -/************************************************************************ - Function: NW_Wml1x_HandleOption - Purpose: Handle <option> element within UI ShowCard - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - currentSelectMultipleState - value of MULTIPLE attribute - currentSelectTabIndexVal - value of TABINDEX attribute - Return Values: None -**************************************************************************/ -TBrowserStatusCode NW_Wml1x_HandleOption (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_Bool currentSelectMultipleState, - NW_Int32 currentSelectTabIndexVal) -{ - NW_REQUIRED_PARAM(ctx); - NW_REQUIRED_PARAM(elId); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(currentSelectMultipleState); - NW_REQUIRED_PARAM(currentSelectTabIndexVal); - - return KBrsrFailure; /* this function ought not get invoked by NW_UI_Show_Card() or anyone else */ -} - - -/************************************************************************ - Function: NW_Wml1x_HandleOptgroup - Purpose: Handle <optgroup> element within UI ShowCard - Parameters: ctx - pointer to the Wml1x Content Handler. - elId - WML element Id property of box - box - LMgr box pointer - currentSelectMultipleState - ptr to var containing value of MULTIPLE attribute - currentSelectTabIndexVal - ptr to var containing value of TABINDEX attribute - Return Values: None -**************************************************************************/ -TBrowserStatusCode NW_Wml1x_HandleOptgroup (void *ctx, - NW_Uint16 elId, - NW_LMgr_Box_t *box) -{ - - NW_REQUIRED_PARAM(ctx); - NW_REQUIRED_PARAM(elId); - NW_REQUIRED_PARAM(box); - - return KBrsrFailure; /* this function ought not get invoked by NW_UI_Show_Card() or anyone else */ -} - -/***************************************************************** - - Name: NW_Wml1x_GetUrl() - - Description: finds the URL for <a> or <anchor> elements, looking in <go> and <prev> if needed. - - Parameters: - wmlInterpreter - In - pointer to the wml interpreter with deck info - elId - In - the element id of the <a> or <anchor> element being processed - retUrl - Out - pointer to the resulting URL - isPrev - Out - pointer to Bool indicating a <prev> task. - - Algorithm: - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - -*****************************************************************/ -TBrowserStatusCode -NW_Wml1x_GetURL(NW_Wml_t *wmlInterpreter, - NW_Uint16 elId, - NW_Ucs2 **retURL, - NW_Bool *isPrev) -{ - NW_Wml_Element_t *el; - NW_Wml_ElType_e elType; - NW_cXML_DOM_DOMVisitor_t *visitor = NULL; - NW_DOM_Node_t *nextNode = NULL; - NW_HED_DomHelper_t *domHelper; - - NW_TRY (status) { - - *isPrev = NW_FALSE; - - /* establish *el */ - status = NW_Wml_GetElementType(wmlInterpreter, elId, &elType, &el); - _NW_THROW_ON_ERROR(status); - - /* get the domHelper and set the context */ - domHelper = NW_Wml_Deck_GetDomHelper (wmlInterpreter->decoder->domDeck, wmlInterpreter->var_list); - status = NW_Wml_GetAttribute(wmlInterpreter, - elId, - HREF_ATTR, - retURL); - _NW_THROW_ON_ERROR(status); - if (*retURL == NULL) - { - /* this could be an <anchor> element, which has no HREF_ATTR. Find the <go> element if any and get its href */ - - /* create another dom vistor to cruise this sub- DOM tree for the task element */ - visitor = NW_cXML_DOM_DOMVisitor_New ((NW_DOM_Node_t*) el->domElement); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* while there are more element nodes and <go> has not been found */ - status = KBrsrSuccess; - while ((nextNode = NW_cXML_DOM_DOMVisitor_Next(visitor, NW_DOM_ELEMENT_NODE)) != NULL) - { - if (NW_HED_DomHelper_GetElementToken(nextNode) == NW_Wml_1_3_ElementToken_go) - { - /* get the Href from DOM */ - NW_String_t value; - - status = NW_HED_DomHelper_GetAttributeValue(domHelper, - (NW_DOM_ElementNode_t*)nextNode, - NW_Wml_1_3_AttributeToken_href, - &value); - if (status == KBrsrSuccess) { - *retURL = (NW_Ucs2*) value.storage; - value.storage = NULL; - } - _NW_THROW_ON_ERROR(status); - break; - } - else if (NW_HED_DomHelper_GetElementToken(nextNode) == NW_Wml_1_3_ElementToken_prev) - { - *isPrev = NW_TRUE; - /* it's a <prev> - caller decides what to use. */ - break; - } - } - - NW_Object_Delete (visitor); - visitor = NULL; - } - - } NW_CATCH (status) { - } NW_FINALLY { - - /* get the domHelper again, passing null in the var-list param so the context - ** is deleted - */ - (void) NW_Wml_Deck_GetDomHelper (wmlInterpreter->decoder->domDeck, NULL); - NW_Object_Delete (visitor); - - return status; - } NW_END_TRY -} -/***************************************************************** - - Name: NW_Wml1x_FixupAnchorText() - - Description: CUIS requires that an <a> or <anchor> element that - lacks content be represented by the title attribute - value or the href attribute value if no title. - This function enforces that behavior. - - Parameters: - wmlInterpreter - In - pointer to the wml interpreter with deck info - elId - In - the element id of the <a> or <anchor> element being processed - containerBox - In - pointer to the <a> or <anchor> box - appServices - In - provides access point to "GetLocalizationString" for "Back" option labeling - - Algorithm: - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - - -*****************************************************************/ -TBrowserStatusCode -NW_Wml1x_FixupAnchorText (NW_Wml_t *wmlInterpreter, - NW_Uint16 elId, - NW_LMgr_ContainerBox_t *containerBox, - NW_HED_AppServices_t* appServices) -{ - NW_Bool found = NW_FALSE; - NW_Wml_Element_t *el; - NW_Wml_ElType_e elType; - NW_cXML_DOM_DOMVisitor_t *visitor = NULL; - NW_DOM_Node_t *nextNode = NULL; - NW_String_t childText; - NW_HED_DomHelper_t *domHelper; - NW_LMgr_TextBox_t *newTextBox = NULL; - NW_Ucs2 *retString = NULL; - NW_Text_t *temptext = NULL; - NW_Uint8 textFlag = NW_Text_Flags_TakeOwnership; - NW_Bool isPrev = NW_FALSE; - - static const NW_Ucs2 BackStr[] = {'B','a','c','k',0}; - - /* if the containerbox has no TEXT or IMAGE children, insert as child - ** a text box containing the title attribute (1st priority) or - ** the href attribute value (2nd priority)) - ** If there is neither a title nor an href, perhaps this was an <anchor> - ** element, so look for a contained <go> task (use its href) or a <prev> - ** task (use "text_softkey_back"). - */ - - NW_TRY (status) { - - /* establish *el */ - status = NW_Wml_GetElementType(wmlInterpreter, elId, &elType, &el); - _NW_THROW_ON_ERROR(status); - - /* get the domHelper and set the context */ - domHelper = NW_Wml_Deck_GetDomHelper (wmlInterpreter->decoder->domDeck, wmlInterpreter->var_list); - - if (NW_LMgr_ContainerBox_GetChildCount(containerBox) != 0) - { - /* create a dom vistor to cruise this sub- DOM tree for text or image content */ - visitor = NW_cXML_DOM_DOMVisitor_New ((NW_DOM_Node_t*) el->domElement); - NW_THROW_OOM_ON_NULL (visitor, status); - - /* while there are more nodes and neither Image nor Text have been found */ - while ((nextNode = NW_cXML_DOM_DOMVisitor_Next(visitor, - NW_DOM_TEXT_NODE | NW_DOM_ELEMENT_NODE)) != NULL) - { - if (NW_HED_DomHelper_GetElementToken (nextNode) == NW_Wml_1_3_ElementToken_img) - { - found = NW_TRUE; - break; - } - - if (NW_DOM_Node_getNodeType(nextNode) == NW_DOM_TEXT_NODE) - { - /* get the text */ - status = NW_HED_DomHelper_GetText (domHelper, nextNode, NW_TRUE, &childText, NULL); - _NW_THROW_ON_ERROR(status); - - /* check the text */ - if ((childText.storage != NULL) && ((childText.storage[0] != '\0') || (childText.storage[1] != '\0'))) - { - found = NW_TRUE; - } - /* discard the text */ - NW_String_deleteStorage (&childText); - if (found) - { - break; - } - } - } - - NW_Object_Delete (visitor); - visitor = NULL; - - } - - if (!found) /* no content - fixup required */ - { - /* get the TITLE_ATTR value if any */ - retString = NULL; - status = NW_Wml_GetAttribute(wmlInterpreter, - elId, - TITLE_ATTR, - &retString); - _NW_THROW_ON_ERROR(status); - if (retString == NULL) - { - status = NW_Wml1x_GetURL(wmlInterpreter, - elId, - &retString, - &isPrev); - if (isPrev) - { - retString = appServices->getLocalizedStringAPI.getLocalizedString( EKmLocBackSoftkeyLabel ); - if (!retString) - { - retString = (NW_Ucs2*) BackStr; - textFlag = 0; - } - } - } - - if (retString != NULL) - { - temptext = (NW_Text_t*)NW_Text_UCS2_New(retString, - NW_Str_Strlen(retString), - textFlag); - NW_THROW_OOM_ON_NULL (temptext, status); - - newTextBox = NW_LMgr_TextBox_New(1, NW_TextOf(temptext)); - NW_THROW_OOM_ON_NULL (newTextBox, status); - - temptext = NULL; - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(containerBox), - NW_LMgr_BoxOf(newTextBox)); - _NW_THROW_ON_ERROR(status); - newTextBox = NULL; - } - } - - } NW_CATCH (status) { - } NW_FINALLY { - - /* get the domHelper again, passing null in the var-list param so the context - ** is deleted - */ - (void) NW_Wml_Deck_GetDomHelper (wmlInterpreter->decoder->domDeck, NULL); - NW_Object_Delete (visitor); - - NW_Object_Delete(temptext); - NW_Object_Delete(newTextBox); - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XApi.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XApi.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2804 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* Includes */ -#include "nwx_string.h" -#include "nwx_url_utils.h" -#include "nw_errnotify.h" -#include "nwx_url_utils.h" -#include "nwx_http_header.h" -#include "nw_wml_api.h" -#include "nw_wml_core.h" -#include "nwx_logger.h" -#include "nw_hed_documentroot.h" -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_wml1x_wml1xeventhandler.h" -#include "nw_wml1x_wml1xdefaultstylesheet.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_emptybox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_image_cannedimages.h" -#include "nw_image_virtualimage.h" -#include "nw_text_ascii.h" -#include "nw_text_ucs2.h" -#include "nw_adt_map.h" -#include "nw_adt_dynamicvector.h" -#include "nw_fbox_formliaison.h" -#include "nw_fbox_checkbox.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_wml1x_wml1xactiveevent.h" -#include "nwx_settings.h" -#include "nw_lmgr_accesskey.h" -#include "wml_elm_attr.h" -#include "nw_markup_wmlvalidator.h" -#include "nw_system_optionlist.h" -#include "HEDDocumentListener.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_lmgr_animatedimagebox.h" - -#include "nw_hed_historyvisitor.h" -#include "urlloader_urlloaderint.h" -#include "MVCView.h" -#include "nw_wml1x_wml1xapi.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" -#include "bodypart.h" -#include "MVCShell.h" -#include "BrCtl.h" -#include "MemoryManager.h" - -/* -**------------------------------------------------------------------------- -** Local Macros -**------------------------------------------------------------------------- -*/ -#define NW_MSEC_PER_WML_TICK 100 -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -/* display functions called by the WML Browser */ -static TBrowserStatusCode NW_UI_CreateCard(void *wae); -static TBrowserStatusCode NW_UI_ShowCard(void *wae); -static TBrowserStatusCode NW_UI_DestroyCard(void *wae); -static TBrowserStatusCode NW_UI_AddElement(void *wae, NW_Wml_ElType_e elemType, - NW_Int16 *elemId); -static TBrowserStatusCode NW_UI_CleanUp(void *wae); -static TBrowserStatusCode NW_UI_SetOptState(void *wae, NW_Uint16 elemId, NW_Bool st); -static TBrowserStatusCode NW_UI_GetOptState(void *wae, NW_Uint16 elemId, NW_Bool* st); -static TBrowserStatusCode NW_UI_Refresh(void *wae); - -static TBrowserStatusCode NW_Wml1x_CreateTimer(void *usrAgent, NW_Uint32 period); -static TBrowserStatusCode NW_Wml1x_ReadTimer(void *usrAgent, NW_Uint32 *period); -static TBrowserStatusCode NW_Wml1x_DestroyTimer(void *usrAgent); -static TBrowserStatusCode NW_Wml1x_ResumeTimer(void *usrAgent); -static TBrowserStatusCode NW_Wml1x_StopTimer(void *usrAgent); -static TBrowserStatusCode NW_Wml1x_IsTimerRunning(void *usrAgent, NW_Bool *isRunning); -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -/* WML Core Routines. */ -static const NW_DisplayApi_t panel_api = -{ - NW_UI_CreateCard, - NW_UI_ShowCard, - NW_UI_DestroyCard, - NW_UI_AddElement, - NW_UI_CleanUp, - NW_UI_GetOptState, - NW_UI_SetOptState, - NW_UI_Refresh, -}; - -/*Timer API wrappers for WML 1.x content handler*/ -static const NW_TimerApi_t Wml1x_timer_api = -{ - NW_Wml1x_CreateTimer, - NW_Wml1x_ReadTimer, - NW_Wml1x_DestroyTimer, - NW_Wml1x_ResumeTimer, - NW_Wml1x_StopTimer, - NW_Wml1x_IsTimerRunning -}; - - -static const NW_WmlApi_t wml_api = -{ - &panel_api, - &Wml1x_timer_api -}; - -/* Additional constants */ -static const NW_Ucs2 monospace[] = {'m', 'o', 'n', 'o', 's', 'p', 'a', 'c', 'e', '\0'}; -static const NW_Ucs2 spaceString[] = {NW_TEXT_UCS2_NBSP,'\0'}; - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ - - -/***************************************************************** - - Name: NW_UI_SetParagraphProperties() - - Description: set wrap and alignment paragraph properties - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - elId - In - the element id of the <p> element being processed, used in the WML query service - box - In - pointer to the box tree node representing the <p> element - nowrap - In/Out - pointer to boolean in which to maintain current nowrap property value - - Algorithm: wrap property is 'sticky' from previous paragraphs - alignment is left unless attribute set otherwise - - Return Value: KBrsrOutOfMemory - KBrsrSuccess - -*****************************************************************/ -static -TBrowserStatusCode -NW_UI_SetParagraphProperties (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_LMgr_Box_t *box, - NW_Bool *nowrap, - NW_LMgr_Box_t **deleteBox) -{ - - NW_LMgr_ContainerBox_t *container = NW_LMgr_ContainerBoxOf(box); - NW_ADT_DynamicVector_t *children = NW_LMgr_ContainerBoxOf(box)->children; - NW_Ucs2 *retString = NULL; - NW_LMgr_PropertyValue_t value; - NW_LMgr_Property_t prop; - - NW_TRY (status) { - /* We must ignore empty P elements, see [WAP WML] */ - if (NW_ADT_Vector_GetSize(children) == 0) { - *deleteBox = box; - NW_THROW_SUCCESS(status); - } - else if (NW_ADT_Vector_GetSize(children) == 1) { - NW_LMgr_Box_t *child = NW_LMgr_ContainerBox_GetChild(container, 0); - if (NW_Object_IsClass(child, &NW_LMgr_TextBox_Class)) { - /* if the box tree were complete here, we could query the text box to see if it is blank - but since the text box has not yet been visited by the ShowCard() process, such a query - will always return blank! Instead, query the wmlInterpreter for the STR_VALUE of the element */ - status = NW_LMgr_Box_GetPropertyValue(child, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - - if (status == KBrsrSuccess) { - NW_Uint16 childElId = 0; - - childElId = NW_UINT16_CAST(value.integer); - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - childElId, - STR_VALUE, - &retString); - NW_THROW_ON (status, KBrsrOutOfMemory); - if (retString == NULL) { - /* must delete the child of box here, before the ShowCard() box visitor accesses it. */ - status = NW_LMgr_ContainerBox_RemoveChild(container, - child); - NW_Object_Delete(child); - *deleteBox = box; - NW_THROW_SUCCESS(status); - } - else { - NW_Uint32 i; - NW_Uint32 j; - - /* if all the characters are whitespace then throw(success)*/ - j = NW_Str_Strlen(retString); - for (i = 0; i < j; i++) { - if (!NW_Str_Isspace(retString[i])) { - break; - } - } - if (i == j) { - NW_THROW_SUCCESS(status); - } - NW_Str_Delete(retString); - retString = NULL; - } - } - } - } - - /* Get the wrap mode attribute */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - MODE_ATTR, - &retString); - NW_THROW_ON (status, KBrsrOutOfMemory); - - if (retString != NULL) { - if (NW_Str_StricmpConst(retString,WAE_ASC_WRAP_STR)==0) { - *nowrap = NW_FALSE; - } else if (NW_Str_StricmpConst(retString,WAE_ASC_NOWRAP_STR)==0) { - *nowrap = NW_TRUE; - } - - NW_Str_Delete(retString); - retString = NULL; - } - - /* If no wrap mode is set, we inherit the wrap property of the - previous paragraph */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = (*nowrap) ? NW_CSS_PropValue_nowrap : NW_CSS_PropValue_normal; - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_whitespace, &prop); - - /* Get the alignment attribute */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ALIGN_ATTR, - &retString); - NW_THROW_ON (status, KBrsrOutOfMemory); - - if (retString != NULL) { - if (NW_Str_StricmpConst(retString,WAE_ASC_CENTER_STR) == 0) { - prop.value.token = NW_CSS_PropValue_center; - } - else if (NW_Str_StricmpConst(retString,WAE_ASC_RIGHT_STR) == 0) { - prop.value.token = NW_CSS_PropValue_right; - } - else { - prop.value.token = NW_CSS_PropValue_left; - } - - NW_Str_Delete(retString); - } - else { - prop.value.token = NW_CSS_PropValue_left; - } - - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_textAlign, &prop); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_SetCellProperties() - - Description: set cell border properties - - Parameters: - box - In - pointer to the box tree node representing the <td> element - - Algorithm: - - Return Value: KBrsrSuccess - -*****************************************************************/ -static -TBrowserStatusCode -NW_UI_SetCellProperties (NW_LMgr_Box_t *box) -{ - NW_LMgr_Property_t prop; - - NW_TRY (status) { - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_hidden; - status = NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_overflow, &prop); - - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - }NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_NormalizeTable() - - Description: perform WML table column width processing - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - elId - In - the element id of the element being processed, used in the WML query service - box - In - pointer to the box tree node representing the element - - Algorithm: - - * The behavior of WML Tables is not exactly like the behavior of CSS Tables. - * Two issues in particular need to be addressed: - * 1) Since the CSS Static Algorithm used in the Layout Manager - * calculates the dimensions of the table based on the head row, the table - * will contain only as many columns as there are in the first row. In WML - * this information is passed in the "columns" attribute. Here we pad the - * first row if it does not contain enough cells. - * 2) in WML, any extra cells in a row are "aggregated" into the last cell. - - Return Value: KBrsrOutOfMemory - KBrsrSuccess - various other TBrowserStatusCode values - -*****************************************************************/ -static -TBrowserStatusCode -NW_UI_NormalizeTable (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_LMgr_Box_t *box) -{ - NW_LMgr_Box_t *newBox = NULL; - NW_LMgr_Box_t *tmpBox = NULL; - NW_Text_UCS2_t *spaceText = NULL; - NW_LMgr_ContainerBox_t *newCell = NULL; - - NW_TRY (status) { - NW_Ucs2 *retString; - NW_ADT_Vector_Metric_t cols = 1; - NW_ADT_Vector_Metric_t numRows; - NW_ADT_Vector_Metric_t numCells; - NW_LMgr_ContainerBox_t *tableContainer = NW_LMgr_ContainerBoxOf(box); - NW_LMgr_ContainerBox_t *cell = NULL; - NW_LMgr_ContainerBox_t *lastCell = NULL; - NW_LMgr_ContainerBox_t *rowContainer = NULL; - NW_LMgr_Property_t prop; - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t j; - - /* WML table optimization */ - prop.type = NW_CSS_ValueType_Integer; - prop.value.token = NW_CSS_PropValue_flags_wmlTable; - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_flags, &prop); - - /* Set the margin for the table */ - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 2; - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_margin, &prop); - - /* Get the "columns" attribute */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - COLUMNS_ATTR, - &retString); - - if (status == KBrsrOutOfMemory) { - return status; - } - - if (retString != NULL) { - if(NW_Str_StrIsValidLength(retString)) - { - cols = (NW_ADT_Vector_Metric_t)NW_Str_Atoi (retString); - } - if (cols == 0) { - /* If the attribute value is illegal, we will make the table one column wide */ - cols = 1; - } - - NW_Str_Delete (retString); - } - - numRows = NW_LMgr_ContainerBox_GetChildCount(tableContainer); - - for (i = 0; i < numRows; i++) { - rowContainer = (NW_LMgr_ContainerBox_t*) NW_LMgr_ContainerBox_GetChild (tableContainer, i); - - if (rowContainer->children == NULL) - NW_THROW_SUCCESS(status); - - numCells = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - if (numCells == cols) { - continue; - } - - /* If there is an insufficient number of cells in a row, - * we must pad it with extra empty boxes */ - else if (numCells < cols) { - for (j = numCells; j < cols; j++) { - - /* Create a new cell container and set its properties */ - newCell = (NW_LMgr_ContainerBox_t*)NW_LMgr_StaticTableCellBox_New(1); - NW_THROW_OOM_ON_NULL (newCell, status); - - NW_UI_SetCellProperties (NW_LMgr_BoxOf(newCell)); - - /* Create the text object with a single space */ - spaceText = - NW_Text_UCS2_New((NW_Ucs2*) spaceString, 1, 0); - NW_THROW_OOM_ON_NULL (spaceText, status); - - /* Create a text box to hold the space */ - newBox = (NW_LMgr_Box_t*) - NW_LMgr_TextBox_New (1, NW_TextOf (spaceText)); - NW_THROW_OOM_ON_NULL (newBox, status); - - /* Add the empty box to the cell container */ - status = NW_LMgr_ContainerBox_AddChild (newCell, NW_LMgr_BoxOf(newBox)); - _NW_THROW_ON_ERROR(status); - - /* Add the cell to the row container */ - status = NW_LMgr_ContainerBox_AddChild (rowContainer, NW_LMgr_BoxOf(newCell)); - if (status != KBrsrSuccess) { - (void)NW_LMgr_ContainerBox_RemoveChild (newCell, NW_LMgr_BoxOf(newBox)); - NW_THROW (status); - } - } - } - - /* If there are extra cells in the row, we must aggregate them into - * the last column - */ - else if (numCells > cols) { - /* Get the cell in the last column */ - lastCell = (NW_LMgr_ContainerBox_t*)NW_LMgr_ContainerBox_GetChild (rowContainer, - (NW_ADT_Vector_Metric_t)(cols-1)); - NW_ASSERT (NW_Object_IsInstanceOf(lastCell, &NW_LMgr_ContainerBox_Class)); - - /* Aggregate the remaining cells */ - for (j = cols; j < numCells; j++) { - /* Get the first extra cell */ - tmpBox = NW_LMgr_ContainerBox_GetChild (rowContainer, j); - if (!NW_Object_IsInstanceOf(tmpBox, &NW_LMgr_StaticTableCellBox_Class)) - { - status = NW_LMgr_ContainerBox_RemoveChild (rowContainer, NW_LMgr_BoxOf(tmpBox)); - _NW_THROW_ON_ERROR(status); - j--; - numCells--; - NW_Object_Delete(tmpBox); - continue; - } - - cell = (NW_LMgr_ContainerBox_t*)tmpBox; - - /* Create the text object with a single space */ - spaceText = - NW_Text_UCS2_New((NW_Ucs2*) spaceString, 1, 0); - NW_THROW_OOM_ON_NULL (spaceText, status); - - newBox = (NW_LMgr_Box_t*) - NW_LMgr_TextBox_New (1, NW_TextOf (spaceText)); - NW_THROW_OOM_ON_NULL (newBox, status); - - /* Add the empty box to the last legal cell */ - status = NW_LMgr_ContainerBox_AddChild (lastCell, NW_LMgr_BoxOf(newBox)); - _NW_THROW_ON_ERROR(status); - - /* Remove the extra box from the row */ - status = NW_LMgr_ContainerBox_RemoveChild (rowContainer, NW_LMgr_BoxOf(cell)); - _NW_THROW_ON_ERROR(status); - j--; - numCells--; - - /* Append the extra content */ - status = NW_LMgr_ContainerBox_AppendChildrenOf (lastCell, cell); - _NW_THROW_ON_ERROR(status); - - /* We don't want to destroy the cell content, because we have copied it - * to lastCell */ - status = NW_ADT_DynamicVector_Clear ( - (NW_ADT_DynamicVector_t*)NW_LMgr_ContainerBox_GetChildren(cell)); - _NW_THROW_ON_ERROR(status); - - /* Finally, delete the cell */ - NW_Object_Delete(tmpBox); - } - } - } - - } NW_CATCH (status) { - NW_Object_Delete(newBox); - NW_Object_Delete(spaceText); - NW_Object_Delete(newCell); - - } NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_SetCellAlignment() - - Description: set alignment cell properties for a table sub-tree - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - elId - In - the element id of the element being processed, used in the WML query service - box - In - pointer to the box tree node representing the table - - Algorithm: alignment is left unless attribute set otherwise - - Return Value: KBrsrOutOfMemory - KBrsrSuccess - -*****************************************************************/ -static -TBrowserStatusCode -NW_UI_SetCellAlignment (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_LMgr_Box_t *box) -{ - NW_LMgr_Property_t prop; - NW_Ucs2 *retString; - NW_ADT_Vector_Metric_t numRows; - NW_ADT_Vector_Metric_t numCells; - NW_LMgr_ContainerBox_t *tableContainer = NW_LMgr_ContainerBoxOf(box); - NW_LMgr_ContainerBox_t *cell = NULL; - NW_LMgr_ContainerBox_t *rowContainer = NULL; - TBrowserStatusCode status; - NW_ADT_Vector_Metric_t i; - NW_ADT_Vector_Metric_t j; - - /* First get the alignment attribute */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ALIGN_ATTR, - &retString); - - if (status == KBrsrOutOfMemory) { - return status; - } - - /* Get the number of rows */ - numRows = NW_LMgr_ContainerBox_GetChildCount(tableContainer); - - /* Set the alignment properties on the cells */ - prop.type = NW_CSS_ValueType_Token; - if (retString != NULL) { - for (i = 0; i < numRows; i++) { - /* Get the row */ - rowContainer = (NW_LMgr_ContainerBox_t*)NW_LMgr_ContainerBox_GetChild (tableContainer, i); - numCells = NW_LMgr_ContainerBox_GetChildCount(rowContainer); - - for (j = 0; j < numCells; j++) { - /* Get the cell */ - cell = (NW_LMgr_ContainerBox_t*)NW_LMgr_ContainerBox_GetChild (rowContainer, j); - - if (j < NW_Str_Strlen(retString)) { - switch (retString[j]) - { - case 'R': - prop.value.token = NW_CSS_PropValue_right; - status = NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf(cell), NW_CSS_Prop_textAlign, &prop); - break; - - case 'C': - prop.value.token = NW_CSS_PropValue_center; - status = NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf(cell), NW_CSS_Prop_textAlign, &prop); - break; - - default: - prop.value.token = NW_CSS_PropValue_left; - status = NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf(cell), NW_CSS_Prop_textAlign, &prop); - break; - } - } - } - } - - NW_Str_Delete(retString); - } - - return status; -} - - -/***************************************************************** - - Name: NW_UI_LoadImage() - - Description: request WML <img> source or localsrc load - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - elId - In - the element id of the <img> element being processed, used in the WML query service - - Algorithm: - - Return Value: KBrsrOutOfMemory - KBrsrSuccess - TBrowserStatusCode value from NW_HED_DocumentRoot_StartLoad() - -*****************************************************************/ -TBrowserStatusCode -NW_UI_LoadImage (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, NW_Bool showImage ) -{ - NW_Ucs2 *imageUrl = NULL; - TBrowserStatusCode status; - NW_Text_UCS2_t *urlObj; - NW_HED_DocumentRoot_t *documentRoot; - NW_HED_UrlRequest_LoadMode_t loadMode = NW_HED_UrlRequest_LoadNormal; - - /* The loadMode flag is to trigger (src=)Url to be loaded after the - (localsrc=)Url load failed */ - - - /* NW_Settings_GetImageEnabled() called to determine whether - autoloading of images is turned on. If not, then just display - the initial "x" and alt text, and don't issue any load requests. - */ - - if (!showImage) - { - if (!NW_Settings_GetImagesEnabled()) { - return KBrsrSuccess; - } - } - - status = NW_Wml_GetLocalImageUrl(&(thisObj->wmlInterpreter), - elId, - &imageUrl); - if (status == KBrsrSuccess) { - loadMode = NW_HED_UrlRequest_LoadLocal; - } - else { - - status = NW_Wml_GetImageUrl(&(thisObj->wmlInterpreter), - elId, - &imageUrl); - } - - if (status == KBrsrSuccess) { - - NW_ASSERT(imageUrl); - - urlObj = - NW_Text_UCS2_New (imageUrl, 0, NW_Text_Flags_TakeOwnership); - - if (urlObj != NULL) { - NW_HED_UrlRequest_t *urlRequest; - - /* get the documentRoot and invoke the Load method */ - - documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT(documentRoot != NULL); - - /* submit the load request */ - urlRequest = NW_HED_UrlRequest_New (NW_TextOf (urlObj), NW_URL_METHOD_GET, NULL, - NULL, NW_HED_UrlRequest_Reason_DocLoadChild, - loadMode, NW_UrlRequest_Type_Image); - - if (urlRequest != NULL) { - NW_Uint32 elId32 = elId; - if (NW_Wml1x_ContentHandler_IsSaveddeck(thisObj)) - { - NW_HED_UrlRequest_SetCacheMode(urlRequest, NW_CACHE_ONLYCACHE); - } - else if (NW_Wml1x_ContentHandler_IsHistload(thisObj)) - { - NW_HED_UrlRequest_SetCacheMode(urlRequest, NW_CACHE_HISTPREV); - } - else if (NW_Wml1x_ContentHandler_IsReload(thisObj)) - { - NW_HED_UrlRequest_SetCacheMode(urlRequest, NW_CACHE_NOCACHE); - } - - // compare url with body part - NW_Uint8 freeNeeded; - NW_Ucs2* resolvedUrlUcs2 = NW_Text_GetUCS2Buffer( NW_TextOf (urlObj), NULL, NULL, &freeNeeded); - CBodyPart* bodyPart = NULL; - TBool isUrlInMultipart = _NW_HED_CompositeContentHandler_IsUrlInMultipart( - NW_HED_CompositeContentHandlerOf(thisObj), - resolvedUrlUcs2, &bodyPart ); - if( freeNeeded ) - { - NW_Mem_Free( resolvedUrlUcs2 ); - } - - if( isUrlInMultipart ) - { - TDataType dataType( bodyPart->ContentType() ); - - TUint8* charset = (TUint8*) bodyPart->Charset().Ptr(); - TInt lenCh = bodyPart->Charset().Length(); - //R CShell* shell = REINTERPRET_CAST(CShell*, NW_Ctx_Get(NW_CTX_BROWSER_APP, 0)); - CShell* shell = NULL; //R - NW_ASSERT(shell); - TInt32 uidInt = shell->GetUidFromCharset( charset, lenCh ); - TUid uid = TUid::Uid( uidInt ); - - CBrCtl* brCtl = shell->BrCtl(); - /* - brCtl->LoadDataL( bodyPart->Url(), bodyPart->Body(), dataType, uid, - NW_HED_DocumentNodeOf (thisObj), (void*)elId32, - NULL, NULL, urlRequest->loadType, urlRequest->method ); - */ - } - else - { - status = NW_HED_DocumentRoot_StartRequest (documentRoot, NW_HED_DocumentNodeOf (thisObj), - urlRequest, (void*)elId32 ); - - if (status != KBrsrSuccess) - { - NW_Object_Delete (urlRequest); - } - } - } - else { - status = KBrsrOutOfMemory; - } - - NW_Object_Delete(urlObj); - } else { - status = KBrsrOutOfMemory; /* NW_Text_UCS2_New() takes care of deleting string when fails */ - } - } - - if (status == KBrsrSuccess) { - thisObj->wmlInterpreter.outstandingLoadCount++; - } - return status; -} - - -/***************************************************************** - - Name: IsThereAltAttrib() - - Description: Returns "alt" attribute of the "image" element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - elId - In - the element id of the <img> element being processed - altStr - In/Out - pointer to variable which will receive address of - UCS2_Text_t object with value of ALT_ATTR from <img> element - - Algorithm: - - Return Value: -NW_TRUE when string for alt text successfully extructed - *altStr has the value of the string pointer. - -NW_FALSE when the attribute does not exist or - the string was not created. *altStr = NULL - -*****************************************************************/ -static NW_Bool IsThereAltAttrib (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_Text_t **altStr) -{ - NW_Bool ret = NW_FALSE; - NW_Ucs2 *retString = NULL; - - (void) NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ALT_ATTR, - &retString); - - if (retString) { - *altStr = (NW_Text_t*) - NW_Text_UCS2_New (retString, NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - if (*altStr) { - ret = NW_TRUE; - } - } - - return ret; -} - - -/* -**------------------------------------------------------------------------- -** Display API functions called by the WML Browser -**------------------------------------------------------------------------- -*/ - -/***************************************************************** - - Name: NW_UI_CreateCard() - - Description: callback for WML interpreter to initialize new card - - Parameters: - wae - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_CreateCard (void *wae) -{ - - NW_Wml1x_ContentHandler_t *thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_LMgr_Property_t prop; - NW_LMgr_BidiFlowBox_t *bidiFlowBox; - - NW_TRY (status) { - - NW_LOG0(NW_LOG_LEVEL1, "<card>"); - - thisObj = NW_Wml1x_ContentHandlerOf(wae); - compositeNode = (NW_HED_CompositeNode_t*) - NW_Object_QueryAggregate (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - - //Note: There is a iCurrent in MVCView which points to one of the box that has the focus in the boxtree . - // Since the boxtree will be deleted in next step, we need to set the iCurrent to null. Otherwise it will - // be invalid and can cause problem (It had caused bug). - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_ASSERT( docRoot != NULL ); - //get the root box - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_ASSERT( rootBox != NULL ); - //get the boxtree listener which is a MVCView object - if(rootBox && (NW_Object_IsClass(rootBox, &NW_LMgr_RootBox_Class))) - { - MBoxTreeListener* btlistener = rootBox->boxTreeListener; - //if the listener is not null, set its iCurrent to null - if(btlistener != NULL) - { - ((CView*)btlistener)->SetCurrentBox(NULL); - } - } - /* free up all our child nodes; ie.image content handlers */ - NW_HED_CompositeNode_DeleteChildren (compositeNode); - - /* get rid of the old data */ - NW_Object_Delete (NW_HED_ContentHandlerOf (thisObj)->boxTree); - NW_HED_ContentHandlerOf (thisObj)->boxTree = NULL; - NW_Object_Delete(thisObj->optionMap); - thisObj->optionMap = NULL; - /* - ** create a new box tree for the card. DON'T USE NEW METHOD INSIDE CAST - ** AS IT WILL GET CALLED MULTIPLE TIMES WHEN MACRO IS EXPANDED - */ - bidiFlowBox = NW_LMgr_BidiFlowBox_New(0); - NW_THROW_OOM_ON_NULL (bidiFlowBox, status); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(bidiFlowBox), NW_CSS_Prop_display, &prop); - - NW_HED_ContentHandlerOf (thisObj)->boxTree = NW_LMgr_BoxOf(bidiFlowBox); - thisObj->currentBox = NW_HED_ContentHandlerOf (thisObj)->boxTree; - - NW_Wml1x_DefaultCardStyle(&prop, NW_LMgr_ContainerBoxOf(bidiFlowBox)); - - /* create a map to associate option element states with option element ids */ - thisObj->lastId = 0; - - thisObj->optionMap = - NW_ADT_ResizableMap_New (sizeof (thisObj->lastId), /* sizeof an element id */ - sizeof (NW_Bool), /* sizeof an element state */ - 8, /* guess at initial number of options */ - 4); /* number to increment by when resizing */ - NW_THROW_OOM_ON_NULL (thisObj->optionMap, status); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_ShowCard() - - Description: callback for WML interpreter to render card - - Parameters: - wae - In - the content handler on behalf of which the work is being done - - Algorithm: finish populating the box tree and call - NW_HED_DocumentNode_NodeChanged() - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_ShowCard (void *wae) -{ - NW_Wml1x_ContentHandler_t *thisObj; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t *box; - NW_LMgr_Box_t *rootBox; - NW_LMgr_ContainerBox_t *parentBox; - NW_LMgr_Box_t *deleteBox = NULL; - NW_LMgr_PropertyValue_t value; - NW_LMgr_Property_t prop; - NW_Wml_ElType_e elType = UNKNOWN_ELEMENT; - NW_Uint16 elId = 0; - NW_Wml_Element_t *el; - NW_Text_UCS2_t *temptext; - NW_Ucs2 *retString = NULL; - NW_HED_DocumentNode_t *parent; - NW_HED_DocumentRoot_t *docRoot; - NW_Bool currentSelectMultipleState = NW_FALSE; - NW_Int32 currentSelectTabIndexVal = 0; - - NW_Bool nowrap = NW_FALSE; - const NW_Text_t *formatText; - NW_FBox_Validator_EmptyOk_t emptyOk; - NW_Markup_WmlValidator_t *validator; - - thisObj = NW_Wml1x_ContentHandlerOf(wae); - - rootBox = NW_HED_ContentHandlerOf (thisObj)->boxTree; - - NW_LOG0(NW_LOG_LEVEL1, "</card>"); - - /* The reason to do this here instead of at time of content handler initialize is: - * when we come from WML doc to WML doc, the old WML Content Handler is used, no new - * content handler is created or initialized. */ - - /* Initialize the dynamic item list in the OptionList - This is needed for ISA, not for win32 */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - NW_ASSERT(docRoot != NULL); - NW_ASSERT(docRoot->appServices != NULL); - - NW_System_OptionList_Initialize (); - if (thisObj->optionItemList != NULL) { - NW_Wml1x_ContentHandler_DeleteOptionItemList(thisObj->optionItemList); - thisObj->optionItemList = NULL; - } - - /* initialize the boxVisitor */ - status = - NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf (rootBox)); - if (status != KBrsrSuccess) { - return status; - } - - /* traverse the boxTree */ - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - - /* get rid of leftover values */ - temptext = NULL; - retString = NULL; - - /* check the deleteBox, remove and delete if necessary */ - if (deleteBox != NULL) - { - parentBox = NW_LMgr_Box_GetParent (deleteBox); - - status = NW_LMgr_ContainerBox_RemoveChild(parentBox, - deleteBox); - NW_Object_Delete(deleteBox); - - deleteBox = NULL; - } - - /* get into elId the element id we set in the box's properties */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - - if (status == KBrsrSuccess) { - elId = NW_UINT16_CAST(value.integer); - status = NW_Wml_GetElementType(&(thisObj->wmlInterpreter), - elId, - &elType, - &el); - } - - /* don't switch on the element type if the return code was not success */ - if (status != KBrsrSuccess) - { - status = KBrsrSuccess; /* reset status to avoid the failure return at the end of the while loop */ - } - else - { - NW_ASSERT(elType != END_ELEMENT); - - switch (elType) { - - case P_ELEMENT: - status = NW_UI_SetParagraphProperties(thisObj, elId, box, &nowrap, &deleteBox); - - NW_Wml1x_ParagraphDefaultStyle(&prop, box); - - break; - - case PRE_ELEMENT: - /* Set the white-space property */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_pre; - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_whitespace, &prop); - - /* Set the font-family to courier (PRE should be rendered - * as fixed-width - */ - prop.type = NW_CSS_ValueType_Text; - prop.value.object = - NW_Text_UCS2_New ((NW_Ucs2*) monospace, 0, 0); - NW_LMgr_Box_SetProperty (box, NW_CSS_Prop_fontFamily, &prop); - - break; - - case STRING_ELEMENT: - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - STR_VALUE, - &retString); - if (status == KBrsrOutOfMemory) - return status; - if (retString == NULL) { - retString = NW_Str_NewcpyConst(" "); /* set some text if none returned */ - } - if (retString == NULL) { - return KBrsrOutOfMemory; - } - temptext = - NW_Text_UCS2_New (retString, NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - if (temptext == NULL) { - return KBrsrOutOfMemory; - } - NW_LMgr_TextBox_SetText (NW_LMgr_TextBoxOf(box), NW_TextOf(temptext)); - - break; - - case A_ELEMENT: - case ANCHOR_ELEMENT: - { - NW_Text_t* retUrl = NULL; - NW_Bool inCache = NW_FALSE; - NW_Bool isPrev = NW_FALSE; - - /* make sure there is some content on the anchor */ - status = NW_Wml1x_FixupAnchorText(&(thisObj->wmlInterpreter ), - elId, - NW_LMgr_ContainerBoxOf(box), - docRoot->appServices); - - /* get the URL, looking in <go> or <prev> if needed */ - status = NW_Wml1x_GetURL(&(thisObj->wmlInterpreter), - elId, - &retString, - &isPrev); - - if (isPrev) - { - const NW_HED_HistoryEntry_t* entry; - NW_HED_HistoryStack_t* history; - NW_HED_HistoryVisitor_t visitor; - NW_Bool freePrevURL= NW_FALSE; - - if ((history = NW_HED_DocumentRoot_GetHistoryStack (docRoot)) != NULL) - { - if ((NW_HED_HistoryVisitor_Initialize(&visitor, history, - NW_HED_HistoryVisitor_Loacation_Current)) == KBrsrSuccess) - { - entry = NW_HED_HistoryVisitor_Prev(&visitor); - if(entry != NULL) - { - retString = NW_Text_GetUCS2Buffer(entry->urlRequest->url, - NW_Text_Flags_Copy | NW_Text_Flags_NullTerminated, - NULL, &freePrevURL); - } - } - } - } - if (retString != NULL && *retString != NULL) - { - NW_Text_t *url; - NW_Ucs2* ucs2Href; - NW_Bool freeNeeded; - - url = NW_Text_New (HTTP_iso_10646_ucs_2, retString, - NW_Str_Strlen(retString), NW_Text_Flags_TakeOwnership); - retString = NULL; - - if (url == NULL) - { - return KBrsrOutOfMemory; - } - - status = NW_HED_ContentHandler_ResolveURL (thisObj, url, &retUrl); - /* We don't check explicitly for out of memory because if we are - * out of memory, we will fail later on. All we are interested here - * is to check if the url is in cache and set the color. - */ - - if (status == KBrsrSuccess) - { - /* give ownership to url */ - url = retUrl; - retUrl = NULL; - - /* check whether it is in cache */ - ucs2Href = NW_Text_GetUCS2Buffer(url, - NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated, - NULL, - &freeNeeded); - if (ucs2Href == NULL) - { - return KBrsrOutOfMemory; - } - else - { - NW_Ucs2 *fragment = NW_Url_Fragment(ucs2Href); - if (fragment != NULL) - { - /* strip off the fragment before looking in cache */ - --fragment; - *fragment = 0; - } - inCache = UrlLoader_IsUrlInCache(ucs2Href); - } - if (freeNeeded) - { - NW_Mem_Free(ucs2Href); - } - } - NW_Object_Delete(url); - } - else - { - NW_Str_Delete(retString); - } - /* apply default style for anchor */ - status = NW_Wml1x_AnchorDefaultStyle(&prop, NW_LMgr_ActiveContainerBoxOf (box), - inCache); - - - /* get the ACCESSKEY_ATTR */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ACCESSKEY_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - - /* convert string to NW_Text_Length_t in inputSize */ - if (retString != NULL) - { - NW_LMgr_AccessKey_t* ak; - NW_LMgr_Property_t accesskeyProp; - - ak = NW_LMgr_AccessKey_New(); - if (ak){ - if (NW_LMgr_AccessKey_AddVal(ak, retString, NW_FALSE) == KBrsrSuccess) - { - /* set accesskey on the new box */ - accesskeyProp.type = NW_CSS_ValueType_Object; - accesskeyProp.value.object = ak; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_accesskey, &accesskeyProp); - } - else{ - NW_Object_Delete(ak); - } - } - NW_Str_Delete(retString); - retString = NULL; - if (!ak){ - return KBrsrOutOfMemory; - } - } - } - break; - - case IMAGE_ELEMENT: - { - NW_Text_t *altStr = NULL; - - /* Adding a text box with alternative text from "alt" attribute */ - if (IsThereAltAttrib(thisObj, elId, &altStr)) { - NW_ASSERT(NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)); - (NW_LMgr_ImgContainerBoxOf(box))->altText = altStr; - } - } - - status = NW_UI_LoadImage(thisObj, elId, NW_FALSE); - - /* If the status is not KBrsrOutOfMemory, then just ignore it and go - * onto the next item. Failure to load an image is not fatal*/ - if(status != KBrsrOutOfMemory) - status = KBrsrSuccess; - break; - - case DO_ELEMENT: - status = NW_Wml1x_HandleDo(thisObj, elId, box, &deleteBox); - break; - - case INPUT_ELEMENT: - /* the input element is currently represented by a container box (although the - * input element should have no children) - * if the attribute type="password", replace the container box with a password box - * otherwise replace the container box with an input box - */ - { - NW_Wml1x_EventHandler_t *eventHandler; - NW_Uint32 elIdAsWord = elId; /* NOTE: this exists solely to eliminate a compiler warning */ - void *elIdAsVoidStar = (void *)elIdAsWord; /* NOTE: this exists solely to eliminate a compiler warning */ - NW_LMgr_Box_t *inputBox = NULL; - NW_LMgr_Box_t *newBox = NULL; - NW_Uint16 inputSize = 0; - NW_Int32 tabIndexVal; - - - /* first, make sure that box is a plain vanilla container box - * if this is not true, then ..ShowCard() has been called outside - * the expected sequence of ..CreateCard() - [..AddElement()]* - ..ShowCard() - ..DestroyCard() - */ - NW_ASSERT (&NW_LMgr_ContainerBox_Class == ((NW_Object_Core_t*) box)->objClass); - - eventHandler = - NW_Wml1x_EventHandler_New (NW_Wml1x_ContentHandlerOf(thisObj)); - - if (eventHandler != NULL) { - - /* get the SIZE_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - SIZE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - - /* convert string to NW_Text_Length_t in inputSize */ - if (retString != NULL) - { - if(NW_Str_StrIsValidLength(retString)) - { - inputSize = (NW_Uint16) NW_Str_Atoi(retString); - } - NW_Str_Delete(retString); - retString = NULL; - } - - parentBox = NW_LMgr_Box_GetParent (box); - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TYPE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - - if ((retString != NULL) && (NW_Str_StrcmpConst(retString, WAE_ASC_PASSWORD_STR) == 0) ) - { - /* create the passwordBox */ - inputBox = (NW_LMgr_Box_t*) - NW_FBox_PasswordBox_New(0, - NW_LMgr_EventHandlerOf (eventHandler), - elIdAsVoidStar, /* elementNode, */ - NW_FBox_FormLiaisonOf (thisObj->formLiaison), - inputSize, - docRoot->appServices); - if (inputBox == NULL) { - NW_Str_Delete(retString); - return KBrsrOutOfMemory; - } - - newBox = inputBox; - } - else - { - inputBox = (NW_LMgr_Box_t*) - NW_FBox_InputBox_New(0, - NW_LMgr_EventHandlerOf (eventHandler), - elIdAsVoidStar, /* elementNode, */ - NW_FBox_FormLiaisonOf (thisObj->formLiaison), - inputSize, - docRoot->appServices); - newBox = inputBox; - - } - NW_Str_Delete(retString); - retString = NULL; - - if (inputBox == NULL) { - return KBrsrOutOfMemory; - } - - /* get the ACCESSKEY_ATTR */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ACCESSKEY_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - /* convert string to NW_Text_Length_t in inputSize */ - if (retString != NULL) - { - NW_LMgr_AccessKey_t* ak; - NW_LMgr_Property_t accesskeyProp; - - ak = NW_LMgr_AccessKey_New(); - if (ak){ - if (NW_LMgr_AccessKey_AddVal(ak, retString, NW_FALSE) == KBrsrSuccess) - { - /* set accesskey on the new box */ - accesskeyProp.type = NW_CSS_ValueType_Object; - accesskeyProp.value.object = ak; - NW_LMgr_Box_SetProperty(newBox, NW_CSS_Prop_accesskey, &accesskeyProp); - } - else{ - NW_Object_Delete(ak); - } - } - NW_Str_Delete(retString); - retString = NULL; - if (!ak){ - return KBrsrOutOfMemory; - } - } - - /* get the TITLE_ATTR value if any */ - retString = NULL; - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TITLE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - NW_FBox_InputBox_SetTitle(inputBox, retString); - - retString = NULL; - /* get the MAXLENGTH_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - MAXLENGTH_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - if (retString != NULL) - { - NW_Int32 maxlength = -1; /* Initialize to invalid length */ - if(NW_Str_StrIsValidLength(retString)) - { - maxlength = NW_Str_Atoi(retString); - } - NW_Str_Delete(retString); - retString = NULL; - if(maxlength >= 0) - { - NW_FBox_InputBox_t *tmpbox = NW_FBox_InputBoxOf(inputBox); - NW_FBox_InputBox_SetMaxChars(tmpbox,(NW_Text_Length_t)maxlength); - NW_FBox_InputBox_SetIsMaxlength( tmpbox, NW_TRUE); - } - } - - /* Create a prefix string validator for the input box. */ - /* get the EMPTYOK_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - EMPTYOK_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - //Allow scrolling on input boxes when empty. If it is not allowed then - //let the EMPTYOK_ATTR decides this. - emptyOk = NW_FBox_Validator_EmptyOk_True; - - if ( retString != NULL ) { - if ( NW_Str_StricmpConst( retString, WAE_ASC_TRUE_STR ) == 0 ) { - emptyOk = NW_FBox_Validator_EmptyOk_True; - } else if ( NW_Str_StricmpConst( retString, WAE_ASC_FALSE_STR ) == 0 ) { - emptyOk = NW_FBox_Validator_EmptyOk_False; - } - NW_Str_Delete(retString); - retString = NULL; - } - - /* get the FORMAT_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - FORMAT_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - if ( retString == NULL ) { - /* Not format attribute. Create an empty string. */ - formatText = (NW_Text_t*) NW_Text_UCS2_New(NULL, 0, 0); - } else { - /* Is a format attribute. Convert to a Text object. */ - formatText = (const NW_Text_t*) NW_Text_UCS2_New(retString, - NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - retString = NULL; - } - - validator = NW_Markup_WmlValidator_New( formatText, - NW_FBox_Validator_Mode_None, - emptyOk, - NW_FALSE); /* Do a prefix match. */ - NW_Object_Delete((NW_Text_t*) formatText); - - /* Input box takes ownership of validator. */ - NW_FBox_InputBox_SetValidator( inputBox, - NW_FBox_ValidatorOf(validator) ); - - /* get the TABINDEX_ATTR value if any */ - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TABINDEX_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - /* convert string to NW_Text_Length_t in inputSize */ - if (retString != NULL) - { - tabIndexVal = NW_Str_Atoi(retString); - NW_Str_Delete(retString); - retString = NULL; - - /* set tabIndex on the new box */ - prop.type = NW_CSS_ValueType_Integer; - prop.value.integer = (tabIndexVal > 0) ? tabIndexVal : 0; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_tabIndex, &prop); - } - - parentBox = NW_LMgr_Box_GetParent (box); - - status = NW_LMgr_ContainerBox_InsertChild(parentBox, - newBox, - box); - if (status != KBrsrSuccess) { - NW_Object_Delete (newBox); - return status; - } - - /* removing box here causes problems for the BoxVisitor, - * since that object maintains a "currentBox" pointer which - * at this point is pointing to this box. The alternative - * is to set a pointer to the box to be deleted and then - * remove from parent and delete after BoxVisitor has moved on. - */ - deleteBox = box; - - /* replace the element Id on the new box */ - prop.type = NW_CSS_ValueType_Integer; - value.integer = elId; - prop.value = value; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_elementId, &prop); - - NW_Wml1x_InputDefaultStyle(inputBox); - - } - } - break; - - case TABLE_ELEMENT: - - status = NW_UI_NormalizeTable(thisObj, elId, box); - if (status != KBrsrSuccess) { - return status; - } - status = NW_UI_SetCellAlignment(thisObj, elId, box); - if (status != KBrsrSuccess) { - return status; - } - break; - - case TD_ELEMENT: - status = NW_UI_SetCellProperties(box); - if (status != KBrsrSuccess) { - return status; - } - break; - - case SELECT_ELEMENT: - status = NW_Wml1x_HandleSelect(thisObj, - elId, - box, - &deleteBox, - &currentSelectMultipleState, - &currentSelectTabIndexVal); - break; - - case OPTGRP_ELEMENT: - status = NW_Wml1x_HandleOptgroup(thisObj, - elId, - box); - break; - - case OPTION_ELEMENT: - status = NW_Wml1x_HandleOption(thisObj, - elId, - box, - currentSelectMultipleState, - currentSelectTabIndexVal); - break; - - case FIELDSET_ELEMENT: - /* The <fieldset> element is currently represented by a - * BidiFlowBox, and will (hopefully) have had one or more <input> - * children added. If the element has a TITLE attribute, create a text box - * with the TITLE text and insert it as the first child of the BidiFlowBox - */ - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - TITLE_ATTR, - &retString); - if (status == KBrsrOutOfMemory) - return status; - if (retString != NULL) - { - NW_LMgr_Box_t *titleBox; - NW_LMgr_Box_t *breakBox; - - /* make a text object containing the title */ - temptext = - NW_Text_UCS2_New (retString, NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - if (temptext == NULL) { - return KBrsrOutOfMemory; /* NW_Text_UCS2_New() takes care of deleting string when fails */ - } - - titleBox = (NW_LMgr_Box_t*) NW_LMgr_TextBox_New(1, NW_TextOf(temptext)); - breakBox = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New(0); - - if (titleBox != NULL) - { - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf (box)) > 0) - { - if (breakBox){ - status = NW_LMgr_ContainerBox_InsertChildAt(NW_LMgr_ContainerBoxOf (box), - breakBox, 0); - } - status = NW_LMgr_ContainerBox_InsertChildAt(NW_LMgr_ContainerBoxOf (box), - titleBox, 0); - } - else - { - /* no children: just add the title box */ - status = NW_LMgr_ContainerBox_AddChild( NW_LMgr_ContainerBoxOf (box), - titleBox); - if (breakBox){ - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf (box), - breakBox); - } - - } - if (status != KBrsrSuccess) { - return status; - } - } - else - { - NW_Object_Delete(temptext); - return KBrsrOutOfMemory; - } - } - NW_Wml1x_FieldsetDefaultStyle(box); - break; - - case STRONG_ELEMENT: - /* strong default */ - NW_Wml1x_StrongDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case BIG_ELEMENT: - /* big default */ - NW_Wml1x_BigDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case ITALIC_ELEMENT: - /* italic default */ - NW_Wml1x_ItalicDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case EMPHASIS_ELEMENT: - /* emphasis default */ - NW_Wml1x_EmphasisDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case BOLD_ELEMENT: - /* bold default */ - NW_Wml1x_BoldDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case UNDERLINE_ELEMENT: - /* underline default */ - NW_Wml1x_UnderlineDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - case SMALL_ELEMENT: - /* small default */ - NW_Wml1x_SmallDefaultStyle(&prop, NW_LMgr_ContainerBoxOf (box)); - break; - - default: - break; - } - - if (status != KBrsrSuccess) { - return status; - } - } - } - /* finally we inform the document tree that our content has changed */ - - parent = NW_HED_DocumentNode_GetParentNode(wae); - - status = - NW_HED_DocumentNode_NodeChanged (wae, parent); - - return status; -} - - -/***************************************************************** - - Name: NW_UI_DestroyCard() - - Description: callback for WML interpreter to destroy card - - Parameters: - wae - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_DestroyCard (void *wae) -{ - NW_Wml1x_ContentHandler_t *thisObj; - NW_HED_CompositeNode_t* compositeNode; - - thisObj = NW_Wml1x_ContentHandlerOf(wae); - compositeNode = (NW_HED_CompositeNode_t*) - NW_Object_QueryAggregate (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - -/* -** leak the box tree since I don't know how to free script content handler -** as child AND free the box tree without causing double delete of image -** content handler which gets freed BOTH in boxTree delete and DeleteChildren. - - - if (NW_HED_ContentHandlerOf(thisObj)->boxTree != NULL) { - NW_Object_Delete( NW_HED_ContentHandlerOf(thisObj)->boxTree ); - NW_HED_ContentHandlerOf(thisObj)->boxTree = NULL; - } -*/ - - if (thisObj->optionMap != NULL) { - NW_Object_Delete(thisObj->optionMap); - thisObj->optionMap = NULL; - } - /* free up all our child content handlers; eg:-images */ - NW_HED_CompositeNode_DeleteChildren(compositeNode); - - /* succesful completion */ - return KBrsrSuccess; -} - - -/***************************************************************** - - Name: NW_UI_AddStringElement() - - Description: called by NW_UI_AddElement() for text - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: create the text box; actual text will be attached - by NW_UI_ShowCard() - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddStringElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_TextBox_t* box; - - NW_TRY (status) { - box = NW_LMgr_TextBox_New(1, NULL); - NW_THROW_OOM_ON_NULL (box, status); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf(box)); - _NW_THROW_ON_ERROR (status); - - *newboxptr = NW_LMgr_BoxOf(box); - } - NW_CATCH (status) { - NW_Object_Delete (box); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddFlowElement() - - Description: called by NW_UI_AddElement() for P, PRE, TD, - SELECT, OPTGRP, and FIELDSET elements - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddFlowElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_BidiFlowBox_t* box; - NW_LMgr_Property_t prop; - - NW_TRY (status) { - box = NW_LMgr_BidiFlowBox_New(2); - NW_THROW_OOM_ON_NULL (box, status); - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf(box), NW_CSS_Prop_display, &prop); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf(box)); - _NW_THROW_ON_ERROR (status); - - *newboxptr = NW_LMgr_BoxOf(box); - } - NW_CATCH (status) { - NW_Object_Delete (box); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddStyleElement() - - Description: called by NW_UI_AddElement() for EM, B, BIG, - STRONG, I, SMALL, and U elements - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - elemType - In - token value of element being processed - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddStyleElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr, - NW_Wml_ElType_e elemType) -{ - NW_LMgr_ContainerBox_t* containerBox; - - NW_REQUIRED_PARAM(elemType); - - NW_TRY (status) { - /* add a raw container box then add style property to the container */ - containerBox = NW_LMgr_ContainerBox_New(2); /* 2: style property and element Id */ - NW_THROW_OOM_ON_NULL (containerBox, status); - - /* process the elemType */ - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf (containerBox)); - _NW_THROW_ON_ERROR (status); - *newboxptr = NW_LMgr_BoxOf(containerBox); - } - NW_CATCH (status) { - NW_Object_Delete (containerBox); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - - -/***************************************************************** - - Name: NW_UI_AddActiveElement() - - Description: called by NW_UI_AddElement() for A elements - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - elemType - In - token value of element being processed - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddActiveElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr, - NW_Wml_ElType_e elemType) -{ - NW_Wml1x_EventHandler_t* eventHandler; - NW_LMgr_Box_t *activeBox = NULL; - - NW_REQUIRED_PARAM(elemType); - - NW_TRY (status) { - /* create the eventHandler for the active box */ - eventHandler = - NW_Wml1x_EventHandler_New (NW_Wml1x_ContentHandlerOf(thisObj)); - NW_THROW_OOM_ON_NULL(eventHandler, status); - - /* create the activeBox */ - switch (elemType) - { - case A_ELEMENT: - case ANCHOR_ELEMENT: - /* create a ActiveContainerBox to hold the active element and children*/ - activeBox = (NW_LMgr_Box_t*)NW_LMgr_ActiveContainerBox_New( - 0, NW_LMgr_EventHandlerOf (eventHandler), NW_LMgr_ActionType_OpenLink); - NW_THROW_OOM_ON_NULL(activeBox, status); - break; - - default: - /* elemType must be handled before dropping through */ - NW_ASSERT(0); - break; - } - - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf (activeBox)); - _NW_THROW_ON_ERROR (status); - *newboxptr = NW_LMgr_BoxOf(activeBox); - } - NW_CATCH (status) { - if(activeBox == NULL) { - NW_Object_Delete (eventHandler); - } - NW_Object_Delete (activeBox); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddContainerElement() - - Description: called by NW_UI_AddElement() for DO, INPUT and - OPTION elements - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddContainerElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_ContainerBox_t *containerBox; - - NW_TRY (status) { - /* create the containerBox */ - containerBox = NW_LMgr_ContainerBox_New (1); - NW_THROW_OOM_ON_NULL(containerBox, status); - - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf (containerBox)); - _NW_THROW_ON_ERROR(status) - *newboxptr = NW_LMgr_BoxOf(containerBox); - } - - NW_CATCH (status) { - NW_Object_Delete (containerBox); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddBreakElement() - - Description: called by NW_UI_AddElement() for BR element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddBreakElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_Box_t* box; - - NW_TRY (status) { - box = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New((NW_ADT_Vector_Metric_t)1); - NW_THROW_OOM_ON_NULL(box, status); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf(box)); - _NW_THROW_ON_ERROR(status); - *newboxptr = NW_LMgr_BoxOf(box); - } - NW_CATCH (status) { - NW_Object_Delete (box); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddImageElement() - - Description: called by NW_UI_AddElement() for IMG element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddImageElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_Property_t prop; - NW_Image_Virtual_t* virtualImage = NULL; - - NW_TRY (status) - { - /* as we have not downloaded the image, we create a - substitute ImageBox in which we display our 'missing' image*/ - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - MHEDDocumentListener* documentListener = NULL; - NW_Image_AbstractImage_t* cannedImage = NULL; - - docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_ASSERT( docRoot != NULL ); - - documentListener = docRoot->documentListener; - NW_ASSERT( documentListener != NULL ); - - rootBox = documentListener->GetRootBox(); - NW_ASSERT( rootBox != NULL ); - NW_ASSERT( rootBox->cannedImages != NULL ); - - cannedImage = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage( rootBox->cannedImages, NW_Image_Missing ); - NW_THROW_OOM_ON_NULL( cannedImage, status ); - - virtualImage = NW_Image_Virtual_New( cannedImage ); - NW_THROW_OOM_ON_NULL( virtualImage, status ); - // pass image ownership - *newboxptr = (NW_LMgr_Box_t*)NW_LMgr_AnimatedImageBox_New(0, NW_Image_AbstractImageOf( virtualImage ), NULL, NW_TRUE ); - NW_THROW_OOM_ON_NULL(*newboxptr, status); - // image container takes image ownership - virtualImage = NULL; - - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(thisObj->currentBox), - *newboxptr); - _NW_THROW_ON_ERROR(status); - - NW_Wml1x_ImageWithinAnchorDefaultStyle(&prop, *newboxptr); - - } - NW_CATCH (status) { - NW_Object_Delete (*newboxptr); - NW_Object_Delete (virtualImage); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddTableElement() - - Description: called by NW_UI_AddElement() for TABLE element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddTableElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_Bool ownsSTB = NW_TRUE; - NW_LMgr_Box_t *stb = NULL; - - NW_TRY (status) { - NW_LMgr_Property_t prop; - - /* Allocate and initialize the table itself */ - stb = (NW_LMgr_Box_t*)NW_LMgr_StaticTableBox_New(1); - NW_THROW_OOM_ON_NULL (stb, status); - - /* Set the display prop */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - NW_LMgr_Box_SetProperty (stb, NW_CSS_Prop_display, &prop); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(thisObj->currentBox), - stb); - _NW_THROW_ON_ERROR(status); - ownsSTB = NW_FALSE; - - *newboxptr = stb; - - } NW_CATCH (status) { - } NW_FINALLY { - if (ownsSTB) { - NW_Object_Delete (stb); - } - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddTrElement() - - Description: called by NW_UI_AddElement() for TR element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddTrElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_Box_t* box = NULL; - - NW_TRY (status) { - box = (NW_LMgr_Box_t*) NW_LMgr_StaticTableRowBox_New (1); - NW_THROW_OOM_ON_NULL (box, status); - - /* Add the row to the box tree */ - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf (thisObj->currentBox), - box); - NW_THROW_ON_ERROR (status); - *newboxptr = box; - - } NW_CATCH (status) { - NW_Object_Delete (box); - } NW_FINALLY { - return status; - } NW_END_TRY -} - -/***************************************************************** - - Name: NW_UI_AddTdElement() - - Description: called by NW_UI_AddElement() for TD element - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddTdElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_Box_t* box = NULL; - - NW_TRY (status) { - box = (NW_LMgr_Box_t*)NW_LMgr_StaticTableCellBox_New(1); - NW_THROW_OOM_ON_NULL (box, status); - - /* Add the row to the box tree */ - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf (thisObj->currentBox), - box); - NW_THROW_ON_ERROR (status); - *newboxptr = box; - - } NW_CATCH (status) { - NW_Object_Delete (box); - } NW_FINALLY { - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_UI_AddUnknownElement() - - Description: called by NW_UI_AddElement() when element is not - recognized - - Parameters: - thisObj - In - the content handler on behalf of which the work is being done - newboxptr - In/Out - pointer to variable which will receive address of new box obj - - Algorithm: create a basic container box for the element so - that any content may be properly rendered - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddUnknownElement (NW_Wml1x_ContentHandler_t *thisObj, - NW_LMgr_Box_t **newboxptr) -{ - NW_LMgr_ContainerBox_t* box; - - NW_TRY (status) { - box = NW_LMgr_ContainerBox_New(1); - NW_THROW_OOM_ON_NULL (box, status); - - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(thisObj->currentBox), - NW_LMgr_BoxOf(box)); - _NW_THROW_ON_ERROR (status); - *newboxptr = NW_LMgr_BoxOf(box); - } - NW_CATCH(status) { - NW_Object_Delete (box); - } - NW_FINALLY { - if(status != KBrsrOutOfMemory) { - status = KBrsrSuccess; - } - return status; - } NW_END_TRY -} - - -/***************************************************************** - - Name: NW_Element_endTagRendered() - - Description: determines whether an explicit end-tag will be or - will have been generated by RenderCardElements() - for a given elemType. - - Parameters: - elemType - In - token value of element being processed - - Algorithm: - (TODO: This probably ought to be in a different module, - like wml_ui.c) - - Return Value: - -*****************************************************************/ -NW_Bool NW_Element_endTagRendered (NW_Wml_ElType_e elemType) -{ - switch (elemType) - { - /* Elements for which RenderCardElements() in wml_ui.c generates end-tag: */ - case A_ELEMENT: - case ANCHOR_ELEMENT: - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - case SELECT_ELEMENT: - case P_ELEMENT: - case FIELDSET_ELEMENT: - case OPTGRP_ELEMENT: - case TABLE_ELEMENT: - case TR_ELEMENT: - case TD_ELEMENT: - case OPTION_ELEMENT: - case PRE_ELEMENT: - return NW_TRUE; - - /* Elements for which RenderCardElements() in wml_ui.c does not generate end-tag: */ - case DO_ELEMENT: - case INPUT_ELEMENT: - case BREAK_ELEMENT: - case IMAGE_ELEMENT: - case STRING_ELEMENT: - case END_ELEMENT: - return NW_FALSE; - - /* Elements not expected from RenderCardElements() in wml_ui.c */ - case CARD_ELEMENT: - case GO_ELEMENT: - case PREV_ELEMENT: - case REFRESH_ELEMENT: - case NOOP_ELEMENT: - case SETVAR_ELEMENT: - case ONEVENT_ELEMENT: - case WML_ELEMENT: - case HEAD_ELEMENT: - case TEMPLATE_ELEMENT: - case TIMER_ELEMENT: - case ACCESS_ELEMENT: - case META_ELEMENT: - case POSTFIELD_ELEMENT: - - /* All known WML-tags should be handled explicitly in the switch */ - default: - NW_ASSERT(NW_FALSE); - return NW_FALSE; - } -} - -/***************************************************************** - - Name: NW_UI_AddElement() - - Description: callback for WML interpreter to add card elements - - Parameters: - wae - In - the content handler on behalf of which the work is being done - elemType - In - token value of element being processed - elemId - In/Out - pointer to variable which will receive unique - identifying value to be associated with this element - for later use with the WML query service to obtain - attribute values - - Algorithm: for element passed in, create the box on the box - tree for later rendering, and assign a unique - id number to the element - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_AddElement (void *wae, - NW_Wml_ElType_e elemType, - NW_Int16 *elemId) -{ - NW_LMgr_Property_t prop; - NW_LMgr_PropertyValue_t val; - NW_Wml1x_ContentHandler_t *ch; - NW_LMgr_Box_t *box = NULL; - - NW_TRY (status) { - - ch = NW_Wml1x_ContentHandlerOf(wae); - *elemId = ch->lastId; - - switch( elemType ) { - - case END_ELEMENT: - ch->currentBox = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(ch->currentBox); - status = KBrsrSuccess; - break; - - case P_ELEMENT: - case PRE_ELEMENT: - case SELECT_ELEMENT: - case OPTGRP_ELEMENT: - case FIELDSET_ELEMENT: - status = NW_UI_AddFlowElement(ch, &box); - break; - - case STRING_ELEMENT: - status = NW_UI_AddStringElement(ch, &box); - break; - - case BREAK_ELEMENT: - status = NW_UI_AddBreakElement(ch, &box); - break; - - case EMPHASIS_ELEMENT: - case STRONG_ELEMENT: - case ITALIC_ELEMENT: - case BOLD_ELEMENT: - case UNDERLINE_ELEMENT: - case BIG_ELEMENT: - case SMALL_ELEMENT: - status = NW_UI_AddStyleElement(ch, &box, elemType); - break; - - case IMAGE_ELEMENT: - status = NW_UI_AddImageElement(ch, &box); - break; - - case OPTION_ELEMENT: - case INPUT_ELEMENT: - case DO_ELEMENT: - status = NW_UI_AddContainerElement(ch, &box); - break; - - case A_ELEMENT: - case ANCHOR_ELEMENT: - status = NW_UI_AddActiveElement(ch, &box, elemType); - break; - - case TABLE_ELEMENT: - status = NW_UI_AddTableElement(ch, &box); - break; - - case TR_ELEMENT: - status = NW_UI_AddTrElement(ch, &box); - break; - - case TD_ELEMENT: - status = NW_UI_AddTdElement(ch, &box); - break; - - case UNKNOWN_ELEMENT: - status = NW_UI_AddUnknownElement(ch, &box); - break; - - case CARD_ELEMENT: - case GO_ELEMENT: - case PREV_ELEMENT: - case REFRESH_ELEMENT: - case NOOP_ELEMENT: - case SETVAR_ELEMENT: - case ONEVENT_ELEMENT: - case WML_ELEMENT: - case HEAD_ELEMENT: - case TEMPLATE_ELEMENT: - case TIMER_ELEMENT: - case ACCESS_ELEMENT: - case META_ELEMENT: - case POSTFIELD_ELEMENT: - default: - /* TODO: handle unexpected elements: do nothing? */ - NW_ASSERT( 0 ); - break; - - } - - _NW_THROW_ON_ERROR (status); - - if (NW_Element_endTagRendered (elemType) == NW_TRUE) { - /* push currentBox pointer down to newly-created element box; - End element will pop it up */ - ch->currentBox = box; - } - if ((elemType != END_ELEMENT) && (box != NULL)) { - prop.type = NW_CSS_ValueType_Integer; - val.integer = ch->lastId; - prop.value = val; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_elementId, &prop); - } - else if ((elemType != END_ELEMENT) && (box == NULL)) { - /* TODO: handle box == NULL, in case Add_x_Element() failed to create a child box */ - NW_ASSERT( 0 ); - } - - ch->lastId += 1; - - /*#ifdef _DEBUG */ - #if 0 /* TODO figure out what to do here */ - { - /* log the elements */ - NW_Ucs2 *debugStr; - debugStr = NW_Str_NewcpyConst(elTypeNames[elemType]); - NW_LOG1(NW_LOG_LEVEL1, "<%s>", debugStr); - NW_Str_Delete(debugStr); - } - #endif - } - NW_CATCH (status) { - - } - NW_FINALLY { - return status; - } NW_END_TRY - -} - -/***************************************************************** - - Name: NW_UI_CleanUp() - - Description: callback for WML interpreter - - Parameters: - wae - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: KBrsrSuccess - -*****************************************************************/ -static TBrowserStatusCode NW_UI_CleanUp (void *wae) -{ - NW_REQUIRED_PARAM(wae); - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_UI_SetOptState() - - Description: callback for WML interpreter to set state of - option element - - Parameters: - wae - In - the content handler on behalf of which the work is being done - elemId - In - the element Id of the <option> element affected - st - In - the state to set the <option> element - - Algorithm: use a map to associate element Id with state - - Return Value: KBrsrFailure iff unable to find or create - key entry in map vector; - KBrsrSuccess otherwise - -*****************************************************************/ -static TBrowserStatusCode NW_UI_SetOptState (void *wae, NW_Uint16 elemId, NW_Bool st) -{ - return NW_ADT_Map_Set (NW_Wml1x_ContentHandlerOf(wae)->optionMap, &elemId, &st); -} - -/***************************************************************** - - Name: NW_UI_GetOptState() - - Description: callback for WML interpreter to get state of - option element - - Parameters: - wae - In - the content handler on behalf of which the work is being done - elemId - In - the element Id of the <option> element affected - st - In - pointer to bool in which state will be copied - - Algorithm: use the map populated during SetOptState - to return state associated with element Id - NOTE that if elemId is not an existing key in - the map, *st will be set to NW_FALSE - - Return Value: KBrsrSuccess - - -*****************************************************************/ -static TBrowserStatusCode NW_UI_GetOptState (void *wae, NW_Uint16 elemId, NW_Bool *st) -{ - NW_Bool* boolPtr; - - NW_ASSERT( wae != NULL ); - NW_ASSERT( st != NULL ); - - /* fetch a pointer to the value from the map */ - /* Returns NULL if item doesn't exist. */ - boolPtr = (NW_Bool*) NW_ADT_Map_GetUnsafe( - NW_Wml1x_ContentHandlerOf(wae)->optionMap, - &elemId); - - /* use byte-wise copy to get the unaligned data into the client's variable */ - /* copy the value into the client's variable */ - if ((boolPtr != NULL) && (st != NULL)) - { - (void) NW_Mem_memcpy (st, boolPtr, sizeof *st); - } - else if (st != NULL) - { - *st = NW_FALSE; - } - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_UI_Refresh() - - Description: callback for WML interpreter - - Parameters: - wae - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode NW_UI_Refresh (void *wae) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) wae; - - /* succesful completion */ - return KBrsrSuccess; -} - - - -/***************************************************************** - - Name: NW_Api_GetWml1xCB() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -const NW_WmlApi_t* NW_Api_GetWml1xCB() -{ - return &wml_api; -} - - -/*===============================Timer API wrappers for WML 1.x content handler================*/ - -/***************************************************************** - - Name: GetWmlTimer() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -NW_System_Timer_t* GetWmlTimer (void *usrAgent) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - NW_ASSERT(usrAgent!=NULL); - thisObj = NW_Wml1x_ContentHandlerOf(usrAgent); - return thisObj->wmlTimer; -} - -/***************************************************************** - - Name: SetWmlTimer() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void SetWmlTimer (void *usrAgent, NW_System_Timer_t* wmlTimer) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - NW_ASSERT(usrAgent!=NULL); - thisObj = NW_Wml1x_ContentHandlerOf(usrAgent); - thisObj->wmlTimer = wmlTimer; -} - - -/* -**------------------------------------------------------------------------- -** Timer API functions called by the WML Browser -**------------------------------------------------------------------------- -*/ - -/***************************************************************** - - Name: NW_Wml1x_CreateTimer() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - period - In - timer period - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_CreateTimer (void *usrAgent, NW_Uint32 period) -{ - NW_Wml1x_ContentHandler_t *thisObj; - thisObj = NW_Wml1x_ContentHandlerOf(usrAgent); - - - thisObj->wmlTimer = - NW_System_Timer_New (NW_Wml_Timeout, &(thisObj->wmlInterpreter), - period * NW_MSEC_PER_WML_TICK, NW_FALSE); - if(thisObj->wmlTimer == NULL) - { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_Wml1x_ReadTimer() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - period - In/Out - pointer to variable to receive timer value - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_ReadTimer (void *usrAgent, NW_Uint32 *period) -{ - NW_Uint32 period32; - TBrowserStatusCode status; - NW_System_Timer_t* wmlTimer = GetWmlTimer(usrAgent); - - if (wmlTimer == NULL) { - return KBrsrBadInputParam; - } - status = NW_System_Timer_Read (wmlTimer, &period32); - if(status == KBrsrSuccess) - { - *period = period32/NW_MSEC_PER_WML_TICK; - } - return status; -} - -/***************************************************************** - - Name: NW_Wml1x_DestroyTimer() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_DestroyTimer (void *usrAgent) -{ - NW_System_Timer_t* wmlTimer = GetWmlTimer(usrAgent); - - if (wmlTimer == NULL) { - return KBrsrBadInputParam; - } - NW_Object_Delete (wmlTimer); - SetWmlTimer(usrAgent, NULL); - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: NW_Wml1x_ResumeTimer() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_ResumeTimer (void *usrAgent) -{ - NW_System_Timer_t* wmlTimer = GetWmlTimer(usrAgent); - - if (wmlTimer == NULL) { - return KBrsrBadInputParam; - } - return NW_System_Timer_Resume (wmlTimer); -} - -/***************************************************************** - - Name: NW_Wml1x_StopTimer() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_StopTimer (void *usrAgent) -{ - NW_System_Timer_t* wmlTimer = GetWmlTimer(usrAgent); - - if (wmlTimer == NULL) { - return KBrsrBadInputParam; - } - return NW_System_Timer_Stop (wmlTimer); -} - -/***************************************************************** - - Name: NW_Wml1x_IsTimerRunning() - - Description: - - Parameters: - usrAgent - In - the content handler on behalf of which the work is being done - isRunning - In/Out - pointer to variable to receive state of timer - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_IsTimerRunning (void *usrAgent, NW_Bool *isRunning) -{ - NW_System_Timer_t* wmlTimer = GetWmlTimer(usrAgent); - - if (wmlTimer == NULL) { - *isRunning = NW_FALSE; - } else { - (void) NW_System_Timer_IsRunning (wmlTimer, isRunning); - } - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XContentHandler.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2414 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "nw_wml_core.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "nw_scrproxy.h" -#include "nw_wml1x_wml1xcontenthandleri.h" -#include "nw_wml1x_wml1xapi.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" /* to run Wml Scripts */ -#include "nw_lmgr_textbox.h" -#include "nw_hed_documentrooti.h" -#include "nw_hed_appservices.h" -#include "nw_hed_contextvisitor.h" -#include "nw_hed_inumbercollectori.h" -#include "nw_adt_segmentedvector.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nwx_string.h" -#include "stdarg.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_wml1x_wml1xdefaultstylesheet.h" -#include "nw_image_cannedimages.h" -#include "nw_text_ascii.h" -#include "nwx_osu.h" -#include "wml_url_utils.h" -#include "wml_history.h" -#include "nw_xmlp_xmlp2wbxml.h" -#include "nwx_settings.h" -#include "nw_wml1x_wml_1_3_tokens.h" -#include "wml_elm_attr.h" -#include "wml_task.h" -#include "nw_adt_types.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_lmgr_rootbox.h" - -#include "nw_markup_numbercollector.h" -#include "nw_system_optionlist.h" -#include "nw_lmgr_imgcontainerbox.h" - -#include "nw_htmlp_wml_dict.h" -#include "nw_htmlp_to_wbxml.h" -#include "nwx_osu_file.h" -#include "nwx_logger.h" - -#include <stddef.h> -#include "nwx_http_defs.h" -#include "GDIDevicecontext.h" -#include "BrsrStatusCodes.h" -#include "HEDDocumentListener.h" - - -#include "WmlControl.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ -/************************************************************************ - Function: HedToWmlTask - - Purpose: Converts HED Url request reason to Wml task - - Parameters: HED reason - - Return Values: Wml task - -**************************************************************************/ - -static NW_Wml_Task_e HedToWmlTask(NW_Uint8 reason) -{ - NW_Wml_Task_e ret = GO_TASK; - - if ((reason == NW_HED_UrlRequest_Reason_DocPrev) || - (reason == NW_HED_UrlRequest_Reason_ShellPrev)) - { - ret= PREV_TASK; - } - - return ret; -} -/***************************************************************** - - Name: GetAlignProp - - Description: Looks in Wml img element for the align attr. - Converts it to the LManager box property values - - Return Value: NW_TRUE when the align attr is present - Value of the attribute - -*****************************************************************/ -static NW_Bool GetAlignProp(NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_ADT_Token_t *token) -{ - NW_Bool align = NW_TRUE; - NW_Ucs2 *retString = NULL; - TBrowserStatusCode status; - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ALIGN_ATTR, - &retString); - - if (status != KBrsrSuccess || !retString) { - align = NW_FALSE; - goto funcEnd; - } - - if (!NW_Str_StrcmpConst(retString, WAE_ASC_TOP_STR)) { - *token = NW_CSS_PropValue_top; - } - else if (!NW_Str_StrcmpConst(retString, WAE_ASC_MIDDLE_STR)) { - *token = NW_CSS_PropValue_middle; - } - else if (!NW_Str_StrcmpConst(retString, WAE_ASC_BOTTOM_STR)) { - /* map WML bottom to CSS baseline to conform to WML spec. */ - *token = NW_CSS_PropValue_baseline; - } - else { - align = NW_FALSE; - } - -funcEnd: - NW_Str_Delete(retString); - return align; -} - -/***************************************************************** - - Name: NW_Bool GetVHspaceHWprop - - Description: Looks in Wml img element for the vspace, hspace, height, width - attributes. Converts them to the LManager box property values - - Return Value: NW_TRUE when the attributes are present. - Value type and value of the attribute - -*****************************************************************/ -static NW_Bool GetVHspaceHWprop(NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_Wml_Attr_t tag, - NW_Int32 *val, - NW_ADT_ValueType_t *type) -{ - NW_Ucs2 *ptr; - TBrowserStatusCode status; - NW_Ucs2 *retString = NULL; - NW_Bool ret = NW_TRUE; - - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - tag, - &retString); - - if (status != KBrsrSuccess || !retString) { - ret = NW_FALSE; - goto funcEnd; - } - - if ((ptr=NW_Str_Strchr(retString, '%')) != NULL) { - *ptr = 0; - *type = NW_CSS_ValueType_Percentage; - } - else { - *type = NW_CSS_ValueType_Px; - } - *val = NW_Str_Atoi(retString); - -funcEnd: - NW_Str_Delete(retString); - return ret; -} - -/***************************************************************** - - Name: AddImageProperties - - Description: when attributes are present it sets box properties - related to the attributes: - align, vspace, hspace, height, and width - - Return Value: <none> -*****************************************************************/ -void AddImageProperties(NW_Wml1x_ContentHandler_t* thisObj, - NW_LMgr_Box_t *box, - NW_LMgr_PropertyValue_t value) -{ - - NW_LMgr_Property_t prop; - NW_Uint16 elId = NW_UINT16_CAST(value.integer); - NW_LMgr_Property_t heightVal; - NW_LMgr_Property_t widthVal; - NW_LMgr_RootBox_t* rootBox = NULL; - CGDIDeviceContext* deviceContext = NULL; - const NW_GDI_Rectangle_t* rectangle = NULL; - NW_HED_DocumentRoot_t* documentRoot = NULL; - - /* first must set the element Id on the new box */ - prop.type = NW_CSS_ValueType_Integer; - prop.value = value; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_elementId, &prop); - - if (GetAlignProp(thisObj, elId, &prop.value.token)) - { - prop.type = NW_CSS_ValueType_Token ; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_verticalAlign, &prop); - } - - /* get the RootBox from through IDocumentListener interface */ - documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT( documentRoot != NULL ); - - rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - NW_ASSERT(rootBox); - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - - if (GetVHspaceHWprop(thisObj, elId, VSPACE_ATTR, &prop.value.integer, &prop.type)) - { - if (prop.type == NW_CSS_ValueType_Percentage) - { - prop.value.decimal = (NW_Float32)prop.value.integer; - prop.value.integer = (NW_GDI_Metric_t)((prop.value.decimal*rectangle->dimension.height)/100); - prop.type = NW_CSS_ValueType_Px; - } - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_topPadding, &prop); - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_bottomPadding, &prop); - } - - if (GetVHspaceHWprop(thisObj, elId, HSPACE_ATTR, &prop.value.integer, &prop.type)) - { - if (prop.type == NW_CSS_ValueType_Percentage) - { - prop.value.decimal = (NW_Float32)prop.value.integer; - prop.value.integer = (NW_GDI_Metric_t)((prop.value.decimal*rectangle->dimension.width)/100); - prop.type = NW_CSS_ValueType_Px; - } - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_leftPadding, &prop); - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_rightPadding,&prop); - } - - if (GetVHspaceHWprop(thisObj, elId, HEIGHT_ATTR, &heightVal.value.integer, &heightVal.type)) - { - if (heightVal.type == NW_CSS_ValueType_Percentage) - { - heightVal.value.decimal = (NW_Float32)heightVal.value.integer; - heightVal.value.integer = (NW_GDI_Metric_t)((heightVal.value.decimal*rectangle->dimension.height)/100); - heightVal.type = NW_CSS_ValueType_Px; - } - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_height, &heightVal); - } - - if (GetVHspaceHWprop(thisObj, elId, WIDTH_ATTR, &widthVal.value.integer, &widthVal.type)) - { - if (widthVal.type == NW_CSS_ValueType_Percentage) - { - widthVal.value.decimal = (NW_Float32)widthVal.value.integer; - widthVal.value.integer = (NW_GDI_Metric_t)((widthVal.value.decimal*rectangle->dimension.width)/100); - widthVal.type = NW_CSS_ValueType_Px; - } - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_width, &widthVal); - } - - return; -} - -/***************************************************************** - - Name: LoadSrcImage - - Description: Invokes image load for the WML 'src" attribute of - the "img: element. - - Parameters: ContentHandler - Wrapper box for the image to be loaded - element Id - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - KBrsrFailure - -*****************************************************************/ -TBrowserStatusCode LoadSrcImage(NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId) -{ - NW_Ucs2 *imageUrl = NULL; - TBrowserStatusCode status; - NW_Text_UCS2_t *urlObj; - NW_HED_DocumentRoot_t *documentRoot; - - status = NW_Wml_GetImageUrl(&(thisObj->wmlInterpreter), - elId, - &imageUrl); - - if (status == KBrsrSuccess) { - - NW_ASSERT(imageUrl); - - urlObj = NW_Text_UCS2_New (imageUrl, 0, NW_Text_Flags_TakeOwnership); - - if (urlObj != NULL) { - NW_Uint32 elId32 = elId; - /* get the documentRoot and invoke the Load method */ - documentRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - - status = - NW_HED_DocumentRoot_StartLoad (documentRoot, - NW_HED_DocumentNodeOf (thisObj), - NW_TextOf (urlObj), - NW_HED_UrlRequest_Reason_DocLoadChild, - (void*)elId32, NW_UrlRequest_Type_Image, - NW_CACHE_NORMAL); - NW_Object_Delete(urlObj); - } else { - status = KBrsrOutOfMemory; /* NW_Text_UCS2_New() takes care of deleting string when fails */ - } - } - return status; -} - -/***************************************************************** - - Name: StripInsecureVariables() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode StripInsecureVariables (NW_HED_Context_t* context) -{ - static const NW_Ucs2 ecom[] = {'E', 'c', 'o', 'm', '_', 0}; - NW_Uint32 len = NW_Str_Strlen(ecom); - const NW_HED_Context_Variable_t* var; - NW_Uint32 i = 0; - - /* while there is another entry */ - while ((var = NW_HED_Context_GetEntry (context, i)) != NULL) { - /* if the variable's name starts with "Ecom_" remove it -- don't increment i */ - if (!NW_Str_Strncmp ((NW_Ucs2*) var->name.storage, ecom, len)) { - NW_HED_Context_RemoveEntry (context, i); - } - - /* otherwise just increment i */ - else { - i++; - } - } - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: CopyInGlobalVariables() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode CopyInGlobalVariables(NW_Wml1x_ContentHandler_t* thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - NW_HED_Context_t* globalContext; - TBrowserStatusCode status = KBrsrSuccess; - - /* get the global context from the doc-root */ - docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - - globalContext = NW_HED_DocumentRoot_GetContext (docRoot, NW_HED_DocumentRoot_ContextGlobalId); - NW_ASSERT (globalContext); - - /* apply the global variables to the wml interpreter */ - NW_DeckDecoder_ContextToVarList (globalContext, thisObj->wmlInterpreter.var_list, - thisObj->wmlInterpreter.mem_segment_general); - - /* clear the global variable context */ - NW_HED_Context_Reset (globalContext); - - return status; -} - -/***************************************************************** - - Name: CopyOutGlobalVariables() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode CopyOutGlobalVariables(NW_Wml1x_ContentHandler_t* thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - NW_HED_Context_t* oldGlobalContext; - NW_HED_Context_t* newGlobalContext; - - /* get the global context from the doc-root */ - docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - oldGlobalContext = NW_HED_DocumentRoot_GetContext (docRoot, NW_HED_DocumentRoot_ContextGlobalId); - - /* convert the varlist into a new context */ - newGlobalContext = NW_DeckDecoder_VarListToContext(thisObj->wmlInterpreter.var_list); - - /* strip insecure variables */ - StripInsecureVariables (newGlobalContext); - - /* replace the old context with the new one */ - if (newGlobalContext != NULL) { - NW_Int8 id; - - NW_HED_DocumentRoot_RemoveContext (docRoot, NW_HED_DocumentRoot_ContextGlobalId); - - NW_Object_Delete (oldGlobalContext); - - id = NW_HED_DocumentRoot_ContextGlobalId; - NW_HED_DocumentRoot_AddContext (docRoot, newGlobalContext, &id); - } - - /* otherwise just reset the current old global context */ - else { - NW_HED_Context_Reset (oldGlobalContext); - } - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: CopyInTaskVariables() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode CopyInTaskVariables(NW_Wml1x_ContentHandler_t* thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - NW_HED_Context_t* context; - TBrowserStatusCode status = KBrsrSuccess; - - /* get the global context from the doc-root */ - docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT (docRoot); - - context = NW_HED_DocumentRoot_GetContext (docRoot, NW_Wml1x_ContentHandler_ContextTaskId); - if (context == NULL) { - return KBrsrSuccess; - } - - /* apply the global variables to the wml interpreter */ - NW_DeckDecoder_ContextToVarList (context, thisObj->wmlInterpreter.param_list, - thisObj->wmlInterpreter.mem_segment_general); - - /* clear the global variable context */ - NW_HED_Context_Reset (context); - - return status; -} - - -/***************************************************************** - - Name: CopyOutTaskVariables() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static TBrowserStatusCode CopyOutTaskVariables(NW_Wml1x_ContentHandler_t* thisObj) -{ - NW_HED_DocumentRoot_t* docRoot; - NW_HED_Context_t* oldContext; - NW_HED_Context_t* newContext; - - /* get the global context from the doc-root */ - docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - oldContext = NW_HED_DocumentRoot_GetContext (docRoot, NW_Wml1x_ContentHandler_ContextTaskId); - - /* convert the varlist into a new context */ - newContext = NW_DeckDecoder_VarListToContext(thisObj->wmlInterpreter.param_list); - - /* strip insecure variables */ - StripInsecureVariables (newContext); - - /* replace the old context with the new one */ - if (newContext != NULL) { - NW_Int8 id; - - NW_HED_DocumentRoot_RemoveContext (docRoot, NW_Wml1x_ContentHandler_ContextTaskId); - - NW_Object_Delete (oldContext); - - id = NW_Wml1x_ContentHandler_ContextTaskId; - NW_HED_DocumentRoot_AddContext (docRoot, newContext, &id); - } - - /* otherwise just reset the current old global context */ - else { - NW_HED_Context_Reset (oldContext); - } - - return KBrsrSuccess; -} - - - - -/**************************************************************************** -* IMAGE RELATED STATIC MEATHODS -*****************************************************************************/ - -/***************************************************************** - - Name: GetAltTextBox () - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static -TBrowserStatusCode GetAltTextBox (NW_Wml1x_ContentHandler_t *thisObj, - NW_Uint16 elId, - NW_LMgr_TextBox_t **textBox) - -{ - NW_Text_t *altStr = NULL; - NW_Ucs2 *retString = NULL; - TBrowserStatusCode ret_status = KBrsrFailure; - - - *textBox = NULL; - - /* find the 'alt' attribute and get its string value */ - ret_status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - elId, - ALT_ATTR, - &retString); - if (ret_status == KBrsrOutOfMemory) - return ret_status; - - if((ret_status == KBrsrSuccess) && (retString != NULL)) { - /*alt string exists*/ - altStr = (NW_Text_t*)NW_Text_UCS2_New (retString, - NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - if(altStr == NULL) { - return KBrsrOutOfMemory; - } - - /* create a text box with alternative text from "alt" attribute */ - *textBox = NW_LMgr_TextBox_New(1, altStr); - - if(*textBox == NULL) { - NW_Object_Delete (altStr); - return KBrsrOutOfMemory; - } - - } - return ret_status; -} - -/***************************************************************** - - Name: HandleInvalidImage() - - Description: - - Parameters: - - Algorithm: - - Return Value: - ret_status = HandleInvalidImage(contentHandler,thisObj,context,response,parentBox); - - Kimono modification (see HandleImageLoad): - Added output parameter (NW_LMgr_Box_t** box) - Removed calls to NodeChanged, NW_Wml1x_ImageWithinAnchorDefaultStyle. - Removed assert on response param. -*****************************************************************/ -TBrowserStatusCode HandleInvalidImage( NW_Wml1x_ContentHandler_t *thisObj, - NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode, - NW_Url_Resp_t* response, - void* pElId) -{ - /*image is not valid*/ - NW_LMgr_Box_t* box = NULL; - NW_LMgr_Box_t* contextBox = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_PropertyValue_t value; - NW_Uint32 elId32 = (NW_Uint32)pElId; - NW_LMgr_Property_t prop; - TBrowserStatusCode ret_status; - NW_LMgr_TextBox_t *textBox = NULL; - NW_HED_ContentHandler_t* contentHandler; - - NW_ASSERT( thisObj ); - NW_ASSERT( childNode ); - NW_REQUIRED_PARAM(response); - - /* for convenience */ - contentHandler = NW_HED_ContentHandlerOf( childNode ); - /*check if we have a valid context*/ - ret_status = _NW_Wml1x_ContentHandler_GetBoxTree( documentNode, &box ); - - /* initialize the boxVisitor */ - value.integer = 0; - if( ret_status == KBrsrSuccess && NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf (box)) - == KBrsrSuccess ) - { - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, 0)) != NULL) - { - if (NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)) - { - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - if (NW_UINT16_CAST(value.integer) == NW_UINT16_CAST(elId32)) - { - /* We found a box that has element Id same as context*/ - contextBox = box; - break; - } - } - } - } - /*check for local src attrib */ - if (NW_ImageCH_Epoc32ContentHandler_GetLoadMode(NW_ImageCH_Epoc32ContentHandlerOf (contentHandler)) == - NW_HED_UrlRequest_LoadLocal) { - - return LoadSrcImage(thisObj, NW_UINT16_CAST (value.integer)); - } - - /* No local src specified display broken canned image with alt text if present */ - ret_status = NW_HED_DocumentNode_GetBoxTree (contentHandler, &box); - if (ret_status != KBrsrSuccess) { - UrlLoader_UrlResponseDelete(response); - NW_Object_Delete (contentHandler); - return ret_status; - } - - /*Get the alt textBox if it exists*/ - ret_status = GetAltTextBox (thisObj,NW_UINT16_CAST (value.integer),&textBox); - if(ret_status == KBrsrOutOfMemory) { - NW_Object_Delete (box); - UrlLoader_UrlResponseDelete(response); - NW_Object_Delete (contentHandler); - return ret_status; - } - - if ((ret_status == KBrsrSuccess) && (textBox != NULL)) { - ret_status = NW_LMgr_ContainerBox_InsertChildAft(contextBox->parent, (NW_LMgr_Box_t*)textBox, contextBox); - if(ret_status == KBrsrOutOfMemory) { - NW_Object_Delete (textBox); - return ret_status; - } - } - - ret_status = NW_LMgr_ContainerBox_InsertChildAft(contextBox->parent, box, contextBox); - - if(ret_status == KBrsrSuccess) { - - AddImageProperties (thisObj, box, value); - NW_Wml1x_ImageWithinAnchorDefaultStyle(&prop, box); - } - NW_Object_Delete(contextBox); - return ret_status; -} - -/***************************************************************** - - Name: HandleValidImage() - - Description: - - Parameters: - - Algorithm: - - Return Value: - ret_status = HandleValidImage(contentHandler,thisObj,context,response,parentBox); - - Kimono modification (see HandleImageLoad): - Added output parameter (NW_LMgr_Box_t** box) - Removed calls to NodeChanged, NW_Wml1x_ImageWithinAnchorDefaultStyle. -***************************************************************** -TBrowserStatusCode HandleValidImage (NW_HED_ContentHandler_t* contentHandler, - NW_Wml1x_ContentHandler_t* thisObj, - NW_ADT_Vector_Metric_t index, - NW_LMgr_PropertyValue_t imgPropVal, - NW_Url_Resp_t* response, - NW_LMgr_ContainerBox_t* parentBox, - NW_LMgr_Box_t** box) -{ - TBrowserStatusCode ret_status; - - NW_REQUIRED_PARAM(response); - NW_ASSERT(contentHandler); - NW_ASSERT(box); - - *box = NULL; - - ret_status = NW_HED_DocumentNode_GetBoxTree (contentHandler, box); - if (ret_status != KBrsrSuccess) { - NW_Url_Resp_Delete(response); - NW_Object_Delete (contentHandler); - return ret_status; - } - - ret_status = NW_LMgr_ContainerBox_InsertChildAt(parentBox, *box, index); - - if(ret_status == KBrsrSuccess) { - AddImageProperties (thisObj, *box, imgPropVal); - NW_Wml1x_ImageWithinAnchorDefaultStyle(&prop, *box); - } - - return ret_status; -}*/ - - - -/* ------------------------------------------------------------------------- */ -static -NW_Bool -NW_Wml1x_ContentHandler_IsIntraDeck (NW_HED_ContentHandler_t *thisObj, - const NW_Text_UCS2_t *url) -{ - NW_Text_Length_t urlLength; - const NW_Ucs2 *urlStorage = NULL; - const NW_Ucs2 *currentUrlStorage = NULL; - NW_Ucs2 *urlBase = NULL; - NW_Ucs2 *currentUrlBase = NULL; - NW_Uint8 urlFreeNeeded = NW_FALSE; - NW_Bool match = NW_FALSE; - - /* pram check */ - NW_THROWIF_NULL (url); - - /* get the base urls */ - NW_THROWIF_NULL (urlStorage = NW_Text_GetUCS2Buffer(url, NW_Text_Flags_Aligned, &urlLength, &urlFreeNeeded)); - - NW_THROWIF_NULL (currentUrlStorage = NW_HED_UrlRequest_GetRawUrl ( - NW_HED_ContentHandler_GetUrlRequest (thisObj))); /* TODO change this to NW_HED_ContentHandler_GetUrlResponse */ - - NW_THROWIF_ERROR (NW_Url_GetBase(urlStorage, &urlBase)); - NW_THROWIF_ERROR (NW_Url_GetBase(currentUrlStorage, &currentUrlBase)); - - /* compare the current url with the specified */ - if (0 == NW_Str_Strcmp(currentUrlBase, urlBase)) { - match = NW_TRUE; - } - - /* Fall through */ - - /* Clean up is the same for failure and success */ -NW_CATCH_ERROR - if (urlFreeNeeded) { - NW_Str_Delete((NW_Ucs2 *) urlStorage); - } - NW_Str_Delete((NW_Ucs2 *) urlBase); - NW_Str_Delete(currentUrlBase); - - return match; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_Wml1x_ContentHandler_CreateDocument(NW_Wml1x_ContentHandler_t* thisObj ) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_Buffer_t* domBuffer = NULL; - NW_Bool plainText = NW_FALSE; - NW_HED_ContentHandler_t* contentHandler; - NW_HED_DomTree_t* domTree; - NW_Bool encodingFound; - NW_Uint8 parse_number = 0; - - NW_LOG0(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument STARTS."); - - contentHandler = NW_HED_ContentHandlerOf( thisObj ); - status = _NW_HED_CompositeContentHandler_ComputeEncoding(NW_HED_CompositeContentHandlerOf(thisObj), - contentHandler->response, &encodingFound); - if (status != KBrsrSuccess) - { - return status; - } - - - /* convert a plain-text response into a wbxml buffer */ -htmlp_parse: - if(0 == NW_Asc_stricmp((char*)HTTP_text_vnd_wap_wml_string, (char*)contentHandler->response->contentTypeString)) - { - NW_Uint32 line = 0; - NW_HED_CharsetConvContext ctx; - ctx.contentHandler = NW_HED_CompositeContentHandlerOf(thisObj); - ctx.response = contentHandler->response; - NW_LOG0(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument before HtmlToWbxml."); - parse_number++; - if (!encodingFound) // Automatic settings - { - status = NW_HTMLP_HtmlToWbxml( contentHandler->response->body, contentHandler->response->charset, - contentHandler->response->byteOrder, - &domBuffer, &line, NW_Wml_1_3_PublicId, - NW_HTMLP_Get_WML_ElementTableCount(),NW_HTMLP_Get_WML_ElementDescriptionTable(), - NW_TRUE, NW_TRUE, &ctx, NW_HED_CompositeContentHandler_CharConvCB, NW_FALSE); - } - else // Use user selection or BOM - { - status = NW_HTMLP_HtmlToWbxml( contentHandler->response->body, contentHandler->response->charset, - contentHandler->response->byteOrder, - &domBuffer, &line, NW_Wml_1_3_PublicId, - NW_HTMLP_Get_WML_ElementTableCount(), - NW_HTMLP_Get_WML_ElementDescriptionTable(), - NW_TRUE, NW_FALSE, &ctx, NW_HED_CompositeContentHandler_CharConvCB, - NW_FALSE); - } - NW_LOG0(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument after HtmlToWbxml."); - if (domBuffer) - NW_LOG1(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument, Length of domBuffer %d", domBuffer->length); - if (BRSR_STAT_IS_FAILURE(status)) { - NW_LOG0(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument, HtmlToWbxml returns BadContent error."); - status = KBrsrXhtmlBadContent; - } - - plainText = NW_TRUE; - } - else - { - /* Otherwise stick our wbxml content in a NW_Buffer */ - - /* init our domBuffer */ - domBuffer = NW_Buffer_New(0); - - if (domBuffer != NULL && contentHandler->response->body != NULL) - { - domBuffer->allocatedLength = contentHandler->response->body->allocatedLength; - domBuffer->length = contentHandler->response->body->length; - domBuffer->data = contentHandler->response->body->data; - - if( 0 == NW_Asc_stricmp((char*)HTTP_application_wmlc_saved_string, - (char*)contentHandler->response->contentTypeString) || - 0 == NW_Asc_stricmp((char*)HTTP_application_saved_string, - (char*)contentHandler->response->contentTypeString) ) - { - plainText = NW_TRUE; - - if(contentHandler->response->charset == HTTP_iso_10646_ucs_2) - { - /* This block is only used to switch the byte order of domBuffer. Each time the - function NW_HED_DomTree_New is called, the byte order of domBuffer is changed. - For a saved page, the domBuffer was saved in the byte order after the change when - this page was loaded from web. So this order is wrong when call function - NW_Wml_LoadWmlResp below. Thus we call NW_HED_DomTree_New here to change the - byte order back for saved page loading */ - domTree = NW_HED_DomTree_New (domBuffer, contentHandler->response->charset, - NW_Wml_1_3_PublicId, NULL); - if (domTree != NULL) - { - /* Orphan the Buffer so it isn't deleted then delete the temp DomTree */ - domBuffer = NW_HED_DomTree_OrphanDomBuffer (domTree); - - NW_HED_DomTree_Delete (domTree); - domTree = NULL; - } - /* end of the byte order switch */ - } - } - - delete contentHandler->response->body; - contentHandler->response->body = NULL; - } - else - { - status = KBrsrOutOfMemory; - } - } - - /* transfer ownership of reqUrl, redirected and content to the wml interpreter */ - if (domBuffer != NULL) - { - status = NW_Wml_LoadWmlResp(&thisObj->wmlInterpreter, domBuffer, plainText, contentHandler->response); - - // if the processing of domBuffer failed due to user selecting the wrong encoding, - // set the default encoding to latin-1 and set the encodingFound to false so - // charset detection is enabled to find the right charset. - // call the htmlp parser again to reparse it. - if (status != KBrsrSuccess && encodingFound) - { - encodingFound = NW_FALSE; - contentHandler->response->charset = HTTP_iso_8859_1; - if (parse_number <2) - { - goto htmlp_parse; - } - } - } - -#ifdef _DEBUG - { - NW_HED_DomHelper_t* domHelper; - NW_HED_DomTree_t* domTree2; - - domHelper = NW_Wml1x_ContentHandler_GetDomHelper (thisObj, NULL); - domTree2 = NW_Wml1x_ContentHandler_GetDomTree (thisObj); - - if ((domHelper != NULL) && (domTree2 != NULL)) - { - NW_HED_DomHelper_PrintTree (domHelper, NW_HED_DomTree_GetRootNode (domTree2)); - } - } -#endif - NW_LOG0(NW_LOG_LEVEL2, "NW_WML1x_ContentHandler_CreateDocument ENDS."); - - return status; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Wml1x_ContentHandler_Class_t NW_Wml1x_ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_CompositeContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ _NW_Wml1x_ContentHandler_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Wml1x_ContentHandler_t), - /* construct */ _NW_Wml1x_ContentHandler_Construct, - /* destruct */ _NW_Wml1x_ContentHandler_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_Wml1x_ContentHandler_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_Wml1x_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_Wml1x_ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_Wml1x_ContentHandler_Suspend, - /* resume */ _NW_Wml1x_ContentHandler_Resume, - /* allLoadsCompleted */ _NW_Wml1x_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_Wml1x_ContentHandler_IntraPageNavigationCompleted, - /* loseFocus */ _NW_Wml1x_ContentHandler_LoseFocus, - /* gainFocus */ _NW_Wml1x_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_HED_ContentHandler_PartialNextChunk, - /* getTitle */ _NW_Wml1x_ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ NULL, - /* handleRequest */ _NW_Wml1x_ContentHandler_HandleRequest, - /* featureQuery */ _NW_Wml1x_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_HED_CompositeContentHandler */ - /* documentDisplayed */ _NW_HED_CompositeContentHandler_DocumentDisplayed - }, - { /* NW_Wml1x_ContentHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const _NW_Wml1x_ContentHandler_InterfaceList[] = { - &NW_Wml1x_ContentHandler_IWmlBrowserLib_Class, - &NW_Wml1x_ContentHandler_IWmlScriptListener_Class, - &NW_Wml1x_ContentHandler_NumberCollector_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_WmlsCh_IWmlBrowserLib_Class_t NW_Wml1x_ContentHandler_IWmlBrowserLib_Class = { - { /* NW_Object_Core */ - /* super */ &NW_WmlsCh_IWmlBrowserLib_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_Wml1x_ContentHandler_t, NW_WmlsCh_IWmlBrowserLib) - }, - { /* NW_WmlsCh_IWmlBrowserLib */ - /* init - setup task var */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_Init, - /* getVar */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_GetVar, - /* setVar */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_SetVar, - /* go */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_Go, - /* prev */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_Prev, - /* newContext */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_NewContext, - /* refresh */ _NW_Wml1x_ContentHandler_IWmlBrowserLib_Refresh - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_WmlsCh_IWmlScriptListener_Class_t NW_Wml1x_ContentHandler_IWmlScriptListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_WmlsCh_IWmlScriptListener_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - }, - { /* NW_Object_Interface */ - /* offset */ offsetof (NW_Wml1x_ContentHandler_t, NW_WmlsCh_IWmlScriptListener) - }, - { /* NW_WmlsCh_IWmlBrowserLib */ - /* start */ _NW_Wml1x_ContentHandler_IWmlScriptListener_Start, - /* finish */ _NW_Wml1x_ContentHandler_IWmlScriptListener_Finish, - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_NumberCollector_Class_t NW_Wml1x_ContentHandler_NumberCollector_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_NumberCollector_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_Wml1x_ContentHandler_t, - NW_Markup_NumberCollector) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_NumberCollector_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Markup_NumberCollector */ - /* getBoxTree */ _NW_Wml1x_ContentHandler_NumberCollector_GetBoxTree, - /* boxIsValid */ _NW_Markup_NumberCollector_BoxIsValid, - /* getHrefAttr */ _NW_Wml1x_ContentHandler_NumberCollector_GetHrefAttr, - /* getAltAttr */ _NW_Wml1x_ContentHandler_NumberCollector_GetAltAttr - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Construct() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Wml1x_ContentHandler_t *thisObj; - TBrowserStatusCode status = KBrsrSuccess; - const NW_WmlApi_t *wml_api; - NW_Ucs2 *reqUrlCpy; - const NW_Text_t *url; - NW_LMgr_BidiFlowBox_t* bidiFlowBox; - const NW_HED_UrlRequest_t* urlRequest; - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_HED_ContentHandler_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* initialize the member variables */ - - /* initialize the WML interpreter */ - urlRequest = va_arg (*argp, NW_HED_UrlRequest_t*); - NW_ASSERT (urlRequest); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - url = NW_HED_UrlRequest_GetUrl(urlRequest); - reqUrlCpy = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Copy, NULL, NULL); - - if (reqUrlCpy != NULL) { - wml_api = NW_Api_GetWml1xCB(); - NW_ASSERT(wml_api != NULL); - status = NW_Wml_InitFromShell(&thisObj->wmlInterpreter, - reqUrlCpy, wml_api, thisObj); - NW_Mem_Free(reqUrlCpy); - } else { - status = KBrsrOutOfMemory; - } - - /* create the Wml1x_FormLiaison object */ - thisObj->formLiaison = NW_Wml1x_FormLiaison_New (thisObj); - - - /* ensure destructor will not break anything */ - thisObj->title = NULL; - /* thisObj->currentBox = NULL; */ - thisObj->wmlTimer = NULL; - thisObj->optionMap = NULL; - thisObj->optionItemList = NULL; - thisObj->contextSuspended = NULL; - thisObj->saveddeck = NW_FALSE; - thisObj->histload = NW_FALSE; - thisObj->reload = NW_FALSE; - thisObj->allowTimer = NW_TRUE; - - /* create boxtree here, this fix the bug in this case: - - <wml> - <template> - <!-- Template implementation here. --> - <do type="prev"><prev/></do> - </template> - <card id="card1" title="Card #1" newcontext="true"> - <onevent type="onenterforward"> - <go href="opg.wmls#main('card2')"/> - </onevent> - </card> - <card id="card2" title="Card #2"> - <p> - Test result: $test - Literal Value: $literal - </p> - </card> - This WML page cause loading a script page without having any boxtree in the Wml1x Content Handler */ - - bidiFlowBox = NW_LMgr_BidiFlowBox_New(0); - NW_HED_ContentHandlerOf (thisObj)->boxTree = NW_LMgr_BoxOf(bidiFlowBox); - thisObj->currentBox = NW_HED_ContentHandlerOf (thisObj)->boxTree; - if (thisObj->currentBox == NULL) { - return KBrsrFailure; - } - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Destruct() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (dynamicObject); - - NW_Object_Delete (thisObj->title); - NW_Object_Delete (thisObj->currentUrl); - NW_Object_Delete (thisObj->optionMap); - NW_Object_Delete (thisObj->formLiaison); - - thisObj->title = NULL; - thisObj->currentUrl = NULL; - thisObj->optionMap = NULL; - thisObj->formLiaison = NULL; - - /* ensure that the content handler is suspended */ - _NW_Wml1x_ContentHandler_Suspend (NW_HED_DocumentNodeOf (thisObj), NW_TRUE); - - /* unregister with the wae user agent */ - TBrowserStatusCode status = NW_Wml_Exit(&thisObj->wmlInterpreter); - NW_ASSERT(status == KBrsrSuccess); - - /* NW_Object_Delete handles NULL pointer */ - NW_Object_Delete (thisObj->contextSuspended); -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Initialize() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Initialize( NW_HED_DocumentNode_t *documentNode, - TBrowserStatusCode aInitStatus ) -{ - TBrowserStatusCode status; - NW_Wml1x_ContentHandler_t *thisObj; - NW_HED_ContentHandler_t* contentHandler; - const NW_HED_UrlRequest_t *urlRequest; - NW_WaeUsrAgent_t *wae; - - NW_REQUIRED_PARAM( aInitStatus ); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - contentHandler = NW_HED_ContentHandlerOf( thisObj ); - - /* register the WML callback with the Wml Interpreter */ - wae = (NW_WaeUsrAgent_t*)NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - - urlRequest = NW_HED_ContentHandler_GetUrlRequest ( thisObj ); - NW_ASSERT(urlRequest); - /* - ** copy the global variables from the document-root. Don't - ** do this if the request that created the content-handler - ** was started from a shell request, like the goto dialog or - ** hotlist dialog. See WML June2000 Specification section 10.4. - */ - // ZAL: add comment why it has been moved here from construct - if (NW_HED_UrlRequest_GetReason( urlRequest ) != NW_HED_UrlRequest_Reason_ShellLoad ) - { - CopyInGlobalVariables (thisObj); - - CopyInTaskVariables (thisObj); - NW_Wml_ApplyTaskVariables(&thisObj->wmlInterpreter); - } - - if( contentHandler->response ) - { - /* set the correct saveddeck boolean value */ - if( 0 == NW_Asc_stricmp( (char*)HTTP_application_wmlc_saved_string, - (char*)contentHandler->response->contentTypeString ) || - 0 == NW_Asc_stricmp( (char*)HTTP_application_saved_string, - (char*)contentHandler->response->contentTypeString ) ) - { - NW_Wml1x_ContentHandler_SetSaveddeck (thisObj, NW_TRUE); - } - - if(NW_HED_UrlRequest_GetReason( urlRequest ) != NW_HED_UrlRequest_Reason_ShellPrev ) - { - NW_Wml1x_ContentHandler_SetHistload (thisObj, NW_TRUE); - } - - if(NW_HED_UrlRequest_GetReason( urlRequest ) != NW_HED_UrlRequest_Reason_ShellReload ) - { - NW_Wml1x_ContentHandler_SetReload (thisObj, NW_TRUE); - } - - - /* initialize the WML interpreter */ - NW_HED_DocumentRoot_t* documentRoot = NULL; - NW_HED_HistoryStack_t* history = NULL; - NW_Uint8 reason = NW_HED_UrlRequest_GetReason(urlRequest); - documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - if (documentRoot) - { - history = NW_HED_DocumentRoot_GetHistoryStack (documentRoot); - } - if (history) - { - NW_Bool possiblyOEB = history->iWmlCtrl->HistoryController().possibleWmlOEB(); - if (possiblyOEB) - { - reason = NW_HED_UrlRequest_Reason_DocPrev; - history->iWmlCtrl->HistoryController().setPossibleWmlOEB(EFalse); - } - } - /* Set the actual task in Wml */ - thisObj->wmlInterpreter.curr_task = HedToWmlTask(reason); - - status = NW_Wae_RegisterWml(wae, &thisObj->wmlInterpreter); - - /* create the DOM document */ - status = NW_Wml1x_ContentHandler_CreateDocument (thisObj ); - - /* disables small scrren layout */ - NW_Settings_SetDisableSmallScreenLayout(NW_TRUE); - } - else - { - status = KBrsrUnexpectedError; - } - // ZAL: why don't we call superclass init just like xhtmlCH does? - // temp - if( status == KBrsrSuccess && contentHandler ) - { - contentHandler->initialized = NW_TRUE; - } - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_GetBoxTree() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree) -{ - - NW_Wml1x_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_HED_DocumentNode_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* successful completion */ - *boxTree = NW_HED_ContentHandlerOf (thisObj)->boxTree; - if (*boxTree == NULL) { - return KBrsrFailure; - } - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Suspend() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree) -{ - NW_Wml1x_ContentHandler_t* thisObj; - NW_WaeUsrAgent_t *wae; - NW_HED_DocumentRoot_t *docRoot; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* just return if we are already suspended */ - if (thisObj->isSuspended == NW_TRUE) { - return; - } - - thisObj->isSuspended = NW_TRUE; - - /* call our super class to suspend the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - suspend (documentNode, aDestroyBoxTree); - - /* copy the global variables out */ - (void) CopyOutGlobalVariables (thisObj); - - /* Copy out task variable */ - (void) CopyOutTaskVariables (thisObj); - - /* stop our timers */ - if (((thisObj->wmlInterpreter).wml_api != NULL) && - ((thisObj->wmlInterpreter).wml_api->timer)) { - (void)(thisObj->wmlInterpreter).wml_api->timer->destroy(thisObj); - } - - /* cleanup the dynamic item list in the OptionList */ - docRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (thisObj); - - NW_ASSERT(docRoot->appServices != NULL); - - if (docRoot->appServices->pictureViewApi.initDynList != NULL) { - (docRoot->appServices->pictureViewApi.initDynList)(docRoot->browserApp_Ctx); - } - - if (thisObj->optionItemList != NULL) { - NW_Wml1x_ContentHandler_DeleteOptionItemList(thisObj->optionItemList); - thisObj->optionItemList = NULL; - } - /* unregister wae */ - wae = (NW_WaeUsrAgent_t*)NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - - TBrowserStatusCode status = NW_Wae_UnRegisterWml(wae); - NW_ASSERT(status == KBrsrSuccess); -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Resume() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_Resume (NW_HED_DocumentNode_t* documentNode) -{ - NW_Wml1x_ContentHandler_t* thisObj; - NW_WaeUsrAgent_t *wae; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* just return if we are not suspended */ - if (thisObj->isSuspended == NW_FALSE) { - return; - } - - thisObj->isSuspended = NW_FALSE; - - /* call our super class to resume the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - resume (documentNode); - - /* register wae */ - wae = (NW_WaeUsrAgent_t*)NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - (void) NW_Wae_RegisterWml(wae, &thisObj->wmlInterpreter); - - /* tickle the content handler */ - TBrowserStatusCode status = NW_Wml_HandleIntraDocRequest (&thisObj->wmlInterpreter, RESTORE_TASK, NW_TRUE, NULL); - NW_ASSERT(status == KBrsrSuccess); -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_AllLoadsCompleted() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode) -{ - NW_Wml1x_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* call our super class to notify the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - allLoadsCompleted (documentNode); - - /* TODO here we can start timers, animations, etc. */ - - if (thisObj->allowTimer) - { - /* set timer after all loads associated with the pages are completed. - Exception is when the load was for WmlScript. In this case - "outstandingLoadCount" is negative value */ - if (thisObj->wmlInterpreter.outstandingLoadCount >= 0) { - NW_Wml_HandleTimer (&thisObj->wmlInterpreter); - } - } -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IntraPageNavigationCompleted() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IntraPageNavigationCompleted (NW_HED_DocumentNode_t* documentNode) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* call our super class to notify the children */ - status = NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - intraPageNavigationCompleted (documentNode); - - /* set timer after all loads associated with the pages are completed*/ - /*lint -e{666} Expression with side effects passed to repeated parameter in macro*/ - if(!NW_HED_DocumentRoot_IsLoading(NW_HED_DocumentNode_GetRootNode (documentNode))) { - status = NW_Wml_HandleTimer(&thisObj->wmlInterpreter); - } - - - return status; -} -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_LoseFocus() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_Wml1x_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* call our super class to suspend the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - loseFocus (documentNode); - - /* stop our timers */ - if (((thisObj->wmlInterpreter).wml_api != NULL) && - ((thisObj->wmlInterpreter).wml_api->timer)) { - (void)(thisObj->wmlInterpreter).wml_api->timer->stop(thisObj); - } -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_GainFocus() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -void -_NW_Wml1x_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode) -{ - NW_Wml1x_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - - /* call our super class to resume the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - gainFocus (documentNode); - - /* stop our timers */ - if (((thisObj->wmlInterpreter).wml_api != NULL) && - ((thisObj->wmlInterpreter).wml_api->timer)) { - (void)(thisObj->wmlInterpreter).wml_api->timer->resume(thisObj); - } -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_GetTitle() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -const NW_Text_t* -_NW_Wml1x_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler) -{ - NW_Wml1x_ContentHandler_t* thisObj; - NW_Ucs2* cardTitle = NULL; - TBrowserStatusCode status; - - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (contentHandler); - - /* we create the title just-in-time */ - if (thisObj->title != NULL) { - NW_Object_Delete (thisObj->title); - thisObj->title = NULL; - } - - if(thisObj->wmlInterpreter.decoder != NULL) - { - status = NW_DeckDecoder_GetCardTitle(thisObj->wmlInterpreter.decoder, - thisObj->wmlInterpreter.var_list, &cardTitle); - if (status == KBrsrSuccess) - { - thisObj->title = - (NW_Text_t*) NW_Text_UCS2_New (cardTitle, 0, NW_Text_Flags_TakeOwnership); - } - } - - return thisObj->title; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_Cancel() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_ContentHandler_t* thisObj = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_Wml1x_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_Wml1x_ContentHandlerOf (documentNode); - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - /* We would like to stop all the timer in case of Cancel, except the case - where user initiated the cancel. User can hit cancel button even where - there are no pending loads and in that case we don't want to stop the - timers. - - Timer in a wml card is started only after all the loads in the page - complete */ - if(cancelType != NW_HED_CancelType_User) { - (void)(thisObj->wmlInterpreter).wml_api->timer->stop(thisObj); - } - - /* if there has been an onEnterForward or onEnterBackward navigation and there is an error, display - the current content (ie, last navigated card). It is desirable to limit re-rendering the content - to oef error cases only as single navigations have ALREADY rendered the last good card. */ - if (docRoot->documentErrorClass != 0 && thisObj->wmlInterpreter.oefNavigation == NW_TRUE) { - NW_Wml_DisplayCard(&(thisObj->wmlInterpreter), NW_FALSE); - } - - status = NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - cancel (documentNode, cancelType); - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_HandleRequest() - - Description: Method is called to handle url-requests that are - originated outside of wml -- for example the shell. - Requests that are started from inside of wml, link - activation, wml-prev, scripts, etc do NOT go through - this method but instead are handled internally. - Although both internal and external requests go through - NW_Wml_HandleIntraDocRequest. - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_HandleRequest (NW_HED_ContentHandler_t *thisObj, - NW_HED_UrlRequest_t *urlRequest) -{ - NW_Wml1x_ContentHandler_t *wmlObj; - NW_Uint8 reason; - NW_Wml_Task_e task; - const NW_Ucs2 *url; - - TBrowserStatusCode status = KBrsrFailure; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Wml1x_ContentHandler_Class)); - NW_ASSERT (urlRequest != NULL); - - /* don't handle reload requests here */ - if (NW_HED_UrlRequest_GetReason (urlRequest) == NW_HED_UrlRequest_Reason_ShellReload) { - return KBrsrFailure; - } - - /* don't handle post requests here */ - if (NW_HED_UrlRequest_GetMethod (urlRequest) == NW_URL_METHOD_POST) { - return KBrsrFailure; - } - - wmlObj = NW_Wml1x_ContentHandlerOf (thisObj); - - /* get the reason and set the task type */ - reason = NW_HED_UrlRequest_GetReason(urlRequest); - - /* Make sure that setvar's are executed for _ShellPrev */ - if (reason == NW_HED_UrlRequest_Reason_ShellPrev) { - NW_THROWIF_ERROR (status = NW_Wml_ProcessSetvarElements(&wmlObj->wmlInterpreter)); - } - - /* if this request is not targeted to this deck or - no-cache is requested then return failure */ - if (urlRequest->cacheMode == NW_CACHE_NOCACHE || - (NW_Wml1x_ContentHandler_IsIntraDeck (thisObj, - (NW_Text_UCS2_t*)NW_HED_UrlRequest_GetUrl(urlRequest)) == NW_FALSE) || reason == NW_HED_UrlRequest_Reason_ShellLoad || - reason == NW_HED_UrlRequest_Reason_DocLoad || (urlRequest->loadType == NW_UrlRequest_Type_Image)) { - return KBrsrFailure; - } - - switch (reason) { - case NW_HED_UrlRequest_Reason_ShellPrev: - case NW_HED_UrlRequest_Reason_DocPrev: - task = PREV_TASK; - break; - - case NW_HED_UrlRequest_Reason_RestorePrev: - case NW_HED_UrlRequest_Reason_RestoreNext: - task = RESTORE_TASK; - break; - - default: - task = GO_TASK; - break; - } - - /* get the url */ - url = NW_HED_UrlRequest_GetRawUrl (urlRequest); - - NW_THROWIF_ERROR (status = NW_Wml_HandleIntraDocRequest(&wmlObj->wmlInterpreter, - task, NW_HED_UrlRequest_IsHistoricRequest (urlRequest), url)); - - return KBrsrSuccess; - -NW_CATCH_ERROR - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_FeatureQuery() - - Description: Method is called to verify if a particular feature - required by this content handler - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_FeatureQuery (NW_HED_ContentHandler_t *thisObj, - NW_HED_ContentHandler_Feature_t featureId) -{ - TBrowserStatusCode nwStatus; - - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Wml1x_ContentHandler_Class)); - NW_REQUIRED_PARAM(thisObj); - - switch (featureId) - { - case NW_HED_ContentHandler_HitoryPrevUseStale: - nwStatus = KBrsrSuccess; - break; - default: - nwStatus = KBrsrFailure; - break; - } - return nwStatus; -} -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_Init() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Init(NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - NW_ASSERT(wmlBrowserLib != NULL); - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - if (thisObj != NULL) { - return NW_Wml_ApplyTaskVariables(&thisObj->wmlInterpreter); - } else { - return KBrsrFailure; - } -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_GetVar() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_GetVar (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *var, NW_Ucs2 **ret_string) -{ - NW_Wml1x_ContentHandler_t *thisObj; - TBrowserStatusCode status; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - status = NW_Wml_GetVar(&thisObj->wmlInterpreter, var, ret_string); - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_SetVar() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_SetVar (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *var, const NW_Ucs2 *value) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - return NW_Wml_SetVar(&thisObj->wmlInterpreter, var, value); -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_Go() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Go (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib, - const NW_Ucs2 *url, const NW_Ucs2 *param, - NW_Http_Header_t *header) -{ - NW_Ucs2 *url_cpy = NULL; - NW_Ucs2 *param_cpy = NULL; - NW_Http_Header_t *header_cpy = NULL; - NW_Wml1x_ContentHandler_t *thisObj; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - /* make a copy for the wml interpreter */ - if (url != NULL) { - url_cpy = NW_Str_Newcpy(url); - if (url_cpy == NULL) { - return KBrsrOutOfMemory; - } - } - - if (param != NULL) { - param_cpy = NW_Str_Newcpy(param); - if (param_cpy == NULL) { - NW_Str_Delete(url_cpy); - return KBrsrOutOfMemory; - } - } - - if (header != NULL) { - //header_cpy = UrlLoader_HeadersCopy(header); - if (header_cpy == NULL) { - NW_Str_Delete(url_cpy); - NW_Str_Delete(param_cpy); - return KBrsrOutOfMemory; - } - } - - NW_Wml_LoadUrl(&thisObj->wmlInterpreter, url_cpy, param_cpy, header_cpy); - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_Prev() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Prev (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - NW_Wml_LoadPrev(&thisObj->wmlInterpreter); - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_NewContext() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_NewContext (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib) -{ - NW_Wml1x_ContentHandler_t *thisObj; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlBrowserLib); - - NW_Wml_NewContextFromScript(&thisObj->wmlInterpreter); - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlBrowserLib_Refresh() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlBrowserLib_Refresh (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib) -{ - /* Refresh is a NOOP */ - NW_REQUIRED_PARAM(wmlBrowserLib); - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlScriptListener_Start() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlScriptListener_Start (NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const NW_Ucs2 *url) -{ - NW_Wml1x_ContentHandler_t *thisObj; - NW_HED_DocumentRoot_t* docRoot = NULL; - void *browserApp = NULL; - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlScrListener); - - /* get the global context from the doc-root */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - if(docRoot == NULL) { - return KBrsrFailure; - } - - browserApp = NW_Ctx_Get(NW_CTX_BROWSER_APP, 0); - - (void)docRoot->appServices->loadProgress_api.start(browserApp, url); - - return KBrsrSuccess; -} - -/***************************************************************** - - Name: _NW_Wml1x_ContentHandler_IWmlScriptListener_Finish() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_ContentHandler_IWmlScriptListener_Finish (NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const TBrowserStatusCode scrStatus, const NW_Ucs2 *message) -{ - NW_Wml1x_ContentHandler_t *thisObj; - NW_HED_CompositeNode_t* compositeNode; - NW_HED_DocumentRoot_t *docRoot = NULL; - NW_HED_DocumentNode_t *docNode = NULL; - NW_LMgr_RootBox_t *rootBox = NULL; - NW_HED_ContentHandler_t *scriptContentHandler = NULL; - NW_Ucs2 *url = NULL; - void *browserApp = NULL; - - NW_TRY (status) { - NW_REQUIRED_PARAM(message); - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Interface_GetImplementer (wmlScrListener); - docNode = NW_HED_DocumentNodeOf (thisObj); - /* get the global context from the doc-root */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (docNode); - rootBox = NW_HED_DocumentRoot_GetRootBox (docRoot); - - compositeNode = (NW_HED_CompositeNode_t*) - NW_Object_QueryAggregate (thisObj, &NW_HED_CompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - - scriptContentHandler = (NW_HED_ContentHandler_t*) - NW_HED_CompositeNode_LookupChild (compositeNode, - (void*) &NW_WmlScript_ContentHandler_Class); - if (scriptContentHandler != NULL) { - url = NW_Str_Newcpy (NW_WmlScript_ContentHandler_Get_Url (NW_WmlScript_ContentHandlerOf(scriptContentHandler))); - NW_THROW_OOM_ON_NULL (url, status); - } - - /* done with the script content handler, get rid of it */ - NW_HED_CompositeNode_DeleteChild (compositeNode, - (void*) &NW_WmlScript_ContentHandler_Class); - - /* reset variable before returning to WML */ - rootBox->iYScrollChange = 0; - - /* - * Note: Restarting the Wml interpreter could result in navigation to a URL. - * When the script aborts, the script state on the wml interpreter is not purged. - */ - status = NW_Wml_ReStart(&thisObj->wmlInterpreter, scrStatus); - - _NW_THROW_ON_ERROR(status); - - } - NW_CATCH (status) { - } - NW_FINALLY { - browserApp = NW_Ctx_Get(NW_CTX_BROWSER_APP, 0); - if(docRoot == NULL) { - NW_Str_Delete(url); - return KBrsrFailure; - } - (void)docRoot->appServices->loadProgress_api.finish(browserApp, url); - NW_Str_Delete(url); - return status; - } NW_END_TRY -} - -/***************************************************************** - - Name: NW_Wml1x_ContentHandler_DeleteOptionItemList() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -NW_Wml1x_ContentHandler_DeleteOptionItemList(NW_Ds_DynamicArray_t *itemList) -{ - NW_Uint16 i; - NW_Uint16 numStrings; - NW_Ucs2 *itemString = NULL; - - NW_ASSERT(itemList != NULL); - - numStrings = NW_Ds_DarGetCount(itemList); - for (i = 0; i < numStrings; i++) { - itemString = (NW_Ucs2*)NW_Ds_DarGetElement(itemList, i); - NW_Str_Delete(itemString); - } - - NW_Ds_DarDelete(itemList); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DomHelper_t* -NW_Wml1x_ContentHandler_GetDomHelper (NW_Wml1x_ContentHandler_t* thisObj, - NW_Wml_VarList_t* varList) -{ - if (thisObj->wmlInterpreter.decoder != NULL) { - return NW_Wml_Deck_GetDomHelper (thisObj->wmlInterpreter.decoder->domDeck, varList); - } - else { - return NULL; - } -} - -/* ------------------------------------------------------------------------- */ -NW_HED_DomTree_t* -NW_Wml1x_ContentHandler_GetDomTree (NW_Wml1x_ContentHandler_t *thisObj) -{ - if (thisObj->wmlInterpreter.decoder != NULL) { - return NW_Wml_Deck_GetDomTree (thisObj->wmlInterpreter.decoder->domDeck); - } - else { - return NULL; - } -} - -/* ------------------------------------------------------------------------- * - NW_Markup_NumberCollector methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_LMgr_Box_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetBoxTree (NW_Markup_NumberCollector_t* numberCollector) -{ - NW_Wml1x_ContentHandler_t* thisObj; - NW_LMgr_Box_t* boxTree; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_Wml1x_ContentHandler_NumberCollector_Class)); - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (numberCollector); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Wml1x_ContentHandler_Class)); - - /* return the box tree */ - (void)NW_HED_DocumentNode_GetBoxTree (thisObj, &boxTree); - return boxTree; -} - - -NW_Text_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetHrefAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box) -{ - NW_LMgr_PropertyValue_t value; - NW_Wml1x_ContentHandler_t* thisObj; - NW_Ucs2 *retString = NULL; - TBrowserStatusCode status = KBrsrFailure; - NW_Text_t* text = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_Wml1x_ContentHandler_NumberCollector_Class)); - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (numberCollector); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Wml1x_ContentHandler_Class)); - - value.integer = 0; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - NW_UINT16_CAST(value.integer), - HREF_ATTR, - &retString); - if((status == KBrsrSuccess) && (retString != NULL)) { - /*alt string exists*/ - NW_Text_t* retUrl = NULL; - - text = (NW_Text_t*)NW_Text_UCS2_New (retString, - NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - if (text) - { - status = NW_HED_ContentHandler_ResolveURL ((NW_HED_ContentHandler_t *)thisObj, text, &retUrl); - if (status == KBrsrSuccess) - { - text = retUrl; /* NW_HED_ContentHandler_ResolveURL handles text and retUrl objects correctly */ - } - } - - } - return text; -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -_NW_Wml1x_ContentHandler_NumberCollector_GetAltAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box) -{ - NW_LMgr_PropertyValue_t value; - NW_Wml1x_ContentHandler_t* thisObj; - NW_Ucs2 *retString = NULL; - TBrowserStatusCode status = KBrsrFailure; - NW_Text_t* text = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_Wml1x_ContentHandler_NumberCollector_Class)); - - /* for convenience */ - thisObj = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (numberCollector); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_Wml1x_ContentHandler_Class)); - - value.integer = 0; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - status = NW_Wml_GetAttribute(&(thisObj->wmlInterpreter), - NW_UINT16_CAST(value.integer), - ALT_ATTR, - &retString); - if((status == KBrsrSuccess) && (retString != NULL)) { - /*alt string exists*/ - text = (NW_Text_t*)NW_Text_UCS2_New (retString, - NW_Str_Strlen(retString), - NW_Text_Flags_TakeOwnership); - } - return text; -} -/* retrieve the boolean whether content is saved content */ -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Wml1x_ContentHandler_IsSaveddeck (NW_Wml1x_ContentHandler_t * thisObj) -{ - NW_ASSERT(thisObj); - return thisObj->saveddeck; -} - -/* retrieve the boolean whether content is history load */ -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Wml1x_ContentHandler_IsHistload (NW_Wml1x_ContentHandler_t * thisObj) -{ - NW_ASSERT(thisObj); - return thisObj->histload; -} - - -/* retrieve the boolean whether content is reload */ -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_Wml1x_ContentHandler_IsReload (NW_Wml1x_ContentHandler_t * thisObj) -{ - NW_ASSERT(thisObj); - return thisObj->reload; -} - -/* set the boolean whether content is the saved content */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetSaveddeck (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isSaveddeck) -{ - NW_ASSERT(thisObj); - thisObj->saveddeck = isSaveddeck; - return KBrsrSuccess; -} - -/* set the boolean whether content is history load */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetHistload (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isHistload) -{ - NW_ASSERT(thisObj); - thisObj->histload = isHistload; - return KBrsrSuccess; -} - -/* set the boolean whether content is reload */ -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_Wml1x_ContentHandler_SetReload (NW_Wml1x_ContentHandler_t * thisObj, NW_Bool isReload) -{ - NW_ASSERT(thisObj); - thisObj->reload = isReload; - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XEpoc32ContentHandler.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XEpoc32ContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,581 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "nw_wml1x_epoc32contenthandleri.h" -#include "nw_lmgr_boxvisitor.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "nw_hed_compositecontenthandler.h" -#include "nwx_logger.h" -#include "nwx_osu_file.h" -#include "nw_loadreq.h" -#include "nwx_multipart_generator.h" -#include "Epoc32ImageDecoder.h" - -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_wml1x_wml1xapi.h" -#include "wml_elm_attr.h" -#include "wml_task.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" -#include "nwx_settings.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Wml1x_Epoc32ContentHandler_Class_t NW_Wml1x_Epoc32ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Wml1x_ContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_Wml1x_Epoc32_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Wml1x_Epoc32ContentHandler_t), - /* construct */ _NW_Wml1x_ContentHandler_Construct, - /* destruct */ NULL - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_Wml1x_ContentHandler_Cancel, - /* partialLoadCallback */ _NW_Wml1x_Epoc32ContentHandler_PartialLoadCallback, - /* initialize */ _NW_Wml1x_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_Wml1x_ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_Wml1x_ContentHandler_Suspend, - /* resume */ _NW_Wml1x_ContentHandler_Resume, - /* allLoadsCompleted */ _NW_Wml1x_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_Wml1x_ContentHandler_IntraPageNavigationCompleted, - /* loseFocus */ _NW_Wml1x_ContentHandler_LoseFocus, - /* gainFocus */ _NW_Wml1x_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_Wml1x_Epoc32ContentHandler_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_HED_ContentHandler_PartialNextChunk, - /* getTitle */ _NW_Wml1x_ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ NULL, - /* handleRequest */ _NW_Wml1x_ContentHandler_HandleRequest, - /* featureQuery */ _NW_Wml1x_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_HED_CompositeContentHandler */ - /* documentDisplayed */ _NW_HED_CompositeContentHandler_DocumentDisplayed - }, - { /* NW_Wml1x_ContentHandler */ - /* unused */ NW_Object_Unused - }, - { /* NW_Wml1x_Epoc32ContentHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const NW_Wml1x_Epoc32_InterfaceList[] = { - &NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_ImageViewer_Class_t NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_ImageViewer_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_Wml1x_Epoc32ContentHandler_t, - NW_Markup_ImageViewer) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_ImageViewer_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Markup_ImageViewer */ - /* load */ _NW_Wml1x_Epoc32ContentHandler_ImageViewer_Load, - /* isNoSave */ _NW_Wml1x_Epoc32ContentHandler_ImageViewer_IsNoSave, - /* getAltText */ _NW_Wml1x_Epoc32ContentHandler_ImageViewer_GetAltText - } -}; - - -/***************************************************************** - - Name: _NW_Wml1x_Epoc32ContentHandler_PartialLoadCallback() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_Epoc32ContentHandler_PartialLoadCallback( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode loadStatus, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context ) - { - NW_REQUIRED_PARAM( transactionId ); - NW_REQUIRED_PARAM( loadStatus ); - - NW_TRY( status ) - { - NW_HED_DocumentNode_t* childNode; - NW_Wml1x_ContentHandler_t *thisObj; - - NW_ASSERT( documentNode != NULL ); - // for convenience - thisObj = NW_Wml1x_ContentHandlerOf( documentNode ); - - // first chunk - if( chunkIndex == 0 ) - { - NW_HED_ContentHandler_t* contentHandler; - NW_ASSERT( response != NULL ); - - // create content handler - contentHandler = NW_HED_CompositeContentHandler_CreateContentHandler( - NW_HED_ContentHandlerOf( documentNode ), - response->contentTypeString, urlRequest, response, context ); - NW_THROW_ON_NULL( contentHandler, status, KBrsrFailure ); - - // the only content we do support is image and wml script - // forward first chunk to the content handler - status = NW_HED_ContentHandler_PartialNextChunk( contentHandler, - chunkIndex, response, context ); - // child content handler takes the ownership of the response - response = NULL; - - _NW_THROW_ON_ERROR( status ); - - if( NW_Object_IsInstanceOf( contentHandler, &NW_ImageCH_Epoc32ContentHandler_Class) == NW_TRUE ) - { - // set context on image content handler - NW_ImageCH_Epoc32ContentHandlerOf( contentHandler )->context = context; - // handle virtual images - status = NW_HED_CompositeContentHandler_HandleImageLoad( - NW_HED_CompositeContentHandlerOf( documentNode ), - chunkIndex, - contentHandler, - urlRequest ); - // catch only OOM - NW_THROW_ON( KBrsrOutOfMemory, status ); - -#ifdef INCREMENTAL_IMAGE_ON - // open the image - NW_ImageCH_Epoc32ContentHandler_ForceImageOpen( NW_ImageCH_Epoc32ContentHandlerOf( contentHandler ) ); -#endif // INCREMENTAL_IMAGE_ON - } - else if( NW_Object_IsInstanceOf( contentHandler, &NW_WmlScript_ContentHandler_Class ) == NW_TRUE ) - { - // - NW_THROW_SUCCESS( status ); - } - else - { - // - NW_THROW_SUCCESS( status ); - } - } - // further chunks - else - { - // find the corresponding content handler. It must have been created when the - // first chunk came in. - NW_HED_CompositeNode_t* compositeNode = (NW_HED_CompositeNode_t*) - (NW_Object_QueryAggregate( documentNode, &NW_HED_CompositeNode_Class)); - NW_ASSERT( compositeNode != NULL ); - - childNode = NW_HED_CompositeNode_LookupChild( compositeNode, context ); - NW_THROW_ON_NULL( childNode, status, KBrsrFailure ); - - if( chunkIndex != -1 ) - { - // pass chunks to the content handler - status = NW_HED_ContentHandler_PartialNextChunk( - NW_HED_ContentHandlerOf( childNode ), chunkIndex, response, context ); - // child content handler takes the ownership of the response - response = NULL; - - _NW_THROW_ON_ERROR( status ); - } - // last chunk - else - { - // last chunk. content handler is all set. - // intialize it - if( NW_Object_IsInstanceOf( childNode, &NW_ImageCH_Epoc32ContentHandler_Class ) ) - { - // this takes care of virtual image content handlers - status = NW_HED_CompositeContentHandler_HandleImageLoad( - NW_HED_CompositeContentHandlerOf( documentNode ), - chunkIndex, - NW_HED_ContentHandlerOf( childNode ), - urlRequest ); - // catch only OOM - NW_THROW_ON( KBrsrOutOfMemory, status ); - } - thisObj->wmlInterpreter.outstandingLoadCount--; - status = NW_HED_DocumentNode_Initialize( childNode, KBrsrSuccess ); - } - } - _NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - // content handler has the response ownership, so - // it must be released no matter what - UrlLoader_UrlResponseDelete( response ); - - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -// The function is called when a load issued by the document node is failed -void -_NW_Wml1x_Epoc32ContentHandler_HandleLoadComplete( NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t* urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ) - { - NW_REQUIRED_PARAM( errorClass ); - NW_REQUIRED_PARAM( error ); - NW_REQUIRED_PARAM( transactionId ); - - NW_ASSERT( documentNode != NULL ); - NW_ASSERT( urlRequest != NULL ); - - // if the wml image was loaded as LOCALSRC and it failed then we - // need to check if the image referred by the SRC is available. - if( urlRequest->loadType == NW_UrlRequest_Type_Image && - urlRequest->loadMode == NW_HED_UrlRequest_LoadLocal ) - { - (void)LoadSrcImage( NW_Wml1x_ContentHandlerOf( documentNode ), - NW_UINT16_CAST( NW_INT32_CAST( context ) ) ); - } - } - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/************************************************************************ - - Function: NW_Wml1x_Epoc32ContentHandler_SaveToFile - - Description: Write multipart document to file containing encoded wml. - Multipart document consists of: - Number of segments - Segments - each with - header length (including content type length) - data length - content type (including character encoding) - headers - data - - Parameters: thisObj - in: content handler - file - in: file name - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory - KBrsrSavedPageFailed - -**************************************************************************/ -TBrowserStatusCode -NW_Wml1x_Epoc32ContentHandler_SaveToFile(NW_Wml1x_Epoc32ContentHandler_t *thisObj, - NW_Ucs2* file) -{ - NW_Wml1x_ContentHandler_t *wml1xch; - NW_HED_DomTree_t* domTree = NULL; - NW_Osu_File_t fh = NULL; - NW_Buffer_t* buffer; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint32 numImages = 0; - NW_Uint32 numSegments; - NW_Byte numSegmentsBuf[5]; - NW_Uint32 numSegmentsBufLen; - NW_Byte* p; - NW_Byte* segment; - NW_Uint32 segmentLen; - NW_Ucs2* url; - char* urlAscii = NULL; - - TUint originalEncoding = NW_Settings_GetOriginalEncoding(); - - wml1xch = NW_Wml1x_ContentHandlerOf(thisObj); - domTree = NW_Wml1x_ContentHandler_GetDomTree (wml1xch); - NW_ASSERT(domTree); - - /* Delete any existing file */ - (void)NW_Osu_Delete(file); - - /* Create new file */ - fh = NW_Osu_CreateNewFile(file); - if (fh == NW_INVALID_FILE_HANDLE) - { - status = KBrsrSavedPageFailed; - goto cleanup; - } - - /* Number of images; they are in a list of image content handlers. */ - if (wml1xch->super.NW_HED_CompositeNode.children != NULL) - numImages = NW_HED_CompositeContentHandler_GetImageCount(NW_HED_CompositeContentHandlerOf(wml1xch)); - - /* Get count of multipart segments (one for wmlc page, plus number of - * images). Write variable length integer to a buffer, then write - * buffer to file - */ - numSegments = 1 + numImages; - p = NW_StoreUint(numSegmentsBuf, numSegments); - numSegmentsBufLen = p - numSegmentsBuf; - status = NW_Osu_WriteFile(fh, numSegmentsBuf, numSegmentsBufLen); - if (status != KBrsrSuccess) - goto cleanup; - - /* Get response URL. If it is NULL, use it anyway. */ - url = (NW_Ucs2*) NW_HED_UrlResponse_GetRawUrl (NW_HED_ContentHandler_GetUrlResponse (wml1xch)); - if (url != NULL) - urlAscii = NW_Str_CvtToAscii(url); - - /* Create multipart segment from wml document & write to file */ - buffer = NW_HED_DomTree_GetDomBuffer(domTree); - status = NW_CreateMultipartSegment - ( - NW_HED_DomTree_GetCharEncoding(domTree), - originalEncoding, - (NW_Http_ContentTypeString_t)HTTP_application_wmlc_saved_string, - urlAscii, - buffer->data, - buffer->length, - &segment, - &segmentLen - ); - - NW_Mem_Free(urlAscii); - if (status != KBrsrSuccess) - goto cleanup; - - status = NW_Osu_WriteFile(fh, segment, segmentLen); - NW_Mem_Free(segment); - if (status != KBrsrSuccess) - goto cleanup; - - /* Write images to file */ - status = NW_HED_CompositeContentHandler_SaveImagesToFile(wml1xch, fh); - -cleanup: - NW_LOG1(NW_LOG_LEVEL3, "NW_Wml1x_Epoc32ContentHandler_SaveToFile: Result %d", status); - NW_Osu_CloseFile(fh); - - if (status != KBrsrSuccess) - (void)NW_Osu_Delete(file); - - return status; -} - -/* ------------------------------------------------------------------------- * - NW_Markup_ImageViewer methods - * ------------------------------------------------------------------------- */ - -NW_Bool -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_IsNoSave (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox) -{ - NW_Uint16 elementId; - NW_LMgr_PropertyValue_t value; - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_ContentHandler_t* contentHandler; - NW_Ucs2 *alt = NULL; - NW_Bool ret = NW_FALSE; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class)); - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsDerivedFrom (imageBox, - &NW_LMgr_ImgContainerBox_Class) || - NW_Object_IsInstanceOf (imageBox, - &NW_FBox_ImageButtonBox_Class)); - - /* for convenience */ - contentHandler = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_Wml1x_ContentHandler_Class)); - - /* get into elementId the element id we set in the box's properties */ - status = NW_LMgr_Box_GetPropertyValue(imageBox, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - - elementId = NW_UINT16_CAST(value.integer); - - /* get the ALT_ATTR value if any */ - status = NW_Wml_GetAttribute(&(contentHandler->wmlInterpreter), - elementId, - ALT_ATTR, - &alt); - if ((status != KBrsrSuccess) || (alt == NULL)) { - return NW_FALSE; - } - - if (!NW_Str_StricmpConst (alt, WAE_ASC_NOSAVE_STR) || !NW_Str_StricmpConst (alt, WAE_ASC_NOKIA_STR)) - { - ret = NW_TRUE; - } - - NW_Str_Delete(alt); - alt = NULL; - - return ret; -} - -/* ------------------------------------------------------------------------- */ -NW_Ucs2* -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_GetAltText (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox) -{ - NW_Uint16 elementId; - NW_LMgr_PropertyValue_t value; - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_ContentHandler_t* contentHandler; - NW_Ucs2 *alt = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class)); - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsDerivedFrom (imageBox, - &NW_LMgr_ImgContainerBox_Class) || - NW_Object_IsInstanceOf (imageBox, - &NW_FBox_ImageButtonBox_Class)); - - /* for convenience */ - contentHandler = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_Wml1x_ContentHandler_Class)); - - /* get into elementId the element id we set in the box's properties */ - status = NW_LMgr_Box_GetPropertyValue(imageBox, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - if (status != KBrsrSuccess) - { - return NULL; - } - - elementId = NW_UINT16_CAST(value.integer); - - /* get the ALT_ATTR value if any */ - status = NW_Wml_GetAttribute(&(contentHandler->wmlInterpreter), - elementId, - ALT_ATTR, - &alt); - if (status != KBrsrSuccess) { - return NULL; - } - - return alt; -} -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Wml1x_Epoc32ContentHandler_ImageViewer_Load (NW_Markup_ImageViewer_t* imageViewer) -{ - NW_Wml1x_ContentHandler_t* contentHandler; - NW_LMgr_PropertyValue_t value; - NW_Uint16 elementId; - NW_Wml_ElType_e elType = UNKNOWN_ELEMENT; - NW_Wml_Element_t *el; - NW_LMgr_Box_t *box = NULL; - NW_LMgr_Box_t *rootBox = NULL; - NW_LMgr_BoxVisitor_t boxVisitor; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_Wml1x_Epoc32ContentHandler_ImageViewer_Class)); - - /* for convenience */ - contentHandler = (NW_Wml1x_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_Wml1x_ContentHandler_Class)); - - rootBox = NW_HED_ContentHandlerOf (contentHandler)->boxTree; - NW_ASSERT (rootBox != NULL); - - /* initialize the boxVisitor */ - status = NW_LMgr_BoxVisitor_Initialize (&boxVisitor, NW_LMgr_BoxOf (rootBox)); - if (status != KBrsrSuccess) { - return status; - } - - /* traverse the boxTree */ - while ((box = NW_LMgr_BoxVisitor_NextBox (&boxVisitor, NULL)) != NULL) - { - if ((NW_Object_IsInstanceOf(box, &NW_LMgr_ContainerBox_Class) && - !NW_Object_IsInstanceOf(box->propList, &NW_LMgr_SlavePropertyList_Class)) - || NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)) - { /* get into elementId the element id we set in the box's properties */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - - if (status == KBrsrSuccess) - { - elementId = NW_UINT16_CAST(value.integer); - status = NW_Wml_GetElementType(&(contentHandler->wmlInterpreter), - elementId, - &elType, - &el); - if (status != KBrsrSuccess) - return status; - - if(elType == IMAGE_ELEMENT) - status = NW_UI_LoadImage(contentHandler, elementId, NW_TRUE); - } - } - } - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XEpoc32DefaultStyleSheet.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XEpoc32DefaultStyleSheet.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,529 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/* Includes */ -#include "nwx_string.h" -#include "nw_wml1x_wml1xdefaultstylesheet.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_text_ascii.h" -#include "nw_text_ucs2.h" -#include "nw_lmgr_textbox.h" -#include "BrsrStatusCodes.h" - -/***************************************************************** - - Name: NW_Wml1x_ParagraphDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_ParagraphDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_Box_t *box) -{ - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = 10; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_topMargin, prop); - - - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = 10; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_bottomMargin, prop); - - return; -} - -/***************************************************************** - - Name: NW_Wml1x_BigDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_BigDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = 17; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontSize, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_SmallDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_SmallDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = 12; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontSize, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_StrongDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_StrongDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Integer; - prop->value.integer = 900; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontWeight, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_BoldDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_BoldDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Integer; - prop->value.integer = 900; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontWeight, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_EmphasisDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_EmphasisDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_italic; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontStyle, prop); - return; -} - -/***************************************************************** - - Name: NW_Wml1x_ItalicDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_ItalicDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_italic; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontStyle, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_UnderlineDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_UnderlineDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_underline; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_textDecoration, - prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_DefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_DefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_normal; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), NW_CSS_Prop_textDecoration, - prop); - - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_ImageWithinAnchorDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - box - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_ImageWithinAnchorDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_Box_t *box) -{ - NW_LMgr_Box_t *activeContainerBox = NULL; - activeContainerBox = - NW_LMgr_Box_FindBoxOfClass ((NW_LMgr_Box_t*) NW_LMgr_Box_GetParent (box), - &NW_LMgr_ActiveContainerBox_Class, NW_FALSE); - if(activeContainerBox) - { - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = 1; - NW_LMgr_Box_SetProperty(box, - NW_CSS_Prop_padding, prop); - - NW_LMgr_Box_GetPropertyFromList(activeContainerBox, - NW_CSS_Prop_borderColor, prop); - NW_LMgr_Box_SetProperty(box, - NW_CSS_Prop_borderColor, prop); - - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_growBorder; - NW_LMgr_Box_SetProperty(box, - NW_CSS_Prop_focusBehavior, prop); - } - - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_DefaultCardStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: - -*****************************************************************/ -void NW_Wml1x_DefaultCardStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ContainerBox_t *containerBox) -{ - prop->type = NW_CSS_ValueType_Px; - - prop->value.integer = 2; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_leftMargin, prop); - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_topMargin, prop); - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_padding, prop); - - prop->value.integer = 13; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_fontSize, prop); - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_AnchorDefaultStyle() - - Description: - - Parameters: - prop - In - pointer to working variable - containerBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: KBrsrSuccess - KBrsrOutOfMemory - TBrowserStatusCode from NW_LMgr_ContainerBox_InsertChild() - -*****************************************************************/ -TBrowserStatusCode NW_Wml1x_AnchorDefaultStyle (NW_LMgr_Property_t *prop, - NW_LMgr_ActiveContainerBox_t *containerBox, - NW_Bool inCache) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_Property_t saveProp; /* to check if <pre> element involved */ - - /* apply style for anchor */ - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_underline; - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_textDecoration, prop); - - - prop->type = NW_CSS_ValueType_Color; - /* need to change this to some #define */ - if (!inCache){ - prop->value.integer = 0x0000ff; /* not cached */ - } - else{ - prop->value.integer = 0x800080; /* cached */ - } - NW_LMgr_Box_SetProperty(NW_LMgr_BoxOf (containerBox), - NW_CSS_Prop_color, prop); - - prop->type = NW_CSS_ValueType_Token; - prop->value.token = NW_CSS_PropValue_display_inline; - NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf (containerBox), NW_CSS_Prop_display, prop); - - /* if NO <pre> element precedes this anchor - insert a blank character before the link */ - NW_LMgr_Box_GetProperty (NW_LMgr_BoxOf (containerBox), NW_CSS_Prop_whitespace, &saveProp); - if (saveProp.value.token != NW_CSS_PropValue_pre) - { - NW_LMgr_ContainerBox_t *parentBox; - NW_LMgr_TextBox_t *newTextBox; - NW_Ucs2 *retString = NULL; - NW_Text_UCS2_t *temptext; - - /* create some leading and trailing space for the link text */ - - /* The <a> element is currently represented by an active container box, and - * it will (hopefully) have had one or more children added to represent the link. - * Create a text box with text " " and insert in front of the active container box - * Create a second text box with text " " and insert following the active container box - */ - - /* TODO: the "correct" way to do this would be to only add the extra space if needed - */ - - parentBox = NW_LMgr_Box_GetParent (containerBox); - - /* new box for the leading space */ - retString = NW_Str_NewcpyConst(" "); - if (retString == NULL) { - return KBrsrOutOfMemory; - } - temptext = NW_Text_UCS2_New (retString, (NW_Text_Length_t)NW_Str_Strlen(retString), 1/* takeOwnership */); - if (temptext == NULL) { - return KBrsrOutOfMemory; /* NW_Text_UCS2_New() takes care of deleting string when fails */ - } - newTextBox = NW_LMgr_TextBox_New(1, NW_TextOf(temptext)); - if (newTextBox == NULL) { - NW_Object_Delete(temptext); - return KBrsrOutOfMemory; - } - - /* hook in the new text box for the leading space */ - status = NW_LMgr_ContainerBox_InsertChild(NW_LMgr_ContainerBoxOf(parentBox), - NW_LMgr_BoxOf(newTextBox), - NW_LMgr_BoxOf(containerBox)); - if (status != KBrsrSuccess) { - NW_Object_Delete(newTextBox); - return status; - } - - /* this is where another box with a trailing space would be added, if we had the memory */ - - } - return status; -} - - -/***************************************************************** - - Name: NW_Wml1x_InputDefaultStyle() - - Description: - - Parameters: - inputBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: none - -*****************************************************************/ -void NW_Wml1x_InputDefaultStyle (NW_LMgr_Box_t *inputBox) -{ - NW_LMgr_Property_t prop; - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 1; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_borderWidth, &prop); - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_solid; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_borderStyle, &prop); - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 2; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_padding, &prop); - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_growBorder; - NW_LMgr_Box_SetProperty(inputBox, NW_CSS_Prop_focusBehavior, &prop); - - return; -} - - -/***************************************************************** - - Name: NW_Wml1x_SelectDefaultStyle() - - Description: - - Parameters: - selectBox - In/Out - pointer to box on which style will be set - - Algorithm: - - Return Value: none - -*****************************************************************/ -void NW_Wml1x_SelectDefaultStyle (NW_LMgr_Box_t *selectBox) -{ - NW_LMgr_Property_t prop; - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 1; - NW_LMgr_Box_SetProperty(selectBox, NW_CSS_Prop_borderWidth, &prop); - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_solid; - NW_LMgr_Box_SetProperty(selectBox, NW_CSS_Prop_borderStyle, &prop); - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 2; - NW_LMgr_Box_SetProperty(selectBox, NW_CSS_Prop_padding, &prop); - - prop.type = NW_CSS_ValueType_Token; - prop.value.integer = NW_CSS_PropValue_growBorder; - NW_LMgr_Box_SetProperty(selectBox, NW_CSS_Prop_focusBehavior, &prop); - - return; -} - -void NW_Wml1x_FieldsetDefaultStyle(NW_LMgr_Box_t* box) -{ - NW_LMgr_Property_t prop; - - prop.type = NW_CSS_ValueType_Px; - prop.value.integer = 10; - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_topMargin, &prop); - NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_bottomMargin, &prop); - -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XEventHandler.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XEventHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <nw_wml_core.h> -#include "nw_hed_documentrooti.h" -#include "nw_wml1x_wml1xeventhandleri.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_timerevent.h" -#include "nw_fbox_passwordbox.h" -#include "nw_evt_focusevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_lmgr_activecontainerbox.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Wml1x_EventHandler_Class_t NW_Wml1x_EventHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_LMgr_EventHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Wml1x_EventHandler_t), - /* construct */ _NW_Wml1x_EventHandler_Construct, - /* destruct */ NULL - }, - { /* NW_LMgr_EventHandler */ - /* processEvent */ _NW_Wml1x_EventHandler_ProcessEvent - }, - { /* NW_Wml1x_EventHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_Wml1x_EventHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_Wml1x_EventHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_Wml1x_EventHandlerOf (dynamicObject); - - /* initialize our member variables */ - thisObj->ch = va_arg (*argp, NW_Wml1x_ContentHandler_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_Wml1x_EventHandler_ProcessEvent (NW_LMgr_EventHandler_t* eventHandler, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_Wml1x_EventHandler_t* thisObj; - NW_LMgr_PropertyValue_t value; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint8 returnVal = !NW_LMgr_EventAbsorbed; - - /* for convenience */ - thisObj = NW_Wml1x_EventHandlerOf (eventHandler); - - if ((NW_Object_Core_GetClass (event) == &NW_Evt_ActivateEvent_Class) || - (NW_Object_Core_GetClass(event) == &NW_Evt_AccessKeyEvent_Class)) { - /* use RB WML 1.x event handler */ - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Integer, &value); - - if (status == KBrsrSuccess) { - status = NW_Wml_GUIEvent(&(thisObj->ch->wmlInterpreter), - NW_UINT16_CAST(value.integer), - NULL); /* NULL will contain input parm */ - } - - returnVal = NW_LMgr_EventAbsorbed; - - } - else if(NW_Object_Core_GetClass(event) == &NW_Evt_FocusEvent_Class) { - if(NW_Object_Core_GetClass(box) == &NW_LMgr_ActiveContainerBox_Class) { - returnVal = NW_LMgr_EventAbsorbed; - } - } - - if (status != KBrsrSuccess) { - NW_HED_DocumentNode_HandleError (thisObj->ch, NULL, - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t) status); - } - return returnVal; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Wml1x_EventHandler_t* -NW_Wml1x_EventHandler_New (NW_Wml1x_ContentHandler_t* ch) -{ - return (NW_Wml1x_EventHandler_t*) - NW_Object_New (&NW_Wml1x_EventHandler_Class, ch); -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/WML1XFormLiaison.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XFormLiaison.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1430 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_wml_core.h" -#include "wml_url_utils.h" -#include "wml_task.h" -#include "nw_wml1x_wml1xformliaisoni.h" -#include "nw_wml1x_wml1xcontenthandler.h" -#include "nw_adt_resizablevector.h" -#include "NW_Text_Abstract.h" -#include "nw_hed_documentroot.h" -#include "wml_elm_attr.h" -#include "BrsrStatusCodes.h" -#include "wml_ops.h" - -/* ------------------------------------------------------------------------- * - private types - * ------------------------------------------------------------------------- */ - -typedef enum { - NW_Wml1x_FormControlType_None, - NW_Wml1x_FormControlType_InputPassword, /* <input type=password> */ - NW_Wml1x_FormControlType_InputText, /* <input type=text> */ - NW_Wml1x_FormControlType_Option /* <option> */ -} NW_Wml1x_FormControlType_t; - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static -NW_Wml1x_FormControlType_t -NW_Wml1x_FormLiaison_GetControlType(NW_Wml1x_FormLiaison_t *thisObj, - void *elemId); - -static -NW_Wml1x_FormControlType_t -NW_Wml1x_FormLiaison_GetInputType(NW_Wml1x_FormLiaison_t *thisObj, - void *elemId); - - -static NW_Ucs2* FormatGetMask(const NW_Ucs2 *format); - -/***************************************************************** - - Name: NW_Wml1x_FormLiaison_GetControlType() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static -NW_Wml1x_FormControlType_t -NW_Wml1x_FormLiaison_GetControlType(NW_Wml1x_FormLiaison_t *thisObj, - void *elemId) -{ - NW_Wml1x_FormControlType_t type = NW_Wml1x_FormControlType_None; - NW_Wml_ElType_e elType = UNKNOWN_ELEMENT; - NW_Wml_Element_t *el; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - (void) NW_Wml_GetElementType(&(thisObj->contentHandler->wmlInterpreter), - elementIdAsUint16, - &elType, - &el); - - switch (elType) { - case INPUT_ELEMENT: - type = NW_Wml1x_FormLiaison_GetInputType(thisObj, elemId); - break; - case OPTION_ELEMENT: - type = NW_Wml1x_FormControlType_Option; - break; - default: - type = NW_Wml1x_FormControlType_None; - break; - } - - return type; -} - -/***************************************************************** - - Name: NW_Wml1x_FormLiaison_GetInputType() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -static -NW_Wml1x_FormControlType_t -NW_Wml1x_FormLiaison_GetInputType(NW_Wml1x_FormLiaison_t *thisObj, - void *elemId) -{ - /* default to <input type=text> */ - NW_Wml1x_FormControlType_t type = NW_Wml1x_FormControlType_InputText; - NW_Ucs2 *retString = NULL; - - static const NW_Ucs2 passwordTag[] = {'p','a','s','s','w','o','r','d'}; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - (void) NW_Wml_GetAttribute (&(thisObj->contentHandler->wmlInterpreter), - elementIdAsUint16, - TYPE_ATTR, - &retString); - - if (retString != NULL) - { - if (NW_Mem_memcmp(retString, - passwordTag, - sizeof(passwordTag)) == 0) - { - type = NW_Wml1x_FormControlType_InputPassword; - } - - NW_Mem_Free(retString); - } - - return type; -} - - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Wml1x_FormLiaison_Class_t NW_Wml1x_FormLiaison_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormLiaison_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_Wml1x_FormLiaison_t), - /* construct */ _NW_Wml1x_FormLiaison_Construct, - /* destruct */ _NW_Wml1x_FormLiaison_Destruct - }, - { /* NW_FBox_FormLiaison */ - /* getWBXMLVersion */ _NW_Wml1x_FormLiaison_GetWBXMLVersion, - /* addControl */ NULL, - /* setInitialStringValue */ _NW_Wml1x_FormLiaison_SetInitialStringValue, - /* setStringValue */ _NW_Wml1x_FormLiaison_SetStringValue, - /* validateStringValue */ _NW_Wml1x_FormLiaison_ValidateStringValue, - /* getStringValue */ _NW_Wml1x_FormLiaison_GetStringValue, - /* getStringName */ _NW_Wml1x_FormLiaison_GetStringName, - /* getStringTitle */ _NW_Wml1x_FormLiaison_GetStringTitle, - /* setBoolValue */ _NW_Wml1x_FormLiaison_SetBoolValue, - /* resetRadioValue */ NULL, - /* toggleBoolValue */ _NW_Wml1x_FormLiaison_ToggleBoolValue, - /* getBoolValue */ _NW_Wml1x_FormLiaison_GetBoolValue, - /* reset */ NULL, - /* submit */ NULL, - /* focus */ NULL, - /* isOptionMultiple */ NULL, - /* isOptionSelected */ NULL, - /* optionHasOnPick */ _NW_Wml1x_FormLiaison_OptionHasOnPick, - /* isLocalNavOnPick */ _NW_Wml1x_FormLiaison_IsLocalNavOnPick, - /* getInitialValue */ NULL, - /* getDocRoot */ _NW_Wml1x_FormLiaison_GetDocRoot, - /* delegateEcmaEvent */ _NW_Wml1x_FormLiaison_DelegateEcmaEvent, - }, - { /* NW_Wml1x_FormLiaison */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_Construct() - - Description: - - Parameters: - - Algorithm: - - Return Value: KBrsrSuccess - or, return value from superclass constructor - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_Construct (NW_Object_Dynamic_t *dynamicObject, - va_list *argp) -{ - NW_Wml1x_FormLiaison_t *thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_Wml1x_FormLiaison_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_Wml1x_FormLiaisonOf (dynamicObject); - - /* initialize our member variables */ - thisObj->contentHandler = va_arg (*argp, NW_Wml1x_ContentHandler_t*); - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_Wml1x_FormLiaison_Destruct(NW_Object_Dynamic_t* dynamicObject) -{ - NW_Wml1x_FormLiaison_t *thisObj; - - /* for convenience */ - thisObj = NW_Wml1x_FormLiaisonOf (dynamicObject); - - NW_Object_Delete (thisObj->lastStringValue); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_GetWBXMLVersion() - - Description: The WBXML version of the WML document is retrieved and translated - to an enum as defined by TWapDocType in "rb_tempest\fbox\include\ - CoreWrapper.h" - - Parameters: aWapDocType is an "out" parameter, representative of spec level of - conformance with WAPFORUM WML the gateway encoder used to - encode the content from the origin server. - - Algorithm: Using NW_FBox_FormLiaison_t, look up the version field - maintained under tinyparser/domtree/doc/version. - - Return Value: KBrsrSuccess, if pointers valid and a value exists - otherwise, return KBrsrFailure - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetWBXMLVersion(NW_FBox_FormLiaison_t* thisObj, - NW_Uint32* wmlVersion) -{ - NW_Wml1x_FormLiaison_t *formLiaison; - TBrowserStatusCode status = KBrsrSuccess; - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - if (formLiaison == NULL) - { - status = KBrsrFailure; - } - else - { - status = NW_Wml_GetPublicId(&(formLiaison->contentHandler->wmlInterpreter), - wmlVersion ); - } - return status; -} -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_SetInitialStringValue() - - Description: Sets the initial value for the input form control from the content. - Currently, not used in WML, so this is just a stub. - - Return Value: KBrsrSuccess - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetInitialStringValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_Length_t maxChars) -{ - NW_REQUIRED_PARAM( thisObj ); - NW_REQUIRED_PARAM( elemId ); - NW_REQUIRED_PARAM( maxChars ); - - return KBrsrSuccess; -} - -//***************************************************************** -// -// Name: _NW_Wml1x_FormLiaison_SetStringValue() -// -// Description: -// -// Parameters: elemId is the actual element Id, not a pointer to anything -// so some fancy casting is necessary to avoid confusing the compiler -// value is a pointer to a text object which we are responsible -// for deleting when we're done with it. -// -// Algorithm: Using the elemId, look up the name of the variable to be set. -// Convert the passed-in value to a Ucs2 string. -// If NW_Evt_HandleInputEvent() allows the value, -// use NW_Wml_SetVar() to save the value on the variable. -// Else -// notify the user -// -// Return Value: KBrsrFailure if elemId not an Input element; -// otherwise, return value from -// -//*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetStringValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_t *value) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Ucs2 *varName = NULL; - NW_Ucs2 *varValue = NULL; - NW_Bool freeValue; - NW_Uint16 elementIdAsUint16; - NW_Wml_ElType_e elType = UNKNOWN_ELEMENT; - NW_Wml_Element_t *el; - NW_Bool validateOk; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); // NOTE: this assumes (void*) is 32 bits - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - switch (NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId)) - { - // Password input boxes ignore format attribute, so no longer need to validate input box value - // against format. Simply use and save whatever user has entered. - case NW_Wml1x_FormControlType_InputPassword: - varValue = - (NW_Ucs2*) NW_Text_GetUCS2Buffer (value, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - NULL, - &freeValue); - - // lookup name - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - NAME_ATTR, - &varName); - if (status == KBrsrSuccess) - { - // password content no longer must match a format, that is to say, formats are now - // ignored for password fields, so simply set the variable in the formLiaison. - status = NW_Wml_SetVar (&(formLiaison->contentHandler->wmlInterpreter), - varName, - varValue); - } - // free the name string - NW_Str_Delete(varName); - - if (freeValue) - { - NW_Str_Delete(varValue); - } - break; - - case NW_Wml1x_FormControlType_InputText: - varValue = - (NW_Ucs2*) NW_Text_GetUCS2Buffer (value, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - NULL, - &freeValue); - - // perform WML processing on new varValue - status = NW_Wml_GetElementType(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - &elType, - &el); - - if (status == KBrsrSuccess) - { - // lookup name - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - NAME_ATTR, - &varName); - - // setting NW_FALSE for the update variable and sending the address of a - // boolean to receive the results of the validate operation, allows us to - // non-destructively find out if the input matches the input mask (if any) - // - status = NW_Wml_HandleInputEvent(&(formLiaison->contentHandler->wmlInterpreter), - el, - varValue, - NW_FALSE, - &validateOk); - if (validateOk) - { - status = NW_Wml_SetVar (&(formLiaison->contentHandler->wmlInterpreter), - varName, - varValue); - } - else - { - status = KBrsrWmlbrowserInputNonconformingToMask; - } - - // free the name string - NW_Str_Delete(varName); - } - - if (freeValue) - { - NW_Str_Delete(varValue); - } - break; - - default: - // - // cannot set value; the input element is not text type - // - status = KBrsrFailure; - break; - } - - NW_Object_Delete(value); - return status; - } - - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_ValidateStringValue() - - Description: - - Parameters: elemId is the actual element Id, not a pointer to anything - so some fancy casting is necessary to avoid confusing the compiler - value is a pointer to a text object which we are responsible - for deleting when we're done with it. - - Algorithm: Using the elemId, look up the name of the variable to be set. - If NW_WmlInput_ValidateValue() disallows the value, - notify the user - - Return Value: KBrsrFailure if elemId not an Input element; - otherwise, return value from NW_WmlInput_ValidateValue() - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_ValidateStringValue (NW_FBox_FormLiaison_t* thisObj, - void* elemId, - const NW_Text_t* value) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Uint32 publicId; - NW_Ucs2 *strValue = NULL; - NW_Ucs2 *format = NULL; - NW_Ucs2 *emptyok_str = NULL; - NW_Ucs2 *maxLengthStr = NULL; - NW_WmlInput_EmptyOk_t emptyok = NW_WmlInput_EmptyOk_None; - NW_Bool freeValue = NW_FALSE; - NW_Uint16 elementIdAsUint16; - NW_Bool validateOk = NW_FALSE; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - switch (NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId)) - { - case NW_Wml1x_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_Wml1x_FormControlType_InputText: /* FALL THROUGH */ - - /* get string from NW_Text_UCS2 object */ - strValue = (NW_Ucs2*) NW_Text_GetUCS2Buffer (value, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - NULL, - &freeValue); - - /* get FORMAT attr value */ - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - FORMAT_ATTR, - &format); - if (status != KBrsrSuccess) { - goto cleanup; - } - - /* get EMPTYOK attr value */ - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - EMPTYOK_ATTR, - &emptyok_str); - if (status != KBrsrSuccess) { - goto cleanup; - } - - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - MAXLENGTH_ATTR, - &maxLengthStr); - if (status != KBrsrSuccess) { - goto cleanup; - } - - /* maxLengthStr set to NULL if attr not found */ - if (maxLengthStr != NULL) { - NW_Int32 maxLength = -1; /* Initialize to invalid length */ - if(NW_Str_StrIsValidLength(maxLengthStr)) - { - maxLength = NW_Str_Atoi(maxLengthStr); - } - if(maxLength < 0) - { - break; - } - else if (NW_Str_Strlen(strValue) > ((NW_Uint32)maxLength)) - { - validateOk = NW_FALSE; - break; - } - } - - emptyok = NW_WmlInput_EmptyOk_None; - /* if no format is specified, default for format is *M and emptyok=true. (WML-191, section 11.6.3 - emptyok) */ - if (emptyok_str == NULL && (format == NULL || *format == NULL)) - { - emptyok = NW_WmlInput_EmptyOk_True; - } - else - { - if ( emptyok_str != NULL) { - if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_TRUE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_True; - } else if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_FALSE_STR) == 0) { - emptyok = NW_WmlInput_EmptyOk_False; - } - } - } - - - /* get Document Public Id value */ - status = NW_Wml_GetPublicId(&(formLiaison->contentHandler->wmlInterpreter), - &publicId); - if (status != KBrsrSuccess) { - goto cleanup; - } - - /* Do a full string validatation because this should be called after - input dialog is closed. jwild 26-Jan-2002. */ - validateOk = NW_WmlInput_ValidateValue(strValue, - format, - emptyok, - NW_FALSE, /* Full string validation */ - publicId); - - break; - - default: - /* - * cannot set value; the input element is not text type. No need to - * warn user about invalid input. - */ - validateOk = NW_TRUE; - status = KBrsrFailure; - break; - } - - if (validateOk) - { - status = KBrsrSuccess; - } - else - { - status = KBrsrWmlbrowserInputNonconformingToMask; - } - - -cleanup: - if (freeValue) { - NW_Str_Delete(strValue); - } - - NW_Str_Delete(format); - NW_Str_Delete(emptyok_str); - NW_Str_Delete(maxLengthStr); - - return status; - -} - - -//***************************************************************** -// -// Name: _NW_Wml1x_FormLiaison_GetStringValue() -// -// Description: -// -// Parameters: out parameters: valueOut = initial value | format -// initialValueUsed = "value" attribute present -// -// Algorithm: Using the elemId, look up the name of the variable to get. -// Use NW_Wml_GetVar() to retrieve the value of the variable. -// Convert the value to a NW_Text_t object and set valueOut -// to point to that object. -// -// Return Value: KBrsrFailure if elemId not an Input element; -// otherwise, return value from -// -//*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringValue (NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Text_t **valueOut, - NW_Bool *initialValueUsed) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Ucs2 *varName = NULL; - NW_Ucs2 *retString = NULL; - NW_Uint32 publicId = 0; - NW_Ucs2 *emptyok_str = NULL; - NW_Ucs2 *maxLengthStr = NULL; - NW_WmlInput_EmptyOk_t emptyok = NW_WmlInput_EmptyOk_None; - NW_Ucs2 *format = NULL; - NW_Ucs2 *formatMask = NULL; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); // NOTE: this assumes (void*) is 32 bits - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - NW_Object_Delete (formLiaison->lastStringValue); - formLiaison->lastStringValue = NULL; - - switch (NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId)) - { - case NW_Wml1x_FormControlType_InputPassword: - // Password input boxes ignore format attribute, so there is no validation - // to perform. - // lookup name - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - NAME_ATTR, - &varName); - if (status == KBrsrOutOfMemory) - { - return status; - } - - if (varName != NULL) - { - // get value - status = NW_Wml_GetVar (&(formLiaison->contentHandler->wmlInterpreter), - varName, - &retString); - - // deal with the failure code returned by GetVar() when the variable is empty - if (status == KBrsrFailure) - { - status = KBrsrSuccess; - } - - NW_Mem_Free (varName); - varName = NULL; - } - - - if (retString != NULL) - { - // get maxLengthStr value - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - MAXLENGTH_ATTR, - &maxLengthStr); - if (status == KBrsrOutOfMemory) - { - return status; - } - - // maxLengthStr set to NULL if attr not found - if (maxLengthStr != NULL) - { - NW_Int32 maxLength = -1; // Initialize to invalid length - if(NW_Str_StrIsValidLength(maxLengthStr)) - { - maxLength = NW_Str_Atoi(maxLengthStr); - } - if (maxLength < 0) - { - NW_Mem_Free(maxLengthStr); - break; - } - } - emptyok = NW_WmlInput_EmptyOk_True; - } - *initialValueUsed = (NW_Bool) ( (retString) ? NW_TRUE : NW_FALSE ); - // if value is not available, create an empty string value - if (retString == NULL) - { - retString = NW_Str_NewcpyConst( "" ); - } - if (retString != NULL) - { - // convert to text object - formLiaison->lastStringValue = (NW_Text_t*) - NW_Text_UCS2_New (retString, NW_Str_Strlen(retString), NW_Text_Flags_TakeOwnership); - if (formLiaison->lastStringValue == NULL) - { - NW_Mem_Free(retString); - status = KBrsrOutOfMemory; - } - retString = NULL; - } - else - { - status = KBrsrOutOfMemory; - } - break; - - - case NW_Wml1x_FormControlType_InputText: - // Retrieve var name, var value and format used and validate value against format. - // lookup name - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - NAME_ATTR, - &varName); - if (status == KBrsrOutOfMemory) - { - return status; - } - - // get FORMAT attr value - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - FORMAT_ATTR, - &format); - if (status == KBrsrOutOfMemory) - { - return status; - } - - if (varName != NULL) - { - // get value - status = NW_Wml_GetVar (&(formLiaison->contentHandler->wmlInterpreter), - varName, - &retString); - - // deal with the failure code returned by GetVar() when the variable is empty - if (status == KBrsrFailure) - { - status = KBrsrSuccess; - } - - NW_Mem_Free (varName); - varName = NULL; - } - - - if (retString != NULL) - { - // get EMPTYOK attr value - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - EMPTYOK_ATTR, - &emptyok_str); - if (status == KBrsrOutOfMemory) - { - return status; - } - // get Document Public Id value - status = NW_Wml_GetPublicId(&(formLiaison->contentHandler->wmlInterpreter), - &publicId); - // get maxLengthStr value - status = NW_Wml_GetAttribute(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - MAXLENGTH_ATTR, - &maxLengthStr); - if (status == KBrsrOutOfMemory) - { - return status; - } - // maxLengthStr set to NULL if attr not found - if (maxLengthStr != NULL) - { - NW_Int32 maxLength = -1; // Initialize to invalid length - if(NW_Str_StrIsValidLength(maxLengthStr)) - { - maxLength = NW_Str_Atoi(maxLengthStr); - } - if (maxLength < 0) - { - break; - } - // to make WML and XHTML behaviour consistent, if the defined maxlength is less than the length - // of the value string do not display any initial string. See the Series 60 XHTML UI SPEC, - // section 9.6.4 for additional information regarding the "value" and "maxlen" attribute. - if (maxLength > NULL && maxLength < (NW_Int32)NW_Str_Strlen( retString )) - { - NW_Str_Delete(retString); - retString = NULL; - } - } - - emptyok = NW_WmlInput_EmptyOk_None; - // if no format is specified, default for format is *M and emptyok=true. (WML-191, section 11.6.3 - emptyok) - if (emptyok_str == NULL && (format == NULL || *format == NULL)) - { - emptyok = NW_WmlInput_EmptyOk_True; - } - else - { - if ( emptyok_str != NULL) - { - if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_TRUE_STR) == 0) - { - emptyok = NW_WmlInput_EmptyOk_True; - } - else if (NW_Str_StrcmpConst(emptyok_str, WAE_ASC_FALSE_STR) == 0) - { - emptyok = NW_WmlInput_EmptyOk_False; - } - } - } - - } - - *initialValueUsed = (NW_Bool) ( (retString) ? NW_TRUE : NW_FALSE ); - - if ((format !=NULL) && (retString == NULL)) - { - if ((formatMask = FormatGetMask(format)) != NULL) - { - retString = formatMask; - } - } - else - { - if ( NW_WmlInput_ValidateValue(retString, format, emptyok, NW_FALSE, publicId) == NW_FALSE) - { - if (format && (formatMask = FormatGetMask(format)) != NULL) - { - NW_Str_Delete(retString); - retString = formatMask; - } - else - { - NW_Str_Delete(retString); - retString = NULL; - } - } - } - - // if value is not available, create an empty string value - if (retString == NULL) - { - retString = NW_Str_NewcpyConst( "" ); - } - if (retString != NULL) - { - // convert to text object - formLiaison->lastStringValue = (NW_Text_t*) - NW_Text_UCS2_New (retString, NW_Str_Strlen(retString), NW_Text_Flags_TakeOwnership); - retString = NULL; - } - else - { - status = KBrsrOutOfMemory; - } - break; - - default: - // - // cannot get value; the input element is not text type - // - status = KBrsrFailure; - break; - } - - if (valueOut != NULL) - { - *valueOut = formLiaison->lastStringValue; - } - - NW_Str_Delete(retString); - NW_Str_Delete(format); - NW_Str_Delete(emptyok_str); - NW_Str_Delete(maxLengthStr); - - return status; - } - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_GetStringName() - - Description: - - Parameters: - - Algorithm: Using the elemId, look up the name of the variable. - Convert the name to a NW_Text_t object and set nameOut - to point to that object. - - Return Value: KBrsrFailure if elemId not an Input element; - otherwise, return value from - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringName(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Ucs2 **nameOut) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Ucs2 *varName = NULL; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - /* lookup name */ - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - NAME_ATTR, - &varName); - - if (varName == NULL) - { - status = KBrsrFailure; - } - *nameOut = varName; - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_GetStringTitle() - - Description: - - Parameters: - - Algorithm: Using the elemId, look up the name of the variable. - Convert the name to a NW_Text_t object and set nameOut - to point to that object. - - Return Value: KBrsrFailure if elemId not an Input element; - otherwise, return value from - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetStringTitle(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Ucs2 **titleOut) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Ucs2 *varTitle = NULL; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - /* lookup name */ - status = NW_Wml_GetAttribute (&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - TITLE_ATTR, - &varTitle); - - if (varTitle == NULL) - { - status = KBrsrFailure; - } - *titleOut = varTitle; - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_SetBoolValue() - - Description: - - Parameters: - - Algorithm: - - Return Value: KBrsrFailure if elemId not an option element; - otherwise, return value from NW_UI_SetOptState() - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_SetBoolValue (NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Bool *value) -{ - TBrowserStatusCode status; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Uint16 elementIdAsUint16; - NW_Wml_ElType_e elType = UNKNOWN_ELEMENT; - NW_Wml_Element_t *el; - NW_HED_DocumentRoot_t *docRoot; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - switch (NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId)) - { - case NW_Wml1x_FormControlType_Option: - /* TODO: is there a better way to access the setOptState() api function? */ - status = (formLiaison->contentHandler->wmlInterpreter.wml_api->display->setOptState) - ((formLiaison->contentHandler), - elementIdAsUint16, - *value); - - /* perform WML processing on new option value */ - status = NW_Wml_GetElementType(&(formLiaison->contentHandler->wmlInterpreter), - elementIdAsUint16, - &elType, - &el); - if (status == KBrsrSuccess) - { - status = NW_Wml_HandleOptionEvent(&(formLiaison->contentHandler->wmlInterpreter), el); - if (status == KBrsrWmlbrowserOnPickEx) - { - /* an onpick event was associated with the option whose state was - ** just changed so send a message to close the dialog where the - ** option was changed, since its context may be no longer valid - */ - docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (formLiaison->contentHandler); - - /* for ISA, does a CallClass((objref) &SelectList, PM_SELECTLIST_CLEANUP, 0, 0, 0); */ - if (docRoot->appServices->selectListApi.cleanup != NULL) - { - (docRoot->appServices->selectListApi.cleanup)(); - } - } - } - - break; - - default: - /* - * cannot set value; the element is not option type, - */ - status = KBrsrFailure; - break; - } - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_ToggleBoolValue() - - Description: - - Parameters: - - Algorithm: - - Return Value: KBrsrFailure if elemId not an option element; - KBrsrSuccess otherwise - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_ToggleBoolValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId) -{ - NW_Bool value; - TBrowserStatusCode status = KBrsrSuccess; - - if ((status = NW_FBox_FormLiaison_GetBoolValue(thisObj, elemId, &value)) != - KBrsrSuccess) - { - return status; - } - - value = (NW_Bool) !value; - status = NW_FBox_FormLiaison_SetBoolValue(thisObj, - elemId, - &value); - - return status; -} - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_GetBoolValue() - - Description: - - Parameters: - - Algorithm: - - Return Value: KBrsrFailure if elemId not an option element; - KBrsrSuccess otherwise - -*****************************************************************/ -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetBoolValue(NW_FBox_FormLiaison_t *thisObj, - void *elemId, - NW_Bool *valueOut) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - switch (NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId)) - { - case NW_Wml1x_FormControlType_Option: - /* TODO: is there a better way to access the getOptState() api function? */ - status = (formLiaison->contentHandler->wmlInterpreter.wml_api->display->getOptState) - ((formLiaison->contentHandler), - elementIdAsUint16, - valueOut); - break; - - default: - status = KBrsrFailure; - break; - } - - return status; -} - - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_OptionHasOnPick() - - Description: - - Parameters: - - Algorithm: - - Return Value: NW_TRUE if elemId has OnPick propert; - NW_FALSE otherwise - -*****************************************************************/ -NW_Bool -_NW_Wml1x_FormLiaison_OptionHasOnPick(NW_FBox_FormLiaison_t* thisObj, - void* elemId) -{ - TBrowserStatusCode status; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_Uint16 elementIdAsUint16; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - - NW_ASSERT(NW_Wml1x_FormLiaison_GetControlType(formLiaison, elemId) == NW_Wml1x_FormControlType_Option); - - status = NW_Wml_HasOnpick(&(formLiaison->contentHandler->wmlInterpreter), elementIdAsUint16); - - if (status == KBrsrSuccess) - { - return NW_TRUE; - } - - return NW_FALSE; -} - - -/***************************************************************** - - Name: _NW_Wml1x_FormLiaison_IsLocalNavOnPick() - - Description: Determine if ONPICK attribute points to a "local" - card within the same deck as the current card. - - Parameters: NW_FBox_FormLiaison_t* thisObj - used to derive WML context - void* elemId - id number of OPTION element, needed for GetAttribute - subroutine to obtain ONPICK attribute value. - - Algorithm: - - Return Value: NW_TRUE if elemId has OnPick property and nav is considered local; - NW_FALSE otherwise - -*****************************************************************/ -NW_Bool -_NW_Wml1x_FormLiaison_IsLocalNavOnPick(NW_FBox_FormLiaison_t* thisObj, - void* elemId) -{ - NW_Uint16 elementIdAsUint16; - NW_Ucs2 *retString = NULL; // returned URL - NW_Ucs2 *target_url = NULL; - NW_Wml1x_FormLiaison_t *formLiaison; - NW_DeckDecoderIter_t iter; - NW_Wml_Element_t* option_el = 0; - NW_Wml_Element_t new_el; - NW_Wml_ElType_e el_type; - TBrowserStatusCode status = NW_FALSE; - NW_Wml_t* wmlObj = NULL; - - elementIdAsUint16 = NW_UINT16_CAST ((NW_Uint32) elemId); /* NOTE: this assumes (void*) is 32 bits */ - formLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - wmlObj = &(formLiaison->contentHandler->wmlInterpreter); - (void) NW_Wml_GetAttribute (wmlObj, elementIdAsUint16, ONPICK_ATTR, &retString); - - if (retString) - { - status = NW_Wml_GetFullUrl(wmlObj, retString, &target_url); - NW_Mem_Free(retString); - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return NW_FALSE; - } - } - else - { /* if no "onpick" attr found, try for "onevent" element with "type=onpick" used in the option list */ - if ((status = NW_Wml_GetElementType(wmlObj, elementIdAsUint16, &el_type, &option_el)) != KBrsrSuccess) - { - return NW_FALSE; - } - - /* look for a task element */ - if (NW_DeckDecoderIter_InitializeAll_Children(&iter, wmlObj->decoder, option_el) != KBrsrSuccess) - { - return NW_FALSE; - } - - while ( NW_DeckDecoderIter_GetNextElement(&iter, &new_el) ) - { - NW_Wml_ElType_e el_type; - - NW_DeckDecoder_GetType(wmlObj->decoder, &new_el, &el_type); - - if (el_type == ONEVENT_ELEMENT) - { - if (NW_DeckDecoder_HasAttributeWithValue (wmlObj->decoder, &new_el, TYPE_ATTR, - WAE_ASC_ONPICK_STR, wmlObj->var_list)) - { - while ( NW_DeckDecoderIter_GetNextElement(&iter, &new_el) ) - { - NW_DeckDecoder_GetType(wmlObj->decoder, &new_el, &el_type); - - if (el_type == GO_ELEMENT) - { - break; - } - } - - /* GetHrefAttr & FetchUrl handle 12.5.1.2 */ - status = NW_Wml_GetHrefAttr(wmlObj, &new_el, &target_url); - - if (el_type == GO_ELEMENT) - { - if (status != KBrsrSuccess && status != KBrsrFailure) - { - /* FAILURE does not imply a fatal error */ - return NW_FALSE; - } - } - else // finished the inner while loop without finding a GO_ELEMENT - { - if (target_url == NULL) - { - return NW_TRUE; - } - else - { - break; - } - } - } //end if (NW_DeckDecoder...... - - }//end if (el_type == ONEVENT_ELEMENT) - - }//end while - - } //end else - - if (target_url != NULL) - { - status = NW_Wml_IsCardInCurrentDeck(wmlObj, target_url); - NW_Mem_Free(target_url); - - if (status == KBrsrSuccess) - { - return NW_TRUE; - } - } - - return NW_FALSE; -} - -TBrowserStatusCode -_NW_Wml1x_FormLiaison_GetDocRoot(NW_FBox_FormLiaison_t *thisObj, - NW_HED_DocumentRoot_t **docRoot) -{ - NW_Wml1x_FormLiaison_t *wml1xFormLiaison ; - NW_ASSERT (docRoot != NULL); - wml1xFormLiaison = NW_Wml1x_FormLiaisonOf(thisObj); - *docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (wml1xFormLiaison->contentHandler); - return KBrsrSuccess; -} - - -TBrowserStatusCode -_NW_Wml1x_FormLiaison_DelegateEcmaEvent(NW_FBox_FormLiaison_t *thisObj, - void* eventNode, - NW_ECMA_Evt_Type_t ecmaEvent) - -{ - NW_REQUIRED_PARAM( thisObj ); - NW_REQUIRED_PARAM( eventNode ); - NW_REQUIRED_PARAM( ecmaEvent ); - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/***************************************************************** - - Name: NW_Wml1x_FormLiaison_New() - - Description: - - Parameters: - - Algorithm: - - Return Value: - -*****************************************************************/ -NW_Wml1x_FormLiaison_t* -NW_Wml1x_FormLiaison_New (NW_Wml1x_ContentHandler_t *contentHandler) -{ - return (NW_Wml1x_FormLiaison_t*) - NW_Object_New (&NW_Wml1x_FormLiaison_Class, contentHandler); -} - - -static NW_Ucs2* FormatGetMask(const NW_Ucs2 *format) -{ - - NW_Ucs2 *format_mask = NULL ; - NW_Int32 countM=0, countF=0; - NW_Int32 lastStatic; - - format_mask = NW_Str_New(NW_Str_Strlen (format)); - if (format_mask == NULL) { - return NULL; - } - - /* find the last static character */ - lastStatic = -1; - countF = 0; - while (format && format[countF] ) { - if (format[countF] == '\\') { - lastStatic=countF; - } - countF++; - } - - /* if there are static characters - create mask */ - if (lastStatic != -1) { - countF = 0; - while (format && format[countF] && countF<=lastStatic) { - if (format[countF++] == '\\') { - format_mask[countM++] = format[countF++]; - } - else { - format_mask[countM++] = ' '; - } - } - - format_mask[countM] = '\0'; - } - else { - NW_Str_Delete(format_mask); - format_mask = NULL; - } - - return format_mask; -} - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wml1x/src/Wml1xEntitySet.c --- a/webengine/wmlengine/src/wml1x/src/Wml1xEntitySet.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_wml1x_wml1xentityseti.h" - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* Note: This array must be sorted by entity name. The lookup function - does a binary search. */ -static -const NW_HED_EntitySet_Entry_t _NW_Wml1x_EntitySet_Array[] = { - { "amp", 38 }, - { "apos", 39 }, - { "gt", 62 }, - { "lt", 60 }, - { "nbsp", 160 }, - { "quot", 34 }, - { "shy", 173 } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Wml1x_EntitySet_Class_t NW_Wml1x_EntitySet_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_HED_EntitySet_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_HED_EntitySet */ - /* numEntries */ sizeof (_NW_Wml1x_EntitySet_Array) - / sizeof (_NW_Wml1x_EntitySet_Array[0]), - /* numCaseInsensitiveEntries */ 0, - /* entries */ &_NW_Wml1x_EntitySet_Array[0], - /* createContentHandler */ _NW_HED_EntitySet_GetEntityChar - }, - { /* NW_Wml1x_EntitySet */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_Wml1x_EntitySet_t NW_Wml1x_EntitySet = { - { { &NW_Wml1x_EntitySet_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/include/WmlContentInterface.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlContentInterface.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Definition of MContentLoaderInterface -* -*/ - - -#ifndef MWMLCONTENTINTERFACE_H -#define MWMLCONTENTINTERFACE_H - -// INCLUDES -#include <e32base.h> -#include "BrsrStatusCodes.h" -//#include "urlloader_loaderutils.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* This class provides an interface for the resource loader client -* to manage transactions -* @lib resLoader.lib -* @since 3.1 -*/ -NONSHARABLE_CLASS(CWmlContentInterface) : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CWmlContentInterface* NewL(); - - /** - * Destructor. - */ - virtual ~CWmlContentInterface(); - - public: // New functions - - /** - * sends the partial response. - * @since 3.1 - * @return Kimono wide error code. - */ - TBrowserStatusCode WMLPartialResponse( const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - TBool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - TUint8* aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - void* aPartialCallback ); - void setPartialCallBack(void* callback){m_partialLoadCallback = callback;} - void setLoadContext(void* loadcontext){m_loadContext = loadcontext;} - void setTransId(TUint16 id){m_transId = id;} - void setUrl(const TDesC& aUrl); - - void* getPartialCallBack(){return m_partialLoadCallback;} - void* getLoadContext() {return m_loadContext;} - TUint16 getTransId() {return m_transId;} - HBufC* getUrl(){return m_resourceUrl;} - - private: - - /** - * C++ default constructor. - */ - CWmlContentInterface(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: - // Boolean to determine if 300 or 500 errors have associated content - TBool iIsBodyPresent; - - void* m_partialLoadCallback; - void* m_loadContext; - TUint16 m_transId; - HBufC* m_resourceUrl; - }; - -#endif // MWMLCONTENTINTERFACE_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/include/WmlControl.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlControl.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef WMLCONTROL_H -#define WMLCONTROL_H - -// INCLUDES -#include <e32base.h> -#include <w32std.h> -#include "BrCtlDefs.h" - -#include "BrCtl.h" -#include "WmlEngineInterface.h" -#include "WmlContentInterface.h" - -// CONSTANTS -_LIT ( KCrLf, "\r\n"); -_LIT ( KHeaderBoundary, "\r\n\r\n" ); -_LIT8( KHeaderBoundary8, "\r\n\r\n" ); -_LIT ( KHeaderContentLocation, "Content-Location: " ); -_LIT8( KHeaderSavePageProto, "SAVED-PAGE/3.1" ); -_LIT8( KMultipartBoundaryMarker, "multipart/mixed; boundary=" ); -_LIT8( KPartHeadersData, "Content-Location: %S\r\nContent-Type: %S;charset=%S\r\n\r\n" ); -_LIT8( KPartHeadersImg, "Content-Location: %S\r\nContent-Type: %S\r\n\r\n" ); -_LIT ( KSavePageDocTop, "SAVED-PAGE/3.1\r\nContent-Location: " ); -_LIT8( KSavePageBoundary, "S60BrowserSavedPage" ); -_LIT8( KSavedPageContentType, "multipart/mixed" ); - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CView; -class CShell; - -// CLASS DECLARATION -/** -* -* @lib resLoader.lib -* @since 3.0 -*/ - NONSHARABLE_CLASS(CWmlControl): public CBase, public MWmlEngineInterface - { - public: // Constructors and destructor - - /** - * Destructor. - */ - virtual ~CWmlControl(); - - public: // new functions - - /** - * StartLoadingResource - * Public Class Method - * Purpose - * @since 3.0 - * @param MWebCoreResourceLoader& aWebCoreLoader - * @param const TDesC& aURL - * @param CArrayFix<TWebCoreKeyValuePair>* aCustomHeaders - * @return MWebCoreResourceHandle* - */ - CWmlResourceLoadListener* LoadResourceL( const TDesC& aURL, void* aLoadContext, - void* aPartialLoadCallback, TUint16 aTransId ); - - // Returns a WmlView reference - CView* WmlView() {return iWmlView;} - // Returns a WmlShell reference - CShell* WmlShell() {return iWmlShell;} - // Returns a WmlMode to set the right control - TBool WmlMode() { return iWmlMode; } - // Returns a WmlLink - TBool WmlLink() { return iWmlLink; } - // Returns the Application Id - TInt AppId() { return iApId; } - // Sets the AppId - void SetAppId(TInt aApId){ iApId = aApId; } - // Sets a WmlMode - void SetWmlMode(TBool aMode) { iWmlMode = aMode; } - // Sets the WmlLink - void SetWmlLink(TBool aLink) { iWmlLink = aLink; } - // Returns to the Browser Control info about the wml page - HBufC* CWmlControl::PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo); - - /** - * Update a Browser setting - * @since 3.1 - * @param aSetting The setting to update - * @param aValue The new value of the setting - * @return void - */ - void SetBrowserSettingL(TUint aSetting, TUint aValue); - - /** - * Sets a pointer to the active history controller - * @since 3.1 - * @return void - */ - void SetHistoryController( HistoryControllerInterface* aHistoryController ) { iHistoryController = aHistoryController; } - - /** - * return history controller - * @return history controller - */ - HistoryControllerInterface& HistoryController() const { return *iHistoryController; } - - - /** - * Accessor function to the MWKWmlInterface. - * @since 3.1 - */ - - - - CBrCtl* WmlControlGetBrCtl() const { return iBrCtl; } - - MWmlInterface* WKWmlInterface() {return iWKWmlInterface; } - - void InputElementEditComplete( TBool aInputConfirmed ); - void GainFocus(); - - void LoseFocus(); - - TInt HandleDo( TUint32 aElemId ); - - TInt ProcessBack(); - - CArrayFixFlat<TBrCtlImageCarrier>* GetPageImagesL(); - - TBrCtlDefs::TBrCtlElementType GetFocusedElementType(); - - TWmlEngineDefs::THistoryStackPosition HistoryStackPosition(); - - void MakeVisible(TBool aVisible); - - void SetFocus( TBool aFocus, TDrawNow aDrawNow ); - - void SetRect( const TRect &aRect ); - - - //TBrowserStatusCode - - TInt WMLPartialResponse( CWmlContentInterface* aWmlContentInterface, - const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - TBool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - TUint8* aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - void* aPartialCallback ); - - CCoeControl* coeControl(); - void WmlLoadUrlL( const TDesC& aUrl); - void LoadImages(); - TRect WmlViewRectangle(); - void ScrollTo(TPoint aPoint); - CWmlControl(); - void SetCertInfo( const TCertInfo* aCertInfo ); - const TCertInfo* CertInfo() const { return iCertInfo; } - void* loadContext() {return iWmlContentInterface->getLoadContext();} - void* partialLoadCallback() {return iWmlContentInterface->getPartialCallBack();} - TUint16 transId() {return iWmlContentInterface->getTransId();} - - void WmlParameters( const char* data, int length, TDesC& contentType, TDesC& charset, TInt httpStatus, TInt chunkIndex, TDesC& url ); - virtual TSize WMLDocumentSize(); - virtual TPoint WMLDocumentPosition(); - - private: - - /** - * C++ default constructor. - */ - //CWmlControl(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - virtual void ConstructL( CBrCtl* aBrCtl, TRect& aRect, MWmlInterface* aWKWmlInterface); - - /** - * For saving is WML page. The function is same as that of - * CWebKitControl::GenerateSavedPageL(). - */ - - HBufC* WMLGenerateSavedPageL(); - private: - // - CShell* iWmlShell; // owned - // - CView* iWmlView; // owned - // - CBrCtl* iBrCtl; - // - TInt iApId; - // - TBool iWmlMode; - // - TBool iWmlLink; - // - const TCertInfo* iCertInfo; // owned - HistoryControllerInterface* iHistoryController; - MWmlInterface* iWKWmlInterface; - CWmlContentInterface* iWmlContentInterface; - RPointerArray<CWmlContentInterface> m_contentArray; - }; - -#endif // WMLCONTROL_H - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/include/WmlEngineDefs.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlEngineDefs.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef WMLENGINEDEFS_H -#define WMLENGINEDEFS_H - -// INCLUDES -//#include <e32base.h> -//#include <w32std.h> -//#include "BrCtlDefs.h" - -//#include "BrCtl.h" -//#include "WebKitLoader.h" - - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -class TWmlEngineDefs -{ -public: - -enum THistoryStackPosition - { - EHistoryAtTheBeginning, - EHistoryInTheMiddle, - EHistoryAtTheEnd - }; - -enum TWMLOptions - { - WML_OPTION_UNKNOWN = 1, - WML_OPTION_ACCEPT = 2, - WML_OPTION_PREV = 3, - WML_OPTION_HELP = 4, - WML_OPTION_RESET = 5, - WML_OPTION_OPTIONS = 6, - WML_OPTION_DELETE = 7 - }; -}; - - -#endif // WMLENGINEDEFS_H -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/include/WmlEngineInterface.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlEngineInterface.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef WMLENGINEINTERFACE_H -#define WMLENGINEINTERFACE_H - -// INCLUDES - -#include <e32base.h> -#include <coedef.h> -#include "BrCtlDefs.h" -#include "WmlEngineDefs.h" - - -// CONSTANTS - - -//Forword declrartion; -class CBrCtl; -class MWmlInterface; -class CView; -class CShell; -class HistoryController; -class CWmlContentInterface; -class CWmlDispatcher; -class CWmlResourceLoadListener; -class TBrCtlImageCarrier; -class CCoeControl; -//class THistoryStackPosition; -class TCertInfo; - - -// CLASS DECLARATION -/** -* -* @lib resLoader.lib -* @since 3.0 -*/ - -class MWmlEngineInterface - { - public: - //Only the seconds phase contruction is done here. - virtual void ConstructL( CBrCtl* aBrCtl, TRect& aRect, MWmlInterface* aWmlInterface ) = 0; - - inline virtual ~MWmlEngineInterface() {}; - - virtual CWmlResourceLoadListener* LoadResourceL( const TDesC& aUrl, void *aLoadContext, - void * /*NW_Url_RespCallback_t*/ aPartialLoadCallback, TUint16 aTransId) = 0; - - virtual CCoeControl* coeControl() = 0; - - virtual TBool WmlLink() = 0; - - virtual TInt AppId() = 0; - - virtual void SetAppId( TInt aApId ) = 0; - - virtual void SetWmlLink( TBool aLink ) = 0 ; - - virtual HBufC* PageInfoLC( TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo ) = 0; - - virtual void SetBrowserSettingL( TUint aSetting, TUint aValue ) = 0; - - virtual void SetHistoryController( HistoryControllerInterface* aHistoryController ) = 0; - - virtual HistoryControllerInterface& HistoryController() const = 0; - - virtual void InputElementEditComplete( TBool aInputConfirmed ) = 0; - - virtual void GainFocus() = 0; - - virtual void LoseFocus() = 0; - - virtual TInt ProcessBack() = 0; - - virtual TInt HandleDo( TUint32 aElemId ) = 0; - - virtual CArrayFixFlat<TBrCtlImageCarrier>* GetPageImagesL() = 0; - - virtual TBrCtlDefs::TBrCtlElementType GetFocusedElementType() = 0; - - virtual TWmlEngineDefs::THistoryStackPosition HistoryStackPosition() = 0; - - virtual void MakeVisible(TBool aVisible) = 0; - - virtual void SetFocus( TBool aFocus, TDrawNow aDrawNow ) = 0; - - virtual void SetRect( const TRect &aRect ) = 0; - - //TBrowserStatusCode - - virtual TInt WMLPartialResponse( CWmlContentInterface* aWmlContentInterface, - const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - TBool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - TUint8* aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - void* aPartialCallback ) = 0; - - virtual void WmlLoadUrlL( const TDesC& aUrl ) = 0; - virtual void LoadImages() = 0; - - virtual TRect WmlViewRectangle() = 0; - - virtual void ScrollTo(TPoint aPoint) = 0; - virtual void SetCertInfo( const TCertInfo* aCertInfo ) = 0; - virtual const TCertInfo* CertInfo() const = 0; - - virtual void* loadContext() = 0; - virtual void* partialLoadCallback() = 0; - virtual TUint16 transId() = 0; - - virtual void WmlParameters( const char* data, int length, TDesC& contentType, TDesC& charset, TInt httpStatus, TInt chunkIndex, TDesC& url ) = 0; - virtual TSize WMLDocumentSize() = 0; - virtual TPoint WMLDocumentPosition() = 0; - - private: - - - }; - -#endif // WMLDISPATCHER_H -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/src/WmlContentInterface.cpp --- a/webengine/wmlengine/src/wmlcontrol/src/WmlContentInterface.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Definition of CWmlContentInterface -* -*/ - - - -// INCLUDES -#include <e32base.h> -#include "BrsrStatusCodes.h" -#include "WmlContentInterface.h" -#include "nwx_http_defs.h" -#include "urlloader_urlresponse.h" -#include "urlloader_loaderutils.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ----------------------------------------------------------------------------- -// CWmlContentInterface::NewL -// Public Class Method -// Two-phased constructor. -// ----------------------------------------------------------------------------- -CWmlContentInterface* CWmlContentInterface::NewL() - { - CWmlContentInterface* self = new (ELeave) CWmlContentInterface(); - CleanupStack::PushL( self ); - self->ConstructL( ); - CleanupStack::Pop(); // self - return self; - } -// ----------------------------------------------------------------------------- -// CWmlContentInterface::CWmlContentInterface -// Public Class Method -// C++ default constructor. -// ----------------------------------------------------------------------------- -CWmlContentInterface::CWmlContentInterface() - { - - } - -// ----------------------------------------------------------------------------- -// CWmlContentInterface::ConstructL -// Public Class Method -// Symbian 2nd phase constructor -// ----------------------------------------------------------------------------- -void CWmlContentInterface::ConstructL() - { - - } -// ----------------------------------------------------------------------------- -// CWmlContentInterface::PartialResponse -// Public Class Method -// sends the partial response. -// ----------------------------------------------------------------------------- -TBrowserStatusCode CWmlContentInterface::WMLPartialResponse( const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - TBool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - TUint8* aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - void* aPartialCallback ) -{ - TUint convertedHttpStatus = aHttpStatus; - - __ASSERT_DEBUG(aUri != NULL, LoaderUtils::PanicLoader()); - __ASSERT_DEBUG(aPartialCallback != NULL, LoaderUtils::PanicLoader()); - - LoaderUtils::LogLoaderEvents(ELogTypeResponse, aTransId, aUri); - - TUint8* body = (TUint8*)aBody.Ptr(); - - if (aBody.Length() && aHttpStatus > Success && aHttpStatus < MultipleChoices) - { - /* Http status of 2xx is success, we map to OK (200) if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= MultipleChoices && aHttpStatus < BadRequest) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - if (aBody.Length() && aHttpStatus >= ServerError && aHttpStatus < 600) - { - /* Display the content, not a generic error, if there is a body. */ - convertedHttpStatus = Success; - } - - // when dealing with http status 300 and 500 check to see if body is present - // if so we want to treat this as a standard content load and force the - // http status to be 200 (success) - - if ((body) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = ETrue; - } - - if ((iIsBodyPresent && (aChunkIndex == -1)) && (((aHttpStatus >= MultipleChoices) && (aHttpStatus < 400)) || ((aHttpStatus >= ServerError) && (aHttpStatus < 600)))) - { - aHttpStatus = Success; - convertedHttpStatus = Success; - iIsBodyPresent = EFalse; - } - - TBrowserStatusCode status = (aErr == KErrNone && convertedHttpStatus != Success) ? - KBrsrHttpStatus : LoaderUtils::MapErrors(aErr); - - NW_Url_Resp_t* urlResp = UrlLoader_UrlResponseNew(aUri, (TUint8*)aBody.Ptr(), - aBody.Length(), aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - aMethod, - aTransId, - aContentLength); - if (aCertInfo != NULL) - { - urlResp->certInfo = aCertInfo; - } - - CleanupStack::PushL(aContentTypeString); - CleanupStack::PushL(aContentLocationString); - CleanupStack::PushL(aBoundaryString); - CleanupStack::PushL(aLastModified); - CleanupStack::PushL(body); - if (urlResp == NULL) - { - status = ((NW_Url_RespCallback_t*)aPartialCallback)(KBrsrOutOfMemory, aTransId, aChunkIndex, aLoadContext, NULL); - CleanupStack::PopAndDestroy(5); // body, aContentTypeString, aContentLocationString - // aBoundaryString, aLastModified - } - else - { - status = ((NW_Url_RespCallback_t*)aPartialCallback)(status, aTransId, aChunkIndex, aLoadContext, urlResp); - CleanupStack::Pop(5); // body, aContentTypeString, aContentLocationString, aBoundaryString, aLastModified - } - - return status; -} - -void CWmlContentInterface::setUrl(const TDesC& aUrl) -{ - m_resourceUrl = HBufC::New(aUrl.Length() + 1); - m_resourceUrl->Des().Append((const TUint16*) aUrl.Ptr(), aUrl.Length()); - m_resourceUrl->Des().ZeroTerminate(); -} - -// ----------------------------------------------------------------------------- -// CWmlContentInterface::~CWmlContentInterface() -// Public Class Method -// Donstructor. -// ----------------------------------------------------------------------------- -CWmlContentInterface::~CWmlContentInterface() - { - - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlcontrol/src/WmlControl.cpp --- a/webengine/wmlengine/src/wmlcontrol/src/WmlControl.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,644 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// INCLUDES -#include "WmlControl.h" -#include "multipartparser.h" -#include "MVCView.h" -#include "MVCShell.h" -#include "WmlInterface.h" -#include "GDIDevicecontext.h" -#include "HistoryController.h" -#include "HistoryInterface.h" - -#include "WmlDispatcher.h" -#include "StringUtils.h" -#include "nwx_string.h" -#include "nwx_mem.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// ----------------------------------------------------------------------------- -// CWmlControl::ConstructL -// Private Class Method -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -void CWmlControl::ConstructL( CBrCtl* aBrCtl, TRect& aRect, MWmlInterface* aWKWmlInterface) -{ - // Initialize messaging system - if (NW_Msg_Initialize( "PSQ1" ) != KBrsrSuccess){ - User::Leave(KErrNoMemory); - } - iWmlContentInterface = NULL; - iWKWmlInterface = aWKWmlInterface; - iWmlView = CView::NewL(aBrCtl, aBrCtl, aRect, this); - iWmlShell = CShell::NewL(iWmlView, aBrCtl, aWKWmlInterface, this ); - iBrCtl = aBrCtl ; -} - -// ----------------------------------------------------------------------------- -// CWmlControl::PageInfoLC -// Returns to the Browser Control info about the page. The info is returned on the Cleanup Stack. -// ----------------------------------------------------------------------------- -// -HBufC* CWmlControl::PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo) - { - HBufC* pageInfo = NULL; - TBool isUrl = EFalse; - - if ( iHistoryController && iHistoryController->historyView() ) - { - return iHistoryController->pageInfoLC( aBrCtlPageInfo ); - } - else - - switch (aBrCtlPageInfo) - { - case TBrCtlDefs::EPageInfoTitle: - pageInfo = iWmlShell->GetCurrentTitleInHBufCL(isUrl); - if (isUrl) // should modify the shell to not lookup the URL if no title available - { - delete pageInfo; - pageInfo = NULL; - } - break; - case TBrCtlDefs::EPageInfoUrl: - pageInfo = iWmlShell->GetCurrentUrlInHBufCL(); - if ( !pageInfo->Compare(_L(" ")) ) - { - delete pageInfo; - pageInfo = NULL; - } - break; - case TBrCtlDefs::EPageInfoContent: - pageInfo = iWmlShell->GetPageAsTextL(); - break; - case TBrCtlDefs::EPageInfoSavedPage: - pageInfo = WMLGenerateSavedPageL(); - break; - } - - CleanupStack::PushL(pageInfo); - - return pageInfo; - } - -/* - * StartLoadingResource - * Public Class Method - * Purpose - * @since 3.1 - * @param const TDesC& aURL - * @return CWmlResourceLoadListener* -*/ -CWmlResourceLoadListener* CWmlControl::LoadResourceL( const TDesC& aUrl, void* aLoadContext, - void* aPartialLoadCallback, TUint16 aTransId) -{ - if( iWmlContentInterface && (aTransId - iWmlContentInterface->getTransId()) > 1 ){ - m_contentArray.ResetAndDestroy(); - iWmlContentInterface = NULL; - } - CWmlContentInterface* contentInterface = CWmlContentInterface::NewL(); - contentInterface->setUrl( aUrl ); - contentInterface->setTransId( aTransId ); - contentInterface->setLoadContext( aLoadContext ); - contentInterface->setPartialCallBack( aPartialLoadCallback ); - - m_contentArray.AppendL( contentInterface ); - - HBufC8* url8 = HBufC8::New(aUrl.Length() + 1); - if(url8) { - TPtr8 url8Ptr(url8->Des()); - url8Ptr.Copy(aUrl); - url8Ptr.ZeroTerminate(); - iWKWmlInterface->loadResource( url8Ptr, iWmlContentInterface); - delete url8; - } - - return NULL; -} - -// ----------------------------------------------------------------------------- -// -// C++ default constructor. -// -// ----------------------------------------------------------------------------- -CWmlControl::CWmlControl() -{ -} - -// ----------------------------------------------------------------------------- -// -// C++ destructor. -// -// ----------------------------------------------------------------------------- -CWmlControl::~CWmlControl() -{ - iWmlContentInterface = NULL; - delete iWmlShell; - delete iWmlView; - m_contentArray.ResetAndDestroy(); - m_contentArray.Close(); -} - -// ----------------------------------------------------------------------------- -// CBrCtl::SetBrowserSettingL -// From CBrCtlInterface -// Update a Browser Control setting -// ----------------------------------------------------------------------------- -// -void CWmlControl::SetBrowserSettingL(TUint aSetting, TUint aValue) - { - iWmlView->SetBrowserSettingL( aSetting, aValue); - } - -// ----------------------------------------------------------------------------- -// CWebKitControl::GenerateSavedPageL -// Public Class Method -// Create a formatted descriptor containing all markup and -// resources for the active page -// ----------------------------------------------------------------------------- -// -HBufC* CWmlControl::WMLGenerateSavedPageL() - { - - RPointerArray<CBodyPart> partsArr; - - //Creat the data here - - CBodyPart* newPart = NULL; - HBufC8* hdrData( NULL ); - TInt popDestCount( 0 ); - - //The following must be same as that of KContentTypeTextWml8 - //in MultipartContentHandler.cpp otherwise Multipart parser - //will not process this corretcly. - - _LIT8( KWmlContentType, "text/vnd.wap.wml" ); - - HBufC* wmlCurrentUrl = iWmlShell->GetCurrentUrlInHBufCL(); - User::LeaveIfNull( wmlCurrentUrl ); - CleanupStack::PushL( wmlCurrentUrl ); - - HBufC8* pageWMLMarkup = iWmlShell->GetPageAsWMLMarkUp(); - User::LeaveIfNull( pageWMLMarkup ); - CleanupStack::PushL( pageWMLMarkup ); - - TPtrC8 charsetPtr(0,0); - const TUint8* charset = iWmlShell->GetCharsetFromResponse(); - - if (charset != NULL) - { - charsetPtr.Set(charset, - NW_Asc_strlen(reinterpret_cast<const char*>(charset))); - } - - - hdrData = HBufC8::NewLC( KPartHeadersData().Length() + - wmlCurrentUrl->Length() + 1 + - charsetPtr.Length() + - KWmlContentType().Length() ); - - ++popDestCount; //For 1st hdrData - - - HBufC8* tempWMLUrl = HBufC8::NewLC(wmlCurrentUrl->Des().Length() + 1); - tempWMLUrl->Des().Copy(*wmlCurrentUrl); - tempWMLUrl->Des().ZeroTerminate(); - - HBufC8* contentType = HBufC8::NewLC(KWmlContentType().Length()); - contentType->Des().Copy(KWmlContentType); - - hdrData->Des().Format( KPartHeadersData, tempWMLUrl, contentType, &charsetPtr); - - //Do some clean up for first part - CleanupStack::PopAndDestroy( contentType); - CleanupStack::PopAndDestroy( tempWMLUrl); - - - // prepare new part and append to array - newPart = CBodyPart::NewL(); - newPart->SetHeaders( *hdrData ); - newPart->SetBody( pageWMLMarkup->Des() ); - partsArr.Append( newPart ); - - - // create CBodyPart objects from TWebCoreImageCarrier objects - CArrayFixFlat<TBrCtlImageCarrier>* imgArr = - iWmlView->GetPageImagesL(); - User::LeaveIfNull( imgArr ); - CleanupStack::PushL( imgArr ); - ++popDestCount; //imgArr - - TInt numImages = imgArr->Count(); - - for( TInt k=0; k<numImages; k++ ) - { - // prepare headers for part - TInt imageUrlLen = imgArr->At(k).Url().Length()+1; //One for NULL Termination - TInt imageContentTypeLen = imgArr->At(k).ContentType().Length()+1; //One for NULL Termination - - hdrData = HBufC8::NewLC( KPartHeadersImg().Length() + imageUrlLen + imageContentTypeLen ); - popDestCount++; //For 2nd hdrData - // convert url and content type to 8 bit descriptors - HBufC8* url8 = HBufC8::NewLC( imageUrlLen ); - url8->Des().Copy( imgArr->At(k).Url() ); - url8->Des().ZeroTerminate(); - - HBufC8* imgcontentType = HBufC8::NewLC(imageContentTypeLen); - imgcontentType->Des().Copy(imgArr->At(k).ContentType()); - imgcontentType->Des().ZeroTerminate(); - - // combine header values with format - hdrData->Des().Format( KPartHeadersImg, url8, imgcontentType ); - - CleanupStack::PopAndDestroy( imgcontentType ); - CleanupStack::PopAndDestroy( url8 ); - - // prepare new part and append to array - newPart = CBodyPart::NewL(); - newPart->SetHeaders( *hdrData ); - newPart->SetBody( imgArr->At(k).RawData() ); - partsArr.Append( newPart ); - - } - - // compose multipart/mixed document using MultipartParser - HBufC8* docBody8 = MultipartParser::ComposeL( partsArr, KSavePageBoundary(), - MultipartParser::EMultipartSubtypeMixed, - MultipartParser::EMultipartTopLevelHeaderContentType | - MultipartParser::EMultipartTopLevelHeaderContentLength | - MultipartParser::EMultipartTopLevelHeaderLastModified ); - // cleanup descriptors - partsArr.ResetAndDestroy(); - CleanupStack::PopAndDestroy( popDestCount ); - CleanupStack::PopAndDestroy(pageWMLMarkup); - - User::LeaveIfNull( docBody8 ); - CleanupStack::PushL( docBody8 ); - // convert multipart document to 16 bit descriptor - HBufC* docBody16 = HBufC::NewL( docBody8->Length() ); - docBody16->Des().Copy( *docBody8 ); - CleanupStack::PopAndDestroy( docBody8 ); - CleanupStack::PushL(docBody16); - TInt contentLength = docBody16->Length(); - TInt docLen = KSavePageDocTop().Length() + wmlCurrentUrl->Des().Length() + - KCrLf().Length() + contentLength; - HBufC* savedpage = HBufC::NewL( docLen ); - savedpage->Des().Copy( wmlCurrentUrl->Des() ); - savedpage->Des().Append( KCrLf ); - savedpage->Des().Insert( 0, KSavePageDocTop ); - savedpage->Des().Append( *docBody16 ); - - CleanupStack::PopAndDestroy( docBody16 ); - CleanupStack::PopAndDestroy( wmlCurrentUrl); - return savedpage; - } - -// ----------------------------------------------------------------------------- -// CWmlControl::InputElementEditComplete( TBool aInputConfirmed ) -// -// ----------------------------------------------------------------------------- -// -void CWmlControl::InputElementEditComplete( TBool aInputConfirmed ) -{ - iWmlView->InputElementEditComplete( aInputConfirmed ); -}//end CBrCtl::InputElementEditComplete() - - -// ----------------------------------------------------------------------------- -// CWmlControl::coeControl() -// -// ----------------------------------------------------------------------------- -// -CCoeControl* CWmlControl::coeControl() -{ - return (CCoeControl*) iWmlView; - -} - -// ----------------------------------------------------------------------------- -// CWmlControl::GainFocus() -// -// ----------------------------------------------------------------------------- -void CWmlControl::GainFocus() -{ - iWmlShell->GainFocus(); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::GainFocus() -// -// ----------------------------------------------------------------------------- -CArrayFixFlat<TBrCtlImageCarrier>* CWmlControl::GetPageImagesL() -{ - return ( iWmlView->GetPageImagesL() ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::GetFocusedElementType() -// -// ----------------------------------------------------------------------------- -TBrCtlDefs::TBrCtlElementType CWmlControl::GetFocusedElementType() -{ - return ( iWmlView->GetFocusedElementType() ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::LoseFocus() -// -// ----------------------------------------------------------------------------- -void CWmlControl::LoseFocus() -{ - iWmlShell->LoseFocus(); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::ProcessBack() -// -// ----------------------------------------------------------------------------- -TInt CWmlControl::ProcessBack() -{ - return ( iWmlShell->ProcessBack() ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::HandleDo() -// -// ----------------------------------------------------------------------------- -TInt CWmlControl::HandleDo( TUint32 aElemId ) -{ - // try to commit editing before HandleDo - InputElementEditComplete(ETrue); - return ( iWmlShell->HandleDo( aElemId ) ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::HistoryStackPosition() -// -// ----------------------------------------------------------------------------- -TWmlEngineDefs::THistoryStackPosition CWmlControl::HistoryStackPosition() -{ - return ( iWmlShell->HistoryStackPosition() ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::MakeVisible() -// -// ----------------------------------------------------------------------------- -void CWmlControl::MakeVisible( TBool aVisible ) -{ - if (!aVisible) - { - // cancel editing if we go elsewhere - InputElementEditComplete(EFalse); - } - return ( iWmlView->MakeVisible(aVisible) ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::SetFocus() -// -// ----------------------------------------------------------------------------- -void CWmlControl::SetFocus(TBool aFocus, TDrawNow aDrawNow ) -{ - return ( iWmlView->SetFocus( aFocus, aDrawNow ) ); -} - - -// ----------------------------------------------------------------------------- -// CWmlControl::SetRect() -// -// ----------------------------------------------------------------------------- -void CWmlControl::SetRect( const TRect &aRect ) -{ - return ( iWmlView->SetRect( aRect ) ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::LoadImages() -// -// ----------------------------------------------------------------------------- -void CWmlControl::LoadImages() -{ - iWmlShell->ShowImagesL(); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::WmlViewRectangle() -// -// ----------------------------------------------------------------------------- -TRect CWmlControl::WmlViewRectangle() -{ - return TRect( iWmlView->Position(), iWmlView->Size() ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::ScrollTo() -// -// ----------------------------------------------------------------------------- -void CWmlControl::ScrollTo(TPoint aPoint) - { - iWmlView->ScrollTo(aPoint); - } - -// ----------------------------------------------------------------------------- -// CWmlControl::WMLPartialResponse() -// -// ----------------------------------------------------------------------------- -TInt CWmlControl::WMLPartialResponse( CWmlContentInterface* aWmlContentInterface, - const TUint16* aUri, - TPtr8& aBody, - void* aHeaders, - TUint8* aContentTypeString, - TUint8* aContentLocationString, - TBool aNoStore, - TUint8* aBoundaryString, - TUint16* aLastModified, - TUint16 aCharset, - TUint8* aCharsetString, - TUint aHttpStatus, - TUint8 aMethod, - TUint16 aTransId, - TInt aChunkIndex, - void* aCertInfo, - TUint aContentLength, - TInt aErr, - void* aLoadContext, - void* aPartialCallback ) -{ - TBrowserStatusCode retVal = aWmlContentInterface->WMLPartialResponse(aUri, - aBody, - aHeaders, - aContentTypeString, - aContentLocationString, - aNoStore, - aBoundaryString, - aLastModified, - aCharset, - aCharsetString, - aHttpStatus, - aMethod, - aTransId, - aChunkIndex, - aCertInfo, - aContentLength, - aErr, - aLoadContext, - aPartialCallback); - return (TInt) retVal; -} - -// ----------------------------------------------------------------------------- -// CWmlControl::WmlLoadUrlL(..) -// -// ----------------------------------------------------------------------------- -void CWmlControl::WmlLoadUrlL( const TDesC& aUrl ) -{ - return (iWmlShell->WmlShellLoadUrlL( aUrl, AppId() ) ); -} - -// ----------------------------------------------------------------------------- -// CWmlControl::SetCertInfo( const TCertInfo* aCertInfo ) -// -// ----------------------------------------------------------------------------- -void CWmlControl::SetCertInfo( const TCertInfo* aCertInfo ) -{ - // set cert info - iCertInfo = aCertInfo; -} - -void CWmlControl::WmlParameters( const char* data, TInt length, TDesC& contentType, TDesC& charsetType, TInt httpStatus, TInt chunkIndex, TDesC& url ) -{ - TUint8 method = 1; - TUint16 charset = 64; - TInt err = 0; - - TInt contTypeLen = contentType.Length() + 1; - TUint8 *contType = new(ELeave)TUint8[contTypeLen]; - TPtr8 contType8(contType, contTypeLen ); - contType8.Copy( contentType ); - contType8.ZeroTerminate(); - - - TInt charSetLen = charsetType.Length() + 1; - TUint8 *charSet = new(ELeave)TUint8[charSetLen]; - TPtr8 charSet8(charSet, charSetLen ); - charSet8.Copy( charsetType ); - charSet8.ZeroTerminate(); - - TPtr8 myFake (0, 0); - - for (TInt i=0; i< m_contentArray.Count(); i++){ - if((m_contentArray[i]->getUrl()->Des()).operator==(url) ){ - iWmlContentInterface = m_contentArray[i]; - } - } - if (iWmlContentInterface){ - if (chunkIndex >= 0) { - TUint8 *body = new(ELeave)TUint8[length]; - NW_Mem_memcpy(body, data, length); - TPtr8 bodyPtr((unsigned char*) body, length); - bodyPtr.SetLength(length); - WMLPartialResponse( iWmlContentInterface, - (const TUint16*)(iWmlContentInterface->getUrl()->Des()).Ptr(), - bodyPtr, - NULL, - (TUint8 *)contType8.Ptr(), - (TUint8 *)myFake.Ptr(), - EFalse, - NULL, - NULL, - charset, - (TUint8 *)charSet8.Ptr(), - httpStatus, - method, - iWmlContentInterface->getTransId(), - chunkIndex, - NULL, - length, - err, - iWmlContentInterface->getLoadContext(), - iWmlContentInterface->getPartialCallBack() - ); - } - else { - TPtr8 myData8 ((unsigned char*)data, length); - WMLPartialResponse( iWmlContentInterface, - (const TUint16*)(iWmlContentInterface->getUrl()->Des()).Ptr(), - myData8, - NULL, - NULL, - NULL, - EFalse, - NULL, - NULL, - charset, - NULL, - httpStatus, - method, - iWmlContentInterface->getTransId(), - chunkIndex, - NULL, - length, - err, - iWmlContentInterface->getLoadContext(), - iWmlContentInterface->getPartialCallBack() - ); - } - } -} - - - -TSize CWmlControl::WMLDocumentSize() -{ - TSize size(0, 0); - if (iWmlView) { - iWmlView->ContentSize(size); - } - return size; -} - -TPoint CWmlControl::WMLDocumentPosition() -{ - if (iWmlView) { - return TPoint(iWmlView->GetDeviceContext()->Origin()->x, iWmlView->GetDeviceContext()->Origin()->y); - } - return TPoint(0, 0); -} - - - - -/** -* Only following function is exported from the Dynamic DLL. -*/ - -EXPORT_C MWmlEngineInterface* NewWmlEngineL() -{ - return new (ELeave) CWmlControl; -} - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlib.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlib.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCH_IWMLBROWSERLIB_H -#define NW_WMLSCH_IWMLBROWSERLIB_H - -#include "nwx_http_header.h" -#include "nw_object_interface.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_WmlsCh_IWmlBrowserLib_Class_s NW_WmlsCh_IWmlBrowserLib_Class_t; -typedef struct NW_WmlsCh_IWmlBrowserLib_s NW_WmlsCh_IWmlBrowserLib_t; - - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ - - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_Init_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_GetVar_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser, - const NW_Ucs2 *var, NW_Ucs2 ** ret_string); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_SetVar_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser, - const NW_Ucs2 *var, const NW_Ucs2 *value); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_Go_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser, - const NW_Ucs2 *url, const NW_Ucs2 *param, - NW_Http_Header_t *header); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_Prev_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser); - - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_NewContext_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlBrowserLib_Refresh_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser); - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_WmlsCh_IWmlBrowserLib_ClassPart_s { - NW_WmlsCh_IWmlBrowserLib_Init_t init; - NW_WmlsCh_IWmlBrowserLib_GetVar_t getVar; - NW_WmlsCh_IWmlBrowserLib_SetVar_t setVar; - NW_WmlsCh_IWmlBrowserLib_Go_t go; - NW_WmlsCh_IWmlBrowserLib_Prev_t prev; - NW_WmlsCh_IWmlBrowserLib_NewContext_t newContext; - NW_WmlsCh_IWmlBrowserLib_Refresh_t refresh; -} NW_WmlsCh_IWmlBrowserLib_ClassPart_t; - -struct NW_WmlsCh_IWmlBrowserLib_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_WmlsCh_IWmlBrowserLib_ClassPart_t NW_WmlsCh_IWmlBrowserLib; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_WmlsCh_IWmlBrowserLib_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_WmlsCh_IWmlBrowserLib_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_WmlsCh_IWmlBrowserLib)) - -#define NW_WmlsCh_IWmlBrowserLibOf(_object) \ - (NW_Object_Cast (_object, NW_WmlsCh_IWmlBrowserLib)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Object_Core_Class_t NW_WmlsCh_IWmlBrowserLib_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_WmlsCh_IWmlBrowserLib_Init(_wmlBrowser) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, init) \ - ((_wmlBrowser))) - -#define NW_WmlsCh_IWmlBrowserLib_GetVar(_wmlBrowser, _var, _ret_string) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, getVar) \ - ((_wmlBrowser), (_var), (_ret_string))) - -#define NW_WmlsCh_IWmlBrowserLib_SetVar(_wmlBrowser, _var, _value) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, setVar) \ - ((_wmlBrowser), (_var), (_value))) - -#define NW_WmlsCh_IWmlBrowserLib_Go(_wmlBrowser, _url, _param, _header) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, go) \ - ((_wmlBrowser), (_url), (_param), (_header))) - -#define NW_WmlsCh_IWmlBrowserLib_Prev(_wmlBrowser) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, prev) \ - ((_wmlBrowser))) - -#define NW_WmlsCh_IWmlBrowserLib_NewContext(_wmlBrowser) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, newContext) \ - ((_wmlBrowser))) - -#define NW_WmlsCh_IWmlBrowserLib_Refresh(_wmlBrowser) \ - (NW_Object_Invoke ((_wmlBrowser), NW_WmlsCh_IWmlBrowserLib, refresh) \ - ((_wmlBrowser))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCH_IWMLBROWSERLIB_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlibi.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlibi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCH_IWMLBROWSERLIBI_H -#define NW_WMLSCH_IWMLBROWSERLIBI_H - -#include "nw_object_interfacei.h" -#include "nw_wmlscriptch_iwmlbrowserlib.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCH_IWMLBROWSERLIBI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlscriptlistener.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlscriptlistener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCH_IWMLSCRIPTLISTENER_H -#define NW_WMLSCH_IWMLSCRIPTLISTENER_H - -#include "nw_object_interface.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_WmlsCh_IWmlScriptListener_Class_s NW_WmlsCh_IWmlScriptListener_Class_t; -typedef struct NW_WmlsCh_IWmlScriptListener_s NW_WmlsCh_IWmlScriptListener_t; - - -/* ------------------------------------------------------------------------- * - method type prototypes - * ------------------------------------------------------------------------- */ - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlScriptListener_Start_t) (NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const NW_Ucs2 *url); - -typedef -TBrowserStatusCode -(*NW_WmlsCh_IWmlScriptListener_Finish_t)(NW_WmlsCh_IWmlScriptListener_t *wmlScrListener, - const TBrowserStatusCode status, const NW_Ucs2 *message); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_WmlsCh_IWmlScriptListener_ClassPart_s { - NW_WmlsCh_IWmlScriptListener_Start_t start; - NW_WmlsCh_IWmlScriptListener_Finish_t finish; -} NW_WmlsCh_IWmlScriptListener_ClassPart_t; - -struct NW_WmlsCh_IWmlScriptListener_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Interface_ClassPart_t NW_Object_Interface; - NW_WmlsCh_IWmlScriptListener_ClassPart_t NW_WmlsCh_IWmlScriptListener; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_WmlsCh_IWmlScriptListener_s { - NW_Object_Interface_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_WmlsCh_IWmlScriptListener_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_WmlsCh_IWmlScriptListener)) - -#define NW_WmlsCh_IWmlScriptListenerOf(_object) \ - (NW_Object_Cast (_object, NW_WmlsCh_IWmlScriptListener)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_Object_Core_Class_t NW_WmlsCh_IWmlScriptListener_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_WmlsCh_IWmlScriptListener_Start(_wmlScrListener, _url) \ - (NW_Object_Invoke ((_wmlScrListener), NW_WmlsCh_IWmlScriptListener, start) \ - ((_wmlScrListener), (_url))) - -#define NW_WmlsCh_IWmlScriptListener_Finish(_wmlScrListener, _status, _message) \ - (NW_Object_Invoke ((_wmlScrListener), NW_WmlsCh_IWmlScriptListener, finish) \ - ((_wmlScrListener), (_status), (_message))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCH_IWMLSCRIPTLISTENER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlscriptlisteneri.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlscriptlisteneri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCH_IWMLSCRIPTLISTENERI_H -#define NW_WMLSCH_IWMLSCRIPTLISTENERI_H - -#include "nw_object_interfacei.h" -#include "nw_wmlscriptch_iwmlscriptlistener.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCH_IWMLSCRIPTLISTENERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptapi.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptapi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCRIPTAPI_H -#define NW_WMLSCRIPTAPI_H - - -const NW_Scr_ProgressApi_t* NW_Api_GetScriptProgressCB(); -const NW_Scr_WmlBrowserApi_t* NW_Api_GetScriptBrowserCB(); - - -#endif /* NW_WMLSCRIPTAPI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandler.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCRIPT_CONTENTHANDLER_H -#define NW_WMLSCRIPT_CONTENTHANDLER_H - -#include "nw_hed_contenthandler.h" -#include "nw_hed_documentroot.h" -#include "nw_text_ucs2.h" -#include "nw_adt_dynamicvector.h" -#include "nw_wmlscriptch_iwmlbrowserlib.h" -#include "nw_wmlscriptch_iwmlscriptlistener.h" -#include "nwx_http_header.h" -#include "nw_scrproxy.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- */ -typedef const struct NW_WmlScript_ContentHandler_Class_s NW_WmlScript_ContentHandler_Class_t; -typedef struct NW_WmlScript_ContentHandler_s NW_WmlScript_ContentHandler_t; - -/* ------------------------------------------------------------------------- */ -typedef struct NW_WmlScript_ContentHandler_ClassPart_s { - void** unused; -} NW_WmlScript_ContentHandler_ClassPart_t; - -struct NW_WmlScript_ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_WmlScript_ContentHandler_ClassPart_t NW_WmlScript_ContentHandler; -}; - -/* ------------------------------------------------------------------------- */ -struct NW_WmlScript_ContentHandler_s { - NW_HED_ContentHandler_t super; - - /* member variables */ - const NW_Ucs2 *url; - NW_ScrProxy_t *scrProxy; - NW_WmlsCh_IWmlBrowserLib_t *wmlBrowserLib; /* Wml Browser Lib Interface */ - NW_WmlsCh_IWmlScriptListener_t *wmlScrListener; /* Wml Script Listener Interface */ -}; - -/* ------------------------------------------------------------------------- */ -#define NW_WmlScript_ContentHandler_ClassPartOf(_object) \ - (NW_Object_GetClassPart (_object, NW_WmlScript_ContentHandler)) - -#define NW_WmlScript_ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_WmlScript_ContentHandler)) - -/* ------------------------------------------------------------------------- */ -extern NW_WmlScript_ContentHandler_Class_t NW_WmlScript_ContentHandler_Class; - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -const NW_Ucs2* NW_WmlScript_ContentHandler_Get_Url (NW_WmlScript_ContentHandler_t *thisObj); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCRIPT_CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandleri.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_WMLSCRIPT_CONTENTHANDLERI_H -#define NW_WMLSCRIPT_CONTENTHANDLERI_H - -#include "nw_hed_contenthandleri.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_WmlScript_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -extern -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Initialize (NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus); - -extern -TBrowserStatusCode -_NW_WmlScript_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree); - -extern -void -_NW_WmlScript_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, - NW_Bool aDestroyBoxTree); - -extern -void -_NW_WmlScript_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode); - -extern -const NW_Text_t* -_NW_WmlScript_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler); - -extern -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_WMLSCRIPT_CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/src/IWmlBrowserLib.c --- a/webengine/wmlengine/src/wmlscriptch/src/IWmlBrowserLib.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_wmlscriptch_iwmlbrowserlibi.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Core_Class_t NW_WmlsCh_IWmlBrowserLib_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/src/IWmlScriptListener.c --- a/webengine/wmlengine/src/wmlscriptch/src/IWmlScriptListener.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_wmlscriptch_iwmlscriptlisteneri.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Core_Class_t NW_WmlsCh_IWmlScriptListener_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Interface_Class, - /* queryInterface */ _NW_Object_Interface_QueryInterface - } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHContentHandler.cpp --- a/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,423 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -/*lint -save -esym(1066, NW_Api_GetScriptProgressCB) -esym(1066, NW_Api_GetScriptBrowserCB) */ - -#include "nw_wmlscriptch_wmlscriptcontenthandleri.h" -#include "nw_wmlscriptch_wmlscriptapi.h" -#include "nw_wae.h" -#include "nwx_ctx.h" -#include "nwx_string.h" -#include "stdarg.h" -#include "BrsrStatusCodes.h" - -/*lint -restore */ -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static NW_Bool ValidateReferer(NW_WmlScript_ContentHandler_t *thisObj, - const NW_HED_DocumentNode_t *referer) -{ - thisObj->wmlBrowserLib = (NW_WmlsCh_IWmlBrowserLib_t*) NW_Object_QueryInterface (referer, - &NW_WmlsCh_IWmlBrowserLib_Class); - /* Check if the refering content handler supports the wml browser interface. */ - if (thisObj->wmlBrowserLib == NULL) { - return NW_FALSE; - } - /* this is an optional interface. */ - thisObj->wmlScrListener = (NW_WmlsCh_IWmlScriptListener_t*) NW_Object_QueryInterface (referer, - &NW_WmlsCh_IWmlScriptListener_Class); - return NW_TRUE; -} - -static NW_Ucs2 * GetLocation(const NW_HED_DocumentNode_t *documentNode) -{ - const NW_Text_t *locationObj = NULL; - - locationObj = NW_HED_ContentHandler_GetURL(NW_HED_ContentHandlerOf(documentNode)); - - NW_ASSERT(locationObj != NULL); - return NW_Text_GetUCS2Buffer (locationObj, NW_Text_Flags_Copy, NULL, NULL); -} - -static void ApplyVars(NW_WmlScript_ContentHandler_t *thisObj) -{ - NW_ASSERT(thisObj != NULL); - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - (void) NW_WmlsCh_IWmlBrowserLib_Init(thisObj->wmlBrowserLib); - return; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_WmlScript_ContentHandler_Class_t NW_WmlScript_ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_HED_ContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_WmlScript_ContentHandler_t), - /* construct */ _NW_WmlScript_ContentHandler_Construct, - /* destruct */ _NW_WmlScript_ContentHandler_Destruct, - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_WmlScript_ContentHandler_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_WmlScript_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_WmlScript_ContentHandler_GetBoxTree, - /* processEvent */ _NW_HED_DocumentNode_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_WmlScript_ContentHandler_Suspend, - /* resume */ _NW_HED_DocumentNode_Resume, - /* allLoadsCompleted */ _NW_HED_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted*/ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_HED_ContentHandler_LoseFocus, - /* gainFocus */ _NW_WmlScript_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_HED_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_HED_ContentHandler_PartialNextChunk, - /* getTitle */ _NW_WmlScript_ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_HED_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ NULL, - /* handleRequest */ _NW_HED_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery - }, - { /* NW_WmlScript_ContentHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_WmlScript_ContentHandler_t *thisObj; - NW_HED_UrlRequest_t *urlRequest; - TBrowserStatusCode status = KBrsrSuccess; - NW_HED_DocumentRoot_t *docRoot = NULL; - NW_WaeUsrAgent_t *wae; - const NW_Text_t *urlText; - - - /* for convenience */ - NW_ASSERT(dynamicObject != NULL); - thisObj = NW_WmlScript_ContentHandlerOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_HED_ContentHandler_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) { - return status; - } - - /* this is embeddable content*/ - NW_HED_ContentHandler_SetIsEmbeddable (dynamicObject, NW_TRUE); - - /* create a copy of the url */ - urlRequest = va_arg (*argp, NW_HED_UrlRequest_t*); - NW_ASSERT (urlRequest); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - urlText = NW_HED_UrlRequest_GetUrl (urlRequest); - thisObj->url = NW_Text_GetUCS2Buffer (urlText, NW_Text_Flags_Copy, NULL, NULL); - - /* get the DocumentRoot */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT(docRoot != NULL); - - /* create the script proxy */ - thisObj->scrProxy = NW_ScrProxy_New(); - if (thisObj->scrProxy == NULL) { - return KBrsrOutOfMemory; - } - - status = NW_ScrProxy_Initialize(thisObj->scrProxy, thisObj, - NW_Api_GetScriptBrowserCB(), - NW_Api_GetScriptProgressCB(), - &docRoot->appServices->scrDlgApi, - &docRoot->appServices->wtaiApi, - &docRoot->appServices->scriptSuspResApi, - docRoot->appServices->errorApi.notifyError); - if (status == KBrsrSuccess) { - wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - status = NW_Wae_RegisterWmlScriptProxy(wae, thisObj->scrProxy); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_WmlScript_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_WmlScript_ContentHandler_t *thisObj; - NW_WaeUsrAgent_t *wae; - - /* for convenience */ - thisObj = NW_WmlScript_ContentHandlerOf (dynamicObject); - - /* make sure that we shut down any running scripts */ - TBrowserStatusCode status = NW_ScrProxy_AbortScript(thisObj->scrProxy); - NW_ASSERT(status == KBrsrSuccess); - - wae = (NW_WaeUsrAgent_t*) NW_Ctx_Get(NW_CTX_WML_CORE, 0); - NW_ASSERT(wae != NULL); - status = NW_Wae_UnRegisterWmlScriptProxy(wae); - NW_ASSERT(status == KBrsrSuccess); - - NW_ScrProxy_Free(thisObj->scrProxy); - thisObj->scrProxy = NULL; - - /*free the copy of the url*/ - NW_Mem_Free ((NW_Ucs2*) thisObj->url); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Initialize (NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ) -{ - NW_WmlScript_ContentHandler_t *thisObj; - NW_Ucs2 *myLocation = NULL; - NW_Ucs2 *postfields = NULL; - NW_Ucs2 *refererUrl = NULL; - NW_HED_DocumentNode_t *refererCh = NULL; - TBrowserStatusCode status; - NW_HED_ContentHandler_t* contentHandler; - - NW_REQUIRED_PARAM( aInitStatus ); - - /* for convenience */ - thisObj = NW_WmlScript_ContentHandlerOf (documentNode); - contentHandler = NW_HED_ContentHandlerOf( thisObj ); - - /* get our location */ - myLocation = NW_Str_Newcpy(thisObj->url); - if (!myLocation) { - UrlLoader_UrlResponseDelete (contentHandler->response); - contentHandler->response = NULL; - return KBrsrOutOfMemory; - } - - /* get the content handler who loaded us */ - refererCh = NW_HED_DocumentNode_GetParentNode(NW_HED_DocumentNodeOf(thisObj)); - NW_ASSERT(refererCh != NULL); - - /* make sure that the refering content handler has implemented the WML Script - interface */ - if (ValidateReferer(thisObj, refererCh)) { - /* get the location of the refering content handler */ - refererUrl = GetLocation(NW_HED_DocumentNodeOf(refererCh)); - if (!refererUrl) { - NW_Str_Delete(myLocation); - UrlLoader_UrlResponseDelete (contentHandler->response); - contentHandler->response = NULL; - return KBrsrOutOfMemory; - } - - status = NW_Url_GetQuery(myLocation, &postfields); - if (status != KBrsrSuccess && status != KBrsrFailure) { - NW_Str_Delete(myLocation); - NW_Str_Delete(refererUrl); - UrlLoader_UrlResponseDelete (contentHandler->response); - contentHandler->response = NULL; - return status; - } - /* - ** if postfields are in current location then use those, otherwise use - ** postfields that may have been generated if location is an asp page. - */ - if (postfields == NULL) { - status = NW_Url_GetQuery(contentHandler->response->uri, &postfields); - if (status != KBrsrSuccess && status != KBrsrFailure) { - NW_Str_Delete(myLocation); - NW_Str_Delete(refererUrl); - UrlLoader_UrlResponseDelete (contentHandler->response); - contentHandler->response = NULL; - return status; - } - } else { - NW_Str_Delete(postfields); - postfields = NULL; /* postfields already included in myLocation */ - } - - ApplyVars(thisObj); - /* - ** run the script; transfer ownership of location, postfields, referer, and content - ** to the WmlScript Interpreter. - */ - status = NW_ScrProxy_RunScript(thisObj->scrProxy, - myLocation, postfields, refererUrl, - contentHandler->response->body->data, - contentHandler->response->body->length, - contentHandler->response->charset); - } else { - NW_Str_Delete(myLocation); - status = KBrsrFailure; - /* TODO: delete objs otherwise deleted when script runs. */ - } - - if(status == KBrsrSuccess) { - /* Release ownership of the buffer and delete the response */ - contentHandler->response->body->data = NULL; - UrlLoader_UrlResponseDelete (contentHandler->response); - contentHandler->response = NULL; - } - /* - ** Note: We dont propogate a node changed event as there is nothing to - ** display at this point. - */ - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_WmlScript_ContentHandler_GetBoxTree (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree) -{ - NW_REQUIRED_PARAM(documentNode); - *boxTree = NULL; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_WmlScript_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree) -{ - NW_WmlScript_ContentHandler_t *thisObj = NULL; - - NW_ASSERT(documentNode != NULL); - - /* for convenience */ - thisObj = NW_WmlScript_ContentHandlerOf (documentNode); - - /* make sure that we shut down any running scripts */ - (void) NW_ScrProxy_AbortScript(thisObj->scrProxy); - - /* call our super class to suspend the children */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode.suspend (documentNode, aDestroyBoxTree); -} - -/* ------------------------------------------------------------------------- */ -void -_NW_WmlScript_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_Msg_t *cmsg = NULL; - NW_Msg_Address_t wmlMsgAddr, scriptMsgAddr; - - /* get the messaging address of wml and script interpreter */ - status = NW_Msg_LookupReceiverByName(NW_BROWSER_CORE, &wmlMsgAddr); - if (status == KBrsrSuccess) { - status = NW_Msg_LookupReceiverByName(NW_SCRIPT_SERVER, &scriptMsgAddr); - if (status == KBrsrSuccess) { - /* TODO: add transaction support */ - cmsg = NW_Msg_New(1, wmlMsgAddr, scriptMsgAddr, NW_MSG_SCRIPT_RESUME_REQ); - if (cmsg == NULL) { - status = KBrsrOutOfMemory; - } else { - /* Send the message to the script interpreter */ - cmsg->status = KBrsrSuccess; - status= NW_Msg_Send(cmsg); - } - } - } - - /* clean up */ - if (status != KBrsrSuccess) { - NW_Msg_Delete(cmsg); - } - - /* call our super class to suspend the children */ - NW_HED_ContentHandler_Class.NW_HED_DocumentNode.gainFocus (documentNode); -} - -/* ------------------------------------------------------------------------- */ -const NW_Text_t* -_NW_WmlScript_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler) -{ - NW_REQUIRED_PARAM(contentHandler); - - /* we dont have a title */ - return (const NW_Text_t *)NULL; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_WmlScript_ContentHandler_Cancel (NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType) -{ - NW_WmlScript_ContentHandler_t* thisObj; - void* browserApp = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM(cancelType); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_WmlScript_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_WmlScript_ContentHandlerOf (documentNode); - - /* make sure that we shut down any running scripts */ - (void) NW_ScrProxy_AbortScript(thisObj->scrProxy); - /* Make sure the wait note panel is removed. */ - browserApp = NW_Ctx_Get(NW_CTX_BROWSER_APP, 0); - - /* get the global context from the docroot */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(thisObj); - - if(docRoot != NULL) { - (void) docRoot->appServices->loadProgress_api.finish(browserApp, NULL); - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/*external method to obtain the url from the script content handler*/ - -const NW_Ucs2* NW_WmlScript_ContentHandler_Get_Url (NW_WmlScript_ContentHandler_t *thisObj) -{ - - NW_ASSERT(thisObj); - - return thisObj->url; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHScrProxyApi.cpp --- a/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHScrProxyApi.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -/**************************************************************** -* WML Script Proxy Callback implementation. This file implements -* all the wml script proxy callbacks. Most of the functions are -* trivial they just invoke the script interfaces on the WML Script -* content handler. The dialog libraries and the error api are not -* currently under a interface; the content handlers should exhibit -* the same behaviour for these. TODO : hook up the dialog libraries -* and the error dialog to the generic dialog api. -*****************************************************************/ - -/* -**------------------------------------------------------------------------- -** Include Files -**------------------------------------------------------------------------- -*/ - -#include "nwx_string.h" -#include "nwx_logger.h" -#include "nw_errnotify.h" -#include "nwx_http_header.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - -/* -**------------------------------------------------------------------------- -** Internal Prototypes -**------------------------------------------------------------------------- -*/ -/* WMLS browser library routines called by the script proxy */ -static TBrowserStatusCode WmlScrCh_GetVar(void *ctx, const NW_Ucs2 *var, - NW_Ucs2 ** ret_string); - -static TBrowserStatusCode WmlScrCh_SetVar(void *ctx, const NW_Ucs2 *var, - const NW_Ucs2 *value); - -static TBrowserStatusCode WmlScrCh_Go(void *ctx, const NW_Ucs2 *url, - const NW_Ucs2 *param, NW_Http_Header_t *header); - -static TBrowserStatusCode WmlScrCh_Prev(void *ctx); - -static TBrowserStatusCode WmlScrCh_NewContext(void *ctx); - -static TBrowserStatusCode WmlScrCh_Refresh(void *ctx); - - -/* WMLS load progess routines called by the script proxy */ -static TBrowserStatusCode -WmlScrCh_ScriptStart(void *ctx, const NW_Ucs2 *url); - -static TBrowserStatusCode -WmlScrCh_ScriptComplete(void *ctx, TBrowserStatusCode status, - const NW_Ucs2 *message); - -/* -**------------------------------------------------------------------------- -** File Scoped Static Variables -**------------------------------------------------------------------------- -*/ - -static const NW_Scr_ProgressApi_t ScrProgressApi = -{ - WmlScrCh_ScriptStart, - WmlScrCh_ScriptComplete, -}; - -static const NW_Scr_WmlBrowserApi_t ScrWmlBrowserApi = -{ - WmlScrCh_GetVar, - WmlScrCh_SetVar, - WmlScrCh_Go, - WmlScrCh_Prev, - WmlScrCh_NewContext, - WmlScrCh_Refresh, -}; - - -/* -**------------------------------------------------------------------------- -** Internal Functions -**------------------------------------------------------------------------- -*/ -static TBrowserStatusCode WmlScrCh_ScriptStart(void *ctx, const NW_Ucs2 *url) -{ - NW_WmlScript_ContentHandler_t *thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - if (thisObj->wmlScrListener != NULL) { - status = NW_WmlsCh_IWmlScriptListener_Start(thisObj->wmlScrListener, url); - } - return status; -} - - -static TBrowserStatusCode -WmlScrCh_ScriptComplete(void *ctx, TBrowserStatusCode status, - const NW_Ucs2 *message) -{ - NW_WmlScript_ContentHandler_t *thisObj; - TBrowserStatusCode ret_status = KBrsrSuccess; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - if (thisObj->wmlScrListener != NULL) { - ret_status = NW_WmlsCh_IWmlScriptListener_Finish(thisObj->wmlScrListener, - status, message); - } - return ret_status; -} - -static TBrowserStatusCode -WmlScrCh_GetVar(void *ctx, const NW_Ucs2 *var, NW_Ucs2 ** ret_string) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_GetVar(thisObj->wmlBrowserLib, var, ret_string); -} - -static TBrowserStatusCode WmlScrCh_SetVar(void *ctx, const NW_Ucs2 *var, - const NW_Ucs2 *value) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_SetVar(thisObj->wmlBrowserLib, var, value); -} - -static TBrowserStatusCode WmlScrCh_Go(void *ctx, const NW_Ucs2 *url, - const NW_Ucs2 *param, - NW_Http_Header_t *header) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_Go(thisObj->wmlBrowserLib, url, param, header); -} - -static TBrowserStatusCode WmlScrCh_Prev(void *ctx) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_Prev(thisObj->wmlBrowserLib); -} - -static TBrowserStatusCode WmlScrCh_NewContext(void *ctx) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_NewContext(thisObj->wmlBrowserLib); -} - -static TBrowserStatusCode WmlScrCh_Refresh(void *ctx) -{ - NW_WmlScript_ContentHandler_t *thisObj; - - thisObj = NW_WmlScript_ContentHandlerOf(ctx); - - NW_ASSERT(thisObj->wmlBrowserLib != NULL); - return NW_WmlsCh_IWmlBrowserLib_Refresh(thisObj->wmlBrowserLib); -} - - -/* -**------------------------------------------------------------------------- -** External Public (Exported) Functions -**------------------------------------------------------------------------- -*/ -const NW_Scr_ProgressApi_t* NW_Api_GetScriptProgressCB() -{ - return &ScrProgressApi; -} - -const NW_Scr_WmlBrowserApi_t* NW_Api_GetScriptBrowserCB() -{ - return &ScrWmlBrowserApi; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/ImageMapPopup.h --- a/webengine/wmlengine/src/xhtml/include/ImageMapPopup.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Declaration of images map popup and listbox. -* -* -*/ - - -#ifndef __IMAGEMAPPOPUP_H -#define __IMAGEMAPPOPUP_H - -#include <e32base.h> -#include <e32def.h> -#include <aknPopup.h> -#include <aknlists.h> -#include <apparc.h> -#include <aknconsts.h> -#include <aknEditStateIndicator.h> -#include <AknsListBoxBackgroundControlContext.h> - -class CCoeControl; -class TCoeEvent; -class CEikListBox; -class TListBoxEvent; -class CGulIcon; -class CAknsListBoxBackgroundControlContext; - -// use large icon list box with double item text -class CImageMapListBox : public CAknDoubleLargeGraphicPopupMenuStyleListBox - { - public: - - /** - * C++ default constructor. - */ - CImageMapListBox(); - - /** - * Destructor. - */ - virtual ~CImageMapListBox(); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL( CCoeControl& aParent, CArrayPtrFlat<CFbsBitmap>& aBitmapList, - CArrayPtrFlat<HBufC>& aAltTextList ); - - private: - - /** - * Fit - * @since 2.1 - * @param aSource: source size - * @param aSource: target size - * @return TSize target - */ - TSize Fit( const TSize& aSource, const TSize& aTarget ); - }; - -// ------------------------------------------------------------------------------------ - -class CImageMapPopup : public CAknPopupList - { - public: - - /** - * CreateAndRunL - * @since 2.1 - * @param aBitmapList: bitmap list - * @param aAltTextList: alt text list - * @return selected item (-1 if cancel was selected) - */ - static TInt CreateAndRunL( CArrayPtrFlat<CFbsBitmap>& aBitmapList, CArrayPtrFlat<HBufC>& aAltTextList ); - - /** - * Destructor. - */ - virtual ~CImageMapPopup(); - - /** - * HandleListBoxEventL - * @since 2.1 - * @param aListBox: list box - * @param aEventType: event type - * @return void - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - /** - * HandleControlEventL - * @since 2.1 - * @param aControl: coe control - * @param aEventType: event type - * @return void - */ - void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); - - private: // New functions - - /** - * C++ default constructor. - */ - CImageMapPopup(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( CEikListBox *aListBox, TInt aCbaResource, - AknPopupLayouts::TAknPopupLayouts aType = AknPopupLayouts::EMenuWindow ); - - private: // from MObjectProvider - - /** - * MopSupplyObject - * @since 2.1 - * @param aId: id - * @return TTypeUid::Ptr - */ - TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); - - private: // members - - CAknsListBoxBackgroundControlContext* iSkinContext; // owned - CArrayPtrFlat<CFbsBitmap>* iBitmapList; // owned - CArrayPtrFlat<HBufC>* iAltTextList; // owned - }; - -#endif // __IMAGEMAPPOPUP_H - -// End of file diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/MapElementList.h --- a/webengine/wmlengine/src/xhtml/include/MapElementList.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,226 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different map element objects -* -*/ - - -#ifndef MAPELEMENTLIST_H -#define MAPELEMENTLIST_H - -// INCLUDES -#include "nw_xhtml_elementhandler.h" -#include "BrsrStatusCodes.h" -#include "nw_lmgr_imagemapbox.h" - -#include <e32base.h> -#include "nwx_string.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FORWARD DECLARATIONS -typedef CArrayPtrFlat<NW_LMgr_ImageMapBox_t> CImageMapBoxList; - -// CLASS DECLARATION - -/** -* This class contains information about a map element entry in the list -* @lib xhtml.lib -* @since 2.1 -*/ -class CMapElementEntry : public CBase - { - public: - - /** - * Two-phased constructor. - * @return CMapElementEntry* - */ - static CMapElementEntry* NewL( TUint16* aMapName ); - - /** - * Two-phased constructor. - * @return CMapElementEntry* - */ - static CMapElementEntry* NewLC( TUint16* aMapName ); - - /** - * Destructor. - */ - virtual ~CMapElementEntry(); - - /** - * This method sets the dom node for a given map name - * @since 2.1 - * @param aDomNode: pointer to the dom node - * @return - */ - void SetDomNode( NW_DOM_ElementNode_t* aDomNode ); - - /** - * This method adds an image box for a given map name - * @since 2.1 - * @param aImageMapBox: pointer to the image box - * @return TBrowserStatusCode - */ - TBrowserStatusCode AddImageMapBox( NW_LMgr_ImageMapBox_t* aImageMapBox ); - - /** - * This method returns the dom node - * @since 2.1 - * @return a pointer to a NW_DOM_ElementNode_t - */ - NW_DOM_ElementNode_t* DomNode() { return iDomNode; } - - /** - * This method returns the image map list - * @since 2.1 - * @return a pointer to a CImageMapBoxList - */ - CImageMapBoxList* ImageMapBoxList() { return iImageMapBoxList; } - - - TUint16* iMapName; // entry Id - - private: // new functions - - /** - * Constructor. - */ - CMapElementEntry(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( TUint16* aMapName ); - - private: // member variables - - NW_DOM_ElementNode_t* iDomNode; // corresponding DOM node - CImageMapBoxList* iImageMapBoxList; // image box list sharing the same map name - }; - -// CLASS DECLARATION - -/** -* This class represents a maping of map names to dom nodes -* @lib xhtml.lib -* @since 2.1 -*/ -class CMapElementList : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @return CMapElementList* - */ - static CMapElementList* NewL(); - - /** - * Destructor. - */ - virtual ~CMapElementList(); - - public: // New functions - - /** - * This method sets the dom node for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @param aDomNode: pointer to the dom node - * @return TBrowserStatusCode - */ - TBrowserStatusCode SetDomNode( TUint16* aMapName, NW_DOM_ElementNode_t* aDomNode ); - - /** - * This method sets an image map box for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @param aImageMapBox: pointer to the image map box - * @return TBrowserStatusCode - */ - TBrowserStatusCode SetImageMapBox( TUint16* aMapName, NW_LMgr_ImageMapBox_t* aImageMapBox ); - - /** - * This method returns the number of entries in the mapelement list - * @since 2.1 - * @param aIndex: index - * @return a pointer to a CMapElementEntry - */ - TInt MapElementCount() { return iMapElementList->Count(); } - - /** - * This method returns an map element enrty by index - * @since 2.1 - * @param aIndex: index - * @return a pointer to a CMapElementEntry - */ - CMapElementEntry* MapElementEntry( TInt aIndex ) { return iMapElementList->At( aIndex ); } - - /** - * This method returns the dom node for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @return a pointer to a NW_DOM_ElementNode_t object or NULL - */ - NW_DOM_ElementNode_t* DomNode( TUint16* aMapName ); - - /** - * This method returns the image map list for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @return a pointer to a CImageMapBoxList object or NULL - */ - CImageMapBoxList* ImageMapBoxList( TUint16* aMapName ); - - private: // New functions - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * This method sets either a dom node or an image map box for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @param aDomNode: pointer to the dom node - * @param aImageMapBox: pointer to the image map box - * @return TBrowserStatusCode - */ - TBrowserStatusCode Set( TUint16* aMapName, NW_DOM_ElementNode_t* aDomNode, NW_LMgr_ImageMapBox_t* aImageMapBox ); - - /** - * This method gets the entry for a given map name - * @since 2.1 - * @param aMapName: name of the map - * @return a pointer to the entry - */ - CMapElementEntry* Get( TUint16* aMapName ); - - - typedef CArrayPtrFlat<CMapElementEntry> CMapElementListArray; - - private: // Data - - // vector containing the map elements - CMapElementListArray* iMapElementList; - }; - -#endif /* MAPELEMENTLIST_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XHTMLMessageListener.h --- a/webengine/wmlengine/src/xhtml/include/XHTMLMessageListener.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _XHTMLMESSAGELISTENER_H -#define _XHTMLMESSAGELISTENER_H - -// INCLUDES -#include "MSGMessageListener.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -struct NW_XHTML_ContentHandler_s; -typedef struct NW_XHTML_ContentHandler_s NW_XHTML_ContentHandler_t; - -// CLASS DECLARATION - -/** -* TMessageListener -* -* @lib xhtml.lib -* @since 2.6 -*/ -class TMessageListener : public MMessageListener -{ - public: // Constructors and destructor - /** - * C++ default constructor. - */ - TMessageListener (NW_XHTML_ContentHandler_t* aContentHandler); - - public: // New functions - /** - * - * @since 2.6 - * @param - * @return void - */ - void HandleMessage (NW_Msg_Message_t* message); - - private: // New functions - - private: // Data - NW_XHTML_ContentHandler_t* iContentHandler; -}; - -#endif // _XHTMLMESSAGELISTENER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandler.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,339 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles object tags in XHTML documents. -* -*/ - - - -#ifndef CXHTMLOBJECTELEMENTHANDLER__H -#define CXHTMLOBJECTELEMENTHANDLER__H - -// INCLUDES -#include <e32def.h> -#include <e32base.h> - -#include "nwx_defs.h" -#include "nw_dom_node.h" - -#include "HedLoadObserver.h" -#include "LMgrBoxDestructionListener.h" -#include "ObjectUtils.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_HED_ContentHandler_s NW_HED_ContentHandler_t; -typedef struct NW_XHTML_ContentHandler_s NW_XHTML_ContentHandler_t; -typedef struct NW_XHTML_ElementHandler_s NW_XHTML_ElementHandler_t; -typedef struct NW_LMgr_ContainerBox_s NW_LMgr_ContainerBox_t; -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; -typedef struct NW_Evt_Event_s NW_Evt_Event_t; -typedef struct NW_Text_Abstract_s NW_Text_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -// CLASS DECLARATION - -// TODO: This class should be derived from CElementHandler once the browser is -// converted to c++. - -class CXHTMLObjectElementHandler : public CBase, public MLMgrBoxDestructionListener, - public MHEDLoadObserver - { - public: // Constructors and destructor - /** - * Two-phased constructor. - */ - static CXHTMLObjectElementHandler* NewL(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode); - - /** - * Destructor. - */ - virtual ~CXHTMLObjectElementHandler(); - - - public: // Functions from MLMgrBoxDestructionListener - /** - * Recieves notifications when the box has been destroyed. - * - * @since 2.6 - * @return void - */ - void Destroyed(); - - - public: // MHEDLoadObserver - /** - * Passes a HEAD response to the observer. - * - * @param aTransactionId the transaction id. - * @param aResponse the HEAD response to be processed. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - void HeadCompleted(TUint16 aTransactionId, const NW_Url_Resp_t& aResponse, - const NW_HED_UrlRequest_t& aUrlRequest, void* aClientData); - - /** - * Passes a chunk of a response to the observer. - * - * @param aTransactionId the transaction id. - * @param aChunkIndex the chunk count of this call, aChunkIndex > 0 - * @param aResponse the HEAD response to be processed. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - void ChunkReceived(TUint16 aTransactionId, TUint32 aChunkIndex, - const NW_Url_Resp_t& aResponse, const NW_HED_UrlRequest_t& aUrlRequest, - void* aClientData); - - /** - * Called when a response completes successfully or in error. - * - * @param aStatusClass the type of status-code found in aStatus -- - BRSR_STAT_CLASS_HTTP or BRSR_STAT_CLASS_GENERAL. - * @param aStatus the final load status of the request. - * @param aTransactionId the transaction id. - * @param aUrlRequest the url request. - * @param aClientData the client data past with the request. - * @return void. - */ - void LoadCompleted(TInt16 aStatusClass, TBrowserStatusCode aStatus, - TUint16 aTransactionId, const NW_HED_UrlRequest_t& aUrlRequest, - void* aClientData); - - - public: // New Methods - /** - * Initializes the ElementHandler. - * - * @return status code - */ - virtual TBrowserStatusCode Initialize(void); - - /** - * Creates the box-tree associated with the tag. - * - * @param aParentBox the parent to attach the new box-tree to. - * @return status code - */ - virtual TBrowserStatusCode CreateBoxTree(NW_LMgr_ContainerBox_t& aParentBox); - - /** - * Processes events targeted at boxes created by the ElementHandler. - * - * @param aBox the target box. - * @param aEvent the event. - * @return NW_LMgr_EventAbsorbed or NW_LMgr_EventNotAbsorbed - */ - virtual NW_Uint8 ProcessEvent(const NW_LMgr_Box_t& aBox, const NW_Evt_Event_t& aEvent); - - /** - * This is a special purpose method to get the element node - * associated with this handler. - * - * @return the elementNode associated with this handler. - */ - const NW_DOM_ElementNode_t* ElementNode(void) const; - - /** - * This is a special purpose method to get the "selected" element. - * See the comment on SelectElement. - * - * @return the selected elementNode. - */ - const NW_DOM_ElementNode_t* SelectedElementNode(void) const; - - /** - * Applies the content type and length properties on the given box. This is - * used in the download dialog box. - * - * @param aBox the box to apply the properties on. - * @return status code. - */ - TBrowserStatusCode ApplyInfoProperties(NW_LMgr_Box_t& aBox); - - - private: // Private Methods - /** - * C++ default constructor. - */ - CXHTMLObjectElementHandler(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(void); - - /** - * Loads the resource associated with object tag. - * - * @param aType the mime-type of the of the resource or NULL - * if the type isn't known. - * @param aUrl the url of the of the resource or NULL. - * @param aHandlerType Type of the load - * @return status code - */ - TBrowserStatusCode LoadObjectResource(const TDesC* aType, - const TDesC* aUrl, ObjectUtils::THandlerType aHandlerType); - - /** - * Loads the HEAD information of the resource associated with object tag. - * - * @return status code - */ - TBrowserStatusCode LoadObjectInfo(void); - - /** - * Returns the associated content handler or NULL if one isn't found. - * - * @return the associated content handler - */ - NW_HED_ContentHandler_t* AssociatedContentHandler(void); - - /** - * Set the place-holder text to the given descriptor. - * - * @param aObjectBox the Object box. - * @param aPlaceHolderText the string. - * - * @return status code - */ - TBrowserStatusCode SetPlaceHolderText(NW_LMgr_Box_t& aObjectBox, - const TDesC& aPlaceHolderText); - - /** - * Set the place-holder text to the given resource id. - * - * @param aObjectBox the Object box. - * @param aResourceId the string's resource id. - * - * @return status code - */ - TBrowserStatusCode SetPlaceHolderText(NW_LMgr_Box_t& aObjectBox, - TInt aResourceId); - - /** - * Removes the place holder -- puts the Object box in the active state. - * - * @param aObjectBox the Object box. - * - * @return void - */ - void RemovePlaceHolder(NW_LMgr_Box_t& aObjectBox); - - /** - * CXHTMLObjectElementHandler::SelectElement - * - * Embedded resources are specified in an xhtml document using the object tag. - * This tag can be very simple to quite complex. See the cpp file for some examples. - * This method determines if iElementNode or one of its descendants can be selected - * and displayed. Once an element is selected it is stored in iSelectedElementNode. - * iSelectedElementNode is used in GetAttribute to extract attribute values from - * the selected element. - * - * @return status code. - */ - TBrowserStatusCode SelectElement(void); - - /** - * Gets the value of the given attribute as a descriptor. - * - * @param aToken identifies the attribute to get. - * @param aValue upon success it equals the value of the attribute. - * The caller adopts aValue. - * @return status code - */ - TBrowserStatusCode GetAttribute(TInt16 aToken, TDesC** aValue); - - /** - * Gets the value of the source attribute as a descriptor. - * - * @param aValue upon success it equals the value of the src attribute. - * The caller adopts aValue. - * @return status code - */ - TBrowserStatusCode GetSrcAttribute(TDesC** aValue); - - /** - * Gets the value of the content-type attribute as a descriptor. - * - * @param aValue upon success it equals the value of the src attribute. - * The caller adopts aValue. - * @return status code - */ - TBrowserStatusCode GetTypeAttribute(TDesC** aValue); - - /** - * Gets the value of the source attribute by using the classId attribute, - * the cooresponding param element and the object attribute mappings table. - * - * @param aValue upon success it equals the value of the src attribute. - * The caller adopts aValue. - * @return status code - */ - TBrowserStatusCode GetObjectAttributeMapSrc(TDesC** aValue); - - /** - * Returns the cooresponding value (either param-name or content-type) given - * the class-id. - * - * @param aClassId the class-id used to map to the requested value. - * @param aValueSelector used to select the cooresponding value - * (either KParamName or KContentType) - * @return the value or NULL on out of memory. - */ - TDesC* GetObjectAttributeMappedValue(const TDesC& aClassId, TInt aValueSelector); - - /** - * Returns if the <object> element is enclosed within a hyperlink - * - * @return If the <object> element is enclosed within a hyperlink - */ - TBool InHyperLink(); - - private: // Data - const NW_XHTML_ElementHandler_t* iElementHandler; - NW_XHTML_ContentHandler_t* iContentHandler; - NW_DOM_ElementNode_t* iElementNode; - NW_DOM_ElementNode_t* iSelectedElementNode; - - NW_LMgr_Box_t* iObjectBox; - ObjectUtils::THandlerType iLoadedHandlerType; - TBool iIsDownloading; - - TBool iObjectInfoValidated; - HBufC* iContentType; - HBufC* iContentLength; - TInt16 iTransactionId; - }; - -#endif // CXHTMLOBJECTELEMENTHANDLER__H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandlerOOC.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandlerOOC.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_OBJECT_OBJELEMENTHANDLER_H -#define NW_XHTML_OBJECT_OBJELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ObjectElementHandler_Class_s NW_XHTML_ObjectElementHandler_Class_t; -typedef struct NW_XHTML_ObjectElementHandler_s NW_XHTML_ObjectElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ObjectElementHandler_ClassPart_s - { - void** unused; - } NW_XHTML_ObjectElementHandler_ClassPart_t; - -struct NW_XHTML_ObjectElementHandler_Class_s - { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_ObjectElementHandler_ClassPart_t NW_XHTML_ObjectElementHandler; - }; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ObjectElementHandler_s - { - NW_XHTML_ElementHandler_t super; - }; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ObjectElementHandler_GetClassPart(_object) \ - (((NW_XHTML_ObjectElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ObjectElementHandler) - -#define NW_XHTML_ObjectElementHandlerOf(_object) \ - ((NW_XHTML_ObjectElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ObjectElementHandler_Class_t NW_XHTML_ObjectElementHandler_Class; -extern const NW_XHTML_ObjectElementHandler_t NW_XHTML_ObjectElementHandler; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -extern TBrowserStatusCode -NW_XHTML_ObjectElementHandler_ApplyInfoProperties (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_OBJECT_OBJELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandlerOOCi.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandlerOOCi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_OBJECT_OBJELEMENTHANDLERI_H -#define NW_XHTML_OBJECT_OBJELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "XhtmlObjectElementHandlerOOC.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_ObjectElementHandler_Initialize (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode); - -extern -TBrowserStatusCode -_NW_XHTML_ObjectElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_ContainerBox_t* parentBox); - -extern -NW_Uint8 -_NW_XHTML_ObjectElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, NW_Evt_Event_t* aEvent); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_OBJECT_OBJELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandler.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles table elements in XHTML documents. -* -*/ - - - -#ifndef CXHTMLTABLEELEMENTHANDLER__H -#define CXHTMLTABLEELEMENTHANDLER__H - -// INCLUDES -#include <e32def.h> -#include <e32base.h> - -#include "nwx_defs.h" -#include "nw_dom_node.h" - - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_XHTML_ContentHandler_s NW_XHTML_ContentHandler_t; -typedef struct NW_XHTML_ElementHandler_s NW_XHTML_ElementHandler_t; -typedef struct NW_LMgr_Box_s NW_LMgr_Box_t; -typedef struct NW_LMgr_RootBox_s NW_LMgr_RootBox_t; -typedef struct NW_LMgr_ContainerBox_s NW_LMgr_ContainerBox_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -// CLASS DECLARATION - -// TODO: This class should be derived from CElementHandler once the browser is -// converted to c++. - -class CXHTMLTableElementHandler : public CBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - */ - static CXHTMLTableElementHandler* NewL(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode); - - /** - * Destructor. - */ - virtual ~CXHTMLTableElementHandler(); - - - public: // New Methods - /** - * Initializes the ElementHandler. - * - * @return status code - */ - virtual TBrowserStatusCode Initialize(void); - - /** - * Creates the box-tree associated with the tag. - * - * @param aParentBox the parent to attach the new box-tree to. - * @return status code - */ - virtual TBrowserStatusCode CreateBoxTree(NW_LMgr_ContainerBox_t& aParentBox); - - /** - * Returns whether or not grid mode applies to this table. - * - * @return ETrue or EFalse. - */ - TBool DoesGridModeApply(void); - - - private: // Private Methods - /** - * C++ default constructor. - */ - CXHTMLTableElementHandler(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(void); - - /** - * A simple helper method to create the box-tree. - * - * @param aElementNode the table's element node. - * @param aTableBox the table's box. - * @param aTableContainerParent the table's parent's box. - * - * @return status code - */ - TBrowserStatusCode CreateSubTree(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aTableBox, NW_LMgr_ContainerBox_t* aTableContainerParent); - - /** - * A simple helper method to create the box-tree. - * - * @param aElementHandler the table's element handler. - * @param aElementNode the table's element node. - * @param aTableBox the table's box. - * @param aTableContainerParent the table's parent's box. - * - * @return status code - */ - TBrowserStatusCode CreateSubTreeHelper(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_DOM_ElementNode_t* aElementNode, NW_LMgr_Box_t* aTableBox, - NW_LMgr_ContainerBox_t* aTableContainerParent); - - /** - * Returns true if the parent has only one element, ignoring text nodes that - * only contain whitespace. - * - * @return true or false. - */ - NW_Bool HasOnlyOneElementChild(NW_DOM_Node_t* aParentNode); - - /** - * This method is called each time a table chunk arrives. It is used - * to determine whether or not that table should be laid out in grid mode. - * - * @return status code - */ - TBrowserStatusCode PreEvalTable(); - - /** - * This method is called after all of the chunks of a table arrive. It is used - * to determine whether or not that table should be laid out in grid mode. - * - * @return status code - */ - TBrowserStatusCode PostEvalTable(); - - - private: // Data - const NW_XHTML_ElementHandler_t* iElementHandler; - NW_XHTML_ContentHandler_t* iContentHandler; - NW_DOM_ElementNode_t* iElementNode; - NW_LMgr_RootBox_t* iRootBox; - NW_Float32 iScreenWidth; - - TInt8 iIsGridMode; - NW_DOM_Node_t* iLastEvaluatedElement; - TInt32 iNumberOfElements; - }; - -#endif // CXHTMLTABLEELEMENTHANDLER__H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandlerOOC.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandlerOOC.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef XHTML_TABLEELEMENTHANDLER_H -#define XHTML_TABLEELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_tableElementHandler_Class_s NW_XHTML_tableElementHandler_Class_t; -typedef struct NW_XHTML_tableElementHandler_s NW_XHTML_tableElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_tableElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_tableElementHandler_ClassPart_t; - -struct NW_XHTML_tableElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_tableElementHandler_ClassPart_t NW_XHTML_tableElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_tableElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_tableElementHandler_GetClassPart(_object) \ - (((NW_XHTML_tableElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_tableElementHandler) - -#define NW_XHTML_tableElementHandlerOf(_object) \ - ((NW_XHTML_tableElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_tableElementHandler_Class_t NW_XHTML_tableElementHandler_Class; -extern const NW_XHTML_tableElementHandler_t NW_XHTML_tableElementHandler; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -NW_Bool -NW_XHTML_tableElementHandler_DoesGridModeApply (NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* XHTML_TABLEELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandlerOOCi.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandlerOOCi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef XHTML_TABLEELEMENTHANDLERI_H -#define XHTML_TABLEELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_tableElementHandler_Initialize (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode); - -extern -TBrowserStatusCode -_NW_XHTML_tableElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_ContainerBox_t* aParentBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* XHTML_TABLEELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_base_baseelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_base_baseelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASE_BASEELEMENTHANDLER_H -#define NW_XHTML_BASE_BASEELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_baseElementHandler_Class_s NW_XHTML_baseElementHandler_Class_t; -typedef struct NW_XHTML_baseElementHandler_s NW_XHTML_baseElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_baseElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_baseElementHandler_ClassPart_t; - -struct NW_XHTML_baseElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_baseElementHandler_ClassPart_t NW_XHTML_baseElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_baseElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_baseElementHandler_GetClassPart(_object) \ - (((NW_XHTML_baseElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_baseElementHandler) - -#define NW_XHTML_baseElementHandlerOf(_object) \ - ((NW_XHTML_baseElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_baseElementHandler_Class_t NW_XHTML_baseElementHandler_Class; -extern const NW_XHTML_baseElementHandler_t NW_XHTML_baseElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASE_BASEELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_base_baseelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_base_baseelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASE_BASEELEMENTHANDLERI_H -#define NW_XHTML_BASE_BASEELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_base_baseelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_baseElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_baseElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -NW_Uint8 -_NW_XHTML_baseElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASE_BASEELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_base_basemodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_base_basemodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASE_BASEMODULE_H -#define NW_XHTML_BASE_BASEMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BaseModule_Class_s - NW_XHTML_BaseModule_Class_t; -typedef struct NW_XHTML_BaseModule_s NW_XHTML_BaseModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BaseModule_ClassPart_s { - void** unused; -} NW_XHTML_BaseModule_ClassPart_t; - -struct NW_XHTML_BaseModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_BaseModule_ClassPart_t NW_XHTML_BaseModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_BaseModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BaseModule_GetClassPart(_object) \ - (((NW_XHTML_BaseModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_BaseModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_BaseModule_Class_t NW_XHTML_BaseModule_Class; -extern const NW_XHTML_BaseModule_t NW_XHTML_BaseModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BaseModuleOf(_object) \ - ((NW_XHTML_BaseModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASE_BASEMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_base_basemodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_base_basemodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASE_BASEMODULEI_H -#define NW_XHTML_BASE_BASEMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_base_basemodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASE_BASEMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_basicformsmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_basicformsmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_BASICFORMSMODULE_H -#define NW_XHTML_BASICFORMS_BASICFORMSMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BasicFormsModule_Class_s - NW_XHTML_BasicFormsModule_Class_t; -typedef struct NW_XHTML_BasicFormsModule_s NW_XHTML_BasicFormsModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BasicFormsModule_ClassPart_s { - void** unused; -} NW_XHTML_BasicFormsModule_ClassPart_t; - -struct NW_XHTML_BasicFormsModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_BasicFormsModule_ClassPart_t NW_XHTML_BasicFormsModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_BasicFormsModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BasicFormsModule_ClassPartOf(_object) \ - (((NW_XHTML_BasicFormsModule_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_BasicFormsModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_BasicFormsModule_Class_t NW_XHTML_BasicFormsModule_Class; -extern const NW_XHTML_BasicFormsModule_t NW_XHTML_BasicFormsModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BasicFormsModuleOf(_object) \ - ((NW_XHTML_BasicFormsModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_BASICFORMSMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_basicformsmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_basicformsmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_BASICFORMSMODULEI_H -#define NW_XHTML_BASICFORMS_BASICFORMSMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_basicforms_basicformsmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_BASICFORMSMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_formelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_formelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_FORMELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_FORMELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_formElementHandler_Class_s NW_XHTML_formElementHandler_Class_t; -typedef struct NW_XHTML_formElementHandler_s NW_XHTML_formElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_formElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_formElementHandler_ClassPart_t; - -struct NW_XHTML_formElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_formElementHandler_ClassPart_t NW_XHTML_formElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_formElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_formElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_formElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_formElementHandler) - -#define NW_XHTML_formElementHandlerOf(_object) \ - ((NW_XHTML_formElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_formElementHandler_Class_t NW_XHTML_formElementHandler_Class; -extern const NW_XHTML_formElementHandler_t NW_XHTML_formElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_FORMELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_formelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_formelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_FORMELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_FORMELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basicforms_formelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_formElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_formElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_FORMELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_inputelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_inputelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_INPUTELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_INPUTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" -#include "nw_fbox_inputbox.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_inputElementHandler_Class_s NW_XHTML_inputElementHandler_Class_t; -typedef struct NW_XHTML_inputElementHandler_s NW_XHTML_inputElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_inputElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_inputElementHandler_ClassPart_t; - -struct NW_XHTML_inputElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_inputElementHandler_ClassPart_t NW_XHTML_inputElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_inputElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_inputElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_inputElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_inputElementHandler) - -#define NW_XHTML_inputElementHandlerOf(_object) \ - ((NW_XHTML_inputElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_inputElementHandler_Class_t NW_XHTML_inputElementHandler_Class; -extern const NW_XHTML_inputElementHandler_t NW_XHTML_inputElementHandler; - -TBrowserStatusCode -NW_XHTML_inputElementHandler_HandleValidation (NW_FBox_InputBox_t* box, - NW_FBox_FormLiaison_t* formLiaison); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_INPUTELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_inputelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_inputelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_INPUTELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_INPUTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basicforms_inputelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_inputElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - - -extern -TBrowserStatusCode -_NW_XHTML_inputElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_INPUTELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_labelelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_labelelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_LABELELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_LABELELEMENTHANDLER_H - -#include "nw_text_coretextelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_labelElementHandler_Class_s NW_XHTML_labelElementHandler_Class_t; -typedef struct NW_XHTML_labelElementHandler_s NW_XHTML_labelElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_labelElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_labelElementHandler_ClassPart_t; - -struct NW_XHTML_labelElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_CoreTextElementHandler_ClassPart_t NW_XHTML_CoreTextElementHandler; - NW_XHTML_labelElementHandler_ClassPart_t NW_XHTML_labelElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_labelElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_labelElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_labelElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_labelElementHandler) - -#define NW_XHTML_labelElementHandlerOf(_object) \ - ((NW_XHTML_labelElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_labelElementHandler_Class_t NW_XHTML_labelElementHandler_Class; -extern const NW_XHTML_labelElementHandler_t NW_XHTML_labelElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_LABELELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_labelelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_labelelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_LABELELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_LABELELEMENTHANDLERI_H - -#include "nw_text_coretextelementhandleri.h" -#include "nw_basicforms_labelelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_LABELELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_optionelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_optionelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_optionElementHandler_Class_s NW_XHTML_optionElementHandler_Class_t; -typedef struct NW_XHTML_optionElementHandler_s NW_XHTML_optionElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_optionElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_optionElementHandler_ClassPart_t; - -struct NW_XHTML_optionElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_optionElementHandler_ClassPart_t NW_XHTML_optionElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_optionElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_optionElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_optionElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_optionElementHandler) - -#define NW_XHTML_optionElementHandlerOf(_object) \ - ((NW_XHTML_optionElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_optionElementHandler_Class_t NW_XHTML_optionElementHandler_Class; -extern const NW_XHTML_optionElementHandler_t NW_XHTML_optionElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_optionelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_optionelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basicforms_optionelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_optionElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_OPTIONELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_selectelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_selectelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_SELECTELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_SELECTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_selectElementHandler_Class_s NW_XHTML_selectElementHandler_Class_t; -typedef struct NW_XHTML_selectElementHandler_s NW_XHTML_selectElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_selectElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_selectElementHandler_ClassPart_t; - -struct NW_XHTML_selectElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_selectElementHandler_ClassPart_t NW_XHTML_selectElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_selectElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_selectElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_selectElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_selectElementHandler) - -#define NW_XHTML_selectElementHandlerOf(_object) \ - ((NW_XHTML_selectElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_selectElementHandler_Class_t NW_XHTML_selectElementHandler_Class; -extern const NW_XHTML_selectElementHandler_t NW_XHTML_selectElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_SELECTELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_selectelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_selectelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_SELECTELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_SELECTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basicforms_selectelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_selectElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -TBrowserStatusCode -_NW_XHTML_selectElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_SELECTELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_textareaelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_textareaelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_textareaElementHandler_Class_s NW_XHTML_textareaElementHandler_Class_t; -typedef struct NW_XHTML_textareaElementHandler_s NW_XHTML_textareaElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_textareaElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_textareaElementHandler_ClassPart_t; - -struct NW_XHTML_textareaElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_textareaElementHandler_ClassPart_t NW_XHTML_textareaElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_textareaElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_textareaElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_textareaElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_textareaElementHandler) - -#define NW_XHTML_textareaElementHandlerOf(_object) \ - ((NW_XHTML_textareaElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_textareaElementHandler_Class_t NW_XHTML_textareaElementHandler_Class; -extern const NW_XHTML_textareaElementHandler_t NW_XHTML_textareaElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_textareaelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_textareaelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basicforms_textareaelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_textareaElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -TBrowserStatusCode -_NW_XHTML_textareaElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_TEXTAREAELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolset.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolset.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLCONTROLSET_H -#define NW_XHTML_XHTMLCONTROLSET_H - -#include "nw_object_dynamic.h" -#include "nw_dom_node.h" -#include "nw_adt_dynamicvector.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ControlSet_Class_s NW_XHTML_ControlSet_Class_t; -typedef struct NW_XHTML_ControlSet_s NW_XHTML_ControlSet_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ControlSet_ClassPart_s { - void** unused; -} NW_XHTML_ControlSet_ClassPart_t; - -struct NW_XHTML_ControlSet_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_XHTML_ControlSet_ClassPart_t NW_XHTML_ControlSet; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ControlSet_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* valueVector; /* values of document controls */ - NW_ADT_DynamicVector_t* nodeVector; /* DOM nodes of document controls */ - NW_ADT_DynamicVector_t* boxVector; /* DOM nodes of document controls */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ControlSet_ClassPartOf(_object) \ - (((NW_XHTML_ControlSet_Class_t*) \ - NW_Object_ClassOf(_object))->NW_XHTML_ControlSet) - -#define NW_XHTML_ControlSetOf(_object) \ - ((NW_XHTML_ControlSet_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ControlSet_Class_t NW_XHTML_ControlSet_Class; - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_ControlSet_AddNode (NW_XHTML_ControlSet_t* controlSet, - NW_DOM_ElementNode_t* node, - NW_ADT_Vector_Metric_t* index); - -extern -TBrowserStatusCode -_NW_XHTML_ControlSet_SetValue (NW_XHTML_ControlSet_t* controlSet, - NW_DOM_ElementNode_t* node, - NW_Object_t* value); - -extern -NW_Object_t* -_NW_XHTML_ControlSet_GetValue (NW_XHTML_ControlSet_t* controlSet, - NW_DOM_ElementNode_t* node); - -extern -NW_DOM_ElementNode_t* -_NW_XHTML_ControlSet_GetControl (NW_XHTML_ControlSet_t* controlSet, - NW_ADT_Vector_Metric_t index); - -extern -NW_ADT_DynamicVector_t* -_NW_XHTML_ControlSet_GetValueVector (NW_XHTML_ControlSet_t* controlSet); - -/* ------------------------------------------------------------------------- * - public prototypes - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ControlSet_AddNode(_controlSet, _node, _index) \ - (_NW_XHTML_ControlSet_AddNode ( \ - NW_XHTML_ControlSetOf (_controlSet), (_node), (_index))) - -#define NW_XHTML_ControlSet_SetValue(_controlSet, _node, _value) \ - (_NW_XHTML_ControlSet_SetValue ( \ - NW_XHTML_ControlSetOf (_controlSet), (_node), (_value))) - -#define NW_XHTML_ControlSet_GetValue(_controlSet, _node) \ - (_NW_XHTML_ControlSet_GetValue ( \ - NW_XHTML_ControlSetOf (_controlSet), (_node))) - -#define NW_XHTML_ControlSet_GetControl(_controlSet, _index) \ - (_NW_XHTML_ControlSet_GetControl ( \ - NW_XHTML_ControlSetOf (_controlSet), (_index))) - -#define NW_XHTML_ControlSet_GetValueVector(_controlSet) \ - (_NW_XHTML_ControlSet_GetValueVector ( \ - NW_XHTML_ControlSetOf (_controlSet))) - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_XHTML_ControlSet_t* -NW_XHTML_ControlSet_New (NW_ADT_DynamicVector_t* valueVector); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_XHTML_XHTMControlSet_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolseti.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolseti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLCONTROLSETI_H -#define NW_XHTML_XHTMLCONTROLSETI_H - -#include "nw_object_dynamici.h" -#include "nw_basicforms_xhtmlcontrolset.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_ControlSet_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_XHTML_ControlSet_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_XHTML_XHTMLControlsetI_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlformliaison.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlformliaison.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLFORMLIAISON_H -#define NW_XHTML_XHTMLFORMLIAISON_H - -#include "BrsrStatusCodes.h" -#include "nw_fbox_formliaison.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "NW_FBox_Validator.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FormLiaison_Class_s NW_XHTML_FormLiaison_Class_t; -typedef struct NW_XHTML_FormLiaison_s NW_XHTML_FormLiaison_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FormLiaison_ClassPart_s { - void** unused; -} NW_XHTML_FormLiaison_ClassPart_t; - -struct NW_XHTML_FormLiaison_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_FBox_FormLiaison_ClassPart_t NW_FBox_FormLiaison; - NW_XHTML_FormLiaison_ClassPart_t NW_XHTML_FormLiaison; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_FormLiaison_s { - /* TODO: remove value list from class hierarchy */ - NW_FBox_FormLiaison_t super; - - /* member variables */ - NW_ADT_Map_t* validatorMap; - NW_DOM_ElementNode_t* formNode; - NW_ADT_Vector_Metric_t numControls; /* number of controls in this form */ - NW_ADT_Vector_Metric_t firstControl; /* index of the first control of form */ - NW_XHTML_ContentHandler_t* contentHandler; - NW_XHTML_ControlSet_t* controlSet; /* ptr to all controls in the document */ - NW_Text_t* formName; - NW_Text_t* formAction; - NW_Text_t* formMethod; - NW_Text_t* formEnctype; - NW_Text_t* formId; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_FormLiaison_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_XHTML_FormLiaison)) - -#define NW_XHTML_FormLiaisonOf(object) \ - (NW_Object_Cast (object, NW_XHTML_FormLiaison)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_FormLiaison_Class_t NW_XHTML_FormLiaison_Class; - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_RegisterValidator (NW_XHTML_FormLiaison_t* thisObj, - void* node, - NW_FBox_Validator_t* validator); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_AddBox (NW_FBox_FormLiaison_t* formLiaison, - NW_LMgr_Box_t* box, NW_DOM_ElementNode_t* elementNode); - - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_GetAction(NW_FBox_FormLiaison_t* formLiaison, - NW_Ucs2** formAction); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_SetAction (NW_XHTML_FormLiaison_t* formLiaison, - const NW_Ucs2* formAction); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_SetMethod (NW_XHTML_FormLiaison_t* formLiaison, - const NW_Ucs2* formMethod); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_SetFormName (NW_XHTML_FormLiaison_t* formLiaison, - const NW_Ucs2* formName); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_SetEnctype (NW_XHTML_FormLiaison_t* formLiaison, - const NW_Ucs2* formEnctype); -extern -NW_Object_t* -NW_XHTML_FormLiaison_GetInitialValue (NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node); - -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_Submit(NW_FBox_FormLiaison_t* thisObj, - void* node); -extern -TBrowserStatusCode -NW_XHTML_FormLiaison_Reset(NW_FBox_FormLiaison_t* thisObj, - void* node); - - - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -NW_XHTML_FormLiaison_t* -NW_XHTML_FormLiaison_New (NW_DOM_ElementNode_t* formNode, - NW_XHTML_ContentHandler_t* contentHandler, - NW_XHTML_ControlSet_t* controlSet); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_XHTMLFORMLIAISON_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlformliaisoni.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlformliaisoni.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLFORMLIAISONI_H -#define NW_XHTML_XHTMLFORMLIAISONI_H - -#include "nw_evt_ecmaevent.h" - -#include "nw_fbox_formliaisoni.h" -#include "nw_object_dynamici.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_XHTML_FormLiaison_Destruct (NW_Object_Dynamic_t* dynamicObject); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetWBXMLVersion(NW_FBox_FormLiaison_t* thisObj, - NW_Uint32* wmlVersion); -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_AddControl(NW_FBox_FormLiaison_t* thisObj, - void* node); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetInitialStringValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Text_Length_t maxChars); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetStringValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Text_t* value); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_ValidateStringValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - const NW_Text_t* value); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Text_t** valueOut, - NW_Bool* initialValueUsed); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringName(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Ucs2** nameOut); - -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringTitle(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Ucs2** titleOut); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetBoolValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Bool *value); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_ResetBoolValue( NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Bool *value ); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_ToggleBoolValue(NW_FBox_FormLiaison_t* thisObj, - void* node); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetBoolValue(NW_FBox_FormLiaison_t* thisObj, - void* node, - NW_Bool* valueOut); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_Reset(NW_FBox_FormLiaison_t* thisObj, - void* resetButtonNode); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_Submit(NW_FBox_FormLiaison_t* thisObj, - void* submitButtonNode); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_Focus( NW_FBox_FormLiaison_t* thisObj, - void* node ); - -extern -NW_Bool -_NW_XHTML_FormLiaison_IsOptionMultiple(NW_FBox_FormLiaison_t* thisObj, - void* controlId); - -extern -NW_Bool -_NW_XHTML_FormLiaison_IsOptionSelected(NW_FBox_FormLiaison_t* thisObj, - void* controlId); - -extern -NW_Bool -_NW_XHTML_FormLiaison_OptionHasOnPick(NW_FBox_FormLiaison_t* thisObj, - void* controlId); - -extern -NW_Bool -_NW_XHTML_FormLiaison_IsLocalNavOnPick(NW_FBox_FormLiaison_t* thisObj, - void* elemID); -extern -NW_Bool -_NW_XHTML_FormLiaison_GetInitialValue (NW_FBox_FormLiaison_t* formLiaison, - void* controlId); - -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetDocRoot(NW_FBox_FormLiaison_t *thisObj, - NW_HED_DocumentRoot_t **docRoot); -extern -TBrowserStatusCode -_NW_XHTML_FormLiaison_DelegateEcmaEvent(NW_FBox_FormLiaison_t *thisObj, - void* eventNode, - NW_ECMA_Evt_Type_t ecmaEvent); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_XHTMLFORMLIAISONI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_basictablesmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_basictablesmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_BASICTABLESMODULE_H -#define NW_XHTML_BASICTABLES_BASICTABLESMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BasicTablesModule_Class_s - NW_XHTML_BasicTablesModule_Class_t; -typedef struct NW_XHTML_BasicTablesModule_s NW_XHTML_BasicTablesModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_BasicTablesModule_ClassPart_s { - void** unused; -} NW_XHTML_BasicTablesModule_ClassPart_t; - -struct NW_XHTML_BasicTablesModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_BasicTablesModule_ClassPart_t NW_XHTML_BasicTablesModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_BasicTablesModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BasicTablesModule_GetClassPart(_object) \ - (((NW_XHTML_BasicTablesModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_BasicTablesModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_BasicTablesModule_Class_t NW_XHTML_BasicTablesModule_Class; -extern const NW_XHTML_BasicTablesModule_t NW_XHTML_BasicTablesModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_BasicTablesModuleOf(_object) \ - ((NW_XHTML_BasicTablesModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_BASICTABLESMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_basictablesmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_basictablesmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_BASICTABLESMODULEI_H -#define NW_XHTML_BASICTABLES_BASICTABLESMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_basictables_basictablesmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_BASICTABLESMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_captionelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_captionelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLER_H -#define NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_captionElementHandler_Class_s NW_XHTML_captionElementHandler_Class_t; -typedef struct NW_XHTML_captionElementHandler_s NW_XHTML_captionElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_captionElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_captionElementHandler_ClassPart_t; - -struct NW_XHTML_captionElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_captionElementHandler_ClassPart_t NW_XHTML_captionElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_captionElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_captionElementHandler_GetClassPart(_object) \ - (((NW_XHTML_captionElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_captionElementHandler) - -#define NW_XHTML_captionElementHandlerOf(_object) \ - ((NW_XHTML_captionElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_captionElementHandler_Class_t NW_XHTML_captionElementHandler_Class; -extern const NW_XHTML_captionElementHandler_t NW_XHTML_captionElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_captionelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_captionelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLERI_H -#define NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basictables_captionelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_captionElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_CAPTIONELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_cellelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_cellelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_CELLELEMENTHANDLER_H -#define NW_XHTML_BASICTABLES_CELLELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_cellElementHandler_Class_s NW_XHTML_cellElementHandler_Class_t; -typedef struct NW_XHTML_cellElementHandler_s NW_XHTML_cellElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_cellElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_cellElementHandler_ClassPart_t; - -struct NW_XHTML_cellElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_cellElementHandler_ClassPart_t NW_XHTML_cellElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_cellElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_cellElementHandler_GetClassPart(_object) \ - (((NW_XHTML_cellElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_cellElementHandler) - -#define NW_XHTML_cellElementHandlerOf(_object) \ - ((NW_XHTML_cellElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_cellElementHandler_Class_t NW_XHTML_cellElementHandler_Class; -extern const NW_XHTML_cellElementHandler_t NW_XHTML_cellElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_CELLELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_cellelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_cellelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_CELLELEMENTHANDLERI_H -#define NW_XHTML_BASICTABLES_CELLELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basictables_cellelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_cellElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_CELLELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_rowgroupelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_rowgroupelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLER_H -#define NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_rowgroupElementHandler_Class_s NW_XHTML_rowgroupElementHandler_Class_t; -typedef struct NW_XHTML_rowgroupElementHandler_s NW_XHTML_rowgroupElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_rowgroupElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_rowgroupElementHandler_ClassPart_t; - -struct NW_XHTML_rowgroupElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_rowgroupElementHandler_ClassPart_t NW_XHTML_rowgroupElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_rowgroupElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_rowgroupElementHandler_GetClassPart(_object) \ - (((NW_XHTML_rowgroupElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_rowgroupElementHandler) - -#define NW_XHTML_rowgroupElementHandlerOf(_object) \ - ((NW_XHTML_rowgroupElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_rowgroupElementHandler_Class_t NW_XHTML_rowgroupElementHandler_Class; -extern const NW_XHTML_rowgroupElementHandler_t NW_XHTML_rowgroupElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_rowgroupelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_rowgroupelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLERI_H -#define NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basictables_rowgroupelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_rowgroupElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_ROWGROUPELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_tableelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_tableelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_tableelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_tableelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_trelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_trelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_TRELEMENTHANDLER_H -#define NW_XHTML_BASICTABLES_TRELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_trElementHandler_Class_s NW_XHTML_trElementHandler_Class_t; -typedef struct NW_XHTML_trElementHandler_s NW_XHTML_trElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_trElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_trElementHandler_ClassPart_t; - -struct NW_XHTML_trElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_trElementHandler_ClassPart_t NW_XHTML_trElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_trElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_trElementHandler_GetClassPart(_object) \ - (((NW_XHTML_trElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_trElementHandler) - -#define NW_XHTML_trElementHandlerOf(_object) \ - ((NW_XHTML_trElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_trElementHandler_Class_t NW_XHTML_trElementHandler_Class; -extern const NW_XHTML_trElementHandler_t NW_XHTML_trElementHandler; - - -// global function -TBrowserStatusCode -NW_XHTML_trElement_CreateBoxTree(NW_XHTML_ContentHandler_t* contentHandler, - const NW_XHTML_ElementHandler_t* elementHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* trBox, - NW_LMgr_ContainerBox_t* tableContainerParent); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_TRELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_basictables_trelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_basictables_trelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICTABLES_TRELEMENTHANDLERI_H -#define NW_XHTML_BASICTABLES_TRELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_basictables_trelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_trElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICTABLES_TRELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_frameelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_frameelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMEELEMENTHANDLER_H -#define NW_XHTML_FRAME_FRAMEELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_frameElementHandler_Class_s NW_XHTML_frameElementHandler_Class_t; -typedef struct NW_XHTML_frameElementHandler_s NW_XHTML_frameElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_frameElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_frameElementHandler_ClassPart_t; - -struct NW_XHTML_frameElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_frameElementHandler_ClassPart_t NW_XHTML_frameElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_frameElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_frameElementHandler_GetClassPart(_object) \ - (((NW_XHTML_frameElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_frameElementHandler) - -#define NW_XHTML_frameElementHandlerOf(_object) \ - ((NW_XHTML_frameElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_frameElementHandler_Class_t NW_XHTML_frameElementHandler_Class; -extern const NW_XHTML_frameElementHandler_t NW_XHTML_frameElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMEELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_frameelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_frameelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMEHANDLERI_H -#define NW_XHTML_FRAME_FRAMEHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_frame_frameelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_frameElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -NW_Uint8 -_NW_XHTML_frameElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMEHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_framemodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_framemodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMEMODULE_H -#define NW_XHTML_FRAME_FRAMEMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FrameModule_Class_s - NW_XHTML_FrameModule_Class_t; -typedef struct NW_XHTML_FrameModule_s NW_XHTML_FrameModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FrameModule_ClassPart_s { - void** unused; -} NW_XHTML_FrameModule_ClassPart_t; - -struct NW_XHTML_FrameModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_FrameModule_ClassPart_t NW_XHTML_FrameModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_FrameModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_FrameModule_GetClassPart(_object) \ - (((NW_XHTML_FrameModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_FrameModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_FrameModule_Class_t NW_XHTML_FrameModule_Class; -extern const NW_XHTML_FrameModule_t NW_XHTML_FrameModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_FrameModuleOf(_object) \ - ((NW_XHTML_FrameModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMEMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_framemodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_framemodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMEMODULEI_H -#define NW_XHTML_FRAME_FRAMEMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_frame_framemodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMEMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_framesetelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_framesetelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMESETELEMENTHANDLER_H -#define NW_XHTML_FRAME_FRAMESETELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FramesetElementHandler_Class_s NW_XHTML_FramesetElementHandler_Class_t; -typedef struct NW_XHTML_FramesetElementHandler_s NW_XHTML_FramesetElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_FramesetElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_FramesetElementHandler_ClassPart_t; - -struct NW_XHTML_FramesetElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_FramesetElementHandler_ClassPart_t NW_XHTML_FramesetElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_FramesetElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_FramesetElementHandler_GetClassPart(_object) \ - (((NW_XHTML_FramesetElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_FramesetElementHandler) - -#define NW_XHTML_FramesetElementHandlerOf(_object) \ - ((NW_XHTML_FramesetElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_FramesetElementHandler_Class_t NW_XHTML_FramesetElementHandler_Class; -extern const NW_XHTML_FramesetElementHandler_t NW_XHTML_FramesetElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMESETELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_frame_framesetelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_frame_framesetelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_FRAME_FRAMESETELEMENTHANDLERI_H -#define NW_XHTML_FRAME_FRAMESETELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_frame_framesetelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_FramesetElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_FRAME_FRAMESETELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_hypertext_aelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_hypertext_aelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_HYPERTEXT_AELEMENTHANDLER_H -#define NW_XHTML_HYPERTEXT_AELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_aElementHandler_Class_s NW_XHTML_aElementHandler_Class_t; -typedef struct NW_XHTML_aElementHandler_s NW_XHTML_aElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_aElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_aElementHandler_ClassPart_t; - -struct NW_XHTML_aElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_aElementHandler_ClassPart_t NW_XHTML_aElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_aElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_aElementHandler_GetClassPart(_object) \ - (((NW_XHTML_aElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_aElementHandler) - -#define NW_XHTML_aElementHandlerOf(_object) \ - ((NW_XHTML_aElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_aElementHandler_Class_t NW_XHTML_aElementHandler_Class; -extern const NW_XHTML_aElementHandler_t NW_XHTML_aElementHandler; - - /* - Get the URL in base tag defined in header, this value can be used to combine with - relative URL to figure out the absolute URL. -*/ - -TBrowserStatusCode -NW_XHTML_aElementHandler_getBaseTagUrl (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** hrefVal); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_HYPERTEXT_AELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_hypertext_aelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_hypertext_aelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_HYPERTEXT_AELEMENTHANDLERI_H -#define NW_XHTML_HYPERTEXT_AELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_hypertext_aelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_aElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_aElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -NW_Uint8 -_NW_XHTML_aElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_HYPERTEXT_AELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_hypertext_hypertextmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_hypertext_hypertextmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_HYPERTEXT_HYPERTEXTMODULE_H -#define NW_XHTML_HYPERTEXT_HYPERTEXTMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_HypertextModule_Class_s - NW_XHTML_HypertextModule_Class_t; -typedef struct NW_XHTML_HypertextModule_s NW_XHTML_HypertextModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_HypertextModule_ClassPart_s { - void** unused; -} NW_XHTML_HypertextModule_ClassPart_t; - -struct NW_XHTML_HypertextModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_HypertextModule_ClassPart_t NW_XHTML_HypertextModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_HypertextModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_HypertextModule_GetClassPart(_object) \ - (((NW_XHTML_HypertextModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_HypertextModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_HypertextModule_Class_t NW_XHTML_HypertextModule_Class; -extern const NW_XHTML_HypertextModule_t NW_XHTML_HypertextModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_HypertextModuleOf(_object) \ - ((NW_XHTML_HypertextModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_HYPERTEXT_HYPERTEXTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_hypertext_hypertextmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_hypertext_hypertextmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_HYPERTEXT_HYPERTEXTMODULEI_H -#define NW_XHTML_HYPERTEXT_HYPERTEXTMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_hypertext_hypertextmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_HYPERTEXT_HYPERTEXTMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_ignore_ignoreelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_ignore_ignoreelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IGNORE_IGNOREELEMENTHANDLER_H -#define NW_XHTML_IGNORE_IGNOREELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_IgnoreElementHandler_Class_s NW_XHTML_IgnoreElementHandler_Class_t; -typedef struct NW_XHTML_IgnoreElementHandler_s NW_XHTML_IgnoreElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_IgnoreElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_IgnoreElementHandler_ClassPart_t; - -struct NW_XHTML_IgnoreElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_IgnoreElementHandler_ClassPart_t NW_XHTML_IgnoreElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_IgnoreElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_IgnoreElementHandler_GetClassPart(_object) \ - (((NW_XHTML_IgnoreElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_IgnoreElementHandler) - -#define NW_XHTML_IgnoreElementHandlerOf(_object) \ - ((NW_XHTML_IgnoreElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_IgnoreElementHandler_Class_t NW_XHTML_IgnoreElementHandler_Class; -extern const NW_XHTML_IgnoreElementHandler_t NW_XHTML_IgnoreElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IGNORE_IGNOREELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_ignore_ignoreelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_ignore_ignoreelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IGNORE_IGNOREELEMENTHANDLERI_H -#define NW_XHTML_IGNORE_IGNOREELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_ignore_ignoreelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_IgnoreElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IGNORE_IGNOREELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_areaelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_areaelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_AREAELEMENTHANDLER_H -#define NW_XHTML_IMAGE_AREAELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_areaElementHandler_Class_s NW_XHTML_areaElementHandler_Class_t; -typedef struct NW_XHTML_areaElementHandler_s NW_XHTML_areaElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_areaElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_areaElementHandler_ClassPart_t; - -struct NW_XHTML_areaElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_areaElementHandler_ClassPart_t NW_XHTML_areaElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_areaElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_areaElementHandler_GetClassPart(_object) \ - (((NW_XHTML_areaElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_areaElementHandler) - -#define NW_XHTML_areaElementHandlerOf(_object) \ - ((NW_XHTML_areaElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_areaElementHandler_Class_t NW_XHTML_areaElementHandler_Class; -extern const NW_XHTML_areaElementHandler_t NW_XHTML_areaElementHandler; - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_AREAELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_areaelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_areaelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_AREAELEMENTHANDLERI_H -#define NW_XHTML_IMAGE_AREAELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_image_areaelementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -NW_Uint8 -_NW_XHTML_areaElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_AREAELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_imagemodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_imagemodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_IMAGEMODULE_H -#define NW_XHTML_IMAGE_IMAGEMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct NW_XHTML_ElementHandler_s NW_XHTML_ElementHandler_t; - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ImageModule_Class_s - NW_XHTML_ImageModule_Class_t; -typedef struct NW_XHTML_ImageModule_s NW_XHTML_ImageModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ImageModule_ClassPart_s { - void** unused; -} NW_XHTML_ImageModule_ClassPart_t; - -struct NW_XHTML_ImageModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_ImageModule_ClassPart_t NW_XHTML_ImageModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ImageModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ImageModule_GetClassPart(_object) \ - (((NW_XHTML_ImageModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ImageModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ImageModule_Class_t NW_XHTML_ImageModule_Class; -extern const NW_XHTML_ImageModule_t NW_XHTML_ImageModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ImageModuleOf(_object) \ - ((NW_XHTML_ImageModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -NW_Bool NW_XHTML_ImageModule_IsImageElementHandler(const NW_XHTML_ElementHandler_t* elementHandler); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_IMAGEMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_imagemodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_imagemodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_IMAGEMODULEI_H -#define NW_XHTML_IMAGE_IMAGEMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_image_imagemodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_IMAGEMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_imgelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_imgelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_IMGELEMENTHANDLER_H -#define NW_XHTML_IMAGE_IMGELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" -#include "nw_lmgr_box.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_imgElementHandler_Class_s NW_XHTML_imgElementHandler_Class_t; -typedef struct NW_XHTML_imgElementHandler_s NW_XHTML_imgElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_imgElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_imgElementHandler_ClassPart_t; - -struct NW_XHTML_imgElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_imgElementHandler_ClassPart_t NW_XHTML_imgElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_imgElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_imgElementHandler_GetClassPart(_object) \ - (((NW_XHTML_imgElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_imgElementHandler) - -#define NW_XHTML_imgElementHandlerOf(_object) \ - ((NW_XHTML_imgElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_imgElementHandler_Class_t NW_XHTML_imgElementHandler_Class; -extern const NW_XHTML_imgElementHandler_t NW_XHTML_imgElementHandler; - - -TBrowserStatusCode -NW_XHTML_imgElementHandler_CreateAreaList(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box ); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_IMGELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_imgelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_imgelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_IMAGE_IMGELEMENTHANDLERI_H -#define NW_XHTML_IMAGE_IMGELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_image_imgelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_imgElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_imgElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -extern -NW_Uint8 -_NW_XHTML_imgElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_IMGELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_mapelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_mapelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Object for containing map element handler specific methods. -* -*/ - - -#ifndef NW_XHTML_IMAGE_MAPELEMENTHANDLER_H -#define NW_XHTML_IMAGE_MAPELEMENTHANDLER_H - -// INCLUDES -#include "nw_xhtml_elementhandler.h" -#include "nw_xhtml_elementhandleri.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -// FORWARD DECLARATIONS -typedef struct NW_XHTML_mapElementHandler_Class_s NW_XHTML_mapElementHandler_Class_t; -typedef struct NW_XHTML_mapElementHandler_s NW_XHTML_mapElementHandler_t; - -// CLASS DECLARATION -typedef struct NW_XHTML_mapElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_mapElementHandler_ClassPart_t; - -struct NW_XHTML_mapElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_mapElementHandler_ClassPart_t NW_XHTML_mapElementHandler; -}; - -// OBJECT DEFINITION -struct NW_XHTML_mapElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -// CONVENIENCE MACROS -#define NW_XHTML_mapElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_mapElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_mapElementHandler) - -#define NW_XHTML_mapElementHandlerOf(_object) \ - ((NW_XHTML_mapElementHandler_t*) (_object)) - -// GLOBAL STATIC DATA -extern const NW_XHTML_mapElementHandler_Class_t NW_XHTML_mapElementHandler_Class; -extern const NW_XHTML_mapElementHandler_t NW_XHTML_mapElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif // NW_XHTML_IMAGE_MAPELEMENTHANDLER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_image_mapelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_image_mapelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Object for containing map element handler specific methods. -* -*/ - - -#ifndef NW_XHTML_IMAGE_MAPELEMENTHANDLERI_H -#define NW_XHTML_IMAGE_MAPELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_image_mapelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_mapElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_mapElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_IMAGE_MAPELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_link_linkelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_link_linkelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LINK_LINKELEMENTHANDLER_H -#define NW_XHTML_LINK_LINKELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_linkElementHandler_Class_s NW_XHTML_linkElementHandler_Class_t; -typedef struct NW_XHTML_linkElementHandler_s NW_XHTML_linkElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_linkElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_linkElementHandler_ClassPart_t; - -struct NW_XHTML_linkElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_linkElementHandler_ClassPart_t NW_XHTML_linkElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_linkElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_linkElementHandler_GetClassPart(_object) \ - (((NW_XHTML_linkElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_linkElementHandler) - -#define NW_XHTML_linkElementHandlerOf(_object) \ - ((NW_XHTML_linkElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_linkElementHandler_Class_t NW_XHTML_linkElementHandler_Class; -extern const NW_XHTML_linkElementHandler_t NW_XHTML_linkElementHandler; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LINK_LINKELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_link_linkelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_link_linkelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LINK_LINKELEMENTHANDLERI_H -#define NW_XHTML_LINK_LINKELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_link_linkelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_linkElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LINK_LINKELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_link_linkmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_link_linkmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LINK_LINKMODULE_H -#define NW_XHTML_LINK_LINKMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_LinkModule_Class_s - NW_XHTML_LinkModule_Class_t; -typedef struct NW_XHTML_LinkModule_s NW_XHTML_LinkModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_LinkModule_ClassPart_s { - void** unused; -} NW_XHTML_LinkModule_ClassPart_t; - -struct NW_XHTML_LinkModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_LinkModule_ClassPart_t NW_XHTML_LinkModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_LinkModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_LinkModule_GetClassPart(_object) \ - (((NW_XHTML_LinkModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_LinkModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_LinkModule_Class_t NW_XHTML_LinkModule_Class; -extern const NW_XHTML_LinkModule_t NW_XHTML_LinkModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_LinkModuleOf(_object) \ - ((NW_XHTML_LinkModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LINK_LINKMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_link_linkmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_link_linkmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LINK_LINKMODULEI_H -#define NW_XHTML_LINK_LINKMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_link_linkmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LINK_LINKMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTELEMENTHANDLER_H -#define NW_XHTML_LIST_LISTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListElementHandler_Class_s NW_XHTML_ListElementHandler_Class_t; -typedef struct NW_XHTML_ListElementHandler_s NW_XHTML_ListElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_ListElementHandler_ClassPart_t; - -struct NW_XHTML_ListElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_ListElementHandler_ClassPart_t NW_XHTML_ListElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ListElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ListElementHandler_GetClassPart(_object) \ - (((NW_XHTML_ListElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ListElementHandler) - -#define NW_XHTML_ListElementHandlerOf(_object) \ - ((NW_XHTML_ListElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ListElementHandler_Class_t NW_XHTML_ListElementHandler_Class; -extern const NW_XHTML_ListElementHandler_t NW_XHTML_ListElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTELEMENTHANDLERI_H -#define NW_XHTML_LIST_LISTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_list_listelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_ListElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listitemelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listitemelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTITEMELEMENTHANDLER_H -#define NW_XHTML_LIST_LISTITEMELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListitemElementHandler_Class_s NW_XHTML_ListitemElementHandler_Class_t; -typedef struct NW_XHTML_ListitemElementHandler_s NW_XHTML_ListitemElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListitemElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_ListitemElementHandler_ClassPart_t; - -struct NW_XHTML_ListitemElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_ListitemElementHandler_ClassPart_t NW_XHTML_ListitemElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ListitemElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ListitemElementHandler_GetClassPart(_object) \ - (((NW_XHTML_ListitemElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ListitemElementHandler) - -#define NW_XHTML_ListitemElementHandlerOf(_object) \ - ((NW_XHTML_ListitemElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ListitemElementHandler_Class_t NW_XHTML_ListitemElementHandler_Class; -extern const NW_XHTML_ListitemElementHandler_t NW_XHTML_ListitemElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTITEMELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listitemelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listitemelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTITEMELEMENTHANDLERI_H -#define NW_XHTML_LIST_LISTITEMELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_list_listitemelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_ListitemElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTITEMELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTMODULE_H -#define NW_XHTML_LIST_LISTMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListModule_Class_s - NW_XHTML_ListModule_Class_t; -typedef struct NW_XHTML_ListModule_s NW_XHTML_ListModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ListModule_ClassPart_s { - void** unused; -} NW_XHTML_ListModule_ClassPart_t; - -struct NW_XHTML_ListModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_ListModule_ClassPart_t NW_XHTML_ListModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ListModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ListModule_GetClassPart(_object) \ - (((NW_XHTML_ListModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ListModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ListModule_Class_t NW_XHTML_ListModule_Class; -extern NW_XHTML_ListModule_t NW_XHTML_ListModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ListModuleOf(_object) \ - ((NW_XHTML_ListModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_list_listmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_list_listmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_LIST_LISTMODULEI_H -#define NW_XHTML_LIST_LISTMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_list_listmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_LIST_LISTMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_metainformation_metaelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_metainformation_metaelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_METAINFORMATION_METAELEMENTHANDLER_H -#define NW_XHTML_METAINFORMATION_METAELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_metaElementHandler_Class_s NW_XHTML_metaElementHandler_Class_t; -typedef struct NW_XHTML_metaElementHandler_s NW_XHTML_metaElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_metaElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_metaElementHandler_ClassPart_t; - -struct NW_XHTML_metaElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_metaElementHandler_ClassPart_t NW_XHTML_metaElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_metaElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_metaElementHandler_GetClassPart(_object) \ - (((NW_XHTML_metaElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_metaElementHandler) - -#define NW_XHTML_metaElementHandlerOf(_object) \ - ((NW_XHTML_metaElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_metaElementHandler_Class_t NW_XHTML_metaElementHandler_Class; -extern const NW_XHTML_metaElementHandler_t NW_XHTML_metaElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_METAINFORMATION_METAELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_metainformation_metaelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_metainformation_metaelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_METAINFORMATION_METAELEMENTHANDLERI_H -#define NW_XHTML_METAINFORMATION_METAELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_metainformation_metaelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_metaElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_metaElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); -extern -NW_Uint8 -_NW_XHTML_metaElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_METAINFORMATION_METAELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_metainformation_metainformationmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_metainformation_metainformationmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_METAINFORMATION_METAINFORMATIONMODULE_H -#define NW_XHTML_METAINFORMATION_METAINFORMATIONMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_MetaInformationModule_Class_s - NW_XHTML_MetaInformationModule_Class_t; -typedef struct NW_XHTML_MetaInformationModule_s NW_XHTML_MetaInformationModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_MetaInformationModule_ClassPart_s { - void** unused; -} NW_XHTML_MetaInformationModule_ClassPart_t; - -struct NW_XHTML_MetaInformationModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_MetaInformationModule_ClassPart_t NW_XHTML_MetaInformationModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_MetaInformationModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_MetaInformationModule_GetClassPart(_object) \ - (((NW_XHTML_MetaInformationModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_MetaInformationModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_MetaInformationModule_Class_t NW_XHTML_MetaInformationModule_Class; -extern const NW_XHTML_MetaInformationModule_t NW_XHTML_MetaInformationModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_MetaInformationModuleOf(_object) \ - ((NW_XHTML_MetaInformationModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_METAINFORMATION_METAINFORMATIONMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_metainformation_metainformationmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_metainformation_metainformationmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_METAINFORMATION_METAINFORMATIONMODULEI_H -#define NW_XHTML_METAINFORMATION_METAINFORMATIONMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_metainformation_metainformationmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_METAINFORMATION_METAINFORMATIONMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_object_objectmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_object_objectmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_OBJECT_OBJECTMODULE_H -#define NW_XHTML_OBJECT_OBJECTMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ObjectModule_Class_s NW_XHTML_ObjectModule_Class_t; -typedef struct NW_XHTML_ObjectModule_s NW_XHTML_ObjectModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ObjectModule_ClassPart_s { - void** unused; -} NW_XHTML_ObjectModule_ClassPart_t; - -struct NW_XHTML_ObjectModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_ObjectModule_ClassPart_t NW_XHTML_ObjectModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ObjectModule_s { - NW_Object_Core_t super; //? -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ObjectModule_GetClassPart(_object) \ - (((NW_XHTML_ObjectModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_ObjectModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ObjectModule_Class_t NW_XHTML_ObjectModule_Class; -extern const NW_XHTML_ObjectModule_t NW_XHTML_ObjectModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ObjectModuleOf(_object) \ - ((NW_XHTML_ObjectModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_OBJECT_OBJECTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_object_objectmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_object_objectmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_OBJECT_OBJECTMODULEI_H -#define NW_XHTML_OBJECT_OBJECTMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_object_objectmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_OBJECT_OBJECTMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_headelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_headelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_HEADELEMENTHANDLER_H -#define NW_XHTML_STRUCTURE_HEADELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_headElementHandler_Class_s NW_XHTML_headElementHandler_Class_t; -typedef struct NW_XHTML_headElementHandler_s NW_XHTML_headElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_headElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_headElementHandler_ClassPart_t; - -struct NW_XHTML_headElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_headElementHandler_ClassPart_t NW_XHTML_headElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_headElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_headElementHandler_GetClassPart(_object) \ - (((NW_XHTML_headElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_headElementHandler) - -#define NW_XHTML_headElementHandlerOf(_object) \ - ((NW_XHTML_headElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_headElementHandler_Class_t NW_XHTML_headElementHandler_Class; -extern const NW_XHTML_headElementHandler_t NW_XHTML_headElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_HEADELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_headelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_headelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_HEADELEMENTHANDLERI_H -#define NW_XHTML_STRUCTURE_HEADELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_structure_headelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_headElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_HEADELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_noscriptelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_noscriptelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_noscriptELEMENTHANDLER_H -#define NW_XHTML_BASICFORMS_noscriptELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_noscriptElementHandler_Class_s NW_XHTML_noscriptElementHandler_Class_t; -typedef struct NW_XHTML_noscriptElementHandler_s NW_XHTML_noscriptElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_noscriptElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_noscriptElementHandler_ClassPart_t; - -struct NW_XHTML_noscriptElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_noscriptElementHandler_ClassPart_t NW_XHTML_noscriptElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_noscriptElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_noscriptElementHandler_ClassPartOf(_object) \ - (((NW_XHTML_noscriptElementHandler_Class_t*) NW_Object_ClassOf(_object))->\ - NW_XHTML_noscriptElementHandler) - -#define NW_XHTML_noscriptElementHandlerOf(_object) \ - ((NW_XHTML_noscriptElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_noscriptElementHandler_Class_t NW_XHTML_noscriptElementHandler_Class; -extern const NW_XHTML_noscriptElementHandler_t NW_XHTML_noscriptElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_noscriptELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_noscriptelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_noscriptelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_BASICFORMS_noscriptELEMENTHANDLERI_H -#define NW_XHTML_BASICFORMS_noscriptELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_structure_noscriptelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_noscriptElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_BASICFORMS_noscriptELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_scriptelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_scriptelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_SCRIPTELEMENTHANDLER_H -#define NW_XHTML_STRUCTURE_SCRIPTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_scriptElementHandler_Class_s NW_XHTML_scriptElementHandler_Class_t; -typedef struct NW_XHTML_scriptElementHandler_s NW_XHTML_scriptElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_scriptElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_scriptElementHandler_ClassPart_t; - -struct NW_XHTML_scriptElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_scriptElementHandler_ClassPart_t NW_XHTML_scriptElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_scriptElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_scriptElementHandler_GetClassPart(_object) \ - (((NW_XHTML_scriptElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_scriptElementHandler) - -#define NW_XHTML_scriptElementHandlerOf(_object) \ - ((NW_XHTML_scriptElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_scriptElementHandler_Class_t NW_XHTML_scriptElementHandler_Class; -extern const NW_XHTML_scriptElementHandler_t NW_XHTML_scriptElementHandler; - - -TBrowserStatusCode -NW_XHTML_scriptElementHandler_ExecuteScript(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox,NW_Bool* aBoxTreeUpdated); -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_TITLEELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_scriptelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_scriptelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_SCRIPTELEMENTHANDLERI_H -#define NW_XHTML_STRUCTURE_SCRIPTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_structure_scriptelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_scriptElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_scriptElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_TITLEELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_structuremodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_structuremodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_STRUCTUREMODULE_H -#define NW_XHTML_STRUCTURE_STRUCTUREMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_StructureModule_Class_s - NW_XHTML_StructureModule_Class_t; -typedef struct NW_XHTML_StructureModule_s NW_XHTML_StructureModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_StructureModule_ClassPart_s { - void** unused; -} NW_XHTML_StructureModule_ClassPart_t; - -struct NW_XHTML_StructureModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_StructureModule_ClassPart_t NW_XHTML_StructureModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_StructureModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_StructureModule_GetClassPart(_object) \ - (((NW_XHTML_StructureModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_StructureModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_StructureModule_Class_t NW_XHTML_StructureModule_Class; -extern const NW_XHTML_StructureModule_t NW_XHTML_StructureModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_StructureModuleOf(_object) \ - ((NW_XHTML_StructureModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_STRUCTUREMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_structuremodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_structuremodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_STRUCTUREMODULEI_H -#define NW_XHTML_STRUCTURE_STRUCTUREMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_structure_structuremodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_STRUCTUREMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_titleelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_titleelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_TITLEELEMENTHANDLER_H -#define NW_XHTML_STRUCTURE_TITLEELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_titleElementHandler_Class_s NW_XHTML_titleElementHandler_Class_t; -typedef struct NW_XHTML_titleElementHandler_s NW_XHTML_titleElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_titleElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_titleElementHandler_ClassPart_t; - -struct NW_XHTML_titleElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_titleElementHandler_ClassPart_t NW_XHTML_titleElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_titleElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_titleElementHandler_GetClassPart(_object) \ - (((NW_XHTML_titleElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_titleElementHandler) - -#define NW_XHTML_titleElementHandlerOf(_object) \ - ((NW_XHTML_titleElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_titleElementHandler_Class_t NW_XHTML_titleElementHandler_Class; -extern const NW_XHTML_titleElementHandler_t NW_XHTML_titleElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_TITLEELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_structure_titleelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_structure_titleelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STRUCTURE_TITLEELEMENTHANDLERI_H -#define NW_XHTML_STRUCTURE_TITLEELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_structure_titleelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_titleElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_titleElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STRUCTURE_TITLEELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_style_styleelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_style_styleelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STYLEELEMENTHANDLER_H -#define NW_XHTML_STYLEELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_styleElementHandler_Class_s NW_XHTML_styleElementHandler_Class_t; -typedef struct NW_XHTML_styleElementHandler_s NW_XHTML_styleElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_styleElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_styleElementHandler_ClassPart_t; - -struct NW_XHTML_styleElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_styleElementHandler_ClassPart_t NW_XHTML_styleElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_styleElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_styleElementHandler_GetClassPart(_object) \ - (((NW_XHTML_styleElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_styleElementHandler) - -#define NW_XHTML_styleElementHandlerOf(_object) \ - ((NW_XHTML_styleElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_styleElementHandler_Class_t NW_XHTML_styleElementHandler_Class; -extern const NW_XHTML_styleElementHandler_t NW_XHTML_styleElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_Tempest_XHTML_styleElementHandler_h */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_style_styleelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_style_styleelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STYLEELEMENTHANDLERI_H -#define NW_XHTML_STYLEELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_style_styleelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_styleElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_styleElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STYLEELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_style_stylemodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_style_stylemodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STYLE_STYLEMODULE_H -#define NW_XHTML_STYLE_STYLEMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_StyleModule_Class_s - NW_XHTML_StyleModule_Class_t; -typedef struct NW_XHTML_StyleModule_s NW_XHTML_StyleModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_StyleModule_ClassPart_s { - void** unused; -} NW_XHTML_StyleModule_ClassPart_t; - -struct NW_XHTML_StyleModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_StyleModule_ClassPart_t NW_XHTML_StyleModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_StyleModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_StyleModule_GetClassPart(_object) \ - (((NW_XHTML_StyleModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_StyleModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_StyleModule_Class_t NW_XHTML_StyleModule_Class; -extern const NW_XHTML_StyleModule_t NW_XHTML_StyleModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_StyleModuleOf(_object) \ - ((NW_XHTML_StyleModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STYLE_STYLEMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_style_stylemodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_style_stylemodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_STYLE_STYLEMODULEI_H -#define NW_XHTML_STYLE_STYLEMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_style_stylemodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_STYLE_STYLEMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_brelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_brelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_BRELEMENTHANDLER_H -#define NW_XHTML_TEXT_BRELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_brElementHandler_Class_s NW_XHTML_brElementHandler_Class_t; -typedef struct NW_XHTML_brElementHandler_s NW_XHTML_brElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_brElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_brElementHandler_ClassPart_t; - -struct NW_XHTML_brElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_brElementHandler_ClassPart_t NW_XHTML_brElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_brElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_brElementHandler_GetClassPart(_object) \ - (((NW_XHTML_brElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_brElementHandler) - -#define NW_XHTML_brElementHandlerOf(_object) \ - ((NW_XHTML_brElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_brElementHandler_Class_t NW_XHTML_brElementHandler_Class; -extern const NW_XHTML_brElementHandler_t NW_XHTML_brElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_BRELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_brelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_brelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_BRELEMENTHANDLERI_H -#define NW_XHTML_TEXT_BRELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_text_brelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_brElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_BRELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_coretextelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_coretextelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_CORETEXTELEMENTHANDLER_H -#define NW_XHTML_TEXT_CORETEXTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_CoreTextElementHandler_Class_s NW_XHTML_CoreTextElementHandler_Class_t; -typedef struct NW_XHTML_CoreTextElementHandler_s NW_XHTML_CoreTextElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_CoreTextElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_CoreTextElementHandler_ClassPart_t; - -struct NW_XHTML_CoreTextElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_CoreTextElementHandler_ClassPart_t NW_XHTML_CoreTextElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_CoreTextElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_CoreTextElementHandler_GetClassPart(_object) \ - (((NW_XHTML_CoreTextElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_CoreTextElementHandler) - -#define NW_XHTML_CoreTextElementHandlerOf(_object) \ - ((NW_XHTML_CoreTextElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_CoreTextElementHandler_Class_t NW_XHTML_CoreTextElementHandler_Class; -extern const NW_XHTML_CoreTextElementHandler_t NW_XHTML_CoreTextElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_CORETEXTELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_coretextelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_coretextelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_CORETEXTELEMENTHANDLERI_H -#define NW_XHTML_TEXT_CORETEXTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_text_coretextelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_CoreTextElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_CORETEXTELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_hrelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_hrelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_HRELEMENTHANDLER_H -#define NW_XHTML_TEXT_HRELEMENTHANDLER_H - -#include "nw_lmgr_rulebox.h" -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_hrElementHandler_Class_s NW_XHTML_hrElementHandler_Class_t; -typedef struct NW_XHTML_hrElementHandler_s NW_XHTML_hrElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_hrElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_hrElementHandler_ClassPart_t; - -struct NW_XHTML_hrElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_hrElementHandler_ClassPart_t NW_XHTML_hrElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_hrElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_hrElementHandler_GetClassPart(_object) \ - (((NW_XHTML_hrElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_hrElementHandler) - -#define NW_XHTML_hrElementHandlerOf(_object) \ - ((NW_XHTML_hrElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_hrElementHandler_Class_t NW_XHTML_hrElementHandler_Class; -extern const NW_XHTML_hrElementHandler_t NW_XHTML_hrElementHandler; - -/* ------------------------------------------------------------------------- * - constants - * ------------------------------------------------------------------------- */ -#define NW_XHTML_HR_ALIGN_LEFT NW_LMGR_RULEBOX_ALIGN_LEFT -#define NW_XHTML_HR_ALIGN_CENTER NW_LMGR_RULEBOX_ALIGN_CENTER -#define NW_XHTML_HR_ALIGN_RIGHT NW_LMGR_RULEBOX_ALIGN_RIGHT - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_HRELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_hrelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_hrelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_HRELEMENTHANDLERI_H -#define NW_XHTML_TEXT_HRELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_text_hrelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_hrElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_HRELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_qelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_qelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_QELEMENTHANDLER_H -#define NW_XHTML_TEXT_QELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_qElementHandler_Class_s NW_XHTML_qElementHandler_Class_t; -typedef struct NW_XHTML_qElementHandler_s NW_XHTML_qElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_qElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_qElementHandler_ClassPart_t; - -struct NW_XHTML_qElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_qElementHandler_ClassPart_t NW_XHTML_qElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_qElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_qElementHandler_GetClassPart(_object) \ - (((NW_XHTML_qElementHandler_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_qElementHandler) - -#define NW_XHTML_qElementHandlerOf(_object) \ - ((NW_XHTML_qElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_qElementHandler_Class_t NW_XHTML_qElementHandler_Class; -extern const NW_XHTML_qElementHandler_t NW_XHTML_qElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_QELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_qelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_qelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_QELEMENTHANDLERI_H -#define NW_XHTML_TEXT_QELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_text_qelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -_NW_XHTML_qElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_QELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_textmodule.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_textmodule.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_TEXTMODULE_H -#define NW_XHTML_TEXT_TEXTMODULE_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule_Class_s - NW_XHTML_TextModule_Class_t; -typedef struct NW_XHTML_TextModule_s NW_XHTML_TextModule_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule_ClassPart_s { - void** unused; -} NW_XHTML_TextModule_ClassPart_t; - -struct NW_XHTML_TextModule_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_TextModule_ClassPart_t NW_XHTML_TextModule; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_TextModule_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModule_GetClassPart(_object) \ - (((NW_XHTML_TextModule_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_TextModule) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_TextModule_Class_t NW_XHTML_TextModule_Class; -extern const NW_XHTML_TextModule_t NW_XHTML_TextModule; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModuleOf(_object) \ - ((NW_XHTML_TextModule_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_TEXTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_textmodule1.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_textmodule1.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_TEXTMODULE1_H -#define NW_XHTML_TEXT_TEXTMODULE1_H - -#include "nw_markup_wbxmlmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule1_Class_s NW_XHTML_TextModule1_Class_t; -typedef struct NW_XHTML_TextModule1_s NW_XHTML_TextModule1_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule1_ClassPart_s { - void** unused; -} NW_XHTML_TextModule1_ClassPart_t; - -struct NW_XHTML_TextModule1_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_TextModule1_ClassPart_t NW_XHTML_TextModule1; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_TextModule1_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModule1_GetClassPart(_object) \ - (((NW_XHTML_TextModule1_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_TextModule1) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_TextModule1_Class_t NW_XHTML_TextModule1_Class; -extern const NW_XHTML_TextModule1_t NW_XHTML_TextModule1; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModule1Of(_object) \ - ((NW_XHTML_TextModule1_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_TEXTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_textmodule1i.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_textmodule1i.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_TEXTMODULE1I_H -#define NW_XHTML_TEXT_TEXTMODULE1I_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_text_textmodule1.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_TEXTMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_textmodule2.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_textmodule2.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2000 - 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_TEXTMODULE2_H -#define NW_XHTML_TEXT_TEXTMODULE2_H - -#include "nw_markup_wbxmlmodulei.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule2_Class_s NW_XHTML_TextModule2_Class_t; -typedef struct NW_XHTML_TextModule2_s NW_XHTML_TextModule2_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextModule2_ClassPart_s { - void** unused; -} NW_XHTML_TextModule2_ClassPart_t; - -struct NW_XHTML_TextModule2_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Markup_Module_ClassPart_t NW_Markup_Module; - NW_Markup_WBXMLModule_ClassPart_t NW_Markup_WBXMLModule; - NW_XHTML_TextModule2_ClassPart_t NW_XHTML_TextModule2; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_TextModule2_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModule2_GetClassPart(_object) \ - (((NW_XHTML_TextModule2_Class_t*) NW_Object_GetClass(_object))->\ - NW_XHTML_TextModule2) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_TextModule2_Class_t NW_XHTML_TextModule2_Class; -extern const NW_XHTML_TextModule2_t NW_XHTML_TextModule2; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextModule2Of(_object) \ - ((NW_XHTML_TextModule2_t*) (_object)) - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_TEXTMODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_text_textmodulei.h --- a/webengine/wmlengine/src/xhtml/include/nw_text_textmodulei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXT_TEXTMODULEI_H -#define NW_XHTML_TEXT_TEXTMODULEI_H - -#include "nw_markup_wbxmlmodulei.h" -#include "nw_text_textmodule.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXT_TEXTMODULEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytable.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytable.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_ATTRIBUTEPROPERTYTABLE_H -#define NW_XHTML_ATTRIBUTEPROPERTYTABLE_H - -#include "nw_object_base.h" -#include "nw_dom_node.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_text_coretextelementhandleri.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef enum NW_XHTML_AttributePropertyTable_Type_e{ - NW_XHTML_APT_TOKEN, - NW_XHTML_APT_COLOR, - NW_XHTML_APT_TRANSCOLOR, /* supports colors plus transparent pen */ - NW_XHTML_APT_PIXEL, - NW_XHTML_APT_INTEGER, - NW_XHTML_APT_LENGTH, - NW_XHTML_APT_STRING -}NW_XHTML_AttributePropertyTable_Type_t; - -typedef struct NW_XHTML_AttributePropertyTable_CSSPropRequires_s -{ - NW_LMgr_PropertyName_t CSSPropName;/* corresponding CSS property */ - NW_LMgr_Property_t setting; /* data type and value setting of CSS property */ -} NW_XHTML_AttributePropertyTable_CSSPropRequires_t; - -typedef struct NW_XHTML_AttributePropertyTable_ElementEntry_s -{ - NW_Uint16 elementToken; /* dictionary token for element */ - NW_Uint16 attributeToken; /* dictionary token for attribute */ - NW_LMgr_PropertyName_t CSSPropName;/* corresponding CSS property */ - NW_XHTML_AttributePropertyTable_Type_t type; /* data type of property value */ - const NW_LMgr_PropertyValueToken_t* CSSPropVals; /* allowed values for this attribute */ - const NW_XHTML_AttributePropertyTable_CSSPropRequires_t* requires; - /* additional property */ - /* which must be set for prop to take effect */ -} NW_XHTML_AttributePropertyTable_ElementEntry_t; - - -typedef struct NW_XHTML_AttributePropertyTable_PropValEntry_s -{ - const NW_Ucs2 *attrValStr; /* attribute value as a string */ - NW_Uint16 elementToken; /* the element token for the conversion; 0 if any */ - NW_Uint16 attributeToken; /* the attribute token for the conversion; 0 if any */ - NW_LMgr_PropertyValueToken_t CSSPropertyVal; /* corresponding CSS property value */ - NW_Bool case_sensitive; /* is attribute value case-sensitive? */ -} NW_XHTML_AttributePropertyTable_PropValEntry_t; - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ - -typedef struct NW_XHTML_AttributePropertyTable_Class_s NW_XHTML_AttributePropertyTable_Class_t; -typedef struct NW_XHTML_AttributePropertyTable_s NW_XHTML_AttributePropertyTable_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -typedef struct NW_XHTML_AttributePropertyTable_ClassPart_s { - NW_Uint32 numPropertyVals; - const NW_XHTML_AttributePropertyTable_PropValEntry_t* propertyVals; - NW_Uint16 numElementEntries; - const NW_XHTML_AttributePropertyTable_ElementEntry_t* elementEntries; -} NW_XHTML_AttributePropertyTable_ClassPart_t; - -struct NW_XHTML_AttributePropertyTable_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_AttributePropertyTable_ClassPart_t NW_XHTML_AttributePropertyTable; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_AttributePropertyTable_s { - NW_Object_Core_t super; -}; - - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ - -#define NW_XHTML_AttributePropertyTable_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_XHTML_AttributePropertyTable)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ - -extern const NW_XHTML_AttributePropertyTable_Class_t NW_XHTML_AttributePropertyTable_Class; -extern const NW_XHTML_AttributePropertyTable_t NW_XHTML_AttributePropertyTable; - -/* -------------------------------------------------------------------------- * - final methods - * ---------------------------------------------------------------------------*/ - -extern TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyStyles(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box); - -extern TBrowserStatusCode -NW_XHTML_AttributePropertyTable_AddActiveBoxDecoration(NW_LMgr_Box_t* box, NW_Bool growBorder); - -extern TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyGridModeTableStyle(NW_LMgr_Box_t* aBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_ATTRIBUTEPROPERTYTABLE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytablei.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytablei.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef NW_XHTML_ATTRIBUTEPROPERTYTABLEI_H -#define NW_XHTML_ATTRIBUTEPROPERTYTABLEI_H - -#include "nw_object_basei.h" -#include "nw_xhtml_attributepropertytable.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_ATTRIBUTEPROPERTYTABLEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_ELEMENTHANDLER_H -#define NW_XHTML_ELEMENTHANDLER_H - -#include "nw_object_base.h" -#include "nw_lmgr_containerbox.h" -#include "nw_lmgr_activebox.h" -#include "nw_dom_node.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ElementHandler_Class_s NW_XHTML_ElementHandler_Class_t; -typedef struct NW_XHTML_ElementHandler_s NW_XHTML_ElementHandler_t; - -typedef struct NW_XHTML_ContentHandler_s NW_XHTML_ContentHandler_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ -typedef -TBrowserStatusCode -(*NW_XHTML_ElementHandler_Initialize_t) (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -typedef -TBrowserStatusCode -(*NW_XHTML_ElementHandler_CreateBoxTree_t) (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -typedef -NW_Uint8 -(*NW_XHTML_ElementHandler_ProcessEvent_t) (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ElementHandler_ClassPart_s { - NW_XHTML_ElementHandler_Initialize_t initialize; - NW_XHTML_ElementHandler_CreateBoxTree_t createBoxTree; - NW_XHTML_ElementHandler_ProcessEvent_t processEvent; -} NW_XHTML_ElementHandler_ClassPart_t; - -struct NW_XHTML_ElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ElementHandler_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ElementHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_ElementHandler)) - -#define NW_XHTML_ElementHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_ElementHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ElementHandler_Class_t NW_XHTML_ElementHandler_Class; -extern const NW_XHTML_ElementHandler_t NW_XHTML_ElementHandler; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ElementHandler_Initialize(_elementHandler, _contentHandler, _elementNode) \ - (NW_XHTML_ElementHandler_GetClassPart (_elementHandler).\ - initialize ((_elementHandler), (_contentHandler), (_elementNode))) - -#define NW_XHTML_ElementHandler_CreateBoxTree(_elementHandler, _contentHandler, _elementNode, _parentBox) \ - (NW_XHTML_ElementHandler_GetClassPart (_elementHandler).\ - createBoxTree ((_elementHandler), (_contentHandler), (_elementNode), \ - (_parentBox))) - -#define NW_XHTML_ElementHandler_ProcessEvent(_elementHandler, _contentHandler, _elementNode, _activeBox, _event) \ - (NW_XHTML_ElementHandler_GetClassPart (_elementHandler).\ - processEvent ((_elementHandler), (_contentHandler), (_elementNode), \ - (_activeBox), (_event))) - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - - -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyStyles (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box, - const NW_Evt_Event_t* event); - -TBrowserStatusCode -NW_XHTML_ElementHandler_GetAttribute (NW_XHTML_ContentHandler_t *contentHandler, - NW_DOM_ElementNode_t *elementNode, - const NW_Uint16 attrToken, - NW_Ucs2 **attrValue); - -/* -This should go away when the cXML library gets the ability to cope with -arbitrary byte orderings. For now, the UCS-2 has to be fed to cXML in -network byte order. -*/ -void -NW_XHTML_ElementHandler_Ucs2NativeToNetworkByteOrder(NW_Uint32 byteCount, - NW_Uint8* pBuf); - -/* ------------------------------------------------------------------------- * - convenience method - * ------------------------------------------------------------------------- */ -NW_Bool -NW_XHTML_ElementHandler_IsBlockLevelTag(NW_Uint16 tagToken); - -/* implementation of the callback function called from CSSHandler*/ -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyCSSCallback (void* ch, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box); - -NW_Bool -NW_XHTML_ElementHandler_NextSiblingExists (NW_XHTML_ContentHandler_t *contentHandler, - NW_DOM_ElementNode_t *elementNode, - NW_Bool controlInitEH); - -NW_Text_t* -NW_XHTML_ElementHandler_GetSubTreeText(NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_ELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_ELEMENTHANDLERI_H -#define NW_XHTML_ELEMENTHANDLERI_H - -#include "nw_object_basei.h" -#include "nw_xhtml_elementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_ElementHandler_Initialize (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -_NW_XHTML_ElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox); - -extern -NW_Uint8 -_NW_XHTML_ElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_ELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_epoc32contenthandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_epoc32contenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_EPOC32CONTENTHANDLER_H -#define NW_XHTML_EPOC32CONTENTHANDLER_H - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_markup_imageviewer.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_Epoc32ContentHandler_Class_s NW_XHTML_Epoc32ContentHandler_Class_t; -typedef struct NW_XHTML_Epoc32ContentHandler_s NW_XHTML_Epoc32ContentHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_Epoc32ContentHandler_ClassPart_s { - void** unused; -} NW_XHTML_Epoc32ContentHandler_ClassPart_t; - -struct NW_XHTML_Epoc32ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_CompositeContentHandler_ClassPart_t NW_HED_CompositeContentHandler; - NW_XHTML_ContentHandler_ClassPart_t NW_XHTML_ContentHandler; - NW_XHTML_Epoc32ContentHandler_ClassPart_t NW_XHTML_Epoc32ContentHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_Epoc32ContentHandler_s { - NW_XHTML_ContentHandler_t super; - - /* member variables */ - /* aggregation(s) */ - NW_Markup_ImageViewer_t NW_Markup_ImageViewer; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_Epoc32ContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_Epoc32ContentHandler)) - -#define NW_XHTML_Epoc32ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_Epoc32ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_Epoc32ContentHandler_Class_t NW_XHTML_Epoc32ContentHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -NW_XHTML_Epoc32ContentHandler_SaveToFile(NW_XHTML_Epoc32ContentHandler_t *thisObj, - NW_Ucs2* file); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_CONTENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_epoc32contenthandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_epoc32contenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_EPOC32CONTENTHANDLERI_H -#define NW_XHTML_EPOC32CONTENTHANDLERI_H - -#include "nw_xhtml_xhtmlcontenthandleri.h" -#include "nw_xhtml_epoc32contenthandler.h" -#include "nw_markup_imagevieweri.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected data - * ------------------------------------------------------------------------- */ -extern const NW_Markup_ImageViewer_Class_t NW_XHTML_Epoc32ContentHandler_ImageViewer_Class; -extern const NW_Object_Class_t* const NW_XHTML_Epoc32_InterfaceList[]; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode); - -extern -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_GetBoxTree( NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree ); - - -extern -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_PartialLoadCallback( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode loadStatus, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context ); -extern -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_ImageViewer_Load (NW_Markup_ImageViewer_t* imageViewer); - -extern -NW_Bool -_NW_XHTML_Epoc32ContentHandler_ImageViewer_IsNoSave (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -extern -NW_Ucs2* -_NW_XHTML_Epoc32ContentHandler_ImageViewer_GetAltText (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_EPOC32CONTENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_pielementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_pielementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_PIELEMENTHANDLER_H -#define NW_XHTML_PIELEMENTHANDLER_H - - - -#include "nw_object_core.h" -#include "nw_xhtml_xhtmlcontenthandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_PiElementHandler_Class_s NW_XHTML_PiElementHandler_Class_t; -typedef struct NW_XHTML_PiElementHandler_s NW_XHTML_PiElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_PiElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_PiElementHandler_ClassPart_t; - -struct NW_XHTML_PiElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_PiElementHandler_ClassPart_t NW_XHTML_PiElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_PiElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_PiElementHandler_ClassPartOf(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_PiElementHandler)) - -#define NW_XHTML_PiElementHandlerOf(_object) \ - ((NW_XHTML_PiElementHandler_t*) (_object)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_PiElementHandler_Class_t NW_XHTML_PiElementHandler_Class; -extern const NW_XHTML_PiElementHandler_t NW_XHTML_PiElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_PIELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_pielementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_pielementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_PIELEMENTHANDLERI_H -#define NW_XHTML_PIELEMENTHANDLERI_H - - -#include "nw_xhtml_elementhandleri.h" -#include "nw_xhtml_pielementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_PiElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_PIELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_savetophonebkevent.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_savetophonebkevent.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_SAVETOPHONEBKEVENT_H -#define NW_XHTML_SAVETOPHONEBKEVENT_H - -#include "nw_evt_event.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_SaveToPhoneBkEvent_Class_s NW_XHTML_SaveToPhoneBkEvent_Class_t; -typedef struct NW_XHTML_SaveToPhoneBkEvent_s NW_XHTML_SaveToPhoneBkEvent_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_SaveToPhoneBkEvent_ClassPart_s { - NW_Uint8 unused; -} NW_XHTML_SaveToPhoneBkEvent_ClassPart_t; - -struct NW_XHTML_SaveToPhoneBkEvent_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_Evt_Event_ClassPart_t NW_Evt_Event; - NW_XHTML_SaveToPhoneBkEvent_ClassPart_t NW_XHTML_SaveToPhoneBkEvent; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_SaveToPhoneBkEvent_s { - NW_Evt_Event_t super; - - /* member variables */ -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_SaveToPhoneBkEvent_GetClassPart(_object) \ - (NW_Object_GetClassPart(_object, NW_XHTML_SaveToPhoneBkEvent)) - -#define NW_XHTML_SaveToPhoneBkEventOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_SaveToPhoneBkEvent)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_SaveToPhoneBkEvent_Class_t NW_XHTML_SaveToPhoneBkEvent_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -NW_XHTML_SaveToPhoneBkEvent_Initialize (NW_XHTML_SaveToPhoneBkEvent_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_UNICODEKEYEVENT_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_savetophonebkeventi.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_savetophonebkeventi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_SAVETOPHONEBKEVENTI_H -#define NW_XHTML_SAVETOPHONEBKEVENTI_H - -#include "nw_evt_eventi.h" -#include "nw_xhtml_savetophonebkevent.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_LMGR_UNICODEKEYEVENTI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_telephonyservices.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_telephonyservices.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TELEPHONYSERVICES_H -#define NW_XHTML_TELEPHONYSERVICES_H - -#include "nw_object_base.h" -#include "nw_xhtml_telephonyservices.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TelephonyServices_Class_s NW_XHTML_TelephonyServices_Class_t; -typedef struct NW_XHTML_TelephonyServices_s NW_XHTML_TelephonyServices_t; - -/* ------------------------------------------------------------------------- * - method prototypes - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TelephonyServices_ClassPart_s { - NW_Uint8 unused; -} NW_XHTML_TelephonyServices_ClassPart_t; - -struct NW_XHTML_TelephonyServices_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_TelephonyServices_ClassPart_t NW_XHTML_TelephonyServices; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_TelephonyServices_s { - NW_Object_Core_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TelephonyServices_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_TelephonyServices)) - -#define NW_XHTML_TelephonyServicesOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_TelephonyServices)) - - /* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_TelephonyServices_Class_t NW_XHTML_TelephonyServices_Class; -extern const NW_XHTML_TelephonyServices_t NW_XHTML_TelephonyServices; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -extern -TBrowserStatusCode -NW_XHTML_TelephonyServices_MakeCall(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* number, - NW_Bool cti); - -extern -TBrowserStatusCode -NW_XHTML_TelephonyServices_SaveToPhoneBook(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* number, - NW_Text_t* name, - NW_Text_t* email, - NW_Bool cti); - -extern -NW_Bool -NW_XHTML_TelephonyServices_ParseNumber(NW_XHTML_TelephonyServices_t* telServices, - NW_Ucs2* number, - NW_Bool cti); - -TBrowserStatusCode -NW_XHTML_TelephonyServices_Mailto_SaveToPhoneBook(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* email, - NW_Text_t* name, - NW_Bool isEmail); - -TBrowserStatusCode -NW_UI_Telephony_MakeCall(const NW_Ucs2 *number); - -TBrowserStatusCode -NW_UI_Telephony_AddPBEntry(const NW_Ucs2 *number, const NW_Ucs2* name, const NW_Ucs2* email); - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_MODULE_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_telephonyservicesi.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_telephonyservicesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TELEPHONYSERVICESI_H -#define NW_XHTML_TELEPHONYSERVICESI_H - -#include "nw_object_basei.h" -#include "nw_xhtml_telephonyservices.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TELEPHONYSERVICESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_textelementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_textelementhandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXTELEMENTHANDLER_H -#define NW_XHTML_TEXTELEMENTHANDLER_H - -#include "nw_xhtml_elementhandler.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextElementHandler_Class_s NW_XHTML_TextElementHandler_Class_t; -typedef struct NW_XHTML_TextElementHandler_s NW_XHTML_TextElementHandler_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_TextElementHandler_ClassPart_s { - void** unused; -} NW_XHTML_TextElementHandler_ClassPart_t; - -struct NW_XHTML_TextElementHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_XHTML_ElementHandler_ClassPart_t NW_XHTML_ElementHandler; - NW_XHTML_TextElementHandler_ClassPart_t NW_XHTML_TextElementHandler; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_TextElementHandler_s { - NW_XHTML_ElementHandler_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_TextElementHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_TextElementHandler)) - -#define NW_XHTML_TextElementHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_TextElementHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_TextElementHandler_Class_t NW_XHTML_TextElementHandler_Class; -extern const NW_XHTML_TextElementHandler_t NW_XHTML_TextElementHandler; - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXTELEMENTHANDLER_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_textelementhandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_textelementhandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_TEXTELEMENTHANDLERI_H -#define NW_XHTML_TEXTELEMENTHANDLERI_H - -#include "nw_xhtml_elementhandleri.h" -#include "nw_xhtml_textelementhandler.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_TextElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* containerBox); - -extern -NW_Uint8 -_NW_XHTML_TextElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_TEXTELEMENTHANDLERI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_variables.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_variables.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_VARIABLES_H -#define NW_XHTML_VARIABLES_H - -#include "nw_object_dynamic.h" -#include "nw_adt_dynamicvector.h" -#include "nw_text_ucs2.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_Variables_Class_s NW_XHTML_Variables_Class_t; -typedef struct NW_XHTML_Variables_s NW_XHTML_Variables_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_Variables_ClassPart_s { - void** unused; -} NW_XHTML_Variables_ClassPart_t; - -struct NW_XHTML_Variables_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_XHTML_Variables_ClassPart_t NW_XHTML_Variables; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_Variables_s { - NW_Object_Dynamic_t super; - - /* member variables */ - NW_ADT_DynamicVector_t* vector; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_Variables_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_Variables)) - -#define NW_XHTML_VariablesOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_Variables)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_Variables_Class_t NW_XHTML_Variables_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_Variables_Set (NW_XHTML_Variables_t* thisObj, - const NW_Text_t* name, - const NW_Text_t* value); - -NW_Text_t* -NW_XHTML_Variables_Get (const NW_XHTML_Variables_t* thisObj, - const NW_Text_t* name); - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_VARIABLES_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_variablesi.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_variablesi.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_VARIABLESI_H -#define NW_XHTML_VARIABLESI_H - -#include "nw_object_dynamici.h" -#include "nw_xhtml_variables.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_Variables_Entry_s { - NW_Ucs2* name; - NW_Ucs2* value; -} NW_XHTML_Variables_Entry_t; - -/* ------------------------------------------------------------------------- * - virtual method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_Variables_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_XHTML_Variables_Destruct (NW_Object_Dynamic_t* dynamicObject); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_VARIABLESI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandler.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,494 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_XHTML_ContentHandler_h_ -#define _NW_XHTML_ContentHandler_h_ - -#include "nw_adt_dynamicvector.h" -#include "nw_adt_map.h" -#include "nw_basicforms_xhtmlcontrolset.h" -#include "nw_css_processor.h" -#include "nw_fbox_formliaison.h" -#include "nw_hed_compositecontenthandler.h" -#include "nw_hed_domtree.h" -#include "nw_hed_domhelper.h" -#include "nw_markup_numbercollector.h" -#include "nw_markup_module.h" -#include "nw_system_timer.h" -#include "nw_tinydom_utils.h" -#include "nw_xhtml_elementhandler.h" -#include "nwx_http_header.h" -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define NW_XHTML_ContentHandler_Msg_ShowFragment 1 - -extern NW_WBXML_Dictionary_t NW_XHTML_WBXMLDictionary; - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -class MHEDLoadObserver; -class CCSSVariableStyleSheet; -class MMessageListener; - -typedef struct NW_XHTML_ContentHandler_Class_s NW_XHTML_ContentHandler_Class_t; - -typedef enum { - NW_XHTML_CONTENTHANDLER_INVALID, - NW_XHTML_CONTENTHANDLER_XHTMLBASIC, - _NW_XHTML_ContentHandler_h_TML, /* or XHTML. XHTMLb + any HTML ext. */ - NW_XHTML_CONTENTHANDLER_IMODEHTMLEXT /* i-mode HTML extensions. */ -} _NW_XHTML_ContentHandler_h_tmlSubset_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ContentHandler_ClassPart_s { - NW_Uint16 numModules; - const NW_Markup_Module_t* const* modules; -} NW_XHTML_ContentHandler_ClassPart_t; - -struct NW_XHTML_ContentHandler_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_Object_Base_ClassPart_t NW_Object_Base; - NW_Object_Dynamic_ClassPart_t NW_Object_Dynamic; - NW_HED_DocumentNode_ClassPart_t NW_HED_DocumentNode; - NW_HED_ContentHandler_ClassPart_t NW_HED_ContentHandler; - NW_HED_CompositeContentHandler_ClassPart_t NW_HED_CompositeContentHandler; - NW_XHTML_ContentHandler_ClassPart_t NW_XHTML_ContentHandler; -}; - -struct NW_XHTML_Form_Node_Context_s { - NW_DOM_Node_t *formNode; - NW_FBox_FormLiaison_t *formLiaison; - }; - -class TExternalScriptNode - { - public: - NW_DOM_Node_t *iScriptNode; - NW_Uint16 iTransactionId; - }; - -typedef struct NW_XHTML_Form_Node_Context_s NW_XHTML_Form_Node_Context_t; - -struct NW_XHTML_Script_Node_Context_s { - NW_DOM_ElementNode_t *scriptNode; - NW_LMgr_Box_t *box; - }; - -typedef struct NW_XHTML_Script_Node_Context_s NW_XHTML_Script_Node_Context_t; -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_ContentHandler_s { - NW_HED_CompositeContentHandler_t super; - - /* aggregation(s) */ - NW_Markup_NumberCollector_t NW_Markup_NumberCollector; - - /* member variables */ - NW_Text_t* title; - NW_ADT_DynamicVector_t* nodeContexts; - - /* Holds a map of CBase derived ElementHandler instances. The map uses - the associated element-node pointer as a key. - */ - NW_ADT_Map_t* iElementHandlerMap; - - NW_HED_DomTree_t* domTree; - NW_HED_DomHelper_t domHelper; - - NW_DOM_Node_t *baseElement; - - NW_Text_t* fragment; - - /* Holds the content-location in the header from the response*/ - NW_Ucs2 *contentLocation; - - NW_CSS_Processor_t* processor; - - NW_Object_Shared_t* historyContentData; - NW_ADT_DynamicVector_t* controlValueSet; /* form control values */ - NW_XHTML_ControlSet_t* controlSet; /* form control values and DOM nodes */ - NW_Bool isLoading; /* to check the load status */ - - /* HTML subset implemented in this version. */ - _NW_XHTML_ContentHandler_h_tmlSubset_t htmlSubset; - - /* whether the xhtml content is retrieved from saved deck */ - NW_Bool saveddeck; - NW_Bool histload; - /* whether the xhtml content is reloaded*/ - NW_Bool reload; - - /* Support for META HTTP-EQUIV="refresh" */ - NW_Bool metaRefreshSet; - NW_Int32 metaRefreshSeconds; - NW_Uint8 metaRefreshLoadReason; - NW_Text_t* metaRefreshResolvedUrl; - NW_System_Timer_t* metaRefreshTimer; - - /* flags used to decide which element to ignore when both body and */ - /* frameset elements are in the same page*/ - NW_Bool ignoreFramesetElement; - NW_Bool ignoreBodyElement; - - // a map structure of map elements. - void* imageMapLookupTable; - - /* - <noscript> element and its children should not be rendered when : - 1) scripting is enabled - 3) an supported <script> type "e.g. "javascript" was encountered - skipToNode is used to point to the next sibling node of the <noscript> - element and in the content handler initialize the <noscript> node and its children are - skipped by skipping upto the skipToNode. - skipToNode is initialized in <noscript> element handler, when ignoreNoScriptElement is TRUE. - This is also used to skip over any embedded elements in a valid object tag once a element - is selected. - */ - NW_DOM_ElementNode_t* skipToNode; - // is set to TRUE in the script element handler , if the script content is supported - NW_Bool ignoreNoScriptElement; - - - // last dom node of the last chunk - NW_DOM_Node_t* lastInitializedDomNode; - NW_DOM_Node_t* prevInitializedDomNode; - - void* htmlpParser; - - // flag to control intialize element handler - NW_Bool stopInitEH; - NW_Bool lastChunk; - // indicates that script is being executed on - // the content. Ecma script element handler turns this flag on and off. - NW_Bool iScriptIsExecuted; - - // indicates that DocumentRoot has been resumed after suspending. - // E.g. if we click on image link while browsing, the DocumentRoot will be suspended - // & unknown CH will handle browsing. After that the DocumentRoot will be resumed. - // In this case we don't need to execute script. In order to handle this situation this flag was introduced. - NW_Bool iScriptIsResumed; - - // the flag is set after the formatting is complete. - // the flag is used to notify ecmaengine of the document load complete - NW_Bool formattingComplete; - - // incremental rendering does not support normal mode so - // whenever a html page is fetched, first we switch to small - // screen mode and stay in that mode until the page - // loaded completly. - // However if the original mode was normal we need to - // switch back. - // this flag is set to true if we need to switch back - NW_Bool switchBackToNormalLayout; - - NW_Bool scriptLoadComplete; - - NW_Bool iScriptCancelled; - - NW_Bool metaNoCache; - - NW_Bool metaCacheExpires; - - NW_Ucs2* metaExpiresDate; - - void* scriptLoadTransactionIds; - - // list - contains script nodes that are not initialized - // when external script loads are pending - void* scriptNodes; - - void* formNodes; - - /* interface reference */ - MMessageListener* iMessageListener; - - CCSSVariableStyleSheet* variableStyleSheet; - // - NW_Bool iBodyIsPresent; - - NW_DOM_Node_t* iBodyNode; - -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ContentHandler_GetClassPart(_object) \ - (NW_Object_GetClassPart((_object), NW_XHTML_ContentHandler)) - -#define NW_XHTML_ContentHandlerOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_ContentHandler)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_ContentHandler_Class_t NW_XHTML_ContentHandler_Class; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_XHTML_ContentHandler_SetTitle(_xhtmlContentHandler, _title) \ - (((_xhtmlContentHandler)->title = (_title)), KBrsrSuccess) - -#define NW_XHTML_ContentHandler_GetTitle(_xhtmlContentHandler) \ - ((const NW_Text_t const*) (_xhtmlContentHandler)->title) - -#define NW_XHTML_ContentHandler_GetVariableStyleSheet(_xhtmlContentHandler) \ - ((CCSSVariableStyleSheet*) (_xhtmlContentHandler)->variableStyleSheet) - -#define NW_XHTML_ContentHandler_SetBaseElement(_xhtmlContentHandler, _baseElement) \ - ((((NW_XHTML_ContentHandler_t*)_xhtmlContentHandler)->baseElement = (_baseElement)), KBrsrSuccess) - -#define NW_XHTML_ContentHandler_GetBaseElement(_xhtmlContentHandler) \ - ((NW_DOM_Node_t*) ((NW_XHTML_ContentHandler_t*)_xhtmlContentHandler)->baseElement) - -#define NW_XHTML_ContentHandler_GetContentLocation(_xhtmlContentHandler) \ - ((NW_Ucs2*) ((NW_XHTML_ContentHandler_t*)_xhtmlContentHandler)->contentLocation) - -#define NW_XHTML_ContentHandler_SetNodeContext(_xhtmlContentHandler, _node, _context) \ - (NW_ADT_Map_Set ((_xhtmlContentHandler)->nodeContexts, (_node), (_context))) - -#define NW_XHTML_ContentHandler_GetCSSProcessor(_xhtmlContentHandler) \ - ((_xhtmlContentHandler)->processor) - -#define NW_XHTML_ContentHandler_RemoveNodeContext(_xhtmlContentHandler, _node) \ - (NW_ADT_Map_Remove ((_xhtmlContentHandler)->nodeContexts, (_node))) - - -/* extern - * _NW_XHTML_ContentHandler_h_tmlSubset_t - * NW_XHTML_ContentHandler_GetHtmlSubset (NW_XHTML_ContentHandler_t* contentHandle); - */ -#define NW_XHTML_ContentHandler_GetHtmlSubset(_xhtmlContentHandler) \ - ((_xhtmlContentHandler)->htmlSubset) - -extern -const NW_XHTML_ElementHandler_t* -NW_XHTML_ContentHandler_GetElementHandler (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* domElement); - -extern -NW_HED_DocumentNode_t* -NW_XHTML_ContentHandler_MapElementNode (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* domElement); - -extern -TBrowserStatusCode -NW_XHTML_GetDOMAttribute (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - const NW_Uint16 token, NW_Text_t** text_t); - -extern -NW_Text_t* -NW_XHTML_GetDOMTextNodeData(NW_XHTML_ContentHandler_t* thisObj, - NW_DOM_TextNode_t* textNode); - -extern -NW_CSS_Processor_t* -NW_XHTML_ContentHandler_CreateCSSProcessor(NW_XHTML_ContentHandler_t* contentHandler); - -extern -NW_WBXML_Dictionary_t* -NW_XHTML_ContentHandler_GetDictionary(NW_XHTML_ContentHandler_t* contentHandler); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_AddFormLiaison(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* formNode); - -extern -NW_FBox_FormLiaison_t* -NW_XHTML_ContentHandler_GetFormLiaison(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* formNode); - - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_StartLoad (NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* url, - NW_Uint8 reason, - void* clientData, - NW_Uint8 type); -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_StartRequest (NW_XHTML_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - void* clientData ); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_StartLoad_tId (NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* url, - NW_Uint8 reason, - void* clientData, - NW_Uint8 type, - NW_Uint16* aTransationId); -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_StartRequest_tId (NW_XHTML_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - void* clientData , - NW_Uint16* aTransationId); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_SetLoadObserver (NW_XHTML_ContentHandler_t* thisObj, - NW_Uint16 aTransationId, - MHEDLoadObserver* aLoadObserver); - -/* returns true if the xhtml content is retrieved from saved deck, otherwise false. - * used for cache-only loading for embeded elements in saved file - */ -extern -NW_Bool -NW_XHTML_ContentHandler_IsSaveddeck(const NW_XHTML_ContentHandler_t* thisObj); - -/* returns true if the xhtml content is history load, otherwise false. - * used for cache-only loading for embeded elements in saved file - */ -extern -NW_Bool -NW_XHTML_ContentHandler_IsHistoryLoad(const NW_XHTML_ContentHandler_t* thisObj); - - -/* returns true if the xhtml content is reload, otherwise false. - */ -extern -NW_Bool -NW_XHTML_ContentHandler_IsReLoad(const NW_XHTML_ContentHandler_t* thisObj); - -/* set the saveddeck boolean member - */ -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_SetSaveddeck(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isSaveddeck); - -/* set the history load boolean member - */ -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_SetHistoryLoad(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isHistLoad); - - -/* set the reload boolean member - */ -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_SetReLoad(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isReLoad); - -/* Initialize the META refresh. If and only if returns success, the content - * handler object will take ownership of and assume responsibility for - * destructing the resolvedUrl object. Once initialized, the content handler - * object performs the META refresh when needed. - */ -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshInitialize(NW_XHTML_ContentHandler_t *thisObj, - NW_Int32 seconds, - NW_Text_t* resolvedUrl, - NW_Uint8 loadReason); -extern -void -NW_XHTML_ContentHandler_SetImageMapLookupTable(NW_XHTML_ContentHandler_t *thisObj, - void* mapList); - - -extern -void* -NW_XHTML_ContentHandler_GetImageMapLookupTable(NW_XHTML_ContentHandler_t *thisObj); - -extern -void -NW_XHTML_ContentHandler_SetReferrerUrl(NW_XHTML_ContentHandler_t *thisObj); - - - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_AddToPendingScriptTids(NW_XHTML_ContentHandler_t *thisObj,const TExternalScriptNode& aScriptNodeId ); - - -extern -NW_Uint8 -NW_XHTML_ContentHandler_PendingScriptLoadCount(NW_XHTML_ContentHandler_t *thisObj); - -extern -CBase* -NW_XHTML_ContentHandler_GetElementHandlerInstance(NW_XHTML_ContentHandler_t *thisObj, - NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_SetElementHandlerInstance(NW_XHTML_ContentHandler_t *thisObj, - NW_DOM_ElementNode_t* elementNode, CBase* elementHandler); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_AddFormNodes(NW_XHTML_ContentHandler_t *thisObj, NW_DOM_ElementNode_t* elementNode); - -extern -NW_Bool -NW_XHTML_ContentHandler_IsScriptLoadPending(NW_XHTML_ContentHandler_t *thisObj, NW_DOM_ElementNode_t* aElementNode) ; -NW_DOM_ElementNode_t* -NW_XHTML_ContentHandler_GetFormNode(NW_XHTML_ContentHandler_t *thisObj, NW_DOM_ElementNode_t* elementNode); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_ShowFragment (NW_XHTML_ContentHandler_t* thisObj, const NW_Text_t* fragment); - -extern -NW_Bool -NW_XHTML_ContentHandler_AllowableStylesheet(const NW_Ucs2* media, NW_Bool* isHandheld); - -extern -void NW_XHTML_ContentHandler_EnableMobileProfileMode(NW_XHTML_ContentHandler_t* thisObj); - -extern -TBrowserStatusCode -NW_XHTML_ContentHandler_LoadStylesheet(NW_XHTML_ContentHandler_t* thisObj, - const NW_Ucs2* type, const NW_Ucs2* relation, const NW_Ucs2* media, - const NW_Ucs2* url, const NW_Ucs2* charset, const NW_Ucs2* alternate); - -TBrowserStatusCode -NW_XHTML_ContentHandler_WindowOpen(NW_XHTML_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t* target); - - -TBrowserStatusCode -NW_XHTML_ContentHandler_WindowOpenAndPost(NW_XHTML_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t* target, NW_Uint8* contentType, - NW_Uint32 contentTypeLength, NW_Uint8* postData, NW_Uint32 postDataLength, - NW_Uint8* boundary); - -void -NW_XHTML_ContentHandler_GetBaseTagTarget (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** targetVal); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_XHTML_ContentHandler_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandleri.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandleri.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef _NW_XHTML_ContentHandlerI_h_ -#define _NW_XHTML_ContentHandlerI_h_ - -#include "nw_hed_compositecontenthandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" - -#include "nw_wmlscriptch_iwmlbrowserlibi.h" -#include "nw_wmlscriptch_iwmlscriptlisteneri.h" -#include "nw_markup_numbercollectori.h" - -#include "BrsrStatusCodes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * - protected global data - * ------------------------------------------------------------------------- */ -extern const NW_WmlsCh_IWmlBrowserLib_Class_t NW_XHTML_ContentHandler_IWmlBrowserLib_Class; -extern const NW_WmlsCh_IWmlScriptListener_Class_t NW_XHTML_ContentHandler_IWmlScriptListener_Class; -extern const NW_Markup_NumberCollector_Class_t NW_XHTML_ContentHandler_NumberCollector_Class; -extern const NW_Object_Class_t* const NW_XHTML_InterfaceList[]; -extern const NW_Markup_Module_t* const _NW_XHTML_ContentHandler_Modules[]; - -/* ------------------------------------------------------------------------- * - protected consts - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - protected types - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_ContentHandler_ChildEntry_s -{ - NW_DOM_ElementNode_t* domElement; - NW_HED_DocumentNode_t* childNode; -} NW_XHTML_ContentHandler_ChildEntry_t; - -/* ------------------------------------------------------------------------- * - method implementation prototypes - * ------------------------------------------------------------------------- */ -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp); - -extern -void -_NW_XHTML_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject); - -TBrowserStatusCode -_NW_XHTML_ContentHandler_Initialize( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus ); -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_PartialNextChunk( NW_HED_ContentHandler_t* contentHandler, - NW_Int32 chunkIndex, - NW_Url_Resp_t* response, - void* context); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_NodeChanged (NW_HED_DocumentNode_t* documentNode, - NW_HED_DocumentNode_t* childNode); - -extern -NW_Uint8 -_NW_XHTML_ContentHandler_ProcessEvent (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event, - void* context); - -extern -void -_NW_XHTML_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree); - -extern -void -_NW_XHTML_CompositeContentHandler_Resume (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_XHTML_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_XHTML_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode); - -extern -void -_NW_XHTML_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode); - - -extern -void -_NW_XHTML_DocumentNode_HandleLoadComplete(NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 transactionId, - void* context ); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_HandleRequest (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest); - -extern -const NW_Text_t* -_NW_XHTML_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_ResolveURL (NW_HED_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t** retUrl); -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_CreateBoxTree (NW_HED_ContentHandler_t* contentHandler, - NW_LMgr_Box_t** boxTree); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_Cancel( NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType ); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_DocumentDisplayed (NW_HED_ContentHandler_t* contentHandler); - -extern -TBrowserStatusCode -_NW_XHTML_ContentHandler_INumberCollector (NW_HED_INumberCollector_t *numberCollector, - NW_ADT_DynamicVector_t *dynamicVector); - -extern -NW_LMgr_Box_t* -_NW_XHTML_ContentHandler_NumberCollector_GetBoxTree (NW_Markup_NumberCollector_t* numberCollector); - -extern -NW_Text_t* -_NW_XHTML_ContentHandler_NumberCollector_GetHrefAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); -extern -NW_Text_t* -_NW_XHTML_ContentHandler_NumberCollector_GetAltAttr (NW_Markup_NumberCollector_t* numberCollector, - NW_LMgr_Box_t* box); - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* _NW_XHTML_ContentHandlerI_h_ */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlentityset.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlentityset.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLENTITYSET_H -#define NW_XHTML_XHTMLENTITYSET_H - -#include "nw_hed_entityset.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* ------------------------------------------------------------------------- * - forward declarations - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_EntitySet_Class_s NW_XHTML_EntitySet_Class_t; -typedef struct NW_XHTML_EntitySet_s NW_XHTML_EntitySet_t; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -typedef struct NW_XHTML_EntitySet_ClassPart_s { - void** unused; -} NW_XHTML_EntitySet_ClassPart_t; - -struct NW_XHTML_EntitySet_Class_s { - NW_Object_Core_ClassPart_t NW_Object_Core; - NW_HED_EntitySet_ClassPart_t NW_HED_EntitySet; - NW_XHTML_EntitySet_ClassPart_t NW_XHTML_EntitySet; -}; - -/* ------------------------------------------------------------------------- * - object definiton - * ------------------------------------------------------------------------- */ -struct NW_XHTML_EntitySet_s { - NW_HED_EntitySet_t super; -}; - -/* ------------------------------------------------------------------------- * - convenience macros - * ------------------------------------------------------------------------- */ -#define NW_XHTML_EntitySet_GetClassPart(_object) \ - (NW_Object_GetClassPart (_object, NW_XHTML_EntitySet)) - -#define NW_XHTML_EntitySetOf(_object) \ - (NW_Object_Cast (_object, NW_XHTML_EntitySet)) - -/* ------------------------------------------------------------------------- * - global static data - * ------------------------------------------------------------------------- */ -extern const NW_XHTML_EntitySet_Class_t NW_XHTML_EntitySet_Class; -extern const NW_XHTML_EntitySet_t NW_XHTML_EntitySet; - -/* ------------------------------------------------------------------------- * - public methods - * ------------------------------------------------------------------------- */ -#define NW_XHTML_EntitySet_GetEntityChar(_entitySet, _name) \ - (NW_Object_Invoke (_entitySet, NW_HED_EntitySet, getEntityChar) \ - ((_entitySet), (_name))) - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_XHTML_XHTMLENTITYSET_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlentityseti.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlentityseti.h Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef NW_XHTML_XHTMLENTITYSETI_H -#define NW_XHTML_XHTMLENTITYSETI_H - -#include "nw_hed_entityseti.h" -#include "nw_xhtml_xhtmlentityset.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} // extern "C" { -#endif /* __cplusplus */ - -#endif /* NW_BROWSER_BROWSERMIMETABLEI_H */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Base/XHTMLBaseElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Base/XHTMLBaseElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_base_baseelementhandleri.h" -#include "BrsrStatusCodes.h" - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_baseElementHandler_Class_t NW_XHTML_baseElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_baseElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_baseElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_baseElementHandler_ProcessEvent - }, - { /* NW_XHTML_baseElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_baseElementHandler_t NW_XHTML_baseElementHandler = { - { { &NW_XHTML_baseElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_baseElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - - /* by default we are successful */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_baseElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - /* invoke our superclass for completion */ - return NW_XHTML_ElementHandler_Class.NW_XHTML_ElementHandler. - createBoxTree (elementHandler, contentHandler, elementNode, parentBox); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_XHTML_baseElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(event); - - /* by default we don't handle the event */ - return 0; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Base/XHTMLBaseModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Base/XHTMLBaseModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_base_basemodulei.h" - -#include "nw_base_baseelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_BaseModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_base, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_baseElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_BaseModule_Class_t NW_XHTML_BaseModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Base), - /* elementHandlers */ _NW_XHTML_BaseModule_ElementHandlers, - }, - { /* NW_XHTML_BaseModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_BaseModule_t NW_XHTML_BaseModule = { - {&NW_XHTML_BaseModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLBasicFormsModule.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLBasicFormsModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_basicformsmodulei.h" - -#include "nw_basicforms_formelementhandler.h" -#include "nw_basicforms_inputelementhandler.h" -#include "nw_basicforms_labelelementhandler.h" -#include "nw_basicforms_optionelementhandler.h" -#include "nw_basicforms_selectelementhandler.h" -#include "nw_basicforms_textareaelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_BasicFormsModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_form, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_formElementHandler}, - { NW_XHTML_ElementToken_input, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_inputElementHandler}, - { NW_XHTML_ElementToken_label, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_labelElementHandler}, - { NW_XHTML_ElementToken_select, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_selectElementHandler}, - { NW_XHTML_ElementToken_option, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_optionElementHandler}, - { NW_XHTML_ElementToken_optgroup, NULL}, - { NW_XHTML_ElementToken_button, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_inputElementHandler}, - { NW_XHTML_ElementToken_textarea, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_textareaElementHandler}, -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_BasicFormsModule_Class_t NW_XHTML_BasicFormsModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_BasicForms), - /* elementHandlers */ _NW_XHTML_BasicFormsModule_ElementHandlers, - }, - { /* NW_XHTML_BasicFormsModule */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_BasicFormsModule_t NW_XHTML_BasicFormsModule = { - {&NW_XHTML_BasicFormsModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLControlSet.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLControlSet.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_xhtmlcontrolseti.h" -#include "nw_adt_resizablevector.h" -#include "nw_lmgr_box.h" -#include "BrsrStatusCodes.h" - -#if 0 -#if (defined(_DEBUG)) || (defined(_ENABLE_LOGS)) -#define XFL_LOGGING 1 -#include <FLogger.h> - - _LIT(KLogFileName, "XhtmlFormLiaison.log"); - _LIT(KLogDirName, "Browser"); -#endif -#endif - /* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ControlSet_Class_t NW_XHTML_ControlSet_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_ControlSet_t), - /* construct */ _NW_XHTML_ControlSet_Construct, - /* destruct */ _NW_XHTML_ControlSet_Destruct - }, - { /* NW_XHTML_ControlSet */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ControlSet_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_XHTML_ControlSet_t* thisObj; - NW_ADT_Vector_Metric_t capacity; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_XHTML_ControlSet_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_XHTML_ControlSetOf (dynamicObject); - - /* initialize member variables */ - thisObj->valueVector = va_arg (*argp, NW_ADT_DynamicVector_t*); - capacity = NW_ADT_DynamicVector_GetCapacity (thisObj->valueVector); - thisObj->nodeVector = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_DOM_ElementNode_t*), capacity, 5); - - if(thisObj->nodeVector == NULL) { - return KBrsrOutOfMemory; - } - thisObj->boxVector = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_LMgr_Box_t*), capacity, 5); - if(thisObj->boxVector == NULL) { - return KBrsrOutOfMemory; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_XHTML_ControlSet_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_XHTML_ControlSet_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_XHTML_ControlSet_Class)); - - thisObj = NW_XHTML_ControlSetOf (dynamicObject); - - /* release our resources; notice that nodeVector is NULL at thisObj point - if _NW_XHTML_ControlSet_GetValueVector has been called */ - NW_Object_Delete (thisObj->valueVector); - NW_Object_Delete (thisObj->nodeVector); - NW_Object_Delete (thisObj->boxVector); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ControlSet_AddNode (NW_XHTML_ControlSet_t* thisObj, - NW_DOM_ElementNode_t* node, - NW_ADT_Vector_Metric_t* index) -{ - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ControlSet_Class)); - NW_ASSERT (node != NULL); - NW_ASSERT (index != NULL); - - /* insert the node and update the index to reflect the actual position - within the vector */ - if (NW_ADT_DynamicVector_InsertAt (thisObj->nodeVector, &node, - NW_ADT_Vector_AtEnd) == NULL) { - return KBrsrOutOfMemory; - } - *index = (NW_ADT_Vector_Metric_t) - (NW_ADT_Vector_GetSize (thisObj->nodeVector) - 1); - - #if defined(XFL_LOGGING) - { - TBuf16<300> buf; - NW_String_t *node_name =NW_String_new();; - NW_DOM_Node_getNodeName(node, node_name); - - // NW_Uint8* text = NW_TinyTree_EBuffer_AddressAt(node->tree->ebuffer, node->source_offset); - - buf.Format( _L("XhtmlFormLiaison::AddNode index=%d, node=%x, node_name=%s\n"), *index, node, - node_name->storage); - RFileLogger::Write( KLogDirName, KLogFileName, EFileLoggingModeAppend, buf ); - NW_String_delete(node_name); - } -#endif - - /* if this is a new node, add it to the end of the nodeVector list */ - if (*index == NW_ADT_Vector_GetSize (thisObj->valueVector)) { - void* value; - - /* Make sure we don't erase a previous value if it exists. */ - if ( NW_ADT_Vector_GetSize (thisObj->nodeVector) > - NW_ADT_Vector_GetSize (thisObj->valueVector) ) { - /* Added a new node that doesn't have a value. Set to NULL. */ - value = NULL; - if (NW_ADT_DynamicVector_InsertAt (thisObj->valueVector, &value, - *index) == NULL) { - return KBrsrOutOfMemory; - } - } - } - - if (*index == NW_ADT_Vector_GetSize (thisObj->boxVector)) { - void* box; - - /* Make sure we don't erase a previous value if it exists. */ - if ( NW_ADT_Vector_GetSize (thisObj->nodeVector) > - NW_ADT_Vector_GetSize (thisObj->boxVector) ) { - /* Added a new node that doesn't have a box. Set to NULL. */ - box = NULL; - if (NW_ADT_DynamicVector_InsertAt (thisObj->boxVector, &box, - *index) == NULL) { - return KBrsrOutOfMemory; - } - } - - } - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ControlSet_SetValue (NW_XHTML_ControlSet_t* thisObj, - NW_DOM_ElementNode_t* node, - NW_Object_t* value) -{ - NW_ADT_Vector_Metric_t index; - NW_Object_t** entry; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ControlSet_Class)); - NW_ASSERT (node != NULL); - - /* ensure that the node exists */ - index = NW_ADT_Vector_GetElementIndex (thisObj->nodeVector, &node); - if (index == NW_ADT_Vector_AtEnd) { - return KBrsrFailure; - } - - /* retrieve the pointer to the entry */ - entry = NW_ADT_Vector_ElementAt (thisObj->valueVector, index); - if (entry == NULL) { - return KBrsrFailure; - } - - /* if the old value is not the same as the new, delete it and install the - new */ - if(*entry != value) { - NW_Object_Delete (*entry); - } - *entry = value; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -_NW_XHTML_ControlSet_GetValue (NW_XHTML_ControlSet_t* thisObj, - NW_DOM_ElementNode_t* node) -{ - NW_ADT_Vector_Metric_t index; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ControlSet_Class)); - NW_ASSERT (node != NULL); - - /* get the node's position in the nodeVector list */ - index = NW_ADT_Vector_GetElementIndex (thisObj->nodeVector, &node); - if (index != NW_ADT_Vector_AtEnd) { - NW_Object_t** value; - - /* retrieve the value from the valueVector list at the same index */ - value = NW_ADT_Vector_ElementAt (thisObj->valueVector, index); - if (value != NULL) { - return *value; - } - } - - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_DOM_ElementNode_t* -_NW_XHTML_ControlSet_GetControl (NW_XHTML_ControlSet_t* thisObj, - NW_ADT_Vector_Metric_t index) -{ - NW_Object_t** node; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ControlSet_Class)); - NW_ASSERT (index < NW_ADT_Vector_GetSize (thisObj->nodeVector)); - - node = NW_ADT_Vector_ElementAt (thisObj->nodeVector, index); - if (node != NULL) { - return (NW_DOM_ElementNode_t*) *node; - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -NW_ADT_DynamicVector_t* -_NW_XHTML_ControlSet_GetValueVector (NW_XHTML_ControlSet_t* thisObj) -{ - NW_ADT_DynamicVector_t* valueVector; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ControlSet_Class)); - - valueVector = thisObj->valueVector; - if (valueVector != NULL) { - /* set our valueVector to NULL to make sure we won't delete it */ - thisObj->valueVector = NULL; - } - - return valueVector; -} - - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_XHTML_ControlSet_t* -NW_XHTML_ControlSet_New (NW_ADT_DynamicVector_t* valueVector) -{ - return (NW_XHTML_ControlSet_t*) - NW_Object_New (&NW_XHTML_ControlSet_Class, valueVector); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_formelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_formElementHandler_Class_t NW_XHTML_formElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_formElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_formElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_formElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_formElementHandler_t NW_XHTML_formElementHandler = { - { { &NW_XHTML_formElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_formElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - TBrowserStatusCode status; - - // parameter assertions - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (elementNode != NULL); - - status = NW_XHTML_ContentHandler_AddFormNodes(contentHandler, elementNode); - if (status != KBrsrSuccess) { - return status; - } - - /* invoke our superclass method */ - status = _NW_XHTML_ElementHandler_Initialize(elementHandler, contentHandler, elementNode); - if (status != KBrsrSuccess) { - return status; - } - - /* create the FormLiaison */ - return NW_XHTML_ContentHandler_AddFormLiaison(contentHandler, elementNode); -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_formElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t *box = NULL; - - // parameter assertions - NW_ASSERT (elementHandler != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (elementHandler, &NW_XHTML_formElementHandler_Class)); - NW_ASSERT (contentHandler != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (elementNode != NULL); - NW_ASSERT (parentBox != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (parentBox, &NW_LMgr_ContainerBox_Class)); - - NW_TRY (status) - { - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (box, status); - - // Add the box to the tree - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - // apply common attributes and styles - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, elementNode, - &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf(box); - // invoke our superclass for completion - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormLiaison.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormLiaison.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3072 +0,0 @@ -/* -* Copyright (c) 2000 - 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include <e32def.h> -#include <calslbs.h> -#include <StringLoader.h> -#include <webkit.rsg> -#include <CommonContentPolicy.h> - -#include "BrCtl.h" -#include "BrCtlDialogsProvider.h" - -#include "BrsrStatusCodes.h" -#include "MVCShell.h" -#include "Epoc32DialogProvider.h" -#include "nw_adt_mapiterator.h" -#include "nw_basicforms_xhtmlformliaisoni.h" -//#include "nw_ecma_contenthandler.h" -#include "nw_dom_document.h" -#include "nw_dom_domvisitor.h" -#include "nw_fbox_formbox.h" -#include "nw_fbox_optgrpbox.h" -#include "NW_FBox_Validator.h" -#include "nw_hed_documentroot.h" -#include "nw_loadreq.h" -#include "nw_nvpair.h" -#include "nw_object_exceptions.h" -#include "nwx_http_defs.h" -#include "nwx_settings.h" -#include "nwx_string.h" -//R->ul #include "urlloader_urlloaderint.h" -#include "TEncodingMapping.h" - - -// LOCAL CONSTANTS -_LIT(KEmptyTitle, ""); - -#if 0 -#if (defined(_DEBUG)) || (defined(_ENABLE_LOGS)) -#define XFL_LOGGING 1 -#include <FLogger.h> - - _LIT(KLogFileName, "XhtmlFormLiaison.log"); - _LIT(KLogDirName, "Browser"); -#endif -#endif -static NW_Bool NW_XHTML_FormLiaison_IsSupportedEncoding(NW_Uint32 encoding) -{ - switch (encoding) - { - case HTTP_gb2312: - case HTTP_big5: - case HTTP_iso_8859_8: - case HTTP_iso_8859_6: - case HTTP_iso_8859_2: - case HTTP_iso_8859_4: - case HTTP_iso_8859_5: - case HTTP_iso_8859_7: - case HTTP_iso_8859_9: - case HTTP_windows_1255: - case HTTP_windows_1256: - case HTTP_windows_1250: - case HTTP_windows_1251: - case HTTP_windows_1253: - case HTTP_windows_1254: - case HTTP_windows_1257: - case HTTP_tis_620: // not flagged because we will not get here unless tis_620 is enabled - case HTTP_shift_JIS: - case HTTP_jis_x0201_1997: - case HTTP_jis_x0208_1997: - case HTTP_euc_jp: - case HTTP_iso_2022_jp: - case HTTP_windows_874: - case HTTP_Koi8_r: //Russian - case HTTP_Koi8_u: //Ukrainian - return NW_TRUE; - default: - return NW_FALSE; - } -} - - -/* ------------------------------------------------------------------------- * - private types - * ------------------------------------------------------------------------- */ -typedef enum NW_XHTML_FormControlType_e { - NW_XHTML_FormControlType_None, - NW_XHTML_FormControlType_InputCheckbox, /* <input type=checkbox> */ - NW_XHTML_FormControlType_InputFile, /* <input type=file> */ - NW_XHTML_FormControlType_InputHidden, /* <input type=hidden> */ - NW_XHTML_FormControlType_InputPassword, /* <input type=password> */ - NW_XHTML_FormControlType_InputRadio, /* <input type=radio> */ - NW_XHTML_FormControlType_InputReset, /* <input type=reset> */ - NW_XHTML_FormControlType_InputSubmit, /* <input type=submit> */ - NW_XHTML_FormControlType_InputText, /* <input type=text> */ - NW_XHTML_FormControlType_InputImage, // <input type=image> - NW_XHTML_FormControlType_Option, /* <option> */ - NW_XHTML_FormControlType_Select, /* <select> */ - NW_XHTML_FormControlType_Textarea /* <textarea> */ -} NW_XHTML_FormControlType_t; - -static const -NW_Object_Core_Class_t NW_XHTML_FormLiaisonTrue_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - } -}; - -static const -NW_Object_Core_t NW_XHTML_FormLiaisonTrue = { - (NW_Object_t*) &NW_XHTML_FormLiaisonTrue_Class, -}; - -static const -NW_Object_Core_Class_t NW_XHTML_FormLiaisonFalse_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - } -}; - -static const -NW_Object_Core_t NW_XHTML_FormLiaisonFalse = { - (NW_Object_t*) &NW_XHTML_FormLiaisonFalse_Class, -}; - - -// LOCAL FUNCTION PROTOTYPES - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_CheckFiles( NW_XHTML_FormLiaison_t* aThisObj, - NW_NVPair_t* aNameValuePairs, TBool* aMissingFiles, TBool* aRestrictedFiles ); - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_DisplayFileMissingConfirmationPrompt( TInt aMissingFiles, - TDesC& aMissingFileName, TBool& aDialogOk ); - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_DisplayFileRestrictedConfirmationPrompt( TInt aRestrictedFiles, - TDesC& aRestrictedFileName, TBool& aDialogOk ); - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_GetNameValuePairs( NW_XHTML_FormLiaison_t* aThisObj, - void* aSubmitButtonNode, NW_NVPair_t** aNameValuePairs ); - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_IterateSuccessfulControls( NW_XHTML_FormLiaison_t* formLiaison, - NW_DOM_ElementNode_t* submitButtonNode, NW_NVPair_NVFunction_t* controlCallback, - NW_NVPair_t* controlCallbackData ); - -static -TBrowserStatusCode -NW_XHTML_FormLiaison_ResetFieldForName( NW_XHTML_FormLiaison_t* aThisObj, - NW_Ucs2* aName ); - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::DisplayFileMissingConfirmationPrompt -// Displays a confirmation prompt, notifying the user that 1 or more files -// were missing and giving the user the choice to continue or cancel. -// @param aMissingFiles Number of files missing. -// @param aMissingFileName Name of the missing file if there is only one -// missing. If more than one missing, this argument is ignored and can be -// NULL. -// @param aDialogOk Returned value EFalse if the user canceled, ETrue otherwise. -// @returns Browser status code: -// KBrsrSuccess if no errors -// KBrsrOutOfMemory if not enough memory -// KBrsrFailure for all other failure conditions -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_FormLiaison_DisplayFileMissingConfirmationPrompt(TInt aMissingFiles, - TDesC& aMissingFileName, - TBool& aDialogOk) - { - TInt err = KErrNone; - HBufC* message = NULL; - HBufC* okMsg = NULL; - HBufC* cancelMsg = NULL; - - // Parameter assertion block. - NW_ASSERT(aMissingFiles >= 1); - - // In the event an error occurs, default is dialog canceled. - aDialogOk = EFalse; - - NW_TRY(status) - { - // Choose which prompt to use. If only one file, then its name is - // displayed. If more than one, then the number of missing files - // is displayed. - if (aMissingFiles == 1) - { - // Extact name.ext from fully-qualified path. - TPtrC ptr(aMissingFileName); - TParsePtrC fileNameParser(ptr); - TPtrC nameAndExt(fileNameParser.NameAndExt()); - - // Load the resource string, inserting the name&ext, add txt to cleanupstack. - /*TRAP(err, message = - StringLoader::LoadLC(R_QTN_XHTML_QUERY_FILE_MISSING, nameAndExt); - CleanupStack::Pop(message););*/ - } - else - { - // Load the resource string, inserting # of missing files. - /*TRAP(err, message = - StringLoader::LoadLC(R_QTN_XHTML_QUERY_FILES_MISSING, aMissingFiles); - CleanupStack::Pop(message););*/ - } - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - - // Set up the OK button text. - TRAP(err, okMsg = StringLoader::LoadLC(R_WML_OK_BUTTON); CleanupStack::Pop(okMsg);); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - - // Set up the CANCEL button text. - TRAP(err, cancelMsg = StringLoader::LoadLC(R_WML_CANCEL_BUTTON); CleanupStack::Pop(cancelMsg);); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } -//R->ul - CShell* shell = NULL;//REINTERPRET_CAST(CShell*, NW_Ctx_Get(NW_CTX_BROWSER_APP, 0)); - NW_ASSERT(shell); - MBrCtlDialogsProvider* brCtlDialogsProvider = shell->BrCtl()->brCtlDialogsProvider(); - - // Display a confirmation dialog. - TRAP(err, aDialogOk = brCtlDialogsProvider->DialogConfirmL( - KEmptyTitle(), *message, *okMsg, *cancelMsg)); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH(status) - { - } - NW_FINALLY - { - // Delete the memory we allocated - delete message; - delete okMsg; - delete cancelMsg; - - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::DisplayFileRestrictedConfirmationPrompt -// Displays a confirmation prompt, notifying the user that 1 or more files -// were restricted (closed-content) and giving the user the choice to continue -// or cancel. -// @param aRestrictedFiles Number of files restricted. -// @param aRestrictedFileName Name of the restricted file if there is only one -// restricted. If more than one restricted, this argument is ignored and -// can be NULL. -// @param aDialogOk Returned value EFalse if the user canceled, ETrue otherwise. -// @returns Browser status code: -// KBrsrSuccess if no errors -// KBrsrOutOfMemory if not enough memory -// KBrsrFailure for all other failure conditions -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_FormLiaison_DisplayFileRestrictedConfirmationPrompt(TInt aRestrictedFiles, - TDesC& aRestrictedFileName, - TBool& aDialogOk) - { - TInt err = KErrNone; - HBufC* message = NULL; - HBufC* okMsg = NULL; - HBufC* cancelMsg = NULL; - - // Parameter assertion block. - NW_ASSERT(aRestrictedFiles >= 1); - - // In the event an error occurs, default is dialog canceled. - aDialogOk = EFalse; - - NW_TRY(status) - { - // Choose which prompt to use. If only one file, then its name is - // displayed. If more than one, then the number of restricted files - // is displayed. - if (aRestrictedFiles == 1) - { - // Extact name.ext from fully-qualified path. - TPtrC ptr(aRestrictedFileName); - TParsePtrC fileNameParser(ptr); - TPtrC nameAndExt(fileNameParser.NameAndExt()); - - // Load the resource string, inserting the name&ext, add txt to cleanupstack. - /*TRAP(err, message = - StringLoader::LoadLC(R_QTN_XHTML_QUERY_FILE_RESTRICTED, nameAndExt); - CleanupStack::Pop(message););*/ - } - else - { - // Load the resource string, inserting # of restricted files. - /*TRAP(err, message = - StringLoader::LoadLC(R_QTN_XHTML_QUERY_FILES_RESTRICTED, aRestrictedFiles); - CleanupStack::Pop(message););*/ - } - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - - // Set up the OK button text. - TRAP(err, okMsg = StringLoader::LoadLC(R_WML_OK_BUTTON); CleanupStack::Pop(okMsg);); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - - // Set up the CANCEL button text. - TRAP(err, cancelMsg = StringLoader::LoadLC(R_WML_CANCEL_BUTTON); CleanupStack::Pop(cancelMsg);); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } -//R->ul - CShell* shell = NULL;//REINTERPRET_CAST(CShell*, NW_Ctx_Get(NW_CTX_BROWSER_APP, 0)); - NW_ASSERT(shell); - MBrCtlDialogsProvider* brCtlDialogsProvider = shell->BrCtl()->brCtlDialogsProvider(); - - // Display a confirmation dialog. - TRAP(err, aDialogOk = brCtlDialogsProvider->DialogConfirmL( - KEmptyTitle(), *message, *okMsg, *cancelMsg)); - if (err) - { - NW_THROW_STATUS(status, ((err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure)); - } - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH(status) - { - } - NW_FINALLY - { - // Delete the memory we allocated - delete message; - delete okMsg; - delete cancelMsg; - - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::IsRestrictedFileL -// Checks a file to see if it is restricted (closed-content of any kind). -// @param aFileName Ptr to the name of the file being checked. -// @returns ETrue if file is closed; else, EFalse. -// ----------------------------------------------------------------------------- -// -static -TBool -IsRestrictedFileL(const TDesC& aFileName) - { - CCommonContentPolicy* contentPolicy = CCommonContentPolicy::NewLC(); - - TBool banned(ETrue); - TRAPD(err, banned = contentPolicy->IsClosedFileL( aFileName )); - if (err == KErrNoMemory) // ignore other errors - { - User::Leave(err); - } - - CleanupStack::PopAndDestroy(); //contentPolicy - - return banned; - } - -//STREAMING: Obtain a lock on all files and keep them until transmitted. This -//will be dealt with when streaming is implemented. -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::CheckFiles -// Checks all of the values for any files to upload. If any are files, two -// checks are made on the files: -// 1. Checks the existance of the files. If any missing, a confirmation prompt -// will be displayed, giving the user the option to continue or cancel. -// 2. Checks the files for closed-content (files that are restricted from being -// transferred.) -// @param aThisObj Ptr to the OOC class structure for this class. -// @param aNameValuePairs Ptr to array of names and values to check. -// @param aMissingFiles Ptr to destination for missing-file(s) indicator. -// @param aRestrictedFiles Ptr to destination for restricted-file(s) indicator. -// @returns Browser status code: -// KBrsrSuccess if no errors -// KBrsrCancelled if the user cancels -// KBrsrOutOfMemory if not enough memory -// KBrsrFailure for all other failure conditions -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_FormLiaison_CheckFiles(NW_XHTML_FormLiaison_t* aThisObj, - NW_NVPair_t* aNameValuePairs, - TBool* aMissingFiles, - TBool* aRestrictedFiles ) - { - NW_Ucs2* name; - NW_Ucs2* value; - TBool missing; - TBool restricted; - TInt missingFiles = 0; - TInt restrictedFiles = 0; - NW_Ucs2* firstMissingFileName = NULL; - NW_Ucs2* firstRestrictedFileName = NULL; - TInt err = KErrNone; - RFs rfs; - TBool rfsConnected = EFalse; - RFile file; - TPtrC fileNamePtr; - - // Parameter assertion block. - NW_ASSERT(aNameValuePairs != NULL); - - NW_TRY(status) - { - // Iterate through all of the values. - (void)NW_NVPair_ResetIter(aNameValuePairs); - while ((status = NW_NVPair_GetNext(aNameValuePairs, &name, &value)) == KBrsrSuccess) - { - // Check to see if it is a file for uploading. - if (NW_LoadReq_IsUploadFile(value)) - { - // If no RFs connection yet, create one. - if (!rfsConnected) - { - err = rfs.Connect(); - if ( err ) - { - NW_THROW_STATUS( status, ((err == KErrNoMemory) - ? KBrsrOutOfMemory : err ) ); - } - rfsConnected = ETrue; - } - - // Get the file name. - fileNamePtr.Set( (TUint16*)value, NW_Str_Strlen( value ) ); - - // Check to see if an exclusive lock on the file can be - // obtained. If not, then the file is either missing, locked - // by another application, or some unexpected error occurred. - // All cases are treated the same -- as if the file is missing, - // with the one exception of out-of-memory, which is reported - // as an error. - missing = EFalse; - err = file.Open( rfs, fileNamePtr, EFileRead | EFileShareExclusive ); - if ( err ) - { - if ( err == KErrNoMemory ) - { - NW_THROW_STATUS( status, KBrsrOutOfMemory ); - } - missing = ETrue; - // If the file is missing, then reset the field. - status = NW_XHTML_FormLiaison_ResetFieldForName( - aThisObj, name ); - NW_THROW_ON_ERROR( status ); - // Count number of missing files and remember name of first. - if ( missingFiles++ == 0 ) - { - firstMissingFileName = value; - } - } - file.Close(); - - // Check to see if the file is restricted. - restricted = EFalse; - if ( !missing ) - { - TRAP( err, restricted = IsRestrictedFileL( fileNamePtr ) ); - if ( err ) - { - NW_THROW_STATUS( status, ((err == KErrNoMemory) - ? KBrsrOutOfMemory : err ) ); - } - if ( restricted ) - { - // If the file is restricted, then reset the field. - status = NW_XHTML_FormLiaison_ResetFieldForName( - aThisObj, name ); - NW_THROW_ON_ERROR( status ); - - // Count number of restricted files and remember name of first. - if ( restrictedFiles++ == 0 ) - { - firstRestrictedFileName = value; - } - } - } - } - } - status = KBrsrSuccess; - - // If any files missing, prompt the user for confirmation. - if ( missingFiles ) - { - TBool dialogOk; - fileNamePtr.Set((TUint16*)firstMissingFileName, - NW_Str_Strlen(firstMissingFileName)); - status = NW_XHTML_FormLiaison_DisplayFileMissingConfirmationPrompt( - missingFiles, fileNamePtr, dialogOk); - _NW_THROW_ON_ERROR( status ); - // If the user did not select OK, then cancel. - if (!dialogOk) - { - NW_THROW_STATUS( status, KBrsrCancelled ); - } - } - - // If any files restricted, prompt the user for confirmation. - if ( restrictedFiles ) - { - TBool dialogOk; - fileNamePtr.Set((TUint16*)firstRestrictedFileName, - NW_Str_Strlen(firstRestrictedFileName)); - status = NW_XHTML_FormLiaison_DisplayFileRestrictedConfirmationPrompt( - restrictedFiles, fileNamePtr, dialogOk); - _NW_THROW_ON_ERROR( status ); - // If the user did not select OK, then cancel. - if (!dialogOk) - { - NW_THROW_STATUS(status, KBrsrCancelled); - } - } - } - // status = KBrsrSuccess; // set by NW_CATCH - NW_CATCH( status ) - { - } - NW_FINALLY - { - if ( rfsConnected ) - { - rfs.Close(); - } - *aMissingFiles = ( missingFiles ) ? ETrue : EFalse; - *aRestrictedFiles = ( restrictedFiles ) ? ETrue : EFalse; - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::GetNameValuePairs -// Iterates through the successful controls and builds a set of name-value pairs. -// @param aThisObj Ptr to the OOC class structure for this class. -// @param aSubmitButtonNode Ptr to the submit-button node. -// @param aNameValuePairs Ptr to destination into which the allocated name-value -// pair set is returned. The caller takes ownership of the memory and is -// responsible for deallocating it. -// @returns Browser status code: -// KBrsrSuccess if no errors -// KBrsrOutOfMemory if not enough memory -// etc. -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_FormLiaison_GetNameValuePairs( NW_XHTML_FormLiaison_t* aThisObj, - void* aSubmitButtonNode, NW_NVPair_t** aNameValuePairs ) - { - // Parameter assertion block. - NW_ASSERT( aThisObj ); - NW_ASSERT( aSubmitButtonNode ); - NW_ASSERT( aNameValuePairs ); - - NW_TRY( status ) - { - *aNameValuePairs = NW_NVPair_New(); - NW_THROW_OOM_ON_NULL( *aNameValuePairs, status ); - - // First pass: calculate the size needed for name-value pairs. - status = NW_XHTML_FormLiaison_IterateSuccessfulControls( aThisObj, - (NW_DOM_ElementNode_t*)aSubmitButtonNode, NW_NVPair_CalSize, - *aNameValuePairs ); - NW_THROW_ON_ERROR( status ); - - // Allocate memory for name-value pairs. - status = NW_NVPair_AllocStorage( *aNameValuePairs ); - NW_THROW_ON_ERROR (status); - - // Second pass: copy name-value pairs to the newly allocated memory. - status = NW_XHTML_FormLiaison_IterateSuccessfulControls( aThisObj, - (NW_DOM_ElementNode_t*)aSubmitButtonNode, NW_NVPair_Add, - *aNameValuePairs ); - NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_FormLiaison::ResetFieldForName -// Resets the field for the form node with the given name. -// @param aThisObj Ptr to the OOC class structure for this class. -// @param aName Ptr to name of the form variable to reset. -// @returns Browser status code: -// KBrsrSuccess if no errors -// KBrsrOutOfMemory if not enough memory -// KBrsrFailure for all other failure conditions -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_FormLiaison_ResetFieldForName( NW_XHTML_FormLiaison_t* aThisObj, - NW_Ucs2* aName ) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t i; - NW_DOM_ElementNode_t* node; - NW_Text_t* name = NULL; - - // Walk through nodes of the form. - for ( i = aThisObj->firstControl; - i < aThisObj->firstControl + aThisObj->numControls; i++ ) - { - // Get node. - node = NW_XHTML_ControlSet_GetControl( aThisObj->controlSet, i ); - - // Get name from DOM tree. - NW_XHTML_GetDOMAttribute( aThisObj->contentHandler, node, - NW_XHTML_AttributeToken_name, &name ); - if ( name != NULL ) - { - NW_Int32 cmp = NW_Str_Strcmp( (NW_Ucs2*)name->storage, aName ); - NW_Object_Delete( name ); - // If this node matches the specified name then reset it. - if ( cmp == 0 ) - { - NW_LMgr_Box_t* box; - box = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt( - aThisObj->controlSet->boxVector, i ); - status = NW_FBox_FormBox_Reset( (NW_FBox_FormBox_t*) box ); - (void)NW_LMgr_Box_Refresh( box ); - break; - } - } - } - return status; - } - - -/* ------------------------------------------------------------------------- */ -static -NW_XHTML_FormControlType_t -NW_XHTML_FormLiaison_GetInputType(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node) -{ - /* default to <input type=text> */ - NW_XHTML_FormControlType_t type = NW_XHTML_FormControlType_InputText; - NW_Text_t* typeValue = NULL; - const NW_Ucs2* typeValueStorage; - NW_Bool typeFreeNeeded = NW_FALSE; - - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, node, - NW_XHTML_AttributeToken_type, &typeValue); - - if (typeValue != NULL) { - /* storage used for compare; force alignment and null-termination */ - typeValueStorage = NW_Text_GetUCS2Buffer (typeValue, - (NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned), - NULL, - &typeFreeNeeded); - - if (NW_Str_StricmpConst (typeValueStorage, "checkbox") == 0) { - type = NW_XHTML_FormControlType_InputCheckbox; - } else if (NW_Str_StricmpConst (typeValueStorage, "file") == 0) { - type = NW_XHTML_FormControlType_InputFile; - } else if (NW_Str_StricmpConst (typeValueStorage, "hidden") == 0) { - type = NW_XHTML_FormControlType_InputHidden; - } else if (NW_Str_StricmpConst (typeValueStorage, "password") == 0) { - type = NW_XHTML_FormControlType_InputPassword; - } else if (NW_Str_StricmpConst (typeValueStorage, "radio") == 0) { - type = NW_XHTML_FormControlType_InputRadio; - } else if (NW_Str_StricmpConst (typeValueStorage, "reset") == 0) { - type = NW_XHTML_FormControlType_InputReset; - } else if (NW_Str_StricmpConst (typeValueStorage, "submit") == 0) { - type = NW_XHTML_FormControlType_InputSubmit; - } else if (NW_Str_StricmpConst (typeValueStorage, "text") == 0) { - type = NW_XHTML_FormControlType_InputText; - } else if (NW_Str_StricmpConst (typeValueStorage, "image") == 0) { - type = NW_XHTML_FormControlType_InputImage; - } - - NW_Object_Delete (typeValue); - if (typeFreeNeeded) { - NW_Str_Delete ((NW_Ucs2*) typeValueStorage); - typeValueStorage = NULL; - } - } - - return type; -} - -/* ------------------------------------------------------------------------- */ -static -NW_XHTML_FormControlType_t -NW_XHTML_FormLiaison_GetControlType(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node) -{ - NW_XHTML_FormControlType_t type = NW_XHTML_FormControlType_None; - NW_Uint16 token; - - token = NW_HED_DomHelper_GetElementToken (node); - - switch (token) { - case NW_XHTML_ElementToken_input: - type = NW_XHTML_FormLiaison_GetInputType(thisObj, node); - break; - case NW_XHTML_ElementToken_option: - type = NW_XHTML_FormControlType_Option; - break; - case NW_XHTML_ElementToken_select: - type = NW_XHTML_FormControlType_Select; - break; - case NW_XHTML_ElementToken_textarea: - type = NW_XHTML_FormControlType_Textarea; - break; - default: - type = NW_XHTML_FormControlType_None; - break; - } - - return type; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_FormLiaison_CallControlCallback (const NW_Text_t* controlName, - const NW_Text_t* controlValue, - NW_NVPair_NVFunction_t* controlCallback, - NW_NVPair_t* controlCallbackData) -{ - TBrowserStatusCode status = KBrsrSuccess; - const NW_Ucs2* name = NULL; - NW_Bool nameFreeNeeded = NW_FALSE; - const NW_Ucs2* value = NULL; - NW_Bool valueFreeNeeded = NW_FALSE; - - /* only process controls that have a name */ - if (controlName != NULL) { - name = NW_Text_GetUCS2Buffer (controlName, - ( NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned ), - NULL, - &nameFreeNeeded); - if (controlValue != NULL) { - value = NW_Text_GetUCS2Buffer (controlValue, - (NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned), - NULL, - &valueFreeNeeded); - } - - status = controlCallback (controlCallbackData, name, value); - - if (nameFreeNeeded) { - NW_Mem_Free ((void*)name); /* const cast-away */ - } - if (valueFreeNeeded) { - NW_Mem_Free ((void*)value); /* const cast-away */ - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_FormLiaison_IterateSuccessfulControls (NW_XHTML_FormLiaison_t* formLiaison, - NW_DOM_ElementNode_t* submitButtonNode, - NW_NVPair_NVFunction_t* controlCallback, - NW_NVPair_t* controlCallbackData) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_ADT_Vector_Metric_t i; - NW_DOM_ElementNode_t* node; - NW_Text_t* value = NULL; - NW_Text_t* name = NULL; - NW_Bool isOn; - NW_Bool dummy; /* used by NW_FBox_FormLiaison_GetStringValue to indicate if a value attribute was specified */ - - /* walk through the form collecting the submit string */ - for (i = formLiaison->firstControl; - (status == KBrsrSuccess && - i < formLiaison->firstControl + formLiaison->numControls); - i++) { - /* get node */ - node = NW_XHTML_ControlSet_GetControl (formLiaison->controlSet, i); - - /* get name and value */ - switch (NW_XHTML_FormLiaison_GetControlType (formLiaison, node)) { - case NW_XHTML_FormControlType_InputCheckbox: - case NW_XHTML_FormControlType_InputRadio: - status = NW_FBox_FormLiaison_GetBoolValue ( - (NW_FBox_FormLiaison_t*) formLiaison, node, &isOn); - - /* only submit checked checkboxes and radiobuttons */ - if (status == KBrsrSuccess && isOn) { - /* get the name from the DOM tree */ - NW_XHTML_GetDOMAttribute (formLiaison->contentHandler, node, - NW_XHTML_AttributeToken_name, &name); - if (name != NULL) { - /* - * Bug - Fix MK02052137535: HTML 4.01 spec says, value attribute - * is mandatory for checkbox and radiobutton, in the abscense of - * value attribute for checkbox or radiobutton, browser post "on" - * value, to be consistant with the other popular browsers. - */ - NW_Ucs2 on[] = {'o','n', 0}; - /* get the value from the DOM tree */ - NW_XHTML_GetDOMAttribute (formLiaison->contentHandler, node, - NW_XHTML_AttributeToken_value, &value); - if(!value) - { - value = NW_Text_New (HTTP_iso_10646_ucs_2, on, NW_Str_Strlen(on), NW_FALSE); - } - - status = NW_XHTML_FormLiaison_CallControlCallback ( - name, - value, - controlCallback, - controlCallbackData); - - NW_Object_Delete (value); - NW_Object_Delete (name); - } - } - break; - - case NW_XHTML_FormControlType_InputImage: - { - // do not submit input image other than the one that was pressed - // pressed button has 'on' string value - - // get the name from the DOM tree - NW_XHTML_GetDOMAttribute( formLiaison->contentHandler, node, - NW_XHTML_AttributeToken_name, &name ); - - if( name ) - { - // check if this button was pressed - status = NW_FBox_FormLiaison_GetStringValue( (NW_FBox_FormLiaison_t*) formLiaison, - node, &value, &dummy ); - if( status == KBrsrSuccess && value ) - { - // 'on' keyword - NW_Ucs2 onStr[] = { 'o', 'n', 0 }; - NW_Text_t* onText = NW_Text_New( HTTP_iso_10646_ucs_2, onStr, - NW_Str_Strlen( onStr ), NW_Text_Flags_Copy ); - - if( onText && NW_Text_Compare( value, onText ) == 0 ) - { - // simulate pointer event by adding .x and .y to the POST - // it is required by some servers. - NW_Text_t* xName = NULL; - NW_Text_t* yName = NULL; - NW_Text_t* xPostString = NULL; - NW_Text_t* yPostString = NULL; - NW_Text_t* xValue = NULL; - NW_Text_t* yValue = NULL; - // - NW_TRY( status ) - { - // post should look like this: buttonName.x=1 buttonName.y=1 - NW_Ucs2 x[] = {'.','x', 0}; - NW_Ucs2 y[] = {'.','y', 0}; - NW_Ucs2 xyValue[] = {'1', 0}; - - // create .x and.y strings - xName = NW_Text_New( HTTP_iso_10646_ucs_2, x, NW_Str_Strlen( x ), NW_Text_Flags_Copy ); - NW_THROW_OOM_ON_NULL( xName, status ); - - yName = NW_Text_New( HTTP_iso_10646_ucs_2, y, NW_Str_Strlen( y ), NW_Text_Flags_Copy ); - NW_THROW_OOM_ON_NULL( yName, status ); - - // add .x and .y to buttonName - xPostString = NW_Text_Concatenate( name, xName ); - NW_THROW_OOM_ON_NULL( xPostString, status ); - - yPostString = NW_Text_Concatenate( name, yName ); - NW_THROW_OOM_ON_NULL( yPostString, status ); - - // create values x and y '1' - xValue = NW_Text_New( HTTP_iso_10646_ucs_2, xyValue, NW_Str_Strlen( xyValue ), NW_Text_Flags_Copy ); - NW_THROW_OOM_ON_NULL( xValue, status ); - - yValue = NW_Text_New( HTTP_iso_10646_ucs_2, xyValue, NW_Str_Strlen( xyValue ), NW_Text_Flags_Copy ); - NW_THROW_OOM_ON_NULL( yValue, status ); - - // send buttonName.x=1 - status = NW_XHTML_FormLiaison_CallControlCallback( xPostString, xValue, - controlCallback, controlCallbackData); - // send buttonName.y=1 - status = NW_XHTML_FormLiaison_CallControlCallback( yPostString, yValue, - controlCallback, controlCallbackData); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - NW_Object_Delete( xName ); - NW_Object_Delete( yName ); - NW_Object_Delete( xPostString ); - NW_Object_Delete( yPostString ); - NW_Object_Delete( xValue ); - NW_Object_Delete( yValue ); - } - NW_END_TRY - } - NW_Object_Delete( onText ); - } - NW_Object_Delete( name ); - } - break; - } - case NW_XHTML_FormControlType_InputSubmit: - if (node != submitButtonNode) { - /* do not submit buttons other than the one that was pressed */ - break; - } - /* FALL THROUGH */ - /*lint -fallthrough*/ - - // FALL THROUGH - - case NW_XHTML_FormControlType_InputFile: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputHidden: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputReset: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputText: /* FALL THROUGH */ - case NW_XHTML_FormControlType_Textarea: - /* get the name from the DOM tree */ - NW_XHTML_GetDOMAttribute (formLiaison->contentHandler, node, - NW_XHTML_AttributeToken_name, &name); - - if (name != NULL) { - /* use the current value in the control set */ - status = NW_FBox_FormLiaison_GetStringValue ( - (NW_FBox_FormLiaison_t*) formLiaison, - node, - &value, - &dummy); - if (status == KBrsrSuccess) { - status = NW_XHTML_FormLiaison_CallControlCallback ( - name, - value, - controlCallback, - controlCallbackData); - /* must not delete the value as it is owned by the control set */ - } - NW_Object_Delete (name); - } - break; - - case NW_XHTML_FormControlType_Option: - status = NW_FBox_FormLiaison_GetBoolValue ((NW_FBox_FormLiaison_t*) formLiaison, - node, - &isOn); - - /* only submit selected options */ - if (status == KBrsrSuccess && isOn) { - NW_DOM_ElementNode_t* selectNode; - - /* find the enclosing <select> element */ - selectNode = node; - while ((selectNode = NW_DOM_Node_getParentNode (selectNode)) != NULL) { - if (NW_XHTML_FormLiaison_GetControlType (formLiaison, selectNode) == - NW_XHTML_FormControlType_Select) { - /* found the <select> node */ - break; - } - } - - /* if we found the <select> node, get its name from the DOM tree */ - if (selectNode != NULL) { - NW_XHTML_GetDOMAttribute (formLiaison->contentHandler, selectNode, - NW_XHTML_AttributeToken_name, &name); - } - - if (name != NULL) { - /* get the value initial string value */ - status = NW_FBox_FormLiaison_GetStringValue ( - (NW_FBox_FormLiaison_t*) formLiaison, - node, - &value, - &dummy); - - if (status == KBrsrSuccess) { - status = NW_XHTML_FormLiaison_CallControlCallback ( - name, - value, - controlCallback, - controlCallbackData); - /* must delete value as it is *not* owned by the control set */ - NW_Object_Delete (value); - } - NW_Object_Delete (name); - } - } - break; - - case NW_XHTML_FormControlType_Select: - /* - * TODO: an optimization would be to save the name of the <select> - * element to the form liaison so that every <option> inside the - * <select> element could pick it up from there. However, doing - * so would necessarily spread out the code somewhat, so for now - * let's just go through the process of finding the name of the - * <select> element in the NW_XHTML_FormControlType_Option case. - */ - /* FALL THROUGH */ - default: - /* do nothing */ - break; - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Object_t* -NW_XHTML_FormLiaison_GetBoolAttribute(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node, - const NW_Uint16 nameToken, - const NW_Ucs2* nameTag) -{ - NW_Object_t* value; - NW_Ucs2* nameAttr = NULL; - TBrowserStatusCode status; - - status = NW_XHTML_ElementHandler_GetAttribute(thisObj->contentHandler, node, - nameToken, &nameAttr); - - if (status == KBrsrSuccess) { - if ( NW_Str_Stricmp( nameAttr, nameTag ) == 0 ) { - /* only attribute="attribute" maps to NW_TRUE */ - - /* See task / bug references at implementation. - if(IsPrevSiblingNodeChecked((*thisObj).contentHandler, node)) - value = (NW_Object_t*) &NW_XHTML_FormLiaisonFalse; - else - */ - value = (NW_Object_t*) &NW_XHTML_FormLiaisonTrue; - } else { - /* everything else maps to NW_FALSE */ - value = (NW_Object_t*) &NW_XHTML_FormLiaisonFalse; - } - - NW_Str_Delete((NW_Ucs2*) nameAttr); - nameAttr = NULL; - } else { - /* map attribute not found to NW_FALSE */ - value = (NW_Object_t*) &NW_XHTML_FormLiaisonFalse; - } - - return value; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_FormLiaison_SetCheckboxValue(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node, - NW_Bool value) -{ - NW_Object_t* valueObj; - - valueObj = (NW_Object_t*) - (value ? &NW_XHTML_FormLiaisonTrue : &NW_XHTML_FormLiaisonFalse); - - return NW_XHTML_ControlSet_SetValue(thisObj->controlSet, node, valueObj); -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_FormLiaison_SetOptionValue(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node, - NW_Bool value) -{ - static const NW_Ucs2 multipleTag[] = {'m','u','l','t','i','p','l','e','\0'}; - NW_DOM_ElementNode_t* selectNode; - - /* first find the enclosing <select> element */ - selectNode = node; - while ((selectNode = NW_DOM_Node_getParentNode(selectNode)) != NULL) { - if (NW_XHTML_FormLiaison_GetControlType(thisObj, selectNode) == - NW_XHTML_FormControlType_Select) { - /* found the <select> node */ - break; - } - } - - /* if we found the <select> node, see if it has a multiple attribute */ - if (selectNode != NULL) { - if (NW_XHTML_FormLiaison_GetBoolAttribute(thisObj, - selectNode, - NW_XHTML_AttributeToken_multiple, - multipleTag) == - (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) { - NW_Object_t* valueObj; - - /* found multiple="multiple"; just set the value of this option */ - valueObj = (NW_Object_t*) - (value ? &NW_XHTML_FormLiaisonTrue : &NW_XHTML_FormLiaisonFalse); - - return NW_XHTML_ControlSet_SetValue(thisObj->controlSet, node, valueObj); - } else { - - NW_cXML_DOM_DOMVisitor_t* domVisitor; - NW_DOM_Node_t* domNode; - - /* no multiple attribute; select this option and deselect others */ - - if(!value) return KBrsrFailure; - - /* first select this option */ - if (NW_XHTML_ControlSet_SetValue(thisObj->controlSet, - node, - (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) != - KBrsrSuccess) { - return KBrsrFailure; - } - - /* then deselect others */ - domVisitor = NW_cXML_DOM_DOMVisitor_New(selectNode); - if (domVisitor != NULL) { - while ((domNode = NW_cXML_DOM_DOMVisitor_Next(domVisitor, - NW_DOM_ELEMENT_NODE)) != - NULL) { - if (domNode != node && - NW_XHTML_FormLiaison_GetControlType(thisObj, domNode) == - NW_XHTML_FormControlType_Option) { - /* found another <option> node; deselect it */ - if (NW_XHTML_ControlSet_SetValue(thisObj->controlSet, - domNode, - (NW_Object_t*) &NW_XHTML_FormLiaisonFalse) != - KBrsrSuccess) { - NW_Object_Delete (domVisitor); - return KBrsrFailure; - } - } - } - - NW_Object_Delete (domVisitor); - } - } - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_ResetRadioValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Bool *value) - { - NW_XHTML_FormLiaison_t* thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - NW_Object_t* valueObj = (NW_Object_t*) (*value ? &NW_XHTML_FormLiaisonTrue : &NW_XHTML_FormLiaisonFalse); - - NW_XHTML_ControlSet_SetValue( thisObj->controlSet, (NW_DOM_ElementNode_t*) node, valueObj ); - - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_FormLiaison_SetRadioValue(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node, - NW_Bool value) -{ - NW_Text_t* aNameValue = NULL; - NW_Text_t* bNameValue = NULL; - const NW_Ucs2* aNameValueStorage; - const NW_Ucs2* bNameValueStorage; - NW_Text_Length_t aLength; - NW_Text_Length_t bLength; - NW_DOM_ElementNode_t* bNode; - NW_ADT_Vector_Metric_t i; - - /* find the control name of the radio button */ - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, node, - NW_XHTML_AttributeToken_name, &aNameValue); - if (aNameValue == 0) { - return KBrsrSuccess; - } - - /* radiobutton can only be switched on */ - if (value == NW_FALSE) { - NW_Object_Delete(aNameValue); - return KBrsrFailure; - } - - /* set the radiobutton itself on */ - if (NW_XHTML_ControlSet_SetValue(thisObj->controlSet, - node, - (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) != - KBrsrSuccess) { - NW_Object_Delete(aNameValue); - return KBrsrFailure; - } - - /* if the radiobutton has a name, look for others with the same name */ - /* storage only used for memcmp; no need to force alignment */ - aNameValueStorage = NW_Text_GetUCS2Buffer(aNameValue, - 0, - &aLength, - NULL); - - /* iterate through all controls of the form */ - for (i = thisObj->firstControl; - i < thisObj->firstControl + thisObj->numControls; - i++) { - bNode = NW_XHTML_ControlSet_GetControl (thisObj->controlSet, i); - - if (NW_XHTML_FormLiaison_GetControlType(thisObj, bNode) == - NW_XHTML_FormControlType_InputRadio && - bNode != node) { - /* set other radiobuttons with the same name off */ - - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, bNode, - NW_XHTML_AttributeToken_name, &bNameValue); - - if (bNameValue != NULL) { - /* storage only used for memcmp; no need to force alignment */ - bNameValueStorage = NW_Text_GetUCS2Buffer(bNameValue, 0, - &bLength, NULL); - - if (aLength == bLength && NW_Mem_memcmp(aNameValueStorage, - bNameValueStorage, - aLength*sizeof(NW_Ucs2)) == 0) { - /* found another radiobutton of the same name; force it off */ - if (NW_XHTML_ControlSet_SetValue(thisObj->controlSet, - bNode, - (NW_Object_t*) &NW_XHTML_FormLiaisonFalse) != - KBrsrSuccess) { - NW_Object_Delete(bNameValue); - NW_Object_Delete(aNameValue); - return KBrsrFailure; - } - } - - NW_Object_Delete(bNameValue); - } - } - } - - NW_Object_Delete(aNameValue); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Object_t* -NW_XHTML_FormLiaison_GetRadioValue(NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node) -{ - NW_Text_t* aNameValue; - NW_Text_t* bNameValue; - const NW_Ucs2* aNameValueStorage; - const NW_Ucs2* bNameValueStorage; - NW_Text_Length_t aLength; - NW_Text_Length_t bLength; - NW_DOM_ElementNode_t* bNode; - NW_ADT_Vector_Metric_t i; - NW_Object_t* value; - NW_Object_t* checked; - static const NW_Ucs2 checkedTag[] = {'c','h','e','c','k','e','d','\0'}; - - /* find the control name of the radio button */ - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, node, - NW_XHTML_AttributeToken_name, &aNameValue); - - /* if the radiobutton has a name, look for others with the same name */ - if (aNameValue != NULL) { - /* storage only used for memcmp; no need to force alignment */ - aNameValueStorage = NW_Text_GetUCS2Buffer(aNameValue, - 0, - &aLength, - NULL); - - /* iterate through all controls of the form */ - for (i = thisObj->firstControl; - i < thisObj->firstControl + thisObj->numControls; - i++) { - bNode = NW_XHTML_ControlSet_GetControl (thisObj->controlSet, i); - - if (NW_XHTML_FormLiaison_GetControlType(thisObj, bNode) == - NW_XHTML_FormControlType_InputRadio) { - - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, bNode, - NW_XHTML_AttributeToken_name, - &bNameValue); - - if (bNameValue != NULL) { - /* storage only used for memcmp; no need to force alignment */ - bNameValueStorage = NW_Text_GetUCS2Buffer(bNameValue, 0, - &bLength, NULL); - - if (aLength == bLength && NW_Mem_memcmp(aNameValueStorage, - bNameValueStorage, - aLength*sizeof(NW_Ucs2)) == 0) { - /* Found another radiobutton of the same name. - */ - checked = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - bNode, - NW_XHTML_AttributeToken_checked, - checkedTag); - - /* If multiple radiobuttons with the same name are checked, - * ignore all but the first. - */ - if (checked == (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) { - if (bNode == node) { - value = (NW_Object_t*) &NW_XHTML_FormLiaisonTrue; - } else { - value = (NW_Object_t*) &NW_XHTML_FormLiaisonFalse; - } - NW_Object_Delete(bNameValue); - NW_Object_Delete(aNameValue); - return value; - } - } - NW_Object_Delete(bNameValue); - } - } - } - NW_Object_Delete(aNameValue); - - return (NW_Object_t*) &NW_XHTML_FormLiaisonFalse; - } - - /* RadioButton didn't have a name. */ - return NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - node, - NW_XHTML_AttributeToken_checked, - checkedTag); -} - -/* ------------------------------------------------------------------------- */ -static -NW_Object_t* -NW_XHTML_FormLiaison_GetChildText (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - TBrowserStatusCode status; - NW_String_t childText; - NW_Text_t* text = NULL; - - status = NW_HED_DomHelper_GetChildText (&contentHandler->domHelper, - elementNode, - &childText); - if (status == KBrsrSuccess) { - text = (NW_Text_t*) NW_Text_UCS2_New (childText.storage, - NW_String_getCharCount (&childText, HTTP_iso_10646_ucs_2), - NW_Text_Flags_TakeOwnership); - - } - - /* Ideally this method should return TBrowserStatusCode but text = NULL reflects OOM - Vishy 7/8/2002 */ - return (NW_Object_t*) text; -} - -/* ------------------------------------------------------------------------- */ -NW_Object_t* -NW_XHTML_FormLiaison_GetInitialValue (NW_XHTML_FormLiaison_t* thisObj, - NW_DOM_ElementNode_t* node) -{ - NW_Object_t* value = NULL; - static const NW_Ucs2 checkedTag[] = {'c','h','e','c','k','e','d','\0'}; - static const NW_Ucs2 selectedTag[] = {'s','e','l','e','c','t','e','d','\0'}; - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, node)) { - case NW_XHTML_FormControlType_InputCheckbox: - value = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - node, - NW_XHTML_AttributeToken_checked, - checkedTag); - break; - - case NW_XHTML_FormControlType_InputRadio: - value = NW_XHTML_FormLiaison_GetRadioValue (thisObj, node); - break; - - case NW_XHTML_FormControlType_Option: - value = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - node, - NW_XHTML_AttributeToken_selected, - selectedTag); - break; - - case NW_XHTML_FormControlType_InputHidden: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputReset: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputSubmit: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputText: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputImage: // FALL THROUGH - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, node, - NW_XHTML_AttributeToken_value, (NW_Text_t**)&value); - break; - - case NW_XHTML_FormControlType_Textarea: - /* get the child text node */ - value = NW_XHTML_FormLiaison_GetChildText (thisObj->contentHandler, node); - break; - - case NW_XHTML_FormControlType_InputFile: /* FALL THROUGH */ - case NW_XHTML_FormControlType_Select: /* FALL THROUGH */ - default: - value = NULL; - break; - } - - return value; -} - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_FormLiaison_Class_t NW_XHTML_FormLiaison_Class = { - { /* NW_Object_Core */ - /* super */ &NW_FBox_FormLiaison_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_FormLiaison_t), - /* construct */ _NW_XHTML_FormLiaison_Construct, - /* destruct */ _NW_XHTML_FormLiaison_Destruct - }, - { /* NW_FBox_FormLiaison */ - /* getWBXMLVersion */ _NW_XHTML_FormLiaison_GetWBXMLVersion, - /* addControl */ _NW_XHTML_FormLiaison_AddControl, - /* setInitialStringValue */ _NW_XHTML_FormLiaison_SetInitialStringValue, - /* setStringValue */ _NW_XHTML_FormLiaison_SetStringValue, - /* validateStringValue */ _NW_XHTML_FormLiaison_ValidateStringValue, - /* getStringValue */ _NW_XHTML_FormLiaison_GetStringValue, - /* getStringName */ _NW_XHTML_FormLiaison_GetStringName, - /* getStringTitle */ _NW_XHTML_FormLiaison_GetStringTitle, - /* setBoolValue */ _NW_XHTML_FormLiaison_SetBoolValue, - /* resetRadioValue */ _NW_XHTML_FormLiaison_ResetRadioValue, - /* toggleBoolValue */ _NW_XHTML_FormLiaison_ToggleBoolValue, - /* getBoolValue */ _NW_XHTML_FormLiaison_GetBoolValue, - /* reset */ _NW_XHTML_FormLiaison_Reset, - /* submit */ _NW_XHTML_FormLiaison_Submit, - /* focus */ _NW_XHTML_FormLiaison_Focus, - /* isOptionMultiple */ _NW_XHTML_FormLiaison_IsOptionMultiple, - /* isOptionSelected */ _NW_XHTML_FormLiaison_IsOptionSelected, - /* optionHasOnPick */ _NW_XHTML_FormLiaison_OptionHasOnPick, - /* isLocalNavOnPick */ _NW_XHTML_FormLiaison_IsLocalNavOnPick, - /* getInitialValue */ _NW_XHTML_FormLiaison_GetInitialValue, - /* getDocRoot */ _NW_XHTML_FormLiaison_GetDocRoot, - /* delegateEcmaEvent */ _NW_XHTML_FormLiaison_DelegateEcmaEvent - }, - { /* NW_XHTML_FormLiaison */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_XHTML_FormLiaison_GetInitialValue (NW_FBox_FormLiaison_t* formLiaison, - void* controlId) -{ - static const NW_Ucs2 checkedTag[] = {'c','h','e','c','k','e','d','\0'}; - static const NW_Ucs2 selectedTag[] = {'s','e','l','e','c','t','e','d','\0'}; - - NW_Bool retvalue = NW_FALSE; - NW_Object_t* value = NULL; - NW_DOM_ElementNode_t* node = (NW_DOM_ElementNode_t*) controlId; - NW_XHTML_FormLiaison_t* thisObj; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, node)) { - case NW_XHTML_FormControlType_InputCheckbox: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputRadio: - value = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - node, - NW_XHTML_AttributeToken_checked, - checkedTag); - break; - - case NW_XHTML_FormControlType_Option: - value = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - node, - NW_XHTML_AttributeToken_selected, - selectedTag); - break; - - case NW_XHTML_FormControlType_InputHidden: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputText: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputImage: // FALL THROUGH - case NW_XHTML_FormControlType_InputSubmit: - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, node, - NW_XHTML_AttributeToken_value, (NW_Text_t**)&value); - break; - - case NW_XHTML_FormControlType_Textarea: - /* get the child text node */ - value = NW_XHTML_FormLiaison_GetChildText (thisObj->contentHandler, node); - break; - - - case NW_XHTML_FormControlType_Select: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputFile: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputReset: /* FALL THROUGH */ - default: - value = NULL; - break; - } - - if (value == (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) - { - retvalue = NW_TRUE; - } - return retvalue; -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_XHTML_FormLiaison_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_XHTML_FormLiaison_Class)); - NW_ASSERT (argp != NULL); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (dynamicObject); - - /* initialize our member variables */ - thisObj->formNode = va_arg (*argp, NW_DOM_ElementNode_t*); - thisObj->contentHandler = va_arg (*argp, NW_XHTML_ContentHandler_t*); - - thisObj->controlSet = va_arg (*argp, NW_XHTML_ControlSet_t*); - - (void)NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_name, &thisObj->formName ); - - (void)NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_action, &thisObj->formAction ); - - (void)NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_method, &thisObj->formMethod ); - - (void)NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_enctype, &thisObj->formEnctype ); - - (void)NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_id, &thisObj->formId ); - - if(!thisObj->formAction) - { - thisObj->formAction = (NW_Text_t*)NW_Text_UCS2_New((void * )"",0, NW_Text_Flags_Aligned | NW_Text_Flags_Copy); - if (!thisObj->formAction) - { - status = KBrsrOutOfMemory; - } - } - - if(!thisObj->formMethod) - { - thisObj->formMethod = (NW_Text_t*)NW_Text_UCS2_New((void * )"",0, NW_Text_Flags_Aligned | NW_Text_Flags_Copy); - if (!thisObj->formMethod) - { - status = KBrsrOutOfMemory; - } - } - /* - * initialize numControls and firstControl for now; they will get their - * proper values when controls get added to the form liaison in _AddControl - */ - thisObj->numControls = 0; - thisObj->firstControl = NW_ADT_Vector_AtEnd; - - /* successful completion */ - return status; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_XHTML_FormLiaison_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_XHTML_FormLiaison_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, - &NW_XHTML_FormLiaison_Class)); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (dynamicObject); - - NW_Object_Delete (thisObj->formName); - NW_Object_Delete (thisObj->formAction); - NW_Object_Delete (thisObj->formMethod); - NW_Object_Delete (thisObj->formEnctype); - NW_Object_Delete (thisObj->formId); - - /* delete the validatorMap and its contents (if it exists) */ - if (thisObj->validatorMap != NULL) { - NW_ADT_Iterator_t* iterator; - void** entry; - - iterator = (NW_ADT_Iterator_t*) - NW_ADT_MapIterator_New (thisObj->validatorMap); - while ((entry = NW_ADT_Iterator_NextElement(iterator)) - != NULL) { - NW_FBox_Validator_t* validator; - - TBrowserStatusCode status = NW_ADT_Map_Get( thisObj->validatorMap, entry, &validator ); - NW_ASSERT (status == KBrsrSuccess); - NW_Object_Delete (validator); - } - NW_Object_Delete (iterator); - NW_Object_Delete (thisObj->validatorMap); - } -} - -/***************************************************************** - - Name: _NW_XHTML_FormLiaison_GetWBXMLVersion() - - Description: The WBXML version of the XHTML document is retrieved and translated - to an enum as defined by TWapDocType in "rb_tempest\fbox\include\ - CoreWrapper.h" - - Parameters: aWapDocType is an "out" parameter, representative of spec level of - conformance with W3C XHTML the gateway encoder used to - encode the content from the origin server. - - Algorithm: Using NW_FBox_FormLiaison_t, look up the version field - maintained under tinyparser/domtree/doc/version. - - Return Value: KBrsrSuccess, if pointers valid and a value exists - otherwise, return KBrsrFailure - -*****************************************************************/ -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetWBXMLVersion(NW_FBox_FormLiaison_t* thisObj, - NW_Uint32* wmlVersion) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_REQUIRED_PARAM(thisObj); - *wmlVersion = NW_xhtml_1_0_PublicId; - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_AddControl (NW_FBox_FormLiaison_t* formLiaison, - void* node) -{ - NW_XHTML_FormLiaison_t* thisObj; - TBrowserStatusCode status; - NW_ADT_Vector_Metric_t index; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (formLiaison, &NW_XHTML_FormLiaison_Class)); - NW_ASSERT (node != NULL); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - status = NW_XHTML_ControlSet_AddNode (thisObj->controlSet, - (NW_DOM_ElementNode_t*) node, &index); - if (status != KBrsrSuccess) { - return status; - } - - /* update the indices */ - /* TODO: fix this for embedded forms (LT) */ - if (thisObj->numControls == 0) { - /* we are dealing with the first control of the form; save its index */ - thisObj->firstControl = index; - } - thisObj->numControls++; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetInitialStringValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Text_Length_t maxChars) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_XHTML_FormLiaison_t* thisObj; - NW_Object_t* valueObj; - NW_Text_t* valueText; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (formLiaison, &NW_XHTML_FormLiaison_Class)); - NW_ASSERT (node != NULL); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - valueText = (NW_Text_t*) NW_XHTML_ControlSet_GetValue(thisObj->controlSet, - (NW_DOM_ElementNode_t*) node); - - if ( valueText != NULL ) { - /* The control already has a value. Don't change it. */ - return KBrsrSuccess; - } - - valueObj = NW_XHTML_FormLiaison_GetInitialValue ((NW_XHTML_FormLiaison_t*) thisObj, - (NW_DOM_ElementNode_t*) node); - /* Make sure initial string is less then or equal to maximum characters that are allowed */ - if ((valueObj != NULL) && (NW_TextOf(valueObj)->characterCount <= maxChars)) { - NW_ASSERT (NW_Object_IsInstanceOf (valueObj, &NW_Text_Abstract_Class)); - status = NW_FBox_FormLiaison_SetStringValue((NW_FBox_FormLiaison_t*) thisObj, - node, - NW_TextOf(valueObj)); - if (status != KBrsrSuccess) { - /* Failed so did not take ownership of valueObj. Free it up. */ - NW_Object_Delete( valueObj ); - } - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetStringValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Text_t* value) -{ - TBrowserStatusCode status; - NW_XHTML_FormLiaison_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (formLiaison, &NW_XHTML_FormLiaison_Class)); - NW_ASSERT (node != NULL); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, (NW_DOM_ElementNode_t*) node)) { - case NW_XHTML_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputText: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputImage: // FALL THROUGH - case NW_XHTML_FormControlType_Textarea: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputHidden: - status = NW_FBox_FormLiaison_ValidateStringValue (formLiaison, node, value); - if (status != KBrsrSuccess) { - return status; - } - status = NW_XHTML_ControlSet_SetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*)node, - value); - break; - - // No validation for file input. Users cannot enter file name directly. - case NW_XHTML_FormControlType_InputFile: - status = NW_XHTML_ControlSet_SetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*)node, - value); - break; - - - default: - /* - * cannot set value; the input element is of an unknown type, - * reset, submit or one of the elements with boolean value - */ - status = KBrsrFailure; - break; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_ValidateStringValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - const NW_Text_t* value) -{ - TBrowserStatusCode status; - NW_XHTML_FormLiaison_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (formLiaison, &NW_XHTML_FormLiaison_Class)); - NW_ASSERT (node != NULL); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - /* do nothing if there are no validators at all */ - status = KBrsrSuccess; - if (thisObj->validatorMap != NULL) { - NW_FBox_Validator_t* validator; - - /* get the validator */ - status = NW_ADT_Map_Get (thisObj->validatorMap, &node, &validator); - if (status == KBrsrSuccess && validator != NULL) { - /* the validator makes the ultimate decision about the validity of - the string */ - return NW_FBox_Validator_Validate (validator, value); - } - } - if(status == KBrsrNotFound) - { - status = KBrsrSuccess ; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Text_t** valueOut, - NW_Bool* initialValueUsed) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Text_t* value = NULL; - NW_XHTML_FormLiaison_t* thisObj; - - NW_REQUIRED_PARAM(initialValueUsed); - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - /* if a set value exists, return it; otherwise return reset value */ - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, (NW_DOM_ElementNode_t*) node)) { - case NW_XHTML_FormControlType_InputFile: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputPassword: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputText: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputImage: // FALL THROUGH - case NW_XHTML_FormControlType_Textarea: /* FALL THROUGH */ - value = (NW_Text_t*) NW_XHTML_ControlSet_GetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*) node); - - /* Only inputText, inputPassword, and textarea have input format properties. - Move the decision to set to initial value in element handler, so can - check for a valid input values. */ - break; - - case NW_XHTML_FormControlType_InputHidden: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputReset: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputSubmit: /* FALL THROUGH */ - value = (NW_Text_t*) NW_XHTML_ControlSet_GetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*) node); - - /* Put decision to set to initial value in element handler, so can - check for a valid value. */ - /* if value has not been set yet, use the initial (reset) value */ - if (value == NULL) { - value = (NW_Text_t*) NW_XHTML_FormLiaison_GetInitialValue (thisObj, - (NW_DOM_ElementNode_t*) node); - - /* set value so that it will be released by the control set */ - status = NW_XHTML_ControlSet_SetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*) node, value); - } - break; - - case NW_XHTML_FormControlType_Option: - /* - * <option> is a special case since it has both the editable boolean - * value (selected="selected") and the initial string value (either - * value attribute or enclosed text). - * This function deals with the initial string value only. - * The initial boolean value can be obtained with _GetInitialValue(). - * The main difference compared to other elements handled by this - * function is that the obtained value is *not* saved to the control set - * because the control set deals with the <option> boolean value only. - * The caller must thus deallocate the value. - * - * NOTE: The order of precedence for rendering (in Select element handler) - * is different from the code here for sending to server. Also, we - * support attributes from both WML and Xhtml/Html. - */ - - /* first try to get the value from the value attribute */ - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, - (NW_DOM_ElementNode_t*) node, NW_XHTML_AttributeToken_value, &value); - - if (value == NULL) { - /* no value attribute; try the enclosed text */ - value = (NW_Text_t*) NW_XHTML_FormLiaison_GetChildText (thisObj->contentHandler, - (NW_DOM_ElementNode_t*) node); - - /*NW_Ucs2* temp = NW_Text_GetUCS2Buffer (value, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, NULL);*/ - - NW_Bool freeNeeded; - NW_Ucs2* tempBuf = NW_Text_GetUCS2Buffer (value, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, &freeNeeded); - if(tempBuf == NULL) - { - NW_Object_Delete (value); - value = NULL; - status = KBrsrOutOfMemory; - break; - } - NW_Ucs2* tempStr = NW_Str_Trim(tempBuf, NW_Str_End); - if(freeNeeded) - { - NW_Mem_Free((NW_Ucs2*)tempBuf); - } - if(tempStr == NULL) - { - NW_Object_Delete (value); - value = NULL; - status = KBrsrOutOfMemory; - break; - } - - status = NW_Text_SetStorage (value, tempStr, NW_Str_Strlen(tempStr), NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned | NW_Text_Flags_Copy); - NW_Str_Delete(tempStr); - if(status != KBrsrSuccess) - { - NW_Object_Delete (value); - value = NULL; - break; - } - - // We don't want an empty value - if (NW_Text_GetCharCount(value) == 0) { - NW_Object_Delete (value); - value = NULL; - } - } - - if (value == NULL) { - /* no enclosed text, try the label */ - NW_XHTML_GetDOMAttribute(thisObj->contentHandler, (NW_DOM_ElementNode_t*) node, - NW_XHTML_AttributeToken_label, &value); - } - - if (value == NULL) { - // Try the title attribute - NW_XHTML_GetDOMAttribute(thisObj->contentHandler, (NW_DOM_ElementNode_t*) node, - NW_XHTML_AttributeToken_title, &value); - } - break; - - case NW_XHTML_FormControlType_InputRadio: - case NW_XHTML_FormControlType_InputCheckbox: - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, - (NW_DOM_ElementNode_t*) node, NW_XHTML_AttributeToken_value, &value); - break; - - /* no NW_XHTML_FormControlType_Select as they don't have a value */ - - default: - status = KBrsrFailure; - value = NULL; - break; - } - - *valueOut = value; - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringName (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Ucs2** nameOut) -{ - NW_Text_t* name = NULL; - NW_XHTML_FormLiaison_t* thisObj; - NW_Ucs2* storage; - - NW_TRY (status) { - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - *nameOut = NULL; - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, (NW_DOM_ElementNode_t*) node, - NW_XHTML_AttributeToken_name, &name); - - if (name == NULL) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - /* convert the supplied name to Unicode and get its storage */ - storage = NW_Text_GetUCS2Buffer (name, - NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - - if (storage == NULL) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - *nameOut = storage; - - } NW_CATCH (status) { /* empty */ - } - NW_FINALLY { - NW_Object_Delete (name); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetStringTitle (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Ucs2** titleOut) -{ - NW_Text_t* title = NULL; - NW_XHTML_FormLiaison_t* thisObj; - NW_Ucs2* storage; - - NW_TRY (status) { - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - *titleOut = NULL; - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, (NW_DOM_ElementNode_t*) node, - NW_XHTML_AttributeToken_title, &title); - - if (title == NULL) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - /* convert the supplied name to Unicode and get its storage */ - storage = NW_Text_GetUCS2Buffer (title, - NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - - if (storage == NULL) { - NW_THROW_STATUS(status, KBrsrFailure); - } - - *titleOut = storage; - } NW_CATCH (status) { /* empty */ - } - NW_FINALLY { - NW_Object_Delete (title); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_SetBoolValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Bool *value) -{ - TBrowserStatusCode status = KBrsrFailure; - NW_XHTML_FormLiaison_t* thisObj; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - if (value == NULL) { - status = NW_XHTML_ControlSet_SetValue (thisObj->controlSet, - (NW_DOM_ElementNode_t*)node, - NULL); - return status; - } - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, (NW_DOM_ElementNode_t*) node)) { - case NW_XHTML_FormControlType_InputCheckbox: - status = NW_XHTML_FormLiaison_SetCheckboxValue (thisObj, - (NW_DOM_ElementNode_t*) node, *value); - break; - - case NW_XHTML_FormControlType_InputRadio: - status = NW_XHTML_FormLiaison_SetRadioValue (thisObj, - (NW_DOM_ElementNode_t*) node, *value); - break; - - case NW_XHTML_FormControlType_Option: - status = NW_XHTML_FormLiaison_SetOptionValue (thisObj, - (NW_DOM_ElementNode_t*) node, *value); - break; - - default: - /* - * cannot set value; the input element is of an unknown type, - * hidden, reset, submit or one of the elements with text value - */ - status = KBrsrFailure; - break; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_ToggleBoolValue (NW_FBox_FormLiaison_t* formLiaison, - void* node) -{ - NW_Bool value; - - if (NW_FBox_FormLiaison_GetBoolValue (formLiaison, node, &value) != - KBrsrSuccess) { - return KBrsrFailure; - } - - value = (NW_Bool) !value; - if (NW_FBox_FormLiaison_SetBoolValue (formLiaison, node, &value) != - KBrsrSuccess) { - return KBrsrFailure; - } - - (void) NW_FBox_FormLiaison_DelegateEcmaEvent(formLiaison, - (NW_DOM_ElementNode_t*) node, NW_Ecma_Evt_OnChange); - /*generate OnChange ecma event , for checkBox/selectBox/options*/ - (void) NW_FBox_FormLiaison_DelegateEcmaEvent(formLiaison, - (NW_DOM_ElementNode_t*) node, NW_Ecma_Evt_OnClick); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetBoolValue (NW_FBox_FormLiaison_t* formLiaison, - void* node, - NW_Bool* valueOut) -{ - TBrowserStatusCode status = KBrsrSuccess; - NW_Object_t* value; - NW_XHTML_FormLiaison_t* thisObj; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - switch (NW_XHTML_FormLiaison_GetControlType (thisObj, (NW_DOM_ElementNode_t*) node)) { - case NW_XHTML_FormControlType_InputCheckbox: /* FALL THROUGH */ - case NW_XHTML_FormControlType_InputRadio: /* FALL THROUGH */ - case NW_XHTML_FormControlType_Option: - value = NW_XHTML_ControlSet_GetValue (thisObj->controlSet, (NW_DOM_ElementNode_t*) node); - - /* if value has not been set yet, use the initial (reset) value */ - if (value == NULL) { - value = NW_XHTML_FormLiaison_GetInitialValue (thisObj, (NW_DOM_ElementNode_t*) node); - } - - /* map FormLiaisonTrue and FormLiaisonFalse to NW_TRUE and NW_FALSE */ - if (value == (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) { - if (valueOut != NULL) { - *valueOut = NW_TRUE; - } - } else if (value == (NW_Object_t*) &NW_XHTML_FormLiaisonFalse) { - if (valueOut != NULL) { - *valueOut = NW_FALSE; - } - } else { - /* either NULL or not boolean value */ - status = KBrsrFailure; - } - break; - - default: - status = KBrsrFailure; - break; - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FormLiaison_Reset (NW_FBox_FormLiaison_t* formLiaison, - void* resetButtonNode) -{ - TBrowserStatusCode status = NW_FBox_FormLiaison_DelegateEcmaEvent(formLiaison, resetButtonNode, - NW_Ecma_Evt_OnReset) ; - /*generate OnReset ecma event. If the return is TRUE then submit the form */ - if(status == KBrsrNotFound) - { - /* handle the form reset */ - status = NW_XHTML_FormLiaison_Reset(formLiaison,resetButtonNode); - } - return status; -} - - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_XHTML_FormLiaison_Submit (NW_FBox_FormLiaison_t* formLiaison, - void* submitButtonNode) -{ - - TBrowserStatusCode status = NW_FBox_FormLiaison_DelegateEcmaEvent(formLiaison, submitButtonNode, - NW_Ecma_Evt_OnSubmit) ; - /*generate OnSubmit ecma event. If the return is TRUE then submit the form */ - if(status == KBrsrNotFound) - { - /* handle the form submit */ - status = NW_XHTML_FormLiaison_Submit (formLiaison,submitButtonNode); - } - return status; -} - - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_XHTML_FormLiaison_Focus (NW_FBox_FormLiaison_t* formLiaison, - void* node) -{ - TBrowserStatusCode status = KBrsrSuccess; - status = NW_FBox_FormLiaison_DelegateEcmaEvent(formLiaison, node, NW_Ecma_Evt_OnFocus) ; - return status; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_XHTML_FormLiaison_IsOptionMultiple (NW_FBox_FormLiaison_t* formLiaison, - void* controlId) -{ - NW_DOM_ElementNode_t* optionNode; - NW_DOM_ElementNode_t* parentNode; - NW_Object_t* value; - NW_XHTML_FormLiaison_t* thisObj; - static const NW_Ucs2 multipleTag[] = {'m','u','l','t','i','p','l','e','\0'}; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - optionNode = (NW_DOM_ElementNode_t*) controlId; - parentNode = NW_DOM_Node_getParentNode(optionNode); - while (parentNode != NULL) - { - if (NW_HED_DomHelper_GetElementToken (parentNode) == NW_XHTML_ElementToken_select) { - /* found the <select> node */ - break; - } - parentNode = NW_DOM_Node_getParentNode(parentNode); - } - if (parentNode == NULL){ - return NW_FALSE; - } - value = NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - parentNode, - NW_XHTML_AttributeToken_multiple, - multipleTag); - - if (value == NULL){ - return NW_FALSE; - } - if (value == (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) { - return NW_TRUE; - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_XHTML_FormLiaison_IsOptionSelected(NW_FBox_FormLiaison_t* formLiaison, - void* controlId) -{ - NW_DOM_ElementNode_t* optionNode; - NW_XHTML_FormLiaison_t* thisObj; - static const NW_Ucs2 selectedTag[] = {'s','e','l','e','c','t','e','d','\0'}; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - optionNode = (NW_DOM_ElementNode_t*) controlId; - if( NW_XHTML_FormLiaison_GetBoolAttribute (thisObj, - optionNode, - NW_XHTML_AttributeToken_selected, - selectedTag) - == (NW_Object_t*) &NW_XHTML_FormLiaisonTrue) { - return NW_TRUE; - } - return NW_FALSE; -} - -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_XHTML_FormLiaison_OptionHasOnPick(NW_FBox_FormLiaison_t* formLiaison, - void* controlId) -{ - NW_REQUIRED_PARAM (formLiaison); - NW_REQUIRED_PARAM (controlId); - - /* XHTML doesn't support OnPick attribute */ - return NW_FALSE; -} - -NW_Bool -_NW_XHTML_FormLiaison_IsLocalNavOnPick(NW_FBox_FormLiaison_t* formLiaison, - void* controlId) -{ - NW_REQUIRED_PARAM (formLiaison); - NW_REQUIRED_PARAM (controlId); - - /* XHTML doesn't support OnPick attribute - so we don't care about local navs either */ - return NW_FALSE; -} - -TBrowserStatusCode -_NW_XHTML_FormLiaison_GetDocRoot(NW_FBox_FormLiaison_t *thisObj, - NW_HED_DocumentRoot_t **docRoot) -{ - NW_XHTML_FormLiaison_t *xhtmlFormLiaison; - NW_ASSERT (docRoot != NULL); - xhtmlFormLiaison = NW_XHTML_FormLiaisonOf(thisObj); - *docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (xhtmlFormLiaison->contentHandler); - return KBrsrSuccess; -} - - -TBrowserStatusCode -_NW_XHTML_FormLiaison_DelegateEcmaEvent(NW_FBox_FormLiaison_t* /*thisObj*/, - void* /*eventNode*/, - NW_ECMA_Evt_Type_t /*ecmaEvent*/) -{ - // Calls the ecma handle event on EcmaContentHandler - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_FormLiaison_RegisterValidator (NW_XHTML_FormLiaison_t* thisObj, - void* node, - NW_FBox_Validator_t* validator) -{ - TBrowserStatusCode status; - NW_FBox_Validator_t* oldValidator; - - if (thisObj->validatorMap == NULL) { - thisObj->validatorMap = - NW_ADT_ResizableMap_New (sizeof (void*), sizeof (NW_FBox_Validator_t*), - 1, 1); - if (thisObj->validatorMap == NULL) { - return KBrsrOutOfMemory; - } - } else { - status = NW_ADT_Map_Get (thisObj->validatorMap, &node, &oldValidator); - if (status == KBrsrSuccess) { - NW_Object_Delete (oldValidator); - } - } - return NW_ADT_Map_Set (thisObj->validatorMap, &node, &validator); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_FormLiaison_AddBox (NW_FBox_FormLiaison_t* formLiaison, - NW_LMgr_Box_t* box , NW_DOM_ElementNode_t* searchElementNode) -{ - NW_XHTML_FormLiaison_t* thisObj; - NW_DOM_ElementNode_t* elementNode; - NW_ADT_Vector_Metric_t elementSize; - NW_ADT_Vector_Metric_t index = 0; - -#if defined(XFL_LOGGING) - NW_ADT_Vector_Metric_t boxIndex = 0; -#endif - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (formLiaison, &NW_XHTML_FormLiaison_Class)); - - /* for convenience */ - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - - /*find the index of the node vector*/ - elementSize = NW_ADT_Vector_GetSize(thisObj->controlSet->nodeVector); - - while (index < elementSize ) - { - elementNode = *(NW_DOM_ElementNode_t**)NW_ADT_Vector_ElementAt (thisObj->controlSet->nodeVector, index); - if(elementNode == searchElementNode) - { - -#if defined(XFL_LOGGING) - boxIndex = index; -#endif - if(index < NW_ADT_Vector_GetSize(thisObj->controlSet->boxVector)) - NW_ADT_DynamicVector_ReplaceAt (thisObj->controlSet->boxVector, &box, index ); - else - { - NW_ADT_DynamicVector_InsertAt (thisObj->controlSet->boxVector, &box, NW_ADT_Vector_AtEnd ); - -#if defined(XFL_LOGGING) - boxIndex = (NW_ADT_Vector_Metric_t) (NW_ADT_Vector_GetSize(thisObj->controlSet->boxVector) - 1) ; -#endif - } - -#if defined(XFL_LOGGING) - { - TBuf16<300> buf; - buf.Format( _L("XhtmlFormLiaison::AddBox elementNode=%x, box=%x index=%d, boxIndex=%d\n"), elementNode, box, index, boxIndex); - RFileLogger::Write( KLogDirName, KLogFileName, EFileLoggingModeAppend, buf ); - NW_LMgr_Box_DumpBoxTree(box); - } -#endif - - break; - } - index++; - } - /* successful completion */ - return KBrsrSuccess; -} - - -TBrowserStatusCode -NW_XHTML_FormLiaison_GetAction(NW_FBox_FormLiaison_t* formLiaison, - NW_Ucs2** formAction) -{ - NW_Ucs2* tFormAction = NULL; - NW_XHTML_FormLiaison_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - tFormAction= NW_Text_GetUCS2Buffer (thisObj->formAction,NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - if(tFormAction) - { - *formAction = tFormAction; - } - else - { - status = KBrsrOutOfMemory; - } - - - return status; -} - -TBrowserStatusCode -NW_XHTML_FormLiaison_SetAction (NW_XHTML_FormLiaison_t* thisObj, - const NW_Ucs2* formAction) -{ - NW_Text_t* formActionText = NULL; - NW_TRY (status) - { - formActionText = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2* )formAction, - NW_Str_Strlen(formAction), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(formActionText , status); - /*delete prev formAction string */ - NW_Object_Delete (thisObj->formAction); - thisObj->formAction = formActionText; - } - NW_CATCH (status) - { /* empty */ - } - NW_FINALLY - { - return status; - } NW_END_TRY - -} - -TBrowserStatusCode -NW_XHTML_FormLiaison_SetMethod (NW_XHTML_FormLiaison_t* thisObj, - const NW_Ucs2* formMethod) -{ - NW_Text_t* formMethodText = NULL; - NW_TRY (status) - { - formMethodText = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2* )formMethod, - NW_Str_Strlen(formMethod), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(formMethodText, status); - /*delete prev formMethod string */ - NW_Object_Delete (thisObj->formMethod); - thisObj->formMethod = formMethodText; - } - NW_CATCH (status) - { /* empty */ - } - NW_FINALLY - { - return status; - } NW_END_TRY - -} - -TBrowserStatusCode -NW_XHTML_FormLiaison_GetEnctype(NW_FBox_FormLiaison_t* formLiaison, - NW_Ucs2** formEnctype) -{ - NW_Ucs2* tFormEnctype = NULL; - NW_XHTML_FormLiaison_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - tFormEnctype= NW_Text_GetUCS2Buffer (thisObj->formEnctype,NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - if(tFormEnctype) - { - *formEnctype = tFormEnctype; - } - else - { - status = KBrsrOutOfMemory; - } - - return status; -} - -TBrowserStatusCode -NW_XHTML_FormLiaison_SetEnctype (NW_XHTML_FormLiaison_t* thisObj, - const NW_Ucs2* formEnctype) -{ - NW_Text_t* formEnctypeText = NULL; - NW_TRY (status) - { - formEnctypeText = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2* )formEnctype, - NW_Str_Strlen(formEnctype), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(formEnctypeText, status); - /*delete prev formEnctype string */ - NW_Object_Delete (thisObj->formEnctype); - thisObj->formEnctype = formEnctypeText; - } - NW_CATCH (status) - { /* empty */ - } - NW_FINALLY - { - return status; - } NW_END_TRY - -} - - -TBrowserStatusCode -NW_XHTML_FormLiaison_GetId(NW_FBox_FormLiaison_t* formLiaison, - NW_Ucs2** formId) -{ - NW_Ucs2* tFormId = NULL; - NW_XHTML_FormLiaison_t* thisObj; - TBrowserStatusCode status = KBrsrSuccess; - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - tFormId= NW_Text_GetUCS2Buffer (thisObj->formId,NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - if(tFormId) - { - *formId = tFormId; - } - else - { - status = KBrsrOutOfMemory; - } - - return status; -} - - -TBrowserStatusCode -NW_XHTML_FormLiaison_SetId (NW_XHTML_FormLiaison_t* thisObj, - const NW_Ucs2* formId) -{ - NW_Text_t* formIdText = NULL; - NW_TRY (status) - { - formIdText = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2* )formId, - NW_Str_Strlen(formId), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(formIdText, status); - /*delete prev formMethod string */ - NW_Object_Delete (thisObj->formId); - thisObj->formId = formIdText; - } - NW_CATCH (status) - { /* empty */ - } - NW_FINALLY - { - return status; - } NW_END_TRY - -} - - - - -TBrowserStatusCode -NW_XHTML_FormLiaison_SetFormName (NW_XHTML_FormLiaison_t* thisObj, - const NW_Ucs2* formName) -{ - NW_Text_t* formNameText = NULL; - NW_TRY (status) - { - formNameText = NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2* )formName, - NW_Str_Strlen(formName), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(formNameText, status); - /*delete prev formMethod string */ - NW_Object_Delete (thisObj->formName); - thisObj->formName = formNameText; - } - NW_CATCH (status) - { /* empty */ - } - NW_FINALLY - { - return status; - } NW_END_TRY - -} - -TBrowserStatusCode -NW_XHTML_FormLiaison_Submit (NW_FBox_FormLiaison_t* formLiaison, - void* submitButtonNode) -{ - NW_XHTML_FormLiaison_t* thisObj; - NW_NVPair_t* nameValuePairs = NULL; - NW_Text_t* urlText = NULL; - NW_Text_t* retUrl = NULL; - const NW_Ucs2* url = NULL; - NW_Bool urlFreeNeeded = NW_FALSE; - const NW_Ucs2* method = NULL; - NW_Bool methodFreeNeeded = NW_FALSE; - NW_Bool isPost = NW_FALSE; /* assume method="get" */ - NW_Text_t* acceptCharsetText = NULL; - const NW_Ucs2* acceptCharset = NULL; - NW_Bool acceptCharsetFreeNeeded = NW_FALSE; - const NW_Ucs2* enctype = NULL; - NW_Bool enctypeFreeNeeded = NW_FALSE; - NW_Http_CharSet_t documentCharset = HTTP_unknown; - NW_Http_Header_t* requestHeader = NULL; - NW_Ucs2* requestUrl = NULL; - NW_Text_UCS2_t* requestUrlText = NULL; - NW_Uint8 requestMethod = NW_URL_METHOD_GET; - NW_Buffer_t* requestBody = NULL; - NW_HED_UrlRequest_t* urlRequest = NULL; - NW_Cache_Mode_t cacheMode = NW_CACHE_NORMAL; - NW_HED_DocumentRoot_t* docRoot; - NW_HED_AppServices_t* appServices = NULL; - void* appCtx = NULL; - - NW_TRY (status) { - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - // we wont be able to submit if there is no formAction in the html page - if(thisObj->formAction) - { -// TODO CHARSET: This comment doesn't match the code. Fix one or the other. - /* if the encoding setting is either gb2312 or big5, set app services and app context - so that later they could be used to make charactset converter calls. - Otherwise, they would remain NULL, and no charset conversion would occur later - */ - if (NW_XHTML_FormLiaison_IsSupportedEncoding(NW_Settings_GetOriginalEncoding())) - { - /* get appServices and Browser app context */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(thisObj->contentHandler); - appServices = (NW_HED_AppServices_t*) NW_HED_DocumentRoot_GetAppServices(docRoot); - appCtx = NW_HED_DocumentRoot_GetBrowserAppCtx(docRoot); - } - - // Iterate through successful controls and build the set of name-value pairs. - status = NW_XHTML_FormLiaison_GetNameValuePairs( thisObj, submitButtonNode, &nameValuePairs ); - NW_THROW_ON_ERROR( status ); - - urlText = NW_Text_Copy(thisObj->formAction, NW_TRUE); /* deep copy */ - - /* get and resolve the original url */ - status = NW_HED_ContentHandler_ResolveURL ( - thisObj->contentHandler, urlText, &retUrl); - _NW_THROW_ON_ERROR( status ); - - /* transfer ownership to urlText */ - urlText = retUrl; - retUrl = NULL; - - url = NW_Text_GetUCS2Buffer (urlText, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, &urlFreeNeeded); - NW_THROW_OOM_ON_NULL (url, status); - - /* are we posting */ - if (thisObj->formMethod != NULL) { - method = NW_Text_GetUCS2Buffer(thisObj->formMethod, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - NULL, &methodFreeNeeded); - NW_THROW_OOM_ON_NULL (method, status); - - if (NW_Str_StricmpConst(method, "post") == 0) { - isPost = NW_TRUE; - cacheMode = NW_CACHE_NOCACHE; - } - } - - /* get the enctype attribute */ - if (thisObj->formEnctype != NULL) { - enctype = NW_Text_GetUCS2Buffer (thisObj->formEnctype, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, &enctypeFreeNeeded); - NW_THROW_OOM_ON_NULL (enctype, status); - } - - /* get the accept-charset attribute */ - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, thisObj->formNode, - NW_XHTML_AttributeToken_accept_charset, &acceptCharsetText); - if (acceptCharsetText != NULL) { - acceptCharset = NW_Text_GetUCS2Buffer(acceptCharsetText, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, &acceptCharsetFreeNeeded); - NW_THROW_OOM_ON_NULL (acceptCharset, status); - } - - /* get document charset */ - documentCharset = (NW_Http_CharSet_t) NW_HED_DomHelper_GetEncoding(thisObj->formNode); - - // If this is a multipart post, then the nameValuePairs need to be checked. - // If any are for files to be uploaded, then the existance of the files - // has to be confirmed. - if ( isPost && NW_LoadReq_IsMultipart( enctype ) ) { - TBool missingFiles; - TBool restrictedFiles; - status = NW_XHTML_FormLiaison_CheckFiles( thisObj, nameValuePairs, - &missingFiles, &restrictedFiles ); - if ( status != KBrsrSuccess ) { - // If the user cancels, then exit without posting. - if ( status == KBrsrCancelled ) { - NW_THROW_STATUS( status, KBrsrSuccess ); - } else { - NW_THROW( status ); - } - } - if ( missingFiles || restrictedFiles ) { - // If there were missing or restricted files, then those controls - // with missing or restricted files were reset and the set of - // name-value pairs is no longer accurate and needs to be re-built. - NW_NVPair_Delete(nameValuePairs); - nameValuePairs = NULL; - status = NW_XHTML_FormLiaison_GetNameValuePairs( thisObj, submitButtonNode, - &nameValuePairs ); - NW_THROW_ON_ERROR( status ); - } - } - - /* create the header and body for the request */ - /* This following is a fairly completed sequence of events. The reason is that - we want NW_LoadReq_Create to do the checking for enctype and acceptCharset. - If they are invalid in HTML, we want to accept the default by passing in NULL for - these parameters. */ - status = NW_LoadReq_Create (url, isPost, NULL, acceptCharset, nameValuePairs, enctype, - documentCharset, &requestHeader, &requestUrl, &requestMethod, - &requestBody, appServices, appCtx); - if (status == KBrsrWmlbrowserBadContent ) { - /* The enctype is invalid. Force to NULL so will take the default - value (urlencoded). */ - if ( enctypeFreeNeeded ) { - NW_Str_Delete( (NW_Ucs2*) enctype ); - } - enctype = NULL; - status = NW_LoadReq_Create (url, isPost, NULL, acceptCharset, nameValuePairs, enctype, - documentCharset, &requestHeader, &requestUrl, &requestMethod, - &requestBody, appServices, appCtx); - } - if (status == KBrsrUnsupportedFormCharset ) { - /* The accept-charset is invalid. Force to NULL so will take the default - value provided by the document charset. */ - if ( acceptCharsetFreeNeeded ) { - NW_Str_Delete( (NW_Ucs2*) acceptCharset ); - } - acceptCharset = NULL; - status = NW_LoadReq_Create (url, isPost, NULL, acceptCharset, nameValuePairs, enctype, - documentCharset, &requestHeader, &requestUrl, &requestMethod, - &requestBody, appServices, appCtx); - } - NW_THROW_ON_ERROR (status); - - /* make a text object for the url */ - requestUrlText = NW_Text_UCS2_New (requestUrl, 0, NW_Text_Flags_TakeOwnership); - requestUrl = NULL; - NW_THROW_OOM_ON_NULL (requestUrlText, status); - - /* create a top level load request from the url, header and body */ - urlRequest = NW_HED_UrlRequest_New (NW_TextOf(requestUrlText), requestMethod, - requestHeader, requestBody, NW_HED_UrlRequest_Reason_DocLoad, - NW_HED_UrlRequest_LoadNormal, NW_UrlRequest_Type_Any); - NW_THROW_OOM_ON_NULL (urlRequest, status); - - NW_HED_UrlRequest_SetCacheMode ((NW_HED_UrlRequest_t*) urlRequest, cacheMode); - requestHeader = NULL; - requestBody = NULL; - - //Set the referrer header also. - - NW_XHTML_ContentHandler_SetReferrerUrl(thisObj->contentHandler); - -#if !defined(__SERIES60_28__) && !defined(__SERIES60_27__) - NW_Text_t* target = NULL; - NW_DOM_ElementNode_t* formNode = (NW_DOM_ElementNode_t*)submitButtonNode; - // Find the form node and look for a target attribute on it - while (formNode != NULL) - { - formNode = NW_DOM_Node_getParentNode(formNode); - NW_Uint16 token = NW_HED_DomHelper_GetElementToken (formNode); - if (token == NW_XHTML_ElementToken_form) - { - break; - } - } - if (formNode != NULL) - { - NW_XHTML_GetDOMAttribute (thisObj->contentHandler, formNode, NW_XHTML_AttributeToken_target, &target); - } - TBool newWindow = EFalse; - if (target != NULL && target->characterCount == 0) - { - NW_Object_Delete(target); - target = NULL; - } - if (target == NULL) - { - NW_XHTML_ContentHandler_GetBaseTagTarget (thisObj->contentHandler, &target); - } - if (target != NULL) - { - // If the target attribute exists, and it is not an empty string, and - // it is not "_self", open the url in a new window - NW_Bool targetTextFreeNeeded = NW_FALSE;; - NW_Ucs2* targetStorage; - HBufC8* enctypeBuf = NULL; - NW_Text_Length_t targetTextLength; - _LIT(KSelf, "_self"); - targetStorage = NW_Text_GetUCS2Buffer (target, NW_Text_Flags_NullTerminated, - &targetTextLength, &targetTextFreeNeeded); - // Check that the target attribute is not empty - TPtrC targetPtr(targetStorage, targetTextLength); - if (targetTextLength > 0 && targetPtr.CompareF(KSelf) != 0) - { - if (requestMethod == NW_URL_METHOD_GET) - { - status = NW_XHTML_ContentHandler_WindowOpen(thisObj->contentHandler, (NW_Text_t*)requestUrlText, target); - } - else - { - // get the content-type (enctype) of the request body. - // use what is in the form, or url encoding by default - _LIT8(KTypePtr, "application/x-www-form-urlencoded"); - TPtrC8 enctypePtr(NULL, 0); - if (enctype != NULL) - { - TInt ret; - TRAP(ret, enctypeBuf = HBufC8::NewL(User::StringLength(enctype) + 1)); - if (enctypeBuf != NULL) - { - TPtrC encPtr(enctype); - enctypeBuf->Des().Copy(encPtr); - enctypeBuf->Des().ZeroTerminate(); - } - } - else - { - TInt ret; - TRAP(ret, enctypeBuf = HBufC8::NewL(KTypePtr().Length()+ 1)); - if (enctypeBuf != NULL) - { - enctypeBuf->Des().Copy(KTypePtr); - enctypeBuf->Des().ZeroTerminate(); - } - } - if (enctypeBuf == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - status = NW_XHTML_ContentHandler_WindowOpenAndPost(thisObj->contentHandler, - (NW_Text_t*)requestUrlText, target,(NW_Uint8*)enctypeBuf->Ptr(), (NW_Uint32)(enctypeBuf->Length()), - NW_HED_UrlRequest_GetBody(urlRequest)->data, - NW_HED_UrlRequest_GetBody(urlRequest)->length, - NULL);//R->ul ((HttpRequestHeaders*)NW_HED_UrlRequest_GetHeader(urlRequest))->boundary); - } - delete enctypeBuf; - } - newWindow = ETrue; - } - if (targetTextFreeNeeded) - { - NW_Mem_Free(targetStorage); - } - NW_Object_Delete(target); - } - if (!newWindow) -#endif - { - /* submit the request */ - status = NW_XHTML_ContentHandler_StartRequest( thisObj->contentHandler, urlRequest, NULL ); - NW_THROW_ON_ERROR (status); - - urlRequest = NULL; - } - } - else - { - status = KBrsrSuccess; - } - } - - NW_CATCH (status) { - } - - NW_FINALLY { - if (nameValuePairs) - { - NW_NVPair_Delete(nameValuePairs); - } - NW_Object_Delete (urlText); - if (urlFreeNeeded) - { - NW_Str_Delete((NW_Ucs2*) url); - } - if ( methodFreeNeeded ) - { - NW_Str_Delete( (NW_Ucs2*) method ); - } - if (enctypeFreeNeeded) - { - NW_Str_Delete((NW_Ucs2*) enctype); - } - NW_Object_Delete(acceptCharsetText); - if (acceptCharsetFreeNeeded) - { - NW_Str_Delete((NW_Ucs2*) acceptCharset); - } - -//R->ul UrlLoader_HeadersFree (requestHeader); - requestHeader = NULL; - NW_Str_Delete (requestUrl); - requestUrl = NULL; - NW_Object_Delete(requestUrlText); - requestUrlText = NULL; - NW_Buffer_Free (requestBody); - requestBody = NULL; - NW_Object_Delete (urlRequest); - urlRequest = NULL; - - return status; - } NW_END_TRY -} - - -TBrowserStatusCode -NW_XHTML_FormLiaison_Reset (NW_FBox_FormLiaison_t* formLiaison, - void* resetButtonNode) -{ - NW_XHTML_FormLiaison_t* thisObj; - NW_LMgr_Box_t* box; - NW_ADT_Vector_Metric_t index = 0; - - NW_REQUIRED_PARAM(resetButtonNode); - - thisObj = NW_XHTML_FormLiaisonOf (formLiaison); - - index = thisObj->firstControl; - - while (index < (thisObj->firstControl + thisObj->numControls - 1)) - { - box = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt (thisObj->controlSet->boxVector, index); - if(box && !NW_Object_IsInstanceOf (box, &NW_FBox_OptGrpBox_Class )&& - !NW_Object_IsInstanceOf (box, &NW_FBox_OptionBox_Class)) - { - if (NW_Object_IsInstanceOf (box, &NW_FBox_FormBox_Class) == NW_TRUE) - { - (void) NW_FBox_FormBox_Reset ((NW_FBox_FormBox_t*) box); - } - } - index++; - } - - // radiobox's on or off depends on default radiobox; - // refresh box only when all box are reset - index = thisObj->firstControl; - while (index < (thisObj->firstControl + thisObj->numControls - 1)) - { - box = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt (thisObj->controlSet->boxVector, index); - if(box && !NW_Object_IsInstanceOf (box, &NW_FBox_OptGrpBox_Class ) && - !NW_Object_IsInstanceOf (box, &NW_FBox_OptionBox_Class)) - { - NW_LMgr_Box_Refresh(box); - } - index++; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_XHTML_FormLiaison_t* -NW_XHTML_FormLiaison_New (NW_DOM_ElementNode_t* formNode, - NW_XHTML_ContentHandler_t* contentHandler, - NW_XHTML_ControlSet_t* controlSet) -{ - return (NW_XHTML_FormLiaison_t*)NW_Object_New (&NW_XHTML_FormLiaison_Class, - formNode, - contentHandler, - controlSet); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLInputElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLInputElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,616 +0,0 @@ -/* -* Copyright (c) 2000-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#include "nw_basicforms_inputelementhandleri.h" - -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_text_ascii.h" -#include "nw_fbox_checkbox.h" -#include "nw_fbox_radiobox.h" -#include "nw_fbox_inputbox.h" -#include "nw_fbox_buttonbox.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_fbox_passwordbox.h" -#include "nw_fbox_fileselectionbox.h" -#include "nw_fbox_hiddenbox.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_evt_activateevent.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_hed_documentroot.h" -#include "nwx_settings.h" - -#include "nw_image_imgelementhandler.h" -#include "nw_image_cannedimages.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_markup_wmlvalidator.h" -#include "HEDDocumentListener.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_inputElementHandler_Class_t NW_XHTML_inputElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_inputElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_inputElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_inputElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -// Gets size attribute and converts to integer. If no size attribute or its -// value is not a valid integer, then zero is returned, indicating that some -// default size should be used instead. -static -NW_Uint16 -NW_XHTML_inputElementHandler_GetSize(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Ucs2* sizeAttr = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint16 size = 0; - - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_size, - &sizeAttr); - /* If size is not set or is invalid, it is set to the default size. */ - if (status == KBrsrSuccess) - { - if(NW_Str_StrIsValidLength(sizeAttr)) - { - size = (NW_Uint16) NW_Str_Atoi(sizeAttr); - } - NW_Str_Delete (sizeAttr); - } - return size; -} - -/* ------------------------------------------------------------------------- */ -// Sets maxLength and title - Assumption is that the box is InputBox -static -TBrowserStatusCode -NW_XHTML_inputElementHandler_SetMaxLengthTitle(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) -{ - NW_Ucs2* maxLengthAttr = NULL; - NW_Ucs2* titleAttr = NULL; - NW_FBox_InputBox_t* inputBox= NW_FBox_InputBoxOf(box); - - NW_TRY (status ) - { - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_maxlength, - &maxLengthAttr); - NW_THROW_ON (status, KBrsrOutOfMemory); - - /* If we couldn't find maxlength attribute, we leave it, so that default - value will hold good */ - if (status == KBrsrSuccess) - { - NW_Int32 maxlength = -1; /* Initialize to invalid length */ - if(NW_Str_StrIsValidLength(maxLengthAttr)) - { - maxlength = NW_Str_Atoi(maxLengthAttr); - } - NW_Str_Delete (maxLengthAttr); - maxLengthAttr = NULL; - if(maxlength >= 0) - { - NW_FBox_InputBox_SetMaxChars(inputBox, (NW_Text_Length_t)maxlength); - NW_FBox_InputBox_SetIsMaxlength( inputBox, NW_TRUE); - } - } - /* Get and set title */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_title, - &titleAttr); - NW_THROW_ON (status, KBrsrOutOfMemory); - if (status == KBrsrSuccess) - { - NW_FBox_InputBox_SetTitle (box, titleAttr); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -// Based on the type attribute, this method returns the Input Box -static -TBrowserStatusCode -NW_XHTML_inputElementHandler_CreateBox(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box, - NW_HED_DocumentRoot_t* docRoot, - NW_FBox_FormLiaison_t* formLiaison, - NW_LMgr_EventHandler_t* eventHandler) -{ - NW_Uint16 size; - NW_Text_t* value = NULL; - NW_Ucs2* typeAttr = NULL; - NW_HED_AppServices_t* appServices = docRoot->appServices; - TBool useDefault = NW_FALSE; - - NW_TRY (status ) - { - // Get value for the button - if (NW_XHTML_ElementToken_button == NW_DOM_ElementNode_getTagToken(elementNode)) - { - // Get text - value = NW_XHTML_ElementHandler_GetSubTreeText(contentHandler, elementNode); - } - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_type, - &typeAttr); - NW_THROW_ON (status, KBrsrOutOfMemory); - - /* Text is default if no type specified. */ - if ((typeAttr == NULL) || (typeAttr[0] == '\0') || - ( NW_Str_StricmpConst(typeAttr, "text") == 0)) - { - useDefault = NW_TRUE; - } - /* Create checkbox. */ - else if ( NW_Str_StricmpConst(typeAttr, "checkbox") == 0 ) - { - *box = (NW_LMgr_Box_t*) - NW_FBox_CheckBox_New(1, eventHandler, elementNode, formLiaison); - NW_THROW_OOM_ON_NULL (*box, status); - } - /* Create radio box. */ - else if ( NW_Str_StricmpConst(typeAttr, "radio") == 0 ) - { - *box = (NW_LMgr_Box_t*) - NW_FBox_RadioBox_New(1,eventHandler, elementNode, formLiaison); - NW_THROW_OOM_ON_NULL (*box, status); - } - /* Ignore hidden. */ - else if ( NW_Str_StricmpConst(typeAttr, "hidden") == 0 ) - { - *box = (NW_LMgr_Box_t*) - NW_FBox_HiddenBox_New(1,eventHandler, elementNode, formLiaison, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - } - // Create password box. - else if ( NW_Str_StricmpConst(typeAttr, "password") == 0 ) - { - // Get Input Size - size = NW_XHTML_inputElementHandler_GetSize(contentHandler, elementNode); - - *box = (NW_LMgr_Box_t*) - NW_FBox_PasswordBox_New(1,eventHandler, elementNode, formLiaison, size, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - - // Set MaxLength And Title - status = NW_XHTML_inputElementHandler_SetMaxLengthTitle(contentHandler, elementNode, *box); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - /* Create submit button. */ - else if ( NW_Str_StricmpConst(typeAttr, "submit") == 0 ) - { - // in case of <button type = "submit"> we have the subtree value - // that should be given a priority - if (!value) - { - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_value, &value); - } - *box = (NW_LMgr_Box_t*) - NW_FBox_ButtonBox_New(1,eventHandler, elementNode, formLiaison, - NW_FBox_ButtonBox_Submit, value, NULL, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - } - // Create reset button. - else if ( NW_Str_StricmpConst(typeAttr, "reset") == 0 ) - { - // in case of <button type = "submit"> we have the subtree value - // that should be given a priority - if (!value) - { - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_value, &value); - } - *box = (NW_LMgr_Box_t*) - NW_FBox_ButtonBox_New(1,eventHandler, elementNode, formLiaison, - NW_FBox_ButtonBox_Reset, value, NULL, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - } - /* Create generic button. */ - else if (( NW_Str_StricmpConst(typeAttr, "button") == 0 ) || - (NW_XHTML_ElementToken_button == NW_DOM_ElementNode_getTagToken(elementNode))) - { - if (!value) - { - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_value, &value); - } - *box = (NW_LMgr_Box_t*) - NW_FBox_ButtonBox_New(1,eventHandler, elementNode, formLiaison, - NW_FBox_ButtonBox_Button, value, NULL, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - } - /* Create file-selection box. */ - else if ( NW_Str_StricmpConst(typeAttr, "file") == 0 ) - { - size = NW_XHTML_inputElementHandler_GetSize(contentHandler, elementNode); - *box = (NW_LMgr_Box_t*) - NW_FBox_FileSelectionBox_New(1, eventHandler, elementNode, formLiaison, size, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - } - /* Create image button. */ - else if ( NW_Str_StricmpConst(typeAttr, "image") == 0 ) - { - NW_ImageCH_Epoc32ContentHandler_t* imgCH; - NW_HED_ContentHandler_t* hedCH; - NW_HED_CompositeNode_t* compositeNode; - NW_Image_AbstractImage_t* image; - NW_Image_CannedImages_t *cannedImages; - - /* extract the image from our canned images */ - cannedImages = (NW_HED_DocumentRoot_GetRootBox(docRoot))->cannedImages; - NW_ASSERT(cannedImages!=NULL); - - compositeNode = (NW_HED_CompositeNode_t*) - NW_Object_QueryAggregate (contentHandler, &NW_HED_CompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - - hedCH = (NW_HED_ContentHandler_t*) - NW_HED_CompositeNode_LookupChild (compositeNode, elementNode); - imgCH = NW_ImageCH_Epoc32ContentHandlerOf (hedCH); - - if(imgCH && imgCH->image) - { - /*case when image load is a success and we have a valid image*/ - image = imgCH->image; - } - else - { /* (!imgCH || (imgCH && !imgCH->image)) */ - /*case when the load has not occured, display missing image and alt tag exists*/ - image = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage(cannedImages, NW_Image_Missing); - NW_ASSERT(image !=NULL); - } - /*get the alt text*/ - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_alt, &value); - /*create box*/ - *box = (NW_LMgr_Box_t*) - NW_FBox_ImageButtonBox_New(1, eventHandler, elementNode, formLiaison, value, image); - NW_THROW_OOM_ON_NULL (*box, status); - } - else { /* unrecognized type attribute value, treat as default */ - useDefault = NW_TRUE; - } - - /* Create text box. Text is default if no type or an unknown type is specified. */ - if (useDefault == NW_TRUE) { - // Get Input Size - size = NW_XHTML_inputElementHandler_GetSize(contentHandler, elementNode); - - *box = (NW_LMgr_Box_t*) - NW_FBox_InputBox_New(1, eventHandler, elementNode, formLiaison, size, appServices); - NW_THROW_OOM_ON_NULL (*box, status); - - /* Set MaxLength And Title */ - status = NW_XHTML_inputElementHandler_SetMaxLengthTitle(contentHandler, elementNode, *box); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - - } - NW_CATCH (status) - { - if (*box) - { - NW_Object_Delete(*box); - *box = NULL; - value = NULL; - } - if (value) - { - NW_Object_Delete(value); - } - } - NW_FINALLY - { - NW_Str_Delete( typeAttr ); - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_inputElementHandler_HandleValidation (NW_FBox_InputBox_t* box, - NW_FBox_FormLiaison_t* formLiaison) -{ - const NW_Text_t* format = NULL; - NW_FBox_Validator_EmptyOk_t emptyOk; - NW_Markup_WmlValidator_t* validator = NULL; - NW_Text_t* buffer = NULL; - NW_Bool dummy = NW_FALSE; /* used by NW_FBox_FormLiaison_GetStringValue to indicate if a value attribute was specified */ - void* formControlId = NULL; - NW_FBox_Validator_Mode_t mode; - - NW_TRY (status ) - { - /* Set form control to initial values. Done here because need to have setup input - format string so won't set to an illegal value. jwild 23-Jan-2002 */ - formControlId = NW_FBox_FormBox_GetFormCntrlID(box); - - /* Text or password box. Check for format and input required style. - Add input format validators to input box and form liaison. */ - - /* Format does not have to be freed. */ - status = NW_FBox_InputBox_GetFormat(box, &format, &mode, &emptyOk); - _NW_THROW_ON_ERROR (status); - - /* Create validators for input box and form liaison. */ - validator = NW_Markup_WmlValidator_New( format, mode, emptyOk, NW_FALSE); /* Prefix string match. */ - NW_THROW_OOM_ON_NULL (validator, status); - - /* check to see if the box already has a validator - if so, delete the old validator so it is not leaked */ - if (box->validator != NULL) - { - NW_Object_Delete(box->validator); - } - - /* Takes ownership of validator. */ - NW_FBox_InputBox_SetValidator(box, NW_FBox_ValidatorOf(validator)); - validator = NW_Markup_WmlValidator_New(format, mode, emptyOk, NW_TRUE); /* Full string match. */ - NW_THROW_OOM_ON_NULL (validator, status); - - /* Takes ownership of validator. */ - NW_XHTML_FormLiaison_RegisterValidator(NW_XHTML_FormLiaisonOf(formLiaison), - formControlId, - NW_FBox_ValidatorOf(validator) ); - validator = NULL; - - - /* Set form control and input box to initial values. - First set the form liaison to it's initial value and then use that - value to set the input box. */ - status = NW_FBox_FormLiaison_SetInitialStringValue(formLiaison, formControlId, - NW_FBox_InputBox_GetMaxChars(box)); - if (status == KBrsrWmlbrowserInputNonconformingToMask) - { - /* Expected that may not match format mask. Force to success so - will contine. */ - status = KBrsrSuccess; - } - _NW_THROW_ON_ERROR (status); - - status = NW_FBox_FormLiaison_GetStringValue(formLiaison, formControlId, &buffer, &dummy); - _NW_THROW_ON_ERROR (status); - - status = NW_FBox_InputBox_SetDefaultVal(box, buffer); - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_inputElementHandler_t NW_XHTML_inputElementHandler = { - { { &NW_XHTML_inputElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_XHTML_inputElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - TBrowserStatusCode status; - NW_Ucs2* typeAttr = NULL; - NW_FBox_FormLiaison_t* formLiaison; - NW_Int32 comResult; - - NW_REQUIRED_PARAM (elementHandler); - - formLiaison = NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - if (formLiaison == NULL) - { - return KBrsrSuccess; - } - (void) NW_FBox_FormLiaison_AddControl(formLiaison, elementNode); - - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_type, - &typeAttr); - - if (status == KBrsrSuccess) - { - comResult = NW_Str_StricmpConst(typeAttr, "image"); - } else if (status == KBrsrNotFound) - { - comResult = 1; /* No type attribute, so type!="image". */ - } else - { - NW_Str_Delete( typeAttr ); - return status; - } - - NW_Str_Delete( typeAttr ); /* No longer needed. */ - typeAttr = NULL; - - if ( comResult == 0 ) - { - NW_Text_t* url = NULL; - - /* NW_Settings_GetImageEnabled() called to determine whether - autoloading of images is turned on. If not, then just display - the initial "x" and alt text, and don't issue any load requests. - */ - if (!NW_Settings_GetImagesEnabled()) - { - return KBrsrSuccess; - } - /* find the 'src' attribute and get its string value */ - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_src, &url); - if (status != KBrsrSuccess) - { - return status; - } - - /* load the image */ - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, - url, NW_HED_UrlRequest_Reason_DocLoadChild, elementNode, - NW_UrlRequest_Type_Image); - - /* cleanup after ourselves */ - NW_Object_Delete (url); - - if (status == KBrsrOutOfMemory) - { - return KBrsrOutOfMemory; - } - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_inputElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* box = NULL; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_FBox_FormLiaison_t* formLiaison = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - - NW_TRY (status ) - { - // Get the Form Liaison associated with the form element that encloses this input - formLiaison = NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - if (formLiaison == NULL) - { - NW_THROW_SUCCESS(status); - } - - /* create the activeBox */ - eventHandler = NW_HED_EventHandler_New(NW_HED_DocumentNodeOf(contentHandler), elementNode); - NW_THROW_OOM_ON_NULL (eventHandler, status); - - /* get the DocumentRoot as we need to pass AppServices to the box */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (contentHandler); - NW_ASSERT(docRoot != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (docRoot, &NW_HED_DocumentRoot_Class)); - - /* This method creates appropriate input boxes based on type attribute */ - status = NW_XHTML_inputElementHandler_CreateBox(contentHandler, elementNode, &box, docRoot, - formLiaison, NW_LMgr_EventHandlerOf(eventHandler)); - NW_THROW_ON (status, KBrsrOutOfMemory); - if (box == NULL) - { - if(status == KBrsrSuccess) - { - // Add the NULL box to boxvector- for hidden box - NW_XHTML_FormLiaison_AddBox(formLiaison, box, elementNode); - } - NW_THROW_SUCCESS (status); - } - - /* Add the box to the tree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, elementNode, &box, 0); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - if (NW_Object_IsInstanceOf(box, &NW_FBox_InputBox_Class)) - { - status = NW_XHTML_inputElementHandler_HandleValidation(NW_FBox_InputBoxOf(box), formLiaison); - _NW_THROW_ON_ERROR (status); - } - - // Adds the box to the associated node in formLiaison - NW_XHTML_FormLiaison_AddBox(formLiaison, box, elementNode); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - eventHandler = NULL; - } - if (eventHandler) - { - NW_Object_Delete(eventHandler); - } - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLLabelElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLLabelElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_labelelementhandleri.h" - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_labelElementHandler_Class_t NW_XHTML_labelElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_CoreTextElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_CoreTextElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_CoreTextElementHandler */ - /* unused */ NW_Object_Unused - }, - { /* NW_XHTML_labelElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_labelElementHandler_t NW_XHTML_labelElementHandler = { - { { &NW_XHTML_labelElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLOptionElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLOptionElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_optionelementhandleri.h" -#include "nw_fbox_optionbox.h" -#include "nw_fbox_selectbox.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_xhtml_textelementhandler.h" -#include "nw_text_brelementhandler.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_optionElementHandler_Class_t NW_XHTML_optionElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_optionElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_optionElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_optionElementHandler_t NW_XHTML_optionElementHandler = { - { { &NW_XHTML_optionElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_optionElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_FBox_FormLiaison_t* formLiaison; - - NW_REQUIRED_PARAM(elementHandler); - - formLiaison = - NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - - if (formLiaison == NULL){ - return KBrsrSuccess; - } - - (void) NW_FBox_FormLiaison_AddControl(formLiaison, elementNode); - - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ - -/*CreateBoxTree is not overloaded for option element as it is taken care of in - select element createBoxTree - vk 09/18/2001 - */ - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLSelectElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLSelectElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,600 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_selectelementhandleri.h" - -#include "nwx_string.h" -#include "nw_fbox_selectbox.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_hed_documentroot.h" -#include "BrsrStatusCodes.h" - - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_selectElementHandler_GetOptionBox(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_DOM_ElementNode_t* selectNode, - NW_FBox_FormLiaison_t* formLiaison) - { - NW_LMgr_Box_t* optionBox; - NW_Text_t* optionData = NULL; - NW_Text_t* text = NULL; - NW_Ucs2* storage = NULL; - NW_HED_EventHandler_t* eventHandler; - NW_Ucs2* emptyText = NULL; - NW_Text_Length_t i; - NW_Text_Length_t length; - NW_Bool freeNeeded; - - NW_REQUIRED_PARAM (selectNode); - - - /* To comply with WML, HTML 4.01, and XHtml, the text - displayed in an option is the first of the following: - 1. (HTML) Contents of label attribute of the option element. - 2. (all) Content of the option element - 3. (WML) Contents of the title attribute of the option element. - 4. (all) Contents of the value attribute of the option element. - */ - - /* Query the DOM tree for the value of the "label" attribute. Per - * HTML 4.01 Specification section 17.6.1 Pre-selected options: "When - * specified, user agents should use the value of this attribute - * rather than the content of the OPTION element as the option label." - */ - - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_label, &text); - if (text == NULL) - { - // No label, try element content. - text = NW_XHTML_ElementHandler_GetSubTreeText(contentHandler, elementNode); - - if (text == NULL) - { - // No content, try title. - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_title, &text); - if (text == NULL) - { - // No title, try value. - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_value, &text); - } - - if(text == NULL ) - { - //No value then use empty string by creating a single null character string. - emptyText= NW_Str_New(1); - if(emptyText == NULL) - return NULL;/* out of memory */ - NW_Str_Strncpy(emptyText ,(const unsigned short *)"",1); - text = NW_Text_New (HTTP_iso_10646_ucs_2, (void*) emptyText, 1,NW_Text_Flags_TakeOwnership); - if(text == NULL) - { - NW_Str_Delete(emptyText); - return NULL;/* out of memory */ - } - } - } - } - - /* If we got this far then option data has been set to a non-null - * value. Request storage forcing a copy of the data so it can be - * manipulated it. The process is to first convert non-standard - * whitespace characters to spaces. Next the 'compress whitespace' - * utility can clean up the leading and excess internal spaces. Note - * that depending on how the value of storage was determined the - * whitespace may have already been removed or never existed in the - * first place (e.g. emptyText). It is not worth optimizing out these - * exception cases. - */ - - //Get a new copy of the storage - storage = NW_Text_GetUCS2Buffer (text, NW_Text_Flags_Aligned | NW_Text_Flags_Copy , NULL, &freeNeeded); - NW_Object_Delete(text); - - //If there are &nbsp's in the title, convert them into spaces - if (storage) - { - length = NW_Str_Strlen(storage); - for (i = 0; i < length; i++) - { - if ((storage[i] == NW_TEXT_UCS2_TAB) || (storage[i] == NW_TEXT_UCS2_NBSP)) - { - storage[i] = ' '; - } - } - - // After converting all whitespace to spaces we can compress the - // string. Note that this compress utility removes leading and - // trailing whitespace so trimming isn't needed. - NW_Str_CompressWhitespace(storage); - } - - optionData = (NW_Text_t*) NW_Text_UCS2_New (storage, 0, NW_Text_Flags_TakeOwnership); - if (optionData == NULL) - { - NW_Str_Delete(storage); - return NULL; /* out of memory */ - } - - - /* create the activeBox */ - eventHandler = NW_HED_EventHandler_New(NW_HED_DocumentNodeOf(contentHandler), elementNode); - if (eventHandler == NULL) - { - NW_Object_Delete(optionData); - return NULL; /* out of memory */ - } - - optionBox = (NW_LMgr_Box_t*)NW_FBox_OptionBox_New (1, NW_LMgr_EventHandlerOf (eventHandler), - elementNode, formLiaison, optionData); - if (optionBox == NULL) - { - NW_Object_Delete(optionData); - NW_Object_Delete(eventHandler); - return NULL; /* out of memory */ - } - - /* successful completion */ - - /* apply common attributes and styles */ - NW_XHTML_ElementHandler_ApplyStyles(elementHandler, contentHandler, elementNode, - &optionBox, 0); - return optionBox; - } - -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_selectElementHandler_GetOptGrpBox(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_DOM_ElementNode_t* selectNode, - NW_FBox_FormLiaison_t* formLiaison, - NW_Bool* isFirstOption, - NW_Bool multipleSelection) -{ - NW_LMgr_Box_t* optgrpBox; - NW_HED_EventHandler_t* eventHandler; - NW_Text_t* attrVal = NULL; - TBrowserStatusCode status; - NW_DOM_Node_t* childNode; - NW_Bool true_value = NW_TRUE; - NW_Ucs2* emptyText = NULL; - - /* successful completion */ - /* get label of the new box */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_label, &attrVal); - - /* The label attribute is required; - ** but if it does not exist, attempt to recover - ** by getting the title attribute, if any. - */ - if (attrVal == NULL) { - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_title, &attrVal); - } - /* If no title exists, then it is an error. If we really - ** wanted to, we make a empty label to use - ** and continue but that isn't a specified behavior - */ - if (attrVal == NULL) { - /* if value is null then empty string is assigned for the option - to be displayed and selected*/ - emptyText= NW_Str_New(1); - if(emptyText == NULL) - return NULL;/* out of memory */ - NW_Str_Strncpy(emptyText ,(const unsigned short *)"",1/*length*/); - attrVal = NW_Text_New (HTTP_iso_10646_ucs_2, (void*) emptyText , - 1/* characterCount*/,NW_Text_Flags_TakeOwnership); - if(attrVal == NULL){ - NW_Str_Delete(emptyText); - return NULL;/* out of memory */ - } - } - - /* create the activeBox */ - eventHandler = - NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), - elementNode); - if (eventHandler == NULL){ - NW_Object_Delete(attrVal); - return NULL; - } - - optgrpBox = (NW_LMgr_Box_t*)NW_FBox_OptGrpBox_New(1, NW_LMgr_EventHandlerOf (eventHandler), - elementNode, formLiaison, attrVal); - if (optgrpBox == NULL) - { - NW_Object_Delete(attrVal); - NW_Object_Delete(eventHandler); - return NULL; - } - - /* successful completion */ - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles(elementHandler, contentHandler, elementNode, - &optgrpBox, 0); - if (status == KBrsrOutOfMemory) - { - return NULL; - } - if (optgrpBox == NULL) - { - return NULL; - } - - for (childNode = NW_DOM_Node_getFirstChild (elementNode); - childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) - { - if (NW_DOM_Node_getNodeType(childNode) != NW_DOM_ELEMENT_NODE) - continue; - - if (NW_HED_DomHelper_GetElementToken (childNode) == NW_XHTML_ElementToken_option) - { - NW_LMgr_Box_t* optionBox; - - optionBox = NW_XHTML_selectElementHandler_GetOptionBox(elementHandler, - contentHandler, - childNode, - selectNode, - formLiaison); - if (optionBox == NULL) - { - return NULL; /* out of memory or other error */ - } - - // We want to select the first option in a select box if - // 1) it is the first option - // 2) if there is no value for this option (when we load a page vs. using the back button) - // 3) it is not a multiple selection box - NW_XHTML_FormLiaison_t* xhtmlFormLiaison = NW_XHTML_FormLiaisonOf (formLiaison); - NW_Object_t* value = NW_XHTML_ControlSet_GetValue (xhtmlFormLiaison->controlSet, (NW_DOM_ElementNode_t*) childNode); - if(*isFirstOption && !value && !multipleSelection) - { - (void) NW_FBox_FormLiaison_SetBoolValue(formLiaison, childNode, &true_value); - *isFirstOption = NW_FALSE; - } - else if(!multipleSelection) - { - NW_Ucs2* selectedAttr = NULL; - /* find if selected, this is to set the most recent option that is selected */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - childNode, - NW_XHTML_AttributeToken_selected, - &selectedAttr); - if (status == KBrsrSuccess){ - if ( NW_Str_StricmpConst(selectedAttr, "selected") == 0 ) { - (void) NW_FBox_FormLiaison_SetBoolValue(formLiaison, childNode, &true_value); - } - } - NW_Str_Delete( selectedAttr ); - selectedAttr = NULL; - } - NW_FBox_OptGrpBox_AddOption(NW_FBox_OptGrpBoxOf(optgrpBox), NW_FBox_OptionBoxOf(optionBox)); - NW_XHTML_FormLiaison_AddBox(formLiaison, optionBox, childNode); - } - } - - return optgrpBox; -} - - - - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_selectElementHandler_Class_t NW_XHTML_selectElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_selectElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_selectElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_selectElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_selectElementHandler_t NW_XHTML_selectElementHandler = { - { { &NW_XHTML_selectElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_selectElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_FBox_FormLiaison_t* formLiaison; - - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY (status) - { - // special handling if select is the last part of the chunk: - // leave select to be processed in the next chunk - // in case this is the last chunk, we need to process select in this chunk - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_TRUE)) - { - NW_THROW_SUCCESS (status); - } - - formLiaison = - NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - - if (formLiaison == NULL){ - NW_THROW_SUCCESS (status); - } - - status = NW_FBox_FormLiaison_AddControl(formLiaison, elementNode); - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ - - -TBrowserStatusCode -_NW_XHTML_selectElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - const NW_XHTML_selectElementHandler_t* thisObj; - NW_LMgr_Box_t* box; - NW_FBox_FormLiaison_t* formLiaison; - NW_HED_EventHandler_t* eventHandler; - NW_HED_DocumentRoot_t* docRoot; - NW_Ucs2* multipleAttr = NULL; - NW_Ucs2* selectedAttr = NULL; - NW_Bool multipleSelection = NW_FALSE; - NW_DOM_ElementNode_t* childNode; - NW_Text_t* name = NULL; - NW_Text_t* title = NULL; - NW_Bool isFirstOption = NW_TRUE; - NW_Bool true_value = NW_TRUE; - - NW_TRY (status) - { - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_FALSE)) - { - NW_THROW_SUCCESS (status); - } - - /* for convenience */ - thisObj = NW_XHTML_selectElementHandlerOf (elementHandler); - - /* get the DocumentRoot */ - docRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (contentHandler); - NW_ASSERT(docRoot != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (docRoot, &NW_HED_DocumentRoot_Class)); - - formLiaison = - NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - - if (formLiaison == NULL){ - NW_THROW_SUCCESS (status); - } - - /* find if multiple */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_multiple, - &multipleAttr); - if (status == KBrsrSuccess){ - if ( NW_Str_StricmpConst(multipleAttr, "multiple") == 0 ) { - multipleSelection = NW_TRUE; - } - NW_Str_Delete( multipleAttr ); - multipleAttr = NULL; - } - - /* find name attribute for select */ - NW_XHTML_GetDOMAttribute (NW_XHTML_ContentHandlerOf (contentHandler), - elementNode, - NW_XHTML_AttributeToken_name, &name); - NW_XHTML_GetDOMAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_title, &title); - - /* create the activeBox */ - eventHandler = - NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), - elementNode); - - if (eventHandler == NULL) { - NW_Object_Delete(name); - NW_Object_Delete(title); - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - - box = (NW_LMgr_Box_t*) - NW_FBox_SelectBox_New(1, - NW_LMgr_EventHandlerOf (eventHandler), - elementNode, - formLiaison, - docRoot->appServices, - multipleSelection, - name, - title); - if (box == NULL) { - NW_Object_Delete(eventHandler); - NW_Object_Delete(name); - NW_Object_Delete(title); - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - if (status != KBrsrSuccess){ - NW_Object_Delete(box); - NW_Object_Delete(eventHandler); - NW_THROW (status); - } - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles(elementHandler, contentHandler, elementNode, &box, 0); - if (status == KBrsrOutOfMemory) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - NW_XHTML_FormLiaison_AddBox(formLiaison, (NW_LMgr_Box_t*)box, elementNode); - - for (childNode = NW_DOM_Node_getFirstChild (elementNode); - childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) - { - NW_Uint16 token; - - token = NW_HED_DomHelper_GetElementToken (childNode); - if (token == NW_XHTML_ElementToken_option) - { - NW_LMgr_Box_t* optionBox; - NW_LMgr_Box_t* styleBox = NULL; - - optionBox = NW_XHTML_selectElementHandler_GetOptionBox(elementHandler, - contentHandler, - childNode, - elementNode, - formLiaison); - - if (!optionBox) - continue; - - // We want to select the first option in a select box if - // 1) it is the first option - // 2) if there is no value for this option (when we load a page vs. using the back button) - // 3) it is not a multiple selection box - NW_XHTML_FormLiaison_t* xhtmlFormLiaison = NW_XHTML_FormLiaisonOf (formLiaison); - NW_Object_t* value = NW_XHTML_ControlSet_GetValue (xhtmlFormLiaison->controlSet, (NW_DOM_ElementNode_t*) childNode); - if(isFirstOption && !value && !multipleSelection) - { - (void) NW_FBox_FormLiaison_SetBoolValue(formLiaison, childNode, &true_value); - isFirstOption = NW_FALSE; - } - else if(!multipleSelection) - { - /* find if selected, this is to set the most recent option that is selected */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - childNode, - NW_XHTML_AttributeToken_selected, - &selectedAttr); - if (status == KBrsrSuccess) - { - if ( NW_Str_StricmpConst(selectedAttr, "selected") == 0 ) - { - (void) NW_FBox_FormLiaison_SetBoolValue(formLiaison, childNode, &true_value); - } - } - NW_Str_Delete( selectedAttr ); - selectedAttr = NULL; - } - - /* TODO: NW_FBox_SelectBox_AddOption does not return a status when that changes this code - should be modified - vishy 07/08/2002 */ - NW_FBox_SelectBox_AddOption(NW_FBox_SelectBoxOf(box), NW_FBox_OptionBoxOf(optionBox), &styleBox); - - if (styleBox) - { - NW_XHTML_ElementHandler_ApplyStyles(NW_XHTML_ElementHandlerOf (thisObj), contentHandler, childNode, &styleBox, 0); - } - NW_XHTML_FormLiaison_AddBox(formLiaison, optionBox, childNode); - } - else if (token == NW_XHTML_ElementToken_optgroup) - { - NW_LMgr_Box_t* optgrpBox; - - optgrpBox = NW_XHTML_selectElementHandler_GetOptGrpBox(elementHandler, - contentHandler, - childNode, - elementNode, - formLiaison, - &isFirstOption, - multipleSelection); - if (!optgrpBox) - continue; - NW_FBox_SelectBox_AddOptGrp(NW_FBox_SelectBoxOf(box), NW_FBox_OptGrpBoxOf(optgrpBox)); - NW_XHTML_FormLiaison_AddBox(formLiaison, optgrpBox , childNode); - } - // if script tag , the script content should be evaluated so invoke createboxtree - else if(token == NW_XHTML_ElementToken_script || token == NW_XHTML_ElementToken_noscript ) - { - /* get the ElementHandler for the elementNode */ - const NW_XHTML_ElementHandler_t* elementHandler= - NW_XHTML_ContentHandler_GetElementHandler (contentHandler, - (NW_DOM_ElementNode_t*) childNode); - - status = NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, contentHandler, - childNode, parentBox); - _NW_THROW_ON_ERROR (status); - } - else - { - continue; - } - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLTextareaElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLTextareaElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basicforms_textareaelementhandleri.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_fbox_textareabox.h" -#include "nw_hed_hedeventhandler.h" -#include "nwx_string.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_hed_documentroot.h" -#include "nw_markup_wmlvalidator.h" -#include "BrsrStatusCodes.h" -#include "nw_fbox_inputbox.h" - - /* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_textareaElementHandler_Class_t NW_XHTML_textareaElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_textareaElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_textareaElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_textareaElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_textareaElementHandler_t NW_XHTML_textareaElementHandler = { - { { &NW_XHTML_textareaElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_XHTML_textareaElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_FBox_FormLiaison_t* formLiaison; - - NW_REQUIRED_PARAM(elementHandler); - - formLiaison = - NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - - if (formLiaison == NULL){ - return KBrsrSuccess; - } - - // If this element is the last element in the chunk and this isn't the - // last chunk then initialize it later. - NW_Uint16 element = NW_HED_DomHelper_GetElementToken(elementNode); - if ((element == NW_XHTML_ElementToken_textarea) && - (!NW_XHTML_ElementHandler_NextSiblingExists(contentHandler, elementNode, NW_TRUE))){ - return KBrsrSuccess; - } - - (void) NW_FBox_FormLiaison_AddControl(formLiaison, elementNode); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -TBrowserStatusCode -_NW_XHTML_textareaElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* box = NULL; - TBrowserStatusCode status; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_Text_t* attrVal = NULL; - const NW_Ucs2* storage = NULL; - NW_Text_Length_t length; - NW_Uint16 columnsVal = 0; - NW_Uint16 rowsVal = 2; /* default number of rows for textarea */ - NW_FBox_FormLiaison_t* formLiaison = NULL; - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_Ucs2* titleAttr = NULL; - const NW_Text_t* format = NULL; - NW_FBox_Validator_EmptyOk_t emptyOk; - NW_Markup_WmlValidator_t* validator = NULL; - NW_Text_t* buffer = NULL; - void* formControlId = NULL; - NW_Bool dummy; /* used by NW_FBox_FormLiaison_GetStringValue to indicate if a value attribute was specified */ - NW_Ucs2* maxLengthAttr = NULL; - NW_FBox_InputBox_t* inputBox; - NW_FBox_Validator_Mode_t mode; - - /* get the DocumentRoot */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (contentHandler); - NW_ASSERT(docRoot != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (docRoot, &NW_HED_DocumentRoot_Class)); - - if (elementNode == NULL){ - return KBrsrSuccess; - } - - formLiaison = NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, elementNode); - - if (formLiaison == NULL){ - return KBrsrSuccess; - } - - // If this element is the last element in the chunk and this isn't the - // last chunk then initialize it later. - NW_Uint16 element = NW_HED_DomHelper_GetElementToken(elementNode); - if ((element == NW_XHTML_ElementToken_textarea) && - (!NW_XHTML_ElementHandler_NextSiblingExists(contentHandler, elementNode, NW_FALSE))) { - return KBrsrSuccess; - } - - /* create the activeBox */ - eventHandler = NW_HED_EventHandler_New(NW_HED_DocumentNodeOf(contentHandler), elementNode); - if(eventHandler == NULL) { - return KBrsrOutOfMemory; - } - - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_cols, &attrVal); - if (attrVal) - { - storage = NW_Text_GetUCS2Buffer(attrVal, 0, &length, NULL); - if (storage) - { - NW_Int32 v; - NW_Ucs2 *endPtr = NULL; - - v = NW_Str_Strtoul (storage, &endPtr, 10 ); - columnsVal = (NW_Uint16)v; - } - NW_Object_Delete(attrVal); - } - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, NW_XHTML_AttributeToken_rows, &attrVal); - if (attrVal) - { - storage = NW_Text_GetUCS2Buffer(attrVal, 0, &length, NULL); - if (storage) - { - NW_Int32 v; - NW_Ucs2 *endPtr = NULL; - - v = NW_Str_Strtoul (storage, &endPtr, 10 ); - rowsVal = (NW_Uint16)v; - } - NW_Object_Delete(attrVal); - } - - box = (NW_LMgr_Box_t*) - NW_FBox_TextAreaBox_New(0, - NW_LMgr_EventHandlerOf (eventHandler), - elementNode, - formLiaison, - columnsVal, - docRoot->appServices, - rowsVal); - if (box == NULL) { - NW_Object_Delete (eventHandler); - return KBrsrOutOfMemory; - } - - inputBox = NW_FBox_InputBoxOf(box); - NW_ASSERT(NW_Object_IsInstanceOf(inputBox, &NW_FBox_InputBox_Class)); - - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_maxlength, - &maxLengthAttr); - if (status == KBrsrOutOfMemory) - { - return status; - } - if (status == KBrsrSuccess) - { - NW_Int32 maxlength = -1; /* Initialize to invalid length */ - if(NW_Str_StrIsValidLength(maxLengthAttr)) - { - maxlength = NW_Str_Atoi(maxLengthAttr); - } - NW_Str_Delete (maxLengthAttr); - maxLengthAttr = NULL; - if(maxlength >= 0) - { - NW_FBox_InputBox_SetMaxChars(inputBox, (NW_Text_Length_t)maxlength); - NW_FBox_InputBox_SetIsMaxlength( inputBox, NW_TRUE); - } - } - - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - if (status != KBrsrSuccess){ - NW_Object_Delete(box); - return KBrsrFailure; - } - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, elementNode, &box, 0); - if (status == KBrsrOutOfMemory) - { - return status; - } - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - return KBrsrSuccess; - } - - NW_XHTML_FormLiaison_AddBox(formLiaison, box, elementNode); - - if (NW_XHTML_ElementHandler_GetAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_title, - &titleAttr) == KBrsrSuccess) - { - NW_FBox_InputBox_SetTitle (box, titleAttr); - } - - /* Check for format and input required style. Add input format - validators to textarea box and form liaison. */ - - /* Format does not have to be freed. */ - status = NW_FBox_InputBox_GetFormat( NW_FBox_InputBoxOf(box), &format, &mode, &emptyOk); - - - if ( status != KBrsrSuccess ) { - goto cleanup; - } - - /* Create validators for textarea box and form liaison. */ - /* Prefix string match. */ - validator = NW_Markup_WmlValidator_New( format, mode, emptyOk, NW_FALSE); - - if (validator == NULL) { - status = KBrsrOutOfMemory; - goto cleanup; - } - /* Takes ownership of validator. */ - NW_FBox_InputBox_SetValidator( box, - (NW_FBox_Validator_t*) validator); - - /* Full string match. */ - validator = NW_Markup_WmlValidator_New( format, mode, emptyOk, NW_TRUE); - - if (validator == NULL) { - status = KBrsrOutOfMemory; - goto cleanup; - } - - /* Takes ownership of validator. */ - formControlId = NW_FBox_FormBox_GetFormCntrlID(box); - NW_XHTML_FormLiaison_RegisterValidator(NW_XHTML_FormLiaisonOf(formLiaison), - formControlId, - NW_FBox_ValidatorOf(validator) ); - validator = NULL; - - - /* Set form control and input box to initial values. - First set the form liaison to it's initial value and then use that - value to set the input box. */ - status = NW_FBox_FormLiaison_SetInitialStringValue(formLiaison, formControlId, - NW_FBox_InputBox_GetMaxChars(box)); - if (status == KBrsrWmlbrowserInputNonconformingToMask) - { - /* Expected that may not match format mask. Force to success so - will contine. */ - status = KBrsrSuccess; - } - if (status != KBrsrSuccess) { - goto cleanup; - } - status = NW_FBox_FormLiaison_GetStringValue(formLiaison, formControlId, &buffer, &dummy); - if (status != KBrsrSuccess) { - goto cleanup; - } - status = NW_FBox_InputBox_SetDefaultVal(NW_FBox_InputBoxOf(box), buffer); - - - cleanup: - return status; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLBasicTablesModule.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLBasicTablesModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basictables_basictablesmodulei.h" - -#include "nw_basictables_captionelementhandler.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_basictables_cellelementhandler.h" -#include "nw_basictables_trelementhandler.h" -#include "nw_basictables_rowgroupelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_BasicTablesModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_caption, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_captionElementHandler }, - { NW_XHTML_ElementToken_table, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_tableElementHandler }, - { NW_XHTML_ElementToken_td, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_cellElementHandler }, - { NW_XHTML_ElementToken_th, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_cellElementHandler }, - { NW_XHTML_ElementToken_tr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_trElementHandler }, - { NW_XHTML_ElementToken_tbody, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_rowgroupElementHandler }, - { NW_XHTML_ElementToken_thead, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_rowgroupElementHandler }, - { NW_XHTML_ElementToken_tfoot, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_rowgroupElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_BasicTablesModule_Class_t NW_XHTML_BasicTablesModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_BasicTables), - /* elementHandlers */ _NW_XHTML_BasicTablesModule_ElementHandlers, - }, - { /* NW_XHTML_BasicTablesModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_BasicTablesModule_t NW_XHTML_BasicTablesModule = { - {&NW_XHTML_BasicTablesModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLCaptionElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLCaptionElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basictables_captionelementhandleri.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "BrsrStatusCodes.h" - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_captionElementHandler_Class_t NW_XHTML_captionElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_captionElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_captionElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_captionElementHandler_t NW_XHTML_captionElementHandler = { - { { &NW_XHTML_captionElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_captionElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* captionBox = NULL; - - NW_TRY (status) - { - NW_DOM_ElementNode_t* prevSibling; - - /* reject multiple caption elements */ - prevSibling = elementNode; - do - { - prevSibling = NW_DOM_Node_getPreviousSibling(prevSibling); - }while(prevSibling && (NW_DOM_Node_getNodeType(prevSibling) != NW_DOM_ELEMENT_NODE)); - - if (prevSibling && - (NW_DOM_ElementNode_getTagToken(prevSibling) == NW_XHTML_ElementToken_caption)) - { - NW_THROW_SUCCESS(status); - } - - captionBox = (NW_LMgr_Box_t*)NW_LMgr_BidiFlowBox_New(0); - NW_THROW_OOM_ON_NULL (captionBox, status); - - status = NW_LMgr_ContainerBox_InsertChildAt(parentBox, captionBox, 0); - _NW_THROW_ON_ERROR(status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles(elementHandler, contentHandler, elementNode, - &captionBox, 0); - NW_THROW_ON (status, KBrsrOutOfMemory); - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (captionBox == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf(captionBox); - - /* invoke our superclass for completion */ - status = _NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, contentHandler, elementNode, parentBox); - } - NW_CATCH (status) - { - if (captionBox) - { - NW_Object_Delete (captionBox); - } - } NW_FINALLY - { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLCellElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLCellElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basictables_cellelementhandleri.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_verticaltablerowbox.h" -#include "nw_lmgr_rootbox.h" -#include "nwx_string.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nwx_settings.h" -#include "BrsrStatusCodes.h" -#include "nw_hed_documentroot.h" -#include "HEDDocumentListener.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_cellElementHandler_Class_t NW_XHTML_cellElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_cellElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_cellElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_cellElementHandler_t NW_XHTML_cellElementHandler = { - { { &NW_XHTML_cellElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_cellElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* cellBox = NULL; - - NW_TRY (status) - { - /* We only create a cell box if the parent is a row */ - if (NW_Object_IsClass(parentBox, &NW_LMgr_StaticTableRowBox_Class) || - NW_Object_IsClass(parentBox, &NW_LMgr_VerticalTableRowBox_Class)) - { - /* Create the cell box */ - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(contentHandler); - NW_ASSERT(documentRoot != NULL); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(documentRoot); - NW_ASSERT(rootBox != NULL); - - if ((NW_XHTML_tableElementHandler_DoesGridModeApply( - contentHandler, elementNode) == NW_TRUE) || - (NW_LMgr_RootBox_GetSmallScreenOn(rootBox) == NW_FALSE)) - { - cellBox = (NW_LMgr_Box_t*) NW_LMgr_StaticTableCellBox_New(0); - } - else - { - cellBox = (NW_LMgr_Box_t*) NW_LMgr_VerticalTableCellBox_New(0); - } - NW_THROW_OOM_ON_NULL (cellBox, status); - - /* add it to the boxtree so that relative styles may be resolved */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, cellBox); - _NW_THROW_ON_ERROR(status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles(elementHandler, - contentHandler, - elementNode, - &cellBox, - NULL /* eventClass */); - NW_THROW_ON (status, KBrsrOutOfMemory); - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (cellBox == NULL) - { - NW_THROW_SUCCESS (status); - } - parentBox = NW_LMgr_ContainerBoxOf(cellBox); - } - - /* invoke our superclass for completion */ - status = NW_XHTML_ElementHandler_Class.NW_XHTML_ElementHandler. - createBoxTree (elementHandler, contentHandler, elementNode, parentBox); - - cellBox = NULL; - - } NW_CATCH (status) - { - NW_Object_Delete (cellBox); - } NW_FINALLY { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLRowgroupElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLRowgroupElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basictables_rowgroupelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_basictables_trelementhandler.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_rowgroupElementHandler_Class_t NW_XHTML_rowgroupElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_rowgroupElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_tableElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_rowgroupElementHandler_t NW_XHTML_rowgroupElementHandler = { - { { &NW_XHTML_rowgroupElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_rowgroupElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY (status) { - NW_DOM_ElementNode_t* childNode; - - // We visit the children ourselves, rather than calling the superclass. - // This is necessary so we can filter any unwanted elements from - // the table. A row group can only handle <tr> elements. */ - for (childNode = NW_DOM_Node_getFirstChild (elementNode); - childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) { - const NW_XHTML_ElementHandler_t* childElementHandler; - - // get the ElementHandler for the elementNode - childElementHandler = - NW_XHTML_ContentHandler_GetElementHandler (contentHandler, - (NW_DOM_ElementNode_t*) childNode); - if (childElementHandler == NULL) { - continue; - } - - // If this is not a table row, skip to next - // We need to remove this check because at the moment parser has no notion of tbody - // It wraps tbody in a fake tr, td, so tbody will always be in a cell - // Later on we need to update the parser to handle it properly - //if (NW_Object_IsInstanceOf(childElementHandler, &NW_XHTML_trElementHandler_Class)) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (childElementHandler, contentHandler, - childNode, parentBox); - _NW_THROW_ON_ERROR(status); - } -// else { - // continue; - // } - } - - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTableElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTableElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,844 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "XhtmlTableElementHandler.h" - -#include "BrsrStatusCodes.h" -#include "GDIDevicecontext.h" -#include "HEDDocumentListener.h" -#include "LMgrAnonTableBox.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_basictables_trelementhandler.h" -#include "nw_basictables_captionelementhandler.h" -#include "nw_basictables_rowgroupelementhandler.h" -#include "nw_basicforms_formelementhandler.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_basicforms_inputelementhandler.h" -//#include "nw_structure_scriptelementhandler.h" -#include "nw_object_exceptions.h" -#include "nw_dom_domvisitor.h" -#include "nwx_settings.h" -#include "nwx_statuscodeconvert.h" - - -#define GRID_MODE_MAX_NUMBER_OF_ELEMEMTS 500 -#define GRID_MODE_MAX_TEXT_BLOCK 100 -#define GRID_MODE_COL_RATIO 0.025 -#define GRID_MODE_IMAGE_SCALE_RATIO 3 - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::CXHTMLTableElementHandler -// -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CXHTMLTableElementHandler::CXHTMLTableElementHandler(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - iElementHandler = aElementHandler; - iContentHandler = aContentHandler; - iElementNode = aElementNode; - - iIsGridMode = ETrue; - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::ConstructL -// -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CXHTMLTableElementHandler::ConstructL(void) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - CGDIDeviceContext* deviceContext = NULL; - - // Get the doc-root, root-box and device context. - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(iContentHandler); - NW_ASSERT(docRoot != NULL); - - iRootBox = NW_HED_DocumentRoot_GetRootBox(docRoot); - NW_ASSERT(iRootBox != NULL); - - deviceContext = NW_LMgr_RootBox_GetDeviceContext(iRootBox); - - // Get the screen width from the device context. - iScreenWidth = (NW_Float32) deviceContext->DisplayBounds()->dimension.width; - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::~CXHTMLTableElementHandler -// -// Deconstructor. -// ----------------------------------------------------------------------------- -// -CXHTMLTableElementHandler::~CXHTMLTableElementHandler() - { - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXHTMLTableElementHandler* CXHTMLTableElementHandler::NewL(const NW_XHTML_ElementHandler_t* - aElementHandler, NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - CXHTMLTableElementHandler* self = new(ELeave) CXHTMLTableElementHandler(aElementHandler, - aContentHandler, aElementNode); - - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::Initialize -// -// Initializes the ElementHandler. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLTableElementHandler::Initialize(void) - { - NW_TRY (status) - { - // If the table has already been determined not to be a grid mode - // table then just exit the method successfully. - if (!iIsGridMode) - { - NW_THROW_SUCCESS(status); - } - - // Evalulate the table to determine whether it's suitable for grid mode layout. - // This does the pre-validation of the table (as the chunks arrive). - status = PreEvalTable(); - _NW_THROW_ON_ERROR(status); - - // Stop initialzation if the entire table isn't available. - if (!NW_XHTML_ElementHandler_NextSiblingExists (iContentHandler, iElementNode, NW_TRUE)) - { - NW_THROW_SUCCESS (status); - } - - // The entire table has arrived so clear iLastEvaluatedElement as it's not needed - // any more. - iLastEvaluatedElement = NULL; - - // Evalulate the table to determine whether it's suitable for grid mode layout. - // This does the post-validation of the table (after the entire table is available). - status = PostEvalTable(); - _NW_THROW_ON_ERROR(status); - } - - NW_CATCH (status) - { - // Suppress the status if the exception occurred because - // the table was disqualified for grid mode. - if (!iIsGridMode) - { - status = KBrsrSuccess; - } - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::CreateBoxTree -// -// Creates the box-tree associated with the tag. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLTableElementHandler::CreateBoxTree(NW_LMgr_ContainerBox_t& aParentBox) - { - NW_LMgr_Box_t* tableBox = NULL; - NW_LMgr_Box_t* tableContainer = NULL; - NW_Bool ownstableBox = NW_TRUE; - NW_Bool ownsTableContainer = NW_TRUE; - NW_ADT_Vector_Metric_t tableContainerIndex = 0; - - NW_TRY (status) - { - NW_LMgr_Property_t prop; - - // Stop creation if the entire table isn't available -- iIsGridMode is - // also checked because if it is set to false it should always allow the - // method to continue. - if (iIsGridMode && !NW_XHTML_ElementHandler_NextSiblingExists( - iContentHandler, iElementNode, NW_FALSE)) - { - NW_THROW_SUCCESS (status); - } - - // If need be set the grid mode flag on the root-box. - if (iIsGridMode) - { - iRootBox->iHasGridModeTables = NW_TRUE; - } - - // Allocate and initialize the anonymous container for the table and - // an optional caption - tableContainer = (NW_LMgr_Box_t*) LMgrAnonTableBox_New(1); - NW_THROW_OOM_ON_NULL (tableContainer, status); - - // Set the table display property - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(tableContainer, NW_CSS_Prop_display, &prop); - _NW_THROW_ON_ERROR(status); - - status = NW_LMgr_ContainerBox_AddChild(&aParentBox, tableContainer); - _NW_THROW_ON_ERROR(status); - ownsTableContainer = NW_FALSE; - - // Allocate and initialize the box for the table - if ((DoesGridModeApply() == NW_TRUE) || - (NW_LMgr_RootBox_GetSmallScreenOn(iRootBox) == NW_FALSE)) - - { - tableBox = (NW_LMgr_Box_t*) NW_LMgr_StaticTableBox_New(1); - } - else - { - tableBox = (NW_LMgr_Box_t*) NW_LMgr_VerticalTableBox_New(1); - } - NW_THROW_OOM_ON_NULL(tableBox, status); - - // Add the boxes to the tree - status = NW_LMgr_ContainerBox_AddChild(NW_LMgr_ContainerBoxOf(tableContainer), tableBox); - _NW_THROW_ON_ERROR(status); - ownstableBox = NW_FALSE; - - tableContainerIndex = NW_LMgr_ContainerBox_GetChildCount(&aParentBox); - - // Create the subtree of boxes for elements within the table element - status = CreateSubTree(iElementNode, tableBox, &aParentBox); - _NW_THROW_ON_ERROR(status); - - // If form and input controls are not within td, they need to be put in the beginning of the table - // For e.g - // <TABLE> - // <caption> Table Test </caption> - // <TR><TD>Search</TD><TD>Nokia</TD></TR> - // - // <TR> - // <FORM> - // <INPUT type=text value=001 name=wsid1> - // <TD>Search <INPUT type=text value=001 name=wsid2> - // </TD><TD>Nokia</TD> - // <input type="reset"/> - // </FORM> - // </TR> - // </table> - // - // Here wsid1 should be put before table box, but while adding boxes we added it after the tableContainerBox. - // So, we see that more boxes were added after tableContainerBox, we move this box to the end. - - if (NW_LMgr_ContainerBox_GetChildCount(&aParentBox) > tableContainerIndex) - { - NW_LMgr_ContainerBox_InsertChildAt(&aParentBox, tableContainer, NW_ADT_Vector_AtEnd); - } - - status = NW_XHTML_ElementHandler_ApplyStyles(iElementHandler, iContentHandler, - iElementNode, &tableBox, 0); - _NW_THROW_ON_ERROR(status); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (tableBox == NULL) - { - NW_THROW_SUCCESS(status); - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - if (ownstableBox) - { - NW_Object_Delete(tableBox); - } - - if (ownsTableContainer) - { - NW_Object_Delete(tableContainer); - } - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::DoesGridModeApply -// -// Returns whether or not grid mode applies to this table. -// ----------------------------------------------------------------------------- -// -TBool CXHTMLTableElementHandler::DoesGridModeApply(void) - { - return iIsGridMode; - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::CreateSubTree -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CXHTMLTableElementHandler::CreateSubTree(NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aTableBox, NW_LMgr_ContainerBox_t* aTableContainerParent) - { - NW_DOM_ElementNode_t* childNode; - - NW_TRY (status) - { - /* We visit the children ourselves, rather than calling the superclass. - * This is necessary so we can filter any unwanted elements from - * the table. A table can only handle <tr> elements. */ - for (childNode = NW_DOM_Node_getFirstChild(aElementNode); childNode != NULL; - childNode = NW_DOM_Node_getNextSibling(childNode)) - { - const NW_XHTML_ElementHandler_t* elementHandler; - - /* get the ElementHandler for the aElementNode */ - elementHandler = NW_XHTML_ContentHandler_GetElementHandler(iContentHandler, - (NW_DOM_ElementNode_t*) childNode); - - /* we want to ignore the entire script tag */ - if (elementHandler == NULL) - { - continue; - } - - status = CreateSubTreeHelper(elementHandler, childNode,aTableBox, - aTableContainerParent); - _NW_THROW_ON_ERROR(status); - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::CreateSubTreeHelper -// -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CXHTMLTableElementHandler::CreateSubTreeHelper(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_DOM_ElementNode_t* aElementNode, NW_LMgr_Box_t* aTableBox, - NW_LMgr_ContainerBox_t* aTableContainerParent) - { - NW_TRY (status) - { - /* for handling forms embedded in tables */ - if (NW_Object_IsInstanceOf(aElementHandler, &NW_XHTML_formElementHandler_Class)) - { - NW_XHTML_FormLiaison_t* formLiaison = (NW_XHTML_FormLiaison_t*) - NW_XHTML_ContentHandler_GetFormLiaison(iContentHandler, aElementNode); - NW_REQUIRED_PARAM(formLiaison); - - status = CreateSubTree(aElementNode, aTableBox, aTableContainerParent); - _NW_THROW_ON_ERROR(status); - } - - else if (NW_Object_IsInstanceOf(aElementHandler, &NW_XHTML_inputElementHandler_Class)) - { - status = NW_XHTML_ElementHandler_CreateBoxTree(aElementHandler, iContentHandler, - aElementNode, aTableContainerParent); - _NW_THROW_ON_ERROR(status); - } - - /* If this is not a table row or a caption, skip to next */ - else if (NW_Object_IsInstanceOf(aElementHandler, &NW_XHTML_trElementHandler_Class) || - NW_Object_IsInstanceOf(aElementHandler, &NW_XHTML_rowgroupElementHandler_Class) ) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (aElementHandler, iContentHandler, - aElementNode, NW_LMgr_ContainerBoxOf(aTableBox)); - _NW_THROW_ON_ERROR(status); - } - - else if (NW_Object_IsInstanceOf(aElementHandler, &NW_XHTML_captionElementHandler_Class)) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (aElementHandler, iContentHandler, - aElementNode, aTableBox->parent); - _NW_THROW_ON_ERROR(status); - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::HasOnlyOneElementChild -// -// Returns true if the parent has only one element, ignoring text nodes that -// only contain whitespace. -// ----------------------------------------------------------------------------- -// -NW_Bool -CXHTMLTableElementHandler::HasOnlyOneElementChild(NW_DOM_Node_t* aParentNode) - { - TBrowserStatusCode status; - NW_DOM_Node_t* child; - NW_Int32 childCount = 0; - - NW_ASSERT(aParentNode != NULL); - - // Return false if it has no children. - if (NW_DOM_Node_hasChildNodes(aParentNode) == NW_FALSE) - { - return NW_FALSE; - } - - for (child = NW_DOM_Node_getFirstChild(aParentNode); - child != NULL; child = NW_DOM_Node_getNextSibling(child)) - { - if (NW_DOM_Node_getNodeType(child) == NW_DOM_ELEMENT_NODE) - { - childCount++; - } - - else if (NW_DOM_Node_getNodeType(child) == NW_DOM_TEXT_NODE) - { - NW_String_t string; - - status = StatusCodeConvert(NW_DOM_TextNode_getData(child, &string)); - - if (status == KBrsrSuccess) - { - NW_Ucs2* temp = NULL; - - temp = NW_Str_TrimInPlace((NW_Ucs2*) string.storage, NW_Str_Both); - if (temp && (*temp != 0x00)) - { - childCount++; - } - - NW_String_deleteStorage(&string); - } - } - - if (childCount > 1) - { - return NW_FALSE; - } - } - - return NW_TRUE; - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::PreEvalTable -// -// This method is called each time a table chunk arrives. It is used -// to determine whether or not that table should be laid out in grid mode. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CXHTMLTableElementHandler::PreEvalTable() - { - const NW_Int32 validTokens[] = - { - NW_XHTML_ElementToken_td, - NW_XHTML_ElementToken_tr, - NW_XHTML_ElementToken_a, - NW_XHTML_ElementToken_img, - NW_XHTML_ElementToken_input, - NW_XHTML_ElementToken_th, - NW_XHTML_ElementToken_form, - NW_XHTML_ElementToken_label, - NW_XHTML_ElementToken_button, - NW_XHTML_ElementToken_caption, - NW_XHTML_ElementToken_tbody, - NW_XHTML_ElementToken_tfoot, - NW_XHTML_ElementToken_thead, - NW_XHTML_ElementToken_span, - NW_XHTML_ElementToken_font, - NW_XHTML_ElementToken_b, - NW_XHTML_ElementToken_big, - NW_XHTML_ElementToken_i, - NW_XHTML_ElementToken_p, - NW_XHTML_ElementToken_center, - NW_XHTML_ElementToken_br, - NW_XHTML_ElementToken_nobr, - NW_XHTML_ElementToken_small - }; - - NW_cXML_DOM_DOMVisitor_t visitor; - NW_DOM_Node_t* domNode = NULL; - NW_Int32 tokenCount = sizeof(validTokens) / sizeof(validTokens[0]); - NW_Ucs2* widthStr = NULL; - NW_Ucs2* typeStr = NULL; - - NW_TRY (status) - { - // Reject if mobile profile mode is enabled. - if (NW_Settings_GetDisableSmallScreenLayout()) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Init the dom visitor. - status = NW_cXML_DOM_DOMVisitor_Initialize(&visitor, (NW_DOM_Node_t*) iElementNode); - NW_THROW_ON_ERROR(status); - - // iLastEvaluatedElement is null during the first call to PreEvalTable on a given - // table. In this condition a call to "next" is made to skip the table element. - if (iLastEvaluatedElement == NULL) - { - (void) NW_cXML_DOM_DOMVisitor_Next(&visitor, NW_DOM_ELEMENT_NODE | NW_DOM_TEXT_NODE); - } - - // Otherwise the vistor's current node is set to the last node processed during the - // previous call to PreEvalTable. - else - { - visitor.currentNode = iLastEvaluatedElement; - } - - // Validate the children. - while ((domNode = NW_cXML_DOM_DOMVisitor_Next(&visitor, - NW_DOM_ELEMENT_NODE | NW_DOM_TEXT_NODE)) != NULL) - { - NW_Bool tokenValid = NW_FALSE; - NW_Uint16 token; - - // Update and test the element count, reject the table if there are - // to many elements. - iNumberOfElements++; - - if (iNumberOfElements >= GRID_MODE_MAX_NUMBER_OF_ELEMEMTS) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Ensure that text nodes aren't to large. - if (NW_DOM_Node_getNodeType(domNode) == NW_DOM_TEXT_NODE) - { - NW_String_t text; - NW_Uint16 length; - - status = StatusCodeConvert(NW_DOM_TextNode_getData(domNode, &text)); - NW_THROW_ON_ERROR(status); - - length = NW_String_getCharCount(&text, HTTP_iso_10646_ucs_2); - - NW_String_deleteStorage(&text); - - // The text block is to large, reject the table. - if (length > GRID_MODE_MAX_TEXT_BLOCK) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Otherwise skip to the next child -- no text relevant checks follow. - else - { - continue; - } - } - - // Get the element's token. - token = NW_HED_DomHelper_GetElementToken(domNode); - - // The element is valid if its token is found in validTokens. - for (NW_Int32 i = 0; i < tokenCount; i++) - { - if (token == validTokens[i]) - { - tokenValid = NW_TRUE; - - // Break out of the loop. - break; - } - } - - // The token is invalid, reject the table. - if (tokenValid == NW_FALSE) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Do additional element-level validation. - switch (token) - { - case NW_XHTML_ElementToken_img: - { - NW_Int32 width; - NW_DOM_Node_t* parentNode; - NW_Bool siblingCheckDone = NW_FALSE; - - // Both the hight and width attributes are needed. - status = NW_HED_DomHelper_HasAttribute(domNode, NW_XHTML_AttributeToken_height); - NW_THROW_ON_ERROR(status); - - status = NW_XHTML_ElementHandler_GetAttribute(iContentHandler, domNode, - NW_XHTML_AttributeToken_width, &widthStr); - NW_THROW_ON_ERROR(status); - - // Reject the table if the width is to large. - width = NW_Str_Atoi(widthStr); - if ((width / iScreenWidth) > GRID_MODE_IMAGE_SCALE_RATIO) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - NW_Str_Delete(widthStr); - widthStr = NULL; - - // Reject the table if the image has an usemap - status = NW_HED_DomHelper_HasAttribute(domNode, NW_XHTML_AttributeToken_usemap); - if (status == KBrsrSuccess) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Reject the table if the image has any siblings - parentNode = domNode; - - do - { - NW_Uint16 parentToken; - - parentNode = NW_DOM_Node_getParentNode(parentNode); - NW_THROW_ON_NULL(parentNode, status, KBrsrUnexpectedError); - - parentToken = NW_HED_DomHelper_GetElementToken(parentNode); - - // If the parent node is either a td or th the sibling check is done. - // tr is also check as to handle malformed content. - if ((parentToken == NW_XHTML_ElementToken_td) || - (parentToken == NW_XHTML_ElementToken_th) || - (parentToken == NW_XHTML_ElementToken_tr)) - { - siblingCheckDone = NW_TRUE; - } - - // Reject, if the node has two or more child. - if (HasOnlyOneElementChild(parentNode) == NW_FALSE) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - while (!siblingCheckDone); - } - break; - - case NW_XHTML_ElementToken_input: - { - // Get the type attribute. - status = NW_XHTML_ElementHandler_GetAttribute(iContentHandler, domNode, - NW_XHTML_AttributeToken_type, &typeStr); - - // Reject the table if type is missing. - NW_THROW_ON_ERROR(status); - - // Reject the table if type equals "text", "password", "file", "image". - if ((NW_Str_StricmpConst(typeStr, "text") == 0) || - (NW_Str_StricmpConst(typeStr, "image") == 0) || - (NW_Str_StricmpConst(typeStr, "file") == 0) || - (NW_Str_StricmpConst(typeStr, "password") == 0)) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - NW_Str_Delete(typeStr); - typeStr = NULL; - } - - default: - break; - } - - iLastEvaluatedElement = domNode; - } - } - - NW_CATCH (status) - { - NW_Str_Delete(widthStr); - NW_Str_Delete(typeStr); - - iIsGridMode = EFalse; - iLastEvaluatedElement = NULL; - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLTableElementHandler::PostEvalTable -// -// This method is called after all of the chunks of a table arrive. It is used -// to determine whether or not that table should be laid out in grid mode. -// -// Note: This method should be restructured to be like PreEvalTable if any non -// tr tests are added. It's like this because it only needs to check the -// top level children to validate tr's. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -CXHTMLTableElementHandler::PostEvalTable() - { - NW_DOM_Node_t* domNode = NULL; - NW_DOM_Node_t* child = NULL; - NW_Uint16 token; - NW_Int32 childCount; - NW_ADT_Vector_t* secondLevelElementQueue = NULL; - NW_Bool firstLevelElement = NW_TRUE; - - NW_TRY (status) - { - // Create a vector to hold first level children that need their second - // level children checked as well. - secondLevelElementQueue = (NW_ADT_Vector_t*) NW_ADT_ResizableVector_New( - sizeof(NW_DOM_Node_t*), 1, 2); - NW_THROW_OOM_ON_NULL(secondLevelElementQueue, status); - - domNode = NW_DOM_Node_getFirstChild(iElementNode); - - while (domNode != NULL) - { - for (; domNode != NULL; domNode = NW_DOM_Node_getNextSibling(domNode)) - { - // Skip non-element nodes. - if (NW_DOM_Node_getNodeType(domNode) != NW_DOM_ELEMENT_NODE) - { - continue; - } - - // Handle non-tr children. A queue is used to handle malformed tables like: - // <table><form><tr>...</tr><tr>...</tr></form></table> -- note: the - // trs are second level children not first level as they should be. - token = NW_HED_DomHelper_GetElementToken(domNode); - if (token != NW_XHTML_ElementToken_tr) - { - // When processing the first level children append any non-tr node to - // the queue the children of these node will be checked in later iterations. - if (firstLevelElement) - { - NW_ADT_DynamicVector_InsertAt(secondLevelElementQueue, &domNode, NW_ADT_Vector_AtEnd); - continue; - } - - // Otherwise reject the table as its too malformed to reliably handled. - else - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - - // Skip tr's without children. - if (NW_DOM_Node_hasChildNodes(domNode) == NW_FALSE) - { - continue; - } - - // Count the number of columns in this row. - childCount = 0; - - // Count the first child. - child = NW_DOM_Node_getFirstChild(domNode); - if (NW_DOM_Node_getNodeType(child) == NW_DOM_ELEMENT_NODE) - { - childCount++; - } - - // Count the other children. - while ((child = NW_DOM_Node_getNextSibling(child)) != NULL) - { - if (NW_DOM_Node_getNodeType(child) == NW_DOM_ELEMENT_NODE) - { - childCount++; - } - } - - // Reject the table if there are to many columns. - if ((childCount / iScreenWidth) > GRID_MODE_COL_RATIO) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - } - - // If need be process the next queued first level non-tr node. - if ((secondLevelElementQueue != NULL) && - (NW_ADT_Vector_GetSize(secondLevelElementQueue) > 0)) - { - status = NW_ADT_Vector_GetElementAt(secondLevelElementQueue, 0, &domNode); - NW_THROW_ON_ERROR(status); - - status = NW_ADT_DynamicVector_RemoveAt(secondLevelElementQueue, 0); - NW_THROW_ON_ERROR(status); - - firstLevelElement = NW_FALSE; - domNode = NW_DOM_Node_getFirstChild(domNode); - } - } - } - - NW_CATCH (status) - { - iIsGridMode = EFalse; - } - - NW_FINALLY - { - NW_Object_Delete(secondLevelElementQueue); - - return status; - } NW_END_TRY - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTableElementHandlerOOC.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTableElementHandlerOOC.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "XhtmlTableElementHandlerOOCi.h" -#include "XhtmlTableElementHandler.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" - - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_TableElementHandler_CreateImpl(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - CXHTMLTableElementHandler* tableElementHandler = NULL; - - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - NW_TRY (status) - { - // Create the instance. - TInt err; - TRAP(err, tableElementHandler = CXHTMLTableElementHandler::NewL(aElementHandler, - aContentHandler, aElementNode)); - NW_THROW_OOM_ON_NULL(tableElementHandler, status); - - // Associate the inst with the aElementNode. - status = NW_XHTML_ContentHandler_SetElementHandlerInstance(aContentHandler, - aElementNode, tableElementHandler); - _NW_THROW_ON_ERROR(status); - } - - NW_CATCH (status) - { - delete tableElementHandler; - tableElementHandler = NULL; - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - - -/* ------------------------------------------------------------------------- */ -static CXHTMLTableElementHandler* -NW_XHTML_TableElementHandler_GetImpl(NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - CXHTMLTableElementHandler* tableElementHandler = NULL; - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - // Get the instance associated with the node - tableElementHandler = (CXHTMLTableElementHandler*) - NW_XHTML_ContentHandler_GetElementHandlerInstance(aContentHandler, aElementNode); - - return tableElementHandler; - } - - -/* ------------------------------------------------------------------------- */ -static CXHTMLTableElementHandler* -NW_XHTML_TableElementHandler_FindImpl(NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - NW_DOM_Node_t* node = NULL; - - // Searching up the DOM tree for the table element. - node = aElementNode; - - while (node && (NW_HED_DomHelper_GetElementToken(node) != NW_XHTML_ElementToken_table)) - { - node = NW_DOM_Node_getParentNode(node); - } - - if (node == NULL) - { - return NULL; - } - - // Return the instance. - return NW_XHTML_TableElementHandler_GetImpl(aContentHandler, node); - } - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_tableElementHandler_Class_t NW_XHTML_tableElementHandler_Class = -{ - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_tableElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_tableElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_tableElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_tableElementHandler_t NW_XHTML_tableElementHandler = -{ - { { &NW_XHTML_tableElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_tableElementHandler_Initialize(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - // Create the TableElementHandler instance. - if (!NW_XHTML_TableElementHandler_GetImpl(aContentHandler, aElementNode)) - { - status = NW_XHTML_TableElementHandler_CreateImpl(aElementHandler, aContentHandler, - aElementNode); - - if (status != KBrsrSuccess) - { - return status; - } - } - - // Pass it on to the implementation - CXHTMLTableElementHandler* imp; - - imp = NW_XHTML_TableElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->Initialize(); - } - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_tableElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_ContainerBox_t* aParentBox) - { - NW_REQUIRED_PARAM(aElementHandler); - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aParentBox != NULL); - - // Pass it on to the implementation - CXHTMLTableElementHandler* imp; - - imp = NW_XHTML_TableElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->CreateBoxTree(*aParentBox); - } - - -/* ------------------------------------------------------------------------- * - Final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -NW_Bool -NW_XHTML_tableElementHandler_DoesGridModeApply (NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - CXHTMLTableElementHandler* tableElementHandler; - - tableElementHandler = NW_XHTML_TableElementHandler_FindImpl(aContentHandler, aElementNode); - NW_ASSERT(tableElementHandler != NULL); - - // Return the value. - return (NW_Bool) tableElementHandler->DoesGridModeApply(); - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTrElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicTables/XHTMLTrElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_basictables_trelementhandleri.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_lmgr_statictablerowbox.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_verticaltablerowbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_basictables_cellelementhandler.h" -#include "nwx_string.h" -#include "nwx_settings.h" -#include "nw_basicforms_formelementhandler.h" -#include "nw_basicforms_inputelementhandler.h" -//#include "nw_structure_scriptelementhandler.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "BrsrStatusCodes.h" -#include "nw_hed_documentroot.h" -#include "HEDDocumentListener.h" - -static -TBrowserStatusCode -NW_XHTML_trElementHandle_CreateSubTree(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* trBox, - NW_LMgr_ContainerBox_t* tableContainerParent) -{ - NW_DOM_ElementNode_t* childNode; - - NW_TRY (status) - { - /* We visit the children ourselves, rather than calling the superclass. - * This is necessary so we can filter any unwanted elements from - * the table. A table row can only handle <td>s and <th>s. - */ - for (childNode = NW_DOM_Node_getFirstChild (elementNode); - childNode != NULL ; - childNode = NW_DOM_Node_getNextSibling (childNode)) - { - const NW_XHTML_ElementHandler_t* elementHandler; - - /* get the ElementHandler for the elementNode */ - elementHandler = - NW_XHTML_ContentHandler_GetElementHandler (contentHandler, - (NW_DOM_ElementNode_t*) childNode); - - /* we want to ignore the entire script tag */ - if (elementHandler == NULL) - continue; - - if (NW_Object_IsInstanceOf(elementHandler, &NW_XHTML_cellElementHandler_Class)) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, contentHandler, - childNode, trBox); - _NW_THROW_ON_ERROR(status); - } - /* for handling forms embedded in tables */ - else if (NW_Object_IsInstanceOf(elementHandler, &NW_XHTML_formElementHandler_Class)) - { - NW_XHTML_FormLiaison_t* formLiaison = (NW_XHTML_FormLiaison_t*) - NW_XHTML_ContentHandler_GetFormLiaison(contentHandler, childNode); - - NW_REQUIRED_PARAM(formLiaison); - status = NW_XHTML_trElementHandle_CreateSubTree(contentHandler, childNode, trBox, tableContainerParent); - _NW_THROW_ON_ERROR(status); - } - else if (NW_Object_IsInstanceOf(elementHandler, &NW_XHTML_inputElementHandler_Class)) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, contentHandler, - childNode, tableContainerParent); - _NW_THROW_ON_ERROR(status); - } - } - } NW_CATCH (status) { - } NW_FINALLY { - return status; - } NW_END_TRY - -} - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_trElementHandler_Class_t NW_XHTML_trElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_trElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_trElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_trElementHandler_t NW_XHTML_trElementHandler = { - { { &NW_XHTML_trElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_trElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* rowBox = NULL; - NW_LMgr_Box_t* tableContainer = (NW_LMgr_Box_t*)NW_LMgr_Box_GetParent(parentBox); - NW_LMgr_ContainerBox_t* tableContainerParent = tableContainer->parent; - - NW_TRY (status) - { - /* We only create a row box if the parent is a table */ - if (!NW_Object_IsClass(parentBox, &NW_LMgr_StaticTableBox_Class) && - !NW_Object_IsClass(parentBox, &NW_LMgr_VerticalTableBox_Class)) - { - return NW_XHTML_ElementHandler_Class.NW_XHTML_ElementHandler. - createBoxTree (elementHandler, contentHandler, elementNode, parentBox); - } - - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(contentHandler); - NW_ASSERT(documentRoot != NULL); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox(documentRoot); - NW_ASSERT(rootBox != NULL); - - if ((NW_XHTML_tableElementHandler_DoesGridModeApply( - contentHandler, elementNode) == NW_TRUE) || - (NW_LMgr_RootBox_GetSmallScreenOn(rootBox) == NW_FALSE)) - { - rowBox = (NW_LMgr_Box_t*)NW_LMgr_StaticTableRowBox_New(0); - } - else - { - rowBox = (NW_LMgr_Box_t*)NW_LMgr_VerticalTableRowBox_New(0); - } - NW_THROW_OOM_ON_NULL (rowBox, status); - - status = NW_LMgr_ContainerBox_AddChild (parentBox, rowBox); - _NW_THROW_ON_ERROR(status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles(elementHandler, contentHandler, elementNode, - &rowBox, 0); - NW_THROW_ON (status, KBrsrOutOfMemory); - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (rowBox == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf(rowBox); - - status = NW_XHTML_trElementHandle_CreateSubTree(contentHandler, elementNode, parentBox, tableContainerParent); - _NW_THROW_ON_ERROR(status); - - } - NW_CATCH (status) - { - if (rowBox) - { - NW_Object_Delete (rowBox); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,379 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_frame_frameelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_hed_documentroot.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_focusevent.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_url_utils.h" -#include "nwx_settings.h" -#include "nwx_http_defs.h" - -/* ------------------------------------------------------------------------- * - private method - * ------------------------------------------------------------------------- */ - - /* - Get the URL in base tag defined in header, this value can be used to combine with - relative URL to figure out the absolute URL. -*/ -static TBrowserStatusCode -NW_XHTML_frameElementHandler_getBaseTagUrl (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** srcVal); - -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_frameElementHandler_ImodeCreateBox(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Text_t* srcVal = NULL; - NW_LMgr_ActiveContainerBox_t* box = NULL; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded; - NW_Text_Length_t charCount; - NW_HED_EventHandler_t* eventHandler = NULL; - - NW_REQUIRED_PARAM(elementHandler); - - // find the 'src' attribute and get its string value - if (NW_DOM_ElementNode_getTagToken(elementNode) == NW_XHTML_ElementToken_frame) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_src, &srcVal); - - // if there is no 'src' value, see if an 'href' value is specified - if (!srcVal) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_href, &srcVal); - } - - if (!srcVal) - { - NW_XHTML_frameElementHandler_getBaseTagUrl (contentHandler, &srcVal); - } - } - - if (srcVal) - { - NW_Ucs4 character; - NW_Url_Schema_t scheme = NW_SCHEMA_INVALID; - TBrowserStatusCode schemeStatus = KBrsrSuccess; - - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (srcVal, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - - if (!storage ) - { - NW_Object_Delete(srcVal); - return NULL; - } - - // we do not want to handle frame links within a page (i.e. src values that start with '#') - character = NW_Text_GetAt( srcVal, 0 ); - - if( character == '#' ) - { - NW_Object_Delete(srcVal); - if (freeNeeded){ - NW_Str_Delete(storage); - } - return NULL; - } - - /* At this point, only interested if there is a scheme present. Philosophy is - to present EVERYTHING to the user - except bad TEL/MAILTO links. If there is a problem - with a URL, it should be caught later when the anchor is selected/used. */ - schemeStatus = NW_Url_GetScheme(storage, &scheme); - - /* We don't want to display bad links, but other schemes are okay. */ - if (schemeStatus == KBrsrMalformedUrl) - { - box = NULL; - } - else - { - eventHandler = - NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), elementNode); - box = NW_LMgr_ActiveContainerBox_New( - 0, NW_LMgr_EventHandlerOf (eventHandler), NW_LMgr_ActionType_OpenLink); - } - - /* If elementNode has no children, then insert a box for the link text from the url. */ - if (box && (NW_DOM_Node_getFirstChild(elementNode) == NULL)) - { - TBrowserStatusCode status; - NW_Text_t* linkText = NULL; - NW_Text_t* text = NULL; - NW_LMgr_TextBox_t* linkTextBox; - NW_LMgr_Box_t* breakBox = NULL; - - NW_Uint16 lineTextArray[4] = - { NW_XHTML_AttributeToken_id, - NW_XHTML_AttributeToken_name, - NW_XHTML_AttributeToken_src, - NW_XHTML_AttributeToken_title - }; - - /* For frames, link text needs to be taken from either "id", - "name" or "src" attributes, in this order of priority */ - NW_Uint8 i; - - for (i = 0; i < 4; i++) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - lineTextArray[i], - &text); - // ignore empty text too - if( text && text->characterCount > 0 ) - { - break; - } - } - - if (!text) - { - NW_Object_Delete(srcVal); - if (freeNeeded){ - NW_Str_Delete(storage); - } - return NULL; - } - - linkText = NW_Text_Copy(text, NW_TRUE); /* deep copy */ - NW_Object_Delete(text); - text = NULL; - linkTextBox = NW_LMgr_TextBox_New (0, linkText); - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(box), NW_LMgr_BoxOf(linkTextBox)); - if (status != KBrsrSuccess) - { - NW_Object_Delete(linkTextBox); - } - - breakBox = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New ((NW_ADT_Vector_Metric_t)1); - status = NW_LMgr_ContainerBox_AddChild (NW_LMgr_ContainerBoxOf(box), NW_LMgr_BoxOf(breakBox)); - - if (status != KBrsrSuccess) - { - NW_Object_Delete(breakBox); - } - } - - NW_Object_Delete(srcVal); - if (freeNeeded){ - NW_Str_Delete(storage); - } - } - if (!box){ - return NULL; - } - return NW_LMgr_BoxOf(box); -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_frameElementHandler_Class_t NW_XHTML_frameElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_frameElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_frameElementHandler_ProcessEvent - }, - { /* NW_XHTML_frameElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -const NW_XHTML_frameElementHandler_t NW_XHTML_frameElementHandler = { - { { &NW_XHTML_frameElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_frameElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* box = NULL; - - NW_TRY (status) - { - box = NW_XHTML_frameElementHandler_ImodeCreateBox(elementHandler, contentHandler, elementNode); - - if (!box) - { - // There was no src attribute, so just return - NW_THROW_SUCCESS(status); - } - - // Add the box to the tree - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - // Apply common attributes and styles - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, elementNode, &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (!box) - { - NW_THROW_SUCCESS(status); - } - - parentBox = NW_LMgr_ContainerBoxOf (box); - - // Invoke our superclass for completion - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_XHTML_frameElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_Text_t* url = NULL; - TBrowserStatusCode status; - - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(box); - - // we are really only interested in the following events - if ((NW_Object_Core_GetClass (event) != &NW_Evt_ActivateEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_FocusEvent_Class)) - { - return NW_LMgr_EventNotAbsorbed; - } - - if(NW_Object_Core_GetClass (event) == &NW_Evt_FocusEvent_Class) - { - return NW_LMgr_EventAbsorbed; - } - - // find the 'src' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_src, &url); - - // if there is no 'src' value, see if an 'href' value is specified - if (!url) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_href, &url); - } - - if (!url) - { - NW_XHTML_frameElementHandler_getBaseTagUrl (contentHandler, &url); - } - - - if (!url) - { - return NW_LMgr_EventAbsorbed; - } - - // load the content - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, NW_TextOf (url), - NW_HED_UrlRequest_Reason_DocLoad, elementNode, NW_UrlRequest_Type_Any); - - NW_Object_Delete(url); - - if (status != KBrsrSuccess) - { - NW_HED_DocumentNode_HandleError (contentHandler, - NW_HED_ContentHandler_GetUrlRequest (contentHandler), - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t) status); - } - - // we absorbed the event! - return NW_LMgr_EventAbsorbed; -} - -// -// Get the URL in base tag defined in header, this value can be used to combine with -// relative URL to figure out the absolute URL. -// -static TBrowserStatusCode -NW_XHTML_frameElementHandler_getBaseTagUrl (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** srcVal) -{ - NW_DOM_Node_t* baseElement; - NW_String_t href; - - NW_ASSERT (srcVal); - - // get the base url as found in the "base" element - baseElement = NW_HED_DomHelper_FindElement (&contentHandler->domHelper, NW_HED_DomTree_GetRootNode ( - contentHandler->domTree), 3, NW_XHTML_ElementToken_base, 0, NULL); - - if (baseElement) - { - TBrowserStatusCode status = NW_HED_DomHelper_GetAttributeValue (&contentHandler->domHelper, baseElement, - NW_XHTML_AttributeToken_href, &href); - - if (status == KBrsrSuccess) - { - *srcVal = (NW_Text_t*) NW_Text_UCS2_New (href.storage, 0, NW_Text_Flags_TakeOwnership); - } - } - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_frame_framemodulei.h" -#include "nw_frame_frameelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_FrameModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_frame, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_frameElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_FrameModule_Class_t NW_XHTML_FrameModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Frame), - /* elementHandlers */ _NW_XHTML_FrameModule_ElementHandlers, - }, - { /* NW_XHTML_FrameModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_FrameModule_t NW_XHTML_FrameModule = { - {&NW_XHTML_FrameModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Frame/XHTMLFramesetElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Frame/XHTMLFramesetElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_frame_framesetelementhandleri.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_hed_documentroot.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "nwx_settings.h" - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_FramesetElementHandler_Class_t NW_XHTML_FramesetElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_FramesetElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_Text_FramesetElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_FramesetElementHandler_t NW_XHTML_FramesetElementHandler = { - { { &NW_XHTML_FramesetElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_FramesetElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t *box = NULL; - NW_Bool ignoreFrameSet = NW_FALSE; - NW_DOM_ElementNode_t* node = elementNode; - - NW_TRY (status ) - { - // The purpose of this while loop is to see if this frameset has a parent frameset - // (nested framesets) If so, we don't want to process this frameset (mainly for - // display reasons) - while ((node = NW_DOM_Node_getParentNode(node)) != NULL) - { - if ((NW_HED_DomHelper_GetElementToken (node) == NW_XHTML_ElementToken_frameset)) - { - /* found a parent frameset node */ - ignoreFrameSet = NW_TRUE; - break; - } - } - - // If we are not processing the child frameset, invoke the superclass createBoxTree method - // for completion - if (ignoreFrameSet) - { - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - NW_THROW(status); - } - - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (box, status); - - /* Add the box to the tree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - /* - Both frameset element and body elements should not belong in the same HTML - page. However, if both body and frameset do appear in the same page we will handle - which ever one comes first. For example if the frameset tag appears before the body - tag, we will handle the framest tag, but ignore the body tag (and its contents) - So in this case, since we are handling the framest tag first, set ignoreBody to TRUE - */ - contentHandler->ignoreBodyElement = NW_TRUE; - - parentBox = NW_LMgr_ContainerBoxOf (box); - - /* invoke our superclass for completion */ - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLAElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLAElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,792 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hypertext_aelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_hed_documentroot.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_xhtml_savetophonebkevent.h" -#include "nw_evt_focusevent.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_xhtml_telephonyservices.h" -#include "nw_xhtml_textelementhandler.h" -#include "nw_image_imgelementhandler.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" /* to run Wml Scripts */ -#include "nwx_url_utils.h" -#include "nwx_http_defs.h" -//#include "nw_ecma_contenthandler.h" -#include "BrsrStatusCodes.h" -#include "nwx_logger.h" - -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_aElementHandler_ImodeCreateBox(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_Text_t* ctiVal = NULL; - NW_Text_t* hrefVal = NULL; - NW_Text_t* nameVal = NULL; - NW_LMgr_ActiveContainerBox_t* box = NULL; - NW_Bool validNumber = NW_FALSE; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded = NW_FALSE; - NW_Text_Length_t charCount; - NW_XHTML_TelephonyServices_t* telServices = NULL; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_Ucs2* newUrl = NULL; - NW_Ucs2 *chReturns = NULL; - NW_Bool createBox = NW_FALSE; - NW_LMgr_ActiveContainerBox_ActionType_t actionType = NW_LMgr_ActionType_OpenLink; - - NW_REQUIRED_PARAM(elementHandler); - - telServices = (NW_XHTML_TelephonyServices_t*)(&NW_XHTML_TelephonyServices); - - // Find the 'name' attribute and get its string value. The name is used below - // if HREF is not specified and it is also used for ECMA script processing. - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, NW_XHTML_AttributeToken_name, &nameVal); - - /* find the 'cti' attribute and get its string value */ - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_cti, &ctiVal); - if (ctiVal) - { - storage = (NW_Ucs2*) NW_Text_GetUCS2Buffer(ctiVal, NW_Text_Flags_Aligned,&charCount, - &freeNeeded); - if (!storage) - { - goto cleanup; - } - - validNumber = NW_XHTML_TelephonyServices_ParseNumber(telServices, storage, NW_TRUE); - - if (storage && freeNeeded) - { - NW_Str_Delete(storage); - storage = NULL; - } - - if (validNumber) - { - eventHandler = NW_HED_EventHandler_New(NW_HED_DocumentNodeOf (contentHandler), elementNode); - box = NW_LMgr_ActiveContainerBox_New(0, NW_LMgr_EventHandlerOf (eventHandler), NW_LMgr_ActionType_DialNumber); - if (box) - { - NW_LMgr_ActiveContainerBox_SetName(box, nameVal, NW_TRUE); - nameVal = NULL; // ownership of name object was transferred to box - } - goto cleanup; - } - } - - /* find the 'href' attribute and get its string value */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, NW_XHTML_AttributeToken_href, &hrefVal); - if (hrefVal == NULL) - { - /* if href is not specified in <a>, use base tag url, unless a name attribute is specified. - Because if a name tag is specifed but not an href, this <a> element means to be only a fragment - identifier. */ - if (nameVal == NULL) - { - NW_XHTML_aElementHandler_getBaseTagUrl (contentHandler, &hrefVal); - } - } - - if (hrefVal) - { - NW_Url_Schema_t scheme = NW_SCHEMA_INVALID; - NW_Ucs2* number; - - storage = (NW_Ucs2*) NW_Text_GetUCS2Buffer(hrefVal, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - if (!storage) - { - goto cleanup; - } - - /* At this point, only interested if a scheme is present, not if the URL - complies with RFC2396. If there is a problem with the URL, it will be - caught later, when the anchor is selected. The philosophy is to present - everything to the user, except scheme=NW_SCHEMA_INVALID for TEL: and MAILTO: - */ - NW_Url_GetSchemeNoValidation(storage, &scheme); - - // remove cariage return and new line from url - chReturns = NW_Str_New (2); - chReturns[0] = 0x0D; - chReturns[1] = 0x0A; - chReturns[2] = '\0'; - - NW_LOG1( NW_LOG_OFF, "before removing, storage: %s", storage ); - newUrl = NW_Str_New(NW_Url_RemoveCharsLen(storage, chReturns)); - if (!newUrl) - { - goto cleanup; - } - NW_Url_RemoveChars(storage, newUrl, chReturns); - - // Validate the TEL:, WTAI:, MAILTO: schemes, all other schemes just get created. - // Also, set the corresponding action type for the shemes. - if (scheme == NW_SCHEMA_TEL) - { - // For "TEL:" scheme, verify the number, i.e. "TEL:8005551234" - number = newUrl + 4; - validNumber = NW_XHTML_TelephonyServices_ParseNumber(telServices, number, NW_FALSE); - actionType = NW_LMgr_ActionType_DialNumber; - // Create box for the anchor <a> link if and only if "TEL:" number format is valid. - createBox = validNumber; - } - else if (scheme == NW_SCHEMA_WTAI) - { - // For "WTAI:" scheme, verify the number, i.e. "WTAI://wp/mc;8005551234" - number = newUrl + 13; - validNumber = NW_XHTML_TelephonyServices_ParseNumber(telServices, number, NW_FALSE); - actionType = NW_LMgr_ActionType_DialNumber; - // Create the box for the anchor <a> link if and only if "WTAI://wp/mc" number format is valid. - createBox = validNumber; - } - else if (scheme == NW_SCHEMA_MAILTO) - { - // For "MAILTO" scheme, no verification. Assume it is valid. - actionType = NW_LMgr_ActionType_SendMail; - // Since there is no validation, always create the box. - createBox = NW_TRUE; - } - else - { - // Create an anchor for all other schemas (http, https, file, - // etc...), including: - // NW_SCHEMA_UNKNOWN - Unknown schemes contain a colon, but aren't - // in the limited supported list. They need to be displayed - // anyhow, because some application might support it (plugin, - // sms, mms, etc...). - // NW_SCHEMA_INVALID - Probably a relative link. - actionType = NW_LMgr_ActionType_OpenLink; - // Always create the box. - createBox = NW_TRUE; - } - - if (createBox) - { - // Create the box for the anchor <a> link. - eventHandler = NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), elementNode); - box = NW_LMgr_ActiveContainerBox_New(0, NW_LMgr_EventHandlerOf (eventHandler), actionType); - if (box) - { - NW_LMgr_ActiveContainerBox_SetName(box, nameVal, NW_TRUE); - nameVal = NULL; // ownership of name object was transferred to box - } - } - - } // end of if (hrefVal) - - if (box) - { - box->hrefAttr = NW_Text_New( HTTP_iso_10646_ucs_2, (void*)newUrl, NW_Str_Strlen(newUrl), - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy ); - if (!box->hrefAttr) - { - NW_Object_Delete(box); - box = NULL; - } - } - -cleanup: - if (hrefVal) - { - NW_Object_Delete(hrefVal); - } - if (storage && freeNeeded) - { - NW_Str_Delete(storage); - } - if (newUrl) - { - NW_Str_Delete(newUrl); - } - if (chReturns) - { - NW_Str_Delete(chReturns); - } - if (nameVal) - { - NW_Object_Delete(nameVal); - } - if (ctiVal) - { - NW_Object_Delete(ctiVal); - } - - return (box) ? NW_LMgr_BoxOf(box) : NULL; -} - -/* ------------------------------------------------------------------------- - ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_aElementHandler_CreateBox(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Text_t* hrefVal = NULL; - NW_Text_t* nameVal = NULL; - NW_LMgr_ActiveContainerBox_t* box = NULL; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded = NW_FALSE; - - NW_REQUIRED_PARAM(elementHandler); - - // find the 'name' attribute. - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_name, &nameVal); - - /* find the 'href' attribute. */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_href, &hrefVal); - if (hrefVal == NULL) - { - NW_XHTML_aElementHandler_getBaseTagUrl(contentHandler, &hrefVal); - } - if (hrefVal != NULL) - { - NW_Url_Schema_t scheme = NW_SCHEMA_INVALID; - TBrowserStatusCode schemeStatus = KBrsrSuccess; - NW_Text_Length_t charCount; - - /* There is an href attribute, so make it an active box. */ - - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (hrefVal, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - if (!storage) - { - goto cleanup; - } - - /* At this point, only interested if a scheme is present, not that the URL does not - comply with RFC2396. If there is a problem with the URL, it will be caught later - when the anchor is selected/used. The philosophy is to present everything to the user. */ - schemeStatus = NW_Url_GetScheme(storage, &scheme); - - if (scheme == NW_SCHEMA_INVALID && schemeStatus == KBrsrMalformedUrl) - { - goto cleanup; - } - - eventHandler = - NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), elementNode); - box = NW_LMgr_ActiveContainerBox_New(0, - NW_LMgr_EventHandlerOf(eventHandler), - NW_LMgr_ActionType_OpenLink); - if (box) - { - NW_LMgr_ActiveContainerBox_SetName(box, nameVal, NW_TRUE); - nameVal = NULL; // ownership of name object was transferred to box - } - } - -cleanup: - if (hrefVal) - { - NW_Object_Delete(hrefVal); - } - if (storage && freeNeeded) - { - NW_Str_Delete(storage); - } - if (nameVal) - { - NW_Object_Delete(nameVal); - } - - return (box) ? NW_LMgr_BoxOf(box) : NULL; -} - -/* ------------------------------------------------------------------------- -NW_XHTML_aElementHandler_HandleIModeEvents -------------------------------------------------------------------------- */ -static -NW_Uint8 -NW_XHTML_aElementHandler_HandleIModeEvents(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_Evt_Event_t* event) - { - NW_Text_t* url = NULL; - NW_Text_t* cti = NULL; - NW_Bool isCti = NW_FALSE; - TBrowserStatusCode status = KBrsrFailure; - NW_Url_Schema_t scheme = NW_SCHEMA_INVALID; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded = 0; - NW_Text_Length_t charCount = 0; - NW_XHTML_TelephonyServices_t* telServices; - - NW_REQUIRED_PARAM(elementHandler); - - telServices = (NW_XHTML_TelephonyServices_t*)(&NW_XHTML_TelephonyServices); - - /* find the 'cti' attribute and get its string value */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_cti, &cti); - - /*In models that support this function, the cti attribute takes - precedence over the href attribute. Models that do not support this - tag will not understand the cti attribute and will therefore use the - href attribute. */ - if (cti == NULL) - { - /* find the 'href' attribute and get its string value */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_href, &url); - if (url == NULL) - { - NW_XHTML_aElementHandler_getBaseTagUrl(contentHandler, &url); - } - if (url == NULL) - { - return NW_LMgr_EventAbsorbed; - } - storage = (NW_Ucs2*)NW_Text_GetUCS2Buffer(url, NW_Text_Flags_Aligned, - &charCount, &freeNeeded); - NW_Url_GetSchemeNoValidation(storage, &scheme); - } - - /* handle Save To Phonebook event */ - if (NW_Object_Core_GetClass (event) == &NW_XHTML_SaveToPhoneBkEvent_Class) - { - if (scheme == NW_SCHEMA_MAILTO) - { - NW_Text_t* email = NULL; - NW_Text_t* name = NULL; - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_email, &email); - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_memoryname, &name); - - if (email == NULL) - { - status = NW_XHTML_TelephonyServices_Mailto_SaveToPhoneBook(telServices, contentHandler, - url, name, NW_FALSE); - } - else - { - status = NW_XHTML_TelephonyServices_Mailto_SaveToPhoneBook(telServices, contentHandler, - email, name, NW_TRUE); - } - NW_Object_Delete(url); - NW_Object_Delete(email); - NW_Object_Delete(name); - - return NW_LMgr_EventAbsorbed; - } - else - /*if (NW_Object_Core_GetClass (event) == &NW_XHTML_SaveToPhoneBkEvent_Class)*/ - { - NW_Text_t* name = NULL; - NW_Text_t* email = NULL; - - status = NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_telbook, &name); - - if (status != KBrsrSuccess) - { - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_memoryname, &name); - } - - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_email, &email); - if (cti != NULL) - { - isCti = NW_TRUE; - status = NW_XHTML_TelephonyServices_SaveToPhoneBook(telServices, contentHandler, - cti, name, email, isCti); - } - else - { - status = NW_XHTML_TelephonyServices_SaveToPhoneBook(telServices, contentHandler, - url, name, email, isCti); - } - - NW_Object_Delete(cti); - NW_Object_Delete(url); - NW_Object_Delete(name); - NW_Object_Delete(email); - - return NW_LMgr_EventAbsorbed; - } - } - - if (freeNeeded) - { - NW_Str_Delete(storage); - } - - /* handle ActiveEvent/AccessKeyEvent */ - if (cti != NULL) /* if cti attribute is specified use cti to make call */ - { - NW_Object_Delete(url); /* cti will be used. url is not needed. */ - url = NULL; - - status = NW_XHTML_TelephonyServices_MakeCall(telServices, contentHandler, cti, NW_TRUE); - if (status != KBrsrSuccess) - { - NW_HED_DocumentNode_HandleError(contentHandler, - NW_HED_ContentHandler_GetUrlRequest(contentHandler), - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t)status); - } - NW_Object_Delete(cti); - - return NW_LMgr_EventAbsorbed; - } - - /* handle tel:// scheme */ - if (scheme == NW_SCHEMA_TEL) - { - status = NW_XHTML_TelephonyServices_MakeCall(telServices, contentHandler, url, NW_FALSE); - if (status != KBrsrSuccess) - { - NW_HED_DocumentNode_HandleError(contentHandler, - NW_HED_ContentHandler_GetUrlRequest(contentHandler), - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t)status); - } - NW_Object_Delete(url); - - return NW_LMgr_EventAbsorbed; - } - - NW_Object_Delete(url); - - return NW_LMgr_EventNotAbsorbed; -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_aElementHandler_Class_t NW_XHTML_aElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_aElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_aElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_aElementHandler_ProcessEvent - }, - { /* NW_XHTML_aElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_aElementHandler_t NW_XHTML_aElementHandler = { - { { &NW_XHTML_aElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_aElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_REQUIRED_PARAM(elementHandler); - - // special handling if a is the last part of the chunk: - // leave select to be processed in the next chunk - // in case this is the last chunk, we need to process a in this chunk - NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_TRUE); - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_aElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* box = NULL; - NW_Text_t* url = NULL; - NW_LMgr_TextBox_t* textBox = NULL; - - NW_TRY (status) - { - // special handling if a is the last node of the chunck: - // leave it to be processed in the next chunck - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_FALSE)) - { - NW_THROW_SUCCESS (status); - } - - if ( NW_XHTML_ContentHandler_GetHtmlSubset(contentHandler) == - NW_XHTML_CONTENTHANDLER_IMODEHTMLEXT) - { - box = NW_XHTML_aElementHandler_ImodeCreateBox(elementHandler, contentHandler, - elementNode); - } - else - { - box = NW_XHTML_aElementHandler_CreateBox(elementHandler, contentHandler, - elementNode); - } - if (box == NULL) - { - /* either tel was invalid or there was no href attribute */ - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (box, status); - } - - /* Add the box to the tree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, elementNode, &box, NULL); - - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf (box); - - /* invoke our superclass for completion */ - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - - // if the <a href="foo.html"></a> is empty, then add the href as link text. - if( parentBox && NW_Object_IsInstanceOf( parentBox, &NW_LMgr_ActiveContainerBox_Class ) ) - { - // child count = 0 means that we have not added any textbox to this container yet. add the href then. - if( NW_LMgr_ContainerBox_GetChildCount( parentBox ) == 0 && NW_LMgr_ActiveContainerBoxOf( parentBox )->hrefAttr ) - { - url = NW_Text_Copy( NW_LMgr_ActiveContainerBoxOf( parentBox )->hrefAttr, NW_TRUE ); - NW_THROW_OOM_ON_NULL( url, status ); - // - // create the TextBox and insert it into our parent - textBox = (NW_LMgr_TextBox_t*)NW_LMgr_TextBox_New( 0, url ); - NW_THROW_OOM_ON_NULL( textBox, status ); - url = NULL; - - status = NW_LMgr_ContainerBox_AddChild( parentBox, NW_LMgr_BoxOf( textBox ) ); - _NW_THROW_ON_ERROR( status ); - textBox = NULL; - } - } - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - NW_Object_Delete( url ); - NW_Object_Delete( textBox ); - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ - -NW_Uint8 -_NW_XHTML_aElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_Text_t* url = NULL; - TBrowserStatusCode status = KBrsrNotFound; - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (contentHandler); - - NW_REQUIRED_PARAM(box); - - /* we are really only interested in the following list of events */ - if ((NW_Object_Core_GetClass (event) != &NW_Evt_ActivateEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_AccessKeyEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_FocusEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_XHTML_SaveToPhoneBkEvent_Class)) - { - return NW_LMgr_EventNotAbsorbed; - } - - if(NW_Object_Core_GetClass (event) == &NW_Evt_FocusEvent_Class) { - return NW_LMgr_EventAbsorbed; - } - - /* Process IMODE events */ - if (NW_XHTML_ContentHandler_GetHtmlSubset(contentHandler) == - NW_XHTML_CONTENTHANDLER_IMODEHTMLEXT) - { - if(NW_XHTML_aElementHandler_HandleIModeEvents(elementHandler, contentHandler, - elementNode, event) == NW_LMgr_EventAbsorbed) - return NW_LMgr_EventAbsorbed; - } - - if(NW_LMgr_ActiveContainerBoxOf(box)->hrefAttr != NULL) - { - url = NW_Text_Copy(NW_LMgr_ActiveContainerBoxOf(box)->hrefAttr, NW_TRUE); - } - else - { - /* find the 'href' attribute and get its string value */ - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_href, &url); - } - - if (url == NULL) - { - NW_XHTML_aElementHandler_getBaseTagUrl(contentHandler, &url); - } - if (url == NULL) { - return NW_LMgr_EventAbsorbed; - } - - - if(status == KBrsrNotFound) - { - // if the url starts with javascript: then delegate the activate event to ecmaengine - if(NW_Str_Strnicmp((const NW_Ucs2*) url->storage, (const NW_Ucs2*) NW_STR("javascript:"), 11) == 0) { - NW_Bool urlTextFreeNeeded; - NW_Text_Length_t urlTextLength; - NW_Ucs2* urlStorage; - urlStorage = NW_Text_GetUCS2Buffer (url, 0, &urlTextLength, &urlTextFreeNeeded); - if(urlTextFreeNeeded){ - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - } - else - { -#if !defined(__SERIES60_28__) && !defined(__SERIES60_27__) - NW_Text_t* target = NULL; - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, NW_XHTML_AttributeToken_target, &target); - TBool newWindow = EFalse; - if (target != NULL && target->characterCount == 0) - { - NW_Object_Delete(target); - target = NULL; - } - if (target == NULL) - { - NW_XHTML_ContentHandler_GetBaseTagTarget (contentHandler, &target); - } - if (target != NULL) - { - // If the target attribute exists, and it is not an empty string, and - // it is not "_self", open the url in a new window - NW_Bool targetTextFreeNeeded = NW_FALSE;; - NW_Ucs2* targetStorage; - NW_Text_Length_t targetTextLength; - _LIT(KSelf, "_self"); - targetStorage = NW_Text_GetUCS2Buffer (target, NW_Text_Flags_NullTerminated, - &targetTextLength, &targetTextFreeNeeded); - // Check that the target attribute is not empty - TPtrC targetPtr(targetStorage, targetTextLength); - if (targetTextLength > 0 && targetPtr.CompareF(KSelf) != 0) - { - status = NW_XHTML_ContentHandler_WindowOpen(contentHandler, url, target); - newWindow = ETrue; - } - if (targetTextFreeNeeded) - { - NW_Mem_Free(targetStorage); - } - NW_Object_Delete(target); - } - if (!newWindow) -#endif - { - // copy the Url on to the content handler - NW_XHTML_ContentHandler_SetReferrerUrl(contentHandler); - // mailto and wtai scheme are now being processed by the default scheme dispatcher - /* load the content */ - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, NW_TextOf (url), - NW_HED_UrlRequest_Reason_DocLoad, (void *) &NW_WmlScript_ContentHandler_Class, - NW_UrlRequest_Type_Any); - } - } - } - - NW_Object_Delete(url); - - if (status != KBrsrSuccess && status != KBrsrHedContentDispatched) { - NW_HED_DocumentNode_HandleError (contentHandler, - NW_HED_ContentHandler_GetUrlRequest (contentHandler), - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t) status); - } - - /* we absorbed the event! */ - return NW_LMgr_EventAbsorbed; -} - -/* - Get the URL in base tag defined in header, this value can be used to combine with - relative URL to figure out the absolute URL. -*/ -TBrowserStatusCode -NW_XHTML_aElementHandler_getBaseTagUrl (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** hrefVal) -{ - NW_DOM_Node_t* baseElement; - NW_String_t href; - - NW_ASSERT (hrefVal); - - /* get the base url as found in the "base" element */ - baseElement = NW_HED_DomHelper_FindElement (&contentHandler->domHelper, NW_HED_DomTree_GetRootNode ( - contentHandler->domTree), 3, NW_XHTML_ElementToken_base, 0, NULL); - - if (baseElement != NULL) { - TBrowserStatusCode status = NW_HED_DomHelper_GetAttributeValue (&contentHandler->domHelper, baseElement, - NW_XHTML_AttributeToken_href, &href); - - if (status == KBrsrSuccess) { - *hrefVal = (NW_Text_t*) NW_Text_UCS2_New (href.storage, 0, NW_Text_Flags_TakeOwnership); - } - } - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLHypertextModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLHypertextModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hypertext_hypertextmodulei.h" - -#include "nw_hypertext_aelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_HypertextModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_a, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_aElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_HypertextModule_Class_t NW_XHTML_HypertextModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Hypertext), - /* elementHandlers */ _NW_XHTML_HypertextModule_ElementHandlers, - }, - { /* NW_XHTML_HypertextModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_HypertextModule_t NW_XHTML_HypertextModule = { - {&NW_XHTML_HypertextModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Ignore/XHTMLIgnoreElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Ignore/XHTMLIgnoreElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_ignore_ignoreelementhandleri.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_hed_documentroot.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "BrsrStatusCodes.h" - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_IgnoreElementHandler_Class_t NW_XHTML_IgnoreElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_IgnoreElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_Text_IgnoreElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_IgnoreElementHandler_t NW_XHTML_IgnoreElementHandler = { - { { &NW_XHTML_IgnoreElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_IgnoreElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_TRY (status) - { - // Invoke our superclass for completion - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/ImageMapPopup.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/ImageMapPopup.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* View images popup box -* -* -*/ - - -#include "ImageMapPopup.h" - -#include <e32math.h> -#include <apmstd.h> -#include <bitdev.h> -#include <gulicon.h> -#include <AknIconArray.h> - -#include <avkon.mbg> -#include <avkon.rsg> - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KImageMapBitmapMaxWidth = 43; -const TInt KImageMapBitmapMaxHeight = 32; -const TInt KImageMapPopupWidth = 176; -const TInt KImageMapPopupHeight = 144; -const TInt KImageMapPopupWidth2 = 20; -const TInt KImageMapMaxAreaNum = 6; -_LIT( KImageMapAltTextTab, "\t" ); -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CImageMapListBox::CImageMapListBox -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CImageMapListBox::CImageMapListBox() : CAknDoubleLargeGraphicPopupMenuStyleListBox() - { - } - -// ----------------------------------------------------------------------------- -// CImageMapListBox::~CImageMapListBox -// destructor. -// ----------------------------------------------------------------------------- -// -CImageMapListBox::~CImageMapListBox() - { - } - -// ----------------------------------------------------------------------------- -// CImageMapListBox::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CImageMapListBox::ConstructL( CCoeControl& aParent, CArrayPtrFlat<CFbsBitmap>& aBitmapList, - CArrayPtrFlat<HBufC>& aAltTextList ) - { - // call base class - CAknDoubleLargeGraphicPopupMenuStyleListBox::ConstructL( &aParent, 0 ); - // create icon array which shows up in the left column - CArrayPtrFlat<CGulIcon>* iconList = new( ELeave) CAknIconArray( 5 ); - CleanupStack::PushL( iconList ); - - CDesCArray* itemList = STATIC_CAST( CDesCArray*, Model()->ItemTextArray() ); - - // create icons out of bitmaps - HBufC* tempBuf; - TSize bitmapSize; - CGulIcon* icon; - CFbsBitmap* bitmap; - - TInt bitmapCount( aBitmapList.Count() ); - for( TInt i = 0; i < bitmapCount; i++ ) - { - // create icons - bitmap = aBitmapList.At( i ); - bitmapSize = bitmap->SizeInPixels(); - // check if the bitmap needs to be squeezed - if( bitmapSize.iWidth > KImageMapBitmapMaxWidth || bitmapSize.iHeight > KImageMapBitmapMaxHeight ) - { - CFbsBitmap* modifiedBitmap = new( ELeave )CFbsBitmap(); - CleanupStack::PushL( modifiedBitmap ); - - User::LeaveIfError( modifiedBitmap->Create( TSize( KImageMapBitmapMaxWidth, KImageMapBitmapMaxHeight ), EColor4K ) ); - // create bitmap device - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( modifiedBitmap ); - CleanupStack::PushL( bitmapDevice ); - - // create graphics context for bitmap device - CGraphicsContext* bitmapContext; - User::LeaveIfError( bitmapDevice->CreateContext( bitmapContext ) ); - CleanupStack::PushL( bitmapContext ); - - // squeze it - TSize targetSize = Fit( bitmapSize, modifiedBitmap->SizeInPixels() ); - - // copy bitmap to modified bitmap - bitmapContext->DrawBitmap( TRect( TPoint( 0,0 ), targetSize ), bitmap, TRect( TPoint( 0,0 ), bitmapSize ) ); - - CleanupStack::PopAndDestroy( 2 ); // bitmapContext, bitmapDevice - - // replace bitmap in the array - delete bitmap; - aBitmapList.At( i ) = modifiedBitmap; - // bitmap array takes ownership - CleanupStack::Pop(); // modifiedBitmap - - bitmap = modifiedBitmap; - } - // create icon. CGulIcon takes bitmap ownership - icon = CGulIcon::NewL( bitmap, bitmap ); - // remove bitmap array ownership - aBitmapList.At( i ) = NULL; - CleanupStack::PushL( icon ); - - // iconlist takes icon ownership - iconList->AppendL( icon ); - CleanupStack::Pop(); // icon - - // add alt text too - // alt text build up as follows - // 0/talt text1 - // 1/talt text2 - // 2/talt text3 - tempBuf = HBufC::NewLC( - // max num is 999999 - KImageMapMaxAreaNum + - aAltTextList.At( i )->Des().Length() + - KImageMapAltTextTab().Length() ); - - tempBuf->Des().AppendNum( i ); - tempBuf->Des().Append( KImageMapAltTextTab ); - tempBuf->Des().Append( aAltTextList.At( i )->Des() ); - itemList->AppendL( tempBuf->Des() ); - CleanupStack::PopAndDestroy(); // tempBuf - } - // pass iconList ownership - ItemDrawer()->ColumnData()->SetIconArray( iconList ); - CleanupStack::Pop(); // iconList - } - -// ----------------------------------------------------------------------------- -// CImageMapListBox::Fit -// Checks if the source bitmap can fit into the target bitmap -// ----------------------------------------------------------------------------- -// -TSize CImageMapListBox::Fit( const TSize& aSource, const TSize& aTarget ) - { - TSize result1( aTarget ); - TSize result2( aTarget ); - - TInt dA( aTarget.iWidth - aSource.iWidth ); - TInt dB( aTarget.iHeight - aSource.iHeight ); - //lint -e{790} Suspicious truncation, integral to float) - TReal tmp = aSource.iHeight + ((TReal)(aSource.iHeight * dA) / (TReal)aSource.iWidth); - TReal res; - Math::Round( res, tmp, 0); - result1.iHeight = (TInt)res; - //lint -e{790} Suspicious truncation, integral to float) - tmp = aSource.iWidth + ((TReal)(aSource.iWidth * dB) / (TReal)aSource.iHeight); - Math::Round( res, tmp, 0); - result2.iWidth = (TInt)res; - - TSize result; - if(result1.iWidth <= aTarget.iWidth && result1.iHeight <= aTarget.iHeight) - { - result = result1; - } - else - { - result = result2; - } - return result; - } - - -// ----------------------------------------------------------------------------- -// CImageMapPopup::CImageMapPopup -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CImageMapPopup::CImageMapPopup() - { - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::~CImageMapPopup -// destructor. -// ----------------------------------------------------------------------------- -// -CImageMapPopup::~CImageMapPopup() - { - delete iSkinContext; - // delete lists. - if(iBitmapList) - { - iBitmapList->ResetAndDestroy(); - } - delete iBitmapList; - // iAltTextList->ResetAndDestroy(); - // delete iAltTextList; - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CImageMapPopup::ConstructL( CEikListBox *aListBox, TInt aCbaResource, - AknPopupLayouts::TAknPopupLayouts aType ) - { - // call base class construct - CAknPopupList::ConstructL( aListBox, aCbaResource, aType ); - - TAknsItemID tileIID = KAknsIIDSkinBmpListPaneNarrowA; - // these values should come as consts (from LAF). - AknLayoutUtils::SAknLayoutRect tile = { 0, 0, 0, ELayoutEmpty, ELayoutEmpty, KImageMapPopupWidth2, KImageMapPopupHeight }; - AknLayoutUtils::SAknLayoutRect bg = { 0, 0, 0, ELayoutEmpty, ELayoutEmpty, KImageMapPopupWidth, KImageMapPopupHeight }; - - if( AknLayoutUtils::LayoutMirrored( ) ) - { - tile.iL = ELayoutEmpty; - tile.iR = 0; - } - - // these values should come as consts (from LAF) - TRect clientRect( 0, 0, KImageMapPopupWidth, KImageMapPopupHeight ); - TAknLayoutRect tileRect; - TAknLayoutRect bgRect; - - tileRect.LayoutRect( clientRect, tile ); - bgRect.LayoutRect( clientRect, bg ); - - iSkinContext = CAknsListBoxBackgroundControlContext::NewL( - KAknsIIDSkinBmpMainPaneUsual, - bgRect.Rect(), - EFalse, tileIID, - tileRect.Rect() ); - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::CreateAndRunL -// Executes the popup dialog -// ----------------------------------------------------------------------------- -// -TInt CImageMapPopup::CreateAndRunL( CArrayPtrFlat<CFbsBitmap>& aBitmapList, CArrayPtrFlat<HBufC>& aAltTextList ) - { - TInt selectedItem( KErrNotFound ); - // construct dialog - CImageMapPopup* self = new( ELeave )CImageMapPopup(); - CleanupStack::PushL( self ); - // take lists ownership - self->iBitmapList = &aBitmapList; - self->iAltTextList = &aAltTextList; - - // construct image listboxs - CImageMapListBox* listBox = new( ELeave )CImageMapListBox(); - CleanupStack::PushL( listBox ); - - // construct dialog - self->ConstructL( listBox, R_AVKON_SOFTKEYS_OK_BACK__OK, AknPopupLayouts::EMenuDoubleLargeGraphicWindow ); - - // construct listbox - listBox->ConstructL( *self, aBitmapList, aAltTextList ); - listBox->CreateScrollBarFrameL( ETrue ); - listBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - listBox->SetObserver( self ); - - HBufC* title = HBufC::NewLC( 200 ); // must come from resource CEikonEnv::Static()->AllocReadResourceL( ); - title->Des().Copy( _L("Image map areas") ); - self->SetTitleL( *title ); - CleanupStack::PopAndDestroy(); // title - - // launch dialog - if( self->ExecuteLD() ) - { - selectedItem = listBox->CurrentItemIndex(); - } - CleanupStack::PopAndDestroy(); // listbox - CleanupStack::Pop(); // self - return selectedItem; - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::HandleListBoxEventL -// -// ----------------------------------------------------------------------------- -// -void CImageMapPopup::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) - { - if(aEventType == MEikListBoxObserver::EEventItemDoubleClicked || - aEventType == MEikListBoxObserver::EEventEnterKeyPressed) - { - AttemptExitL( ETrue ); - } - return; - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::HandleControlEventL -// -// ----------------------------------------------------------------------------- -// -void CImageMapPopup::HandleControlEventL( CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ ) - { - // overwrite base implementation as it does change CBAs to Mark and Cancel - } - -// ----------------------------------------------------------------------------- -// CImageMapPopup::MopSupplyObject -// -// ----------------------------------------------------------------------------- -// -TTypeUid::Ptr CImageMapPopup::MopSupplyObject( TTypeUid aId ) - { - if( aId.iUid == MAknsControlContext::ETypeId /*&& iUseSkinContext*/ ) - { - return MAknsControlContext::SupplyMopObject( aId, iSkinContext ); - } - return SupplyMopObject( aId, (MAknEditingStateIndicator*)NULL ); - } - -// End of File diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/MapElementList.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/MapElementList.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,326 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hold different map element objects -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // First to avoid NULL redefine warning (no #ifndef NULL). -#include "MapElementList.h" -#include "TKeyArrayPtr.h" -#include "nw_text_ucs2.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// CMapElementEntry::CMapElementEntry -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -CMapElementEntry::CMapElementEntry( ) - { - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CMapElementEntry::ConstructL( TUint16* aMapName ) - { - // make a copy of the aMapName - iMapName = NW_Str_Newcpy( aMapName ); - User::LeaveIfNull( iMapName ); - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMapElementEntry* CMapElementEntry::NewL( TUint16* aMapName ) - { - CMapElementEntry* self = new( ELeave )CMapElementEntry(); - - CleanupStack::PushL( self ); - self->ConstructL( aMapName ); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMapElementEntry* CMapElementEntry::NewLC( TUint16* aMapName ) - { - CMapElementEntry* self = CMapElementEntry::NewL( aMapName ); - CleanupStack::PushL( self ); - - return self; - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::~CMapElementEntry -// Destructor. -// ----------------------------------------------------------------------------- -CMapElementEntry::~CMapElementEntry() - { - NW_Mem_Free ((void*)iMapName); - - if( iImageMapBoxList ) - { - // do not call ResetAndDestroy as - // the ImageMapboxes are not owned by - // this list - iImageMapBoxList->Reset(); - } - delete iImageMapBoxList; - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::SetDomNode -// Sets the dom node for a given map name -// ----------------------------------------------------------------------------- -void CMapElementEntry::SetDomNode( NW_DOM_ElementNode_t* aDomNode ) - { - iDomNode = aDomNode; - } - -// ----------------------------------------------------------------------------- -// CMapElementEntry::AddImageMapBoxL -// Adds an image box for a given map name -// ----------------------------------------------------------------------------- -TBrowserStatusCode CMapElementEntry::AddImageMapBox( NW_LMgr_ImageMapBox_t* aImageMapBox ) - { - if( aImageMapBox ) - { - // do not create image map box list at construct time as - // we create a lots of lookup entry which do need this list at all. - // so create it only if it's necessary - if( !iImageMapBoxList ) - { - // create a list - TRAPD( ret, iImageMapBoxList = new(ELeave) CArrayPtrFlat<NW_LMgr_ImageMapBox_t>(2) ); - if( ret == KErrNoMemory ) - { - return KBrsrOutOfMemory; - } - } - TRAPD( ret, iImageMapBoxList->AppendL( aImageMapBox ) ); - if( ret == KErrNoMemory ) - { - return KBrsrOutOfMemory; - } - } - return KBrsrSuccess; - } - - -// ----------------------------------------------------------------------------- -// CMapElementList::CMapElementList -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -void CMapElementList::ConstructL() -{ - // initialize the imageList - iMapElementList = new (ELeave) CMapElementListArray(2); -} - -// ----------------------------------------------------------------------------- -// CMapElementList::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -CMapElementList* CMapElementList::NewL() - { - CMapElementList* self = new( ELeave ) CMapElementList(); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CMapElementList::~CMapElementList -// Destructor. -// ----------------------------------------------------------------------------- -CMapElementList::~CMapElementList() - { - if(iMapElementList) - { - iMapElementList->ResetAndDestroy(); - } - delete iMapElementList; - } - -// ----------------------------------------------------------------------------- -// CMapElementList::SetDomNode -// Sets the dom node for a given map name -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CMapElementList::SetDomNode( TUint16* aMapName, NW_DOM_ElementNode_t* aDomNode ) - { - return Set( aMapName, aDomNode, NULL ); - } - -// ----------------------------------------------------------------------------- -// CMapElementList::SetImageMapBox -// Sets an image map box for a given map name -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CMapElementList::SetImageMapBox( TUint16* aMapName, NW_LMgr_ImageMapBox_t* aImageMapBox ) - { - return Set( aMapName, NULL, aImageMapBox ); - } - -// ----------------------------------------------------------------------------- -// CMapElementList::DomNode -// Gets the dom node for a given map name -// ----------------------------------------------------------------------------- -NW_DOM_ElementNode_t* CMapElementList::DomNode( TUint16* aMapName ) - { - NW_DOM_ElementNode_t* domNode = NULL; - CMapElementEntry* entry = Get( aMapName ); - - if( entry ) - { - domNode = entry->DomNode(); - } - return domNode; - } - -// ----------------------------------------------------------------------------- -// CMapElementList::ImageMapBoxList -// Gets the image map list for a given map name -// ----------------------------------------------------------------------------- -CImageMapBoxList* CMapElementList::ImageMapBoxList( TUint16* aMapName ) - { - CImageMapBoxList* imageBoxList = NULL; - CMapElementEntry* entry = Get( aMapName ); - - if( entry ) - { - imageBoxList = entry->ImageMapBoxList(); - } - return imageBoxList; - } - -// ----------------------------------------------------------------------------- -// CMapElementList::Set -// Sets either a dom node or an image map box for a given map name -// ----------------------------------------------------------------------------- -TBrowserStatusCode -CMapElementList::Set(TUint16* aMapName, NW_DOM_ElementNode_t* aDomNode, NW_LMgr_ImageMapBox_t* aImageMapBox ) - { - TInt index; - TBrowserStatusCode status = KBrsrSuccess; - CMapElementEntry* lookupEntry = NULL; - - // create a new map element entry - TRAPD( ret, lookupEntry = CMapElementEntry::NewL( aMapName ) ); - - if( ret != KErrNoMemory ) - { - CleanupStack::PushL( lookupEntry ); - // if the entry is already in the list then update it otherwise - // create a new one as insert it. - TTextKeyArrayPtr matchkey( _FOFF( CMapElementEntry, iMapName ), ECmpNormal16 ); - if( iMapElementList->FindIsq( lookupEntry, matchkey, index ) == 0 ) - { - // update entry - CMapElementEntry* entry = iMapElementList->At( index ); - // update either dom node or add a new image map box - if( aDomNode ) - { - entry->SetDomNode( aDomNode ); - } - else if( aImageMapBox ) - { - status = entry->AddImageMapBox( aImageMapBox ); - // status can be either KBrsrSuccess or KBrsrOutOfMemory - } - CleanupStack::PopAndDestroy(); // lookupEntry - } - else - { - // set the entry in the map - lookupEntry->SetDomNode( aDomNode ); - lookupEntry->AddImageMapBox( aImageMapBox ); - TRAP( ret, iMapElementList->InsertIsqL( lookupEntry, matchkey ) ); - if( ret == KErrNoMemory ) - { - CleanupStack::PopAndDestroy(); // lookupEntry - status = KBrsrOutOfMemory; - } - else - { - // do not destroy lookupEntry - CleanupStack::Pop(); // lookupEntry - } - } - } - else - { - status = KBrsrOutOfMemory; - } - return status; - } - - -// ----------------------------------------------------------------------------- -// CMapElementList::Get -// Gets the entry for a given map name -// ----------------------------------------------------------------------------- -CMapElementEntry* CMapElementList::Get( TUint16* aMapName ) - { - TInt index; - CMapElementEntry* entry = NULL; - CMapElementEntry* lookupEntry = NULL; - - TRAPD( status, lookupEntry = CMapElementEntry::NewL( aMapName ) ); - CleanupStack::PushL( lookupEntry ); - - if( status == KErrNone ) - { - TTextKeyArrayPtr matchkey( _FOFF( CMapElementEntry, iMapName ), ECmpNormal16 ); - if( iMapElementList->FindIsq( lookupEntry, matchkey, index ) == 0 ) - { - entry = iMapElementList->At( index ); - } - } - CleanupStack::PopAndDestroy(); // lookupEntry - return entry; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/XHTMLImageModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/XHTMLImageModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_image_imagemodulei.h" - -#include "nw_image_imgelementhandler.h" -#include "nw_image_mapelementhandler.h" -#include "nw_image_areaelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_ImageModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_img, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_imgElementHandler }, - { NW_XHTML_ElementToken_map, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_mapElementHandler }, - { NW_XHTML_ElementToken_area,(struct NW_Markup_ElementHandler_s*) &NW_XHTML_areaElementHandler} -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ImageModule_Class_t NW_XHTML_ImageModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Image), - /* elementHandlers */ _NW_XHTML_ImageModule_ElementHandlers, - }, - { /* NW_XHTML_ImageModule */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_ImageModule_t NW_XHTML_ImageModule = { - {&NW_XHTML_ImageModule_Class}, -}; - -NW_Bool NW_XHTML_ImageModule_IsImageElementHandler(const NW_XHTML_ElementHandler_t* elementHandler) - { - return (NW_Object_IsClass(elementHandler , &NW_XHTML_imgElementHandler_Class) || - NW_Object_IsClass(elementHandler , &NW_XHTML_mapElementHandler_Class) || - NW_Object_IsClass(elementHandler , &NW_XHTML_areaElementHandler_Class)); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/areaElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/areaElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Element handler for the <area> tag -* -*/ - - -// INCLUDE FILES -#include "nw_image_areaelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_hed_documentroot.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_focusevent.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_image_imgelementhandler.h" -#include "nwx_settings.h" -#include "nwx_http_defs.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_areabox.h" -#include "nw_lmgr_imagemapbox.h" -//#include "nw_ecma_contenthandler.h" -#include "nw_hypertext_aelementhandler.h" -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -const -NW_XHTML_areaElementHandler_Class_t NW_XHTML_areaElementHandler_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_areaElementHandler_ProcessEvent - }, - { /* NW_XHTML_areaElementHandler */ - /* unused */ NW_Object_Unused - } - }; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -const NW_XHTML_areaElementHandler_t NW_XHTML_areaElementHandler = - { - { - { - &NW_XHTML_areaElementHandler_Class - } - } - }; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -NW_Uint8 -_NW_XHTML_areaElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) - { - NW_Text_t* url = NULL; - TBrowserStatusCode status (KBrsrFailure); - NW_LMgr_ImageMapBox_t* imageMapBox = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - NW_HED_AppServices_t* appServices = NULL; - - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(box); - - // we are really only interested in the following events - if ((NW_Object_Core_GetClass (event) != &NW_Evt_ActivateEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_AccessKeyEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_FocusEvent_Class)) - { - return NW_LMgr_EventNotAbsorbed; - } - - if (NW_Object_Core_GetClass (event) == &NW_Evt_FocusEvent_Class) - { - return NW_LMgr_EventAbsorbed; - } - - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode (contentHandler); - - - // if OnClick attribute is present , then the event should be processed and - // then href attribute is processed. - //R->ecma - //status = NW_Ecma_HandleEvent(documentRoot, elementNode, box, - // NW_Ecma_Evt_OnClick,ELinkNode); - - if (status == KBrsrSuccess) - { - return NW_LMgr_EventAbsorbed; - } - - // find the 'href' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_href, &url); - - - if (!url) - { - NW_XHTML_aElementHandler_getBaseTagUrl(contentHandler, &url); - } - - if (!url) - { - return NW_LMgr_EventAbsorbed; - } - - - // if the script is disabled or OnClick attr is not present then status is KBrsrNotFound - // if the url starts with javascript: then delegate the activate event to ecmaengine - if (NW_Str_Strncmp((const NW_Ucs2*) url->storage, (const NW_Ucs2*) NW_STR("javascript:"), 11) == 0) - { - NW_Bool urlTextFreeNeeded; - NW_Text_Length_t urlTextLength; - NW_Ucs2* urlStorage; - urlStorage = NW_Text_GetUCS2Buffer (url, 0, &urlTextLength, &urlTextFreeNeeded); - //R->ecma - //status = NW_Ecma_ExecuteEvent(documentRoot , elementNode, box, urlStorage , - // NW_Ecma_Evt_OnClick,ELinkNode); - if (urlTextFreeNeeded) - { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - } - if(status != KBrsrSuccess) - { - // reset the status - status = KBrsrSuccess; - // call SwitchFromImgMapViewIfNeeded in case we are accessing the area box - // from the image map view and need to switch back to the normal view before loading - // the new page - imageMapBox = NW_LMgr_AreaBox_GetParentImageMapBox(box); - NW_ASSERT(imageMapBox); - - rootBox = NW_LMgr_Box_GetRootBox(imageMapBox); - NW_ASSERT(rootBox); - - appServices = rootBox->appServices; - NW_ASSERT(appServices); - -#if !defined(__SERIES60_28__) && !defined(__SERIES60_27__) - NW_Text_t* target = NULL; - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, NW_XHTML_AttributeToken_target, &target); - TBool newWindow = EFalse; - if (target != NULL && target->characterCount == 0) - { - NW_Object_Delete(target); - target = NULL; - } - if (target == NULL) - { - NW_XHTML_ContentHandler_GetBaseTagTarget (contentHandler, &target); - } - if (target != NULL) - { - // If the target attribute exists, and it is not an empty string, and - // it is not "_self", open the url in a new window - NW_Bool targetTextFreeNeeded = NW_FALSE;; - NW_Ucs2* targetStorage; - NW_Text_Length_t targetTextLength; - _LIT(KSelf, "_self"); - targetStorage = NW_Text_GetUCS2Buffer (target, NW_Text_Flags_NullTerminated, - &targetTextLength, &targetTextFreeNeeded); - // Check that the target attribute is not empty - TPtrC targetPtr(targetStorage, targetTextLength); - if (targetTextLength > 0 && targetPtr.CompareF(KSelf) != 0) - { - status = NW_XHTML_ContentHandler_WindowOpen(contentHandler, url, target); - newWindow = ETrue; - } - if (targetTextFreeNeeded) - { - NW_Mem_Free(targetStorage); - } - NW_Object_Delete(target); - } - if (!newWindow) -#endif - { - appServices->browserAppApi.SwitchFromImgMapViewIfNeeded(); - - // load the content - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, NW_TextOf (url), - NW_HED_UrlRequest_Reason_DocLoad, elementNode, NW_UrlRequest_Type_Any); - - if (status != KBrsrSuccess) - { - NW_HED_DocumentNode_HandleError (contentHandler, - NW_HED_ContentHandler_GetUrlRequest (contentHandler), - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t) status); - } - }// if (!newWindow) - } - - NW_Object_Delete(url); - - // we absorbed the event! - return NW_LMgr_EventAbsorbed; - } - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/imgElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/imgElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,967 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Element handler for images -* -*/ - - -// INCLUDE FILES -#include "nw_image_imgelementhandleri.h" -#include "nw_image_virtualimage.h" -#include "nw_image_epoc32simpleimage.h" -#include "nw_image_areaelementhandler.h" -#include "nw_text_ascii.h" -#include "nwx_settings.h" -#include "HEDDocumentListener.h" -#include "nw_gdi_utils.h" -#include "nwx_http_defs.h" -#include "nw_hed_documentroot.h" -#include "nw_imagech_epoc32contenthandler.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_focusevent.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_imagemapbox.h" -#include "nw_lmgr_areabox.h" -#include "MapElementList.h" -#include "ImageMapPopup.h" -#include "BrsrStatusCodes.h" -#include "nw_hypertext_aelementhandler.h" -#include "nwx_statuscodeconvert.h" -#include "nw_lmgr_verticaltablecellbox.h" - -// ============================= LOCAL FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// Function: NW_ImageLoadNeeded -// Description: According to Vertical Layout Algorithm, we do not want to load -// an image under following 2 conditions: -// 1) Image height/width is less than 4px and it is not inside <a> or <input> -// 2) Image width is less than 26px and height is greater than 19 px -// and it is not inside <a> or <input> -// Returns: NW_Bool: NW_FALSE if image is too small to be loaded -// : NW_TRUE if image can be loaded -// ----------------------------------------------------------------------------- -// -static -NW_Bool NW_ImageLoadNeeded(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - TBrowserStatusCode status; - NW_Ucs2* width = NULL; - NW_Ucs2* height = NULL; - NW_Int32 widthVal = 0; - NW_Int32 htVal = 0; - NW_Bool imageLoadNeeded = NW_TRUE; - NW_DOM_ElementNode_t* node = NULL; - NW_Bool widthValFound = NW_FALSE; - - /* find the 'width' attribute and get its string value */ - status = NW_XHTML_ElementHandler_GetAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_width, &width); - if ((status == KBrsrSuccess) && (width != NULL)) - { - NW_Ucs2* endPtr = NULL; - NW_Float32 value; - - status = NW_Str_CvtToFloat32(width, &endPtr, &value); - if (status == KBrsrSuccess) - { - widthVal = (NW_Int32)value; - } - widthValFound = NW_TRUE; - NW_Mem_Free(width); - - if (widthVal < NW_VerticalLayout_MinImageWidth1) - { - imageLoadNeeded = NW_FALSE; /* image is too small to be loaded */ - } - } - - if (imageLoadNeeded) - { - /* find the 'height' attribute and get its string value */ - status = NW_XHTML_ElementHandler_GetAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_height, &height); - if ((status == KBrsrSuccess) && (height != NULL)) - { - NW_Ucs2* endPtr = NULL; - NW_Float32 value; - - status = NW_Str_CvtToFloat32(height, &endPtr, &value); - if (status == KBrsrSuccess) - { - htVal = (NW_Int32)value; - } - NW_Mem_Free(height); - - if (htVal < NW_VerticalLayout_MinImageHeight1) - { - imageLoadNeeded = NW_FALSE; /* image is too small to be loaded */ - } - } - } - - - if (imageLoadNeeded && widthValFound && - (widthVal < NW_VerticalLayout_MinImageWidth2) && - (htVal > NW_VerticalLayout_MinImageHeight2)) - { - imageLoadNeeded = NW_FALSE; /* image is too small to be loaded */ - } - - /* if image is too small we need to check if it is within an <a> because in that - case we need to load it */ - if (!imageLoadNeeded) - { - NW_Text_t* usemapVal = NULL; - - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_usemap, &usemapVal); - if (usemapVal) - { - imageLoadNeeded = NW_TRUE; - } - else - { - /* find the enclosing <a> element */ - node = NW_DOM_Node_getParentNode(elementNode); - while (node) - { - NW_Uint16 tagToken = NW_HED_DomHelper_GetElementToken (node); - - /* if we find an enclosing <a> we break;*/ - if (tagToken == NW_XHTML_ElementToken_a) - { - imageLoadNeeded = NW_TRUE; - break; - } - /* if we find an enclosing block-level element we break and do not load image - Assumption is that an <a> tag will not have block level elements in it - */ - if (NW_XHTML_ElementHandler_IsBlockLevelTag(tagToken)) - break; - node = NW_DOM_Node_getParentNode(node); - } - } - } - - return imageLoadNeeded; -} - - - -// ----------------------------------------------------------------------------- -// Function: NW_XHTML_imgElementHandler_InsertIntoImageMapLookupTable -// Description: -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_imgElementHandler_InsertIntoImageMapLookupTable(NW_XHTML_ContentHandler_t* contentHandler, - NW_Uint16* usemapValue, NW_LMgr_ImageMapBox_t* imageMapBox ) - { - NW_TRY( status ) - { - CMapElementList* mapElementList = NULL; - // retrieve the map list from the content handler, if it does not exist, create one - mapElementList = static_cast<CMapElementList*>(NW_XHTML_ContentHandler_GetImageMapLookupTable(contentHandler)); - if( !mapElementList ) - { - // create a new maplist to hold the map elements. deleted in the contenthandler destructor - TRAP( status, mapElementList = CMapElementList::NewL() ); - NW_THROW_ON( status, KBrsrOutOfMemory ); - - // add the maplist to the content handler - NW_XHTML_ContentHandler_SetImageMapLookupTable( contentHandler, mapElementList ); - } - // add image map box to the list - status = mapElementList->SetImageMapBox( usemapValue, imageMapBox ); - _NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// Function: NW_XHTML_imgElementHandler_CreateImageMapBox -// Description: -// ----------------------------------------------------------------------------- -// -static -TBrowserStatusCode -NW_XHTML_imgElementHandler_CreateImageMapBox( const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* xhtmlContentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_Image_Virtual_t* virtualImage, - NW_Text_t* altText, - NW_Text_t* url, - NW_Bool brokenImage, - NW_Text_t* usemapVal, - NW_LMgr_ImageMapBox_t** newImageMapBox ) - { - NW_LMgr_ImageMapBox_t* imageMapBox = NULL; - NW_Uint16* storage = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded = NW_FALSE; - NW_HED_EventHandler_t* eventHandler; - - NW_TRY( status ) - { - eventHandler = NW_HED_EventHandler_New( NW_HED_DocumentNodeOf( xhtmlContentHandler ), elementNode ); - NW_THROW_OOM_ON_NULL( eventHandler, status ); - - imageMapBox = NW_LMgr_ImageMapBox_New( 5, - NW_Image_AbstractImageOf( virtualImage ), - altText, - brokenImage, - NW_LMgr_EventHandlerOf( eventHandler ), - url); - NW_THROW_OOM_ON_NULL( imageMapBox, status ); - // image map box takes eventHandler's ownership - eventHandler = NULL; - // convert the mapName to Unicode and get the storage - NW_Uint16* tempStorage = NULL; - storage = (NW_Uint16*)NW_Text_GetUCS2Buffer( usemapVal, 0, &length, &freeNeeded ); - NW_THROW_OOM_ON_NULL( storage, status ); - - // check to see if we need to strip off a leading '#' character from the map string - tempStorage = storage; - NW_Ucs4 character = NW_Text_GetAt( usemapVal, 0 ); - - if( character == '#' ) - { - tempStorage = NW_Str_Inc( storage, 1 ); - } - // if we are expecting more data then just insert the map into the lookup table, - // otherwise create the area list too - if( !xhtmlContentHandler->lastChunk ) - { - // insert image map box to the imagMapList so that we can create area list on this - // image map box when the entire body has been loaded. - status = NW_XHTML_imgElementHandler_InsertIntoImageMapLookupTable( - xhtmlContentHandler, tempStorage, imageMapBox ); - _NW_THROW_ON_ERROR( status ); - } - else - { - // call CreateAreaList to loop through area and anchor tags in order to create - // Area boxes - CMapElementList* mapElementList; - NW_DOM_ElementNode_t* mapDomNode; - - // fetch the map element node out of the maplist - mapElementList = (CMapElementList*) - NW_XHTML_ContentHandler_GetImageMapLookupTable( xhtmlContentHandler ); - NW_THROW_ON_NULL( mapElementList, status, KBrsrFailure ); - - // look up the map name in the list and retrieve the associated element node - mapDomNode = mapElementList->DomNode( tempStorage ); - NW_THROW_ON_NULL( mapDomNode, status, KBrsrFailure ); - - status = NW_XHTML_imgElementHandler_CreateAreaList( elementHandler, xhtmlContentHandler, - mapDomNode, NW_LMgr_BoxOf( imageMapBox ) ); - _NW_THROW_ON_ERROR( status ); - } - } - NW_CATCH( status ) - { - // ignore image map so that we create a regular image - NW_Object_Delete( eventHandler ); - } - NW_FINALLY - { - if( freeNeeded ) - { - NW_Mem_Free( (NW_Ucs2*)storage ); - } - *newImageMapBox = imageMapBox; - return status; - } - NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// Function: NW_XHTML_imgElementHandler_CreateAreaList -// Description: Loops through the area and/or anchor tags associated with a map -// and creates a list of NW_LMgr_AreaBox_t objects. This list is owned by the -// parent NW_LMgr_ImageMapBox_t class -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_XHTML_imgElementHandler_CreateAreaList(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box ) - { - NW_ADT_DynamicVector_t* areaList; - NW_LMgr_Box_t* areaBox = NULL; - void** temp = NULL; - NW_Text_t* hrefVal = NULL; - NW_Text_t* shapeVal = NULL; - NW_Text_t* coordsVal = NULL; - NW_Text_t* altText = NULL; - NW_Ucs2* storage = NULL; - NW_Uint8 freeNeeded = 0; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_Text_Length_t charCount = 0; - NW_LMgr_ImageMapBox_t* imageMapBox = NW_LMgr_ImageMapBoxOf( box ); - NW_Bool isFirstAreaBox = NW_TRUE; - NW_Bool isJavaScript = NW_FALSE; - - NW_TRY (status) - { - // retrieve the area list from the image map box, if it does not exist, create one - areaList = (NW_ADT_DynamicVector_t*)NW_LMgr_ImageMapBox_GetAreaBoxList(imageMapBox); - if (!areaList) - { - areaList = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof(NW_LMgr_AreaBox_t), 10, 5 ); - NW_THROW_OOM_ON_NULL (areaList, status); - - // add the maplist to the content handler - NW_LMgr_ImageMapBox_SetAreaBoxList(imageMapBox, areaList); - } - - // loop through the children of the map element and add them to the list - for (elementNode = NW_DOM_Node_getFirstChild (elementNode); - elementNode != NULL; - elementNode = NW_DOM_Node_getNextSibling (elementNode)) - { - // verify that the elementNode is an area tag - if (NW_DOM_ElementNode_getTagToken(elementNode) == NW_XHTML_ElementToken_area) - { - // find the 'href' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_href, &hrefVal); - - - if (!hrefVal) - { - NW_XHTML_aElementHandler_getBaseTagUrl (contentHandler, &hrefVal); - } - - if (hrefVal) - { - NW_Url_Schema_t scheme = NW_SCHEMA_INVALID; - - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (hrefVal, NW_Text_Flags_Aligned, &charCount, - &freeNeeded); - - NW_THROW_OOM_ON_NULL (storage, status); - - status = NW_Url_GetScheme(storage, &scheme); - - if(NW_Str_Strncmp(storage, (const NW_Ucs2*) NW_STR("javascript:"), 11) == 0) - { - isJavaScript = NW_TRUE; - } - - // we don't want to display bad links, but other schemes are okay. - if (status != KBrsrMalformedUrl || isJavaScript) - { - // find the 'coords' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_coords, &coordsVal); - - - // find the 'shape' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_shape, &shapeVal); - - // find the 'alt' attribute and get its string value - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_alt, &altText); - - // if we don't have alternate text, use the href string instead - if ((altText == NULL) || (altText->characterCount == 0)) - { - altText = NW_Text_Copy(hrefVal, NW_TRUE); - } - - eventHandler = - NW_HED_EventHandler_New (NW_HED_DocumentNodeOf (contentHandler), elementNode); - - areaBox = (NW_LMgr_Box_t*)NW_LMgr_AreaBox_New(6, - NW_LMgr_EventHandlerOf (eventHandler), - imageMapBox, - shapeVal, - coordsVal, - altText, - hrefVal); - - NW_THROW_OOM_ON_NULL (areaBox, status); - - if (NW_LMgr_AreaBox_IsInvalidAreaBox(areaBox)) - { - NW_Object_Delete (areaBox); - } - else - { - if (isFirstAreaBox) - { - temp = NW_ADT_DynamicVector_InsertAt (areaList, &areaBox, NW_ADT_Vector_AtEnd); - - isFirstAreaBox = NW_FALSE; - } - else - { - NW_ADT_Vector_Metric_t elementSize = NW_ADT_Vector_GetSize(areaList); - NW_Int32 low = 0; - NW_Int32 high = (NW_Int32)elementSize - 1; - NW_Int32 mid = 0; - NW_GDI_Metric_t xMid = 0, yMid = 0; - - // In order to speed the insertion into the array, it is best to use a form of - // Binary Search in order to not have to process the array sequencially. The correct - // location of the item is found when low is no longer <= high. - while (low <= high) - { - // Find the mid point of the array - mid = (NW_Int32)((low + high) / 2); - - // Retreive the area box at the mid point - NW_LMgr_Box_t* tempAreaBox = *(NW_LMgr_Box_t**)NW_ADT_Vector_ElementAt (areaList, (NW_ADT_Vector_Metric_t)mid); - - if (tempAreaBox != NULL) - { - // Retrieve the x,y coordinates of the mid point area box - NW_GDI_Rectangle_t boxBounds = NW_LMgr_Box_GetFormatBounds( areaBox ); - NW_GDI_Rectangle_t tempBoxBounds = NW_LMgr_Box_GetFormatBounds( tempAreaBox ); - xMid = tempBoxBounds.point.x; - yMid = tempBoxBounds.point.y; - - if (boxBounds.point.y < yMid) - { - high = mid - 1; - } - else if (boxBounds.point.y == yMid) - { - if (boxBounds.point.x < xMid) - { - high = mid - 1; - } - else - { - low = mid + 1; - } - } - else - { - low = mid + 1; - } - } - else - { - break; - } - } - - temp = NW_ADT_DynamicVector_InsertAt (areaList, &areaBox, (NW_ADT_Vector_Metric_t)low); - - } - NW_THROW_OOM_ON_NULL (temp, status); - - // apply common attributes and styles - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &areaBox, NULL); - - _NW_THROW_ON_ERROR( status ); - } - } - } - } - } - } - NW_CATCH (status) - { - NW_Object_Delete(shapeVal); - NW_Object_Delete(coordsVal); - NW_Object_Delete(altText); - NW_Object_Delete(hrefVal); - } - NW_FINALLY - { - if (freeNeeded) - { - NW_Str_Delete(storage); - } - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// Function: NW_XHTML_imgElementHandler_DisplayPopUp -// Description: Displays the pop up responsible for listing the image map's -// area boxes so that the user can make a selection in small screen mode -// Returns: TInt: index into the list of area's being displayed -// : -1 if there was no selection made -// ----------------------------------------------------------------------------- -// -TInt -NW_XHTML_imgElementHandler_DisplayPopUp(CFbsBitmap* imageMapBitmap, - CArrayFixFlat<TRect>* areaCoordList, - CArrayPtrFlat<HBufC>* areaAltTextList) -{ - CArrayPtrFlat<CFbsBitmap>* areaBitmapList; - CFbsBitmap* areaBitmap; - CFbsBitmapDevice* bitmapDevice; - CFbsBitGc* bitmapContext; - TInt areaCount; - TInt selectedItem( -1 ); - - if( areaCoordList ) - { - areaCount = areaCoordList->Count(); - areaBitmapList = new( ELeave )CArrayPtrFlat<CFbsBitmap>( 5 ); - CleanupStack::PushL( areaBitmapList ); - - for ( TInt i = 0; i < areaCount; i++ ) - { - // takes each area and create the corresponding bitmap - areaBitmap = new( ELeave )CFbsBitmap(); - CleanupStack::PushL( areaBitmap ); - - User::LeaveIfError( areaBitmap->Create( areaCoordList->At( i ).Size(), EColor4K ) ); - // create bitmap device - bitmapDevice = CFbsBitmapDevice::NewL( areaBitmap ); - CleanupStack::PushL( bitmapDevice ); - - // create graphics context for bitmap device - User::LeaveIfError( bitmapDevice->CreateContext( bitmapContext ) ); - CleanupStack::PushL( bitmapContext ); - - // copy area - bitmapContext->BitBlt( TPoint( 0, 0 ), imageMapBitmap, areaCoordList->At( i ) ); - - CleanupStack::PopAndDestroy( 2 ); // bitmapContext, bitmapDevice - - areaBitmapList->AppendL( areaBitmap ); - // list takes ownership - CleanupStack::Pop(); // areaBitmap - } - - selectedItem = CImageMapPopup::CreateAndRunL( *areaBitmapList, *areaAltTextList ); - // CreateAndRunL takes areaBitmaplist ownership - CleanupStack::Pop(); // areaBitmapList - } - return selectedItem; -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -const -NW_XHTML_imgElementHandler_Class_t NW_XHTML_imgElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_imgElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_imgElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_imgElementHandler_ProcessEvent - }, - { /* NW_XHTML_imgElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -const NW_XHTML_imgElementHandler_t NW_XHTML_imgElementHandler = { - { { &NW_XHTML_imgElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_imgElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Text_t* url = NULL; - TBrowserStatusCode status; - - NW_REQUIRED_PARAM(elementHandler); - - /* NW_Settings_GetImageEnabled() called to determine whether - autoloading of images is turned on. If not, then just display - the initial "x" and alt text, and don't issue any load requests. - */ - if (!NW_Settings_GetImagesEnabled()) - { - return KBrsrSuccess; - } - - /* In case vertical layout is enabled we need to check if there is any - need to load the image */ - NW_HED_DocumentRoot_t* documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( contentHandler ); - NW_ASSERT( documentRoot != NULL ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - NW_ASSERT( rootBox != NULL ); - - if( NW_LMgr_RootBox_GetSmallScreenOn( rootBox ) && !contentHandler->switchBackToNormalLayout) - { - if (!NW_ImageLoadNeeded(contentHandler, elementNode)) - return KBrsrSuccess; - } - - /* find the 'src' attribute and get its string value */ - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_src, &url); - if (status != KBrsrSuccess) - { - return status; - } - - /* load the image */ - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, - url, NW_HED_UrlRequest_Reason_DocLoadChild, elementNode, NW_UrlRequest_Type_Image); - - /* cleanup after ourselves */ - NW_Object_Delete (url); - - if (status != KBrsrOutOfMemory) - { - status = KBrsrSuccess; - } - - return status; -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_imgElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* xhtmlContentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox ) - { - NW_ImageCH_Epoc32ContentHandler_t* imageContentHandler = NULL; - NW_LMgr_Box_t* box = NULL; - NW_Text_t* altText = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - NW_Image_Virtual_t* virtualImage = NULL; - NW_Text_t* usemapVal = NULL; - NW_Text_t* url = NULL; - NW_Bool brokenImage = NW_FALSE; - NW_Image_Epoc32Simple_t* simpleImage = NULL; - NW_LMgr_ContainerBox_t* tempParentBox = NULL; - - NW_TRY (status) - { - NW_HED_DocumentRoot_t* documentRoot; - NW_HED_CompositeNode_t* compositeNode; - - documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( xhtmlContentHandler ); - NW_ASSERT( documentRoot != NULL ); - - rootBox = NW_HED_DocumentRoot_GetRootBox( documentRoot ); - - // get the associated content handler if any - compositeNode = static_cast<NW_HED_CompositeNode_t*> - ( NW_Object_QueryAggregate( xhtmlContentHandler, &NW_HED_CompositeNode_Class ) ); - NW_ASSERT (compositeNode != NULL); - - imageContentHandler = (NW_ImageCH_Epoc32ContentHandler_t*) - NW_HED_CompositeNode_LookupChild( compositeNode, elementNode ); - // imageContenHandler might be NULL -as the content has not arrived yet. do not throw OOM error - - // retrieve the altText attribute - NW_XHTML_GetDOMAttribute( xhtmlContentHandler, elementNode, NW_XHTML_AttributeToken_alt, &altText ); - - // create the image alias from the image content handler - if( imageContentHandler && imageContentHandler->image ) - { - // this case arises when this Image Content Handler contains the Virtual Image - if( NW_Object_IsInstanceOf( imageContentHandler->image, &NW_Image_Virtual_Class ) == NW_TRUE ) - { - // get the abstract image from the virtual image - virtualImage = NW_Image_Virtual_New( NW_Image_VirtualOf( imageContentHandler->image )->image ); - } - else - { - virtualImage = NW_Image_Virtual_New( imageContentHandler->image ); - } - NW_THROW_OOM_ON_NULL( virtualImage, status ); - - brokenImage = NW_FALSE; - } - else - // if there is no content handler or content handler image associated with our node - // we create a canned virtual image - { - NW_Image_AbstractImage_t* cannedImage; - - NW_ASSERT( rootBox->cannedImages != NULL ); - - cannedImage = (NW_Image_AbstractImage_t*) - NW_Image_CannedImages_GetImage( rootBox->cannedImages, NW_Image_Missing ); - NW_THROW_OOM_ON_NULL( cannedImage, status ); - - virtualImage = NW_Image_Virtual_New( cannedImage ); - NW_THROW_OOM_ON_NULL( virtualImage, status ); - - brokenImage = NW_TRUE; - } - - // retrieve the name of the map. this will be used as the key in our map list - NW_XHTML_GetDOMAttribute( xhtmlContentHandler, - elementNode, NW_XHTML_AttributeToken_usemap, &usemapVal ); - - // if this image is not using a image map, create an AnimatedImageBox, otherwise create - // a ImageMapBox - if( usemapVal ) - { - NW_LMgr_ImageMapBox_t* imageMapBox; - - // find the 'src' attribute and get its string value - status = NW_XHTML_GetDOMAttribute (xhtmlContentHandler, elementNode, - NW_XHTML_AttributeToken_src, &url); - - NW_THROW_ON( status, KBrsrOutOfMemory ); - - status = NW_XHTML_imgElementHandler_CreateImageMapBox( elementHandler, xhtmlContentHandler, elementNode, - virtualImage, altText, url, brokenImage, usemapVal, &imageMapBox ); - - // catch only OOM - NW_THROW_ON( status, KBrsrOutOfMemory ); - - // image container takes both the image and the alttext ownership - box = (NW_LMgr_Box_t*)imageMapBox; - virtualImage = NULL; - altText = NULL; - url = NULL; - // we need to update the box tree in the imagecontenthandler since imagemapbox - // is now associated with the imagemapbox - if (imageContentHandler) - { - NW_HED_ContentHandlerOf( imageContentHandler )->boxTree = box; - } - } - - // create regular image box if we are unable to create an ImageMapBox - if( !box ) - { - if( !imageContentHandler ) - { - box = (NW_LMgr_Box_t*)NW_LMgr_AnimatedImageBox_New( 3, NW_Image_AbstractImageOf( virtualImage ), - altText, brokenImage ); - NW_THROW_OOM_ON_NULL( box, status ); - // image container takes both the image and the alttext ownership - virtualImage = NULL; - altText = NULL; - } - else - { - // otherwise let the content handler build the ImageBox - status = NW_HED_DocumentNode_GetBoxTree( imageContentHandler, &box ); - _NW_THROW_ON_ERROR( status ); - } - } - // add the box to the tree can return success or out of memory - status = NW_LMgr_ContainerBox_AddChild( parentBox, box ); - _NW_THROW_ON_ERROR( status ); - - // apply common attributes and styles can return success or out of memory - status = NW_XHTML_ElementHandler_ApplyStyles( elementHandler, xhtmlContentHandler, - elementNode, &box, NULL ); - NW_THROW_ON( status, KBrsrOutOfMemory ); - - // In case of 'display:none' or an error Apply Styles removes the image box. - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - /* If the image is aligned a float has been inserted into its - * property list. This is a problem if this image is inside container - * which is inside a vertical table cell. The table algorithms don't handle - * floats. This is the best point to remove the property if it has - * been inserted. Walk up the box tree until we reach a VerticalTableCellBox, - * or NULL.*/ - tempParentBox = parentBox; - - while(tempParentBox) - { - if (NW_Object_IsClass (tempParentBox, &NW_LMgr_VerticalTableCellBox_Class)) - { - NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_float); - break; - } - tempParentBox = NW_LMgr_Box_GetParent(tempParentBox); - } - - /* Store the "width" and "height" values of the <img>. This may be - * required in the image decoding functionality. - * - * In the case of creating the box tree the first time the virtual - * images will not have an image associated with them. The fact that - * the image is non-null can be used to infer that it is a simple - * image. - * - * In the case of RESUME we are rebuilding the box tree and all the - * images are present, even the virtual ones. You must check the - * class of the image. - */ - - if(imageContentHandler && imageContentHandler->image && - NW_Object_IsInstanceOf(imageContentHandler->image, &NW_Image_Epoc32Simple_Class )) - { - simpleImage = (NW_Image_Epoc32Simple_t*)imageContentHandler->image; - } - - if(simpleImage) - { - NW_Uint16 nodeToken = 0; - NW_Uint16 attrToken = 0; - NW_DOM_AttributeListIterator_t listIter; - NW_DOM_AttributeHandle_t attrHandle; - NW_String_t attrValueStr; - NW_Uint32 attrEncoding; - NW_Ucs2 *ucs2AttrVal = NULL; - - nodeToken = NW_DOM_Node_getNodeToken(elementNode); - - if(nodeToken == NW_XHTML_ElementToken_img) - { - if (NW_DOM_ElementNode_hasAttributes(elementNode) ) - { - /* Go through all the attributes and check for height and width */ - - status = StatusCodeConvert(NW_DOM_ElementNode_getAttributeListIterator(elementNode, &listIter) ); - - _NW_THROW_ON_ERROR( status ); - - if(status == KBrsrSuccess) - { - while (NW_DOM_AttributeListIterator_getNextAttribute(&listIter, &attrHandle) - == NW_STAT_WBXML_ITERATE_MORE) - { - attrToken = NW_DOM_AttributeHandle_getToken(&attrHandle); - if( (attrToken == NW_XHTML_AttributeToken_width) || - (attrToken == NW_XHTML_AttributeToken_height) ) - { - attrEncoding = NW_DOM_AttributeHandle_getEncoding(&attrHandle); - status = StatusCodeConvert(NW_DOM_AttributeHandle_getValue(&attrHandle, &attrValueStr) ); - _NW_THROW_ON_ERROR( status ); - status = StatusCodeConvert( NW_String_stringToUCS2Char(&attrValueStr, attrEncoding, &ucs2AttrVal) ); - _NW_THROW_ON_ERROR( status ); - if(attrToken == NW_XHTML_AttributeToken_width) - { - simpleImage->srcWidth = NW_Str_Atoi(ucs2AttrVal); - } - else if(attrToken == NW_XHTML_AttributeToken_height) - { - simpleImage->srcHeight = NW_Str_Atoi(ucs2AttrVal); - } - - if(ucs2AttrVal != NULL) - { - NW_Mem_Free(ucs2AttrVal); - } - } - }/*end while*/ - - }/*end if(status == KBrsrSuccess)*/ - } /*end if (NW_DOM_ElementNode_hasAttributes(elementNode) )*/ - }/*end if(nodeToken == NW_XHTML_ElementToken_img)*/ - - - }/*end if(simpleImage) */ - } - NW_CATCH (status) - { - NW_Object_Delete( box ); - } - NW_FINALLY - { - NW_Object_Delete( usemapVal ); - NW_Object_Delete( altText ); - NW_Object_Delete( virtualImage ); - NW_Object_Delete( url ); - - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -NW_Uint8 -_NW_XHTML_imgElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) - { - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - - NW_LMgr_RootBox_t* rootBox = NW_LMgr_Box_GetRootBox(box); - NW_ASSERT(rootBox); - - NW_HED_AppServices_t* appServices = rootBox->appServices; - NW_ASSERT(appServices); - - // we are really only interested in the following events - if ((NW_Object_Core_GetClass (event) != &NW_Evt_ActivateEvent_Class) && - (NW_Object_Core_GetClass (event) != &NW_Evt_FocusEvent_Class)) - { - return NW_LMgr_EventNotAbsorbed; - } - - if(NW_Object_Core_GetClass (event) == &NW_Evt_FocusEvent_Class) - { - return NW_LMgr_EventAbsorbed; - } - - // if the event is an activate event and we are in small screen mode, - // call the code to display the image in the image map view - if (NW_Object_IsInstanceOf (event, &NW_Evt_ActivateEvent_Class) && - NW_LMgr_RootBox_GetSmallScreenOn( NW_LMgr_Box_GetRootBox( box ) ) ) - { - appServices->browserAppApi.SwitchToImgMapView(); - } - // we absorbed the event! - return NW_LMgr_EventAbsorbed; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Image/mapElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/mapElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,217 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Object for containing map element handler specific methods. -* -*/ - - -#include "nw_image_mapelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_imagemapbox.h" -#include "nw_lmgr_areabox.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "MapElementList.h" - -static -TBrowserStatusCode -NW_XHTML_mapElementHandler_InsertIntoImageMapLookupTable(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - CMapElementList* mapElementList = NULL; - NW_Text_t* nameVal = NULL; - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - - NW_TRY (status) - { - // retrieve the map list from the content handler, if it does not exist, create one - mapElementList = static_cast<CMapElementList*>(NW_XHTML_ContentHandler_GetImageMapLookupTable(contentHandler)); - if (mapElementList == NULL) - { - // create a new maplist to hold the map elements. deleted in the contenthandler destructor - TRAP(status, mapElementList = CMapElementList::NewL()); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // add the maplist to the content handler - NW_XHTML_ContentHandler_SetImageMapLookupTable(contentHandler, mapElementList); - } - - // retrieve the name of the map. this will be used as the key in our map list - if (NW_DOM_ElementNode_getTagToken(elementNode) == NW_XHTML_ElementToken_map) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_name, &nameVal); - - // if the name is empty, try to see if the id was specified - if (nameVal == NULL) - { - NW_XHTML_GetDOMAttribute (contentHandler, - elementNode, - NW_XHTML_AttributeToken_id, &nameVal); - - } - } - - if (nameVal != NULL) - { - // convert the mapName to Unicode and get the storage - NW_Uint16* storage = (NW_Uint16*)NW_Text_GetUCS2Buffer (nameVal, 0, &length, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - // add image map dom node to the list - status = mapElementList->SetDomNode( storage, elementNode ); - _NW_THROW_ON_ERROR( status ); - } - } - NW_CATCH (status) - { - } - NW_FINALLY - { - NW_Object_Delete( nameVal ); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_mapElementHandler_Class_t NW_XHTML_mapElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_mapElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_mapElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_mapElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_mapElementHandler_t NW_XHTML_mapElementHandler = { - { { &NW_XHTML_mapElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_mapElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_TRY (status) - { - // parameter assertions - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (elementNode != NULL); - - // special handling if map is the last part of the chunk: - // leave map to be processed in the next chunk - // in case this is the last chunk, we need to process map in this chunk - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_TRUE)) - { - NW_THROW_SUCCESS (status); - } - - // invoke our superclass method - status = _NW_XHTML_ElementHandler_Initialize(elementHandler, contentHandler, elementNode); - - if (status != KBrsrSuccess) - { - NW_THROW (status); - } - - // insert the map name and dom node into the maplist - status = NW_XHTML_mapElementHandler_InsertIntoImageMapLookupTable(contentHandler, elementNode); - } - NW_CATCH (status) - { - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_mapElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t *box = NULL; - - NW_TRY (status ) - { - // special handling if a is the last node of the chunck: - // leave it to be processed in the next chunk - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_FALSE)) - { - NW_THROW_SUCCESS (status); - } - - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (box, status); - - // Add the box to the tree - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - // Apply common attributes and styles - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf(box); - - /* invoke our superclass for completion */ - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - } - NW_FINALLY { - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_link_linkelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_string.h" -#include "BrsrStatusCodes.h" - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_linkElementHandler_Class_t NW_XHTML_linkElementHandler_Class = -{ - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_linkElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_linkElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_linkElementHandler_t NW_XHTML_linkElementHandler = -{ - { { &NW_XHTML_linkElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_linkElementHandler_Initialize(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, NW_DOM_ElementNode_t* elementNode) - { - NW_Ucs2* type = NULL; - NW_Ucs2* relation = NULL; - NW_Ucs2* media = NULL; - NW_Ucs2* href = NULL; - NW_Ucs2* charset = NULL; - - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY (status) - { - // Extract the type attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_type, &type); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Extract the relation attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_rel, &relation); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Extract the media attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_media, &media); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Extract the href attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_href, &href); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Extract the charset attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_charset, &charset); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Load the stylesheet. - status = NW_XHTML_ContentHandler_LoadStylesheet(contentHandler, - type, relation, media, href, charset, NULL); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - NW_Str_Delete(type); - NW_Str_Delete(relation); - NW_Str_Delete(media); - NW_Str_Delete(href); - NW_Str_Delete(charset); - - return status; - } NW_END_TRY - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_link_linkmodulei.h" - -#include "nw_link_linkelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_LinkModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_link, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_linkElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_LinkModule_Class_t NW_XHTML_LinkModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Link), - /* elementHandlers */ _NW_XHTML_LinkModule_ElementHandlers, - }, - { /* NW_XHTML_LinkModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_LinkModule_t NW_XHTML_LinkModule = { - {&NW_XHTML_LinkModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/MakeSrc --- a/webengine/wmlengine/src/xhtml/src/MakeSrc Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 2001,2002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeSrc -TARGET = rbTempest_xhtml_src_lib.a - -SUBDIRS = . Base BasicForms BasicTables Hypertext Image isa Link MetaInformation \ - Structure Style Text - -SUBMAKES = MakeSrc2 MakeBase MakeBasicforms MakeBasictables MakeHypertext MakeImage MakeIsa MakeLink \ - MakeMetainformation MakeStructure MakeStyle MakeText - -OBJS = rbTempest_xhtml_src2_lib.a \ - Base/rbTempest_xhtml_src_base_lib.a \ - BasicForms/rbTempest_xhtml_src_basicforms_lib.a \ - BasicTables/rbTempest_xhtml_src_basictables_lib.a \ - Hypertext/rbTempest_xhtml_src_hypertext_lib.a \ - Image/rbTempest_xhtml_src_image_lib.a \ - isa/rbTempest_xhtml_src_isa_lib.a \ - Link/rbTempest_xhtml_src_link_lib.a \ - MetaInformation/rbTempest_xhtml_src_metainformation_lib.a \ - Structure/rbTempest_xhtml_src_structure_lib.a \ - Style/rbTempest_xhtml_src_style_lib.a \ - Text/rbTempest_xhtml_src_text_lib.a - -SRCS = - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE_RECURSIVE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/MetaInformation/XHTMLMetaElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/MetaInformation/XHTMLMetaElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,405 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_hed_documentroot.h" -//R->ul #include "urlloader_urlloaderint.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_metainformation_metaelementhandleri.h" -#include "BrsrStatusCodes.h" - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -// Forward references: -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivPragmaNocache (NW_XHTML_ContentHandler_t* contentHandler); - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivCacheControl (NW_Ucs2* content, - NW_XHTML_ContentHandler_t* contentHandler) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (content != NULL); - - if (NW_Str_StricmpConst(content, "no-cache") == 0) { - /* Equivalent to pragma/no-cache so call the same method. */ - status = NW_XHTML_metaElementHandler_processHttpEquivPragmaNocache(contentHandler); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivExpires (NW_Ucs2* content, - NW_XHTML_ContentHandler_t* contentHandler) -{ - - /* Note about return status: invalid syntax is ignored and returned as - success. Invalid syntax and content will result in the page expiring immediately. - The only error that is tracked and returned is out-of-memory. - */ - - contentHandler->metaCacheExpires = NW_TRUE; - contentHandler->metaExpiresDate = NW_Str_Newcpy(content); - - if(contentHandler->metaExpiresDate == NULL) - { - return KBrsrOutOfMemory; - } - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivPragmaNocache (NW_XHTML_ContentHandler_t* contentHandler) -{ - contentHandler->metaNoCache = NW_TRUE; - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivPragma (NW_Ucs2* content, - NW_XHTML_ContentHandler_t* contentHandler) -{ - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT (content != NULL); - - if (NW_Str_StricmpConst(content, "no-cache") == 0) { - status = NW_XHTML_metaElementHandler_processHttpEquivPragmaNocache(contentHandler); - } - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_metaElementHandler_processHttpEquivRefresh (NW_Ucs2* content, - NW_XHTML_ContentHandler_t* contentHandler) -{ - NW_Ucs2* p1; // ptr to part 1 of content string - NW_Ucs2* p2; // ptr to part 2 of content string - NW_Ucs2* s; // generic string ptr - NW_Int32 secs; // number of seconds before refresh/redirect - NW_Uint8 loadReason; - NW_Ucs2* url = NULL; - NW_Text_t* urlText = NULL; - NW_Text_t* resolvedUrl = NULL; - const NW_Ucs2* currentUrlStorage = NULL; - NW_Uint8 sFreeNeeded = NW_FALSE; - NW_Text_Length_t charCount; - - NW_ASSERT (content != NULL); - - /* Note about return status: invalid syntax is ignored and returned as - success. The only error that is tracked and returned is out-of-memory. - */ - - /* Parse the contents, pulling out the number of seconds and the URL. Syntax: - n;URL=http://www.website.com/index.html - where n represents number of seconds to wait before refresh/redirect. - - The syntax is somewhat loose, using Microsoft I.E. v6.0 as the benchmark. - If the delay is there at all then some sort of refresh will occur. If a - delay is specified and no URL specified or the URL syntax is invalid then - it is treated as an 'implied' refresh to the same page. - - The parsing is destructive, meaning the string value of content will be - modified and re-used. The original pointer is kept so that the memory - can be properly deallocated. - */ - - /* Split the string into two parts: part1 -- the seconds, part2 -- the URL. */ - p2 = NW_Str_Strchr(content, ';'); - if (p2 != NULL) { - *p2++ = 0; // replace ';' with null - } - - /* Check syntax of seconds and convert to numeric value. */ - p1 = NW_Str_TrimInPlace(content, NW_Str_Both); - if (*p1 == 0) { - return KBrsrSuccess; // invalid syntax - } - s = p1; - /* Must be at least one valid digit. */ - if (!NW_Str_Isdigit(*s++)) { - return KBrsrSuccess; // invalid syntax - } - secs = NW_Str_Atoi(p1); - - /* Any non-digits before the semicolon invalidates the URL in order to mimic - Microsoft I.E. behavior. */ - while (*s) { - if (!NW_Str_Isdigit(*s++)) { - p2 = NULL; - break; - } - } - - /* Check syntax of URL part and extract just the URL. */ - if (p2 != NULL) { - p2 = NW_Str_TrimInPlace(p2, NW_Str_Both); - /* Must contain "url", case-insenstive. */ - if (NW_Str_StrnicmpConst(p2, "url", 3) == 0) { - p2 += 3; - p2 = NW_Str_TrimInPlace(p2, NW_Str_Start); - /* Must contain "=". */ - if (NW_Str_StrnicmpConst(p2, "=", 1) == 0) { - p2 += 1; - /* Trim is used instead of TrimInPlace in order to get a new string - object. */ - url = NW_Str_Trim(p2, NW_Str_Start); - /* If empty string, free it, indicating use of implied URL back to self. */ - if (NW_Str_Strlen(url) == 0) { - NW_Str_Delete(url); - url = NULL; - } - } - } - } - - /* The loadReason determines whether or not a history buffer entry is created - for the URL. Assume standard doc load, which creates a history buffer - entry. */ - loadReason = NW_HED_UrlRequest_Reason_DocLoad; - - NW_TRY (status) { - - currentUrlStorage = NW_HED_UrlRequest_GetRawUrl( - NW_HED_ContentHandler_GetUrlRequest(NW_HED_ContentHandlerOf(contentHandler))); - NW_THROW_ON_NULL(currentUrlStorage, status, KBrsrUnexpectedError); - - /* Resolve the URL. */ - if (url == NULL) { - /* If null, then refresh back to self and do not create a history buffer - entry. */ - loadReason = NW_HED_UrlRequest_Reason_ShellReload; - resolvedUrl = (NW_Text_t*)NW_Text_UCS2_New((NW_Ucs2*)currentUrlStorage, - NW_Str_Strlen(currentUrlStorage), - NW_Text_Flags_Copy | NW_Text_Flags_Aligned | NW_Text_Flags_NullTerminated); - NW_THROW_OOM_ON_NULL(resolvedUrl, status); - } else { - /* If not null, then resolve the URL. */ - urlText = (NW_Text_t*)NW_Text_UCS2_New(url, NW_Str_Strlen(url), 0); - NW_THROW_OOM_ON_NULL(urlText, status); - status = NW_HED_ContentHandler_ResolveURL(contentHandler, - urlText, - &resolvedUrl); - _NW_THROW_ON_ERROR(status); - /* ResolveURL function destructs urlText iff success. */ - urlText = NULL; - - /* Compare resolved URL to current page. If the same, do not create a - history buffer entry. */ - s = (NW_Ucs2*)NW_Text_GetUCS2Buffer(resolvedUrl, - NW_Text_Flags_Aligned, - &charCount, - &sFreeNeeded); - NW_THROW_OOM_ON_NULL(s, status); - if (NW_Str_Stricmp(s, currentUrlStorage) == 0) { - loadReason = NW_HED_UrlRequest_Reason_ShellReload; - } - } - - /* If the delay is zero do not create a history buffer entry. */ - if (secs == 0) { - loadReason = NW_HED_UrlRequest_Reason_ShellReload; - } - - /* Pass the data on to the content handler object, which will take it - from there. */ - status = NW_XHTML_ContentHandler_MetaRefreshInitialize(contentHandler, - secs, - resolvedUrl, - loadReason); - _NW_THROW_ON_ERROR(status); - /* MetaRefreshInitialize takes ownership of resolvedUrl iff success. */ - resolvedUrl = NULL; - } - NW_CATCH (status) { - if (status != KBrsrOutOfMemory) { - status = KBrsrSuccess; - } - } - NW_FINALLY { - if (url != NULL) { - NW_Str_Delete(url); - } - if (urlText != NULL) { - NW_Object_Delete(urlText); - } - if (resolvedUrl != NULL) { - NW_Object_Delete(resolvedUrl); - } - if (sFreeNeeded){ - NW_Str_Delete(s); - } - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_metaElementHandler_Class_t NW_XHTML_metaElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_metaElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_metaElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_metaElementHandler_ProcessEvent - }, - { /* NW_XHTML_metaElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_metaElementHandler_t NW_XHTML_metaElementHandler = { - { { &NW_XHTML_metaElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_metaElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Ucs2* httpEquiv = NULL; - NW_Ucs2* content = NULL; - - NW_REQUIRED_PARAM(elementHandler); - - /* The only supported META attribute is 'http-equiv' and of the http-equiv - directives, only the 'cache-control (for 'no-cache'), 'expires', - 'pragma' (for 'no-cache') and 'refresh' are supported. All other META - tags are ignored. Syntax: - <META HTTP-EQUIV="cache-control" CONTENT="no-cache"> - <META HTTP-EQUIV="expires" CONTENT="Wed, 09 Aug 2000 08:21:57 GMT"> - where the date must conform to RFC1123 - <META HTTP-EQUIV="pragma" CONTENT="NO-CACHE"> - <META HTTP-EQUIV="refresh" CONTENT="n;URL=http://www.website.com/index.html"> - where n represents number of seconds to wait before refresh/redirect - - Note about return status: in general success is returned since unsupported - or missing attributes and/or bad attribute values just cause the META tag to - be ignored. The only error that is tracked and returned is out-of-memory. - */ - - NW_TRY (status) { - - /* Find the 'http-equiv' attribute and get its string value returned as: - malloced, UCS-2, aligned, null terminated. */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_http_equiv, - &httpEquiv); - _NW_THROW_ON_ERROR (status); - - - /* All of the supported http-equiv directives have a second attribute - called 'content'. Find the 'content' attribute and get its string - value returned as: malloced, UCS-2, aligned, null terminated. */ - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, - NW_XHTML_AttributeToken_content, - &content); - _NW_THROW_ON_ERROR (status); - - - /* Check to see if the http-equiv attribute is one of the supported - http-equiv directives and process each accordingly. */ - if (NW_Str_StricmpConst(httpEquiv, "cache-control") == 0) { - status = NW_XHTML_metaElementHandler_processHttpEquivCacheControl(content, contentHandler); - _NW_THROW_ON_ERROR (status); - } else if (NW_Str_StricmpConst(httpEquiv, "expires") == 0) { - status = NW_XHTML_metaElementHandler_processHttpEquivExpires(content, contentHandler); - _NW_THROW_ON_ERROR (status); - } else if (NW_Str_StricmpConst(httpEquiv, "pragma") == 0) { - status = NW_XHTML_metaElementHandler_processHttpEquivPragma(content, contentHandler); - _NW_THROW_ON_ERROR (status); - } else if (NW_Str_StricmpConst(httpEquiv, "refresh") == 0) { - status = NW_XHTML_metaElementHandler_processHttpEquivRefresh(content, - contentHandler); - _NW_THROW_ON_ERROR (status); - } else { - NW_FINISHED; - } - } - NW_CATCH (status) { - if (status != KBrsrOutOfMemory) { - status = KBrsrSuccess; - } - } - NW_FINALLY { - NW_Str_Delete(httpEquiv); - NW_Str_Delete(content); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_metaElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - /* invoke our superclass for completion */ - return NW_XHTML_ElementHandler_Class.NW_XHTML_ElementHandler. - createBoxTree (elementHandler, contentHandler, elementNode, parentBox); -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_XHTML_metaElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - NW_REQUIRED_PARAM(box); - NW_REQUIRED_PARAM(event); - - /* by default we don't handle the event */ - return 0; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/MetaInformation/XHTMLMetaInformationModule.cpp --- a/webengine/wmlengine/src/xhtml/src/MetaInformation/XHTMLMetaInformationModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_metainformation_metainformationmodulei.h" - -#include "nw_metainformation_metaelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_MetaInformationModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_meta, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_metaElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_MetaInformationModule_Class_t NW_XHTML_MetaInformationModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_MetaInformation), - /* elementHandlers */ _NW_XHTML_MetaInformationModule_ElementHandlers, - }, - { /* NW_XHTML_MetaInformationModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_MetaInformationModule_t NW_XHTML_MetaInformationModule = { - {&NW_XHTML_MetaInformationModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Object/XHTMLObjectModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Object/XHTMLObjectModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_object_objectmodulei.h" -#include "XhtmlObjectElementHandlerOOC.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_ObjectModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_object, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_ObjectElementHandler }, - { NW_XHTML_ElementToken_embed, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_ObjectElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ObjectModule_Class_t NW_XHTML_ObjectModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Object), - /* elementHandlers */ _NW_XHTML_ObjectModule_ElementHandlers, - }, - { /* NW_XHTML_ObjectModule */ - /* unused */ NW_Object_Unused //? - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_ObjectModule_t NW_XHTML_ObjectModule = { - {&NW_XHTML_ObjectModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1559 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles object tags in XHTML documents. -* -*/ - - -// INCLUDE FILES -#include <e32std.h> -#include <e32def.h> -#include <webkit.rsg> - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_xhtml_elementhandler.h" -//#include "nw_ecma_contenthandler.h" -#include "nw_evt_accesskeyevent.h" -#include "nw_evt_activateevent.h" -#include "nw_evt_openviewerevent.h" -#include "nw_evt_focusevent.h" -#include "nw_hed_documentroot.h" -#include "HEDDocumentListener.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_propertylist.h" -#include "LMgrObjectBoxOOC.h" -#include "nw_lmgr_rootbox.h" -#include "nw_image_cannedimages.h" -#include "nw_image_virtualimage.h" -#include "nwx_settings.h" -#include "PluginContentHandlerOOC.h" -#include "LMgrObjectBox.h" -#include "PluginContentHandler.h" -#include "ObjectUtils.h" -#include "PluginHandler.h" -#include "StringUtils.h" -#include "ObjectDialog.h" -#include "XhtmlObjectElementHandler.h" -#include "nwx_http_defs.h" -#include "urlloader_urlresponse.h" - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::CXHTMLObjectElementHandler -// -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CXHTMLObjectElementHandler::CXHTMLObjectElementHandler(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - iElementHandler = aElementHandler; - iContentHandler = aContentHandler; - iElementNode = aElementNode; - - iLoadedHandlerType = ObjectUtils::EHandlerAny; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::ConstructL -// -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::ConstructL(void) - { - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::~CXHTMLObjectElementHandler -// -// Deconstructor. -// ----------------------------------------------------------------------------- -// -CXHTMLObjectElementHandler::~CXHTMLObjectElementHandler() - { - // Clear the listener so this isn't notified when the box is destroyed, - // since this instance will no longer be valid. - if (iObjectBox) - { - NW_LMgr_ObjectBox_GetObjectBox(*iObjectBox)->RemoveBoxDestructionListener(this); - } - if (iTransactionId) - { - NW_XHTML_ContentHandler_SetLoadObserver(iContentHandler, iTransactionId, NULL); - } - - delete iContentType; - delete iContentLength; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CXHTMLObjectElementHandler* CXHTMLObjectElementHandler::NewL(const NW_XHTML_ElementHandler_t* - aElementHandler, NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - CXHTMLObjectElementHandler* self = new(ELeave) CXHTMLObjectElementHandler(aElementHandler, - aContentHandler, aElementNode); - - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CPluginContentHandler::Destroyed -// -// Recieves notifications when the box has been destroyed. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::Destroyed() - { - // Forget about the destroyed box. - iObjectBox = NULL; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::HeadCompleted -// -// Passes a HEAD response to the observer. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::HeadCompleted(TUint16 aTransactionId, - const NW_Url_Resp_t& aResponse, const NW_HED_UrlRequest_t& /*aUrlRequest*/, - void* /*aClientData*/) - { - NW_Ucs2* temp = NULL; - - NW_TRY (status) - { - NW_XHTML_ContentHandler_SetLoadObserver(iContentHandler, aTransactionId, NULL); - iTransactionId = 0; - // Ensure iObjectBox isn't NULL. - NW_THROW_ON_NULL(iObjectBox, status, KBrsrUnexpectedError); - - // Allow the server to override iContentType if it was never set from - // the type attribute or it was set but set to a type that isn't supported - // (this give the server a chance to set the type if a valid type wasn't - // set in the tag). - /*//R->embed - if (!iContentType || !ObjectUtils::IsSupported(iContentType, - NULL, ObjectUtils::EHandlerAny)) - { - NW_THROW_ON_NULL(aResponse.contentTypeString, status, KBrsrUnexpectedError); - - temp = StringUtils::CopyAsciiToUsc2(aResponse.contentTypeString); - NW_THROW_OOM_ON_NULL(temp, status); - - delete iContentType; - iContentType = NULL; - - iContentType = HBufC16::New(User::StringLength(temp)); - NW_THROW_OOM_ON_NULL(iContentType, status); - - iContentType->Des().Append(temp, User::StringLength(temp)); - - delete temp; - temp = NULL; - } - */ - // Extract and set the new content-length. - TUint kiloLen = aResponse.contentLength / 1024; - - status = StringUtils::ConvertUintToUcs2(kiloLen > 0 ? kiloLen: 1, &temp); - NW_THROW_ON_ERROR(status); - - delete iContentLength; - iContentLength = NULL; - - iContentLength = HBufC16::New(User::StringLength(temp)); - NW_THROW_OOM_ON_NULL(iContentLength, status); - - iContentLength->Des().Append(temp, User::StringLength(temp)); - - delete temp; - temp = NULL; - - // Apply the new values as properties. - ApplyInfoProperties(*iObjectBox); - - // This flag is set now that it has a valid content type and size. The - // flag is used later to skip any future validating head request that may - // normally be done when the box tree is created. - iObjectInfoValidated = ETrue; - - // Set the place holder text to "Unsupported" if the verified content-type - // isn't supported by a plugin or external-app. - /*//R->embed - if (!ObjectUtils::IsSupported(iContentType, NULL, ObjectUtils::EHandlerAny)) - { - status = SetPlaceHolderText(*iObjectBox, R_XHTML_OBJECT_UNSUPPORTED); - NW_THROW_ON_ERROR(status); - } - */ - } - - NW_CATCH (status) - { - delete temp; - } - - NW_FINALLY - { - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::ChunkReceived -// -// Passes a chunk of a response to the observer. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::ChunkReceived(TUint16 /*aTransactionId*/, TUint32 /*aChunkIndex*/, - const NW_Url_Resp_t& /*aResponse*/, const NW_HED_UrlRequest_t& /*aUrlRequest*/, - void* /*aClientData*/) - { - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::LoadCompleted -// -// Called when a response completes successfully or in error. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::LoadCompleted(TInt16 /*aStatusClass*/, TBrowserStatusCode aStatus, - TUint16 aTransactionId, const NW_HED_UrlRequest_t& /*aUrlRequest*/, - void* /*aClientData*/) - { - NW_XHTML_ContentHandler_SetLoadObserver(iContentHandler, aTransactionId, NULL); - iTransactionId = 0; - - if (iObjectBox) - { - // Reset the place holder upon a successful load of a resouce for an external application. - if ((aStatus == KBrsrSuccess) && (iLoadedHandlerType == ObjectUtils::EHandlerExternalApp)) - { - CLMgrObjectBox* theBox = NULL; - theBox = NW_LMgr_ObjectBox_GetObjectBox(*iObjectBox); - if (!theBox || (theBox->IsShowingPlaceHolder())) - { - (void) SetPlaceHolderText(*iObjectBox, R_XHTML_OBJECT_SELECT_TO_DOWNLOAD); - } - } - - // Reset the place holder upon failure -- unless this was an image load, or plugin was already - else if (aStatus != KBrsrSuccess) - { - CLMgrObjectBox* theBox = NULL; - theBox = NW_LMgr_ObjectBox_GetObjectBox(*iObjectBox); - if (!theBox || (theBox->IsShowingPlaceHolder())) - { - (void) SetPlaceHolderText(*iObjectBox, R_XHTML_OBJECT_UNSUPPORTED); - } - } - } - - iIsDownloading = EFalse; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::Initialize -// -// Initializes the ElementHandler. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::Initialize(void) - { - TDesC* type = NULL; - TDesC* data = NULL; - - NW_TRY (status) - { - // If this element is the last element in the chunk and this isn't the - // last chunk then initialize it later. This only applies to objects not embeds, - // since embed elements don't have children elements. - NW_Uint16 element = NW_HED_DomHelper_GetElementToken(iElementNode); - - if ((element == NW_XHTML_ElementToken_object) && - (!NW_XHTML_ElementHandler_NextSiblingExists(iContentHandler, iElementNode, NW_TRUE))) - { - NW_THROW_SUCCESS (status); - } - - if (iSelectedElementNode) - { - NW_THROW_SUCCESS (status); - } - - - // Determine which element node will be used. See comment on SelectElement... - status = SelectElement(); - NW_THROW_ON_ERROR(status); - - // Get the mime-type and url - (void) GetTypeAttribute(&type); - (void) GetSrcAttribute(&data); - /*//R->embed - if (type || data) - { - // Load it now if it is an image unless a plugin can also handle it. - if (!ObjectUtils::IsSupported(type, data, ObjectUtils::EHandlerPlugin)) - { - if (ObjectUtils::IsSupported(type, data, ObjectUtils::EHandlerImage)) - { - (void) LoadObjectResource(type, data, ObjectUtils::EHandlerImage); - } - } - } - */ - // If it gets to here it has processed a valid object element. skipToNode - // is set so any embedded elements are skipped. - iContentHandler->skipToNode = NW_DOM_Node_getNextSibling(iElementNode); - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - delete type; - delete data; - - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::CreateBoxTree -// -// Creates the box-tree associated with the tag. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::CreateBoxTree(NW_LMgr_ContainerBox_t& /*aParentBox*/) - { - NW_HED_DocumentRoot_t* documentRoot = NULL; - NW_HED_ContentHandler_t* contentHandler = NULL; - NW_LMgr_RootBox_t* rootBox = NULL; - NW_LMgr_EventHandler_t* eventHandler = NULL; - NW_LMgr_Box_t* objectBox = NULL; - NW_LMgr_Box_t* tempBox = NULL; - NW_LMgr_Box_t* innerBox = NULL; - NW_Image_AbstractImage_t* image = NULL; - TDesC* contentType = NULL; - TDesC* data = NULL; - TBool safeToDeleteObjectBox = ETrue; - TBool isImage = EFalse; - TBrowserStatusCode status = 0; - /* - NW_TRY (status) - { - // If this element is the last element in the chunk and this isn't the - // last chunk then initialize it later. This only applies to objects not embeds, - // since embed elements don't have children elements. - NW_Uint16 element = NW_HED_DomHelper_GetElementToken(iElementNode); - - if ((element == NW_XHTML_ElementToken_object) && - (!NW_XHTML_ElementHandler_NextSiblingExists(iContentHandler, iElementNode, NW_FALSE))) - { - NW_THROW_SUCCESS (status); - } - - // Get the associated content handler if any - contentHandler = AssociatedContentHandler(); - - // Get the root box - documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(iContentHandler); - rootBox = NW_HED_DocumentRoot_GetRootBox(documentRoot); - - // Get the content-type and url. - if (iObjectInfoValidated) - { - contentType = iContentType->Alloc(); - NW_THROW_OOM_ON_NULL(contentType, status); - } - else - { - (void) GetTypeAttribute(&contentType); - } - - (void) GetSrcAttribute(&data); - - // If the content-type is a supported image type and a plugin can't handle it - // then create a ImageBox to support the object. - - - if (!ObjectUtils::IsSupported(contentType, data, ObjectUtils::EHandlerPlugin) && - ObjectUtils::IsSupported(contentType, data, ObjectUtils::EHandlerImage)) - { - isImage = ETrue; - // Get the image box from the ImageCH_Epoc32ContentHandler. - if (contentHandler) - { - status = NW_HED_DocumentNode_GetBoxTree(contentHandler, &objectBox); - NW_THROW_ON_ERROR(status); - - // Don't allow this box to be deleted because it is owned by - // a ImageCH_Epoc32ContentHandler. - safeToDeleteObjectBox = EFalse; - } - - // Otherwise create a place holder image that will be used by the - // ImageCH_Epoc32ContentHandler to display the image once it loads. - else - { - const NW_Image_AbstractImage_t* cannedImage; - - cannedImage = (NW_Image_AbstractImage_t*) NW_Image_CannedImages_GetImage( - rootBox->cannedImages, NW_Image_Missing); - NW_THROW_ON_NULL((void*) cannedImage, status, KBrsrUnexpectedError); - - image = (NW_Image_AbstractImage_t*) NW_Image_Virtual_New( - const_cast<NW_Image_AbstractImage_t*>(cannedImage)); - NW_THROW_OOM_ON_NULL(image, status); - - objectBox = (NW_LMgr_Box_t*) NW_LMgr_AnimatedImageBox_New(0, - image, NULL, NW_TRUE); - NW_THROW_OOM_ON_NULL(objectBox, status); - image = NULL; - } - } - - // Otherwise create a CLMgrObjectBox to support the object. - else - { - if (!InHyperLink()) - { - // Create an eventHandler to process events targeted at this box - eventHandler = (NW_LMgr_EventHandler_t*) NW_HED_EventHandler_New( - NW_HED_DocumentNodeOf(iContentHandler), iElementNode); - NW_THROW_OOM_ON_NULL(eventHandler, status); - } - - status = CLMgrObjectBox::NewBox(eventHandler, &objectBox, &innerBox); - NW_THROW_ON_ERROR(status); - - eventHandler = NULL; - - // Save the content-type. This will be used later in ApplyInfoProperties - // to set the content-type property. This step is skipped if the content - // type has already been validated. - if (contentType && !iObjectInfoValidated) - { - delete iContentType; - iContentType = NULL; - - iContentType = HBufC::New(contentType->Length()); - NW_THROW_OOM_ON_NULL(iContentType, status); - - iContentType->Des().Append(*contentType); - } - - // Set the object box - iObjectBox = innerBox; - - // Add the element handler as box destruction listener. - TRAPD(err, NW_LMgr_ObjectBox_GetObjectBox(*iObjectBox)->AddBoxDestructionListenerL(this)); - NW_THROW_ON_TRAP_ERROR(err, status); - - // If a content handler is already present just place the new CLMgrObjectBox - // (innerBox) in an active state by clearing the place holder. - - if (contentHandler) - { - - if (NW_Object_IsInstanceOf(contentHandler, &NW_Plugin_ContentHandler_Class)) - { - NW_Plugin_ContentHandler_t* pluginContentHandler = NULL; - - // Pass the object box to the plugin content handler. - pluginContentHandler = (NW_Plugin_ContentHandler_t*) contentHandler; - pluginContentHandler->iContentHandler->SetObjectBox(*innerBox); - - // Removes the place holder which clears the box so the PluginInst - // can draw into it. - RemovePlaceHolder(*innerBox); - } - } - - // Otherwise set the place holder and request the object's info. - else - { - // If data or both content type and data are missing then this object - // is unsupported. - if (!data || (!contentType && !data)) - { - status = SetPlaceHolderText(*innerBox, R_XHTML_OBJECT_UNSUPPORTED); - NW_THROW_ON_ERROR(status); - } - - // Otherwise set the place holder text and fetch the object's info. - else - { - // Set the place holder text to "Select to Download" - status = SetPlaceHolderText(*innerBox, R_XHTML_OBJECT_SELECT_TO_DOWNLOAD); - NW_THROW_ON_ERROR(status); - - // Fetch the object's information if it hasn't already been validated. - // This occurs when a element handler is "resumed" from being previously - // "suspended". - - if (!iObjectInfoValidated) - { - // Errors are purposely ignored to allow the box-tree to be created even - // if information about an object can't be fetched. - - if (ObjectUtils::IsSupported(contentType, data, ObjectUtils::EHandlerPlugin) && - NW_Settings_GetImagesEnabled()) - { - // Set the place holder text to "Select to Download" - status = SetPlaceHolderText(*innerBox, R_XHTML_OBJECT_DOWNLOADING); - NW_THROW_ON_ERROR(status); - iObjectInfoValidated = ETrue; - ApplyInfoProperties(*iObjectBox); - LoadObjectResource(contentType, data, ObjectUtils::EHandlerPlugin); - } - else - { - (void) LoadObjectInfo(); - } - } - else - { - // Set the place holder text to "Unsupported" if the verified content-type - // isn't supported by a plugin or external-app. - if (!ObjectUtils::IsSupported(iContentType, NULL, ObjectUtils::EHandlerAny)) - { - status = SetPlaceHolderText(*iObjectBox, R_XHTML_OBJECT_UNSUPPORTED); - NW_THROW_ON_ERROR(status); - } - } - - } - } - - // TODO: If it is dealing with a object tag with a type but no data attribute then - // we need to do some funny things here. - // - // Create a buffer with the "inline" data (the param - // elements) and to make a normal load request. The request's url is of the form - // "buffer:url" where the data is provided in the POST body. The load is - // handled by a new scheme handler, the "buffer" handler. The handler would - // simply create a "response" that contains the buffer and some appropriate - // header values. The response is then handled as a normal plugin response -- - // meaning a CPluginContentHandler is created, etc. - } - - // Attach the active box to the provided parent box. - status = NW_LMgr_ContainerBox_AddChild(&aParentBox, objectBox); - _NW_THROW_ON_ERROR(status); - - // This is done to prevent a double delete now that parentBox owns innerBox. - tempBox = (NW_LMgr_Box_t*) objectBox; - objectBox = NULL; - - // Apply common attributes and styles, ignore non-out-of-memory errors. - // This includes the NW_CSS_Prop_elementId prop which is used by the Plugin content - // handler to find this box later on. - if (isImage) - { - status = NW_XHTML_ElementHandler_ApplyStyles(iElementHandler, iContentHandler, - iElementNode, &tempBox, NULL); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - else - { - status = NW_XHTML_ElementHandler_ApplyStyles(iElementHandler, iContentHandler, - iSelectedElementNode, &tempBox, NULL); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - - NW_CATCH (status) - { - if (safeToDeleteObjectBox) - { - NW_Object_Delete(objectBox); - } - NW_Object_Delete(eventHandler); - NW_Object_Delete(image); - } - - NW_FINALLY - { - delete contentType; - contentType = NULL; - - delete data; - data = NULL; - - return status; - } NW_END_TRY - */ - return status; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::ProcessEvent -// -// Processes events targeted at boxes created by the ElementHandler. -// ----------------------------------------------------------------------------- -// -NW_Uint8 CXHTMLObjectElementHandler::ProcessEvent(const NW_LMgr_Box_t& aBox, - const NW_Evt_Event_t& aEvent) - { - NW_HED_ContentHandler_t* pluginContentHandler = NULL; - TDesC* standby = NULL; - TDesC* type = NULL; - TDesC* url = NULL; - NW_Uint8 absorbed = NW_LMgr_EventNotAbsorbed; - const NW_Object_Class_t* eventClass = NULL; - NW_LMgr_Box_t* objectBox = NULL; - - NW_TRY (status) - { - // Let the associated content handler process it if one is available. - pluginContentHandler = AssociatedContentHandler(); - if (pluginContentHandler) - { - absorbed = NW_HED_DocumentNode_ProcessEvent(pluginContentHandler, - &aBox, &aEvent, NULL); - - if (absorbed == NW_LMgr_EventAbsorbed) - { - NW_THROW_SUCCESS(status); - } - } - - eventClass = NW_Object_Core_GetClass(&aEvent); - - // Just absorb focus events. - if (eventClass == &NW_Evt_FocusEvent_Class) - { - absorbed = NW_LMgr_EventAbsorbed; - } - - // Upon activation load the resource. - else if ((eventClass == &NW_Evt_OpenViewerEvent_Class) || - (eventClass == &NW_Evt_ActivateEvent_Class) || - (eventClass == &NW_Evt_AccessKeyEvent_Class)) - { - ObjectUtils::THandlerType handlerType = ObjectUtils::EHandlerAny; - NW_HED_DocumentRoot_t* docRoot = NULL; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( - iContentHandler); - - // Let Ecma script try to handle it first - //R->ecma - //status = NW_Ecma_HandleEvent(docRoot, iSelectedElementNode, iSelectedElementNode, - // NW_Ecma_Evt_OnClick); - if(status == KBrsrSuccess) - { - absorbed = NW_LMgr_EventAbsorbed; - NW_THROW_SUCCESS(status); - } - - // Get the CLMgrObjectBox associated with this event. - objectBox = CLMgrObjectBox::FindObjectBox(aBox); - //R->embed NW_ASSERT(objectBox != NULL); - NW_THROW_ON_NULL(objectBox, status, KBrsrUnexpectedError); - - // If download is in progress, don't start another download. - if (iIsDownloading) - { - absorbed = NW_LMgr_EventAbsorbed; - //R-embed TRAP(status, ObjectDialog::DisplayDownloadingErrorL( docRoot )); - NW_THROW_SUCCESS(status); - } - - // Get the resource's content-type from the CSS property. - // Its ok if GetTextProperty returns NULL. - type = CLMgrObjectBox::GetTextProperty(*objectBox, NW_CSS_Prop_contentType); - - // Get the resource's url - // Its ok if GetSrcAttribute fails. - (void) GetSrcAttribute(&url); - - // Show the Object Download dialog unless this is an OpenViewer event. - if (eventClass != &NW_Evt_OpenViewerEvent_Class) - { - NW_HED_AppServices_t* appServices = (NW_HED_AppServices_t*) - NW_HED_DocumentRoot_GetAppServices(docRoot); - - if (!appServices->objectDialog.ShowObjectDialog()) - { - // The user canceled the download so just absorb the event. - absorbed = NW_LMgr_EventAbsorbed; - NW_THROW_SUCCESS(status); - } - - // If the content can be handled by both an external app and plugin show a dialog - // to allow the user choose which to open it in. - //R->embed - /* - if (ObjectUtils::IsSupported(type, url, ObjectUtils::EHandlerPlugin) && - ObjectUtils::IsSupported(type, url, ObjectUtils::EHandlerExternalApp)) - { - TRAP(status, handlerType = ObjectDialog::SelectViewerL( docRoot )); - NW_THROW_ON_ERROR(status); - } - */ - } - - - // Otherwise its a is an OpenViewer event so the dialog isn't needed. - else - { - // Force it to open the resouce in an external application. - handlerType = ObjectUtils::EHandlerExternalApp; - } - - // Load the object's resource. - status = LoadObjectResource(type, url, handlerType); - NW_THROW_ON_ERROR(status); - - CLMgrObjectBox* theBox = NULL; - objectBox = CLMgrObjectBox::FindObjectBox(aBox); - if (objectBox) - { - theBox = NW_LMgr_ObjectBox_GetObjectBox(*objectBox); - } - if (!theBox || (theBox->IsShowingPlaceHolder())) - { - // Upon success set the place holder text to "Downloading Data" or the standby text. - status = GetAttribute(NW_XHTML_AttributeToken_standby, &standby); - - if (status == KBrsrSuccess) - { - status = SetPlaceHolderText(*objectBox, *standby); - NW_THROW_ON_ERROR(status); - - delete standby; - standby = NULL; - } - else - { - status = SetPlaceHolderText(*objectBox, R_XHTML_OBJECT_DOWNLOADING); - NW_THROW_ON_ERROR(status); - } - } - absorbed = NW_LMgr_EventAbsorbed; - } - - - // Otherwise ignore the event. - else - { - absorbed = NW_LMgr_EventNotAbsorbed; - } - } - - NW_CATCH (status) - { - absorbed = NW_LMgr_EventNotAbsorbed; - } - - NW_FINALLY - { - delete type; - delete url; - - return absorbed; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::ElementNode -// -// This is a special purpose method to get the element node -// associated with this handler. -// ----------------------------------------------------------------------------- -// -const NW_DOM_ElementNode_t* CXHTMLObjectElementHandler::ElementNode(void) const - { - return iElementNode; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::SelectedElementNode -// -// This is a special purpose method to get the "selected" element. -// See the comment on SelectElement. -// ----------------------------------------------------------------------------- -// -const NW_DOM_ElementNode_t* CXHTMLObjectElementHandler::SelectedElementNode(void) const - { - return iSelectedElementNode; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::ApplyInfoProperties -// -// Applies the content type and length properties on the given box. This is -// used in the download dialog box. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::ApplyInfoProperties(NW_LMgr_Box_t& aBox) - { - NW_Text_t* text = NULL; - NW_LMgr_Property_t prop; - - NW_TRY (status) - { - if (iContentType) - { - text = NW_Text_New(HTTP_iso_10646_ucs_2, (void*) iContentType->Ptr(), - iContentType->Length(), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(text, status); - - prop.type = NW_CSS_ValueType_Text; - prop.value.object = text; - status = NW_LMgr_Box_SetProperty(&aBox, NW_CSS_Prop_contentType, &prop); - NW_THROW_ON_ERROR(status); - - text = NULL; - } - - if (iContentLength) - { - text = NW_Text_New(HTTP_iso_10646_ucs_2, (void*) iContentLength->Ptr(), - iContentLength->Length(), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(text, status); - - prop.type = NW_CSS_ValueType_Text; - prop.value.object = text; - status = NW_LMgr_Box_SetProperty(&aBox, NW_CSS_Prop_contentLength, &prop); - NW_THROW_ON_ERROR(status); - - text = NULL; - } - } - - NW_CATCH (status) - { - NW_Object_Delete(text); - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::LoadObjectResource -// -// Loads the resource associated with object tag. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::LoadObjectResource(const TDesC* aType, - const TDesC* aUrl, ObjectUtils::THandlerType aHandlerType) - { - NW_Text_t* url = NULL; - NW_Uint8 loadType = NW_UrlRequest_Type_Any; - NW_Uint8 reason = NW_HED_UrlRequest_Reason_DocLoad; - void* context = NULL; - TUint16 transactionId; - - NW_TRY (status) - { - // Throw an not found error if aUrl is NULL. - NW_THROW_ON_NULL(aUrl, status, KBrsrNotFound); - - url = NW_Text_New(HTTP_iso_10646_ucs_2, (void*) aUrl->Ptr(), - aUrl->Length(), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL(url, status); - - // If aHandlerType is "any" determine the handler type by querying ObjectUtils. - // The querying order is significate (plugin, image, external). - /* //R->embed - if (aHandlerType == ObjectUtils::EHandlerAny) - { - if (ObjectUtils::IsSupported(aType, aUrl, ObjectUtils::EHandlerPlugin)) - { - aHandlerType = ObjectUtils::EHandlerPlugin; - } - else if (ObjectUtils::IsSupported(aType, aUrl, ObjectUtils::EHandlerImage)) - { - aHandlerType = ObjectUtils::EHandlerImage; - } - else if (ObjectUtils::IsSupported(aType, aUrl, ObjectUtils::EHandlerExternalApp)) - { - aHandlerType = ObjectUtils::EHandlerExternalApp; - } - } - */ - // The content can be handled by the internal image infrastructure so set up - // the load so the response is directed to a NW_LMgr_ImageCH_Epoc32ContentHandler. - if (aHandlerType == ObjectUtils::EHandlerImage) - { - iLoadedHandlerType = ObjectUtils::EHandlerImage; - loadType = NW_UrlRequest_Type_Image; - reason = NW_HED_UrlRequest_Reason_DocLoadChild; - context = STATIC_CAST(void*, iElementNode); - - status = NW_XHTML_ContentHandler_StartLoad_tId(iContentHandler, url, - reason, context, loadType, &transactionId); - NW_THROW_ON_ERROR(status); - } - - // The content can be handled by a plugin so set up the load so the response - // is directed to a CPluginContentHandler. - else if (aHandlerType == ObjectUtils::EHandlerPlugin) - { - iLoadedHandlerType = ObjectUtils::EHandlerPlugin; - loadType = NW_UrlRequest_Type_Plugin; - reason = NW_HED_UrlRequest_Reason_DocLoadChild; - context = STATIC_CAST(void*, iElementNode); - - status = NW_XHTML_ContentHandler_StartLoad_tId(iContentHandler, url, - reason, context, loadType, &transactionId); - NW_THROW_ON_ERROR(status); - } - - // The content can be handled by an external application so set up the load so the - // response is directed to the external app infrastructure. - else if (aHandlerType == ObjectUtils::EHandlerExternalApp) - { - iLoadedHandlerType = ObjectUtils::EHandlerExternalApp; - loadType = NW_UrlRequest_Type_Any; - reason = NW_HED_UrlRequest_Reason_DocLoad; - context = NULL; - - // create a new url header - TUint8* expectedContentType = NULL; - status = StringUtils::ConvertPtrUsc2ToAscii(TPtrC(*aType), &expectedContentType); - User::LeaveIfError(status); - CleanupStack::PushL(expectedContentType); -//R NW_Http_Header_t* header = UrlLoader_HeadersNew(NULL, NULL, -// NULL, NULL, 0, expectedContentType); - NW_Http_Header_t* header = NULL; - CleanupStack::PopAndDestroy(1); //expectedContentType - // create url request - NW_HED_UrlRequest_t* request; - - request = NW_HED_UrlRequest_New (NW_TextOf (url), NW_URL_METHOD_GET, header, - NULL, reason, NW_HED_UrlRequest_LoadNormal, - loadType); - - NW_THROW_OOM_ON_NULL (request, status); - - if (NW_XHTML_ContentHandler_IsSaveddeck(iContentHandler) && - NW_HED_UrlRequest_Reason_DocLoadChild == reason && - // Allow to load a plugin from a saved page, because the user explicitly requested it - loadType != NW_UrlRequest_Type_Plugin) - { - NW_HED_UrlRequest_SetCacheMode(request, NW_CACHE_ONLYCACHE); - } - - if (NW_XHTML_ContentHandler_IsHistoryLoad(iContentHandler) && - NW_HED_UrlRequest_Reason_DocLoadChild == reason) - { - NW_HED_UrlRequest_SetCacheMode(request, NW_CACHE_HISTPREV); - } - - /* pass it to StartRequest to be satisfied */ - status = NW_XHTML_ContentHandler_StartRequest_tId (iContentHandler, request, context, &transactionId); - NW_THROW_ON_ERROR (status); - } - // Otherwise don't load it - else - { - NW_THROW_SUCCESS(status); - } - - // Set this as the load observer - status = NW_XHTML_ContentHandler_SetLoadObserver(iContentHandler, transactionId, this); - iTransactionId = transactionId; - NW_THROW_ON_ERROR(status); - - iIsDownloading = ETrue; - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - NW_Object_Delete(url); - - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::LoadObjectInfo -// -// Loads the HEAD information of the resource associated with object tag. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::LoadObjectInfo(void) - { - NW_Text_UCS2_t url; - TDesC* urlDes = NULL; - - NW_TRY (status) - { - // Prevent network connections from "saved" pages. - if (NW_XHTML_ContentHandler_IsSaveddeck(iContentHandler)) - { - if (iContentType) - { - iObjectInfoValidated = ETrue; - ApplyInfoProperties(*iObjectBox); - } - NW_THROW_SUCCESS(status); - } - - // Extract the data attribute. - status = GetSrcAttribute(&urlDes); - NW_THROW_ON_ERROR(status); - - status = NW_Text_UCS2_Initialize(&url, (void*) urlDes->Ptr(), - urlDes->Length(), 0); - NW_THROW_ON_ERROR(status); - - // Start a HEAD request for the url. - TUint16 transactionId; - - status = NW_XHTML_ContentHandler_StartLoad_tId(iContentHandler, (NW_Text_t*) &url, - NW_HED_UrlRequest_Reason_DocLoadHead, NULL, NW_UrlRequest_Type_Plugin, &transactionId); - NW_THROW_ON_ERROR(status); - - // Set this as the load observer - status = NW_XHTML_ContentHandler_SetLoadObserver(iContentHandler, transactionId, this); - iTransactionId = transactionId; - NW_THROW_ON_ERROR(status); - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - delete urlDes; - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::AssociatedContentHandler -// -// Returns the associated content handler or NULL if one isn't found. -// ----------------------------------------------------------------------------- -// -NW_HED_ContentHandler_t* CXHTMLObjectElementHandler::AssociatedContentHandler(void) - { - NW_HED_CompositeNode_t* compositeNode = NULL; - - compositeNode = (NW_HED_CompositeNode_t*) NW_Object_QueryAggregate( - iContentHandler, &NW_HED_CompositeNode_Class); - - return (NW_HED_ContentHandler_t*) NW_HED_CompositeNode_LookupChild(compositeNode, - iElementNode); - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::SetPlaceHolderText -// -// Set the place-holder text to the given descriptor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::SetPlaceHolderText( - NW_LMgr_Box_t& aObjectBox, const TDesC& aPlaceHolderText) - { - CLMgrObjectBox* objectBox = NULL; - - // Set the place holder text. - objectBox = NW_LMgr_ObjectBox_GetObjectBox((NW_LMgr_ObjectBox_t&) aObjectBox); - NW_ASSERT(objectBox != NULL); - - TRAPD(err, objectBox->SetPlaceHolderTextL(aPlaceHolderText)); - return err; - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::SetPlaceHolderTextL -// -// Set the place-holder text to the given resource id. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::SetPlaceHolderText( - NW_LMgr_Box_t& aObjectBox, TInt aResourceId) - { - CLMgrObjectBox* objectBox = NULL; - - // Set the place holder text. - objectBox = NW_LMgr_ObjectBox_GetObjectBox((NW_LMgr_ObjectBox_t&) aObjectBox); - NW_ASSERT(objectBox != NULL); - - TRAPD(err, objectBox->SetPlaceHolderTextL(aResourceId)); - return(err); - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::RemovePlaceHolder -// -// Removes the place holder -- puts the ObjectBox in the active state. -// ----------------------------------------------------------------------------- -// -void CXHTMLObjectElementHandler::RemovePlaceHolder(NW_LMgr_Box_t& aObjectBox) - { - CLMgrObjectBox* objectBox; - - // Remove the place holder - objectBox = NW_LMgr_ObjectBox_GetObjectBox((NW_LMgr_ObjectBox_t&) aObjectBox); - NW_ASSERT(objectBox != NULL); - - objectBox->RemovePlaceHolder(); - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::SelectElement -// -// Embedded resources are specified in an xhtml document using the object tag. -// This tag can be very simple to quite complex. Below are a couple of examples. -// This method determines if iElementNode or one of its descendants can be selected -// and displayed. Once an element is selected it is stored in iSelectedElementNode. -// iSelectedElementNode is used in GetAttribute to extract attribute values from -// the selected element. -// -// Selects *** if type-a is supported. -// <object data="some-url" type="type-a" /> *** -// -// Selects *** if type-a isn't supported and type-b is. -// <object data="some-url" type="type-a"> -// <object data="some-other-url" type="type-b" /> *** -// </object> -// -// Selects *** if type-a, type-b, and type-c aren't supported. -// <object data="some-url" type="type-a"> -// <param name="name-a" value="value-a" /> -// <param name="name-b" value="value-b" /> -// <object data="some-other-url" type="type-b"> -// <object data="some-other-url" type="type-c"> -// <param name="name-a" value="value-a" /> -// <param name="name-b" value="value-b" /> -// <img src="some-other-url" /> *** -// </object> -// </object> -// </object> -// -// Selects *** if application/x-shockwave-flash is supported. -// <object> -// <embed src="stocksnapshot.swf" quality="high" salign="lt" bgcolor="#ffffff" -// width="785" height="550" name="construct" align="" -// type="application/x-shockwave-flash" /> *** -// </object> -// -// Selects *** if application/x-shockwave-flash is supported. -// <object data="stocksnapshot.swf" type="application/x-shockwave-flash"> *** -// <param name="movie" value="/images/flash/landing.swf?conf=/data/landing.xml" /> -// <param name="quality" value="high" /> -// <param name="salign" value="lt" /> -// <param name="bgcolor" value="#ffffff" /> -// <embed src="stocksnapshot.swf" quality="high" salign="lt" bgcolor="#ffffff" -// width="785" height="550" name="construct" align="" -// type="application/x-shockwave-flash" /> -// </object> -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::SelectElement(void) - { - NW_DOM_Node_t* node = NULL; - TDesC* type = NULL; - TDesC* data = NULL; - - NW_TRY (status) - { - // Start checking from iElementNode - node = iElementNode; - - while (node) - { - iSelectedElementNode = node; - - // Get the type and data attributes of this element. - (void) GetTypeAttribute(&type); - (void) GetSrcAttribute(&data); - - if (data) - { - // If it is supported then its done. - //R->embed - //if (ObjectUtils::IsSupported(type, data, ObjectUtils::EHandlerAny)) - // { - // NW_THROW_SUCCESS(status); - // } - } - - // Delete the type and data. - delete type; - type = NULL; - delete data; - data = NULL; - - // Find the first child that is either an object or embed. - NW_DOM_Node_t* childNode; - - childNode = NW_DOM_Node_getFirstChild(node); - node = NULL; - - while (childNode) - { - switch (NW_HED_DomHelper_GetElementToken(childNode)) - { - case NW_XHTML_ElementToken_object: - case NW_XHTML_ElementToken_embed: - node = childNode; - childNode = NULL; - break; - - default: - childNode = NW_DOM_Node_getNextSibling(childNode); - break; - } - } - } - - // None of the elements are supported. - // - // Note: iSelectedElementNode is not cleared because because the UI - // spec states that if none of the elements are supported then for - // the purpose of displaying the box it should use the last element. - } - - /* Not currently used... - NW_CATCH (status) - { - // In case of an error, just set iSelectedElementNode to iElementNode. - // This is probably the best state to be in if some problem occurs. - iSelectedElementNode = iElementNode; - } - */ - - NW_FINALLY - { - delete type; - delete data; - - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::GetAttribute -// -// Gets the value of the given attribute as a descriptor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::GetAttribute(TInt16 aToken, TDesC** aValue) - { - NW_Text_t* temp = NULL; - HBufC* value = NULL; - - NW_ASSERT(aValue != NULL); - NW_ASSERT(iSelectedElementNode != NULL); - - NW_TRY (status) - { - *aValue = NULL; - - // Get the attribute - status = NW_XHTML_GetDOMAttribute(iContentHandler, iSelectedElementNode, aToken, &temp); - _NW_THROW_ON_ERROR(status); - - // Copy the result into a TDes. - value = HBufC::New(temp->characterCount + 1); - NW_THROW_OOM_ON_NULL(value, status); - - value->Des().Append((const TUint16*) temp->storage, temp->characterCount); - value->Des().ZeroTerminate(); - } - - NW_CATCH (status) - { - delete value; - value = NULL; - } - - NW_FINALLY - { - NW_Object_Delete(temp); - - *aValue = value; - return status; - } NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::GetSrcAttribute -// -// Gets the value of the source attribute as a descriptor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::GetSrcAttribute(TDesC** aValue) - { - TDesC* value = NULL; - TInt16 token; - NW_Uint16 element; - - NW_ASSERT(aValue != NULL); - NW_ASSERT(iSelectedElementNode != NULL); - - NW_TRY (status) - { - *aValue = NULL; - - // If this isn't an embed or object tag, throw "no string". - element = NW_HED_DomHelper_GetElementToken(iSelectedElementNode); - if ((element != NW_XHTML_ElementToken_embed) && (element != NW_XHTML_ElementToken_object)) - { - NW_THROW_STATUS(status, KBrsrDomNoStringReturned); - } - - // Try each source variation, "data", "src" and "href". - token = 0; - for (int i = 0; i < 3; i++) - { - switch (token) - { - case NW_XHTML_AttributeToken_data: - token = NW_XHTML_AttributeToken_src; - break; - - case NW_XHTML_AttributeToken_src: - token = NW_XHTML_AttributeToken_href; - break; - - default: - token = NW_XHTML_AttributeToken_data; - break; - } - - // Retry the request with a new variant. - status = GetAttribute(token, &value); - if (status == KBrsrSuccess) - { - // Found a valid variant. - break; - } - } - - // If none of the source variations were found try using the object's - // param elements. - if (!value) - { - status = GetObjectAttributeMapSrc(&value); - _NW_THROW_ON_ERROR(status); - } - } - - NW_CATCH (status) - { - delete value; - value = NULL; - } - - NW_FINALLY - { - *aValue = value; - return status; - } NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::GetTypeAttribute -// -// Gets the value of the content-type attribute as a descriptor. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::GetTypeAttribute(TDesC** aValue) - { - TDesC* value = NULL; - TDesC* classId = NULL; - - NW_ASSERT(aValue != NULL); - NW_ASSERT(iSelectedElementNode != NULL); - - NW_TRY (status) - { - // Try to get the type from the attribute. - status = GetAttribute(NW_XHTML_AttributeToken_type, &value); - - // If not found try to derive it from the ClassId - /* //R->embed - if (status != KBrsrSuccess) - { - // Get the ClassId attribute - status = GetAttribute(NW_XHTML_AttributeToken_classid, &classId); - _NW_THROW_ON_ERROR(status); - - // Look up the cooresponding content-type - value = ObjectUtils::GetAssociatedContentType(*classId); - NW_THROW_ON_NULL(value, status, KBrsrDomNoStringReturned) - } - */ - } - - NW_CATCH (status) - { - delete value; - value = NULL; - } - - NW_FINALLY - { - delete classId; - classId = NULL; - - *aValue = value; - return status; - } NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::GetObjectAttributeMapSrc -// -// Gets the value of the source attribute by using the classId attribute, -// the cooresponding param element and the object attribute mappings table. -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode CXHTMLObjectElementHandler::GetObjectAttributeMapSrc(TDesC** aValue) - { - NW_Text_t* temp = NULL; - TDesC* classId = NULL; - TDesC* value = NULL; - TDesC* paramName = NULL; - - NW_ASSERT(aValue != NULL); - NW_ASSERT(iSelectedElementNode != NULL); - - NW_TRY (status) - { - *aValue = NULL; - - // If this isn't an object tag, throw "no string". - NW_Uint16 element; - - element = NW_HED_DomHelper_GetElementToken(iSelectedElementNode); - if (element != NW_XHTML_ElementToken_object) - { - //R->embed NW_THROW_STATUS(status, KBrsrDomNoStringReturned); - } - - // Get the ClassId attribute. - status = GetAttribute(NW_XHTML_AttributeToken_classid, &classId); - _NW_THROW_ON_ERROR(status); - - // Look up the cooresponding param name. -//R->embed paramName = ObjectUtils::GetAssociatedSourceParamName(*classId); - NW_THROW_OOM_ON_NULL(paramName, status); - - delete classId; - classId = NULL; - - // Search for an child param element with a "name" of srcParamName - // and copy its "value" attribute into value. - TPtrC16 paramNamePtr(*paramName); - NW_DOM_Node_t* paramElement; - NW_String_t nameValue; - - nameValue.storage = (NW_Byte *) paramNamePtr.Ptr(); - nameValue.length = paramNamePtr.Size() + sizeof(TInt16); - - paramElement = NW_HED_DomHelper_FindElement (&iContentHandler->domHelper, - iSelectedElementNode, 1, NW_XHTML_ElementToken_param, - NW_XHTML_AttributeToken_name, &nameValue); - - if (paramElement) - { - status = NW_XHTML_GetDOMAttribute(iContentHandler, paramElement, - NW_XHTML_AttributeToken_value, &temp); - _NW_THROW_ON_ERROR(status); - - // Copy the result into a TDes. - value = HBufC::New(temp->characterCount + 1); - NW_THROW_OOM_ON_NULL(value, status); - - ((HBufC*) value)->Des().Append((const TUint16*) temp->storage, temp->characterCount); - ((HBufC*) value)->Des().ZeroTerminate(); - - NW_Object_Delete(temp); - temp = NULL; - } - - // Otherwise value is left NULL... - - delete paramName; - paramName = NULL; - } - - NW_CATCH (status) - { - NW_Object_Delete(temp); - temp = NULL; - - delete classId; - classId = NULL; - - delete paramName; - paramName = NULL; - - delete value; - value = NULL; - } - - NW_FINALLY - { - *aValue = value; - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -// CXHTMLObjectElementHandler::InHyperLink -// -// Returns if the <object> element is enclosed within a hyperlink -// ----------------------------------------------------------------------------- -// -TBool CXHTMLObjectElementHandler::InHyperLink() - { - NW_DOM_ElementNode_t* node = iElementNode; - while (node != NULL && NW_HED_DomHelper_GetElementToken(node) != NW_XHTML_ElementToken_a) - { - node = NW_DOM_Node_getParentNode(node); - } - return (node != NULL); - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandlerOOC.cpp --- a/webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandlerOOC.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Element handler for object. This file contains two approaches to -* handle object tags, via the Netscape plugin interface and extern -* applications. -* -*/ - - -// INCLUDE FILES - -#include <e32std.h> - -#include "BrsrStatusCodes.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "XhtmlObjectElementHandlerOOCi.h" -#include "XhtmlObjectElementHandler.h" - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_ObjectElementHandler_CreateImpl(const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - TBrowserStatusCode status; - CXHTMLObjectElementHandler* handler = NULL; - - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - // Create the ObjectElementHandler instance - TRAPD(err, handler = CXHTMLObjectElementHandler::NewL(aElementHandler, - aContentHandler, aElementNode)); - - if (err != KErrNone) - { - return err; - } - - // Associate the handler with the aElementNode. - status = NW_XHTML_ContentHandler_SetElementHandlerInstance(aContentHandler, - aElementNode, handler); - - if (status != KBrsrSuccess) - { - delete handler; - } - - return status; - } - -/* ------------------------------------------------------------------------- */ -CXHTMLObjectElementHandler* -NW_XHTML_ObjectElementHandler_GetImpl(NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode) - { - CXHTMLObjectElementHandler* handler = NULL; - NW_DOM_Node_t* node = NULL; - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - node = aElementNode; - do - { - // Get the instance associated with the node - handler = (CXHTMLObjectElementHandler*) NW_XHTML_ContentHandler_GetElementHandlerInstance( - aContentHandler, node); - - if (handler == NULL) - { - node = NW_DOM_Node_getParentNode(node); - - // Disregard the parent unless its a object element. - if (node != NULL) - { - NW_Uint16 token; - - token = NW_HED_DomHelper_GetElementToken(node); - if (token != NW_XHTML_ElementToken_object) - { - node = NULL; - } - } - } - } while ((handler == NULL) && (node != NULL)); - - return handler; - } - -/* ------------------------------------------------------------------------- * - class definition -* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ObjectElementHandler_Class_t NW_XHTML_ObjectElementHandler_Class = -{ - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ObjectElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ObjectElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ObjectElementHandler_ProcessEvent - }, - { /* NW_XHTML_ObjectElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition -* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_ObjectElementHandler_t NW_XHTML_ObjectElementHandler = -{ - { { &NW_XHTML_ObjectElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods -* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ObjectElementHandler_Initialize (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(aElementHandler != NULL); - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - - // Create the ObjectElementHandler instance. - if (!NW_XHTML_ObjectElementHandler_GetImpl(aContentHandler, aElementNode)) - { - status = NW_XHTML_ObjectElementHandler_CreateImpl(aElementHandler, aContentHandler, - aElementNode); - - if (status != KBrsrSuccess) - { - return status; - } - } - - // Pass it on to the implementation - CXHTMLObjectElementHandler* imp; - - imp = NW_XHTML_ObjectElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->Initialize(); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ObjectElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_ContainerBox_t* parentBox) - { - NW_REQUIRED_PARAM(aElementHandler); - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(parentBox != NULL); - - // Pass it on to the implementation - CXHTMLObjectElementHandler* imp; - - imp = NW_XHTML_ObjectElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->CreateBoxTree(*parentBox); - } - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_XHTML_ObjectElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox, NW_Evt_Event_t* aEvent) - { - NW_REQUIRED_PARAM(aElementHandler); - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aBox != NULL); - NW_ASSERT(aEvent != NULL); - - // Pass it on to the implementation - CXHTMLObjectElementHandler* imp; - - imp = NW_XHTML_ObjectElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->ProcessEvent(*aBox, *aEvent); - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_ObjectElementHandler_ApplyInfoProperties (const NW_XHTML_ElementHandler_t* aElementHandler, - NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox) - { - NW_REQUIRED_PARAM(aElementHandler); - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aBox != NULL); - - // Pass it on to the implementation - CXHTMLObjectElementHandler* imp; - - imp = NW_XHTML_ObjectElementHandler_GetImpl(aContentHandler, aElementNode); - NW_ASSERT(imp != NULL); - - return imp->ApplyInfoProperties(*aBox); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/SaveToPhoneBkEvent.c --- a/webengine/wmlengine/src/xhtml/src/SaveToPhoneBkEvent.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_xhtml_savetophonebkeventi.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_SaveToPhoneBkEvent_Class_t NW_XHTML_SaveToPhoneBkEvent_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Evt_Event_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_SaveToPhoneBkEvent_t), - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Evt_Event */ - /* unused */ 0 - }, - { /* NW_XHTML_SaveToPhoneBkEvent */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - convenience functions - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_SaveToPhoneBkEvent_Initialize (NW_XHTML_SaveToPhoneBkEvent_t* event) -{ - return NW_Object_Initialize (&NW_XHTML_SaveToPhoneBkEvent_Class, event); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/MakeStructure --- a/webengine/wmlengine/src/xhtml/src/Structure/MakeStructure Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Copyright (c) 20012002. Nokia Mobile Phones -# -#---------------------------------------------------------------------------- - -MAKEFILE = MakeStructure -TARGET = rbTempest_xhtml_src_structure_lib.a - -SUBDIRS = - -SUBMAKES = - -OBJS = - -SRCS = titleElementHandler.c headElementHandler.c StructureModule.c - -################################################################################ - -include $(CORESW_MAKE_TEMPLATE) diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/XHTMLHeadElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/XHTMLHeadElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_structure_headelementhandleri.h" - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_headElementHandler_Class_t NW_XHTML_headElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_headElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_headElementHandler_t NW_XHTML_headElementHandler = { - { { &NW_XHTML_headElementHandler_Class } } -}; - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/XHTMLStructureModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/XHTMLStructureModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_structure_structuremodulei.h" - -#include "nw_structure_headelementhandler.h" -#include "nw_structure_titleelementhandler.h" -#include "nw_text_coretextelementhandler.h" -#include "nw_frame_framesetelementhandler.h" -#include "nw_ignore_ignoreelementhandler.h" -#include "nw_structure_scriptelementhandler.h" -#include "nw_structure_noscriptelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_StructureModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_body, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler }, - { NW_XHTML_ElementToken_head, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_headElementHandler }, - { NW_XHTML_ElementToken_html, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler }, - { NW_XHTML_ElementToken_title, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_titleElementHandler }, - { NW_XHTML_ElementToken_frameset, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_FramesetElementHandler }, - { NW_XHTML_ElementToken_noframes, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_IgnoreElementHandler }, - { NW_XHTML_ElementToken_noembed, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_IgnoreElementHandler }, - { NW_XHTML_ElementToken_noscript, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_IgnoreElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_StructureModule_Class_t NW_XHTML_StructureModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Structure), - /* elementHandlers */ _NW_XHTML_StructureModule_ElementHandlers, - }, - { /* NW_XHTML_StructureModule */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_StructureModule_t NW_XHTML_StructureModule = { - {&NW_XHTML_StructureModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/XHTMLTitleElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/XHTMLTitleElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_structure_titleelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_text_ucs2.h" -#include "nw_dom_text.h" -#include <nwx_string.h> -#include "BrsrStatusCodes.h" -#include "MemoryManager.h" - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_titleElementHandler_Class_t NW_XHTML_titleElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_titleElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_titleElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_titleElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_titleElementHandler_t NW_XHTML_titleElementHandler = { - { { &NW_XHTML_titleElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_titleElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_DOM_Node_t* childNode; - NW_Text_t* title = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (elementHandler, - &NW_XHTML_ElementHandler_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, - &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (elementNode != NULL); - - - NW_TRY (status) { - - childNode = NW_DOM_Node_getFirstChild(elementNode); - NW_THROW_ON_NULL(childNode, status, KBrsrSuccess); - - if (NW_DOM_Node_getNodeType(childNode) == NW_DOM_TEXT_NODE) { - NW_Ucs2* storage; - NW_Text_Length_t length; - NW_Bool freeNeeded; - NW_Text_Length_t trimmedLen; - NW_Text_Length_t i; - - title = NW_XHTML_GetDOMTextNodeData(contentHandler, childNode); - NW_THROW_OOM_ON_NULL (title, status); - - storage = - NW_Text_GetUCS2Buffer (title, NW_Text_Flags_NullTerminated | - NW_Text_Flags_CompressWhitespace, - &length, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - - /*If there are &nbsp's in the title, convert them into spaces*/ - /* Trim the string */ - trimmedLen = 0; - for (i = 0; i < length; i++) { - if ((storage[i] == NW_TEXT_UCS2_TAB) || (storage[i] == NW_TEXT_UCS2_NBSP)) { - storage[trimmedLen++] = ' '; - } - else { - storage[trimmedLen++] = storage[i]; - } - } - storage[trimmedLen] = 0; - - - - if (freeNeeded) { - NW_Object_Delete (title); - title = (NW_Text_t*) - NW_Text_UCS2_New (storage, length, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL (title, status); - } - - /* set the contentHandler's title */ - (void) NW_XHTML_ContentHandler_SetTitle(contentHandler, title); - - status = NW_XHTML_ElementHandler_Class.NW_XHTML_ElementHandler. - initialize (elementHandler, contentHandler, elementNode); - } - } - - NW_CATCH (status) { - NW_Object_Delete(title); - (void) NW_XHTML_ContentHandler_SetTitle(contentHandler, NULL); - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_titleElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - NW_REQUIRED_PARAM(parentBox); - - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/noscriptElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/noscriptElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_structure_noscriptelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nwx_settings.h" - -#include "BrsrStatusCodes.h" - - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_noscriptElementHandler_Class_t NW_XHTML_noscriptElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_noscriptElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_noscriptElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_noscriptElementHandler_t NW_XHTML_noscriptElementHandler = { - { { &NW_XHTML_noscriptElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_noscriptElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - - NW_REQUIRED_PARAM(elementHandler); - - /* if the the prev script element is supported , the <noscript> elements and all its - children should not be initialized - */ - if(NW_Settings_GetEcmaScriptEnabled() && contentHandler->ignoreNoScriptElement) - { - contentHandler->skipToNode = elementNode; - } - return KBrsrSuccess; - -} - -/* ------------------------------------------------------------------------- */ - - - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Structure/scriptElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/scriptElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,661 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// INCLUDE FILES -#include <e32std.h> -#include <e32base.h> - -#include <nwx_string.h> -// User Includes -#include "ecmadll.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_basictables_trelementhandler.h" -#include "nw_basictables_captionelementhandler.h" -#include "nw_basictables_rowgroupelementhandler.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_basicforms_formelementhandler.h" -#include "nw_structure_scriptelementhandler.h" -#include "nwx_settings.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "nw_basicforms_inputelementhandler.h" -#include "nw_structure_scriptelementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" -#include "nw_htmlp_to_wbxml.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_text_ucs2.h" -#include "nw_dom_text.h" -#include "nw_dom_domvisitor.h" -#include "nw_tinydom.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" - -#include <f32file.h> -#include <flogger.h> - -#include <stddef.h> -#include <stdio.h> - -#include <nwx_string.h> -#include "nw_ecma_contenthandler.h" -#include "nw_lmgr_textbox.h" -#include "nwx_http_defs.h" - -#include "nwx_logger.h" -_LIT(KScriptLanguage, "javascript"); -_LIT(KScriptType1, "text/javascript"); -_LIT(KScriptType2, "text/ecmascript"); -_LIT(KScriptType3, "application/x-javascript"); - -/* ------------------------------------------------------------------- */ -// returns KBrsrSuccess if the language is supported -// returns KBrsrNotImplemented if the language is not supported -static -TBrowserStatusCode -NW_XHTML_isScriptLanguageSupported(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_Text_t* language = NULL; - NW_Ucs2* langPtr = NULL; - - - /* if language is either NULL or starts with javascript then process the script - else ignore the script tag*/ - TInt status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_language, &language); - if (status == KBrsrSuccess ) - { - //if the language attr is not found then the default is javascript - // if the language attr is not NULL and starts with 'javascript' then process the script tag - if (NW_Text_GetCharCount(language) >= (TUint)KScriptLanguage().Length()) - { - langPtr = NW_Text_GetUCS2Buffer (language, NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - if (langPtr) - { - TPtr languageDes(langPtr, KScriptLanguage().Length(), KScriptLanguage().Length()); - languageDes.LowerCase(); - if (languageDes.Compare(KScriptLanguage)) // if not equal - { - status = KBrsrNotImplemented; - } - } - else - { - status = KBrsrOutOfMemory; - } - } - else - { - status = KBrsrNotImplemented; - } - } - //if the language attr is not found then the default language type is javascript - if (status == KBrsrNotFound) - { - status = KBrsrSuccess ; - } - - if (language ) - { - NW_Object_Delete (language ); - } - if (langPtr ) - { - NW_Mem_Free(langPtr ); - } - return status ; - } - -/* ------------------------------------------------------------------- */ -// returns KBrsrSuccess if the script is supported -static -TBrowserStatusCode -NW_XHTML_isScriptContentSupported(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_Text_t* scriptType = NULL; - NW_Ucs2* scriptTypePtr = NULL; - NW_Text_Length_t scriptTypePtrLen ; - - // if the script type is either text/javascrip or text/ecmascript then the script is - // is supported . If script type is not available then check for the language attr. - TInt status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_type, &scriptType); - if (status == KBrsrSuccess ) - { - scriptTypePtr = NW_Text_GetUCS2Buffer (scriptType, NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - &scriptTypePtrLen , NULL); - if (scriptTypePtr) - { - TPtr scriptTypeDes(scriptTypePtr , scriptTypePtrLen, scriptTypePtrLen); - scriptTypeDes.LowerCase(); - // check if scriptType is either "text/javascript" or "text/ecmascript" - if (scriptTypeDes.Compare(KScriptType1) && scriptTypeDes.Compare(KScriptType2) && scriptTypeDes.Compare(KScriptType3) ) - { - // change the byte order , sometimes NW_XHTML_GetDOMAttribute gets in bigendian or little endian - unpredicable - NW_Uint16 c_ucs2; - NW_Uint32 i = 0; - NW_Byte* data = (NW_Byte*)scriptTypePtr; - for (i = 0; i < 2*scriptTypePtrLen; i += 2) - { - /* this is a clever trick: pick up bytes in big endian order, - force the result to memory via taking address of result which - will put the 16-bits into native byte order, then copy the - result over the original bytes */ - c_ucs2 = (NW_Uint16)((data[i] << 8) | data[i + 1]); - (void)NW_Mem_memcpy(data + i, &c_ucs2, sizeof(NW_Uint16)); - } - if (scriptTypeDes.Compare(KScriptType1) && scriptTypeDes.Compare(KScriptType2) && scriptTypeDes.Compare(KScriptType3) ) - { - status = KBrsrNotImplemented; - } - } - } - else - { - status = KBrsrOutOfMemory; - } - } - //if the script type is not found then check for the language attribute - if (status == KBrsrNotFound ) - { - status = NW_XHTML_isScriptLanguageSupported(contentHandler, elementNode); - } - if (scriptType ) - { - NW_Object_Delete (scriptType ); - } - if (scriptTypePtr ) - { - NW_Mem_Free(scriptTypePtr ); - } - return status ; - } -/* ------------------------------------------------------------------- */ -// returns KBrsrSuccess if OK, returns KBrsrOutOfMemory if OOM - -static -TBrowserStatusCode -NW_XHTML_ExecuteScript (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_Ecma_ContentHandler_t** retEcmaCH) - { - NW_DOM_Node_t* childNode; - NW_Text_t* script = NULL; - NW_Ecma_ContentHandler_t* ecmaCH = NULL; - NW_Ucs2* scriptUcs2 = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (elementHandler, - &NW_XHTML_ElementHandler_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, - &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (elementNode != NULL); - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY (status) - { - if(contentHandler->iScriptIsResumed ) - { - NW_HED_CompositeNode_t* compositeNode; - NW_HED_ContentHandler_t* ch = NULL; - /* get the associated content handler if any */ - compositeNode = (NW_HED_CompositeNode_t*) - NW_Object_QueryAggregate (contentHandler, &NW_HED_CompositeNode_Class); - NW_ASSERT (compositeNode != NULL); - ch = (NW_HED_ContentHandler_t*) NW_HED_CompositeNode_LookupChild (compositeNode, elementNode); - //R->ecma *retEcmaCH= NW_Ecma_ContentHandlerOf(ch); - status = KBrsrSuccess; - } - else - { - NW_LOG0( NW_LOG_OFF, "NW_XHTML_scriptElementHandler_ExecuteScript Updated" ); - - childNode = NW_DOM_Node_getFirstChild(elementNode); - NW_THROW_ON_NULL(childNode, status, KBrsrSuccess); - - if (NW_DOM_Node_getNodeType(childNode) == NW_DOM_TEXT_NODE) - { - NW_Text_Length_t length; - - script = NW_XHTML_GetDOMTextNodeData(contentHandler, childNode); - NW_THROW_OOM_ON_NULL (script, status); - - length = NW_Text_GetCharCount(script); - - if (length > 1) - { - - scriptUcs2= - NW_Text_GetUCS2Buffer (script, NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - NW_THROW_OOM_ON_NULL (scriptUcs2, status); - NW_Object_Delete(script); - script = NULL; - - // quick fix: ecma content handler sometimes is constructed twice on the same element node - // due to a bug in the xhtmlcontent handler lastInitializedDomNode vs. prevInitializedDomNode case. - // this is just to prevent the double init (memory leak). The proper fix would be to change the xhtmch but - // as the error scenario cannot be reproduced anymore, I can neither debug it nor fix it. - NW_HED_CompositeNode_t* compositeNode; - - compositeNode = (NW_HED_CompositeNode_t*) - (NW_Object_QueryAggregate( NW_HED_DocumentNodeOf(contentHandler), &NW_HED_CompositeNode_Class)); - NW_ASSERT( compositeNode != NULL ); - // create new ecma content handler unless xhtml content handler already has it - if( !NW_HED_CompositeNode_LookupChild( compositeNode, elementNode ) ) - { - //R->ecma - //ecmaCH = NW_Ecma_ContentHandler_New(NW_HED_DocumentNodeOf(contentHandler), NULL, elementNode); - NW_THROW_OOM_ON_NULL (ecmaCH, status); - ecmaCH->script = scriptUcs2; - scriptUcs2 = NULL; //the ownership of the pointer is now ecmaCH - *retEcmaCH = ecmaCH; - status = NW_HED_DocumentNode_Initialize (NW_HED_DocumentNodeOf(ecmaCH), KBrsrSuccess); - NW_THROW_ON_ERROR(status); - status = NW_HED_CompositeContentHandler_AddChild( NW_HED_CompositeContentHandlerOf( contentHandler), - NW_HED_DocumentNodeOf( ecmaCH), elementNode); - NW_THROW_ON_ERROR(status); - } - } - } - } - } - NW_CATCH (status) - { - NW_Object_Delete(script); - } - NW_FINALLY { - return status; - } NW_END_TRY - - } -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_scriptElementHandler_Class_t NW_XHTML_scriptElementHandler_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_scriptElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_scriptElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_scriptElementHandler */ - /* unused */ 0 - } - }; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_scriptElementHandler_t NW_XHTML_scriptElementHandler = - { - { - { - &NW_XHTML_scriptElementHandler_Class - } - } - }; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_scriptElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_Text_t* url = NULL; - (void) elementHandler; - NW_LOG0( NW_LOG_OFF, "NW_XHTML_scriptElementHandler_ExecuteScript Udpar" ); - - NW_TRY (status) - { - if (!NW_Settings_GetEcmaScriptEnabled()) - { - NW_THROW_SUCCESS (status); - } - - // special handling if script is the last node of the chunk: - // leave it to be processed in the next chunk - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_TRUE)) - { - NW_THROW_SUCCESS (status); - } - - status = NW_XHTML_isScriptContentSupported(contentHandler, elementNode); - if (status != KBrsrSuccess) - { - - // must render content inside <noscript> whenever one of the - // following conditions is true: - // 1) scripting is disabled - // 2) scripting was not included in the build - // 3) an unsupported <script> type "e.g. "VBScript" was - // encountered (subsequent, but not previous, <noscript>'s must be rendered). - - if (status == KBrsrNotImplemented) - { - contentHandler->ignoreNoScriptElement = NW_TRUE; - status = KBrsrSuccess; - } - NW_THROW (status); - } - - - contentHandler->ignoreNoScriptElement = NW_TRUE; - /* find the 'src' attribute and get its string value */ - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_src, &url); - - if (status == KBrsrNotFound) - { - status = KBrsrSuccess; - } - else - { - if (url) - { - TExternalScriptNode scriptNodeId ; - - NW_Uint16 aTransationId = 0; - /* load the script*/ - status = NW_XHTML_ContentHandler_StartLoad_tId (contentHandler, - url, NW_HED_UrlRequest_Reason_DocLoadChild, elementNode, NW_UrlRequest_Type_JavaScript, &aTransationId); - scriptNodeId.iScriptNode = elementNode; - scriptNodeId.iTransactionId= aTransationId ; - // if the document load is complete , it is not necessary to track the script - // load as all the inline scripts are processed. The external script load request - // can take its sweet load time to load and process. - if ( status == KBrsrSuccess && !contentHandler->scriptLoadComplete) - { - status = NW_XHTML_ContentHandler_AddToPendingScriptTids(contentHandler, scriptNodeId); - } - - /* cleanup after ourselves */ - NW_Object_Delete (url); - } - else - { - status = KBrsrOutOfMemory; - } - } - } - NW_CATCH (status) - {} - NW_FINALLY - { - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_scriptElementHandler_ExecuteScript (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox, - NW_Bool* aBoxTreeUpdated) - { - NW_Ecma_ContentHandler_t* ecmaCH = NULL; - NW_LMgr_ContainerBox_t *placeHolderBox = NULL; - NW_XHTML_Script_Node_Context_t* scriptNodeContext = NULL; - NW_LOG0( NW_LOG_OFF, "NW_XHTML_scriptElementHandler_ExecuteScript START" ); - - NW_TRY (status) - { - // set ecma script flag on. This flag must be set back to false - // right after the script finished -at the end of this function - // so pay attention to it if you introduce any new !!!return!!!! - contentHandler->iScriptIsExecuted = NW_TRUE; - - // if the script is not supported return - if (!NW_Settings_GetEcmaScriptEnabled()) - { - NW_THROW_SUCCESS (status); - } - - // special handling if script is the last node of the chunk: - // leave it to be processed in the next chunk - if (!NW_XHTML_ElementHandler_NextSiblingExists (contentHandler, elementNode, NW_FALSE)) - { - NW_THROW_SUCCESS (status); - } - - status = NW_XHTML_isScriptContentSupported(contentHandler, elementNode); - NW_THROW_ON (status, KBrsrOutOfMemory ); - - if (status != KBrsrSuccess) - { - - // must render content inside <noscript> whenever one of the - // following conditions is true: - // 1) scripting is disabled - // 2) scripting was not included in the build - // 3) an unsupported <script> type "e.g. "VBScript" was - // encountered (subsequent, but not previous, <noscript>'s must be rendered). - - if (status == KBrsrNotImplemented) - { - contentHandler->ignoreNoScriptElement = NW_FALSE; - } - NW_THROW_SUCCESS (status); - } - - contentHandler->ignoreNoScriptElement = NW_TRUE; - - // if there any external scripts load requests pending , then we do not want to - // process script nodes with inline scripts . We suspend the box tree creating until - // the external scripts are loaded. - // if there are external script load requests pending - if (NW_XHTML_ContentHandler_IsScriptLoadPending(contentHandler, elementNode)) - { - // find the 'src' attribute and get its string value - status = NW_HED_DomHelper_HasAttribute(elementNode, NW_XHTML_AttributeToken_src); - // if the src is not present then the script element is assumed to be inline script - if (status == KBrsrNotFound) - { - // a node context that contains the script node and the placehoder box - scriptNodeContext = new NW_XHTML_Script_Node_Context_t; - NW_THROW_OOM_ON_NULL(scriptNodeContext, status); - - // create a placeholder container box for the script. - placeHolderBox = NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL(placeHolderBox, status); - // add the box to the box tree - status = NW_LMgr_ContainerBox_AddChild (parentBox, (NW_LMgr_Box_t*)placeHolderBox); - _NW_THROW_ON_ERROR (status); - - // add the script node to a pending list , the list is processed after the - // document load is complete - RPointerArray<NW_XHTML_Script_Node_Context_t>* scriptNodeList = STATIC_CAST(RPointerArray<NW_XHTML_Script_Node_Context_t>*, - contentHandler->scriptNodes); - scriptNodeContext->box = (NW_LMgr_Box_t*)placeHolderBox; - scriptNodeContext->scriptNode = elementNode; - TInt err= scriptNodeList->Append(scriptNodeContext); - - // placeHolderBox is part of boxtree set it to NULL - placeHolderBox = NULL; - - if(err != KErrNone) - { - if(err == KErrNoMemory) - { - NW_THROW_STATUS (status, KBrsrOutOfMemory); - } - else - { - NW_THROW_STATUS (status, KBrsrFailure); - } - } - // set scriptNodeContext NULL 'coz scriptNodeList has to taken - // the ownership of the objects - scriptNodeContext = NULL; - } - // ignore any other error - NW_THROW_ON (status, KBrsrOutOfMemory ); - status = KBrsrSuccess; - } - else - { - status = NW_XHTML_ExecuteScript(elementHandler, contentHandler, elementNode, &ecmaCH); - NW_THROW_ON (status, KBrsrOutOfMemory ); - if (ecmaCH != NULL) - { - // if there any document write's , create a subtree - // and attach the tree to the box tree that is the inprocess - // of creation - if (ecmaCH->documentWriteText) - { - NW_Buffer_t* domBuffer; - NW_Uint32 line; - NW_Buffer_t docBuf; - - TInt len = sizeof(TText) * NW_Str_Strlen(ecmaCH->documentWriteText); - docBuf.length = len; - docBuf.allocatedLength = len; - docBuf.data = (NW_Byte*)ecmaCH->documentWriteText; - - /* flip the byte order to network byte order, required by cXML */ - NW_XHTML_ElementHandler_Ucs2NativeToNetworkByteOrder(len, docBuf.data); - - - status = NW_HTMLP_HtmlToWbxml (&docBuf, HTTP_iso_10646_ucs_2, - NW_BYTEORDER_BIG_ENDIAN, - &domBuffer, &line, NW_xhtml_1_0_PublicId, - NW_HTMLP_Get_ElementTableCount(), - NW_HTMLP_Get_ElementDescriptionTable(), - NW_FALSE, NW_FALSE, - NULL, NULL, - NW_TRUE); - if (status == KBrsrOutOfMemory) - { - // free the buffer - NW_THROW (KBrsrOutOfMemory); - } - if (BRSR_STAT_IS_SUCCESS(status)) - { - ecmaCH->domTree = NW_HED_DomTree_New (domBuffer, HTTP_iso_10646_ucs_2, - NW_xhtml_1_0_PublicId,NULL); - if (ecmaCH->domTree ) - { - NW_cXML_DOM_DOMVisitor_t* domVisitor = NULL; - NW_DOM_Node_t* domNode; - domVisitor = NW_cXML_DOM_DOMVisitor_New (NW_HED_DomTree_GetRootNode (ecmaCH->domTree )); - if (!domVisitor) - { - // free the buffer - NW_THROW (KBrsrOutOfMemory); - } - while ((domNode = NW_cXML_DOM_DOMVisitor_Next (domVisitor, - NW_DOM_ELEMENT_NODE | - NW_DOM_TEXT_NODE | - NW_DOM_PROCESSING_INSTRUCTION_NODE)) - != NULL) - { - const NW_XHTML_ElementHandler_t * childElementHandler; - - /* get the ElementHandler for the element - if there is no ElementHandler, - we must ignore the element and continue our traversal */ - childElementHandler = - NW_XHTML_ContentHandler_GetElementHandler (contentHandler, - (NW_DOM_ElementNode_t*) domNode); - - if (childElementHandler == NULL) - { - continue; - } - - /* initialize the element*/ - status = - NW_XHTML_ElementHandler_Initialize (childElementHandler, - contentHandler, - (NW_DOM_ElementNode_t*) domNode); - } - - - /* create the child BoxTree, invoke super class method */ - status = - _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, - (NW_HED_DomTree_GetRootNode (ecmaCH->domTree )), (NW_LMgr_ContainerBox_t*)parentBox); - - if(aBoxTreeUpdated) - { - *aBoxTreeUpdated = NW_TRUE; - } - NW_Object_Delete (domVisitor); - } - else - { - // dom tree failed to create, - // free dombuffer since it is not ownedby - // dom tree - NW_LOG0(NW_LOG_LEVEL1, "NW_XHTML_scriptElementHandler_ExecuteScript: BadContent: ecmaCH->domTree NULL"); - status = KBrsrXhtmlBadContent; - NW_Buffer_Free(domBuffer); - } - } - else - { - NW_LOG0(NW_LOG_LEVEL1, "NW_XHTML_scriptElementHandler_ExecuteScript: BadContent: status NOT SUCCESS"); - status = KBrsrXhtmlBadContent; - } - } - } - } - } - NW_CATCH (status) - { - NW_Object_Delete(placeHolderBox); - delete scriptNodeContext; - } - NW_FINALLY - { - // set ecma script flag off - contentHandler->iScriptIsExecuted = NW_FALSE; - NW_LOG0( NW_LOG_OFF, "NW_XHTML_scriptElementHandler_ExecuteScript End" ); - return status; - } - NW_END_TRY - } - -TBrowserStatusCode -_NW_XHTML_scriptElementHandler_CreateBoxTree(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) - { - return NW_XHTML_scriptElementHandler_ExecuteScript(elementHandler,contentHandler, - elementNode,parentBox,NULL/*box tree updated*/); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_style_styleelementhandleri.h" - -#include "nw_link_linkelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_styleElementHandler_Class_t NW_XHTML_styleElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_styleElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_styleElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_StyleElementHandler */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_styleElementHandler_t NW_XHTML_styleElementHandler = { - { { &NW_XHTML_styleElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_styleElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_Uint32 encoding; - NW_CSS_Processor_t* processor; - NW_Uint32 length; - NW_String_t str; - NW_Bool doNotDelete = NW_TRUE; - NW_Bool deleteBuffer = NW_TRUE;; - NW_DOM_ElementNode_t* firstChild = NULL; - NW_Ucs2* media = NULL; - - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY (status) - { - // Get the media attribute. - status = NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, NW_XHTML_AttributeToken_media, &media); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if (media != NULL) - { - NW_Bool allowable; - NW_Bool isHandheld; - - // Ignore if this isn't an allowable style. - allowable = NW_XHTML_ContentHandler_AllowableStylesheet(media, &isHandheld); - if (!allowable) - { - NW_THROW_SUCCESS(status); - } - - // If a "handheld" stylesheet is found switch to mobile profile mode. - if (isHandheld) - { - NW_XHTML_ContentHandler_EnableMobileProfileMode(contentHandler); - } - } - - // Get the element's body. - firstChild = NW_DOM_Node_getFirstChild(elementNode); - NW_THROW_ON_NULL(firstChild, status, KBrsrUnexpectedError); - - status = NW_HED_DomHelper_GetText (&(contentHandler->domHelper), - firstChild, NW_TRUE, &str, &encoding); - _NW_THROW_ON_ERROR(status); - - // Process the CSS - processor = NW_XHTML_ContentHandler_CreateCSSProcessor(contentHandler); - NW_THROW_ON_NULL(processor, status, KBrsrUnexpectedError); - - length = NW_String_getByteCount(&str); - if (NW_String_getUserOwnsStorage(&str) == NW_TRUE) - { - doNotDelete = NW_FALSE; - } - - status = NW_CSS_Processor_ProcessBuffer(processor, - (NW_Byte*)(str.storage), length, encoding, doNotDelete); - _NW_THROW_ON_ERROR(status); - - deleteBuffer = NW_FALSE; - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - if (deleteBuffer == NW_TRUE) - { - NW_String_deleteStorage(&str); - } - - NW_Str_Delete(media); - - return status; - } NW_END_TRY - } -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_styleElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) - { - NW_REQUIRED_PARAM(elementHandler); - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - NW_REQUIRED_PARAM(parentBox); - - - return KBrsrSuccess; - } - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_style_stylemodulei.h" - -#include "nw_style_styleelementhandler.h" - -/* ------------------------------------------------------------------------- */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_StyleModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_style, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_styleElementHandler } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_StyleModule_Class_t NW_XHTML_StyleModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Markup_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_Markup_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Style), - /* elementHandlers */ _NW_XHTML_StyleModule_ElementHandlers, - }, - { /* NW_XHTML_StyleModule */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_StyleModule_t NW_XHTML_StyleModule = { - {&NW_XHTML_StyleModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/TextModule.c --- a/webengine/wmlengine/src/xhtml/src/Text/TextModule.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_textmodulei.h" - - -#include "nw_text_brelementhandler.h" -#include "nw_text_hrelementhandler.h" -#include "nw_text_qelementhandler.h" -#include "nw_text_coretextelementhandler.h" - -/* The center and font elements are specific to i-Mode HTML */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_TextModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_abbr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* abbr */}, - { NW_XHTML_ElementToken_acronym, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* acronym */}, - { NW_XHTML_ElementToken_address, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* address */}, - { NW_XHTML_ElementToken_blockquote, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blockquote */}, - { NW_XHTML_ElementToken_br, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_brElementHandler /* br */ }, - { NW_XHTML_ElementToken_blink, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blink */}, - { NW_XHTML_ElementToken_center, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* center */}, - { NW_XHTML_ElementToken_cite, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* cite */}, - { NW_XHTML_ElementToken_code, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* code */}, - { NW_XHTML_ElementToken_dfn, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dfn */}, - { NW_XHTML_ElementToken_dir, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dir */}, - { NW_XHTML_ElementToken_div, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* div */}, - { NW_XHTML_ElementToken_em, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* em */}, - { NW_XHTML_ElementToken_font, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* font */}, - { NW_XHTML_ElementToken_h1, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h1 */}, - { NW_XHTML_ElementToken_h2, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h2 */}, - { NW_XHTML_ElementToken_h3, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h3 */}, - { NW_XHTML_ElementToken_h4, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h4 */}, - { NW_XHTML_ElementToken_h5, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h5 */}, - { NW_XHTML_ElementToken_h6, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h6 */}, - { NW_XHTML_ElementToken_hr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_hrElementHandler /* hr */}, - { NW_XHTML_ElementToken_b, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* b */}, - { NW_XHTML_ElementToken_big, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* big */}, - { NW_XHTML_ElementToken_i, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* i */}, - { NW_XHTML_ElementToken_menu, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* menu */}, - { NW_XHTML_ElementToken_nobr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* nobr */}, - { NW_XHTML_ElementToken_noscript, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* noscript */}, - { NW_XHTML_ElementToken_small, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* small */}, - { NW_XHTML_ElementToken_script, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* script */}, - { NW_XHTML_ElementToken_u, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* u */}, - { NW_XHTML_ElementToken_kbd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* kbd */}, - { NW_XHTML_ElementToken_p, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* p */}, - { NW_XHTML_ElementToken_pre, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* pre */}, - { NW_XHTML_ElementToken_q, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_qElementHandler /* q */}, - { NW_XHTML_ElementToken_samp, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* samp */}, - { NW_XHTML_ElementToken_span, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* span */}, - { NW_XHTML_ElementToken_strong, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strong */}, - { NW_XHTML_ElementToken_var, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* var */}, - { NW_XHTML_ElementToken_dl, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dl */}, - { NW_XHTML_ElementToken_dt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dt */}, - { NW_XHTML_ElementToken_dd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dd */}, - { NW_XHTML_ElementToken_ul, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ul */}, - { NW_XHTML_ElementToken_ol, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ol */}, - { NW_XHTML_ElementToken_li, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* li */}, - { NW_XHTML_ElementToken_fieldset, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* fieldset*/}, - { NW_XHTML_ElementToken_marquee, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* marquee */}, - { NW_XHTML_ElementToken_tt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* tt */}, - { NW_XHTML_ElementToken_sub, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sub */}, - { NW_XHTML_ElementToken_sup, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sup */}, - { NW_XHTML_ElementToken_ins, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ins */}, - { NW_XHTML_ElementToken_del, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* del */}, - { NW_XHTML_ElementToken_strike, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strike */}, - { NW_XHTML_ElementToken_s, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* s */}, -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TextModule_Class_t NW_XHTML_TextModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_XHTML_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_XHTML_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Text), - /* elementHandlers */ _NW_XHTML_TextModule_ElementHandlers, - }, - { /* NW_XHTML_TextModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TextModule_t NW_XHTML_TextModule = { - {&NW_XHTML_TextModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLBrElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLBrElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_brelementhandleri.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "BrsrStatusCodes.h" - -/* GENERATED */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_brElementHandler_Class_t NW_XHTML_brElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_brElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_brElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_brElementHandler_t NW_XHTML_brElementHandler = { - { { &NW_XHTML_brElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - * A break translates into two boxes in the box tree, an inline EmptyBox - * placed at the end of the previous line, and a 0-height block box placed - * immediately afterward. The inline box is required for the cases when - * there are several consecutive break elements in the source: without - * the extra box these would not result in additional whitespace. - */ -TBrowserStatusCode -_NW_XHTML_brElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t* breakBox = NULL; - - NW_TRY (status) - { - NW_REQUIRED_PARAM(contentHandler); - NW_REQUIRED_PARAM(elementNode); - - /* Create the break box */ - breakBox = (NW_LMgr_Box_t*)NW_LMgr_BreakBox_New ((NW_ADT_Vector_Metric_t)1); - NW_THROW_OOM_ON_NULL (breakBox, status); - - status = NW_LMgr_ContainerBox_AddChild (parentBox, breakBox); - _NW_THROW_ON_ERROR(status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &breakBox, 0); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - NW_CATCH (status) - { - NW_Object_Delete (breakBox); - } NW_FINALLY - { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLCoreTextElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLCoreTextElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_coretextelementhandleri.h" -#include "nw_hed_documentroot.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_lmgr_textbox.h" -#include "nw_lmgr_breakbox.h" -#include "nw_lmgr_nobrbox.h" -#include "nw_lmgr_marqueebox.h" -#include "BrsrStatusCodes.h" - - - - - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_CoreTextElementHandler_Class_t NW_XHTML_CoreTextElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_CoreTextElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_Text_CoreTextElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_CoreTextElementHandler_t NW_XHTML_CoreTextElementHandler = { - { { &NW_XHTML_CoreTextElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_CoreTextElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t *box = NULL; - - NW_TRY (status ) - { - if(NW_HED_DomHelper_GetElementToken (elementNode) != NW_XHTML_ElementToken_nobr) - { - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - } - else - { - box = (NW_LMgr_Box_t*)NW_LMgr_NobrBox_New(0); - } - NW_THROW_OOM_ON_NULL (box, status); - - /* Add the box to the tree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - /* if the display is none, remove the containerBox from the tree and return successfully */ - if(NW_XHTML_ElementToken_body == NW_HED_DomHelper_GetElementToken (elementNode)) - { - /* - Both frameset element and body elements should not belong in the same HTML - page. However, if both body and frameset do appear in the same page we will handle - which ever one comes first. For example if the body tag appears before the frameset - tag, we will handle the body tag, but ignore the frameset tag (and its contents) - So in this case, since we are handling the body tag first, set ignoreFrameset to TRUE - */ - contentHandler->ignoreFramesetElement = NW_TRUE; - } - - // No special fieldset handling required. CSS properties will define border etc. - /* fieldset handling */ - // if(NW_XHTML_ElementToken_fieldset == NW_HED_DomHelper_GetElementToken (elementNode)) - // { - // status = NW_XHTML_CoreTextElementHandler_HandleFieldSet(contentHandler, elementNode, (NW_LMgr_ContainerBox_t*)box); - // _NW_THROW_ON_ERROR (status); - // } - - parentBox = NW_LMgr_ContainerBoxOf(box); - - /* invoke our superclass for completion */ - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - NW_THROW_ON (status, KBrsrOutOfMemory); - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - } - NW_FINALLY { - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLHrElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLHrElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_hrelementhandleri.h" - -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" -#include "nw_lmgr_rulebox.h" -#include "NW_Text_Abstract.h" -#include "nw_dom_domvisitor.h" -#include "nwx_string.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - local constants - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_hrElementHandler_Class_t NW_XHTML_hrElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_hrElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_hrElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_hrElementHandler_t NW_XHTML_hrElementHandler = { - { { &NW_XHTML_hrElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_hrElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_RuleBox_t *ruleBox = NULL; - NW_LMgr_Box_t *box = NULL; - TBrowserStatusCode getPropStatus; - NW_LMgr_Property_t Prop; - NW_Bool zeroSize = NW_FALSE; - - NW_TRY (status) - { - ruleBox = NW_LMgr_RuleBox_New (); - NW_THROW_OOM_ON_NULL (ruleBox, status); - - box = NW_LMgr_BoxOf(ruleBox); - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &box, 0); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if( !box ) - { - NW_THROW_SUCCESS( status ); - } - /* If either width is zero, or height is zero, rule will not be displayed. - * This is the best place to deal with this, because we can still - * completely remove this block element from the tree. - * (Attempting to remove it in lmgr will not remove newlines). - */ - getPropStatus = NW_LMgr_Box_GetRawProperty(box, NW_CSS_Prop_width, &Prop); - if (getPropStatus == KBrsrSuccess) { - if ((Prop.type == NW_CSS_ValueType_Px && Prop.value.integer == 0) || - (Prop.type == NW_CSS_ValueType_Percentage && Prop.value.decimal == 0)) - zeroSize = NW_TRUE; - } - getPropStatus = NW_LMgr_Box_GetRawProperty(box, NW_CSS_Prop_height, &Prop); - if (getPropStatus == KBrsrSuccess) { - if (Prop.value.integer == 0) - zeroSize = NW_TRUE; - } - - if (zeroSize) { - status = NW_LMgr_ContainerBox_RemoveChild (parentBox, box); - if (status == KBrsrSuccess) { - NW_Object_Delete(box); - } - } - } - NW_CATCH (status) - { - if (box) - { - NW_Object_Delete (box); - } - } - NW_FINALLY - { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLQElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLQElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_qelementhandleri.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_textbox.h" -#include "nw_text_ucs2.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "BrsrStatusCodes.h" - - - -/* ------------------------------------------------------------------------- */ -static -NW_LMgr_Box_t* -NW_XHTML_qElementHandler_NewQuoteBox (NW_Text_t* quoteText) -{ - NW_LMgr_Box_t* box = NULL; - - if (quoteText != NULL) { - box = (NW_LMgr_Box_t*) NW_LMgr_TextBox_New(1, NW_TextOf (quoteText)); - } - return box; -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_qElementHandler_Class_t NW_XHTML_qElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_qElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_Text_qElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_qElementHandler_t NW_XHTML_qElementHandler = { - { { &NW_XHTML_qElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_qElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_LMgr_Box_t *box = NULL; - NW_LMgr_PropertyValue_t quoteVal; - NW_LMgr_Box_t* qBox1 = NULL; - NW_LMgr_Box_t* qBox2 = NULL; - NW_Text_t* quoteText = NULL; - NW_Text_t* openQuote = NULL; - NW_Text_t* closeQuote = NULL; - NW_Bool freeNeeded = NW_FALSE; - - NW_TRY (status) - { - box = (NW_LMgr_Box_t*)NW_LMgr_ContainerBox_New(0); - NW_THROW_OOM_ON_NULL (box, status); - - /* Add the box to the tree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, box); - _NW_THROW_ON_ERROR (status); - - /* apply common attributes and styles */ - status = NW_XHTML_ElementHandler_ApplyStyles (elementHandler, contentHandler, - elementNode, &box, NULL); - NW_THROW_ON (status, KBrsrOutOfMemory); - - // Apply Styles will take care of replacing container box if display was block, list-item or marquee. - // In case of 'display:none' or an error it removes the container box. That's why we check box - if (box == NULL) - { - NW_THROW_SUCCESS (status); - } - - parentBox = NW_LMgr_ContainerBoxOf(box); - - /* Get the quote string */ - quoteVal.object = NULL; - status = NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_imodeQuotes, - NW_CSS_ValueType_Text, &quoteVal); - NW_THROW_ON (status, KBrsrOutOfMemory); - - quoteText = (NW_Text_t*)quoteVal.object; - if (quoteText == NULL) - { - NW_Ucs2* quoteStr = NW_Str_New(2); - NW_THROW_OOM_ON_NULL (quoteStr, status); - quoteStr[0] = '\"'; - quoteStr[1] = '\"'; - quoteText = (NW_Text_t*)NW_Text_UCS2_New(quoteStr, 2, 0); - freeNeeded = NW_TRUE; - NW_THROW_OOM_ON_NULL (quoteText, status); - } - - openQuote = NW_Text_Copy(quoteText, 0); - NW_THROW_OOM_ON_NULL (openQuote, status); - - closeQuote = NW_Text_Split(openQuote, 1); - NW_THROW_OOM_ON_NULL (closeQuote, status); - - qBox1 = NW_XHTML_qElementHandler_NewQuoteBox(openQuote); - NW_THROW_OOM_ON_NULL (qBox1, status); - - qBox2 = NW_XHTML_qElementHandler_NewQuoteBox(closeQuote); - NW_THROW_OOM_ON_NULL (qBox2, status); - - /* add a quote-box before the boxtree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, qBox1); - _NW_THROW_ON_ERROR (status); - - /* add the boxtree */ - status = _NW_XHTML_ElementHandler_CreateBoxTree(elementHandler, contentHandler, elementNode, parentBox); - _NW_THROW_ON_ERROR (status); - - /* add a quote-box after the boxtree */ - status = NW_LMgr_ContainerBox_AddChild (parentBox, qBox2); - _NW_THROW_ON_ERROR (status); - - } - NW_CATCH (status) - { - if(box) - { - NW_Object_Delete(box); - } - if (openQuote) - { - NW_Object_Delete (openQuote); - } - if (closeQuote) - { - NW_Object_Delete (closeQuote); - } - if (qBox1) - { - NW_Object_Delete (qBox1); - } - if (qBox2) - { - NW_Object_Delete (qBox2); - } - } - NW_FINALLY - { - if (freeNeeded) - { - NW_Object_Delete(quoteText); - } - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_textmodulei.h" - - -#include "nw_text_brelementhandler.h" -#include "nw_text_hrelementhandler.h" -#include "nw_text_qelementhandler.h" -#include "nw_text_coretextelementhandler.h" - -/* The center and font elements are specific to i-Mode HTML */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_TextModule_ElementHandlers[] = { - { NW_XHTML_ElementToken_abbr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* abbr */}, - { NW_XHTML_ElementToken_acronym, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* acronym */}, - { NW_XHTML_ElementToken_address, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* address */}, - { NW_XHTML_ElementToken_blockquote, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blockquote */}, - { NW_XHTML_ElementToken_br, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_brElementHandler /* br */ }, - { NW_XHTML_ElementToken_blink, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blink */}, - { NW_XHTML_ElementToken_center, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* center */}, - { NW_XHTML_ElementToken_cite, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* cite */}, - { NW_XHTML_ElementToken_code, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* code */}, - { NW_XHTML_ElementToken_dfn, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dfn */}, - { NW_XHTML_ElementToken_dir, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dir */}, - { NW_XHTML_ElementToken_div, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* div */}, - { NW_XHTML_ElementToken_em, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* em */}, - { NW_XHTML_ElementToken_font, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* font */}, - { NW_XHTML_ElementToken_h1, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h1 */}, - { NW_XHTML_ElementToken_h2, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h2 */}, - { NW_XHTML_ElementToken_h3, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h3 */}, - { NW_XHTML_ElementToken_h4, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h4 */}, - { NW_XHTML_ElementToken_h5, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h5 */}, - { NW_XHTML_ElementToken_h6, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h6 */}, - { NW_XHTML_ElementToken_hr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_hrElementHandler /* hr */}, - { NW_XHTML_ElementToken_b, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* b */}, - { NW_XHTML_ElementToken_big, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* big */}, - { NW_XHTML_ElementToken_i, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* i */}, - { NW_XHTML_ElementToken_menu, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* menu */}, - { NW_XHTML_ElementToken_nobr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* nobr */}, - { NW_XHTML_ElementToken_noscript, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* noscript */}, - { NW_XHTML_ElementToken_small, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* small */}, - { NW_XHTML_ElementToken_script, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* script */}, - { NW_XHTML_ElementToken_u, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* u */}, - { NW_XHTML_ElementToken_kbd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* kbd */}, - { NW_XHTML_ElementToken_p, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* p */}, - { NW_XHTML_ElementToken_plaintext, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* plaintext */}, - { NW_XHTML_ElementToken_pre, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* pre */}, - { NW_XHTML_ElementToken_q, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_qElementHandler /* q */}, - { NW_XHTML_ElementToken_samp, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* samp */}, - { NW_XHTML_ElementToken_span, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* span */}, - { NW_XHTML_ElementToken_strong, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strong */}, - { NW_XHTML_ElementToken_var, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* var */}, - { NW_XHTML_ElementToken_dl, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dl */}, - { NW_XHTML_ElementToken_dt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dt */}, - { NW_XHTML_ElementToken_dd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dd */}, - { NW_XHTML_ElementToken_ul, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ul */}, - { NW_XHTML_ElementToken_ol, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ol */}, - { NW_XHTML_ElementToken_li, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* li */}, - { NW_XHTML_ElementToken_fieldset, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* fieldset*/}, - { NW_XHTML_ElementToken_marquee, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* marquee */}, - { NW_XHTML_ElementToken_tt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* tt */}, - { NW_XHTML_ElementToken_sub, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sub */}, - { NW_XHTML_ElementToken_sup, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sup */}, - { NW_XHTML_ElementToken_ins, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ins */}, - { NW_XHTML_ElementToken_del, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* del */}, - { NW_XHTML_ElementToken_strike, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strike */}, - { NW_XHTML_ElementToken_s, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* s */}, -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TextModule_Class_t NW_XHTML_TextModule_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_XHTML_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_XHTML_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Text), - /* elementHandlers */ _NW_XHTML_TextModule_ElementHandlers, - }, - { /* NW_XHTML_TextModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TextModule_t NW_XHTML_TextModule = { - {&NW_XHTML_TextModule_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule1.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule1.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_textmodule1i.h" - - -#include "nw_text_brelementhandler.h" -#include "nw_text_hrelementhandler.h" -#include "nw_text_qelementhandler.h" -#include "nw_text_coretextelementhandler.h" - -/* The center and font elements are specific to i-Mode HTML */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_Text1Module_ElementHandlers[] = { - { NW_XHTML_ElementToken_div, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* div */}, - { NW_XHTML_ElementToken_font, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* font */}, - { NW_XHTML_ElementToken_h1, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h1 */}, - { NW_XHTML_ElementToken_h2, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h2 */}, - { NW_XHTML_ElementToken_h3, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h3 */}, - { NW_XHTML_ElementToken_h4, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h4 */}, - { NW_XHTML_ElementToken_h5, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h5 */}, - { NW_XHTML_ElementToken_hr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_hrElementHandler /* hr */}, - { NW_XHTML_ElementToken_b, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* b */}, - { NW_XHTML_ElementToken_big, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* big */}, - { NW_XHTML_ElementToken_i, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* i */}, - { NW_XHTML_ElementToken_menu, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* menu */}, - { NW_XHTML_ElementToken_span, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* span */}, - { NW_XHTML_ElementToken_p, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* p */}, - { NW_XHTML_ElementToken_center, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* center */}, - { NW_XHTML_ElementToken_dl, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dl */}, - { NW_XHTML_ElementToken_dt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dt */}, - { NW_XHTML_ElementToken_dd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dd */}, - { NW_XHTML_ElementToken_ul, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ul */}, - { NW_XHTML_ElementToken_ol, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ol */}, - { NW_XHTML_ElementToken_li, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* li */}, - { NW_XHTML_ElementToken_br, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_brElementHandler /* br */ }, - { NW_XHTML_ElementToken_nobr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* nobr */} -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TextModule1_Class_t NW_XHTML_TextModule1_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_XHTML_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_XHTML_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Text1), - /* elementHandlers */ _NW_XHTML_Text1Module_ElementHandlers, - }, - { /* NW_XHTML_TextModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TextModule1_t NW_XHTML_TextModule1 = { - {&NW_XHTML_TextModule1_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule2.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLTextModule2.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_text_textmodule2.h" - - -#include "nw_text_brelementhandler.h" -#include "nw_text_hrelementhandler.h" -#include "nw_text_qelementhandler.h" -#include "nw_text_coretextelementhandler.h" - -/* The center and font elements are specific to i-Mode HTML */ -static const -NW_Markup_WBXMLModule_ElementHandlerEntry_t _NW_XHTML_Text2Module_ElementHandlers[] = { - { NW_XHTML_ElementToken_h6, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* h6 */}, - { NW_XHTML_ElementToken_em, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* em */}, - { NW_XHTML_ElementToken_fieldset, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* fieldset*/}, - { NW_XHTML_ElementToken_marquee, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* marquee */}, - { NW_XHTML_ElementToken_dir, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dir */}, - { NW_XHTML_ElementToken_small, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* small */}, - { NW_XHTML_ElementToken_plaintext, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* plaintext */}, - { NW_XHTML_ElementToken_pre, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* pre */}, - { NW_XHTML_ElementToken_abbr, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* abbr */}, - { NW_XHTML_ElementToken_acronym, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* acronym */}, - { NW_XHTML_ElementToken_address, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* address */}, - { NW_XHTML_ElementToken_blockquote, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blockquote */}, - { NW_XHTML_ElementToken_blink, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* blink */}, - { NW_XHTML_ElementToken_cite, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* cite */}, - { NW_XHTML_ElementToken_code, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* code */}, - { NW_XHTML_ElementToken_dfn, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* dfn */}, - { NW_XHTML_ElementToken_u, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* u */}, - { NW_XHTML_ElementToken_kbd, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* kbd */}, - { NW_XHTML_ElementToken_q, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_qElementHandler /* q */}, - { NW_XHTML_ElementToken_samp, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* samp */}, - { NW_XHTML_ElementToken_strong, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strong */}, - { NW_XHTML_ElementToken_var, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* var */}, - { NW_XHTML_ElementToken_tt, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* tt */}, - { NW_XHTML_ElementToken_sub, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sub */}, - { NW_XHTML_ElementToken_sup, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* sup */}, - { NW_XHTML_ElementToken_ins, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* ins */}, - { NW_XHTML_ElementToken_del, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* del */}, - { NW_XHTML_ElementToken_strike, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* strike */}, - { NW_XHTML_ElementToken_s, (struct NW_Markup_ElementHandler_s*) &NW_XHTML_CoreTextElementHandler /* s */} -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TextModule2_Class_t NW_XHTML_TextModule2_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_WBXMLModule_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_XHTML_Module */ - /* getElementHandler */ _NW_Markup_WBXMLModule_GetElementHandler - }, - { /* NW_XHTML_WBXMLModule */ - /* numElementHandlers */ NW_MARKUP_NUM_ELEMENT_HANDLERS (XHTML_Text2), - /* elementHandlers */ _NW_XHTML_Text2Module_ElementHandlers, - }, - { /* NW_XHTML_TextModule */ - /* unused */ 0 - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TextModule2_t NW_XHTML_TextModule2 = { - {&NW_XHTML_TextModule2_Class}, -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/Variables.c --- a/webengine/wmlengine/src/xhtml/src/Variables.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_xhtml_variablesi.h" - -#include "nw_adt_segmentedvector.h" -#include <nwx_string.h> -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_Variables_ReplaceValue (NW_XHTML_Variables_Entry_t* entry, - const NW_Text_t* value) -{ - NW_Ucs2* newValue; - - /* parameter assertions */ - NW_ASSERT (entry != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (value, &NW_Text_Abstract_Class)); - - /* get the storage for the value and create a copy */ - newValue = NW_Text_GetUCS2Buffer (value, - NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - - /* free the old value and set the new */ - NW_Mem_Free (entry->value); - entry->value = newValue; - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -NW_ADT_Vector_Metric_t -NW_XHTML_Variables_Lookup (const NW_XHTML_Variables_t* thisObj, - const NW_Ucs2* name) -{ - NW_ADT_Vector_Metric_t index; - NW_ADT_Vector_Metric_t start; - NW_ADT_Vector_Metric_t end; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_Variables_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (name, &NW_Text_Abstract_Class)); - - /* look for the entry using a binary search algorithm */ - index = 0; - start = 0; - end = (NW_ADT_Vector_Metric_t) - (NW_ADT_Vector_GetSize (thisObj->vector) - 1); - while (end >= start) { - NW_XHTML_Variables_Entry_t* entry; - NW_Int32 match; - - index = (NW_ADT_Vector_Metric_t) ((end + start) / 2); - - entry = (NW_XHTML_Variables_Entry_t*) - NW_ADT_Vector_ElementAt (thisObj->vector, index); - match = NW_Str_Strcmp (name, entry->name); - - if (!match) { - return index; - } else if (match > 0) { - start = (NW_ADT_Vector_Metric_t) (index + 1); - } else if (match < 0) { - end = (NW_ADT_Vector_Metric_t) (index - 1); - } - } - - /* we didn't find the entry we were looking for, but we return the index of - the position at which it would have been */ - return index; -} - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_Variables_Class_t NW_XHTML_Variables_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Dynamic_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NULL - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_Variables_t), - /* construct */ _NW_XHTML_Variables_Construct, - /* destruct */ _NW_XHTML_Variables_Destruct - }, - { /* NW_XHTML_Variables */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_Variables_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) -{ - NW_XHTML_Variables_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_XHTML_Variables_Class)); - NW_ASSERT (argp != NULL); - - /* avoid 'unreferenced formal parameter' warnings */ - NW_REQUIRED_PARAM (argp); - - /* for convenience */ - thisObj = NW_XHTML_VariablesOf (dynamicObject); - - /* allocate the vector */ - thisObj->vector = (NW_ADT_DynamicVector_t*) - NW_ADT_SegmentedVector_New (sizeof (NW_XHTML_Variables_Entry_t), 16); - if (thisObj->vector == NULL) { - return KBrsrOutOfMemory; - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -void -_NW_XHTML_Variables_Destruct (NW_Object_Dynamic_t* dynamicObject) -{ - NW_XHTML_Variables_t* thisObj; - - /* parameter assertions */ - NW_ASSERT (dynamicObject != NULL); - NW_ASSERT (NW_Object_IsInstanceOf (dynamicObject, &NW_XHTML_Variables_Class)); - - /* for convenience */ - thisObj = NW_XHTML_VariablesOf (dynamicObject); - - /* deallocate our dynamic data */ - NW_Object_Delete (thisObj->vector); -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_Variables_Set (NW_XHTML_Variables_t* thisObj, - const NW_Text_t* name, - const NW_Text_t* value) -{ - const NW_Ucs2* storage; - NW_ADT_Vector_Metric_t index; - NW_XHTML_Variables_Entry_t* entry; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_Variables_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (name, &NW_Text_Abstract_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (value, &NW_Text_Abstract_Class)); - - /* convert the supplied name to Unicode and get its storage */ - storage = NW_Text_GetUCS2Buffer (name, - NW_Text_Flags_Aligned | NW_Text_Flags_Copy, - NULL, NULL); - if (storage == NULL) { - return KBrsrFailure; - } - - /* find the entry in the list that either matches name or is the place to - put name using whatever sort/search algorithm in place */ - index = NW_XHTML_Variables_Lookup (thisObj, storage); - entry = (NW_XHTML_Variables_Entry_t*) - NW_ADT_Vector_ElementAt (thisObj->vector, index); - if (entry == NULL) { - NW_Mem_Free ((NW_Ucs2*) storage); - return KBrsrFailure; - } - - /* if the names dont match, we'll have to create a new entry */ - if (NW_Str_Strcmp (entry->name, storage)) { - /* insert a blank entry into the vector */ - entry = (NW_XHTML_Variables_Entry_t*) - NW_ADT_DynamicVector_InsertAt (thisObj->vector, NULL, - index); - if (entry == NULL) { - NW_Mem_Free ((NW_Ucs2*) storage); - return KBrsrOutOfMemory; - } - - /* create a new copy of the name and put it into the entry */ - entry->name = (NW_Ucs2*) storage; - storage = NULL; - } - - /* clean up the temporary text object (if we have one) */ - NW_Mem_Free ((NW_Ucs2*) storage); - - /* finally insert the value into the entry */ - return NW_XHTML_Variables_ReplaceValue (entry, value); -} - -/* ------------------------------------------------------------------------- */ -NW_Text_t* -NW_XHTML_Variables_Get (const NW_XHTML_Variables_t* thisObj, - const NW_Text_t* name) -{ - const NW_Ucs2* storage; - NW_Uint8 freeNeeded; - NW_ADT_Vector_Metric_t index; - NW_XHTML_Variables_Entry_t* entry; - NW_Text_UCS2_t* value; - - /* parameter assertions */ - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_Variables_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (name, &NW_Text_Abstract_Class)); - - /* convert the supplied name to Unicode and get its storage */ - storage = - NW_Text_GetUCS2Buffer (name, NW_Text_Flags_Aligned, NULL, &freeNeeded); - if (storage == NULL) { - return NULL; - } - - /* find the entry in the list that either matches name or is the place to - put name using whatever sort/search algorithm in place */ - index = NW_XHTML_Variables_Lookup (thisObj, storage); - entry = (NW_XHTML_Variables_Entry_t*) - NW_ADT_Vector_ElementAt (thisObj->vector, index); - if (entry == NULL) { - if (freeNeeded) { - NW_Mem_Free ((NW_Ucs2*) storage); - } - return NULL; - } - - /* if we find a match, create a text object to wrap it */ - value = NULL; - - if (!NW_Str_Strcmp (entry->name, storage)) { - value = - NW_Text_UCS2_New (NW_Str_Newcpy (entry->value), 0, NW_Text_Flags_TakeOwnership); - } - - /* clean up after us */ - if (freeNeeded) { - NW_Mem_Free ((NW_Ucs2*) storage); - } - - /* return the value */ - return NW_TextOf (value); -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLAttributePropertyTable.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLAttributePropertyTable.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1979 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nwx_string.h" -#include "nwx_settings.h" -#include "BrsrStatusCodes.h" -#include "nw_dom_node.h" -#include "nw_css_tokentoint.h" -#include "nw_lmgr_cssproperties.h" -#include "nw_lmgr_propertylist.h" -#include "nw_lmgr_accesskey.h" -#include "LMgrObjectBoxOOC.h" -#include "nw_lmgr_statictablebox.h" -#include "nw_lmgr_statictablecellbox.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_animatedimagebox.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_fbox_inputbox.h" -#include "nw_xhtml_attributepropertytablei.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -//#include "XhtmlObjectElementHandlerOOC.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_hed_domhelper.h" -#include "HEDDocumentListener.h" -#include "GDIDevicecontext.h" -#include "CSSImageList.h" - -/* ------------------------------------------------------------------------- */ - -#define ASCII_HASH '#' -/*#define ASCII_DOT '.'*/ -#define ASCII_COMMA ',' -#define ASCII_PERCENT '%' -#define ASCII_RIGHT_PARENTHESIS ')' - -static const NW_Ucs2 Submit[] = {'S','u','b','m','i','t','\0'}; - -static const NW_Ucs2 PropVal_none[] = {'n','o','n','e','\0'}; -static const NW_Ucs2 PropVal_1[] = {'1','\0'}; -static const NW_Ucs2 PropVal_a[] = {'a','\0'}; -static const NW_Ucs2 PropVal_A[] = {'A','\0'}; -static const NW_Ucs2 PropVal_i[] = {'i','\0'}; -static const NW_Ucs2 PropVal_I[] = {'I','\0'}; -static const NW_Ucs2 PropVal_all[] = {'a','l','l','\0'}; -static const NW_Ucs2 PropVal_bottom[] = {'b','o','t','t','o','m','\0'}; -static const NW_Ucs2 PropVal_center[] = {'c','e','n','t','e','r','\0'}; -static const NW_Ucs2 PropVal_left[] = {'l','e','f','t','\0'}; -static const NW_Ucs2 PropVal_middle[] = {'m','i','d','d','l','e','\0'}; -static const NW_Ucs2 PropVal_right[] = {'r','i','g','h','t','\0'}; -static const NW_Ucs2 PropVal_top[] = {'t','o','p','\0'}; -static const NW_Ucs2 PropVal_scroll[] = {'s','c','r','o','l','l','\0'}; -static const NW_Ucs2 PropVal_slide[] = {'s','l','i','d','e','\0'}; -static const NW_Ucs2 PropVal_alternate[] = {'a','l','t','e','r','n','a','t','e','\0'}; -static const NW_Ucs2 PropVal_noshade[] = {'n','o','s','h','a','d','e','\0'}; -static const NW_Ucs2 PropVal_fixed[] = {'f','i','x','e','d','\0'}; - -/* color vals */ -static const NW_Ucs2 PropVal_aqua[] = {'a','q','u','a','\0'}; -static const NW_Ucs2 PropVal_black[] = {'b','l','a','c','k','\0'}; -static const NW_Ucs2 PropVal_blue[] = {'b','l','u','e','\0'}; -static const NW_Ucs2 PropVal_cyan[] = {'c','y','a','n','\0'}; -static const NW_Ucs2 PropVal_fuchsia[] = {'f','u','c','h','s','i','a','\0'}; -static const NW_Ucs2 PropVal_gray[] = {'g','r','a','y','\0'}; -static const NW_Ucs2 PropVal_green[] = {'g','r','e','e','n','\0'}; -static const NW_Ucs2 PropVal_lime[] = {'l','i','m','e','\0'}; -static const NW_Ucs2 PropVal_maroon[] = {'m','a','r','o','o','n','\0'}; -static const NW_Ucs2 PropVal_navy[] = {'n','a','v','y','\0'}; -static const NW_Ucs2 PropVal_olive[] = {'o','l','i','v','e','\0'}; -static const NW_Ucs2 PropVal_pink[] = {'p','i','n','k','\0'}; -static const NW_Ucs2 PropVal_purple[] = {'p','u','r','p','l','e','\0'}; -static const NW_Ucs2 PropVal_red[] = {'r','e','d','\0'}; -static const NW_Ucs2 PropVal_silver[] = {'s','i','l','v','e','r','\0'}; -static const NW_Ucs2 PropVal_teal[] = {'t','e','a','l','\0'}; -static const NW_Ucs2 PropVal_white[] = {'w','h','i','t','e','\0'}; -static const NW_Ucs2 PropVal_yellow[] = {'y','e','l','l','o','w','\0'}; -static const NW_Ucs2 PropVal_transparent[] = {'t','r','a','n','s','p','a','r','e','n','t','\0'}; -static const NW_Ucs2 PropVal_disc[] = {'d','i','s','c','\0'}; -static const NW_Ucs2 PropVal_square[] = {'s','q','u','a','r','e','\0'}; -static const NW_Ucs2 PropVal_circle[] = {'c','i','r','c','l','e','\0'}; -static const NW_Ucs2 PropVal_infinite[] = {'i','n','f','i','n','i','t','e','\0'}; - -static const NW_Ucs2 rgb[] = {'r','g','b','(','\0'}; - -static const NW_Ucs2 PropVal_ltr[] = {'l','t','r','\0'}; -static const NW_Ucs2 PropVal_rtl[] = {'r','t','l','\0'}; - -static const NW_Ucs2 PropVal_nowrap[] = {'n','o','w','r','a','p','\0'}; - - -static const NW_Ucs2 PropVal_hiragana[] = {'h','i','r','a','g','a','n','a','\0'}; -static const NW_Ucs2 PropVal_katakana[] = {'k','a','t','a','k','a','n','a','\0'}; -static const NW_Ucs2 PropVal_hankakukana[] = {'h','a','n','k','a','k','u','k','a','n','a','\0'}; -static const NW_Ucs2 PropVal_alphabet[] = {'a','l','p','h','a','b','e','t','\0'}; -static const NW_Ucs2 PropVal_numeric[] = {'n','u','m','e','r','i','c','\0'}; - -/* NOTE: Attribute-specific PropVal entries should PRECEDE - the default value (e.g., PropVal_left). */ -static const NW_XHTML_AttributePropertyTable_PropValEntry_t _NW_XHTML_AttributePropertyTable_PropValEntries[] = { -/* Fields: attrValStr elementToken attributeToken CSSPropertyVal case_sensitive */ - {PropVal_none, 0, 0, NW_CSS_PropValue_none, NW_FALSE}, - {PropVal_all, 0, 0, NW_CSS_PropValue_both, NW_FALSE}, - {PropVal_1, 0, 0, NW_CSS_PropValue_decimal, NW_FALSE}, - {PropVal_a, 0, 0, NW_CSS_PropValue_lowerAlpha, NW_TRUE}, - {PropVal_A, 0, 0, NW_CSS_PropValue_upperAlpha, NW_TRUE}, - {PropVal_i, 0, 0, NW_CSS_PropValue_lowerRoman, NW_TRUE}, - {PropVal_I, 0, 0, NW_CSS_PropValue_upperRoman, NW_TRUE}, - {PropVal_disc, 0, 0, NW_CSS_PropValue_disc, NW_FALSE}, - {PropVal_square, 0, 0, NW_CSS_PropValue_square, NW_FALSE}, - {PropVal_circle, 0, 0, NW_CSS_PropValue_circle, NW_FALSE}, - {PropVal_infinite, 0, 0, NW_CSS_PropValue_infinite, NW_FALSE}, - {PropVal_bottom, NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_align, NW_CSS_PropValue_baseline, NW_FALSE}, - {PropVal_bottom, 0, 0, NW_CSS_PropValue_bottom, NW_FALSE}, - {PropVal_center, 0, 0, NW_CSS_PropValue_center, NW_FALSE}, - {PropVal_left, NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_direction, NW_CSS_PropValue_rtl, NW_FALSE}, - {PropVal_left, 0, 0, NW_CSS_PropValue_left, NW_FALSE}, - {PropVal_middle, 0, 0, NW_CSS_PropValue_middle, NW_FALSE}, - {PropVal_right, NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_direction, NW_CSS_PropValue_ltr, NW_FALSE}, - {PropVal_right, 0, 0, NW_CSS_PropValue_right, NW_FALSE}, - {PropVal_top, 0, 0, NW_CSS_PropValue_top, NW_FALSE}, - {PropVal_scroll, 0, 0, NW_CSS_PropValue_scroll, NW_FALSE}, - {PropVal_slide, 0, 0, NW_CSS_PropValue_slide, NW_FALSE}, - {PropVal_alternate, 0, 0, NW_CSS_PropValue_alternate, NW_FALSE}, - {PropVal_noshade, 0, 0, NW_CSS_PropValue_true, NW_FALSE}, - {PropVal_aqua, 0, 0, NW_CSS_PropValue_aqua, NW_FALSE}, - {PropVal_black, 0, 0, NW_CSS_PropValue_black, NW_FALSE}, - {PropVal_blue, 0, 0, NW_CSS_PropValue_blue, NW_FALSE}, - {PropVal_cyan, 0, 0, NW_CSS_PropValue_cyan, NW_FALSE}, - {PropVal_fuchsia, 0, 0, NW_CSS_PropValue_fuchsia, NW_FALSE}, - {PropVal_gray, 0, 0, NW_CSS_PropValue_gray, NW_FALSE}, - {PropVal_green, 0, 0, NW_CSS_PropValue_green, NW_FALSE}, - {PropVal_lime, 0, 0, NW_CSS_PropValue_lime, NW_FALSE}, - {PropVal_maroon, 0, 0, NW_CSS_PropValue_maroon, NW_FALSE}, - {PropVal_navy, 0, 0, NW_CSS_PropValue_navy, NW_FALSE}, - {PropVal_olive, 0, 0, NW_CSS_PropValue_olive, NW_FALSE}, - {PropVal_pink, 0, 0, NW_CSS_PropValue_pink, NW_FALSE}, - {PropVal_purple, 0, 0, NW_CSS_PropValue_purple, NW_FALSE}, - {PropVal_red, 0, 0, NW_CSS_PropValue_red, NW_FALSE}, - {PropVal_silver, 0, 0, NW_CSS_PropValue_silver, NW_FALSE}, - {PropVal_teal, 0, 0, NW_CSS_PropValue_teal, NW_FALSE}, - {PropVal_white, 0, 0, NW_CSS_PropValue_white, NW_FALSE}, - {PropVal_yellow, 0, 0, NW_CSS_PropValue_yellow, NW_FALSE}, - {PropVal_transparent, 0, 0, NW_CSS_PropValue_transparent, NW_FALSE}, - {PropVal_ltr, 0, 0, NW_CSS_PropValue_ltr, NW_FALSE}, - {PropVal_rtl, 0, 0, NW_CSS_PropValue_rtl, NW_FALSE}, - {PropVal_fixed, 0, 0, NW_CSS_PropValue_background_fixed, NW_FALSE}, - {PropVal_nowrap, NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_nowrap, NW_CSS_PropValue_nowrap, NW_FALSE}, - {PropVal_hiragana, 0, 0, NW_CSS_PropValue_hiragana, NW_FALSE}, - {PropVal_katakana, 0, 0, NW_CSS_PropValue_katakana, NW_FALSE}, - {PropVal_hankakukana, 0, 0, NW_CSS_PropValue_hankakukana, NW_FALSE}, - {PropVal_alphabet, 0, 0, NW_CSS_PropValue_alphabet, NW_FALSE}, - {PropVal_numeric, 0, 0, NW_CSS_PropValue_numeric, NW_FALSE} -}; - -/* In order for border width to take effect, the border style must be solid */ -static const NW_XHTML_AttributePropertyTable_CSSPropRequires_t NW_XHTML_PropertyTable_borderCSSRequires = -{ NW_CSS_Prop_borderStyle, {{NW_CSS_PropValue_solid}, NW_CSS_ValueType_Token} }; - -/* In order for image alignment to take effect, the display type must be block */ -static const NW_XHTML_AttributePropertyTable_CSSPropRequires_t NW_XHTML_PropertyTable_floatCSSRequires = -{ NW_CSS_Prop_display, {{NW_CSS_PropValue_display_block}, NW_CSS_ValueType_Token} }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_AlignValues[] = -{ NW_CSS_PropValue_left, NW_CSS_PropValue_right, NW_CSS_PropValue_center, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_AttachValues[] = -{ NW_CSS_PropValue_background_fixed }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_FloatValues[] = -{ NW_CSS_PropValue_left, NW_CSS_PropValue_right, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_NoshadeValues[] = -{ NW_CSS_PropValue_true }; - -/* In order for the caption to be top/bottom aligned, it should also be centered */ -static const NW_XHTML_AttributePropertyTable_CSSPropRequires_t NW_XHTML_PropertyTable_captionAlignCSSRequires = -{ NW_CSS_Prop_textAlign, {{NW_CSS_PropValue_center}, NW_CSS_ValueType_Token} }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_CaptionValignValues[] = -{ NW_CSS_PropValue_top, NW_CSS_PropValue_bottom, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_ValignValues[] = -{ NW_CSS_PropValue_top, NW_CSS_PropValue_middle, NW_CSS_PropValue_bottom, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_ClearValues[] = -{ NW_CSS_PropValue_left, NW_CSS_PropValue_right, NW_CSS_PropValue_both, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_OLTypeValues[] = -{ NW_CSS_PropValue_decimal, NW_CSS_PropValue_lowerAlpha, NW_CSS_PropValue_upperAlpha, NW_CSS_PropValue_lowerRoman, NW_CSS_PropValue_upperRoman, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_ULTypeValues[] = -{ NW_CSS_PropValue_disc, NW_CSS_PropValue_square, NW_CSS_PropValue_circle, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_MarqueeBehValues[] = -{ NW_CSS_PropValue_scroll, NW_CSS_PropValue_slide, NW_CSS_PropValue_alternate, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_MarqueeDirValues[] = -{ NW_CSS_PropValue_ltr, NW_CSS_PropValue_rtl, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_MarqueeLoopValues[] = -{ NW_CSS_PropValue_infinite, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_TextDirValues[] = -{ NW_CSS_PropValue_ltr, NW_CSS_PropValue_rtl, NW_CSS_PropValue_none }; - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_NoWrapValues[] = -{ NW_CSS_PropValue_nowrap, NW_CSS_PropValue_none }; - - -static const NW_LMgr_PropertyValueToken_t NW_XHTML_APT_ModeValues[] = -{ NW_CSS_PropValue_hiragana, NW_CSS_PropValue_katakana, NW_CSS_PropValue_hankakukana, - NW_CSS_PropValue_alphabet, NW_CSS_PropValue_numeric, NW_CSS_PropValue_none }; - - -static const NW_XHTML_AttributePropertyTable_ElementEntry_t _NW_XHTML_AttributePropertyTable_Elements[] = -{ /* elementToken attributeToken CSSPropName type CSSPropVals requires */ - { NW_XHTML_ElementToken_zzzunknown,NW_XHTML_AttributeToken_id, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_a, NW_XHTML_AttributeToken_name, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_a, NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_a, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_a, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_abbr, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_acronym, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_address, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_area, NW_XHTML_AttributeToken_shape, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_area, NW_XHTML_AttributeToken_coords, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_b, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_big, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_text, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_background, NW_CSS_Prop_backgroundImage,NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_bgproperties, NW_CSS_Prop_backgroundAttachment, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AttachValues, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_color, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, -/* Coming soon, should be in RIM-2 - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_link, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_vlink, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_leftmargin, NW_CSS_Prop_leftMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_body, NW_XHTML_AttributeToken_topmargin, NW_CSS_Prop_topMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, -*/ { NW_XHTML_ElementToken_br, NW_XHTML_AttributeToken_clear, NW_CSS_Prop_clear, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ClearValues, NULL }, - { NW_XHTML_ElementToken_blink, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_blink, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_blockquote, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_caption, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_caption, NW_XHTML_AttributeToken_align, NW_CSS_Prop_captionSide, NW_XHTML_APT_TOKEN, NW_XHTML_APT_CaptionValignValues, &NW_XHTML_PropertyTable_captionAlignCSSRequires }, - { NW_XHTML_ElementToken_caption, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_center, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_cite, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_code, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_del, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_dfn, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_div, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_div, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_dd, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_dl, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_dt, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_em, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_align, NW_CSS_Prop_float, NW_XHTML_APT_TOKEN, NW_XHTML_APT_FloatValues, &NW_XHTML_PropertyTable_floatCSSRequires }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_align, NW_CSS_Prop_verticalAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ValignValues, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_border, NW_CSS_Prop_borderWidth, NW_XHTML_APT_PIXEL, NULL, &NW_XHTML_PropertyTable_borderCSSRequires }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_leftMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_rightMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_id, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_name, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_bottomMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_embed, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_topMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_h1, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h1, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_h2, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h2, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_h3, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h3, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_h4, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h4, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_h5, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h5, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_h6, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_h6, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_head, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_size, NW_CSS_Prop_height, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_noshade, NW_CSS_Prop_noshade, NW_XHTML_APT_TOKEN, NW_XHTML_APT_NoshadeValues, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_hr, NW_XHTML_AttributeToken_color, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_html, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_fieldset,NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_font, NW_XHTML_AttributeToken_color, NW_CSS_Prop_color, NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_font, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_form, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_form, NW_XHTML_AttributeToken_name, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_frameset,NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_i, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_align, NW_CSS_Prop_float, NW_XHTML_APT_TOKEN, NW_XHTML_APT_FloatValues, &NW_XHTML_PropertyTable_floatCSSRequires }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_align, NW_CSS_Prop_verticalAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ValignValues, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_border, NW_CSS_Prop_borderWidth, NW_XHTML_APT_PIXEL, NULL, &NW_XHTML_PropertyTable_borderCSSRequires }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_leftMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_rightMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_bottomMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_topMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_img, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_istyle, NW_CSS_Prop_istyle, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_input, NW_XHTML_AttributeToken_mode, NW_CSS_Prop_mode, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ModeValues, NULL }, - { NW_XHTML_ElementToken_ins, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_kbd, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_map, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_map, NW_XHTML_AttributeToken_name, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_map, NW_XHTML_AttributeToken_id, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_behavior, NW_CSS_Prop_marqueeStyle, NW_XHTML_APT_TOKEN, NW_XHTML_APT_MarqueeBehValues,NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_direction, NW_CSS_Prop_marqueeDir, NW_XHTML_APT_TOKEN, NW_XHTML_APT_MarqueeDirValues,NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_scrollamount, NW_CSS_Prop_marqueeAmount, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_scrolldelay, NW_CSS_Prop_marqueeSpeed, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_loop, NW_CSS_Prop_marqueeLoop, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_loop, NW_CSS_Prop_marqueeLoop, NW_XHTML_APT_TOKEN, NW_XHTML_APT_MarqueeLoopValues,NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_leftMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_rightMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_bottomMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_marquee, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_topMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_menu, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_menu, NW_XHTML_AttributeToken_type, NW_CSS_Prop_listStyleType, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ULTypeValues, NULL }, - { NW_XHTML_ElementToken_label, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_li, NW_XHTML_AttributeToken_type, NW_CSS_Prop_listStyleType, NW_XHTML_APT_TOKEN, NW_XHTML_APT_OLTypeValues, NULL }, - { NW_XHTML_ElementToken_li, NW_XHTML_AttributeToken_type, NW_CSS_Prop_listStyleType, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ULTypeValues, NULL }, - { NW_XHTML_ElementToken_li, NW_XHTML_AttributeToken_value, NW_CSS_Prop_listValue, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_li, NW_XHTML_AttributeToken_clear, NW_CSS_Prop_clear, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ClearValues, NULL }, - { NW_XHTML_ElementToken_li, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_align, NW_CSS_Prop_float, NW_XHTML_APT_TOKEN, NW_XHTML_APT_FloatValues, &NW_XHTML_PropertyTable_floatCSSRequires }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_align, NW_CSS_Prop_verticalAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ValignValues, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_border, NW_CSS_Prop_borderWidth, NW_XHTML_APT_PIXEL, NULL, &NW_XHTML_PropertyTable_borderCSSRequires }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_leftMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_hspace, NW_CSS_Prop_rightMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_id, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_name, NW_CSS_Prop_boxName, NW_XHTML_APT_STRING, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_bottomMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_object, NW_XHTML_AttributeToken_vspace, NW_CSS_Prop_topMargin, NW_XHTML_APT_PIXEL, NULL, NULL }, - { NW_XHTML_ElementToken_ol, NW_XHTML_AttributeToken_type, NW_CSS_Prop_listStyleType, NW_XHTML_APT_TOKEN, NW_XHTML_APT_OLTypeValues, NULL }, - { NW_XHTML_ElementToken_ol, NW_XHTML_AttributeToken_start, NW_CSS_Prop_listValue, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_ol, NW_XHTML_AttributeToken_clear, NW_CSS_Prop_clear, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ClearValues, NULL }, - { NW_XHTML_ElementToken_ol, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_p, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_p, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_plaintext,NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_pre, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_q, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_s, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_samp, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_select, NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_select, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_small, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_span, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_strike, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_strong, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_style, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_border, NW_CSS_Prop_borderWidth, NW_XHTML_APT_PIXEL, NULL, &NW_XHTML_PropertyTable_borderCSSRequires }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_align, NW_CSS_Prop_tableAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_cellpadding, NW_CSS_Prop_cellPadding, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_table, NW_XHTML_AttributeToken_bordercolor, NW_CSS_Prop_borderColor, NW_XHTML_APT_TRANSCOLOR, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_valign, NW_CSS_Prop_verticalAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ValignValues, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_colspan, NW_CSS_Prop_colSpan, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_rowspan, NW_CSS_Prop_rowSpan, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_nowrap, NW_CSS_Prop_whitespace, NW_XHTML_APT_TOKEN, NW_XHTML_APT_NoWrapValues, NULL }, - { NW_XHTML_ElementToken_td, NW_XHTML_AttributeToken_bordercolor, NW_CSS_Prop_borderColor, NW_XHTML_APT_TRANSCOLOR, NULL, NULL }, - { NW_XHTML_ElementToken_textarea,NW_XHTML_AttributeToken_tabindex, NW_CSS_Prop_tabIndex, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_textarea, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_textarea,NW_XHTML_AttributeToken_istyle, NW_CSS_Prop_istyle, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_textarea,NW_XHTML_AttributeToken_mode, NW_CSS_Prop_mode, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ModeValues, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_align, NW_CSS_Prop_textAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_AlignValues, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_valign, NW_CSS_Prop_verticalAlign, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ValignValues, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_colspan, NW_CSS_Prop_colSpan, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_rowspan, NW_CSS_Prop_rowSpan, NW_XHTML_APT_INTEGER, NULL, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_width, NW_CSS_Prop_width, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_height, NW_CSS_Prop_height, NW_XHTML_APT_LENGTH, NULL, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_th, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_tr, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_tr, NW_XHTML_AttributeToken_bgcolor, NW_CSS_Prop_backgroundColor,NW_XHTML_APT_COLOR, NULL, NULL }, - { NW_XHTML_ElementToken_tt, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_u, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_ul, NW_XHTML_AttributeToken_type, NW_CSS_Prop_listStyleType, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ULTypeValues, NULL }, - { NW_XHTML_ElementToken_ul, NW_XHTML_AttributeToken_clear, NW_CSS_Prop_clear, NW_XHTML_APT_TOKEN, NW_XHTML_APT_ClearValues, NULL }, - { NW_XHTML_ElementToken_ul, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL }, - { NW_XHTML_ElementToken_var, NW_XHTML_AttributeToken_dir, NW_CSS_Prop_textDirection, NW_XHTML_APT_TOKEN, NW_XHTML_APT_TextDirValues, NULL } -}; - - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -const -NW_XHTML_AttributePropertyTable_Class_t NW_XHTML_AttributePropertyTable_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_AttributePropertyTable */ - /* numPropertyVals */ sizeof(_NW_XHTML_AttributePropertyTable_PropValEntries) - / sizeof (_NW_XHTML_AttributePropertyTable_PropValEntries[0]), - /* propertyVals */ _NW_XHTML_AttributePropertyTable_PropValEntries, - /* numElementEntries */ sizeof (_NW_XHTML_AttributePropertyTable_Elements) - / sizeof (NW_XHTML_AttributePropertyTable_ElementEntry_t), - /* ElementEntries */ _NW_XHTML_AttributePropertyTable_Elements - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_AttributePropertyTable_t NW_XHTML_AttributePropertyTable = { - { &NW_XHTML_AttributePropertyTable_Class } -}; - -/* ------------------------------------------------------------------------- - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_GetCSSPropertyValToken(const NW_XHTML_AttributePropertyTable_t* thisObj, - const NW_Ucs2* attrValStr, - NW_Uint16 element, - NW_Uint16 attribute, - NW_LMgr_PropertyValueToken_t* token) -{ - NW_Uint32 numPropertyVals; - const NW_XHTML_AttributePropertyTable_PropValEntry_t* propertyVals; - NW_Uint32 index; - - numPropertyVals = - NW_XHTML_AttributePropertyTable_GetClassPart(thisObj).numPropertyVals; - propertyVals = - NW_XHTML_AttributePropertyTable_GetClassPart(thisObj).propertyVals; - - /* Traverse our list of token entries looking for a match for input string */ - for (index = 0; index < numPropertyVals; index++) { - if (propertyVals[index].case_sensitive) { - if (NW_Str_Strcmp(attrValStr, propertyVals[index].attrValStr)) { - continue; - } - } - else { - if (NW_Str_Stricmp(attrValStr, propertyVals[index].attrValStr)) { - continue; - } - } - - if ((propertyVals[index].elementToken == element) || (propertyVals[index].elementToken == 0)) { - if ((propertyVals[index].attributeToken == attribute) || (propertyVals[index].attributeToken == 0)) { - *token = propertyVals[index].CSSPropertyVal; - return KBrsrSuccess; - } - } - } - /* No matching token found for this attribute value. */ - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ValidateToken( - const NW_XHTML_AttributePropertyTable_ElementEntry_t* elementEntry, - NW_LMgr_PropertyValueToken_t token) -{ - const NW_LMgr_PropertyValueToken_t* CSSPropVals; - NW_Uint32 index; - - CSSPropVals = elementEntry->CSSPropVals; - - /* traverse our list of valid tokens looking for a match for input string */ - for (index = 0; CSSPropVals[index] != NW_CSS_PropValue_none; index++) { - if (token == CSSPropVals[index]) { - return KBrsrSuccess; - } - } - - /* Token is not valid for this attribute */ - return KBrsrFailure; -} - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetTokenProperty(const NW_XHTML_AttributePropertyTable_t* thisObj, - const NW_XHTML_AttributePropertyTable_ElementEntry_t* elementEntry, - NW_Ucs2* attrValStr, NW_LMgr_Property_t* prop) -{ - prop->type = NW_CSS_ValueType_Token; - if (NW_XHTML_AttributePropertyTable_GetCSSPropertyValToken( - thisObj, attrValStr, elementEntry->elementToken, elementEntry->attributeToken, &prop->value.token) != KBrsrSuccess) { - return KBrsrFailure; - } - - return NW_XHTML_AttributePropertyTable_ValidateToken(elementEntry, prop->value.token); -} - -/* -------------------------------------------------------------------------*/ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetHexColor(NW_LMgr_Property_t *prop, - const NW_Ucs2* colorVal) -{ - NW_Uint8 index; - NW_Uint8 v; - NW_Uint32 color = 0; - NW_Ucs2 ch; - NW_Uint32 length; - NW_Ucs2* ptr; - - /* Hex values are of the form #NNNNNN or #NNN */ - length = NW_Str_Strlen(colorVal); - if ((length != 3) && (length != 6)){ - return KBrsrFailure; - } - for (ptr= (NW_Ucs2*) colorVal, index=0; index<length; index++, ptr++) - { - ch = *ptr; - - if (NW_Str_Isdigit(ch)){ - v = (NW_Uint8)(ch - '0'); - } - else if ((ch >= 'A') && (ch <= 'F')){ - v = (NW_Uint8)(10 + (ch - 'A')); - }else if ((ch >= 'a') && (ch <= 'f')){ - v = (NW_Uint8)(10 + (ch - 'a')); - }else{ - return KBrsrFailure; - } - if (index == 0){ - color = color | v; - }else{ - color = (color << 4) | v; - } - if (length == 3){ - color = (color << 4) | v; - } - } - prop->value.integer = color; - prop->type = NW_CSS_ValueType_Color; - return KBrsrSuccess; -} -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_GetRGBVal(NW_Ucs2** ptr, NW_Uint8* val) -{ - NW_Ucs2 *endPtr = NULL; - NW_Int32 number; - - NW_Ucs2* startPtr = *ptr; - - while (NW_Str_Isdigit(**ptr)) { - (*ptr)++; - } - - number = NW_Str_Strtol (startPtr, &endPtr, 10 ); - - if (**ptr == ASCII_PERCENT){ - if (number > 100){ - number = 100; - } - number = (NW_Int32)(number*255/100); - (*ptr)++; - } - else{ - if (number > 255){ - number = 255; - } - } - *val = (NW_Uint8)number; - return KBrsrSuccess; -} - - -/* ------------------------------------------------------------------------- */ - -void -NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(NW_Ucs2** ptr) -{ - while (NW_Str_Isspace(**ptr)) { - (*ptr)++; - } -} -/* ------------------------------------------------------------------------- */ - - -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ParseRGB(const NW_Ucs2* colorVal, - NW_LMgr_Property_t* prop) - -{ - NW_Uint8 rVal; - NW_Uint8 gVal; - NW_Uint8 bVal; - NW_Uint32 color = 0; - NW_Ucs2* ptr; - - /* Format is rgb(rval, gval, bval) */ - /* Allowed values are integers 0 - 255 or percentages 0 - 100% */ - - ptr = (NW_Ucs2*) colorVal; - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (NW_XHTML_AttributePropertyTable_GetRGBVal(&ptr, &rVal) != KBrsrSuccess) { - return KBrsrFailure; - } - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (*ptr != ASCII_COMMA){ - return KBrsrFailure; - } - ptr++; - - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (NW_XHTML_AttributePropertyTable_GetRGBVal(&ptr, &gVal) != KBrsrSuccess) { - return KBrsrFailure; - } - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (*ptr != ASCII_COMMA){ - return KBrsrFailure; - } - ptr++; - - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (NW_XHTML_AttributePropertyTable_GetRGBVal(&ptr, &bVal) != KBrsrSuccess) { - return KBrsrFailure; - } - NW_XHTML_AttributePropertyTable_SkipWhiteSpaces(&ptr); - if (*ptr != ASCII_RIGHT_PARENTHESIS){ - return KBrsrFailure; - } - - color = color| rVal; - color = (color << 8)| gVal; - color = (color << 8)| bVal; - prop->value.integer = color; - prop->type = NW_CSS_ValueType_Color; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetColorProperty(const NW_XHTML_AttributePropertyTable_t* thisObj, - const NW_XHTML_AttributePropertyTable_ElementEntry_t* elementEntry, - NW_Ucs2 *attrValStr, - NW_Bool transparentAllowed, - NW_LMgr_Property_t* prop) -{ - NW_Int32 color; - NW_Uint32 token; - NW_Ucs2 *colorVal; - TBrowserStatusCode status; - NW_CSS_TokenToInt_t* tokenToInt = (NW_CSS_TokenToInt_t *)(&NW_CSS_TokenToInt); - - - /* Colors are in hex or rgb format, or are given as token names */ - if (*attrValStr == ASCII_HASH) { - colorVal = attrValStr+1; - return NW_XHTML_AttributePropertyTable_SetHexColor(prop, colorVal); - } - - /* Sometime ASCII_HASH is missing from the color value but rest of value is correct. - * The function NW_XHTML_AttributePropertyTable_SetHexColor(..) is used to check this, - * if this function returns failure then it means that continue otherwise return. - */ - - if(NW_XHTML_AttributePropertyTable_SetHexColor(prop,attrValStr) == KBrsrSuccess) - { - return KBrsrSuccess; - } - - - - if (!NW_Str_Strnicmp(attrValStr, rgb, NW_Str_Strlen(rgb))) { - colorVal = attrValStr + NW_Str_Strlen(rgb); - return NW_XHTML_AttributePropertyTable_ParseRGB(colorVal, prop); - } - - status = NW_XHTML_AttributePropertyTable_GetCSSPropertyValToken( - thisObj, attrValStr, elementEntry->elementToken, elementEntry->attributeToken, &token); - if (status != KBrsrSuccess) { - return status; - } - color = NW_CSS_TokenToInt_GetColorVal(tokenToInt, transparentAllowed, token); - if (color == -1){ - return KBrsrFailure; - } - prop->value.integer = (NW_Uint32)color; - prop->type = NW_CSS_ValueType_Color; - return KBrsrSuccess; - } - -/* ------------------------------------------------------------------------- */ -/* Numbers consist of 1 or more decimal digits. (0-9)+ */ - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetPixelProperty(NW_Ucs2 *attrValStr, - NW_LMgr_Property_t* prop) -{ - NW_Ucs2* endPtr = NULL; - - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = (NW_Int32) NW_Str_Strtoul(attrValStr, &endPtr, 10); - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetIntegerProperty(NW_Ucs2 *attrValStr, - NW_LMgr_Property_t* prop) -{ - NW_Int32 size = 0; - NW_Ucs2* testStr= attrValStr; - NW_Ucs2 c; - - while ((c = *testStr++) != 0) { - if (NW_Str_Isalpha(c)) { - return KBrsrFailure; - } - } - - size = NW_Str_Atoi(attrValStr); - if (size < 0) { - return KBrsrFailure; - } - - prop->type = NW_CSS_ValueType_Integer; - prop->value.integer = size; - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetLengthProperty(NW_Ucs2 *attrValStr, - NW_LMgr_Property_t* prop) -{ - TBrowserStatusCode status = KBrsrSuccess; - const NW_Ucs2 *pStart = NULL; - const NW_Ucs2 *pEnd = NULL; - NW_Ucs2* numberString = NULL; - NW_Uint32 sublen = 0; - NW_Ucs2* endPtr = NULL; - NW_Float32 returnSize; - NW_Ucs2 token = '%'; - - pStart = attrValStr; - - pEnd = NW_Str_Strchr(pStart, token); - - if (pEnd != NULL) - { - sublen = (NW_Uint32)(pEnd - pStart); - - numberString = NW_Str_Substr(pStart, 0, sublen); - - status = NW_Str_CvtToFloat32(numberString, &endPtr, &returnSize); - - free(numberString); - - if (status == KBrsrSuccess) - { - if (returnSize < 0.0) - { - returnSize = 0.0; - } - - prop->type = NW_CSS_ValueType_Percentage; - prop->value.decimal = returnSize; - } - else - { - return status; - } - } - else - { - prop->type = NW_CSS_ValueType_Px; - prop->value.integer = NW_Str_Strtoul(pStart, &endPtr, 10); - } - - return status; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Text_t* -NW_XHTML_AttributePropertyTable_GetAElemAccessKeyLabel( - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_DOM_ElementNode_t* childNode; - NW_Text_t* aElemAccessKeyLabel = NULL; - - childNode = (NW_DOM_ElementNode_t*) NW_DOM_Node_getFirstChild (elementNode); - if (childNode == NULL) { - return NULL; - } - if (NW_DOM_Node_getNodeType(childNode) == NW_DOM_TEXT_NODE){ - return NW_XHTML_GetDOMTextNodeData (contentHandler, childNode); - } - if (NW_HED_DomHelper_GetElementToken(childNode) == NW_XHTML_ElementToken_img){ - NW_XHTML_GetDOMAttribute (contentHandler, childNode, NW_XHTML_AttributeToken_alt, &aElemAccessKeyLabel); - return aElemAccessKeyLabel; - } - return NULL; -} - -/* ------------------------------------------------------------------------- */ -static -NW_Text_t* -NW_XHTML_AttributePropertyTable_GetInputElemAccessKeyLabel( - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - NW_Ucs2* typeAttr = NULL; - TBrowserStatusCode status; - NW_Text_t* label = NULL; - NW_Bool match; - - status = - NW_XHTML_ElementHandler_GetAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_type, - &typeAttr); - if (status != KBrsrSuccess) { - return NULL; - } - - match = (NW_Bool) !NW_Str_StricmpConst (typeAttr, "submit"); - NW_Mem_Free (typeAttr); - - if (!match) { - return NULL; - } - - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_title, &label); - if (label != NULL) { - return label; - } - - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_value, &label); - if (label != NULL) { - return label; - } - return NW_Text_New (HTTP_iso_10646_ucs_2, (NW_Ucs2*)Submit, - NW_Str_Strlen(Submit), NW_FALSE); -} -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyAccessKey(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) -{ - NW_Text_t* accessKey = NULL; - NW_LMgr_Property_t accesskeyProp; - NW_Uint16 elementToken; - NW_Text_t* accesskeyLabel; - - NW_TRY(status) - { - /* is accesskey attribute already set - if yes don't check for accesskey */ - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_accesskey, &accesskeyProp); - if (status != KBrsrNotFound) - NW_THROW (status); - - /* is directkey attribute already set - if yes don't check for accesskey */ - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_directkey, &accesskeyProp); - if (status != KBrsrNotFound) - NW_THROW (status); - - elementToken = NW_HED_DomHelper_GetElementToken(elementNode); - /* find the 'accesskey' attribute and get its string value */ - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_accesskey, &accessKey); - accesskeyLabel = NULL; - - if (accessKey != NULL) - { - NW_LMgr_AccessKey_t* ak; - - ak = NW_LMgr_AccessKey_New(); - /* ak == NULL? out of memory error! */ - NW_THROW_OOM_ON_NULL (ak, status); - - if (NW_LMgr_AccessKey_SetFromTextAttr(ak, accessKey) == KBrsrSuccess) - { - /* set accesskey on the new box */ - if (elementToken == NW_XHTML_ElementToken_a){ - accesskeyLabel = NW_XHTML_AttributePropertyTable_GetAElemAccessKeyLabel( - contentHandler, elementNode); - } - else if (elementToken == NW_XHTML_ElementToken_input){ - accesskeyLabel = NW_XHTML_AttributePropertyTable_GetInputElemAccessKeyLabel( - contentHandler, elementNode); - } - /* set accesskey Label on the new box */ - NW_LMgr_AccessKey_SetLabel(ak, accesskeyLabel); - - accesskeyProp.type = NW_CSS_ValueType_Object; - accesskeyProp.value.object = ak; - /* store the status of the set: may cause out of memory error */ - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_accesskey, &accesskeyProp); - } - else - { - NW_Object_Delete(ak); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - NW_Object_Delete(accessKey); - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyDirectKey(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) -{ - NW_Text_t* accessKey = NULL; - NW_LMgr_Property_t accesskeyProp; - NW_LMgr_Property_t displayProp; - NW_Uint16 elementToken; - NW_Text_t* accesskeyLabel; - - NW_TRY(status) - { - /* is accesskey attribute already set - if yes don't check for accesskey */ - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_accesskey, &accesskeyProp); - if (status != KBrsrNotFound) - NW_THROW (status); - - /* is directkey attribute already set - if yes don't check for accesskey */ - status = NW_LMgr_Box_GetPropertyFromList(box, NW_CSS_Prop_directkey, &accesskeyProp); - if (status != KBrsrNotFound) - NW_THROW (status); - - elementToken = NW_HED_DomHelper_GetElementToken(elementNode); - /* find the 'directkey' attribute and get its string value */ - NW_XHTML_GetDOMAttribute(contentHandler, elementNode, - NW_XHTML_AttributeToken_directkey, &accessKey); - - accesskeyLabel = NULL; - - if (accessKey != NULL) - { - NW_LMgr_AccessKey_t* ak; - - ak = NW_LMgr_AccessKey_New(); - /* ak == NULL? out of memory error! */ - NW_THROW_OOM_ON_NULL (ak, status); - - if (NW_LMgr_AccessKey_SetFromTextAttr(ak, accessKey) == KBrsrSuccess) - { - /* set accesskey on the new box */ - if (elementToken == NW_XHTML_ElementToken_a){ - accesskeyLabel = NW_XHTML_AttributePropertyTable_GetAElemAccessKeyLabel( - contentHandler, elementNode); - displayProp.type = NW_CSS_ValueType_Token; - displayProp.value.token = NW_CSS_PropValue_display_directKey; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_display, &displayProp); - } - else if (elementToken == NW_XHTML_ElementToken_input){ - accesskeyLabel = NW_XHTML_AttributePropertyTable_GetInputElemAccessKeyLabel( - contentHandler, elementNode); - } - /* set accesskey Label on the new box */ - NW_LMgr_AccessKey_SetLabel(ak, accesskeyLabel); - - accesskeyProp.type = NW_CSS_ValueType_Object; - accesskeyProp.value.object = ak; - /* store the status of the set: may cause out of memory error */ - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_accesskey, &accesskeyProp); - - } - else - { - NW_Object_Delete(ak); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - NW_Object_Delete(accessKey); - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyTableBorder(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) - { - NW_LMgr_Property_t borderWidth; - NW_LMgr_Property_t borderStyle; - NW_LMgr_Property_t borderColor; - NW_Ucs2* endPtr = NULL; - NW_Int32 tableBorderWidth; - NW_Int32 tableBorderColor; - NW_LMgr_BoxVisitor_t* visitor = NULL; - NW_LMgr_Box_t* child = NULL; - NW_Ucs2* tableBorderVal = NULL; - NW_Ucs2* tableBorderColorVal = NULL; - - NW_TRY(status) - { - // Get border attribute. - status = NW_XHTML_ElementHandler_GetAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_border, &tableBorderVal); - if ((status != KBrsrSuccess) || (tableBorderVal == NULL)) - { - NW_THROW_SUCCESS(status); - } - - // Convert it to a int. - status = NW_Str_CvtToInt32(tableBorderVal, &endPtr, 10, &tableBorderWidth); - _NW_THROW_ON_ERROR(status); - - if (tableBorderWidth < 1) - { - NW_THROW_SUCCESS(status); - } - - // Rather than convert the color attribute to an RGB value, just get the - // the color from the table box. - tableBorderColor = 0x000000; - borderColor.value.integer = tableBorderColor; - borderColor.type = NW_CSS_ValueType_Color; - - status = NW_LMgr_PropertyList_Get(box->propList, NW_CSS_Prop_borderColor, &borderColor); - if (status == KBrsrSuccess) - { - tableBorderColor = borderColor.value.integer; - } - - // If need be set the default border on the cells. - visitor = NW_LMgr_ContainerBox_GetBoxVisitor(box); - NW_THROW_OOM_ON_NULL (visitor, status); - - while ((child = NW_LMgr_BoxVisitor_NextBox(visitor, NULL)) != NULL) - { - // Ignore non table cell boxes. - if (!NW_Object_IsInstanceOf(child, &NW_LMgr_StaticTableCellBox_Class) && - !NW_Object_IsInstanceOf(child, &NW_LMgr_VerticalTableCellBox_Class)) - { - continue; - } - - // If need be apply the default border style. - borderStyle.value.token = NW_CSS_PropValue_none; - borderStyle.type = NW_CSS_ValueType_Token; - - status = NW_LMgr_PropertyList_Get(child->propList, NW_CSS_Prop_borderStyle, &borderStyle); - if ((status == KBrsrNotFound) || (borderStyle.type & NW_CSS_ValueType_DefaultStyle)) - { - borderStyle.value.token = NW_CSS_PropValue_solid; - NW_LMgr_Box_SetProperty(child, NW_CSS_Prop_borderStyle, &borderStyle); - } - - // If need be apply the default border width. - borderWidth.value.integer = 0; - borderWidth.type = NW_CSS_ValueType_Integer; - - status = NW_LMgr_PropertyList_Get(child->propList, NW_CSS_Prop_borderWidth, &borderWidth); - if ((status == KBrsrNotFound) || (borderWidth.type & NW_CSS_ValueType_DefaultStyle)) - { - borderWidth.value.integer = tableBorderWidth; - borderWidth.type = NW_CSS_ValueType_Px; - NW_LMgr_Box_SetProperty(child, NW_CSS_Prop_borderWidth, &borderWidth); - } - - // If need be apply the default border color. - borderColor.value.integer = 0x000000; - borderColor.type = NW_CSS_ValueType_Color; - - status = NW_LMgr_PropertyList_Get(child->propList, NW_CSS_Prop_borderColor, &borderColor); - if ((status == KBrsrNotFound) || (borderColor.type & NW_CSS_ValueType_DefaultStyle)) - { - borderColor.value.integer = tableBorderColor; - NW_LMgr_Box_SetProperty(child, NW_CSS_Prop_borderColor, &borderColor); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - NW_Object_Delete(visitor); - NW_Mem_Free(tableBorderVal); - NW_Mem_Free(tableBorderColorVal); - - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetStringProperty(NW_Ucs2 *attrValStr, - NW_LMgr_Property_t* prop) -{ - NW_Text_t* propValue; - - propValue = NW_Text_New (HTTP_iso_10646_ucs_2, attrValStr, - NW_Str_Strlen (attrValStr), NW_Text_Flags_Copy); - - if (propValue == NULL) { - return KBrsrOutOfMemory; - } - - prop->type = NW_CSS_ValueType_Text; - prop->value.object = propValue; - - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ - -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetUrlProperty(NW_XHTML_ContentHandler_t* contentHandler, - NW_Ucs2 *attrValStr, - NW_LMgr_Property_t* prop, - NW_LMgr_PropertyName_t propName, - NW_LMgr_Box_t *box ) -{ - NW_Text_t* propValue = NULL; - NW_CSS_Processor_t* processor; - NW_Image_AbstractImage_t* image; - - NW_ASSERT( contentHandler ); - NW_TRY (status) - { - propValue = NW_Text_New (HTTP_iso_10646_ucs_2, attrValStr, - NW_Str_Strlen (attrValStr), NW_Text_Flags_Copy); - NW_THROW_OOM_ON_NULL (propValue, status); - processor = NW_XHTML_ContentHandler_CreateCSSProcessor(contentHandler); - NW_THROW_OOM_ON_NULL (processor, status); - status = NW_CSS_Processor_GetImage(processor, propValue, box, propName, &image , - /* No buffer index for inline style */ -1); - NW_THROW_ON(status, KBrsrOutOfMemory); - prop->value.object = (NW_Object_t*)image; - prop->type = NW_CSS_ValueType_Image; - - /* Remove ownership of the entry. It has been handed off to the simple - property list which will handle deletion.*/ - if (image) - { - CCSSImageList* imageList = (CCSSImageList*)(processor->imageList); - if(imageList) - { - NW_DOM_ElementNode_t* imageNode = NULL; - CCSSImageListEntry* imageEntry = imageList->EntryByVirtualImage( image, &imageNode ); - if (imageEntry) - { - imageList->RemoveVirtualImageOwnership( *imageEntry, image ); - } - } - } - - } - NW_CATCH( status) - { - if (propValue) - { - NW_Object_Delete(propValue); - } - status = KBrsrOutOfMemory; - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_CheckForFloat(NW_LMgr_Box_t* box, NW_Bool isTable) -{ - NW_LMgr_Property_t displayProp; - NW_LMgr_Property_t floatProp; - NW_LMgr_Property_t vAlignProp; - - NW_TRY (status) - { - // Get the float property. - floatProp.value.token = NW_CSS_PropValue_none; - floatProp.type = NW_CSS_ValueType_Token; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_float, &floatProp); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Get the vertical align property. - vAlignProp.value.token = NW_CSS_PropValue_none; - vAlignProp.type = NW_CSS_ValueType_Token; - status = NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_verticalAlign, &vAlignProp); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Return successfully if there are no align properties. - if ((floatProp.value.token == NW_CSS_PropValue_none) && - (vAlignProp.value.token == NW_CSS_PropValue_none)) - { - NW_THROW_SUCCESS(status); - } - - // The float property is not allowed on boxes that are inside a table, - // so remove it. - NW_LMgr_Box_t* parent; - - parent = box; - while ((parent = (NW_LMgr_Box_t*) NW_LMgr_Box_GetParent(parent)) != NULL) - { - if (NW_Object_IsClass(parent, &NW_LMgr_VerticalTableBox_Class) || - NW_Object_IsClass(parent, &NW_LMgr_StaticTableBox_Class)) - { - NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_float); - NW_THROW_SUCCESS(status); - } - } - - // If this is not a table box change the box's display - // property to block. - if (!isTable) - { - displayProp.type = NW_CSS_ValueType_Token; - displayProp.value.token = NW_CSS_PropValue_display_block; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_display, &displayProp); - _NW_THROW_ON_ERROR(status); - } - - // Otherwise move the float and width properties to the parent. - else - { - NW_LMgr_Box_t* tableContainer = (NW_LMgr_Box_t*) box->parent; - NW_LMgr_Property_t prop; - - NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_float); - status = NW_LMgr_Box_SetProperty(tableContainer, NW_CSS_Prop_float, &floatProp); - _NW_THROW_ON_ERROR(status); - - /* If the table is floating, the width property should be applied - to the container, too */ - prop.value.token = NW_CSS_PropValue_auto; - prop.type = NW_CSS_ValueType_Token; - status = NW_LMgr_Box_GetRawProperty(box, NW_CSS_Prop_width, &prop); - - if (status == KBrsrSuccess) - { - NW_LMgr_Box_RemoveProperty(box, NW_CSS_Prop_width); - status = NW_LMgr_Box_SetProperty(tableContainer, NW_CSS_Prop_width, &prop); - _NW_THROW_ON_ERROR(status); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -/* returns KBrsrSuccess or KBrsrOutOfMemory */ -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_AddActiveBoxDecoration(NW_LMgr_Box_t* box, NW_Bool growBorder) -{ - TBrowserStatusCode status; - NW_LMgr_Property_t prop; - - NW_ASSERT( box != NULL ); - - if (growBorder) - { - /* Add the growBorder for active box containing images or object */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_growBorder; - status = NW_LMgr_Box_SetProperty(box,NW_CSS_Prop_focusBehavior, &prop); - } - else - { - NW_LMgr_PropertyValue_t propVal; - - /* Add underlining of text. */ - propVal.token = NW_CSS_PropValue_none; - status = NW_LMgr_Box_GetPropertyValue(NW_LMgr_BoxOf(box), NW_CSS_Prop_textDecoration, NW_CSS_ValueType_Token, &propVal); - if (status != KBrsrSuccess) - { - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_underline; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_textDecoration, &prop); - } - - status = NW_LMgr_Box_GetPropertyFromList(NW_LMgr_BoxOf(box), NW_CSS_Prop_color, &prop); - if (status != KBrsrSuccess) - { - prop.type = NW_CSS_ValueType_Color; - prop.value.integer = 0x0000FF; // setting color blue - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_color, &prop); - } - } - return status; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_SetHtWidth(NW_LMgr_Box_t* box, - NW_XHTML_ContentHandler_t* xhtmlContentHandler) -{ - TBrowserStatusCode status; - NW_LMgr_Property_t heightVal; - NW_LMgr_Property_t widthVal; - CGDIDeviceContext* deviceContext; - const NW_GDI_Rectangle_t* rectangle; - NW_HED_DocumentRoot_t *documentRoot; - NW_LMgr_RootBox_t *rootBox; - - documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (xhtmlContentHandler); - NW_ASSERT(documentRoot != NULL); - - rootBox = NW_HED_DocumentRoot_GetRootBox(documentRoot); - - /* For convenience */ - if (box->propList == NULL){ - return KBrsrSuccess; - } - - heightVal.type = widthVal.type = 0; - heightVal.value.decimal = widthVal.value.decimal = 0; - - status = NW_LMgr_PropertyList_Get(box->propList, NW_CSS_Prop_height, &heightVal); - if (status == KBrsrSuccess) - { - heightVal.type = (NW_LMgr_PropertyValueType_t)(heightVal.type & NW_CSS_ValueType_Mask); - if (heightVal.type == NW_CSS_ValueType_Percentage) - { - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - heightVal.value.integer = (NW_GDI_Metric_t)((heightVal.value.decimal*rectangle->dimension.height)/100); - heightVal.type = NW_CSS_ValueType_Px; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_height, &heightVal); - if (status == KBrsrOutOfMemory){ - return status; - } - } - } - status = NW_LMgr_PropertyList_Get(box->propList, NW_CSS_Prop_width, &widthVal); - if (status == KBrsrSuccess) - { - widthVal.type = (NW_LMgr_PropertyValueType_t)(widthVal.type & NW_CSS_ValueType_Mask); - if (widthVal.type == NW_CSS_ValueType_Percentage) - { - deviceContext = NW_LMgr_RootBox_GetDeviceContext (rootBox); - rectangle = deviceContext->DisplayBounds(); - widthVal.value.integer = (NW_GDI_Metric_t)((widthVal.value.decimal*rectangle->dimension.width)/100); - widthVal.type = NW_CSS_ValueType_Px; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_width, &widthVal); - if (status == KBrsrOutOfMemory){ - return status; - } - } - } - return status; -} - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_NeedFlowBox(NW_DOM_ElementNode_t* elementNode, NW_LMgr_Box_t* box) -{ - NW_DOM_Node_t* childNode = elementNode; - NW_Bool needFlowBox = NW_FALSE; - - for (childNode = NW_DOM_Node_getFirstChild (childNode); - childNode != NULL; - childNode = NW_DOM_Node_getNextSibling (childNode)) - { - NW_Bool isBlockLevelTag = NW_FALSE; - - NW_Uint16 tagToken = NW_HED_DomHelper_GetElementToken (childNode); - - isBlockLevelTag = NW_XHTML_ElementHandler_IsBlockLevelTag(tagToken); - - if (isBlockLevelTag) - { - needFlowBox = NW_TRUE; - break; - } - else - { - continue; - } - } - if (needFlowBox) - { - NW_LMgr_Property_t displayProp; - - displayProp.type = NW_CSS_ValueType_Token; - displayProp.value.token = NW_CSS_PropValue_display_block; - return NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_display, &displayProp); - } - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_HandleCaption(NW_LMgr_Box_t* box) -{ - NW_LMgr_Property_t prop; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_ContainerBox_t* parentBox = box->parent; - - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_top; - NW_LMgr_Box_GetProperty(box, NW_CSS_Prop_captionSide, &prop); - - if (prop.value.token == NW_CSS_PropValue_bottom) - { - status = NW_LMgr_ContainerBox_RemoveChild(parentBox, box); - if (status == KBrsrSuccess) - { - status = NW_LMgr_ContainerBox_AddChild(parentBox, box); - } - } - return status; -} - - - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyStyleTable(NW_XHTML_ContentHandler_t* aContentHandler, - NW_DOM_ElementNode_t* aElementNode, - NW_LMgr_Box_t* aBox) - { - NW_Bool gridMode; - NW_LMgr_Property_t prop; - - NW_ASSERT(aContentHandler != NULL); - NW_ASSERT(aElementNode != NULL); - NW_ASSERT(aBox != NULL); - - NW_TRY (status) - { - // Determine if this is a grid mode table. - gridMode = NW_XHTML_tableElementHandler_DoesGridModeApply(aContentHandler, - aElementNode); - - // Adjust various properties to honor grid mode. - if (gridMode) - { - // If this the first time this method is called on this box then - // apply the NW_CSS_Prop_gridModeApplied property and store the - // table's original width in NW_CSS_Prop_gridModeOrigWidth. - if (NW_LMgr_Box_GetProperty(aBox, NW_CSS_Prop_gridModeApplied, &prop) != KBrsrSuccess) - { - prop.type = NW_CSS_ValueType_Integer; - prop.value.integer = 1; - status = NW_LMgr_Box_SetProperty(aBox, NW_CSS_Prop_gridModeApplied, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - status = NW_LMgr_Box_GetProperty(aBox, NW_CSS_Prop_width, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_SetProperty(aBox, NW_CSS_Prop_gridModeOrigWidth, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - status = NW_LMgr_Box_RemoveProperty(aBox, NW_CSS_Prop_width); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - - status = NW_XHTML_AttributePropertyTable_ApplyGridModeTableStyle(aBox); - _NW_THROW_ON_ERROR(status); - } - - // Apply other styles relevant for both grid mode and non-grid mode tables - status = NW_XHTML_AttributePropertyTable_CheckForFloat(aBox, NW_TRUE); - NW_THROW_ON(status, KBrsrOutOfMemory); - - status = NW_XHTML_AttributePropertyTable_ApplyTableBorder(aContentHandler, - aElementNode, aBox); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyGridModeTableStyle(NW_LMgr_Box_t* aBox) - { - NW_LMgr_Property_t prop; - - NW_TRY (status) - { - // Don't do anything if this isn't a table. - if (NW_Object_IsInstanceOf(aBox, &NW_LMgr_StaticTableBox_Class) == NW_FALSE) - { - NW_THROW_SUCCESS(status); - } - - // Don't do anything if the table is an non-grid-mode table. - status = NW_LMgr_Box_GetProperty(aBox, NW_CSS_Prop_gridModeApplied, &prop); - if (status == KBrsrNotFound) - { - NW_THROW_SUCCESS(status); - } - _NW_THROW_ON_ERROR(status); - - // If in SSM set the table's width to 100% - if (NW_Settings_GetVerticalLayoutEnabled()) - { - // Set the width of the table to 100%. - prop.type = NW_CSS_ValueType_Percentage; - prop.value.decimal = 100.0; - status = NW_LMgr_Box_SetProperty(aBox, NW_CSS_Prop_width, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - // Otherwise restore the table's original width. - else - { - // Get the original width. - status = NW_LMgr_Box_GetProperty(aBox, NW_CSS_Prop_gridModeOrigWidth, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Restore the table's original width to the value found in - // NW_CSS_Prop_gridModeOrigWidth. - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_SetProperty(aBox, NW_CSS_Prop_width, &prop); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - // Otherwise restore the table's original width by removing the width property - // as it didn't originally have a width. - else if (status == KBrsrNotFound) - { - status = NW_LMgr_Box_RemoveProperty(aBox, NW_CSS_Prop_width); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - } - } - - NW_CATCH (status) - { - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -static TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyStyles_Helper (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_Uint16 elementToken, - NW_LMgr_Box_t* box) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint16 attributeToken; - - NW_LMgr_PropertyName_t CSSPropName; - NW_LMgr_Property_t p, prop; - NW_Ucs2 *attrValStr = NULL; - NW_Uint32 numElementEntries; - NW_Uint32 index; - const NW_XHTML_AttributePropertyTable_ElementEntry_t* elementEntries; - NW_Bool freeNeeded = NW_FALSE; - - numElementEntries = - NW_XHTML_AttributePropertyTable_GetClassPart(&NW_XHTML_AttributePropertyTable).numElementEntries; - elementEntries = - NW_XHTML_AttributePropertyTable_GetClassPart(&NW_XHTML_AttributePropertyTable).elementEntries; - - // Find the first match for the element token. It is a requirement - // that all occurences of the element token must be grouped together. - for (index = 0; index < numElementEntries; index++, elementEntries++) - { - if (elementEntries->elementToken == elementToken) - { - break; - } - } - // Traverse the entries which match the element token - // until the first occurence of the next element token is found. - for (; index < numElementEntries; index++, elementEntries++) - { - freeNeeded = NW_FALSE; - if (elementEntries->elementToken != elementToken) - { - break; - } - status = KBrsrSuccess; - attributeToken = elementEntries->attributeToken; - - // This is a hack to avoid having to add another field to the element - // entries. IMODE is not compatible with CSS in the way lists - // are handled - if ((elementToken == NW_XHTML_ElementToken_li) && - (attributeToken == NW_XHTML_AttributeToken_type)) - { - NW_DOM_ElementNode_t* parentNode; - NW_Uint16 parentToken; - - parentNode = (NW_DOM_ElementNode_t*)NW_DOM_Node_getParentNode((NW_DOM_Node_t*)elementNode); - parentToken = (NW_Uint16) (NW_HED_DomHelper_GetElementToken (parentNode)); - - if ((parentToken == NW_XHTML_ElementToken_ol) && - (elementEntries->CSSPropVals != NW_XHTML_APT_OLTypeValues)) - { - continue; - } - if ((parentToken == NW_XHTML_ElementToken_ul) && - (elementEntries->CSSPropVals != NW_XHTML_APT_ULTypeValues)) - { - continue; - } - } - - // Look for the attribute on the current dom node and get its value. - // Requirement: The HTML parser strips leading and trailing whitespaces - // from attribute value strings before returning them. - if (NW_XHTML_ElementHandler_GetAttribute(contentHandler, - elementNode, attributeToken, &attrValStr) == KBrsrSuccess) - { - freeNeeded = NW_TRUE; - } - else - { - // This is code for handling attributes (align, bordercolor) is - // set on the table or table row, but not on the cell. - // This could be moved somewhere better in the future. - if (((elementToken == NW_XHTML_ElementToken_td) || (elementToken == NW_XHTML_ElementToken_th)) && - ((attributeToken == NW_XHTML_AttributeToken_align) || - (attributeToken == NW_XHTML_AttributeToken_valign) || - (attributeToken == NW_XHTML_AttributeToken_bordercolor))) - { - // Check Parent, which must be a TableRow, for align, valign, or bordercolor - NW_DOM_ElementNode_t* parentNode = (NW_DOM_ElementNode_t*)NW_DOM_Node_getParentNode((NW_DOM_Node_t*)elementNode); - if (NW_XHTML_ElementHandler_GetAttribute(contentHandler, - parentNode, attributeToken, &attrValStr) == KBrsrSuccess) - { - freeNeeded = NW_TRUE; - } - - if (freeNeeded == NW_FALSE && - attributeToken == NW_XHTML_AttributeToken_bordercolor) - { - // Check Grandparent, which must be a Table, for bordercolor. - parentNode = (NW_DOM_ElementNode_t*)NW_DOM_Node_getParentNode((NW_DOM_Node_t*)parentNode); - if (NW_XHTML_ElementHandler_GetAttribute( - contentHandler, parentNode, attributeToken, &attrValStr) == KBrsrSuccess) - { - freeNeeded = NW_TRUE; - } - } - } - } - - if (freeNeeded == NW_FALSE) - { - continue; - } - - CSSPropName = elementEntries->CSSPropName; - - // If property is already set by CSS, IHTML attributes will not override it - if (NW_LMgr_Box_GetPropertyFromList(box, CSSPropName, &p) == KBrsrSuccess) - { - //lint -e{774} Boolean within 'if' always evaluates to False - if (freeNeeded) - { - NW_Str_Delete (attrValStr); - } - continue; - } - - // Each value type has its own subroutine to setup the prop structure. - switch (elementEntries->type) - { - case NW_XHTML_APT_TOKEN: - { - status = NW_XHTML_AttributePropertyTable_SetTokenProperty(&NW_XHTML_AttributePropertyTable, - elementEntries, attrValStr, &prop); - break; - } - case NW_XHTML_APT_TRANSCOLOR: - { - status = NW_XHTML_AttributePropertyTable_SetColorProperty(&NW_XHTML_AttributePropertyTable, - elementEntries, attrValStr, NW_TRUE, &prop); - break; - } - case NW_XHTML_APT_COLOR: - { - status = NW_XHTML_AttributePropertyTable_SetColorProperty(&NW_XHTML_AttributePropertyTable, - elementEntries, attrValStr, NW_FALSE, &prop); - break; - } - case NW_XHTML_APT_PIXEL: - { - status = NW_XHTML_AttributePropertyTable_SetPixelProperty(attrValStr, &prop); - break; - } - case NW_XHTML_APT_INTEGER: - { - status = NW_XHTML_AttributePropertyTable_SetIntegerProperty(attrValStr, &prop); - break; - } - case NW_XHTML_APT_LENGTH: - { - status = NW_XHTML_AttributePropertyTable_SetLengthProperty(attrValStr, &prop); - break; - } - case NW_XHTML_APT_STRING: - { - if (CSSPropName == NW_CSS_Prop_backgroundImage) - { - status = NW_XHTML_AttributePropertyTable_SetUrlProperty(contentHandler, attrValStr, &prop, - NW_CSS_Prop_backgroundImage ,box ); - } - else - { - status = NW_XHTML_AttributePropertyTable_SetStringProperty(attrValStr, &prop); - } - break; - } - default: - { - status = KBrsrFailure; - break; - } - } - - // Set the property on the layout manager box. - if (status == KBrsrSuccess) - { - status = NW_LMgr_Box_SetProperty (box, CSSPropName, &prop); - // Some properties require an additional property to be set - if (status == KBrsrSuccess && elementEntries->requires != NULL) - { - NW_LMgr_Property_t p1 = elementEntries->requires->setting; - status = NW_LMgr_Box_SetProperty (box, - elementEntries->requires->CSSPropName, - &p1); - } - } - - //lint -e{774} Boolean within 'if' always evaluates to False - if( freeNeeded ) - { - NW_Str_Delete( attrValStr ); - } - } - switch( elementToken ) - { - case NW_XHTML_ElementToken_a: - { - status = NW_XHTML_AttributePropertyTable_ApplyAccessKey(contentHandler, - elementNode, box); - - if (status == KBrsrOutOfMemory) - { - return status; - } - status = NW_XHTML_AttributePropertyTable_ApplyDirectKey(contentHandler, - elementNode, box); - break; - } - case NW_XHTML_ElementToken_textarea: - case NW_XHTML_ElementToken_input: - { - status = NW_XHTML_AttributePropertyTable_ApplyAccessKey(contentHandler, - elementNode, box); - if (status == KBrsrOutOfMemory) - { - return status; - } - - if (elementToken == NW_XHTML_ElementToken_input) - { - status = NW_XHTML_AttributePropertyTable_SetHtWidth(box, contentHandler); - if (status == KBrsrOutOfMemory) - { - return status; - } - - status = NW_XHTML_AttributePropertyTable_ApplyDirectKey(contentHandler, - elementNode, box); - if (status == KBrsrOutOfMemory) - { - return status; - } - } - - break; - } - case NW_XHTML_ElementToken_select: - { - status = NW_XHTML_AttributePropertyTable_ApplyAccessKey( contentHandler, - elementNode, box ); - break; - } - case NW_XHTML_ElementToken_table: - { - status = NW_XHTML_AttributePropertyTable_ApplyStyleTable(contentHandler, elementNode, box); - break; - } - case NW_XHTML_ElementToken_img: - { - status = NW_XHTML_AttributePropertyTable_CheckForFloat(box, NW_FALSE); - - // Ignore non-out-of-memory errors. - if (status != KBrsrOutOfMemory) - { - status = KBrsrSuccess; - } - break; - } - case NW_XHTML_ElementToken_frameset: - case NW_XHTML_ElementToken_body: - { - status = NW_XHTML_AttributePropertyTable_CheckForFloat(box, NW_FALSE); - - // Ignore non-out-of-memory errors. - if (status != KBrsrOutOfMemory) - { - NW_LMgr_Property_t p1; - p1.type = NW_CSS_ValueType_Token; - p1.value.token = NW_CSS_PropValue_flags_bodyElement; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_flags, &p1); - } - break; - } - case NW_XHTML_ElementToken_font: - case NW_XHTML_ElementToken_b: - { - status = NW_XHTML_AttributePropertyTable_CheckForFloat(box, NW_FALSE); - - // Ignore non-out-of-memory errors. - if (status != KBrsrOutOfMemory) - { - status = NW_XHTML_AttributePropertyTable_NeedFlowBox(elementNode, box); - } - break; - } - case NW_XHTML_ElementToken_caption: - { - status = NW_XHTML_AttributePropertyTable_HandleCaption(box); - break; - } - case NW_XHTML_ElementToken_area: - { - status = NW_XHTML_AttributePropertyTable_ApplyAccessKey(contentHandler, elementNode, box); - break; - } - default: - { - status = NW_XHTML_AttributePropertyTable_CheckForFloat(box, NW_FALSE); - - // Ignore non-out-of-memory errors. - if (status != KBrsrOutOfMemory) - { - status = KBrsrSuccess; - } - break; - } - } - return status; - } - -/* ------------------------------------------------------------------------- - public methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_AttributePropertyTable_ApplyStyles(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) -{ - TBrowserStatusCode stat; - NW_Uint16 elementToken = NW_HED_DomHelper_GetElementToken (elementNode); - - /* apply attributes that apply to the element */ - stat = NW_XHTML_AttributePropertyTable_ApplyStyles_Helper(contentHandler, elementNode, - elementToken, box); - - /* apply attributes that apply to ALL elements */ - if (stat != KBrsrOutOfMemory) - { - stat = NW_XHTML_AttributePropertyTable_ApplyStyles_Helper(contentHandler, elementNode, - NW_XHTML_ElementToken_zzzunknown, box); - } - - return stat; -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLContentHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4026 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Content handler for XHTML content type -* -*/ - - -// INCLUDE FILES -#include <e32def.h> // To avoid NULL redefine warning (no #ifndef NULL) - -#include "nw_lmgr_box.h" -#include "nw_lmgr_rootbox.h" -#include "nw_lmgr_marqueebox.h" - -#include "nw_lmgr_verticaltablebox.h" -#include "nw_lmgr_verticaltablerowbox.h" -#include "nw_lmgr_verticaltablecellbox.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_lmgr_textbox.h" - -#include <f32file.h> -#include <flogger.h> - -#include <stddef.h> -#include <stdio.h> -#include <string.h> - - -#include "nwx_string.h" - -#include "nw_xhtml_xhtmlcontenthandleri.h" -#include "nw_basicforms_xhtmlformliaison.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_basictables_trelementhandler.h" -#include "nw_basictables_cellelementhandler.h" -#include "nw_xhtml_textelementhandler.h" -#include "nw_text_coretextelementhandler.h" -#include "nw_xhtml_pielementhandler.h" -#include "nw_image_imgelementhandler.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_inumbercollectori.h" -#include "nw_lmgr_bidiflowbox.h" -#include "nw_dom_domvisitor.h" -#include "nw_tinydom.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" -#include "nw_adt_segmentedvector.h" -#include "nw_adt_resizableobjectvector.h" -#include "nw_adt_mapiterator.h" -#include "nw_xmlp_xmlp2wbxml.h" -#include "nw_htmlp_to_wbxml.h" -#include "nwx_url_utils.h" -#include "nwx_string.h" -#include "nwx_logger.h" -#include "nw_hed_context.h" -#include "NW_Text_Abstract.h" -#include "nw_text_ucs2.h" -#include "nw_xhtml_xhtmlentityset.h" -#include "nwx_ctx.h" -#include "nw_hed_documentroot.h" -#include "HEDDocumentListener.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_hed_domhelper.h" -#include "nw_msg_messagedispatcher.h" -#include "nw_markup_numbercollector.h" -//R->ul #include "urlloader_urlloaderint.h" -#include "nwx_osu_file.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nwx_http_defs.h" -#include "nwx_settings.h" -//#include "nw_ecma_contenthandler.h" -#include "MapElementList.h" -#include "nw_lmgr_simplepropertylist.h" -#include "BrsrStatusCodes.h" -#include "nwx_statuscodeconvert.h" -#include <flogger.h> -#include "nw_markup_wbxmlmodule.h" - -#include "nw_structure_scriptelementhandler.h" -#include "XhtmlObjectElementHandlerOOCi.h" -#include "XHTMLMessageListener.h" -#include "bodypart.h" -#include "MVCShell.h" -#include "BrCtl.h" - - -#include <stddef.h> -#include "CReferrerHelper.h" -#include "CSSVariableStyleSheet.h" - -// MODULE DATA STRUCTURES - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- * - forward method declarations - * ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshTimerCallback (void* timerData); - -// ============================= LOCAL FUNCTIONS =============================== - - -static -NW_LMgr_ContainerBox_t* -NW_XHTML_ContentHandler_GetContainerSpecialCase ( NW_DOM_Node_t* node, - NW_DOM_Node_t* parentNode, - NW_LMgr_ContainerBox_t* containerBox) - { - NW_ASSERT (parentNode); - NW_ASSERT (node); - NW_ASSERT (containerBox); - - // special handling for form inside table - NW_Uint16 token = NW_HED_DomHelper_GetElementToken (parentNode); - if (token == NW_XHTML_ElementToken_form) - { - // if chunk cuts after form - token = NW_HED_DomHelper_GetElementToken (node); - if (token == NW_XHTML_ElementToken_tr || - token == NW_XHTML_ElementToken_td || - token == NW_XHTML_ElementToken_th) - { - containerBox = NW_LMgr_Box_GetParent(containerBox); - } - else - { - NW_Uint32 type = NW_DOM_Node_getNodeType(node); - // special handling for text node is under form and form is under table, th, tr - if (type == NW_DOM_TEXT_NODE) - { - NW_DOM_Node_t* tempNode = NW_DOM_Node_getParentNode(parentNode); - token = NW_HED_DomHelper_GetElementToken (tempNode); - if (token == NW_XHTML_ElementToken_tr || - token == NW_XHTML_ElementToken_th || - token == NW_XHTML_ElementToken_table) - { - containerBox = NW_LMgr_Box_GetParent(containerBox); - } - } - } - } - else if (token == NW_XHTML_ElementToken_table) - { - // if chunk cuts above form - token = NW_HED_DomHelper_GetElementToken (node); - if (token == NW_XHTML_ElementToken_form) - { - containerBox = NW_LMgr_Box_GetParent(containerBox); - } - } // end of if (token == NW_XHTML_ElementToken_form) - - return containerBox; - } - -static -NW_DOM_Node_t* -NW_XHTML_ContentHandler_GetParentNodeSpecialCase ( NW_DOM_Node_t* node, - NW_DOM_Node_t* parentNode, - NW_Bool* formInTable) - { - NW_ASSERT (parentNode); - NW_ASSERT (node); - - NW_Uint16 token = NW_HED_DomHelper_GetElementToken (parentNode); - if (token == NW_XHTML_ElementToken_form) - { - // special handling for form inside table - token = NW_HED_DomHelper_GetElementToken (node); - if (token == NW_XHTML_ElementToken_tr || - token == NW_XHTML_ElementToken_td || - token == NW_XHTML_ElementToken_th) - { - parentNode = NW_DOM_Node_getParentNode(parentNode); - } - else - { - NW_Uint32 type = NW_DOM_Node_getNodeType(node); - // special handling for text node is under form and form is under table, th, tr - if (type == NW_DOM_TEXT_NODE) - { - NW_DOM_Node_t* tempNode = NW_DOM_Node_getParentNode(parentNode); - token = NW_HED_DomHelper_GetElementToken (tempNode); - if (token == NW_XHTML_ElementToken_tr || - token == NW_XHTML_ElementToken_th || - token == NW_XHTML_ElementToken_table) - { - parentNode = tempNode; - } - } - } - } - else if (token == NW_XHTML_ElementToken_table) - { - // if chunk cuts above form - token = NW_HED_DomHelper_GetElementToken (node); - if (token == NW_XHTML_ElementToken_form) - { - *formInTable = NW_TRUE; - } - } // end of if (token == NW_XHTML_ElementToken_form) - - return parentNode; - } - -static -TBrowserStatusCode -NW_XHTML_ContentHandler_GetContainerBox ( NW_DOM_Node_t* lastDomNode, - NW_DOM_Node_t* currentDomNode, - NW_LMgr_ContainerBox_t** containerBox, - NW_LMgr_ContainerBox_t* parentBox ) - { - NW_ASSERT (lastDomNode); - NW_ASSERT (currentDomNode); - NW_ASSERT (parentBox); - - // used to track the levels up in the box tree to find the right container box - NW_LMgr_Box_t* lastBox; - - // check the levels of the current parent node and the last dom node - NW_DOM_Node_t* currentParentNode = NW_DOM_Node_getParentNode(currentDomNode); - lastBox = (NW_LMgr_Box_t *)parentBox ; - - // if the currentDomNode's ancestor is the last node, then return the lastContainerBox - // this can happen when last dom node's children arrives in the next chunk - if (currentParentNode == lastDomNode) - { - // get the last box from the box tree - do - { - NW_ADT_Vector_Metric_t numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(lastBox )); - // if the box has no children , then break , it could be a box or a last container box - if (numChildren == 0 ) - { - break; - } - // get the last box in the level - numChildren --; - lastBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(lastBox), numChildren ); - } - while (NW_Object_IsInstanceOf (lastBox, &NW_LMgr_ContainerBox_Class)); - - // if the last box is not an instance of container box , find the parent box - // of the last box - NW_LMgr_ContainerBox_t* lastContainerBox; - if (!NW_Object_IsInstanceOf (lastBox, &NW_LMgr_ContainerBox_Class)) - { - lastContainerBox = NW_LMgr_Box_GetParent(lastBox ); - } - else - { - lastContainerBox = NW_LMgr_ContainerBoxOf(lastBox ); - } - - // special handling for form inside table - *containerBox = NW_XHTML_ContentHandler_GetContainerSpecialCase( currentDomNode, - currentParentNode, - lastContainerBox); - } - else - { - // if the container box is not in the parent hirerchy - NW_Bool formInsideTable = NW_FALSE; - currentParentNode = NW_XHTML_ContentHandler_GetParentNodeSpecialCase (currentDomNode, - currentParentNode, - &formInsideTable); - - // traverse the last branch of the box tree - NW_Bool found = NW_FALSE; - do - { - NW_LMgr_PropertyValue_t value; - value.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(lastBox, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - if (value.object) - { - NW_DOM_ElementNode_t* elementNode = (NW_DOM_ElementNode_t*)value.object; - if (elementNode == currentParentNode) - { - found = NW_TRUE; - break; - } - } - - NW_ADT_Vector_Metric_t numChildren = NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(lastBox )); - if (numChildren == 0 ) - { - break; - } - numChildren --; - lastBox = NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(lastBox), numChildren ); - } - while (NW_Object_IsInstanceOf (lastBox, &NW_LMgr_ContainerBox_Class)); - - // could be the case when header occupies first chunk - if (!found) - { - NW_LMgr_Box_t* rootBox = NW_LMgr_BoxOf(NW_LMgr_Box_GetParent(parentBox)); - NW_ASSERT(NW_Object_IsInstanceOf (rootBox, &NW_LMgr_RootBox_Class)); - NW_LMgr_Box_t* bodyBox = NW_LMgr_RootBox_GetBody(NW_LMgr_RootBoxOf(rootBox)); - if (!bodyBox) - { - *containerBox = NW_LMgr_ContainerBoxOf(NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(rootBox), 0)); - } - else - { - *containerBox = NW_LMgr_ContainerBoxOf(bodyBox); - } - } - else - { - if (formInsideTable) - { - // if form is under table, attach form to the parent box of table box - *containerBox = NW_LMgr_Box_GetParent(lastBox); - } - else - { - *containerBox = NW_LMgr_ContainerBoxOf(lastBox); - } - } - } // end of if (currentParentNode == lastDomNode) - - return KBrsrSuccess; - } - -static -TBrowserStatusCode -NW_XHTML_ContentHandler_CreatePartialBoxTree (NW_XHTML_ContentHandler_t* thisObj, - NW_LMgr_Box_t** boxTree) - { - NW_DOM_Node_t* domNode = NULL; - NW_DOM_Node_t* lastDomNode; - const NW_XHTML_ElementHandler_t* elementHandler; - NW_cXML_DOM_DOMVisitor_t * domDOMVisitor = NULL; - - NW_LOG0( NW_LOG_LEVEL2, "NW_XHTML_ContentHandler_CreatePartialBoxTree START" ); - - NW_TRY (status) - { - if (thisObj->prevInitializedDomNode == 0) - NW_THROW_SUCCESS(status); - - // if there are new nodes to create the box tree - domDOMVisitor = - NW_cXML_DOM_DOMVisitor_New( NW_HED_DomTree_GetRootNode( thisObj->domTree)); - NW_THROW_ON_NULL( domDOMVisitor, status, KBrsrOutOfMemory ); - - // skip DOM nodes for which boxes were created (of the previous chunks) - domDOMVisitor->currentNode = thisObj->prevInitializedDomNode; - lastDomNode = thisObj->prevInitializedDomNode; - -#ifdef _DEBUG1 - - NW_LMgr_Box_DumpBoxTree1((NW_LMgr_Box_t*)*boxTree); -#endif - - // get the next dom node - this will be the first node of the new chunk - domNode = NW_cXML_DOM_DOMVisitor_Next( domDOMVisitor, NW_DOM_ELEMENT_NODE | - NW_DOM_TEXT_NODE | NW_DOM_PROCESSING_INSTRUCTION_NODE ); - - if (domNode == 0) // no new domNode to create a tree - NW_THROW_SUCCESS(status); - - do - { - NW_LMgr_ContainerBox_t* containerBox = NULL; - - // find the correspoding container box for the dom node - (void)NW_XHTML_ContentHandler_GetContainerBox(lastDomNode, domNode, &containerBox, NW_LMgr_ContainerBoxOf(*boxTree)); - NW_ASSERT(containerBox != NULL); - NW_ASSERT(NW_Object_IsInstanceOf (containerBox, &NW_LMgr_ContainerBox_Class)); - NW_ASSERT(!NW_Object_IsInstanceOf (containerBox, &NW_LMgr_RootBox_Class)); - - // create the box tree for the subtree - // all the siblings can use the container box to create the box tree - // traverse the sibling nodes and create the box tree for the sibling nodes. - // skip the siblings and all its child nodes - NW_DOM_Node_t* prevDomNode = domNode; - - for (;domNode != NULL ;domNode = NW_DOM_Node_getNextSibling (domNode)) - { - NW_Uint32 type = NW_DOM_Node_getNodeType(domNode); - thisObj->prevInitializedDomNode = domNode ; - if (type == NW_DOM_TEXT_NODE) - { - NW_DOM_Node_t* parentNode = NW_DOM_Node_getParentNode(domNode); - NW_Uint16 token = NW_HED_DomHelper_GetElementToken (parentNode); - - if (token == NW_XHTML_ElementToken_table || - token == NW_XHTML_ElementToken_tr || - token == NW_XHTML_ElementToken_th) - { - // special handling for text node under table, th, tr - lastDomNode = domNode; - continue; - } - else if (token == NW_XHTML_ElementToken_form && - (NW_Object_IsInstanceOf (containerBox, &NW_LMgr_VerticalTableBox_Class) || - NW_Object_IsInstanceOf (containerBox, &NW_LMgr_VerticalTableRowBox_Class))) - { - // special handling for text node under form in dom tree - // text node is under table, th, tr in box tree - lastDomNode = domNode; - continue; - } - } - elementHandler = NW_XHTML_ContentHandler_GetElementHandler (thisObj, - (NW_DOM_ElementNode_t*) domNode); - NW_ASSERT(elementHandler != NULL); - - status = NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, - thisObj, - domNode, - containerBox); - _NW_THROW_ON_ERROR(status); - lastDomNode = domNode; - } // end of for (;domNode != NULL - - // go up the hirarchy and process all the dom nodes and all its children - do - { - prevDomNode = NW_DOM_Node_getParentNode(prevDomNode); - if (prevDomNode && NW_DOM_Node_getNextSibling (prevDomNode)) - { - domNode = NW_DOM_Node_getNextSibling (prevDomNode); - break; - } - } - while (prevDomNode); - -#ifdef _DEBUG1 - - NW_LMgr_Box_DumpBoxTree((NW_LMgr_Box_t*)*boxTree); -#endif - - } - while (domNode); - } // end NW_TRY - NW_CATCH (status) - {} - NW_FINALLY - { - if (domDOMVisitor) - { - NW_Object_Delete (domDOMVisitor); - } - NW_LOG0( NW_LOG_LEVEL2, "NW_XHTML_ContentHandler_CreatePartialBoxTree END" ); - return status; - } - NW_END_TRY - } - - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_CreatePartialDocument( NW_XHTML_ContentHandler_t* contentHandler, - NW_Url_Resp_t* response, NW_Bool isFirst ) - { - NW_Buffer_t* domBuffer; - NW_Uint32 line = 0; - TBrowserStatusCode status; - NW_Uint32 codePageSwitchCount = 0; - NW_Int32 lastValid = -1; - NW_Bool encodingFound; - void* WBXMLEncStrTbl = NULL; - - NW_LOG0(NW_LOG_LEVEL2, "NW_XHTML_ContentHandler_CreatePartialDocument"); - - status = _NW_HED_CompositeContentHandler_ComputeEncoding(NW_HED_CompositeContentHandlerOf(contentHandler), - response, &encodingFound); - if (status != KBrsrSuccess) - { - return status; - } - - if(response->contentLocationString != NULL) - { - contentHandler->contentLocation = NW_Str_CvtFromAscii((char *)response->contentLocationString); - if(contentHandler->contentLocation == NULL) - { - return KBrsrOutOfMemory; - } - } - - /* Change done to support saved deck */ - if ((0 == NW_Asc_stricmp((char*)HTTP_text_vnd_wap_wml_string, - (char*)response->contentTypeString)) || - (0 == NW_Asc_stricmp((char*)HTTP_application_xhtml_xml_string, - (char*)response->contentTypeString)) || - (0 == NW_Asc_stricmp((char*)HTTP_application_vnd_wap_xhtml_xml_string, - (char*)response->contentTypeString)) || - (0 == NW_Asc_stricmp((char*)HTTP_text_html_string, - (char*)response->contentTypeString)) || - (0 == NW_Asc_stricmp((char*)HTTP_application_vnd_wap_wml_plus_xml_string, - (char*)response->contentTypeString))) - { - NW_HED_CharsetConvContext ctx; - ctx.contentHandler = NW_HED_CompositeContentHandlerOf( contentHandler ); - ctx.response = response; - - NW_LOG0(NW_LOG_LEVEL2, "CreateDocument: before NW_HTMLP_SegToWbxml "); - - NW_Bool detectEncoding = (encodingFound) ? NW_FALSE : NW_TRUE; - status = NW_HTMLP_SegToWbxml( response->body, response->charset, - response->byteOrder, - &domBuffer, &line, NW_xhtml_1_0_PublicId, - NW_HTMLP_Get_ElementTableCount(), - NW_HTMLP_Get_ElementDescriptionTable(), - NW_FALSE, /* consume spaces */ - detectEncoding, /* need to detect charset */ - isFirst, /* is this the first segment of a document? */ - NW_FALSE, /* is this the last segment of a document? */ - &lastValid, - &(contentHandler->htmlpParser) , - &codePageSwitchCount, - &ctx, - NW_HED_CompositeContentHandler_CharConvCB, - &WBXMLEncStrTbl, - NW_FALSE); - if ( status == KBrsrBufferTooSmall ) - { - NW_LOG0(NW_LOG_LEVEL2, "CreatePartialDocument: NW_HTMLP_SegToWbxml returns KBrsrBufferTooSmall."); - return status; - } - if (BRSR_STAT_IS_FAILURE(status)) - { - NW_LOG1(NW_LOG_LEVEL1, "!!!CreatePartialDocument: NW_HTMLP_SegToWbxml: BadContent: SegToWbxml failure. status: %d", status); - NW_Buffer_Free(domBuffer); - return KBrsrXhtmlBadContent; - } - if (domBuffer) - { - NW_LOG1(NW_LOG_LEVEL2, "CreatePartialDocument: NW_HTMLP_SegToWbxml succeeds, domBuffer length: %d", domBuffer->length); - } - } - else - { - /* init our domBuffer */ - domBuffer = NW_Buffer_New(0); - - if (domBuffer != NULL) - { - domBuffer->allocatedLength = response->body->allocatedLength; - domBuffer->length = response->body->length; - domBuffer->data = response->body->data; - - /* This block is only used to switch the byte order of domBuffer. Each time the - function NW_HED_DomTree_New is called, the byte order of domBuffer is changed. - For a saved page, the domBuffer saved in the byte order after the change when - this page was loaded from web. So this order is wrong when call function - NW_HED_DomTree_New below. Thus we call NW_HED_DomTree_New here to change the - byte order back for saved page loading */ - contentHandler->domTree = NW_HED_DomTree_New (domBuffer, response->charset, - NW_xhtml_1_0_PublicId,WBXMLEncStrTbl); - - if (contentHandler->domTree != NULL) - { - /* Orphan the Buffer so it isn't deleted then delete the temp DomTree */ - domBuffer = NW_HED_DomTree_OrphanDomBuffer (contentHandler->domTree); - - NW_HED_DomTree_Delete (contentHandler->domTree); - contentHandler->domTree = NULL; - } - /* end of the byte order switch */ - - delete response->body; - response->body = NULL; - } - else - { - return KBrsrOutOfMemory; - } - } - - /* build the DOM tree */ - if (lastValid == -1) - { - contentHandler->domTree = NW_HED_DomTree_New (domBuffer, - response->charset, - NW_xhtml_1_0_PublicId,WBXMLEncStrTbl - ); - NW_LOG0(NW_LOG_LEVEL2, "CreatePartialDocument: after NW_HED_DomTree_New "); - } - else - { - if (isFirst) - { - NW_HED_DomTree_Delete (contentHandler->domTree); - contentHandler->domTree = NULL; - } - status = NW_HED_DomTree_Append (&(contentHandler->domTree), - domBuffer, - HTTP_iso_10646_ucs_2, - NW_xhtml_1_0_PublicId, - codePageSwitchCount, - lastValid, - WBXMLEncStrTbl - ); - NW_LOG1(NW_LOG_LEVEL2, "CreatePartialDocument: after NW_HED_DomTree_Append, status: %x", status); - } - - // set override the status if NW_HED_DomTree_New was called and failed - if (contentHandler->domTree == NULL && status == KBrsrSuccess) - { - NW_LOG0(NW_LOG_LEVEL1, "!!!NW_XHTML_ContentHandler_CreatePartialDocument: BadContent: NULL domTree with success status after NW_HED_DomTree_Append "); - status = KBrsrXhtmlBadContent; - } - - /* init the domHelper */ - contentHandler->domHelper.entitySet = - NW_HED_EntitySetOf (&NW_XHTML_EntitySet); - contentHandler->domHelper.context = NULL; - contentHandler->domHelper.resolvePlainTextVariablesAndEntities = NW_TRUE; - - /* find the body element, if it exists */ - if (contentHandler->domTree != NULL && status == KBrsrSuccess) - { - contentHandler->baseElement = - NW_HED_DomHelper_FindElement (&(contentHandler->domHelper), - NW_HED_DomTree_GetRootNode(contentHandler->domTree), - 3, NW_XHTML_ElementToken_base, 0, NULL); - } - else - { - NW_LOG1(NW_LOG_LEVEL2, "!!CreatePartialDocument: DOM Tree creation/appending failed, status: %x", status); - } - - /* print the domTree */ -#ifdef _DEBUG1 - if (status == KBrsrSuccess) - { - NW_HED_DomHelper_PrintTree - (&contentHandler->domHelper, - NW_HED_DomTree_GetRootNode (contentHandler->domTree)); - } -#endif - - return status; - } - -static -TBrowserStatusCode -NW_XHTML_ContentHandler_AppendPartialDocument( NW_XHTML_ContentHandler_t* contentHandler, - NW_Url_Resp_t* response) - { - return NW_XHTML_ContentHandler_CreatePartialDocument( contentHandler, response, NW_FALSE ); - } - -/* ------------------------------------------------------------------------- */ -static -TBrowserStatusCode -NW_XHTML_ContentHandler_InitializeElementHandlers( NW_XHTML_ContentHandler_t* thisObj ) - { - NW_cXML_DOM_DOMVisitor_t* domDOMVisitor = NULL; - NW_DOM_Node_t* domNode = NULL; - NW_DOM_Node_t* prevToLast = NULL; - - NW_ASSERT( thisObj != NULL ); - - NW_TRY (status) - { - // should not crash browser even if domTree is not valid for some reason. - if (!thisObj->domTree) - NW_LOG0(NW_LOG_LEVEL1, "!!!NW_XHTML_ContentHandler_InitializeElementHandlers: BadContent: domTree NULL"); - NW_THROW_ON_NULL( thisObj->domTree, status, KBrsrXhtmlBadContent ); - // create the DOMVisitor object on the document and use it to traverse the - // tree - domDOMVisitor = NW_cXML_DOM_DOMVisitor_New( NW_HED_DomTree_GetRootNode( thisObj->domTree ) ); - NW_THROW_ON_NULL( domDOMVisitor, status, KBrsrOutOfMemory ); - - NW_LOG0(NW_LOG_LEVEL2, "====== ! NW_XHTML_ContentHandler_Initialize: before while loop "); - - // initialize DOMVisitor to last node of the previous chunk as we do not - // want to initialize already visited DOM nodes - domDOMVisitor->currentNode = thisObj->lastInitializedDomNode; - - while ( ( domNode = NW_cXML_DOM_DOMVisitor_Next( domDOMVisitor, - NW_DOM_ELEMENT_NODE | - NW_DOM_TEXT_NODE | - NW_DOM_PROCESSING_INSTRUCTION_NODE ) ) - != NULL ) - { - const NW_XHTML_ElementHandler_t * elementHandler; - - // skip the elements up to the skipToNode, if found set skipToNode to NULL - if (thisObj->skipToNode != NULL ) - { - - NW_DOM_Node_t* parentNode; - parentNode = NW_DOM_Node_getParentNode((NW_DOM_Node_t*) domNode) ; - - if (thisObj->skipToNode == parentNode ) - { - continue; - } - else - { - thisObj->skipToNode = NULL; - } - } - // set iBodyIsPresent to true if we hit the <body> tag - if( !thisObj->iBodyIsPresent && NW_DOM_Node_getNodeType ((NW_DOM_Node_t*) domNode ) == NW_DOM_ELEMENT_NODE ) - { - if( NW_HED_DomHelper_GetElementToken (domNode) == NW_XHTML_ElementToken_body ) - { - // - thisObj->iBodyIsPresent = NW_TRUE; - } - } - - prevToLast = thisObj->lastInitializedDomNode; - thisObj->lastInitializedDomNode = domNode; - - // get the ElementHandler for the element - if there is no ElementHandler, - // we must ignore the element and continue our traversal - elementHandler = NW_XHTML_ContentHandler_GetElementHandler( - thisObj, (NW_DOM_ElementNode_t*) domNode ); - - if ( elementHandler == NULL ) - { - continue; - } - - // initialize the element - status = NW_XHTML_ElementHandler_Initialize( - elementHandler, thisObj, (NW_DOM_ElementNode_t*)domNode ); - NW_THROW_ON( status, KBrsrOutOfMemory ); - - // stopInitEH is a special flag used to stop initializing element - // handlers. It is set by NW_XHTML_ElementHandler_NextSiblingExists(), - // which is called by several of the ElementHandler_Initialize() methods. - if (thisObj->stopInitEH) - { - break; - } - } // end while... - - - if (thisObj->stopInitEH) - { - // in case select is cut between chunks, leave it processed in the next chunk - thisObj->stopInitEH = NW_FALSE; - - if(!thisObj->lastChunk) - { - // Special handling for certain elements; leave their processing to the - // next chunk. Set lastInitializedDomNode to be the node right before, - // either sibling or parent. Note, this is used in conjunction with - // stopInitEH flag set by NW_XHTML_ElementHandler_NextSiblingExists(), - // which is called by several of the ElementHandler_Initialize() methods. - NW_Uint16 token = NW_HED_DomHelper_GetElementToken (thisObj->lastInitializedDomNode); - if (token == NW_XHTML_ElementToken_style || - token == NW_XHTML_ElementToken_title || - token == NW_XHTML_ElementToken_script || - token == NW_XHTML_ElementToken_select || - token == NW_XHTML_ElementToken_object || - token == NW_XHTML_ElementToken_map || - token == NW_XHTML_ElementToken_textarea || - token == NW_XHTML_ElementToken_table || - token == NW_XHTML_ElementToken_a) - { - thisObj->lastInitializedDomNode = prevToLast; - } - } - } - - NW_LOG0(NW_LOG_LEVEL2, "===== ! NW_XHTML_ContentHandler_Initialize: after while loop "); - } - NW_CATCH (status ) - {} - NW_FINALLY - { - NW_Object_Delete (domDOMVisitor); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- */ -static -NW_Text_t* -NW_XHTML_ContentHandler_UnEscapeText (const NW_Text_t* text) - { - NW_Ucs2* origText = NULL; - NW_Bool freeOrigText = NW_FALSE; - NW_Ucs2* escapedText = NULL; - - NW_ASSERT (text != NULL); - - /* get the ucs2 string from text */ - NW_THROWIF_NULL (origText = NW_Text_GetUCS2Buffer (text, NW_Text_Flags_NullTerminated | - NW_Text_Flags_Aligned, NULL, &freeOrigText)); - - /* unescape the text */ - NW_THROWIF_NULL (escapedText = NW_Str_New(NW_Url_UnEscapeStringLen(origText))); - NW_Url_UnEscapeString(origText, escapedText); - - if (freeOrigText == NW_TRUE) - { - NW_Str_Delete (origText); - } - - /* create a new text item */ - return (NW_Text_t*) NW_Text_UCS2_New ((void*) escapedText, 0, NW_Text_Flags_TakeOwnership); - - NW_CATCH_ERROR - if (freeOrigText == NW_TRUE) - { - NW_Str_Delete (origText); - } - - NW_Str_Delete (escapedText); - - return NULL; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_ShowFragment (NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* fragment) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_Bool mustCallCompleted = NW_FALSE; - TBrowserStatusCode status = KBrsrFailure; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_THROWIF_NULL (docRoot); - - /* notify the docRoot that we are performing an intra-document navigation */ - NW_THROWIF_ERROR (status = NW_HED_DocumentRoot_HandleIntraPageNavigationStarted (docRoot)); - mustCallCompleted = NW_TRUE; - - /* navigate to the fragment */ - if (fragment != NULL) - { - NW_LMgr_Box_t* boxTree; - NW_Text_t* frag = NULL; - - /* unescape the fragment */ - frag = NW_XHTML_ContentHandler_UnEscapeText (fragment); - - /* show the box */ - status = NW_HED_DocumentNode_GetBoxTree (thisObj, &boxTree); - status = docRoot->documentListener->ShowNamedBox (boxTree, frag); - NW_Object_Delete (frag); - - if (status != KBrsrSuccess && status != KBrsrNotFound) - { - NW_HED_DocumentNode_HandleError (thisObj, NULL, - BRSR_STAT_CLASS_GENERAL, (NW_WaeError_t) status); - } - NW_THROWIF_ERROR(status); - } - - /* "navigate" to the top */ - /* TODO see if there is a better way to "scroll" to the top */ - else - { - (void) NW_HED_DocumentNode_NodeChanged (thisObj, NULL); - } - - /* notify the docRoot that we are done navigating */ - NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (docRoot); - - return KBrsrSuccess; - - NW_CATCH_ERROR - if (mustCallCompleted == NW_TRUE) - { - NW_HED_DocumentRoot_HandleIntraPageNavigationCompleted (docRoot); - } - - return status; - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_GetFragment (NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* url, - const NW_Text_t** fragment) - { - TBrowserStatusCode status = KBrsrFailure; - const NW_Ucs2* urlStorage = NULL; - NW_Text_Length_t urlLength; - NW_Uint8 urlFreeNeeded = NW_FALSE; - NW_Ucs2* fragmentStorage = NULL; - const NW_Ucs2* currentUrlStorage = NULL; - NW_Ucs2* urlBase = NULL; - NW_Ucs2* currentUrlBase = NULL; - NW_Int32 match; - - /* pram check */ - NW_THROWIF_NULL (url); - NW_THROWIF_NULL (fragment); - - *fragment = NULL; - - /* get the base urls */ - NW_THROWIF_NULL (urlStorage = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, - &urlLength, &urlFreeNeeded)); - - if (NW_XHTML_ContentHandler_IsSaveddeck(thisObj)) - { - NW_THROWIF_NULL (currentUrlStorage = NW_HED_UrlResponse_GetRawUrl ( - NW_HED_ContentHandler_GetUrlResponse (thisObj))); - } - else - { - NW_THROWIF_NULL (currentUrlStorage = NW_HED_UrlRequest_GetRawUrl ( - NW_HED_ContentHandler_GetUrlRequest (thisObj))); - } - - NW_THROWIF_ERROR (status = NW_Url_GetBase(urlStorage, &urlBase)); - NW_THROWIF_ERROR (status = NW_Url_GetBase(currentUrlStorage, &currentUrlBase)); - - /* compare the current url with the specified */ - match = (NW_Str_Strlen (currentUrlBase) != NW_Str_Strlen (urlBase)) || NW_Str_Strncmp (currentUrlBase, urlBase, NW_Str_Strlen (currentUrlStorage)); - - /* create the fragment Text object */ - if (match == 0) - { - if (NW_Url_GetFragId (urlStorage, &fragmentStorage, 0) == KBrsrSuccess) - { - *fragment = (NW_Text_t*) - NW_Text_UCS2_New (fragmentStorage, 0, NW_Text_Flags_TakeOwnership); - } - - /* - ** else the frag is missing. In this case we want to show the page's default - ** fragment (the top of the page). This is done by returning a null fragment - ** with a return value of KBrsrSuccess. - */ - } - - /* the url bases do not match so return failure */ - else - { - NW_Mem_Free (fragmentStorage); - - status = KBrsrFailure; - NW_THROW_ERROR(); - } - - /* clean up after us */ - if (urlFreeNeeded) - { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - urlFreeNeeded = NW_FALSE; - } - - NW_Mem_Free ((NW_Ucs2*) urlBase); - NW_Mem_Free ((NW_Ucs2*) currentUrlBase); - - return KBrsrSuccess; - - NW_CATCH_ERROR - if (urlFreeNeeded) - { - NW_Mem_Free ((NW_Ucs2*) urlStorage); - } - - NW_Mem_Free (fragmentStorage); - NW_Mem_Free ((NW_Ucs2*) urlBase); - NW_Mem_Free ((NW_Ucs2*) currentUrlBase); - - return status; - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_LoadFragment (NW_XHTML_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - NW_HED_HistoryStack_t* history = NULL; - NW_HED_HistoryEntry_t* entry = NULL; - NW_HED_HistoryEntry_t* currentEntry = NULL; - const NW_Text_t* url = NULL; - const NW_Text_t* fragment = NULL; - TBrowserStatusCode status = KBrsrFailure; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_THROWIF_NULL (docRoot); - - NW_THROWIF_NULL (history = NW_HED_DocumentRoot_GetHistoryStack (docRoot)); - - /* - ** get the fragment, an error will be thrown if the url's base doesn't match the - ** base of the url used to load this content handler. - */ - NW_THROWIF_NULL (url = NW_HED_UrlRequest_GetUrl (urlRequest)); - NW_THROWIF_ERROR (status = NW_XHTML_ContentHandler_GetFragment (thisObj, url, - (const NW_Text_t**) & fragment)); - - /* urls that don't contain a fragment shouldn't be handled internally. */ - if (fragment == NULL) - { - status = KBrsrFailure; - NW_THROW_ERROR (); - } - - /* show the frag */ - status = NW_XHTML_ContentHandler_ShowFragment (thisObj, fragment); - if (status != KBrsrNotFound) - { - - NW_THROWIF_ERROR(status); - - /* add history entry */ - if (NW_HED_UrlRequest_IsHistoricRequest (urlRequest) == NW_FALSE) - { - NW_THROWIF_NULL (entry = NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry (thisObj, - url, url)); - NW_THROWIF_ERROR (status = NW_HED_HistoryStack_PushEntry (history, entry)); - entry = NULL; - - NW_Object_Delete (urlRequest); - urlRequest = NULL; - } - - /* update the content handler to point to the associated history entry */ - NW_THROWIF_NULL (currentEntry = NW_HED_HistoryStack_GetEntry (history, - NW_HED_HistoryStack_Direction_Current)); - NW_THROWIF_ERROR (status = NW_HED_ContentHandler_SetAssociatedHistoryEntry ( - thisObj, currentEntry)); - - } - - NW_Object_Delete ((NW_Text_t*) fragment); - - return KBrsrSuccess; - - NW_CATCH_ERROR - NW_Object_Delete ((NW_Text_t*) fragment); - NW_Object_Delete (entry); - - return status; - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_DeleteFormLiaison (NW_XHTML_ContentHandler_t* thisObj) - { - NW_ADT_Vector_Metric_t nodeCtxSize = NW_ADT_Vector_GetSize(thisObj->nodeContexts); - for (NW_ADT_Vector_Metric_t i = 0 ; i < nodeCtxSize; i++) - { - NW_XHTML_Form_Node_Context_t* formCtx = - *(NW_XHTML_Form_Node_Context_t**)NW_ADT_Vector_ElementAt - (thisObj->nodeContexts, i); - NW_XHTML_FormLiaison_t* formLiaison = (NW_XHTML_FormLiaison_t*)formCtx->formLiaison; - NW_Object_Delete(formLiaison); - formCtx->formLiaison = NULL; - delete formCtx ; - } - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_RestoreControlSet (NW_XHTML_ContentHandler_t* thisObj) - { - NW_HED_DocumentRoot_t* documentRoot; - NW_HED_HistoryEntry_t* entry; - NW_Object_Dynamic_t* controlValueSet; - const NW_HED_UrlRequest_t *urlReq; - - documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_THROWIF_NULL (documentRoot); - - NW_THROWIF_NULL (entry = NW_HED_HistoryStack_GetEntry (documentRoot->historyStack, - NW_HED_HistoryStack_Direction_Current)); - - NW_THROWIF_NULL (urlReq = NW_HED_HistoryEntry_GetUrlRequest (entry)); - - NW_THROWIF_NULL (thisObj->historyContentData = - NW_HED_HistoryEntry_GetContentDataHolder (entry)); - - NW_THROWIF_ERROR(NW_Object_Shared_OrphanObject(thisObj->historyContentData, - &controlValueSet)); - - /* - ** clear the cached form values if we are reloading the document, - ** otherwise restore them. - */ - if (NW_HED_UrlRequest_GetReason (urlReq) == NW_HED_UrlRequest_Reason_ShellReload) - { - NW_Object_Delete (controlValueSet); - } - else - { - thisObj->controlValueSet = NW_ADT_DynamicVectorOf(controlValueSet); - } - - return KBrsrSuccess; - - NW_CATCH_ERROR - return KBrsrFailure; - } - -// ----------------------------------------------------------------------------- -static -NW_HED_Context_t* -NW_XHTML_GetGlobalContext (NW_XHTML_ContentHandler_t* thisObj) - { -#if 1 /* use this one if we want to support wml-variables in xhtml */ - NW_HED_DocumentRoot_t* docRoot = NULL; - - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - return NW_HED_DocumentRoot_GetContext (docRoot, NW_HED_DocumentRoot_ContextGlobalId); -#else /* otherwise use this one */ - - NW_REQUIRED_PARAM (thisObj); - - return NULL; -#endif - - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshCreateTimer(NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT(thisObj); - - NW_TRY (status) - { - if (thisObj->metaRefreshTimer == NULL) - { - thisObj->metaRefreshTimer = - NW_System_Timer_New(NW_XHTML_ContentHandler_MetaRefreshTimerCallback, - thisObj, (thisObj->metaRefreshSeconds * 1000), NW_FALSE); - NW_THROW_OOM_ON_NULL(thisObj->metaRefreshTimer, status); - } - } - NW_CATCH (status) - {} - NW_FINALLY { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -static -void -NW_XHTML_ContentHandler_MetaRefreshDestroyTimer(NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT(thisObj); - - if (thisObj->metaRefreshTimer != NULL) - { - NW_Object_Delete (thisObj->metaRefreshTimer); - thisObj->metaRefreshTimer = NULL; - } - } - -// ----------------------------------------------------------------------------- -static -void -NW_XHTML_ContentHandler_MetaRefreshSuspendTimer(NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT(thisObj); - - if (thisObj->metaRefreshTimer != NULL) - { - /* return status is ignored */ - (void) NW_System_Timer_Stop(thisObj->metaRefreshTimer); - } - } - -// ----------------------------------------------------------------------------- -static -void -NW_XHTML_ContentHandler_MetaRefreshResumeTimer(NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT(thisObj); - - if (thisObj->metaRefreshTimer != NULL) - { - /* return status is ignored */ - (void) NW_System_Timer_Resume(thisObj->metaRefreshTimer); - } - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshStartLoad(NW_XHTML_ContentHandler_t* thisObj) - { - NW_HED_DocumentRoot_t* docRoot; - - NW_ASSERT(thisObj); - - NW_ASSERT(thisObj->metaRefreshResolvedUrl); - - NW_TRY (status) - { - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode(thisObj); - NW_THROWIF_NULL(docRoot); - - status = NW_HED_DocumentRoot_StartLoad(docRoot, - NW_HED_DocumentNodeOf(docRoot), - thisObj->metaRefreshResolvedUrl, - thisObj->metaRefreshLoadReason, - NULL, - NW_UrlRequest_Type_Any, NW_CACHE_NOCACHE); - _NW_THROW_ON_ERROR(status); - } - NW_CATCH (status) - { - NW_CATCH_ERROR - if (status != KBrsrSuccess) - { - NW_HED_DocumentNode_HandleError(thisObj, - NW_HED_ContentHandler_GetUrlRequest(thisObj), - BRSR_STAT_CLASS_GENERAL, - (NW_WaeError_t) status); - } - } - NW_FINALLY { - /* metaRefreshResolvedUrl will never be used again. */ - if (thisObj->metaRefreshResolvedUrl != NULL) - { - NW_Object_Delete (thisObj->metaRefreshResolvedUrl); - thisObj->metaRefreshResolvedUrl = NULL; - } - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshTimerCallback(void* timerData) - { - TBrowserStatusCode status; - NW_XHTML_ContentHandler_t* thisObj; - - NW_ASSERT(timerData); - - /* cast timerData to aggregate */ - thisObj = NW_XHTML_ContentHandlerOf(timerData); - - NW_XHTML_ContentHandler_MetaRefreshDestroyTimer(thisObj); - status = NW_XHTML_ContentHandler_MetaRefreshStartLoad(thisObj); - - return status; - } - - -// ----------------------------------------------------------------------------- -static -void -NW_XHTML_ContentHandler_ActivateImageMapBox( NW_XHTML_ContentHandler_t* thisObj ) - { - NW_ASSERT( thisObj ); - - // loop through the image map boxes and create area list for each of them - if ( thisObj->imageMapLookupTable ) - { - // imageElement list - CMapElementList* mapElementList = (CMapElementList*)thisObj->imageMapLookupTable; - TInt mapElementCount = mapElementList->MapElementCount(); - for ( TInt i = 0; i < mapElementCount; i++ ) - { - CMapElementEntry* entry = mapElementList->MapElementEntry( i ); - - // get image map boxes. note that one useMap can hold multiple - // image map boxes. - CImageMapBoxList* imageMapBoxList = entry->ImageMapBoxList(); - NW_DOM_ElementNode_t* domNode = entry->DomNode(); - // initailaze image map unless either the <img usemap= or - // <map name= is missing. - if ( imageMapBoxList && domNode ) - { - TInt imageListCount = imageMapBoxList->Count(); - for ( TInt j = 0; j < imageListCount; j++ ) - { - // get image element handler - const NW_XHTML_ElementHandler_t* imageElementHandler = - NW_XHTML_ElementHandlerOf( &NW_XHTML_imgElementHandler ); - NW_LMgr_ImageMapBox_t* imageMapBox = imageMapBoxList->At( j ); - // call create area list on every image boxes unless the image box - // has already been initialized with the area boxes -do not create - // areaboxes twice - if ( !NW_LMgr_ImageMapBox_GetAreaBoxList( imageMapBox ) ) - { - // ignore return value - (void)NW_XHTML_imgElementHandler_CreateAreaList( - imageElementHandler, thisObj, domNode, NW_LMgr_BoxOf( imageMapBox ) ); - } - } - } - } - } - } - -// ----------------------------------------------------------------------------- -static -TBrowserStatusCode -NW_XHTML_ContentHandler_DeleteAllElementHandlerInstances(NW_XHTML_ContentHandler_t *thisObj) -{ - NW_ADT_MapIterator_t iterator; - - NW_Object_Invalidate (&iterator); - - NW_TRY (status) { - /* create an iterator */ - status = NW_ADT_MapIterator_Initialize (&iterator, thisObj->iElementHandlerMap); - NW_THROW_ON_ERROR (status); - - while (NW_ADT_Iterator_HasMoreElements (&iterator)) { - void* key; - CBase* elementHandler; - - status = NW_ADT_Iterator_GetNextElement (&iterator, &key); - NW_ASSERT (status == KBrsrSuccess); - - status = NW_ADT_Map_Get (thisObj->iElementHandlerMap, &key, &elementHandler); - NW_THROW_ON_ERROR (status); - - if (elementHandler) { - delete elementHandler; - } - } - - NW_ADT_Map_Clear (thisObj->iElementHandlerMap); - } - - NW_CATCH (status) { - } - - NW_FINALLY { - NW_Object_Terminate (&iterator); - return status; - } NW_END_TRY -} - -// ----------------------------------------------------------------------------- -const -NW_XHTML_ContentHandler_Class_t NW_XHTML_ContentHandler_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_HED_CompositeContentHandler_Class, - /* querySecondary */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_XHTML_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_ContentHandler_t), - /* construct */ _NW_XHTML_ContentHandler_Construct, - /* destruct */ _NW_XHTML_ContentHandler_Destruct - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_XHTML_ContentHandler_Cancel, - /* partialLoadCallback */ NULL, - /* initialize */ _NW_XHTML_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_HED_ContentHandler_GetBoxTree, - /* processEvent */ _NW_XHTML_ContentHandler_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_XHTML_ContentHandler_Suspend, - /* resume */ _NW_XHTML_CompositeContentHandler_Resume, - /* allLoadsCompleted */ _NW_XHTML_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_XHTML_ContentHandler_LoseFocus, - /* gainFocus */ _NW_XHTML_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_XHTML_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_XHTML_ContentHandler_PartialNextChunk, - /* getTitle */ _NW_XHTML_ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_XHTML_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ _NW_XHTML_ContentHandler_CreateBoxTree, - /* handleRequest */ _NW_XHTML_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_HED_CompositeContentHandler */ - /* documentDisplayed */ _NW_XHTML_ContentHandler_DocumentDisplayed, - }, - /* (Kimono has this in Epoc32XhtmlContentHandler) */ - { /* NW_XHTML_ContentHandler */ - /* numModules */ 0, - /* modules */ NULL - } - }; - -// ----------------------------------------------------------------------------- -const -NW_Object_Class_t* const NW_XHTML_InterfaceList[] = - { - &NW_XHTML_ContentHandler_NumberCollector_Class, - NULL - }; - -// ----------------------------------------------------------------------------- -const -NW_Markup_NumberCollector_Class_t NW_XHTML_ContentHandler_NumberCollector_Class = - { - { /* NW_Object_Core */ - /* super */ &NW_Markup_NumberCollector_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_XHTML_ContentHandler_t, - NW_Markup_NumberCollector) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_NumberCollector_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Markup_NumberCollector */ - /* getBoxTree */ _NW_XHTML_ContentHandler_NumberCollector_GetBoxTree, - /* boxIsValid */ _NW_Markup_NumberCollector_BoxIsValid, - /* getHrefAttr */ _NW_XHTML_ContentHandler_NumberCollector_GetHrefAttr, - /* getAltAttr */ _NW_XHTML_ContentHandler_NumberCollector_GetAltAttr - } - }; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_Construct (NW_Object_Dynamic_t* dynamicObject, - va_list* argp) - { - NW_XHTML_ContentHandler_t* thisObj; - TBrowserStatusCode status; - const NW_HED_UrlRequest_t* urlRequest; - - NW_LOG0(NW_LOG_LEVEL2, "NW_XHTML_ContentHandler_Construct START"); - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (dynamicObject); - - /* invoke our superclass constructor */ - status = _NW_HED_CompositeContentHandler_Construct (dynamicObject, argp); - if (status != KBrsrSuccess) - { - return status; - } - - thisObj->domTree = NULL; - thisObj->title = NULL; - thisObj->baseElement = NULL; - thisObj->contentLocation = NULL; - thisObj->iBodyNode = NULL; - thisObj->nodeContexts = (NW_ADT_DynamicVector_t*) - NW_ADT_ResizableVector_New (sizeof (NW_XHTML_Form_Node_Context_t*), - 0, 5); - - if (thisObj->nodeContexts == NULL) - { - return KBrsrOutOfMemory; - } - thisObj->iElementHandlerMap = (NW_ADT_Map_t*) NW_ADT_ResizableMap_New ( - sizeof(NW_DOM_ElementNode_t*), sizeof(CBase*), 1, 1); - - if (thisObj->iElementHandlerMap == NULL) - { - NW_Object_Delete(thisObj->nodeContexts); - thisObj->nodeContexts = NULL; - - return KBrsrOutOfMemory; - } - - thisObj->processor = NULL; - thisObj->historyContentData = NULL; - thisObj->controlValueSet = NULL; - thisObj->controlSet = NULL; - thisObj->saveddeck = NW_FALSE; - thisObj->histload = NW_FALSE; - thisObj->reload = NW_FALSE; - - thisObj->htmlSubset = NW_XHTML_CONTENTHANDLER_IMODEHTMLEXT; - thisObj->metaRefreshSet = NW_FALSE; - thisObj->metaRefreshResolvedUrl = NULL; - thisObj->metaRefreshTimer = NULL; - - thisObj->ignoreFramesetElement = NW_FALSE; - thisObj->ignoreBodyElement = NW_FALSE; - thisObj->ignoreNoScriptElement = NW_TRUE; - - thisObj->imageMapLookupTable = NULL; - - // ZAL: find a better init value - thisObj->lastInitializedDomNode = 0; - - thisObj->stopInitEH = NW_FALSE; - thisObj->lastChunk = NW_FALSE; - thisObj->iScriptIsExecuted = NW_FALSE; - thisObj->iScriptIsResumed = NW_FALSE; - - // - thisObj->switchBackToNormalLayout = NW_FALSE; - - thisObj->formattingComplete = NW_FALSE; - - thisObj->scriptLoadComplete = NW_FALSE; - - thisObj->iBodyIsPresent = NW_FALSE; - - thisObj->metaNoCache = NW_FALSE; - thisObj->metaCacheExpires = NW_FALSE; - thisObj->metaExpiresDate = NULL; - - thisObj->iScriptCancelled = NW_FALSE; - thisObj->scriptLoadTransactionIds = (void*)(new RArray<TExternalScriptNode>); - if (!thisObj->scriptLoadTransactionIds) - { - return KBrsrOutOfMemory; - } - - thisObj->scriptNodes = (void*)(new RPointerArray<NW_XHTML_Script_Node_Context_t>(1)); - if (!thisObj->scriptNodes) - { - return KBrsrOutOfMemory; - } - - thisObj->formNodes = (void*)(new RPointerArray<NW_DOM_ElementNode_t>(1)); - - if (!thisObj->formNodes) - { - return KBrsrOutOfMemory; - } - - TRAPD(ret, thisObj->iMessageListener = new (ELeave) TMessageListener (thisObj)); - if (ret == KErrNoMemory) - { - return KBrsrOutOfMemory; - } - - /* - ** reset the global context if the request that created the content-handler - ** was started from a shell request, like the goto dialog or - ** hotlist dialog. See WML June2000 Specification section 10.4. - */ - urlRequest = va_arg (*argp, NW_HED_UrlRequest_t*); - NW_ASSERT (urlRequest); - NW_ASSERT (NW_Object_IsInstanceOf (urlRequest, &NW_HED_UrlRequest_Class)); - - if (NW_HED_UrlRequest_GetReason (urlRequest) == NW_HED_UrlRequest_Reason_ShellLoad) - { - NW_HED_Context_t* context; - - context = NW_XHTML_GetGlobalContext (thisObj); - - NW_HED_Context_Reset (context); - } - - /* - * Initialize a local copy of the CCSSVariableStyleSheet. Note that - * if it already exists this will efficiently get a copy of the - * reference. If not then it will be created on the spot. - */ - thisObj->variableStyleSheet = CCSSVariableStyleSheet::CreateSingleton(); - - NW_LOG0(NW_LOG_LEVEL2, "NW_XHTML_ContentHandler_Construct END"); - /* successful completion */ - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -void -_NW_XHTML_ContentHandler_Destruct (NW_Object_Dynamic_t* dynamicObject) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* cast the 'object' for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (dynamicObject); - - if (thisObj->iBodyNode && NW_Settings_GetEcmaScriptEnabled()) - { - NW_HED_DocumentRoot_t* documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - if (!documentRoot->documentListener->Exiting()) - { -#if !defined(__SERIES60_28__) && !defined(__SERIES60_27__) - // Don't execute scripts if the browser is exiting. It will crash - //R->ecma - //NW_Ecma_HandleEvent(documentRoot , thisObj->iBodyNode, thisObj->iBodyNode, NW_Ecma_Evt_OnUnload); -#endif - } - } - - NW_XHTML_ContentHandler_DeleteFormLiaison (thisObj); - - - NW_HED_DomTree_Delete (thisObj->domTree); - thisObj->domTree = NULL; - thisObj->baseElement = NULL; - NW_Str_Delete(thisObj->contentLocation); - NW_Object_Delete (thisObj->title); - thisObj->title = NULL; - thisObj->iScriptIsResumed = NW_FALSE; - - // if the document root reference the referrer url from this document - // set it to NULL - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (thisObj); - const NW_Text_t* referrerUrl = NW_HED_DocumentRoot_GetDocumentReferrer(docRoot); - const NW_HED_UrlResponse_t* urlResponse = NW_HED_ContentHandler_GetUrlResponse( thisObj ); - - if ( urlResponse && referrerUrl && referrerUrl == NW_HED_UrlResponse_GetUrl( urlResponse ) ) - { - NW_HED_DocumentRoot_SetDocumentReferrer(docRoot , NULL); - } - RArray<TExternalScriptNode>* scriptIds = STATIC_CAST(RArray<TExternalScriptNode>*, thisObj->scriptLoadTransactionIds); - if (scriptIds) - { - scriptIds->Close(); - delete scriptIds; - } - - RPointerArray<NW_XHTML_Script_Node_Context_t>* scriptNodeList = STATIC_CAST(RPointerArray<NW_XHTML_Script_Node_Context_t>*, - thisObj->scriptNodes); - if (scriptNodeList) - { - scriptNodeList->ResetAndDestroy(); - scriptNodeList->Close(); - delete scriptNodeList; - } - - RPointerArray<NW_DOM_ElementNode_t>* formNodes = (RPointerArray<NW_DOM_ElementNode_t>*)thisObj->formNodes; - { - formNodes->Reset(); - delete formNodes; - } - - - NW_Object_Delete (thisObj->nodeContexts); - thisObj->nodeContexts = NULL; - NW_XHTML_ContentHandler_DeleteAllElementHandlerInstances(thisObj); - NW_Object_Delete(thisObj->iElementHandlerMap); - thisObj->iElementHandlerMap = NULL; - - NW_Object_Delete (thisObj->processor); - - if (thisObj->metaRefreshResolvedUrl != NULL) - { - NW_Object_Delete (thisObj->metaRefreshResolvedUrl); - thisObj->metaRefreshResolvedUrl = NULL; - } - - if (thisObj->metaRefreshTimer != NULL) - { - NW_XHTML_ContentHandler_MetaRefreshDestroyTimer(thisObj); - } - - /* save any possible form control values to history */ - if (thisObj->controlSet != NULL) - { - if (thisObj->historyContentData != NULL) - { - NW_Object_Dynamic_t* controlValueSet; - - controlValueSet = (NW_Object_Dynamic_t*) - NW_XHTML_ControlSet_GetValueVector (thisObj->controlSet); - - (void) NW_Object_Shared_AdoptObject (thisObj->historyContentData, controlValueSet); - } - - NW_Object_Delete (thisObj->controlSet); - } - - if (thisObj->controlValueSet != NULL) - { - NW_Object_Delete (thisObj->controlValueSet); - } - - if (thisObj->imageMapLookupTable != NULL) - { - delete static_cast<CMapElementList*>(thisObj->imageMapLookupTable); - thisObj->imageMapLookupTable = NULL; - } - - NW_Str_Delete(thisObj->metaExpiresDate); - delete thisObj->iMessageListener; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_Cancel(NW_HED_DocumentNode_t* documentNode, - NW_HED_CancelType_t cancelType) - { - TBrowserStatusCode status; - NW_XHTML_ContentHandler_t* thisObj; - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - // cast into the 'thisObj' pointer for convenience - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - // stop the META-Refresh timer if it is running - NW_XHTML_ContentHandler_MetaRefreshDestroyTimer(thisObj); - - thisObj->iScriptCancelled = NW_TRUE; - // cancel any executing event script - NW_HED_DocumentRoot_t *documentRoot = - (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - - RArray<TExternalScriptNode>* scriptIds = STATIC_CAST(RArray<TExternalScriptNode>*, thisObj->scriptLoadTransactionIds); - scriptIds->Reset(); - - if (thisObj->scriptNodes) - { - RPointerArray<NW_XHTML_Script_Node_Context_t>* scriptNodeList = STATIC_CAST(RPointerArray<NW_XHTML_Script_Node_Context_t>*, - thisObj->scriptNodes); - scriptNodeList->ResetAndDestroy(); - } - - // invoke super class cancel - status = NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - cancel(documentNode, cancelType); - - return status; - } - - -static TBrowserStatusCode NW_HTMLP_NotifyDocCompleteCallBack(void* context, - const NW_Buffer_t* residueWbxml, NW_Uint32 encoding, - NW_Uint32 codePageSwitchCount, NW_Int32 lastValid, void* WBXMLEncStrTbl) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_XHTML_ContentHandler_t* thisObj = (NW_XHTML_ContentHandler_t*) context; - NW_Buffer_t* buffer = (NW_Buffer_t*) residueWbxml; - - if (buffer != NULL) - { - if (!thisObj->domTree) - { - thisObj->domTree = NW_HED_DomTree_New(buffer, - (NW_Http_CharSet_t) encoding, - NW_xhtml_1_0_PublicId, - WBXMLEncStrTbl); - - /* init the domHelper */ - thisObj->domHelper.entitySet = NW_HED_EntitySetOf(&NW_XHTML_EntitySet); - thisObj->domHelper.context = NULL; - thisObj->domHelper.resolvePlainTextVariablesAndEntities = NW_TRUE; - - /* find the body element, if it exists */ - if (thisObj->domTree != NULL) - { - thisObj->baseElement = NW_HED_DomHelper_FindElement(&(thisObj->domHelper), - NW_HED_DomTree_GetRootNode(thisObj->domTree), - 3, NW_XHTML_ElementToken_base, 0, NULL); - } - else - { - status = KBrsrUnexpectedError; - } - } - - else - { - status = NW_HED_DomTree_Append(&thisObj->domTree, buffer, - (NW_Http_CharSet_t) encoding, NW_xhtml_1_0_PublicId, codePageSwitchCount, - lastValid, WBXMLEncStrTbl); - } - } - - return status; - } - - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_Initialize(NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode aInitStatus) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_HED_ContentHandler_t* contentHandler; - const NW_HED_UrlRequest_t* urlRequest; - NW_Uint32 encoding; - void* WBXMLEncStrTbl = NULL; - - NW_REQUIRED_PARAM(aInitStatus); - - NW_TRY(status) - { - NW_LOG0(NW_LOG_LEVEL2, "_NW_XHTML_ContentHandler_Initialize START"); - - // cast into the 'thisObj' pointer for convenience - thisObj = NW_XHTML_ContentHandlerOf(documentNode); - - NW_LOG0(NW_LOG_LEVEL2, - "in _NW_XHTML_ContentHandler_Initialize documentLoadComplete"); - - contentHandler = NW_HED_ContentHandlerOf(thisObj); - if ( NW_Asc_stricmp((char*)HTTP_application_xhtml_xml_saved_string, - (char*)contentHandler->response->contentTypeString) == 0 || - NW_Asc_stricmp((char*)HTTP_application_saved_string, - (char*)contentHandler->response->contentTypeString) == 0 ) - { - NW_XHTML_ContentHandler_SetSaveddeck(thisObj, NW_TRUE); - } - - urlRequest = NW_HED_ContentHandler_GetUrlRequest(contentHandler); - if(urlRequest != NULL && (NW_HED_UrlRequest_GetReason(urlRequest) == NW_HED_UrlRequest_Reason_ShellPrev)) - { - NW_XHTML_ContentHandler_SetHistoryLoad(thisObj, NW_TRUE); - } - - if(urlRequest != NULL && (NW_HED_UrlRequest_GetReason(urlRequest) == NW_HED_UrlRequest_Reason_ShellReload)) - { - NW_XHTML_ContentHandler_SetReLoad(thisObj, NW_TRUE); - } - - - // do not call node initialize on the handler if there are external - // script loads pending. If load count > 0 then super class is - // initialized in the function _NW_XHTML_DocumentNode_HandleLoadComplete - - - // when document loading is complete, let the parser know about it - // as it might have some leftovers to process - if (thisObj->htmlpParser) - { - NW_HTMLP_NotifyDocComplete(thisObj->htmlpParser, &encoding, - &WBXMLEncStrTbl, NW_HTMLP_NotifyDocCompleteCallBack, thisObj); - - thisObj->htmlpParser = NULL; - } - - // in case select is the last part of page, we always leave it processed in the next chunk - // if there's no more chunk, we still want to process select - thisObj->lastChunk = NW_TRUE; - // make sure we've got the dom tree - if (!thisObj->domTree) - { - NW_LOG0(NW_LOG_LEVEL1, "_NW_XHTML_ContentHandler_Initialize: BadContent error: domTree null"); - } - - - NW_THROW_ON_NULL(thisObj->domTree, status, KBrsrXhtmlBadContent); - - status = NW_XHTML_ContentHandler_InitializeElementHandlers( thisObj ); - // Do we really wanna jump to the end and leaving out - // initialization if something fails on initelemhandlers? - _NW_THROW_ON_ERROR(status); - - - NW_Uint16 token = NW_HED_DomHelper_GetElementToken( thisObj->lastInitializedDomNode ); - if(token == NW_XHTML_ElementToken_style || - token == NW_XHTML_ElementToken_title || - token == NW_XHTML_ElementToken_script || - token == NW_XHTML_ElementToken_select || - token == NW_XHTML_ElementToken_object || - token == NW_XHTML_ElementToken_map || - token == NW_XHTML_ElementToken_textarea || - token == NW_XHTML_ElementToken_table || - token == NW_XHTML_ElementToken_a) - { - - NW_HED_DocumentRoot_t* docRoot = NULL; - - // set the default priority on this chunk - CActive :: TPriority priorirty = (( CActive::TPriority )( CActive::EPriorityStandard )); - - docRoot = ( NW_HED_DocumentRoot_t* ) NW_HED_DocumentNode_GetRootNode( thisObj ); - ( void ) docRoot->documentListener->DocumentChangedPartial( docRoot, priorirty ); - } - - // create area list on each image map box - NW_XHTML_ContentHandler_ActivateImageMapBox(thisObj); - - // no more partial content comes. - - // invalidate prev ecma script context - - // invoke our superclass method - - status = NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - initialize(documentNode, KBrsrSuccess); - - NW_LOG0(NW_LOG_LEVEL2, "_NW_XHTML_ContentHandler_Initialize END"); - -#ifdef _DEBUG1 - if (thisObj->domTree != NULL) - { - NW_HED_DomHelper_PrintTree (&thisObj->domHelper, NW_HED_DomTree_GetRootNode (thisObj->domTree) ); - - } -#endif - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - return status; - } - NW_END_TRY -} - - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ContentHandler_PartialNextChunk( NW_HED_ContentHandler_t* contentHandler, - NW_Int32 chunkIndex, NW_Url_Resp_t* response, - void* context) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_ASSERT( contentHandler != NULL ); - NW_LOG1( NW_LOG_LEVEL2, "_NW_XHTML_ContentHandler_PartialNextChunk starts: chunkIndex: %d", chunkIndex); - -#ifdef __WINS__ - - if ( response != NULL && response->body != NULL ) - { - char* buffer; - buffer = (char*)malloc( response->body->length + 1 ); - if (buffer != NULL) - { - memcpy( (void*)buffer, (const void*)response->body->data, response->body->length ); - buffer[ response->body->length ] = 0; - FILE* stream = fopen( "chunks.txt", "a+" ); /* open for reading and appending */ - if (stream != NULL) - { - fprintf((FILE*)stream, "\n\n========== Chunk %d ==============\n", chunkIndex ); - fprintf((FILE*)stream, "%s", buffer ); - fflush((FILE*)stream); - fclose((FILE*)stream); - } - } - free( (void*)buffer); - } -#endif // _WINS_ - - NW_TRY( status ) - { - // set the default priority on this chunk - CActive::TPriority priorirty = ((CActive::TPriority)( CActive::EPriorityLow + 2 )); - NW_HED_DocumentRoot_t* docRoot; - const NW_HED_UrlRequest_t* urlRequest; - // cast into the 'thisObj' pointer for convenience - thisObj = NW_XHTML_ContentHandlerOf( contentHandler ); - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_Bool oldBodyIsPresent = thisObj->iBodyIsPresent; - // make sure we have a valid response - NW_THROW_ON_NULL( response, status, KBrsrUnexpectedError ); - // first chunk. - if ( chunkIndex == 0 ) - { - // set body to false - thisObj->iBodyIsPresent = NW_FALSE; - // - NW_Bool disableSmallScreen; - // invoke superclass - status = NW_HED_ContentHandler_Class.NW_HED_ContentHandler.partialNextChunk( - contentHandler, chunkIndex, response, context ); - // response has been released by the base class call. - response = NULL; - _NW_THROW_ON_ERROR( status ); - - // disable ss on xhtml pages. - disableSmallScreen = (NW_Bool)( NW_Asc_stricmp( - (char*)HTTP_application_vnd_wap_xhtml_xml_string, - (char*)contentHandler->response->contentTypeString ) == 0 ); - NW_Settings_SetDisableSmallScreenLayout( disableSmallScreen ); - - // if the current layout is Normal layout or ss is enabled, switch to vertical layout. - if ( !NW_Settings_GetVerticalLayoutEnabled() && !disableSmallScreen ) - { - NW_Settings_SetInternalVerticalLayoutEnabled( NW_TRUE ); - thisObj->switchBackToNormalLayout = NW_TRUE; - } - - // get rid of the old title (if any) - (void) NW_XHTML_ContentHandler_SetTitle( thisObj, NULL ); - - // get the controlSet from the history - status = NW_XHTML_ContentHandler_RestoreControlSet( thisObj ); - _NW_THROW_ON_ERROR( status ); - - // build the dom tree out of the first chunk - status = NW_XHTML_ContentHandler_CreatePartialDocument( thisObj, - contentHandler->response, NW_TRUE ); - _NW_THROW_ON_ERROR( status ); - - // Must mark as a saved deck before we initialize the element - // handlers and make requests - if( NW_Asc_stricmp((char*)HTTP_application_xhtml_xml_saved_string, - (char*)contentHandler->response->contentTypeString) == 0 || - NW_Asc_stricmp((char*)HTTP_application_saved_string, - (char*)contentHandler->response->contentTypeString) == 0 ) - { - NW_XHTML_ContentHandler_SetSaveddeck(thisObj, NW_TRUE); - } - urlRequest = NW_HED_ContentHandler_GetUrlRequest(contentHandler); - if(urlRequest != NULL && (NW_HED_UrlRequest_GetReason(urlRequest) == NW_HED_UrlRequest_Reason_ShellPrev)) - { - NW_XHTML_ContentHandler_SetHistoryLoad(thisObj, NW_TRUE); - } - - if(urlRequest != NULL && (NW_HED_UrlRequest_GetReason(urlRequest) == NW_HED_UrlRequest_Reason_ShellReload)) - { - NW_XHTML_ContentHandler_SetReLoad(thisObj, NW_TRUE); - } - - // initialize partial element handlers - status = NW_XHTML_ContentHandler_InitializeElementHandlers( thisObj ); - _NW_THROW_ON_ERROR( status ); - } - else if ( chunkIndex != -1 ) - { - // build the dom tree out of the chunk - status = NW_XHTML_ContentHandler_AppendPartialDocument( thisObj, response ); - _NW_THROW_ON_ERROR( status ); - - status = NW_XHTML_ContentHandler_InitializeElementHandlers( thisObj ); - _NW_THROW_ON_ERROR( status ); - } - else - { - // this function musn't be called with the last partial response that has no body. - // Initialize must be called instead - NW_ASSERT( NW_TRUE ); - } - // if this is the first chunk where the body is present, then set - // the formatting priority higher - if( !oldBodyIsPresent && thisObj->iBodyIsPresent ) - { - // higher priority - priorirty = CActive::EPriorityStandard; - } - // let the shell know about the new partial document so that it can initiate - // update display message. - // if small screen layout is not disabled do not update. - // mobile profile pages do not format correctly when tables span - // chunks. - if( thisObj->iBodyIsPresent && !NW_Settings_GetDisableSmallScreenLayout() ) - { - (void)docRoot->documentListener->DocumentChangedPartial( docRoot, priorirty ); - } - } - NW_CATCH( status ) - { - // special handling for the "need more data" case which means - // that the parser needs more chunks to process the buffer. - // it is not an error case so the status has to be - // modified to success - if ( status == KBrsrBufferTooSmall ) - { - status = KBrsrSuccess; - } - } - NW_FINALLY - { - // body ownership is taken by the parser - // free the response - UrlLoader_UrlResponseDelete( response ); - NW_LOG1( NW_LOG_LEVEL2, "_NW_XHTML_ContentHandler_PartialNextChunk ends: status: %d", status); - return status; - } - NW_END_TRY - } - - -// ----------------------------------------------------------------------------- -NW_Uint8 -_NW_XHTML_ContentHandler_ProcessEvent (NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event, - void* context) - { - NW_XHTML_ContentHandler_t* thisObj; - const NW_XHTML_ElementHandler_t* elementHandler; - - /* cast the 'object' for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - /* the context that was passed in is in reality a 'NW_DOM_Node_t*' - use that - to find the appropriate ElementHandler and invoke its processEvent - method */ - elementHandler = - NW_XHTML_ContentHandler_GetElementHandler (NW_XHTML_ContentHandlerOf (documentNode), - (NW_DOM_ElementNode_t*) context); - NW_ASSERT (elementHandler != NULL); - return NW_XHTML_ElementHandler_ProcessEvent (elementHandler, thisObj, - (NW_DOM_ElementNode_t*) context, - box, event); - } - -// ----------------------------------------------------------------------------- -void -_NW_XHTML_ContentHandler_Suspend (NW_HED_DocumentNode_t* documentNode, NW_Bool aDestroyBoxTree) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - /* stop the META-Refresh timer if it is running */ - NW_XHTML_ContentHandler_MetaRefreshDestroyTimer(thisObj); - - if (thisObj->processor) - { - NW_CSS_Processor_Suspend(thisObj->processor); - } - - //reset the script nodes as the boxes in the scriptNode contexts are deleted - if (thisObj->scriptNodes) - { - RPointerArray<NW_XHTML_Script_Node_Context_t>* scriptNodeList = STATIC_CAST(RPointerArray<NW_XHTML_Script_Node_Context_t>*, - thisObj->scriptNodes); - scriptNodeList->ResetAndDestroy(); - } - - //R->ecma - //NW_HED_DocumentRoot_t* documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - //(void) NW_Ecma_InvalidateFormsElements(documentRoot); - - /* invoke our superclass */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode.suspend(documentNode, aDestroyBoxTree); - } -//------------------------------------------------------------------------------ -void -_NW_XHTML_CompositeContentHandler_Resume (NW_HED_DocumentNode_t* documentNode) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - /* invoke our superclass */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode.resume(documentNode); - - thisObj->iScriptIsResumed = NW_TRUE; - } - -// ----------------------------------------------------------------------------- -void -_NW_XHTML_ContentHandler_AllLoadsCompleted (NW_HED_DocumentNode_t* documentNode) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_Msg_Message_t* message = NULL; - NW_Text_t* fragment = NULL; - const NW_Text_t* url = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - - /* call our super class to notify the children */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode. - allLoadsCompleted (documentNode); - - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - - NW_TRY (status) - { - - /* get the fragment */ - url = NW_HED_UrlRequest_GetUrl (NW_HED_ContentHandler_GetUrlRequest - (thisObj)); - status = NW_XHTML_ContentHandler_GetFragment (thisObj, url, - (const NW_Text_t**) & fragment); - - /* show the frag */ - if ((status == KBrsrSuccess) && (fragment != NULL)) - { - /* - ** we need to use a message to display the fragment because we need - ** to wait until the box-tree is laid out -- which is also done via - ** a message. - */ - - /* create the message */ - message = NW_Msg_Message_New (NW_XHTML_ContentHandler_Msg_ShowFragment, - fragment, NW_TRUE); - NW_THROW_OOM_ON_NULL (message, status); - - fragment = NULL; - - /* dispatch it */ - status = NW_Msg_MessageDispatcher_DispatchMessage (&NW_Msg_MessageDispatcher, message, thisObj->iMessageListener); - NW_THROW_ON_ERROR (status); - - message = NULL; - } - } - NW_CATCH (status) - { - NW_Object_Delete (fragment); - NW_Object_Delete (message); - } - NW_FINALLY { - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -void -_NW_XHTML_ContentHandler_LoseFocus (NW_HED_DocumentNode_t* documentNode) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - /* suspend the META-Refresh timer if it is running */ - NW_XHTML_ContentHandler_MetaRefreshSuspendTimer(thisObj); - - /* invoke our superclass */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode.loseFocus(documentNode); - } - -// ----------------------------------------------------------------------------- -void -_NW_XHTML_ContentHandler_GainFocus (NW_HED_DocumentNode_t* documentNode) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (documentNode); - - - /* invoke our superclass */ - NW_HED_CompositeContentHandler_Class.NW_HED_DocumentNode.gainFocus(documentNode); - - /* resume the META-Refresh timer if it was running */ - NW_XHTML_ContentHandler_MetaRefreshResumeTimer(thisObj); - } - -// ----------------------------------------------------------------------------- -// after loading last chunk of embedded content the function is called -// by documentroot. -// If the transactionId exits in scriptIds list , it is removed from the pendginglist -void -_NW_XHTML_DocumentNode_HandleLoadComplete(NW_HED_DocumentNode_t* documentNode, - const NW_HED_UrlRequest_t *urlRequest, - NW_Int16 errorClass, - TBrowserStatusCode error, - NW_Uint16 /*aTransactionId*/, - void* context ) - { - //check if the transaction is a script load request and decrement the counter - NW_REQUIRED_PARAM(urlRequest); - NW_REQUIRED_PARAM(errorClass); - NW_REQUIRED_PARAM(error); - NW_REQUIRED_PARAM(context); - NW_REQUIRED_PARAM(documentNode); - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (documentNode, - &NW_XHTML_ContentHandler_Class)); - /* for convenience */ - NW_LOG0( NW_LOG_LEVEL2, "NW_XHTML_DocumentNode_HandleLoadComplete Start" ); - NW_LOG0( NW_LOG_LEVEL2, "NW_XHTML_DocumentNode_HandleLoadComplete End" ); - } - - -// ----------------------------------------------------------------------------- -const NW_Text_t* -_NW_XHTML_ContentHandler_GetTitle (NW_HED_ContentHandler_t* contentHandler) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (contentHandler); - - /* return the title */ - return thisObj->title; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_ResolveURL (NW_HED_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t** retUrl) - { - NW_Uint8 freeLoadUrl = NW_FALSE; - NW_String_t baseUrl; - NW_String_t href; - NW_String_t contentLoc; - NW_Ucs2* compositeBase = NULL; - NW_DOM_Node_t* baseElement; - NW_Ucs2 *contentLocation = NULL; - void* docUrl = NULL; - const NW_Ucs2* loadUrl = NULL; - NW_Text_UCS2_t* absUrlText = NULL; - NW_Ucs2* absUrl = NULL; - NW_Bool isRelative; - - baseUrl.length = 0; - baseUrl.storage = NULL; - - href.length = 0; - href.storage = NULL; - contentLoc.length = 0; - contentLoc.storage = NULL; - - NW_TRY(status) - { - /* get the url as a ucs2 char string */ - loadUrl = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, NULL, &freeLoadUrl); - NW_THROW_OOM_ON_NULL((void*)loadUrl, status); - - if(!NW_Text_GetCharCount(url)) - { - isRelative = NW_TRUE; - } - else - { - /* if the supplied URL is absolute we simply return that */ - status = NW_Url_IsRelative (loadUrl, &isRelative); - _NW_THROW_ON_ERROR (status); - } - if ( isRelative == NW_FALSE) - { - if (freeLoadUrl) - { - NW_Mem_Free ((NW_Ucs2*) loadUrl); - } - /*make a deep copy of the text */ - *retUrl = NW_Text_Copy(url, NW_TRUE); - NW_THROW_OOM_ON_NULL(*retUrl, status); - NW_Object_Delete (url); - return KBrsrSuccess; - } - - /* Get the the document's url. The result is not owned by us. */ - docUrl = - NW_HED_UrlResponse_GetUrl( NW_HED_ContentHandler_GetUrlResponse( thisObj ) )->storage; - NW_THROW_OOM_ON_NULL(docUrl, status); - - /* - * If the URL was the result of a file operation, then we want the - * response URL rather than - * the request URL. This is to support save-to-file operations. If it wasn't the result of - * a file operation, then the response URL should be the same as the request. - */ - if (NW_Str_Strncmp((const NW_Ucs2*)docUrl, (const NW_Ucs2*)NW_STR("file://"), 7) == 0) - { - docUrl = NW_HED_UrlResponse_GetUrl - (NW_HED_ContentHandler_GetUrlResponse (thisObj))->storage; - NW_THROW_OOM_ON_NULL(docUrl, status); - } - - /* get the base url as found in the "base" element */ - baseElement = NW_XHTML_ContentHandler_GetBaseElement(thisObj); - - /*get the content location id present*/ - contentLocation = NW_XHTML_ContentHandler_GetContentLocation(thisObj); - - if(contentLocation != NULL && baseElement == NULL) - { - - status = StatusCodeConvert(NW_String_ucs2CharToString (&contentLoc, contentLocation, HTTP_iso_10646_ucs_2)); - NW_THROW_ON_ERROR (status); - status = NW_Url_IsRelative (contentLocation, &isRelative); - NW_THROW_ON_ERROR (status); - if (isRelative == NW_TRUE) - { - status = NW_Url_RelToAbs ((const NW_Ucs2*)docUrl, (const NW_Ucs2 *) contentLoc.storage, - &compositeBase); - NW_THROW_ON_ERROR (status); - - status = NW_HED_DomHelper_CatUcs2String (&baseUrl, compositeBase); - NW_THROW_ON_ERROR (status); - - NW_Mem_Free (compositeBase); - compositeBase = NULL; - } - /* otherwise use the base */ - else - { - status = NW_HED_DomHelper_CatString (&baseUrl, &contentLoc, HTTP_iso_10646_ucs_2); - NW_THROW_ON_ERROR (status); - } - } - - - if (baseElement != NULL) - { - status = - NW_HED_DomHelper_GetHTMLAttributeValue - (&((NW_XHTML_ContentHandler_t *) thisObj)->domHelper, baseElement, - NW_XHTML_AttributeToken_href, &href); - - if (status == KBrsrSuccess) - { - /* - * if the base element is a relative url the base-url is formed by cat'ing the - * document's url with the base. - */ - status = NW_Url_IsRelative ((const NW_Ucs2*) href.storage, &isRelative); - NW_THROW_ON_ERROR (status); - if (isRelative == NW_TRUE) - { - status = NW_Url_RelToAbs ((const NW_Ucs2*)docUrl, (const NW_Ucs2 *) href.storage, - &compositeBase); - NW_THROW_ON_ERROR (status); - - status = NW_HED_DomHelper_CatUcs2String (&baseUrl, compositeBase); - NW_THROW_ON_ERROR (status); - - NW_Mem_Free (compositeBase); - compositeBase = NULL; - } - /* otherwise use the base */ - else - { - status = NW_HED_DomHelper_CatString (&baseUrl, &href, HTTP_iso_10646_ucs_2); - NW_THROW_ON_ERROR (status); - } - - NW_String_deleteStorage (&href); - } - } - - /* - * if the base-url is still null just use the document's url as the - * base-url */ - if (baseUrl.storage == NULL) - { - status = NW_HED_DomHelper_CatUcs2String (&baseUrl, (const NW_Ucs2*)docUrl); - NW_THROW_ON_ERROR (status); - } - - if(!NW_Str_Strlen(loadUrl)) - { - absUrl = NW_Str_Newcpy((const NW_Ucs2*) baseUrl.storage); - NW_THROW_OOM_ON_NULL(absUrl, status); - } - else - { - /* construct the absolute URL */ - status = NW_Url_RelToAbs ((const NW_Ucs2*) baseUrl.storage, loadUrl, &absUrl); - NW_THROW_ON_ERROR (status); - } - - absUrlText = NW_Text_UCS2_New (absUrl, 0, NW_Text_Flags_TakeOwnership); - NW_THROW_OOM_ON_NULL(absUrlText, status); - absUrl = NULL; - - /* fall through */ - - } - - NW_CATCH (status) - { /* empty */ - } - - NW_FINALLY { - - if (freeLoadUrl == NW_TRUE) - { - NW_Mem_Free ((NW_Ucs2*) loadUrl); - } - - NW_String_deleteStorage (&baseUrl); - NW_String_deleteStorage (&href); - NW_String_deleteStorage (&contentLoc); - NW_Mem_Free (absUrl); - NW_Mem_Free (compositeBase); - - if (status == KBrsrSuccess) - { - NW_Object_Delete (url); - } - - *retUrl = (NW_Text_t*) absUrlText; - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_CreateBoxTree (NW_HED_ContentHandler_t* contentHandler, - NW_LMgr_Box_t** boxTree) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_DOM_Node_t* domNode; - const NW_XHTML_ElementHandler_t* elementHandler; - NW_LMgr_BidiFlowBox_t* bidiFlowBox = NULL; - NW_LMgr_Property_t prop; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, - &NW_XHTML_ContentHandler_Class)); - - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (contentHandler); - - thisObj->ignoreFramesetElement = NW_FALSE; - thisObj->ignoreBodyElement = NW_FALSE; - - NW_TRY (status) - { -#ifdef _DEBUG1 - NW_HED_DomHelper_PrintTree(&thisObj->domHelper, NW_HED_DomTree_GetRootNode(thisObj->domTree)); -#endif - // if the box tree is Not null then update the box tree with the new content - if (*boxTree) - { - - status = NW_XHTML_ContentHandler_CreatePartialBoxTree(thisObj, boxTree); - // Set the prevInitializedDom. This denotes the last node for which the - // box tree was created and will be used as a starting point when the - // next chunk comes - _NW_THROW_ON_ERROR(status); - } - else - { - /* create a BidiFlowBox in which to build the box tree */ - bidiFlowBox = NW_LMgr_BidiFlowBox_New (1); - NW_THROW_OOM_ON_NULL (bidiFlowBox, status); - - /* Set the display property on the container */ - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_block; - NW_LMgr_Box_SetProperty (NW_LMgr_BoxOf (bidiFlowBox), - NW_CSS_Prop_display, &prop); - - /* The root node is the so-called document node and is basically - a holder for some general document info such as encoding. */ - domNode = NW_HED_DomTree_GetRootNode (thisObj->domTree); - NW_THROW_ON_NULL (domNode, status, KBrsrUnexpectedError); - - /* The actual content of the document starts with the root's children. */ - for (domNode = NW_DOM_Node_getFirstChild (domNode); - domNode != NULL ; - domNode = NW_DOM_Node_getNextSibling (domNode)) - { - thisObj->prevInitializedDomNode = domNode; - - elementHandler = NW_XHTML_ContentHandler_GetElementHandler (thisObj, - (NW_DOM_ElementNode_t*) domNode); - NW_ASSERT(elementHandler != NULL); - if (elementHandler != NULL) - { - status = NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, - thisObj, - domNode, - NW_LMgr_ContainerBoxOf(bidiFlowBox)); - _NW_THROW_ON_ERROR(status); - } - } - - /* next is a little optimization to eliminate excess top-level nesting */ - if (NW_LMgr_ContainerBox_GetChildCount(NW_LMgr_ContainerBoxOf(bidiFlowBox)) - == 1) - { - NW_LMgr_BidiFlowBox_t* tempFlowBox = - ((NW_LMgr_BidiFlowBox_t*) - NW_LMgr_ContainerBox_GetChild(NW_LMgr_ContainerBoxOf(bidiFlowBox), 0)); - if (NW_Object_IsClass(tempFlowBox, &NW_LMgr_BidiFlowBox_Class)) - { - NW_LMgr_Box_Detach(NW_LMgr_BoxOf(tempFlowBox)); - NW_Object_Delete(bidiFlowBox); - bidiFlowBox = tempFlowBox; - } - } - } // else - } - NW_CATCH (status) - { - if (bidiFlowBox) - { - NW_Object_Delete(bidiFlowBox); - bidiFlowBox = NULL; - } - if (status != KBrsrOutOfMemory) - { - // ZAL: changed temporarily to distinguish create box - // tree error from parser errors. - status = KBrsrSavedPageFailed; - } - NW_HED_DocumentNode_HandleError( contentHandler, - NW_HED_ContentHandler_GetUrlRequest(contentHandler), - BRSR_STAT_CLASS_GENERAL, status); - } - NW_FINALLY - { -#ifdef _DEBUG1 - NW_HED_DomHelper_PrintTree(&thisObj->domHelper, NW_HED_DomTree_GetRootNode(thisObj->domTree)); -#endif - if (bidiFlowBox) - { - *boxTree = NW_LMgr_BoxOf(bidiFlowBox); - } - // if the boxtree creation is exited , then thisObj->prevInitializedDomNode is - // set by the function call NW_XHTML_ContentHandler_BreakBoxTreeCreation(...) - thisObj->prevInitializedDomNode = thisObj->lastInitializedDomNode; - return status; - } - NW_END_TRY - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_HandleRequest (NW_HED_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest) - { - TBrowserStatusCode status; - - NW_ASSERT (NW_HED_UrlRequestOf (urlRequest)); - - /* don't handle reload requests here */ - if (NW_HED_UrlRequest_GetReason (urlRequest) == NW_HED_UrlRequest_Reason_ShellReload) - { - return KBrsrFailure; - } - - /* don't handle post requests here */ - if (NW_HED_UrlRequest_GetMethod (urlRequest) == NW_URL_METHOD_POST) - { - return KBrsrFailure; - } - - /* jump to the fragment if one is provided */ - status = NW_XHTML_ContentHandler_LoadFragment (NW_XHTML_ContentHandlerOf ( - thisObj), urlRequest); - - return status; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -_NW_XHTML_ContentHandler_DocumentDisplayed (NW_HED_ContentHandler_t* contentHandler) - { - NW_XHTML_ContentHandler_t* thisObj; - - /* for convenience */ - thisObj = NW_XHTML_ContentHandlerOf (contentHandler); - - NW_TRY (status) - { - if (thisObj->metaRefreshSet) - { - // Clear RefreshSet to only allow refresh once, in case URL is - // invalid or some other type of error occurs. - thisObj->metaRefreshSet = FALSE; - if (thisObj->metaRefreshSeconds <= 0) - { - status = NW_XHTML_ContentHandler_MetaRefreshStartLoad(thisObj); - _NW_THROW_ON_ERROR(status); - } - else - { - /* start a timer for the refresh delay */ - status = NW_XHTML_ContentHandler_MetaRefreshCreateTimer(thisObj); - _NW_THROW_ON_ERROR(status); - } - } - - const NW_Ucs2* rawUrl = NW_HED_UrlRequest_GetRawUrl (NW_HED_ContentHandler_GetUrlRequest(NW_HED_ContentHandlerOf(contentHandler))); - if(thisObj->metaNoCache) - { -//R->ul UrlLoader_ClearItemInCache( rawUrl ); - } - - if(thisObj->metaCacheExpires == NW_TRUE) - { -//R->ul UrlLoader_SetHeaderInCache(rawUrl, (unsigned char*) expires, thisObj->metaExpiresDate); - } - - - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - - // check the content type of the response - if ( thisObj->switchBackToNormalLayout ) - { - // switch back to normal - // but first make sure we have to switch at all as imagine the following case - // 1. original status is normal - // 2. first chunk cames in, we switch to ss mode ( content type is text/html ) - // 3. pi element handler disables ss mode ( mobile profile ) - // 4. formatting is carried on in normal mode - // 5. execution comes here and we trying to switch to normal mode - // 6. MHEDDocumentListener::SwitchLayout replaces boxes ( tables ) - // so all the static table box will be transformed to vertical box eventhough - // we are in normal mode - // so change only if we are really really in ss mode. - NW_Bool smallScreenMode = NW_Settings_GetVerticalLayoutEnabled(); - NW_Settings_SetInternalVerticalLayoutEnabled( NW_FALSE ); - if ( smallScreenMode ) - { - (void) docRoot->documentListener->SwitchLayout (NW_FALSE, NW_TRUE /*reformatBoxTree*/); - - NW_CSS_Processor_t* processor = NW_XHTML_ContentHandler_GetCSSProcessor( thisObj ); - - if ( processor != NULL ) - { - NW_CSS_Processor_ProcessPendingLoads( processor ); - } - } - thisObj->switchBackToNormalLayout = NW_FALSE; - } - } - NW_CATCH (status) - {} - NW_FINALLY - { - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -const NW_XHTML_ElementHandler_t* -NW_XHTML_ContentHandler_GetElementHandler (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* domElement) - { - int i; - int numModules; - - // NW_LOG1(NW_LOG_LEVEL2, "contetnHandler: %x", contentHandler ); - - /* text nodes handled at content handler level */ - if (NW_DOM_Node_getNodeType (domElement) == NW_DOM_TEXT_NODE) - { - // NW_LOG1(NW_LOG_LEVEL2, "NW_XHTML_TextElementHandler: %x", &NW_XHTML_TextElementHandler ); - return NW_XHTML_ElementHandlerOf (&NW_XHTML_TextElementHandler); - } - - /* PI nodes handled at content handler level */ - if (NW_DOM_Node_getNodeType (domElement) - == NW_DOM_PROCESSING_INSTRUCTION_NODE) - { - // NW_LOG1(NW_LOG_LEVEL2, "NW_XHTML_PiElementHandler: %x", &NW_XHTML_PiElementHandler ); - return NW_XHTML_ElementHandlerOf (&NW_XHTML_PiElementHandler); - } - - /* iterate through the module table */ - NW_Uint16 tagToken = NW_HED_DomHelper_GetElementToken (domElement); - numModules = NW_XHTML_ContentHandler_GetClassPart (contentHandler).numModules; - for (i = 0; i < numModules; i++) - { - NW_XHTML_ElementHandler_t* elementHandler; - - /* query the module for an appropriate ElementHandler */ - const NW_Markup_Module_t* module = - NW_XHTML_ContentHandler_GetClassPart (contentHandler).modules[i]; - elementHandler = (NW_XHTML_ElementHandler_t*) - NW_Markup_WBXMLModule_GetHandler (module, tagToken); - - /* we found one, return it */ - if (elementHandler != NULL) - { - // NW_LOG1(NW_LOG_LEVEL2, "ElementHandler: %x", elementHandler ); - return elementHandler; - } - } - /* no ElementHandler was found, so we return the generic - ElementHandler - this will at least allow us to traverse the - children of this unknown node */ - // NW_LOG1(NW_LOG_LEVEL2, "NW_XHTML_ElementHandler: %x", &NW_XHTML_ElementHandler ); - return &NW_XHTML_ElementHandler; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_GetDOMAttribute (NW_XHTML_ContentHandler_t* thisObj, - NW_DOM_ElementNode_t* elementNode, - const NW_Uint16 token, NW_Text_t** text_t) - { - TBrowserStatusCode status; - NW_String_t value; - NW_Text_t *attributeValue = NULL; - - /* get the attribute */ - status = NW_HED_DomHelper_GetHTMLAttributeValue - (&thisObj->domHelper, elementNode, token, &value); - - /* convert it to a NW_Text */ - if (status == KBrsrSuccess) - { - attributeValue = NW_Text_New (HTTP_iso_10646_ucs_2, (void*) NW_String_getStorage (&value), - NW_String_getCharCount (&value, HTTP_iso_10646_ucs_2), - (NW_Uint8) (NW_String_getUserOwnsStorage (&value) ? NW_Text_Flags_TakeOwnership : 0)); - } - *text_t = attributeValue; - /* return the result */ - return status; - } - -// ----------------------------------------------------------------------------- -NW_Text_t* -NW_XHTML_GetDOMTextNodeData(NW_XHTML_ContentHandler_t* thisObj, - NW_DOM_TextNode_t* textNode) - { - TBrowserStatusCode status; - NW_String_t value; - NW_Text_t *text = NULL; - NW_Uint32 encoding; - - NW_REQUIRED_PARAM (thisObj); - NW_ASSERT(textNode != NULL); - - /* extract the text from the element */ - status = NW_HED_DomHelper_GetText (&thisObj->domHelper, textNode, - NW_TRUE, &value, &encoding); - - - /* convert it to a NW_Text */ - if (status == KBrsrSuccess) - { - NW_Uint8 flag = 0; - - if (NW_String_getUserOwnsStorage (&value) == NW_TRUE) - { - flag = NW_Text_Flags_TakeOwnership; - } - - text = NW_Text_New (encoding, value.storage, NW_String_getCharCount (&value, - encoding), flag); - } - - return text; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_StartRequest(NW_XHTML_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - void* clientData ) - { - return NW_XHTML_ContentHandler_StartRequest_tId(thisObj, urlRequest, clientData , NULL); - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_StartRequest_tId(NW_XHTML_ContentHandler_t* thisObj, - NW_HED_UrlRequest_t* urlRequest, - void* clientData , NW_Uint16* aTransationId) - { - TBrowserStatusCode status; - const NW_Ucs2* origUrl = NULL; - NW_Ucs2* escapedUrl = NULL; - NW_Text_t* resolvedUrl = NULL; - NW_Text_t* retUrl = NULL; - NW_HED_DocumentRoot_t* docRoot; - NW_HED_DocumentNode_t* owner = NULL; - NW_Url_Schema_t schema = NW_SCHEMA_INVALID; - NW_Ucs2* resolvedUrlUcs2 = NULL; - CBodyPart* bodyPart = NULL; - TBool isUrlInMultipart = EFalse; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (urlRequest != NULL); - - /* get the orig url as a ucs2 string */ - status = KBrsrOutOfMemory; - NW_THROWIF_NULL (origUrl = NW_HED_UrlRequest_GetRawUrl (urlRequest)); - - /* ensure that the url is escaped correctly */ - status = KBrsrOutOfMemory; - - NW_THROWIF_NULL (escapedUrl = NW_Str_New(NW_Url_EscapeUnwiseLen(origUrl))); - NW_Url_EscapeUnwise(origUrl, escapedUrl); - - NW_Url_GetSchemeNoValidation(escapedUrl, &schema); - - /* resolve the url */ - status = KBrsrOutOfMemory; - resolvedUrl = NW_Text_New (HTTP_iso_10646_ucs_2, escapedUrl, 0, NW_Text_Flags_TakeOwnership); - NW_THROWIF_NULL (resolvedUrl); - escapedUrl = NULL; - - - if (schema != NW_SCHEMA_WTAI) { - status = NW_HED_ContentHandler_ResolveURL (thisObj, resolvedUrl, &retUrl ); - _NW_THROW_ON_ERROR(status); - - /* give ownership back to resolvedUrl */ - resolvedUrl = retUrl; - retUrl = NULL; - } - - /* update the UrlRequest with the resolved url */ - NW_THROWIF_ERROR (status = NW_HED_UrlRequest_UpdateUrl (urlRequest, resolvedUrl)); - - /* issue the request */ - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - - // load owner is the docroot unless this is a non top level request - owner = NW_HED_DocumentNodeOf( docRoot ); - if ( NW_HED_UrlRequest_IsTopLevelRequest( urlRequest ) != NW_TRUE ) - { - owner = NW_HED_DocumentNodeOf( thisObj ); - } - - // compare url with body part - NW_Uint8 freeNeeded; - resolvedUrlUcs2 = NW_Text_GetUCS2Buffer( resolvedUrl, NULL, NULL, &freeNeeded); - isUrlInMultipart = _NW_HED_CompositeContentHandler_IsUrlInMultipart( - NW_HED_CompositeContentHandlerOf(thisObj), - resolvedUrlUcs2, &bodyPart ); - if( freeNeeded ) - { - NW_Mem_Free( resolvedUrlUcs2 ); - } - - if( isUrlInMultipart ) - { - TDataType dataType( bodyPart->ContentType() ); - - TUint8* charset = (TUint8*) bodyPart->Charset().Ptr(); - TInt lenCh = bodyPart->Charset().Length(); - CShell* shell = REINTERPRET_CAST(CShell*, NW_Ctx_Get(NW_CTX_BROWSER_APP, 0)); - NW_ASSERT(shell); - TInt32 uidInt = shell->GetUidFromCharset( charset, lenCh ); - TUid uid = TUid::Uid( uidInt ); - //R - /* - CBrCtl* brCtl = shell->BrCtl(); - brCtl->LoadDataL( bodyPart->Url(), bodyPart->Body(), dataType, uid, - owner, clientData, NULL, aTransationId, - urlRequest->loadType, urlRequest->method );*/ - } - else - { - // Check if SendReferrerHeader is enabled - if ( NW_Settings_GetSendReferrerHeader() && docRoot->referrerUrl != NULL) - { // Set Referrer Header - NW_Text_Length_t urlLength; - NW_Uint8 urlFreeNeeded = NW_FALSE; - - // convert the url to Unicode and get the storage - NW_Ucs2* referrerUrl = (NW_Ucs2*) NW_Text_GetUCS2Buffer (docRoot->referrerUrl, - NW_Text_Flags_NullTerminated | NW_Text_Flags_Aligned, - &urlLength, &urlFreeNeeded); - - SetReferrerHeader(urlRequest, referrerUrl); - - if (urlFreeNeeded) - { - NW_Mem_Free(referrerUrl); - } - } - - status = NW_HED_DocumentRoot_StartRequest_tId (docRoot, owner, urlRequest, clientData , aTransationId); - } - - NW_Object_Delete (resolvedUrl); - resolvedUrl = NULL; - - return status; - -_NW_CATCH: - NW_CATCH_ERROR - NW_Str_Delete (escapedUrl); - NW_Object_Delete (resolvedUrl); - - return status; - } -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_StartLoad(NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* url, - NW_Uint8 reason, - void* clientData, - NW_Uint8 loadType) - { - return NW_XHTML_ContentHandler_StartLoad_tId (thisObj, url, reason, - clientData, loadType, NULL); - - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_StartLoad_tId (NW_XHTML_ContentHandler_t* thisObj, - const NW_Text_t* url, - NW_Uint8 reason, - void* clientData, - NW_Uint8 loadType, NW_Uint16* aTransationId) - { - - NW_HED_UrlRequest_t* request; - - NW_ASSERT (thisObj != NULL); - NW_ASSERT (url != NULL); - - NW_TRY (status) - { - /* make a UrlRequest */ - if (NW_HED_UrlRequest_Reason_DocLoadHead != reason) - { - request = NW_HED_UrlRequest_New (NW_TextOf (url), NW_URL_METHOD_GET, NULL, - NULL, reason, NW_HED_UrlRequest_LoadNormal, loadType); - } - else - { - request = NW_HED_UrlRequest_New(NW_TextOf (url), NW_URL_METHOD_HEAD, NULL, - NULL, reason, NW_HED_UrlRequest_LoadNormal, loadType); - } - - NW_THROW_OOM_ON_NULL (request, status); - - if (NW_XHTML_ContentHandler_IsSaveddeck(thisObj) && - NW_HED_UrlRequest_Reason_DocLoadChild == reason && - // Allow to load a plugin from a saved page, because the user explicitly requested it - loadType != NW_UrlRequest_Type_Plugin) - { - NW_HED_UrlRequest_SetCacheMode(request, NW_CACHE_ONLYCACHE); - } - - if(NW_XHTML_ContentHandler_IsHistoryLoad(thisObj) && - NW_HED_UrlRequest_Reason_DocLoadChild == reason) - { - NW_HED_UrlRequest_SetCacheMode(request, NW_CACHE_HISTPREV); - } - - if(NW_XHTML_ContentHandler_IsReLoad(thisObj) && - NW_HED_UrlRequest_Reason_DocLoadChild == reason) - { - NW_HED_UrlRequest_SetCacheMode(request, NW_CACHE_NOCACHE); - } - - /* pass it to StartRequest to be satisfied */ - status = NW_XHTML_ContentHandler_StartRequest_tId (thisObj, request, clientData , aTransationId); - _NW_THROW_ON_ERROR (status); - } - NW_CATCH (status) - { - if (request) - { - NW_Object_Delete(request); - } - } - NW_FINALLY { - return status; - } NW_END_TRY - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_SetLoadObserver(NW_XHTML_ContentHandler_t* thisObj, - NW_Uint16 aTransationId, - MHEDLoadObserver* aLoadObserver) - { - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (thisObj); - - return NW_HED_DocumentRoot_SetLoadObserver(docRoot, aTransationId, aLoadObserver); - } - -// ----------------------------------------------------------------------------- -NW_CSS_Processor_t* -NW_XHTML_ContentHandler_CreateCSSProcessor(NW_XHTML_ContentHandler_t* thisObj) - { - if (thisObj->processor == NULL) - { - thisObj->processor = NW_CSS_Processor_New(); - if (thisObj->processor != NULL) - { - NW_CSS_Processor_SetOwner(thisObj->processor, NW_HED_DocumentNodeOf(thisObj)); - NW_CSS_Processor_SetDictionary(thisObj->processor, - (NW_WBXML_Dictionary_t *) & NW_XHTML_WBXMLDictionary); - NW_CSS_Processor_SetApplyCSSCallback(thisObj->processor, - NW_XHTML_ElementHandler_ApplyCSSCallback); - thisObj->processor->isSavedDeck = NW_XHTML_ContentHandler_IsSaveddeck(thisObj); - thisObj->processor->isHistLoad = NW_XHTML_ContentHandler_IsHistoryLoad(thisObj); - thisObj->processor->isReLoad = NW_XHTML_ContentHandler_IsReLoad(thisObj); - - } - } - return thisObj->processor; - } - -// ----------------------------------------------------------------------------- -NW_WBXML_Dictionary_t* -NW_XHTML_ContentHandler_GetDictionary(NW_XHTML_ContentHandler_t* contentHandler) - { - NW_REQUIRED_PARAM(contentHandler); - return (NW_WBXML_Dictionary_t *) & NW_XHTML_WBXMLDictionary; - } - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_AddFormLiaison( - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* formNode) - { - TBrowserStatusCode status = KBrsrSuccess; - NW_XHTML_FormLiaison_t* formLiaison; - NW_XHTML_ContentHandler_t* thisObj = NW_XHTML_ContentHandlerOf (contentHandler); - - /* make sure we have a control set */ - if (contentHandler->controlSet == NULL) - { - /* no control set; make sure we have a value set */ - if (contentHandler->controlValueSet == NULL) - { - /* no value set; make an empty one */ - contentHandler->controlValueSet = - (NW_ADT_DynamicVector_t*) NW_ADT_ResizableObjectVector_New(0, 5); - if (contentHandler->controlValueSet == NULL) - { - return KBrsrOutOfMemory; - } - } - - contentHandler->controlSet = - NW_XHTML_ControlSet_New(contentHandler->controlValueSet); - if (contentHandler->controlSet == NULL) - { - return KBrsrOutOfMemory; - } - contentHandler->controlValueSet = NULL; /* controlSet now has ownership */ - } - - formLiaison = NW_XHTML_FormLiaison_New(formNode, - contentHandler, - contentHandler->controlSet); - if (formLiaison == NULL) - { - return KBrsrOutOfMemory; - } - - NW_XHTML_Form_Node_Context_t* formContext = new NW_XHTML_Form_Node_Context_t; - //lint -e{774} Boolean within 'if' always evaluates to False - if (formContext != NULL) - { - formContext->formNode = formNode; - formContext->formLiaison = (NW_FBox_FormLiaison_t*)formLiaison; - - // append formContext to nodeContext vector - if (NW_ADT_DynamicVector_InsertAt - (thisObj->nodeContexts, &formContext, NW_ADT_Vector_AtEnd ) == NULL) - { - status = KBrsrOutOfMemory; - } - } - else - { - status = KBrsrOutOfMemory; - } - - - if (status != KBrsrSuccess) - { - NW_Object_Delete(formLiaison); - } - - return status; - } - -// ----------------------------------------------------------------------------- -NW_FBox_FormLiaison_t* -NW_XHTML_ContentHandler_GetFormLiaison(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) - { - NW_XHTML_FormLiaison_t* formLiaison = NULL; - NW_DOM_ElementNode_t* node = NULL; - NW_XHTML_ContentHandler_t* thisObj = NW_XHTML_ContentHandlerOf (contentHandler); - - - if (elementNode != NULL) - { - node = NW_XHTML_ContentHandler_GetFormNode(contentHandler,elementNode); - if (node != NULL) - { - //if we found the form, get the associated form liaison */ - NW_ADT_Vector_Metric_t nodeCtxSize = NW_ADT_Vector_GetSize(thisObj->nodeContexts); - for (NW_ADT_Vector_Metric_t i = 0 ; i < nodeCtxSize; i++) - { - NW_XHTML_Form_Node_Context_t* formCtx = - *(NW_XHTML_Form_Node_Context_t**)NW_ADT_Vector_ElementAt (thisObj->nodeContexts, i); - if (formCtx->formNode == node ) - { - formLiaison = (NW_XHTML_FormLiaison_t*)formCtx->formLiaison; - break; - } - } - } - } - return NW_FBox_FormLiaisonOf(formLiaison); - } - - -/* ------------------------------------------------------------------------- * - NW_Markup_NumberCollector methods - * ------------------------------------------------------------------------- */ - -// ----------------------------------------------------------------------------- -NW_LMgr_Box_t* -_NW_XHTML_ContentHandler_NumberCollector_GetBoxTree (NW_Markup_NumberCollector_t* - numberCollector) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_LMgr_Box_t* boxTree; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_XHTML_ContentHandler_NumberCollector_Class)); - - /* for convenience */ - thisObj = static_cast<NW_XHTML_ContentHandler_t*> - (NW_Object_Aggregate_GetAggregator (numberCollector)); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ContentHandler_Class)); - - /* return the box tree */ - (void) NW_HED_DocumentNode_GetBoxTree (thisObj, &boxTree); - return boxTree; - } - -/* ------------------------------------------------------------------------- * - NW_Markup_NumberCollector methods - * ------------------------------------------------------------------------- */ - - -// ----------------------------------------------------------------------------- -NW_Text_t* -_NW_XHTML_ContentHandler_NumberCollector_GetHrefAttr (NW_Markup_NumberCollector_t* - numberCollector, - NW_LMgr_Box_t* box) - { - NW_XHTML_ContentHandler_t* thisObj; - NW_HED_EventHandler_t* eventHandler = NULL; - NW_DOM_ElementNode_t* elementNode; - NW_Text_t* text = NULL; - NW_Text_t* retUrl = NULL; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_XHTML_ContentHandler_NumberCollector_Class)); - NW_ASSERT(NW_Object_IsInstanceOf(box, &NW_LMgr_ActiveContainerBox_Class)); - - /* for convenience */ - thisObj = static_cast<NW_XHTML_ContentHandler_t*> - (NW_Object_Aggregate_GetAggregator (numberCollector)); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ContentHandler_Class)); - - - eventHandler = (NW_HED_EventHandler_t *)((NW_LMgr_ActiveContainerBoxOf(box))->eventHandler); - elementNode = (NW_DOM_ElementNode_t *)(eventHandler->context); - if(NW_LMgr_ActiveContainerBoxOf(box)->hrefAttr != NULL) - { - text = NW_Text_Copy(NW_LMgr_ActiveContainerBoxOf(box)->hrefAttr, NW_TRUE); - } - else - { - NW_XHTML_GetDOMAttribute (thisObj, elementNode, NW_XHTML_AttributeToken_href, &text); - } - if (text) - { - (void)NW_HED_ContentHandler_ResolveURL ((NW_HED_ContentHandler_t *)thisObj, text, &retUrl); - text = retUrl; - } - return text; - } - -// ----------------------------------------------------------------------------- -NW_Text_t* -_NW_XHTML_ContentHandler_NumberCollector_GetAltAttr (NW_Markup_NumberCollector_t* - numberCollector, - NW_LMgr_Box_t* box) - { - NW_LMgr_PropertyValue_t value; - NW_XHTML_ContentHandler_t* thisObj; - NW_Text_t* text = NULL; - NW_DOM_ElementNode_t* elementNode; - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (numberCollector, - &NW_XHTML_ContentHandler_NumberCollector_Class)); - - /* for convenience */ - thisObj = static_cast<NW_XHTML_ContentHandler_t*> - (NW_Object_Aggregate_GetAggregator (numberCollector)); - NW_ASSERT (NW_Object_IsInstanceOf (thisObj, &NW_XHTML_ContentHandler_Class)); - - value.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, - &value); - if (value.object) - { - elementNode = (NW_DOM_ElementNode_t *)(value.object); - NW_XHTML_GetDOMAttribute (thisObj, elementNode, NW_XHTML_AttributeToken_alt, &text); - } - return text; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_IsSaveddeck -// Description: Used for cache-only loading for embeded elements in saved file -// (other items were commented in a header). -// Returns: NW_Bool: true if the xhtml content is retrieved from saved deck -// false, otherwise -// ----------------------------------------------------------------------------- -// -NW_Bool -NW_XHTML_ContentHandler_IsSaveddeck(const NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT (thisObj); - return thisObj->saveddeck; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_IsHistoryLoad -// Description: Used for setting cache mode for embeded elements -// (other items were commented in a header). -// Returns: NW_Bool: true if the xhtml content is result of history load -// false, otherwise -// ----------------------------------------------------------------------------- -// -NW_Bool -NW_XHTML_ContentHandler_IsHistoryLoad(const NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT (thisObj); - return thisObj->histload; - } - - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_IsReLoad -// Description: Used for setting cache mode for embeded elements -// (other items were commented in a header). -// Returns: NW_Bool: true if the xhtml content is result of reload -// false, otherwise -// ----------------------------------------------------------------------------- -// -NW_Bool -NW_XHTML_ContentHandler_IsReLoad(const NW_XHTML_ContentHandler_t* thisObj) - { - NW_ASSERT (thisObj); - return thisObj->reload; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_SetSaveddeck -// Description: set the saveddeck boolean member -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_XHTML_ContentHandler_SetSaveddeck(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isSaveddeck) - { - NW_ASSERT (thisObj); - thisObj->saveddeck = isSaveddeck; - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_SetHistoryLoad -// Description: set the histload boolean member -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_XHTML_ContentHandler_SetHistoryLoad(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isHistLoad) - { - NW_ASSERT (thisObj); - thisObj->histload = isHistLoad; - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_SetReLoad -// Description: set the reload boolean member -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_XHTML_ContentHandler_SetReLoad(NW_XHTML_ContentHandler_t *thisObj, NW_Bool isReLoad) - { - NW_ASSERT (thisObj); - thisObj->reload = isReLoad; - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -// NW_XHTML_ContentHandler_MetaRefreshInitialize -// Description: Initialize the META refresh. If and only if returns success, the -// content handler object will take ownership of and assume responsibility for -// destructing the resolvedUrl object. Once initialized, the content handler -// object performs the META refresh when needed. -// Returns: TBrowserStatusCode -// ----------------------------------------------------------------------------- -// -TBrowserStatusCode -NW_XHTML_ContentHandler_MetaRefreshInitialize(NW_XHTML_ContentHandler_t* thisObj, - NW_Int32 seconds, - NW_Text_t* resolvedUrl, - NW_Uint8 loadReason) - { - NW_ASSERT (thisObj); - NW_ASSERT (resolvedUrl); - - /* Cannot be set more than once. */ - if (thisObj->metaRefreshSet) - { - return KBrsrUnexpectedError; - } - /* Save the variables for later. */ - thisObj->metaRefreshSet = NW_TRUE; - thisObj->metaRefreshSeconds = seconds; - thisObj->metaRefreshLoadReason = loadReason; - thisObj->metaRefreshResolvedUrl = resolvedUrl; // We own the object now. - return KBrsrSuccess; - } - -// ----------------------------------------------------------------------------- -void -NW_XHTML_ContentHandler_SetImageMapLookupTable(NW_XHTML_ContentHandler_t *thisObj, - void* imageMapLookupTable) - { - thisObj->imageMapLookupTable = imageMapLookupTable; - } - -// ----------------------------------------------------------------------------- -void -NW_XHTML_ContentHandler_SetReferrerUrl(NW_XHTML_ContentHandler_t *thisObj) - { - const NW_Text_t* url = - NW_HED_UrlResponse_GetUrl( NW_HED_ContentHandler_GetUrlResponse(thisObj)); - - NW_HED_DocumentRoot_t* docRoot = (NW_HED_DocumentRoot_t*) - NW_HED_DocumentNode_GetRootNode (thisObj); - - // The HTTP referrer header is being SET only if it is request from http or https. - //If it is any other request then don't set this. For example, link from the static - //file. - - if( (NW_Str_Strnicmp((const NW_Ucs2*) url->storage, (const NW_Ucs2*) NW_STR("http:"), 5) == 0) || - (NW_Str_Strnicmp((const NW_Ucs2*) url->storage, (const NW_Ucs2*) NW_STR("https:"), 6) == 0) ) - { - NW_HED_DocumentRoot_SetDocumentReferrer(docRoot , url); - } - else - { - NW_HED_DocumentRoot_SetDocumentReferrer(docRoot , NULL); - } -} - -// ----------------------------------------------------------------------------- -void* -NW_XHTML_ContentHandler_GetImageMapLookupTable(NW_XHTML_ContentHandler_t *thisObj) - { - return thisObj->imageMapLookupTable; - } - - -// the function appends the transactionId to a list of pending script load -// requests. The function is called from scriptelementhandler after issuing -// a load request from external scripts -TBrowserStatusCode -NW_XHTML_ContentHandler_AddToPendingScriptTids(NW_XHTML_ContentHandler_t *thisObj, const TExternalScriptNode& aScriptNodeId ) - { - TBrowserStatusCode status = KBrsrSuccess; - TBool foundScriptIndex = EFalse; - RArray<TExternalScriptNode>* scriptIds = STATIC_CAST(RArray<TExternalScriptNode>*, thisObj->scriptLoadTransactionIds); - TInt length = scriptIds->Count(); - for (TInt index = 0 ; index < length ; index++) - { - TExternalScriptNode& scriptNode = (*scriptIds)[index]; - if (scriptNode.iTransactionId == aScriptNodeId.iTransactionId ) - { - foundScriptIndex = ETrue; - break; - } - } - - - // append to the scriptTid list - if (!foundScriptIndex) - { - TInt err = scriptIds->Append(aScriptNodeId); - if ( err != KErrNone) - { - status = (err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure; - } - } - return status; - } -// the function returns the count of outstanding pending requests for external scripts -NW_Uint8 -NW_XHTML_ContentHandler_PendingScriptLoadCount(NW_XHTML_ContentHandler_t *thisObj) - { - RArray<TExternalScriptNode>* scriptIds = STATIC_CAST(RArray<TExternalScriptNode>*, thisObj->scriptLoadTransactionIds); - return (NW_Uint8)scriptIds->Count(); - } -// the function checks if the element node depends on the external scripts , -// To check for dependency , check if there are any external script nodes that were before aElementNode -NW_Bool -NW_XHTML_ContentHandler_IsScriptLoadPending(NW_XHTML_ContentHandler_t *thisObj, NW_DOM_ElementNode_t* aElementNode) - { - NW_Bool depends = NW_FALSE; - RArray<TExternalScriptNode>* scriptIds = STATIC_CAST(RArray<TExternalScriptNode>*, thisObj->scriptLoadTransactionIds); - // if the pending script count is 0 then return NW_FALSE - // check if the first script node in the pending list > aElementNode then return NW_FALSE, else NW_TRUE - if(scriptIds->Count()) - { - NW_DOM_ElementNode_t* scriptNode = (*scriptIds)[0].iScriptNode; - if (scriptNode->source_offset > aElementNode->source_offset) - { - depends = NW_FALSE; - } - else - { - depends = NW_TRUE; - } - } - else - { - depends = NW_FALSE; - } - return depends ; - } -// add the form node to the document form nodes list -TBrowserStatusCode -NW_XHTML_ContentHandler_AddFormNodes(NW_XHTML_ContentHandler_t *aThisObj, NW_DOM_ElementNode_t* aElementNode) - { - TBrowserStatusCode status = KBrsrSuccess; - RPointerArray<NW_DOM_ElementNode_t>* formNodes = (RPointerArray<NW_DOM_ElementNode_t>*)aThisObj->formNodes; - TInt err = formNodes->Append(aElementNode); - if ( err != KErrNone) - { - status = (err == KErrNoMemory) ? KBrsrOutOfMemory : KBrsrFailure; - } - return status; - } - -// Returns the form node for a given input element node. The mechanism used -// here to find the form node is to search through the array of form nodes in -// reverse, comparing the element's source offset with that of the form node -// until the form node's source offset is <= to the element's source offset. -// -// WARNING: -// -// This approach has a flaw in it. It assumes that the source offset is -// accurate; that all the items are inserted sequentially. However, this is not -// the case for script-generated forms. Script forms get parsed separately as -// though they are separate streams/files. The source offset then ends up being -// relative to the start of the script and not the top-level HTML. Hence, for -// these cases, the source offset is not reliable. -// -// One example use case as of this writing is the delete button of the inbox -// email for www.excite.com wasn't working because it has several forms on the -// page along with a script-generated form. -// -NW_DOM_ElementNode_t* -NW_XHTML_ContentHandler_GetFormNodeFromSourceOffset( - NW_XHTML_ContentHandler_t *aThisObj, NW_DOM_ElementNode_t* aElementNode) - { - NW_DOM_ElementNode_t* node = NULL; - // get all the form nodes in the document - RPointerArray<NW_DOM_ElementNode_t>* formNodes = (RPointerArray<NW_DOM_ElementNode_t>*)aThisObj->formNodes; - // check the under what umberall does the input element fall under - for (TInt nodeIndex = formNodes->Count()-1; nodeIndex >=0; nodeIndex--) - { - // the first formNode to have the offset <= elementNode offset , it is the candidate - NW_DOM_ElementNode_t* formNode = (*formNodes)[nodeIndex]; - if(formNode->source_offset <= aElementNode->source_offset) - { - node = formNode; - break; - } - } - return node; - } - -// Returns the form node for a given input element node. The mechanism used -// here to find the form nodes is to walk up the DOM tree until the parent -// form node is found. -// -// WARNING: -// -// This approach assumes the DOM tree is accurate with the form node always -// being the parent node of its form elements - as it should be. However, -// under certain circumstances of poorly structured HTML, the current DOM tree -// processing does not place the form node as a parent of the form elements. -// -// One example use case of an incorrect DOM tree as of this writing is from the -// Nokia test suite: -// testsuite.nokia-boston.com/s60accept/cannedSites/fedexCopy/fedex.html -// -NW_DOM_ElementNode_t* -NW_XHTML_ContentHandler_GetFormNodeFromDomTree( - NW_XHTML_ContentHandler_t *aThisObj, NW_DOM_ElementNode_t* aElementNode) - { - NW_REQUIRED_PARAM(aThisObj); - - NW_DOM_ElementNode_t* node = aElementNode; - - // Walk up the DOM tree until parent form node is found or top is reached. - while (node && (NW_DOM_Node_getNodeToken(node) != NW_XHTML_ElementToken_form)) - { - node = NW_DOM_Node_getParentNode(node); - } - return node; - } - -// Returns the form node for a given input element node or NULL if none. -// An attempt is made to first get the form node by walking up the DOM tree. -// The DOM tree isn't always accurate (described above); hence, as a backup if -// the form node isn't found by walking up the DOM tree, then a second approach -// is used - search the form node array using source offset. This 2nd approach -// is also not always accruate (described above) and is even less reliable. -// -// Given that both mechanisms of finding the form node do not always work, -// there is the possibility that the wrong form node (or none) will be returned -// for some theoretical poorly structured HTML. If this should arise, the more -// rebust solution is to fix the DOM parsing such that form element nodes are -// always descendants of their form node. -// -NW_DOM_ElementNode_t* -NW_XHTML_ContentHandler_GetFormNode(NW_XHTML_ContentHandler_t *aThisObj, NW_DOM_ElementNode_t* aElementNode) - { - NW_DOM_ElementNode_t* node = NULL; - - node = NW_XHTML_ContentHandler_GetFormNodeFromDomTree(aThisObj, aElementNode); - if (!node) - { - node = NW_XHTML_ContentHandler_GetFormNodeFromSourceOffset(aThisObj, aElementNode); - } - return node; - } - -// ----------------------------------------------------------------------------- -CBase* -NW_XHTML_ContentHandler_GetElementHandlerInstance(NW_XHTML_ContentHandler_t *thisObj, - NW_DOM_ElementNode_t* elementNode) -{ - TBrowserStatusCode status; - CBase* value; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(elementNode != NULL); - - status = NW_ADT_Map_Get(thisObj->iElementHandlerMap, &elementNode, &value); - - if ((status == KBrsrSuccess) && (value != NULL)) { - return value; - } - else { - return NULL; - } -} - -// ----------------------------------------------------------------------------- -TBrowserStatusCode -NW_XHTML_ContentHandler_SetElementHandlerInstance(NW_XHTML_ContentHandler_t *thisObj, - NW_DOM_ElementNode_t* elementNode, CBase* elementHandler) -{ - CBase* oldInstance; - - NW_ASSERT(thisObj != NULL); - NW_ASSERT(elementNode != NULL); - - // Delete the previous value - oldInstance = NW_XHTML_ContentHandler_GetElementHandlerInstance(thisObj, elementNode); - - // Disallow adding an existing context - if (oldInstance == elementHandler) { - return KBrsrSuccess; - } - - // Remove the previous context - if (oldInstance) { - (void) NW_ADT_Map_Remove(thisObj->iElementHandlerMap, &elementNode); - - delete oldInstance; - } - - // Add the context - return NW_ADT_Map_Set(thisObj->iElementHandlerMap, &elementNode, &elementHandler); -} - -// ----------------------------------------------------------------------------- -// Returns true if the media string passed to it contains one of the supported -// media types, all, handheld, or NULL. The syntax is defined in section 6.13 -// of the HTML 4.01 specification. -NW_Bool -NW_XHTML_ContentHandler_AllowableStylesheet(const NW_Ucs2* media, NW_Bool* isHandheld) - { - NW_Bool allowable = NW_FALSE; - - NW_ASSERT(isHandheld != NULL); - - *isHandheld = NW_FALSE; - - // A NULL value is acceptable. - if (media == NULL) - { - return NW_TRUE; - } - - do - { - const NW_Ucs2* valueEnd; - NW_Uint32 len; - - // Skip leading white space. - while (NW_Str_Isspace(*media)) - { - media++; - } - - // Scan forward until hit something other than alpha, digit, hyphen. - valueEnd = media; - while (NW_Str_Isalnum(*valueEnd) || (*valueEnd == (NW_Ucs2)'-')) - { - valueEnd++; - } - - // Try to match (case insensitive) with one of accepted media type strings. - len = valueEnd - media; - - if ((len == 3) && (NW_Str_StrnicmpConst(media, "all", 3) == 0)) - { - allowable = NW_TRUE; - } - - if ((len == 8) && (NW_Str_StrnicmpConst(media, "handheld", 8) == 0)) - { - *isHandheld = NW_TRUE; - allowable = NW_TRUE; - } - - // If doesn't match, scan forward for comma and if found repeat. - while (*valueEnd) - { - if (*valueEnd == ',') - { - valueEnd++; - break; - } - - valueEnd++; - } - - media = valueEnd; - } while (*media); - - return allowable; - } - -// ----------------------------------------------------------------------------- -// Enables mobile profile mode by disabling small screen layout and loading any -// pending external stylesheets. -void NW_XHTML_ContentHandler_EnableMobileProfileMode(NW_XHTML_ContentHandler_t* thisObj) - { - NW_CSS_Processor_t* processor = NULL; - - NW_ASSERT(thisObj != NULL); - - NW_Settings_SetDisableSmallScreenLayout(NW_TRUE); - - processor = NW_XHTML_ContentHandler_GetCSSProcessor(thisObj); - if(processor != NULL) - { - NW_CSS_Processor_ProcessPendingLoads(processor); - } - } - -// ----------------------------------------------------------------------------- -// Load or queue a request for an external stylesheet. -TBrowserStatusCode -NW_XHTML_ContentHandler_LoadStylesheet(NW_XHTML_ContentHandler_t* thisObj, - const NW_Ucs2* type, const NW_Ucs2* relation, const NW_Ucs2* media, - const NW_Ucs2* url, const NW_Ucs2* charset, const NW_Ucs2* alternate) - { - NW_Bool isHandheld; - NW_Bool allowable; - NW_CSS_Processor_t* processor = NULL; - NW_Text_t* urlText = NULL; - NW_Text_t* resolvedUrl = NULL; - NW_Text_t* charsetText = NULL; - - NW_ASSERT(thisObj != NULL); - - NW_TRY (status) - { - // Verify that the url isn't NULL. - if (url == NULL) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Verify that the type is text/css. - if ((type != NULL) && (NW_Str_StricmpConst(type, "text/css") != 0)) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Verify that the rel is stylesheet. - if ((relation != NULL) && (NW_Str_StricmpConst(relation, "stylesheet") != 0)) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Verify that the alternate is no. - if ((alternate != NULL) && (NW_Str_StricmpConst(alternate, "no") != 0)) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // Verify that the media is allowable. - if (media != NULL) - { - allowable = NW_XHTML_ContentHandler_AllowableStylesheet(media, &isHandheld); - - if (!allowable) - { - NW_THROW_STATUS(status, KBrsrFailure); - } - - // If a "handheld" stylesheet is found switch to mobile profile mode. - if (isHandheld) - { - NW_XHTML_ContentHandler_EnableMobileProfileMode(thisObj); - } - } - - // Resolve the url. - urlText = (NW_Text_t*) NW_Text_UCS2_New((void *) url, 0, 0); - NW_THROW_OOM_ON_NULL (urlText, status); - - status = NW_HED_ContentHandler_ResolveURL(thisObj, urlText, &resolvedUrl); - NW_THROW_ON_ERROR(status); - urlText = NULL; - - // Wrap the charset - if (charset != NULL) - { - charsetText = (NW_Text_t*) NW_Text_UCS2_New((void *) charset, 0, 0); - NW_THROW_OOM_ON_NULL(charsetText, status); - } - - // Get the CSS processor - processor = NW_XHTML_ContentHandler_CreateCSSProcessor(thisObj); - NW_THROW_ON_NULL(processor, status, KBrsrUnexpectedError); - - // Load or queue the stylesheet request. - status = NW_CSS_Processor_Load(processor, resolvedUrl, charsetText, - NW_XHTML_ContentHandler_IsSaveddeck(thisObj), NW_XHTML_ContentHandler_IsHistoryLoad(thisObj), - NW_XHTML_ContentHandler_IsReLoad(thisObj)); - NW_THROW_ON_ERROR(status); - - if (resolvedUrl) - { - NW_Object_Delete(resolvedUrl); - } - resolvedUrl = NULL; - charsetText = NULL; - } - - NW_CATCH (status) - { - NW_Object_Delete(urlText); - NW_Object_Delete(resolvedUrl); - NW_Object_Delete(charsetText); - } - - NW_FINALLY - { - return status; - } NW_END_TRY - } - - - -TBrowserStatusCode -NW_XHTML_ContentHandler_WindowOpen(NW_XHTML_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t* target) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - TBrowserStatusCode status = KBrsrSuccess; - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT(docRoot != NULL); - NW_Uint32 length; - NW_Bool urlFreeNeeded = NW_FALSE; - NW_Bool targetFreeNeeded = NW_FALSE; - NW_Ucs2* urlStorage = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, - &length, &urlFreeNeeded); - NW_Ucs2* targetStorage = NW_Text_GetUCS2Buffer (target, NW_Text_Flags_Aligned, - &length, &targetFreeNeeded); - - if (urlStorage == NULL || targetStorage == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - TRAP(status, docRoot->documentListener->WindowOpenL(urlStorage, targetStorage, NW_Ecma_Evt_OnClick)); - if (status != KBrsrSuccess) - status = KBrsrOutOfMemory; - } - if (urlFreeNeeded) - { - NW_Mem_Free(urlStorage); - } - if (targetFreeNeeded) - { - NW_Mem_Free(targetStorage); - } - return status; - } - -TBrowserStatusCode -NW_XHTML_ContentHandler_WindowOpenAndPost(NW_XHTML_ContentHandler_t* thisObj, - NW_Text_t* url, NW_Text_t* target, NW_Uint8* contentType, - NW_Uint32 contentTypeLength, NW_Uint8* postData, NW_Uint32 postDataLength, - NW_Uint8* boundary) - { - NW_HED_DocumentRoot_t* docRoot = NULL; - TBrowserStatusCode status = KBrsrSuccess; - docRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (thisObj); - NW_ASSERT(docRoot != NULL); - NW_Uint32 length; - NW_Bool urlFreeNeeded = NW_FALSE; - NW_Bool targetFreeNeeded = NW_FALSE; - NW_Ucs2* urlStorage = NW_Text_GetUCS2Buffer (url, NW_Text_Flags_Aligned, - &length, &urlFreeNeeded); - NW_Ucs2* targetStorage = NW_Text_GetUCS2Buffer (target, NW_Text_Flags_Aligned, - &length, &targetFreeNeeded); - - if (urlStorage == NULL || targetStorage == NULL) - { - status = KBrsrOutOfMemory; - } - else - { - NW_ASSERT(postData != NULL); - TPtrC8 contentTypePtr (contentType, contentTypeLength); - TPtrC8 postDataPtr (postData, postDataLength); - TPtrC8 boundaryPtr(NULL, 0); - TDesC8* ptrForBoundary = NULL; - if (boundary != NULL) - { - boundaryPtr.Set(boundary, User::StringLength(boundary)); - ptrForBoundary = &boundaryPtr; - } - TRAP(status, docRoot->documentListener->WindowOpenAndPostL(urlStorage, targetStorage, NW_Ecma_Evt_OnClick, - TBrCtlDefs::EMethodPost, &contentTypePtr, &postDataPtr, ptrForBoundary, NULL)); - if (status != KBrsrSuccess) - status = KBrsrOutOfMemory; - } - if (urlFreeNeeded) - { - NW_Mem_Free(urlStorage); - } - if (targetFreeNeeded) - { - NW_Mem_Free(targetStorage); - } - return status; - } - -/* - Get the target in base tag defined in header, this value can be used to decide if to - open a link in a new window or not -*/ -void -NW_XHTML_ContentHandler_GetBaseTagTarget (NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t** targetVal) - { - NW_DOM_Node_t* baseElement; - NW_Text_t* target = NULL; - - NW_ASSERT (targetVal); - - /* get the base url as found in the "base" element */ - baseElement = NW_HED_DomHelper_FindElement (&contentHandler->domHelper, NW_HED_DomTree_GetRootNode ( - contentHandler->domTree), 3, NW_XHTML_ElementToken_base, 0, NULL); - - if (baseElement != NULL) - { - NW_XHTML_GetDOMAttribute (contentHandler, baseElement, NW_XHTML_AttributeToken_target, &target); - if (target != NULL && target->characterCount == 0) - { - NW_Object_Delete(target); - target = NULL; - } - if (target != NULL) - { - *targetVal = (NW_Text_t*) NW_Text_UCS2_New (target->storage, NW_Text_GetCharCount(target), NW_Text_Flags_TakeOwnership); - } - } - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,599 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "BrsrStatusCodes.h" -#include "nw_xhtml_elementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_text_ucs2.h" -#include "nw_text_ascii.h" -#include "nwx_string.h" - -#include "nw_list_listelementhandler.h" -#include "nw_list_listitemelementhandler.h" -#include "nw_structure_headelementhandler.h" -#include "nw_text_brelementhandler.h" -#include "nw_text_hrelementhandler.h" -#include "nw_basicforms_formelementhandler.h" -#include "nw_basicforms_inputelementhandler.h" -#include "nw_basicforms_selectelementhandler.h" -#include "XhtmlTableElementHandlerOOC.h" -#include "nw_basictables_trelementhandler.h" -#include "nw_image_imgelementhandler.h" -//#include "XhtmlObjectElementHandlerOOC.h" -#include "nw_metainformation_metaelementhandler.h" -#include "nw_link_linkelementhandler.h" -#include "nw_base_baseelementhandler.h" -#include "nw_xhtml_textelementhandler.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" -#include "nw_xhtml_attributepropertytable.h" -#include "nw_css_defaultstylesheet.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_settings.h" -#include "nw_ignore_ignoreelementhandler.h" -//#include "nw_ecma_contenthandler.h" -#include "nw_image_mapelementhandler.h" -#include "nw_hypertext_aelementhandler.h" -#include "nw_structure_noscriptelementhandler.h" -#include "LMgrObjectBoxOOC.h" -#include "nw_lmgr_activecontainerbox.h" -#include "nw_dom_domvisitor.h" -#include "CSSVariableStyleSheet.h" - -/* -------------------------------------------------------------------------- * - private functions - * ---------------------------------------------------------------------------*/ - -/* -------------------------------------------------------------------------- * - static data - * ---------------------------------------------------------------------------*/ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ElementHandler_Class_t NW_XHTML_ElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_ElementHandler_t NW_XHTML_ElementHandler = { - { &NW_XHTML_ElementHandler_Class } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ElementHandler_Initialize (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) thisObj; - (void) contentHandler; - (void) elementNode; - - /* by default, we do nothing ... */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_ElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* parentBox) -{ - NW_DOM_Node_t* childNode; - - /* iterate through our children calling their 'createBoxTree' method */ - for (childNode = NW_DOM_Node_getFirstChild (elementNode); - childNode != NULL ; - childNode = NW_DOM_Node_getNextSibling (childNode)) - { - const NW_XHTML_ElementHandler_t* elementHandler; - TBrowserStatusCode status; - - /* get the ElementHandler for the elementNode */ - elementHandler = - NW_XHTML_ContentHandler_GetElementHandler (contentHandler, - (NW_DOM_ElementNode_t*) childNode); - if (elementHandler == NULL) - { - continue; - } - - if(NW_XHTML_ElementToken_body == NW_HED_DomHelper_GetElementToken (childNode)) - { - NW_HED_DocumentRoot_t* documentRoot = (NW_HED_DocumentRoot_t*) NW_HED_DocumentNode_GetRootNode (contentHandler); - //R->ecma - //NW_Ecma_HandleEvent(documentRoot , childNode, childNode, NW_Ecma_Evt_OnLoad); - - contentHandler->iBodyNode = childNode; - } - - if ((NW_Object_IsInstanceOf(elementHandler, &NW_XHTML_TextElementHandler_Class)) && - ((NW_Object_IsInstanceOf(thisObj, &NW_XHTML_headElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_brElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_hrElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_inputElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_selectElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_tableElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_trElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_imgElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_metaElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_linkElementHandler_Class))|| - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_baseElementHandler_Class)))) - //|| - //(NW_Object_IsInstanceOf(thisObj, &NW_XHTML_mapElementHandler_Class)))) - { - continue; - } - - // If the parent element is an ignore element handler, ignore this element - // and all sibling elements. Currently, the <noframe> and <noembed> tags - // are "ignored" elements. - if (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_IgnoreElementHandler_Class)) - { - continue; - } - - - /* Check if script handling is enabled or not. - * If the the prev script element is supported, - * the <noscript> elements and all its - * children should not be rendered - */ - - if ( NW_Settings_GetEcmaScriptEnabled() && - (NW_Object_IsInstanceOf(thisObj, &NW_XHTML_noscriptElementHandler_Class)) && - contentHandler->ignoreNoScriptElement) - { - continue; - } - - - /* - If both frameset and body elements are in the same page, the first instance takes precedence, - the second one should be ignored. For example, if the body tag appears before the frameset - tag, ignore the frameset tag and vice versa. - */ - if ((contentHandler->ignoreFramesetElement && (NW_XHTML_ElementToken_frameset == NW_HED_DomHelper_GetElementToken (elementNode))) || - (contentHandler->ignoreBodyElement && (NW_XHTML_ElementToken_body == NW_HED_DomHelper_GetElementToken (elementNode)))) - { - continue; - } - - /* create the child BoxTree */ - status = - NW_XHTML_ElementHandler_CreateBoxTree (elementHandler, contentHandler, - childNode, parentBox); - - if (status != KBrsrSuccess) { - return status; - } - } - - /* successful completion */ - return KBrsrSuccess; -} - -/* ------------------------------------------------------------------------- */ -NW_Uint8 -_NW_XHTML_ElementHandler_ProcessEvent (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box, - NW_Evt_Event_t* event) -{ - /* avoid 'unreferenced formal parameter' warnings */ - (void) thisObj; - (void) contentHandler; - (void) elementNode; - (void) box; - (void) event; - - /* by default, we don't absorb the event ... */ - return 0; -} - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -// Applies styles associated with style attribute -static -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyStyleAttribute(NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t* box) -{ - NW_TRY (status) - { - NW_CSS_Processor_t* processor = NULL; - NW_Text_t* styleVal = NULL; - NW_LMgr_Property_t elementIdProp; - - processor = NW_XHTML_ContentHandler_GetCSSProcessor(contentHandler); - - /* apply the element attribute - copy mask will prevent the node being deleted - This id will be used to identify the container box with al text and then to - replace it with the image - */ - elementIdProp.type = NW_CSS_ValueType_Object; - elementIdProp.value.object = elementNode; - status = NW_LMgr_Box_SetProperty(box, NW_CSS_Prop_elementId, &elementIdProp); - - /* Apply styles in the style attributes */ - NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_style, &styleVal); - if (styleVal!= NULL) - { - if (!processor){ - processor = NW_XHTML_ContentHandler_CreateCSSProcessor(contentHandler); - NW_THROW_OOM_ON_NULL (processor, status); - } - - status = NW_CSS_Processor_ApplyStyleAttribute(processor, styleVal, box); - NW_Object_Delete(styleVal); - } - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* -------------------------------------------------------------------------*/ -// Applies styles associated with HTML attributes and default stylesheet -static -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyDefaultStyles (NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box, - const NW_Evt_Event_t* event) -{ - NW_TRY (status) - { - CCSSVariableStyleSheet* defaultSS = NULL; - NW_Uint16 elementToken = NW_HED_DomHelper_GetElementToken (elementNode); - - /* Apply the styles which were specified by HTML attributes */ - status = NW_XHTML_AttributePropertyTable_ApplyStyles(contentHandler, elementNode, *box); - NW_THROW_ON(status , KBrsrOutOfMemory); - - /* Apply default styleSheet styles */ - defaultSS = NW_XHTML_ContentHandler_GetVariableStyleSheet(contentHandler); - NW_THROW_ON_NULL (defaultSS, status, KBrsrFailure); - - status = defaultSS->ApplyStyles(elementNode, - *box, - NW_XHTML_ContentHandler_GetDictionary(contentHandler), - event, - NW_HED_DocumentNodeOf(contentHandler), - &(contentHandler->domHelper)); - NW_THROW_ON(status , KBrsrOutOfMemory); - - switch(elementToken) - { - case NW_XHTML_ElementToken_a: - case NW_XHTML_ElementToken_frame: - if (NW_Object_IsClass(*box, &NW_LMgr_ActiveContainerBox_Class)) - { - status = NW_XHTML_AttributePropertyTable_AddActiveBoxDecoration(*box, NW_FALSE); - } - break; - case NW_XHTML_ElementToken_img: - if (NW_LMgr_Box_FindBoxOfClass (*box, &NW_LMgr_ActiveContainerBox_Class, NW_FALSE) != NULL) - { - status = NW_XHTML_AttributePropertyTable_AddActiveBoxDecoration(*box, NW_TRUE); - } - break; - default: - break; - } - } - NW_CATCH (status) - { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* -------------------------------------------------------------------------*/ -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyStyles (const NW_XHTML_ElementHandler_t* thisObj, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box, - const NW_Evt_Event_t* event) -{ - NW_REQUIRED_PARAM(thisObj); - NW_REQUIRED_PARAM(event); - - NW_ASSERT(thisObj); - - NW_TRY (status) - { - NW_LMgr_PropertyValue_t displayVal; - - status = NW_XHTML_ElementHandler_ApplyCSSCallback((void*)contentHandler, elementNode, box); - NW_THROW_ON(status , KBrsrOutOfMemory); - - displayVal.token = NW_CSS_PropValue_display_inline; - status = NW_LMgr_Box_GetPropertyValue(*box, NW_CSS_Prop_display, - NW_CSS_ValueType_Token, &displayVal); - /*if(displayVal.token == NW_CSS_PropValue_display_block && NW_Object_IsInstanceOf (thisObj, - &NW_XHTML_aElementHandler_Class)) - { - NW_LMgr_Property_t prop; - prop.type = NW_CSS_ValueType_Token; - prop.value.token = NW_CSS_PropValue_display_inline; - NW_LMgr_Box_SetProperty(*box, NW_CSS_Prop_display, &prop); - } - else */ - if (displayVal.token == NW_CSS_PropValue_none) - { - // remove the associated box as the display is none and we do not want - // it to participate in the layout - NW_Object_Delete(*box); - *box = NULL; - NW_THROW_STATUS(status,KBrsrSuccess); - } - // Check display Val and replace box is necessary - status = NW_CSS_Processor_HandleDisplayVal(box, &displayVal); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------- */ -/* -This should go away when the cXML library gets the ability to cope with -arbitrary byte orderings. For now, the UCS-2 has to be fed to cXML in -network byte order. -*/ - -void -NW_XHTML_ElementHandler_Ucs2NativeToNetworkByteOrder(NW_Uint32 byteCount, - NW_Uint8* pBuf) -{ - NW_Uint32 i; - NW_Uint16 c_ucs2 = 1; - - if (((NW_Uint8*)&c_ucs2)[0] == 1) { /* test for little endian host */ - for (i = 0; i < byteCount; i += 2) { - (void)NW_Mem_memcpy(&c_ucs2, pBuf + i, sizeof(NW_Uint16)); - pBuf[i] = (NW_Uint8)((c_ucs2 >> 8) & 0xff); - pBuf[i+1] = (NW_Uint8)(c_ucs2 & 0xff); - } - } -} - -/* ------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_ElementHandler_ApplyCSSCallback (void* ch, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_Box_t** box) -{ - NW_TRY (status) - { - NW_CSS_Processor_t* processor = NULL; - NW_XHTML_ContentHandler_t* contentHandler = (NW_XHTML_ContentHandler_t*)ch; - - /* apply styles associated with style attribute */ - status = NW_XHTML_ElementHandler_ApplyStyleAttribute(contentHandler, elementNode, *box); - NW_THROW_ON(status , KBrsrOutOfMemory); - - /* Apply the styles which were specified in the styleSheet */ - processor = NW_XHTML_ContentHandler_GetCSSProcessor(contentHandler); - if (processor) - { - status = NW_CSS_Processor_ApplyStyles(processor, elementNode, *box, NULL, &(contentHandler->domHelper)); - NW_THROW_ON(status , KBrsrOutOfMemory); - } - /* Apply the styles which were specified by HTML attributes and default stylesheet */ - status = NW_XHTML_ElementHandler_ApplyDefaultStyles(contentHandler, elementNode, box, NULL); - NW_THROW_ON(status , KBrsrOutOfMemory); - } - NW_CATCH (status) { - } - NW_FINALLY { - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_ElementHandler_GetAttribute (NW_XHTML_ContentHandler_t *contentHandler, - NW_DOM_ElementNode_t *elementNode, - const NW_Uint16 attrToken, - NW_Ucs2 **attrValue) -{ - NW_String_t value; - - /* get the attribute value, returned as: - malloced, UCS-2, aligned, null terminated */ - NW_TRY (status) { - status = NW_HED_DomHelper_GetHTMLAttributeValue(&(contentHandler->domHelper), - elementNode, attrToken, &value); - _NW_THROW_ON_ERROR (status); - - *attrValue = (NW_Ucs2*)(value.storage); - - } - NW_CATCH (status) { - if (status != KBrsrOutOfMemory) { - status = KBrsrNotFound; - } - } - NW_FINALLY { - return status; - } NW_END_TRY -} - - -/* ------------------------------------------------------------------- */ -NW_Bool -NW_XHTML_ElementHandler_IsBlockLevelTag(NW_Uint16 tagToken) -{ - switch(tagToken) - { - case NW_XHTML_ElementToken_p: - case NW_XHTML_ElementToken_table: - case NW_XHTML_ElementToken_td: - case NW_XHTML_ElementToken_tr: - case NW_XHTML_ElementToken_map: - case NW_XHTML_ElementToken_marquee: - case NW_XHTML_ElementToken_form: - case NW_XHTML_ElementToken_address: - case NW_XHTML_ElementToken_blockquote: - case NW_XHTML_ElementToken_caption: - case NW_XHTML_ElementToken_center: - case NW_XHTML_ElementToken_code: - case NW_XHTML_ElementToken_dd: - case NW_XHTML_ElementToken_dt: - case NW_XHTML_ElementToken_ul: - case NW_XHTML_ElementToken_ol: - case NW_XHTML_ElementToken_li: - case NW_XHTML_ElementToken_dir: - case NW_XHTML_ElementToken_div: - case NW_XHTML_ElementToken_fieldset: - case NW_XHTML_ElementToken_menu: - case NW_XHTML_ElementToken_h1: - case NW_XHTML_ElementToken_h2: - case NW_XHTML_ElementToken_h3: - case NW_XHTML_ElementToken_h4: - case NW_XHTML_ElementToken_h5: - case NW_XHTML_ElementToken_h6: - case NW_XHTML_ElementToken_hr: - case NW_XHTML_ElementToken_textarea: - case NW_XHTML_ElementToken_tt: - return NW_TRUE; - default: - return NW_FALSE; - } -} - -/* ------------------------------------------------------------------- */ -// should be called from select, a, script, map, object element handler -// if called from initializae of element handler, controlInitEH is true -// if called from creatboxtree of element handler, controlInitEH is false -NW_Bool -NW_XHTML_ElementHandler_NextSiblingExists (NW_XHTML_ContentHandler_t *contentHandler, - NW_DOM_ElementNode_t *elementNode, - NW_Bool controlInitEH) -{ - NW_Bool exists = NW_TRUE; - - // special handling if the element node is the last part of the chunk: - // leave the node to be processed in the next chunk - // in case this is the last chunk or the ecma script is adding new elements, - // we need to process the node in this chunk - if( !contentHandler->lastChunk && !contentHandler->iScriptIsExecuted ) - { - NW_cXML_DOM_DOMVisitor_t visitor; - NW_DOM_Node_t *domNode = NULL; - NW_cXML_DOM_DOMVisitor_Initialize(&visitor, NW_HED_DomTree_GetRootNode(contentHandler->domTree)); - visitor.currentNode = elementNode; - // search for the next node provided skip children - domNode = NW_cXML_DOM_DOMVisitor_NextNode( &visitor, - NW_DOM_ELEMENT_NODE | - NW_DOM_TEXT_NODE | - NW_DOM_PROCESSING_INSTRUCTION_NODE, - NW_TRUE); - if (domNode == NULL) - { - if (controlInitEH) - { - contentHandler->stopInitEH = NW_TRUE; - } - exists = NW_FALSE; - } - } - - return exists; -} - -// Concatenates the Text of subtree. For e.g. <button><div> Search Flights </div><br/> + Hotels </button> -NW_Text_t* -NW_XHTML_ElementHandler_GetSubTreeText(NW_XHTML_ContentHandler_t* aContentHandler, NW_DOM_ElementNode_t* aElementNode) - { - NW_DOM_Node_t* childNode = NULL; - NW_Text_t* subTreeValue = NULL; - NW_DOM_Node_t* parent = NULL; - - childNode = aElementNode; - while ( childNode ) - { - parent = childNode; - // First go depth first looking for the first child - childNode = NW_DOM_Node_getFirstChild( childNode ); - // if childNode is not there look for sibling - // keep on going up the tree till the parent is the root - while ((!childNode) && (parent != aElementNode)) - { - // childNode is NULL -> means parent was a leaf node - // Find the sibling of parent - childNode = NW_DOM_Node_getNextSibling( parent ); - // sibling parent is NULL, go up the tree - if ( !childNode ) - { - parent = NW_DOM_Node_getParentNode( parent ); - } - } - if (childNode && (NW_DOM_Node_getNodeType(childNode) == NW_DOM_TEXT_NODE)) - { - NW_Text_t* value = NW_XHTML_GetDOMTextNodeData(aContentHandler, childNode); - if (value) - { - if (!subTreeValue) - { - subTreeValue = value; - } - else - { - // concatenate it - NW_Text_t* newText = NW_Text_Concatenate(subTreeValue, value); - if (newText) - { - NW_Object_Delete( subTreeValue ); - subTreeValue = newText; - } - NW_Object_Delete(value); - } - } - } - }; - return subTreeValue; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLEntitySet.c --- a/webengine/wmlengine/src/xhtml/src/XHTMLEntitySet.c Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,320 +0,0 @@ -/* -* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_xhtml_xhtmlentityseti.h" - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -/* Note: This array must be sorted by entity name. The lookup function - does a binary search. */ - -/* IMPORTANT: When you update this table make sure the constant - NW_XHTML_Num_CaseInsensitive_Entries which is the count of - caseinsensitive entries is updated correctly */ -static -const NW_HED_EntitySet_Entry_t _NW_XHTML_EntitySet_Array[] = { -// CaseSensitive entries - { "AElig", 198 }, - { "Aacute", 193 }, - { "Acirc", 194 }, - { "Agrave", 192 }, - { "Alpha", 913 }, - { "Aring", 197 }, - { "Atilde", 195 }, - { "Auml", 196 }, - { "Beta", 914 }, - { "Ccedil", 199 }, - { "Chi", 935 }, - { "Dagger", 8225 }, - { "Delta", 916 }, - { "ETH", 208 }, - { "Eacute", 201 }, - { "Ecirc", 202 }, - { "Egrave", 200 }, - { "Epsilon", 917 }, - { "Eta", 919 }, - { "Euml", 203 }, - { "Gamma", 915 }, - { "Iacute", 205 }, - { "Icirc", 206 }, - { "Igrave", 204 }, - { "Iota", 921 }, - { "Iuml", 207 }, - { "Kappa", 922 }, - { "Lambda", 923 }, - { "Mu", 924 }, - { "Ntilde", 209 }, - { "Nu", 925 }, - { "OElig", 338 }, - { "Oacute", 211 }, - { "Ocirc", 212 }, - { "Ograve", 210 }, - { "Omega", 937 }, - { "Omicron", 927 }, - { "Oslash", 216 }, - { "Otilde", 213 }, - { "Ouml", 214 }, - { "Phi", 934 }, - { "Pi", 928 }, - { "Prime", 8243 }, - { "Psi", 936 }, - { "Rho", 929 }, - { "Scaron", 352 }, - { "Sigma", 931 }, - { "THORN", 222 }, - { "Tau", 932 }, - { "Theta", 920 }, - { "Uacute", 218 }, - { "Ucirc", 219 }, - { "Ugrave", 217 }, - { "Upsilon", 933 }, - { "Uuml", 220 }, - { "Xi", 926 }, - { "Yacute", 221 }, - { "Yuml", 376 }, - { "Zeta", 918 }, - { "aacute", 225 }, - { "acirc", 226 }, - { "acute", 180 }, - { "aelig", 230 }, - { "agrave", 224 }, - { "alpha", 945 }, - { "atilde", 227 }, - { "auml", 228 }, - { "beta", 946 }, - { "ccedil", 231 }, - { "chi", 967 }, - { "dArr", 8659 }, - { "dagger", 8224 }, - { "darr", 8595 }, - { "delta", 948 }, - { "eacute", 233 }, - { "ecirc", 234 }, - { "egrave", 232 }, - { "epsilon", 949 }, - { "eta", 951 }, - { "euml", 235 }, - { "gamma", 947 }, - { "hArr", 8660 }, - { "harr", 8596 }, - { "iacute", 237 }, - { "icirc", 238 }, - { "igrave", 236 }, - { "iota", 953 }, - { "iuml", 239 }, - { "kappa", 954 }, - { "lArr", 8656 }, - { "lambda", 955 }, - { "larr", 8592 }, - { "mu", 956 }, - { "ntilde", 241 }, - { "nu", 957 }, - { "oacute", 243 }, - { "ocirc", 244 }, - { "oelig", 339 }, - { "ograve", 242 }, - { "omega", 969 }, - { "omicron", 959 }, - { "oslash", 248 }, - { "otilde", 245 }, - { "otimes", 8855 }, - { "ouml", 246 }, - { "phi", 966 }, - { "pi", 960 }, - { "psi", 968 }, - { "rArr", 8658 }, - { "rarr", 8594 }, - { "rho", 961 }, - { "scaron", 353 }, - { "sigma", 963 }, - { "tau", 964 }, - { "theta", 952 }, - { "thorn", 254 }, - { "uArr", 8657 }, - { "uacute", 250 }, - { "uarr", 8593 }, - { "ucirc", 251 }, - { "ugrave", 249 }, - { "upsilon", 965 }, - { "uuml", 252 }, - { "xi", 958 }, - { "yacute", 253 }, - { "yuml", 255 }, - { "zeta", 950 }, - { "zwj", 8205 }, - { "zwnj", 8204 }, -// Case Insensitive entries - { "alefsym", 8501 }, - { "amp", 38 }, - { "and", 8743 }, - { "ang", 8736 }, - { "apos", 39 }, - { "aring", 229 }, - { "asymp", 8776 }, - { "bdquo", 8222 }, - { "brvbar", 166 }, - { "bull", 8226 }, - { "cap", 8745 }, - { "cedil", 184 }, - { "cent", 162 }, - { "circ", 710 }, - { "clubs", 9827 }, - { "cong", 8773 }, - { "copy", 169 }, - { "crarr", 8629 }, - { "cup", 8746 }, - { "curren", 164 }, - { "deg", 176 }, - { "diams", 9830 }, - { "divide", 247 }, - { "empty", 8709 }, - { "emsp", 8195 }, - { "ensp", 8194 }, - { "equiv", 8801 }, - { "eth", 240 }, - { "euro", 8364 }, - { "exist", 8707 }, - { "fnof", 402 }, - { "forall", 8704 }, - { "frac12", 189 }, - { "frac14", 188 }, - { "frac34", 190 }, - { "frasl", 8260 }, - { "ge", 8805 }, - { "gt", 62 }, - { "hearts", 9829 }, - { "hellip", 8230 }, - { "iexcl", 161 }, - { "image", 8465 }, - { "infin", 8734 }, - { "int", 8747 }, - { "iquest", 191 }, - { "isin", 8712 }, - { "lang", 9001 }, - { "laquo", 171 }, - { "lceil", 8968 }, - { "ldquo", 8220 }, - { "le", 8804 }, - { "lfloor", 8970 }, - { "lowast", 8727 }, - { "loz", 9674 }, - { "lrm", 8206 }, - { "lsaquo", 8249 }, - { "lsquo", 8216 }, - { "lt", 60 }, - { "macr", 175 }, - { "mdash", 8212 }, - { "micro", 181 }, - { "middot", 183 }, - { "minus", 8722 }, - { "nabla", 8711 }, - { "nbsp", 160 }, - { "ndash", 8211 }, - { "ne", 8800 }, - { "ni", 8715 }, - { "not", 172 }, - { "notin", 8713 }, - { "nsub", 8836 }, - { "oline", 8254 }, - { "oplus", 8853 }, - { "or", 8744 }, - { "ordf", 170 }, - { "ordm", 186 }, - { "para", 182 }, - { "part", 8706 }, - { "permil", 8240 }, - { "perp", 8869 }, - { "piv", 982 }, - { "plusmn", 177 }, - { "pound", 163 }, - { "prime", 8242 }, - { "prod", 8719 }, - { "prop", 8733 }, - { "quot", 34 }, - { "radic", 8730 }, - { "rang", 9002 }, - { "raquo", 187 }, - { "rceil", 8969 }, - { "rdquo", 8221 }, - { "real", 8476 }, - { "reg", 174 }, - { "rfloor", 8971 }, - { "rlm", 8207 }, - { "rsaquo", 8250 }, - { "rsquo", 8217 }, - { "sbquo", 8218 }, - { "sdot", 8901 }, - { "sect", 167 }, - { "shy", 173 }, - { "sigmaf", 962 }, - { "sim", 8764 }, - { "spades", 9824 }, - { "sub", 8834 }, - { "sube", 8838 }, - { "sum", 8721 }, - { "sup", 8835 }, - { "sup1", 185 }, - { "sup2", 178 }, - { "sup3", 179 }, - { "supe", 8839 }, - { "szlig", 223 }, - { "there4", 8756 }, - { "thetasym", 977 }, - { "thinsp", 8201 }, - { "tilde", 732 }, - { "times", 215 }, - { "trade", 8482 }, - { "uml", 168 }, - { "upsih", 978 }, - { "weierp", 8472 }, - { "yen", 165 }, - { "zwj", 8205 }, - { "zwnj", 8204 }, -}; - -/* ------------------------------------------------------------------------- */ -/* IMPORTANT: When you update the above table make sure the constant - NW_XHTML_Num_CaseInsensitive_Entries which is the count of - caseinsensitive entries is updated correctly */ - -#define NW_XHTML_Num_CaseInsensitive_Entries 126 - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_EntitySet_Class_t NW_XHTML_EntitySet_Class = { - { /* NW_Object_Core */ - /* superclass */ &NW_HED_EntitySet_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_HED_EntitySet */ - /* numEntries */ sizeof(_NW_XHTML_EntitySet_Array) - / sizeof(_NW_XHTML_EntitySet_Array[0]), - /* numCaseInsensitiveEntries */ NW_XHTML_Num_CaseInsensitive_Entries, - /* entries */ &_NW_XHTML_EntitySet_Array[0], - /* createContentHandler */ _NW_HED_EntitySet_GetEntityChar - }, - { /* NW_XHTML_EntitySet */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_EntitySet_t NW_XHTML_EntitySet = { - { { &NW_XHTML_EntitySet_Class } } -}; diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLEpoc32ContentHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLEpoc32ContentHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,739 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "BrsrStatusCodes.h" -#include "nw_xhtml_epoc32contenthandleri.h" -#include "nw_structure_structuremodule.h" -#include "nw_text_textmodule1.h" -#include "nw_text_textmodule2.h" -#include "nw_hypertext_hypertextmodule.h" -#include "nw_list_listmodule.h" -#include "nw_basicforms_basicformsmodule.h" -#include "nw_basictables_basictablesmodule.h" -#include "nw_image_imagemodule.h" -#include "nw_metainformation_metainformationmodule.h" -#include "nw_link_linkmodule.h" -#include "nw_base_basemodule.h" -#include "nw_style_stylemodule.h" -#include "nw_frame_framemodule.h" -#include "nw_dom_domvisitor.h" -#include "nw_object_objectmodule.h" -#include "nw_hed_compositecontenthandler.h" - -#include "nw_lmgr_rootbox.h" -#include "nw_imagech_epoc32contenthandler.h" -//#include "nw_ecma_contenthandler.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" -#include "nw_lmgr_slavepropertylist.h" -#include "nw_fbox_imagebuttonbox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_loadreq.h" -#include "nwx_multipart_generator.h" -#include "nwx_logger.h" -#include "nw_hed_childiterator.h" -#include "nw_lmgr_marqueebox.h" -#include "nw_lmgr_imgcontainerbox.h" -#include "nw_image_epoc32simpleimage.h" -#include "nw_image_epoc32cannedimage.h" -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" -#include "Epoc32ImageDecoder.h" - -#include "HEDDocumentListener.h" -#include "nw_system_optionlist.h" - -#include "nwx_settings.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- * - static data - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_Markup_Module_t* const _NW_XHTML_ContentHandler_Modules[] = { - (const NW_Markup_Module_t*) &NW_XHTML_StructureModule, - (const NW_Markup_Module_t*) &NW_XHTML_TextModule1, - (const NW_Markup_Module_t*) &NW_XHTML_TextModule2, - (const NW_Markup_Module_t*) &NW_XHTML_HypertextModule, - (const NW_Markup_Module_t*) &NW_XHTML_BasicFormsModule, - (const NW_Markup_Module_t*) &NW_XHTML_BasicTablesModule, - (const NW_Markup_Module_t*) &NW_XHTML_ImageModule, - (const NW_Markup_Module_t*) &NW_XHTML_MetaInformationModule, - (const NW_Markup_Module_t*) &NW_XHTML_LinkModule, - (const NW_Markup_Module_t*) &NW_XHTML_BaseModule, - (const NW_Markup_Module_t*) &NW_XHTML_StyleModule, - (const NW_Markup_Module_t*) &NW_XHTML_FrameModule, -}; - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_Epoc32ContentHandler_Class_t NW_XHTML_Epoc32ContentHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ContentHandler_Class, - /* queryInterface */ _NW_Object_Base_QueryInterface - }, - { /* NW_Object_Base */ - /* interfaceList */ NW_XHTML_Epoc32_InterfaceList - }, - { /* NW_Object_Dynamic */ - /* instanceSize */ sizeof (NW_XHTML_Epoc32ContentHandler_t), - /* construct */ _NW_XHTML_ContentHandler_Construct, - /* destruct */ NULL - }, - { /* NW_HED_DocumentNode */ - /* cancel */ _NW_XHTML_ContentHandler_Cancel, - /* partialLoadCallback */ _NW_XHTML_Epoc32ContentHandler_PartialLoadCallback, - /* initialize */ _NW_XHTML_ContentHandler_Initialize, - /* nodeChanged */ _NW_HED_DocumentNode_NodeChanged, - /* getBoxTree */ _NW_XHTML_Epoc32ContentHandler_GetBoxTree, - /* processEvent */ _NW_XHTML_ContentHandler_ProcessEvent, - /* handleError */ _NW_HED_DocumentNode_HandleError, - /* suspend */ _NW_XHTML_ContentHandler_Suspend, - /* resume */ _NW_XHTML_CompositeContentHandler_Resume, - /* allLoadsCompleted */ _NW_XHTML_ContentHandler_AllLoadsCompleted, - /* intraPageNavigationCompleted */ _NW_HED_DocumentNode_IntraPageNavigationCompleted, - /* loseFocus */ _NW_XHTML_ContentHandler_LoseFocus, - /* gainFocus */ _NW_XHTML_ContentHandler_GainFocus, - /* handleLoadComplete */ _NW_XHTML_DocumentNode_HandleLoadComplete, - }, - { /* NW_HED_ContentHandler */ - /* partialNextChunk */ _NW_XHTML_ContentHandler_PartialNextChunk, - /* getTitle */ _NW_XHTML_ContentHandler_GetTitle, - /* getUrl */ _NW_HED_ContentHandler_GetURL, - /* resolveUrl */ _NW_XHTML_ContentHandler_ResolveURL, - /* createHistoryEntry */ _NW_HED_ContentHandler_CreateHistoryEntry, - /* createIntraHistoryEntry */ _NW_HED_ContentHandler_CreateIntraDocumentHistoryEntry, - /* newUrlResponse */ _NW_HED_ContentHandler_NewUrlResponse, - /* createBoxTree */ _NW_XHTML_ContentHandler_CreateBoxTree, - /* handleRequest */ _NW_XHTML_ContentHandler_HandleRequest, - /* featureQuery */ _NW_HED_ContentHandler_FeatureQuery, - /* responseComplete */ _NW_HED_ContentHandler_ResponseComplete - }, - { /* NW_HED_CompositeContentHandler */ - /* documentDisplayed */ _NW_XHTML_ContentHandler_DocumentDisplayed, - }, - { /* NW_XHTML_ContentHandler */ - /* numModules */ sizeof (_NW_XHTML_ContentHandler_Modules) / sizeof (NW_Markup_Module_t*), - /* modules */ _NW_XHTML_ContentHandler_Modules - }, - { /* NW_XHTML_Epoc32ContentHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Object_Class_t* const NW_XHTML_Epoc32_InterfaceList[] = { - &NW_XHTML_Epoc32ContentHandler_ImageViewer_Class, - NULL -}; - -/* ------------------------------------------------------------------------- */ -const -NW_Markup_ImageViewer_Class_t NW_XHTML_Epoc32ContentHandler_ImageViewer_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Markup_ImageViewer_Class, - /* querySecondary */ _NW_Object_Core_QuerySecondary - }, - { /* NW_Object_Secondary */ - /* offset */ offsetof (NW_XHTML_Epoc32ContentHandler_t, - NW_Markup_ImageViewer) - }, - { /* NW_Object_Aggregate */ - /* secondaryList */ _NW_Markup_ImageViewer_SecondaryList, - /* construct */ NULL, - /* destruct */ NULL - }, - { /* NW_Markup_ImageViewer */ - /* load */ _NW_XHTML_Epoc32ContentHandler_ImageViewer_Load, - /* isNoSave */ _NW_XHTML_Epoc32ContentHandler_ImageViewer_IsNoSave, - /* getAltText */ _NW_XHTML_Epoc32ContentHandler_ImageViewer_GetAltText - } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_GetBoxTree( NW_HED_DocumentNode_t* documentNode, - NW_LMgr_Box_t** boxTree ) -{ - NW_XHTML_ContentHandler_t* thisObj; - NW_HED_ContentHandler_t* contentHandler; - NW_HED_DocumentRoot_t* docRoot; - TBrowserStatusCode status = KBrsrSuccess; - - // parameter assertion block - NW_ASSERT( NW_Object_IsInstanceOf( documentNode, - &NW_XHTML_ContentHandler_Class ) ); - // for convenience - thisObj = NW_XHTML_ContentHandlerOf( documentNode ); - contentHandler = NW_HED_ContentHandlerOf( documentNode ); - docRoot = (NW_HED_DocumentRoot_t*)NW_HED_DocumentNode_GetRootNode( thisObj ); - NW_ASSERT( docRoot != NULL ); - - NW_LMgr_RootBox_t* rootBox = NW_HED_DocumentRoot_GetRootBox( docRoot ); - NW_ASSERT( rootBox != NULL ); - - *boxTree = NULL; - - // call createbox tree if it either has not been created or - // rebuild is needed - if( !contentHandler->boxTree ) - { - // invoke our superclass method - status = NW_HED_ContentHandler_CreateBoxTree( thisObj, &contentHandler->boxTree ); - } - // here comes the partial box tree creation, if there are more nodes to create boxes - else if( thisObj->prevInitializedDomNode != thisObj->lastInitializedDomNode) - { - status = NW_HED_ContentHandler_CreateBoxTree( thisObj, &contentHandler->boxTree ); - } - *boxTree = contentHandler->boxTree; - // return the box tree - return status; - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_PartialLoadCallback( NW_HED_DocumentNode_t* documentNode, - TBrowserStatusCode loadStatus, - NW_Int32 chunkIndex, - NW_HED_UrlRequest_t* urlRequest, - NW_Url_Resp_t* response, - NW_Uint16 transactionId, - void* context ) - { - - NW_TRY( status ) - { - NW_HED_DocumentNode_t* childNode; - NW_ASSERT( documentNode != NULL ); - NW_ASSERT( response != NULL ); - - // Ignore HEAD responses. - if (response && (response->method == NW_URL_METHOD_HEAD)) - { - // Skip the rest of this method - NW_THROW_SUCCESS(status); - } - - if( chunkIndex == 0 ) - { - NW_HED_ContentHandler_t* contentHandler; - - // create content handler - contentHandler = NW_HED_CompositeContentHandler_CreateContentHandler( - NW_HED_ContentHandlerOf( documentNode ), - response->contentTypeString, urlRequest, response, context ); - NW_THROW_ON_NULL( contentHandler, status, KBrsrFailure ); - - // forward first chunk to the content handler - status = NW_HED_ContentHandler_PartialNextChunk( contentHandler, chunkIndex, - response, context ); - response = NULL; - _NW_THROW_ON_ERROR( status ); - - // special handling for images - if( NW_Object_IsInstanceOf( contentHandler, &NW_ImageCH_Epoc32ContentHandler_Class ) ) - { - // set context on image content handler - // context is a pointer to the elementNode which is used to look up the associated box - NW_ImageCH_Epoc32ContentHandlerOf( contentHandler )->context = context; - // handle virtual images - status = NW_HED_CompositeContentHandler_HandleImageLoad( - NW_HED_CompositeContentHandlerOf( documentNode ), - chunkIndex, - contentHandler, - urlRequest ); - // catch only OOM - NW_THROW_ON( KBrsrOutOfMemory, status ); - -#ifdef INCREMENTAL_IMAGE_ON - // open the image - NW_ImageCH_Epoc32ContentHandler_ForceImageOpen( - NW_ImageCH_Epoc32ContentHandlerOf( contentHandler ) ); -#endif // INCREMENTAL_IMAGE_ON - } - } - // further chunks - else - { - // find the corresponding content handler. It must have been created when the - // first chunk came in. - NW_HED_CompositeNode_t* compositeNode = (NW_HED_CompositeNode_t*) - (NW_Object_QueryAggregate( documentNode, &NW_HED_CompositeNode_Class)); - NW_ASSERT( compositeNode != NULL ); - - childNode = NW_HED_CompositeNode_LookupChild( compositeNode, context ); - NW_THROW_ON_NULL( childNode, status, KBrsrFailure ); - - // further chunks - if( chunkIndex != -1 ) - { - // pass chunks to the content handler - status = NW_HED_ContentHandler_PartialNextChunk( - NW_HED_ContentHandlerOf( childNode ), chunkIndex, response, context ); - // response has been taken by the child content handler - response = NULL; - - _NW_THROW_ON_ERROR( status ); - } - // last chunk - else - { - if( NW_Object_IsInstanceOf( childNode, &NW_ImageCH_Epoc32ContentHandler_Class ) ) - { - // this takes care of virtual image content handlers - status = NW_HED_CompositeContentHandler_HandleImageLoad( - NW_HED_CompositeContentHandlerOf( documentNode ), - chunkIndex, - NW_HED_ContentHandlerOf( childNode ), - urlRequest ); - // catch only OOM - NW_THROW_ON( KBrsrOutOfMemory, status ); - } - /*//R->ecma - else if(NW_Object_IsInstanceOf (childNode, &NW_Ecma_ContentHandler_Class)) - { - // set the element node on the content handler - NW_EcmaContentHandlerSetElementNode((NW_Ecma_ContentHandler_t*)childNode, - (NW_DOM_ElementNode_t*)context); - } - */ - // Inform the content handler that the response is complete. - status = NW_HED_ContentHandler_ResponseComplete( - NW_HED_ContentHandlerOf( childNode ), response, context); - // last chunk. content handler is all set. - // intialize it - status = NW_HED_DocumentNode_Initialize( childNode, KBrsrSuccess ); - // notify the owner of the embedded load complete - NW_HED_DocumentNode_HandleLoadComplete( documentNode, urlRequest, BRSR_STAT_CLASS_NONE, loadStatus, - transactionId, context ); - } - } - _NW_THROW_ON_ERROR( status ); - } - NW_CATCH( status ) - { - } - NW_FINALLY - { - // content handler has the response ownership, so - // it must be released no matter what - UrlLoader_UrlResponseDelete( response ); - return status; - } - NW_END_TRY - } - -/* ------------------------------------------------------------------------- * - final methods - * ------------------------------------------------------------------------- */ - -/************************************************************************ - - Function: NW_XHTML_Epoc32ContentHandler_SaveToFile - - Description: Write multipart document to file containing xhtml, images, - and CSS components which were externally loaded. Multipart - document consists of: - Number of segments - Segments - each with - header length (including content type length) - data length - content type (including character encoding) - headers - data - - Parameters: thisObj - in: content handler - file - in: file name - - Return Value: KBrsrSuccess - KBrsrFailure - KBrsrOutOfMemory - KBrsrSavedPageFailed - -**************************************************************************/ -TBrowserStatusCode -NW_XHTML_Epoc32ContentHandler_SaveToFile(NW_XHTML_Epoc32ContentHandler_t *thisObj, - NW_Ucs2* file) -{ - NW_HED_DomTree_t* domTree = NULL; - NW_XHTML_ContentHandler_t *xhtmlCH; - NW_Osu_File_t fh = NULL; - NW_Buffer_t* buffer; - TBrowserStatusCode status = KBrsrSuccess; - NW_Uint32 numImages = 0; - NW_Uint32 numScripts = 0; - NW_Uint32 numCSSImages = 0; - NW_Uint32 numStyleSheets = 0; - NW_Uint32 numSegments; - NW_Byte numSegmentsBuf[5]; - NW_Uint32 numSegmentsBufLen; - NW_Byte* p; - NW_Byte* segment; - NW_Uint32 segmentLen; - NW_Ucs2* url; - char* urlAscii = NULL; - - TUint originalEncoding = NW_Settings_GetOriginalEncoding(); - - xhtmlCH = NW_XHTML_ContentHandlerOf(thisObj); - domTree = xhtmlCH->domTree; - NW_ASSERT(domTree); - - /* Delete any existing file */ - (void)NW_Osu_Delete(file); - - /* Create new file */ - fh = NW_Osu_CreateNewFile(file); - if (fh == NW_INVALID_FILE_HANDLE) - { - status = KBrsrSavedPageFailed; - goto cleanup; - } - - /* Number of external style sheets. */ - if (xhtmlCH->processor != NULL) - numStyleSheets = NW_CSS_Processor_GetNumStyleSheets(xhtmlCH->processor); - - /* Number of images; these are in a list of image content handlers. */ - if (xhtmlCH->super.NW_HED_CompositeNode.children != NULL) - { - numImages = NW_HED_CompositeContentHandler_GetImageCount(NW_HED_CompositeContentHandlerOf(xhtmlCH)); - //numScripts= NW_HED_CompositeContentHandler_GetScriptCount(NW_HED_CompositeContentHandlerOf(xhtmlCH)); - } - - /* Other images are in the processor's CSS image list */ - if (xhtmlCH->processor != NULL) - numCSSImages = NW_CSS_Processor_GetNumCSSImages(xhtmlCH->processor); - - /* Get count of multipart segments (one for xhtml page, plus number of - * external style sheets, plus number of images). Write variable length - * integer to a buffer, then write buffer to file - */ - numSegments = 1 + numStyleSheets + numImages + numCSSImages + numScripts; - p = NW_StoreUint(numSegmentsBuf, numSegments); - numSegmentsBufLen = p - numSegmentsBuf; - status = NW_Osu_WriteFile(fh, numSegmentsBuf, numSegmentsBufLen); - if (status != KBrsrSuccess) - goto cleanup; - - /* Get response URL. If it is NULL, use it anyway. */ - url = (NW_Ucs2*) NW_HED_UrlResponse_GetRawUrl (NW_HED_ContentHandler_GetUrlResponse (thisObj)); - if (url != NULL) - urlAscii = NW_Str_CvtToAscii(url); - - /* Create multipart segment from xhtml document & write to file */ - buffer = NW_HED_DomTree_GetDomBuffer(domTree); - - status = NW_CreateMultipartSegment - ( - NW_HED_DomTree_GetCharEncoding(domTree), - originalEncoding, - (NW_Http_ContentTypeString_t)HTTP_application_xhtml_xml_saved_string, - urlAscii, - buffer->data, - buffer->length, - &segment, - &segmentLen - ); - - NW_Mem_Free(urlAscii); - if (status != KBrsrSuccess) - goto cleanup; - - status = NW_Osu_WriteFile(fh, segment, segmentLen); - NW_Mem_Free(segment); - if (status != KBrsrSuccess) - goto cleanup; - - /* Write style sheets and CSS Images to file as multipart segments */ - if (xhtmlCH->processor != NULL) - { - status = NW_CSS_Processor_WriteMultipartSegment(xhtmlCH->processor, fh, numCSSImages, numStyleSheets); - if (status != KBrsrSuccess) - goto cleanup; - } - - /* Write images to file as multipart segments */ - status = NW_HED_CompositeContentHandler_SaveImagesToFile(xhtmlCH, fh); - if (status != KBrsrSuccess) - goto cleanup; - - /* Write scripts to file as multipart segments */ - //status = NW_HED_CompositeContentHandler_SaveScriptsToFile(xhtmlCH, fh); - -cleanup: - NW_LOG1(NW_LOG_LEVEL3, "NW_XHTML_Epoc32ContentHandler_SaveToFile: Result %d", status); - NW_Osu_CloseFile(fh); - - if (status != KBrsrSuccess) - (void)NW_Osu_Delete(file); - - return status; -} - - -/* ------------------------------------------------------------------------- * - NW_Markup_ImageViewer methods - * ------------------------------------------------------------------------- */ -/* ------------------------------------------------------------------------- */ -NW_Bool -_NW_XHTML_Epoc32ContentHandler_ImageViewer_IsNoSave (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox) -{ - NW_Text_t* alt = NULL; - NW_DOM_ElementNode_t* elementNode = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_XHTML_ContentHandler_t* contentHandler; - NW_Ucs2* storage = NULL; - NW_LMgr_PropertyValue_t value; - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - NW_Bool ret = NW_FALSE; - - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_XHTML_Epoc32ContentHandler_ImageViewer_Class)); - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageBox, - &NW_FBox_ImageButtonBox_Class) || - NW_Object_IsDerivedFrom(imageBox, - &NW_LMgr_ImgContainerBox_Class)); - - /* for convenience */ - contentHandler = (NW_XHTML_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - - value.object = NULL; - status = NW_LMgr_Box_GetPropertyValue(imageBox, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - if (status != KBrsrSuccess) - { - return NW_FALSE; - } - elementNode = (NW_DOM_ElementNode_t*) value.object; - - /* find the 'alt' attribute and get its string value */ - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_alt, &alt); - if (status != KBrsrSuccess) { - return NW_FALSE; - } - storage = NW_Text_GetUCS2Buffer (alt, 0, &length, &freeNeeded); - if(storage == NULL) - { - NW_Object_Delete(alt); - return NW_FALSE; - } - - if (!NW_Str_StricmpConst (storage, WAE_ASC_NOSAVE_STR) || !NW_Str_StricmpConst (storage, WAE_ASC_NOKIA_STR)) - { - ret = NW_TRUE; - } - - NW_Object_Delete(alt); - if (freeNeeded) { - NW_Mem_Free ((NW_Ucs2*) storage) ; - } - - return ret; - -} - -/* ------------------------------------------------------------------------- */ -NW_Ucs2* -_NW_XHTML_Epoc32ContentHandler_ImageViewer_GetAltText (NW_Markup_ImageViewer_t* imageViewer, - NW_LMgr_Box_t* imageBox) -{ - NW_Text_t* alt = NULL; - NW_DOM_ElementNode_t* elementNode = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_XHTML_ContentHandler_t* contentHandler; - NW_Ucs2* storage = NULL; - NW_LMgr_PropertyValue_t value; - NW_Text_Length_t length; - NW_Uint8 freeNeeded; - - - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_XHTML_Epoc32ContentHandler_ImageViewer_Class)); - /* parameter assertion block */ - NW_ASSERT (NW_Object_IsInstanceOf (imageBox, - &NW_FBox_ImageButtonBox_Class) || - NW_Object_IsDerivedFrom(imageBox, - &NW_LMgr_ImgContainerBox_Class)); - - /* for convenience */ - contentHandler = (NW_XHTML_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - - value.object = NULL; - status = NW_LMgr_Box_GetPropertyValue(imageBox, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - if (status != KBrsrSuccess) - { - return NULL; - } - elementNode = (NW_DOM_ElementNode_t*) value.object; - - /* find the 'alt' attribute and get its string value */ - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_alt, &alt); - if (status != KBrsrSuccess) { - return NULL; - } - storage = NW_Text_GetUCS2Buffer (alt, NW_Text_Flags_NullTerminated | - NW_Text_Flags_CompressWhitespace, &length, &freeNeeded); - - NW_Object_Delete(alt); - if(storage == NULL) - { - return NULL; - } - - if (!freeNeeded) { - return NW_Str_Newcpy(storage); - } - return storage; -} - -// ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_Epoc32ContentHandler_ImageViewer_Load (NW_Markup_ImageViewer_t* imageViewer) - { - NW_XHTML_ContentHandler_t* contentHandler; - NW_Text_t* url = NULL; - NW_DOM_ElementNode_t* elementNode = NULL; - TBrowserStatusCode status = KBrsrSuccess; - NW_LMgr_BoxVisitor_t boxVisitor; - NW_LMgr_Box_t* box = NULL; - - // parameter assertion block - NW_ASSERT (NW_Object_IsInstanceOf (imageViewer, - &NW_XHTML_Epoc32ContentHandler_ImageViewer_Class)); - - // for convenience - contentHandler = (NW_XHTML_ContentHandler_t*)NW_Object_Aggregate_GetAggregator (imageViewer); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, &NW_XHTML_ContentHandler_Class)); - box = NW_HED_ContentHandlerOf(contentHandler)->boxTree; - if (box == NULL) - { - return KBrsrSuccess; - } - - // create the Box Visitor object and use it to traverse the box tree - if ((status = NW_LMgr_BoxVisitor_Initialize (&boxVisitor, box)) != KBrsrSuccess) - { - return status; - } - - // Iterate through all children - while ((box = NW_LMgr_BoxVisitor_NextBox(&boxVisitor,0)) != NULL) - { - if ((NW_Object_IsInstanceOf(box, &NW_LMgr_ContainerBox_Class) && - !NW_Object_IsInstanceOf(box->propList, &NW_LMgr_SlavePropertyList_Class)) - || NW_Object_IsClass(box, &NW_FBox_ImageButtonBox_Class) - || NW_Object_IsDerivedFrom(box, &NW_LMgr_ImgContainerBox_Class)) - { - NW_LMgr_PropertyValue_t value; - - // checks if image in ImageButtonBox is loaded or not. If it is, we do not want to - // issue the load - if (NW_Object_IsClass(box, &NW_FBox_ImageButtonBox_Class)) - { - NW_FBox_ImageButtonBox_t* imageButtonBox = NW_FBox_ImageButtonBoxOf(box); - if ((imageButtonBox->image) && - (!NW_Object_IsInstanceOf(imageButtonBox->image, &NW_Image_Epoc32Canned_Class))) - { - continue; - } - } - else if( NW_Object_IsDerivedFrom( box, &NW_LMgr_ImgContainerBox_Class ) == NW_TRUE ) - { - // checks if image in ImageContainerBox is loaded or not. If it is, we do not want to - // issue the load - // TODO: have a load status flag on the box instead of checking the broken - // status as a broken status could be a result of 404 - NW_LMgr_ImgContainerBox_t* imageBox = NW_LMgr_ImgContainerBoxOf( box ); - if( !imageBox->isBroken ) - { - continue; - } - } - value.object = NULL; - (void)NW_LMgr_Box_GetPropertyValue(box, NW_CSS_Prop_elementId, NW_CSS_ValueType_Object, &value); - if (value.object == NULL) - { - continue; - } - - elementNode = (NW_DOM_ElementNode_t*)value.object; - - // find the 'src' attribute and get its string value - status = NW_XHTML_GetDOMAttribute (contentHandler, elementNode, - NW_XHTML_AttributeToken_src, &url); - if (status == KBrsrSuccess) - { - NW_XHTML_ContentHandler_t* thisObj = NW_XHTML_ContentHandlerOf( contentHandler ); - NW_ASSERT(thisObj != NULL); - - const NW_XHTML_ElementHandler_t* elementHandler = NW_XHTML_ContentHandler_GetElementHandler( - thisObj, elementNode ); - NW_ASSERT(elementHandler != NULL); - - // Before loading the image, verify that the element handler is image element handler - if (NW_XHTML_ImageModule_IsImageElementHandler(elementHandler)) - { - // load the image - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, - url, NW_HED_UrlRequest_Reason_DocLoadChild, elementNode, - NW_UrlRequest_Type_Image); - } - // cleanup after ourselves - NW_Object_Delete (url); - - } - if (status == KBrsrOutOfMemory) - { - break; - } - } - } - - if( contentHandler->processor ) - { - NW_CSS_Processor_ShowImages( contentHandler->processor ); - } - - // Only care about out-of-memory errors. - return (status == KBrsrOutOfMemory) ? KBrsrOutOfMemory : KBrsrSuccess; - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLMessageListener.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLMessageListener.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Content handler for XHTML content type -* -*/ - - -// INCLUDE FILES - -#include "nw_msg_message.h" -#include "nw_text_ucs2.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "XHTMLMessageListener.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - - -// ============================ MEMBER FUNCTIONS =============================== -// ----------------------------------------------------------------------------- -// TMessageListener::TMessageListener -// ----------------------------------------------------------------------------- -// -TMessageListener::TMessageListener (NW_XHTML_ContentHandler_t* aContentHandler) - { - iContentHandler = aContentHandler; - } - -// ----------------------------------------------------------------------------- -// NW_Msg_IMessageListener method implementations -// ----------------------------------------------------------------------------- -void -TMessageListener::HandleMessage (NW_Msg_Message_t* message) - { - NW_ASSERT (message != NULL); - - switch (NW_Msg_Message_GetMessageId (message)) - { - case NW_XHTML_ContentHandler_Msg_ShowFragment: - { - NW_Text_t* text = (NW_Text_t*) NW_Msg_Message_GetData (message); - NW_XHTML_ContentHandler_ShowFragment (iContentHandler, text); - } - break; - - default: - break; - } - - /* delete the message */ - NW_Object_Delete (message); - } diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLPiElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLPiElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_xhtml_pielementhandleri.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" -#include "nw_htmlp_to_wbxml.h" -#include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nwx_string.h" -#include "nw_link_linkelementhandler.h" -#include <nwx_status.h> -#include <nwx_settings.h> -#include "nwx_statuscodeconvert.h" -#include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" - -/* ------------------------------------------------------------------------- * - private methods - * ------------------------------------------------------------------------- */ - -static -void NW_XHTML_PiElementHandler_Doctype(NW_Ucs2* pAttrUcs2, NW_XHTML_ContentHandler_t* contentHandler) -{ - const NW_Ucs2 mobileProfileStr[] = { '/', '/', 'D', 'T', 'D', ' ', 'X', 'H', 'T', 'M', 'L', ' ', 'M', 'o', 'b', 'i', 'l', 'e', '\0'}; - if (NW_Str_Strstr(pAttrUcs2, mobileProfileStr)) { - NW_XHTML_ContentHandler_EnableMobileProfileMode(contentHandler); - } -} - -static -TBrowserStatusCode -NW_XHTML_PiElementHandler_zzzunknown(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* node) -{ - NW_Ucs2* pAttrUcs2 = NULL; /* NULL required, unconditional free */ - NW_Bool freeNeeded = NW_FALSE; /* NW_FALSE required by free logic */ - NW_Text_Length_t charCount; - NW_Text_t* piData = NULL; - const NW_Ucs2 htmlStr[] = {'h', 't', 'm', 'l'}; - NW_Uint32 htmlStrLength = 4; - NW_Uint16 piTargetToken = - NW_DOM_ProcessingInstructionNode_getTargetToken (node); - - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY(status) { - NW_XHTML_GetDOMAttribute(contentHandler, node, piTargetToken, &piData); - NW_THROW_ON_NULL(piData, status, KBrsrSuccess); - charCount = NW_Text_GetCharCount(piData); - pAttrUcs2 = NW_Text_GetUCS2Buffer(piData, NW_Text_Flags_NullTerminated, &charCount, &freeNeeded); - NW_THROW_ON_NULL(pAttrUcs2, status, KBrsrOutOfMemory); - if (NW_Str_Strncmp(htmlStr, pAttrUcs2, htmlStrLength) ==0) { - NW_XHTML_PiElementHandler_Doctype(pAttrUcs2, contentHandler); - } - } - NW_CATCH(status) { - } - NW_FINALLY { - NW_Object_Delete(piData); - if (freeNeeded) { - NW_Mem_Free(pAttrUcs2); - } - return status; - } - NW_END_TRY -} - -static -TBrowserStatusCode -NW_XHTML_PiElementHandler_MakeDom(NW_Text_t* pPiData, - NW_HED_DomTree_t** ppDomTree) -{ - NW_Ucs2* pAttrUcs2 = NULL; /* NULL required, unconditional free */ - NW_Uint8* pBuf = NULL; /* NULL required, unconditional free */ - NW_Buffer_t* pWbxmlBuffer = NULL; /* NULL required, unconditional free */ - NW_Uint32 sizeStart; - NW_Uint32 sizeEnd; - NW_Uint32 totalsize; - NW_Uint32 line; - NW_Bool freeNeeded = NW_FALSE; /* NW_FALSE required by free logic */ - - NW_ASSERT(pPiData != NULL); - *ppDomTree = NULL; - - /* Create an HTML document, parse and build a DOM tree. */ - NW_TRY(status) { - /* The HTML document will have one element and be in UCS-2. - The hr element is used just because it has a short name, - normally has attributes, and is empty. */ - const NW_Ucs2 htmlElementStart[] = {'<', 'h', 'r', ' ',}; - const NW_Ucs2 htmlElementEnd[] = {'/', '>',}; - /* convert the attribute string to UCS-2 */ - NW_Text_Length_t charCount = NW_Text_GetCharCount(pPiData); - if (charCount == 0) { - NW_THROW_UNEXPECTED(status); - } - pAttrUcs2 = NW_Text_GetUCS2Buffer(pPiData, 0, &charCount, &freeNeeded); - NW_THROW_ON_NULL(pAttrUcs2, status, KBrsrUnexpectedError); - /* put it all together in one buffer */ - sizeStart = sizeof(htmlElementStart); - sizeEnd = sizeof(htmlElementEnd); - totalsize = (sizeStart + (sizeof(NW_Ucs2) * charCount) + sizeEnd); - pBuf = (NW_Uint8*) NW_Mem_Malloc(totalsize); - NW_THROW_OOM_ON_NULL(pBuf, status); - NW_Mem_memcpy(pBuf, - htmlElementStart, sizeStart); - NW_Mem_memcpy(pBuf + sizeStart, - pAttrUcs2, sizeof(NW_Ucs2) * charCount); - NW_Mem_memcpy(pBuf + sizeStart + sizeof(NW_Ucs2) * charCount, - htmlElementEnd, sizeEnd); - /* flip the byte order to network byte order (big-endian), required by cXML */ - NW_XHTML_ElementHandler_Ucs2NativeToNetworkByteOrder(totalsize, pBuf); - /* parse the document */ - { - NW_Buffer_t docBuf; - docBuf.length = totalsize; - docBuf.allocatedLength = totalsize; - docBuf.data = pBuf; - - status = NW_HTMLP_HtmlToWbxml(&docBuf, HTTP_iso_10646_ucs_2, - NW_BYTEORDER_BIG_ENDIAN, - &pWbxmlBuffer, &line, - NW_xhtml_1_0_PublicId, - NW_HTMLP_Get_ElementTableCount(), - NW_HTMLP_Get_ElementDescriptionTable(), - NW_FALSE, NW_FALSE, - NULL, NULL, NW_FALSE); - NW_THROW_ON_ERROR(status); - } - /* build the DOM tree */ - *ppDomTree = NW_HED_DomTree_New(pWbxmlBuffer, HTTP_iso_10646_ucs_2, - NW_xhtml_1_0_PublicId, NULL); - NW_THROW_ON_NULL(*ppDomTree, status, KBrsrOutOfMemory); - } - NW_CATCH(status) { - NW_Buffer_Free(pWbxmlBuffer); - } - NW_FINALLY { - if (freeNeeded == NW_TRUE) { - NW_Mem_Free(pAttrUcs2); - } - NW_Mem_Free(pBuf); - return status; - } - NW_END_TRY -} - -/* Caller should call NW_Mem_Free(*ppValue) when done with value. */ -static -TBrowserStatusCode -NW_XHTML_PiElementHandler_GetAttributeValue(NW_HED_DomTree_t* pDomTree, - NW_Uint16 attrNameToken, - NW_Ucs2** ppValue) -{ - NW_DOM_Node_t* pDomNode; - NW_String_t attrName; - NW_DOM_AttributeHandle_t attributeHandle; - NW_DOM_AttrVal_t av; - NW_String_t nativeText; - NW_Status_t cxml_status; - - NW_ASSERT(pDomTree != NULL); - *ppValue = NULL; - - nativeText.length = 0; - nativeText.storage = NULL; - - NW_TRY(status) { - /* The root node is just a place holder. */ - pDomNode = NW_HED_DomTree_GetRootNode(pDomTree); - NW_THROW_ON_NULL(pDomNode, status, KBrsrUnexpectedError); - /* By construction, the document has only one element. */ - pDomNode = NW_DOM_Node_getFirstChild(pDomNode); - NW_THROW_ON_NULL(pDomNode, status, KBrsrUnexpectedError); - status = - NW_HED_DomHelper_GetAttributeName(pDomNode, attrNameToken, &attrName); - NW_THROW_ON_ERROR(status); - /* The next call searches the attribute list and finds it, if there. */ - status = - StatusCodeConvert(NW_DOM_ElementNode_getAttributeHandleByName(pDomNode, - &attrName, - &attributeHandle)); - NW_THROW_ON_ERROR(status); - /* Going to cheat a bit here. We know that the attribute name does not - contain a value prefix so we can skip calling - NW_DOM_AttributeHandle_getValuePrefix(). Also, we can skip looking - for multipart attributes since the value will be encoded as a single - string. */ - cxml_status = - NW_DOM_AttributeHandle_getNextVal(&attributeHandle, &av); - if ((cxml_status != NW_STAT_WBXML_ITERATE_MORE) - || ((NW_DOM_AttrVal_getType(&av) != NW_WBXML_ATTR_COMPONENT_TOKEN ) - && (NW_DOM_AttrVal_getType(&av) != NW_WBXML_ATTR_COMPONENT_STRING))) { - /* This seems counter intuitive, but if it found a value it - will want to iterate once more at which time it will indicate - there is no more. Also, we expect a string value. */ - NW_THROW_STATUS(status, KBrsrUnexpectedError); - } - status = StatusCodeConvert(NW_DOM_AttrVal_toString(&av, &nativeText, HTTP_iso_10646_ucs_2)); - NW_THROW_ON_ERROR(status); - /* This next call forces an aligned, null terminated copy to be made. */ - status = StatusCodeConvert(NW_String_stringToUCS2Char(&nativeText, HTTP_iso_10646_ucs_2, - ppValue)); - NW_THROW_ON_ERROR(status); - } - NW_CATCH(status) { - *ppValue = NULL; - } - NW_FINALLY { - NW_String_deleteStorage(&nativeText); - return status; - } - NW_END_TRY -} - - -static -TBrowserStatusCode -NW_XHTML_PiElementHandler_XmlStylesheet(const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* node) -{ - NW_Text_t* piData = NULL; - NW_Uint16 piTargetToken; - NW_HED_DomTree_t* pDomTree = NULL; - NW_Ucs2* type = NULL; - NW_Ucs2* relation = NULL; - NW_Ucs2* media = NULL; - NW_Ucs2* href = NULL; - NW_Ucs2* alt = NULL; - NW_Ucs2* charset = NULL; - - NW_REQUIRED_PARAM(elementHandler); - - NW_TRY(status) { - /* - You could get the PI data directly from the DOM but it wouldn't - expand entity references or wml variables: - - status = NW_DOM_ProcessingInstructionNode_getData (node, &piData); - - Instead we have use the fact that PI nodes look like element nodes - and the PI target and data just look like an attribute value pair. - */ - piTargetToken = NW_DOM_ProcessingInstructionNode_getTargetToken (node); - NW_XHTML_GetDOMAttribute(contentHandler, node, piTargetToken, &piData); - NW_THROW_ON_NULL(piData, status, KBrsrSuccess); - - /* - The horrible thing about the xml-stylesheet PI is that while it - has attributes exactly like any element, the attributes can't be - parsed along with the rest of the document because, by XML/HTML - specification, PI is considered to be outside the scope of - document parsing. This means that we now have to go back and - parse again! Stupid specification authors ;-) They did - something similar with the media attribute too :-( - - To process the pseudo attributes, create an HTML document with - the attributes on an element, parse and build a DOM tree. - */ - status = NW_XHTML_PiElementHandler_MakeDom(piData, &pDomTree); - NW_Object_Delete(piData); - NW_THROW_ON_ERROR(status); - NW_THROW_ON_NULL(pDomTree, status, KBrsrFailure); - - /* - Now we can access the DOM for the attributes like a typical - element handler. We need to access the DOM directly and not - through the "helper" methods because entity expansion has - already been done and we must not do further entity - expansion. - */ - - // Get the type attribute. - status = NW_XHTML_PiElementHandler_GetAttributeValue(pDomTree, - NW_XHTML_AttributeToken_type, &type); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Get the alternate attribute. - status = NW_XHTML_PiElementHandler_GetAttributeValue(pDomTree, - NW_XHTML_AttributeToken_alternate, &alt); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Get the media attribute. - status = NW_XHTML_PiElementHandler_GetAttributeValue(pDomTree, - NW_XHTML_AttributeToken_media, &media); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Get the href attribute. - status = NW_XHTML_PiElementHandler_GetAttributeValue(pDomTree, - NW_XHTML_AttributeToken_href, &href); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Get the charset attribute. - status = NW_XHTML_PiElementHandler_GetAttributeValue(pDomTree, - NW_XHTML_AttributeToken_charset, &charset); - NW_THROW_ON(status, KBrsrOutOfMemory); - - // Load the stylesheet. - status = NW_XHTML_ContentHandler_LoadStylesheet(contentHandler, - type, relation, media, href, charset, alt); - NW_THROW_ON(status, KBrsrOutOfMemory); - } - - NW_CATCH(status) { - } - - NW_FINALLY { - NW_HED_DomTree_Delete(pDomTree); - - NW_Str_Delete(type); - NW_Str_Delete(relation); - NW_Str_Delete(media); - NW_Str_Delete(href); - NW_Str_Delete(alt); - NW_Str_Delete(charset); - - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_PiElementHandler_Class_t NW_XHTML_PiElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_PiElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_ElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_piElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_PiElementHandler_t NW_XHTML_PiElementHandler = { - { { &NW_XHTML_PiElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -_NW_XHTML_PiElementHandler_Initialize (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* node) -{ - NW_Uint16 piTargetToken; - - NW_REQUIRED_PARAM(elementHandler); - - /* parameter assertion */ - NW_ASSERT (NW_Object_IsInstanceOf (elementHandler, - &NW_XHTML_PiElementHandler_Class)); - NW_ASSERT (NW_Object_IsInstanceOf (contentHandler, - &NW_XHTML_ContentHandler_Class)); - NW_ASSERT (node != NULL); - - piTargetToken = - NW_DOM_ProcessingInstructionNode_getTargetToken (node); - - /* Literal means as there is no corresponding token in the Dictionary. so treat as "zzzunknown". */ - if (piTargetToken == NW_WBXML_LITERAL) - piTargetToken = NW_XHTML_AttributeToken_zzzunknown; - - if (piTargetToken == NW_XHTML_AttributeToken_xml_stylesheet) { - /* currently only processes's xml-stylesheet PI */ - return NW_XHTML_PiElementHandler_XmlStylesheet - (elementHandler, contentHandler, node); - } - if (piTargetToken == NW_XHTML_AttributeToken_zzzunknown) { - return NW_XHTML_PiElementHandler_zzzunknown - (elementHandler, contentHandler, node); - } - - return KBrsrSuccess; -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLTelephonyServices.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLTelephonyServices.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,494 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "nw_xhtml_telephonyservicesi.h" -#include "nwx_string.h" -#include "nw_hed_documentroot.h" -#include "NW_Text_Abstract.h" -#include "nw_text_iterator.h" -#include "nw_wmlscriptch_wmlscriptcontenthandler.h" /* The load context */ -#include "nwx_http_defs.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TelephonyServices_Class_t NW_XHTML_TelephonyServices_Class = { - { /* NW_Object_Core */ - /* super */ &NW_Object_Core_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_TelephonyServices */ - /* unused */ 0 - } -}; - - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TelephonyServices_t NW_XHTML_TelephonyServices = { - { &NW_XHTML_TelephonyServices_Class } -}; - -/* ------------------------------------------------------------------------- */ - -static TBrowserStatusCode -TelephonyServices_StartLoad(NW_XHTML_ContentHandler_t* contentHandler, - NW_Ucs2* url) -{ - NW_Text_t *urlText = NULL; - TBrowserStatusCode status = KBrsrSuccess; - - NW_ASSERT(url != NULL); - NW_ASSERT(contentHandler != NULL); - urlText = NW_Text_New (HTTP_iso_10646_ucs_2, url, (NW_Text_Length_t)NW_Str_Strlen(url), 0); - if (urlText == NULL) - { - return KBrsrOutOfMemory; - } - /* Send the new url to the loaders */ - status = NW_XHTML_ContentHandler_StartLoad (contentHandler, NW_TextOf (urlText), - NW_HED_UrlRequest_Reason_DocLoad, (void *) &NW_XHTML_TelephonyServices_Class, - NW_UrlRequest_Type_Any); - /* If the load request was dispatched to the WTAI handler, - the response is KBrsrHedContentDispatched */ - if (status == KBrsrHedContentDispatched) - { - status = KBrsrSuccess; - } - - NW_Object_Delete(urlText); - return status; -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_TelephonyServices_MakeCall(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* number, - NW_Bool cti) -{ - NW_Ucs2* ucs2Number = NULL; - NW_Ucs2* storage = NULL; - const char* const makeCallUrlPrefix = "wtai://wp/mc;"; - NW_Text_Length_t charCount; - NW_Uint8 freeNeeded = NW_FALSE; - - NW_REQUIRED_PARAM(telServices); - - NW_TRY (status ) { - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (number, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - if (cti){ - ucs2Number = (NW_Ucs2*) NW_Mem_Malloc((NW_Asc_strlen(makeCallUrlPrefix) + NW_Str_Strlen(storage) + 1) * sizeof(NW_Ucs2)); - NW_THROW_OOM_ON_NULL (ucs2Number, status); - NW_Str_StrcpyConst(ucs2Number, makeCallUrlPrefix); - NW_Str_Strcat(ucs2Number, storage); - } - else{ // skip the scheme part - ucs2Number = (NW_Ucs2*) NW_Mem_Malloc((NW_Asc_strlen(makeCallUrlPrefix) + NW_Str_Strlen(storage) - 3) * sizeof(NW_Ucs2)); - NW_THROW_OOM_ON_NULL (ucs2Number, status); - NW_Str_StrcpyConst(ucs2Number, makeCallUrlPrefix); - NW_Str_Strcat(ucs2Number, storage + 4); - } - /* Send the load request */ - status = TelephonyServices_StartLoad(contentHandler, ucs2Number); - } - NW_CATCH (status) { - } - NW_FINALLY { - if ((storage != NULL) && freeNeeded){ - NW_Mem_Free(storage); - } - NW_Mem_Free(ucs2Number); - return status; - } NW_END_TRY -} - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_TelephonyServices_SaveToPhoneBook(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* number, - NW_Text_t* name, - NW_Text_t* email, - NW_Bool cti) -{ - NW_Ucs2* storage = NULL; - NW_Text_Length_t charCount; - NW_Uint8 freeNeeded = NW_FALSE; - NW_Url_Schema_t scheme; - NW_Ucs2* ucs2Number = NULL; - NW_Ucs2* ucs2Name = NULL; - NW_Ucs2* ucs2Email = NULL; - NW_Ucs2* url = NULL; - const char* const makeCallUrlPrefix = "wtai://wp/ap;"; - const char* const numberNameSeparator = ";"; - NW_Uint32 len = NW_Asc_strlen(makeCallUrlPrefix) + 3; // NULL terminator and ';' separators - - NW_REQUIRED_PARAM(telServices); - - NW_TRY (status) { - - NW_THROW_ON_NULL (number, status, KBrsrFailure); - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (number, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - (void) NW_Url_GetScheme(storage, &scheme); - - ucs2Number = NULL; - ucs2Name = NULL; - ucs2Email = NULL; - - /* to handle cti */ - if(cti) - { - ucs2Number = NW_Str_Newcpy(storage); - } - else /* handle tel:// scheme */ - { - ucs2Number = NW_Str_Newcpy(storage+4); - } - NW_THROW_OOM_ON_NULL (ucs2Number, status); - - len += NW_Str_Strlen(ucs2Number); - - if (freeNeeded){ - NW_Mem_Free(storage); - storage = NULL; - } - - if (name) - { - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (name, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - if (freeNeeded){ - ucs2Name = storage; - } - else{ - ucs2Name = NW_Str_Newcpy(storage); - NW_THROW_OOM_ON_NULL (ucs2Name, status); - } - len += NW_Str_Strlen(ucs2Name); - } - - if (email) - { - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (email, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - if (freeNeeded){ - ucs2Email = storage; - storage = NULL; - } - else{ - ucs2Email = NW_Str_Newcpy(storage); - NW_THROW_OOM_ON_NULL (ucs2Email, status); - } - len += NW_Str_Strlen(ucs2Email); - } - - url = (NW_Ucs2*) NW_Mem_Malloc(len * sizeof(NW_Ucs2)); - NW_THROW_OOM_ON_NULL (url, status); - NW_Str_StrcpyConst(url, makeCallUrlPrefix); - NW_Str_Strcat(url, ucs2Number); - NW_Str_StrcatConst(url, numberNameSeparator); - if (ucs2Name != NULL) - { - NW_Str_Strcat(url, ucs2Name); - } - NW_Str_StrcatConst(url, numberNameSeparator); - if (ucs2Email != NULL) - { - NW_Str_Strcat(url, ucs2Email); - } - /* Send the load request */ - status = TelephonyServices_StartLoad(contentHandler, url); - } - NW_CATCH (status) { - } - NW_FINALLY { - if ((storage != NULL) && freeNeeded){ - NW_Mem_Free(storage); - } - NW_Mem_Free(ucs2Number); - if (ucs2Name != NULL) - NW_Mem_Free(ucs2Name); - if (ucs2Email != NULL) - NW_Mem_Free(ucs2Email); - if (url != NULL) - NW_Mem_Free(url); - - return status; - } NW_END_TRY -} - -// ---------------------------------------------------------------------------- -// NW_XHTML_TelephonyServices_ParseNumber -// -// Parse the telephone number from the wtai or tel scheme. Also check phone -// number from cti attribute, if present with tel scheme and aCti = NW_TRUE. -// -// WTAI cases: <a href="wtai://wp/mc;6175551234;!retValue"> -// <a href="wtai://wp/mc;6175551234"> -// <a href="wtai://wp/sd;123*987!retValue"> -// <a href="wtai://wp/ap;617551234;Joe Smith!returnValue"> -// TEL cases: <a href="tel:6175551234"> -// <a href="tel:6175551234 cti=7815554321/67#,89*"> -// -// Returns NW_TRUE if a valid number, NW_FALSE if not a valid number. -// ---------------------------------------------------------------------------- -NW_Bool -NW_XHTML_TelephonyServices_ParseNumber(NW_XHTML_TelephonyServices_t* aTelServices, - NW_Ucs2* aNumber, - NW_Bool aCti) - { - NW_REQUIRED_PARAM(aTelServices); - NW_Bool retVal = NW_FALSE; - NW_Ucs2 ch; - NW_Ucs2* unEscapedStr = NULL; - NW_Int32 charCount = 0; - NW_Int32 digitCount = 0; - - if (aNumber == NULL) - { - NW_FINISHED - } - - /* unescape the phone number */ - unEscapedStr = NW_Str_New(NW_Url_UnEscapeStringLen(aNumber)); - if (unEscapedStr == NULL) - { // not able to allocate memory - NW_FINISHED - } - - if (NW_Url_UnEscapeString(aNumber, unEscapedStr) == NULL) - { // not able to unescape the phone number string - NW_FINISHED - } - - ch = *unEscapedStr; - - // Allow numbers to begin with the "+" char. - if (ch == '+') - { - charCount++; - ch = unEscapedStr[charCount]; - } - - // Parse the phone number, until we reach the end - while (ch != 0) - { - // Do we have a valid digit - if (NW_Str_Isdigit(ch)) - { - charCount++; - ch = unEscapedStr[charCount]; - digitCount++; - } - // Do we have a valid non-digit character - else if (NW_Str_Isspace(ch) || - (ch == '#') || - (ch == '*') || - (ch == '.') || - (ch == '(') || - (ch == ')') || - (ch == '-') || - (ch == ',')) - { - charCount++; - ch = unEscapedStr[charCount]; - } - // Do we have a returnValue delimiter "!", or a parameter delimiter ";". - // We are at the end of the phone number. - // For example: wtai:\\wp\ap;6175551234;Joe Smith!retValue - else if ((ch == '!') || (ch ==';')) - { - break; - } - // Do we have a character that is only valid in a cti number - else if (ch == '/') - { - // If this a cti number, break and continue processing as cti number - if (aCti) - { - break; - } - // We have a non-cti number with invalid characters - else - { - NW_FINISHED - } - } - // We have an invalid character in the number, before we came to the end - else - { - NW_FINISHED - } - } // end of while loop - - // Is our number an invalid length - if ((digitCount < 1) || (digitCount > 24)) - { - NW_FINISHED - } - - // If this is not a cti number, we are done - if (!aCti) - { - retVal = NW_TRUE; - NW_FINISHED - } - - // This is a cti number, continue parsing the output with cti specs - while (ch != 0) - { - // Do we have a valid cti character - if (NW_Str_Isdigit(ch) || - (ch == '#') || - (ch == '*') || - (ch == ',')) - { - charCount++; - ch = aNumber[charCount]; - } - // Do we have a slash, check if consecutive slashes - else if (ch == '/') - { - charCount++; - ch = unEscapedStr[charCount]; - // Consecutive "/" (pause) are not allowed according to NTT DoCoMo's - // "I-Mode and C-Html difference" document (section 3), also wtai spec. - if (ch == '/') - { - NW_FINISHED - } - } - // We have an invalid character in the cti number, before we came to end - else - { - NW_FINISHED - } - } // end of while loop - - retVal = NW_TRUE; - - NW_FINALLY - { - NW_Str_Delete (unEscapedStr); - return retVal; - } - } - -/* ------------------------------------------------------------------------- */ -TBrowserStatusCode -NW_XHTML_TelephonyServices_Mailto_SaveToPhoneBook(NW_XHTML_TelephonyServices_t* telServices, - NW_XHTML_ContentHandler_t* contentHandler, - NW_Text_t* email, - NW_Text_t* name, - NW_Bool isEmail) -{ - NW_Ucs2* storage = NULL; - NW_Text_Length_t charCount; - NW_Uint8 freeNeeded = NW_FALSE; - NW_Ucs2* ucs2Name = NULL; - NW_Ucs2* ucs2Email = NULL; - NW_Int32 ucs2EmailLength; - - const char* const makeCallUrlPrefix = "wtai://wp/ap;;"; // No Number - const char* const numberNameSeparator = ";"; - ucs2EmailLength = (NW_Asc_strlen(makeCallUrlPrefix) + NW_Asc_strlen(numberNameSeparator)) - * sizeof(NW_Ucs2); - - NW_REQUIRED_PARAM(telServices); - - NW_TRY (status) { - if (name) - { - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (name, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - ucs2Name = NW_Str_Newcpy(storage); - NW_THROW_OOM_ON_NULL (ucs2Name, status); - if (freeNeeded){ - NW_Mem_Free(storage); - storage = NULL; - freeNeeded = NW_FALSE; - } - - ucs2EmailLength += (NW_Str_Strlen(ucs2Name) * sizeof(NW_Ucs2)); - } - - NW_THROW_ON_NULL (email, status, KBrsrFailure); - storage = (NW_Ucs2*) - NW_Text_GetUCS2Buffer (email, NW_Text_Flags_Aligned, &charCount, &freeNeeded); - NW_THROW_OOM_ON_NULL (storage, status); - - /* handle mailto: scheme */ - if(isEmail) - { - ucs2EmailLength += ((NW_Str_Strlen(storage) + 1)* sizeof(NW_Ucs2)); - } - else - { - ucs2EmailLength += ((NW_Str_Strlen(storage) - 6) * sizeof(NW_Ucs2)); - } - ucs2Email = (NW_Ucs2*) NW_Mem_Malloc(ucs2EmailLength); - NW_THROW_OOM_ON_NULL (ucs2Email, status); - /* Create a new URL containing the wtai scheme and the e-mail address */ - NW_Str_StrcpyConst(ucs2Email, makeCallUrlPrefix); - - if (ucs2Name != NULL) - { - NW_Str_Strcat(ucs2Email, ucs2Name); - } - NW_Str_StrcatConst(ucs2Email, numberNameSeparator); - - if(isEmail) - { - NW_Str_Strcat(ucs2Email, storage ); - } - else - { - NW_Str_Strcat(ucs2Email, storage + 7); - } - - /* Send the load request */ - status = TelephonyServices_StartLoad(contentHandler, ucs2Email); - } - NW_CATCH (status) { - } - NW_FINALLY { - if ((storage != NULL) && freeNeeded){ - NW_Mem_Free(storage); - } - if (ucs2Name != NULL){ - NW_Mem_Free(ucs2Name); - } - NW_Mem_Free(ucs2Email); - return status; - } NW_END_TRY -} diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wmlengine/src/xhtml/src/XHTMLTextElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLTextElementHandler.cpp Mon May 03 13:32:15 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2000 - 2001 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include "nw_xhtml_textelementhandleri.h" - -#include "nw_lmgr_textbox.h" -#include "nw_dom_text.h" -#include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_hed_documentroot.h" -#include "nw_hed_hedeventhandler.h" -#include "nw_adt_types.h" -#include "BrsrStatusCodes.h" - -/* ------------------------------------------------------------------------- * - class definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const -NW_XHTML_TextElementHandler_Class_t NW_XHTML_TextElementHandler_Class = { - { /* NW_Object_Core */ - /* super */ &NW_XHTML_ElementHandler_Class, - /* queryInterface */ _NW_Object_Core_QueryInterface - }, - { /* NW_XHTML_ElementHandler */ - /* initialize */ _NW_XHTML_ElementHandler_Initialize, - /* createBoxTree */ _NW_XHTML_TextElementHandler_CreateBoxTree, - /* processEvent */ _NW_XHTML_ElementHandler_ProcessEvent - }, - { /* NW_XHTML_TextElementHandler */ - /* unused */ NW_Object_Unused - } -}; - -/* ------------------------------------------------------------------------- * - singleton definition - * ------------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------------- */ -const NW_XHTML_TextElementHandler_t NW_XHTML_TextElementHandler = { - { { &NW_XHTML_TextElementHandler_Class } } -}; - -/* ------------------------------------------------------------------------- * - virtual methods - * ------------------------------------------------------------------------- */ - -TBrowserStatusCode /*ARGSUSED*/ -_NW_XHTML_TextElementHandler_CreateBoxTree (const NW_XHTML_ElementHandler_t* elementHandler, - NW_XHTML_ContentHandler_t* contentHandler, - NW_DOM_ElementNode_t* elementNode, - NW_LMgr_ContainerBox_t* containerBox) -{ - NW_Text_t* text = NULL; - NW_LMgr_TextBox_t* textBox = NULL; - NW_LMgr_ContainerBox_t *parentBox = NULL; - NW_Text_Length_t textLen,i; - - NW_TRY (status) { - - NW_REQUIRED_PARAM(elementHandler); - - text = NW_XHTML_GetDOMTextNodeData(contentHandler, (NW_DOM_TextNode_t*) elementNode); - - // check for whitespace - textLen = NW_Text_GetCharCount(text); - - for (i = 0; i < textLen; i++) - { - if (!NW_Str_Isspace((NW_Ucs2)NW_Text_GetAt(text, i))) - { - contentHandler->ignoreFramesetElement = NW_TRUE; - break; - } - } - - if (text == NULL) { - return KBrsrSuccess; /* TODO: should we discriminate our "success"? */ - } - parentBox = containerBox; - - /* create the TextBox and insert it into our parent */ - textBox = (NW_LMgr_TextBox_t*) NW_LMgr_TextBox_New (0, text); - NW_THROW_OOM_ON_NULL (textBox, status); - text = NULL; - - status = NW_LMgr_ContainerBox_AddChild (parentBox, NW_LMgr_BoxOf (textBox)); - _NW_THROW_ON_ERROR(status); - textBox = NULL; - - } NW_CATCH (status) { - if(textBox) { - NW_Object_Delete(textBox); - } - if(text) { - NW_Object_Delete (text); - } - } NW_FINALLY { - return status; - } NW_END_TRY -} - diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wrtharvester/inc/wrtusbhandler.h --- a/webengine/wrtharvester/inc/wrtusbhandler.h Mon May 03 13:32:15 2010 +0300 +++ b/webengine/wrtharvester/inc/wrtusbhandler.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,21 +1,22 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name : WidgetMMCHandler.h +* Part of : Widget Registry +* Description : Acts on MMC card insertion/removal +* Version : 3.1 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Acts on MMC card insertion/removal -* +* Copyright © 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================= */ - #ifndef WIDGETMMCHANDLER_H #define WIDGETMMCHANDLER_H diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wrtharvester/rom/wrtharvesterResources.iby --- a/webengine/wrtharvester/rom/wrtharvesterResources.iby Mon May 03 13:32:15 2010 +0300 +++ b/webengine/wrtharvester/rom/wrtharvesterResources.iby Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,22 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================= +* Name : wrtharvesterResources.iby +* Part of : +* Description : The resource iby file contains resource that needs to be +* localized for wrtharvester +* Version : %version: 1 % * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The resource iby file contains resource that needs to be -* localized for wrtharvester -* +* Copyright (c) 2009 Nokia. All rights reserved. +* This material, including documentation and any related computer +* programs, is protected by copyright controlled by Nokia. All +* rights are reserved. Copying, including reproducing, storing, +* adapting or translating, any or all of this material requires the +* prior written consent of Nokia. This material also contains +* confidential information which may not be disclosed to others +* without the prior written consent of Nokia. +* ============================================================================ */ - #ifndef WRTHARVESTERRESOURCES_IBY #define WRTHARVESTERRESOURCES_IBY diff -r 92a765b5b3e7 -r 91031d3aab7d webengine/wrtharvester/src/wrtusbhandler.cpp --- a/webengine/wrtharvester/src/wrtusbhandler.cpp Mon May 03 13:32:15 2010 +0300 +++ b/webengine/wrtharvester/src/wrtusbhandler.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,22 +1,26 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle notifications of MMC events. -* -* -* -*/ +// +// ============================================================================ +// Name : WidgetMMCHandler.cpp +// Part of : SW Installer UIs / WidgetInstallerUI +// +// Description: Handle notifications of MMC events. +// +// +// Version : 3.1 +// +// Copyright © 2006 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +// ============================================================================== +/// +// INCLUDE FILES #include "wrtusbhandler.h" #include "wrtharvester.h" #include "wrtusbhandler.h" diff -r 92a765b5b3e7 -r 91031d3aab7d widgets/widgetapp/inc/WidgetUiNetworkListener.h --- a/widgets/widgetapp/inc/WidgetUiNetworkListener.h Mon May 03 13:32:15 2010 +0300 +++ b/widgets/widgetapp/inc/WidgetUiNetworkListener.h Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,22 @@ -/* -* Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - +// +//============================================================================== +// Name : WidgetUiNetworkListener.h +// Part of : WidgetUI +// Interface : +// Description : +// Version : %version: 9 % +// +// Copyright 2008, 2009 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +//============================================================================== +// #ifndef WIDGETUINETWORKLISTENER_H_ #define WIDGETUINETWORKLISTENER_H_ diff -r 92a765b5b3e7 -r 91031d3aab7d widgets/widgetapp/src/WidgetUiNetworkListener.cpp --- a/widgets/widgetapp/src/WidgetUiNetworkListener.cpp Mon May 03 13:32:15 2010 +0300 +++ b/widgets/widgetapp/src/WidgetUiNetworkListener.cpp Fri Jun 11 14:42:15 2010 +0300 @@ -1,20 +1,22 @@ -/* -* Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - +// +//============================================================================== +// Name : WidgetUiNetworkListener.cpp +// Part of : WidgetUI +// Interface : +// Description : +// Version : %version: 9 % +// +// Copyright 2008, 2009 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +//============================================================================== +// #include "WidgetUiNetworkListener.h"